| 1 |
(()=>{var e,t,n={5146(){window.wcfWpNavMenuChange=function(e){const t=cartflows_admin.admin_base_slug;let n="";"store-checkout"===e&&""!==cartflows_admin.global_checkout_id?n="admin.php?page="+t+"&path=store-checkout&action=wcf-edit-flow&flow_id="+encodeURIComponent(cartflows_admin.global_checkout_id):("store-checkout-library"===e&&(e="store-checkout"),n=e?"admin.php?page="+t+"&path="+encodeURIComponent(e):"admin.php?page="+t);const r=`.wp-submenu-wrap li > a[href$="${n}"]`,o=document.querySelectorAll(r);Array.from(document.getElementsByClassName("current")).forEach(function(e){e.parentElement.classList.contains("wp-submenu")&&e.classList.remove("current")}),Array.from(o).forEach(function(e){e.parentElement.classList.add("current")})},window.wcfUnsavedChanges=!1,window.onbeforeunload=function(){if(wcfUnsavedChanges)return"Unsaved Changes"},window.wcfCartflowsPro=function(){return!!cartflows_admin.is_pro},window.wcfCartflowsTypePro=function(){return!(!cartflows_admin.is_pro||"pro"!==cartflows_admin.cf_pro_type)},window.wcfCartflowsTypePlus=function(){return!(!cartflows_admin.is_pro||"plus"!==cartflows_admin.cf_pro_type)},window.wcfCartflowsTypeStarter=function(){return!(!cartflows_admin.is_pro||"starter"!==cartflows_admin.cf_pro_type)},window.wcfCartflowsTypePlusPro=function(){return wcfCartflowsTypePlus()||wcfCartflowsTypePro()},window.wcfInactiveProPlus=function(){const e=cartflows_admin.cf_pro_type_inactive;return!("inactive"!==cartflows_admin.cf_pro_status||!["CartFlows Pro","CartFlows Plus"].includes(e))},window.wcfInactivepluginType=function(){let e="";switch(cartflows_admin.cf_pro_type_inactive){case"CartFlows Pro":e="pro";break;case"CartFlows Plus":e="plus";break;case"CartFlows Starter":e="starter"}return e},window.getUtmUrl=function(e,t={}){const n=cartflows_admin?.utm_defaults||{source:"dashboard",medium:"free-cartflows"},r=new URL(e);return r.searchParams.has("utm_source")||r.searchParams.set("utm_source",n.source),r.searchParams.has("utm_medium")||r.searchParams.set("utm_medium",n.medium),Object.entries(t||{}).forEach(([e,t])=>{null!=t&&""!==t&&r.searchParams.set(e,t)}),r.toString()},window.getKbDocUrl=function(e,t={}){return window.getUtmUrl(e,{utm_campaign:"docs",...t||{}})},window.getUpgradeToProUrl=function(e={}){const t=cartflows_admin?.cf_upgrade_to_pro_url||(cartflows_admin?.cf_domain_url||"https://cartflows.com/")+"pricing/";return window.getUtmUrl(t,{utm_campaign:"go-pro",...e||{}})},window.setSureTriggersConfig=function(e){window?.SureTriggers.init(e)}},6246(e,t,n){e.exports={graphlib:n(8191),layout:n(8202),debug:n(8909),util:{time:n(3988).time,notime:n(3988).notime},version:n(7038)}},6822(e,t,n){"use strict";var r=n(6857),o=n(2031);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?o(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},o={};return r.forEach(e.nodes(),function a(i){r.has(o,i)||(o[i]=!0,n[i]=!0,r.forEach(e.outEdges(i),function(e){r.has(n,e.w)?t.push(e):a(e.w)}),delete n[i])}),t}(e);r.forEach(t,function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))})},undo:function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}}},135(e,t,n){var r=n(6857),o=n(3988);function a(e,t,n,r,a,i){var s={width:0,height:0,rank:i,borderType:t},l=a[t][i-1],c=o.addDummyNode(e,"border",s,n);a[t][i]=c,e.setParent(c,r),l&&e.setEdge(l,c,{weight:1})}e.exports=function(e){r.forEach(e.children(),function t(n){var o=e.children(n),i=e.node(n);if(o.length&&r.forEach(o,t),r.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var s=i.minRank,l=i.maxRank+1;s<l;++s)a(e,"borderLeft","_bl",n,i,s),a(e,"borderRight","_br",n,i,s)}})}},4850(e,t,n){"use strict";var r=n(6857);function o(e){r.forEach(e.nodes(),function(t){a(e.node(t))}),r.forEach(e.edges(),function(t){a(e.edge(t))})}function a(e){var t=e.width;e.width=e.height,e.height=t}function i(e){e.y=-e.y}function s(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||o(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),function(t){i(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.forEach(n.points,i),r.has(n,"y")&&i(n)})}(e),"lr"!==t&&"rl"!==t||(function(e){r.forEach(e.nodes(),function(t){s(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"x")&&s(n)})}(e),o(e))}}},9859(e){function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},8909(e,t,n){var r=n(6857),o=n(3988),a=n(8191).Graph;e.exports={debugOrdering:function(e){var t=o.buildLayerMatrix(e),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)}),r.forEach(e.edges(),function(e){n.setEdge(e.v,e.w,{},e.name)}),r.forEach(t,function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,function(e,t){return n.setEdge(e,t,{style:"invis"}),t})}),n}}},8191(e,t,n){var r;try{r=n(8362)}catch(e){}r||(r=window.graphlib),e.exports=r},2031(e,t,n){var r=n(6857),o=n(8191).Graph,a=n(9859);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new o,i=0,s=0;r.forEach(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),r.forEach(e.edges(),function(e){var r=n.edge(e.v,e.w)||0,o=t(e),a=r+o;n.setEdge(e.v,e.w,a),s=Math.max(s,n.node(e.v).out+=o),i=Math.max(i,n.node(e.w).in+=o)});var c=r.range(s+i+3).map(function(){return new a}),u=i+1;return r.forEach(n.nodes(),function(e){l(c,u,n.node(e))}),{graph:n,buckets:c,zeroIdx:u}}(e,t||i),c=function(e,t,n){for(var r,o=[],a=t[t.length-1],i=t[0];e.nodeCount();){for(;r=i.dequeue();)s(e,t,n,r);for(;r=a.dequeue();)s(e,t,n,r);if(e.nodeCount())for(var l=t.length-2;l>0;--l)if(r=t[l].dequeue()){o=o.concat(s(e,t,n,r,!0));break}}return o}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,function(t){return e.outEdges(t.v,t.w)}),!0)};var i=r.constant(1);function s(e,t,n,o,a){var i=a?[]:void 0;return r.forEach(e.inEdges(o.v),function(r){var o=e.edge(r),s=e.node(r.v);a&&i.push({v:r.v,w:r.w}),s.out-=o,l(t,n,s)}),r.forEach(e.outEdges(o.v),function(r){var o=e.edge(r),a=r.w,i=e.node(a);i.in-=o,l(t,n,i)}),e.removeNode(o.v),i}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},8202(e,t,n){"use strict";var r=n(6857),o=n(6822),a=n(8209),i=n(9361),s=n(3988).normalizeRanks,l=n(2948),c=n(3988).removeEmptyRanks,u=n(6353),d=n(135),f=n(4850),p=n(1453),m=n(3776),h=n(3988),g=n(8191).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?h.time:h.notime;n("layout",function(){var t=n(" buildLayoutGraph",function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=I(e.graph());return t.setGraph(r.merge({},w,_(n,y),r.pick(n,b))),r.forEach(e.nodes(),function(n){var o=I(e.node(n));t.setNode(n,r.defaults(_(o,v),x)),t.setParent(n,e.parent(n))}),r.forEach(e.edges(),function(n){var o=I(e.edge(n));t.setEdge(n,r.merge({},E,_(o,N),r.pick(o,M)))}),t}(e)});n(" runLayout",function(){!function(e,t){t(" makeSpaceForEdgeLabels",function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(e)}),t(" removeSelfEdges",function(){!function(e){r.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}(e)}),t(" acyclic",function(){o.run(e)}),t(" nestingGraph.run",function(){u.run(e)}),t(" rank",function(){i(h.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};h.addDummyNode(e,"edge-proxy",o,"_ep")}})}(e)}),t(" removeEmptyRanks",function(){c(e)}),t(" nestingGraph.cleanup",function(){u.cleanup(e)}),t(" normalizeRanks",function(){s(e)}),t(" assignRankMinMax",function(){!function(e){var t=0;r.forEach(e.nodes(),function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))}),e.graph().maxRank=t}(e)}),t(" removeEdgeLabelProxies",function(){!function(e){r.forEach(e.nodes(),function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}(e)}),t(" normalize.run",function(){a.run(e)}),t(" parentDummyChains",function(){l(e)}),t(" addBorderSegments",function(){d(e)}),t(" order",function(){p(e)}),t(" insertSelfEdges",function(){!function(e){var t=h.buildLayerMatrix(e);r.forEach(t,function(t){var n=0;r.forEach(t,function(t,o){var a=e.node(t);a.order=o+n,r.forEach(a.selfEdges,function(t){h.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:a.rank,order:o+ ++n,e:t.e,label:t.label},"_se")}),delete a.selfEdges})})}(e)}),t(" adjustCoordinateSystem",function(){f.adjust(e)}),t(" position",function(){m(e)}),t(" positionSelfEdges",function(){!function(e){r.forEach(e.nodes(),function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,a=r.y,i=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*i/3,y:a-s},{x:o+5*i/6,y:a-s},{x:o+i,y:a},{x:o+5*i/6,y:a+s},{x:o+2*i/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}(e)}),t(" removeBorderNodes",function(){!function(e){r.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),a=e.node(n.borderBottom),i=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-i.x),n.height=Math.abs(a.y-o.y),n.x=i.x+n.width/2,n.y=o.y+n.height/2}}),r.forEach(e.nodes(),function(t){"border"===e.node(t).dummy&&e.removeNode(t)})}(e)}),t(" normalize.undo",function(){a.undo(e)}),t(" fixupEdgeLabelCoords",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(e)}),t(" undoCoordinateSystem",function(){f.undo(e)}),t(" translateGraph",function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,a=0,i=e.graph(),s=i.marginx||0,l=i.marginy||0;function c(e){var r=e.x,i=e.y,s=e.width,l=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),o=Math.min(o,i-l/2),a=Math.max(a,i+l/2)}r.forEach(e.nodes(),function(t){c(e.node(t))}),r.forEach(e.edges(),function(t){var n=e.edge(t);r.has(n,"x")&&c(n)}),t-=s,o-=l,r.forEach(e.nodes(),function(n){var r=e.node(n);r.x-=t,r.y-=o}),r.forEach(e.edges(),function(n){var a=e.edge(n);r.forEach(a.points,function(e){e.x-=t,e.y-=o}),r.has(a,"x")&&(a.x-=t),r.has(a,"y")&&(a.y-=o)}),i.width=n-t+s,i.height=a-o+l}(e)}),t(" assignNodeIntersects",function(){!function(e){r.forEach(e.edges(),function(t){var n,r,o=e.edge(t),a=e.node(t.v),i=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=i,r=a),o.points.unshift(h.intersectRect(a,n)),o.points.push(h.intersectRect(i,r))})}(e)}),t(" reversePoints",function(){!function(e){r.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}(e)}),t(" acyclic.undo",function(){o.undo(e)})}(t,n)}),n(" updateInputGraph",function(){!function(e,t){r.forEach(e.nodes(),function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))}),r.forEach(e.edges(),function(n){var o=e.edge(n),a=t.edge(n);o.points=a.points,r.has(a,"x")&&(o.x=a.x,o.y=a.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)})})};var y=["nodesep","edgesep","ranksep","marginx","marginy"],w={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],v=["width","height"],x={width:0,height:0},N=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},M=["labelpos"];function _(e,t){return r.mapValues(r.pick(e,t),Number)}function I(e){var t={};return r.forEach(e,function(e,n){t[n.toLowerCase()]=e}),t}},6857(e,t,n){var r;try{r={cloneDeep:n(8055),constant:n(7334),defaults:n(4684),each:n(6135),filter:n(7612),find:n(7309),flatten:n(5970),forEach:n(7373),forIn:n(2420),has:n(1448),isUndefined:n(2216),last:n(8090),map:n(5378),mapValues:n(3916),max:n(4506),merge:n(5364),min:n(1684),minBy:n(6533),now:n(124),pick:n(4383),range:n(3181),reduce:n(860),sortBy:n(3031),uniqueId:n(7200),values:n(5880),zipObject:n(7248)}}catch(e){}r||(r=window._),e.exports=r},6353(e,t,n){var r=n(6857),o=n(3988);function a(e,t,n,i,s,l,c){var u=e.children(c);if(u.length){var d=o.addBorderNode(e,"_bt"),f=o.addBorderNode(e,"_bb"),p=e.node(c);e.setParent(d,c),p.borderTop=d,e.setParent(f,c),p.borderBottom=f,r.forEach(u,function(r){a(e,t,n,i,s,l,r);var o=e.node(r),u=o.borderTop?o.borderTop:r,p=o.borderBottom?o.borderBottom:r,m=o.borderTop?i:2*i,h=u!==p?1:s-l[c]+1;e.setEdge(d,u,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,f,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,d,{weight:0,minlen:s+l[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}e.exports={run:function(e){var t=o.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(o,a){var i=e.children(o);i&&i.length&&r.forEach(i,function(e){n(e,a+1)}),t[o]=a}return r.forEach(e.children(),function(e){n(e,1)}),t}(e),i=r.max(r.values(n))-1,s=2*i+1;e.graph().nestingRoot=t,r.forEach(e.edges(),function(t){e.edge(t).minlen*=s});var l=function(e){return r.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}(e)+1;r.forEach(e.children(),function(r){a(e,t,s,l,i,n,r)}),e.graph().nodeRankFactor=s},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}}},8209(e,t,n){"use strict";var r=n(6857),o=n(3988);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),function(t){!function(e,t){var n,r,a,i=t.v,s=e.node(i).rank,l=t.w,c=e.node(l).rank,u=t.name,d=e.edge(t),f=d.labelRank;if(c!==s+1){for(e.removeEdge(t),a=0,++s;s<c;++a,++s)d.points=[],r={width:0,height:0,edgeLabel:d,edgeObj:t,rank:s},n=o.addDummyNode(e,"edge",r,"_d"),s===f&&(r.width=d.width,r.height=d.height,r.dummy="edge-label",r.labelpos=d.labelpos),e.setEdge(i,n,{weight:d.weight},u),0===a&&e.graph().dummyChains.push(n),i=n;e.setEdge(i,l,{weight:d.weight},u)}}(e,t)})},undo:function(e){r.forEach(e.graph().dummyChains,function(t){var n,r=e.node(t),o=r.edgeLabel;for(e.setEdge(r.edgeObj,o);r.dummy;)n=e.successors(t)[0],e.removeNode(t),o.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),t=n,r=e.node(t)})}}},4384(e,t,n){var r=n(6857);e.exports=function(e,t,n){var o,a={};r.forEach(n,function(n){for(var r,i,s=e.parent(n);s;){if((r=e.parent(s))?(i=a[r],a[r]=s):(i=o,o=s),i&&i!==s)return void t.setEdge(i,s);s=r}})}},3860(e,t,n){var r=n(6857);e.exports=function(e,t){return r.map(t,function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}})}},7860(e,t,n){var r=n(6857),o=n(8191).Graph;e.exports=function(e,t,n){var a=function(e){for(var t;e.hasNode(t=r.uniqueId("_root")););return t}(e),i=new o({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(function(t){return e.node(t)});return r.forEach(e.nodes(),function(o){var s=e.node(o),l=e.parent(o);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(i.setNode(o),i.setParent(o,l||a),r.forEach(e[n](o),function(t){var n=t.v===o?t.w:t.v,a=i.edge(n,o),s=r.isUndefined(a)?0:a.weight;i.setEdge(n,o,{weight:e.edge(t).weight+s})}),r.has(s,"minRank")&&i.setNode(o,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),i}},6639(e,t,n){"use strict";var r=n(6857);function o(e,t,n){for(var o=r.zipObject(n,r.map(n,function(e,t){return t})),a=r.flatten(r.map(t,function(t){return r.sortBy(r.map(e.outEdges(t),function(t){return{pos:o[t.w],weight:e.edge(t).weight}}),"pos")}),!0),i=1;i<n.length;)i<<=1;var s=2*i-1;i-=1;var l=r.map(new Array(s),function(){return 0}),c=0;return r.forEach(a.forEach(function(e){var t=e.pos+i;l[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;c+=e.weight*n})),c}e.exports=function(e,t){for(var n=0,r=1;r<t.length;++r)n+=o(e,t[r-1],t[r]);return n}},1453(e,t,n){"use strict";var r=n(6857),o=n(8918),a=n(6639),i=n(4520),s=n(7860),l=n(4384),c=n(8191).Graph,u=n(3988);function d(e,t,n){return r.map(t,function(t){return s(e,t,n)})}function f(e,t){var n=new c;r.forEach(e,function(e){var o=e.graph().root,a=i(e,o,n,t);r.forEach(a.vs,function(t,n){e.node(t).order=n}),l(e,n,a.vs)})}function p(e,t){r.forEach(t,function(t){r.forEach(t,function(t,n){e.node(t).order=n})})}e.exports=function(e){var t=u.maxRank(e),n=d(e,r.range(1,t+1),"inEdges"),i=d(e,r.range(t-1,-1,-1),"outEdges"),s=o(e);p(e,s);for(var l,c=Number.POSITIVE_INFINITY,m=0,h=0;h<4;++m,++h){f(m%2?n:i,m%4>=2),s=u.buildLayerMatrix(e);var g=a(e,s);g<c&&(h=0,l=r.cloneDeep(s),c=g)}p(e,l)}},8918(e,t,n){"use strict";var r=n(6857);e.exports=function(e){var t={},n=r.filter(e.nodes(),function(t){return!e.children(t).length}),o=r.max(r.map(n,function(t){return e.node(t).rank})),a=r.map(r.range(o+1),function(){return[]}),i=r.sortBy(n,function(t){return e.node(t).rank});return r.forEach(i,function n(o){if(!r.has(t,o)){t[o]=!0;var i=e.node(o);a[i.rank].push(o),r.forEach(e.successors(o),n)}}),a}},4959(e,t,n){"use strict";var r=n(6857);e.exports=function(e,t){var n={};return r.forEach(e,function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)}),r.forEach(t.edges(),function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))}),function(e){var t=[];function n(e){return function(t){var n,o,a,i;t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&(o=t,a=0,i=0,(n=e).weight&&(a+=n.barycenter*n.weight,i+=n.weight),o.weight&&(a+=o.barycenter*o.weight,i+=o.weight),n.vs=o.vs.concat(n.vs),n.barycenter=a/i,n.weight=i,n.i=Math.min(o.i,n.i),o.merged=!0)}}function o(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var a=e.pop();t.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,o(a))}return r.map(r.filter(t,function(e){return!e.merged}),function(e){return r.pick(e,["vs","i","barycenter","weight"])})}(r.filter(n,function(e){return!e.indegree}))}},4520(e,t,n){var r=n(6857),o=n(3860),a=n(4959),i=n(5169);e.exports=function e(t,n,s,l){var c=t.children(n),u=t.node(n),d=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,p={};d&&(c=r.filter(c,function(e){return e!==d&&e!==f}));var m=o(t,c);r.forEach(m,function(n){if(t.children(n.v).length){var o=e(t,n.v,s,l);p[n.v]=o,r.has(o,"barycenter")&&(a=n,i=o,r.isUndefined(a.barycenter)?(a.barycenter=i.barycenter,a.weight=i.weight):(a.barycenter=(a.barycenter*a.weight+i.barycenter*i.weight)/(a.weight+i.weight),a.weight+=i.weight))}var a,i});var h=a(m,s);!function(e,t){r.forEach(e,function(e){e.vs=r.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}(h,p);var g=i(h,l);if(d&&(g.vs=r.flatten([d,g.vs,f],!0),t.predecessors(d).length)){var y=t.node(t.predecessors(d)[0]),w=t.node(t.predecessors(f)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+y.order+w.order)/(g.weight+2),g.weight+=2}return g}},5169(e,t,n){var r=n(6857),o=n(3988);function a(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}e.exports=function(e,t){var n,i=o.partition(e,function(e){return r.has(e,"barycenter")}),s=i.lhs,l=r.sortBy(i.rhs,function(e){return-e.i}),c=[],u=0,d=0,f=0;s.sort((n=!!t,function(e,t){return e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:n?t.i-e.i:e.i-t.i})),f=a(c,l,f),r.forEach(s,function(e){f+=e.vs.length,c.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,f=a(c,l,f)});var p={vs:r.flatten(c,!0)};return d&&(p.barycenter=u/d,p.weight=d),p}},2948(e,t,n){var r=n(6857);e.exports=function(e){var t=function(e){var t={},n=0;return r.forEach(e.children(),function o(a){var i=n;r.forEach(e.children(a),o),t[a]={low:i,lim:n++}}),t}(e);r.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),o=r.edgeObj,a=function(e,t,n,r){var o,a,i=[],s=[],l=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),i.push(o)}while(o&&(t[o].low>l||c>t[o].lim));for(a=o,o=r;(o=e.parent(o))!==a;)s.push(o);return{path:i.concat(s.reverse()),lca:a}}(e,t,o.v,o.w),i=a.path,s=a.lca,l=0,c=i[l],u=!0;n!==o.w;){if(r=e.node(n),u){for(;(c=i[l])!==s&&e.node(c).maxRank<r.rank;)l++;c===s&&(u=!1)}if(!u){for(;l<i.length-1&&e.node(c=i[l+1]).minRank<=r.rank;)l++;c=i[l]}e.setParent(n,c),n=e.successors(n)[0]}})}},9741(e,t,n){"use strict";var r=n(6857),o=n(8191).Graph,a=n(3988);function i(e,t){var n={};return r.reduce(t,function(t,o){var a=0,i=0,s=t.length,c=r.last(o);return r.forEach(o,function(t,u){var d=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),function(t){return e.node(t).dummy})}(e,t),f=d?e.node(d).order:s;(d||t===c)&&(r.forEach(o.slice(i,u+1),function(t){r.forEach(e.predecessors(t),function(r){var o=e.node(r),i=o.order;!(i<a||f<i)||o.dummy&&e.node(t).dummy||l(n,r,t)})}),i=u+1,a=f)}),o}),n}function s(e,t){var n={};function o(t,o,a,i,s){var c;r.forEach(r.range(o,a),function(o){c=t[o],e.node(c).dummy&&r.forEach(e.predecessors(c),function(t){var r=e.node(t);r.dummy&&(r.order<i||r.order>s)&&l(n,t,c)})})}return r.reduce(t,function(t,n){var a,i=-1,s=0;return r.forEach(n,function(r,l){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(a=e.node(c[0]).order,o(n,s,l,i,a),s=l,i=a)}o(n,s,n.length,a,t.length)}),n}),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function c(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function u(e,t,n,o){var a={},i={},s={};return r.forEach(t,function(e){r.forEach(e,function(e,t){a[e]=e,i[e]=e,s[e]=t})}),r.forEach(t,function(e){var t=-1;r.forEach(e,function(e){var l=o(e);if(l.length){l=r.sortBy(l,function(e){return s[e]});for(var u=(l.length-1)/2,d=Math.floor(u),f=Math.ceil(u);d<=f;++d){var p=l[d];i[e]===e&&t<s[p]&&!c(n,e,p)&&(i[p]=e,i[e]=a[e]=a[p],t=s[p])}}})}),{root:a,align:i}}function d(e,t,n,a,i){var s={},l=function(e,t,n,a){var i=new o,s=e.graph(),l=function(e,t,n){return function(o,a,i){var s,l=o.node(a),c=o.node(i),u=0;if(u+=l.width/2,r.has(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":s=-l.width/2;break;case"r":s=l.width/2}if(s&&(u+=n?s:-s),s=0,u+=(l.dummy?t:e)/2,u+=(c.dummy?t:e)/2,u+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(u+=n?s:-s),s=0,u}}(s.nodesep,s.edgesep,a);return r.forEach(t,function(t){var o;r.forEach(t,function(t){var r=n[t];if(i.setNode(r),o){var a=n[o],s=i.edge(a,r);i.setEdge(a,r,Math.max(l(e,t,o),s||0))}o=t})}),i}(e,t,n,i),c=i?"borderLeft":"borderRight";function u(e,t){for(var n=l.nodes(),r=n.pop(),o={};r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return u(function(e){s[e]=l.inEdges(e).reduce(function(e,t){return Math.max(e,s[t.v]+l.edge(t))},0)},l.predecessors.bind(l)),u(function(t){var n=l.outEdges(t).reduce(function(e,t){return Math.min(e,s[t.w]-l.edge(t))},Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==c&&(s[t]=Math.max(s[t],n))},l.successors.bind(l)),r.forEach(a,function(e){s[e]=s[n[e]]}),s}function f(e,t){return r.minBy(r.values(t),function(t){var n=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return r.forIn(t,function(t,r){var a=function(e,t){return e.node(t).width}(e,r)/2;n=Math.max(t+a,n),o=Math.min(t-a,o)}),n-o})}function p(e,t){var n=r.values(t),o=r.min(n),a=r.max(n);r.forEach(["u","d"],function(n){r.forEach(["l","r"],function(i){var s,l=n+i,c=e[l];if(c!==t){var u=r.values(c);(s="l"===i?o-r.min(u):a-r.max(u))&&(e[l]=r.mapValues(c,function(e){return e+s}))}})})}function m(e,t){return r.mapValues(e.ul,function(n,o){if(t)return e[t.toLowerCase()][o];var a=r.sortBy(r.map(e,o));return(a[1]+a[2])/2})}e.exports={positionX:function(e){var t,n=a.buildLayerMatrix(e),o=r.merge(i(e,n),s(e,n)),l={};r.forEach(["u","d"],function(a){t="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],function(n){"r"===n&&(t=r.map(t,function(e){return r.values(e).reverse()}));var i=("u"===a?e.predecessors:e.successors).bind(e),s=u(0,t,o,i),c=d(e,t,s.root,s.align,"r"===n);"r"===n&&(c=r.mapValues(c,function(e){return-e})),l[a+n]=c})});var c=f(e,l);return p(l,c),m(l,e.graph().align)},findType1Conflicts:i,findType2Conflicts:s,addConflict:l,hasConflict:c,verticalAlignment:u,horizontalCompaction:d,alignCoordinates:p,findSmallestWidthAlignment:f,balance:m}},3776(e,t,n){"use strict";var r=n(6857),o=n(3988),a=n(9741).positionX;e.exports=function(e){(function(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,a=0;r.forEach(t,function(t){var o=r.max(r.map(t,function(t){return e.node(t).height}));r.forEach(t,function(t){e.node(t).y=a+o/2}),a+=o+n})})(e=o.asNonCompoundGraph(e)),r.forEach(a(e),function(t,n){e.node(n).x=t})}},8481(e,t,n){"use strict";var r=n(6857),o=n(8191).Graph,a=n(8073).slack;function i(e,t){return r.forEach(e.nodes(),function n(o){r.forEach(t.nodeEdges(o),function(r){var i=r.v,s=o===i?r.w:i;e.hasNode(s)||a(t,r)||(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))})}),e.nodeCount()}function s(e,t){return r.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return a(t,n)})}function l(e,t,n){r.forEach(e.nodes(),function(e){t.node(e).rank+=n})}e.exports=function(e){var t,n,r=new o({directed:!1}),c=e.nodes()[0],u=e.nodeCount();for(r.setNode(c,{});i(r,e)<u;)t=s(r,e),n=r.hasNode(t.v)?a(e,t):-a(e,t),l(r,e,n);return r}},9361(e,t,n){"use strict";var r=n(8073).longestPath,o=n(8481),a=n(6860);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:!function(e){a(e)}(e);break;case"tight-tree":!function(e){r(e),o(e)}(e);break;case"longest-path":i(e)}};var i=r},6860(e,t,n){"use strict";var r=n(6857),o=n(8481),a=n(8073).slack,i=n(8073).longestPath,s=n(8191).alg.preorder,l=n(8191).alg.postorder,c=n(3988).simplify;function u(e){e=c(e),i(e);var t,n=o(e);for(p(n),d(n,e);t=h(n);)y(n,e,t,g(n,e,t))}function d(e,t){var n=l(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=f(e,t,n)}(e,t,n)})}function f(e,t,n){var o=e.node(n).parent,a=!0,i=t.edge(n,o),s=0;return i||(a=!1,i=t.edge(o,n)),s=i.weight,r.forEach(t.nodeEdges(n),function(r){var i,l,c=r.v===n,u=c?r.w:r.v;if(u!==o){var d=c===a,f=t.edge(r).weight;if(s+=d?f:-f,i=n,l=u,e.hasEdge(i,l)){var p=e.edge(n,u).cutvalue;s+=d?-p:p}}}),s}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),m(e,{},1,t)}function m(e,t,n,o,a){var i=n,s=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),function(a){r.has(t,a)||(n=m(e,t,n,a,o))}),s.low=i,s.lim=n++,a?s.parent=a:delete s.parent,n}function h(e){return r.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function g(e,t,n){var o=n.v,i=n.w;t.hasEdge(o,i)||(o=n.w,i=n.v);var s=e.node(o),l=e.node(i),c=s,u=!1;s.lim>l.lim&&(c=l,u=!0);var d=r.filter(t.edges(),function(t){return u===w(0,e.node(t.v),c)&&u!==w(0,e.node(t.w),c)});return r.minBy(d,function(e){return a(t,e)})}function y(e,t,n,o){var a=n.v,i=n.w;e.removeEdge(a,i),e.setEdge(o.v,o.w,{}),p(e),d(e,t),function(e,t){var n=r.find(e.nodes(),function(e){return!t.node(e).parent}),o=s(e,n);o=o.slice(1),r.forEach(o,function(n){var r=e.node(n).parent,o=t.edge(n,r),a=!1;o||(o=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?o.minlen:-o.minlen)})}(e,t)}function w(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=u,u.initLowLimValues=p,u.initCutValues=d,u.calcCutValue=f,u.leaveEdge=h,u.enterEdge=g,u.exchangeEdges=y},8073(e,t,n){"use strict";var r=n(6857);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),function n(o){var a=e.node(o);if(r.has(t,o))return a.rank;t[o]=!0;var i=r.min(r.map(e.outEdges(o),function(t){return n(t.w)-e.edge(t).minlen}));return i!==Number.POSITIVE_INFINITY&&null!=i||(i=0),a.rank=i})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},3988(e,t,n){"use strict";var r=n(6857),o=n(8191).Graph;function a(e,t,n,o){var a;do{a=r.uniqueId(o)}while(e.hasNode(a));return n.dummy=t,e.setNode(a,n),a}function i(e){return r.max(r.map(e.nodes(),function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n}))}e.exports={addDummyNode:a,simplify:function(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t},asNonCompoundGraph:function(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t},successorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,o=e.x,a=e.y,i=t.x-o,s=t.y-a,l=e.width/2,c=e.height/2;if(!i&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*l>Math.abs(i)*c?(s<0&&(c=-c),n=c*i/s,r=c):(i<0&&(l=-l),n=l,r=l*s/i),{x:o+n,y:a+r}},buildLayerMatrix:function(e){var t=r.map(r.range(i(e)+1),function(){return[]});return r.forEach(e.nodes(),function(n){var o=e.node(n),a=o.rank;r.isUndefined(a)||(t[a][o.order]=n)}),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank}));r.forEach(e.nodes(),function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)})},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank})),n=[];r.forEach(e.nodes(),function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)});var o=0,a=e.graph().nodeRankFactor;r.forEach(n,function(t,n){r.isUndefined(t)&&n%a!==0?--o:o&&r.forEach(t,function(t){e.node(t).rank+=o})})},addBorderNode:function(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),a(e,"border",o,t)},maxRank:i,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},7038(e){e.exports="0.8.5"},8351(e,t,n){var r;!function(){"use strict";var o,a=1e9,i={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},s=!0,l="[DecimalError] ",c=l+"Invalid argument: ",u=l+"Exponent out of range: ",d=Math.floor,f=Math.pow,p=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,m=1e7,h=d(1286742750677284.5),g={};function y(e,t){var n,r,o,a,i,l,c,u,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),s?S(t,f):t;if(c=e.d,u=t.d,i=e.e,o=t.e,c=c.slice(),a=i-o){for(a<0?(r=c,a=-a,l=u.length):(r=u,o=i,l=c.length),a>(l=(i=Math.ceil(f/7))>l?i+1:l+1)&&(a=l,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for((l=c.length)-(a=u.length)<0&&(a=l,r=u,u=c,c=r),n=0;a;)n=(c[--a]=c[a]+u[a]+n)/m|0,c[a]%=m;for(n&&(c.unshift(n),++o),l=c.length;0==c[--l];)c.pop();return t.d=c,t.e=o,s?S(t,f):t}function w(e,t,n){if(e!==~~e||e<t||e>n)throw Error(c+e)}function b(e){var t,n,r,o=e.length-1,a="",i=e[0];if(o>0){for(a+=i,t=1;t<o;t++)(n=7-(r=e[t]+"").length)&&(a+=M(n)),a+=r;(n=7-(r=(i=e[t])+"").length)&&(a+=M(n))}else if(0===i)return"0";for(;i%10==0;)i/=10;return a+i}g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},g.comparedTo=g.cmp=function(e){var t,n,r,o,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(t=0,n=(r=a.d.length)<(o=e.d.length)?r:o;t<n;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return r===o?0:r>o^a.s<0?1:-1},g.decimalPlaces=g.dp=function(){var e=this,t=e.d.length-1,n=7*(t-e.e);if(t=e.d[t])for(;t%10==0;t/=10)n--;return n<0?0:n},g.dividedBy=g.div=function(e){return v(this,new this.constructor(e))},g.dividedToIntegerBy=g.idiv=function(e){var t=this.constructor;return S(v(this,new t(e),0,1),t.precision)},g.equals=g.eq=function(e){return!this.cmp(e)},g.exponent=function(){return N(this)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){return this.cmp(e)>=0},g.isInteger=g.isint=function(){return this.e>this.d.length-2},g.isNegative=g.isneg=function(){return this.s<0},g.isPositive=g.ispos=function(){return this.s>0},g.isZero=function(){return 0===this.s},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n=this,r=n.constructor,a=r.precision,i=a+5;if(void 0===e)e=new r(10);else if((e=new r(e)).s<1||e.eq(o))throw Error(l+"NaN");if(n.s<1)throw Error(l+(n.s?"NaN":"-Infinity"));return n.eq(o)?new r(0):(s=!1,t=v(_(n,i),_(e,i),i),s=!0,S(t,a))},g.minus=g.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?j(t,e):y(t,(e.s=-e.s,e))},g.modulo=g.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(!(e=new r(e)).s)throw Error(l+"NaN");return n.s?(s=!1,t=v(n,e,0,1).times(e),s=!0,n.minus(t)):S(new r(n),o)},g.naturalExponential=g.exp=function(){return x(this)},g.naturalLogarithm=g.ln=function(){return _(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},g.plus=g.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?y(t,e):j(t,(e.s=-e.s,e))},g.precision=g.sd=function(e){var t,n,r,o=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(c+e);if(t=N(o)+1,n=7*(r=o.d.length-1)+1,r=o.d[r]){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n},g.squareRoot=g.sqrt=function(){var e,t,n,r,o,a,i,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(l+"NaN")}for(e=N(c),s=!1,0==(o=Math.sqrt(+c))||o==1/0?(((t=b(c.d)).length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=d((e+1)/2)-(e<0||e%2),r=new u(t=o==1/0?"5e"+e:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+e)):r=new u(o.toString()),o=i=(n=u.precision)+3;;)if(r=(a=r).plus(v(c,a,i+2)).times(.5),b(a.d).slice(0,i)===(t=b(r.d)).slice(0,i)){if(t=t.slice(i-3,i+1),o==i&&"4999"==t){if(S(a,n+1,0),a.times(a).eq(c)){r=a;break}}else if("9999"!=t)break;i+=4}return s=!0,S(r,n)},g.times=g.mul=function(e){var t,n,r,o,a,i,l,c,u,d=this,f=d.constructor,p=d.d,h=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,(c=p.length)<(u=h.length)&&(a=p,p=h,h=a,i=c,c=u,u=i),a=[],r=i=c+u;r--;)a.push(0);for(r=u;--r>=0;){for(t=0,o=c+r;o>r;)l=a[o]+h[r]*p[o-r-1]+t,a[o--]=l%m|0,t=l/m|0;a[o]=(a[o]+t)%m|0}for(;!a[--i];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,s?S(e,f.precision):e},g.toDecimalPlaces=g.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),void 0===e?n:(w(e,0,a),void 0===t?t=r.rounding:w(t,0,8),S(n,e+N(n)+1,t))},g.toExponential=function(e,t){var n,r=this,o=r.constructor;return void 0===e?n=k(r,!0):(w(e,0,a),void 0===t?t=o.rounding:w(t,0,8),n=k(r=S(new o(r),e+1,t),!0,e+1)),n},g.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?k(o):(w(e,0,a),void 0===t?t=i.rounding:w(t,0,8),n=k((r=S(new i(o),e+N(o)+1,t)).abs(),!1,e+N(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)},g.toInteger=g.toint=function(){var e=this,t=e.constructor;return S(new t(e),N(e)+1,t.rounding)},g.toNumber=function(){return+this},g.toPower=g.pow=function(e){var t,n,r,a,i,c,u=this,f=u.constructor,p=+(e=new f(e));if(!e.s)return new f(o);if(!(u=new f(u)).s){if(e.s<1)throw Error(l+"Infinity");return u}if(u.eq(o))return u;if(r=f.precision,e.eq(o))return S(u,r);if(c=(t=e.e)>=(n=e.d.length-1),i=u.s,c){if((n=p<0?-p:p)<=9007199254740991){for(a=new f(o),t=Math.ceil(r/7+4),s=!1;n%2&&D((a=a.times(u)).d,t),0!==(n=d(n/2));)D((u=u.times(u)).d,t);return s=!0,e.s<0?new f(o).div(a):S(a,r)}}else if(i<0)throw Error(l+"NaN");return i=i<0&&1&e.d[Math.max(t,n)]?-1:1,u.s=1,s=!1,a=e.times(_(u,r+12)),s=!0,(a=x(a)).s=i,a},g.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return void 0===e?r=k(o,(n=N(o))<=i.toExpNeg||n>=i.toExpPos):(w(e,1,a),void 0===t?t=i.rounding:w(t,0,8),r=k(o=S(new i(o),e,t),e<=(n=N(o))||n<=i.toExpNeg,e)),r},g.toSignificantDigits=g.tosd=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(w(e,1,a),void 0===t?t=n.rounding:w(t,0,8)),S(new n(this),e,t)},g.toString=g.valueOf=g.val=g.toJSON=function(){var e=this,t=N(e),n=e.constructor;return k(e,t<=n.toExpNeg||t>=n.toExpPos)};var v=function(){function e(e,t){var n,r=0,o=e.length;for(e=e.slice();o--;)n=e[o]*t+r,e[o]=n%m|0,r=n/m|0;return r&&e.unshift(r),e}function t(e,t,n,r){var o,a;if(n!=r)a=n>r?1:-1;else for(o=a=0;o<n;o++)if(e[o]!=t[o]){a=e[o]>t[o]?1:-1;break}return a}function n(e,t,n){for(var r=0;n--;)e[n]-=r,r=e[n]<t[n]?1:0,e[n]=r*m+e[n]-t[n];for(;!e[0]&&e.length>1;)e.shift()}return function(r,o,a,i){var s,c,u,d,f,p,h,g,y,w,b,v,x,E,M,_,I,j,k=r.constructor,D=r.s==o.s?1:-1,C=r.d,A=o.d;if(!r.s)return new k(r);if(!o.s)throw Error(l+"Division by zero");for(c=r.e-o.e,I=A.length,M=C.length,g=(h=new k(D)).d=[],u=0;A[u]==(C[u]||0);)++u;if(A[u]>(C[u]||0)&&--c,(v=null==a?a=k.precision:i?a+(N(r)-N(o))+1:a)<0)return new k(0);if(v=v/7+2|0,u=0,1==I)for(d=0,A=A[0],v++;(u<M||d)&&v--;u++)x=d*m+(C[u]||0),g[u]=x/A|0,d=x%A|0;else{for((d=m/(A[0]+1)|0)>1&&(A=e(A,d),C=e(C,d),I=A.length,M=C.length),E=I,w=(y=C.slice(0,I)).length;w<I;)y[w++]=0;(j=A.slice()).unshift(0),_=A[0],A[1]>=m/2&&++_;do{d=0,(s=t(A,y,I,w))<0?(b=y[0],I!=w&&(b=b*m+(y[1]||0)),(d=b/_|0)>1?(d>=m&&(d=m-1),1==(s=t(f=e(A,d),y,p=f.length,w=y.length))&&(d--,n(f,I<p?j:A,p))):(0==d&&(s=d=1),f=A.slice()),(p=f.length)<w&&f.unshift(0),n(y,f,w),-1==s&&(s=t(A,y,I,w=y.length))<1&&(d++,n(y,I<w?j:A,w)),w=y.length):0===s&&(d++,y=[0]),g[u++]=d,s&&y[0]?y[w++]=C[E]||0:(y=[C[E]],w=1)}while((E++<M||void 0!==y[0])&&v--)}return g[0]||g.shift(),h.e=c,S(h,i?a+N(h)+1:a)}}();function x(e,t){var n,r,a,i,l,c=0,d=0,p=e.constructor,m=p.precision;if(N(e)>16)throw Error(u+N(e));if(!e.s)return new p(o);for(null==t?(s=!1,l=m):l=t,i=new p(.03125);e.abs().gte(.1);)e=e.times(i),d+=5;for(l+=Math.log(f(2,d))/Math.LN10*2+5|0,n=r=a=new p(o),p.precision=l;;){if(r=S(r.times(e),l),n=n.times(++c),b((i=a.plus(v(r,n,l))).d).slice(0,l)===b(a.d).slice(0,l)){for(;d--;)a=S(a.times(a),l);return p.precision=m,null==t?(s=!0,S(a,m)):a}a=i}}function N(e){for(var t=7*e.e,n=e.d[0];n>=10;n/=10)t++;return t}function E(e,t,n){if(t>e.LN10.sd())throw s=!0,n&&(e.precision=n),Error(l+"LN10 precision limit exceeded");return S(new e(e.LN10),t)}function M(e){for(var t="";e--;)t+="0";return t}function _(e,t){var n,r,a,i,c,u,d,f,p,m=1,h=e,g=h.d,y=h.constructor,w=y.precision;if(h.s<1)throw Error(l+(h.s?"NaN":"-Infinity"));if(h.eq(o))return new y(0);if(null==t?(s=!1,f=w):f=t,h.eq(10))return null==t&&(s=!0),E(y,f);if(f+=10,y.precision=f,r=(n=b(g)).charAt(0),i=N(h),!(Math.abs(i)<15e14))return d=E(y,f+2,w).times(i+""),h=_(new y(r+"."+n.slice(1)),f-10).plus(d),y.precision=w,null==t?(s=!0,S(h,w)):h;for(;r<7&&1!=r||1==r&&n.charAt(1)>3;)r=(n=b((h=h.times(e)).d)).charAt(0),m++;for(i=N(h),r>1?(h=new y("0."+n),i++):h=new y(r+"."+n.slice(1)),u=c=h=v(h.minus(o),h.plus(o),f),p=S(h.times(h),f),a=3;;){if(c=S(c.times(p),f),b((d=u.plus(v(c,new y(a),f))).d).slice(0,f)===b(u.d).slice(0,f))return u=u.times(2),0!==i&&(u=u.plus(E(y,f+2,w).times(i+""))),u=v(u,new y(m),f),y.precision=w,null==t?(s=!0,S(u,w)):u;u=d,a+=2}}function I(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);)++r;for(o=t.length;48===t.charCodeAt(o-1);)--o;if(t=t.slice(r,o)){if(o-=r,n=n-r-1,e.e=d(n/7),e.d=[],r=(n+1)%7,n<0&&(r+=7),r<o){for(r&&e.d.push(+t.slice(0,r)),o-=7;r<o;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=o;for(;r--;)t+="0";if(e.d.push(+t),s&&(e.e>h||e.e<-h))throw Error(u+n)}else e.s=0,e.e=0,e.d=[0];return e}function S(e,t,n){var r,o,a,i,l,c,p,g,y=e.d;for(i=1,a=y[0];a>=10;a/=10)i++;if((r=t-i)<0)r+=7,o=t,p=y[g=0];else{if((g=Math.ceil((r+1)/7))>=(a=y.length))return e;for(p=a=y[g],i=1;a>=10;a/=10)i++;o=(r%=7)-7+i}if(void 0!==n&&(l=p/(a=f(10,i-o-1))%10|0,c=t<0||void 0!==y[g+1]||p%a,c=n<4?(l||c)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||c||6==n&&(r>0?o>0?p/f(10,i-o):0:y[g-1])%10&1||n==(e.s<0?8:7))),t<1||!y[0])return c?(a=N(e),y.length=1,t=t-a-1,y[0]=f(10,(7-t%7)%7),e.e=d(-t/7)||0):(y.length=1,y[0]=e.e=e.s=0),e;if(0==r?(y.length=g,a=1,g--):(y.length=g+1,a=f(10,7-r),y[g]=o>0?(p/f(10,i-o)%f(10,o)|0)*a:0),c)for(;;){if(0==g){(y[0]+=a)==m&&(y[0]=1,++e.e);break}if(y[g]+=a,y[g]!=m)break;y[g--]=0,a=1}for(r=y.length;0===y[--r];)y.pop();if(s&&(e.e>h||e.e<-h))throw Error(u+N(e));return e}function j(e,t){var n,r,o,a,i,l,c,u,d,f,p=e.constructor,h=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),s?S(t,h):t;if(c=e.d,f=t.d,r=t.e,u=e.e,c=c.slice(),i=u-r){for((d=i<0)?(n=c,i=-i,l=f.length):(n=f,r=u,l=c.length),i>(o=Math.max(Math.ceil(h/7),l)+2)&&(i=o,n.length=1),n.reverse(),o=i;o--;)n.push(0);n.reverse()}else{for((d=(o=c.length)<(l=f.length))&&(l=o),o=0;o<l;o++)if(c[o]!=f[o]){d=c[o]<f[o];break}i=0}for(d&&(n=c,c=f,f=n,t.s=-t.s),l=c.length,o=f.length-l;o>0;--o)c[l++]=0;for(o=f.length;o>i;){if(c[--o]<f[o]){for(a=o;a&&0===c[--a];)c[a]=m-1;--c[a],c[o]+=m}c[o]-=f[o]}for(;0===c[--l];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(t.d=c,t.e=r,s?S(t,h):t):new p(0)}function k(e,t,n){var r,o=N(e),a=b(e.d),i=a.length;return t?(n&&(r=n-i)>0?a=a.charAt(0)+"."+a.slice(1)+M(r):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(o<0?"e":"e+")+o):o<0?(a="0."+M(-o-1)+a,n&&(r=n-i)>0&&(a+=M(r))):o>=i?(a+=M(o+1-i),n&&(r=n-o-1)>0&&(a=a+"."+M(r))):((r=o+1)<i&&(a=a.slice(0,r)+"."+a.slice(r)),n&&(r=n-i)>0&&(o+1===i&&(a+="."),a+=M(r))),e.s<0?"-"+a:a}function D(e,t){if(e.length>t)return e.length=t,!0}function C(e){if(!e||"object"!=typeof e)throw Error(l+"Object expected");var t,n,r,o=["precision",1,a,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<o.length;t+=3)if(void 0!==(r=e[n=o[t]])){if(!(d(r)===r&&r>=o[t+1]&&r<=o[t+2]))throw Error(c+n+": "+r);this[n]=r}if(void 0!==(r=e[n="LN10"])){if(r!=Math.LN10)throw Error(c+n+": "+r);this[n]=new this(r)}return this}(i=function e(t){var n,r,o;function a(e){var t=this;if(!(t instanceof a))return new a(e);if(t.constructor=a,e instanceof a)return t.s=e.s,t.e=e.e,void(t.d=(e=e.d)?e.slice():e);if("number"==typeof e){if(0*e!=0)throw Error(c+e);if(e>0)t.s=1;else{if(!(e<0))return t.s=0,t.e=0,void(t.d=[0]);e=-e,t.s=-1}return e===~~e&&e<1e7?(t.e=0,void(t.d=[e])):I(t,e.toString())}if("string"!=typeof e)throw Error(c+e);if(45===e.charCodeAt(0)?(e=e.slice(1),t.s=-1):t.s=1,!p.test(e))throw Error(c+e);I(t,e)}if(a.prototype=g,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=e,a.config=a.set=C,void 0===t&&(t={}),t)for(o=["precision","rounding","toExpNeg","toExpPos","LN10"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return a.config(t),a}(i)).default=i.Decimal=i,o=new i(1),void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},5413(e,t){"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(n=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===n.Tag||e.type===n.Script||e.type===n.Style},t.Root=n.Root,t.Text=n.Text,t.Directive=n.Directive,t.Comment=n.Comment,t.Script=n.Script,t.Style=n.Style,t.Tag=n.Tag,t.CDATA=n.CDATA,t.Doctype=n.Doctype},1141(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var a=n(5413),i=n(6957);o(n(6957),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,n){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(n=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=n?n:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new i.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var n=this.options.xmlMode?a.ElementType.Tag:void 0,r=new i.Element(e,t,void 0,n);this.addNode(r),this.tagStack.push(r)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var n=new i.Text(e);this.addNode(n),this.lastNode=n}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new i.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new i.Text(""),t=new i.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var n=new i.ProcessingInstruction(e,t);this.addNode(n)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],n=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),n&&(e.prev=n,n.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},6957(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function __(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var i=n(5413),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),N(this,e)},e}();t.Node=s;var l=function(e){function t(t){var n=e.call(this)||this;return n.data=t,n}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var d=function(e){function t(t,n){var r=e.call(this,n)||this;return r.name=t,r.type=i.ElementType.Directive,r}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=d;var f=function(e){function t(t){var n=e.call(this)||this;return n.children=t,n}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=f;var p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(f);t.CDATA=p;var m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=i.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(f);t.Document=m;var h=function(e){function t(t,n,r,o){void 0===r&&(r=[]),void 0===o&&(o="script"===t?i.ElementType.Script:"style"===t?i.ElementType.Style:i.ElementType.Tag);var a=e.call(this,r)||this;return a.name=t,a.attribs=n,a.type=o,a}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map(function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}})},enumerable:!1,configurable:!0}),t}(f);function g(e){return(0,i.isTag)(e)}function y(e){return e.type===i.ElementType.CDATA}function w(e){return e.type===i.ElementType.Text}function b(e){return e.type===i.ElementType.Comment}function v(e){return e.type===i.ElementType.Directive}function x(e){return e.type===i.ElementType.Root}function N(e,t){var n;if(void 0===t&&(t=!1),w(e))n=new c(e.data);else if(b(e))n=new u(e.data);else if(g(e)){var r=t?E(e.children):[],o=new h(e.name,a({},e.attribs),r);r.forEach(function(e){return e.parent=o}),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),n=o}else if(y(e)){r=t?E(e.children):[];var i=new p(r);r.forEach(function(e){return e.parent=i}),n=i}else if(x(e)){r=t?E(e.children):[];var s=new m(r);r.forEach(function(e){return e.parent=s}),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),n=s}else{if(!v(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new d(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),n=l}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function E(e){for(var t=e.map(function(e){return N(e,!0)}),n=1;n<t.length;n++)t[n].prev=t[n-1],t[n-1].next=t[n];return t}t.Element=h,t.isTag=g,t.isCDATA=y,t.isText=w,t.isComment=b,t.isDirective=v,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=N},228(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function o(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,i){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new o(r,a||e,i),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function i(e,t){0===--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,o=[];if(0===this._eventsCount)return o;for(r in e=this._events)t.call(e,r)&&o.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,a=r.length,i=new Array(a);o<a;o++)i[o]=r[o].fn;return i},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,o,a,i){var s=n?n+e:e;if(!this._events[s])return!1;var l,c,u=this._events[s],d=arguments.length;if(u.fn){switch(u.once&&this.removeListener(e,u.fn,void 0,!0),d){case 1:return u.fn.call(u.context),!0;case 2:return u.fn.call(u.context,t),!0;case 3:return u.fn.call(u.context,t,r),!0;case 4:return u.fn.call(u.context,t,r,o),!0;case 5:return u.fn.call(u.context,t,r,o,a),!0;case 6:return u.fn.call(u.context,t,r,o,a,i),!0}for(c=1,l=new Array(d-1);c<d;c++)l[c-1]=arguments[c];u.fn.apply(u.context,l)}else{var f,p=u.length;for(c=0;c<p;c++)switch(u[c].once&&this.removeListener(e,u[c].fn,void 0,!0),d){case 1:u[c].fn.call(u[c].context);break;case 2:u[c].fn.call(u[c].context,t);break;case 3:u[c].fn.call(u[c].context,t,r);break;case 4:u[c].fn.call(u[c].context,t,r,o);break;default:if(!l)for(f=1,l=new Array(d-1);f<d;f++)l[f-1]=arguments[f];u[c].fn.apply(u[c].context,l)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,o){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return i(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||o&&!s.once||r&&s.context!==r||i(this,a);else{for(var l=0,c=[],u=s.length;l<u;l++)(s[l].fn!==t||o&&!s[l].once||r&&s[l].context!==r)&&c.push(s[l]);c.length?this._events[a]=1===c.length?c[0]:c:i(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&i(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},8362(e,t,n){var r=n(1166);e.exports={Graph:r.Graph,json:n(7494),alg:n(1667),version:r.version}},3619(e,t,n){var r=n(117);e.exports=function(e){var t,n={},o=[];function a(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),a),r.each(e.predecessors(o),a))}return r.each(e.nodes(),function(e){t=[],a(e),t.length&&o.push(t)}),o}},9276(e,t,n){var r=n(117);function o(e,t,n,a,i,s){r.has(a,t)||(a[t]=!0,n||s.push(t),r.each(i(t),function(t){o(e,t,n,a,i,s)}),n&&s.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],s={};return r.each(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);o(e,t,"post"===n,s,a,i)}),i}},4919(e,t,n){var r=n(8905),o=n(117);e.exports=function(e,t,n){return o.transform(e.nodes(),function(o,a){o[a]=r(e,a,t,n)},{})}},8905(e,t,n){var r=n(117),o=n(1737);e.exports=function(e,t,n,r){return function(e,t,n,r){var a,i,s={},l=new o,c=function(e){var t=e.v!==a?e.v:e.w,r=s[t],o=n(e),c=i.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c<r.distance&&(r.distance=c,r.predecessor=a,l.decrease(t,c))};for(e.nodes().forEach(function(e){var n=e===t?0:Number.POSITIVE_INFINITY;s[e]={distance:n},l.add(e,n)});l.size()>0&&(a=l.removeMin(),(i=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(c);return s}(e,String(t),n||a,r||function(t){return e.outEdges(t)})};var a=r.constant(1)},6678(e,t,n){var r=n(117),o=n(6291);e.exports=function(e){return r.filter(o(e),function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}},3590(e,t,n){var r=n(117);e.exports=function(e,t,n){return function(e,t,n){var r={},o=e.nodes();return o.forEach(function(e){r[e]={},r[e][e]={distance:0},o.forEach(function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})}),n(e).forEach(function(n){var o=n.v===e?n.w:n.v,a=t(n);r[e][o]={distance:a,predecessor:e}})}),o.forEach(function(e){var t=r[e];o.forEach(function(n){var a=r[n];o.forEach(function(n){var r=a[e],o=t[n],i=a[n],s=r.distance+o.distance;s<i.distance&&(i.distance=s,i.predecessor=o.predecessor)})})}),r}(e,t||o,n||function(t){return e.outEdges(t)})};var o=r.constant(1)},1667(e,t,n){e.exports={components:n(3619),dijkstra:n(8905),dijkstraAll:n(4919),findCycles:n(6678),floydWarshall:n(3590),isAcyclic:n(498),postorder:n(1045),preorder:n(6016),prim:n(4423),tarjan:n(6291),topsort:n(7507)}},498(e,t,n){var r=n(7507);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},1045(e,t,n){var r=n(9276);e.exports=function(e,t){return r(e,t,"post")}},6016(e,t,n){var r=n(9276);e.exports=function(e,t){return r(e,t,"pre")}},4423(e,t,n){var r=n(117),o=n(6454),a=n(1737);e.exports=function(e,t){var n,i=new o,s={},l=new a;function c(e){var r=e.v===n?e.w:e.v,o=l.priority(r);if(void 0!==o){var a=t(e);a<o&&(s[r]=n,l.decrease(r,a))}}if(0===e.nodeCount())return i;r.each(e.nodes(),function(e){l.add(e,Number.POSITIVE_INFINITY),i.setNode(e)}),l.decrease(e.nodes()[0],0);for(var u=!1;l.size()>0;){if(n=l.removeMin(),r.has(s,n))i.setEdge(n,s[n]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}e.nodeEdges(n).forEach(c)}return i}},6291(e,t,n){var r=n(117);e.exports=function(e){var t=0,n=[],o={},a=[];function i(s){var l=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(e){r.has(o,e)?o[e].onStack&&(l.lowlink=Math.min(l.lowlink,o[e].index)):(i(e),l.lowlink=Math.min(l.lowlink,o[e].lowlink))}),l.lowlink===l.index){var c,u=[];do{c=n.pop(),o[c].onStack=!1,u.push(c)}while(s!==c);a.push(u)}}return e.nodes().forEach(function(e){r.has(o,e)||i(e)}),a}},7507(e,t,n){var r=n(117);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),function i(s){if(r.has(n,s))throw new a;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),i),delete n[s],o.push(s))}),r.size(t)!==e.nodeCount())throw new a;return o}function a(){}e.exports=o,o.CycleException=a,a.prototype=new Error},1737(e,t,n){var r=n(117);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(e){return e.key})},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,a=o.length;return n[e]=a,o.push({key:e,priority:t}),this._decrease(a),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n<t.length&&(o=t[n].priority<t[o].priority?n:o,r<t.length&&(o=t[r].priority<t[o].priority?r:o),o!==e&&(this._swap(e,o),this._heapify(o)))},o.prototype._decrease=function(e){for(var t,n=this._arr,r=n[e].priority;0!==e&&!(n[t=e>>1].priority<r);)this._swap(e,t),e=t},o.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,o=n[e],a=n[t];n[e]=a,n[t]=o,r[a.key]=e,r[o.key]=t}},6454(e,t,n){"use strict";var r=n(117);e.exports=a;var o="\0";function a(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[o]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function i(e,t){e[t]?e[t]++:e[t]=1}function s(e,t){--e[t]||delete e[t]}function l(e,t,n,o){var a=""+t,i=""+n;if(!e&&a>i){var s=a;a=i,i=s}return a+""+i+""+(r.isUndefined(o)?"\0":o)}function c(e,t){return l(e,t.v,t.w,t.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(e){return this._label=e,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return r.keys(this._nodes)},a.prototype.sources=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._in[t])})},a.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._out[t])})},a.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,function(e){n.length>1?o.setNode(e,t):o.setNode(e)}),this},a.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=o,this._children[e]={},this._children[o][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},a.prototype.node=function(e){return this._nodes[e]},a.prototype.hasNode=function(e){return r.has(this._nodes,e)},a.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},a.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=o;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},a.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},a.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==o)return t}},a.prototype.children=function(e){if(r.isUndefined(e)&&(e=o),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===o)return this.nodes();if(this.hasNode(e))return[]}},a.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},a.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},a.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},a.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},a.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),r.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var o={};function a(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:a(r)}return this._isCompound&&r.each(t.nodes(),function(e){t.setParent(e,a(e))}),t},a.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return r.values(this._edgeObjs)},a.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r}),this},a.prototype.setEdge=function(){var e,t,n,o,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(o=arguments[1],a=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var c=l(this._isDirected,e,t,n);if(r.has(this._edgeLabels,c))return a&&(this._edgeLabels[c]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[c]=a?o:this._defaultEdgeLabelFn(e,t,n);var u=function(e,t,n,r){var o=""+t,a=""+n;if(!e&&o>a){var i=o;o=a,a=i}var s={v:o,w:a};return r&&(s.name=r),s}(this._isDirected,e,t,n);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[c]=u,i(this._preds[t],e),i(this._sucs[e],t),this._in[t][c]=u,this._out[e][c]=u,this._edgeCount++,this},a.prototype.edge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},a.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[t],e),s(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},a.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.v===t}):o}},a.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.w===t}):o}},a.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},1166(e,t,n){e.exports={Graph:n(6454),version:n(4458)}},7494(e,t,n){var r=n(117),o=n(6454);function a(e){return r.map(e.nodes(),function(t){var n=e.node(t),o=e.parent(t),a={v:t};return r.isUndefined(n)||(a.value=n),r.isUndefined(o)||(a.parent=o),a})}function i(e){return r.map(e.edges(),function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o})}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:i(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t},read:function(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),r.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},117(e,t,n){var r;try{r={clone:n(2629),constant:n(7334),each:n(6135),filter:n(7612),has:n(1448),isArray:n(6449),isEmpty:n(2193),isFunction:n(1882),isUndefined:n(2216),keys:n(5950),map:n(5378),reduce:n(860),size:n(7091),transform:n(9752),union:n(299),values:n(5880)}}catch(e){}r||(r=window._),e.exports=r},4458(e){e.exports="2.1.8"},4499(e,t,n){"use strict";n.r(t),n.d(t,{createBrowserHistory:()=>x,createHashHistory:()=>S,createLocation:()=>p,createMemoryHistory:()=>k,createPath:()=>f,locationsAreEqual:()=>m,parsePath:()=>d});var r=n(8168),o=n(4307),a=n(8783),i=n(1561);function s(e){return"/"===e.charAt(0)?e:"/"+e}function l(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function u(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function d(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}function f(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function p(e,t,n,a){var i;"string"==typeof e?(i=d(e)).state=t:(void 0===(i=(0,r.A)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(i.key=n),a?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,o.A)(i.pathname,a.pathname)):i.pathname=a.pathname:i.pathname||(i.pathname="/"),i}function m(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&(0,a.A)(e.state,t.state)}function h(){var e=null,t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach(function(e){return e.apply(void 0,n)})}}}var g=!("undefined"==typeof window||!window.document||!window.document.createElement);function y(e,t){t(window.confirm(e))}var w="popstate",b="hashchange";function v(){try{return window.history.state||{}}catch(e){return{}}}function x(e){void 0===e&&(e={}),g||(0,i.A)(!1);var t,n=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,a=!(-1===window.navigator.userAgent.indexOf("Trident")),l=e,d=l.forceRefresh,m=void 0!==d&&d,x=l.getUserConfirmation,N=void 0===x?y:x,E=l.keyLength,M=void 0===E?6:E,_=e.basename?u(s(e.basename)):"";function I(e){var t=e||{},n=t.key,r=t.state,o=window.location,a=o.pathname+o.search+o.hash;return _&&(a=c(a,_)),p(a,r,n)}function S(){return Math.random().toString(36).substr(2,M)}var j=h();function k(e){(0,r.A)(F,e),F.length=n.length,j.notifyListeners(F.location,F.action)}function D(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||T(I(e.state))}function C(){T(I(v()))}var A=!1;function T(e){A?(A=!1,k()):j.confirmTransitionTo(e,"POP",N,function(t){t?k({action:"POP",location:e}):function(e){var t=F.location,n=L.indexOf(t.key);-1===n&&(n=0);var r=L.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(A=!0,P(o))}(e)})}var O=I(v()),L=[O.key];function z(e){return _+f(e)}function P(e){n.go(e)}var R=0;function U(e){1===(R+=e)&&1===e?(window.addEventListener(w,D),a&&window.addEventListener(b,C)):0===R&&(window.removeEventListener(w,D),a&&window.removeEventListener(b,C))}var B=!1,F={length:n.length,action:"POP",location:O,createHref:z,push:function(e,t){var r="PUSH",a=p(e,t,S(),F.location);j.confirmTransitionTo(a,r,N,function(e){if(e){var t=z(a),i=a.key,s=a.state;if(o)if(n.pushState({key:i,state:s},null,t),m)window.location.href=t;else{var l=L.indexOf(F.location.key),c=L.slice(0,l+1);c.push(a.key),L=c,k({action:r,location:a})}else window.location.href=t}})},replace:function(e,t){var r="REPLACE",a=p(e,t,S(),F.location);j.confirmTransitionTo(a,r,N,function(e){if(e){var t=z(a),i=a.key,s=a.state;if(o)if(n.replaceState({key:i,state:s},null,t),m)window.location.replace(t);else{var l=L.indexOf(F.location.key);-1!==l&&(L[l]=a.key),k({action:r,location:a})}else window.location.replace(t)}})},go:P,goBack:function(){P(-1)},goForward:function(){P(1)},block:function(e){void 0===e&&(e=!1);var t=j.setPrompt(e);return B||(U(1),B=!0),function(){return B&&(B=!1,U(-1)),t()}},listen:function(e){var t=j.appendListener(e);return U(1),function(){U(-1),t()}}};return F}var N="hashchange",E={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+l(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:l,decodePath:s},slash:{encodePath:s,decodePath:s}};function M(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function _(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function I(e){window.location.replace(M(window.location.href)+"#"+e)}function S(e){void 0===e&&(e={}),g||(0,i.A)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,a=void 0===o?y:o,l=n.hashType,d=void 0===l?"slash":l,m=e.basename?u(s(e.basename)):"",w=E[d],b=w.encodePath,v=w.decodePath;function x(){var e=v(_());return m&&(e=c(e,m)),p(e)}var S=h();function j(e){(0,r.A)(B,e),B.length=t.length,S.notifyListeners(B.location,B.action)}var k=!1,D=null;function C(){var e,t,n=_(),r=b(n);if(n!==r)I(r);else{var o=x(),i=B.location;if(!k&&(t=o,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(D===f(o))return;D=null,function(e){if(k)k=!1,j();else{S.confirmTransitionTo(e,"POP",a,function(t){t?j({action:"POP",location:e}):function(e){var t=B.location,n=L.lastIndexOf(f(t));-1===n&&(n=0);var r=L.lastIndexOf(f(e));-1===r&&(r=0);var o=n-r;o&&(k=!0,z(o))}(e)})}}(o)}}var A=_(),T=b(A);A!==T&&I(T);var O=x(),L=[f(O)];function z(e){t.go(e)}var P=0;function R(e){1===(P+=e)&&1===e?window.addEventListener(N,C):0===P&&window.removeEventListener(N,C)}var U=!1,B={length:t.length,action:"POP",location:O,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=M(window.location.href)),n+"#"+b(m+f(e))},push:function(e,t){var n="PUSH",r=p(e,void 0,void 0,B.location);S.confirmTransitionTo(r,n,a,function(e){if(e){var t=f(r),o=b(m+t);if(_()!==o){D=t,function(e){window.location.hash=e}(o);var a=L.lastIndexOf(f(B.location)),i=L.slice(0,a+1);i.push(t),L=i,j({action:n,location:r})}else j()}})},replace:function(e,t){var n="REPLACE",r=p(e,void 0,void 0,B.location);S.confirmTransitionTo(r,n,a,function(e){if(e){var t=f(r),o=b(m+t);_()!==o&&(D=t,I(o));var a=L.indexOf(f(B.location));-1!==a&&(L[a]=t),j({action:n,location:r})}})},go:z,goBack:function(){z(-1)},goForward:function(){z(1)},block:function(e){void 0===e&&(e=!1);var t=S.setPrompt(e);return U||(R(1),U=!0),function(){return U&&(U=!1,R(-1)),t()}},listen:function(e){var t=S.appendListener(e);return R(1),function(){R(-1),t()}}};return B}function j(e,t,n){return Math.min(Math.max(e,t),n)}function k(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,a=void 0===o?["/"]:o,i=t.initialIndex,s=void 0===i?0:i,l=t.keyLength,c=void 0===l?6:l,u=h();function d(e){(0,r.A)(v,e),v.length=v.entries.length,u.notifyListeners(v.location,v.action)}function m(){return Math.random().toString(36).substr(2,c)}var g=j(s,0,a.length-1),y=a.map(function(e){return p(e,void 0,"string"==typeof e?m():e.key||m())}),w=f;function b(e){var t=j(v.index+e,0,v.entries.length-1),r=v.entries[t];u.confirmTransitionTo(r,"POP",n,function(e){e?d({action:"POP",location:r,index:t}):d()})}var v={length:y.length,action:"POP",location:y[g],index:g,entries:y,createHref:w,push:function(e,t){var r="PUSH",o=p(e,t,m(),v.location);u.confirmTransitionTo(o,r,n,function(e){if(e){var t=v.index+1,n=v.entries.slice(0);n.length>t?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",o=p(e,t,m(),v.location);u.confirmTransitionTo(o,r,n,function(e){e&&(v.entries[v.index]=o,d({action:r,location:o}))})},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=v.index+e;return t>=0&&t<v.entries.length},block:function(e){return void 0===e&&(e=!1),u.setPrompt(e)},listen:function(e){return u.appendListener(e)}};return v}},4146(e,t,n){"use strict";var r=n(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=p(n);o&&o!==m&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),h=l(n),g=0;g<i.length;++g){var y=i[g];if(!(a[y]||r&&r[y]||h&&h[y]||s&&s[y])){var w=f(n,y);try{c(t,y,w)}catch(e){}}}}return t}},3072(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,a=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,h=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,w=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case a:case s:case i:case p:return e;default:switch(e=e&&e.$$typeof){case c:case f:case g:case h:case l:return e;default:return t}}case o:return t}}}function N(e){return x(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=a,t.Lazy=g,t.Memo=h,t.Portal=o,t.Profiler=s,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return N(e)||x(e)===u},t.isConcurrentMode=N,t.isContextConsumer=function(e){return x(e)===c},t.isContextProvider=function(e){return x(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return x(e)===f},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===g},t.isMemo=function(e){return x(e)===h},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===s},t.isStrictMode=function(e){return x(e)===i},t.isSuspense=function(e){return x(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===s||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===h||e.$$typeof===l||e.$$typeof===c||e.$$typeof===f||e.$$typeof===w||e.$$typeof===b||e.$$typeof===v||e.$$typeof===y)},t.typeOf=x},3404(e,t,n){"use strict";e.exports=n(3072)},5270(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=t.CARRIAGE_RETURN_PLACEHOLDER=t.CARRIAGE_RETURN_REGEX=t.CARRIAGE_RETURN=t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES=void 0,t.CASE_SENSITIVE_TAG_NAMES=["animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"],t.CASE_SENSITIVE_TAG_NAMES_MAP=t.CASE_SENSITIVE_TAG_NAMES.reduce(function(e,t){return e[t.toLowerCase()]=t,e},{}),t.CARRIAGE_RETURN="\r",t.CARRIAGE_RETURN_REGEX=new RegExp(t.CARRIAGE_RETURN,"g"),t.CARRIAGE_RETURN_PLACEHOLDER="__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_".concat(Date.now().toString(),"__"),t.CARRIAGE_RETURN_PLACEHOLDER_REGEX=new RegExp(t.CARRIAGE_RETURN_PLACEHOLDER,"g")},5496(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,u,d,f,m;e=(0,r.escapeSpecialCharacters)(e);var g=s.exec(e),y=null===(t=null==g?void 0:g[1])||void 0===t?void 0:t.toLowerCase();switch(y){case o:var w=c(e);return(0,r.hasOpenTag)(e,a)||null===(n=null==(v=w.querySelector(a))?void 0:v.parentNode)||void 0===n||n.removeChild(v),(0,r.hasOpenTag)(e,i)||null===(u=null==(v=w.querySelector(i))?void 0:v.parentNode)||void 0===u||u.removeChild(v),w.querySelectorAll(o);case a:case i:var b=l(e).querySelectorAll(y);return(0,r.hasOpenTag)(e,i)&&(0,r.hasOpenTag)(e,a)?null!==(f=null===(d=b[0].parentNode)||void 0===d?void 0:d.childNodes)&&void 0!==f?f:h():b;default:return p?p(e):null!==(m=null==(v=l(e,i).querySelector(i))?void 0:v.childNodes)&&void 0!==m?m:h();var v}};var r=n(7731),o="html",a="head",i="body",s=/<([a-zA-Z]+[0-9]?)/,l=function(e,t){throw new Error("This browser does not support `document.implementation.createHTMLDocument`")},c=function(e,t){throw new Error("This browser does not support `DOMParser.prototype.parseFromString`")},u="object"==typeof window&&window.DOMParser;if("function"==typeof u){var d=new u;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),d.parseFromString(e,"text/html")}}if("object"==typeof document&&document.implementation){var f=document.implementation.createHTMLDocument();l=function(e,t){if(t){var n=f.documentElement.querySelector(t);return n&&(n.innerHTML=e),f}return f.documentElement.innerHTML=e,f}}var p,m="object"==typeof document&&document.createElement("template");m&&m.content&&(p=function(e){return m.innerHTML=e,m.content.childNodes});var h=function(){return document.createDocumentFragment().childNodes}},2471(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];var t=i.exec(e),n=t?t[1]:void 0;return(0,a.formatDOM)((0,o.default)(e),null,n)};var o=r(n(5496)),a=n(7731),i=/<(![a-zA-Z\s]+)>/},7731(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatAttributes=a,t.hasOpenTag=function(e,t){var n="<"+t,r=e.toLowerCase().indexOf(n);if(-1===r)return!1;var o=e[r+n.length];return">"===o||" "===o||"\t"===o||"\n"===o||"\r"===o||"/"===o},t.escapeSpecialCharacters=function(e){return e.replace(o.CARRIAGE_RETURN_REGEX,o.CARRIAGE_RETURN_PLACEHOLDER)},t.revertEscapedCharacters=s,t.formatDOM=function e(t,n,o){var l,c,u,d;void 0===n&&(n=null);for(var f,p=[],m=0,h=t.length;m<h;m++){var g=t[m];switch(g.nodeType){case 1:var y=i(g.nodeName);(f=new r.Element(y,a(g.attributes))).children=e("template"===y?g.content.childNodes:g.childNodes,f);break;case 3:f=new r.Text(s(null!==(l=g.nodeValue)&&void 0!==l?l:""));break;case 8:f=new r.Comment(null!==(c=g.nodeValue)&&void 0!==c?c:"");break;default:continue}var w=null!==(u=p[m-1])&&void 0!==u?u:null;w&&(w.next=f),f.parent=n,f.prev=w,f.next=null,p.push(f)}return o&&((f=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=null!==(d=p[0])&&void 0!==d?d:null,f.parent=n,p.unshift(f),p[1]&&(p[1].prev=p[0])),p};var r=n(1141),o=n(5270);function a(e){for(var t={},n=0,r=e.length;n<r;n++){var o=e[n];t[o.name]=o.value}return t}function i(e){return function(e){return o.CASE_SENSITIVE_TAG_NAMES_MAP[e]}(e=e.toLowerCase())||e}function s(e){return e.replace(o.CARRIAGE_RETURN_PLACEHOLDER_REGEX,o.CARRIAGE_RETURN)}},840(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){void 0===e&&(e={});var n={},c=Boolean(e.type&&s[e.type]);for(var u in e){var d=e[u];if((0,r.isCustomAttribute)(u))n[u]=d;else{var f=u.toLowerCase(),p=l(f);if(p){var m=(0,r.getPropertyInfo)(p);switch(a.includes(p)&&i.includes(t)&&!c&&(p=l("default"+f)),n[p]=d,null==m?void 0:m.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===d&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[u]=d)}}return(0,o.setStyleProp)(e.style,n),n};var r=n(4210),o=n(4958),a=["checked","value"],i=["input","select","textarea"],s={reset:!0,submit:!0};function l(e){return r.possibleStandardNames[e]}},308(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){var r,o,c,u,d;void 0===n&&(n={});for(var f=[],p="function"==typeof n.replace,m=null!==(r=n.transform)&&void 0!==r?r:i.returnFirstArg,h=null!==(o=n.library)&&void 0!==o?o:s,g=h.cloneElement,y=h.createElement,w=h.isValidElement,b=t.length,v=0;v<b;v++){var x=t[v];if(p){var N=null===(c=n.replace)||void 0===c?void 0:c.call(n,x,v);if(w(N)){b>1&&(N=g(N,{key:null!==(u=N.key)&&void 0!==u?u:v})),f.push(m(N,x,v));continue}}if("text"!==x.type){var E=x,M={};l(E)?((0,i.setStyleProp)(E.attribs.style,E.attribs),M=E.attribs):E.attribs&&(M=(0,a.default)(E.attribs,E.name));var _=void 0;switch(x.type){case"script":case"style":x.children[0]&&(M.dangerouslySetInnerHTML={__html:x.children[0].data});break;case"tag":"textarea"===x.name&&x.children[0]?M.defaultValue=x.children[0].data:(null===(d=x.children)||void 0===d?void 0:d.length)&&(_=e(x.children,n));break;default:continue}b>1&&(M.key=v),f.push(m(y(x.name,M,_),x,v))}else{var I=!x.data.trim().length;if(I&&x.parent&&!(0,i.canTextBeChildOfNode)(x.parent))continue;if(n.trim&&I)continue;f.push(m(x.data,x,v))}}return 1===f.length?f[0]:f};var o=n(1609),a=r(n(840)),i=n(4958),s={cloneElement:o.cloneElement,createElement:o.createElement,isValidElement:o.isValidElement};function l(e){return i.PRESERVE_CUSTOM_ATTRIBUTES&&"tag"===e.type&&(0,i.isCustomComponent)(e.name,e.attribs)}},442(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.htmlToDOM=t.domToReact=t.attributesToProps=t.Text=t.ProcessingInstruction=t.Element=t.Comment=void 0,t.default=function(e,t){var n;if("string"!=typeof e)throw new TypeError("First argument must be a string");return e?(0,i.default)((0,o.default)(e,null!==(n=null==t?void 0:t.htmlparser2)&&void 0!==n?n:l),t):[]};var o=r(n(2471));t.htmlToDOM=o.default;var a=r(n(840));t.attributesToProps=a.default;var i=r(n(308));t.domToReact=i.default;var s=n(1141);Object.defineProperty(t,"Comment",{enumerable:!0,get:function(){return s.Comment}}),Object.defineProperty(t,"Element",{enumerable:!0,get:function(){return s.Element}}),Object.defineProperty(t,"ProcessingInstruction",{enumerable:!0,get:function(){return s.ProcessingInstruction}}),Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return s.Text}});var l={lowerCaseAttributeNames:!1}},4958(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.returnFirstArg=t.canTextBeChildOfNode=t.ELEMENTS_WITH_NO_TEXT_CHILDREN=t.PRESERVE_CUSTOM_ATTRIBUTES=void 0,t.isCustomComponent=function(e,t){return e.includes("-")?!i.has(e):Boolean(t&&"string"==typeof t.is)},t.setStyleProp=function(e,t){if("string"==typeof e)if(e.trim())try{t.style=(0,a.default)(e,s)}catch(e){t.style={}}else t.style={}};var o=n(1609),a=r(n(5229)),i=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),s={reactCompat:!0};t.PRESERVE_CUSTOM_ATTRIBUTES=Number(o.version.split(".")[0])>=16,t.ELEMENTS_WITH_NO_TEXT_CHILDREN=new Set(["tr","tbody","thead","tfoot","colgroup","table","head","html","frameset"]),t.canTextBeChildOfNode=function(e){return!t.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(e.name)},t.returnFirstArg=function(e){return e}},5077(e){"use strict";var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,o=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,s=/^[;\s]*/,l=/^\s+|\s+$/g,c="";function u(e){return e?e.replace(l,c):c}e.exports=function(e,l){if("string"!=typeof e)throw new TypeError("First argument must be a string");if(!e)return[];l=l||{};var d=1,f=1;function p(e){var t=e.match(n);t&&(d+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function m(){var e={line:d,column:f};return function(t){return t.position=new h(e),w(),t}}function h(e){this.start=e,this.end={line:d,column:f},this.source=l.source}function g(t){var n=new Error(l.source+":"+d+":"+f+": "+t);if(n.reason=t,n.filename=l.source,n.line=d,n.column=f,n.source=e,!l.silent)throw n}function y(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function w(){y(r)}function b(e){var t;for(e=e||[];t=v();)!1!==t&&e.push(t);return e}function v(){var t=m();if("/"==e.charAt(0)&&"*"==e.charAt(1)){for(var n=2;c!=e.charAt(n)&&("*"!=e.charAt(n)||"/"!=e.charAt(n+1));)++n;if(n+=2,c===e.charAt(n-1))return g("End of comment missing");var r=e.slice(2,n-2);return f+=2,p(r),e=e.slice(n),f+=2,t({type:"comment",comment:r})}}function x(){var e=m(),n=y(o);if(n){if(v(),!y(a))return g("property missing ':'");var r=y(i),l=e({type:"declaration",property:u(n[0].replace(t,c)),value:r?u(r[0].replace(t,c)):c});return y(s),l}}return h.prototype.content=e,w(),function(){var e,t=[];for(b(t);e=x();)!1!==e&&(t.push(e),b(t));return t}()}},5580(e,t,n){var r=n(6110)(n(9325),"DataView");e.exports=r},1549(e,t,n){var r=n(2032),o=n(3862),a=n(6721),i=n(2749),s=n(5749);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},79(e,t,n){var r=n(3702),o=n(80),a=n(4739),i=n(8655),s=n(1175);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},8223(e,t,n){var r=n(6110)(n(9325),"Map");e.exports=r},3661(e,t,n){var r=n(3040),o=n(7670),a=n(289),i=n(4509),s=n(2949);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=a,l.prototype.has=i,l.prototype.set=s,e.exports=l},2804(e,t,n){var r=n(6110)(n(9325),"Promise");e.exports=r},6545(e,t,n){var r=n(6110)(n(9325),"Set");e.exports=r},8859(e,t,n){var r=n(3661),o=n(1380),a=n(1459);function i(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}i.prototype.add=i.prototype.push=o,i.prototype.has=a,e.exports=i},7217(e,t,n){var r=n(79),o=n(1420),a=n(938),i=n(3605),s=n(9817),l=n(945);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=a,c.prototype.get=i,c.prototype.has=s,c.prototype.set=l,e.exports=c},1873(e,t,n){var r=n(9325).Symbol;e.exports=r},7828(e,t,n){var r=n(9325).Uint8Array;e.exports=r},8303(e,t,n){var r=n(6110)(n(9325),"WeakMap");e.exports=r},1033(e){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},3729(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},7277(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}},9770(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}},5325(e,t,n){var r=n(6131);e.exports=function(e,t){return!(null==e||!e.length)&&r(e,t,0)>-1}},9905(e){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},695(e,t,n){var r=n(8096),o=n(2428),a=n(6449),i=n(3656),s=n(361),l=n(7167),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=a(e),u=!n&&o(e),d=!n&&!u&&i(e),f=!n&&!u&&!d&&l(e),p=n||u||d||f,m=p?r(e.length,String):[],h=m.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,h))||m.push(g);return m}},4932(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},4528(e){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},882(e){e.exports=function(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n}},4248(e){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},9811(e,t,n){var r=n(7237)("length");e.exports=r},1074(e){e.exports=function(e){return e.split("")}},7805(e,t,n){var r=n(3360),o=n(5288);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},6547(e,t,n){var r=n(3360),o=n(5288),a=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var i=e[t];a.call(e,t)&&o(i,n)&&(void 0!==n||t in e)||r(e,t,n)}},6025(e,t,n){var r=n(5288);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},4733(e,t,n){var r=n(1791),o=n(5950);e.exports=function(e,t){return e&&r(t,o(t),e)}},3838(e,t,n){var r=n(1791),o=n(7241);e.exports=function(e,t){return e&&r(t,o(t),e)}},3360(e,t,n){var r=n(3243);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},9999(e,t,n){var r=n(7217),o=n(3729),a=n(6547),i=n(4733),s=n(3838),l=n(3290),c=n(3007),u=n(2271),d=n(8948),f=n(2),p=n(3349),m=n(5861),h=n(6189),g=n(7199),y=n(5529),w=n(6449),b=n(3656),v=n(7730),x=n(3805),N=n(8440),E=n(5950),M=n(7241),_="[object Arguments]",I="[object Function]",S="[object Object]",j={};j[_]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j[S]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j[I]=j["[object WeakMap]"]=!1,e.exports=function e(t,n,k,D,C,A){var T,O=1&n,L=2&n,z=4&n;if(k&&(T=C?k(t,D,C,A):k(t)),void 0!==T)return T;if(!x(t))return t;var P=w(t);if(P){if(T=h(t),!O)return c(t,T)}else{var R=m(t),U=R==I||"[object GeneratorFunction]"==R;if(b(t))return l(t,O);if(R==S||R==_||U&&!C){if(T=L||U?{}:y(t),!O)return L?d(t,s(T,t)):u(t,i(T,t))}else{if(!j[R])return C?t:{};T=g(t,R,O)}}A||(A=new r);var B=A.get(t);if(B)return B;A.set(t,T),N(t)?t.forEach(function(r){T.add(e(r,n,k,r,t,A))}):v(t)&&t.forEach(function(r,o){T.set(o,e(r,n,k,o,t,A))});var F=P?void 0:(z?L?p:f:L?M:E)(t);return o(F||t,function(r,o){F&&(r=t[o=r]),a(T,o,e(r,n,k,o,t,A))}),T}},9344(e,t,n){var r=n(3805),o=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},909(e,t,n){var r=n(641),o=n(8329)(r);e.exports=o},3777(e,t,n){var r=n(909);e.exports=function(e,t){var n=!0;return r(e,function(e,r,o){return n=!!t(e,r,o)}),n}},3599(e,t,n){var r=n(4394);e.exports=function(e,t,n){for(var o=-1,a=e.length;++o<a;){var i=e[o],s=t(i);if(null!=s&&(void 0===l?s==s&&!r(s):n(s,l)))var l=s,c=i}return c}},6574(e,t,n){var r=n(909);e.exports=function(e,t){var n=[];return r(e,function(e,r,o){t(e,r,o)&&n.push(e)}),n}},2523(e){e.exports=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}},3120(e,t,n){var r=n(4528),o=n(5891);e.exports=function e(t,n,a,i,s){var l=-1,c=t.length;for(a||(a=o),s||(s=[]);++l<c;){var u=t[l];n>0&&a(u)?n>1?e(u,n-1,a,i,s):r(s,u):i||(s[s.length]=u)}return s}},6649(e,t,n){var r=n(3221)();e.exports=r},641(e,t,n){var r=n(6649),o=n(5950);e.exports=function(e,t){return e&&r(e,t,o)}},7422(e,t,n){var r=n(1769),o=n(7797);e.exports=function(e,t){for(var n=0,a=(t=r(t,e)).length;null!=e&&n<a;)e=e[o(t[n++])];return n&&n==a?e:void 0}},2199(e,t,n){var r=n(4528),o=n(6449);e.exports=function(e,t,n){var a=t(e);return o(e)?a:r(a,n(e))}},2552(e,t,n){var r=n(1873),o=n(659),a=n(9350),i=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":i&&i in Object(e)?o(e):a(e)}},3335(e){e.exports=function(e,t){return e>t}},426(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},8077(e){e.exports=function(e,t){return null!=e&&t in Object(e)}},6131(e,t,n){var r=n(2523),o=n(5463),a=n(6959);e.exports=function(e,t,n){return t==t?a(e,t,n):r(e,o,n)}},7534(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},270(e,t,n){var r=n(7068),o=n(346);e.exports=function e(t,n,a,i,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,a,i,e,s))}},7068(e,t,n){var r=n(7217),o=n(5911),a=n(1986),i=n(689),s=n(5861),l=n(6449),c=n(3656),u=n(7167),d="[object Arguments]",f="[object Array]",p="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,h,g,y){var w=l(e),b=l(t),v=w?f:s(e),x=b?f:s(t),N=(v=v==d?p:v)==p,E=(x=x==d?p:x)==p,M=v==x;if(M&&c(e)){if(!c(t))return!1;w=!0,N=!1}if(M&&!N)return y||(y=new r),w||u(e)?o(e,t,n,h,g,y):a(e,t,v,n,h,g,y);if(!(1&n)){var _=N&&m.call(e,"__wrapped__"),I=E&&m.call(t,"__wrapped__");if(_||I){var S=_?e.value():e,j=I?t.value():t;return y||(y=new r),g(S,j,n,h,y)}}return!!M&&(y||(y=new r),i(e,t,n,h,g,y))}},9172(e,t,n){var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},1799(e,t,n){var r=n(7217),o=n(270);e.exports=function(e,t,n,a){var i=n.length,s=i,l=!a;if(null==e)return!s;for(e=Object(e);i--;){var c=n[i];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<s;){var u=(c=n[i])[0],d=e[u],f=c[1];if(l&&c[2]){if(void 0===d&&!(u in e))return!1}else{var p=new r;if(a)var m=a(d,f,u,e,t,p);if(!(void 0===m?o(f,d,3,a,p):m))return!1}}return!0}},5463(e){e.exports=function(e){return e!=e}},5083(e,t,n){var r=n(1882),o=n(7296),a=n(3805),i=n(7473),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,f=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!a(e)||o(e))&&(r(e)?f:s).test(i(e))}},6038(e,t,n){var r=n(5861),o=n(346);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},4901(e,t,n){var r=n(2552),o=n(294),a=n(346),i={};i["[object Float32Array]"]=i["[object Float64Array]"]=i["[object Int8Array]"]=i["[object Int16Array]"]=i["[object Int32Array]"]=i["[object Uint8Array]"]=i["[object Uint8ClampedArray]"]=i["[object Uint16Array]"]=i["[object Uint32Array]"]=!0,i["[object Arguments]"]=i["[object Array]"]=i["[object ArrayBuffer]"]=i["[object Boolean]"]=i["[object DataView]"]=i["[object Date]"]=i["[object Error]"]=i["[object Function]"]=i["[object Map]"]=i["[object Number]"]=i["[object Object]"]=i["[object RegExp]"]=i["[object Set]"]=i["[object String]"]=i["[object WeakMap]"]=!1,e.exports=function(e){return a(e)&&o(e.length)&&!!i[r(e)]}},5389(e,t,n){var r=n(3663),o=n(7978),a=n(3488),i=n(6449),s=n(583);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?i(e)?o(e[0],e[1]):r(e):s(e)}},8984(e,t,n){var r=n(5527),o=n(3650),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2903(e,t,n){var r=n(3805),o=n(5527),a=n(181),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return a(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&i.call(e,s))&&n.push(s);return n}},6176(e){e.exports=function(e,t){return e<t}},5128(e,t,n){var r=n(909),o=n(4894);e.exports=function(e,t){var n=-1,a=o(e)?Array(e.length):[];return r(e,function(e,r,o){a[++n]=t(e,r,o)}),a}},3663(e,t,n){var r=n(1799),o=n(776),a=n(7197);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},7978(e,t,n){var r=n(270),o=n(8156),a=n(631),i=n(8586),s=n(756),l=n(7197),c=n(7797);e.exports=function(e,t){return i(e)&&s(t)?l(c(e),t):function(n){var i=o(n,e);return void 0===i&&i===t?a(n,e):r(t,i,3)}}},5250(e,t,n){var r=n(7217),o=n(7805),a=n(6649),i=n(2824),s=n(3805),l=n(7241),c=n(4974);e.exports=function e(t,n,u,d,f){t!==n&&a(n,function(a,l){if(f||(f=new r),s(a))i(t,n,l,u,e,d,f);else{var p=d?d(c(t,l),a,l+"",t,n,f):void 0;void 0===p&&(p=a),o(t,l,p)}},l)}},2824(e,t,n){var r=n(7805),o=n(3290),a=n(1961),i=n(3007),s=n(5529),l=n(2428),c=n(6449),u=n(3693),d=n(3656),f=n(1882),p=n(3805),m=n(1331),h=n(7167),g=n(4974),y=n(9884);e.exports=function(e,t,n,w,b,v,x){var N=g(e,n),E=g(t,n),M=x.get(E);if(M)r(e,n,M);else{var _=v?v(N,E,n+"",e,t,x):void 0,I=void 0===_;if(I){var S=c(E),j=!S&&d(E),k=!S&&!j&&h(E);_=E,S||j||k?c(N)?_=N:u(N)?_=i(N):j?(I=!1,_=o(E,!0)):k?(I=!1,_=a(E,!0)):_=[]:m(E)||l(E)?(_=N,l(N)?_=y(N):p(N)&&!f(N)||(_=s(E))):I=!1}I&&(x.set(E,_),b(_,E,w,v,x),x.delete(E)),r(e,n,_)}}},6155(e,t,n){var r=n(4932),o=n(7422),a=n(5389),i=n(5128),s=n(3937),l=n(7301),c=n(3714),u=n(3488),d=n(6449);e.exports=function(e,t,n){t=t.length?r(t,function(e){return d(e)?function(t){return o(t,1===e.length?e[0]:e)}:e}):[u];var f=-1;t=r(t,l(a));var p=i(e,function(e,n,o){return{criteria:r(t,function(t){return t(e)}),index:++f,value:e}});return s(p,function(e,t){return c(e,t,n)})}},6001(e,t,n){var r=n(7420),o=n(631);e.exports=function(e,t){return r(e,t,function(t,n){return o(e,n)})}},7420(e,t,n){var r=n(7422),o=n(3170),a=n(1769);e.exports=function(e,t,n){for(var i=-1,s=t.length,l={};++i<s;){var c=t[i],u=r(e,c);n(u,c)&&o(l,a(c,e),u)}return l}},7237(e){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},7255(e,t,n){var r=n(7422);e.exports=function(e){return function(t){return r(t,e)}}},6151(e){var t=Math.ceil,n=Math.max;e.exports=function(e,r,o,a){for(var i=-1,s=n(t((r-e)/(o||1)),0),l=Array(s);s--;)l[a?s:++i]=e,e+=o;return l}},5558(e){e.exports=function(e,t,n,r,o){return o(e,function(e,o,a){n=r?(r=!1,e):t(n,e,o,a)}),n}},9302(e,t,n){var r=n(3488),o=n(6757),a=n(2865);e.exports=function(e,t){return a(o(e,t,r),e+"")}},3170(e,t,n){var r=n(6547),o=n(1769),a=n(361),i=n(3805),s=n(7797);e.exports=function(e,t,n,l){if(!i(e))return e;for(var c=-1,u=(t=o(t,e)).length,d=u-1,f=e;null!=f&&++c<u;){var p=s(t[c]),m=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(c!=d){var h=f[p];void 0===(m=l?l(h,p,f):void 0)&&(m=i(h)?h:a(t[c+1])?[]:{})}r(f,p,m),f=f[p]}return e}},9570(e,t,n){var r=n(7334),o=n(3243),a=n(3488),i=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:a;e.exports=i},5160(e){e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}},916(e,t,n){var r=n(909);e.exports=function(e,t){var n;return r(e,function(e,r,o){return!(n=t(e,r,o))}),!!n}},3937(e){e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},8096(e){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},7556(e,t,n){var r=n(1873),o=n(4932),a=n(6449),i=n(4394),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(a(t))return o(t,e)+"";if(i(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},4128(e,t,n){var r=n(1800),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},7301(e){e.exports=function(e){return function(t){return e(t)}}},5765(e,t,n){var r=n(8859),o=n(5325),a=n(9905),i=n(9219),s=n(4517),l=n(4247);e.exports=function(e,t,n){var c=-1,u=o,d=e.length,f=!0,p=[],m=p;if(n)f=!1,u=a;else if(d>=200){var h=t?null:s(e);if(h)return l(h);f=!1,u=i,m=new r}else m=t?[]:p;e:for(;++c<d;){var g=e[c],y=t?t(g):g;if(g=n||0!==g?g:0,f&&y==y){for(var w=m.length;w--;)if(m[w]===y)continue e;t&&m.push(y),p.push(g)}else u(m,y,n)||(m!==p&&m.push(y),p.push(g))}return p}},514(e,t,n){var r=n(4932);e.exports=function(e,t){return r(t,function(t){return e[t]})}},1234(e){e.exports=function(e,t,n){for(var r=-1,o=e.length,a=t.length,i={};++r<o;){var s=r<a?t[r]:void 0;n(i,e[r],s)}return i}},9219(e){e.exports=function(e,t){return e.has(t)}},4066(e,t,n){var r=n(3488);e.exports=function(e){return"function"==typeof e?e:r}},1769(e,t,n){var r=n(6449),o=n(8586),a=n(1802),i=n(3222);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:a(i(e))}},8754(e,t,n){var r=n(5160);e.exports=function(e,t,n){var o=e.length;return n=void 0===n?o:n,!t&&n>=o?e:r(e,t,n)}},9653(e,t,n){var r=n(7828);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},3290(e,t,n){e=n.nmd(e);var r=n(9325),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?r.Buffer:void 0,s=i?i.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}},6169(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},3201(e){var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},3736(e,t,n){var r=n(1873),o=r?r.prototype:void 0,a=o?o.valueOf:void 0;e.exports=function(e){return a?Object(a.call(e)):{}}},1961(e,t,n){var r=n(9653);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},3730(e,t,n){var r=n(4394);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,a=e==e,i=r(e),s=void 0!==t,l=null===t,c=t==t,u=r(t);if(!l&&!u&&!i&&e>t||i&&s&&c&&!l&&!u||o&&s&&c||!n&&c||!a)return 1;if(!o&&!i&&!u&&e<t||u&&n&&a&&!o&&!i||l&&n&&a||!s&&a||!c)return-1}return 0}},3714(e,t,n){var r=n(3730);e.exports=function(e,t,n){for(var o=-1,a=e.criteria,i=t.criteria,s=a.length,l=n.length;++o<s;){var c=r(a[o],i[o]);if(c)return o>=l?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}},3007(e){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},1791(e,t,n){var r=n(6547),o=n(3360);e.exports=function(e,t,n,a){var i=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=a?a(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),i?o(n,c,u):r(n,c,u)}return n}},2271(e,t,n){var r=n(1791),o=n(4664);e.exports=function(e,t){return r(e,o(e),t)}},8948(e,t,n){var r=n(1791),o=n(6375);e.exports=function(e,t){return r(e,o(e),t)}},5481(e,t,n){var r=n(9325)["__core-js_shared__"];e.exports=r},999(e,t,n){var r=n(9302),o=n(6800);e.exports=function(e){return r(function(t,n){var r=-1,a=n.length,i=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(i=e.length>3&&"function"==typeof i?(a--,i):void 0,s&&o(n[0],n[1],s)&&(i=a<3?void 0:i,a=1),t=Object(t);++r<a;){var l=n[r];l&&e(t,l,r,i)}return t})}},8329(e,t,n){var r=n(4894);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var a=n.length,i=t?a:-1,s=Object(n);(t?i--:++i<a)&&!1!==o(s[i],i,s););return n}}},3221(e){e.exports=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(!1===n(a[l],l,a))break}return t}}},2507(e,t,n){var r=n(8754),o=n(9698),a=n(3912),i=n(3222);e.exports=function(e){return function(t){t=i(t);var n=o(t)?a(t):void 0,s=n?n[0]:t.charAt(0),l=n?r(n,1).join(""):t.slice(1);return s[e]()+l}}},2006(e,t,n){var r=n(5389),o=n(4894),a=n(5950);e.exports=function(e){return function(t,n,i){var s=Object(t);if(!o(t)){var l=r(n,3);t=a(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,i);return c>-1?s[l?t[c]:c]:void 0}}},5508(e,t,n){var r=n(6151),o=n(6800),a=n(7400);e.exports=function(e){return function(t,n,i){return i&&"number"!=typeof i&&o(t,n,i)&&(n=i=void 0),t=a(t),void 0===n?(n=t,t=0):n=a(n),i=void 0===i?t<n?1:-1:a(i),r(t,n,i,e)}}},4517(e,t,n){var r=n(6545),o=n(3950),a=n(4247),i=r&&1/a(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=i},3243(e,t,n){var r=n(6110),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},5911(e,t,n){var r=n(8859),o=n(4248),a=n(9219);e.exports=function(e,t,n,i,s,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var f=l.get(e),p=l.get(t);if(f&&p)return f==t&&p==e;var m=-1,h=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++m<u;){var y=e[m],w=t[m];if(i)var b=c?i(w,y,m,t,e,l):i(y,w,m,e,t,l);if(void 0!==b){if(b)continue;h=!1;break}if(g){if(!o(t,function(e,t){if(!a(g,t)&&(y===e||s(y,e,n,i,l)))return g.push(t)})){h=!1;break}}else if(y!==w&&!s(y,w,n,i,l)){h=!1;break}}return l.delete(e),l.delete(t),h}},1986(e,t,n){var r=n(1873),o=n(7828),a=n(5288),i=n(5911),s=n(317),l=n(4247),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,f){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var m=1&r;if(p||(p=l),e.size!=t.size&&!m)return!1;var h=f.get(e);if(h)return h==t;r|=2,f.set(e,t);var g=i(p(e),p(t),r,c,d,f);return f.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},689(e,t,n){var r=n(2),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,a,i,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var f=c[d];if(!(l?f in t:o.call(t,f)))return!1}var p=s.get(e),m=s.get(t);if(p&&m)return p==t&&m==e;var h=!0;s.set(e,t),s.set(t,e);for(var g=l;++d<u;){var y=e[f=c[d]],w=t[f];if(a)var b=l?a(w,y,f,t,e,s):a(y,w,f,e,t,s);if(!(void 0===b?y===w||i(y,w,n,a,s):b)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var v=e.constructor,x=t.constructor;v==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof x&&x instanceof x||(h=!1)}return s.delete(e),s.delete(t),h}},8816(e,t,n){var r=n(5970),o=n(6757),a=n(2865);e.exports=function(e){return a(o(e,void 0,r),e+"")}},4840(e){var t="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;e.exports=t},2(e,t,n){var r=n(2199),o=n(4664),a=n(5950);e.exports=function(e){return r(e,a,o)}},3349(e,t,n){var r=n(2199),o=n(6375),a=n(7241);e.exports=function(e){return r(e,a,o)}},2651(e,t,n){var r=n(4218);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},776(e,t,n){var r=n(756),o=n(5950);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var a=t[n],i=e[a];t[n]=[a,i,r(i)]}return t}},6110(e,t,n){var r=n(5083),o=n(392);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},8879(e,t,n){var r=n(4335)(Object.getPrototypeOf,Object);e.exports=r},659(e,t,n){var r=n(1873),o=Object.prototype,a=o.hasOwnProperty,i=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=i.call(e);return r&&(t?e[s]=n:delete e[s]),o}},4664(e,t,n){var r=n(9770),o=n(3345),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,s=i?function(e){return null==e?[]:(e=Object(e),r(i(e),function(t){return a.call(e,t)}))}:o;e.exports=s},6375(e,t,n){var r=n(4528),o=n(8879),a=n(4664),i=n(3345),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,a(e)),e=o(e);return t}:i;e.exports=s},5861(e,t,n){var r=n(5580),o=n(8223),a=n(2804),i=n(6545),s=n(8303),l=n(2552),c=n(7473),u="[object Map]",d="[object Promise]",f="[object Set]",p="[object WeakMap]",m="[object DataView]",h=c(r),g=c(o),y=c(a),w=c(i),b=c(s),v=l;(r&&v(new r(new ArrayBuffer(1)))!=m||o&&v(new o)!=u||a&&v(a.resolve())!=d||i&&v(new i)!=f||s&&v(new s)!=p)&&(v=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case h:return m;case g:return u;case y:return d;case w:return f;case b:return p}return t}),e.exports=v},392(e){e.exports=function(e,t){return null==e?void 0:e[t]}},9326(e,t,n){var r=n(1769),o=n(2428),a=n(6449),i=n(361),s=n(294),l=n(7797);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c<u;){var f=l(t[c]);if(!(d=null!=e&&n(e,f)))break;e=e[f]}return d||++c!=u?d:!!(u=null==e?0:e.length)&&s(u)&&i(f,u)&&(a(e)||o(e))}},9698(e){var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},2032(e,t,n){var r=n(1042);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},3862(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},6721(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},2749(e,t,n){var r=n(1042),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},5749(e,t,n){var r=n(1042);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},6189(e){var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},7199(e,t,n){var r=n(9653),o=n(6169),a=n(3201),i=n(3736),s=n(1961);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return a(e);case"[object Symbol]":return i(e)}}},5529(e,t,n){var r=n(9344),o=n(8879),a=n(5527);e.exports=function(e){return"function"!=typeof e.constructor||a(e)?{}:r(o(e))}},5891(e,t,n){var r=n(1873),o=n(2428),a=n(6449),i=r?r.isConcatSpreadable:void 0;e.exports=function(e){return a(e)||o(e)||!!(i&&e&&e[i])}},361(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<n}},6800(e,t,n){var r=n(5288),o=n(4894),a=n(361),i=n(3805);e.exports=function(e,t,n){if(!i(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&a(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},8586(e,t,n){var r=n(6449),o=n(4394),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||i.test(e)||!a.test(e)||null!=t&&e in Object(t)}},4218(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},7296(e,t,n){var r,o=n(5481),a=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!a&&a in e}},5527(e){var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},756(e,t,n){var r=n(3805);e.exports=function(e){return e==e&&!r(e)}},3702(e){e.exports=function(){this.__data__=[],this.size=0}},80(e,t,n){var r=n(6025),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():o.call(t,n,1),--this.size,0))}},4739(e,t,n){var r=n(6025);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},8655(e,t,n){var r=n(6025);e.exports=function(e){return r(this.__data__,e)>-1}},1175(e,t,n){var r=n(6025);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},3040(e,t,n){var r=n(1549),o=n(79),a=n(8223);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||o),string:new r}}},7670(e,t,n){var r=n(2651);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},289(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).get(e)}},4509(e,t,n){var r=n(2651);e.exports=function(e){return r(this,e).has(e)}},2949(e,t,n){var r=n(2651);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},317(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}},7197(e){e.exports=function(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}},2224(e,t,n){var r=n(104);e.exports=function(e){var t=r(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t}},1042(e,t,n){var r=n(6110)(Object,"create");e.exports=r},3650(e,t,n){var r=n(4335)(Object.keys,Object);e.exports=r},181(e){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},6009(e,t,n){e=n.nmd(e);var r=n(4840),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,s=function(){try{return a&&a.require&&a.require("util").types||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=s},9350(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},4335(e){e.exports=function(e,t){return function(n){return e(t(n))}}},6757(e,t,n){var r=n(1033),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var a=arguments,i=-1,s=o(a.length-t,0),l=Array(s);++i<s;)l[i]=a[t+i];i=-1;for(var c=Array(t+1);++i<t;)c[i]=a[i];return c[t]=n(l),r(e,this,c)}}},9325(e,t,n){var r=n(4840),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},4974(e){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},1380(e){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1459(e){e.exports=function(e){return this.__data__.has(e)}},4247(e){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}},2865(e,t,n){var r=n(9570),o=n(1811)(r);e.exports=o},1811(e){var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),a=16-(o-r);if(r=o,a>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},1420(e,t,n){var r=n(79);e.exports=function(){this.__data__=new r,this.size=0}},938(e){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},3605(e){e.exports=function(e){return this.__data__.get(e)}},9817(e){e.exports=function(e){return this.__data__.has(e)}},945(e,t,n){var r=n(79),o=n(8223),a=n(3661);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var i=n.__data__;if(!o||i.length<199)return i.push([e,t]),this.size=++n.size,this;n=this.__data__=new a(i)}return n.set(e,t),this.size=n.size,this}},6959(e){e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}},1993(e,t,n){var r=n(9811),o=n(9698),a=n(7927);e.exports=function(e){return o(e)?a(e):r(e)}},3912(e,t,n){var r=n(1074),o=n(9698),a=n(2054);e.exports=function(e){return o(e)?a(e):r(e)}},1802(e,t,n){var r=n(2224),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,i=r(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,function(e,n,r,o){t.push(r?o.replace(a,"$1"):n||e)}),t});e.exports=i},7797(e,t,n){var r=n(4394);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7473(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},1800(e){var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},7927(e){var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",a="[^"+t+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+o+")?",c="[\\ufe0e\\ufe0f]?",u=c+l+"(?:\\u200d(?:"+[a,i,s].join("|")+")"+c+l+")*",d="(?:"+[a+r+"?",r,i,s,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+d+u,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},2054(e){var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",a="[^"+t+"]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+o+")?",c="[\\ufe0e\\ufe0f]?",u=c+l+"(?:\\u200d(?:"+[a,i,s].join("|")+")"+c+l+")*",d="(?:"+[a+r+"?",r,i,s,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+d+u,"g");e.exports=function(e){return e.match(f)||[]}},2629(e,t,n){var r=n(9999);e.exports=function(e){return r(e,4)}},8055(e,t,n){var r=n(9999);e.exports=function(e){return r(e,5)}},7334(e){e.exports=function(e){return function(){return e}}},8221(e,t,n){var r=n(3805),o=n(124),a=n(9374),i=Math.max,s=Math.min;e.exports=function(e,t,n){var l,c,u,d,f,p,m=0,h=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function w(t){var n=l,r=c;return l=c=void 0,m=t,d=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-m>=u}function v(){var e=o();if(b(e))return x(e);f=setTimeout(v,function(e){var n=t-(e-p);return g?s(n,u-(e-m)):n}(e))}function x(e){return f=void 0,y&&l?w(e):(l=c=void 0,d)}function N(){var e=o(),n=b(e);if(l=arguments,c=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(v,t),h?w(e):d}(p);if(g)return clearTimeout(f),f=setTimeout(v,t),w(p)}return void 0===f&&(f=setTimeout(v,t)),d}return t=a(t)||0,r(n)&&(h=!!n.leading,u=(g="maxWait"in n)?i(a(n.maxWait)||0,t):u,y="trailing"in n?!!n.trailing:y),N.cancel=function(){void 0!==f&&clearTimeout(f),m=0,l=p=c=f=void 0},N.flush=function(){return void 0===f?d:x(o())},N}},4684(e,t,n){var r=n(9302),o=n(5288),a=n(6800),i=n(7241),s=Object.prototype,l=s.hasOwnProperty,c=r(function(e,t){e=Object(e);var n=-1,r=t.length,c=r>2?t[2]:void 0;for(c&&a(t[0],t[1],c)&&(r=1);++n<r;)for(var u=t[n],d=i(u),f=-1,p=d.length;++f<p;){var m=d[f],h=e[m];(void 0===h||o(h,s[m])&&!l.call(e,m))&&(e[m]=u[m])}return e});e.exports=c},6135(e,t,n){e.exports=n(7373)},5288(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},9747(e,t,n){var r=n(7277),o=n(3777),a=n(5389),i=n(6449),s=n(6800);e.exports=function(e,t,n){var l=i(e)?r:o;return n&&s(e,t,n)&&(t=void 0),l(e,a(t,3))}},7612(e,t,n){var r=n(9770),o=n(6574),a=n(5389),i=n(6449);e.exports=function(e,t){return(i(e)?r:o)(e,a(t,3))}},7309(e,t,n){var r=n(2006)(n(4713));e.exports=r},4713(e,t,n){var r=n(2523),o=n(5389),a=n(1489),i=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:a(n);return l<0&&(l=i(s+l,0)),r(e,o(t,3),l)}},7307(e,t,n){var r=n(3120),o=n(5378);e.exports=function(e,t){return r(o(e,t),1)}},5970(e,t,n){var r=n(3120);e.exports=function(e){return null!=e&&e.length?r(e,1):[]}},7373(e,t,n){var r=n(3729),o=n(909),a=n(4066),i=n(6449);e.exports=function(e,t){return(i(e)?r:o)(e,a(t))}},2420(e,t,n){var r=n(6649),o=n(4066),a=n(7241);e.exports=function(e,t){return null==e?e:r(e,o(t),a)}},8156(e,t,n){var r=n(7422);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},1448(e,t,n){var r=n(426),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},631(e,t,n){var r=n(8077),o=n(9326);e.exports=function(e,t){return null!=e&&o(e,t,r)}},3488(e){e.exports=function(e){return e}},2428(e,t,n){var r=n(7534),o=n(346),a=Object.prototype,i=a.hasOwnProperty,s=a.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&i.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},6449(e){var t=Array.isArray;e.exports=t},4894(e,t,n){var r=n(1882),o=n(294);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},3693(e,t,n){var r=n(4894),o=n(346);e.exports=function(e){return o(e)&&r(e)}},3812(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return!0===e||!1===e||o(e)&&"[object Boolean]"==r(e)}},3656(e,t,n){e=n.nmd(e);var r=n(9325),o=n(9935),a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,s=i&&i.exports===a?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l},2193(e,t,n){var r=n(8984),o=n(5861),a=n(2428),i=n(6449),s=n(4894),l=n(3656),c=n(5527),u=n(7167),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(i(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||a(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},2404(e,t,n){var r=n(270);e.exports=function(e,t){return r(e,t)}},1882(e,t,n){var r=n(2552),o=n(3805);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},294(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},7730(e,t,n){var r=n(9172),o=n(7301),a=n(6009),i=a&&a.isMap,s=i?o(i):r;e.exports=s},1741(e,t,n){var r=n(8023);e.exports=function(e){return r(e)&&e!=+e}},9843(e){e.exports=function(e){return null==e}},8023(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return"number"==typeof e||o(e)&&"[object Number]"==r(e)}},3805(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},346(e){e.exports=function(e){return null!=e&&"object"==typeof e}},1331(e,t,n){var r=n(2552),o=n(8879),a=n(346),i=Function.prototype,s=Object.prototype,l=i.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!a(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},8440(e,t,n){var r=n(6038),o=n(7301),a=n(6009),i=a&&a.isSet,s=i?o(i):r;e.exports=s},5015(e,t,n){var r=n(2552),o=n(6449),a=n(346);e.exports=function(e){return"string"==typeof e||!o(e)&&a(e)&&"[object String]"==r(e)}},4394(e,t,n){var r=n(2552),o=n(346);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},7167(e,t,n){var r=n(4901),o=n(7301),a=n(6009),i=a&&a.isTypedArray,s=i?o(i):r;e.exports=s},2216(e){e.exports=function(e){return void 0===e}},5950(e,t,n){var r=n(695),o=n(8984),a=n(4894);e.exports=function(e){return a(e)?r(e):o(e)}},7241(e,t,n){var r=n(695),o=n(2903),a=n(4894);e.exports=function(e){return a(e)?r(e,!0):o(e)}},8090(e){e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},5378(e,t,n){var r=n(4932),o=n(5389),a=n(5128),i=n(6449);e.exports=function(e,t){return(i(e)?r:a)(e,o(t,3))}},3916(e,t,n){var r=n(3360),o=n(641),a=n(5389);e.exports=function(e,t){var n={};return t=a(t,3),o(e,function(e,o,a){r(n,o,t(e,o,a))}),n}},4506(e,t,n){var r=n(3599),o=n(3335),a=n(3488);e.exports=function(e){return e&&e.length?r(e,a,o):void 0}},104(e,t,n){var r=n(3661);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},5364(e,t,n){var r=n(5250),o=n(999)(function(e,t,n){r(e,t,n)});e.exports=o},1684(e,t,n){var r=n(3599),o=n(6176),a=n(3488);e.exports=function(e){return e&&e.length?r(e,a,o):void 0}},6533(e,t,n){var r=n(3599),o=n(5389),a=n(6176);e.exports=function(e,t){return e&&e.length?r(e,o(t,2),a):void 0}},3950(e){e.exports=function(){}},124(e,t,n){var r=n(9325);e.exports=function(){return r.Date.now()}},4383(e,t,n){var r=n(6001),o=n(8816)(function(e,t){return null==e?{}:r(e,t)});e.exports=o},583(e,t,n){var r=n(7237),o=n(7255),a=n(8586),i=n(7797);e.exports=function(e){return a(e)?r(i(e)):o(e)}},3181(e,t,n){var r=n(5508)();e.exports=r},860(e,t,n){var r=n(882),o=n(909),a=n(5389),i=n(5558),s=n(6449);e.exports=function(e,t,n){var l=s(e)?r:i,c=arguments.length<3;return l(e,a(t,4),n,c,o)}},7091(e,t,n){var r=n(8984),o=n(5861),a=n(4894),i=n(5015),s=n(1993);e.exports=function(e){if(null==e)return 0;if(a(e))return i(e)?s(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},2426(e,t,n){var r=n(4248),o=n(5389),a=n(916),i=n(6449),s=n(6800);e.exports=function(e,t,n){var l=i(e)?r:a;return n&&s(e,t,n)&&(t=void 0),l(e,o(t,3))}},3031(e,t,n){var r=n(3120),o=n(6155),a=n(9302),i=n(6800),s=a(function(e,t){if(null==e)return[];var n=t.length;return n>1&&i(e,t[0],t[1])?t=[]:n>2&&i(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])});e.exports=s},3345(e){e.exports=function(){return[]}},9935(e){e.exports=function(){return!1}},7350(e,t,n){var r=n(8221),o=n(3805);e.exports=function(e,t,n){var a=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return o(n)&&(a="leading"in n?!!n.leading:a,i="trailing"in n?!!n.trailing:i),r(e,t,{leading:a,maxWait:t,trailing:i})}},7400(e,t,n){var r=n(9374),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},1489(e,t,n){var r=n(7400);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},9374(e,t,n){var r=n(4128),o=n(3805),a=n(4394),i=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(a(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):i.test(e)?NaN:+e}},9884(e,t,n){var r=n(1791),o=n(7241);e.exports=function(e){return r(e,o(e))}},3222(e,t,n){var r=n(7556);e.exports=function(e){return null==e?"":r(e)}},9752(e,t,n){var r=n(3729),o=n(9344),a=n(641),i=n(5389),s=n(8879),l=n(6449),c=n(3656),u=n(1882),d=n(3805),f=n(7167);e.exports=function(e,t,n){var p=l(e),m=p||c(e)||f(e);if(t=i(t,4),null==n){var h=e&&e.constructor;n=m?p?new h:[]:d(e)&&u(h)?o(s(e)):{}}return(m?r:a)(e,function(e,r,o){return t(n,e,r,o)}),n}},299(e,t,n){var r=n(3120),o=n(9302),a=n(5765),i=n(3693),s=o(function(e){return a(r(e,1,i,!0))});e.exports=s},14(e,t,n){var r=n(5389),o=n(5765);e.exports=function(e,t){return e&&e.length?o(e,r(t,2)):[]}},7200(e,t,n){var r=n(3222),o=0;e.exports=function(e){var t=++o;return r(e)+t}},5808(e,t,n){var r=n(2507)("toUpperCase");e.exports=r},5880(e,t,n){var r=n(514),o=n(5950);e.exports=function(e){return null==e?[]:r(e,o(e))}},7248(e,t,n){var r=n(6547),o=n(1234);e.exports=function(e,t){return o(e||[],t||[],r)}},2694(e,t,n){"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4496(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultArea=void 0,t.defaultArea="default-area"},4601(e,t,n){"use strict";Object.defineProperty(t,"$h",{enumerable:!0,get:function(){return r.trackPromise}}),Object.defineProperty(t,"H8",{enumerable:!0,get:function(){return o.usePromiseTracker}});var r=n(2609),o=(n(4951),n(5398))},5590(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupConfig=t.defaultConfig=void 0;var r=n(4496),o={area:r.defaultArea,delay:0};t.defaultConfig=o,t.setupConfig=function(e){return{area:e&&e.area?e.area:r.defaultArea,delay:e&&e.delay?e.delay:0}}},9220(e,t){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=void 0;var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,o;return t=e,o=[{key:"emit",value:function(e){if(!e)return this;for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];var a,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}(this._e(e));try{for(i.s();!(a=i.n()).done;){var s=a.value;s.apply(s.ctx,[].concat(r)),1==s.off_event&&this.off(e,s)}}catch(e){i.e(e)}finally{i.f()}return this}},{key:"on",value:function(e,t,n){return e?(t.ctx=n,this._e(e).push(t),this):this}},{key:"once",value:function(e,t,n){return e?(t.ctx=n,t.off_event=!0,this.on(e,t)):this}},{key:"off",value:function(e,t){if(!e)return this;if(!this[e])return this;var n=this._e(e);return t?(this[e]=n.filter(function(e){return e!=t}),this):(delete this[e],this)}},{key:"_e",value:function(e){return this[e]||(this[e]=[])}}],o&&r(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.Emitter=o},2609(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.trackPromise=t.promiseCounterUpdateEventId=t.manuallyResetPromiseCounter=t.manuallyIncrementPromiseCounter=t.manuallyDecrementPromiseCounter=t.getCounter=t.emitter=void 0;var r=n(9220),o=n(4496),a=new r.Emitter;t.emitter=a;var i="promise-counter-update";t.promiseCounterUpdateEventId=i;var s,l,c=(s={},(l=o.defaultArea)in s?Object.defineProperty(s,l,{value:0,enumerable:!0,configurable:!0,writable:!0}):s[l]=0,s);t.getCounter=function(e){return c[e]},t.trackPromise=function(e,t){t=t||o.defaultArea,u(t);var n=function(){return p(t)};return e.then(n,n),e};var u=function(e){d(e);var t=f(e);a.emit(i,t,e)},d=function(e){Boolean(c[e])?c[e]++:c[e]=1},f=function(e){return c[e]>0},p=function(e){c[e]>0&&m(e);var t=f(e);a.emit(i,t,e)},m=function(e){c[e]--};t.manuallyResetPromiseCounter=function(e){e=e||o.defaultArea,c[e]=0,a.emit(i,!1,e)},t.manuallyDecrementPromiseCounter=function(e){e=e||o.defaultArea,p(e)},t.manuallyIncrementPromiseCounter=function(e){e=e||o.defaultArea,u(e)}},4951(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.promiseTrackerHoc=void 0;var o=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(n(1609)),a=n(2609),i=n(5590);function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function d(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}t.promiseTrackerHoc=function(e){return function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(g,t);var n,s,p,m,h=(p=g,m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=f(p);if(m){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return d(e)}(this,e)});function g(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(t=h.call(this,e)).state={promiseInProgress:!1,internalPromiseInProgress:!1,config:(0,i.setupConfig)(e.config)},t.notifyPromiseInProgress=t.notifyPromiseInProgress.bind(d(t)),t.updateProgress=t.updateProgress.bind(d(t)),t.subscribeToCounterUpdate=t.subscribeToCounterUpdate.bind(d(t)),t}return n=g,(s=[{key:"notifyPromiseInProgress",value:function(){var e=this;0===this.state.config.delay?this.setState({promiseInProgress:!0}):setTimeout(function(){var t=Boolean((0,a.getCounter)(e.state.config.area)>0);e.setState({promiseInProgress:t})},this.state.config.delay)}},{key:"updateProgress",value:function(e,t){this.setState({internalPromiseInProgress:e},t),e?this.notifyPromiseInProgress():this.setState({promiseInProgress:!1})}},{key:"subscribeToCounterUpdate",value:function(){var e=this;a.emitter.on(a.promiseCounterUpdateEventId,function(t,n){e.state.config.area===n&&e.updateProgress(t)})}},{key:"componentDidMount",value:function(){this.updateProgress(Boolean((0,a.getCounter)(this.state.config.area)>0),this.subscribeToCounterUpdate)}},{key:"componentWillUnmount",value:function(){a.emitter.off(a.promiseCounterUpdateEventId)}},{key:"render",value:function(){return o.default.createElement(e,l({},this.props,{config:this.state.config,promiseInProgress:this.state.promiseInProgress}))}}])&&c(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),g}(o.Component)}},5398(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.usePromiseTracker=void 0;var r,o=(r=n(1609))&&r.__esModule?r:{default:r},a=n(2609),i=n(5590);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a=[],_n=!0,i=!1;try{for(n=n.call(e);!(_n=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);_n=!0);}catch(e){i=!0,o=e}finally{try{_n||null==n.return||n.return()}finally{if(i)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.usePromiseTracker=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.defaultConfig,t=o.default.useRef(!1);o.default.useEffect(function(){return t.current=!0,function(){return t.current=!1}},[]);var n=s(o.default.useState((0,i.setupConfig)(e)),1)[0];o.default.useEffect(function(){t.current&&n&&n.area&&(0,a.getCounter)(n.area)>0&&(c(!0),f(!0))},[n]);var r=s(o.default.useState(!1),2),l=r[0],c=r[1],u=s(o.default.useState(!1),2),d=u[0],f=u[1],p=o.default.useRef(l),m=function(e,r){t.current&&n.area===r&&(c(e),p.current=e,e?n&&n.delay&&0!==n.delay?setTimeout(function(){t.current&&p.current&&f(!0)},n.delay):f(!0):f(!1))};return o.default.useEffect(function(){return p.current=l,a.emitter.on(a.promiseCounterUpdateEventId,m),function(){return a.emitter.off(a.promiseCounterUpdateEventId,m)}},[]),{promiseInProgress:d}}},4210(e,t,n){"use strict";function r(e,t,n,r,o,a,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}const o={};["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"].forEach(e=>{o[e]=new r(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(([e,t])=>{o[e]=new r(e,1,!1,t,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(e=>{o[e]=new r(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(e=>{o[e]=new r(e,2,!1,e,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(e=>{o[e]=new r(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(e=>{o[e]=new r(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(e=>{o[e]=new r(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(e=>{o[e]=new r(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(e=>{o[e]=new r(e,5,!1,e.toLowerCase(),null,!1,!1)});const a=/[\-\:]([a-z])/g,i=e=>e[1].toUpperCase();["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(e=>{const t=e.replace(a,i);o[t]=new r(t,1,!1,e,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(e=>{const t=e.replace(a,i);o[t]=new r(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(e=>{const t=e.replace(a,i);o[t]=new r(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!1,!1)}),o.xlinkHref=new r("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(e=>{o[e]=new r(e,1,!1,e.toLowerCase(),null,!0,!0)});const{CAMELCASE:s,SAME:l,possibleStandardNames:c}=n(6811),u=RegExp.prototype.test.bind(new RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")),d=Object.keys(c).reduce((e,t)=>{const n=c[t];return n===l?e[t]=t:n===s?e[t.toLowerCase()]=t:e[t]=n,e},{});t.BOOLEAN=3,t.BOOLEANISH_STRING=2,t.NUMERIC=5,t.OVERLOADED_BOOLEAN=4,t.POSITIVE_NUMERIC=6,t.RESERVED=0,t.STRING=1,t.getPropertyInfo=function(e){return o.hasOwnProperty(e)?o[e]:null},t.isCustomAttribute=u,t.possibleStandardNames=d},6811(e,t){t.SAME=0,t.CAMELCASE=1,t.possibleStandardNames={accept:0,acceptCharset:1,"accept-charset":"acceptCharset",accessKey:1,action:0,allowFullScreen:1,alt:0,as:0,async:0,autoCapitalize:1,autoComplete:1,autoCorrect:1,autoFocus:1,autoPlay:1,autoSave:1,capture:0,cellPadding:1,cellSpacing:1,challenge:0,charSet:1,checked:0,children:0,cite:0,class:"className",classID:1,className:1,cols:0,colSpan:1,content:0,contentEditable:1,contextMenu:1,controls:0,controlsList:1,coords:0,crossOrigin:1,dangerouslySetInnerHTML:1,data:0,dateTime:1,default:0,defaultChecked:1,defaultValue:1,defer:0,dir:0,disabled:0,disablePictureInPicture:1,disableRemotePlayback:1,download:0,draggable:0,encType:1,enterKeyHint:1,for:"htmlFor",form:0,formMethod:1,formAction:1,formEncType:1,formNoValidate:1,formTarget:1,frameBorder:1,headers:0,height:0,hidden:0,high:0,href:0,hrefLang:1,htmlFor:1,httpEquiv:1,"http-equiv":"httpEquiv",icon:0,id:0,innerHTML:1,inputMode:1,integrity:0,is:0,itemID:1,itemProp:1,itemRef:1,itemScope:1,itemType:1,keyParams:1,keyType:1,kind:0,label:0,lang:0,list:0,loop:0,low:0,manifest:0,marginWidth:1,marginHeight:1,max:0,maxLength:1,media:0,mediaGroup:1,method:0,min:0,minLength:1,multiple:0,muted:0,name:0,noModule:1,nonce:0,noValidate:1,open:0,optimum:0,pattern:0,placeholder:0,playsInline:1,poster:0,preload:0,profile:0,radioGroup:1,readOnly:1,referrerPolicy:1,rel:0,required:0,reversed:0,role:0,rows:0,rowSpan:1,sandbox:0,scope:0,scoped:0,scrolling:0,seamless:0,selected:0,shape:0,size:0,sizes:0,span:0,spellCheck:1,src:0,srcDoc:1,srcLang:1,srcSet:1,start:0,step:0,style:0,summary:0,tabIndex:1,target:0,title:0,type:0,useMap:1,value:0,width:0,wmode:0,wrap:0,about:0,accentHeight:1,"accent-height":"accentHeight",accumulate:0,additive:0,alignmentBaseline:1,"alignment-baseline":"alignmentBaseline",allowReorder:1,alphabetic:0,amplitude:0,arabicForm:1,"arabic-form":"arabicForm",ascent:0,attributeName:1,attributeType:1,autoReverse:1,azimuth:0,baseFrequency:1,baselineShift:1,"baseline-shift":"baselineShift",baseProfile:1,bbox:0,begin:0,bias:0,by:0,calcMode:1,capHeight:1,"cap-height":"capHeight",clip:0,clipPath:1,"clip-path":"clipPath",clipPathUnits:1,clipRule:1,"clip-rule":"clipRule",color:0,colorInterpolation:1,"color-interpolation":"colorInterpolation",colorInterpolationFilters:1,"color-interpolation-filters":"colorInterpolationFilters",colorProfile:1,"color-profile":"colorProfile",colorRendering:1,"color-rendering":"colorRendering",contentScriptType:1,contentStyleType:1,cursor:0,cx:0,cy:0,d:0,datatype:0,decelerate:0,descent:0,diffuseConstant:1,direction:0,display:0,divisor:0,dominantBaseline:1,"dominant-baseline":"dominantBaseline",dur:0,dx:0,dy:0,edgeMode:1,elevation:0,enableBackground:1,"enable-background":"enableBackground",end:0,exponent:0,externalResourcesRequired:1,fill:0,fillOpacity:1,"fill-opacity":"fillOpacity",fillRule:1,"fill-rule":"fillRule",filter:0,filterRes:1,filterUnits:1,floodOpacity:1,"flood-opacity":"floodOpacity",floodColor:1,"flood-color":"floodColor",focusable:0,fontFamily:1,"font-family":"fontFamily",fontSize:1,"font-size":"fontSize",fontSizeAdjust:1,"font-size-adjust":"fontSizeAdjust",fontStretch:1,"font-stretch":"fontStretch",fontStyle:1,"font-style":"fontStyle",fontVariant:1,"font-variant":"fontVariant",fontWeight:1,"font-weight":"fontWeight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:1,"glyph-name":"glyphName",glyphOrientationHorizontal:1,"glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphOrientationVertical:1,"glyph-orientation-vertical":"glyphOrientationVertical",glyphRef:1,gradientTransform:1,gradientUnits:1,hanging:0,horizAdvX:1,"horiz-adv-x":"horizAdvX",horizOriginX:1,"horiz-origin-x":"horizOriginX",ideographic:0,imageRendering:1,"image-rendering":"imageRendering",in2:0,in:0,inlist:0,intercept:0,k1:0,k2:0,k3:0,k4:0,k:0,kernelMatrix:1,kernelUnitLength:1,kerning:0,keyPoints:1,keySplines:1,keyTimes:1,lengthAdjust:1,letterSpacing:1,"letter-spacing":"letterSpacing",lightingColor:1,"lighting-color":"lightingColor",limitingConeAngle:1,local:0,markerEnd:1,"marker-end":"markerEnd",markerHeight:1,markerMid:1,"marker-mid":"markerMid",markerStart:1,"marker-start":"markerStart",markerUnits:1,markerWidth:1,mask:0,maskContentUnits:1,maskUnits:1,mathematical:0,mode:0,numOctaves:1,offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:1,"overline-position":"overlinePosition",overlineThickness:1,"overline-thickness":"overlineThickness",paintOrder:1,"paint-order":"paintOrder",panose1:0,"panose-1":"panose1",pathLength:1,patternContentUnits:1,patternTransform:1,patternUnits:1,pointerEvents:1,"pointer-events":"pointerEvents",points:0,pointsAtX:1,pointsAtY:1,pointsAtZ:1,prefix:0,preserveAlpha:1,preserveAspectRatio:1,primitiveUnits:1,property:0,r:0,radius:0,refX:1,refY:1,renderingIntent:1,"rendering-intent":"renderingIntent",repeatCount:1,repeatDur:1,requiredExtensions:1,requiredFeatures:1,resource:0,restart:0,result:0,results:0,rotate:0,rx:0,ry:0,scale:0,security:0,seed:0,shapeRendering:1,"shape-rendering":"shapeRendering",slope:0,spacing:0,specularConstant:1,specularExponent:1,speed:0,spreadMethod:1,startOffset:1,stdDeviation:1,stemh:0,stemv:0,stitchTiles:1,stopColor:1,"stop-color":"stopColor",stopOpacity:1,"stop-opacity":"stopOpacity",strikethroughPosition:1,"strikethrough-position":"strikethroughPosition",strikethroughThickness:1,"strikethrough-thickness":"strikethroughThickness",string:0,stroke:0,strokeDasharray:1,"stroke-dasharray":"strokeDasharray",strokeDashoffset:1,"stroke-dashoffset":"strokeDashoffset",strokeLinecap:1,"stroke-linecap":"strokeLinecap",strokeLinejoin:1,"stroke-linejoin":"strokeLinejoin",strokeMiterlimit:1,"stroke-miterlimit":"strokeMiterlimit",strokeWidth:1,"stroke-width":"strokeWidth",strokeOpacity:1,"stroke-opacity":"strokeOpacity",suppressContentEditableWarning:1,suppressHydrationWarning:1,surfaceScale:1,systemLanguage:1,tableValues:1,targetX:1,targetY:1,textAnchor:1,"text-anchor":"textAnchor",textDecoration:1,"text-decoration":"textDecoration",textLength:1,textRendering:1,"text-rendering":"textRendering",to:0,transform:0,typeof:0,u1:0,u2:0,underlinePosition:1,"underline-position":"underlinePosition",underlineThickness:1,"underline-thickness":"underlineThickness",unicode:0,unicodeBidi:1,"unicode-bidi":"unicodeBidi",unicodeRange:1,"unicode-range":"unicodeRange",unitsPerEm:1,"units-per-em":"unitsPerEm",unselectable:0,vAlphabetic:1,"v-alphabetic":"vAlphabetic",values:0,vectorEffect:1,"vector-effect":"vectorEffect",version:0,vertAdvY:1,"vert-adv-y":"vertAdvY",vertOriginX:1,"vert-origin-x":"vertOriginX",vertOriginY:1,"vert-origin-y":"vertOriginY",vHanging:1,"v-hanging":"vHanging",vIdeographic:1,"v-ideographic":"vIdeographic",viewBox:1,viewTarget:1,visibility:0,vMathematical:1,"v-mathematical":"vMathematical",vocab:0,widths:0,wordSpacing:1,"word-spacing":"wordSpacing",writingMode:1,"writing-mode":"writingMode",x1:0,x2:0,x:0,xChannelSelector:1,xHeight:1,"x-height":"xHeight",xlinkActuate:1,"xlink:actuate":"xlinkActuate",xlinkArcrole:1,"xlink:arcrole":"xlinkArcrole",xlinkHref:1,"xlink:href":"xlinkHref",xlinkRole:1,"xlink:role":"xlinkRole",xlinkShow:1,"xlink:show":"xlinkShow",xlinkTitle:1,"xlink:title":"xlinkTitle",xlinkType:1,"xlink:type":"xlinkType",xmlBase:1,"xml:base":"xmlBase",xmlLang:1,"xml:lang":"xmlLang",xmlns:0,"xml:space":"xmlSpace",xmlnsXlink:1,"xmlns:xlink":"xmlnsXlink",xmlSpace:1,y1:0,y2:0,y:0,yChannelSelector:1,z:0,zoomAndPan:1}},9296(e,t,n){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var o=n(6347),a=r(n(1609)),i=n(4499);n(5556),n(7573);var s=r(n(7676));function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){e.prototype=Object.create(t.prototype),u(e.prototype.constructor=e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],0<=t.indexOf(n)||(o[n]=e[n]);return o}(function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=i.createBrowserHistory(t.props),t}c(t,e),t.prototype.render=function(){return a.createElement(o.Router,{history:this.history,children:this.props.children})}})(a.Component),function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=i.createHashHistory(t.props),t}c(t,e),t.prototype.render=function(){return a.createElement(o.Router,{history:this.history,children:this.props.children})}}(a.Component);var f=function(e,t){return"function"==typeof e?e(t):e},p=function(e,t){return"string"==typeof e?i.createLocation(e,null,null,t):e},m=function(e){return e},h=a.forwardRef;void 0===h&&(h=m);var g=h(function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=d(e,["innerRef","navigate","onClick"]),s=i.target,c=l({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||s&&"_self"!==s||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=m!==h&&t||n,a.createElement("a",c)}),y=h(function(e,t){var n=e.component,r=void 0===n?g:n,c=e.replace,u=e.to,y=e.innerRef,w=d(e,["component","replace","to","innerRef"]);return a.createElement(o.__RouterContext.Consumer,null,function(e){e||s(!1);var n=e.history,o=p(f(u,e.location),e.location),d=o?n.createHref(o):"",g=l({},w,{href:d,navigate:function(){var t=f(u,e.location),r=i.createPath(e.location)===i.createPath(p(t));(c||r?n.replace:n.push)(t)}});return m!==h?g.ref=t||y:g.innerRef=y,a.createElement(r,g)})}),w=function(e){return e},b=a.forwardRef;void 0===b&&(b=w);b(function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,i=e.activeClassName,c=void 0===i?"active":i,u=e.activeStyle,m=e.className,h=e.exact,g=e.isActive,v=e.location,x=e.sensitive,N=e.strict,E=e.style,M=e.to,_=e.innerRef,I=d(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return a.createElement(o.__RouterContext.Consumer,null,function(e){e||s(!1);var n=v||e.location,i=p(f(M,n),n),d=i.pathname,S=d&&d.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),j=S?o.matchPath(n.pathname,{path:S,exact:h,sensitive:x,strict:N}):null,k=!!(g?g(j,n):j),D="function"==typeof m?m(k):m,C="function"==typeof E?E(k):E;k&&(D=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return e}).join(" ")}(D,c),C=l({},C,u));var A=l({"aria-current":k&&r||null,className:D,style:C,to:i},I);return w!==b?A.ref=t||_:A.innerRef=_,a.createElement(y,A)})});Object.defineProperty(t,"W6",{enumerable:!0,get:function(){return o.useHistory}})},6347(e,t,n){"use strict";n.r(t),n.d(t,{MemoryRouter:()=>E,Prompt:()=>_,Redirect:()=>k,Route:()=>T,Router:()=>N,StaticRouter:()=>U,Switch:()=>B,__HistoryContext:()=>v,__RouterContext:()=>x,generatePath:()=>j,matchPath:()=>A,useHistory:()=>Z,useLocation:()=>Q,useParams:()=>V,useRouteMatch:()=>W,withRouter:()=>F});var r=n(7387),o=n(1609),a=n.n(o),i=n(5556),s=n.n(i),l=n(4499),c=n(1561),u=n(8168),d=n(8505),f=n.n(d),p=(n(7564),n(8587)),m=n(4146),h=n.n(m),g=1073741823,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{},w=a().createContext||function(e,t){var n,o,i,l="__create-react-context-"+((y[i="__global_unique_id__"]=(y[i]||0)+1)+"__"),c=function(e){function n(){for(var t,n,r,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return(t=e.call.apply(e,[this].concat(a))||this).emitter=(n=t.props.value,r=[],{on:function(e){r.push(e)},off:function(e){r=r.filter(function(t){return t!==e})},get:function(){return n},set:function(e,t){n=e,r.forEach(function(e){return e(n,t)})}}),t}(0,r.A)(n,e);var o=n.prototype;return o.getChildContext=function(){var e;return(e={})[l]=this.emitter,e},o.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((a=r)===(i=o)?0!==a||1/a==1/i:a!=a&&i!=i)?n=0:(n="function"==typeof t?t(r,o):g,0!=(n|=0)&&this.emitter.set(e.value,n))}var a,i},o.render=function(){return this.props.children},n}(a().Component);c.childContextTypes=((n={})[l]=s().object.isRequired,n);var u=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,e.state={value:e.getValue()},e.onUpdate=function(t,n){(0|e.observedBits)&n&&e.setState({value:e.getValue()})},e}(0,r.A)(n,t);var o=n.prototype;return o.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?g:t},o.componentDidMount=function(){this.context[l]&&this.context[l].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?g:e},o.componentWillUnmount=function(){this.context[l]&&this.context[l].off(this.onUpdate)},o.getValue=function(){return this.context[l]?this.context[l].get():e},o.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(a().Component);return u.contextTypes=((o={})[l]=s().object,o),{Provider:c,Consumer:u}},b=function(e){var t=w();return t.displayName=e,t},v=b("Router-History"),x=b("Router"),N=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen(function(e){n._pendingLocation=e})),n}(0,r.A)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){var e=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(t){e._isMounted&&e.setState({location:t})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a().createElement(x.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a().createElement(v.Provider,{children:this.props.children||null,value:this.props.history}))},t}(a().Component),E=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,l.createMemoryHistory)(t.props),t}return(0,r.A)(t,e),t.prototype.render=function(){return a().createElement(N,{history:this.history,children:this.props.children})},t}(a().Component),M=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(a().Component);function _(e){var t=e.message,n=e.when,r=void 0===n||n;return a().createElement(x.Consumer,null,function(e){if(e||(0,c.A)(!1),!r||e.staticContext)return null;var n=e.history.block;return a().createElement(M,{onMount:function(e){e.release=n(t)},onUpdate:function(e,r){r.message!==t&&(e.release(),e.release=n(t))},onUnmount:function(e){e.release()},message:t})})}var I={},S=0;function j(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(I[e])return I[e];var t=f().compile(e);return S<1e4&&(I[e]=t,S++),t}(e)(t,{pretty:!0})}function k(e){var t=e.computedMatch,n=e.to,r=e.push,o=void 0!==r&&r;return a().createElement(x.Consumer,null,function(e){e||(0,c.A)(!1);var r=e.history,i=e.staticContext,s=o?r.push:r.replace,d=(0,l.createLocation)(t?"string"==typeof n?j(n,t.params):(0,u.A)({},n,{pathname:j(n.pathname,t.params)}):n);return i?(s(d),null):a().createElement(M,{onMount:function(){s(d)},onUpdate:function(e,t){var n=(0,l.createLocation)(t.to);(0,l.locationsAreEqual)(n,(0,u.A)({},d,{key:n.key}))||s(d)},to:n})})}var D={},C=0;function A(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,a=void 0!==o&&o,i=n.strict,s=void 0!==i&&i,l=n.sensitive,c=void 0!==l&&l;return[].concat(r).reduce(function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=D[n]||(D[n]={});if(r[e])return r[e];var o=[],a={regexp:f()(e,o,t),keys:o};return C<1e4&&(r[e]=a,C++),a}(n,{end:a,strict:s,sensitive:c}),o=r.regexp,i=r.keys,l=o.exec(e);if(!l)return null;var u=l[0],d=l.slice(1),p=e===u;return a&&!p?null:{path:n,url:"/"===n&&""===u?"/":u,isExact:p,params:i.reduce(function(e,t,n){return e[t.name]=d[n],e},{})}},null)}var T=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return a().createElement(x.Consumer,null,function(t){t||(0,c.A)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?A(n.pathname,e.props):t.match,o=(0,u.A)({},t,{location:n,match:r}),i=e.props,s=i.children,l=i.component,d=i.render;return Array.isArray(s)&&function(e){return 0===a().Children.count(e)}(s)&&(s=null),a().createElement(x.Provider,{value:o},o.match?s?"function"==typeof s?s(o):s:l?a().createElement(l,o):d?d(o):null:"function"==typeof s?s(o):null)})},t}(a().Component);function O(e){return"/"===e.charAt(0)?e:"/"+e}function L(e,t){if(!e)return t;var n=O(e);return 0!==t.pathname.indexOf(n)?t:(0,u.A)({},t,{pathname:t.pathname.substr(n.length)})}function z(e){return"string"==typeof e?e:(0,l.createPath)(e)}function P(e){return function(){(0,c.A)(!1)}}function R(){}var U=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).handlePush=function(e){return t.navigateTo(e,"PUSH")},t.handleReplace=function(e){return t.navigateTo(e,"REPLACE")},t.handleListen=function(){return R},t.handleBlock=function(){return R},t}(0,r.A)(t,e);var n=t.prototype;return n.navigateTo=function(e,t){var n=this.props,r=n.basename,o=void 0===r?"":r,a=n.context,i=void 0===a?{}:a;i.action=t,i.location=function(e,t){return e?(0,u.A)({},t,{pathname:O(e)+t.pathname}):t}(o,(0,l.createLocation)(e)),i.url=z(i.location)},n.render=function(){var e=this.props,t=e.basename,n=void 0===t?"":t,r=e.context,o=void 0===r?{}:r,i=e.location,s=void 0===i?"/":i,c=(0,p.A)(e,["basename","context","location"]),d={createHref:function(e){return O(n+z(e))},action:"POP",location:L(n,(0,l.createLocation)(s)),push:this.handlePush,replace:this.handleReplace,go:P(),goBack:P(),goForward:P(),listen:this.handleListen,block:this.handleBlock};return a().createElement(N,(0,u.A)({},c,{history:d,staticContext:o}))},t}(a().Component),B=function(e){function t(){return e.apply(this,arguments)||this}return(0,r.A)(t,e),t.prototype.render=function(){var e=this;return a().createElement(x.Consumer,null,function(t){t||(0,c.A)(!1);var n,r,o=e.props.location||t.location;return a().Children.forEach(e.props.children,function(e){if(null==r&&a().isValidElement(e)){n=e;var i=e.props.path||e.props.from;r=i?A(o.pathname,(0,u.A)({},e.props,{path:i})):t.match}}),r?a().cloneElement(n,{location:o,computedMatch:r}):null})},t}(a().Component);function F(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=(0,p.A)(t,["wrappedComponentRef"]);return a().createElement(x.Consumer,null,function(t){return t||(0,c.A)(!1),a().createElement(e,(0,u.A)({},r,t,{ref:n}))})};return n.displayName=t,n.WrappedComponent=e,h()(n,e)}var Y=a().useContext;function Z(){return Y(v)}function Q(){return Y(x).location}function V(){var e=Y(x).match;return e?e.params:{}}function W(e){var t=Q(),n=Y(x).match;return e?A(t.pathname,e):n}},9375(e){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},8505(e,t,n){var r=n(9375);e.exports=function e(t,n,o){return r(n)||(o=n||o,n=[]),o=o||{},t instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(e,t)}(t,n):r(t)?function(t,n,r){for(var o=[],a=0;a<t.length;a++)o.push(e(t[a],n,r).source);return f(new RegExp("(?:"+o.join("|")+")",p(r)),n)}(t,n,o):function(e,t,n){return m(a(e,n),t,n)}(t,n,o)},e.exports.parse=a,e.exports.compile=function(e,t){return c(a(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=m;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,s=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var u=n[0],f=n[1],p=n.index;if(l+=e.slice(s,p),s=p+u.length,f)l+=f[1];else{var m=e[s],h=n[2],g=n[3],y=n[4],w=n[5],b=n[6],v=n[7];l&&(r.push(l),l="");var x=null!=h&&null!=m&&m!==h,N="+"===b||"*"===b,E="?"===b||"*"===b,M=h||c,_=y||w,I=h||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||a++,prefix:h||"",delimiter:M,optional:E,repeat:N,partial:x,asterisk:!!v,pattern:_?d(_):v?".*":i(M,I)})}}return s<e.length&&(l+=e.substr(s)),l&&r.push(l),r}function i(e,t){return!t||t.indexOf(e)>-1?"[^"+u(e)+"]+?":u(t)+"|(?:(?!"+u(t)+")[^"+u(e)+"])+?"}function s(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function l(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function c(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",p(t)));return function(t,o){for(var a="",i=t||{},c=(o||{}).pretty?s:encodeURIComponent,u=0;u<e.length;u++){var d=e[u];if("string"!=typeof d){var f,p=i[d.name];if(null==p){if(d.optional){d.partial&&(a+=d.prefix);continue}throw new TypeError('Expected "'+d.name+'" to be defined')}if(r(p)){if(!d.repeat)throw new TypeError('Expected "'+d.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(d.optional)continue;throw new TypeError('Expected "'+d.name+'" to not be empty')}for(var m=0;m<p.length;m++){if(f=c(p[m]),!n[u].test(f))throw new TypeError('Expected all "'+d.name+'" to match "'+d.pattern+'", but received `'+JSON.stringify(f)+"`");a+=(0===m?d.prefix:d.delimiter)+f}}else{if(f=d.asterisk?l(p):c(p),!n[u].test(f))throw new TypeError('Expected "'+d.name+'" to match "'+d.pattern+'", but received "'+f+'"');a+=d.prefix+f}}else a+=d}return a}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function d(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function f(e,t){return e.keys=t,e}function p(e){return e&&e.sensitive?"":"i"}function m(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,a=!1!==n.end,i="",s=0;s<e.length;s++){var l=e[s];if("string"==typeof l)i+=u(l);else{var c=u(l.prefix),d="(?:"+l.pattern+")";t.push(l),l.repeat&&(d+="(?:"+c+d+")*"),i+=d=l.optional?l.partial?c+"("+d+")?":"(?:"+c+"("+d+"))?":c+"("+d+")"}}var m=u(n.delimiter||"/"),h=i.slice(-m.length)===m;return o||(i=(h?i.slice(0,-m.length):i)+"(?:"+m+"(?=$))?"),i+=a?"$":o&&h?"":"(?="+m+"|$)",f(new RegExp("^"+i,p(n)),t)}},4912(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for;n&&Symbol.for("react.element"),n&&Symbol.for("react.portal"),n&&Symbol.for("react.fragment"),n&&Symbol.for("react.strict_mode"),n&&Symbol.for("react.profiler"),n&&Symbol.for("react.provider"),n&&Symbol.for("react.context"),n&&Symbol.for("react.async_mode"),n&&Symbol.for("react.concurrent_mode"),n&&Symbol.for("react.forward_ref"),n&&Symbol.for("react.suspense"),n&&Symbol.for("react.suspense_list"),n&&Symbol.for("react.memo"),n&&Symbol.for("react.lazy"),n&&Symbol.for("react.block"),n&&Symbol.for("react.fundamental"),n&&Symbol.for("react.responder"),n&&Symbol.for("react.scope")},7564(e,t,n){"use strict";n(4912)},5901(e,t,n){var r=n(246),o=n(1720),a=n(1609),i=n(2236);function s(e){return e&&e.__esModule?e.default:e}function l(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function u(e){e.forEach(e=>c(e.element))}function d(e){e.forEach(e=>{!function(e,t,n){const r=e.children[n]||null;e.insertBefore(t,r)}(e.parentElement,e.element,e.oldIndex)})}function f(e,t){const n=h(e),r={parentElement:e.from};let o=[];switch(n){case"normal":o=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":o=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...r},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...r}];break;case"multidrag":o=e.oldIndicies.map((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...r}))}const a=function(e,t){return e.map(e=>({...e,item:t[e.oldIndex]})).sort((e,t)=>e.oldIndex-t.oldIndex)}(o,t);return a}function p(e,t){const n=[...t];return e.concat().reverse().forEach(e=>n.splice(e.oldIndex,1)),n}function m(e,t,n,r){const o=[...t];return e.forEach(e=>{const t=r&&n&&r(e.item,n);o.splice(e.newIndex,0,t||e.item)}),o}function h(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}l(e.exports,"Sortable",()=>$882b6d93070905b3$re_export$Sortable),l(e.exports,"Direction",()=>$882b6d93070905b3$re_export$Direction),l(e.exports,"DOMRect",()=>$882b6d93070905b3$re_export$DOMRect),l(e.exports,"GroupOptions",()=>$882b6d93070905b3$re_export$GroupOptions),l(e.exports,"MoveEvent",()=>$882b6d93070905b3$re_export$MoveEvent),l(e.exports,"Options",()=>$882b6d93070905b3$re_export$Options),l(e.exports,"PullResult",()=>$882b6d93070905b3$re_export$PullResult),l(e.exports,"PutResult",()=>$882b6d93070905b3$re_export$PutResult),l(e.exports,"SortableEvent",()=>$882b6d93070905b3$re_export$SortableEvent),l(e.exports,"SortableOptions",()=>$882b6d93070905b3$re_export$SortableOptions),l(e.exports,"Utils",()=>$882b6d93070905b3$re_export$Utils),l(e.exports,"ReactSortable",()=>y);const g={dragging:null};class y extends a.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,a.createRef)();const t=[...e.list].map(e=>Object.assign(e,{chosen:!1,selected:!1}));e.setList(t,this.sortable,g),s(i)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();s(r).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:r}=this.props,o={style:t,className:n,id:r},i=e&&null!==e?e:"div";return(0,a.createElement)(i,{ref:this.ref,...o},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:r="sortable-chosen",dragClass:i="sortable-drag",fallbackClass:l="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:f}=this.props;if(!e||null==e)return null;const p=t||"data-id";return a.Children.map(e,(e,t)=>{if(void 0===e)return;const i=f[t]||{},{className:l}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!i.filtered},u=s(o)(l,{[n]:i.selected,[r]:i.chosen,...c});return(0,a.cloneElement)(e,{[p]:e.key,className:u})})}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find(e=>e.includes("Sortable"));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:r,tag:o,style:a,className:i,clone:s,onAdd:l,onChange:c,onChoose:u,onClone:d,onEnd:f,onFilter:p,onRemove:m,onSort:h,onStart:g,onUnchoose:y,onUpdate:w,onMove:b,onSpill:v,onSelect:x,onDeselect:N,...E}=e;return E}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach(t=>e[t]=this.prepareOnHandlerPropAndDOM(t)),["onChange","onClone","onFilter","onSort"].forEach(t=>e[t]=this.prepareOnHandlerProp(t)),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,r=e.willInsertAfter||-1;if(!n)return r;const o=n(e,t,this.sortable,g);return void 0!==o&&o}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,g)}onAdd(e){const{list:t,setList:n,clone:r}=this.props,o=f(e,[...g.dragging.props.list]);u(o),n(m(o,t,e,r).map(e=>Object.assign(e,{selected:!1})),this.sortable,g)}onRemove(e){const{list:t,setList:n}=this.props,r=h(e),o=f(e,t);d(o);let a=[...t];if("clone"!==e.pullMode)a=p(o,a);else{let t=o;switch(r){case"multidrag":t=o.map((t,n)=>({...t,element:e.clones[n]}));break;case"normal":t=o.map(t=>({...t,element:e.clone}));break;default:s(i)(!0,`mode "${r}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${r}" plugin`)}u(t),o.forEach(t=>{const n=t.oldIndex,r=this.props.clone(t.item,e);a.splice(n,1,r)})}a=a.map(e=>Object.assign(e,{selected:!1})),n(a,this.sortable,g)}onUpdate(e){const{list:t,setList:n}=this.props,r=f(e,t);return u(r),d(r),n(function(e,t){return m(e,p(e,t))}(r,t),this.sortable,g)}onStart(){g.dragging=this}onEnd(){g.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(t,{chosen:!0})),r}),this.sortable,g)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map((t,n)=>{let r=t;return n===e.oldIndex&&(r=Object.assign(r,{chosen:!1})),r}),this.sortable,g)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&c(e.item)}onSelect(e){const{list:t,setList:n}=this.props,r=t.map(e=>Object.assign(e,{selected:!1}));e.newIndicies.forEach(t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);r[n].selected=!0}),n(r,this.sortable,g)}onDeselect(e){const{list:t,setList:n}=this.props,r=t.map(e=>Object.assign(e,{selected:!1}));e.newIndicies.forEach(e=>{const t=e.index;-1!==t&&(r[t].selected=!0)}),n(r,this.sortable,g)}}var w,b;w=e.exports,b={},Object.keys(b).forEach(function(e){"default"===e||"__esModule"===e||w.hasOwnProperty(e)||Object.defineProperty(w,e,{enumerable:!0,get:function(){return b[e]}})})},1720(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var a=typeof n;if("string"===a||"number"===a)e.push(n);else if(Array.isArray(n)){if(n.length){var i=o.apply(null,n);i&&e.push(i)}}else if("object"===a)if(n.toString===Object.prototype.toString)for(var s in n)r.call(n,s)&&n[s]&&e.push(s);else e.push(n.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},2236(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r});function r(e,t){if(!e)throw new Error("Invariant failed")}},1020(e,t,n){"use strict";var r=n(1609),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!l.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:s.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},4848(e,t,n){"use strict";e.exports=n(1020)},8867(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isFragment=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case i:case a:case d:case f:return e;default:switch(e=e&&e.$$typeof){case c:case l:case u:case m:case p:case s:return e;default:return t}}case r:return t}}}(e)===o}},4580(e,t,n){"use strict";e.exports=n(8867)},4307(e,t,n){"use strict";function r(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}n.d(t,{A:()=>a});const a=function(e,t){void 0===t&&(t="");var n,a=e&&e.split("/")||[],i=t&&t.split("/")||[],s=e&&r(e),l=t&&r(t),c=s||l;if(e&&r(e)?i=a:a.length&&(i.pop(),i=i.concat(a)),!i.length)return"/";if(i.length){var u=i[i.length-1];n="."===u||".."===u||""===u}else n=!1;for(var d=0,f=i.length;f>=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&r(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m}},246(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s.apply(this,arguments)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:()=>bt,Sortable:()=>Be,Swap:()=>lt,default:()=>Nt});var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),f=c(/firefox/i),p=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),m=c(/iP(ad|od|hone)/i),h=c(/chrome/i)&&c(/android/i),g={capture:!1,passive:!1};function y(e,t,n){e.addEventListener(t,n,!u&&g)}function w(e,t,n){e.removeEventListener(t,n,!u&&g)}function b(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function v(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function x(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&b(e,t):b(e,t))||r&&e===n)return e;if(e===n)break}while(e=v(e))}return null}var N,E=/\s+/g;function M(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(E," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(E," ")}}function _(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function I(e,t){var n="";if("string"==typeof e)n=e;else do{var r=_(e,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function S(e,t,n){if(e){var r=e.getElementsByTagName(t),o=0,a=r.length;if(n)for(;o<a;o++)n(r[o],o);return r}return[]}function j(){return document.scrollingElement||document.documentElement}function k(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var a,i,s,l,c,d,f;if(e!==window&&e.parentNode&&e!==j()?(i=(a=e.getBoundingClientRect()).top,s=a.left,l=a.bottom,c=a.right,d=a.height,f=a.width):(i=0,s=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!u))do{if(o&&o.getBoundingClientRect&&("none"!==_(o,"transform")||n&&"static"!==_(o,"position"))){var p=o.getBoundingClientRect();i-=p.top+parseInt(_(o,"border-top-width")),s-=p.left+parseInt(_(o,"border-left-width")),l=i+a.height,c=s+a.width;break}}while(o=o.parentNode);if(r&&e!==window){var m=I(o||e),h=m&&m.a,g=m&&m.d;m&&(l=(i/=g)+(d/=g),c=(s/=h)+(f/=h))}return{top:i,left:s,bottom:l,right:c,width:f,height:d}}}function D(e,t,n){for(var r=L(e,!0),o=k(e)[t];r;){var a=k(r)[n];if(!("top"===n||"left"===n?o>=a:o<=a))return r;if(r===j())break;r=L(r,!1)}return!1}function C(e,t,n,r){for(var o=0,a=0,i=e.children;a<i.length;){if("none"!==i[a].style.display&&i[a]!==Be.ghost&&(r||i[a]!==Be.dragged)&&x(i[a],n.draggable,e,!1)){if(o===t)return i[a];o++}a++}return null}function A(e,t){for(var n=e.lastElementChild;n&&(n===Be.ghost||"none"===_(n,"display")||t&&!b(n,t));)n=n.previousElementSibling;return n||null}function T(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Be.clone||t&&!b(e,t)||n++;return n}function O(e){var t=0,n=0,r=j();if(e)do{var o=I(e),a=o.a,i=o.d;t+=e.scrollLeft*a,n+=e.scrollTop*i}while(e!==r&&(e=e.parentNode));return[t,n]}function L(e,t){if(!e||!e.getBoundingClientRect)return j();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=_(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return j();if(r||t)return n;r=!0}}}while(n=n.parentNode);return j()}function z(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function P(e,t){return function(){if(!N){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),N=setTimeout(function(){N=void 0},t)}}}function R(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function U(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function B(e,t){_(e,"position","absolute"),_(e,"top",t.top),_(e,"left",t.left),_(e,"width",t.width),_(e,"height",t.height)}function F(e){_(e,"position",""),_(e,"top",""),_(e,"left",""),_(e,"width",""),_(e,"height","")}var Y="Sortable"+(new Date).getTime();var Z=[],Q={initializeByDefault:!0},V={mount:function(e){for(var t in Q)Q.hasOwnProperty(t)&&!(t in e)&&(e[t]=Q[t]);Z.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),Z.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var a=e+"Global";Z.forEach(function(r){t[r.pluginName]&&(t[r.pluginName][a]&&t[r.pluginName][a](o({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](o({sortable:t},n)))})},initializePlugins:function(e,t,n,r){for(var o in Z.forEach(function(r){var o=r.pluginName;if(e.options[o]||r.initializeByDefault){var a=new r(e,t,e.options);a.sortable=e,a.options=e.options,e[o]=a,s(n,a.defaults)}}),e.options)if(e.options.hasOwnProperty(o)){var a=this.modifyOption(e,o,e.options[o]);void 0!==a&&(e.options[o]=a)}},getEventProperties:function(e,t){var n={};return Z.forEach(function(r){"function"==typeof r.eventProperties&&s(n,r.eventProperties.call(t[r.pluginName],e))}),n},modifyOption:function(e,t,n){var r;return Z.forEach(function(o){e[o.pluginName]&&o.optionListeners&&"function"==typeof o.optionListeners[t]&&(r=o.optionListeners[t].call(e[o.pluginName],n))}),r}};function W(e){var t=e.sortable,n=e.rootEl,r=e.name,a=e.targetEl,i=e.cloneEl,s=e.toEl,l=e.fromEl,c=e.oldIndex,f=e.newIndex,p=e.oldDraggableIndex,m=e.newDraggableIndex,h=e.originalEvent,g=e.putSortable,y=e.extraEventProperties;if(t=t||n&&n[Y]){var w,b=t.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||u||d?(w=document.createEvent("Event")).initEvent(r,!0,!0):w=new CustomEvent(r,{bubbles:!0,cancelable:!0}),w.to=s||n,w.from=l||n,w.item=a||n,w.clone=i,w.oldIndex=c,w.newIndex=f,w.oldDraggableIndex=p,w.newDraggableIndex=m,w.originalEvent=h,w.pullMode=g?g.lastPutMode:void 0;var x=o(o({},y),V.getEventProperties(r,t));for(var N in x)w[N]=x[N];n&&n.dispatchEvent(w),b[v]&&b[v].call(t,w)}}var G=["evt"],H=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,a=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(n,G);V.pluginEvent.bind(Be)(e,t,o({dragEl:X,parentEl:q,ghostEl:J,rootEl:K,nextEl:ee,lastDownEl:te,cloneEl:ne,cloneHidden:re,dragStarted:ge,putSortable:ce,activeSortable:Be.active,originalEvent:r,oldIndex:oe,oldDraggableIndex:ie,newIndex:ae,newDraggableIndex:se,hideGhostForTarget:ze,unhideGhostForTarget:Pe,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(e){$({sortable:t,name:e,originalEvent:r})}},a))};function $(e){W(o({putSortable:ce,cloneEl:ne,targetEl:X,rootEl:K,oldIndex:oe,oldDraggableIndex:ie,newIndex:ae,newDraggableIndex:se},e))}var X,q,J,K,ee,te,ne,re,oe,ae,ie,se,le,ce,ue,de,fe,pe,me,he,ge,ye,we,be,ve,xe=!1,Ne=!1,Ee=[],Me=!1,_e=!1,Ie=[],Se=!1,je=[],ke="undefined"!=typeof document,De=m,Ce=d||u?"cssFloat":"float",Ae=ke&&!h&&!m&&"draggable"in document.createElement("div"),Te=function(){if(ke){if(u)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Oe=function(e,t){var n=_(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=C(e,0,t),a=C(e,1,t),i=o&&_(o),s=a&&_(a),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+k(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+k(a).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&i.float&&"none"!==i.float){var u="left"===i.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=r&&"none"===n[Ce]||a&&"none"===n[Ce]&&l+c>r)?"vertical":"horizontal"},Le=function(e){function t(e,n){return function(r,o,a,i){var s=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==e&&(n||s))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(r,o,a,i),n)(r,o,a,i);var l=(n?r:o).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var n={},r=e.group;r&&"object"==a(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},ze=function(){!Te&&J&&_(J,"display","none")},Pe=function(){!Te&&J&&_(J,"display","")};ke&&document.addEventListener("click",function(e){if(Ne)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ne=!1,!1},!0);var Re=function(e){if(X){e=e.touches?e.touches[0]:e;var t=(o=e.clientX,a=e.clientY,Ee.some(function(e){var t=e[Y].options.emptyInsertThreshold;if(t&&!A(e)){var n=k(e),r=o>=n.left-t&&o<=n.right+t,s=a>=n.top-t&&a<=n.bottom+t;return r&&s?i=e:void 0}}),i);if(t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Y]._onDragOver(n)}}var o,a,i},Ue=function(e){X&&X.parentNode[Y]._isOutsideThisEl(e.target)};function Be(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=s({},t),e[Y]=this;var n,r,a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Oe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Be.supportPointer&&"PointerEvent"in window&&!p,emptyInsertThreshold:5};for(var i in V.initializePlugins(this,e,a),a)!(i in t)&&(t[i]=a[i]);for(var l in Le(t),this)"_"===l.charAt(0)&&"function"==typeof this[l]&&(this[l]=this[l].bind(this));this.nativeDraggable=!t.forceFallback&&Ae,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?y(e,"pointerdown",this._onTapStart):(y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),Ee.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),s(this,(r=[],{captureAnimationState:function(){r=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(e){if("none"!==_(e,"display")&&e!==Be.ghost){r.push({target:e,rect:k(e)});var t=o({},r[r.length-1].rect);if(e.thisAnimationDuration){var n=I(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}})},addAnimationState:function(e){r.push(e)},removeAnimationState:function(e){r.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(r,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var o=!1,a=0;r.forEach(function(e){var n=0,r=e.target,i=r.fromRect,s=k(r),l=r.prevFromRect,c=r.prevToRect,u=e.rect,d=I(r,!0);d&&(s.top-=d.f,s.left-=d.e),r.toRect=s,r.thisAnimationDuration&&z(l,s)&&!z(i,s)&&(u.top-s.top)/(u.left-s.left)===(i.top-s.top)/(i.left-s.left)&&(n=function(e,t,n,r){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*r.animation}(u,l,c,t.options)),z(s,i)||(r.prevFromRect=i,r.prevToRect=s,n||(n=t.options.animation),t.animate(r,u,s,n)),n&&(o=!0,a=Math.max(a,n),clearTimeout(r.animationResetTimer),r.animationResetTimer=setTimeout(function(){r.animationTime=0,r.prevFromRect=null,r.fromRect=null,r.prevToRect=null,r.thisAnimationDuration=null},n),r.thisAnimationDuration=n)}),clearTimeout(n),o?n=setTimeout(function(){"function"==typeof e&&e()},a):"function"==typeof e&&e(),r=[]},animate:function(e,t,n,r){if(r){_(e,"transition",""),_(e,"transform","");var o=I(this.el),a=o&&o.a,i=o&&o.d,s=(t.left-n.left)/(a||1),l=(t.top-n.top)/(i||1);e.animatingX=!!s,e.animatingY=!!l,_(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),_(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),_(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){_(e,"transition",""),_(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1},r)}}}))}function Fe(e,t,n,r,o,a,i,s){var l,c,f=e[Y],p=f.options.onMove;return!window.CustomEvent||u||d?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=n,l.draggedRect=r,l.related=o||t,l.relatedRect=a||k(t),l.willInsertAfter=s,l.originalEvent=i,e.dispatchEvent(l),p&&(c=p.call(f,l,i)),c}function Ye(e){e.draggable=!1}function Ze(){Se=!1}function Qe(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function Ve(e){return setTimeout(e,0)}function We(e){return clearTimeout(e)}Be.prototype={constructor:Be,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ye=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,X):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,r=this.options,o=r.preventOnFilter,a=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(i||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(function(e){je.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&je.push(r)}}(n),!X&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||r.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!p||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=x(s,r.draggable,n,!1))&&s.animated||te===s)){if(oe=T(s),ie=T(s,r.draggable),"function"==typeof c){if(c.call(this,e,s,this))return $({sortable:t,rootEl:l,name:"filter",targetEl:s,toEl:n,fromEl:n}),H("filter",t,{evt:e}),void(o&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(r){if(r=x(l,r.trim(),n,!1))return $({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),H("filter",t,{evt:e}),!0})))return void(o&&e.cancelable&&e.preventDefault());r.handle&&!x(l,r.handle,n,!1)||this._prepareDragStart(e,i,s)}}},_prepareDragStart:function(e,t,n){var r,o=this,a=o.el,i=o.options,s=a.ownerDocument;if(n&&!X&&n.parentNode===a){var l=k(n);if(K=a,q=(X=n).parentNode,ee=X.nextSibling,te=n,le=i.group,Be.dragged=X,ue={target:X,clientX:(t||e).clientX,clientY:(t||e).clientY},me=ue.clientX-l.left,he=ue.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,X.style["will-change"]="all",r=function(){H("delayEnded",o,{evt:e}),Be.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!f&&o.nativeDraggable&&(X.draggable=!0),o._triggerDragStart(e,t),$({sortable:o,name:"choose",originalEvent:e}),M(X,i.chosenClass,!0))},i.ignore.split(",").forEach(function(e){S(X,e.trim(),Ye)}),y(s,"dragover",Re),y(s,"mousemove",Re),y(s,"touchmove",Re),y(s,"mouseup",o._onDrop),y(s,"touchend",o._onDrop),y(s,"touchcancel",o._onDrop),f&&this.nativeDraggable&&(this.options.touchStartThreshold=4,X.draggable=!0),H("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(d||u))r();else{if(Be.eventCanceled)return void this._onDrop();y(s,"mouseup",o._disableDelayedDrag),y(s,"touchend",o._disableDelayedDrag),y(s,"touchcancel",o._disableDelayedDrag),y(s,"mousemove",o._delayedDragTouchMoveHandler),y(s,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&y(s,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,i.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){X&&Ye(X),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._disableDelayedDrag),w(e,"touchend",this._disableDelayedDrag),w(e,"touchcancel",this._disableDelayedDrag),w(e,"mousemove",this._delayedDragTouchMoveHandler),w(e,"touchmove",this._delayedDragTouchMoveHandler),w(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?y(document,"pointermove",this._onTouchMove):y(document,t?"touchmove":"mousemove",this._onTouchMove):(y(X,"dragend",this),y(K,"dragstart",this._onDragStart));try{document.selection?Ve(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(xe=!1,K&&X){H("dragStarted",this,{evt:t}),this.nativeDraggable&&y(document,"dragover",Ue);var n=this.options;!e&&M(X,n.dragClass,!1),M(X,n.ghostClass,!0),Be.active=this,e&&this._appendGhost(),$({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(de){this._lastX=de.clientX,this._lastY=de.clientY,ze();for(var e=document.elementFromPoint(de.clientX,de.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(de.clientX,de.clientY))!==t;)t=e;if(X.parentNode[Y]._isOutsideThisEl(e),t)do{if(t[Y]&&t[Y]._onDragOver({clientX:de.clientX,clientY:de.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Pe()}},_onTouchMove:function(e){if(ue){var t=this.options,n=t.fallbackTolerance,r=t.fallbackOffset,o=e.touches?e.touches[0]:e,a=J&&I(J,!0),i=J&&a&&a.a,s=J&&a&&a.d,l=De&&ve&&O(ve),c=(o.clientX-ue.clientX+r.x)/(i||1)+(l?l[0]-Ie[0]:0)/(i||1),u=(o.clientY-ue.clientY+r.y)/(s||1)+(l?l[1]-Ie[1]:0)/(s||1);if(!Be.active&&!xe){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(J){a?(a.e+=c-(fe||0),a.f+=u-(pe||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");_(J,"webkitTransform",d),_(J,"mozTransform",d),_(J,"msTransform",d),_(J,"transform",d),fe=c,pe=u,de=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!J){var e=this.options.fallbackOnBody?document.body:K,t=k(X,!0,De,!0,e),n=this.options;if(De){for(ve=e;"static"===_(ve,"position")&&"none"===_(ve,"transform")&&ve!==document;)ve=ve.parentNode;ve!==document.body&&ve!==document.documentElement?(ve===document&&(ve=j()),t.top+=ve.scrollTop,t.left+=ve.scrollLeft):ve=j(),Ie=O(ve)}M(J=X.cloneNode(!0),n.ghostClass,!1),M(J,n.fallbackClass,!0),M(J,n.dragClass,!0),_(J,"transition",""),_(J,"transform",""),_(J,"box-sizing","border-box"),_(J,"margin",0),_(J,"top",t.top),_(J,"left",t.left),_(J,"width",t.width),_(J,"height",t.height),_(J,"opacity","0.8"),_(J,"position",De?"absolute":"fixed"),_(J,"zIndex","100000"),_(J,"pointerEvents","none"),Be.ghost=J,e.appendChild(J),_(J,"transform-origin",me/parseInt(J.style.width)*100+"% "+he/parseInt(J.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,o=n.options;H("dragStart",this,{evt:e}),Be.eventCanceled?this._onDrop():(H("setupClone",this),Be.eventCanceled||((ne=U(X)).draggable=!1,ne.style["will-change"]="",this._hideClone(),M(ne,this.options.chosenClass,!1),Be.clone=ne),n.cloneId=Ve(function(){H("clone",n),Be.eventCanceled||(n.options.removeCloneOnHide||K.insertBefore(ne,X),n._hideClone(),$({sortable:n,name:"clone"}))}),!t&&M(X,o.dragClass,!0),t?(Ne=!0,n._loopId=setInterval(n._emulateDragOver,50)):(w(document,"mouseup",n._onDrop),w(document,"touchend",n._onDrop),w(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,X)),y(document,"drop",n),_(X,"transform","translateZ(0)")),xe=!0,n._dragStartId=Ve(n._dragStarted.bind(n,t,e)),y(document,"selectstart",n),ge=!0,p&&_(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,a,i=this.el,s=e.target,l=this.options,c=l.group,u=Be.active,d=le===c,f=l.sort,p=ce||u,m=this,h=!1;if(!Se){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),s=x(s,l.draggable,i,!0),U("dragOver"),Be.eventCanceled)return h;if(X.contains(e.target)||s.animated&&s.animatingX&&s.animatingY||m._ignoreWhileAnimating===s)return F(!1);if(Ne=!1,u&&!l.disabled&&(d?f||(r=q!==K):ce===this||(this.lastPutMode=le.checkPull(this,u,X,e))&&c.checkPut(this,u,X,e))){if(a="vertical"===this._getDirection(e,s),t=k(X),U("dragOverValid"),Be.eventCanceled)return h;if(r)return q=K,B(),this._hideClone(),U("revert"),Be.eventCanceled||(ee?K.insertBefore(X,ee):K.appendChild(X)),F(!0);var g=A(i,l.draggable);if(!g||function(e,t,n){var r=k(A(n.el,n.options.draggable));return t?e.clientX>r.right+10||e.clientX<=r.right&&e.clientY>r.bottom&&e.clientX>=r.left:e.clientX>r.right&&e.clientY>r.top||e.clientX<=r.right&&e.clientY>r.bottom+10}(e,a,this)&&!g.animated){if(g===X)return F(!1);if(g&&i===e.target&&(s=g),s&&(n=k(s)),!1!==Fe(K,i,X,t,s,n,e,!!s))return B(),i.appendChild(X),q=i,Z(),F(!0)}else if(g&&function(e,t,n){var r=k(C(n.el,0,n.options,!0));return t?e.clientX<r.left-10||e.clientY<r.top&&e.clientX<r.right:e.clientY<r.top-10||e.clientY<r.bottom&&e.clientX<r.left}(e,a,this)){var y=C(i,0,l,!0);if(y===X)return F(!1);if(n=k(s=y),!1!==Fe(K,i,X,t,s,n,e,!1))return B(),i.insertBefore(X,y),q=i,Z(),F(!0)}else if(s.parentNode===i){n=k(s);var w,b,v,N=X.parentNode!==i,E=!function(e,t,n){var r=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,i=n?t.left:t.top,s=n?t.right:t.bottom,l=n?t.width:t.height;return r===i||o===s||r+a/2===i+l/2}(X.animated&&X.toRect||t,s.animated&&s.toRect||n,a),I=a?"top":"left",S=D(s,"top","top")||D(X,"top","top"),j=S?S.scrollTop:void 0;if(ye!==s&&(b=n[I],Me=!1,_e=!E&&l.invertSwap||N),w=function(e,t,n,r,o,a,i,s){var l=r?e.clientY:e.clientX,c=r?n.height:n.width,u=r?n.top:n.left,d=r?n.bottom:n.right,f=!1;if(!i)if(s&&be<c*o){if(!Me&&(1===we?l>u+c*a/2:l<d-c*a/2)&&(Me=!0),Me)f=!0;else if(1===we?l<u+be:l>d-be)return-we}else if(l>u+c*(1-o)/2&&l<d-c*(1-o)/2)return function(e){return T(X)<T(e)?1:-1}(t);return(f=f||i)&&(l<u+c*a/2||l>d-c*a/2)?l>u+c/2?1:-1:0}(e,s,n,a,E?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,_e,ye===s),0!==w){var O=T(X);do{O-=w,v=q.children[O]}while(v&&("none"===_(v,"display")||v===J))}if(0===w||v===s)return F(!1);ye=s,we=w;var L=s.nextElementSibling,z=!1,P=Fe(K,i,X,t,s,n,e,z=1===w);if(!1!==P)return 1!==P&&-1!==P||(z=1===P),Se=!0,setTimeout(Ze,30),B(),z&&!L?i.appendChild(X):s.parentNode.insertBefore(X,z?L:s),S&&R(S,0,j-S.scrollTop),q=X.parentNode,void 0===b||_e||(be=Math.abs(b-k(s)[I])),Z(),F(!0)}if(i.contains(X))return F(!1)}return!1}function U(l,c){H(l,m,o({evt:e,isOwner:d,axis:a?"vertical":"horizontal",revert:r,dragRect:t,targetRect:n,canSort:f,fromSortable:p,target:s,completed:F,onMove:function(n,r){return Fe(K,i,X,t,n,k(n),e,r)},changed:Z},c))}function B(){U("dragOverAnimationCapture"),m.captureAnimationState(),m!==p&&p.captureAnimationState()}function F(t){return U("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(m),m!==p&&(M(X,ce?ce.options.ghostClass:u.options.ghostClass,!1),M(X,l.ghostClass,!0)),ce!==m&&m!==Be.active?ce=m:m===Be.active&&ce&&(ce=null),p===m&&(m._ignoreWhileAnimating=s),m.animateAll(function(){U("dragOverAnimationComplete"),m._ignoreWhileAnimating=null}),m!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(s===X&&!X.animated||s===i&&!s.animated)&&(ye=null),l.dragoverBubble||e.rootEl||s===document||(X.parentNode[Y]._isOutsideThisEl(e.target),!t&&Re(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function Z(){ae=T(X),se=T(X,l.draggable),$({sortable:m,name:"change",toEl:i,newIndex:ae,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){w(document,"mousemove",this._onTouchMove),w(document,"touchmove",this._onTouchMove),w(document,"pointermove",this._onTouchMove),w(document,"dragover",Re),w(document,"mousemove",Re),w(document,"touchmove",Re)},_offUpEvents:function(){var e=this.el.ownerDocument;w(e,"mouseup",this._onDrop),w(e,"touchend",this._onDrop),w(e,"pointerup",this._onDrop),w(e,"touchcancel",this._onDrop),w(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ae=T(X),se=T(X,n.draggable),H("drop",this,{evt:e}),q=X&&X.parentNode,ae=T(X),se=T(X,n.draggable),Be.eventCanceled||(xe=!1,_e=!1,Me=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),We(this.cloneId),We(this._dragStartId),this.nativeDraggable&&(w(document,"drop",this),w(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&_(document.body,"user-select",""),_(X,"transform",""),e&&(ge&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),J&&J.parentNode&&J.parentNode.removeChild(J),(K===q||ce&&"clone"!==ce.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),X&&(this.nativeDraggable&&w(X,"dragend",this),Ye(X),X.style["will-change"]="",ge&&!xe&&M(X,ce?ce.options.ghostClass:this.options.ghostClass,!1),M(X,this.options.chosenClass,!1),$({sortable:this,name:"unchoose",toEl:q,newIndex:null,newDraggableIndex:null,originalEvent:e}),K!==q?(ae>=0&&($({rootEl:q,name:"add",toEl:q,fromEl:K,originalEvent:e}),$({sortable:this,name:"remove",toEl:q,originalEvent:e}),$({rootEl:q,name:"sort",toEl:q,fromEl:K,originalEvent:e}),$({sortable:this,name:"sort",toEl:q,originalEvent:e})),ce&&ce.save()):ae!==oe&&ae>=0&&($({sortable:this,name:"update",toEl:q,originalEvent:e}),$({sortable:this,name:"sort",toEl:q,originalEvent:e})),Be.active&&(null!=ae&&-1!==ae||(ae=oe,se=ie),$({sortable:this,name:"end",toEl:q,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){H("nulling",this),K=X=q=J=ee=ne=te=re=ue=de=ge=ae=se=oe=ie=ye=we=ce=le=Be.dragged=Be.ghost=Be.clone=Be.active=null,je.forEach(function(e){e.checked=!0}),je.length=fe=pe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":X&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,o=n.length,a=this.options;r<o;r++)x(e=n[r],a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||Qe(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach(function(e,t){var o=r.children[t];x(o,this.options.draggable,r,!1)&&(n[e]=o)},this),t&&this.captureAnimationState(),e.forEach(function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return x(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=V.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Le(n)},destroy:function(){H("destroy",this);var e=this.el;e[Y]=null,w(e,"mousedown",this._onTapStart),w(e,"touchstart",this._onTapStart),w(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(w(e,"dragover",this),w(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ee.splice(Ee.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!re){if(H("hideClone",this),Be.eventCanceled)return;_(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),re=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(re){if(H("showClone",this),Be.eventCanceled)return;X.parentNode!=K||this.options.group.revertClone?ee?K.insertBefore(ne,ee):K.appendChild(ne):K.insertBefore(ne,X),this.options.group.revertClone&&this.animate(X,ne),_(ne,"display",""),re=!1}}else this._hideClone()}},ke&&y(document,"touchmove",function(e){(Be.active||xe)&&e.cancelable&&e.preventDefault()}),Be.utils={on:y,off:w,css:_,find:S,is:function(e,t){return!!x(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:P,closest:x,toggleClass:M,clone:U,index:T,nextTick:Ve,cancelNextTick:We,detectDirection:Oe,getChild:C},Be.get=function(e){return e[Y]},Be.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Be.utils=o(o({},Be.utils),e.utils)),V.mount(e)})},Be.create=function(e,t){return new Be(e,t)},Be.version="1.14.0";var Ge,He,$e,Xe,qe,Je,Ke=[],et=!1;function tt(){Ke.forEach(function(e){clearInterval(e.pid)}),Ke=[]}function nt(){clearInterval(Je)}var rt,ot=P(function(e,t,n,r){if(t.scroll){var o,a=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,l=t.scrollSpeed,c=j(),u=!1;He!==n&&(He=n,tt(),Ge=t.scroll,o=t.scrollFn,!0===Ge&&(Ge=L(n,!0)));var d=0,f=Ge;do{var p=f,m=k(p),h=m.top,g=m.bottom,y=m.left,w=m.right,b=m.width,v=m.height,x=void 0,N=void 0,E=p.scrollWidth,M=p.scrollHeight,I=_(p),S=p.scrollLeft,D=p.scrollTop;p===c?(x=b<E&&("auto"===I.overflowX||"scroll"===I.overflowX||"visible"===I.overflowX),N=v<M&&("auto"===I.overflowY||"scroll"===I.overflowY||"visible"===I.overflowY)):(x=b<E&&("auto"===I.overflowX||"scroll"===I.overflowX),N=v<M&&("auto"===I.overflowY||"scroll"===I.overflowY));var C=x&&(Math.abs(w-a)<=s&&S+b<E)-(Math.abs(y-a)<=s&&!!S),A=N&&(Math.abs(g-i)<=s&&D+v<M)-(Math.abs(h-i)<=s&&!!D);if(!Ke[d])for(var T=0;T<=d;T++)Ke[T]||(Ke[T]={});Ke[d].vx==C&&Ke[d].vy==A&&Ke[d].el===p||(Ke[d].el=p,Ke[d].vx=C,Ke[d].vy=A,clearInterval(Ke[d].pid),0==C&&0==A||(u=!0,Ke[d].pid=setInterval(function(){r&&0===this.layer&&Be.active._onTouchMove(qe);var t=Ke[this.layer].vy?Ke[this.layer].vy*l:0,n=Ke[this.layer].vx?Ke[this.layer].vx*l:0;"function"==typeof o&&"continue"!==o.call(Be.dragged.parentNode[Y],n,t,e,qe,Ke[this.layer].el)||R(Ke[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&f!==c&&(f=L(f,!1)));et=u}},30),at=function(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,i=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var l=n||o;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function it(){}function st(){}function lt(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;rt=t},dragOverValid:function(e){var t=e.completed,n=e.target,r=e.onMove,o=e.activeSortable,a=e.changed,i=e.cancel;if(o.options.swap){var s=this.sortable.el,l=this.options;if(n&&n!==s){var c=rt;!1!==r(n)?(M(n,l.swapClass,!0),rt=n):rt=null,c&&c!==rt&&M(c,l.swapClass,!1)}a(),t(!0),i()}},drop:function(e){var t,n,r,o,a,i,s=e.activeSortable,l=e.putSortable,c=e.dragEl,u=l||this.sortable,d=this.options;rt&&M(rt,d.swapClass,!1),rt&&(d.swap||l&&l.options.swap)&&c!==rt&&(u.captureAnimationState(),u!==s&&s.captureAnimationState(),n=rt,a=(t=c).parentNode,i=n.parentNode,a&&i&&!a.isEqualNode(n)&&!i.isEqualNode(t)&&(r=T(t),o=T(n),a.isEqualNode(i)&&r<o&&o++,a.insertBefore(n,a.children[r]),i.insertBefore(t,i.children[o])),u.animateAll(),u!==s&&s.animateAll())},nulling:function(){rt=null}},s(e,{pluginName:"swap",eventProperties:function(){return{swapItem:rt}}})}it.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=C(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(t,r):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:at},s(it,{pluginName:"revertOnSpill"}),st.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:at},s(st,{pluginName:"removeOnSpill"});var ct,ut,dt,ft,pt,mt=[],ht=[],gt=!1,yt=!1,wt=!1;function bt(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?y(document,"pointerup",this._deselectMultiDrag):(y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag)),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var r="";mt.length&&ut===e?mt.forEach(function(e,t){r+=(t?", ":"")+e.textContent}):r=n.textContent,t.setData("Text",r)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;dt=t},delayEnded:function(){this.isMultiDrag=~mt.indexOf(dt)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var r=0;r<mt.length;r++)ht.push(U(mt[r])),ht[r].sortableIndex=mt[r].sortableIndex,ht[r].draggable=!1,ht[r].style["will-change"]="",M(ht[r],this.options.selectedClass,!1),mt[r]===dt&&M(ht[r],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,r=e.dispatchSortableEvent,o=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||mt.length&&ut===t&&(vt(!0,n),r("clone"),o()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,r=e.cancel;this.isMultiDrag&&(vt(!1,n),ht.forEach(function(e){_(e,"display","")}),t(),pt=!1,r())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),r=e.cancel;this.isMultiDrag&&(ht.forEach(function(e){_(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),n(),pt=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&ut&&ut.multiDrag._deselectMultiDrag(),mt.forEach(function(e){e.sortableIndex=T(e)}),mt=mt.sort(function(e,t){return e.sortableIndex-t.sortableIndex}),wt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){mt.forEach(function(e){e!==dt&&_(e,"position","absolute")});var r=k(dt,!1,!0,!0);mt.forEach(function(e){e!==dt&&B(e,r)}),yt=!0,gt=!0}n.animateAll(function(){yt=!1,gt=!1,t.options.animation&&mt.forEach(function(e){F(e)}),t.options.sort&&xt()})}},dragOver:function(e){var t=e.target,n=e.completed,r=e.cancel;yt&&~mt.indexOf(t)&&(n(!1),r())},revert:function(e){var t=e.fromSortable,n=e.rootEl,r=e.sortable,o=e.dragRect;mt.length>1&&(mt.forEach(function(e){r.addAnimationState({target:e,rect:yt?k(e):o}),F(e),e.fromRect=o,t.removeAnimationState(e)}),yt=!1,function(e,t){mt.forEach(function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)})}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,r=e.insertion,o=e.activeSortable,a=e.parentEl,i=e.putSortable,s=this.options;if(r){if(n&&o._hideClone(),gt=!1,s.animation&&mt.length>1&&(yt||!n&&!o.options.sort&&!i)){var l=k(dt,!1,!0,!0);mt.forEach(function(e){e!==dt&&(B(e,l),a.appendChild(e))}),yt=!0}if(!n)if(yt||xt(),mt.length>1){var c=pt;o._showClone(t),o.options.animation&&!pt&&c&&ht.forEach(function(e){o.addAnimationState({target:e,rect:ft}),e.fromRect=ft,e.thisAnimationDuration=null})}else o._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,r=e.activeSortable;if(mt.forEach(function(e){e.thisAnimationDuration=null}),r.options.animation&&!n&&r.multiDrag.isMultiDrag){ft=s({},t);var o=I(dt,!0);ft.top-=o.f,ft.left-=o.e}},dragOverAnimationComplete:function(){yt&&(yt=!1,xt())},drop:function(e){var t=e.originalEvent,n=e.rootEl,r=e.parentEl,o=e.sortable,a=e.dispatchSortableEvent,i=e.oldIndex,s=e.putSortable,l=s||this.sortable;if(t){var c=this.options,u=r.children;if(!wt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),M(dt,c.selectedClass,!~mt.indexOf(dt)),~mt.indexOf(dt))mt.splice(mt.indexOf(dt),1),ct=null,W({sortable:o,rootEl:n,name:"deselect",targetEl:dt,originalEvt:t});else{if(mt.push(dt),W({sortable:o,rootEl:n,name:"select",targetEl:dt,originalEvt:t}),t.shiftKey&&ct&&o.el.contains(ct)){var d,f,p=T(ct),m=T(dt);if(~p&&~m&&p!==m)for(m>p?(f=p,d=m):(f=m,d=p+1);f<d;f++)~mt.indexOf(u[f])||(M(u[f],c.selectedClass,!0),mt.push(u[f]),W({sortable:o,rootEl:n,name:"select",targetEl:u[f],originalEvt:t}))}else ct=dt;ut=l}if(wt&&this.isMultiDrag){if(yt=!1,(r[Y].options.sort||r!==n)&&mt.length>1){var h=k(dt),g=T(dt,":not(."+this.options.selectedClass+")");if(!gt&&c.animation&&(dt.thisAnimationDuration=null),l.captureAnimationState(),!gt&&(c.animation&&(dt.fromRect=h,mt.forEach(function(e){if(e.thisAnimationDuration=null,e!==dt){var t=yt?k(e):h;e.fromRect=t,l.addAnimationState({target:e,rect:t})}})),xt(),mt.forEach(function(e){u[g]?r.insertBefore(e,u[g]):r.appendChild(e),g++}),i===T(dt))){var y=!1;mt.forEach(function(e){e.sortableIndex===T(e)||(y=!0)}),y&&a("update")}mt.forEach(function(e){F(e)}),l.animateAll()}ut=l}(n===r||s&&"clone"!==s.lastPutMode)&&ht.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=wt=!1,ht.length=0},destroyGlobal:function(){this._deselectMultiDrag(),w(document,"pointerup",this._deselectMultiDrag),w(document,"mouseup",this._deselectMultiDrag),w(document,"touchend",this._deselectMultiDrag),w(document,"keydown",this._checkKeyDown),w(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==wt&&wt||ut!==this.sortable||e&&x(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;mt.length;){var t=mt[0];M(t,this.options.selectedClass,!1),mt.shift(),W({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},s(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[Y];t&&t.options.multiDrag&&!~mt.indexOf(e)&&(ut&&ut!==t&&(ut.multiDrag._deselectMultiDrag(),ut=t),M(e,t.options.selectedClass,!0),mt.push(e))},deselect:function(e){var t=e.parentNode[Y],n=mt.indexOf(e);t&&t.options.multiDrag&&~n&&(M(e,t.options.selectedClass,!1),mt.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],r=[];return mt.forEach(function(e){var o;n.push({multiDragElement:e,index:e.sortableIndex}),o=yt&&e!==dt?-1:yt?T(e,":not(."+t.options.selectedClass+")"):T(e),r.push({multiDragElement:e,index:o})}),{items:(e=mt,function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(ht),oldIndicies:n,newIndicies:r}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function vt(e,t){ht.forEach(function(n,r){var o=t.children[n.sortableIndex+(e?Number(r):0)];o?t.insertBefore(n,o):t.appendChild(n)})}function xt(){mt.forEach(function(e){e!==dt&&e.parentNode&&e.parentNode.removeChild(e)})}Be.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):this.options.supportPointer?y(document,"pointermove",this._handleFallbackAutoScroll):t.touches?y(document,"touchmove",this._handleFallbackAutoScroll):y(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?w(document,"dragover",this._handleAutoScroll):(w(document,"pointermove",this._handleFallbackAutoScroll),w(document,"touchmove",this._handleFallbackAutoScroll),w(document,"mousemove",this._handleFallbackAutoScroll)),nt(),tt(),clearTimeout(N),N=void 0},nulling:function(){qe=He=Ge=et=Je=$e=Xe=null,Ke.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,o);if(qe=e,t||this.options.forceAutoScrollFallback||d||u||p){ot(e,this.options,a,t);var i=L(a,!0);!et||Je&&r===$e&&o===Xe||(Je&&nt(),Je=setInterval(function(){var a=L(document.elementFromPoint(r,o),!0);a!==i&&(i=a,tt()),ot(e,n.options,a,t)},10),$e=r,Xe=o)}else{if(!this.options.bubbleScroll||L(a,!0)===j())return void tt();ot(e,this.options,L(a,!1),!1)}}},s(e,{pluginName:"scroll",initializeByDefault:!0})}),Be.mount(st,it);const Nt=Be},5229(e,t,n){"use strict";var r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(1133)),o=n(8917);function a(e,t){var n={};return e&&"string"==typeof e?((0,r.default)(e,function(e,r){e&&r&&(n[(0,o.camelCase)(e,t)]=r)}),n):n}a.default=a,e.exports=a},8917(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,o=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(e,t){return t.toUpperCase()},l=function(e,t){return"".concat(t,"-")};t.camelCase=function(e,t){return void 0===t&&(t={}),function(e){return!e||o.test(e)||n.test(e)}(e)?e:(e=e.toLowerCase(),(e=t.reactCompat?e.replace(i,l):e.replace(a,l)).replace(r,s))}},1133(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){let n=null;if(!e||"string"!=typeof e)return n;const r=(0,o.default)(e),a="function"==typeof t;return r.forEach(e=>{if("declaration"!==e.type)return;const{property:r,value:o}=e;a?t(r,o,e):o&&(n=n||{},n[r]=o)}),n};const o=r(n(5077))},7676(e){"use strict";e.exports=function(e,t){if(!e)throw new Error("Invariant failed")}},7573(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>r});const r=function(e,t){}},8493(e,t,n){"use strict";var r=n(1609),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useState,i=r.useEffect,s=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return s(function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})},[e,n,t]),i(function(){return c(o)&&u({inst:o}),e(function(){c(o)&&u({inst:o})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},2162(e,t,n){"use strict";var r=n(1609),o=n(9888),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=o.useSyncExternalStore,s=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!l){if(l=!0,i=e,e=r(e),void 0!==o&&f.hasValue){var t=f.value;if(o(t,e))return s=t}return s=e}if(t=s,a(i,e))return t;var n=r(e);return void 0!==o&&o(t,n)?(i=e,t):(i=e,s=n)}var i,s,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,r,o]);var p=i(e,d[0],d[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}},2779(e,t,n){"use strict";var r=n(1609),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=r.useSyncExternalStore,i=r.useRef,s=r.useEffect,l=r.useMemo,c=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!s){if(s=!0,a=e,e=r(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,o(a,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(a=e,t):(a=e,i=n)}var a,i,s=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}},9888(e,t,n){"use strict";e.exports=n(8493)},9242(e,t,n){"use strict";e.exports=n(2162)},8418(e,t,n){"use strict";e.exports=n(2779)},8783(e,t,n){"use strict";function r(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}n.d(t,{A:()=>o});const o=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every(function(t,r){return e(t,n[r])});if("object"==typeof t||"object"==typeof n){var o=r(t),a=r(n);return o!==t||a!==n?e(o,a):Object.keys(Object.assign({},t,n)).every(function(r){return e(t[r],n[r])})}return!1}},1609(e){"use strict";e.exports=window.React},1455(e){"use strict";e.exports=window.wp.apiFetch},6942(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,a(n)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(n=function(){return o}.apply(t,[]))||(e.exports=n)}()},8168(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},7387(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(3662);function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},8587(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},3662(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},1561(e,t,n){"use strict";n.d(t,{A:()=>r});function r(e,t){if(!e)throw new Error("Invariant failed")}}},r={};function o(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,o),a.loaded=!0,a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,o.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);o.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;("object"==typeof s||"function"==typeof s)&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach(e=>i[e]=()=>n[e]);return i.default=()=>n,o.d(a,i),a},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var t=globalThis.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{"use strict";var e={};o.r(e),o.d(e,{scaleBand:()=>dx,scaleDiverging:()=>zI,scaleDivergingLog:()=>PI,scaleDivergingPow:()=>UI,scaleDivergingSqrt:()=>BI,scaleDivergingSymlog:()=>RI,scaleIdentity:()=>AE,scaleImplicit:()=>cx,scaleLinear:()=>CE,scaleLog:()=>FE,scaleOrdinal:()=>ux,scalePoint:()=>px,scalePow:()=>XE,scaleQuantile:()=>iM,scaleQuantize:()=>sM,scaleRadial:()=>KE,scaleSequential:()=>kI,scaleSequentialLog:()=>DI,scaleSequentialPow:()=>AI,scaleSequentialQuantile:()=>OI,scaleSequentialSqrt:()=>TI,scaleSequentialSymlog:()=>CI,scaleSqrt:()=>qE,scaleSymlog:()=>VE,scaleThreshold:()=>lM,scaleTime:()=>_I,scaleUtc:()=>II,tickFormat:()=>kE});var t={};o.r(t),o.d(t,{Button:()=>PF,CaptionLabel:()=>RF,Chevron:()=>UF,Day:()=>BF,DayButton:()=>FF,Dropdown:()=>YF,DropdownNav:()=>ZF,Footer:()=>QF,Month:()=>VF,MonthCaption:()=>WF,MonthGrid:()=>GF,Months:()=>HF,MonthsDropdown:()=>$F,Nav:()=>XF,NextMonthButton:()=>qF,Option:()=>JF,PreviousMonthButton:()=>KF,Root:()=>eY,Select:()=>tY,Week:()=>nY,WeekNumber:()=>aY,WeekNumberHeader:()=>iY,Weekday:()=>rY,Weekdays:()=>oY,Weeks:()=>sY,YearsDropdown:()=>lY});var n={};o.r(n),o.d(n,{formatCaption:()=>uY,formatDay:()=>fY,formatMonthCaption:()=>dY,formatMonthDropdown:()=>pY,formatWeekNumber:()=>hY,formatWeekNumberHeader:()=>gY,formatWeekdayName:()=>mY,formatYearCaption:()=>wY,formatYearDropdown:()=>yY});var r={};o.r(r),o.d(r,{labelCaption:()=>NY,labelDay:()=>vY,labelDayButton:()=>bY,labelGrid:()=>xY,labelGridcell:()=>EY,labelMonthDropdown:()=>MY,labelNav:()=>_Y,labelNext:()=>SY,labelPrevious:()=>jY,labelWeekNumber:()=>DY,labelWeekNumberHeader:()=>CY,labelWeekday:()=>kY,labelYearDropdown:()=>AY});const a=window.wp.element,i=(0,a.createContext)();window.cartflows=window.cartflows||{},window.cartflows.settingsStateContext=i;const s=({reducer:e,initialState:t,children:n})=>(window.cartflows.settingsStateContext=i,(0,a.createElement)(i.Provider,{value:(0,a.useReducer)(e,t)},n)),l=()=>(0,a.useContext)(i),c=cartflows_admin?.page_builder?cartflows_admin.page_builder:"other",u={is_cf_pro:!!cartflows_admin?.is_pro,admin_url:"test_url",flows_data:null,flows_pagination:{},setup_checklist_data:null,flows_limit_over:!1,globaldata:[],page_builder:c,active_flows_count:"",trash_flows_count:"",draft_flows_count:"",found_posts:"",flows_count:"",analyticsData:null,publishedFlows:null,suretriggers_config:[],page_builder_group_data:cartflows_admin.required_plugins,page_builder_group:cartflows_admin.required_plugins[c],options:[]},d=(e,t)=>{switch(t.type){case"SET_FLOWS":return t.flows?{...e,flows_data:[...t.flows]}:{...e,flows_data:t.flows};case"SET_FLOWS_DATA":return{...e,flows_data:[...t.flows],flows_pagination:t.pagination,found_posts:t.found_posts,active_flows_count:t.active_flows_count,trash_flows_count:t.trash_flows_count,draft_flows_count:t.draft_flows_count,flows_count:t.found_posts,flows_limit_over:!1};case"SET_SETTINGS":return{...e,globaldata:t.commondata,options:t.commondata.options};case"SET_PAGE_BUILDER":return{...e,page_builder:t.pagebuilder};case"SET_ANALYTICS_DATA":return{...e,analyticsData:t.analyticsData};case"SET_PUBLISHED_FLOWS":return{...e,publishedFlows:t.publishedFlows};case"SET_OPTION":const n=e.options;return n[t.name]=t.value,{...e,options:n};case"SET_SURETRIGGERS_CONFIG":return t.config&&setSureTriggersConfig(t.config),{...e,suretriggers_config:t};case"SET_SETUP_CHECKLIST_DATA":return{...e,setup_checklist_data:t.setup_checklist};default:return e}},f=(0,a.createContext)();window.cartflows=window.cartflows||{},window.cartflows.settingsContext=f;const p=()=>(0,a.useContext)(f);var m;const h={settingsProcess:!1,unsavedChanges:!1,page_builder:cartflows_admin?.page_builder?cartflows_admin.page_builder:"other",license_status:null!==(m=cartflows_admin?.license_status)&&void 0!==m?m:"",canvasMode:(()=>{try{return"true"===localStorage.getItem("wcf_canvas_mode_enabled")}catch(e){return!1}})()};o(5146);var g=o(6347),y=o(7387),w=o(1609),b=o.t(w,2),v=o.n(w),x=o(4499),N=o(8168),E=o(8587),M=o(1561),_=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=(0,x.createBrowserHistory)(t.props),t}return(0,y.A)(t,e),t.prototype.render=function(){return v().createElement(g.Router,{history:this.history,children:this.props.children})},t}(v().Component);v().Component;var I=function(e,t){return"function"==typeof e?e(t):e},S=function(e,t){return"string"==typeof e?(0,x.createLocation)(e,null,null,t):e},j=function(e){return e},k=v().forwardRef;void 0===k&&(k=j);var D=k(function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,a=(0,E.A)(e,["innerRef","navigate","onClick"]),i=a.target,s=(0,N.A)({},a,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||i&&"_self"!==i||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return s.ref=j!==k&&t||n,v().createElement("a",s)}),C=k(function(e,t){var n=e.component,r=void 0===n?D:n,o=e.replace,a=e.to,i=e.innerRef,s=(0,E.A)(e,["component","replace","to","innerRef"]);return v().createElement(g.__RouterContext.Consumer,null,function(e){e||(0,M.A)(!1);var n=e.history,l=S(I(a,e.location),e.location),c=l?n.createHref(l):"",u=(0,N.A)({},s,{href:c,navigate:function(){var t=I(a,e.location),r=(0,x.createPath)(e.location)===(0,x.createPath)(S(t));(o||r?n.replace:n.push)(t)}});return j!==k?u.ref=t||i:u.innerRef=i,v().createElement(r,u)})}),A=function(e){return e},T=v().forwardRef;void 0===T&&(T=A),T(function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,o=e.activeClassName,a=void 0===o?"active":o,i=e.activeStyle,s=e.className,l=e.exact,c=e.isActive,u=e.location,d=e.sensitive,f=e.strict,p=e.style,m=e.to,h=e.innerRef,y=(0,E.A)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return v().createElement(g.__RouterContext.Consumer,null,function(e){e||(0,M.A)(!1);var n=u||e.location,o=S(I(m,n),n),w=o.pathname,b=w&&w.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),x=b?(0,g.matchPath)(n.pathname,{path:b,exact:l,sensitive:d,strict:f}):null,E=!!(c?c(x,n):x),_="function"==typeof s?s(E):s,j="function"==typeof p?p(E):p;E&&(_=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(function(e){return e}).join(" ")}(_,a),j=(0,N.A)({},j,i));var k=(0,N.A)({"aria-current":E&&r||null,className:_,style:j,to:o},y);return A!==T?k.ref=t||h:k.innerRef=h,v().createElement(C,k)})});var O=o(1455),L=o.n(O);const z=window.wp.i18n,P=window.wp.hooks;var R=o(4848);const U=e=>{const t=Z(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),B(n,t)||Y(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},B=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?B(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const a=e.join("-");return t.validators.find(({validator:e})=>e(a))?.classGroupId},F=/^\[(.+)\]$/,Y=e=>{if(F.test(e)){const t=F.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Z=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return G(Object.entries(e.classGroups),n).forEach(([e,n])=>{Q(n,r,e,t)}),r},Q=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?W(e)?void Q(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,o])=>{Q(o,V(t,e),n,r)});(""===e?t:V(t,e)).classGroupId=n})},V=(e,t)=>{let n=e;return t.split("-").forEach(e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)}),n},W=e=>e.isThemeGetter,G=(e,t)=>t?e.map(([e,n])=>{const r=n.map(e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,n])=>[t+e,n])):e);return[e,r]}):e,H=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},$=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],a=t.length,i=e=>{const n=[];let i,s=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===s){if(u===o&&(r||e.slice(c,c+a)===t)){n.push(e.slice(l,c)),l=c+a;continue}if("/"===u){i=c;continue}}"["===u?s++:"]"===u&&s--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return n?e=>n({className:e,parseClassName:i}):i},X=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)}),t.push(...n.sort()),t},q=/\s+/;function J(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=K(e))&&(r&&(r+=" "),r+=t);return r}const K=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=K(e[r]))&&(n&&(n+=" "),n+=t);return n};function ee(e,...t){let n,r,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:H(e.cacheSize),parseClassName:$(e),...U(e)}))(l),r=n.cache.get,o=n.cache.set,a=i,i(s)};function i(e){const t=r(e);if(t)return t;const a=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(q);let s="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let f=Boolean(d),p=r(f?u.substring(0,d):u);if(!p){if(!f){s=t+(s.length>0?" "+s:s);continue}if(p=r(u),!p){s=t+(s.length>0?" "+s:s);continue}f=!1}const m=X(l).join(":"),h=c?m+"!":m,g=h+p;if(a.includes(g))continue;a.push(g);const y=o(p,f);for(let e=0;e<y.length;++e){const t=y[e];a.push(h+t)}s=t+(s.length>0?" "+s:s)}return s})(e,n);return o(e,a),a}return function(){return a(J.apply(null,arguments))}}const te=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},ne=/^\[(?:([a-z-]+):)?(.+)\]$/i,re=/^\d+\/\d+$/,oe=new Set(["px","full","screen"]),ae=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ie=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,se=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,le=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ce=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ue=e=>fe(e)||oe.has(e)||re.test(e),de=e=>_e(e,"length",Ie),fe=e=>Boolean(e)&&!Number.isNaN(Number(e)),pe=e=>_e(e,"number",fe),me=e=>Boolean(e)&&Number.isInteger(Number(e)),he=e=>e.endsWith("%")&&fe(e.slice(0,-1)),ge=e=>ne.test(e),ye=e=>ae.test(e),we=new Set(["length","size","percentage"]),be=e=>_e(e,we,Se),ve=e=>_e(e,"position",Se),xe=new Set(["image","url"]),Ne=e=>_e(e,xe,ke),Ee=e=>_e(e,"",je),Me=()=>!0,_e=(e,t,n)=>{const r=ne.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},Ie=e=>ie.test(e)&&!se.test(e),Se=()=>!1,je=e=>le.test(e),ke=e=>ce.test(e),De=(Symbol.toStringTag,()=>{const e=te("colors"),t=te("spacing"),n=te("blur"),r=te("brightness"),o=te("borderColor"),a=te("borderRadius"),i=te("borderSpacing"),s=te("borderWidth"),l=te("contrast"),c=te("grayscale"),u=te("hueRotate"),d=te("invert"),f=te("gap"),p=te("gradientColorStops"),m=te("gradientColorStopPositions"),h=te("inset"),g=te("margin"),y=te("opacity"),w=te("padding"),b=te("saturate"),v=te("scale"),x=te("sepia"),N=te("skew"),E=te("space"),M=te("translate"),_=()=>["auto",ge,t],I=()=>[ge,t],S=()=>["",ue,de],j=()=>["auto",fe,ge],k=()=>["","0",ge],D=()=>[fe,ge];return{cacheSize:500,separator:":",theme:{colors:[Me],spacing:[ue,de],blur:["none","",ye,ge],brightness:D(),borderColor:[e],borderRadius:["none","","full",ye,ge],borderSpacing:I(),borderWidth:S(),contrast:D(),grayscale:k(),hueRotate:D(),invert:k(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[he,de],inset:_(),margin:_(),opacity:D(),padding:I(),saturate:D(),scale:D(),sepia:k(),skew:D(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ge]}],container:["container"],columns:[{columns:[ye]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",ge]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",me,ge]}],basis:[{basis:_()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ge]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",me,ge]}],"grid-cols":[{"grid-cols":[Me]}],"col-start-end":[{col:["auto",{span:["full",me,ge]},ge]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[Me]}],"row-start-end":[{row:["auto",{span:[me,ge]},ge]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ge]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ge]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ge,t]}],"min-w":[{"min-w":[ge,t,"min","max","fit"]}],"max-w":[{"max-w":[ge,t,"none","full","min","max","fit","prose",{screen:[ye]},ye]}],h:[{h:[ge,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ge,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ge,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ye,de]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pe]}],"font-family":[{font:[Me]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ge]}],"line-clamp":[{"line-clamp":["none",fe,pe]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ue,ge]}],"list-image":[{"list-image":["none",ge]}],"list-style-type":[{list:["none","disc","decimal",ge]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ue,de]}],"underline-offset":[{"underline-offset":["auto",ue,ge]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",ve]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",be]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ne]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:["solid","dashed","dotted","double","none","hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[ue,ge]}],"outline-w":[{outline:[ue,de]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:S()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[ue,de]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ye,Ee]}],"shadow-color":[{shadow:[Me]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ye,ge]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[x]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[x]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ge]}],duration:[{duration:D()}],ease:[{ease:["linear","in","out","in-out",ge]}],delay:[{delay:D()}],animate:[{animate:["none","spin","ping","pulse","bounce",ge]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[v]}],"scale-x":[{"scale-x":[v]}],"scale-y":[{"scale-y":[v]}],rotate:[{rotate:[me,ge]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ge]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ue,de,pe]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}),Ce=ee(De);function Ae(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Ae(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Te(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ae(e))&&(r&&(r+=" "),r+=t);return r}const Oe=Te,Le=(...e)=>Ce(Te(...e)),ze=(...e)=>(...t)=>e.filter(Boolean).forEach(e=>e?.(...t)),Pe=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},Re={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},Ue=()=>{if(typeof window>"u")return"null";const e=window.navigator?.userAgentData?.platform||window.navigator.platform;let t="null";return["macOS","Macintosh","MacIntel","MacPPC","Mac68K"].includes(e)?t="Mac OS":["Win32","Win64","Windows","WinCE"].includes(e)&&(t="Windows"),t},Be=(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}},Fe=e=>{if(typeof window>"u")return null;try{const t=localStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return console.error(e),null}},Ye=(e,t)=>Object.fromEntries(Object.entries(e).filter(([e])=>!t.includes(e))),Ze=({children:e,gap:t="lg",className:n,...r})=>(0,R.jsx)("header",{className:Le("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",Pe(t),n),...r,children:e});Ze.displayName="Topbar";const Qe=({gap:e="sm",children:t,className:n})=>(0,R.jsx)("div",{className:Le("flex items-center",Pe(e),n),children:t});Qe.displayName="Topbar.Left";const Ve=({gap:e="md",children:t,align:n="center",className:r})=>{const o={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,R.jsx)("div",{className:Le("flex items-center grow",Pe(e),o,r),children:t})};Ve.displayName="Topbar.Middle";const We=({gap:e="sm",children:t,className:n})=>(0,R.jsx)("div",{className:Le("flex items-center",Pe(e),n),children:t});We.displayName="Topbar.Right";const Ge=({children:e,className:t})=>(0,R.jsx)("div",{className:Le("flex items-center [&>svg]:block h-full",t),children:e});function He(){return"undefined"!=typeof window}function $e(e){return Je(e)?(e.nodeName||"").toLowerCase():"#document"}function Xe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function qe(e){var t;return null==(t=(Je(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Je(e){return!!He()&&(e instanceof Node||e instanceof Xe(e).Node)}function Ke(e){return!!He()&&(e instanceof Element||e instanceof Xe(e).Element)}function et(e){return!!He()&&(e instanceof HTMLElement||e instanceof Xe(e).HTMLElement)}function tt(e){return!(!He()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Xe(e).ShadowRoot)}function nt(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ft(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function rt(e){return/^(table|td|th)$/.test($e(e))}function ot(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}Ge.displayName="Topbar.Item",Ze.Left=Qe,Ze.Middle=Ve,Ze.Right=We,Ze.Item=Ge;const at=/transform|translate|scale|rotate|perspective|filter/,it=/paint|layout|strict|content/,st=e=>!!e&&"none"!==e;let lt;function ct(e){const t=Ke(e)?ft(e):e;return st(t.transform)||st(t.translate)||st(t.scale)||st(t.rotate)||st(t.perspective)||!ut()&&(st(t.backdropFilter)||st(t.filter))||at.test(t.willChange||"")||it.test(t.contain||"")}function ut(){return null==lt&&(lt="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),lt}function dt(e){return/^(html|body|#document)$/.test($e(e))}function ft(e){return Xe(e).getComputedStyle(e)}function pt(e){return Ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mt(e){if("html"===$e(e))return e;const t=e.assignedSlot||e.parentNode||tt(e)&&e.host||qe(e);return tt(t)?t.host:t}function ht(e){const t=mt(e);return dt(t)?(e.ownerDocument||e).body:et(t)&&nt(t)?t:ht(t)}function gt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=ht(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Xe(o);if(a){const e=yt(i);return t.concat(i,i.visualViewport||[],nt(o)?o:[],e&&n?gt(e):[])}return t.concat(o,gt(o,[],n))}function yt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wt(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function bt(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&tt(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function vt(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function xt(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent}function Nt(e){return!(0!==e.mozInputSource||!e.isTrusted)||(_t()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function Et(e){return!xt().includes("jsdom/")&&(!_t()&&0===e.width&&0===e.height||_t()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function Mt(){return/apple/i.test(navigator.vendor)}function _t(){const e=/android/i;return e.test(vt())||e.test(xt())}function It(){return vt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function St(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function jt(e){return(null==e?void 0:e.ownerDocument)||document}function kt(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function Dt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ct(e){return et(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function At(e){e.preventDefault(),e.stopPropagation()}function Tt(e){return!!e&&"combobox"===e.getAttribute("role")&&Ct(e)}const Ot=Math.min,Lt=Math.max,zt=Math.round,Pt=Math.floor,Rt=e=>({x:e,y:e}),Ut={left:"right",right:"left",bottom:"top",top:"bottom"};function Bt(e,t,n){return Lt(e,Ot(t,n))}function Ft(e,t){return"function"==typeof e?e(t):e}function Yt(e){return e.split("-")[0]}function Zt(e){return e.split("-")[1]}function Qt(e){return"x"===e?"y":"x"}function Vt(e){return"y"===e?"height":"width"}function Wt(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Gt(e){return Qt(Wt(e))}function Ht(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const $t=["left","right"],Xt=["right","left"],qt=["top","bottom"],Jt=["bottom","top"];function Kt(e){const t=Yt(e);return Ut[t]+e.slice(t.length)}function en(e){return"number"!=typeof e?function(e){var t,n,r,o;return{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}}(e):{top:e,right:e,bottom:e,left:e}}function tn(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}var nn=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"].join(","),rn="undefined"==typeof Element,on=rn?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,an=!rn&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},sn=function(e,t){var n;void 0===t&&(t=!0);var r=null==e||null===(n=e.getAttribute)||void 0===n?void 0:n.call(e,"inert");return""===r||"true"===r||t&&e&&("function"==typeof e.closest?e.closest("[inert]"):sn(e.parentNode))},ln=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var a=o.shift();if(!sn(a,!1))if("SLOT"===a.tagName){var i=a.assignedElements(),s=i.length?i:a.children,l=ln(s,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:a,candidates:l})}else{on.call(a,nn)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(a),u=!sn(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&u){var d=ln(!0===c?a.children:c.children,!0,n);n.flatten?r.push.apply(r,d):r.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return r},cn=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},un=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!cn(e)?0:e.tabIndex},dn=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},fn=function(e){return"INPUT"===e.tagName},pn=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},mn=function(e,t){return!(t.disabled||function(e){return fn(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("full-native"===n&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(e).visibility)return!0;var o=on.call(e,"details>summary:first-of-type")?e.parentElement:e;if(on.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return pn(e)}else{if("function"==typeof r){for(var a=e;e;){var i=e.parentElement,s=an(e);if(i&&!i.shadowRoot&&!0===r(i))return pn(e);e=e.assignedSlot?e.assignedSlot:i||s===e.ownerDocument?i:s.host}e=a}if(function(e){var t,n,r,o,a=e&&an(e),i=null===(t=a)||void 0===t?void 0:t.host,s=!1;if(a&&a!==e)for(s=!!(null!==(n=i)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(i)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&i;){var l,c,u;s=!(null===(c=i=null===(l=a=an(i))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(i))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!on.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},hn=function(e,t){return!(function(e){return function(e){return fn(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||an(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||un(t)<0||!mn(e,t))},gn=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},yn=function(e){var t=[],n=[];return e.forEach(function(e,r){var o=!!e.scopeParent,a=o?e.scopeParent:e,i=function(e,t){var n=un(e);return n<0&&t&&!cn(e)?0:n}(a,o),s=o?yn(e.candidates):a;0===i?o?t.push.apply(t,s):t.push(a):n.push({documentOrder:r,tabIndex:i,item:e,isScope:o,content:s})}),n.sort(dn).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},wn=function(e,t){var n;return n=(t=t||{}).getShadowRoot?ln([e],t.includeContainer,{filter:hn.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:gn}):function(e,t,n){if(sn(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(nn));return t&&on.call(e,nn)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,hn.bind(null,t)),yn(n)};const bn=window.ReactDOM;function vn(e,t,n){let{reference:r,floating:o}=e;const a=Wt(t),i=Gt(t),s=Vt(i),l=Yt(t),c="y"===a,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}const m=Zt(t);return m&&(p[i]+=f*("end"===m?1:-1)*(n&&c?-1:1)),p}async function xn(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ft(t,e),m=en(p),h=s[f?"floating"===d?"reference":"floating":d],g=tn(await a.getClippingRect({element:null==(n=await(null==a.isElement?void 0:a.isElement(h)))||n?h:h.contextElement||await(null==a.getDocumentElement?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(w))&&await(null==a.getScale?void 0:a.getScale(w))||{x:1,y:1},v=tn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:w,strategy:l}):y);return{top:(g.top-v.top+m.top)/b.y,bottom:(v.bottom-g.bottom+m.bottom)/b.y,left:(g.left-v.left+m.left)/b.x,right:(v.right-g.right+m.right)/b.x}}const Nn=new Set(["left","top"]);function En(e){const t=ft(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=et(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=zt(n)!==a||zt(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function Mn(e){return Ke(e)?e:e.contextElement}function In(e){const t=Mn(e);if(!et(t))return Rt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=En(t);let i=(a?zt(n.width):n.width)/r,s=(a?zt(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const Sn=Rt(0);function jn(e){const t=Xe(e);return ut()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Sn}function kn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=Mn(e);let i=Rt(1);t&&(r?Ke(r)&&(i=In(r)):i=In(e));const s=function(e,t,n){return void 0===t&&(t=!1),!!n&&t&&n===Xe(e)}(a,n,r)?jn(a):Rt(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a&&r){const e=Xe(a),t=Ke(r)?Xe(r):r;let n=e,o=yt(n);for(;o&&t!==n;){const e=In(o),t=o.getBoundingClientRect(),r=ft(o),a=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=a,c+=i,n=Xe(o),o=yt(n)}}return tn({width:u,height:d,x:l,y:c})}function Dn(e,t){const n=pt(e).scrollLeft;return t?t.left+n:kn(qe(e)).left+n}function Cn(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Dn(e,n),y:n.top+t.scrollTop}}function An(e,t,n){let r;if("viewport"===t||"layoutViewport"===t)r=function(e,t,n){void 0===n&&(n="viewport");const r="layoutViewport"===n,o=Xe(e),a=qe(e),i=o.visualViewport;let s=a.clientWidth,l=a.clientHeight,c=0,u=0;if(i){const e=!ut()||"fixed"===t;r?e||(c=-i.offsetLeft,u=-i.offsetTop):(s=i.width,l=i.height,e&&(c=i.offsetLeft,u=i.offsetTop))}if(Dn(a)<=0){const e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(a.clientWidth-t.clientWidth-r),i="stable both-edges"===getComputedStyle(a).scrollbarGutter?o/2:o;i<=25&&(s-=i)}return{width:s,height:l,x:c,y:u}}(e,n,t);else if("document"===t)r=function(e){const t=pt(e),n=e.ownerDocument.body,r=Lt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Lt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Dn(e);const i=-t.scrollTop;return"rtl"===ft(n).direction&&(a+=Lt(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:a,y:i}}(qe(e));else if(Ke(t))r=function(e,t){const n=kn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=In(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=jn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return tn(r)}function Tn(e,t,n){const r=et(t),o=qe(t),a="fixed"===n,i=kn(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Rt(0);if((r||!a)&&(("body"!==$e(t)||nt(o))&&(s=pt(t)),r)){const e=kn(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}!r&&o&&(l.x=Dn(o));const c=!o||r||a?Rt(0):Cn(o,s);return{x:i.left+s.scrollLeft-l.x-c.x,y:i.top+s.scrollTop-l.y-c.y,width:i.width,height:i.height}}function On(e){return"static"===ft(e).position}function Ln(e,t){if(!et(e)||"fixed"===ft(e).position)return null;if(t)return t(e);let n=e.offsetParent;return qe(e)===n&&(n=n.ownerDocument.body),n}function zn(e,t){const n=Xe(e);if(ot(e))return n;if(!et(e)){let t=mt(e);for(;t&&!dt(t);){if(Ke(t)&&!On(t))return t;t=mt(t)}return n}let r=Ln(e,t);for(;r&&rt(r)&&On(r);)r=Ln(r,t);return r&&dt(r)&&On(r)&&!ct(r)?n:r||function(e){let t=mt(e);for(;et(t)&&!dt(t);){if(ct(t))return t;if(ot(t))return null;t=mt(t)}return null}(e)||n}const Pn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=qe(r),s=!!t&&ot(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Rt(1);const u=Rt(0),d=et(r);if((d||!a)&&(("body"!==$e(r)||nt(i))&&(l=pt(r)),d)){const e=kn(r);c=In(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||a?Rt(0):Cn(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:qe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?ot(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=gt(e,[],!1).filter(e=>Ke(e)&&"body"!==$e(e)),o=null;const a="fixed"===ft(e).position;let i=a?mt(e):e;for(;Ke(i)&&!dt(i);){const e=ft(i),t=ct(i),n=o?o.position:a?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?o=e:r=r.filter(e=>e!==i),i=mt(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=An(t,a[0],o);let s=i.top,l=i.right,c=i.bottom,u=i.left;for(let e=1;e<a.length;e++){const n=An(t,a[e],o);s=Lt(n.top,s),l=Ot(n.right,l),c=Ot(n.bottom,c),u=Lt(n.left,u)}return{width:l-u,height:c-s,x:u,y:s}},getOffsetParent:zn,getElementRects:async function(e){const t=this.getOffsetParent||zn,n=this.getDimensions,r=await n(e.floating);return{reference:Tn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){const{width:t,height:n}=En(e);return{width:t,height:n}},getScale:In,isElement:Ke,isRTL:function(e){return"rtl"===ft(e).direction}};function Rn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Un(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Mn(e),u=o||a?[...c?gt(c):[],...t?gt(t):[]]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n),a&&e.addEventListener("resize",n)});const d=c&&s?function(e,t,n){let r,o=null;const a=qe(e);function i(){var e;clearTimeout(r),null==(e=o)||e.disconnect(),o=null}function s(n,l){void 0===n&&(n=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(n||t(),!f||!p)return;const m={rootMargin:-Pt(d)+"px "+-Pt(a.clientWidth-(u+f))+"px "+-Pt(a.clientHeight-(d+p))+"px "+-Pt(u)+"px",threshold:Lt(0,Ot(1,l))||1};let h=!0;function g(t){const n=t[0].intersectionRatio;if(!Rn(c,e.getBoundingClientRect()))return s();if(n!==l){if(!h)return s();n?s(!1,n):r=setTimeout(()=>{s(!1,1e-7)},1e3)}h=!1}try{o=new IntersectionObserver(g,{...m,root:a.ownerDocument})}catch(e){o=new IntersectionObserver(g,m)}o.observe(e)}const l=Xe(e),c=()=>s(n);return l.addEventListener("resize",c),s(!0),()=>{l.removeEventListener("resize",c),i()}}(c,n,a):null;let f,p=-1,m=null;i&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&t&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!l&&m.observe(c),t&&m.observe(t));let h=l?kn(e):null;return l&&function t(){const r=kn(e);h&&!Rn(h,r)&&n(),h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const Bn=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Ft(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const y=Yt(o),w=Wt(s),b=Yt(s)===s,v=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!h?[Kt(s)]:function(e){const t=Kt(e);return[Ht(e),t,Ht(t)]}(s)),N="none"!==m;!f&&N&&x.push(...function(e,t,n,r){const o=Zt(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Xt:$t:t?$t:Xt;case"left":case"right":return t?qt:Jt;default:return[]}}(Yt(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(Ht)))),a}(s,h,m,v));const E=[s,...x],M=await l.detectOverflow(t,g),_=[];let I=(null==(r=a.flip)?void 0:r.overflows)||[];if(u&&_.push(M[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Zt(e),o=Gt(e),a=Vt(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Kt(i)),[i,Kt(i)]}(o,i,v);_.push(M[e[0]],M[e[1]])}if(I=[...I,{placement:o,overflows:_}],!_.every(e=>e<=0)){var S,j;const e=((null==(S=a.flip)?void 0:S.index)||0)+1,t=E[e];if(t&&("alignment"!==d||w===Wt(t)||I.every(e=>Wt(e.placement)!==w||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(j=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:j.placement;if(!n)switch(p){case"bestFit":{var k;const e=null==(k=I.filter(e=>{if(N){const t=Wt(e.placement);return t===w||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:k[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Fn=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Ft(e,t)||{};if(null==c)return{};const d=en(u),f={x:n,y:r},p=Gt(o),m=Vt(p),h=await i.getDimensions(c),g="y"===p,y=g?"top":"left",w=g?"bottom":"right",b=g?"clientHeight":"clientWidth",v=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],N=await(null==i.getOffsetParent?void 0:i.getOffsetParent(c));let E=N?N[b]:0;E&&await(null==i.isElement?void 0:i.isElement(N))||(E=s.floating[b]||a.floating[m]);const M=v/2-x/2,_=E/2-h[m]/2-1,I=Ot(d[y],_),S=Ot(d[w],_),j=E-h[m]-S,k=E/2-h[m]/2+M,D=Bt(I,k,j),C=!l.arrow&&null!=Zt(o)&&k!==D&&a.reference[m]/2-(k<I?I:S)-h[m]/2<0,A=C?k<I?k-I:k-j:0;return{[p]:f[p]+A,data:{[p]:D,centerOffset:k-D-A,...C&&{alignmentOffset:A}},reset:C}}}),Yn=(e,t,n)=>{const r=new Map,o=null!=n?n:{},a={...Pn,...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:xn},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=vn(c,r,l),f=r,p=0;const m={};for(let n=0;n<a.length;n++){const h=a[n];if(!h)continue;const{name:g,fn:y}=h,{x:w,y:b,data:v,reset:x}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=w?w:u,d=null!=b?b:d,m[g]={...m[g],...v},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(c=!0===x.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),({x:u,y:d}=vn(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:a})};var Zn="undefined"!=typeof document?w.useLayoutEffect:function(){};function Qn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Qn(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Qn(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function Vn(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wn(e,t){const n=Vn(e);return Math.round(t*n)/n}function Gn(e){const t=w.useRef(e);return Zn(()=>{t.current=e}),t}const Hn=(e,t)=>{const n=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,a=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=Yt(n),s=Zt(n),l="y"===Wt(n),c=Nn.has(i)?-1:1,u=a&&l?-1:1,d=Ft(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},$n=(e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Ft(e,t),u={x:n,y:r},d=await a.detectOverflow(t,c),f=Wt(o),p=Qt(f);let m=u[p],h=u[f];const g=(e,t)=>Bt(t+d["y"===e?"top":"left"],t,t-d["y"===e?"bottom":"right"]);i&&(m=g(p,m)),s&&(h=g(f,h));const y=l.fn({...t,[p]:m,[f]:h});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[p]:i,[f]:s}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xn=(e,t)=>{const n=Bn(e);return{name:n.name,fn:n.fn,options:[e,t]}},qn=(e,t)=>{const n=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:a}=t,{apply:i=()=>{},...s}=Ft(e,t),l=await o.detectOverflow(t,s),c=Yt(n),u=Zt(n),d="y"===Wt(n),{width:f,height:p}=r.floating;let m,h;"top"===c||"bottom"===c?(m=c,h=u===(await(null==o.isRTL?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(h=c,m="end"===u?"top":"bottom");const g=p-l.top-l.bottom,y=f-l.left-l.right,w=Ot(p-l[m],g),b=Ot(f-l[h],y),v=t.middlewareData.shift,x=!v;let N=w,E=b;null!=v&&v.enabled.x&&(E=y),null!=v&&v.enabled.y&&(N=g),x&&!u&&(d?E=f-2*Lt(l.left,l.right):N=p-2*Lt(l.top,l.bottom)),await i({...t,availableWidth:E,availableHeight:N});const M=await o.getDimensions(a.floating);return f!==M.width||p!==M.height?{reset:{rects:!0}}:{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},Jn=(e,t)=>{const n=(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?Fn({element:n.current,padding:r}).fn(t):{}:n?Fn({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kn={...b},er=Kn.useInsertionEffect||(e=>e());function tr(e){const t=w.useRef(()=>{});return er(()=>{t.current=e}),w.useCallback(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}const nr="ArrowUp",rr="ArrowDown",or="ArrowLeft",ar="ArrowRight";function ir(e,t,n){return Math.floor(e/t)!==n}function sr(e,t){return t<0||t>=e.current.length}function lr(e,t){return ur(e,{disabledIndices:t})}function cr(e,t){return ur(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ur(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:a=1}=void 0===t?{}:t;const i=e.current;let s=n;do{s+=r?-a:a}while(s>=0&&s<=i.length-1&&pr(i,s,o));return s}function dr(e,t,n,r,o){if(-1===e)return-1;const a=n.indexOf(e),i=t[e];switch(o){case"tl":return a;case"tr":return i?a+i.width-1:a;case"bl":return i?a+(i.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function fr(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function pr(e,t,n){if(n)return n.includes(t);const r=e[t];return null==r||r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")}var mr="undefined"!=typeof document?w.useLayoutEffect:w.useEffect;function hr(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const gr=w.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function yr(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,a]=w.useState(()=>new Map),i=w.useCallback(e=>{a(t=>new Map(t).set(e,null))},[]),s=w.useCallback(e=>{a(t=>{const n=new Map(t);return n.delete(e),n})},[]);return mr(()=>{const e=new Map(o);Array.from(e.keys()).sort(hr).forEach((t,n)=>{e.set(t,n)}),function(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}(o,e)||a(e)},[o]),w.createElement(gr.Provider,{value:w.useMemo(()=>({register:i,unregister:s,map:o,elementsRef:n,labelsRef:r}),[i,s,o,n,r])},t)}function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wr.apply(this,arguments)}let br=!1,vr=0;const xr=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+vr++,Nr=Kn.useId||function(){const[e,t]=w.useState(()=>br?xr():void 0);return mr(()=>{null==e&&t(xr())},[]),w.useEffect(()=>{br=!0},[]),e},Er=w.forwardRef(function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:a}},width:i=14,height:s=7,tipRadius:l=0,strokeWidth:c=0,staticOffset:u,stroke:d,d:f,style:{transform:p,...m}={},...h}=e,g=Nr(),[y,b]=w.useState(!1);if(mr(()=>{r&&"rtl"===ft(r).direction&&b(!0)},[r]),!r)return null;const[v,x]=n.split("-"),N="top"===v||"bottom"===v;let E=u;(N&&null!=a&&a.x||!N&&null!=a&&a.y)&&(E=null);const M=2*c,_=M/2,I=i/2*(l/-8+1),S=s/2*l/4,j=!!f,k=E&&"end"===x?"bottom":"top";let D=E&&"end"===x?"right":"left";E&&y&&(D="end"===x?"left":"right");const C=null!=(null==o?void 0:o.x)?E||o.x:"",A=null!=(null==o?void 0:o.y)?E||o.y:"",T=f||"M0,0 H"+i+" L"+(i-I)+","+(s-S)+" Q"+i/2+","+s+" "+I+","+(s-S)+" Z",O={top:j?"rotate(180deg)":"",left:j?"rotate(90deg)":"rotate(-90deg)",bottom:j?"":"rotate(180deg)",right:j?"rotate(-90deg)":"rotate(90deg)"}[v];return w.createElement("svg",wr({},h,{"aria-hidden":!0,ref:t,width:j?i:i+M,height:i,viewBox:"0 0 "+i+" "+(s>i?s:i),style:{position:"absolute",pointerEvents:"none",[D]:C,[k]:A,[v]:N||j?"100%":"calc(100% - "+M/2+"px)",transform:[O,p].filter(e=>!!e).join(" "),...m}}),M>0&&w.createElement("path",{clipPath:"url(#"+g+")",fill:"none",stroke:d,strokeWidth:M+(f?0:1),d:T}),w.createElement("path",{stroke:M&&!f?h.fill:"none",d:T}),w.createElement("clipPath",{id:g},w.createElement("rect",{x:-_,y:_*(j?-1:1),width:i+M,height:i})))});const Mr=w.createContext(null),_r=w.createContext(null),Ir=()=>{var e;return(null==(e=w.useContext(Mr))?void 0:e.id)||null},Sr=()=>w.useContext(_r);function jr(e){return"data-floating-ui-"+e}function kr(e){const t=(0,w.useRef)(e);return mr(()=>{t.current=e}),t}const Dr=jr("safe-polygon");function Cr(e,t,n){return n&&!St(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let Ar=0;function Tr(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(Ar);const a=()=>null==e?void 0:e.focus({preventScroll:n});o?a():Ar=requestAnimationFrame(a)}function Or(e,t){let n=e.filter(e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)}),r=n;for(;r.length;)r=e.filter(e=>{var t;return null==(t=r)?void 0:t.some(t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)})}),n=n.concat(r);return n}let Lr=new WeakMap,zr=new WeakSet,Pr={},Rr=0;const Ur=e=>e&&(e.host||Ur(e.parentNode));function Br(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=jt(e[0]).body;return function(e,t,n,r){const o="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,i=(s=t,e.map(e=>{if(s.contains(e))return e;const t=Ur(e);return s.contains(t)?t:null}).filter(e=>null!=e));var s;const l=new Set,c=new Set(i),u=[];Pr[o]||(Pr[o]=new WeakMap);const d=Pr[o];return i.forEach(function e(t){t&&!l.has(t)&&(l.add(t),t.parentNode&&e(t.parentNode))}),function e(t){t&&!c.has(t)&&[].forEach.call(t.children,t=>{if("script"!==$e(t))if(l.has(t))e(t);else{const e=a?t.getAttribute(a):null,n=null!==e&&"false"!==e,r=(Lr.get(t)||0)+1,i=(d.get(t)||0)+1;Lr.set(t,r),d.set(t,i),u.push(t),1===r&&n&&zr.add(t),1===i&&t.setAttribute(o,""),!n&&a&&t.setAttribute(a,"true")}})}(t),l.clear(),Rr++,()=>{u.forEach(e=>{const t=(Lr.get(e)||0)-1,n=(d.get(e)||0)-1;Lr.set(e,t),d.set(e,n),t||(!zr.has(e)&&a&&e.removeAttribute(a),zr.delete(e)),n||e.removeAttribute(o)}),Rr--,Rr||(Lr=new WeakMap,Lr=new WeakMap,zr=new WeakSet,Pr={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Fr=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Yr(e,t){const n=wn(e,Fr());"prev"===t&&n.reverse();const r=n.indexOf(wt(jt(e)));return n.slice(r+1)[0]}function Zr(){return Yr(document.body,"next")}function Qr(){return Yr(document.body,"prev")}function Vr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function Wr(e){wn(e,Fr()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Gr(e){e.querySelectorAll("[data-tabindex]").forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}const Hr={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function $r(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Xr=w.forwardRef(function(e,t){const[n,r]=w.useState();mr(()=>(Mt()&&r("button"),document.addEventListener("keydown",$r),()=>{document.removeEventListener("keydown",$r)}),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[jr("focus-guard")]:"",style:Hr};return w.createElement("span",wr({},e,o))}),qr=w.createContext(null),Jr=jr("portal");function Kr(e){const{children:t,id:n,root:r,preserveTabOrder:o=!0}=e,a=function(e){void 0===e&&(e={});const{id:t,root:n}=e,r=Nr(),o=eo(),[a,i]=w.useState(null),s=w.useRef(null);return mr(()=>()=>{null==a||a.remove(),queueMicrotask(()=>{s.current=null})},[a]),mr(()=>{if(!r)return;if(s.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Jr,""),e.appendChild(n),s.current=n,i(n)},[t,r]),mr(()=>{if(null===n)return;if(!r)return;if(s.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!Ke(e)&&(e=e.current),e=e||document.body;let a=null;t&&(a=document.createElement("div"),a.id=t,e.appendChild(a));const l=document.createElement("div");l.id=r,l.setAttribute(Jr,""),e=a||e,e.appendChild(l),s.current=l,i(l)},[t,n,r,o]),a}({id:n,root:r}),[i,s]=w.useState(null),l=w.useRef(null),c=w.useRef(null),u=w.useRef(null),d=w.useRef(null),f=null==i?void 0:i.modal,p=null==i?void 0:i.open,m=!!i&&!i.modal&&i.open&&o&&!(!r&&!a);return w.useEffect(()=>{if(a&&o&&!f)return a.addEventListener("focusin",e,!0),a.addEventListener("focusout",e,!0),()=>{a.removeEventListener("focusin",e,!0),a.removeEventListener("focusout",e,!0)};function e(e){a&&Vr(e)&&("focusin"===e.type?Gr:Wr)(a)}},[a,o,f]),w.useEffect(()=>{a&&(p||Gr(a))},[p,a]),w.createElement(qr.Provider,{value:w.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[o,a])},m&&a&&w.createElement(Xr,{"data-type":"outside",ref:l,onFocus:e=>{if(Vr(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=Qr()||(null==i?void 0:i.refs.domReference.current);null==e||e.focus()}}}),m&&a&&w.createElement("span",{"aria-owns":a.id,style:Hr}),a&&bn.createPortal(t,a),m&&a&&w.createElement(Xr,{"data-type":"outside",ref:c,onFocus:e=>{if(Vr(e,a)){var t;null==(t=d.current)||t.focus()}else{const t=Zr()||(null==i?void 0:i.refs.domReference.current);null==t||t.focus(),(null==i?void 0:i.closeOnFocusOut)&&(null==i||i.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const eo=()=>w.useContext(qr),to="data-floating-ui-focusable";function no(e){return e?e.hasAttribute(to)?e:e.querySelector("["+to+"]")||e:null}let ro=[];function oo(e){ro=ro.filter(e=>e.isConnected);let t=e;if(t&&"body"!==$e(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==on.call(e,nn)&&hn(t,e)}(t,Fr())){const e=wn(t,Fr())[0];e&&(t=e)}ro.push(t),ro.length>20&&(ro=ro.slice(-20))}}function ao(){return ro.slice().reverse().find(e=>e.isConnected)}const io=w.forwardRef(function(e,t){return w.createElement("button",wr({},e,{type:"button",ref:t,tabIndex:-1,style:Hr}))});function so(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:a=!0,initialFocus:i=0,returnFocus:s=!0,restoreFocus:l=!1,modal:c=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:d=!0}=e,{open:f,refs:p,nodeId:m,onOpenChange:h,events:g,dataRef:y,floatingId:b,elements:{domReference:v,floating:x}}=t,N="number"==typeof i&&i<0,E=Tt(v)&&N,M="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||a,_=kr(o),I=kr(i),S=kr(s),j=Sr(),k=eo(),D=w.useRef(null),C=w.useRef(null),A=w.useRef(!1),T=w.useRef(!1),O=w.useRef(-1),L=null!=k,z=no(x),P=tr(function(e){return void 0===e&&(e=z),e?wn(e,Fr()):[]}),R=tr(e=>{const t=P(e);return _.current.map(e=>v&&"reference"===e?v:z&&"floating"===e?z:t).filter(Boolean).flat()});function U(e){return!r&&u&&c?w.createElement(io,{ref:"start"===e?D:C,onClick:e=>h(!1,e.nativeEvent)},"string"==typeof u?u:"Dismiss"):null}w.useEffect(()=>{if(r)return;if(!c)return;function e(e){if("Tab"===e.key){bt(z,wt(jt(z)))&&0===P().length&&!E&&At(e);const t=R(),n=Dt(e);"reference"===_.current[0]&&n===v&&(At(e),e.shiftKey?Tr(t[t.length-1]):Tr(t[1])),"floating"===_.current[1]&&n===z&&e.shiftKey&&(At(e),Tr(t[0]))}}const t=jt(z);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,v,z,c,_,E,P,R]),w.useEffect(()=>{if(!r&&x)return x.addEventListener("focusin",e),()=>{x.removeEventListener("focusin",e)};function e(e){const t=Dt(e),n=P().indexOf(t);-1!==n&&(O.current=n)}},[r,x,P]),w.useEffect(()=>{if(!r&&d)return x&&et(v)?(v.addEventListener("focusout",t),v.addEventListener("pointerdown",e),x.addEventListener("focusout",t),()=>{v.removeEventListener("focusout",t),v.removeEventListener("pointerdown",e),x.removeEventListener("focusout",t)}):void 0;function e(){T.current=!0,setTimeout(()=>{T.current=!1})}function t(e){const t=e.relatedTarget;queueMicrotask(()=>{const n=!(bt(v,t)||bt(x,t)||bt(t,x)||bt(null==k?void 0:k.portalNode,t)||null!=t&&t.hasAttribute(jr("focus-guard"))||j&&(Or(j.nodesRef.current,m).find(e=>{var n,r;return bt(null==(n=e.context)?void 0:n.elements.floating,t)||bt(null==(r=e.context)?void 0:r.elements.domReference,t)})||function(e,t){var n;let r=[],o=null==(n=e.find(e=>e.id===t))?void 0:n.parentId;for(;o;){const t=e.find(e=>e.id===o);o=null==t?void 0:t.parentId,t&&(r=r.concat(t))}return r}(j.nodesRef.current,m).find(e=>{var n,r;return(null==(n=e.context)?void 0:n.elements.floating)===t||(null==(r=e.context)?void 0:r.elements.domReference)===t})));if(l&&n&&wt(jt(z))===jt(z).body){et(z)&&z.focus();const e=O.current,t=P(),n=t[e]||t[t.length-1]||z;et(n)&&n.focus()}!E&&c||!t||!n||T.current||t===ao()||(A.current=!0,h(!1,e,"focus-out"))})}},[r,v,x,z,c,m,j,k,h,d,l,P,E]),w.useEffect(()=>{var e;if(r)return;const t=Array.from((null==k||null==(e=k.portalNode)?void 0:e.querySelectorAll("["+jr("portal")+"]"))||[]);if(x){const e=[x,...t,D.current,C.current,_.current.includes("reference")||E?v:null].filter(e=>null!=e),n=c||E?Br(e,M,!M):Br(e);return()=>{n()}}},[r,v,x,c,_,k,E,M]),mr(()=>{if(r||!et(z))return;const e=wt(jt(z));queueMicrotask(()=>{const t=R(z),n=I.current,r=("number"==typeof n?t[n]:n.current)||z,o=bt(z,e);N||o||!f||Tr(r,{preventScroll:r===z})})},[r,f,z,N,R,I]),mr(()=>{if(r||!z)return;let e=!1;const t=jt(z),n=wt(t);let o=y.current.openEvent;function a(t){let{open:n,reason:r,event:a,nested:i}=t;n&&(o=a),"escape-key"===r&&p.domReference.current&&oo(p.domReference.current),"hover"===r&&"mouseleave"===a.type&&(A.current=!0),"outside-press"===r&&(i?(A.current=!1,e=!0):A.current=!(Nt(a)||Et(a)))}oo(n),g.on("openchange",a);const i=t.createElement("span");return i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),Object.assign(i.style,Hr),L&&v&&v.insertAdjacentElement("afterend",i),()=>{g.off("openchange",a);const n=wt(t),r=bt(x,n)||j&&Or(j.nodesRef.current,m).some(e=>{var t;return bt(null==(t=e.context)?void 0:t.elements.floating,n)});(r||o&&["click","mousedown"].includes(o.type))&&p.domReference.current&&oo(p.domReference.current);const s="boolean"==typeof S.current?ao()||i:S.current.current||i;queueMicrotask(()=>{S.current&&!A.current&&et(s)&&(s===n||n===t.body||r)&&s.focus({preventScroll:e}),i.remove()})}},[r,x,z,S,y,p,g,j,m,L,v]),w.useEffect(()=>{queueMicrotask(()=>{A.current=!1})},[r]),mr(()=>{if(!r&&k)return k.setFocusManagerState({modal:c,closeOnFocusOut:d,open:f,onOpenChange:h,refs:p}),()=>{k.setFocusManagerState(null)}},[r,k,c,f,h,p,d]),mr(()=>{if(r)return;if(!z)return;if("function"!=typeof MutationObserver)return;if(N)return;const e=()=>{const e=z.getAttribute("tabindex"),t=P(),n=wt(jt(x)),r=t.indexOf(n);-1!==r&&(O.current=r),_.current.includes("floating")||n!==p.domReference.current&&0===t.length?"0"!==e&&z.setAttribute("tabindex","0"):"-1"!==e&&z.setAttribute("tabindex","-1")};e();const t=new MutationObserver(e);return t.observe(z,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[r,x,z,p,_,P,N]);const B=!r&&M&&(!c||!E)&&(L||c);return w.createElement(w.Fragment,null,B&&w.createElement(Xr,{"data-type":"inside",ref:null==k?void 0:k.beforeInsideRef,onFocus:e=>{if(c){const e=R();Tr("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=k&&k.preserveTabOrder&&k.portalNode)if(A.current=!1,Vr(e,k.portalNode)){const e=Zr()||v;null==e||e.focus()}else{var t;null==(t=k.beforeOutsideRef.current)||t.focus()}}}),!E&&U("start"),n,U("end"),B&&w.createElement(Xr,{"data-type":"inside",ref:null==k?void 0:k.afterInsideRef,onFocus:e=>{if(c)Tr(R()[0]);else if(null!=k&&k.preserveTabOrder&&k.portalNode)if(d&&(A.current=!0),Vr(e,k.portalNode)){const e=Qr()||v;null==e||e.focus()}else{var t;null==(t=k.afterOutsideRef.current)||t.focus()}}}))}let lo=0,co=()=>{};const uo=w.forwardRef(function(e,t){const{lockScroll:n=!1,...r}=e;return mr(()=>{if(n)return lo++,1===lo&&(co=function(){const e=/iP(hone|ad|od)|iOS/.test(vt()),t=document.body.style,n=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",r=window.innerWidth-document.documentElement.clientWidth,o=t.left?parseFloat(t.left):window.scrollX,a=t.top?parseFloat(t.top):window.scrollY;if(t.overflow="hidden",r&&(t[n]=r+"px"),e){var i,s;const e=(null==(i=window.visualViewport)?void 0:i.offsetLeft)||0,n=(null==(s=window.visualViewport)?void 0:s.offsetTop)||0;Object.assign(t,{position:"fixed",top:-(a-Math.floor(n))+"px",left:-(o-Math.floor(e))+"px",right:"0"})}return()=>{Object.assign(t,{overflow:"",[n]:""}),e&&(Object.assign(t,{position:"",top:"",left:"",right:""}),window.scrollTo(o,a))}}()),()=>{lo--,0===lo&&co()}},[n]),w.createElement("div",wr({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))});function fo(e){return et(e.target)&&"BUTTON"===e.target.tagName}function po(e){return Ct(e)}function mo(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:a}}=e,{enabled:i=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=w.useRef(),p=w.useRef(!1),m=w.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){const t=f.current;0===e.button&&"click"!==s&&(St(t,!0)&&c||(!n||!l||o.current.openEvent&&d&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=f.current;"mousedown"===s&&f.current?f.current=void 0:St(t,!0)&&c||(!n||!l||o.current.openEvent&&d&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){f.current=void 0,e.defaultPrevented||!u||fo(e)||(" "!==e.key||po(a)||(e.preventDefault(),p.current=!0),"Enter"===e.key&&r(!n||!l,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!u||fo(e)||po(a)||" "===e.key&&p.current&&(p.current=!1,r(!n||!l,e.nativeEvent,"click"))}}),[o,a,s,c,u,r,n,d,l]);return w.useMemo(()=>i?{reference:m}:{},[i,m])}const ho={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},go={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},yo=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function wo(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:a}=e,{enabled:i=!0,escapeKey:s=!0,outsidePress:l=!0,outsidePressEvent:c="pointerdown",referencePress:u=!1,referencePressEvent:d="pointerdown",ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Sr(),g=tr("function"==typeof l?l:()=>!1),y="function"==typeof l?g:l,b=w.useRef(!1),v=w.useRef(!1),{escapeKey:x,outsidePress:N}=yo(p),{escapeKey:E,outsidePress:M}=yo(m),_=w.useRef(!1),I=tr(e=>{var t;if(!n||!i||!s||"Escape"!==e.key)return;if(_.current)return;const o=null==(t=a.current.floatingContext)?void 0:t.nodeId,l=h?Or(h.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),l.length>0)){let e=!0;if(l.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)}),!e)return}r(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")}),S=tr(e=>{var t;const n=()=>{var t;I(e),null==(t=Dt(e))||t.removeEventListener("keydown",n)};null==(t=Dt(e))||t.addEventListener("keydown",n)}),j=tr(e=>{var t;const n=b.current;b.current=!1;const i=v.current;if(v.current=!1,"click"===c&&i)return;if(n)return;if("function"==typeof y&&!y(e))return;const s=Dt(e),l="["+jr("inert")+"]",u=jt(o.floating).querySelectorAll(l);let d=Ke(s)?s:null;for(;d&&!dt(d);){const e=mt(d);if(dt(e)||!Ke(e))break;d=e}if(u.length&&Ke(s)&&!s.matches("html,body")&&!bt(s,o.floating)&&Array.from(u).every(e=>!bt(d,e)))return;if(et(s)&&C){const t=s.clientWidth>0&&s.scrollWidth>s.clientWidth,n=s.clientHeight>0&&s.scrollHeight>s.clientHeight;let r=n&&e.offsetX>s.clientWidth;if(n&&"rtl"===ft(s).direction&&(r=e.offsetX<=s.offsetWidth-s.clientWidth),r||t&&e.offsetY>s.clientHeight)return}const f=null==(t=a.current.floatingContext)?void 0:t.nodeId,p=h&&Or(h.nodesRef.current,f).some(t=>{var n;return kt(e,null==(n=t.context)?void 0:n.elements.floating)});if(kt(e,o.floating)||kt(e,o.domReference)||p)return;const m=h?Or(h.nodesRef.current,f):[];if(m.length>0){let e=!0;if(m.forEach(t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)}),!e)return}r(!1,e,"outside-press")}),k=tr(e=>{var t;const n=()=>{var t;j(e),null==(t=Dt(e))||t.removeEventListener(c,n)};null==(t=Dt(e))||t.addEventListener(c,n)});w.useEffect(()=>{if(!n||!i)return;a.current.__escapeKeyBubbles=x,a.current.__outsidePressBubbles=N;let e=-1;function t(e){r(!1,e,"ancestor-scroll")}function l(){window.clearTimeout(e),_.current=!0}function u(){e=window.setTimeout(()=>{_.current=!1},ut()?5:0)}const d=jt(o.floating);s&&(d.addEventListener("keydown",E?S:I,E),d.addEventListener("compositionstart",l),d.addEventListener("compositionend",u)),y&&d.addEventListener(c,M?k:j,M);let p=[];return f&&(Ke(o.domReference)&&(p=gt(o.domReference)),Ke(o.floating)&&(p=p.concat(gt(o.floating))),!Ke(o.reference)&&o.reference&&o.reference.contextElement&&(p=p.concat(gt(o.reference.contextElement)))),p=p.filter(e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)}),p.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{s&&(d.removeEventListener("keydown",E?S:I,E),d.removeEventListener("compositionstart",l),d.removeEventListener("compositionend",u)),y&&d.removeEventListener(c,M?k:j,M),p.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[a,o,s,y,c,n,r,f,i,x,N,I,E,S,j,M,k]),w.useEffect(()=>{b.current=!1},[y,c]);const D=w.useMemo(()=>({onKeyDown:I,[ho[d]]:e=>{u&&r(!1,e.nativeEvent,"reference-press")}}),[I,r,u,d]),C=w.useMemo(()=>({onKeyDown:I,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[go[c]]:()=>{b.current=!0}}),[I,c]);return w.useMemo(()=>i?{reference:D,floating:C}:{},[i,D,C])}function bo(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=Nr(),a=w.useRef({}),[i]=w.useState(()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}()),s=null!=Ir(),[l,c]=w.useState(r.reference),u=tr((e,t,r)=>{a.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:r,nested:s}),null==n||n(e,t,r)}),d=w.useMemo(()=>({setPositionReference:c}),[]),f=w.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return w.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:i,floatingId:o,refs:d}),[t,u,f,i,o,d])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[a,i]=w.useState(null),[s,l]=w.useState(null),c=(null==o?void 0:o.domReference)||a,u=w.useRef(null),d=Sr();mr(()=>{c&&(u.current=c)},[c]);const f=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=w.useState(r);Qn(f,r)||p(r);const[m,h]=w.useState(null),[g,y]=w.useState(null),b=w.useCallback(e=>{e!==E.current&&(E.current=e,h(e))},[]),v=w.useCallback(e=>{e!==M.current&&(M.current=e,y(e))},[]),x=a||m,N=i||g,E=w.useRef(null),M=w.useRef(null),_=w.useRef(u),I=null!=l,S=Gn(l),j=Gn(o),k=Gn(c),D=w.useCallback(()=>{if(!E.current||!M.current)return;const e={placement:t,strategy:n,middleware:f};j.current&&(e.platform=j.current),Yn(E.current,M.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};C.current&&!Qn(_.current,t)&&(_.current=t,bn.flushSync(()=>{d(t)}))})},[f,t,n,j,k]);Zn(()=>{!1===c&&_.current.isPositioned&&(_.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const C=w.useRef(!1);Zn(()=>(C.current=!0,()=>{C.current=!1}),[]),Zn(()=>{if(x&&(E.current=x),N&&(M.current=N),x&&N){if(S.current)return S.current(x,N,D);D()}},[x,N,D,S,I]);const A=w.useMemo(()=>({reference:E,floating:M,setReference:b,setFloating:v}),[b,v]),T=w.useMemo(()=>({reference:x,floating:N}),[x,N]),O=w.useMemo(()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Wn(T.floating,u.x),r=Wn(T.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...Vn(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,T.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:D,refs:A,elements:T,floatingStyles:O}),[u,D,A,T,O])}({...e,elements:{...o,...s&&{reference:s}}}),p=w.useCallback(e=>{const t=Ke(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;l(t),f.refs.setReference(t)},[f.refs]),m=w.useCallback(e=>{(Ke(e)||null===e)&&(u.current=e,i(e)),(Ke(f.refs.reference.current)||null===f.refs.reference.current||null!==e&&!Ke(e))&&f.refs.setReference(e)},[f.refs]),h=w.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=w.useMemo(()=>({...f.elements,domReference:c}),[f.elements,c]),y=w.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return mr(()=>{r.dataRef.current.floatingContext=y;const e=null==d?void 0:d.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),w.useMemo(()=>({...f,context:y,refs:h,elements:g}),[f,h,g,y])}const vo="active",xo="selected";function No(e,t,n){const r=new Map,o="item"===n;let a=e;if(o&&e){const{[vo]:t,[xo]:__,...n}=e;a=n}return{..."floating"===n&&{tabIndex:-1,[to]:""},...a,...t.map(t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>t?(Object.entries(t).forEach(t=>{let[n,a]=t;var i;o&&[vo,xo].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof a&&(null==(i=r.get(n))||i.push(a),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return null==(e=r.get(n))?void 0:e.map(e=>e(...o)).find(e=>void 0!==e)})):e[n]=a)}),e):e,{})}}function Eo(e){void 0===e&&(e=[]);const t=e.map(e=>null==e?void 0:e.reference),n=e.map(e=>null==e?void 0:e.floating),r=e.map(e=>null==e?void 0:e.item),o=w.useCallback(t=>No(t,e,"reference"),t),a=w.useCallback(t=>No(t,e,"floating"),n),i=w.useCallback(t=>No(t,e,"item"),r);return w.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}let Mo=!1;function _o(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Io(e,t){return _o(t,e===nr||e===rr,e===or||e===ar)}function So(e,t,n){return _o(t,e===rr,n?e===or:e===ar)||"Enter"===e||" "===e||""===e}function jo(e,t,n){return _o(t,n?e===ar:e===or,e===nr)}function ko(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:a,activeIndex:i,onNavigate:s=()=>{},enabled:l=!0,selectedIndex:c=null,allowEscape:u=!1,loop:d=!1,nested:f=!1,rtl:p=!1,virtual:m=!1,focusItemOnOpen:h="auto",focusItemOnHover:g=!0,openOnArrowKeyDown:y=!0,disabledIndices:b,orientation:v="vertical",cols:x=1,scrollItemIntoView:N=!0,virtualItemRef:E,itemSizes:M,dense:_=!1}=t,I=kr(no(o.floating)),S=Ir(),j=Sr(),k=tr(s),D=Tt(o.domReference),C=w.useRef(h),A=w.useRef(null!=c?c:-1),T=w.useRef(null),O=w.useRef(!0),L=w.useRef(k),z=w.useRef(!!o.floating),P=w.useRef(n),R=w.useRef(!1),U=w.useRef(!1),B=kr(b),F=kr(n),Y=kr(N),Z=kr(c),[Q,V]=w.useState(),[W,G]=w.useState(),H=tr(function(e,t,n){function r(e){m?(V(e.id),null==j||j.events.emit("virtualfocus",e),E&&(E.current=e)):Tr(e,{preventScroll:!0,sync:!(!It()||!Mt())&&(Mo||R.current)})}void 0===n&&(n=!1);const o=e.current[t.current];o&&r(o),requestAnimationFrame(()=>{const a=e.current[t.current]||o;if(!a)return;o||r(a);const i=Y.current;i&&X&&(n||!O.current)&&(null==a.scrollIntoView||a.scrollIntoView("boolean"==typeof i?{block:"nearest",inline:"nearest"}:i))})});mr(()=>{document.createElement("div").focus({get preventScroll(){return Mo=!0,!1}})},[]),mr(()=>{l&&(n&&o.floating?C.current&&null!=c&&(U.current=!0,A.current=c,k(c)):z.current&&(A.current=-1,L.current(null)))},[l,n,o.floating,c,k]),mr(()=>{if(l&&n&&o.floating)if(null==i){if(R.current=!1,null!=Z.current)return;if(z.current&&(A.current=-1,H(a,A)),(!P.current||!z.current)&&C.current&&(null!=T.current||!0===C.current&&null==T.current)){let e=0;const t=()=>{null==a.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e++):(A.current=null==T.current||So(T.current,v,p)||f?lr(a,B.current):cr(a,B.current),T.current=null,k(A.current))};t()}}else sr(a,i)||(A.current=i,H(a,A,U.current),U.current=!1)},[l,n,o.floating,i,Z,f,a,v,p,k,H,B]),mr(()=>{var e;if(!l||o.floating||!j||m||!z.current)return;const t=j.nodesRef.current,n=null==(e=t.find(e=>e.id===S))||null==(e=e.context)?void 0:e.elements.floating,r=wt(jt(o.floating)),a=t.some(e=>e.context&&bt(e.context.elements.floating,r));n&&!a&&O.current&&n.focus({preventScroll:!0})},[l,o.floating,j,S,m]),mr(()=>{if(l&&j&&m&&!S)return j.events.on("virtualfocus",e),()=>{j.events.off("virtualfocus",e)};function e(e){G(e.id),E&&(E.current=e)}},[l,j,m,S,E]),mr(()=>{L.current=k,z.current=!!o.floating}),mr(()=>{n||(T.current=null)},[n]),mr(()=>{P.current=n},[n]);const $=null!=i,X=w.useMemo(()=>{function e(e){if(!n)return;const t=a.current.indexOf(e);-1!==t&&k(t)}const t={onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...g&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;O.current&&"touch"!==t&&(A.current=-1,H(a,A),k(null),m||Tr(I.current,{preventScroll:!0}))}}};return t},[n,I,H,g,a,k,m]),q=tr(e=>{if(O.current=!1,R.current=!0,229===e.which)return;if(!F.current&&e.currentTarget===I.current)return;if(f&&jo(e.key,v,p))return At(e),r(!1,e.nativeEvent,"list-navigation"),void(et(o.domReference)&&(m?null==j||j.events.emit("virtualfocus",o.domReference):o.domReference.focus()));const t=A.current,i=lr(a,b),s=cr(a,b);if(D||("Home"===e.key&&(At(e),A.current=i,k(A.current)),"End"===e.key&&(At(e),A.current=s,k(A.current))),x>1){const t=M||Array.from({length:a.current.length},()=>({width:1,height:1})),n=function(e,t,n){const r=[];let o=0;return e.forEach((e,a)=>{let{width:i,height:s}=e,l=!1;for(n&&(o=0);!l;){const e=[];for(let n=0;n<i;n++)for(let r=0;r<s;r++)e.push(o+n+r*t);o%t+i<=t&&e.every(e=>null==r[e])?(e.forEach(e=>{r[e]=a}),l=!0):o++}}),[...r]}(t,x,_),r=n.findIndex(e=>null!=e&&!pr(a.current,e,b)),o=n.reduce((e,t,n)=>null==t||pr(a.current,t,b)?e:n,-1),l=n[function(e,t){let{event:n,orientation:r,loop:o,rtl:a,cols:i,disabledIndices:s,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}=t,f=u;if(n.key===nr){if(d&&At(n),-1===u)f=c;else if(f=ur(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(u-i<l||f<0)){const e=u%i,t=c%i,n=c-(t-e);f=t===e?c:t>e?n:n-i}sr(e,f)&&(f=u)}if(n.key===rr&&(d&&At(n),-1===u?f=l:(f=ur(e,{startingIndex:u,amount:i,disabledIndices:s}),o&&u+i>c&&(f=ur(e,{startingIndex:u%i-i,amount:i,disabledIndices:s}))),sr(e,f)&&(f=u)),"both"===r){const t=Pt(u/i);n.key===(a?or:ar)&&(d&&At(n),u%i!==i-1?(f=ur(e,{startingIndex:u,disabledIndices:s}),o&&ir(f,i,t)&&(f=ur(e,{startingIndex:u-u%i-1,disabledIndices:s}))):o&&(f=ur(e,{startingIndex:u-u%i-1,disabledIndices:s})),ir(f,i,t)&&(f=u)),n.key===(a?ar:or)&&(d&&At(n),u%i!==0?(f=ur(e,{startingIndex:u,decrement:!0,disabledIndices:s}),o&&ir(f,i,t)&&(f=ur(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:s}))):o&&(f=ur(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:s})),ir(f,i,t)&&(f=u));const r=Pt(c/i)===t;sr(e,f)&&(f=o&&r?n.key===(a?ar:or)?c:ur(e,{startingIndex:u-u%i-1,disabledIndices:s}):u)}return f}({current:n.map(e=>null!=e?a.current[e]:null)},{event:e,orientation:v,loop:d,rtl:p,cols:x,disabledIndices:fr([...b||a.current.map((e,t)=>pr(a.current,t)?t:void 0),void 0],n),minIndex:r,maxIndex:o,prevIndex:dr(A.current>s?i:A.current,t,n,x,e.key===rr?"bl":e.key===(p?or:ar)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(A.current=l,k(A.current)),"both"===v)return}if(Io(e.key,v)){if(At(e),n&&!m&&wt(e.currentTarget.ownerDocument)===e.currentTarget)return A.current=So(e.key,v,p)?i:s,void k(A.current);So(e.key,v,p)?A.current=d?t>=s?u&&t!==a.current.length?-1:i:ur(a,{startingIndex:t,disabledIndices:b}):Math.min(s,ur(a,{startingIndex:t,disabledIndices:b})):A.current=d?t<=i?u&&-1!==t?a.current.length:s:ur(a,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(i,ur(a,{startingIndex:t,decrement:!0,disabledIndices:b})),sr(a,A.current)?k(null):k(A.current)}}),J=w.useMemo(()=>m&&n&&$&&{"aria-activedescendant":W||Q},[m,n,$,W,Q]),K=w.useMemo(()=>({"aria-orientation":"both"===v?void 0:v,...!Tt(o.domReference)&&J,onKeyDown:q,onPointerMove(){O.current=!0}}),[J,q,o.domReference,v]),ee=w.useMemo(()=>{function e(e){"auto"===h&&Nt(e.nativeEvent)&&(C.current=!0)}return{...J,onKeyDown(e){O.current=!1;const t=e.key.startsWith("Arrow"),o=["Home","End"].includes(e.key),i=t||o,s=function(e,t,n){return _o(t,n?e===or:e===ar,e===rr)}(e.key,v,p),l=jo(e.key,v,p),u=Io(e.key,v),d=(f?s:u)||"Enter"===e.key||""===e.key.trim();if(m&&n){const t=null==j?void 0:j.nodesRef.current.find(e=>null==e.parentId),n=j&&t?function(e,t){let n,r=-1;return function t(o,a){a>r&&(n=o,r=a),Or(e,o).forEach(e=>{t(e.id,a+1)})}(t,0),e.find(e=>e.id===n)}(j.nodesRef.current,t.id):null;if(i&&n&&E){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(s||l){var h,g;const r=(null==(h=n.context)?void 0:h.elements.domReference)===e.currentTarget,o=l&&!r?null==(g=n.context)?void 0:g.elements.domReference:s?a.current.find(e=>(null==e?void 0:e.id)===Q):null;o&&(At(e),o.dispatchEvent(t),G(void 0))}var w;if((u||o)&&n.context&&n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return At(e),void(null==(w=n.context.elements.domReference)||w.dispatchEvent(t))}return q(e)}(n||y||!t)&&(d&&(T.current=f&&u?null:e.key),f?s&&(At(e),n?(A.current=lr(a,B.current),k(A.current)):r(!0,e.nativeEvent,"list-navigation")):u&&(null!=c&&(A.current=c),At(e),!n&&y?r(!0,e.nativeEvent,"list-navigation"):q(e),n&&k(A.current)))},onFocus(){n&&!m&&k(null)},onPointerDown:function(e){C.current=h,"auto"===h&&Et(e.nativeEvent)&&(C.current=!0)},onMouseDown:e,onClick:e}},[Q,J,q,B,h,a,f,k,r,n,y,v,p,c,j,m,E]);return w.useMemo(()=>l?{reference:ee,floating:K,item:X}:{},[l,ee,K,X])}const Do=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Co(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:a=!0,role:i="dialog"}=t,s=null!=(n=Do.get(i))?n:i,l=Nr(),c=null!=Ir(),u=w.useMemo(()=>"tooltip"===s||"label"===i?{["aria-"+("label"===i?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===s?"dialog":s,"aria-controls":r?o:void 0,..."listbox"===s&&{role:"combobox"},..."menu"===s&&{id:l},..."menu"===s&&c&&{role:"menuitem"},..."select"===i&&{"aria-autocomplete":"none"},..."combobox"===i&&{"aria-autocomplete":"list"}},[s,o,c,r,l,i]),d=w.useMemo(()=>{const e={id:o,...s&&{role:s}};return"tooltip"===s||"label"===i?e:{...e,..."menu"===s&&{"aria-labelledby":l}}},[s,o,l,i]),f=w.useCallback(e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:o+"-option"}};switch(i){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}},[o,i]);return w.useMemo(()=>a?{reference:u,floating:d,item:f}:{},[a,u,d,f])}const Ao=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function To(e,t){return"function"==typeof e?e(t):e}function Oo(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:a,duration:i=250}=t,s=e.placement,l=s.split("-")[0],c=w.useMemo(()=>({side:l,placement:s}),[l,s]),u="number"==typeof i,d=(u?i:i.open)||0,f=(u?i:i.close)||0,[p,m]=w.useState(()=>({...To(a,c),...To(n,c)})),{isMounted:h,status:g}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:r}}=e,{duration:o=250}=t,a=("number"==typeof o?o:o.close)||0,[i,s]=w.useState("unmounted"),l=function(e,t){const[n,r]=w.useState(e);return e&&!n&&r(!0),w.useEffect(()=>{if(!e&&n){const e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,a);return l||"close"!==i||s("unmounted"),mr(()=>{if(r){if(n){s("initial");const e=requestAnimationFrame(()=>{s("open")});return()=>{cancelAnimationFrame(e)}}s("close")}},[n,r]),{isMounted:l,status:i}}(e,{duration:i}),y=kr(n),b=kr(r),v=kr(o),x=kr(a);return mr(()=>{const e=To(y.current,c),t=To(v.current,c),n=To(x.current,c),r=To(b.current,c)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===g&&m(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===g&&m({transitionProperty:Object.keys(r).map(Ao).join(","),transitionDuration:d+"ms",...n,...r}),"close"===g){const r=t||e;m({transitionProperty:Object.keys(r).map(Ao).join(","),transitionDuration:f+"ms",...n,...r})}},[f,v,y,b,x,d,g,c]),{isMounted:h,styles:p}}function Lo(e,t){const[n,r]=e;let o=!1;const a=t.length;for(let e=0,i=a-1;e<a;i=e++){const[a,s]=t[e]||[0,0],[l,c]=t[i]||[0,0];s>=r!=c>=r&&n<=(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}function zo(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,a=!1,i=null,s=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:f,nodeId:p,tree:m}=e;return function(e){function h(){clearTimeout(o),f()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:y}=e,w=[g,y],b=Dt(e),v="mouseleave"===e.type,x=bt(d.floating,b),N=bt(d.domReference,b),E=d.domReference.getBoundingClientRect(),M=d.floating.getBoundingClientRect(),_=u.split("-")[0],I=n>M.right-M.width/2,S=c>M.bottom-M.height/2,j=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(w,E),k=M.width>E.width,D=M.height>E.height,C=(k?E:M).left,A=(k?E:M).right,T=(D?E:M).top,O=(D?E:M).bottom;if(x&&(a=!0,!v))return;if(N&&(a=!1),N&&!v)return void(a=!0);if(v&&Ke(e.relatedTarget)&&bt(d.floating,e.relatedTarget))return;if(m&&Or(m.nodesRef.current,p).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===_&&c>=E.bottom-1||"bottom"===_&&c<=E.top+1||"left"===_&&n>=E.right-1||"right"===_&&n<=E.left+1)return h();let L=[];switch(_){case"top":L=[[C,E.top+1],[C,M.bottom-1],[A,M.bottom-1],[A,E.top+1]];break;case"bottom":L=[[C,M.top+1],[C,E.bottom-1],[A,E.bottom-1],[A,M.top+1]];break;case"left":L=[[M.right-1,O],[M.right-1,T],[E.left+1,T],[E.left+1,O]];break;case"right":L=[[E.right-1,O],[E.right-1,T],[M.left+1,T],[M.left+1,O]]}if(!Lo([g,y],L)){if(a&&!j)return h();if(!v&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===i||null===s||0===r)return i=e,s=t,l=n,null;const o=e-i,a=t-s,c=Math.sqrt(o*o+a*a);return i=e,s=t,l=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return h()}Lo([g,y],function(e){let[n,r]=e;switch(_){case"top":return[[k?n+t/2:I?n+4*t:n-4*t,r+t+1],[k?n-t/2:I?n+4*t:n-4*t,r+t+1],[M.left,I||k?M.bottom-t:M.top],[M.right,I?k?M.bottom-t:M.top:M.bottom-t]];case"bottom":return[[k?n+t/2:I?n+4*t:n-4*t,r-t],[k?n-t/2:I?n+4*t:n-4*t,r-t],[M.left,I||k?M.top+t:M.bottom],[M.right,I?k?M.top+t:M.bottom:M.top+t]];case"left":{const e=[n+t+1,D?r+t/2:S?r+4*t:r-4*t],o=[n+t+1,D?r-t/2:S?r+4*t:r-4*t];return[[S||D?M.right-t:M.left,M.top],[S?D?M.right-t:M.left:M.right-t,M.bottom],e,o]}case"right":return[[n-t,D?r+t/2:S?r+4*t:r-4*t],[n-t,D?r-t/2:S?r+4*t:r-4*t],[S||D?M.left+t:M.right,M.top],[S?D?M.left+t:M.right:M.left+t,M.bottom]]}}([n,c]))?!a&&r&&(o=window.setTimeout(h,40)):h()}}};return c.__options={blockPointerEvents:n},c}const Po=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ro=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var Uo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Bo=(0,w.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>(0,w.createElement)("svg",{ref:l,...Uo,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Ro("lucide",o),...s},[...i.map(([e,t])=>(0,w.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Fo=(e,t)=>{const n=(0,w.forwardRef)(({className:n,...r},o)=>(0,w.createElement)(Bo,{ref:o,iconNode:t,className:Ro(`lucide-${Po(e)}`,n),...r}));return n.displayName=`${e}`,n},Yo=Fo("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Zo=Fo("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Qo=Fo("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Vo=Fo("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),Wo=(0,w.forwardRef)((e,t)=>{const{variant:n="primary",size:r="md",type:o="button",tag:a="button",className:i,children:s,disabled:l=!1,destructive:c=!1,icon:u=null,iconPosition:d="left",loading:f=!1,...p}=e,m=c&&"focus:ring-focus-error",h=f?"opacity-50 disabled:cursor-not-allowed":"",g={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover shadow-xs disabled:shadow-none focus:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover shadow-xs focus:shadow-none disabled:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary shadow-sm focus:shadow-none hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],y=c&&!l?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[n]:"",b={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[r];let v,x=null,N="";return u&&(N="flex items-center justify-center","left"===d?v=u:x=u),(0,R.jsxs)(a,{ref:t,type:o,className:Le(N,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",b,g,y,m,h,{"cursor-default":l},i),disabled:l,"aria-disabled":l,...f&&{"aria-busy":!0},...p,children:[(0,R.jsx)(w.Fragment,{children:v},"left-icon"),s?(0,R.jsx)("span",{className:"px-1",children:s}):null,(0,R.jsx)(w.Fragment,{children:x},"right-icon")]})});Wo.displayName="Button";const Go="light",Ho="neutral",$o=({icon:e,theme:t=Go,variant:n=Ho})=>{const r="[&>svg]:h-5 [&>svg]:w-5",o=(({theme:e=Go,variant:t=Ho})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:t,variant:n});if(e&&(0,w.isValidElement)(e))return(0,w.cloneElement)(e,{className:Le(r,o,e?.props?.className??"")});const a={neutral:(0,R.jsx)(Yo,{className:Le(r,o)}),info:(0,R.jsx)(Yo,{className:Le(r,o)}),success:(0,R.jsx)(Zo,{className:Le(r,o)}),warning:(0,R.jsx)(Qo,{className:Le(r,o)}),error:(0,R.jsx)(Vo,{className:Le(r,o)})};return a[n]||a.neutral},Xo=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=Go})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let a="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(a="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,R.jsx)(Wo,{variant:"outline",size:"xs",onClick:t,className:Le("rounded",o,a,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,R.jsx)(Wo,{variant:"link",size:"xs",onClick:t,className:Le(o,a),children:n});default:return null}},qo=({theme:e=Go,title:t="",inline:n=!1})=>t?(0,R.jsx)("span",{className:Le("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,Jo=({theme:e=Go,content:t="",inline:n=!1})=>t?(0,R.jsx)("span",{className:Le({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal [word-break:break-word]",n?"inline":"block"),children:t}):null,Ko=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},ea=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:o=!1,open:a,setOpen:i,children:s,className:l,tooltipPortalRoot:c,tooltipPortalId:u,boundary:d="clippingAncestors",strategy:f="fixed",offset:p=8,triggers:m=["hover","focus"],interactive:h=!1})=>{const g=(0,w.useMemo)(()=>"boolean"==typeof a&&"function"==typeof i,[a,i]),[y,b]=(0,w.useState)(!1),v=(0,w.useRef)(null),{refs:x,floatingStyles:N,context:E}=bo({open:g?a:y,onOpenChange:g?i:b,placement:t,strategy:f,middleware:[Hn(p),Xn({boundary:d}),$n({boundary:d}),Jn({element:v})],whileElementsMounted:Un}),M=mo(E,{enabled:!g&&m.includes("click")}),_=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:a,elements:i}=e,{enabled:s=!0,delay:l=0,handleClose:c=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Sr(),m=Ir(),h=kr(c),g=kr(l),y=kr(n),b=w.useRef(),v=w.useRef(-1),x=w.useRef(),N=w.useRef(-1),E=w.useRef(!0),M=w.useRef(!1),_=w.useRef(()=>{}),I=w.useRef(!1),S=w.useCallback(()=>{var e;const t=null==(e=o.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t},[o]);w.useEffect(()=>{if(s)return a.on("openchange",e),()=>{a.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(v.current),clearTimeout(N.current),E.current=!0,I.current=!1)}},[s,a]),w.useEffect(()=>{if(!s)return;if(!h.current)return;if(!n)return;function e(e){S()&&r(!1,e,"hover")}const t=jt(i.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[i.floating,n,r,s,h,S]);const j=w.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Cr(g.current,"close",b.current);o&&!x.current?(clearTimeout(v.current),v.current=window.setTimeout(()=>r(!1,e,n),o)):t&&(clearTimeout(v.current),r(!1,e,n))},[g,r]),k=tr(()=>{_.current(),x.current=void 0}),D=tr(()=>{if(M.current){const e=jt(i.floating).body;e.style.pointerEvents="",e.removeAttribute(Dr),M.current=!1}}),C=tr(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));w.useEffect(()=>{if(s&&Ke(i.domReference)){var e;const r=i.domReference;return n&&r.addEventListener("mouseleave",l),null==(e=i.floating)||e.addEventListener("mouseleave",l),f&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",a),()=>{var e;n&&r.removeEventListener("mouseleave",l),null==(e=i.floating)||e.removeEventListener("mouseleave",l),f&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",a)}}function t(e){if(clearTimeout(v.current),E.current=!1,u&&!St(b.current)||d>0&&!Cr(g.current,"open"))return;const t=Cr(g.current,"open",b.current);t?v.current=window.setTimeout(()=>{y.current||r(!0,e,"hover")},t):n||r(!0,e,"hover")}function a(e){if(C())return;_.current();const t=jt(i.floating);if(clearTimeout(N.current),I.current=!1,h.current&&o.current.floatingContext){n||clearTimeout(v.current),x.current=h.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){D(),k(),C()||j(e,!0,"safe-polygon")}});const r=x.current;return t.addEventListener("mousemove",r),void(_.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!bt(i.floating,e.relatedTarget))&&j(e)}function l(e){C()||o.current.floatingContext&&(null==h.current||h.current({...o.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){D(),k(),C()||j(e)}})(e))}},[i,s,e,u,d,f,j,k,D,r,n,y,p,g,h,o,C]),mr(()=>{var e;if(s&&n&&null!=(e=h.current)&&e.__options.blockPointerEvents&&S()){M.current=!0;const e=i.floating;if(Ke(i.domReference)&&e){var t;const n=jt(i.floating).body;n.setAttribute(Dr,"");const r=i.domReference,o=null==p||null==(t=p.nodesRef.current.find(e=>e.id===m))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}},[s,n,m,i,p,h,S]),mr(()=>{n||(b.current=void 0,I.current=!1,k(),D())},[n,k,D]),w.useEffect(()=>()=>{k(),clearTimeout(v.current),clearTimeout(N.current),D()},[s,i.domReference,k,D]);const A=w.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){E.current||y.current||r(!0,t,"hover")}u&&!St(b.current)||n||0===d||I.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(N.current),"touch"===b.current?o():(I.current=!0,N.current=window.setTimeout(o,d)))}}},[u,r,n,y,d]),T=w.useMemo(()=>({onMouseEnter(){clearTimeout(v.current)},onMouseLeave(e){C()||j(e.nativeEvent,!1)}}),[j,C]);return w.useMemo(()=>s?{reference:A,floating:T}:{},[s,A,T])}(E,{move:!1,enabled:!g&&m.includes("hover"),...h&&{handleClose:zo()}}),I=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:a,elements:i}=e,{enabled:s=!0,visibleOnly:l=!0}=t,c=w.useRef(!1),u=w.useRef(),d=w.useRef(!0);w.useEffect(()=>{if(!s)return;const e=Xe(i.domReference);function t(){!n&&et(i.domReference)&&i.domReference===wt(jt(i.domReference))&&(c.current=!0)}function r(){d.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}},[i.domReference,n,s]),w.useEffect(()=>{if(s)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(c.current=!0)}},[o,s]),w.useEffect(()=>()=>{clearTimeout(u.current)},[]);const f=w.useMemo(()=>({onPointerDown(e){Et(e.nativeEvent)||(d.current=!1)},onMouseLeave(){c.current=!1},onFocus(e){if(c.current)return;const t=Dt(e.nativeEvent);if(l&&Ke(t))try{if(Mt()&&It())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!d.current&&!Ct(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){c.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=Ke(t)&&t.hasAttribute(jr("focus-guard"))&&"outside"===t.getAttribute("data-type");u.current=window.setTimeout(()=>{var e;const s=wt(i.domReference?i.domReference.ownerDocument:document);(t||s!==i.domReference)&&(bt(null==(e=a.current.floatingContext)?void 0:e.refs.floating.current,s)||bt(i.domReference,s)||o||r(!1,n,"focus"))})}}),[a,i.domReference,r,l]);return w.useMemo(()=>s?{reference:f}:{},[s,f])}(E,{enabled:!g&&m.includes("focus")}),S=wo(E),j=Co(E,{role:"tooltip"}),{getReferenceProps:k,getFloatingProps:D}=Eo([M,_,I,S,j]),{isMounted:C,styles:A}=Oo(E,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),T={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],O="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";return(0,R.jsxs)(w.Fragment,{children:[(0,w.isValidElement)(s)&&(0,R.jsx)(w.Fragment,{children:(0,w.cloneElement)(s,{ref:Ko(s.ref,x.setReference),className:Le(s.props.className),...k()})},"tooltip-reference"),(0,R.jsx)(Kr,{id:u,root:c,children:C&&(0,R.jsxs)("div",{className:Le("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",T,"max-w-80 w-fit",l),ref:x.setFloating,style:{...N,...A},...D(),children:[(0,R.jsxs)("div",{children:[!!n&&(0,R.jsx)("span",{className:"font-semibold",children:n},"tooltip-title"),!!r&&(0,R.jsx)("div",{className:"font-normal",children:r},"tooltip-content")]}),o&&(0,R.jsx)(Er,{ref:v,context:E,className:Le("fill-current",O)})]})})]})};ea.displayName="Tooltip";const ta=Fo("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),na=(0,w.forwardRef)(({label:e="",size:t="sm",className:n="",type:r="pill",variant:o="neutral",icon:a=null,disabled:i=!1,onClose:s=()=>{},closable:l=!1,onMouseDown:c=()=>{},disableHover:u=!1},d)=>{const f={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let p="",m="group relative justify-center flex items-center cursor-pointer";const h={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return i?(p=f.disabled,m+=" cursor-not-allowed disabled"):p=f[o],e?(0,R.jsxs)("span",{className:Le("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",p,!u&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[o],n),ref:d,children:[a?(0,R.jsx)("span",{className:Le("justify-center flex items-center",h[t]),children:a}):null,(0,R.jsx)("span",{className:"px-1 truncate inline-block",children:e}),l&&(0,R.jsxs)("button",{type:"button",className:Le(m,h[t],"bg-transparent border-none p-0 m-0"),onMouseDown:c,"aria-label":`Remove ${e}`,disabled:i,...!i&&{onClick:s},children:[(0,R.jsx)(ta,{"aria-hidden":"true"}),(0,R.jsx)("span",{className:"absolute -inset-1"})]})]}):null});na.displayName="Badge";const ra=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],oa=(()=>new Set([...ra,"pathRotation"]))(),aa=(e,t,n)=>n>t?t:n<e?e:n,ia={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},sa={...ia,transform:e=>aa(0,1,e)},la={...ia,default:1},ca=e=>Math.round(1e5*e)/1e5,ua=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,da=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,fa=(e,t)=>n=>Boolean("string"==typeof n&&da.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),pa=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,a,i,s]=r.match(ua);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},ma={...ia,transform:e=>Math.round((e=>aa(0,255,e))(e))},ha={test:fa("rgb","red"),parse:pa("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ma.transform(e)+", "+ma.transform(t)+", "+ma.transform(n)+", "+ca(sa.transform(r))+")"},ga={test:fa("#"),parse:function(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:ha.transform},ya=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),wa=ya("deg"),ba=ya("%"),va=ya("px"),xa=ya("vh"),Na=ya("vw"),Ea=(()=>({...ba,parse:e=>ba.parse(e)/100,transform:e=>ba.transform(100*e)}))(),Ma={test:fa("hsl","hue"),parse:pa("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+ba.transform(ca(t))+", "+ba.transform(ca(n))+", "+ca(sa.transform(r))+")"},_a={test:e=>ha.test(e)||ga.test(e)||Ma.test(e),parse:e=>ha.test(e)?ha.parse(e):Ma.test(e)?Ma.parse(e):ga.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?ha.transform(e):Ma.transform(e),getAnimatableNone:e=>{const t=_a.parse(e);return t.alpha=0,_a.transform(t)}},Ia=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Sa="number",ja="color",ka=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Da(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;const i=t.replace(ka,e=>(_a.test(e)?(r.color.push(a),o.push(ja),n.push(_a.parse(e))):e.startsWith("var(")?(r.var.push(a),o.push("var"),n.push(e)):(r.number.push(a),o.push(Sa),n.push(parseFloat(e))),++a,"${}")).split("${}");return{values:n,split:i,indexes:r,types:o}}function Ca({split:e,types:t}){const n=e.length;return r=>{let o="";for(let a=0;a<n;a++)if(o+=e[a],void 0!==r[a]){const e=t[a];o+=e===Sa?ca(r[a]):e===ja?_a.transform(r[a]):r[a]}return o}}const Aa={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(ua)?.length||0)+(e.match(Ia)?.length||0)>0},parse:function(e){return Da(e).values},createTransformer:function(e){return Ca(Da(e))},getAnimatableNone:function(e){const t=Da(e);return Ca(t)(t.values.map((e,n)=>((e,t)=>{return"number"==typeof e?t?.trim().endsWith("/")?e:0:"number"==typeof(n=e)?0:_a.test(n)?_a.getAnimatableNone(n):n;var n})(e,t.split[n])))}},Ta=new Set(["brightness","contrast","saturate","opacity"]);function Oa(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ua)||[];if(!r)return e;const o=n.replace(r,"");let a=Ta.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const La=/\b([a-z-]*)\(.*?\)/gu,za={...Aa,getAnimatableNone:e=>{const t=e.match(La);return t?t.map(Oa).join(" "):e}},Pa={...Aa,getAnimatableNone:e=>{const t=Aa.parse(e);return Aa.createTransformer(e)(t.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}},Ra={...ia,transform:Math.round},Ua={borderWidth:va,borderTopWidth:va,borderRightWidth:va,borderBottomWidth:va,borderLeftWidth:va,borderRadius:va,borderTopLeftRadius:va,borderTopRightRadius:va,borderBottomRightRadius:va,borderBottomLeftRadius:va,width:va,maxWidth:va,height:va,maxHeight:va,top:va,right:va,bottom:va,left:va,inset:va,insetBlock:va,insetBlockStart:va,insetBlockEnd:va,insetInline:va,insetInlineStart:va,insetInlineEnd:va,padding:va,paddingTop:va,paddingRight:va,paddingBottom:va,paddingLeft:va,paddingBlock:va,paddingBlockStart:va,paddingBlockEnd:va,paddingInline:va,paddingInlineStart:va,paddingInlineEnd:va,margin:va,marginTop:va,marginRight:va,marginBottom:va,marginLeft:va,marginBlock:va,marginBlockStart:va,marginBlockEnd:va,marginInline:va,marginInlineStart:va,marginInlineEnd:va,fontSize:va,backgroundPositionX:va,backgroundPositionY:va,rotate:wa,pathRotation:wa,rotateX:wa,rotateY:wa,rotateZ:wa,scale:la,scaleX:la,scaleY:la,scaleZ:la,skew:wa,skewX:wa,skewY:wa,distance:va,translateX:va,translateY:va,translateZ:va,x:va,y:va,z:va,perspective:va,transformPerspective:va,opacity:sa,originX:Ea,originY:Ea,originZ:va,zIndex:Ra,fillOpacity:sa,strokeOpacity:sa,numOctaves:Ra},Ba={...Ua,color:_a,backgroundColor:_a,outlineColor:_a,fill:_a,stroke:_a,borderColor:_a,borderTopColor:_a,borderRightColor:_a,borderBottomColor:_a,borderLeftColor:_a,filter:za,WebkitFilter:za,mask:Pa,WebkitMask:Pa},Fa=e=>Ba[e],Ya=()=>({x:{min:0,max:0},y:{min:0,max:0}}),Za=e=>Boolean(e&&e.getVelocity),Qa=new Set(["width","height","top","left","right","bottom",...ra]),Va=e=>t=>t.test(e),Wa=[ia,va,ba,wa,Na,xa,{test:e=>"auto"===e,parse:e=>e}],Ga=e=>Wa.find(Va(e)),Ha=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),$a=e=>t=>"string"==typeof t&&t.startsWith(e),Xa=$a("--"),qa=$a("var(--"),Ja=e=>!!qa(e)&&Ka.test(e.split("/*")[0].trim()),Ka=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ei(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}const ti=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function ni(e,t,n=1){const[r,o]=function(e){const t=ti.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return Ha(e)?parseFloat(e):e}return Ja(o)?ni(o,t,n+1):o}const ri=e=>180*e/Math.PI,oi=e=>{const t=ri(Math.atan2(e[1],e[0]));return ii(t)},ai={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:oi,rotateZ:oi,skewX:e=>ri(Math.atan(e[1])),skewY:e=>ri(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},ii=e=>((e%=360)<0&&(e+=360),e),si=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),li=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ci={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:si,scaleY:li,scale:e=>(si(e)+li(e))/2,rotateX:e=>ii(ri(Math.atan2(e[6],e[5]))),rotateY:e=>ii(ri(Math.atan2(-e[2],e[0]))),rotateZ:oi,rotate:oi,skewX:e=>ri(Math.atan(e[4])),skewY:e=>ri(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ui(e){return e.includes("scale")?1:0}function di(e,t){if(!e||"none"===e)return ui(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=ci,o=n;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=ai,o=t}if(!o)return ui(t);const a=r[t],i=o[1].split(",").map(fi);return"function"==typeof a?a(i):i[a]}function fi(e){return parseFloat(e.trim())}const pi=e=>e===ia||e===va,mi=new Set(["x","y","z"]),hi=ra.filter(e=>!mi.has(e)),gi={width:({x:e},{paddingLeft:t="0",paddingRight:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t="0",paddingBottom:n="0",boxSizing:r})=>{const o=e.max-e.min;return"border-box"===r?o:o-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>di(t,"x"),y:(e,{transform:t})=>di(t,"y")};gi.translateX=gi.x,gi.translateY=gi.y;const yi=e=>e,wi={},bi=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function vi(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,i=bi.reduce((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const a=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(l.schedule(t),e()),t(i)}const l={schedule:(e,o=!1,i=!1)=>{const s=i&&r?t:n;return o&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(i=e,r)return void(o=!0);r=!0;const a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e))}};return l}(a),e),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=i,h=()=>{const a=wi.useManualTiming,i=a?o.timestamp:performance.now();n=!1,a||(o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1)),o.timestamp=i,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(h))};return{schedule:bi.reduce((t,a)=>{const s=i[a];return t[a]=(t,a=!1,i=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(h)),s.schedule(t,a,i)),t},{}),cancel:e=>{for(let t=0;t<bi.length;t++)i[bi[t]].cancel(e)},state:o,steps:i}}const{schedule:xi,cancel:Ni,state:Ei,steps:Mi}=vi("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:yi,!0),_i=new Set;let Ii=!1,Si=!1,ji=!1;function ki(){if(Si){const e=Array.from(_i).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{const t=function(e){const t=[];return hi.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}Si=!1,Ii=!1,_i.forEach(e=>e.complete(ji)),_i.clear()}function Di(){_i.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Si=!0)})}class Ci{constructor(e,t,n,r,o,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(_i.add(this),Ii||(Ii=!0,xi.read(Di),xi.resolveKeyframes(ki))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const o=r?.get(),a=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,a);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=a),r&&void 0===o&&r.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),_i.delete(this)}cancel(){"scheduled"===this.state&&(_i.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const Ai=e=>/^0[^.\s]+$/u.test(e);function Ti(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||Ai(e)}const Oi=new Set([za,Pa]);function Li(e,t){let n=Fa(e);return Oi.has(n)||(n=Aa),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const zi=new Set(["auto","none","0"]);class Pi extends Ci{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Ja(r))){const o=ni(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Qa.has(n)||2!==e.length)return;const[r,o]=e,a=Ga(r),i=Ga(o);if(ei(r)!==ei(o)&&gi[n])this.needsMeasurement=!0;else if(a!==i)if(pi(a)&&pi(i))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else gi[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(null===e[t]||Ti(e[t]))&&n.push(t);n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!zi.has(t)&&Da(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=Li(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=gi[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){const{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;const r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);const o=n.length-1,a=n[o];n[o]=gi[t](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const Ri=e=>1e3*e,Ui=e=>e/1e3;function Bi(e,t){-1===e.indexOf(t)&&e.push(t)}function Fi(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Yi{constructor(){this.subscriptions=[]}add(e){return Bi(this.subscriptions,e),()=>Fi(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Zi(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}function Qi(e){let t;return()=>(void 0===t&&(t=e()),t)}const Vi={};function Wi(e,t){const n=Qi(e);return()=>Vi[t]??n()}const Gi=Wi(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Hi=e=>null!==e;function $i(e,{repeat:t,repeatType:n="loop"},r,o=1){const a=e.filter(Hi),i=o<0||t&&"loop"!==n&&t%2==1?0:a.length-1;return i&&void 0!==r?r:a[i]}class Xi{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const qi=e=>Array.isArray(e)&&"number"==typeof e[0],Ji=Wi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),Ki=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=Math.round(1e4*e(t/(o-1)))/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},es=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ts={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:es([0,.65,.55,1]),circOut:es([.55,0,1,.45]),backIn:es([.31,.01,.66,-.59]),backOut:es([.33,1.53,.69,.99])};function ns(e,t){return e?"function"==typeof e?Ji()?Ki(e,t):"ease-out":qi(e)?es(e):Array.isArray(e)?e.map(e=>ns(e,t)||ts.easeOut):ts[e]:void 0}function rs(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=ns(s,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===i?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function os(e){return"function"==typeof e&&"applyToOptions"in e}class as extends Xi{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:o,allowFlatten:a=!1,finalKeyframe:i,onComplete:s}=e;this.isPseudoElement=Boolean(o),this.allowFlatten=a,this.options=e,e.type;const l=function({type:e,...t}){return os(e)&&Ji()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=rs(t,n,r,l,o),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const e=$i(r,this.options,i,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Zi(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return Ui(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ui(e)}get time(){return Ui(Number(this.animation.currentTime)||0)}set time(e){const t=null!==this.finishedTime;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ri(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Gi()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),yi):r(this)}}const is=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),{schedule:ss,cancel:ls}=vi(queueMicrotask,!1);let cs;function us(){cs=void 0}const ds={now:()=>(void 0===cs&&ds.set(Ei.isProcessing||wi.useManualTiming?Ei.timestamp:performance.now()),cs),set:e=>{cs=e,queueMicrotask(us)}},fs=(e,t)=>t?e*(1e3/t):0,ps={current:void 0};class ms{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=ds.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=ds.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(e=>!isNaN(parseFloat(e)))(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Yi);const n=this.events[e].add(t);return"change"===e?()=>{n(),xi.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return ps.current&&ps.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=ds.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return fs(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function hs(e,t){return new ms(e,t)}const gs=[...Wa,_a,Aa],ys=new WeakMap;function ws(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}function bs(e){return"string"==typeof e||Array.isArray(e)}const vs=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xs=["initial",...vs];function Ns(e){return ws(e.animate)||xs.some(t=>bs(e[t]))}function Es(e){return Boolean(Ns(e)||e.variants)}const Ms={current:null},_s={current:!1},Is="undefined"!=typeof window;function Ss(e){const t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function js(e,t,n,r){if("function"==typeof t){const[o,a]=Ss(r);t=t(void 0!==n?n:e.custom,o,a)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,a]=Ss(r);t=t(void 0!==n?n:e.custom,o,a)}return t}const ks=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Ds={};function Cs(e){Ds=e}class As{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:o,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Ci,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=ds.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,xi.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=t.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=o,this.options=s,this.blockInitialAnimation=Boolean(a),this.isControllingVariants=Ns(t),this.isVariantNode=Es(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==l[e]&&Za(t)&&t.set(l[e])}}mount(e){if(this.hasBeenMounted)for(const e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,ys.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(_s.current||function(){if(_s.current=!0,Is)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ms.current=e.matches;e.addEventListener("change",t),t()}else Ms.current=!1}(),this.shouldReduceMotion=Ms.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),Ni(this.notifyUpdate),Ni(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&is.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:o,ease:a,duration:i}=t.accelerate,s=new as({element:this.current,name:e,keyframes:r,times:o,ease:a,duration:Ri(i)}),l=n(s);return void this.valueSubscriptions.set(e,()=>{l(),s.cancel()})}const n=oa.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&xi.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;"undefined"!=typeof window&&window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o&&o()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in Ds){const t=Ds[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ks.length;t++){const n=ks[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],a=n[r];if(Za(o))e.addValue(r,o);else if(Za(a))e.addValue(r,hs(o,{owner:e}));else if(a!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,hs(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=hs(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=n&&("string"==typeof n&&(Ha(n)||Ai(n))?n=parseFloat(n):(r=n,!gs.find(Va(r))&&Aa.test(t)&&(n=Li(e,t))),this.setBaseTarget(e,Za(n)?n.get():n)),Za(n)?n.get():n;var r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"==typeof t||"object"==typeof t){const r=js(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&void 0!==n)return n;const r=this.getBaseTargetFromProps(this.props,e);return void 0===r||Za(r)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:r}on(e,t){return this.events[e]||(this.events[e]=new Yi),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){ss.render(this.render)}}class Ts extends As{constructor(){super(...arguments),this.KeyframeResolver=Pi}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Za(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}function Os(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const Ls=(e,t)=>t&&"number"==typeof e?t.transform(e):e,zs={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ps=ra.length;function Rs(e,t,n){const{style:r,vars:o,transformOrigin:a}=e;let i=!1,s=!1;for(const e in t){const n=t[e];if(oa.has(e))i=!0;else if(Xa(e))o[e]=n;else{const t=Ls(n,Ua[e]);e.startsWith("origin")?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(i||n?r.transform=function(e,t,n){let r="",o=!0;for(let a=0;a<Ps;a++){const i=ra[a],s=e[i];if(void 0===s)continue;let l=!0;if("number"==typeof s)l=s===(i.startsWith("scale")?1:0);else{const e=parseFloat(s);l=i.startsWith("scale")?1===e:0===e}if(!l||n){const e=Ls(s,Ua[i]);l||(o=!1,r+=`${zs[i]||i}(${e}) `),n&&(t[i]=e)}}const a=e.pathRotation;return a&&(o=!1,r+=`rotate(${Ls(a,Ua.pathRotation)}) `),r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}const Us={offset:"stroke-dashoffset",array:"stroke-dasharray"},Bs={offset:"strokeDashoffset",array:"strokeDasharray"},Fs=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ys(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:a=1,pathOffset:i=0,...s},l,c,u){if(Rs(e,s,c),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete d.transformBox);for(const e of Fs)void 0!==d[e]&&(f[e]=d[e],delete d[e]);void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==r&&(d.scale=r),void 0!==o&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?Us:Bs;e[a.offset]=""+-r,e[a.array]=`${t} ${n}`}(d,o,a,i,!1)}const Zs=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Qs=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Vs(e,{style:t,vars:n},r,o){const a=e.style;let i;for(i in t)a[i]=t[i];for(i in o?.applyProjectionStyles(a,r),n)a.setProperty(i,n[i])}const Ws=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Gs(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Hs={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!va.test(e))return e;e=parseFloat(e)}return`${Gs(e,t.target.x)}% ${Gs(e,t.target.y)}%`}},$s=(e,t,n)=>e+(t-e)*n,Xs={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Aa.parse(e);if(o.length>5)return r;const a=Aa.createTransformer(e),i="number"!=typeof o[0]?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;const c=$s(s,l,.5);return"number"==typeof o[2+i]&&(o[2+i]/=c),"number"==typeof o[3+i]&&(o[3+i]/=c),a(o)}},qs={borderRadius:{...Hs,applyTo:[...Ws]},borderTopLeftRadius:Hs,borderTopRightRadius:Hs,borderBottomLeftRadius:Hs,borderBottomRightRadius:Hs,boxShadow:Xs};function Js(e,{layout:t,layoutId:n}){return oa.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!qs[e]||"opacity"===e)}function Ks(e,t,n){const r=e.style,o=t?.style,a={};if(!r)return a;for(const t in r)(Za(r[t])||o&&Za(o[t])||Js(t,e)||void 0!==n?.getValue(t)?.liveStyle)&&(a[t]=r[t]);return a}function el(e,t,n){const r=Ks(e,t,n);for(const n in e)(Za(e[n])||Za(t[n]))&&(r[-1!==ra.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}class tl extends Ts{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ya}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(oa.has(t)){const e=Fa(t);return e&&e.default||0}return t=Zs.has(t)?t:Os(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return el(e,t,n)}build(e,t,n){Ys(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Vs(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Zs.has(n)?n:Os(n),t.attrs[n])}(e,t,0,r)}mount(e){this.isSVGTag=Qs(e.tagName),super.mount(e)}}function nl({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function rl(e){return void 0===e||1===e}function ol({scale:e,scaleX:t,scaleY:n}){return!rl(e)||!rl(t)||!rl(n)}function al(e){return ol(e)||il(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function il(e){return sl(e.x)||sl(e.y)}function sl(e){return e&&"0%"!==e}function ll(e,t,n){return n+t*(e-n)}function cl(e,t,n,r,o){return void 0!==o&&(e=ll(e,o,r)),ll(e,n,r)+t}function ul(e,t=0,n=1,r,o){e.min=cl(e.min,t,n,r,o),e.max=cl(e.max,t,n,r,o)}function dl(e,{x:t,y:n}){ul(e.x,t.translate,t.scale,t.originPoint),ul(e.y,n.translate,n.scale,n.originPoint)}const fl=.999999999999,pl=1.0000000000001;function ml(e,t){e.min+=t,e.max+=t}function hl(e,t,n,r,o=.5){ul(e,t,n,$s(e.min,e.max,o),r)}function gl(e,t){return"string"==typeof e?parseFloat(e)/100*(t.max-t.min):e}function yl(e,t,n){const r=n??e;hl(e.x,gl(t.x,r.x),t.scaleX,t.scale,t.originX),hl(e.y,gl(t.y,r.y),t.scaleY,t.scale,t.originY)}function wl(e,t){return nl(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}class bl extends Ts{constructor(){super(...arguments),this.type="html",this.renderInstance=Vs}mount(e){Boolean(e.style),super.mount(e)}readValueFromInstance(e,t){if(oa.has(t))return this.projection?.isProjecting?ui(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return di(n,t)})(e,t);{const r=(n=e,window.getComputedStyle(n)),o=(Xa(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return wl(e,t)}build(e,t,n){Rs(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ks(e,t,n)}}const vl=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function xl(e){return"string"==typeof e&&!e.includes("-")&&!!(vl.indexOf(e)>-1||/[A-Z]/u.test(e))}const Nl=(e,t)=>t.isSVG??xl(e)?new tl(t):new bl(t,{allowProjection:e!==w.Fragment}),El=(0,w.createContext)({}),Ml=(0,w.createContext)({strict:!1}),_l=(0,w.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Il=(0,w.createContext)({});function Sl(e){return Array.isArray(e)?e.join(" "):e}function jl(e,t,n){for(const r in t)Za(t[r])||Js(r,n)||(e[r]=t[r])}function kl(e,t){const n={},r=function(e,t){const n={};return jl(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,w.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Rs(n,t,e),Object.assign({},n.vars,n.style)},[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function Dl(e,t,n,r){const o=(0,w.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Ys(n,t,Qs(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};jl(t,e.style,e),o.style={...t,...o.style}}return o}const Cl=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function Al(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Cl.has(e)}let Tl=e=>!Al(e);try{"function"==typeof(Ol=require("@emotion/is-prop-valid").default)&&(Tl=e=>e.startsWith("on")?!Al(e):Ol(e))}catch{}var Ol;function Ll(e,t,n,{latestValues:r},o,a=!1,i){const s=(i??xl(e)?Dl:kl)(t,r,o,e),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||Za(e[o])||(Tl(o)||!0===n&&Al(o)||!t&&!Al(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(t,"string"==typeof e,a),c=e!==w.Fragment?{...l,...s,ref:n}:{},{children:u}=t,d=(0,w.useMemo)(()=>Za(u)?u.get():u,[u]);return(0,w.createElement)(e,{...c,children:d})}function zl(e){return Za(e)?e.get():e}const Pl=(0,w.createContext)(null);function Rl(e){const t=(0,w.useRef)(null);return null===t.current&&(t.current=e()),t.current}function Ul(e,t,n,r){const o={},a=r(e,{});for(const e in a)o[e]=zl(a[e]);let{initial:i,animate:s}=e;const l=Ns(e),c=Es(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let u=!!n&&!1===n.initial;u=u||!1===i;const d=u?s:i;if(d&&"boolean"!=typeof d&&!ws(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=js(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const Bl=e=>(t,n)=>{const r=(0,w.useContext)(Il),o=(0,w.useContext)(Pl),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:Ul(n,r,o,e),renderState:t()}}(e,t,r,o);return n?a():Rl(a)},Fl=Bl({scrapeMotionValuesFromProps:Ks,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})}),Yl=Bl({scrapeMotionValuesFromProps:el,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}})}),Zl={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Ql=!1;function Vl(){return function(){if(Ql)return;const e={};for(const t in Zl)e[t]={isEnabled:e=>Zl[t].some(t=>!!e[t])};Cs(e),Ql=!0}(),Ds}const Wl=Symbol.for("motionComponentSymbol");function Gl(e,t,n){const r=(0,w.useRef)(n);(0,w.useInsertionEffect)(()=>{r.current=n});const o=(0,w.useRef)(null);return(0,w.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());const a=r.current;if("function"==typeof a)if(n){const e=a(n);"function"==typeof e&&(o.current=e)}else o.current?(o.current(),o.current=null):a(n);else a&&(a.current=n)},[t])}const Hl="data-"+Os("framerAppearId"),$l=(0,w.createContext)({});function Xl(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const ql="undefined"!=typeof window?w.useLayoutEffect:w.useEffect;function Jl(e,t,n,r,o,a){const{visualElement:i}=(0,w.useContext)(Il),s=(0,w.useContext)(Ml),l=(0,w.useContext)(Pl),c=(0,w.useContext)(_l),u=c.reducedMotion,d=c.skipAnimations,f=(0,w.useRef)(null),p=(0,w.useRef)(!1);r=r||s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:i,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const m=f.current,h=(0,w.useContext)($l);!m||m.projection||!o||"html"!==m.type&&"svg"!==m.type||function(e,t,n,r){const{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Kl(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:Boolean(i)||s&&Xl(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:l,layoutRoot:c,layoutAnchor:u})}(f.current,n,o,h);const g=(0,w.useRef)(!1);(0,w.useInsertionEffect)(()=>{m&&g.current&&m.update(n,l)});const y=n[Hl],b=(0,w.useRef)(Boolean(y)&&"undefined"!=typeof window&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return ql(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),b.current&&m.animationState&&m.animationState.animateChanges())}),(0,w.useEffect)(()=>{m&&(!b.current&&m.animationState&&m.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),b.current=!1),m.enteringChildren=void 0)}),m}function Kl(e){if(e)return!1!==e.options.allowProjection?e.projection:Kl(e.parent)}function ec(e,{forwardMotionProps:t=!1,type:n}={},r,o){r&&function(e){const t=Vl();for(const n in e)t[n]={...t[n],...e[n]};Cs(t)}(r);const a=n?"svg"===n:xl(e),i=a?Yl:Fl;function s(n,r){let s;const l={...(0,w.useContext)(_l),...n,layoutId:tc(n)},{isStatic:c}=l,u=function(e){const{initial:t,animate:n}=function(e,t){if(Ns(e)){const{initial:t,animate:n}=e;return{initial:!1===t||bs(t)?t:void 0,animate:bs(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,w.useContext)(Il));return(0,w.useMemo)(()=>({initial:t,animate:n}),[Sl(t),Sl(n)])}(n),d=i(n,c);if(!c&&"undefined"!=typeof window){(0,w.useContext)(Ml).strict;const t=function(e){const t=Vl(),{drag:n,layout:r}=t;if(!n&&!r)return{};const o={...n,...r};return{MeasureLayout:n?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}(l);s=t.MeasureLayout,u.visualElement=Jl(e,d,l,o,t.ProjectionNode,a)}return(0,R.jsxs)(Il.Provider,{value:u,children:[s&&u.visualElement?(0,R.jsx)(s,{visualElement:u.visualElement,...l}):null,Ll(e,n,Gl(d,u.visualElement,r),d,c,t,a)]})}s.displayName=`motion.${"string"==typeof e?e:`create(${e.displayName??e.name??""})`}`;const l=(0,w.forwardRef)(s);return l[Wl]=e,l}function tc({layoutId:e}){const t=(0,w.useContext)(El).id;return t&&void 0!==e?t+"-"+e:e}function nc(e,t){if("undefined"==typeof Proxy)return ec;const n=new Map,r=(n,r)=>ec(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(o,a)=>"create"===a?r:(n.has(a)||n.set(a,ec(a,void 0,e,t)),n.get(a))})}class rc{constructor(e){this.isMounted=!1,this.node=e}update(){}}function oc(e,t,n){const r=e.getProps();return js(r,t,void 0!==n?n:r.custom,e)}function ac(e,t){if(e?.inherit&&t){const{inherit:n,...r}=e;return{...t,...r}}return e}function ic(e,t){const n=e?.[t]??e?.default??e;return n!==e?ac(n,e):n}const sc=e=>Array.isArray(e);function lc(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,hs(n))}function cc(e){return sc(e)?e[e.length-1]||0:e}function uc(e,t){const n=e.getValue("willChange");if(function(e){return Boolean(Za(e)&&e.add)}(n))return n.add(t);if(!n&&wi.WillChange){const n=new wi.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function dc(e){return e.props[Hl]}const fc=(...e)=>e.reduce((e,t)=>n=>t(e(n)));function pc(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function mc(e,t){return n=>n>0?t:e}const hc=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},gc=[ga,ha,Ma];function yc(e){const t=(n=e,gc.find(e=>e.test(n)));var n;if(Boolean(t),!Boolean(t))return!1;let r=t.parse(e);return t===Ma&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,a=0,i=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;o=pc(s,r,e+1/3),a=pc(s,r,e),i=pc(s,r,e-1/3)}else o=a=i=n;return{red:Math.round(255*o),green:Math.round(255*a),blue:Math.round(255*i),alpha:r}}(r)),r}const wc=(e,t)=>{const n=yc(e),r=yc(t);if(!n||!r)return mc(e,t);const o={...n};return e=>(o.red=hc(n.red,r.red,e),o.green=hc(n.green,r.green,e),o.blue=hc(n.blue,r.blue,e),o.alpha=$s(n.alpha,r.alpha,e),ha.transform(o))},bc=new Set(["none","hidden"]);function vc(e,t){return n=>$s(e,t,n)}function xc(e){return"number"==typeof e?vc:"string"==typeof e?Ja(e)?mc:_a.test(e)?wc:Mc:Array.isArray(e)?Nc:"object"==typeof e?_a.test(e)?wc:Ec:mc}function Nc(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>xc(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Ec(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=xc(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Mc=(e,t)=>{const n=Aa.createTransformer(t),r=Da(e),o=Da(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?bc.has(e)&&!o.values.length||bc.has(t)&&!r.values.length?function(e,t){return bc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):fc(Nc(function(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],i=e.indexes[a][r[a]],s=e.values[i]??0;n[o]=s,r[a]++}return n}(r,o),o.values),n):mc(e,t)};function _c(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?$s(e,t,n):xc(e)(e,t)}const Ic=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>xi.update(t,e),stop:()=>Ni(t),now:()=>Ei.isProcessing?Ei.timestamp:ds.now()}},Sc=2e4;function jc(e){let t=0,n=e.next(t);for(;!n.done&&t<Sc;)t+=50,n=e.next(t);return t>=Sc?1/0:t}const kc=.01,Dc=2,Cc=.005,Ac=.5;function Tc(e,t){return e*Math.sqrt(1-t*t)}const Oc=["duration","bounce"],Lc=["stiffness","damping","mass"];function zc(e,t){return t.some(t=>void 0!==e[t])}function Pc(e=.3,t=.3){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const a=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!zc(e,Lc)&&zc(e,Oc))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,a=2*aa(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:1,stiffness:o,damping:a}}else{const n=function({duration:e=800,bounce:t=.3,velocity:n=0,mass:r=1}){let o,a;Ri(10);let i=1-t;i=aa(.05,1,i),e=aa(.01,10,Ui(e)),i<1?(o=t=>{const r=t*i,o=r*e;return.001-(r-n)/Tc(t,i)*Math.exp(-o)},a=t=>{const r=t*i*e,a=r*n+n,s=Math.pow(i,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=Tc(Math.pow(t,2),i);return(.001-o(t)>0?-1:1)*((a-s)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const s=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(o,a,5/e);if(e=Ri(e),isNaN(s))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(s,2)*r;return{stiffness:t,damping:2*i*Math.sqrt(r*t),duration:e}}}({...e,velocity:0});t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Ui(n.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(l*u)),g=i-a,y=Ui(Math.sqrt(l/u)),w=Math.abs(g)<5;let b,v,x,N,E,M;if(r||(r=w?kc:Dc),o||(o=w?Cc:Ac),h<1)x=Tc(y,h),N=(m+h*y*g)/x,b=e=>{const t=Math.exp(-h*y*e);return i-t*(N*Math.sin(x*e)+g*Math.cos(x*e))},E=h*y*N+g*x,M=h*y*g-N*x,v=e=>Math.exp(-h*y*e)*(E*Math.sin(x*e)+M*Math.cos(x*e));else if(1===h){b=e=>i-Math.exp(-y*e)*(g+(m+y*g)*e);const e=m+y*g;v=t=>Math.exp(-y*t)*(y*e*t-m)}else{const e=y*Math.sqrt(h*h-1);b=t=>{const n=Math.exp(-h*y*t),r=Math.min(e*t,300);return i-n*((m+h*y*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};const t=(m+h*y*g)/e,n=h*y*t-g*e,r=h*y*g-t*e;v=t=>{const o=Math.exp(-h*y*t),a=Math.min(e*t,300);return o*(n*Math.sinh(a)+r*Math.cosh(a))}}const _={calculatedDuration:p&&d||null,velocity:e=>Ri(v(e)),next:e=>{if(!p&&h<1){const t=Math.exp(-h*y*e),n=Math.sin(x*e),a=Math.cos(x*e),l=i-t*(N*n+g*a),c=Ri(t*(E*n+M*a));return s.done=Math.abs(c)<=r&&Math.abs(i-l)<=o,s.value=s.done?i:l,s}const t=b(e);if(p)s.done=e>=d;else{const n=Ri(v(e));s.done=Math.abs(n)<=r&&Math.abs(i-t)<=o}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(jc(_),Sc),t=Ki(t=>_.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return _}function Rc(e,t,n){const r=Math.max(t-5,0);return fs(n-e(r),t-r)}function Uc({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},p=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let m=n*t;const h=d+m,g=void 0===i?h:i(h);g!==h&&(m=g-d);const y=e=>-m*Math.exp(-e/r),w=e=>g+y(e),b=e=>{const t=y(e),n=w(e);f.done=Math.abs(t)<=c,f.value=f.done?g:n};let v,x;const N=e=>{var t;t=f.value,(void 0!==s&&t<s||void 0!==l&&t>l)&&(v=e,x=Pc({keyframes:[f.value,p(f.value)],velocity:Rc(w,e,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return N(0),{calculatedDuration:null,next:e=>{let t=!1;return x||void 0!==v||(t=!0,b(e),N(e)),void 0!==v&&e>=v?x.next(e-v):(!t&&b(e),f)}}}Pc.applyToOptions=e=>{const t=function(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jc(r),Sc);return{type:"keyframes",ease:e=>r.next(o*e).value/t,duration:Ui(o)}}(e,100,Pc);return e.ease=t.ease,e.duration=Ri(t.duration),e.type="keyframes",e};const Bc=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Fc(e,t,n,r){if(e===t&&n===r)return yi;return o=>0===o||1===o?o:Bc(function(e,t,n,r,o){let a,i,s=0;do{i=t+(n-t)/2,a=Bc(i,r,o)-e,a>0?n=i:t=i}while(Math.abs(a)>1e-7&&++s<12);return i}(o,0,1,e,n),t,r)}const Yc=Fc(.42,0,1,1),Zc=Fc(0,0,.58,1),Qc=Fc(.42,0,.58,1),Vc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wc=e=>t=>1-e(1-t),Gc=Fc(.33,1.53,.69,.99),Hc=Wc(Gc),$c=Vc(Hc),Xc=e=>e>=1?1:(e*=2)<1?.5*Hc(e):.5*(2-Math.pow(2,-10*(e-1))),qc=e=>1-Math.sin(Math.acos(e)),Jc=Wc(qc),Kc=Vc(qc),eu={linear:yi,easeIn:Yc,easeInOut:Qc,easeOut:Zc,circIn:qc,circInOut:Kc,circOut:Jc,backIn:Hc,backInOut:$c,backOut:Gc,anticipate:Xc},tu=e=>{if(qi(e)){e.length;const[t,n,r,o]=e;return Fc(t,n,r,o)}return"string"==typeof e?eu[e]:e},nu=(e,t,n)=>{const r=t-e;return r?(n-e)/r:1};function ru({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(tu):tu(r),a={done:!1,value:t[0]},i=function(e,t){return e.map(e=>e*t)}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=nu(0,t,r);e.push($s(n,1,o))}}(t,e.length-1),t}(t),e),s=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const a=e.length;if(t.length,1===a)return()=>t[0];if(2===a&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],o=n||wi.mix||_c,a=e.length-1;for(let n=0;n<a;n++){let a=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||yi:t;a=fc(e,a)}r.push(a)}return r}(t,r,o),l=s.length,c=n=>{if(i&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=nu(e[r],e[r+1],n);return s[r](o)};return n?t=>c(aa(e[0],e[a-1],t)):c}(i,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map(()=>c||Qc).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const ou={decay:Uc,inertia:Uc,tween:ru,keyframes:ru,spring:Pc};function au(e){"string"==typeof e.type&&(e.type=ou[e.type])}const iu=e=>e/100;class su extends Xi{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:e}=this.options;e&&e.updatedAt!==ds.now()&&this.tick(ds.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;au(e);const{type:t=ru,repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=e;let{keyframes:i}=e;const s=t||ru;s!==ru&&"number"!=typeof i[0]&&(this.mixKeyframes=fc(iu,_c(i[0],i[1])),i=[0,100]);const l=s({...e,keyframes:i});"mirror"===o&&(this.mirroredGenerator=s({...e,keyframes:[...i].reverse(),velocity:-a})),null===l.calculatedDuration&&(l.calculatedDuration=jc(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:n,totalDuration:r,mixKeyframes:o,mirroredGenerator:a,resolvedDuration:i,calculatedDuration:s}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let w,b=this.currentTime,v=n;if(u){const e=Math.min(this.currentTime,r)/i;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1),Boolean(t%2)&&("reverse"===d?(n=1-n,f&&(n-=f/i)):"mirror"===d&&(v=a)),b=aa(0,1,n)*i}y?(this.delayState.value=c[0],w=this.delayState):w=v.next(b),o&&!y&&(w.value=o(w.value));let{done:x}=w;y||null===s||(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const N=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return N&&p!==Uc&&(w.value=$i(c,this.options,h,this.speed)),m&&m(w.value),N&&this.finish(),w}then(e,t){return this.finished.then(e,t)}get duration(){return Ui(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+Ui(e)}get time(){return Ui(this.currentTime)}set time(e){e=Ri(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;return e<=0?this.options.velocity||0:this.generator.velocity?this.generator.velocity(e):Rc(e=>this.generator.next(e).value,e,this.generator.next(e).value)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(ds.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=Ui(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Ic,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();const n=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=n):null!==this.holdTime?this.startTime=n-this.holdTime:this.startTime||(this.startTime=t??n),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ds.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const lu={anticipate:Xc,backInOut:$c,circInOut:Kc};class cu extends as{constructor(e){var t;"string"==typeof(t=e).ease&&t.ease in lu&&(t.ease=lu[t.ease]),au(e),super(e),void 0!==e.startTime&&!1!==e.autoplay&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:n,onComplete:r,element:o,...a}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const i=new su({...a,autoplay:!1}),s=Math.max(10,ds.now()-this.startTime),l=aa(0,10,s-10),c=i.sample(s).value,{name:u}=this.options;o&&u&&Zi(o,u,c),t.setWithVelocity(i.sample(Math.max(0,s-l)).value,c,l),i.stop()}}const uu=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!Aa.test(e)&&"0"!==e||e.startsWith("url(")));function du(e){e.duration=0,e.type="keyframes"}const fu=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/,pu=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),mu=Qi(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class hu extends Xi{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",keyframes:i,name:s,motionValue:l,element:c,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ds.now();const d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:a,name:s,motionValue:l,element:c,...u},f=c?.KeyframeResolver||Ci;this.keyframeResolver=new f(i,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;const{name:o,type:a,velocity:i,delay:s,isHandoff:l,onUpdate:c}=n;this.resolvedAt=ds.now();let u=!0;(function(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const a=e[e.length-1],i=uu(o,t),s=uu(a,t);return!(!i||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||os(n))&&r)})(e,o,a,i)||(u=!1,!wi.instantAnimations&&s||c?.($i(e,n,t)),e[0]=e[e.length-1],du(n),n.repeat=0);const d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!l&&function(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:a,type:i,keyframes:s}=e,l=t?.owner?.current;if(!(l instanceof HTMLElement||l instanceof SVGElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return mu()&&n&&(is.has(n)||pu.has(n)&&function(e){for(let t=0;t<e.length;t++)if("string"==typeof e[t]&&fu.test(e[t]))return!0;return!1}(s))&&("transform"!==n||!u)&&!c&&!r&&"mirror"!==o&&0!==a&&"inertia"!==i}(d),p=d.motionValue?.owner?.current;let m;if(f)try{m=new cu({...d,element:p})}catch{m=new su(d)}else m=new su(d);m.finished.then(()=>{this.notifyFinished()}).catch(yi),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),ji=!0,Di(),ki(),ji=!1),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const gu={type:"spring",stiffness:500,damping:25,restSpeed:10},yu={type:"keyframes",duration:.8},wu={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},bu=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]),vu=(e,t,n,r={},o,a)=>i=>{const s=ic(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=Ri(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};(function(e){for(const t in e)if(!bu.has(t))return!0;return!1})(s)||Object.assign(u,((e,{keyframes:t})=>t.length>2?yu:oa.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:gu:wu)(e,u)),u.duration&&(u.duration=Ri(u.duration)),u.repeatDelay&&(u.repeatDelay=Ri(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(du(u),0===u.delay&&(d=!0)),(wi.instantAnimations||wi.skipAnimations||o?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,du(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&void 0!==t.get()){const e=$i(u.keyframes,s);if(void 0!==e)return void xi.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new su(u):new hu(u)};function xu({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Nu(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:a,transitionEnd:i,...s}=t;const l=e.getDefaultTransition();a=a?ac(a,l):l;const c=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);const d=[],f=o&&e.animationState&&e.animationState.getState()[o],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(const t in s){const r=e.getValue(t,e.latestValues[t]??null),o=s[t];if(void 0===o||f&&xu(f,t))continue;const i={delay:n,...ic(a||{},t)};u&&(i.skipAnimations=!0);const l=r.get();if(void 0!==l&&!r.isAnimating()&&!Array.isArray(o)&&o===l&&!i.velocity){xi.update(()=>r.set(o));continue}let p=!1;if(window.MotionHandoffAnimation){const n=dc(e);if(n){const e=window.MotionHandoffAnimation(n,t,xi);null!==e&&(i.startTime=e,p=!0)}}uc(e,t);const m=c??e.shouldReduceMotion;r.start(vu(t,r,o,m&&Qa.has(t)?{type:!1}:i,e,p));const h=r.animation;h&&d.push(h)}if(i){const t=()=>xi.update(()=>{i&&function(e,t){const n=oc(e,t);let{transitionEnd:r={},transition:o={},...a}=n||{};a={...a,...r};for(const t in a)lc(e,t,cc(a[t]))}(e,i)});d.length?Promise.all(d).then(t):t()}return d}function Eu(e,t,n,r=0,o=1){const a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),i=e.size,s=(i-1)*r;return"function"==typeof n?n(a,i):1===o?a*r:s-a*r}function Mu(e,t,n={}){const r=oc(e,t,"exit"===n.type?e.presenceContext?.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const a=r?()=>Promise.all(Nu(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:a=0,staggerChildren:i,staggerDirection:s}=o;return function(e,t,n=0,r=0,o=0,a=1,i){const s=[];for(const l of e.variantChildren)l.notify("AnimationStart",t),s.push(Mu(l,t,{...i,delay:n+("function"==typeof r?0:r)+Eu(e.variantChildren,l,r,o,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}(e,t,r,a,i,s,n)}:()=>Promise.resolve(),{when:s}=o;if(s){const[e,t]="beforeChildren"===s?[a,i]:[i,a];return e().then(()=>t())}return Promise.all([a(),i(n.delay)])}const _u=xs.length;function Iu(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Iu(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<_u;n++){const r=xs[n],o=e.props[r];(bs(o)||!1===o)&&(t[r]=o)}return t}function Su(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const ju=[...vs].reverse(),ku=vs.length;function Du(e){let t=function(e){return t=>Promise.all(t.map(({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map(t=>Mu(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=Mu(e,t,n);else{const o="function"==typeof t?oc(e,t,n.custom):t;r=Promise.all(Nu(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=Tu(),r=!0,o=!1;const a=t=>(n,r)=>{const o=oc(e,r,"exit"===t?e.presenceContext?.custom:void 0);if(o){const{transition:e,transitionEnd:t,...r}=o;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,l=Iu(e.parent)||{},c=[],u=new Set;let d={},f=1/0;for(let t=0;t<ku;t++){const p=ju[t],m=n[p],h=void 0!==s[p]?s[p]:l[p],g=bs(h),y=p===i?m.isActive:null;!1===y&&(f=t);let w=h===l[p]&&h!==s[p]&&g;if(w&&(r||o)&&e.manuallyAnimateOnMount&&(w=!1),m.protectedKeys={...d},!m.isActive&&null===y||!h&&!m.prevProp||ws(h)||"boolean"==typeof h)continue;if("exit"===p&&m.isActive&&!0!==y){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}const b=Cu(m.prevProp,h);let v=b||p===i&&m.isActive&&!w&&g||t>f&&g,x=!1;const N=Array.isArray(h)?h:[h];let E=N.reduce(a(p),{});!1===y&&(E={});const{prevResolvedValues:M={}}=m,_={...M,...E},I=t=>{v=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in _){const t=E[e],n=M[e];if(d.hasOwnProperty(e))continue;let r=!1;r=sc(t)&&sc(n)?!Su(t,n)||b:t!==n,r?null!=t?I(e):u.add(e):void 0!==t&&u.has(e)?I(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=E,m.isActive&&(d={...d,...E}),(r||o)&&e.blockInitialAnimation&&(v=!1);const S=w&&b;v&&(!S||x)&&c.push(...N.map(t=>{const n={type:p};if("string"==typeof t&&(r||o)&&!S&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,o=oc(r,t);if(r.enteringChildren&&o){const{delayChildren:t}=o.transition||{};n.delay=Eu(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!=typeof s.initial){const n=oc(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let p=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(p=!1),r=!1,o=!1,p?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;const o=i(t);for(const e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Tu(),o=!0}}}function Cu(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!Su(t,e)}function Au(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Tu(){return{animate:Au(!0),whileInView:Au(),whileHover:Au(),whileTap:Au(),whileDrag:Au(),whileFocus:Au(),exit:Au()}}let Ou=0;const Lu={animation:{Feature:class extends rc{constructor(e){super(e),e.animationState||(e.animationState=Du(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ws(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}},exit:{Feature:class extends rc{constructor(){super(...arguments),this.id=Ou++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&!1===n){if(this.isExitComplete){const{initial:e,custom:t}=this.node.getProps();if("string"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)){const n=oc(this.node,e,t);if(n){const{transition:e,transitionEnd:t,...r}=n;for(const e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);return void(this.isExitComplete=!1)}const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}},zu={x:!1,y:!1};function Pu(){return zu.x||zu.y}function Ru(e){return[e("x"),e("y")]}function Uu(e){return e.max-e.min}function Bu(e,t,n,r=.5){e.origin=r,e.originPoint=$s(t.min,t.max,e.origin),e.scale=Uu(n)/Uu(t),e.translate=$s(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Fu(e,t,n,r){Bu(e.x,t.x,n.x,r?r.originX:void 0),Bu(e.y,t.y,n.y,r?r.originY:void 0)}function Yu(e,t,n,r=0){const o=r?$s(n.min,n.max,r):n.min;e.min=o+t.min,e.max=e.min+Uu(t)}function Zu(e,t,n,r=0){const o=r?$s(n.min,n.max,r):n.min;e.min=t.min-o,e.max=e.min+Uu(t)}function Qu(e,t,n,r){Zu(e.x,t.x,n.x,r?.x),Zu(e.y,t.y,n.y,r?.y)}const Vu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),Wu=new Set(["INPUT","SELECT","TEXTAREA"]);function Gu(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}const Hu=e=>"object"==typeof e&&null!==e;function $u(e){return Hu(e)&&"ownerSVGElement"in e}function Xu(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let r=document;t&&(r=t.current);const o=n?.[e]??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(e=>null!=e)}const qu=new WeakMap;let Ju;const Ku=(e,t,n)=>(r,o)=>o&&o[0]?o[0][e+"Size"]:$u(r)&&"getBBox"in r?r.getBBox()[t]:r[n],ed=Ku("inline","width","offsetWidth"),td=Ku("block","height","offsetHeight");function nd({target:e,borderBoxSize:t}){qu.get(e)?.forEach(n=>{n(e,{get width(){return ed(e,t)},get height(){return td(e,t)}})})}function rd(e){e.forEach(nd)}const od=new Set;let ad;function id(e,t){return"function"==typeof e?(n=e,od.add(n),ad||(ad=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};od.forEach(t=>t(e))},window.addEventListener("resize",ad)),()=>{od.delete(n),od.size||"function"!=typeof ad||(window.removeEventListener("resize",ad),ad=void 0)}):function(e,t){Ju||"undefined"!=typeof ResizeObserver&&(Ju=new ResizeObserver(rd));const n=Xu(e);return n.forEach(e=>{let n=qu.get(e);n||(n=new Set,qu.set(e,n)),n.add(t),Ju?.observe(e)}),()=>{n.forEach(e=>{const n=qu.get(e);n?.delete(t),n?.size||Ju?.unobserve(e)})}}(e,t);var n}const sd=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function ld(e){return{point:{x:e.pageX,y:e.pageY}}}function cd(e,t,n,r){return Gu(e,t,(e=>t=>sd(t)&&e(t,ld(t)))(n),r)}const ud=({current:e})=>e?e.ownerDocument.defaultView:null,dd=(e,t)=>Math.abs(e-t),fd=new Set(["auto","scroll"]);class pd{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:o=!1,distanceThreshold:a=3,element:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=md(this.lastRawMoveEventInfo,this.transformPagePoint));const e=gd(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=dd(e.x,t.x),r=dd(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Ei;this.history.push({...r,timestamp:o});const{onStart:a,onMove:i}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=md(t,this.transformPagePoint),xi.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=gd("pointercancel"===e.type?this.lastMoveEventInfo:md(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!sd(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;const s=md(ld(e),this.transformPagePoint),{point:l}=s,{timestamp:c}=Ei;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=t;u&&u(e,gd(s,this.history));const d={passive:!0,capture:!0};this.removeListeners=fc(cd(this.contextWindow,"pointermove",this.handlePointerMove,d),cd(this.contextWindow,"pointerup",this.handlePointerUp,d),cd(this.contextWindow,"pointercancel",this.handlePointerUp,d)),i&&this.startScrollTracking(i)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(fd.has(e.overflowX)||fd.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},o=r.x-t.x,a=r.y-t.y;0===o&&0===a||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=o,this.lastMoveEventInfo.point.y+=a):this.history.length>0&&(this.history[0].x-=o,this.history[0].y-=a),this.scrollPositions.set(e,r),xi.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ni(this.updatePoint)}}function md(e,t){return t?{point:t(e.point)}:e}function hd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function gd({point:e},t){return{point:e,delta:hd(e,wd(t)),offset:hd(e,yd(t)),velocity:bd(t,.1)}}function yd(e){return e[0]}function wd(e){return e[e.length-1]}function bd(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=wd(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ri(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&o.timestamp-r.timestamp>2*Ri(t)&&(r=e[1]);const a=Ui(o.timestamp-r.timestamp);if(0===a)return{x:0,y:0};const i={x:(o.x-r.x)/a,y:(o.y-r.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function vd(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function xd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Nd=.35;function Ed(e,t,n){return{min:Md(e,t),max:Md(e,n)}}function Md(e,t){return"number"==typeof e?e:e[t]||0}const _d=new WeakMap;class Id{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:o}=this.getProps();this.panSession=new pd(e,{onSessionStart:e=>{t&&this.snapToCursor(ld(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(a=n)||"y"===a?zu[a]?null:(zu[a]=!0,()=>{zu[a]=!1}):zu.x||zu.y?null:(zu.x=zu.y=!0,()=>{zu.x=zu.y=!1}),!this.openDragLock))return;var a;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ru(e=>{let t=this.getAxisMotionValue(e).get()||0;if(ba.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=Uu(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),o&&xi.update(()=>o(e,t),!1,!0),uc(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:i}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(i),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,i),this.updateAxis("y",t.point,i),this.visualElement.render(),a&&xi.update(()=>a(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:o,distanceThreshold:n,contextWindow:ud(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!r||!n)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&xi.postRender(()=>i(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!jd(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?$s(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?$s(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),o.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Xl(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:vd(e.x,n,o),y:vd(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Nd){return!1===e?e=0:!0===e&&(e=Nd),{x:Ed(e,"left","right"),y:Ed(e,"top","bottom")}}(t),r!==this.constraints&&!Xl(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ru(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Xl(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const o=function(e,t,n){const r=wl(e,n),{scroll:o}=t;return o&&(ml(r.x,o.offset.x),ml(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:xd(e.x,t.x),y:xd(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=nl(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=Ru(i=>{if(!jd(i,t,this.currentDirection))return;let l=s&&s[i]||{};!0!==a&&a!==i||(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(i,d)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return uc(this.visualElement,e),n.start(vu(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ru(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Ru(t=>{const{drag:n}=this.getProps();if(!jd(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t],i=o.get()||0;o.set(e[t]-$s(n,a,.5)+i)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Xl(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Ru(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Uu(e),o=Uu(t);return o>r?n=nu(t.min,t.max-r,e.min):r>o&&(n=nu(e.min,e.max-o,t.min)),aa(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ru(t=>{if(!jd(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:a}=this.constraints[t];n.set($s(o,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_d.set(this.visualElement,this);const e=this.visualElement.current,t=cd(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),o=t.target,a=o!==e&&function(e){return Wu.has(e.tagName)||!0===e.isContentEditable}(o);n&&r&&!a&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Xl(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=id(e,Sd(n)),o=id(t,Sd(n));return()=>{r(),o()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:o}=this.visualElement,a=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),xi.read(r);const i=Gu(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ru(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),t(),a(),s&&s(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=Nd,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:i}}}function Sd(e){let t=!0;return()=>{t?t=!1:e()}}function jd(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const kd=e=>(t,n)=>{e&&xi.update(()=>e(t,n),!1,!0)},Dd={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Cd(e=!0){const t=(0,w.useContext)(Pl);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=(0,w.useId)();(0,w.useEffect)(()=>{if(e)return o(a)},[e]);const i=(0,w.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,i]:[!0]}let Ad=!1;class Td extends w.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),Ad&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Dd.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,{projection:a}=n;return a?(a.isPresent=o,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Ad=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==o?a.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?a.promote():a.relegate()||xi.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),ss.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Ad=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Od(e){const[t,n]=Cd(),r=(0,w.useContext)(El);return(0,R.jsx)(Td,{...e,layoutGroup:r,switchLayoutGroup:(0,w.useContext)($l),isPresent:t,safeToRemove:n})}const Ld={value:null,addProjectionMetrics:null};const zd=Ws.length,Pd=e=>"string"==typeof e?parseFloat(e):e,Rd=e=>"number"==typeof e||va.test(e);function Ud(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Bd=Yd(0,.5,Jc),Fd=Yd(.5,.95,yi);function Yd(e,t,n){return r=>r<e?0:r>t?1:n(nu(e,t,r))}function Zd(e,t){e.min=t.min,e.max=t.max}function Qd(e,t){Zd(e.x,t.x),Zd(e.y,t.y)}function Vd(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Wd(e,t,n,r,o){return e=ll(e-=t,1/n,r),void 0!==o&&(e=ll(e,1/o,r)),e}function Gd(e,t,[n,r,o],a,i){!function(e,t=0,n=1,r=.5,o,a=e,i=e){if(ba.test(t)&&(t=parseFloat(t),t=$s(i.min,i.max,t/100)-i.min),"number"!=typeof t)return;let s=$s(a.min,a.max,r);e===a&&(s-=t),e.min=Wd(e.min,t,n,s,o),e.max=Wd(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,a,i)}const Hd=["x","scaleX","originX"],$d=["y","scaleY","originY"];function Xd(e,t,n,r){Gd(e.x,t,Hd,n?n.x:void 0,r?r.x:void 0),Gd(e.y,t,$d,n?n.y:void 0,r?r.y:void 0)}function qd(e){return 0===e.translate&&1===e.scale}function Jd(e){return qd(e.x)&&qd(e.y)}function Kd(e,t){return e.min===t.min&&e.max===t.max}function ef(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function tf(e,t){return ef(e.x,t.x)&&ef(e.y,t.y)}function nf(e){return Uu(e.x)/Uu(e.y)}function rf(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class of{constructor(){this.members=[]}add(e){Bi(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1!==r.isConnected||n.snapshot||(Fi(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(Fi(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent&&!1!==e.instance?.isConnected)return this.promote(e),!0}return!1}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();const{layoutDependency:r}=n.options,{layoutDependency:o}=e.options;void 0!==r&&r===o||(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),!1===e.options.crossfade&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const af=(e,t)=>e.depth-t.depth;class sf{constructor(){this.children=[],this.isDirty=!1}add(e){Bi(this.children,e),this.isDirty=!0}remove(e){Fi(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(af),this.isDirty=!1,this.children.forEach(e)}}const lf={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},cf=["","X","Y","Z"];let uf=0;function df(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ff(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=dc(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",xi,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&ff(r)}function pf({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=t?.()){this.id=uf++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ld.value&&(lf.nodes=lf.calculatedTargetDeltas=lf.calculatedProjections=0),this.nodes.forEach(gf),this.nodes.forEach(_f),this.nodes.forEach(If),this.nodes.forEach(yf),Ld.addProjectionMetrics&&Ld.addProjectionMetrics(lf)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new sf)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Yi),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;var n;this.isSVG=$u(t)&&!($u(n=t)&&"svg"===n.tagName),this.instance=t;const{layoutId:r,layout:o,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(o||r)&&(this.isLayoutDirty=!0),e){let n,r=0;const o=()=>this.root.updateBlockedByResize=!1;xi.read(()=>{r=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=ds.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(Ni(r),e(a-t))};return xi.setup(r,!0),()=>Ni(r)}(o,250),Dd.hasAnimatedSinceResize&&(Dd.hasAnimatedSinceResize=!1,this.nodes.forEach(Mf)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&a&&(r||o)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||a.getDefaultTransition()||Af,{onLayoutAnimationStart:i,onLayoutAnimationComplete:s}=a.getProps(),l=!this.targetLayout||!tf(this.targetLayout,r),c=!t&&n;if(this.options.layoutRoot||this.resumeFrom||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...ic(o,"layout"),onPlay:i,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,c,t.path)}else t||Mf(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ni(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Sf),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ff(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,"string"!=typeof t.latestValues.x&&"string"!=typeof t.latestValues.y||(t.isLayoutDirty=!0),t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const e=this.updateBlockedByResize;return this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(vf),void this.nodes.forEach(bf)}if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(xf);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Nf),this.nodes.forEach(Ef),this.nodes.forEach(mf),this.nodes.forEach(hf)):this.nodes.forEach(xf),this.clearAllSnapshots();const e=ds.now();Ei.delta=aa(0,1e3/60,e-Ei.timestamp),Ei.timestamp=e,Ei.isProcessing=!0,Mi.update.process(Ei),Mi.preRender.process(Ei),Mi.render.process(Ei),Ei.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ss.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(wf),this.sharedNodes.forEach(jf)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xi.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xi.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Uu(this.snapshot.measuredBox.x)||Uu(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}}),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Jd(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||al(this.latestValues)||a)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Lf((r=n).x),Lf(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox();if(!this.scroll?.wasRoot&&!this.path.some(Pf)){const{scroll:e}=this.root;e&&(ml(t.x,e.offset.x),ml(t.y,e.offset.y))}return t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};if(Qd(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:o,options:a}=r;r!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&Qd(t,e),ml(t.x,o.offset.x),ml(t.y,o.offset.y))}return t}applyTransform(e,t=!1,n){const r=n||{x:{min:0,max:0},y:{min:0,max:0}};Qd(r,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(ml(r.x,-n.scroll.offset.x),ml(r.y,-n.scroll.offset.y)),al(n.latestValues)&&yl(r,n.latestValues,n.layout?.layoutBox)}return al(this.latestValues)&&yl(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Qd(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!al(n.latestValues))continue;let r;n.instance&&(ol(n.latestValues)&&n.updateSnapshot(),r=Ya(),Qd(r,n.measurePageBox())),Xd(t,n.latestValues,n.snapshot?.layoutBox,r)}return al(this.latestValues)&&Xd(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ei.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){const t=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=t.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:r,layoutId:o}=this.options;if(!this.layout||!r&&!o)return;this.resolvedRelativeTargetAt=Ei.timestamp;const a=this.getClosestProjectingParent();var i,s,l,c;a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(!1!==this.options.layoutAnchor&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),i=this.target,s=this.relativeTarget,l=this.relativeParent.target,c=this.options.layoutAnchor||void 0,Yu(i.x,s.x,l.x,c?.x),Yu(i.y,s.y,l.y,c?.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.applyTransform(this.layout.layoutBox,!1,this.target):Qd(this.target,this.layout.layoutBox),dl(this.target,this.targetDelta)):Qd(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,!1!==this.options.layoutAnchor&&a&&Boolean(a.resumingFrom)===Boolean(this.resumingFrom)&&!a.options.layoutScroll&&a.target&&1!==this.animationProgress?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),Ld.value&&lf.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!ol(this.parent.latestValues)&&!il(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Qu(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Qd(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const e=this.getLead(),t=Boolean(this.resumingFrom)||this!==e;let n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===Ei.timestamp&&(n=!1),n)return;const{layout:r,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!r&&!o)return;Qd(this.layoutCorrected,this.layout.layoutBox);const a=this.treeScale.x,i=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let a,i;t.x=t.y=1;for(let s=0;s<o;s++){a=n[s],i=a.projectionDelta;const{visualElement:o}=a.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(ml(e.x,-a.scroll.offset.x),ml(e.y,-a.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,dl(e,i)),r&&al(a.latestValues)&&yl(e,a.latestValues,a.layout?.layoutBox))}t.x<pl&&t.x>fl&&(t.x=1),t.y<pl&&t.y>fl&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,t),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:s}=e;s?(this.projectionDelta&&this.prevProjectionDelta?(Vd(this.prevProjectionDelta.x,this.projectionDelta.x),Vd(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Fu(this.projectionDelta,this.layoutCorrected,s,this.latestValues),this.treeScale.x===a&&this.treeScale.y===i&&rf(this.projectionDelta.x,this.prevProjectionDelta.x)&&rf(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",s)),Ld.value&&lf.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1,n){const r=this.snapshot,o=r?r.latestValues:{},a={...this.latestValues},i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},l=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,d=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Cf));let f;this.animationProgress=0;const p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{const n=t/1e3,r=p?.(n);r?(i.x.translate=r.x,i.x.scale=$s(e.x.scale,1,n),i.x.origin=e.x.origin,i.x.originPoint=e.x.originPoint,i.y.translate=r.y,i.y.scale=$s(e.y.scale,1,n),i.y.origin=e.y.origin,i.y.originPoint=e.y.originPoint):(kf(i.x,e.x,n),kf(i.y,e.y,n)),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Qu(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),function(e,t,n,r){Df(e.x,t.x,n.x,r),Df(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&function(e,t){return Kd(e.x,t.x)&&Kd(e.y,t.y)}(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||(f={x:{min:0,max:0},y:{min:0,max:0}}),Qd(f,this.relativeTarget)),l&&(this.animationValues=a,function(e,t,n,r,o,a){o?(e.opacity=$s(0,n.opacity??1,Bd(r)),e.opacityExit=$s(t.opacity??1,0,Fd(r))):a&&(e.opacity=$s(t.opacity??1,n.opacity??1,r));for(let o=0;o<zd;o++){const a=Ws[o];let i=Ud(t,a),s=Ud(n,a);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||Rd(i)===Rd(s)?(e[a]=Math.max($s(Pd(i),Pd(s),r),0),(ba.test(s)||ba.test(i))&&(e[a]+="%")):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=$s(t.rotate||0,n.rotate||0,r))}(a,o,this.latestValues,n,d,u)),r&&void 0!==r.rotate&&(this.animationValues||(this.animationValues=a),this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Ni(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xi.update(()=>{Dd.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=hs(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=Za(e)?e:hs(e);return r.start(vu("",r,[0,1e3],n)),r.animation}(this.motionValue,0,{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&zf(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Uu(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Uu(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Qd(t,n),yl(t,o),Fu(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new of),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){const{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){const{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&df("z",e,r,this.animationValues);for(let t=0;t<cf.length;t++)df(`rotate${cf[t]}`,e,r,this.animationValues),df(`skew${cf[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=zl(t?.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=zl(t?.pointerEvents)||""),void(this.hasProjected&&!al(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const o=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=function(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,i=n?.z||0;if((o||a||i)&&(r=`translate3d(${o}px, ${a}px, ${i}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,pathRotation:o,rotateX:a,rotateY:i,skewX:s,skewY:l}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotate(${o}deg) `),a&&(r+=`rotateX(${a}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),l&&(r+=`skewY(${l}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(r+=`scale(${s}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,o);n&&(a=n(o,a)),e.transform=a;const{x:i,y:s}=this.projectionDelta;e.transformOrigin=`${100*i.origin}% ${100*s.origin}% 0`,r.animationValues?e.opacity=r===this?o.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:o.opacityExit:e.opacity=r===this?void 0!==o.opacity?o.opacity:"":void 0!==o.opacityExit?o.opacityExit:0;for(const t in qs){if(void 0===o[t])continue;const{correct:n,applyTo:i,isCSSVariable:s}=qs[t],l="none"===a?o[t]:n(o[t],r);if(i){const t=i.length;for(let n=0;n<t;n++)e[i[n]]=l}else s?this.options.visualElement.renderState.vars[t]=l:e[t]=l}this.options.layoutId&&(e.pointerEvents=r===this?zl(t?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(bf),this.root.sharedNodes.clear()}}}function mf(e){e.updateLayout()}function hf(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:r}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;if("size"===o)Ru(e=>{const r=a?t.measuredBox[e]:t.layoutBox[e],o=Uu(r);r.min=n[e].min,r.max=r.min+o});else if("x"===o||"y"===o){const e="x"===o?"y":"x";Zd(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else zf(o,t.layoutBox,n)&&Ru(r=>{const o=a?t.measuredBox[r]:t.layoutBox[r],i=Uu(n[r]);o.max=o.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+i)});const i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Fu(i,n,t.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?Fu(s,e.applyTransform(r,!0),t.measuredBox):Fu(s,n,t.layoutBox);const l=!Jd(i);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:a}=r;if(o&&a){const i=e.options.layoutAnchor||void 0,s={x:{min:0,max:0},y:{min:0,max:0}};Qu(s,t.layoutBox,o.layoutBox,i);const l={x:{min:0,max:0},y:{min:0,max:0}};Qu(l,n,a.layoutBox,i),tf(s,l)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=l,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function gf(e){Ld.value&&lf.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yf(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function wf(e){e.clearSnapshot()}function bf(e){e.clearMeasurements()}function vf(e){e.isLayoutDirty=!0,e.updateLayout()}function xf(e){e.isLayoutDirty=!1}function Nf(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Ef(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Mf(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function _f(e){e.resolveTargetDelta()}function If(e){e.calcProjection()}function Sf(e){e.resetSkewAndRotation()}function jf(e){e.removeLeadSnapshot()}function kf(e,t,n){e.translate=$s(t.translate,0,n),e.scale=$s(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Df(e,t,n,r){e.min=$s(t.min,n.min,r),e.max=$s(t.max,n.max,r)}function Cf(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Af={duration:.45,ease:[.4,0,.1,1]},Tf=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Of=Tf("applewebkit/")&&!Tf("chrome/")?Math.round:yi;function Lf(e){e.min=Of(e.min),e.max=Of(e.max)}function zf(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t){return Math.abs(e-t)<=.2}(nf(t),nf(n))}function Pf(e){return e!==e.root&&e.scroll?.wasRoot}const Rf=pf({attachResizeListener:(e,t)=>Gu(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),Uf={current:void 0},Bf=pf({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Uf.current){const e=new Rf({});e.mount(window),e.setOptions({layoutScroll:!0}),Uf.current=e}return Uf.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Ff={pan:{Feature:class extends rc{constructor(){super(...arguments),this.removePointerDownListener=yi}onPointerDown(e){this.session=new pd(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ud(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:kd(e),onStart:kd(t),onMove:kd(n),onEnd:(e,t)=>{delete this.session,r&&xi.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=cd(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends rc{constructor(e){super(e),this.removeGroupControls=yi,this.removeListeners=yi,this.controls=new Id(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yi}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Bf,MeasureLayout:Od}};function Yf(e,t){const n=Xu(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Zf(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&xi.postRender(()=>o(t,ld(t)))}function Qf(e){return Hu(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}const Vf=(e,t)=>!!t&&(e===t||Vf(e,t.parentElement)),Wf=new WeakSet;function Gf(e){return t=>{"Enter"===t.key&&e(t)}}function Hf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function $f(e){return sd(e)&&!Pu()}const Xf=new WeakSet;function qf(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&xi.postRender(()=>o(t,ld(t)))}const Jf=new WeakMap,Kf=new WeakMap,ep=e=>{const t=Jf.get(e.target);t&&t(e)},tp=e=>{e.forEach(ep)};const np={some:0,all:1},rp={inView:{Feature:class extends rc{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:np[r]};this.stopObserver=function(e,t,n){const r=function({root:e,...t}){const n=e||document;Kf.has(n)||Kf.set(n,{});const r=Kf.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(tp,{root:e,...t})),r[o]}(t);return Jf.set(e,n),r.observe(e),()=>{Jf.delete(e),r.unobserve(e)}}(this.node.current,a,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}},tap:{Feature:class extends rc{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=function(e,t,n={}){const[r,o,a]=Yf(e,n),i=e=>{const r=e.currentTarget;if(!$f(e))return;if(Xf.has(e))return;Wf.add(r),n.stopPropagation&&Xf.add(e);const a=t(r,e),i={...o,capture:!0},s=(e,t)=>{window.removeEventListener("pointerup",l,i),window.removeEventListener("pointercancel",c,i),Wf.has(r)&&Wf.delete(r),$f(e)&&"function"==typeof a&&a(e,{success:t})},l=e=>{s(e,r===window||r===document||n.useGlobalTarget||Vf(r,e.target))},c=e=>{s(e,!1)};window.addEventListener("pointerup",l,i),window.addEventListener("pointercancel",c,i)};return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,o),Qf(e)&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Gf(()=>{if(Wf.has(n))return;Hf(n,"down");const e=Gf(()=>{Hf(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Hf(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o)),t=e,Vu.has(t.tagName)||!0===t.isContentEditable||e.hasAttribute("tabindex")||(e.tabIndex=0))}),a}(e,(e,t)=>(qf(this.node,t,"Start"),(e,{success:t})=>qf(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:!1===n?.tap})}unmount(){}}},focus:{Feature:class extends rc{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=fc(Gu(this.node.current,"focus",()=>this.onFocus()),Gu(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends rc{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,a]=Yf(e,n);return r.forEach(e=>{let n,r=!1,a=!1;const i=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},s=e=>{r=!1,window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",s),a&&(a=!1,i(e))},l=e=>{"touch"!==e.pointerType&&(r?a=!0:i(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Pu())return;a=!1;const i=t(e,r);"function"==typeof i&&(n=i,e.addEventListener("pointerleave",l,o))},o),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",s,o)},o)}),a}(e,(e,t)=>(Zf(this.node,t,"Start"),e=>Zf(this.node,e,"End"))))}unmount(){}}}},op=nc({...Lu,...rp,...Ff,layout:{ProjectionNode:Bf,MeasureLayout:Od}},Nl),ap=(0,w.createContext)({}),ip=ap.Provider,sp=()=>(0,w.useContext)(ap),lp=(e,t,n)=>{if(!e||!t)return{open:()=>({}),closed:()=>({})};const r=e?.getBoundingClientRect(),o=t?.getBoundingClientRect(),a=n?r?.x-o?.x+r?.width/2:o?.width-(o?.right-r?.x)+r?.width/2,i=r?.y-o?.y+r?.height/2;return{open:(e=1e3)=>({clipPath:`circle(${2*e+200}px at ${a}px ${i}px)`,background:"rgb(255, 255, 255, 1)",transition:{type:"spring",stiffness:20,restDelta:2,background:{duration:0}}}),closed:{clipPath:`circle(${r?.width/2}px at ${a}px ${i}px)`,background:"rgb(255, 255, 255, 0)",transition:{delay:.5,type:"spring",stiffness:400,damping:40,background:{duration:0,delay:1e3}}}}},cp=e=>(0,R.jsx)(op.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),up=({className:e})=>{const{toggleOpen:t,setTriggerRef:n,isOpen:r}=sp();return(0,R.jsx)(Wo,{ref:n,className:Le("relative z-[1] rounded-full hover:shadow-sm focus:[box-shadow:none] pointer-events-auto bg-background-primary",e),variant:"ghost",size:"xs",onClick:t,"aria-label":"Toggle menu","aria-expanded":r,icon:(0,R.jsxs)(op.svg,{className:"shrink-0 stroke-icon-primary",width:"23",height:"23",variants:{open:{viewBox:"0 0 20 20"},closed:{viewBox:"0 0 23 18"}},children:[(0,R.jsx)(cp,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),(0,R.jsx)(cp,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),(0,R.jsx)(cp,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},dp={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},fp=({tag:e="a",active:t,icon:n,iconPosition:r="left",className:o,children:a,...i})=>{let s=null,l=null;const c=n&&(0,w.isValidElement)(n)?(0,w.cloneElement)(n,{key:"left-icon",className:Le("size-5",t?"text-brand-800":"text-icon-secondary",n.props?.className??"")}):null;switch(r){case"left":s=c;break;case"right":l=c;break;default:s=null,l=null}return(0,R.jsx)(mp,{children:(0,R.jsxs)(e,{className:Le("w-full no-underline hover:no-underline text-text-primary text-lg font-medium flex items-center gap-2 px-2.5 py-1.5 rounded-md hover:bg-background-secondary hover:text-text-primary focus:outline-none focus:shadow-none transition ease-in-out duration-150",t?"text-text-primary bg-background-secondary":"text-text-secondary",o),...i,children:[!!s&&s,(0,R.jsx)("span",{className:"contents",children:a}),!!l&&l]})})},pp={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},mp=({children:e})=>(0,R.jsx)(op.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:pp,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),hp=({children:e,className:t})=>{const{triggerRef:n,triggerOnRight:r,triggerOnLeft:o}=sp(),[a,i]=(0,w.useState)(null);return n?(0,R.jsxs)(op.div,{ref:i,className:Le("absolute top-0 bottom-0 w-80 h-screen",r?"right-0":"left-0",t),children:[a&&(0,R.jsx)(op.div,{className:Le("bg-background-primary shadow-lg absolute top-0 bottom-0 w-80 border-y-0 border-l-0 border-r border-solid border-border-subtle",r?"right-0":"left-0"),variants:lp(n,a,o??!1)}),(0,R.jsx)(op.ul,{variants:dp,className:Le("relative mt-14 mb-0 w-full px-5 pb-5 pt-2 flex flex-col items-start justify-start gap-0.5",t),children:e})]}):null},gp=({className:e,children:t})=>{const[n,r]=function(...e){const t=(0,w.useRef)(0),[n,r]=(0,w.useState)(e[t.current]),o=(0,w.useCallback)(n=>{t.current="number"!=typeof n?((e,t,n)=>{const r=t-0;return((n-0)%r+r)%r+0})(0,e.length,t.current+1):n,r(e[t.current])},[e.length,...e]);return[n,o]}(!1,!0),[o,a]=(0,w.useState)(null),i=(0,w.useRef)(null),{height:s}=(e=>{const t=(0,w.useRef)({width:0,height:0});return(0,w.useEffect)(()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)},[]),t.current})(i),{isRight:l=!1,isLeft:c=!0}=(e=>{if(!e)return{error:"Element not found."};const t=e.getBoundingClientRect(),n=window.innerWidth,r=n/2,o=t.right<r,a=t.left>r;return{isLeft:o,isRight:a,isCenter:!o&&!a,elementRect:{left:t.left,right:t.right,width:t.width},viewport:{width:n,center:r}}})(o);return(0,R.jsx)(ip,{value:{isOpen:n,toggleOpen:r,setTriggerRef:e=>{(0,w.startTransition)(()=>{a(e)})},triggerRef:o,triggerOnRight:l,triggerOnLeft:c},children:(0,R.jsx)("div",{className:Le("size-6 z-[1]",e),children:(0,R.jsx)(op.nav,{className:"h-full",initial:!1,animate:n?"open":"closed",custom:s,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:i,children:t})})})};gp.displayName="HamburgerMenu",up.displayName="HamburgerMenu.Toggle",hp.displayName="HamburgerMenu.Options",fp.displayName="HamburgerMenu.Option",gp.Options=hp,gp.Option=fp,gp.Toggle=up;const yp=(0,w.forwardRef)(({children:e=null,tag:t="label",size:n="sm",className:r="",variant:o="neutral",required:a=!1,...i},s)=>{if(!e)return null;let l="";return a&&(l="after:content-['*'] after:text-field-required after:ml-0.5"),(0,R.jsx)(t,{ref:s,className:Le("font-medium text-field-label flex items-center gap-0.5",{xs:"text-xs [&>*]:text-xs [&>svg]:h-3 [&>svg]:w-3",sm:"text-sm [&>*]:text-sm [&>svg]:h-4 [&>svg]:w-4",md:"text-base [&>*]:text-base [&>svg]:h-5 [&>svg]:w-5"}[n],{neutral:"text-field-label [&>*]:text-field-label",help:"text-field-helper [&>*]:text-field-helper",error:"text-support-error [&>*]:text-support-error",disabled:"text-field-color-disabled disabled cursor-not-allowed [&>*]:text-field-color-disabled"}[o],l,{neutral:"",help:"font-normal",error:"font-normal",disabled:""}?.[o],r),...i,children:e})});yp.displayName="Label";var bp=o(6942),vp=o.n(bp);const xp=o.p+"images/cartflows-symbol.4a28363b.png";var Np=function(e,t,n,r){return new(n||(n=Promise))(function(o,a){function i(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof n?e:new n(function(t){t(e)})}(e.value).then(i,s)}l((r=r.apply(e,t||[])).next())})};const Ep={rssFeedURL:"",selector:"",uniqueKey:"",loaderIcon:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">\n\t<circle cx="50" cy="50" fill="none" stroke="#9f9f9f" stroke-width="10" r="35" stroke-dasharray="164.93361431346415 56.97787143782138">\n\t\t<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform>\n\t</circle>\n\t</svg>',viewAll:{link:"",label:"View All"},triggerButton:{label:"",icon:'<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.61703 13.1998C8.04294 13.1503 7.46192 13.125 6.875 13.125H6.25C4.17893 13.125 2.5 11.4461 2.5 9.375C2.5 7.30393 4.17893 5.625 6.25 5.625H6.875C7.46192 5.625 8.04294 5.59972 8.61703 5.55018M8.61703 13.1998C8.82774 14.0012 9.1031 14.7764 9.43719 15.5195C9.64341 15.9782 9.48685 16.5273 9.05134 16.7787L8.50441 17.0945C8.04492 17.3598 7.45466 17.1921 7.23201 16.7106C6.70983 15.5811 6.30451 14.3866 6.03155 13.1425M8.61703 13.1998C8.29598 11.9787 8.125 10.6968 8.125 9.375C8.125 8.05316 8.29598 6.77125 8.61703 5.55018M8.61703 13.1998C11.25 13.427 13.737 14.1643 15.9789 15.3124M8.61703 5.55018C11.25 5.323 13.737 4.58569 15.9789 3.43757M15.9789 3.43757C15.8808 3.12162 15.7751 2.80903 15.662 2.5M15.9789 3.43757C16.4247 4.87356 16.7131 6.37885 16.8238 7.93326M15.9789 15.3124C15.8808 15.6284 15.7751 15.941 15.662 16.25M15.9789 15.3124C16.4247 13.8764 16.7131 12.3711 16.8238 10.8167M16.8238 7.93326C17.237 8.2772 17.5 8.79539 17.5 9.375C17.5 9.95461 17.237 10.4728 16.8238 10.8167M16.8238 7.93326C16.8578 8.40942 16.875 8.8902 16.875 9.375C16.875 9.8598 16.8578 10.3406 16.8238 10.8167" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',beforeBtn:"",afterBtn:"",className:"",onClick:()=>{}},notification:{setLastPostUnixTime:null,getLastPostUnixTime:null},flyout:{title:"What's New?",innerContent:{titleLink:!0,additionalClasses:[]},excerpt:{wordLimit:500,moreSymbol:"…",readMore:{label:"Read More",className:""}},className:"",closeOnEsc:!0,closeOnOverlayClick:!0,closeBtnIcon:'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 18L18 6M6 6L18 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',formatDate:null,onOpen:()=>{},onClose:()=>{},onReady:()=>{}}};class Mp{constructor(e){this.rssFeedURLs=[],this.lastPostUnixTime=0,this.multiLastPostUnixTime={},this.notificationsCount=0,this.multiNotificationCount={},this.hasNewFeeds=!1,this.multiHasNewFeeds={},this.validateArgs(e),this.parseDefaults(e),this.setElement(),this.getElement()?(this.setID(),this.setRSSFeedURLs(),_p.setInstanceID(this.getID()),this.RSS_Fetch_Instance=new Ip(this),this.RSS_View_Instance=new Sp(this),this.setNotificationsCount(),this.setTriggers()):console.warn("WNR: Cannot find element with",this.getArgs().selector)}validateArgs(e){["rssFeedURL","selector","uniqueKey"].forEach(t=>{if(!e[t])throw new Error(`${t} is a required argument. It cannot be empty or undefined.`);if("rssFeedURL"===t){const n=e[t];Array.isArray(n)&&n.forEach(e=>{if(!(null==e?void 0:e.key))throw new Error(`The parameter "key" is required for "${t}" parameter in multi-feed mode.`);if(e.key.includes(" "))throw new Error(`The parameter "key" cannot have spaces for "${t}" parameter in multi-feed mode. Ref Key: "${e.key}"`)})}})}parseDefaults(e){var t,n;this.args=Object.assign(Object.assign(Object.assign({},Ep),e),{viewAll:Object.assign(Object.assign({},Ep.viewAll),null==e?void 0:e.viewAll),triggerButton:Object.assign(Object.assign({},Ep.triggerButton),null==e?void 0:e.triggerButton),flyout:Object.assign(Object.assign(Object.assign({},Ep.flyout),null==e?void 0:e.flyout),{innerContent:Object.assign(Object.assign({},Ep.flyout.innerContent),null===(t=null==e?void 0:e.flyout)||void 0===t?void 0:t.innerContent),excerpt:Object.assign(Object.assign({},Ep.flyout.excerpt),null===(n=null==e?void 0:e.flyout)||void 0===n?void 0:n.excerpt)})})}getArgs(){return this.args}setElement(){this.element=document.querySelector(this.args.selector)}getElement(){return this.element}setID(){const e=[this.getArgs().selector,this.getArgs().uniqueKey],t=this.getArgs().rssFeedURL;Array.isArray(t)?t.forEach(t=>{e.push(t.key)}):e.push(t),this.ID=btoa(e.join("-")).slice(-12).replace(/=/g,"")+"-"+this.getArgs().uniqueKey}isMultiFeedRSS(){return"string"!=typeof this.getArgs().rssFeedURL}setRSSFeedURLs(){const e=this.getArgs().rssFeedURL;this.isMultiFeedRSS()?Array.isArray(e)&&e.forEach(e=>{this.rssFeedURLs.push(e)}):this.rssFeedURLs.push({key:null,label:"",url:e.toString()})}getRSSFeedURLs(){return this.rssFeedURLs}getID(){return this.ID}setNotificationsCount(){return Np(this,void 0,void 0,function*(){yield Promise.all(this.getRSSFeedURLs().map(e=>Np(this,[e],void 0,function*({key:e}){let t=0;t="function"==typeof this.getArgs().notification.getLastPostUnixTime?yield this.getArgs().notification.getLastPostUnixTime(e,this):_p.getLastPostUnixTime(e),this.isMultiFeedRSS()?this.multiLastPostUnixTime[e]=+t:this.lastPostUnixTime=+t}))),yield this.RSS_Fetch_Instance.fetchData().then(e=>{Object.keys(e).forEach(t=>{const n=e[t];if(!n.length)return;this.multiNotificationCount[t]=0;const r=+n[0].date,o=this.isMultiFeedRSS()?this.multiLastPostUnixTime[t]:this.lastPostUnixTime;r>o&&(n.forEach(e=>{e.date>o&&(this.isMultiFeedRSS()&&(this.multiNotificationCount[t]++,this.multiHasNewFeeds[t]=!0),this.notificationsCount++,this.hasNewFeeds=!0)}),this.RSS_View_Instance.setNotification(this.notificationsCount))})}).catch(console.error)})}getNotificationsCount(){return this.notificationsCount}setTriggers(){const e=document.getElementById(this.RSS_View_Instance.getTriggerButtonID()),t=document.getElementById(this.RSS_View_Instance.getFlyoutID()),n=t.querySelector(".whats-new-rss-flyout-inner-content"),r=document.getElementById(this.RSS_View_Instance.getFlyoutCloseBtnID()),o=document.getElementById(this.RSS_View_Instance.getFlyoutMultiFeedNavID()),a=e=>{this.RSS_Fetch_Instance.fetchData().then(r=>{n.innerHTML="";const o=r[e];if(!o.length)return;const a=+o[0].date,i=this.isMultiFeedRSS()?this.multiLastPostUnixTime[e]:this.lastPostUnixTime;o.forEach(t=>{const r=!!i&&t.date>i,o=this.getArgs().flyout.innerContent.titleLink?`<a href="${t.postLink}" target="_blank">\n\t\t\t\t\t\t\t\t<h2>${t.title}</h2>\n\t\t\t\t\t\t\t</a>`:`<h2>${t.title}</h2>`,a=`\n\t\t\t\t\t\t\t\t<div class="rss-content-header">\n\t\t\t\t\t\t\t\t\t<p>${this.RSS_View_Instance.formatDate(new Date(t.date))}</p>\n\t\t\t\t\t\t\t\t\t${o}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t${this.RSS_View_Instance.createExcerpt(t.description,t.postLink,this.getArgs().flyout.excerpt)}\n\t\t\t\t\t\t\t\t${this.RSS_View_Instance.listChildrenPosts(t.children)}\n\t\t\t\t\t\t\t`,s=this.getArgs().flyout.innerContent.additionalClasses;e&&s.push("`inner-content-item-feed-key-${key}`"),n.innerHTML+=this.RSS_View_Instance.innerContentWrapper(a,r,s.join(" "))}),this.getArgs().viewAll.link&&(n.innerHTML+=this.RSS_View_Instance.innerContentWrapper(`\n\t\t\t\t\t\t\t<a href="${this.getArgs().viewAll.link}" class="button view-all">${this.getArgs().viewAll.label}</a>\n\t\t\t\t\t\t\t`)),this.RSS_View_Instance.setIsLoading(!1),t.classList.add("ready"),this.getArgs().flyout.onReady(this),t.focus(),this.isMultiFeedRSS()||(this.lastPostUnixTime=a,this.hasNewFeeds&&("function"==typeof this.getArgs().notification.setLastPostUnixTime?this.getArgs().notification.setLastPostUnixTime(a,e):_p.setLastPostUnixTime(a,e)))}).catch(console.error)};e.addEventListener("click",e=>{e.preventDefault();const n=window.innerWidth-document.documentElement.clientWidth;if(this.getArgs().triggerButton.onClick(this),this.RSS_View_Instance.setIsLoading(!0),t.removeAttribute("style"),t.classList.remove("closed"),t.classList.add("open"),document.body.classList.add("whats-new-rss-is-active"),n){const e=document.getElementById("whats-new-rss-styles");(null==e?void 0:e.sheet)&&e.sheet.insertRule(`.whats-new-rss-is-active { background-color: yellow; padding-right: ${n}px; }`,e.sheet.cssRules.length)}if(this.getArgs().flyout.onOpen(this),!this.isMultiFeedRSS())return void a(null);const r=o.querySelectorAll("button");r.forEach(e=>{this.RSS_View_Instance.setMultiFeedTabNotificationCount(e.dataset.feedKey,this.multiNotificationCount[e.dataset.feedKey]),e.addEventListener("click",t=>{t.preventDefault();const n=e.dataset.feedKey;this.multiNotificationCount[n]=0,this.RSS_Fetch_Instance.fetchData().then(e=>{const t=e[n][0].date;this.multiLastPostUnixTime[n]=t,!0===this.multiHasNewFeeds[n]&&("function"==typeof this.getArgs().notification.setLastPostUnixTime?this.getArgs().notification.setLastPostUnixTime(t,n):_p.setLastPostUnixTime(t,n)),this.multiHasNewFeeds[n]=!1}).catch(console.error),r.forEach(e=>{e.classList.remove("selected");const t=e.dataset.feedKey,r=`.inner-content-item-feed-key-${t}`;document.querySelectorAll(r).forEach(e=>{n!==t?e.classList.add("hidden"):e.classList.remove("hidden")})}),e.classList.add("selected"),a(n)})}),r[0].click()});const i=()=>{t.classList.add("closed"),t.classList.remove("open"),t.classList.remove("ready"),document.body.classList.remove("whats-new-rss-is-active"),this.isMultiFeedRSS()?this.RSS_View_Instance.setNotification(Object.values(this.multiNotificationCount).filter(Boolean).length):(this.hasNewFeeds=!1,this.RSS_View_Instance.setNotification(!1)),n.innerHTML="",this.getArgs().flyout.onClose(this),e.focus()};this.getArgs().flyout.closeOnEsc&&document.addEventListener("keydown",function(e){"Escape"===e.key&&t.classList.contains("open")&&i()}),this.getArgs().flyout.closeOnOverlayClick&&t.querySelector(".whats-new-rss-flyout-overlay").addEventListener("click",i),r.addEventListener("click",i)}}class _p{static setInstanceID(e){this.instanceID||(this.instanceID=e)}static prefixer(e,t=""){if(!this.instanceID)throw new Error("Instance ID not set.");return t?`${this.keys[e]}-${this.instanceID}-${t}`:`${this.keys[e]}-${this.instanceID}`}static _setDataExpiry(e=""){const t=(new Date).getTime()+864e5;sessionStorage.setItem(this.prefixer("SESSION_DATA_EXPIRY",e),JSON.stringify(t))}static _isDataExpired(e=""){const t=this.prefixer("SESSION_DATA_EXPIRY",e),n=window.sessionStorage.getItem(t);if(!n)return!0;const r=JSON.parse(n);return(new Date).getTime()>r&&(window.sessionStorage.removeItem(t),!0)}static setSessionData(e,t=""){return this._setDataExpiry(t),window.sessionStorage.setItem(this.prefixer("SESSION",t),e)}static getSessionData(e=""){return this._isDataExpired(e)?"{}":window.sessionStorage.getItem(this.prefixer("SESSION",e))}static setLastPostUnixTime(e,t=""){return window.localStorage.setItem(this.prefixer("LAST_LATEST_POST",t),e.toString())}static getLastPostUnixTime(e=""){return+window.localStorage.getItem(this.prefixer("LAST_LATEST_POST",e))}}_p.keys={SESSION_DATA_EXPIRY:"whats-new-cache-expiry",LAST_LATEST_POST:"whats-new-last-unixtime",SESSION:"whats-new-cache"};class Ip{constructor(e){this.data={},this.RSS=e,this.RSS.getRSSFeedURLs().forEach(e=>{const t=JSON.parse(_p.getSessionData(e.key));t&&t.length&&(this.data[e.key]=t)})}fetchData(){return Np(this,void 0,void 0,function*(){if(Object.keys(this.data).length)return this.data;const e=this.RSS.getRSSFeedURLs().map(e=>Np(this,void 0,void 0,function*(){this.data[e.key]=[];const t=yield fetch(e.url);let n=yield t.text();n=n.replace(/»/g,"&raquo;"),(new DOMParser).parseFromString(n,"text/xml").querySelectorAll("item").forEach(t=>{var n;const r=t.querySelector("title").textContent,o=t.querySelector("link").textContent,a=t.querySelector("content\\:encoded, encoded"),i=a?a.textContent:"",s=t.querySelector("pubDate").innerHTML;this.data[e.key].push({title:r,date:s?+new Date(s):null,postLink:o,description:i.replace(/<a\b((?:(?!target=)[^>])*)>/g,'<a$1 target="_blank">').replace(/<p>\s*<\/p>/g,""),children:JSON.parse((null===(n=t.querySelector("children"))||void 0===n?void 0:n.innerHTML)||"{}")})}),_p.setSessionData(JSON.stringify(this.data[e.key]),e.key)}));return yield Promise.all(e),this.data})}}class Sp{constructor(e){this.RSS=e,this.createTriggerButton(),this.createFlyOut()}getTriggerButtonID(){return`whats-new-rss-btn-${this.RSS.getID()}`}getFlyoutID(){return`whats-new-rss-flyout-${this.RSS.getID()}`}getFlyoutCloseBtnID(){return`whats-new-rss-flyout-close-${this.RSS.getID()}`}getFlyoutMultiFeedNavID(){return`whats-new-rss-flyout-multi-feed-nav-${this.RSS.getID()}`}setIsLoading(e=!1){const t=document.getElementById(this.getFlyoutID());e?t.classList.add("is-loading"):t.classList.remove("is-loading")}setNotification(e){const t=document.querySelector(`#${this.getTriggerButtonID()} .whats-new-rss-notification-badge`);e?(this.RSS.isMultiFeedRSS()?(t.innerHTML="",t.classList.add("is-multi-feed")):t.innerHTML=e>9?"9+":e.toString(),t.classList.remove("hide")):t.classList.add("hide")}createTriggerButton(){let e="";const t=this.RSS.getArgs().triggerButton.label;e=t?`\n\t\t\t${this.RSS.getArgs().triggerButton.beforeBtn}\n\t\t\t<a class="whats-new-rss-trigger-button has-label" id="${this.getTriggerButtonID()}">\n\t\t\t\t<div class="icon-badge">\n\t\t\t\t\t${this.RSS.getArgs().triggerButton.icon}\n\t\t\t\t\t<div class="whats-new-rss-notification-badge hide">0</div>\n\t\t\t\t</div>\n\t\t\t\t${t}\n\t\t\t</a>\n\t\t\t${this.RSS.getArgs().triggerButton.afterBtn}\n\t\t\t`:`\n\t\t\t${this.RSS.getArgs().triggerButton.beforeBtn}\n\t\t\t<a class="whats-new-rss-trigger-button" id="${this.getTriggerButtonID()}">\n\t\t\t\t${this.RSS.getArgs().triggerButton.icon}\n\t\t\t\t<div class="whats-new-rss-notification-badge hide">0</div>\n\t\t\t</a>\n\t\t\t${this.RSS.getArgs().triggerButton.afterBtn}\n\t\t\t`,this.RSS.getElement().innerHTML+=e}createFlyOut(){const e=["whats-new-rss-flyout","closed"];this.RSS.getArgs().flyout.className&&e.push(this.RSS.getArgs().flyout.className);let t=[];this.RSS.isMultiFeedRSS()&&(t.push(`<nav id="${this.getFlyoutMultiFeedNavID()}" class="whats-new-rss-multi-feed-nav">`),this.RSS.getRSSFeedURLs().forEach(e=>{t.push(`<button type="button" data-feed-key="${e.key}">\n\t\t\t\t\t\t${e.label}\n\t\t\t\t\t\t<div class="new-notification-count"></div>\n\t\t\t\t\t</button>\n\t\t\t\t\t`)}),t.push("</nav>"));const n=document.createElement("div");n.setAttribute("id",this.getFlyoutID()),n.setAttribute("class",e.join(" ")),n.setAttribute("role","dialog"),n.setAttribute("style","visibility:hidden"),n.innerHTML=`\n\t\t<div class="whats-new-rss-flyout-contents">\n\n\t\t\t<div class="whats-new-rss-flyout-inner-header">\n\n\t\t\t\t<div class="whats-new-rss-flyout-inner-header__title-icon-wrapper">\n\t\t\t\t\t<h3>${this.RSS.getArgs().flyout.title}</h3>\n\n\t\t\t\t\t<span class="whats-new-rss-flyout-inner-header__loading-icon">\n\t\t\t\t\t${this.RSS.getArgs().loaderIcon}\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\n\t\t\t\t<button type="button" id="${this.getFlyoutCloseBtnID()}">${this.RSS.getArgs().flyout.closeBtnIcon}</button>\n\t\t\t</div>\n\n\t\t\t${t.join("")}\n\n\t\t\t<div class="whats-new-rss-flyout-inner-content">\n\t\t\t\t<div class="skeleton-container">\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t\t<div class="skeleton-row whats-new-rss-flyout-inner-content-item"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t</div>\n\n\t\t<div class="whats-new-rss-flyout-overlay"></div>\n\t\t`,document.body.appendChild(n)}setMultiFeedTabNotificationCount(e,t=0){const n=document.querySelector(`#${this.getFlyoutMultiFeedNavID()} button[data-feed-key="${e}"]`);if(!n)return;const r=n.querySelector(".new-notification-count");if(t){const e=t>9?"9+":t;r.innerHTML=e.toString()}else r.innerHTML=""}innerContentWrapper(e,t=!1,n=""){const r=["whats-new-rss-flyout-inner-content-item"];return t&&r.push("rss-new-post"),n&&r.push(n),`\n\t\t<div class="${r.join(" ")}">\n\t\t\t${t?'<small class="new-post-badge">New ✨</small>':""}\n\t\t\t${e}\n\t\t</div>\n\t\t`}createExcerpt(e,t,n){const{wordLimit:r,moreSymbol:o,readMore:a}=n;if(!r)return e;const i=e.replace(/<[^>]*>/g,"").split(/\s+/);let s=i.slice(0,r).join(" ");return o&&(s+=o),r>i.length?e:t&&(null==a?void 0:a.label)?`<p>${s} <a href="${t}" target="_blank" class="${a.className}">${a.label}</a></p>`:`<p>${s}</p>`}listChildrenPosts(e){const t=Object.values(e);if(!t.length)return"";const n=document.createElement("details"),r=document.createElement("summary"),o=document.createElement("div");return t.forEach(e=>{const t=(new DOMParser).parseFromString(e.post_content,"text/html"),n=document.createElement("div");n.classList.add("sub-version-item"),n.innerHTML=`\n\t\t\t\t<div class="sub-version-header">\n\t\t\t\t\t<h4 class="sub-version-title">${e.post_title}</h4>\n\t\t\t\t\t<span class="sub-version-date">${this.formatDate(new Date(e.post_date))}</span>\n\t\t\t\t</div>\n\t\t\t\t<div class="sub-version-content">${t.documentElement.textContent}</div>\n\t\t\t`,o.appendChild(n)}),r.innerHTML='<p class="text-see-more">See More</p><p class="text-see-less">See Less</p>',n.appendChild(r),n.appendChild(o),o.classList.add("sub-version-items-wrapper"),n.classList.add("whats-new-rss-sub-version-details"),n.outerHTML}formatDate(e){if("function"==typeof this.RSS.getArgs().flyout.formatDate)return this.RSS.getArgs().flyout.formatDate(e);const t=new Date,n=e.getTime(),r=t.getTime()-n,o=36e5,a=24*o,i=7*a,s=30*a;if(r<6e4)return"Just now";if(r<o){const e=Math.floor(r/6e4);return`${e} minute${e>1?"s":""} ago`}if(r<a){const e=Math.floor(r/o);return`${e} hour${e>1?"s":""} ago`}if(r<i){const e=Math.floor(r/a);return`${e} day${e>1?"s":""} ago`}if(r<s){const e=Math.floor(r/i);return`${e} week${e>1?"s":""} ago`}{const e=Math.floor(r/s);return`${e} month${e>1?"s":""} ago`}}}const jp=function(){const e=cartflows_admin?.whats_new_rss_feed;return function({selector:e,...t}){const n=(0,w.useRef)(null);(0,w.useEffect)(()=>{var r;return async function(){const e="whats-new-rss-styles";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.innerHTML=await async function(){return'@import url(https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&display=swap);.whats-new-rss-is-active{overflow:hidden}.whats-new-rss-trigger-button{display:flex;align-items:center;position:relative;width:auto;padding:0!important;cursor:pointer}.whats-new-rss-trigger-button.has-label{align-items:end;gap:10px}.whats-new-rss-trigger-button.has-label .icon-badge{position:relative;line-height:1}.whats-new-rss-trigger-button.has-label .icon-badge .whats-new-rss-notification-badge{top:-12px;right:-10px}.whats-new-rss-trigger-button .whats-new-rss-notification-badge{position:absolute;top:-8px;right:-9px;width:18px;height:18px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:#ff580e;display:flex;align-items:center;justify-content:center;transition:transform .2s ease-in-out}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.is-multi-feed{top:-2px;right:-2px;font-size:0;width:10px;height:10px}.whats-new-rss-trigger-button .whats-new-rss-notification-badge.hide{display:none!important}.whats-new-rss-trigger-button:hover .whats-new-rss-notification-badge{transform:unset}.whats-new-rss-flyout{position:fixed;top:0;right:0;bottom:0;width:100%;z-index:99999;transition:visibility .3s ease-in-out;font-family:Figtree,sans-serif;height:100vh;font-size:15px;font-weight:400;line-height:20px;color:#374151;margin-bottom:5px}.whats-new-rss-flyout *,.whats-new-rss-flyout ::after,.whats-new-rss-flyout ::before{box-sizing:border-box}.whats-new-rss-flyout .lightbox-trigger,.whats-new-rss-flyout.hidden{display:none}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon{display:block;margin:auto}.whats-new-rss-flyout.is-loading .whats-new-rss-flyout-inner-header__loading-icon svg{display:block;background:0 0;width:25px;height:25px}.whats-new-rss-flyout p{font-size:14px;font-weight:400;line-height:20px;color:#374151;margin-bottom:15px}.whats-new-rss-flyout p a{color:#1170ff}.whats-new-rss-flyout .wp-block-uagb-buttons{background:#ff6c0a;padding:10px 18px;width:fit-content;color:#fff;border-radius:6px;box-shadow:0 1px 2px rgba(0,0,0,.05);margin-bottom:15px}.whats-new-rss-flyout .wp-block-uagb-buttons .uagb-button__link{color:#fff;font-size:1rem;font-weight:600;line-height:1.5rem}.whats-new-rss-flyout .ast-oembed-container{position:relative;padding-top:56.25%;height:0;overflow:hidden;max-width:100%;height:auto}.whats-new-rss-flyout .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.whats-new-rss-flyout .whats-new-rss-flyout-contents{position:fixed;display:flex;right:0;width:30%;height:100%;flex-direction:column;background-color:#fff;transition:transform .3s ease-in-out;z-index:9999}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header{display:flex;justify-content:space-between;align-items:center;padding:16px!important;border-bottom:1px solid #e5e7eb}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header [id^=whats-new-rss-flyout-close-]{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header button{border:none;background:0 0;font-size:30px;cursor:pointer;color:#111827;padding:0;margin:0;box-shadow:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper{display:flex;gap:10px;padding:0 4px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-header .whats-new-rss-flyout-inner-header__title-icon-wrapper h3{margin:0;padding:0;color:#111827;font-weight:600;font-size:16px;line-height:24px;margin-bottom:0!important}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav{display:flex;padding:0 30px;border-bottom:1px solid #e5e7eb;gap:2em;overflow:auto;white-space:nowrap}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button{position:relative;background:0 0;color:inherit;padding:15px 0;border-bottom:2px solid transparent}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:focus,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button:hover{border-color:inherit}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button.selected{border-color:#5d5d5d}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-multi-feed-nav button .new-notification-count{position:absolute;top:0;right:-10px;width:20px;font-size:10px;line-height:20px;text-align:center;border-radius:10px;color:#fff;background:red}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content{flex:1;overflow-y:auto}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .skeleton-container{margin:30px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item{border-bottom:1px solid #d8dfe9;padding:20px;color:#374151;font-weight:400;font-size:14px;line-height:20px;display:flex;flex-direction:column}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>:nth-child(n+1){margin:8px 0 8px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>:first-child{margin-top:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>:nth-child(n+1):is(ul){margin-top:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>:nth-child(n+1):is(div):has(figure){margin-bottom:12px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item img{margin:0!important}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .wp-smiley{display:inline-block;margin:0;min-height:1em;margin-bottom:4px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item>*{margin:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h2{font-size:22px;font-weight:600;line-height:1.5em;margin-bottom:15px;padding-top:12px;padding-bottom:4px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h3{font-size:20px;font-weight:600;line-height:1.5em;padding-top:12px;padding-bottom:4px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h4{font-size:18px;font-weight:600;line-height:1.5em;padding-top:12px;padding-bottom:4px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h5{font-size:16px;font-weight:600;line-height:1.5em;margin-bottom:15px;padding-top:12px;padding-bottom:4px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item h6{font-size:13px;font-weight:600;line-height:1.5em;margin-bottom:15px;padding-top:12px;padding-bottom:4px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.skeleton-row{height:25vh;margin:40px 0;background:linear-gradient(90deg,#eee 25%,#ddd 50%,#eee 75%);background-size:200% 100%;animation:shimmer 1.5s infinite}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post{position:relative}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item.rss-new-post .new-post-badge{background:#ff6c0a;border-radius:4px;top:22px;right:24px;padding:0 4px;color:#fff;position:absolute}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header{display:flex;flex-direction:column;gap:4px;padding:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header p{color:#6b7280;margin:0;padding:0;font-weight:500;line-height:16px;font-size:12px;margin-bottom:0!important}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item .rss-content-header h2{margin:0;color:#111827;font-weight:600;line-height:30px;font-size:20px;padding:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item p{padding:0;font-size:14px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item a{color:#1170ff;text-decoration:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure{margin:10px 0;margin-bottom:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure.wp-block-embed.is-type-video{position:relative;width:100%;height:0;padding-bottom:56.25%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item figure iframe{position:absolute;top:0;left:0;width:100%;height:100%;border:0;max-width:100%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;margin-bottom:15px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item video{vertical-align:middle;width:100%}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item strong{font-weight:600}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{padding-inline-start:20px;margin-left:10px}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol li,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul li{font-size:14px;font-weight:400;line-height:20px;color:#374151;margin:0 0 4px 0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol li:last-child,.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul li:last-child{margin-bottom:0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ul{list-style-type:disc}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-flyout-inner-content .whats-new-rss-flyout-inner-content-item ol{list-style-type:decimal}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details{line-height:20px;font-size:.9em;margin:10px 0;background:#f9fafb}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary{display:flex;justify-content:space-between;cursor:pointer;padding:20px 15px;height:1em;line-height:20px;font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary::after{content:"⌃";font-size:20px;transform:rotateX(180deg);font-weight:800}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-more{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details summary .text-see-less{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary{border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary::after{transform:rotateX(45deg)}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-more{display:none}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details[open] summary .text-see-less{display:block}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item{position:relative;padding:1em;border-bottom:1px solid #e2e8f0}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-header{display:flex;justify-content:space-between}.whats-new-rss-flyout .whats-new-rss-flyout-contents .whats-new-rss-sub-version-details .sub-version-item .sub-version-content{margin-top:1em}.whats-new-rss-flyout .whats-new-rss-flyout-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.5);transition:all .3s ease-in-out}.whats-new-rss-flyout.closed{visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-overlay{opacity:0;visibility:hidden}.whats-new-rss-flyout.closed .whats-new-rss-flyout-contents{transform:translateX(100%)}.whats-new-rss-flyout .whats-new-rss-flyout-inner-header__loading-icon{display:none}@keyframes shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}@media screen and (max-width:1024px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:40%}}@media screen and (max-width:768px){.whats-new-rss-flyout .whats-new-rss-flyout-contents{width:85%}}'}(),document.head.appendChild(t)}}(),n.current||(n.current=(r={selector:e,...t},new Mp(r))),()=>{n.current&&"function"==typeof n.current.destroy&&n.current.destroy()}},[e,...Object.values(t)]),n.current}({uniqueKey:"cartflows",rssFeedURL:1<e.length?e:e[0]?.url,selector:"#wcf-whats-new-content",triggerButton:{icon:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="size-4 m-1 text-text-primary"><path d="m3 11 18-5v12L3 13v-2z"/><path d="M11.6 16.8a3 3 0 1 1-5.8-1.6"/></svg>'},flyout:{title:(0,z.__)("What's New?","cartflows"),formatDate:e=>`${e.toLocaleDateString("en-US",{weekday:"long"})} ${e.toLocaleDateString("en-US",{month:"long"})} ${e.getDate()}, ${e.getFullYear()}`}}),(0,a.createElement)("div",{id:"wcf-whats-new-content",className:"[&>a]:p-0.5 [&>a]:pl-0"})},kp=Fo("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),Dp=Fo("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),Cp=Fo("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]),Ap=(e,t=!0)=>new Promise((n,r)=>{const o=new window.FormData;o.append("action","cartflows_activate_plugin"),o.append("init",e.init),o.append("security",cartflows_admin.activate_plugin_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:o}).then(e=>{console.log("Helper.js",e),e.success?(n(e),t&&window.location.reload()):r(e)})});function Tp({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"}))}const Op=w.forwardRef(Tp);function Lp({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const zp=w.forwardRef(Lp),Pp=function(){const e=cartflows_admin?.cf_pro_status,t=(0,z.__)("upgrading to PRO","cartflows"),n=!wcfCartflowsPro()&&"inactive"===e,[r,o]=(0,a.useState)(!1),i=getUpgradeToProUrl();let s="";return n?s=(0,z.__)("activating CartFlows Pro","cartflows"):wcfCartflowsPro()||(s=t),(0,a.createElement)("div",{className:"bg-primary-50 p-3 z-20 relative"},(0,a.createElement)("p",{className:"wcf-main-upgrade-pro-notice text-sm flex justify-center m-0"},(0,z.__)("You're on","cartflows")," ",(0,a.createElement)("span",{className:"font-semibold"},(0,z.__)("CartFlows Free.","cartflows")," "),(0,z.__)("Unlock upsells, order bumps & more revenue by","cartflows")," ",n?(0,a.createElement)("span",{className:"text-brand-600 hover:text-brand-800 font-semibold flex items-center gap-1 cursor-pointer",onClick:()=>{o(!0),Ap({slug:"cartflows-pro",init:"cartflows-pro/cartflows-pro.php",name:"cartflows-pro"}).then(e=>{console.log(e),o(!0)}).catch(e=>{console.log(e),o(!1)})}},r&&(0,a.createElement)(Op,{className:`w-4 h-4 stroke-2 ${r?"wcf-processing animate-spin":""} `}),r?(0,z.__)("Activating","cartflows"):s):(0,a.createElement)("a",{href:i,target:"_blank",className:"text-brand-600 hover:text-brand-800 font-semibold flex items-center gap-1",rel:"noreferrer"},s,(0,a.createElement)(zp,{className:"w-4 h-[18px] stroke-2 text-brand-500"}))))},Rp=({label:e="PRO"})=>(0,a.createElement)(na,{label:e,size:"xs",type:"pill",className:"!bg-brand-25 !text-brand-600 !border-brand-500/20",disableHover:!0});function Up(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}class Bp extends w.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(Qf(t)&&e.isPresent&&!this.props.isPresent&&!1!==this.props.pop){const e=t.offsetParent,n=Qf(e)&&e.offsetWidth||0,r=Qf(e)&&e.offsetHeight||0,o=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(o.height),a.width=parseFloat(o.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=o.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function Fp({children:e,isPresent:t,anchorX:n,anchorY:r,root:o,pop:a}){const i=(0,w.useId)(),s=(0,w.useRef)(null),l=(0,w.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:c}=(0,w.useContext)(_l),u=!1!==a?e.props?.ref??e?.ref:void 0,d=function(...e){return w.useCallback(function(...e){return t=>{let n=!1;const r=e.map(e=>{const r=Up(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Up(e[t],null)}}}}(...e),e)}(s,u);return(0,w.useInsertionEffect)(()=>{const{width:e,height:u,top:d,left:f,right:p,bottom:m,direction:h}=l.current;if(t||!1===a||!s.current||!e||!u)return;const g="rtl"===h,y="left"===n?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,w="bottom"===r?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=i;const b=document.createElement("style");c&&(b.nonce=c);const v=o??document.head;return v.appendChild(b),b.sheet&&b.sheet.insertRule(`\n [data-motion-pop-id="${i}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${u}px !important;\n ${y}px !important;\n ${w}px !important;\n }\n `),()=>{s.current?.removeAttribute("data-motion-pop-id"),v.contains(b)&&v.removeChild(b)}},[t]),(0,R.jsx)(Bp,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:!1===a?e:w.cloneElement(e,{ref:d})})}const Yp=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,anchorY:l,root:c})=>{const u=Rl(Zp),d=(0,w.useId)(),f=(0,w.useRef)(n),p=(0,w.useRef)(r);ql(()=>{f.current=n,p.current=r});let m=!0,h=(0,w.useMemo)(()=>(m=!1,{id:d,initial:t,isPresent:n,custom:o,onExitComplete:e=>{u.set(e,!0);for(const e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>{u.delete(e),!f.current&&!u.size&&p.current?.()})}),[n,u,r]);return a&&m&&(h={...h}),(0,w.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),w.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,R.jsx)(Fp,{pop:"popLayout"===i,isPresent:n,anchorX:s,anchorY:l,root:c,children:e}),(0,R.jsx)(Pl.Provider,{value:h,children:e})};function Zp(){return new Map}const Qp=e=>e.key||"";function Vp(e){const t=[];return w.Children.forEach(e,e=>{(0,w.isValidElement)(e)&&t.push(e)}),t}const Wp=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:c})=>{const[u,d]=Cd(i),f=(0,w.useMemo)(()=>Vp(e),[e]),p=i&&!u?[]:f.map(Qp),m=(0,w.useRef)(!0),h=(0,w.useRef)(f),g=Rl(()=>new Map),y=(0,w.useRef)(new Set),[b,v]=(0,w.useState)(f),[x,N]=(0,w.useState)(f);ql(()=>{m.current=!1,h.current=f;for(let e=0;e<x.length;e++){const t=Qp(x[e]);p.includes(t)?(g.delete(t),y.current.delete(t)):!0!==g.get(t)&&g.set(t,!1)}},[x,p.length,p.join("-")]);const E=[];if(f!==b){let e=[...f];for(let t=0;t<x.length;t++){const n=x[t],r=Qp(n);p.includes(r)||(e.splice(t,0,n),E.push(n))}return"wait"===a&&E.length&&(e=E),N(Vp(e)),v(f),null}const{forceRender:M}=(0,w.useContext)(El);return(0,R.jsx)(R.Fragment,{children:x.map(e=>{const w=Qp(e),b=!(i&&!u)&&(f===x||p.includes(w));return(0,R.jsx)(Yp,{isPresent:b,initial:!(m.current&&!n)&&void 0,custom:t,presenceAffectsLayout:o,mode:a,root:c,onExitComplete:b?void 0:()=>{if(y.current.has(w))return;if(!g.has(w))return;y.current.add(w),g.set(w,!0);let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(M?.(),N(h.current),i&&d?.(),r&&r())},anchorX:s,anchorY:l,children:e},w)})})},Gp=Fo("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Hp=(0,w.createContext)({}),$p=()=>(0,w.useContext)(Hp),Xp=({size:e="md",children:t,className:n})=>(0,R.jsx)(Hp.Provider,{value:{size:e},children:(0,R.jsx)("div",{className:Le("flex flex-col bg-background-primary p-2",n),children:t})});Xp.displayName="Menu";const qp=({heading:e,arrow:t=!1,showArrowOnHover:n=!1,open:r=!0,onClick:o,children:a,className:i})=>{const[s,l]=(0,w.useState)(r),[c,u]=(0,w.useState)(!1),{size:d}=$p(),f={sm:"text-xs",md:"text-sm"}[d??"md"],p={sm:"size-4",md:"size-5"}[d??"md"];return(0,R.jsxs)("div",{children:[!!e&&(0,R.jsxs)("button",{type:"button",onClick:()=>{l(!s),o&&o(!s)},onMouseEnter:()=>n&&u(!0),onMouseLeave:()=>n&&u(!1),className:Le("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",f,e?"p-1":"p-0","border-none w-full",i),"aria-expanded":s,children:[(0,R.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,R.jsx)(op.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:n?s||c?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,R.jsx)(op.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:s?"open":"closed",transition:{duration:.15},children:(0,R.jsx)(Gp,{className:Le("shrink-0",p)})})})]}),(0,R.jsx)(Wp,{initial:!1,children:s&&(0,R.jsx)(op.ul,{role:"menu",variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:"overflow flex gap-0.5 flex-col m-0 bg-white rounded p-0",children:a})})]})};qp.displayName="Menu.List";const Jp=({disabled:e=!1,active:t,onClick:n,children:r,className:o,...a})=>{const{size:i}=$p(),s={sm:"[&>svg]:size-4 [&>svg]:m-1 [&>*:not(svg)]:mx-1 [&>*:not(svg)]:my-0.5 text-sm",md:"[&>svg]:size-5 [&>svg]:m-1.5 [&>*:not(svg)]:m-1 text-base"}[i??"md"];return(0,R.jsx)("li",{role:"menuitem",tabIndex:e?-1:0,onClick:e?void 0:n,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&n?.()},className:Le("flex p-1 gap-1 items-center bg-transparent border-none rounded text-text-secondary cursor-pointer m-0",s,"hover:bg-background-secondary hover:text-text-primary",e?"text-text-disabled hover:text-text-disabled cursor-not-allowed hover:bg-transparent":"",t?"text-icon-primary [&>svg]:text-icon-interactive bg-background-secondary":"","transition-colors duration-300 ease-in-out",o),"aria-disabled":e,...a,children:r})};Jp.displayName="Menu.Item";const Kp=({variant:e="solid",className:t})=>{const n={solid:"border-solid",dashed:"border-dashed",dotted:"border-dotted",double:"border-double",hidden:"border-hidden",none:"border-none"}[e];return(0,R.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,R.jsx)("hr",{className:Le("w-full border-0 border-t border-border-subtle",n,t)})})};Kp.displayName="Menu.Separator",Xp.List=qp,Xp.Item=Jp,Xp.Separator=Kp;const em=(0,w.createContext)({}),tm=()=>(0,w.useContext)(em),nm=({placement:e="bottom",offset:t=10,boundary:n="clippingAncestors",children:r,className:o})=>{const[a,i]=(0,w.useState)(!1),{refs:s,floatingStyles:l,context:c}=bo({open:a,onOpenChange:i,placement:e,strategy:"fixed",middleware:[Hn(t),Xn({boundary:n}),$n({boundary:n})],whileElementsMounted:Un}),u=mo(c),d=wo(c),f=Co(c,{role:"menu"}),{getReferenceProps:p,getFloatingProps:m}=Eo([u,d,f]),{isMounted:h,styles:g}=Oo(c,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),y=()=>i(e=>!e);return(0,R.jsx)(em.Provider,{value:{refs:s,handleClose:()=>i(!1),isMounted:h,styles:g,floatingStyles:l,getFloatingProps:m,context:c},children:(0,R.jsxs)("div",{className:Le("relative inline-block",o),children:[w.Children.map(r,e=>w.isValidElement(e)&&"DropdownMenu.Trigger"===e?.type?.displayName?(0,w.cloneElement)(e,{ref:s.setReference,onClick:y,...p()}):null),w.Children.toArray(r).filter(e=>w.isValidElement(e)&&["DropdownMenu.Portal","DropdownMenu.ContentWrapper"].includes(e.type.displayName||"")).map(e=>e)]})})};nm.displayName="DropdownMenu";const rm=({children:e,className:t})=>{const{refs:n,floatingStyles:r,getFloatingProps:o,isMounted:a,styles:i,context:s}=tm();return a&&s?(0,R.jsx)(so,{context:s,modal:!1,children:(0,R.jsx)("div",{ref:n.setFloating,className:t,style:{...r,...i},...o(),children:w.Children.map(e,e=>"DropdownMenu.Content"===e?.type?.displayName?e:null)})}):null};rm.displayName="DropdownMenu.ContentWrapper";const om=({children:e,root:t,id:n})=>(0,R.jsx)(Kr,{id:n,root:t,children:e});om.displayName="DropdownMenu.Portal";const am=w.forwardRef(({children:e,className:t,...n},r)=>(0,w.isValidElement)(e)?w.cloneElement(e,{className:Le(t,e.props.className),ref:r,...n}):(0,R.jsx)("button",{ref:r,type:"button",className:Le("cursor-pointer bg-transparent border-none p-0",t),...n,children:e}));am.displayName="DropdownMenu.Trigger";const im=({children:e,className:t,...n})=>(0,R.jsx)("div",{className:Le("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:(0,R.jsx)(Xp,{...n,children:e})});im.displayName="DropdownMenu.Content";const sm=e=>(0,R.jsx)(Xp.List,{...e});sm.displayName="DropdownMenu.List";const lm=({children:e,as:t=Xp.Item,...n})=>{const{handleClose:r}=tm();return e?t===w.Fragment&&(0,w.isValidElement)(e)?(0,w.cloneElement)(e,{onClick:ze(e.props?.onClick,r)}):(0,R.jsx)(t,{...n,className:Le("px-2",n.className),onClick:ze(n.onClick,r),children:e}):null};lm.displayName="DropdownMenu.Item";const cm=e=>(0,R.jsx)(Xp.Separator,{...e});function um({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"}))}cm.displayName="DropdownMenu.Separator",nm.Trigger=am,nm.Content=im,nm.List=sm,nm.Item=lm,nm.Separator=cm,nm.Portal=om,nm.ContentWrapper=rm;const dm=w.forwardRef(um);function fm({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18 9 11.25l4.306 4.306a11.95 11.95 0 0 1 5.814-5.518l2.74-1.22m0 0-5.94-2.281m5.94 2.28-2.28 5.941"}))}const pm=w.forwardRef(fm);function mm({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 9v.906a2.25 2.25 0 0 1-1.183 1.981l-6.478 3.488M2.25 9v.906a2.25 2.25 0 0 0 1.183 1.981l6.478 3.488m8.839 2.51-4.66-2.51m0 0-1.023-.55a2.25 2.25 0 0 0-2.134 0l-1.022.55m0 0-4.661 2.51m16.5 1.615a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V8.844a2.25 2.25 0 0 1 1.183-1.981l7.5-4.039a2.25 2.25 0 0 1 2.134 0l7.5 4.039a2.25 2.25 0 0 1 1.183 1.98V19.5Z"}))}const hm=w.forwardRef(mm);function gm({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const ym=w.forwardRef(gm),wm=[{label:(0,z.__)("Funnels","cartflows"),type:"flows",icon:dm},{label:(0,z.__)("Conversions","cartflows"),type:"conversion",icon:pm},{label:(0,z.__)("Opt-in","cartflows"),type:"optin",icon:hm}],bm=function({menu:e,isEditorApp:t,activePage:n,activePath:r}){const o=n===e.slug&&r===e.path,i=(0,g.useHistory)(),s=vp()("h-full text-sm font-medium no-underline px-1 content-center relative inline-flex items-center gap-1 focus:outline-none focus:[box-shadow:none] bg-transparent border-0 shadow-none outline-none cursor-pointer hover:text-brand-500 transition-colors duration-200",{'text-brand-500 before:content-[""] before:absolute before:h-px before:bg-brand-500 before:bottom-0 before:inset-x-0':o,"text-text-secondary":!o});return(0,a.createElement)(nm,{placement:"bottom",offset:4,className:"h-full ss-007"},(0,a.createElement)(nm.Trigger,null,(0,a.createElement)("button",{className:s},(0,a.createElement)("span",{className:"relative h-full inline-flex items-center gap-1"},e.name,(0,a.createElement)(ym,{className:"w-4 h-4","aria-hidden":"true"})))),(0,a.createElement)(nm.ContentWrapper,null,(0,a.createElement)(nm.Content,{size:"sm"},(0,a.createElement)(nm.List,null,wm.map(n=>(0,a.createElement)(nm.Item,{key:n.type,onClick:()=>((n=null)=>{const r=`admin.php?page=${e.slug}&path=${e.path}`;t?window.location.href=n?`${r}&type=${n}`:r:i.push({pathname:"admin.php",search:n?`?page=${e.slug}&path=${e.path}&type=${n}`:`?page=${e.slug}&path=${e.path}`})})(n.type),className:"hover:bg-brand-25 hover:text-brand-600"},(0,a.createElement)("span",{className:"flex items-center gap-2"},(0,a.createElement)(n.icon,{className:"w-4 h-4 stroke-[1.5]","aria-hidden":"true"}),n.label)))))))},vm=({title:e,children:t,onClick:n,icon:r})=>(0,a.createElement)(Ze.Item,{className:"p-1 gap-2"},(0,a.createElement)(ea,{content:e,placement:"bottom",variant:"dark"},t||(0,a.createElement)(Wo,{size:"xs",variant:"ghost",className:"p-0 focus:[box-shadow:none] [box-shadow:none] text-text-primary",onClick:n,icon:r}))),xm=function(){const[{license_status:e,canvasMode:t}]=p(),n=cartflows_admin?.current_user_can_manage_cartflows,[r,o]=(0,a.useState)({isProcessing:!1,buttonText:""}),{isProcessing:i,buttonText:s}=r,l=[{name:(0,z.__)("Dashboard","cartflows"),slug:cartflows_admin.home_slug,path:"",url:"",visible:!0},{name:(0,z.__)("Funnels","cartflows"),slug:cartflows_admin.home_slug,path:"flows",url:"",visible:!0},{name:(0,z.__)("Store Checkout","cartflows"),slug:cartflows_admin.home_slug,path:"store-checkout",url:""!==cartflows_admin.global_checkout_id?"&action=wcf-edit-flow&flow_id="+cartflows_admin.global_checkout_id:"",visible:!0},{name:(0,z.__)("Analytics","cartflows"),slug:cartflows_admin.home_slug,path:"analytics",url:"",visible:n},{name:(0,z.__)("Settings","cartflows"),slug:cartflows_admin.home_slug,path:"settings",url:"",visible:n},{name:(0,z.__)("Learn","cartflows"),slug:cartflows_admin.home_slug,path:"learn",url:"",visible:!0},{name:(0,z.__)("Free vs Pro","cartflows"),slug:cartflows_admin.home_slug,path:"free-vs-pro",url:"",visible:!wcfCartflowsPro()}].filter(e=>e.visible),c=(0,g.useHistory)(),u=new URLSearchParams((0,g.useLocation)()?.search),d=u.get("page")?u.get("page"):cartflows_admin.home_slug;let f=u.get("path")?u.get("path"):"";"store-checkout-library"===f&&(f="store-checkout");const m=["wcf-edit-flow","wcf-edit-step"].includes(u.get("action"));let h="",y="";const w=cartflows_admin?.cf_pro_status;wcfCartflowsPro()||"inactive"!==w?wcfCartflowsPro()||(h=(0,z.__)("Upgrade to Pro","cartflows")):(h=(0,z.__)("Activate CartFlows Pro","cartflows"),y="activate");const b=(0,P.applyFilters)("cartflows.navbar.licenseBadge",null),v=(0,P.applyFilters)("cartflows.navbar.planBadge",null),x=wcfCartflowsPro()?(0,a.createElement)(Rp,{label:(cartflows_admin?.cf_pro_type||"pro").toUpperCase()}):(0,a.createElement)(na,{label:(0,z.__)("Free","cartflows"),className:"text-text-tertiary uppercase",size:"xs",variant:"neutral",type:"pill"}),N=function(e){if(e.preventDefault(),"activate"===y){const e="cartflows-pro",t="cartflows-pro/cartflows-pro.php",n="cartflows-pro";o({isProcessing:!0,buttonText:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 2 |
(0,z.__)("Activating %s","cartflows"),cartflows_admin.cf_pro_type_inactive)}),Ap({slug:e,init:t,name:n}).then(()=>{o({isProcessing:!0,buttonText:(0,z.__)("Successfully Activated","cartflows")}),setTimeout(()=>{o({isProcessing:!1,buttonText:(0,z.__)("Activated","cartflows")})},3e3)}).catch(()=>{o({isProcessing:!1,buttonText:(0,z.__)("Activation Failed","cartflows")})})}y||c.push({pathname:"admin.php",search:`?page=${cartflows_admin.home_slug}&path=settings&tab=license`})},E=e=>`admin.php?page=${e.slug}${""!==e.path?"&path="+e.path:""}${e.url}`,M=e=>vp()("h-full text-sm font-medium no-underline px-1 content-center relative focus:outline-none focus:[box-shadow:none] hover:text-brand-500 transition-colors duration-200",{'text-brand-500 before:content-[""] before:absolute before:h-px before:bg-brand-500 before:bottom-0 before:inset-x-0':e,"text-text-secondary":!e});return(0,a.createElement)(a.Fragment,null,!wcfCartflowsPro()&&!t&&(0,a.createElement)(Pp,null),(0,a.createElement)("div",{className:"wcf-main--nav-menu sticky top-0 sm:top-8 z-20"},(0,a.createElement)(Ze,{className:"py-0 px-4 min-h-0 h-14 gap-4 shadow-sm bg-background-primary backdrop-blur-[5px]"},(0,a.createElement)(Ze.Left,{className:"gap-3"},(0,a.createElement)(Ze.Item,{className:"w-auto h-auto lg:hidden"},(0,a.createElement)(gp,null,(0,a.createElement)(gp.Toggle,{className:"size-6"}),(0,a.createElement)(gp.Options,null,l.map(e=>(0,a.createElement)(gp.Option,{key:e.name,active:d===e.slug&&f===e.path,href:E(e),iconPosition:"left",rel:"noopener noreferrer",tag:"a",target:"_self"},e.name)),!wcfCartflowsPro()&&(0,a.createElement)(gp.Option,{href:getUpgradeToProUrl(),iconPosition:"left",rel:"noopener noreferrer",tag:"a",target:"_blank",className:"text-link-primary gap-1"},(0,z.__)("Upgrade to Pro","cartflows")," ",(0,a.createElement)(kp,{className:"!size-5"}))))),(0,a.createElement)(Ze.Item,null,(0,a.createElement)("img",{className:"block h-8 w-auto",src:xp,alt:"CartFlows"}))),(0,a.createElement)(Ze.Middle,{align:"left",className:"h-full hidden lg:flex"},(0,a.createElement)(Ze.Item,null,(0,a.createElement)("nav",{className:"flex items-center gap-4 h-full"},l.map(e=>"analytics"===e.path?(0,a.createElement)(bm,{key:e.name,menu:e,isEditorApp:m,activePage:d,activePath:f}):(e=>{const t=d===e.slug&&f===e.path;return m?(0,a.createElement)("a",{key:e.name,href:E(e),className:M(t)},e.name):(0,a.createElement)(C,{key:e.name,to:{pathname:"admin.php",search:`?page=${e.slug}${""!==e.path?"&path="+e.path:""}${e.url}`},className:M(t)},e.name)})(e)))),!wcfCartflowsPro()&&(0,a.createElement)(Ze.Item,null,"inactive"===w?(0,a.createElement)(Wo,{icon:i?(0,a.createElement)(Dp,{className:"w-4 h-4 animate-spin"}):null,iconPosition:"left",variant:"link",size:"sm",className:"h-full text-link-primary text-sm font-semibold no-underline hover:no-underline hover:text-link-primary-hover px-1 content-center [box-shadow:none] focus:[box-shadow:none] focus:outline-none",onClick:N},i?s:h):(0,a.createElement)(Wo,{icon:(0,a.createElement)(kp,{className:"!size-5"}),iconPosition:"right",variant:"link",size:"sm",className:"h-full text-link-primary text-sm font-semibold no-underline hover:no-underline hover:text-link-primary-hover px-1 content-center [box-shadow:none] focus:[box-shadow:none] focus:outline-none",onClick:()=>window.open(getUpgradeToProUrl(),"_blank","noreferrer")},h))),(0,a.createElement)(Ze.Right,null,b?(0,a.createElement)(Ze.Item,null,(0,a.createElement)(b,{licenseStatus:e,onOpenLicenseSettings:N})):wcfCartflowsPro()&&(0,a.createElement)(Ze.Item,null,(0,a.createElement)(Wo,{variant:"ghost",className:"p-0 hover:bg-transparent focus:[box-shadow:none] [box-shadow:none]",onClick:t=>{"Activated"!==e&&N(t)},icon:(0,a.createElement)(na,{label:"Activated"===e?(0,z.__)("Licensed","cartflows"):(0,z.__)("Unlicensed","cartflows"),size:"xs",variant:"Activated"===e?"green":"red"})})),(0,a.createElement)(Ze.Item,{className:"flex gap-3 items-center"},(0,a.createElement)(yp,{size:"xs",variant:"neutral",className:"text-text-tertiary"},`v${cartflows_admin?.cartflows_current_version}`),v?(0,a.createElement)(v,null):x),(0,a.createElement)(vm,{title:(0,z.__)("Documentation","cartflows"),icon:(0,a.createElement)(Cp,{className:"size-4"}),onClick:()=>window.open(getKbDocUrl("https://cartflows.com/docs/"),"_blank","noopener noreferrer")}),0<cartflows_admin?.whats_new_rss_feed?.length&&(0,a.createElement)(vm,{title:(0,z.__)("What's New","cartflows")},(0,a.createElement)("span",{className:"inline-flex"},(0,a.createElement)(jp,null)))))))},Nm=(0,w.createContext)({}),Em=()=>(0,w.useContext)(Nm),Mm={open:{opacity:1},exit:{opacity:0}},_m={duration:.2},Im=({open:e,setOpen:t,children:n,trigger:r=null,className:o,exitOnClickOutside:a=!1,exitOnEsc:i=!0,design:s="simple",scrollLock:l=!0})=>{const c=void 0!==e&&void 0!==t,[u,d]=(0,w.useState)(!1),f=(0,w.useRef)(null),p=(0,w.useRef)(null),m=(0,w.useId)(),h=`${m}-title`,g=`${m}-description`,y=(0,w.useRef)(!1),b=(0,w.useRef)(!1),v=(0,w.useMemo)(()=>c?e:u,[e,u]),x=(0,w.useMemo)(()=>c?t:d,[d,t]),{refs:N,context:E}=bo({open:v,onOpenChange:x}),M=mo(E),_=wo(E,{enabled:a||i,escapeKey:i,outsidePress:e=>!!a&&!e?.target?.closest("ul.fui-toast-container")}),I=Co(E,{role:"dialog"}),{getFloatingProps:S}=Eo([M,_,I]),j=()=>{v||x(!0)},k=(0,w.useCallback)(()=>(0,w.isValidElement)(r)?(0,w.cloneElement)(r,{onClick:ze(j,r?.props?.onClick),ref:N.setReference,"aria-haspopup":"dialog","aria-expanded":v}):"function"==typeof r?r({onClick:j,"aria-haspopup":"dialog","aria-expanded":v}):null,[r,j,N.setReference,v]);return(0,R.jsxs)(R.Fragment,{children:[k(),(0,R.jsx)(Nm.Provider,{value:{open:v,setOpen:x,handleClose:()=>{v&&x(!1)},design:s,context:E,getFloatingProps:S,refs:N,dialogContainerRef:p,dialogRef:f,scrollLock:l,className:o,titleId:h,descriptionId:g,hasTitleRef:y,hasDescriptionRef:b},children:n})]})};Im.displayName="Dialog";const Sm=({children:e,className:t,ariaLabel:n})=>{const{open:r,handleClose:o,context:a,getFloatingProps:i,dialogRef:s,scrollLock:l,dialogContainerRef:c,className:u,refs:d,titleId:f,descriptionId:p,hasTitleRef:m,hasDescriptionRef:h}=Em();return(0,R.jsx)(Wp,{children:r&&(0,R.jsx)(uo,{ref:c,lockScroll:l,className:Le("z-999999",u),"aria-modal":"true",children:(0,R.jsx)(so,{context:a,...d?.reference&&{returnFocus:d.reference},children:(0,R.jsx)(op.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:Mm,role:"dialog","aria-modal":"true","aria-label":m?.current?void 0:n,"aria-labelledby":m?.current?f:void 0,"aria-describedby":h?.current?p:void 0,transition:_m,children:(0,R.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,R.jsx)("div",{ref:e=>{e&&(s.current=e,a&&a.refs.setFloating(e))},...i?.(),className:Le("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:o}):e})})})})})})};Sm.displayName="Dialog.Panel";const jm=({children:e,...t})=>(0,R.jsx)(Kr,{...t,children:e});jm.displayName="Dialog.Portal";const km=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=Em();return r?.current?(0,R.jsx)(R.Fragment,{children:(0,bn.createPortal)((0,R.jsx)(Wp,{children:n&&(0,R.jsx)(op.div,{className:Le("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:Mm,transition:_m})}),r.current)}):null};km.displayName="Dialog.Backdrop";const Dm=({children:e,className:t,...n})=>(0,R.jsx)("div",{className:Le("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});Dm.displayName="Dialog.Header";const Cm=({children:e,as:t="h3",className:n,...r})=>{const{titleId:o,hasTitleRef:a}=Em();return(0,w.useEffect)(()=>(a&&(a.current=!0),()=>{a&&(a.current=!1)}),[a]),(0,R.jsx)(t,{id:o,className:Le("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e})};Cm.displayName="Dialog.Title";const Am=({children:e,as:t="p",className:n,...r})=>{const{descriptionId:o,hasDescriptionRef:a}=Em();return(0,w.useEffect)(()=>(a&&(a.current=!0),()=>{a&&(a.current=!1)}),[a]),(0,R.jsx)(t,{id:o,className:Le("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e})};Am.displayName="Dialog.Description";const Tm=({className:e,...t})=>(0,R.jsx)("button",{className:Le("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-border-strong outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,R.jsx)(ta,{className:"size-4 text-text-primary shrink-0"})}),Om=({children:e,as:t=w.Fragment,...n})=>{const{handleClose:r}=Em();return e?t===w.Fragment?"function"==typeof e?e({close:r}):(0,w.cloneElement)(e,{onClick:r}):(0,R.jsx)(t,{...n,onClick:r,"aria-label":"Close dialog",children:e}):(0,R.jsx)(Tm,{onClick:r,...n})};Om.displayName="Dialog.CloseButton";const Lm=({children:e,className:t,...n})=>(0,R.jsx)("div",{className:Le("px-5",t),...n,children:e});Lm.displayName="Dialog.Body";const zm=({children:e,className:t})=>{const{design:n,handleClose:r}=Em();return(0,R.jsx)("div",{className:Le("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};zm.displayName="Dialog.Footer",Im.Panel=Sm,Im.Portal=jm,Im.Title=Cm,Im.Description=Am,Im.CloseButton=Om,Im.Header=Dm,Im.Body=Lm,Im.Footer=zm,Im.Backdrop=km;const Pm=function(e){const{showModel:t}=e,[n,r]=(0,a.useState)(t);return(0,a.createElement)(Im,{open:n,setOpen:r,exitOnClickOutside:!0},(0,a.createElement)(Im.Panel,{className:"sm:max-w-3xl w-full !p-0 !rounded-lg overflow-hidden relative !border-0 !shadow-none !bg-transparent"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)("div",{className:"absolute top-2 right-2 z-10"},(0,a.createElement)(Im.CloseButton,{className:"!bg-white/80 hover:!bg-white !rounded-full !p-1 !shadow-sm"})),(0,a.createElement)("iframe",{width:"100%",src:"https://www.youtube.com/embed/tCm60PWOd0M?autoplay=1&rel=0&modestbranding=1",frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:"",className:"block rounded-lg !h-[200px] sm:!h-[400px]",title:(0,z.__)("Introduction to CartFlows","cartflows")})))},Rm=window.wp.compose,Um=window.wp.data;let Bm=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const Fm=Fo("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]),Ym=(0,w.forwardRef)(({id:e,type:t="text",defaultValue:n="",value:r,size:o="sm",className:a="",disabled:i=!1,onChange:s=()=>{},error:l=!1,onError:c=()=>{},prefix:u=null,suffix:d=null,label:f="",...p},m)=>{const h=(0,w.useRef)(null),g=(0,w.useMemo)(()=>e||`input-${t}-${Bm()}`,[e]),y=(0,w.useMemo)(()=>typeof r<"u",[r]),[b,v]=(0,w.useState)(n),[x,N]=(0,w.useState)(null),E=(0,w.useCallback)(()=>y?r:b,[y,r,b]),M=e=>{if(i)return;let n;"file"===t?(n=e.target.files,n&&n.length>0?N(n[0].name):N(null)):n=e.target.value,!y&&"file"!==t&&v(n),"function"==typeof s&&s(n)},_=()=>{N(null),h.current&&(h.current.value=""),s(null)},I="bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary w-full outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200",S={xs:"px-2 py-1 rounded",sm:"p-3 py-2 rounded",md:"p-3.5 py-2.5 rounded-md",lg:"p-4 py-3 rounded-lg"},j={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},k={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},D={sm:u?"pl-8":"",md:u?"pl-9":"",lg:u?"pl-10":""},C={sm:d?"pr-8":"",md:d?"pr-9":"",lg:d?"pr-10":""},A=i?"hover:outline-border-disabled":"hover:outline-border-strong",T="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",O=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",L=l?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",z=i?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",P=i?"outline-border-disabled cursor-not-allowed text-text-disabled file:text-text-tertiary":"",U="font-normal placeholder-text-tertiary text-text-primary pointer-events-none absolute inset-y-0 flex flex-1 items-center [&>svg]:h-4 [&>svg]:w-4",B=i?"font-normal placeholder-text-tertiary text-icon-disabled pointer-events-none absolute inset-y-0 flex flex-1 items-center":"font-normal placeholder-text-tertiary text-field-placeholder pointer-events-none absolute inset-y-0 flex flex-1 items-center",F={xs:"[&>svg]:size-4",sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6"},Y=(0,w.useMemo)(()=>f?(0,R.jsx)(yp,{className:Le(j[o]),htmlFor:g,...p?.required&&{required:!0},children:f}):null,[f,o,g]),Z=x?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===t?(0,R.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[Y,(0,R.jsxs)("div",{className:Le("w-full relative flex focus-within:z-10",a),children:[(0,R.jsx)("input",{ref:Ko(h,m),id:g,type:"file",className:Le(I,P,S[o],k[o],T,A,L,Z),disabled:i,onChange:M,onInvalid:c,...l&&{"aria-invalid":!0},...p}),(0,R.jsx)("div",{className:Le(B,"right-0 pr-3",F[o]),"aria-hidden":"true",children:(0,R.jsx)(Fm,{})})]})]}):(0,R.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[Y,(0,R.jsxs)("div",{className:Le("w-full relative flex focus-within:z-10",a),children:[u?(0,R.jsx)("div",{className:Le(U,"left-0 pl-3",k[o]),children:u}):null,(0,R.jsx)("input",{ref:Ko(h,m),id:g,type:t,className:Le(I,z,S[o],k[o],D[o],C[o],T,A,O),disabled:i,onChange:M,onInvalid:c,value:E(),...l&&{"aria-invalid":!0},...p}),"file"===t?x?(0,R.jsx)("div",{className:Le(B,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",F[o]),onClick:_,role:"button",tabIndex:0,"aria-label":"Remove file",onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&_()},children:(0,R.jsx)(ta,{"aria-hidden":"true"})}):(0,R.jsx)("div",{className:Le(B,"right-0 pr-3",F[o]),"aria-hidden":"true",children:(0,R.jsx)(Fm,{})}):d?(0,R.jsx)("div",{className:Le(U,"right-0 pr-3",k[o]),children:d}):null]})]})});Ym.displayName="Input";let Zm=1;const Qm=new class{#e;#t;constructor(){this.#e=[],this.#t=[]}subscribe(e){return this.#t.push(e),()=>{this.#t=this.#t.filter(t=>t!==e)}}publish(e){this.#t.forEach(t=>t(e))}add(e){this.#e.push(e),this.publish(e)}remove(e){return this.#e=this.#e.filter(t=>t.id!==e),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const a="number"==typeof t?t:Zm++;return this.#e.find(e=>e.id===a)&&(this.#e=this.#e.map(e=>e.id===a?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e)),this.add({id:a,title:n,jsx:r,...o}),a}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}this.#e=this.#e.map(t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t)}dismiss(e){return e||this.#e.forEach(e=>this.#t.forEach(t=>t({id:e.id,dismiss:!0}))),this.#t.forEach(t=>t({id:e,dismiss:!0})),e}history(){return this.#e}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}},Vm=Object.seal(Object.assign((e,t)=>Qm.default(e,t),{success:Qm.success.bind(Qm),error:Qm.error.bind(Qm),warning:Qm.warning.bind(Qm),info:Qm.info.bind(Qm),custom:Qm.custom.bind(Qm),dismiss:Qm.dismiss.bind(Qm),update:Qm.update.bind(Qm)},{getHistory:Qm.history.bind(Qm)})),Wm=(0,Rm.compose)((0,Um.withDispatch)(e=>{const{updateWooCommerceStatus:t}=e("wcf/importer");return{updateWooCommerceStatus(e){t(e)}}}))(({title:e,updateWooCommerceStatus:t})=>{const n=e||(0,z.__)("Activate WooCommerce","cartflows"),[r,o]=(0,a.useState)({isProcessing:!1,buttonText:n}),{isProcessing:i,buttonText:s}=r;return(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Wo,{className:"wcf-button wcf-primary-button",variant:"primary",size:"md",loading:i,disabled:i,onClick:()=>{o({isProcessing:!0,buttonText:(0,z.__)("Activating WooCommerce..","cartflows")}),Ap({slug:"woocommerce",init:"woocommerce/woocommerce.php",name:"WooCommerce"},!1).then(()=>{o({isProcessing:!1,buttonText:(0,z.__)("Successfully Activated!","cartflows")}),setTimeout(()=>{t("active")},3e3)}).catch(e=>{console.log(e),o({isProcessing:!1,buttonText:(0,z.__)("Failed! Activation!","cartflows")})})}},s)))}),Gm=(0,Rm.compose)((0,Um.withDispatch)(e=>{const{updateWooCommerceStatus:t}=e("wcf/importer");return{updateWooCommerceStatus(e){t(e)}}}))(({updateWooCommerceStatus:e})=>{const t=(0,z.__)("Install WooCommerce","cartflows"),[n,r]=(0,a.useState)({isProcessing:!1,buttonText:t}),{isProcessing:o,buttonText:i}=n;return(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Wo,{className:"wcf-button wcf-primary-button",variant:"primary",size:"md",loading:o,disabled:o,onClick:()=>{var n;r({isProcessing:!0,buttonText:(0,z.__)("Installing WooCommerce..","cartflows")}),(n={slug:"woocommerce",init:"woocommerce/woocommerce.php",name:"woocommerce"},new Promise((e,t)=>{console.log("plugin.slug",n.slug),wp.updates.queue.push({action:"install-plugin",data:{slug:n.slug,init:n.init,name:n.name,success(t){console.log("Installed Successfully! Activating plugin ",n.slug),e(t,n)},error(e){t(e,n)}}}),wp.updates.queueChecker()})).then(()=>{r({isProcessing:!1,buttonText:(0,z.__)("Successfully Installed!","cartflows")}),e("inactive")}).catch(e=>{console.log(e),r({isProcessing:!1,buttonText:(0,z.__)("Installation Failed!","cartflows")}),setTimeout(()=>{r({isProcessing:!1,buttonText:t})},3e3)})}},i)))}),Hm=(0,Rm.compose)((0,Um.withDispatch)(e=>{const{updateCFProStatus:t}=e("wcf/importer");return{updateCFProStatus(e){t(e)}}}))(({title:e,updateCFProStatus:t,size:n="md"})=>{const r=e||(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 3 |
(0,z.__)("Activate %s","cartflows"),cartflows_admin.cf_pro_type_inactive),[o,i]=(0,a.useState)({isProcessing:!1,buttonText:r}),{isProcessing:s,buttonText:l}=o;return(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Wo,{variant:"primary",size:n,loading:s,disabled:s,onClick:e=>{e.preventDefault(),i({isProcessing:!0,buttonText:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 4 |
(0,z.__)("Activating %s","cartflows"),cartflows_admin.cf_pro_type_inactive)}),Ap({slug:"cartflows-pro",init:"cartflows-pro/cartflows-pro.php",name:"cartflows-pro"}).then(()=>{i({isProcessing:!1,buttonText:(0,z.__)("Successfully Activated!","cartflows")}),setTimeout(()=>{t("active")},3e3)}).catch(()=>{i({isProcessing:!1,buttonText:(0,z.__)("Failed! Activation!","cartflows")})})}},l)))}),$m=({buttonLink:e,title:t,buttonStyle:n="primary",size:r="md"})=>{const o=t||(0,z.__)("Upgrade to CartFlows Pro","cartflows"),i=e?.buttonLink||getUpgradeToProUrl();return(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Wo,{tag:"a",href:i,target:"_blank",rel:"noreferrer",variant:n,size:r,className:"no-underline inline-flex items-center justify-center"},o)))};function Xm({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 0 0 3 8.25v10.5A2.25 2.25 0 0 0 5.25 21h10.5A2.25 2.25 0 0 0 18 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))}const qm=w.forwardRef(Xm),Jm=({title:e})=>{const t=e||"Activate Cartflows Pro License";return(0,a.createElement)(Wo,{tag:"a",href:cartflows_admin?.license_popup_url,rel:"noreferrer",variant:"primary",size:"md",icon:(0,a.createElement)(qm,null),iconPosition:"right",className:"no-underline"},t)},Km=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getCFProStatus:n,getWooCommerceStatus:r}=e("wcf/importer");return{flowsCount:t(),cf_pro_status:n(),woocommerce_status:r()}}))(({preview:e,cf_pro_status:t,woocommerce_status:n,flowName:r,setInputFieldVisibility:o,setErrorDesc:i})=>{const[s,l]=(0,a.useState)({cta:"",error_msg:""}),[{license_status:c}]=p(),{cta:u,error_msg:d}=s,[f,m]=(0,a.useState)({isProcessing:!1,buttonText:(0,z.__)("Import Funnel","cartflows")}),{isProcessing:h,buttonText:g}=f,[y,w]=(0,a.useState)(!1),b=function(){w(!0),document.addEventListener("click",v)},v=function(){w(!1),document.removeEventListener("click",v)};if(u)return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"wcf-message wcf-message--error",dangerouslySetInnerHTML:{__html:u}}),y&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("a",{className:"wcf-error-message--toggle",onClick:function(e){e.preventDefault(),y?v():b()}},(0,z.__)("Click for more info","cartflows")),(0,a.createElement)("div",{className:"wcf-error--info",dangerouslySetInnerHTML:{__html:d}})));if("active"!==n)return"inactive"===n?(o("hidden"),i((0,z.__)("You need WooCommerce plugin installed and activated to import this funnel.","cartflows")),(0,a.createElement)(Wm,null)):(o("hidden"),i((0,z.__)("You need WooCommerce plugin installed and activated to import this funnel.","cartflows")),(0,a.createElement)(Gm,null));if("active"===n&&(o("visible"),i("")),"pro"===e.type){if(!wcfCartflowsTypePro())return"inactive"===t&&"pro"===wcfInactivepluginType()?(o("hidden"),i((0,z.__)("Access all of our pro templates by activating CartFlows Pro.","cartflows")),(0,a.createElement)(Hm,{description:(0,z.__)("Access all of our pro templates by activating CartFlows Pro.","cartflows")})):(o("hidden"),i((0,z.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")),(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Pro","cartflows"),desc:(0,z.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")}));if(wcfCartflowsTypePro()&&"Activated"!==c)return o("hidden"),i((0,z.__)("Access all of our pro templates when you activate CartFlows Pro license.","cartflows")),(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Jm,null)))}return(0,a.createElement)(Wo,{variant:"primary",size:"md",loading:h,disabled:h,onClick:t=>{t.preventDefault(),h||(m({isProcessing:!0,buttonText:(0,z.__)("Importing Complete Funnel..","cartflows")}),((e,t,n,r)=>{const o=new window.FormData;o.append("action","cartflows_import_flow"),o.append("flow_name",r),o.append("security",cartflows_admin.import_flow_nonce),o.append("flow",JSON.stringify(e)),o.append("creation_method","ready_made_template"),L()({url:cartflows_admin.ajax_url,method:"POST",body:o}).then(e=>{e.success?(t({isProcessing:!1,buttonText:(0,z.__)("Imported! Redirecting…","cartflows")}),Vm.success((0,z.__)("Funnel imported successfully!","cartflows")),setTimeout(()=>{window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e.data.new_flow_id}`},3e3)):"call_to_action"in e.data?n({cta:e.data.call_to_action,error_msg:e.data.message}):(t({isProcessing:!1,buttonText:e.data.message}),Vm.error((0,z.__)("Failed to import funnel.","cartflows")))})})(e,m,l,r))}},g)}),eh=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getCFProStatus:n,getLicenseStatus:r,getWooCommerceStatus:o}=e("wcf/importer");return{flowsCount:t(),cf_pro_status:n(),license_status:r(),woocommerce_status:o()}}))(({flowName:e,isStoreCheckout:t})=>{const[n,r]=(0,a.useState)((0,z.__)("Design Your Funnel","cartflows")),[o,i]=(0,a.useState)(!1);return(0,a.createElement)(Wo,{variant:"primary",size:"md",loading:o,disabled:o,onClick:n=>{n.preventDefault(),((e,t,n,r,o)=>{if(n)return;e("Creating Flow.."),r(!0);const a=new window.FormData;a.append("action","cartflows_create_flow"),a.append("security",cartflows_admin.create_flow_nonce),a.append("flow_name",t),a.append("store_checkout",o),a.append("creation_method","scratch"),L()({url:cartflows_admin.ajax_url,method:"POST",body:a}).then(t=>{t.success?(e((0,z.__)("Created! Redirecting…","cartflows")),r(!1),Vm.success((0,z.__)("Funnel created successfully!","cartflows")),setTimeout(()=>{let e=`admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${t.data.flow_id}`;o&&(e="admin.php?page=cartflows&action=wcf-edit-store-checkout"),window.location=`${cartflows_admin.admin_base_url+e}`},3e3)):(e((0,z.__)("Failed to Create Flow!","cartflows")),Vm.error((0,z.__)("Failed to create funnel.","cartflows")))})})(r,e,o,i,t)}},n)}),th=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getCFProStatus:n,getLicenseStatus:r}=e("wcf/importer");return{flowsCount:t(),cf_pro_status:n(),license_status:r()}}))(({visibility:e,setVisibility:t,preview:n,type:r,flowName:o,setFlowName:i})=>{const s="show"===e,[l,c]=(0,a.useState)(""),[u,d]=(0,a.useState)(""),[{flows_limit_over:f}]=p(),[m,h]=(0,a.useState)(0);let g=(0,z.__)("Name Your Funnel","cartflows");return"hidden"===l?g=(0,z.__)("Upgrade Required","cartflows"):f&&(g=(0,z.__)("Upgrade To CartFlows Pro","cartflows")),(0,a.createElement)(Im,{open:s,setOpen:e=>{e||t("hide")},exitOnClickOutside:!1},(0,a.createElement)(Im.Panel,{className:"sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,null,g),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)("div",{className:`${l}`},(0,a.createElement)("div",{className:"flex justify-between py-2"},(0,a.createElement)("label",{className:"flex gap-1 text-sm font-normal text-text-primary"},(0,z.__)("Funnel Name","cartflows")),(0,a.createElement)("span",{className:"text-xs font-normal "+(40===m?"text-brand-500":"text-field-placeholder")},m,"/40")),(0,a.createElement)(Ym,{type:"text",value:o,onChange:e=>{e.length<=40&&(h(e.length),i(e))},placeholder:(0,z.__)("Enter Funnel Name","cartflows"),size:"md"})),""!==u&&(0,a.createElement)("p",{className:"text-sm font-regular text-text-secondary mt-3 m-0"},u)),(0,a.createElement)(Im.Footer,{className:"flex gap-3 justify-end"},"import"===r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:()=>t("hide")},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(Km,{preview:n,flowName:o,setInputFieldVisibility:c,setErrorDesc:d})),"blank"===r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:()=>t("hide")},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(eh,{flowName:o,setInputFieldVisibility:c,isStoreCheckout:!1})))))}),nh=function(){return(0,a.createElement)("div",{role:"status",className:"wcf-onboarding-stats-loader space-y-4 animate-pulse"},(0,a.createElement)("div",{className:"flex items-center justify-between"},(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"w-32 h-2.5 bg-background-secondary rounded-full mb-2.5"}),(0,a.createElement)("div",{className:"w-44 h-2 bg-background-secondary rounded-full"})),(0,a.createElement)("div",{className:"h-2.5 w-24 bg-background-secondary rounded-full"})),Array(3).fill().map((e,t)=>(0,a.createElement)("div",{key:t,className:"flex items-center justify-between pt-4"},(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"h-2.5 bg-background-secondary rounded-full w-24 mb-2.5"}),(0,a.createElement)("div",{className:"w-32 h-2 bg-background-secondary rounded-full"})),(0,a.createElement)("div",{className:"h-2.5 w-24 bg-background-secondary rounded-full"}))))},rh={sm:{1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6",7:"grid-cols-7",8:"grid-cols-8",9:"grid-cols-9",10:"grid-cols-10",11:"grid-cols-11",12:"grid-cols-12"},md:{1:"md:grid-cols-1",2:"md:grid-cols-2",3:"md:grid-cols-3",4:"md:grid-cols-4",5:"md:grid-cols-5",6:"md:grid-cols-6",7:"md:grid-cols-7",8:"md:grid-cols-8",9:"md:grid-cols-9",10:"md:grid-cols-10",11:"md:grid-cols-11",12:"md:grid-cols-12"},lg:{1:"lg:grid-cols-1",2:"lg:grid-cols-2",3:"lg:grid-cols-3",4:"lg:grid-cols-4",5:"lg:grid-cols-5",6:"lg:grid-cols-6",7:"lg:grid-cols-7",8:"lg:grid-cols-8",9:"lg:grid-cols-9",10:"lg:grid-cols-10",11:"lg:grid-cols-11",12:"lg:grid-cols-12"}},oh={sm:{xs:"gap-2",sm:"gap-4",md:"gap-5",lg:"gap-6",xl:"gap-6","2xl":"gap-8"},md:{xs:"md:gap-2",sm:"md:gap-4",md:"md:gap-5",lg:"md:gap-6",xl:"md:gap-6","2xl":"md:gap-8"},lg:{xs:"lg:gap-2",sm:"lg:gap-4",md:"lg:gap-5",lg:"lg:gap-6",xl:"lg:gap-6","2xl":"lg:gap-8"}},ah={sm:{xs:"gap-x-2",sm:"gap-x-4",md:"gap-x-5",lg:"gap-x-6",xl:"gap-x-6","2xl":"gap-x-8"},md:{xs:"md:gap-x-2",sm:"md:gap-x-4",md:"md:gap-x-5",lg:"md:gap-x-6",xl:"md:gap-x-6","2xl":"md:gap-x-8"},lg:{xs:"lg:gap-x-2",sm:"lg:gap-x-4",md:"lg:gap-x-5",lg:"lg:gap-x-6",xl:"lg:gap-x-6","2xl":"lg:gap-x-8"}},ih={sm:{xs:"gap-y-2",sm:"gap-y-4",md:"gap-y-5",lg:"gap-y-6",xl:"gap-y-6","2xl":"gap-y-8"},md:{xs:"md:gap-y-2",sm:"md:gap-y-4",md:"md:gap-y-5",lg:"md:gap-y-6",xl:"md:gap-y-6","2xl":"md:gap-y-8"},lg:{xs:"lg:gap-y-2",sm:"lg:gap-y-4",md:"lg:gap-y-5",lg:"lg:gap-y-6",xl:"lg:gap-y-6","2xl":"lg:gap-y-8"}},sh={sm:{1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},md:{1:"md:col-span-1",2:"md:col-span-2",3:"md:col-span-3",4:"md:col-span-4",5:"md:col-span-5",6:"md:col-span-6",7:"md:col-span-7",8:"md:col-span-8",9:"md:col-span-9",10:"md:col-span-10",11:"md:col-span-11",12:"md:col-span-12"},lg:{1:"lg:col-span-1",2:"lg:col-span-2",3:"lg:col-span-3",4:"lg:col-span-4",5:"lg:col-span-5",6:"lg:col-span-6",7:"lg:col-span-7",8:"lg:col-span-8",9:"lg:col-span-9",10:"lg:col-span-10",11:"lg:col-span-11",12:"lg:col-span-12"}},lh={sm:{1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},md:{1:"md:col-start-1",2:"md:col-start-2",3:"md:col-start-3",4:"md:col-start-4",5:"md:col-start-5",6:"md:col-start-6",7:"md:col-start-7",8:"md:col-start-8",9:"md:col-start-9",10:"md:col-start-10",11:"md:col-start-11",12:"md:col-start-12"},lg:{1:"lg:col-start-1",2:"lg:col-start-2",3:"lg:col-start-3",4:"lg:col-start-4",5:"lg:col-start-5",6:"lg:col-start-6",7:"lg:col-start-7",8:"lg:col-start-8",9:"lg:col-start-9",10:"lg:col-start-10",11:"lg:col-start-11",12:"lg:col-start-12"}},ch={sm:{row:"grid-flow-row",column:"grid-flow-col","row-dense":"grid-flow-row-dense","column-dense":"grid-flow-col-dense"},md:{row:"md:grid-flow-row",column:"md:grid-flow-col","row-dense":"md:grid-flow-row-dense","column-dense":"md:grid-flow-col-dense"},lg:{row:"lg:grid-flow-row",column:"lg:grid-flow-col","row-dense":"lg:grid-flow-row-dense","column-dense":"lg:grid-flow-col-dense"}},uh={sm:{normal:"justify-normal",start:"justify-start",end:"justify-end",center:"justify-center",between:"justify-between",around:"justify-around",evenly:"justify-evenly",stretch:"justify-stretch"},md:{normal:"md:justify-normal",start:"md:justify-start",end:"md:justify-end",center:"md:justify-center",between:"md:justify-between",around:"md:justify-around",evenly:"md:justify-evenly",stretch:"md:justify-stretch"},lg:{normal:"lg:justify-normal",start:"lg:justify-start",end:"lg:justify-end",center:"lg:justify-center",between:"lg:justify-between",around:"lg:justify-around",evenly:"lg:justify-evenly",stretch:"lg:justify-stretch"}},dh={sm:{start:"items-start",end:"items-end",center:"items-center",baseline:"items-baseline",stretch:"items-stretch"},md:{start:"md:items-start",end:"md:items-end",center:"md:items-center",baseline:"md:items-baseline",stretch:"md:items-stretch"},lg:{start:"lg:items-start",end:"lg:items-end",center:"lg:items-center",baseline:"lg:items-baseline",stretch:"lg:items-stretch"}},fh={sm:{start:"self-start",end:"self-end",center:"self-center",baseline:"self-baseline",stretch:"self-stretch"},md:{start:"md:self-start",end:"md:self-end",center:"md:self-center",baseline:"md:self-baseline",stretch:"md:self-stretch"},lg:{start:"lg:self-start",end:"lg:self-end",center:"lg:self-center",baseline:"lg:self-baseline",stretch:"lg:self-stretch"}},ph={sm:{auto:"justify-self-auto",start:"justify-self-start",end:"justify-self-end",center:"justify-self-center",baseline:"justify-self-baseline",stretch:"justify-self-stretch"},md:{auto:"md:justify-self-auto",start:"md:justify-self-start",end:"md:justify-self-end",center:"md:justify-self-center",baseline:"md:justify-self-baseline",stretch:"md:justify-self-stretch"},lg:{auto:"lg:justify-self-auto",start:"lg:justify-self-start",end:"lg:justify-self-end",center:"lg:justify-self-center",baseline:"lg:justify-self-baseline",stretch:"lg:justify-self-stretch"}},mh={sm:{row:"flex-row","row-reverse":"flex-row-reverse",column:"flex-col","column-reverse":"flex-col-reverse"},md:{row:"md:flex-row","row-reverse":"md:flex-row-reverse",column:"md:flex-col","column-reverse":"md:flex-col-reverse"},lg:{row:"lg:flex-row","row-reverse":"lg:flex-row-reverse",column:"lg:flex-col","column-reverse":"lg:flex-col-reverse"}},hh={sm:{wrap:"flex-wrap","wrap-reverse":"flex-wrap-reverse",nowrap:"flex-nowrap"},md:{wrap:"md:flex-wrap","wrap-reverse":"md:flex-wrap-reverse",nowrap:"md:flex-nowrap"},lg:{wrap:"lg:flex-wrap","wrap-reverse":"lg:flex-wrap-reverse",nowrap:"lg:flex-nowrap"}},gh={sm:{1:"w-full",2:"w-1/2",3:"w-1/3",4:"w-1/4",5:"w-1/5",6:"w-1/6",7:"w-1/7",8:"w-1/8",9:"w-1/9",10:"w-1/10",11:"w-1/11",12:"w-1/12"},md:{1:"md:w-full",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/4",5:"md:w-1/5",6:"md:w-1/6",7:"md:w-1/7",8:"md:w-1/8",9:"md:w-1/9",10:"md:w-1/10",11:"md:w-1/11",12:"md:w-1/12"},lg:{1:"lg:w-full",2:"lg:w-1/2",3:"lg:w-1/3",4:"lg:w-1/4",5:"lg:w-1/5",6:"lg:w-1/6",7:"lg:w-1/7",8:"lg:w-1/8",9:"lg:w-1/9",10:"lg:w-1/10",11:"lg:w-1/11",12:"lg:w-1/12"}},yh={sm:{1:"order-1",2:"order-2",3:"order-3",4:"order-4",5:"order-5",6:"order-6",7:"order-7",8:"order-8",9:"order-9",10:"order-10",11:"order-11",12:"order-12",first:"order-first",last:"order-last",none:"order-none"},md:{1:"md:order-1",2:"md:order-2",3:"md:order-3",4:"md:order-4",5:"md:order-5",6:"md:order-6",7:"md:order-7",8:"md:order-8",9:"md:order-9",10:"md:order-10",11:"md:order-11",12:"md:order-12",first:"md:order-first",last:"md:order-last",none:"md:order-none"},lg:{1:"lg:order-1",2:"lg:order-2",3:"lg:order-3",4:"lg:order-4",5:"lg:order-5",6:"lg:order-6",7:"lg:order-7",8:"lg:order-8",9:"lg:order-9",10:"lg:order-10",11:"lg:order-11",12:"lg:order-12",first:"lg:order-first",last:"lg:order-last",none:"lg:order-none"}},wh={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},bh={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},vh=(e,t,n,r="sm")=>{const o=[];switch(typeof e){case"object":for(const[r,a]of Object.entries(e))t[r]&&o.push(t?.[r]?.[a]??t?.[r]?.[n?.[r]]??"");break;case"string":case"number":const a=r;o.push(t?.[a]?.[e]??t?.[a]?.[n?.[a]]??"");break;default:if(void 0===e)break;o.push(t?.[r]?.[n]??"")}return o.join(" ")},xh=({className:e,cols:t,gap:n,gapX:r,gapY:o,align:a,justify:i,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:c=!1,autoRows:u=!1,autoCols:d=!1,children:f,...p})=>{const m=vh(t,rh,1),h=vh(n,oh,"sm"),g=vh(r,ah,""),y=vh(o,ih,""),w=vh(a,dh,""),b=vh(i,uh,""),v=vh(s,ch,"");return(0,R.jsx)("div",{className:Le("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":c,"auto-cols-auto":d,"auto-rows-auto":u},m,h,g,y,w,b,v,e),...p,children:f})};xh.Item=({className:e,children:t,colSpan:n,colStart:r,alignSelf:o,justifySelf:a,...i})=>{const s=vh(n,sh,0),l=vh(r,lh,0),c=vh(o,fh,""),u=vh(a,ph,"");return(0,R.jsx)("div",{className:Le(s,l,c,u,e),...i,children:t})};const Nh=(0,w.createContext)({}),Eh=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:o,justify:a,align:i,wrap:s,cols:l,className:c,children:u,...d})=>{if("grid"===e)return(0,R.jsx)(Nh.Provider,{value:{containerType:e},children:(0,R.jsx)(xh,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:u,align:i,justify:a,...d})});const f=vh(s,hh,""),p=vh(t,oh,"sm"),m=vh(n,ah,""),h=vh(r,ih,""),g=vh(o,mh,""),y=vh(a,uh,""),w=vh(i,dh,""),b=Le("flex",f,p,m,h,g,y,w,c);return(0,R.jsx)(Nh.Provider,{value:{containerType:e,cols:l},children:"flex"===e?(0,R.jsx)("div",{className:b,children:u}):(0,R.jsx)(xh,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:u,align:i,justify:a,...d})})},Mh=({grow:e,shrink:t,order:n,alignSelf:r,justifySelf:o,className:a,children:i,...s})=>{const{containerType:l,cols:c}=(0,w.useContext)(Nh);if("grid"===l)return(0,R.jsx)(xh.Item,{className:a,alignSelf:r,justifySelf:o,children:i,...s});const u=vh(r,fh,""),d=vh(o,ph,""),f=vh(e,wh,0),p=vh(t,bh,0),m=vh(n,yh,0),h=vh(c,gh,1);return(0,R.jsx)("div",{className:Le("box-border",f,p,m,u,d,h,a),children:i})};Eh.Item=Mh,Eh.displayName="Container",Mh.displayName="Container.Item";const _h=({title:e="",description:t="",icon:n=null,iconPosition:r="right",tag:o="h2",size:a="sm",className:i=""})=>{const s={xs:"gap-1 [&>svg]:size-3.5",sm:"gap-1 [&>svg]:size-4",md:"gap-1.5 [&>svg]:size-5",lg:"gap-1.5 [&>svg]:size-5"};if(!e)return null;const l=()=>(0,R.jsx)(o,{className:Le("font-semibold p-0 m-0",{xs:"text-base [&>*]:text-base gap-1",sm:"text-lg [&>*]:text-lg gap-1",md:"text-xl [&>*]:text-xl gap-1.5",lg:"text-2xl [&>*]:text-2xl gap-1.5"}[a]),children:e});return t?(0,R.jsxs)("div",{className:i,children:[(0,R.jsxs)("div",{children:[n&&"left"===r&&(0,R.jsxs)("div",{className:Le("flex items-center",s[a]),children:[n,l()]}),n&&"right"===r&&(0,R.jsxs)("div",{className:Le("flex items-center",s[a]),children:[l(),n]}),!n&&l()]}),(0,R.jsx)("p",{className:Le("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[a]),children:t})]}):(0,R.jsxs)("div",{className:i,children:[n&&"left"===r&&(0,R.jsxs)("div",{className:Le("flex items-center",s[a]),children:[n,l()]}),n&&"right"===r&&(0,R.jsxs)("div",{className:Le("flex items-center",s[a]),children:[l(),n]}),!n&&l()]})},Ih={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},Sh={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},jh={44:"leading-11",38:"leading-9.5",32:"leading-8",30:"leading-7.5",28:"leading-7",24:"leading-6",20:"leading-5",16:"leading-4"},kh={2:"tracking-2"},Dh={brand600:"text-brand-primary-600",link:"text-link-primary",primary:"text-text-primary",secondary:"text-text-secondary",tertiary:"text-text-tertiary",disabled:"text-text-disabled",help:"text-field-helper",label:"text-field-label",info:"text-support-info",success:"text-support-success",warning:"text-support-warning",error:"text-support-error",inverse:"text-text-on-color"},Ch=(0,w.forwardRef)(function({as:e,children:t,weight:n,size:r,lineHeight:o,letterSpacing:a,color:i="primary",className:s,...l},c){return(0,R.jsx)(e||"p",{ref:c,className:Le("m-0 p-0",n?Ih[n]:"",r?Sh[r]:"",o?jh[o]:"",a?kh[a]:"",i?Dh[i]:"",s),...l,children:t})});function Ah({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",clipRule:"evenodd"}))}const Th=w.forwardRef(Ah),Oh=Fo("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),Lh=Fo("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),zh=({feature:e,open:t,setOpen:n})=>{const r={"order-bump":{title:(0,z.__)("Order Bumps","cartflows"),image:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDE5MCIgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHJ4PSIxMiIgZmlsbD0iI0ZFRjBFOSIvPgogIDxyZWN0IHg9IjExMiIgeT0iMzYiIHdpZHRoPSIxNTAiIGhlaWdodD0iMTE4IiByeD0iOCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjQ1KSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjEuOCIgb3BhY2l0eT0iMC41NSIvPgogIDxyZWN0IHg9IjExMiIgeT0iMzYiIHdpZHRoPSIxNTAiIGhlaWdodD0iMjAiIHJ4PSI4IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjEyIi8+CiAgPHJlY3QgeD0iMTEyIiB5PSI0OCIgd2lkdGg9IjE1MCIgaGVpZ2h0PSI4IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjEyIi8+CiAgPHJlY3QgeD0iMTI0IiB5PSI3MiIgd2lkdGg9IjkyIiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE0Ii8+CiAgPHJlY3QgeD0iMTI0IiB5PSI4NiIgd2lkdGg9IjExMiIgaGVpZ2h0PSI2IiByeD0iMyIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xNCIvPgogIDxyZWN0IHg9IjEyNCIgeT0iMTAwIiB3aWR0aD0iNzIiIGhlaWdodD0iNiIgcng9IjMiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMTQiLz4KICA8bGluZSB4MT0iMTI0IiB5MT0iMTE4IiB4Mj0iMjUwIiB5Mj0iMTE4IiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMSIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBvcGFjaXR5PSIwLjE4Ii8+CiAgPHJlY3QgeD0iMTI0IiB5PSIxMjgiIHdpZHRoPSI1OCIgaGVpZ2h0PSI4IiByeD0iNCIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xNiIvPgogIDxyZWN0IHg9IjIwNiIgeT0iMTI2IiB3aWR0aD0iNDQiIGhlaWdodD0iMTIiIHJ4PSI2IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjIiLz4KICA8Y2lyY2xlIGN4PSIyODEiIGN5PSI5NSIgcj0iMTQiIGZpbGw9IiNGMTYzMzQiLz4KICA8cGF0aCBkPSJNMjgxLDg4IEwyODEsMTAyIE0yNzQsOTUgTDI4OCw5NSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyLjQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgogIDxyZWN0IHg9IjMwMCIgeT0iNTAiIHdpZHRoPSIxNTIiIGhlaWdodD0iOTAiIHJ4PSI4IiBmaWxsPSIjRkVGMEU5IiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMi4yIi8+CiAgPHJlY3QgeD0iMzE0IiB5PSI2NiIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiByeD0iNCIgZmlsbD0iI0YxNjMzNCIvPgogIDxwYXRoIGQ9Ik0zMTgsNzUgTDMyMiw3OSBMMzI4LDcwIiBmaWxsPSJub25lIiBzdHJva2U9IndoaXRlIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgogIDxyZWN0IHg9IjM0MiIgeT0iNjgiIHdpZHRoPSI4NCIgaGVpZ2h0PSI2IiByeD0iMyIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4zMiIvPgogIDxyZWN0IHg9IjM0MiIgeT0iODAiIHdpZHRoPSI2MCIgaGVpZ2h0PSI2IiByeD0iMyIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4yMiIvPgogIDxyZWN0IHg9IjMxNCIgeT0iOTgiIHdpZHRoPSIyNiIgaGVpZ2h0PSIyNiIgcng9IjUiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMTYiLz4KICA8cmVjdCB4PSIzNTIiIHk9IjEwNCIgd2lkdGg9IjUyIiBoZWlnaHQ9IjE0IiByeD0iNyIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4yOCIvPgo8L3N2Zz4K",description:(0,z.__)("Offer a perfectly matched add-on right on your checkout page. Customers add it to their order in a single click, before they pay.","cartflows"),valueProps:[(0,z.__)("Increase your average order value on every checkout","cartflows"),(0,z.__)("One-click add-ons — no extra pages and no coding","cartflows"),(0,z.__)("Show a relevant offer that complements the main product","cartflows")]},upsell:{title:(0,z.__)("One-Click Upsells","cartflows"),icon:Lh,description:(0,z.__)("Present a one-time offer right after customers pay. They accept in a single click — no need to re-enter their payment details.","cartflows"),valueProps:[(0,z.__)("Add revenue from customers who already bought","cartflows"),(0,z.__)("Frictionless one-click accept — no re-entering card details","cartflows"),(0,z.__)("Create upsell and downsell offers for any funnel","cartflows")]},abtest:{title:(0,z.__)("A/B Testing","cartflows"),image:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDE5MCIgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHJ4PSIxMiIgZmlsbD0iI0ZFRjBFOSIvPgogIDxjaXJjbGUgY3g9IjI4MCIgY3k9IjEzIiByPSI0IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjU1Ii8+CiAgPGxpbmUgeDE9IjI4MCIgeTE9IjEzIiB4Mj0iMjgwIiB5Mj0iNDAiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIG9wYWNpdHk9IjAuNSIvPgogIDxsaW5lIHgxPSIyODAiIHkxPSI0MCIgeDI9IjE4MiIgeTI9IjUxIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiIG9wYWNpdHk9IjAuNDUiLz4KICA8bGluZSB4MT0iMjgwIiB5MT0iNDAiIHgyPSIzNzgiIHkyPSI1MSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjEuOCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBvcGFjaXR5PSIwLjQ1Ii8+CiAgPGNpcmNsZSBjeD0iMTgyIiBjeT0iNTEiIHI9IjExIiBmaWxsPSIjRkVGMEU5IiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMS44IiBvcGFjaXR5PSIwLjYiLz4KICA8dGV4dCB4PSIxODIiIHk9IjU1LjUiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTEiIGZvbnQtd2VpZ2h0PSI3MDAiIGZpbGw9IiNGMTYzMzQiIGZvbnQtZmFtaWx5PSInSGVsdmV0aWNhIE5ldWUnLEFyaWFsLHNhbnMtc2VyaWYiIG9wYWNpdHk9IjAuNiI+QTwvdGV4dD4KICA8Y2lyY2xlIGN4PSIzNzgiIGN5PSI1MSIgcj0iMTEiIGZpbGw9IiNGRUYwRTkiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxLjgiLz4KICA8dGV4dCB4PSIzNzgiIHk9IjU1LjUiIHRleHQtYW5jaG9yPSJtaWRkbGUiIGZvbnQtc2l6ZT0iMTEiIGZvbnQtd2VpZ2h0PSI3MDAiIGZpbGw9IiNGMTYzMzQiIGZvbnQtZmFtaWx5PSInSGVsdmV0aWNhIE5ldWUnLEFyaWFsLHNhbnMtc2VyaWYiPkI8L3RleHQ+CiAgPHJlY3QgeD0iMTMyIiB5PSI2NiIgd2lkdGg9IjEwMCIgaGVpZ2h0PSIxMTQiIHJ4PSI3IiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuNCkiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxLjgiIG9wYWNpdHk9IjAuNSIvPgogIDxyZWN0IHg9IjEzMiIgeT0iNjYiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTgiIHJ4PSI3IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjEyIi8+CiAgPHJlY3QgeD0iMTMyIiB5PSI3NiIgd2lkdGg9IjEwMCIgaGVpZ2h0PSI4IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjEyIi8+CiAgPHJlY3QgeD0iMTQwIiB5PSI5OCIgd2lkdGg9IjY2IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE0Ii8+CiAgPHJlY3QgeD0iMTQwIiB5PSIxMTAiIHdpZHRoPSI3NiIgaGVpZ2h0PSI2IiByeD0iMyIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xNCIvPgogIDxyZWN0IHg9IjE0MCIgeT0iMTIyIiB3aWR0aD0iNTAiIGhlaWdodD0iNiIgcng9IjMiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMTQiLz4KICA8cmVjdCB4PSIxNDciIHk9IjE2MiIgd2lkdGg9IjY4IiBoZWlnaHQ9IjEyIiByeD0iNiIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xNiIvPgogIDxyZWN0IHg9IjMyOCIgeT0iNjYiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTE0IiByeD0iNyIgZmlsbD0iI0ZFRjBFOSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjIuMiIvPgogIDxyZWN0IHg9IjMyOCIgeT0iNjYiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTgiIHJ4PSI3IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjIiLz4KICA8cmVjdCB4PSIzMjgiIHk9Ijc2IiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjgiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMiIvPgogIDxyZWN0IHg9IjMzNiIgeT0iOTgiIHdpZHRoPSI1MCIgaGVpZ2h0PSI2IiByeD0iMyIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4yNSIvPgogIDxyZWN0IHg9IjMzNiIgeT0iMTEwIiB3aWR0aD0iNzYiIGhlaWdodD0iNiIgcng9IjMiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMjUiLz4KICA8cmVjdCB4PSIzMzYiIHk9IjEyMiIgd2lkdGg9IjY2IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjI1Ii8+CiAgPHJlY3QgeD0iMzQzIiB5PSIxNjIiIHdpZHRoPSI2OCIgaGVpZ2h0PSIxMiIgcng9IjYiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMzIiLz4KICA8Y2lyY2xlIGN4PSI0MjgiIGN5PSI2NiIgcj0iMTMiIGZpbGw9IiNGMTYzMzQiLz4KICA8cGF0aCBkPSJNNDIzLDY2IEw0MjYsNzAgTDQzMyw2MCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIyLjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgo8L3N2Zz4K",description:(0,z.__)("Test product pricing, page layouts, messaging, and design against each other. CartFlows splits the traffic so you can keep the higher-converting version.","cartflows"),valueProps:[(0,z.__)("Test headlines, layouts, offers, and buttons — no code","cartflows"),(0,z.__)("Split traffic automatically and compare performance","cartflows"),(0,z.__)("Keep the winning variation and grow what works","cartflows")]},duplicate:{title:(0,z.__)("Duplicate Step","cartflows"),image:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDE5MCIgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHJ4PSIxMiIgZmlsbD0iI0ZFRjBFOSIvPgogIDxyZWN0IHg9IjIwOCIgeT0iMjIiIHdpZHRoPSIxMDIiIGhlaWdodD0iMTM4IiByeD0iOCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjQ1KSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjEuOCIgb3BhY2l0eT0iMC41NSIvPgogIDxyZWN0IHg9IjIwOCIgeT0iMjIiIHdpZHRoPSIxMDIiIGhlaWdodD0iMjAiIHJ4PSI4IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjEzIi8+CiAgPHJlY3QgeD0iMjA4IiB5PSIzNCIgd2lkdGg9IjEwMiIgaGVpZ2h0PSI4IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjEzIi8+CiAgPHJlY3QgeD0iMjE2IiB5PSI1OCIgd2lkdGg9IjY4IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE1Ii8+CiAgPHJlY3QgeD0iMjE2IiB5PSI3MCIgd2lkdGg9Ijc4IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE1Ii8+CiAgPHJlY3QgeD0iMjE2IiB5PSI4MiIgd2lkdGg9IjUyIiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE1Ii8+CiAgPHJlY3QgeD0iMjIyIiB5PSIxMzgiIHdpZHRoPSI3MiIgaGVpZ2h0PSIxMyIgcng9IjYuNSIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xOCIvPgogIDxyZWN0IHg9IjI1MSIgeT0iNDAiIHdpZHRoPSIxMDIiIGhlaWdodD0iMTM4IiByeD0iOCIgZmlsbD0iI0ZFRjBFOSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjIuMiIvPgogIDxyZWN0IHg9IjI1MSIgeT0iNDAiIHdpZHRoPSIxMDIiIGhlaWdodD0iMjAiIHJ4PSI4IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE4Ii8+CiAgPHJlY3QgeD0iMjUxIiB5PSI1MiIgd2lkdGg9IjEwMiIgaGVpZ2h0PSI4IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE4Ii8+CiAgPHJlY3QgeD0iMjU5IiB5PSI3NiIgd2lkdGg9IjY4IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjIyIi8+CiAgPHJlY3QgeD0iMjU5IiB5PSI4OCIgd2lkdGg9Ijc4IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjIyIi8+CiAgPHJlY3QgeD0iMjU5IiB5PSIxMDAiIHdpZHRoPSI1MiIgaGVpZ2h0PSI2IiByeD0iMyIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4yMiIvPgogIDxyZWN0IHg9IjI2NSIgeT0iMTU2IiB3aWR0aD0iNzIiIGhlaWdodD0iMTMiIHJ4PSI2LjUiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMjgiLz4KICA8Y2lyY2xlIGN4PSIyNTEiIGN5PSI0MCIgcj0iMTQiIGZpbGw9IiNGRUYwRTkiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxLjgiLz4KICA8cmVjdCB4PSIyNDYiIHk9IjM0IiB3aWR0aD0iOCIgaGVpZ2h0PSI4IiByeD0iMS41IiBmaWxsPSJub25lIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMS41Ii8+CiAgPHJlY3QgeD0iMjQ5IiB5PSIzNyIgd2lkdGg9IjgiIGhlaWdodD0iOCIgcng9IjEuNSIgZmlsbD0iI0ZFRjBFOSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjEuNSIvPgo8L3N2Zz4K",description:(0,z.__)("Clone any funnel step in a single click — keep its settings, layout, and content, then tweak only what you need.","cartflows"),valueProps:[(0,z.__)("Duplicate any step without rebuilding it from scratch","cartflows"),(0,z.__)("Reuse your best-performing layouts across funnels","cartflows"),(0,z.__)("Save time setting up new steps and variations","cartflows")]},"instant-checkout":{title:(0,z.__)("Instant Checkout","cartflows"),image:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDE5MCIgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHJ4PSIxMiIgZmlsbD0iI0ZFRjBFOSIvPgogIDxyZWN0IHg9IjkyIiB5PSIzMCIgd2lkdGg9IjE3MCIgaGVpZ2h0PSIxMzAiIHJ4PSI4IiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuNDUpIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMS44IiBvcGFjaXR5PSIwLjU1Ii8+CiAgPHJlY3QgeD0iMTA0IiB5PSI0MiIgd2lkdGg9IjYwIiBoZWlnaHQ9IjYwIiByeD0iNiIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xNCIvPgogIDxyZWN0IHg9IjE3NCIgeT0iNDYiIHdpZHRoPSI3MiIgaGVpZ2h0PSI3IiByeD0iMy41IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjIyIi8+CiAgPHJlY3QgeD0iMTc0IiB5PSI2MCIgd2lkdGg9IjQ0IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE0Ii8+CiAgPHJlY3QgeD0iMTc0IiB5PSI4MCIgd2lkdGg9IjM4IiBoZWlnaHQ9IjgiIHJ4PSI0IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjI4Ii8+CiAgPGxpbmUgeDE9IjEwNCIgeTE9IjExNCIgeDI9IjI1MCIgeTI9IjExNCIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjEiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgb3BhY2l0eT0iMC4xOCIvPgogIDxyZWN0IHg9IjEwNCIgeT0iMTI2IiB3aWR0aD0iNjQiIGhlaWdodD0iMjAiIHJ4PSI1IiBmaWxsPSJub25lIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMS40IiBvcGFjaXR5PSIwLjQiLz4KICA8cmVjdCB4PSIxMTYiIHk9IjEzMyIgd2lkdGg9IjQwIiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjIyIi8+CiAgPHJlY3QgeD0iMTc2IiB5PSIxMjYiIHdpZHRoPSI3NCIgaGVpZ2h0PSIyMCIgcng9IjUiIGZpbGw9IiNGMTYzMzQiLz4KICA8cGF0aCBkPSJNMTk5LDEyOS41IEwxOTMsMTM3IEwxOTgsMTM3IEwxOTYsMTQyLjUgTDIwMiwxMzUgTDE5NywxMzUgWiIgZmlsbD0id2hpdGUiLz4KICA8cmVjdCB4PSIyMDYiIHk9IjEzMyIgd2lkdGg9IjM0IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC45Ii8+CiAgPHBhdGggZD0iTTI1OCwxMzYgQzI4MiwxMzYgMjgyLDk1IDMwMCw5NSIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWRhc2hhcnJheT0iNCA1IiBvcGFjaXR5PSIwLjciLz4KICA8cGF0aCBkPSJNMjkzLDg5IEwzMDEsOTUgTDI5MywxMDEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG9wYWNpdHk9IjAuNyIvPgogIDxyZWN0IHg9IjMwNiIgeT0iMjIiIHdpZHRoPSIxNjIiIGhlaWdodD0iMTQ2IiByeD0iMTAiIGZpbGw9IiNGRUYwRTkiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIyLjIiLz4KICA8Y2lyY2xlIGN4PSIzMjQiIGN5PSI0MCIgcj0iNiIgZmlsbD0iI0YxNjMzNCIvPgogIDxwYXRoIGQ9Ik0zMjEuNSw0MCBMMzIzLjMsNDEuOCBMMzI2LjUsMzguMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgogIDxsaW5lIHgxPSIzMzIiIHkxPSI0MCIgeDI9IjM1MCIgeTI9IjQwIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMS40IiBvcGFjaXR5PSIwLjQiLz4KICA8Y2lyY2xlIGN4PSIzNTgiIGN5PSI0MCIgcj0iNiIgZmlsbD0iI0YxNjMzNCIvPgogIDxwYXRoIGQ9Ik0zNTUuNSw0MCBMMzU3LjMsNDEuOCBMMzYwLjUsMzguMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgogIDxsaW5lIHgxPSIzNjYiIHkxPSI0MCIgeDI9IjM4NCIgeTI9IjQwIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMS40IiBvcGFjaXR5PSIwLjQiLz4KICA8Y2lyY2xlIGN4PSIzOTIiIGN5PSI0MCIgcj0iNiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjEuNiIvPgogIDxwYXRoIGQ9Ik00NTIsMzUgTDQ1OCw0MSBNNDU4LDM1IEw0NTIsNDEiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxLjYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgb3BhY2l0eT0iMC41NSIvPgogIDxyZWN0IHg9IjMyMCIgeT0iNTgiIHdpZHRoPSIxMzQiIGhlaWdodD0iMTYiIHJ4PSI0IiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuNykiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxIiBvcGFjaXR5PSIwLjYiLz4KICA8cmVjdCB4PSIzMjAiIHk9IjgyIiB3aWR0aD0iMTM0IiBoZWlnaHQ9IjE2IiByeD0iNCIgZmlsbD0icmdiYSgyNTUsMjU1LDI1NSwwLjcpIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMSIgb3BhY2l0eT0iMC42Ii8+CiAgPHJlY3QgeD0iMzIwIiB5PSIxMDYiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgcng9IjQiIGZpbGw9IiNGMTYzMzQiLz4KICA8cGF0aCBkPSJNMzI0LDExNCBMMzI3LDExNyBMMzMyLDExMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSJ3aGl0ZSIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPgogIDxyZWN0IHg9IjM0NCIgeT0iMTA4IiB3aWR0aD0iNzAiIGhlaWdodD0iNSIgcng9IjIuNSIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4zIi8+CiAgPHJlY3QgeD0iMzQ0IiB5PSIxMTciIHdpZHRoPSI0NiIgaGVpZ2h0PSI1IiByeD0iMi41IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjIiLz4KICA8cmVjdCB4PSIzMjAiIHk9IjEzNiIgd2lkdGg9IjEzNCIgaGVpZ2h0PSIyMCIgcng9IjYiIGZpbGw9IiNGMTYzMzQiLz4KICA8cmVjdCB4PSIzNTgiIHk9IjE0MyIgd2lkdGg9IjU4IiBoZWlnaHQ9IjYiIHJ4PSIzIiBmaWxsPSJ3aGl0ZSIgb3BhY2l0eT0iMC45Ii8+Cjwvc3ZnPgo=",description:(0,z.__)("Add a Buy Now button to your product pages that opens your funnel checkout in a popup, so shoppers pay without ever leaving the page.","cartflows"),valueProps:[(0,z.__)("One-click Buy Now right beside Add to Cart","cartflows"),(0,z.__)("Checkout in a popup, with your order bumps and offers","cartflows"),(0,z.__)("Choose a layout and match it to your brand","cartflows")]},analytics:{title:(0,z.__)("Funnel Analytics","cartflows"),image:"data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTYwIDE5MCIgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHJlY3Qgd2lkdGg9IjU2MCIgaGVpZ2h0PSIxOTAiIHJ4PSIxMiIgZmlsbD0iI0ZFRjBFOSIvPgogIDxyZWN0IHg9IjQwIiB5PSIxNCIgd2lkdGg9IjE0NCIgaGVpZ2h0PSI1MCIgcng9IjYiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC42MikiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxIiBvcGFjaXR5PSIwLjUiLz4KICA8cmVjdCB4PSI1MCIgeT0iMjIiIHdpZHRoPSIzOCIgaGVpZ2h0PSI1IiByeD0iMi41IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjIyIi8+CiAgPHJlY3QgeD0iNTAiIHk9IjMzIiB3aWR0aD0iNjIiIGhlaWdodD0iMTIiIHJ4PSI0IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjI4Ii8+CiAgPHBhdGggZD0iTTE1NSwzOCBMMTYwLDMwIEwxNjUsMzgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgb3BhY2l0eT0iMC41NSIvPgogIDxyZWN0IHg9IjIwOCIgeT0iMTQiIHdpZHRoPSIxNDQiIGhlaWdodD0iNTAiIHJ4PSI2IiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuNjIpIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMSIgb3BhY2l0eT0iMC41Ii8+CiAgPHJlY3QgeD0iMjE4IiB5PSIyMiIgd2lkdGg9IjUyIiBoZWlnaHQ9IjUiIHJ4PSIyLjUiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMjIiLz4KICA8cmVjdCB4PSIyMTgiIHk9IjMzIiB3aWR0aD0iNDYiIGhlaWdodD0iMTIiIHJ4PSI0IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjI4Ii8+CiAgPHBhdGggZD0iTTMyMywzOCBMMzI4LDMwIEwzMzMsMzgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgb3BhY2l0eT0iMC41NSIvPgogIDxyZWN0IHg9IjM3NiIgeT0iMTQiIHdpZHRoPSIxNDQiIGhlaWdodD0iNTAiIHJ4PSI2IiBmaWxsPSJyZ2JhKDI1NSwyNTUsMjU1LDAuNjIpIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMSIgb3BhY2l0eT0iMC41Ii8+CiAgPHJlY3QgeD0iMzg2IiB5PSIyMiIgd2lkdGg9IjQ0IiBoZWlnaHQ9IjUiIHJ4PSIyLjUiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMjIiLz4KICA8cmVjdCB4PSIzODYiIHk9IjMzIiB3aWR0aD0iNzAiIGhlaWdodD0iMTIiIHJ4PSI0IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjI4Ii8+CiAgPHBhdGggZD0iTTQ5MSwzOCBMNDk2LDMwIEw1MDEsMzgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxLjgiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgb3BhY2l0eT0iMC41NSIvPgogIDxsaW5lIHgxPSI1MiIgeTE9Ijc4IiB4Mj0iNTIiIHkyPSIxNjQiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxIiBzdHJva2UtbGluZWNhcD0icm91bmQiIG9wYWNpdHk9IjAuMjIiLz4KICA8bGluZSB4MT0iNTIiIHkxPSIxNjQiIHgyPSI1MTYiIHkyPSIxNjQiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIxIiBzdHJva2UtbGluZWNhcD0icm91bmQiIG9wYWNpdHk9IjAuMjIiLz4KICA8cmVjdCB4PSIzOCIgeT0iNzciIHdpZHRoPSIxMSIgaGVpZ2h0PSI0IiByeD0iMiIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xOCIvPgogIDxyZWN0IHg9IjM4IiB5PSIxMDYiIHdpZHRoPSIxMSIgaGVpZ2h0PSI0IiByeD0iMiIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xOCIvPgogIDxyZWN0IHg9IjM4IiB5PSIxMzUiIHdpZHRoPSIxMSIgaGVpZ2h0PSI0IiByeD0iMiIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xOCIvPgogIDxsaW5lIHgxPSI1MiIgeTE9IjEwNyIgeDI9IjUxNiIgeTI9IjEwNyIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjAuOCIgc3Ryb2tlLWRhc2hhcnJheT0iNCw0IiBvcGFjaXR5PSIwLjE0Ii8+CiAgPGxpbmUgeDE9IjUyIiB5MT0iMTM2IiB4Mj0iNTE2IiB5Mj0iMTM2IiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMC44IiBzdHJva2UtZGFzaGFycmF5PSI0LDQiIG9wYWNpdHk9IjAuMTQiLz4KICA8cGF0aCBkPSJNOTYsMTEyIEMxMjgsMTA4IDE1Niw5NSAxOTIsOTUgQzIyNiw5NSAyNDgsMTIwIDI4MiwxMjIgQzMxNiwxMjQgMzQwLDEwNCAzNzIsMTAyIEM0MDQsMTAwIDQzMCwxMzIgNDYyLDEzNSBMNDYyLDE2NCBMOTYsMTY0IFoiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMSIvPgogIDxwYXRoIGQ9Ik05NiwxMTIgQzEyOCwxMDggMTU2LDk1IDE5Miw5NSBDMjI2LDk1IDI0OCwxMjAgMjgyLDEyMiBDMzE2LDEyNCAzNDAsMTA0IDM3MiwxMDIgQzQwNCwxMDAgNDMwLDEzMiA0NjIsMTM1IiBmaWxsPSJub25lIiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMi4yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIG9wYWNpdHk9IjAuNjUiLz4KICA8Y2lyY2xlIGN4PSI5NiIgIGN5PSIxMTIiIHI9IjQiIGZpbGw9IiNGRUYwRTkiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIyIiBvcGFjaXR5PSIwLjY1Ii8+CiAgPGNpcmNsZSBjeD0iMTkyIiBjeT0iOTUiICByPSI1IiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjciLz4KICA8Y2lyY2xlIGN4PSIyODIiIGN5PSIxMjIiIHI9IjQiIGZpbGw9IiNGRUYwRTkiIHN0cm9rZT0iI0YxNjMzNCIgc3Ryb2tlLXdpZHRoPSIyIiBvcGFjaXR5PSIwLjY1Ii8+CiAgPGNpcmNsZSBjeD0iMzcyIiBjeT0iMTAyIiByPSI0IiBmaWxsPSIjRkVGMEU5IiBzdHJva2U9IiNGMTYzMzQiIHN0cm9rZS13aWR0aD0iMiIgb3BhY2l0eT0iMC42NSIvPgogIDxjaXJjbGUgY3g9IjQ2MiIgY3k9IjEzNSIgcj0iNCIgZmlsbD0iI0ZFRjBFOSIgc3Ryb2tlPSIjRjE2MzM0IiBzdHJva2Utd2lkdGg9IjIiIG9wYWNpdHk9IjAuNjUiLz4KICA8cmVjdCB4PSI4MCIgIHk9IjE2OCIgd2lkdGg9IjI4IiBoZWlnaHQ9IjQiIHJ4PSIyIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE4Ii8+CiAgPHJlY3QgeD0iMTc2IiB5PSIxNjgiIHdpZHRoPSIyOCIgaGVpZ2h0PSI0IiByeD0iMiIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xOCIvPgogIDxyZWN0IHg9IjI2NiIgeT0iMTY4IiB3aWR0aD0iMjgiIGhlaWdodD0iNCIgcng9IjIiIGZpbGw9IiNGMTYzMzQiIG9wYWNpdHk9IjAuMTgiLz4KICA8cmVjdCB4PSIzNTYiIHk9IjE2OCIgd2lkdGg9IjI4IiBoZWlnaHQ9IjQiIHJ4PSIyIiBmaWxsPSIjRjE2MzM0IiBvcGFjaXR5PSIwLjE4Ii8+CiAgPHJlY3QgeD0iNDQ2IiB5PSIxNjgiIHdpZHRoPSIyOCIgaGVpZ2h0PSI0IiByeD0iMiIgZmlsbD0iI0YxNjMzNCIgb3BhY2l0eT0iMC4xOCIvPgo8L3N2Zz4K",description:(0,z.__)("See exactly what is driving your funnel revenue — views, conversions, average order value, and revenue per visit for every funnel and step.","cartflows"),valueProps:[(0,z.__)("Track views, conversions, and revenue per step","cartflows"),(0,z.__)("Spot where buyers drop off and fix it","cartflows"),(0,z.__)("Make decisions with real data, not guesses","cartflows")]}}[e];if(!r)return null;const{title:o,description:i,valueProps:s=[],image:l,icon:c}=r;return(0,a.createElement)(Im,{open:t,setOpen:n,exitOnClickOutside:!0},(0,a.createElement)(Im.Panel,{className:"sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,null,o,(0,a.createElement)("span",{className:"ml-2 inline-flex align-middle"},(0,a.createElement)(Rp,null))),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,{className:"space-y-4"},l?(0,a.createElement)("img",{src:l,alt:o,className:"block w-full rounded-lg box-border"}):c&&(0,a.createElement)("div",{className:"flex items-center justify-center bg-brand-25 rounded-lg py-8"},(0,a.createElement)(c,{className:"w-12 h-12 text-brand-500",strokeWidth:1.5})),(0,a.createElement)(Ch,{size:14,color:"secondary"},i),s.length>0&&(0,a.createElement)("ul",{className:"list-none p-0 m-0 space-y-2"},s.map((e,t)=>(0,a.createElement)("li",{key:t,className:"flex items-start gap-2"},(0,a.createElement)(Oh,{className:"w-4 h-4 text-brand-500 shrink-0 mt-0.5",strokeWidth:2}),(0,a.createElement)(Ch,{size:14,color:"secondary"},e))))),(0,a.createElement)(Im.Footer,{className:"bg-brand-25 flex flex-col items-stretch gap-2"},(0,a.createElement)(Wo,{tag:"a",href:getUpgradeToProUrl(),target:"_blank",rel:"noreferrer",variant:"primary",className:"w-full box-border no-underline text-center text-sm"},(0,z.__)("Upgrade to Pro","cartflows")),(0,a.createElement)(Ch,{size:12,color:"tertiary",className:"text-center"},(0,z.__)("14-day money-back guarantee","cartflows")))))};function Ph(e){const t="undefined"!=typeof cartflows_admin&&"active"===cartflows_admin.woocommerce_status,n=cartflows_admin?.global_checkout_id,r="undefined"!=typeof cartflows_admin&&!!cartflows_admin.is_pro,o=e?.flow_exists,a=e?.flow_have_order_bump,i=e?.flow_have_upsell;return[{woocommerce_setup:{completed:t}},{global_checkout_added:{completed:null!=n&&""!==n}},{funnel_created:{completed:o>0}},{order_bump_created:{completed:a&&r}},{upsell_created:{completed:i&&r}}]}const Rh={order_bump_created:"order-bump",upsell_created:"upsell"},Uh=function({page_builder:e}){const[{setup_checklist_data:t},n]=l(),[r,o]=(0,a.useState)(!1),[i,s]=(0,a.useState)(null),c=!!cartflows_admin?.is_pro,u=t?.flow_exists,d=t?.checkout_flow_id,f=t?.checkout_step_id,p=[{id:"woocommerce_setup",label:(0,z.__)("Finish Setup","cartflows"),actionLabel:(0,z.__)("Setup CartFlows","cartflows"),url:"admin.php?page=cartflows&path=learn",pro:!1},{id:"global_checkout_added",label:(0,z.__)("Setup Store Checkout","cartflows"),actionLabel:(0,z.__)("Create","cartflows"),url:"index.php?page=cartflows&path=store-checkout",pro:!1},{id:"funnel_created",label:(0,z.__)("Build Your Sales Funnel","cartflows"),actionLabel:"bricks-builder"===e||"other"===e?(0,z.__)("Start From Scratch","cartflows"):(0,z.__)("Go To Library","cartflows"),url:"index.php?page=cartflows&path=library",pro:!1},{id:"order_bump_created",label:(0,z.__)("Offer add-ons with Order Bump","cartflows"),actionLabel:(0,z.__)("Create","cartflows"),url:u&&d&&f?`admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${d}&step_id=${f}&tab=order_bumps`:"index.php?page=cartflows&path=library",pro:!0},{id:"upsell_created",label:(0,z.__)("Increase Revenue with Upsells","cartflows"),actionLabel:(0,z.__)("Create","cartflows"),url:u&&d?`admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${d}`:"index.php?page=cartflows&path=library",pro:!0}],m=Ph(t);let h=0;m.forEach(e=>{Object.values(e).forEach(e=>{e.completed&&h++})}),(0,a.useEffect)(()=>{let e=!0;if(null===t){const t=new window.FormData;(async()=>{o(!0),L()({path:"/cartflows/v1/admin/setup-checklist/",method:"POST",body:t}).then(t=>{e&&(n({type:"SET_SETUP_CHECKLIST_DATA",setup_checklist:t}),o(!1))})})()}return()=>{e=!1}},[]);const g=getUpgradeToProUrl({utm_campaign:"pricing"});return(0,a.createElement)(Eh,{containerType:"flex",direction:"column",className:"wcf-onboarding-stats-box box-border h-full bg-primary-25 border border-solid border-primary-500 rounded-lg p-6 gap-5"},!t&&r&&(0,a.createElement)(nh,null),t&&!r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"flex justify-between items-center"},(0,a.createElement)(_h,{tag:"h4",size:"xs",title:(0,z.__)("Almost There! Let's Go Live.","cartflows"),className:"tracking-[-0.1px] leading-[30px]"}),(0,a.createElement)(Ch,{size:14,color:"secondary",className:"text-right w-[180px]"},(0,z.sprintf)(/* translators: %d is the number of completed steps. */ /* translators: %d is the number of completed steps. */ |
| 5 |
(0,z.__)("%d out of 5 completed","cartflows"),h))),(0,a.createElement)("ul",{className:"list-none p-0 m-0 space-y-[14px]"},p.map(({id:e,label:t,actionLabel:n,url:r,pro:o})=>{const i=(e=>{const t=m.find(t=>t[e]);return!!t&&t[e]?.completed})(e),l=o&&!c,u=`${cartflows_admin?.admin_base_url}${r}`;return(0,a.createElement)("li",{key:e,className:"flex justify-between items-center"},(0,a.createElement)("div",{className:"flex items-center gap-[10px]"},i?(0,a.createElement)("div",{className:"flex items-center justify-center size-5 shrink-0"},(0,a.createElement)(Th,{className:"size-4 text-primary-500"})):(0,a.createElement)("div",{className:"flex items-center justify-center size-5 shrink-0"},(0,a.createElement)("span",{className:"border border-field-border bg-background-primary rounded-full size-4 inline-block"})),(0,a.createElement)(Ch,{size:14,weight:500,color:"secondary"},t),o&&!c&&(0,a.createElement)(Rp,null)),i&&(0,a.createElement)(Ch,{size:14,weight:500,className:"text-support-success"},(0,z.__)("Completed","cartflows")),!i&&l&&(Rh[e]?(0,a.createElement)(Wo,{variant:"link",size:"sm",className:"!text-primary-500 hover:!text-primary-600",onClick:()=>s(Rh[e])},(0,z.__)("Unlock with PRO","cartflows")):(0,a.createElement)(Wo,{tag:"a",href:g,variant:"link",size:"sm",className:"!text-primary-500 hover:!text-primary-600"},(0,z.__)("Unlock with PRO","cartflows"))),!i&&!l&&(0,a.createElement)(Wo,{tag:"a",href:u,variant:"link",size:"sm",className:"!text-primary-500 hover:!text-primary-600"},n))}))),(0,a.createElement)(zh,{feature:i,open:!!i,setOpen:e=>{e||s(null)}}))};function Bh({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{d:"M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z"}))}const Fh=w.forwardRef(Bh),Yh=function(){const[{page_builder:e}]=p(),[t,n]=(0,a.useState)(!1),[r,o]=(0,a.useState)("hide"),[i,s]=(0,a.useState)("");return(0,a.createElement)("div",{className:"wcf-user-info"},(0,a.createElement)("div",{className:"flex flex-col gap-6 md:gap-8 lg:flex-row lg:items-stretch justify-between"},(0,a.createElement)("div",{className:"grid grid-cols-12 items-center w-full lg:w-[64.5%] bg-background-primary border border-solid border-border-subtle rounded-lg shadow-sm overflow-hidden p-4 gap-2 box-border"},(0,a.createElement)("div",{className:"flex flex-col col-span-12 md:col-span-7 lg:col-span-7 pl-2 pr-5 py-2 gap-6"},(0,a.createElement)("div",{className:"flex flex-col gap-1"},(0,a.createElement)(_h,{tag:"h3",size:"md",title:(0,z.__)("Welcome to CartFlows!","cartflows"),className:"tracking-[-0.1px] leading-[30px] text-text-primary"}),(0,a.createElement)(Ch,{size:16,color:"secondary"},(0,z.__)("A sales funnel is the sequence of steps a buyer takes to make a purchase. CartFlows helps optimize funnels to turn visitors into customers.","cartflows"))),(0,a.createElement)("div",{className:"w-fit"},(0,a.createElement)(Wo,{tag:C,to:{pathname:"admin.php",search:"?page=cartflows&path=library"},variant:"primary",size:"md",icon:(0,a.createElement)(Fh,null),iconPosition:"left",onClick:t=>{"bricks-builder"===e&&(t.preventDefault(),o("show"))},className:"no-underline"},(0,z.__)("Create New Funnel","cartflows")))),(0,a.createElement)("div",{className:"col-span-12 md:col-span-5 lg:col-span-5 p-2 h-full box-border"},(0,a.createElement)("div",{className:"relative w-full h-full rounded overflow-hidden cursor-pointer",style:{backgroundImage:"url(https://img.youtube.com/vi/tCm60PWOd0M/maxresdefault.jpg)",backgroundSize:"cover",backgroundPosition:"center"},onClick:e=>{e.preventDefault(),n(!t)}},(0,a.createElement)("div",{className:"absolute inset-0 rounded"}),(0,a.createElement)("div",{className:"absolute inset-0 flex items-center justify-center"},(0,a.createElement)("div",{className:"w-14 h-14 flex items-center justify-center bg-black bg-opacity-50 group-hover:bg-opacity-80 transition-all duration-300 rounded-full"},(0,a.createElement)("svg",{className:"w-8 h-8 text-white",viewBox:"0 0 24 24",fill:"currentColor"},(0,a.createElement)("path",{d:"M8 5v14l11-7L8 5z"})))))),t&&(0,a.createElement)(Pm,{showModel:t,setOpenVideoModel:n})),(0,a.createElement)("div",{className:"w-full lg:w-[33%]"},(0,a.createElement)(Uh,{page_builder:e}))),(0,a.createElement)(th,{visibility:r,setVisibility:o,type:"blank",flowName:i,setFlowName:s}))},Zh=Fo("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);var Qh=o(442);const Vh=Qh.default||Qh;var Wh=function(){return Wh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Wh.apply(this,arguments)};function Gh(e,t){for(var n={},r={},o=e.split("~~"),a=!1,i=0;o.length>i;i++){for(var s=o[i].split("~"),l=0;l<s.length;l+=2){var c=s[l],u=s[l+1],d="&"+c+";";n[d]=u,a&&(n["&"+c]=u),r[u]=d}a=!0}return t?{entities:Wh(Wh({},n),t.entities),characters:Wh(Wh({},r),t.characters)}:{entities:n,characters:r}}var Hh={xml:/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html4:/∉|&(?:nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|AElig|Ccedil|Egrave|Eacute|Ecirc|Euml|Igrave|Iacute|Icirc|Iuml|ETH|Ntilde|Ograve|Oacute|Ocirc|Otilde|Ouml|times|Oslash|Ugrave|Uacute|Ucirc|Uuml|Yacute|THORN|szlig|agrave|aacute|acirc|atilde|auml|aring|aelig|ccedil|egrave|eacute|ecirc|euml|igrave|iacute|icirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|quot|amp|lt|gt|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g,html5:/·|℗|⋇|⪧|⩺|⋗|⦕|⩼|⪆|⥸|⋗|⋛|⪌|≷|≳|⪦|⩹|⋖|⋋|⋉|⥶|⩻|⦖|◃|⊴|◂|∉|⋹̸|⋵̸|∉|⋷|⋶|∌|∌|⋾|⋽|∥|⊠|⨱|⨰|&(?:AElig|AMP|Aacute|Acirc|Agrave|Aring|Atilde|Auml|COPY|Ccedil|ETH|Eacute|Ecirc|Egrave|Euml|GT|Iacute|Icirc|Igrave|Iuml|LT|Ntilde|Oacute|Ocirc|Ograve|Oslash|Otilde|Ouml|QUOT|REG|THORN|Uacute|Ucirc|Ugrave|Uuml|Yacute|aacute|acirc|acute|aelig|agrave|amp|aring|atilde|auml|brvbar|ccedil|cedil|cent|copy|curren|deg|divide|eacute|ecirc|egrave|eth|euml|frac12|frac14|frac34|gt|iacute|icirc|iexcl|igrave|iquest|iuml|laquo|lt|macr|micro|middot|nbsp|not|ntilde|oacute|ocirc|ograve|ordf|ordm|oslash|otilde|ouml|para|plusmn|pound|quot|raquo|reg|sect|shy|sup1|sup2|sup3|szlig|thorn|times|uacute|ucirc|ugrave|uml|uuml|yacute|yen|yuml|#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);?/g},$h={};$h.xml=Gh("lt~<~gt~>~quot~\"~apos~'~amp~&"),$h.html4=Gh("apos~'~OElig~Œ~oelig~œ~Scaron~Š~scaron~š~Yuml~Ÿ~circ~ˆ~tilde~˜~ensp~ ~emsp~ ~thinsp~ ~zwnj~~zwj~~lrm~~rlm~~ndash~–~mdash~—~lsquo~‘~rsquo~’~sbquo~‚~ldquo~“~rdquo~”~bdquo~„~dagger~†~Dagger~‡~permil~‰~lsaquo~‹~rsaquo~›~euro~€~fnof~ƒ~Alpha~Α~Beta~Β~Gamma~Γ~Delta~Δ~Epsilon~Ε~Zeta~Ζ~Eta~Η~Theta~Θ~Iota~Ι~Kappa~Κ~Lambda~Λ~Mu~Μ~Nu~Ν~Xi~Ξ~Omicron~Ο~Pi~Π~Rho~Ρ~Sigma~Σ~Tau~Τ~Upsilon~Υ~Phi~Φ~Chi~Χ~Psi~Ψ~Omega~Ω~alpha~α~beta~β~gamma~γ~delta~δ~epsilon~ε~zeta~ζ~eta~η~theta~θ~iota~ι~kappa~κ~lambda~λ~mu~μ~nu~ν~xi~ξ~omicron~ο~pi~π~rho~ρ~sigmaf~ς~sigma~σ~tau~τ~upsilon~υ~phi~φ~chi~χ~psi~ψ~omega~ω~thetasym~ϑ~upsih~ϒ~piv~ϖ~bull~•~hellip~…~prime~′~Prime~″~oline~‾~frasl~⁄~weierp~℘~image~ℑ~real~ℜ~trade~™~alefsym~ℵ~larr~←~uarr~↑~rarr~→~darr~↓~harr~↔~crarr~↵~lArr~⇐~uArr~⇑~rArr~⇒~dArr~⇓~hArr~⇔~forall~∀~part~∂~exist~∃~empty~∅~nabla~∇~isin~∈~notin~∉~ni~∋~prod~∏~sum~∑~minus~−~lowast~∗~radic~√~prop~∝~infin~∞~ang~∠~and~∧~or~∨~cap~∩~cup~∪~int~∫~there4~∴~sim~∼~cong~≅~asymp~≈~ne~≠~equiv~≡~le~≤~ge~≥~sub~⊂~sup~⊃~nsub~⊄~sube~⊆~supe~⊇~oplus~⊕~otimes~⊗~perp~⊥~sdot~⋅~lceil~⌈~rceil~⌉~lfloor~⌊~rfloor~⌋~lang~〈~rang~〉~loz~◊~spades~♠~clubs~♣~hearts~♥~diams~♦~~nbsp~ ~iexcl~¡~cent~¢~pound~£~curren~¤~yen~¥~brvbar~¦~sect~§~uml~¨~copy~©~ordf~ª~laquo~«~not~¬~shy~~reg~®~macr~¯~deg~°~plusmn~±~sup2~²~sup3~³~acute~´~micro~µ~para~¶~middot~·~cedil~¸~sup1~¹~ordm~º~raquo~»~frac14~¼~frac12~½~frac34~¾~iquest~¿~Agrave~À~Aacute~Á~Acirc~Â~Atilde~Ã~Auml~Ä~Aring~Å~AElig~Æ~Ccedil~Ç~Egrave~È~Eacute~É~Ecirc~Ê~Euml~Ë~Igrave~Ì~Iacute~Í~Icirc~Î~Iuml~Ï~ETH~Ð~Ntilde~Ñ~Ograve~Ò~Oacute~Ó~Ocirc~Ô~Otilde~Õ~Ouml~Ö~times~×~Oslash~Ø~Ugrave~Ù~Uacute~Ú~Ucirc~Û~Uuml~Ü~Yacute~Ý~THORN~Þ~szlig~ß~agrave~à~aacute~á~acirc~â~atilde~ã~auml~ä~aring~å~aelig~æ~ccedil~ç~egrave~è~eacute~é~ecirc~ê~euml~ë~igrave~ì~iacute~í~icirc~î~iuml~ï~eth~ð~ntilde~ñ~ograve~ò~oacute~ó~ocirc~ô~otilde~õ~ouml~ö~divide~÷~oslash~ø~ugrave~ù~uacute~ú~ucirc~û~uuml~ü~yacute~ý~thorn~þ~yuml~ÿ~quot~\"~amp~&~lt~<~gt~>"),$h.html5=Gh('Abreve~Ă~Acy~А~Afr~𝔄~Amacr~Ā~And~⩓~Aogon~Ą~Aopf~𝔸~ApplyFunction~~Ascr~𝒜~Assign~≔~Backslash~∖~Barv~⫧~Barwed~⌆~Bcy~Б~Because~∵~Bernoullis~ℬ~Bfr~𝔅~Bopf~𝔹~Breve~˘~Bscr~ℬ~Bumpeq~≎~CHcy~Ч~Cacute~Ć~Cap~⋒~CapitalDifferentialD~ⅅ~Cayleys~ℭ~Ccaron~Č~Ccirc~Ĉ~Cconint~∰~Cdot~Ċ~Cedilla~¸~CenterDot~·~Cfr~ℭ~CircleDot~⊙~CircleMinus~⊖~CirclePlus~⊕~CircleTimes~⊗~ClockwiseContourIntegral~∲~CloseCurlyDoubleQuote~”~CloseCurlyQuote~’~Colon~∷~Colone~⩴~Congruent~≡~Conint~∯~ContourIntegral~∮~Copf~ℂ~Coproduct~∐~CounterClockwiseContourIntegral~∳~Cross~⨯~Cscr~𝒞~Cup~⋓~CupCap~≍~DD~ⅅ~DDotrahd~⤑~DJcy~Ђ~DScy~Ѕ~DZcy~Џ~Darr~↡~Dashv~⫤~Dcaron~Ď~Dcy~Д~Del~∇~Dfr~𝔇~DiacriticalAcute~´~DiacriticalDot~˙~DiacriticalDoubleAcute~˝~DiacriticalGrave~`~DiacriticalTilde~˜~Diamond~⋄~DifferentialD~ⅆ~Dopf~𝔻~Dot~¨~DotDot~⃜~DotEqual~≐~DoubleContourIntegral~∯~DoubleDot~¨~DoubleDownArrow~⇓~DoubleLeftArrow~⇐~DoubleLeftRightArrow~⇔~DoubleLeftTee~⫤~DoubleLongLeftArrow~⟸~DoubleLongLeftRightArrow~⟺~DoubleLongRightArrow~⟹~DoubleRightArrow~⇒~DoubleRightTee~⊨~DoubleUpArrow~⇑~DoubleUpDownArrow~⇕~DoubleVerticalBar~∥~DownArrow~↓~DownArrowBar~⤓~DownArrowUpArrow~⇵~DownBreve~̑~DownLeftRightVector~⥐~DownLeftTeeVector~⥞~DownLeftVector~↽~DownLeftVectorBar~⥖~DownRightTeeVector~⥟~DownRightVector~⇁~DownRightVectorBar~⥗~DownTee~⊤~DownTeeArrow~↧~Downarrow~⇓~Dscr~𝒟~Dstrok~Đ~ENG~Ŋ~Ecaron~Ě~Ecy~Э~Edot~Ė~Efr~𝔈~Element~∈~Emacr~Ē~EmptySmallSquare~◻~EmptyVerySmallSquare~▫~Eogon~Ę~Eopf~𝔼~Equal~⩵~EqualTilde~≂~Equilibrium~⇌~Escr~ℰ~Esim~⩳~Exists~∃~ExponentialE~ⅇ~Fcy~Ф~Ffr~𝔉~FilledSmallSquare~◼~FilledVerySmallSquare~▪~Fopf~𝔽~ForAll~∀~Fouriertrf~ℱ~Fscr~ℱ~GJcy~Ѓ~Gammad~Ϝ~Gbreve~Ğ~Gcedil~Ģ~Gcirc~Ĝ~Gcy~Г~Gdot~Ġ~Gfr~𝔊~Gg~⋙~Gopf~𝔾~GreaterEqual~≥~GreaterEqualLess~⋛~GreaterFullEqual~≧~GreaterGreater~⪢~GreaterLess~≷~GreaterSlantEqual~⩾~GreaterTilde~≳~Gscr~𝒢~Gt~≫~HARDcy~Ъ~Hacek~ˇ~Hat~^~Hcirc~Ĥ~Hfr~ℌ~HilbertSpace~ℋ~Hopf~ℍ~HorizontalLine~─~Hscr~ℋ~Hstrok~Ħ~HumpDownHump~≎~HumpEqual~≏~IEcy~Е~IJlig~IJ~IOcy~Ё~Icy~И~Idot~İ~Ifr~ℑ~Im~ℑ~Imacr~Ī~ImaginaryI~ⅈ~Implies~⇒~Int~∬~Integral~∫~Intersection~⋂~InvisibleComma~~InvisibleTimes~~Iogon~Į~Iopf~𝕀~Iscr~ℐ~Itilde~Ĩ~Iukcy~І~Jcirc~Ĵ~Jcy~Й~Jfr~𝔍~Jopf~𝕁~Jscr~𝒥~Jsercy~Ј~Jukcy~Є~KHcy~Х~KJcy~Ќ~Kcedil~Ķ~Kcy~К~Kfr~𝔎~Kopf~𝕂~Kscr~𝒦~LJcy~Љ~Lacute~Ĺ~Lang~⟪~Laplacetrf~ℒ~Larr~↞~Lcaron~Ľ~Lcedil~Ļ~Lcy~Л~LeftAngleBracket~⟨~LeftArrow~←~LeftArrowBar~⇤~LeftArrowRightArrow~⇆~LeftCeiling~⌈~LeftDoubleBracket~⟦~LeftDownTeeVector~⥡~LeftDownVector~⇃~LeftDownVectorBar~⥙~LeftFloor~⌊~LeftRightArrow~↔~LeftRightVector~⥎~LeftTee~⊣~LeftTeeArrow~↤~LeftTeeVector~⥚~LeftTriangle~⊲~LeftTriangleBar~⧏~LeftTriangleEqual~⊴~LeftUpDownVector~⥑~LeftUpTeeVector~⥠~LeftUpVector~↿~LeftUpVectorBar~⥘~LeftVector~↼~LeftVectorBar~⥒~Leftarrow~⇐~Leftrightarrow~⇔~LessEqualGreater~⋚~LessFullEqual~≦~LessGreater~≶~LessLess~⪡~LessSlantEqual~⩽~LessTilde~≲~Lfr~𝔏~Ll~⋘~Lleftarrow~⇚~Lmidot~Ŀ~LongLeftArrow~⟵~LongLeftRightArrow~⟷~LongRightArrow~⟶~Longleftarrow~⟸~Longleftrightarrow~⟺~Longrightarrow~⟹~Lopf~𝕃~LowerLeftArrow~↙~LowerRightArrow~↘~Lscr~ℒ~Lsh~↰~Lstrok~Ł~Lt~≪~Map~⤅~Mcy~М~MediumSpace~ ~Mellintrf~ℳ~Mfr~𝔐~MinusPlus~∓~Mopf~𝕄~Mscr~ℳ~NJcy~Њ~Nacute~Ń~Ncaron~Ň~Ncedil~Ņ~Ncy~Н~NegativeMediumSpace~~NegativeThickSpace~~NegativeThinSpace~~NegativeVeryThinSpace~~NestedGreaterGreater~≫~NestedLessLess~≪~NewLine~\n~Nfr~𝔑~NoBreak~~NonBreakingSpace~ ~Nopf~ℕ~Not~⫬~NotCongruent~≢~NotCupCap~≭~NotDoubleVerticalBar~∦~NotElement~∉~NotEqual~≠~NotEqualTilde~≂̸~NotExists~∄~NotGreater~≯~NotGreaterEqual~≱~NotGreaterFullEqual~≧̸~NotGreaterGreater~≫̸~NotGreaterLess~≹~NotGreaterSlantEqual~⩾̸~NotGreaterTilde~≵~NotHumpDownHump~≎̸~NotHumpEqual~≏̸~NotLeftTriangle~⋪~NotLeftTriangleBar~⧏̸~NotLeftTriangleEqual~⋬~NotLess~≮~NotLessEqual~≰~NotLessGreater~≸~NotLessLess~≪̸~NotLessSlantEqual~⩽̸~NotLessTilde~≴~NotNestedGreaterGreater~⪢̸~NotNestedLessLess~⪡̸~NotPrecedes~⊀~NotPrecedesEqual~⪯̸~NotPrecedesSlantEqual~⋠~NotReverseElement~∌~NotRightTriangle~⋫~NotRightTriangleBar~⧐̸~NotRightTriangleEqual~⋭~NotSquareSubset~⊏̸~NotSquareSubsetEqual~⋢~NotSquareSuperset~⊐̸~NotSquareSupersetEqual~⋣~NotSubset~⊂⃒~NotSubsetEqual~⊈~NotSucceeds~⊁~NotSucceedsEqual~⪰̸~NotSucceedsSlantEqual~⋡~NotSucceedsTilde~≿̸~NotSuperset~⊃⃒~NotSupersetEqual~⊉~NotTilde~≁~NotTildeEqual~≄~NotTildeFullEqual~≇~NotTildeTilde~≉~NotVerticalBar~∤~Nscr~𝒩~Ocy~О~Odblac~Ő~Ofr~𝔒~Omacr~Ō~Oopf~𝕆~OpenCurlyDoubleQuote~“~OpenCurlyQuote~‘~Or~⩔~Oscr~𝒪~Otimes~⨷~OverBar~‾~OverBrace~⏞~OverBracket~⎴~OverParenthesis~⏜~PartialD~∂~Pcy~П~Pfr~𝔓~PlusMinus~±~Poincareplane~ℌ~Popf~ℙ~Pr~⪻~Precedes~≺~PrecedesEqual~⪯~PrecedesSlantEqual~≼~PrecedesTilde~≾~Product~∏~Proportion~∷~Proportional~∝~Pscr~𝒫~Qfr~𝔔~Qopf~ℚ~Qscr~𝒬~RBarr~⤐~Racute~Ŕ~Rang~⟫~Rarr~↠~Rarrtl~⤖~Rcaron~Ř~Rcedil~Ŗ~Rcy~Р~Re~ℜ~ReverseElement~∋~ReverseEquilibrium~⇋~ReverseUpEquilibrium~⥯~Rfr~ℜ~RightAngleBracket~⟩~RightArrow~→~RightArrowBar~⇥~RightArrowLeftArrow~⇄~RightCeiling~⌉~RightDoubleBracket~⟧~RightDownTeeVector~⥝~RightDownVector~⇂~RightDownVectorBar~⥕~RightFloor~⌋~RightTee~⊢~RightTeeArrow~↦~RightTeeVector~⥛~RightTriangle~⊳~RightTriangleBar~⧐~RightTriangleEqual~⊵~RightUpDownVector~⥏~RightUpTeeVector~⥜~RightUpVector~↾~RightUpVectorBar~⥔~RightVector~⇀~RightVectorBar~⥓~Rightarrow~⇒~Ropf~ℝ~RoundImplies~⥰~Rrightarrow~⇛~Rscr~ℛ~Rsh~↱~RuleDelayed~⧴~SHCHcy~Щ~SHcy~Ш~SOFTcy~Ь~Sacute~Ś~Sc~⪼~Scedil~Ş~Scirc~Ŝ~Scy~С~Sfr~𝔖~ShortDownArrow~↓~ShortLeftArrow~←~ShortRightArrow~→~ShortUpArrow~↑~SmallCircle~∘~Sopf~𝕊~Sqrt~√~Square~□~SquareIntersection~⊓~SquareSubset~⊏~SquareSubsetEqual~⊑~SquareSuperset~⊐~SquareSupersetEqual~⊒~SquareUnion~⊔~Sscr~𝒮~Star~⋆~Sub~⋐~Subset~⋐~SubsetEqual~⊆~Succeeds~≻~SucceedsEqual~⪰~SucceedsSlantEqual~≽~SucceedsTilde~≿~SuchThat~∋~Sum~∑~Sup~⋑~Superset~⊃~SupersetEqual~⊇~Supset~⋑~TRADE~™~TSHcy~Ћ~TScy~Ц~Tab~\t~Tcaron~Ť~Tcedil~Ţ~Tcy~Т~Tfr~𝔗~Therefore~∴~ThickSpace~ ~ThinSpace~ ~Tilde~∼~TildeEqual~≃~TildeFullEqual~≅~TildeTilde~≈~Topf~𝕋~TripleDot~⃛~Tscr~𝒯~Tstrok~Ŧ~Uarr~↟~Uarrocir~⥉~Ubrcy~Ў~Ubreve~Ŭ~Ucy~У~Udblac~Ű~Ufr~𝔘~Umacr~Ū~UnderBar~_~UnderBrace~⏟~UnderBracket~⎵~UnderParenthesis~⏝~Union~⋃~UnionPlus~⊎~Uogon~Ų~Uopf~𝕌~UpArrow~↑~UpArrowBar~⤒~UpArrowDownArrow~⇅~UpDownArrow~↕~UpEquilibrium~⥮~UpTee~⊥~UpTeeArrow~↥~Uparrow~⇑~Updownarrow~⇕~UpperLeftArrow~↖~UpperRightArrow~↗~Upsi~ϒ~Uring~Ů~Uscr~𝒰~Utilde~Ũ~VDash~⊫~Vbar~⫫~Vcy~В~Vdash~⊩~Vdashl~⫦~Vee~⋁~Verbar~‖~Vert~‖~VerticalBar~∣~VerticalLine~|~VerticalSeparator~❘~VerticalTilde~≀~VeryThinSpace~ ~Vfr~𝔙~Vopf~𝕍~Vscr~𝒱~Vvdash~⊪~Wcirc~Ŵ~Wedge~⋀~Wfr~𝔚~Wopf~𝕎~Wscr~𝒲~Xfr~𝔛~Xopf~𝕏~Xscr~𝒳~YAcy~Я~YIcy~Ї~YUcy~Ю~Ycirc~Ŷ~Ycy~Ы~Yfr~𝔜~Yopf~𝕐~Yscr~𝒴~ZHcy~Ж~Zacute~Ź~Zcaron~Ž~Zcy~З~Zdot~Ż~ZeroWidthSpace~~Zfr~ℨ~Zopf~ℤ~Zscr~𝒵~abreve~ă~ac~∾~acE~∾̳~acd~∿~acy~а~af~~afr~𝔞~aleph~ℵ~amacr~ā~amalg~⨿~andand~⩕~andd~⩜~andslope~⩘~andv~⩚~ange~⦤~angle~∠~angmsd~∡~angmsdaa~⦨~angmsdab~⦩~angmsdac~⦪~angmsdad~⦫~angmsdae~⦬~angmsdaf~⦭~angmsdag~⦮~angmsdah~⦯~angrt~∟~angrtvb~⊾~angrtvbd~⦝~angsph~∢~angst~Å~angzarr~⍼~aogon~ą~aopf~𝕒~ap~≈~apE~⩰~apacir~⩯~ape~≊~apid~≋~approx~≈~approxeq~≊~ascr~𝒶~ast~*~asympeq~≍~awconint~∳~awint~⨑~bNot~⫭~backcong~≌~backepsilon~϶~backprime~‵~backsim~∽~backsimeq~⋍~barvee~⊽~barwed~⌅~barwedge~⌅~bbrk~⎵~bbrktbrk~⎶~bcong~≌~bcy~б~becaus~∵~because~∵~bemptyv~⦰~bepsi~϶~bernou~ℬ~beth~ℶ~between~≬~bfr~𝔟~bigcap~⋂~bigcirc~◯~bigcup~⋃~bigodot~⨀~bigoplus~⨁~bigotimes~⨂~bigsqcup~⨆~bigstar~★~bigtriangledown~▽~bigtriangleup~△~biguplus~⨄~bigvee~⋁~bigwedge~⋀~bkarow~⤍~blacklozenge~⧫~blacksquare~▪~blacktriangle~▴~blacktriangledown~▾~blacktriangleleft~◂~blacktriangleright~▸~blank~␣~blk12~▒~blk14~░~blk34~▓~block~█~bne~=⃥~bnequiv~≡⃥~bnot~⌐~bopf~𝕓~bot~⊥~bottom~⊥~bowtie~⋈~boxDL~╗~boxDR~╔~boxDl~╖~boxDr~╓~boxH~═~boxHD~╦~boxHU~╩~boxHd~╤~boxHu~╧~boxUL~╝~boxUR~╚~boxUl~╜~boxUr~╙~boxV~║~boxVH~╬~boxVL~╣~boxVR~╠~boxVh~╫~boxVl~╢~boxVr~╟~boxbox~⧉~boxdL~╕~boxdR~╒~boxdl~┐~boxdr~┌~boxh~─~boxhD~╥~boxhU~╨~boxhd~┬~boxhu~┴~boxminus~⊟~boxplus~⊞~boxtimes~⊠~boxuL~╛~boxuR~╘~boxul~┘~boxur~└~boxv~│~boxvH~╪~boxvL~╡~boxvR~╞~boxvh~┼~boxvl~┤~boxvr~├~bprime~‵~breve~˘~bscr~𝒷~bsemi~⁏~bsim~∽~bsime~⋍~bsol~\\~bsolb~⧅~bsolhsub~⟈~bullet~•~bump~≎~bumpE~⪮~bumpe~≏~bumpeq~≏~cacute~ć~capand~⩄~capbrcup~⩉~capcap~⩋~capcup~⩇~capdot~⩀~caps~∩︀~caret~⁁~caron~ˇ~ccaps~⩍~ccaron~č~ccirc~ĉ~ccups~⩌~ccupssm~⩐~cdot~ċ~cemptyv~⦲~centerdot~·~cfr~𝔠~chcy~ч~check~✓~checkmark~✓~cir~○~cirE~⧃~circeq~≗~circlearrowleft~↺~circlearrowright~↻~circledR~®~circledS~Ⓢ~circledast~⊛~circledcirc~⊚~circleddash~⊝~cire~≗~cirfnint~⨐~cirmid~⫯~cirscir~⧂~clubsuit~♣~colon~:~colone~≔~coloneq~≔~comma~,~commat~@~comp~∁~compfn~∘~complement~∁~complexes~ℂ~congdot~⩭~conint~∮~copf~𝕔~coprod~∐~copysr~℗~cross~✗~cscr~𝒸~csub~⫏~csube~⫑~csup~⫐~csupe~⫒~ctdot~⋯~cudarrl~⤸~cudarrr~⤵~cuepr~⋞~cuesc~⋟~cularr~↶~cularrp~⤽~cupbrcap~⩈~cupcap~⩆~cupcup~⩊~cupdot~⊍~cupor~⩅~cups~∪︀~curarr~↷~curarrm~⤼~curlyeqprec~⋞~curlyeqsucc~⋟~curlyvee~⋎~curlywedge~⋏~curvearrowleft~↶~curvearrowright~↷~cuvee~⋎~cuwed~⋏~cwconint~∲~cwint~∱~cylcty~⌭~dHar~⥥~daleth~ℸ~dash~‐~dashv~⊣~dbkarow~⤏~dblac~˝~dcaron~ď~dcy~д~dd~ⅆ~ddagger~‡~ddarr~⇊~ddotseq~⩷~demptyv~⦱~dfisht~⥿~dfr~𝔡~dharl~⇃~dharr~⇂~diam~⋄~diamond~⋄~diamondsuit~♦~die~¨~digamma~ϝ~disin~⋲~div~÷~divideontimes~⋇~divonx~⋇~djcy~ђ~dlcorn~⌞~dlcrop~⌍~dollar~$~dopf~𝕕~dot~˙~doteq~≐~doteqdot~≑~dotminus~∸~dotplus~∔~dotsquare~⊡~doublebarwedge~⌆~downarrow~↓~downdownarrows~⇊~downharpoonleft~⇃~downharpoonright~⇂~drbkarow~⤐~drcorn~⌟~drcrop~⌌~dscr~𝒹~dscy~ѕ~dsol~⧶~dstrok~đ~dtdot~⋱~dtri~▿~dtrif~▾~duarr~⇵~duhar~⥯~dwangle~⦦~dzcy~џ~dzigrarr~⟿~eDDot~⩷~eDot~≑~easter~⩮~ecaron~ě~ecir~≖~ecolon~≕~ecy~э~edot~ė~ee~ⅇ~efDot~≒~efr~𝔢~eg~⪚~egs~⪖~egsdot~⪘~el~⪙~elinters~⏧~ell~ℓ~els~⪕~elsdot~⪗~emacr~ē~emptyset~∅~emptyv~∅~emsp13~ ~emsp14~ ~eng~ŋ~eogon~ę~eopf~𝕖~epar~⋕~eparsl~⧣~eplus~⩱~epsi~ε~epsiv~ϵ~eqcirc~≖~eqcolon~≕~eqsim~≂~eqslantgtr~⪖~eqslantless~⪕~equals~=~equest~≟~equivDD~⩸~eqvparsl~⧥~erDot~≓~erarr~⥱~escr~ℯ~esdot~≐~esim~≂~excl~!~expectation~ℰ~exponentiale~ⅇ~fallingdotseq~≒~fcy~ф~female~♀~ffilig~ffi~fflig~ff~ffllig~ffl~ffr~𝔣~filig~fi~fjlig~fj~flat~♭~fllig~fl~fltns~▱~fopf~𝕗~fork~⋔~forkv~⫙~fpartint~⨍~frac13~⅓~frac15~⅕~frac16~⅙~frac18~⅛~frac23~⅔~frac25~⅖~frac35~⅗~frac38~⅜~frac45~⅘~frac56~⅚~frac58~⅝~frac78~⅞~frown~⌢~fscr~𝒻~gE~≧~gEl~⪌~gacute~ǵ~gammad~ϝ~gap~⪆~gbreve~ğ~gcirc~ĝ~gcy~г~gdot~ġ~gel~⋛~geq~≥~geqq~≧~geqslant~⩾~ges~⩾~gescc~⪩~gesdot~⪀~gesdoto~⪂~gesdotol~⪄~gesl~⋛︀~gesles~⪔~gfr~𝔤~gg~≫~ggg~⋙~gimel~ℷ~gjcy~ѓ~gl~≷~glE~⪒~gla~⪥~glj~⪤~gnE~≩~gnap~⪊~gnapprox~⪊~gne~⪈~gneq~⪈~gneqq~≩~gnsim~⋧~gopf~𝕘~grave~`~gscr~ℊ~gsim~≳~gsime~⪎~gsiml~⪐~gtcc~⪧~gtcir~⩺~gtdot~⋗~gtlPar~⦕~gtquest~⩼~gtrapprox~⪆~gtrarr~⥸~gtrdot~⋗~gtreqless~⋛~gtreqqless~⪌~gtrless~≷~gtrsim~≳~gvertneqq~≩︀~gvnE~≩︀~hairsp~ ~half~½~hamilt~ℋ~hardcy~ъ~harrcir~⥈~harrw~↭~hbar~ℏ~hcirc~ĥ~heartsuit~♥~hercon~⊹~hfr~𝔥~hksearow~⤥~hkswarow~⤦~hoarr~⇿~homtht~∻~hookleftarrow~↩~hookrightarrow~↪~hopf~𝕙~horbar~―~hscr~𝒽~hslash~ℏ~hstrok~ħ~hybull~⁃~hyphen~‐~ic~~icy~и~iecy~е~iff~⇔~ifr~𝔦~ii~ⅈ~iiiint~⨌~iiint~∭~iinfin~⧜~iiota~℩~ijlig~ij~imacr~ī~imagline~ℐ~imagpart~ℑ~imath~ı~imof~⊷~imped~Ƶ~in~∈~incare~℅~infintie~⧝~inodot~ı~intcal~⊺~integers~ℤ~intercal~⊺~intlarhk~⨗~intprod~⨼~iocy~ё~iogon~į~iopf~𝕚~iprod~⨼~iscr~𝒾~isinE~⋹~isindot~⋵~isins~⋴~isinsv~⋳~isinv~∈~it~~itilde~ĩ~iukcy~і~jcirc~ĵ~jcy~й~jfr~𝔧~jmath~ȷ~jopf~𝕛~jscr~𝒿~jsercy~ј~jukcy~є~kappav~ϰ~kcedil~ķ~kcy~к~kfr~𝔨~kgreen~ĸ~khcy~х~kjcy~ќ~kopf~𝕜~kscr~𝓀~lAarr~⇚~lAtail~⤛~lBarr~⤎~lE~≦~lEg~⪋~lHar~⥢~lacute~ĺ~laemptyv~⦴~lagran~ℒ~langd~⦑~langle~⟨~lap~⪅~larrb~⇤~larrbfs~⤟~larrfs~⤝~larrhk~↩~larrlp~↫~larrpl~⤹~larrsim~⥳~larrtl~↢~lat~⪫~latail~⤙~late~⪭~lates~⪭︀~lbarr~⤌~lbbrk~❲~lbrace~{~lbrack~[~lbrke~⦋~lbrksld~⦏~lbrkslu~⦍~lcaron~ľ~lcedil~ļ~lcub~{~lcy~л~ldca~⤶~ldquor~„~ldrdhar~⥧~ldrushar~⥋~ldsh~↲~leftarrow~←~leftarrowtail~↢~leftharpoondown~↽~leftharpoonup~↼~leftleftarrows~⇇~leftrightarrow~↔~leftrightarrows~⇆~leftrightharpoons~⇋~leftrightsquigarrow~↭~leftthreetimes~⋋~leg~⋚~leq~≤~leqq~≦~leqslant~⩽~les~⩽~lescc~⪨~lesdot~⩿~lesdoto~⪁~lesdotor~⪃~lesg~⋚︀~lesges~⪓~lessapprox~⪅~lessdot~⋖~lesseqgtr~⋚~lesseqqgtr~⪋~lessgtr~≶~lesssim~≲~lfisht~⥼~lfr~𝔩~lg~≶~lgE~⪑~lhard~↽~lharu~↼~lharul~⥪~lhblk~▄~ljcy~љ~ll~≪~llarr~⇇~llcorner~⌞~llhard~⥫~lltri~◺~lmidot~ŀ~lmoust~⎰~lmoustache~⎰~lnE~≨~lnap~⪉~lnapprox~⪉~lne~⪇~lneq~⪇~lneqq~≨~lnsim~⋦~loang~⟬~loarr~⇽~lobrk~⟦~longleftarrow~⟵~longleftrightarrow~⟷~longmapsto~⟼~longrightarrow~⟶~looparrowleft~↫~looparrowright~↬~lopar~⦅~lopf~𝕝~loplus~⨭~lotimes~⨴~lowbar~_~lozenge~◊~lozf~⧫~lpar~(~lparlt~⦓~lrarr~⇆~lrcorner~⌟~lrhar~⇋~lrhard~⥭~lrtri~⊿~lscr~𝓁~lsh~↰~lsim~≲~lsime~⪍~lsimg~⪏~lsqb~[~lsquor~‚~lstrok~ł~ltcc~⪦~ltcir~⩹~ltdot~⋖~lthree~⋋~ltimes~⋉~ltlarr~⥶~ltquest~⩻~ltrPar~⦖~ltri~◃~ltrie~⊴~ltrif~◂~lurdshar~⥊~luruhar~⥦~lvertneqq~≨︀~lvnE~≨︀~mDDot~∺~male~♂~malt~✠~maltese~✠~map~↦~mapsto~↦~mapstodown~↧~mapstoleft~↤~mapstoup~↥~marker~▮~mcomma~⨩~mcy~м~measuredangle~∡~mfr~𝔪~mho~℧~mid~∣~midast~*~midcir~⫰~minusb~⊟~minusd~∸~minusdu~⨪~mlcp~⫛~mldr~…~mnplus~∓~models~⊧~mopf~𝕞~mp~∓~mscr~𝓂~mstpos~∾~multimap~⊸~mumap~⊸~nGg~⋙̸~nGt~≫⃒~nGtv~≫̸~nLeftarrow~⇍~nLeftrightarrow~⇎~nLl~⋘̸~nLt~≪⃒~nLtv~≪̸~nRightarrow~⇏~nVDash~⊯~nVdash~⊮~nacute~ń~nang~∠⃒~nap~≉~napE~⩰̸~napid~≋̸~napos~ʼn~napprox~≉~natur~♮~natural~♮~naturals~ℕ~nbump~≎̸~nbumpe~≏̸~ncap~⩃~ncaron~ň~ncedil~ņ~ncong~≇~ncongdot~⩭̸~ncup~⩂~ncy~н~neArr~⇗~nearhk~⤤~nearr~↗~nearrow~↗~nedot~≐̸~nequiv~≢~nesear~⤨~nesim~≂̸~nexist~∄~nexists~∄~nfr~𝔫~ngE~≧̸~nge~≱~ngeq~≱~ngeqq~≧̸~ngeqslant~⩾̸~nges~⩾̸~ngsim~≵~ngt~≯~ngtr~≯~nhArr~⇎~nharr~↮~nhpar~⫲~nis~⋼~nisd~⋺~niv~∋~njcy~њ~nlArr~⇍~nlE~≦̸~nlarr~↚~nldr~‥~nle~≰~nleftarrow~↚~nleftrightarrow~↮~nleq~≰~nleqq~≦̸~nleqslant~⩽̸~nles~⩽̸~nless~≮~nlsim~≴~nlt~≮~nltri~⋪~nltrie~⋬~nmid~∤~nopf~𝕟~notinE~⋹̸~notindot~⋵̸~notinva~∉~notinvb~⋷~notinvc~⋶~notni~∌~notniva~∌~notnivb~⋾~notnivc~⋽~npar~∦~nparallel~∦~nparsl~⫽⃥~npart~∂̸~npolint~⨔~npr~⊀~nprcue~⋠~npre~⪯̸~nprec~⊀~npreceq~⪯̸~nrArr~⇏~nrarr~↛~nrarrc~⤳̸~nrarrw~↝̸~nrightarrow~↛~nrtri~⋫~nrtrie~⋭~nsc~⊁~nsccue~⋡~nsce~⪰̸~nscr~𝓃~nshortmid~∤~nshortparallel~∦~nsim~≁~nsime~≄~nsimeq~≄~nsmid~∤~nspar~∦~nsqsube~⋢~nsqsupe~⋣~nsubE~⫅̸~nsube~⊈~nsubset~⊂⃒~nsubseteq~⊈~nsubseteqq~⫅̸~nsucc~⊁~nsucceq~⪰̸~nsup~⊅~nsupE~⫆̸~nsupe~⊉~nsupset~⊃⃒~nsupseteq~⊉~nsupseteqq~⫆̸~ntgl~≹~ntlg~≸~ntriangleleft~⋪~ntrianglelefteq~⋬~ntriangleright~⋫~ntrianglerighteq~⋭~num~#~numero~№~numsp~ ~nvDash~⊭~nvHarr~⤄~nvap~≍⃒~nvdash~⊬~nvge~≥⃒~nvgt~>⃒~nvinfin~⧞~nvlArr~⤂~nvle~≤⃒~nvlt~<⃒~nvltrie~⊴⃒~nvrArr~⤃~nvrtrie~⊵⃒~nvsim~∼⃒~nwArr~⇖~nwarhk~⤣~nwarr~↖~nwarrow~↖~nwnear~⤧~oS~Ⓢ~oast~⊛~ocir~⊚~ocy~о~odash~⊝~odblac~ő~odiv~⨸~odot~⊙~odsold~⦼~ofcir~⦿~ofr~𝔬~ogon~˛~ogt~⧁~ohbar~⦵~ohm~Ω~oint~∮~olarr~↺~olcir~⦾~olcross~⦻~olt~⧀~omacr~ō~omid~⦶~ominus~⊖~oopf~𝕠~opar~⦷~operp~⦹~orarr~↻~ord~⩝~order~ℴ~orderof~ℴ~origof~⊶~oror~⩖~orslope~⩗~orv~⩛~oscr~ℴ~osol~⊘~otimesas~⨶~ovbar~⌽~par~∥~parallel~∥~parsim~⫳~parsl~⫽~pcy~п~percnt~%~period~.~pertenk~‱~pfr~𝔭~phiv~ϕ~phmmat~ℳ~phone~☎~pitchfork~⋔~planck~ℏ~planckh~ℎ~plankv~ℏ~plus~+~plusacir~⨣~plusb~⊞~pluscir~⨢~plusdo~∔~plusdu~⨥~pluse~⩲~plussim~⨦~plustwo~⨧~pm~±~pointint~⨕~popf~𝕡~pr~≺~prE~⪳~prap~⪷~prcue~≼~pre~⪯~prec~≺~precapprox~⪷~preccurlyeq~≼~preceq~⪯~precnapprox~⪹~precneqq~⪵~precnsim~⋨~precsim~≾~primes~ℙ~prnE~⪵~prnap~⪹~prnsim~⋨~profalar~⌮~profline~⌒~profsurf~⌓~propto~∝~prsim~≾~prurel~⊰~pscr~𝓅~puncsp~ ~qfr~𝔮~qint~⨌~qopf~𝕢~qprime~⁗~qscr~𝓆~quaternions~ℍ~quatint~⨖~quest~?~questeq~≟~rAarr~⇛~rAtail~⤜~rBarr~⤏~rHar~⥤~race~∽̱~racute~ŕ~raemptyv~⦳~rangd~⦒~range~⦥~rangle~⟩~rarrap~⥵~rarrb~⇥~rarrbfs~⤠~rarrc~⤳~rarrfs~⤞~rarrhk~↪~rarrlp~↬~rarrpl~⥅~rarrsim~⥴~rarrtl~↣~rarrw~↝~ratail~⤚~ratio~∶~rationals~ℚ~rbarr~⤍~rbbrk~❳~rbrace~}~rbrack~]~rbrke~⦌~rbrksld~⦎~rbrkslu~⦐~rcaron~ř~rcedil~ŗ~rcub~}~rcy~р~rdca~⤷~rdldhar~⥩~rdquor~”~rdsh~↳~realine~ℛ~realpart~ℜ~reals~ℝ~rect~▭~rfisht~⥽~rfr~𝔯~rhard~⇁~rharu~⇀~rharul~⥬~rhov~ϱ~rightarrow~→~rightarrowtail~↣~rightharpoondown~⇁~rightharpoonup~⇀~rightleftarrows~⇄~rightleftharpoons~⇌~rightrightarrows~⇉~rightsquigarrow~↝~rightthreetimes~⋌~ring~˚~risingdotseq~≓~rlarr~⇄~rlhar~⇌~rmoust~⎱~rmoustache~⎱~rnmid~⫮~roang~⟭~roarr~⇾~robrk~⟧~ropar~⦆~ropf~𝕣~roplus~⨮~rotimes~⨵~rpar~)~rpargt~⦔~rppolint~⨒~rrarr~⇉~rscr~𝓇~rsh~↱~rsqb~]~rsquor~’~rthree~⋌~rtimes~⋊~rtri~▹~rtrie~⊵~rtrif~▸~rtriltri~⧎~ruluhar~⥨~rx~℞~sacute~ś~sc~≻~scE~⪴~scap~⪸~sccue~≽~sce~⪰~scedil~ş~scirc~ŝ~scnE~⪶~scnap~⪺~scnsim~⋩~scpolint~⨓~scsim~≿~scy~с~sdotb~⊡~sdote~⩦~seArr~⇘~searhk~⤥~searr~↘~searrow~↘~semi~;~seswar~⤩~setminus~∖~setmn~∖~sext~✶~sfr~𝔰~sfrown~⌢~sharp~♯~shchcy~щ~shcy~ш~shortmid~∣~shortparallel~∥~sigmav~ς~simdot~⩪~sime~≃~simeq~≃~simg~⪞~simgE~⪠~siml~⪝~simlE~⪟~simne~≆~simplus~⨤~simrarr~⥲~slarr~←~smallsetminus~∖~smashp~⨳~smeparsl~⧤~smid~∣~smile~⌣~smt~⪪~smte~⪬~smtes~⪬︀~softcy~ь~sol~/~solb~⧄~solbar~⌿~sopf~𝕤~spadesuit~♠~spar~∥~sqcap~⊓~sqcaps~⊓︀~sqcup~⊔~sqcups~⊔︀~sqsub~⊏~sqsube~⊑~sqsubset~⊏~sqsubseteq~⊑~sqsup~⊐~sqsupe~⊒~sqsupset~⊐~sqsupseteq~⊒~squ~□~square~□~squarf~▪~squf~▪~srarr~→~sscr~𝓈~ssetmn~∖~ssmile~⌣~sstarf~⋆~star~☆~starf~★~straightepsilon~ϵ~straightphi~ϕ~strns~¯~subE~⫅~subdot~⪽~subedot~⫃~submult~⫁~subnE~⫋~subne~⊊~subplus~⪿~subrarr~⥹~subset~⊂~subseteq~⊆~subseteqq~⫅~subsetneq~⊊~subsetneqq~⫋~subsim~⫇~subsub~⫕~subsup~⫓~succ~≻~succapprox~⪸~succcurlyeq~≽~succeq~⪰~succnapprox~⪺~succneqq~⪶~succnsim~⋩~succsim~≿~sung~♪~supE~⫆~supdot~⪾~supdsub~⫘~supedot~⫄~suphsol~⟉~suphsub~⫗~suplarr~⥻~supmult~⫂~supnE~⫌~supne~⊋~supplus~⫀~supset~⊃~supseteq~⊇~supseteqq~⫆~supsetneq~⊋~supsetneqq~⫌~supsim~⫈~supsub~⫔~supsup~⫖~swArr~⇙~swarhk~⤦~swarr~↙~swarrow~↙~swnwar~⤪~target~⌖~tbrk~⎴~tcaron~ť~tcedil~ţ~tcy~т~tdot~⃛~telrec~⌕~tfr~𝔱~therefore~∴~thetav~ϑ~thickapprox~≈~thicksim~∼~thkap~≈~thksim~∼~timesb~⊠~timesbar~⨱~timesd~⨰~tint~∭~toea~⤨~top~⊤~topbot~⌶~topcir~⫱~topf~𝕥~topfork~⫚~tosa~⤩~tprime~‴~triangle~▵~triangledown~▿~triangleleft~◃~trianglelefteq~⊴~triangleq~≜~triangleright~▹~trianglerighteq~⊵~tridot~◬~trie~≜~triminus~⨺~triplus~⨹~trisb~⧍~tritime~⨻~trpezium~⏢~tscr~𝓉~tscy~ц~tshcy~ћ~tstrok~ŧ~twixt~≬~twoheadleftarrow~↞~twoheadrightarrow~↠~uHar~⥣~ubrcy~ў~ubreve~ŭ~ucy~у~udarr~⇅~udblac~ű~udhar~⥮~ufisht~⥾~ufr~𝔲~uharl~↿~uharr~↾~uhblk~▀~ulcorn~⌜~ulcorner~⌜~ulcrop~⌏~ultri~◸~umacr~ū~uogon~ų~uopf~𝕦~uparrow~↑~updownarrow~↕~upharpoonleft~↿~upharpoonright~↾~uplus~⊎~upsi~υ~upuparrows~⇈~urcorn~⌝~urcorner~⌝~urcrop~⌎~uring~ů~urtri~◹~uscr~𝓊~utdot~⋰~utilde~ũ~utri~▵~utrif~▴~uuarr~⇈~uwangle~⦧~vArr~⇕~vBar~⫨~vBarv~⫩~vDash~⊨~vangrt~⦜~varepsilon~ϵ~varkappa~ϰ~varnothing~∅~varphi~ϕ~varpi~ϖ~varpropto~∝~varr~↕~varrho~ϱ~varsigma~ς~varsubsetneq~⊊︀~varsubsetneqq~⫋︀~varsupsetneq~⊋︀~varsupsetneqq~⫌︀~vartheta~ϑ~vartriangleleft~⊲~vartriangleright~⊳~vcy~в~vdash~⊢~vee~∨~veebar~⊻~veeeq~≚~vellip~⋮~verbar~|~vert~|~vfr~𝔳~vltri~⊲~vnsub~⊂⃒~vnsup~⊃⃒~vopf~𝕧~vprop~∝~vrtri~⊳~vscr~𝓋~vsubnE~⫋︀~vsubne~⊊︀~vsupnE~⫌︀~vsupne~⊋︀~vzigzag~⦚~wcirc~ŵ~wedbar~⩟~wedge~∧~wedgeq~≙~wfr~𝔴~wopf~𝕨~wp~℘~wr~≀~wreath~≀~wscr~𝓌~xcap~⋂~xcirc~◯~xcup~⋃~xdtri~▽~xfr~𝔵~xhArr~⟺~xharr~⟷~xlArr~⟸~xlarr~⟵~xmap~⟼~xnis~⋻~xodot~⨀~xopf~𝕩~xoplus~⨁~xotime~⨂~xrArr~⟹~xrarr~⟶~xscr~𝓍~xsqcup~⨆~xuplus~⨄~xutri~△~xvee~⋁~xwedge~⋀~yacy~я~ycirc~ŷ~ycy~ы~yfr~𝔶~yicy~ї~yopf~𝕪~yscr~𝓎~yucy~ю~zacute~ź~zcaron~ž~zcy~з~zdot~ż~zeetrf~ℨ~zfr~𝔷~zhcy~ж~zigrarr~⇝~zopf~𝕫~zscr~𝓏~~AMP~&~COPY~©~GT~>~LT~<~QUOT~"~REG~®',$h.html4);var Xh={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},qh=String.fromCodePoint||function(e){return String.fromCharCode(Math.floor((e-65536)/1024)+55296,(e-65536)%1024+56320)},Jh=(String.prototype.codePointAt,function(){return Jh=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Jh.apply(this,arguments)}),Kh=Jh(Jh({},$h),{all:$h.html5}),eg={scope:"body",level:"all"},tg=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,ng=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,rg={xml:{strict:tg,attribute:ng,body:Hh.xml},html4:{strict:tg,attribute:ng,body:Hh.html4},html5:{strict:tg,attribute:ng,body:Hh.html5}},og=Jh(Jh({},rg),{all:rg.html5}),ag=String.fromCharCode,ig=ag(65533);function sg(e,t){var n=void 0===t?eg:t,r=n.level,o=void 0===r?"all":r,a=n.scope,i=void 0===a?"xml"===o?"strict":"body":a;if(!e)return"";var s=og[o][i],l=Kh[o].entities,c="attribute"===i,u="strict"===i;return e.replace(s,function(e){return function(e,t,n,r){var o=e,a=e[e.length-1];if(n&&"="===a)o=e;else if(r&&";"!==a)o=e;else{var i=t[e];if(i)o=i;else if("&"===e[0]&&"#"===e[1]){var s=e[2],l="x"==s||"X"==s?parseInt(e.substr(3),16):parseInt(e.substr(2));o=l>=1114111?ig:l>65535?qh(l):ag(Xh[l]||l)}}return o}(e,l,c,u)})}function lg(e,t){return"yes"===t&&["checkout","thankyou","upsell","downsell"].includes(e)}function cg(){return(0,a.createElement)("div",null,(0,a.createElement)("span",{className:"wcf-tooltip-heading text-xs font-semibold mb-1 block"},(0,z.__)("Step Editing is Disabled","cartflows")),(0,a.createElement)("div",{className:"wcf-tooltip-desc text-xs font-normal normal-case"},(0,z.__)("You can't edit this step directly because Instant Layout is turned on in the funnel settings. To make design changes, go to the Design tab inside this step's settings.","cartflows")))}function ug(e,t,n){return sg(e.length>t?e.substring(0,n)+"...":e)}const dg=new function(){const e=this;this.compare=function(e,t,n){switch(n){case"==":return e==t;case"!=":return e!=t;case"!==":return e!==t;case"in":return-1!==t.indexOf(e);case"!in":return-1===t.indexOf(e);case"contains":return-1!==e.indexOf(t);case"!contains":return-1===e.indexOf(t);case"<":return e<t;case"<=":return e<=t;case">":return e>t;case">=":return e>=t;default:return e===t}},this.check=function(t,n){const r="or"===t.relation;let o=!r;return!Array.isArray(t?.fields)||(t.fields.map(function(t){let a;return a=t.fields?e.check(t,n):e.compare(n[t.name],t.value,t.operator),r?(a&&(o=!0),!a):a?"":o=!1}),o)},this.isActiveControl=function(t,n){const r=!!t?.conditions&&t?.conditions;return!(r&&!e.check(r,n))}};function fg(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}var pg=o(7350),mg=o.n(pg),hg=o(5015),gg=o.n(hg),yg=o(1741),wg=o.n(yg),bg=o(8156),vg=o.n(bg),xg=o(8023),Ng=o.n(xg),Eg=o(9843),Mg=o.n(Eg),_g=function(e){return 0===e?0:e>0?1:-1},Ig=function(e){return gg()(e)&&e.indexOf("%")===e.length-1},Sg=function(e){return Ng()(e)&&!wg()(e)},jg=function(e){return Sg(e)||gg()(e)},kg=0,Dg=function(e){var t=++kg;return"".concat(e||"").concat(t)},Cg=function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!Sg(e)&&!gg()(e))return r;if(Ig(e)){var a=e.indexOf("%");n=t*parseFloat(e.slice(0,a))/100}else n=+e;return wg()(n)&&(n=r),o&&n>t&&(n=t),n},Ag=function(e){if(!e)return null;var t=Object.keys(e);return t&&t.length?e[t[0]]:null},Tg=function(e,t){return Sg(e)&&Sg(t)?function(n){return e+n*(t-e)}:function(){return t}};function Og(e,t,n){return e&&e.length?e.find(function(e){return e&&("function"==typeof t?t(e):vg()(e,t))===n}):null}var Lg=function(e,t){return Sg(e)&&Sg(t)?e-t:gg()(e)&&gg()(t)?e.localeCompare(t):e instanceof Date&&t instanceof Date?e.getTime()-t.getTime():String(e).localeCompare(String(t))},zg=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]},Pg=o(1882),Rg=o.n(Pg),Ug=o(3805),Bg=o.n(Ug),Fg=o(4580);function Yg(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function Zg(e){return Zg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zg(e)}var Qg=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],Vg=["points","pathLength"],Wg={svg:["viewBox","children"],polygon:Vg,polyline:Vg},Gg=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],Hg=function(e,t){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var n=e;if((0,w.isValidElement)(e)&&(n=e.props),!Bg()(n))return null;var r={};return Object.keys(n).forEach(function(e){Gg.includes(e)&&(r[e]=t||function(t){return n[e](n,t)})}),r},$g=function(e,t,n){if(!Bg()(e)||"object"!==Zg(e))return null;var r=null;return Object.keys(e).forEach(function(o){var a=e[o];Gg.includes(o)&&"function"==typeof a&&(r||(r={}),r[o]=function(e,t,n){return function(r){return e(t,n,r),null}}(a,t,n))}),r},Xg=["children"],qg=["children"];function Jg(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Kg(e){return Kg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kg(e)}var ey={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ty=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},ny=null,ry=null,oy=function e(t){if(t===ny&&Array.isArray(ry))return ry;var n=[];return w.Children.forEach(t,function(t){Mg()(t)||((0,Fg.isFragment)(t)?n=n.concat(e(t.props.children)):n.push(t))}),ry=n,ny=t,n};function ay(e,t){var n=[],r=[];return r=Array.isArray(t)?t.map(function(e){return ty(e)}):[ty(t)],oy(e).forEach(function(e){var t=vg()(e,"type.displayName")||vg()(e,"type.name");-1!==r.indexOf(t)&&n.push(e)}),n}function iy(e,t){var n=ay(e,t);return n&&n[0]}var sy=function(e){if(!e||!e.props)return!1;var t=e.props,n=t.width,r=t.height;return!(!Sg(n)||n<=0||!Sg(r)||r<=0)},ly=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],cy=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var r=e;if((0,w.isValidElement)(e)&&(r=e.props),!Bg()(r))return null;var o={};return Object.keys(r).forEach(function(e){var a;(function(e,t,n,r){var o,a=null!==(o=null==Wg?void 0:Wg[r])&&void 0!==o?o:[];return t.startsWith("data-")||!Rg()(e)&&(r&&a.includes(t)||Qg.includes(t))||n&&Gg.includes(t)})(null===(a=r)||void 0===a?void 0:a[e],e,t,n)&&(o[e]=r[e])}),o},uy=function e(t,n){if(t===n)return!0;var r=w.Children.count(t);if(r!==w.Children.count(n))return!1;if(0===r)return!0;if(1===r)return dy(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o<r;o++){var a=t[o],i=n[o];if(Array.isArray(a)||Array.isArray(i)){if(!e(a,i))return!1}else if(!dy(a,i))return!1}return!0},dy=function(e,t){if(Mg()(e)&&Mg()(t))return!0;if(!Mg()(e)&&!Mg()(t)){var n=e.props||{},r=n.children,o=Jg(n,Xg),a=t.props||{},i=a.children,s=Jg(a,qg);return r&&i?Yg(o,s)&&uy(r,i):!r&&!i&&Yg(o,s)}return!1},fy=function(e,t){var n=[],r={};return oy(e).forEach(function(e,o){if(function(e){return e&&e.type&&gg()(e.type)&&ly.indexOf(e.type)>=0}(e))n.push(e);else if(e){var a=ty(e.type),i=t[a]||{},s=i.handler,l=i.once;if(s&&(!l||!r[a])){var c=s(e,a,o);n.push(c),r[a]=!0}}}),n},py=function(e,t){return oy(t).indexOf(e)};function my(e){return my="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},my(e)}function hy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hy(Object(n),!0).forEach(function(t){yy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yy(e,t,n){return t=function(e){var t=function(e){if("object"!=my(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=my(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==my(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var by=(0,w.forwardRef)(function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,a=e.width,i=void 0===a?"100%":a,s=e.height,l=void 0===s?"100%":s,c=e.minWidth,u=void 0===c?0:c,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=void 0===m?0:m,g=e.id,y=e.className,b=e.onResize,x=e.style,N=void 0===x?{}:x,E=(0,w.useRef)(null),M=(0,w.useRef)();M.current=b,(0,w.useImperativeHandle)(t,function(){return Object.defineProperty(E.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),E.current},configurable:!0})});var _=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wy(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,w.useState)({containerWidth:o.width,containerHeight:o.height}),2),I=_[0],S=_[1],j=(0,w.useCallback)(function(e,t){S(function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}})},[]);(0,w.useEffect)(function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;j(r,o),null===(t=M.current)||void 0===t||t.call(M,r,o)};h>0&&(e=mg()(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=E.current.getBoundingClientRect(),r=n.width,o=n.height;return j(r,o),t.observe(E.current),function(){t.disconnect()}},[j,h]);var k=(0,w.useMemo)(function(){var e=I.containerWidth,t=I.containerHeight;if(e<0||t<0)return null;zg(Ig(i)||Ig(l),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,l),zg(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=Ig(i)?e:i,o=Ig(l)?t:l;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),zg(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,i,l,u,d,n);var a=!Array.isArray(p)&&ty(p.type).endsWith("Chart");return v().Children.map(p,function(e){return v().isValidElement(e)?(0,w.cloneElement)(e,gy({width:r,height:o},a?{style:gy({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e})},[n,p,l,f,d,u,I,i]);return v().createElement("div",{id:g?"".concat(g):void 0,className:Oe("recharts-responsive-container",y),style:gy(gy({},N),{},{width:i,height:l,minWidth:u,minHeight:d,maxHeight:f}),ref:E},k)}),vy=o(3181),xy=o.n(vy),Ny=o(3031),Ey=o.n(Ny),My=["children","width","height","viewBox","className","style","title","desc"];function _y(){return _y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_y.apply(this,arguments)}function Iy(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,a=e.className,i=e.style,s=e.title,l=e.desc,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,My),u=o||{width:n,height:r,x:0,y:0},d=Oe("recharts-surface",a);return v().createElement("svg",_y({},cy(c,!0,"svg"),{className:d,width:n,height:r,style:i,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),v().createElement("title",null,s),v().createElement("desc",null,l),t)}var Sy=["children","className"];function jy(){return jy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jy.apply(this,arguments)}var ky=v().forwardRef(function(e,t){var n=e.children,r=e.className,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Sy),a=Oe("recharts-layer",r);return v().createElement("g",jy({className:a},cy(o,!0),{ref:t}),n)});function Dy(e){return Dy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dy(e)}function Cy(){return Cy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cy.apply(this,arguments)}function Ay(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ty(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Oy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ty(Object(n),!0).forEach(function(t){Ly(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ty(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ly(e,t,n){return t=function(e){var t=function(e){if("object"!=Dy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dy(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zy(e){return Array.isArray(e)&&jg(e[0])&&jg(e[1])?e.join(" ~ "):e}var Py=function(e){var t=e.separator,n=void 0===t?" : ":t,r=e.contentStyle,o=void 0===r?{}:r,a=e.itemStyle,i=void 0===a?{}:a,s=e.labelStyle,l=void 0===s?{}:s,c=e.payload,u=e.formatter,d=e.itemSorter,f=e.wrapperClassName,p=e.labelClassName,m=e.label,h=e.labelFormatter,g=e.accessibilityLayer,y=void 0!==g&&g,w=Oy({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},o),b=Oy({margin:0},l),x=!Mg()(m),N=x?m:"",E=Oe("recharts-default-tooltip",f),M=Oe("recharts-tooltip-label",p);x&&h&&null!=c&&(N=h(m,c));var _=y?{role:"status","aria-live":"assertive"}:{};return v().createElement("div",Cy({className:E,style:w},_),v().createElement("p",{className:M,style:b},v().isValidElement(N)?N:"".concat(N)),function(){if(c&&c.length){var e=(d?Ey()(c,d):c).map(function(e,t){if("none"===e.type)return null;var r=Oy({display:"block",paddingTop:4,paddingBottom:4,color:e.color||"#000"},i),o=e.formatter||u||zy,a=e.value,s=e.name,l=a,d=s;if(o&&null!=l&&null!=d){var f=o(a,s,e,t,c);if(Array.isArray(f)){var p=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ay(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ay(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(f,2);l=p[0],d=p[1]}else l=f}return v().createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(t),style:r},jg(d)?v().createElement("span",{className:"recharts-tooltip-item-name"},d):null,jg(d)?v().createElement("span",{className:"recharts-tooltip-item-separator"},n):null,v().createElement("span",{className:"recharts-tooltip-item-value"},l),v().createElement("span",{className:"recharts-tooltip-item-unit"},e.unit||""))});return v().createElement("ul",{className:"recharts-tooltip-item-list",style:{padding:0,margin:0}},e)}return null}())};function Ry(e){return Ry="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ry(e)}function Uy(e,t,n){return t=function(e){var t=function(e){if("object"!=Ry(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ry(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ry(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var By="recharts-tooltip-wrapper",Fy={visibility:"hidden"};function Yy(e){var t=e.coordinate,n=e.translateX,r=e.translateY;return Oe(By,Uy(Uy(Uy(Uy({},"".concat(By,"-right"),Sg(n)&&t&&Sg(t.x)&&n>=t.x),"".concat(By,"-left"),Sg(n)&&t&&Sg(t.x)&&n<t.x),"".concat(By,"-bottom"),Sg(r)&&t&&Sg(t.y)&&r>=t.y),"".concat(By,"-top"),Sg(r)&&t&&Sg(t.y)&&r<t.y))}function Zy(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.key,o=e.offsetTopLeft,a=e.position,i=e.reverseDirection,s=e.tooltipDimension,l=e.viewBox,c=e.viewBoxDimension;if(a&&Sg(a[r]))return a[r];var u=n[r]-s-o,d=n[r]+o;return t[r]?i[r]?u:d:i[r]?u<l[r]?Math.max(d,l[r]):Math.max(u,l[r]):d+s>l[r]+c?Math.max(u,l[r]):Math.max(d,l[r])}function Qy(e){return Qy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qy(e)}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vy(Object(n),!0).forEach(function(t){qy(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vy(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Jy(r.key),r)}}function Hy(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hy=function(){return!!e})()}function $y(e){return $y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$y(e)}function Xy(e,t){return Xy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xy(e,t)}function qy(e,t,n){return(t=Jy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jy(e){var t=function(e){if("object"!=Qy(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Qy(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Qy(t)?t:t+""}var Ky=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return qy(e=function(e,t,n){return t=$y(t),function(e,t){if(t&&("object"===Qy(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Hy()?Reflect.construct(t,n||[],$y(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),qy(e,"handleKeyDown",function(t){var n,r,o,a;"Escape"===t.key&&e.setState({dismissed:!0,dismissedAtCoordinate:{x:null!==(n=null===(r=e.props.coordinate)||void 0===r?void 0:r.x)&&void 0!==n?n:0,y:null!==(o=null===(a=e.props.coordinate)||void 0===a?void 0:a.y)&&void 0!==o?o:0}})}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xy(e,t)}(t,e),n=t,r=[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();(Math.abs(e.width-this.state.lastBoundingBox.width)>1||Math.abs(e.height-this.state.lastBoundingBox.height)>1)&&this.setState({lastBoundingBox:{width:e.width,height:e.height}})}else-1===this.state.lastBoundingBox.width&&-1===this.state.lastBoundingBox.height||this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var e,t;this.props.active&&this.updateBBox(),this.state.dismissed&&((null===(e=this.props.coordinate)||void 0===e?void 0:e.x)===this.state.dismissedAtCoordinate.x&&(null===(t=this.props.coordinate)||void 0===t?void 0:t.y)===this.state.dismissedAtCoordinate.y||(this.state.dismissed=!1))}},{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.children,s=t.coordinate,l=t.hasPayload,c=t.isAnimationActive,u=t.offset,d=t.position,f=t.reverseDirection,p=t.useTranslate3d,m=t.viewBox,h=t.wrapperStyle,g=function(e){var t,n,r=e.allowEscapeViewBox,o=e.coordinate,a=e.offsetTopLeft,i=e.position,s=e.reverseDirection,l=e.tooltipBox,c=e.useTranslate3d,u=e.viewBox;return{cssProperties:l.height>0&&l.width>0&&o?function(e){var t=e.translateX,n=e.translateY;return{transform:e.useTranslate3d?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}({translateX:t=Zy({allowEscapeViewBox:r,coordinate:o,key:"x",offsetTopLeft:a,position:i,reverseDirection:s,tooltipDimension:l.width,viewBox:u,viewBoxDimension:u.width}),translateY:n=Zy({allowEscapeViewBox:r,coordinate:o,key:"y",offsetTopLeft:a,position:i,reverseDirection:s,tooltipDimension:l.height,viewBox:u,viewBoxDimension:u.height}),useTranslate3d:c}):Fy,cssClasses:Yy({translateX:t,translateY:n,coordinate:o})}}({allowEscapeViewBox:r,coordinate:s,offsetTopLeft:u,position:d,reverseDirection:f,tooltipBox:this.state.lastBoundingBox,useTranslate3d:p,viewBox:m}),y=g.cssClasses,w=g.cssProperties,b=Wy(Wy({transition:c&&n?"transform ".concat(o,"ms ").concat(a):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&n&&l?"visible":"hidden",position:"absolute",top:0,left:0},h);return v().createElement("div",{tabIndex:-1,className:y,style:b,ref:function(t){e.wrapperNode=t}},i)}}],r&&Gy(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(w.PureComponent),ew={isSsr:!("undefined"!=typeof window&&window.document&&window.document.createElement&&window.setTimeout),get:function(e){return ew[e]},set:function(e,t){if("string"==typeof e)ew[e]=t;else{var n=Object.keys(e);n&&n.length&&n.forEach(function(t){ew[t]=e[t]})}}},tw=o(14),nw=o.n(tw);function rw(e,t,n){return!0===t?nw()(e,n):Rg()(t)?nw()(e,t):e}function ow(e){return ow="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ow(e)}function aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function iw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aw(Object(n),!0).forEach(function(t){dw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fw(r.key),r)}}function lw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(lw=function(){return!!e})()}function cw(e){return cw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cw(e)}function uw(e,t){return uw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},uw(e,t)}function dw(e,t,n){return(t=fw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fw(e){var t=function(e){if("object"!=ow(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ow(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ow(t)?t:t+""}function pw(e){return e.dataKey}var mw=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=cw(t),function(e,t){if(t&&("object"===ow(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,lw()?Reflect.construct(t,n||[],cw(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uw(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this,t=this.props,n=t.active,r=t.allowEscapeViewBox,o=t.animationDuration,a=t.animationEasing,i=t.content,s=t.coordinate,l=t.filterNull,c=t.isAnimationActive,u=t.offset,d=t.payload,f=t.payloadUniqBy,p=t.position,m=t.reverseDirection,h=t.useTranslate3d,g=t.viewBox,y=t.wrapperStyle,w=null!=d?d:[];l&&w.length&&(w=rw(d.filter(function(t){return null!=t.value&&(!0!==t.hide||e.props.includeHidden)}),f,pw));var b=w.length>0;return v().createElement(Ky,{allowEscapeViewBox:r,animationDuration:o,animationEasing:a,isAnimationActive:c,active:n,coordinate:s,hasPayload:b,offset:u,position:p,reverseDirection:m,useTranslate3d:h,viewBox:g,wrapperStyle:y},function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):"function"==typeof e?v().createElement(e,t):v().createElement(Py,t)}(i,iw(iw({},this.props),{},{payload:w})))}}],r&&sw(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(w.PureComponent);dw(mw,"displayName","Tooltip"),dw(mw,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!ew.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var hw=o(5808),gw=o.n(hw);Math.abs,Math.atan2;const yw=Math.cos,ww=(Math.max,Math.min,Math.sin),bw=Math.sqrt,vw=Math.PI,xw=2*vw,Nw={draw(e,t){const n=bw(t/vw);e.moveTo(n,0),e.arc(0,0,n,0,xw)}},Ew={draw(e,t){const n=bw(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},Mw=bw(1/3),_w=2*Mw,Iw={draw(e,t){const n=bw(t/_w),r=n*Mw;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Sw={draw(e,t){const n=bw(t),r=-n/2;e.rect(r,r,n,n)}},jw=ww(vw/10)/ww(7*vw/10),kw=ww(xw/10)*jw,Dw=-yw(xw/10)*jw,Cw={draw(e,t){const n=bw(.8908130915292852*t),r=kw*n,o=Dw*n;e.moveTo(0,-n),e.lineTo(r,o);for(let t=1;t<5;++t){const a=xw*t/5,i=yw(a),s=ww(a);e.lineTo(s*n,-i*n),e.lineTo(i*r-s*o,s*r+i*o)}e.closePath()}},Aw=bw(3),Tw={draw(e,t){const n=-bw(t/(3*Aw));e.moveTo(0,2*n),e.lineTo(-Aw*n,-n),e.lineTo(Aw*n,-n),e.closePath()}},Ow=-.5,Lw=bw(3)/2,zw=1/bw(12),Pw=3*(zw/2+1),Rw={draw(e,t){const n=bw(t/Pw),r=n/2,o=n*zw,a=r,i=n*zw+n,s=-a,l=i;e.moveTo(r,o),e.lineTo(a,i),e.lineTo(s,l),e.lineTo(Ow*r-Lw*o,Lw*r+Ow*o),e.lineTo(Ow*a-Lw*i,Lw*a+Ow*i),e.lineTo(Ow*s-Lw*l,Lw*s+Ow*l),e.lineTo(Ow*r+Lw*o,Ow*o-Lw*r),e.lineTo(Ow*a+Lw*i,Ow*i-Lw*a),e.lineTo(Ow*s+Lw*l,Ow*l-Lw*s),e.closePath()}};function Uw(e){return function(){return e}}const Bw=Math.PI,Fw=2*Bw,Yw=1e-6,Zw=Fw-Yw;function Qw(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}class Vw{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?Qw:function(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return Qw;const n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,o,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+o},${this._y1=+a}`}arcTo(e,t,n,r,o){if(e=+e,t=+t,n=+n,r=+r,(o=+o)<0)throw new Error(`negative radius: ${o}`);let a=this._x1,i=this._y1,s=n-e,l=r-t,c=a-e,u=i-t,d=c*c+u*u;if(null===this._x1)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Yw)if(Math.abs(u*s-l*c)>Yw&&o){let f=n-a,p=r-i,m=s*s+l*l,h=f*f+p*p,g=Math.sqrt(m),y=Math.sqrt(d),w=o*Math.tan((Bw-Math.acos((m+d-h)/(2*g*y)))/2),b=w/y,v=w/g;Math.abs(b-1)>Yw&&this._append`L${e+b*c},${t+b*u}`,this._append`A${o},${o},0,0,${+(u*f>c*p)},${this._x1=e+v*s},${this._y1=t+v*l}`}else this._append`L${this._x1=e},${this._y1=t}`}arc(e,t,n,r,o,a){if(e=+e,t=+t,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let i=n*Math.cos(r),s=n*Math.sin(r),l=e+i,c=t+s,u=1^a,d=a?r-o:o-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Yw||Math.abs(this._y1-c)>Yw)&&this._append`L${l},${c}`,n&&(d<0&&(d=d%Fw+Fw),d>Zw?this._append`A${n},${n},0,1,${u},${e-i},${t-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:d>Yw&&this._append`A${n},${n},0,${+(d>=Bw)},${u},${this._x1=e+n*Math.cos(o)},${this._y1=t+n*Math.sin(o)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Ww(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(null==n)t=null;else{const e=Math.floor(n);if(!(e>=0))throw new RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Vw(t)}function Gw(e){return Gw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gw(e)}bw(3),bw(3);var Hw=["type","size","sizeType"];function $w(){return $w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$w.apply(this,arguments)}function Xw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xw(Object(n),!0).forEach(function(t){Jw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xw(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Jw(e,t,n){return t=function(e){var t=function(e){if("object"!=Gw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Gw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Gw(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kw={symbolCircle:Nw,symbolCross:Ew,symbolDiamond:Iw,symbolSquare:Sw,symbolStar:Cw,symbolTriangle:Tw,symbolWye:Rw},eb=Math.PI/180,tb=function(e){var t,n,r=e.type,o=void 0===r?"circle":r,a=e.size,i=void 0===a?64:a,s=e.sizeType,l=void 0===s?"area":s,c=qw(qw({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Hw)),{},{type:o,size:i,sizeType:l}),u=c.className,d=c.cx,f=c.cy,p=cy(c,!0);return d===+d&&f===+f&&i===+i?v().createElement("path",$w({},p,{className:Oe("recharts-symbols",u),transform:"translate(".concat(d,", ").concat(f,")"),d:(t=function(e){var t="symbol".concat(gw()(e));return Kw[t]||Nw}(o),n=function(e,t){let n=null,r=Ww(o);function o(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return e="function"==typeof e?e:Uw(e||Nw),t="function"==typeof t?t:Uw(void 0===t?64:+t),o.type=function(t){return arguments.length?(e="function"==typeof t?t:Uw(t),o):e},o.size=function(e){return arguments.length?(t="function"==typeof e?e:Uw(+e),o):t},o.context=function(e){return arguments.length?(n=null==e?null:e,o):n},o}().type(t).size(function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var r=18*eb;return 1.25*e*e*(Math.tan(r)-Math.tan(2*r)*Math.pow(Math.tan(r),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}}(i,l,o)),n())})):null};function nb(e){return nb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nb(e)}function rb(){return rb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rb.apply(this,arguments)}function ob(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ab(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ub(r.key),r)}}function ib(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ib=function(){return!!e})()}function sb(e){return sb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sb(e)}function lb(e,t){return lb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lb(e,t)}function cb(e,t,n){return(t=ub(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ub(e){var t=function(e){if("object"!=nb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=nb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nb(t)?t:t+""}tb.registerSymbol=function(e,t){Kw["symbol".concat(gw()(e))]=t};var db=32,fb=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=sb(t),function(e,t){if(t&&("object"===nb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ib()?Reflect.construct(t,n||[],sb(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lb(e,t)}(t,e),n=t,r=[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=16,r=db/6,o=db/3,a=e.inactive?t:e.color;if("plainline"===e.type)return v().createElement("line",{strokeWidth:4,fill:"none",stroke:a,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:db,y2:n,className:"recharts-legend-icon"});if("line"===e.type)return v().createElement("path",{strokeWidth:4,fill:"none",stroke:a,d:"M0,".concat(n,"h").concat(o,"\n A").concat(r,",").concat(r,",0,1,1,").concat(2*o,",").concat(n,"\n H").concat(db,"M").concat(2*o,",").concat(n,"\n A").concat(r,",").concat(r,",0,1,1,").concat(o,",").concat(n),className:"recharts-legend-icon"});if("rect"===e.type)return v().createElement("path",{stroke:"none",fill:a,d:"M0,".concat(4,"h").concat(db,"v").concat(24,"h").concat(-32,"z"),className:"recharts-legend-icon"});if(v().isValidElement(e.legendIcon)){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ob(Object(n),!0).forEach(function(t){cb(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ob(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e);return delete i.legendIcon,v().cloneElement(e.legendIcon,i)}return v().createElement(tb,{fill:a,cx:n,cy:n,size:db,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var e=this,t=this.props,n=t.payload,r=t.iconSize,o=t.layout,a=t.formatter,i=t.inactiveColor,s={x:0,y:0,width:db,height:db},l={display:"horizontal"===o?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return n.map(function(t,n){var o=t.formatter||a,u=Oe(cb(cb({"recharts-legend-item":!0},"legend-item-".concat(n),!0),"inactive",t.inactive));if("none"===t.type)return null;var d=Rg()(t.value)?null:t.value;zg(!Rg()(t.value),'The name property is also required when using a function for the dataKey of a chart\'s cartesian components. Ex: <Bar name="Name of my Data"/>');var f=t.inactive?i:t.color;return v().createElement("li",rb({className:u,style:l,key:"legend-item-".concat(n)},$g(e.props,t,n)),v().createElement(Iy,{width:r,height:r,viewBox:s,style:c},e.renderIcon(t)),v().createElement("span",{className:"recharts-legend-item-text",style:{color:f}},o?o(d,t,n):d))})}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,r=e.align;if(!t||!t.length)return null;var o={padding:0,margin:0,textAlign:"horizontal"===n?r:"left"};return v().createElement("ul",{className:"recharts-default-legend",style:o},this.renderItems())}}],r&&ab(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(w.PureComponent);function pb(e){return pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pb(e)}cb(fb,"displayName","Legend"),cb(fb,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var mb=["ref"];function hb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hb(Object(n),!0).forEach(function(t){xb(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hb(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nb(r.key),r)}}function wb(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(wb=function(){return!!e})()}function bb(e){return bb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bb(e)}function vb(e,t){return vb=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},vb(e,t)}function xb(e,t,n){return(t=Nb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nb(e){var t=function(e){if("object"!=pb(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pb(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==pb(t)?t:t+""}function Eb(e){return e.value}var Mb=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return xb(e=function(e,t,n){return t=bb(t),function(e,t){if(t&&("object"===pb(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,wb()?Reflect.construct(t,n||[],bb(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"lastBoundingBox",{width:-1,height:-1}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vb(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var e=this.wrapperNode.getBoundingClientRect();return e.height=this.wrapperNode.offsetHeight,e.width=this.wrapperNode.offsetWidth,e}return null}},{key:"updateBBox",value:function(){var e=this.props.onBBoxUpdate,t=this.getBBox();t?(Math.abs(t.width-this.lastBoundingBox.width)>1||Math.abs(t.height-this.lastBoundingBox.height)>1)&&(this.lastBoundingBox.width=t.width,this.lastBoundingBox.height=t.height,e&&e(t)):-1===this.lastBoundingBox.width&&-1===this.lastBoundingBox.height||(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,e&&e(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?gb({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(e){var t,n,r=this.props,o=r.layout,a=r.align,i=r.verticalAlign,s=r.margin,l=r.chartWidth,c=r.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===a&&"vertical"===o?{left:((l||0)-this.getBBoxSnapshot().width)/2}:"right"===a?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===i?{top:((c||0)-this.getBBoxSnapshot().height)/2}:"bottom"===i?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),gb(gb({},t),n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.content,r=t.width,o=t.height,a=t.wrapperStyle,i=t.payloadUniqBy,s=t.payload,l=gb(gb({position:"absolute",width:r||"auto",height:o||"auto"},this.getDefaultPosition(a)),a);return v().createElement("div",{className:"recharts-legend-wrapper",style:l,ref:function(t){e.wrapperNode=t}},function(e,t){if(v().isValidElement(e))return v().cloneElement(e,t);if("function"==typeof e)return v().createElement(e,t);t.ref;var n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,mb);return v().createElement(fb,n)}(n,gb(gb({},this.props),{},{payload:rw(s,i,Eb)})))}}],o=[{key:"getWithHeight",value:function(e,t){var n=gb(gb({},this.defaultProps),e.props).layout;return"vertical"===n&&Sg(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}],r&&yb(n.prototype,r),o&&yb(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(w.PureComponent);function _b(){return _b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_b.apply(this,arguments)}xb(Mb,"displayName","Legend"),xb(Mb,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var Ib=function(e){var t=e.cx,n=e.cy,r=e.r,o=e.className,a=Oe("recharts-dot",o);return t===+t&&n===+n&&r===+r?w.createElement("circle",_b({},cy(e,!1),Hg(e),{className:a,cx:t,cy:n,r})):null},Sb=o(5556),jb=o.n(Sb);const{getOwnPropertyNames:kb,getOwnPropertySymbols:Db}=Object,{hasOwnProperty:Cb}=Object.prototype;function Ab(e,t){return function(n,r,o){return e(n,r,o)&&t(n,r,o)}}function Tb(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);const{cache:o}=r,a=o.get(t),i=o.get(n);if(a&&i)return a===n&&i===t;o.set(t,n),o.set(n,t);const s=e(t,n,r);return o.delete(t),o.delete(n),s}}function Ob(e){return kb(e).concat(Db(e))}const Lb=Object.hasOwn||((e,t)=>Cb.call(e,t));function zb(e,t){return e===t||!e&&!t&&e!=e&&t!=t}const{getOwnPropertyDescriptor:Pb,keys:Rb}=Object;function Ub(e,t){return e.byteLength===t.byteLength&&Jb(new Uint8Array(e),new Uint8Array(t))}function Bb(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function Fb(e,t){return e.byteLength===t.byteLength&&Jb(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function Yb(e,t){return zb(e.getTime(),t.getTime())}function Zb(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Qb(e,t){return e===t}function Vb(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const o=new Array(r),a=e.entries();let i,s,l=0;for(;(i=a.next())&&!i.done;){const r=t.entries();let a=!1,c=0;for(;(s=r.next())&&!s.done;){if(o[c]){c++;continue}const r=i.value,u=s.value;if(n.equals(r[0],u[0],l,c,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=o[c]=!0;break}c++}if(!a)return!1;l++}return!0}const Wb=zb;function Gb(e,t,n){const r=Rb(e);let o=r.length;if(Rb(t).length!==o)return!1;for(;o-- >0;)if(!ev(e,t,n,r[o]))return!1;return!0}function Hb(e,t,n){const r=Ob(e);let o,a,i,s=r.length;if(Ob(t).length!==s)return!1;for(;s-- >0;){if(o=r[s],!ev(e,t,n,o))return!1;if(a=Pb(e,o),i=Pb(t,o),(a||i)&&(!a||!i||a.configurable!==i.configurable||a.enumerable!==i.enumerable||a.writable!==i.writable))return!1}return!0}function $b(e,t){return zb(e.valueOf(),t.valueOf())}function Xb(e,t){return e.source===t.source&&e.flags===t.flags}function qb(e,t,n){const r=e.size;if(r!==t.size)return!1;if(!r)return!0;const o=new Array(r),a=e.values();let i,s;for(;(i=a.next())&&!i.done;){const r=t.values();let a=!1,l=0;for(;(s=r.next())&&!s.done;){if(!o[l]&&n.equals(i.value,s.value,i.value,s.value,e,t,n)){a=o[l]=!0;break}l++}if(!a)return!1}return!0}function Jb(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function Kb(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function ev(e,t,n,r){return!("_owner"!==r&&"__o"!==r&&"__v"!==r||!e.$$typeof&&!t.$$typeof)||Lb(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}const tv={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},nv=Object.prototype.toString;const rv=ov();function ov(e={}){const{circular:t=!1,createInternalComparator:n,createState:r,strict:o=!1}=e,a=function({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:Ub,areArraysEqual:n?Hb:Bb,areDataViewsEqual:Fb,areDatesEqual:Yb,areErrorsEqual:Zb,areFunctionsEqual:Qb,areMapsEqual:n?Ab(Vb,Hb):Vb,areNumbersEqual:Wb,areObjectsEqual:n?Hb:Gb,arePrimitiveWrappersEqual:$b,areRegExpsEqual:Xb,areSetsEqual:n?Ab(qb,Hb):qb,areTypedArraysEqual:n?Ab(Jb,Hb):Jb,areUrlsEqual:Kb,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){const e=Tb(r.areArraysEqual),t=Tb(r.areMapsEqual),n=Tb(r.areObjectsEqual),o=Tb(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:o})}return r}(e),i=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:o,areFunctionsEqual:a,areMapsEqual:i,areNumbersEqual:s,areObjectsEqual:l,arePrimitiveWrappersEqual:c,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,y){if(h===g)return!0;if(null==h||null==g)return!1;const w=typeof h;if(w!==typeof g)return!1;if("object"!==w)return"number"===w?s(h,g,y):"function"===w&&a(h,g,y);const b=h.constructor;if(b!==g.constructor)return!1;if(b===Object)return l(h,g,y);if(Array.isArray(h))return t(h,g,y);if(b===Date)return r(h,g,y);if(b===RegExp)return u(h,g,y);if(b===Map)return i(h,g,y);if(b===Set)return d(h,g,y);const v=nv.call(h);if("[object Date]"===v)return r(h,g,y);if("[object RegExp]"===v)return u(h,g,y);if("[object Map]"===v)return i(h,g,y);if("[object Set]"===v)return d(h,g,y);if("[object Object]"===v)return"function"!=typeof h.then&&"function"!=typeof g.then&&l(h,g,y);if("[object URL]"===v)return p(h,g,y);if("[object Error]"===v)return o(h,g,y);if("[object Arguments]"===v)return l(h,g,y);if(tv[v])return f(h,g,y);if("[object ArrayBuffer]"===v)return e(h,g,y);if("[object DataView]"===v)return n(h,g,y);if("[object Boolean]"===v||"[object Number]"===v||"[object String]"===v)return c(h,g,y);if(m){let e=m[v];if(!e){const t=function(e){return null!=e?e[Symbol.toStringTag]:void 0}(h);t&&(e=m[t])}if(e)return e(h,g,y)}return!1}}(a),s=n?n(i):(l=i,function(e,t,n,r,o,a,i){return l(e,t,i)});var l;return function({circular:e,comparator:t,createState:n,equals:r,strict:o}){if(n)return function(a,i){const{cache:s=(e?new WeakMap:void 0),meta:l}=n();return t(a,i,{cache:s,equals:r,meta:l,strict:o})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:o})};const a={cache:void 0,equals:r,meta:void 0,strict:o};return function(e,n){return t(e,n,a)}}({circular:t,comparator:i,createState:r,equals:s,strict:o})}function av(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1;requestAnimationFrame(function r(o){n<0&&(n=o),o-n>t?(e(o),n=-1):function(e){"undefined"!=typeof requestAnimationFrame&&requestAnimationFrame(e)}(r)})}function iv(e){return iv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iv(e)}function sv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lv(){var e=function(){return null},t=!1,n=function n(r){if(!t){if(Array.isArray(r)){if(!r.length)return;var o=function(e){if(Array.isArray(e))return e}(s=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(s)||function(e,t){if(e){if("string"==typeof e)return sv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sv(e,t):void 0}}(s)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=o[0],i=o.slice(1);return"number"==typeof a?void av(n.bind(null,i),a):(n(a),void av(n.bind(null,i)))}"object"===iv(r)&&e(r),"function"==typeof r&&r()}var s};return{stop:function(){t=!0},start:function(e){t=!1,n(e)},subscribe:function(t){return e=t,function(){e=function(){return null}}}}}function cv(e){return cv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cv(e)}function uv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uv(Object(n),!0).forEach(function(t){fv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fv(e,t,n){return(t=function(e){var t=function(e){if("object"!==cv(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==cv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===cv(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ov({strict:!0}),ov({circular:!0}),ov({circular:!0,strict:!0}),ov({createInternalComparator:()=>zb}),ov({strict:!0,createInternalComparator:()=>zb}),ov({circular:!0,createInternalComparator:()=>zb}),ov({circular:!0,createInternalComparator:()=>zb,strict:!0});var pv=function(e){return e},mv=function(e,t){return Object.keys(t).reduce(function(n,r){return dv(dv({},n),{},fv({},r,e(r,t[r])))},{})},hv=function(e,t,n){return e.map(function(e){return"".concat((r=e,r.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}))," ").concat(t,"ms ").concat(n);var r}).join(",")};function gv(e,t){if(e){if("string"==typeof e)return yv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yv(e,t):void 0}}function yv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var wv=1e-4,bv=function(e,t){return[0,3*e,3*t-6*e,3*e-3*t+1]},vv=function(e,t){return e.map(function(e,n){return e*Math.pow(t,n)}).reduce(function(e,t){return e+t})},xv=function(e,t){return function(n){var r=bv(e,t);return vv(r,n)}},Nv=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0],o=t[1],a=t[2],i=t[3];if(1===t.length)switch(t[0]){case"linear":r=0,o=0,a=1,i=1;break;case"ease":r=.25,o=.1,a=.25,i=1;break;case"ease-in":r=.42,o=0,a=1,i=1;break;case"ease-out":r=.42,o=0,a=.58,i=1;break;case"ease-in-out":r=0,o=0,a=.58,i=1;break;default:var s=t[0].split("(");if("cubic-bezier"===s[0]&&4===s[1].split(")")[0].split(",").length){var l=s[1].split(")")[0].split(",").map(function(e){return parseFloat(e)}),c=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||gv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l,4);r=c[0],o=c[1],a=c[2],i=c[3]}}[r,a,o,i].every(function(e){return"number"==typeof e&&e>=0&&e<=1});var u,d,f=xv(r,a),p=xv(o,i),m=(u=r,d=a,function(e){var t,n=bv(u,d),r=[].concat((t=n.map(function(e,t){return e*t}).slice(1),function(e){if(Array.isArray(e))return yv(e)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||gv(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[0]);return vv(r,e)}),h=function(e){return e>1?1:e<0?0:e},g=function(e){for(var t=e>1?1:e,n=t,r=0;r<8;++r){var o=f(n)-t,a=m(n);if(Math.abs(o-t)<wv||a<wv)return p(n);n=h(n-o/a)}return p(n)};return g.isStepper=!1,g};function Ev(e){return Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ev(e)}function Mv(e){return function(e){if(Array.isArray(e))return kv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jv(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Iv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_v(Object(n),!0).forEach(function(t){Sv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_v(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Sv(e,t,n){return(t=function(e){var t=function(e){if("object"!==Ev(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Ev(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ev(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jv(e,t){if(e){if("string"==typeof e)return kv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kv(e,t):void 0}}function kv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dv=function(e,t,n){return e+(t-e)*n},Cv=function(e){return e.from!==e.to},Av=function e(t,n,r){var o=mv(function(e,n){if(Cv(n)){var r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||jv(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t(n.from,n.to,n.velocity),2),o=r[0],a=r[1];return Iv(Iv({},n),{},{from:o,velocity:a})}return n},n);return r<1?mv(function(e,t){return Cv(t)?Iv(Iv({},t),{},{velocity:Dv(t.velocity,o[e].velocity,r),from:Dv(t.from,o[e].from,r)}):t},n):e(t,o,r-1)};function Tv(e){return Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tv(e)}var Ov=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Lv(e){return function(e){if(Array.isArray(e))return zv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return zv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zv(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pv(Object(n),!0).forEach(function(t){Uv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Uv(e,t,n){return(t=Fv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Fv(r.key),r)}}function Fv(e){var t=function(e){if("object"!==Tv(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==Tv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Tv(t)?t:String(t)}function Yv(e,t){return Yv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Yv(e,t)}function Zv(e,t){if(t&&("object"===Tv(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Qv(e)}function Qv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vv(e){return Vv=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Vv(e)}var Wv=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yv(e,t)}(i,e);var t,n,r,o,a=(r=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Vv(r);if(o){var n=Vv(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Zv(this,e)});function i(e,t){var n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var r=(n=a.call(this,e,t)).props,o=r.isActive,s=r.attributeName,l=r.from,c=r.to,u=r.steps,d=r.children,f=r.duration;if(n.handleStyleChange=n.handleStyleChange.bind(Qv(n)),n.changeStyle=n.changeStyle.bind(Qv(n)),!o||f<=0)return n.state={style:{}},"function"==typeof d&&(n.state={style:c}),Zv(n);if(u&&u.length)n.state={style:u[0].style};else if(l){if("function"==typeof d)return n.state={style:l},Zv(n);n.state={style:s?Uv({},s,l):l}}else n.state={style:{}};return n}return t=i,n=[{key:"componentDidMount",value:function(){var e=this.props,t=e.isActive,n=e.canBegin;this.mounted=!0,t&&n&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isActive,r=t.canBegin,o=t.attributeName,a=t.shouldReAnimate,i=t.to,s=t.from,l=this.state.style;if(r)if(n){if(!(rv(e.to,i)&&e.canBegin&&e.isActive)){var c=!e.canBegin||!e.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var u=c||a?s:e.to;if(this.state&&l){var d={style:o?Uv({},o,u):u};(o&&l[o]!==u||!o&&l!==u)&&this.setState(d)}this.runAnimation(Rv(Rv({},this.props),{},{from:u,begin:0}))}}else{var f={style:o?Uv({},o,i):i};this.state&&l&&(o&&l[o]!==i||!o&&l!==i)&&this.setState(f)}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),e&&e()}},{key:"handleStyleChange",value:function(e){this.changeStyle(e)}},{key:"changeStyle",value:function(e){this.mounted&&this.setState({style:e})}},{key:"runJSAnimation",value:function(e){var t=this,n=e.from,r=e.to,o=e.duration,a=e.easing,i=e.begin,s=e.onAnimationEnd,l=e.onAnimationStart,c=function(e,t,n,r,o){var a,i,s,l,c=(a=e,i=t,[Object.keys(a),Object.keys(i)].reduce(function(e,t){return e.filter(function(e){return t.includes(e)})})),u=c.reduce(function(n,r){return Iv(Iv({},n),{},Sv({},r,[e[r],t[r]]))},{}),d=c.reduce(function(n,r){return Iv(Iv({},n),{},Sv({},r,{from:e[r],velocity:0,to:t[r]}))},{}),f=-1,p=function(){return null};return p=n.isStepper?function(r){s||(s=r);var a=(r-s)/n.dt;d=Av(n,d,a),o(Iv(Iv(Iv({},e),t),mv(function(e,t){return t.from},d))),s=r,Object.values(d).filter(Cv).length&&(f=requestAnimationFrame(p))}:function(a){l||(l=a);var i=(a-l)/r,s=mv(function(e,t){return Dv.apply(void 0,Mv(t).concat([n(i)]))},u);if(o(Iv(Iv(Iv({},e),t),s)),i<1)f=requestAnimationFrame(p);else{var c=mv(function(e,t){return Dv.apply(void 0,Mv(t).concat([n(1)]))},u);o(Iv(Iv(Iv({},e),t),c))}},function(){return requestAnimationFrame(p),function(){cancelAnimationFrame(f)}}}(n,r,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t[0];if("string"==typeof r)switch(r){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return Nv(r);case"spring":return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiff,n=void 0===t?100:t,r=e.damping,o=void 0===r?8:r,a=e.dt,i=void 0===a?17:a,s=function(e,t,r){var a=r+(-(e-t)*n-r*o)*i/1e3,s=r*i/1e3+e;return Math.abs(s-t)<wv&&Math.abs(a)<wv?[t,0]:[s,a]};return s.isStepper=!0,s.dt=i,s}();default:if("cubic-bezier"===r.split("(")[0])return Nv(r)}return"function"==typeof r?r:null}(a),o,this.changeStyle);this.manager.start([l,i,function(){t.stopJSAnimation=c()},o,s])}},{key:"runStepAnimation",value:function(e){var t=this,n=e.steps,r=e.begin,o=e.onAnimationStart,a=n[0],i=a.style,s=a.duration,l=void 0===s?0:s;return this.manager.start([o].concat(Lv(n.reduce(function(e,r,o){if(0===o)return e;var a=r.duration,i=r.easing,s=void 0===i?"ease":i,l=r.style,c=r.properties,u=r.onAnimationEnd,d=o>0?n[o-1]:r,f=c||Object.keys(l);if("function"==typeof s||"spring"===s)return[].concat(Lv(e),[t.runJSAnimation.bind(t,{from:d.style,to:l,duration:a,easing:s}),a]);var p=hv(f,a,s),m=Rv(Rv(Rv({},d.style),l),{},{transition:p});return[].concat(Lv(e),[m,a,u]).filter(pv)},[i,Math.max(l,r)])),[e.onAnimationEnd]))}},{key:"runAnimation",value:function(e){this.manager||(this.manager=lv());var t=e.begin,n=e.duration,r=e.attributeName,o=e.to,a=e.easing,i=e.onAnimationStart,s=e.onAnimationEnd,l=e.steps,c=e.children,u=this.manager;if(this.unSubscribe=u.subscribe(this.handleStyleChange),"function"!=typeof a&&"function"!=typeof c&&"spring"!==a)if(l.length>1)this.runStepAnimation(e);else{var d=r?Uv({},r,o):o,f=hv(Object.keys(d),n,a);u.start([i,t,Rv(Rv({},d),{},{transition:f}),n,s])}else this.runJSAnimation(e)}},{key:"render",value:function(){var e=this.props,t=e.children,n=(e.begin,e.duration),r=(e.attributeName,e.easing,e.isActive),o=(e.steps,e.from,e.to,e.canBegin,e.onAnimationEnd,e.shouldReAnimate,e.onAnimationReStart,function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ov)),a=w.Children.count(t),i=this.state.style;if("function"==typeof t)return t(i);if(!r||0===a||n<=0)return t;var s=function(e){var t=e.props,n=t.style,r=void 0===n?{}:n,a=t.className;return(0,w.cloneElement)(e,Rv(Rv({},o),{},{style:Rv(Rv({},r),i),className:a}))};return 1===a?s(w.Children.only(t)):v().createElement("div",null,w.Children.map(t,function(e){return s(e)}))}}],n&&Bv(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),i}(w.PureComponent);Wv.displayName="Animate",Wv.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}},Wv.propTypes={from:jb().oneOfType([jb().object,jb().string]),to:jb().oneOfType([jb().object,jb().string]),attributeName:jb().string,duration:jb().number,begin:jb().number,easing:jb().oneOfType([jb().string,jb().func]),steps:jb().arrayOf(jb().shape({duration:jb().number.isRequired,style:jb().object.isRequired,easing:jb().oneOfType([jb().oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),jb().func]),properties:jb().arrayOf("string"),onAnimationEnd:jb().func})),children:jb().oneOfType([jb().node,jb().func]),isActive:jb().bool,canBegin:jb().bool,onAnimationEnd:jb().func,shouldReAnimate:jb().bool,onAnimationStart:jb().func,onAnimationReStart:jb().func};const Gv=Wv;function Hv(e){return Hv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hv(e)}function $v(){return $v=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$v.apply(this,arguments)}function Xv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qv(Object(n),!0).forEach(function(t){Kv(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qv(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Kv(e,t,n){return t=function(e){var t=function(e){if("object"!=Hv(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hv(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hv(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ex=function(e,t,n,r,o){var a,i=Math.min(Math.abs(n)/2,Math.abs(r)/2),s=r>=0?1:-1,l=n>=0?1:-1,c=r>=0&&n>=0||r<0&&n<0?1:0;if(i>0&&o instanceof Array){for(var u=[0,0,0,0],d=0;d<4;d++)u[d]=o[d]>i?i:o[d];a="M".concat(e,",").concat(t+s*u[0]),u[0]>0&&(a+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(c,",").concat(e+l*u[0],",").concat(t)),a+="L ".concat(e+n-l*u[1],",").concat(t),u[1]>0&&(a+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(c,",\n ").concat(e+n,",").concat(t+s*u[1])),a+="L ".concat(e+n,",").concat(t+r-s*u[2]),u[2]>0&&(a+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(c,",\n ").concat(e+n-l*u[2],",").concat(t+r)),a+="L ".concat(e+l*u[3],",").concat(t+r),u[3]>0&&(a+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(c,",\n ").concat(e,",").concat(t+r-s*u[3])),a+="Z"}else if(i>0&&o===+o&&o>0){var f=Math.min(i,o);a="M ".concat(e,",").concat(t+s*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+l*f,",").concat(t,"\n L ").concat(e+n-l*f,",").concat(t,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+n,",").concat(t+s*f,"\n L ").concat(e+n,",").concat(t+r-s*f,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e+n-l*f,",").concat(t+r,"\n L ").concat(e+l*f,",").concat(t+r,"\n A ").concat(f,",").concat(f,",0,0,").concat(c,",").concat(e,",").concat(t+r-s*f," Z")}else a="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return a},tx=function(e,t){if(!e||!t)return!1;var n=e.x,r=e.y,o=t.x,a=t.y,i=t.width,s=t.height;if(Math.abs(i)>0&&Math.abs(s)>0){var l=Math.min(o,o+i),c=Math.max(o,o+i),u=Math.min(a,a+s),d=Math.max(a,a+s);return n>=l&&n<=c&&r>=u&&r<=d}return!1},nx={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},rx=function(e){var t=Jv(Jv({},nx),e),n=(0,w.useRef)(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xv(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,w.useState)(-1),2),o=r[0],a=r[1];(0,w.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch(e){}},[]);var i=t.x,s=t.y,l=t.width,c=t.height,u=t.radius,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isAnimationActive,g=t.isUpdateAnimationActive;if(i!==+i||s!==+s||l!==+l||c!==+c||0===l||0===c)return null;var y=Oe("recharts-rectangle",d);return g?v().createElement(Gv,{canBegin:o>0,from:{width:l,height:c,x:i,y:s},to:{width:l,height:c,x:i,y:s},duration:p,animationEasing:f,isActive:g},function(e){var r=e.width,a=e.height,i=e.x,s=e.y;return v().createElement(Gv,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:p,isActive:h,easing:f},v().createElement("path",$v({},cy(t,!0),{className:y,d:ex(i,s,r,a,u),ref:n})))}):v().createElement("path",$v({},cy(t,!0),{className:y,d:ex(i,s,l,c,u)}))};function ox(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function ax(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}class ix extends Map{constructor(e,t=lx){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,n]of e)this.set(t,n)}get(e){return super.get(sx(this,e))}has(e){return super.has(sx(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}(this,e))}}function sx({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function lx(e){return null!==e&&"object"==typeof e?e.valueOf():e}Set;const cx=Symbol("implicit");function ux(){var e=new ix,t=[],n=[],r=cx;function o(o){let a=e.get(o);if(void 0===a){if(r!==cx)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return o.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new ix;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return o},o.range=function(e){return arguments.length?(n=Array.from(e),o):n.slice()},o.unknown=function(e){return arguments.length?(r=e,o):r},o.copy=function(){return ux(t,n).unknown(r)},ox.apply(o,arguments),o}function dx(){var e,t,n=ux().unknown(void 0),r=n.domain,o=n.range,a=0,i=1,s=!1,l=0,c=0,u=.5;function d(){var n=r().length,d=i<a,f=d?i:a,p=d?a:i;e=(p-f)/Math.max(1,n-l+2*c),s&&(e=Math.floor(e)),f+=(p-f-e*(n-l))*u,t=e*(1-l),s&&(f=Math.round(f),t=Math.round(t));var m=function(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=0|Math.max(0,Math.ceil((t-e)/n)),a=new Array(o);++r<o;)a[r]=e+r*n;return a}(n).map(function(t){return f+e*t});return o(d?m.reverse():m)}return delete n.unknown,n.domain=function(e){return arguments.length?(r(e),d()):r()},n.range=function(e){return arguments.length?([a,i]=e,a=+a,i=+i,d()):[a,i]},n.rangeRound=function(e){return[a,i]=e,a=+a,i=+i,s=!0,d()},n.bandwidth=function(){return t},n.step=function(){return e},n.round=function(e){return arguments.length?(s=!!e,d()):s},n.padding=function(e){return arguments.length?(l=Math.min(1,c=+e),d()):l},n.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),d()):l},n.paddingOuter=function(e){return arguments.length?(c=+e,d()):c},n.align=function(e){return arguments.length?(u=Math.max(0,Math.min(1,e)),d()):u},n.copy=function(){return dx(r(),[a,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},ox.apply(d(),arguments)}function fx(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return fx(t())},e}function px(){return fx(dx.apply(null,arguments).paddingInner(1))}function mx(e){return mx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mx(e)}function hx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hx(Object(n),!0).forEach(function(t){yx(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hx(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yx(e,t,n){return t=function(e){var t=function(e){if("object"!=mx(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mx(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wx={widthCache:{},cacheCount:0},bx={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},vx="recharts_measurement_span",xx=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||ew.isSsr)return{width:0,height:0};var n,r=(n=gx({},t),Object.keys(n).forEach(function(e){n[e]||delete n[e]}),n),o=JSON.stringify({text:e,copyStyle:r});if(wx.widthCache[o])return wx.widthCache[o];try{var a=document.getElementById(vx);a||((a=document.createElement("span")).setAttribute("id",vx),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var i=gx(gx({},bx),r);Object.assign(a.style,i),a.textContent="".concat(e);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return wx.widthCache[o]=l,++wx.cacheCount>2e3&&(wx.cacheCount=0,wx.widthCache={}),l}catch(e){return{width:0,height:0}}};function Nx(e){return Nx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nx(e)}function Ex(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Mx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mx(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ix(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Sx(r.key),r)}}function Sx(e){var t=function(e){if("object"!=Nx(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Nx(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Nx(t)?t:t+""}var jx=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,kx=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Dx=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Cx=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Ax={cm:96/2.54,mm:96/25.4,pt:96/72,pc:16,in:96,Q:96/101.6,px:1},Tx=Object.keys(Ax),Ox="NaN",Lx=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),""===n||Dx.test(n)||(this.num=NaN,this.unit=""),Tx.includes(n)&&(this.num=function(e,t){return e*Ax[t]}(t,n),this.unit="px")}return t=e,r=[{key:"parse",value:function(t){var n,r=Ex(null!==(n=Cx.exec(t))&&void 0!==n?n:[],3),o=r[1],a=r[2];return new e(parseFloat(o),null!=a?a:"")}}],(n=[{key:"add",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}},{key:"subtract",value:function(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}},{key:"multiply",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}},{key:"divide",value:function(t){return""!==this.unit&&""!==t.unit&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}])&&Ix(t.prototype,n),r&&Ix(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();function zx(e){if(e.includes(Ox))return Ox;for(var t=e;t.includes("*")||t.includes("/");){var n,r=Ex(null!==(n=jx.exec(t))&&void 0!==n?n:[],4),o=r[1],a=r[2],i=r[3],s=Lx.parse(null!=o?o:""),l=Lx.parse(null!=i?i:""),c="*"===a?s.multiply(l):s.divide(l);if(c.isNaN())return Ox;t=t.replace(jx,c.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,d=Ex(null!==(u=kx.exec(t))&&void 0!==u?u:[],4),f=d[1],p=d[2],m=d[3],h=Lx.parse(null!=f?f:""),g=Lx.parse(null!=m?m:""),y="+"===p?h.add(g):h.subtract(g);if(y.isNaN())return Ox;t=t.replace(kx,y.toString())}return t}var Px=/\(([^()]*)\)/;function Rx(e){var t=function(e){try{return function(e){var t=e.replace(/\s+/g,"");return t=function(e){for(var t=e;t.includes("(");){var n=Ex(Px.exec(t),2)[1];t=t.replace(Px,zx(n))}return t}(t),zx(t)}(e)}catch(e){return Ox}}(e.slice(5,-1));return t===Ox?"":t}var Ux=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],Bx=["dx","dy","angle","className","breakAll"];function Fx(){return Fx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fx.apply(this,arguments)}function Yx(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Zx(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Qx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qx(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Vx=/[ \f\n\r\t\v\u2028\u2029]+/,Wx=function(e){var t=e.children,n=e.breakAll,r=e.style;try{var o=[];return Mg()(t)||(o=n?t.toString().split(""):t.toString().split(Vx)),{wordsWithComputedWidth:o.map(function(e){return{word:e,width:xx(e,r).width}}),spaceWidth:n?0:xx(" ",r).width}}catch(e){return null}},Gx=function(e){return[{words:Mg()(e)?[]:e.toString().split(Vx)}]},Hx="#808080",$x=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,o=void 0===r?0:r,a=e.lineHeight,i=void 0===a?"1em":a,s=e.capHeight,l=void 0===s?"0.71em":s,c=e.scaleToFit,u=void 0!==c&&c,d=e.textAnchor,f=void 0===d?"start":d,p=e.verticalAnchor,m=void 0===p?"end":p,h=e.fill,g=void 0===h?Hx:h,y=Yx(e,Ux),b=(0,w.useMemo)(function(){return function(e){var t=e.width,n=e.scaleToFit,r=e.children,o=e.style,a=e.breakAll,i=e.maxLines;if((t||n)&&!ew.isSsr){var s=Wx({breakAll:a,children:r,style:o});return s?function(e,t,n,r,o){var a=e.maxLines,i=e.children,s=e.style,l=e.breakAll,c=Sg(a),u=i,d=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(function(e,t){var a=t.word,i=t.width,s=e[e.length-1];if(s&&(null==r||o||s.width+i+n<Number(r)))s.words.push(a),s.width+=i+n;else{var l={words:[a],width:i};e.push(l)}return e},[])},f=d(t);if(!c)return f;for(var p,m=function(e){var t=u.slice(0,e),n=Wx({breakAll:l,style:s,children:t+"…"}).wordsWithComputedWidth,o=d(n),i=o.length>a||function(e){return e.reduce(function(e,t){return e.width>t.width?e:t})}(o).width>Number(r);return[i,o]},h=0,g=u.length-1,y=0;h<=g&&y<=u.length-1;){var w=Math.floor((h+g)/2),b=Zx(m(w-1),2),v=b[0],x=b[1],N=Zx(m(w),1)[0];if(v||N||(h=w+1),v&&N&&(g=w-1),!v&&N){p=x;break}y++}return p||f}({breakAll:a,children:r,maxLines:i,style:o},s.wordsWithComputedWidth,s.spaceWidth,t,n):Gx(r)}return Gx(r)}({breakAll:y.breakAll,children:y.children,maxLines:y.maxLines,scaleToFit:u,style:y.style,width:y.width})},[y.breakAll,y.children,y.maxLines,u,y.style,y.width]),x=y.dx,N=y.dy,E=y.angle,M=y.className,_=y.breakAll,I=Yx(y,Bx);if(!jg(n)||!jg(o))return null;var S,j=n+(Sg(x)?x:0),k=o+(Sg(N)?N:0);switch(m){case"start":S=Rx("calc(".concat(l,")"));break;case"middle":S=Rx("calc(".concat((b.length-1)/2," * -").concat(i," + (").concat(l," / 2))"));break;default:S=Rx("calc(".concat(b.length-1," * -").concat(i,")"))}var D=[];if(u){var C=b[0].width,A=y.width;D.push("scale(".concat((Sg(A)?A/C:1)/C,")"))}return E&&D.push("rotate(".concat(E,", ").concat(j,", ").concat(k,")")),D.length&&(I.transform=D.join(" ")),v().createElement("text",Fx({},cy(I,!0),{x:j,y:k,className:Oe("recharts-text",M),textAnchor:f,fill:g.includes("url")?Hx:g}),b.map(function(e,t){var n=e.words.join(_?"":" ");return v().createElement("tspan",{x:j,dy:0===t?S:i,key:"".concat(n,"-").concat(t)},n)}))};const Xx=Math.sqrt(50),qx=Math.sqrt(10),Jx=Math.sqrt(2);function Kx(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),a=r/Math.pow(10,o),i=a>=Xx?10:a>=qx?5:a>=Jx?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/i,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,o)*i,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Kx(e,t,2*n):[s,l,c]}function eN(e,t,n){if(!((n=+n)>0))return[];if((e=+e)===(t=+t))return[e];const r=t<e,[o,a,i]=r?Kx(t,e,n):Kx(e,t,n);if(!(a>=o))return[];const s=a-o+1,l=new Array(s);if(r)if(i<0)for(let e=0;e<s;++e)l[e]=(a-e)/-i;else for(let e=0;e<s;++e)l[e]=(a-e)*i;else if(i<0)for(let e=0;e<s;++e)l[e]=(o+e)/-i;else for(let e=0;e<s;++e)l[e]=(o+e)*i;return l}function tN(e,t,n){return Kx(e=+e,t=+t,n=+n)[2]}function nN(e,t,n){n=+n;const r=(t=+t)<(e=+e),o=r?tN(t,e,n):tN(e,t,n);return(r?-1:1)*(o<0?1/-o:o)}function rN(e,t){return null==e||null==t?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function oN(e,t){return null==e||null==t?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function aN(e){let t,n,r;function o(e,r,o=0,a=e.length){if(o<a){if(0!==t(r,r))return a;do{const t=o+a>>>1;n(e[t],r)<0?o=t+1:a=t}while(o<a)}return o}return 2!==e.length?(t=rN,n=(t,n)=>rN(e(t),n),r=(t,n)=>e(t)-n):(t=e===rN||e===oN?e:iN,n=e,r=e),{left:o,center:function(e,t,n=0,a=e.length){const i=o(e,t,n,a-1);return i>n&&r(e[i-1],t)>-r(e[i],t)?i-1:i},right:function(e,r,o=0,a=e.length){if(o<a){if(0!==t(r,r))return a;do{const t=o+a>>>1;n(e[t],r)<=0?o=t+1:a=t}while(o<a)}return o}}}function iN(){return 0}function sN(e){return null===e?NaN:+e}const lN=aN(rN),cN=lN.right,uN=(lN.left,aN(sN).center,cN);function dN(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fN(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function pN(){}var mN=.7,hN=1/mN,gN="\\s*([+-]?\\d+)\\s*",yN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wN="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bN=/^#([0-9a-f]{3,8})$/,vN=new RegExp(`^rgb\\(${gN},${gN},${gN}\\)$`),xN=new RegExp(`^rgb\\(${wN},${wN},${wN}\\)$`),NN=new RegExp(`^rgba\\(${gN},${gN},${gN},${yN}\\)$`),EN=new RegExp(`^rgba\\(${wN},${wN},${wN},${yN}\\)$`),MN=new RegExp(`^hsl\\(${yN},${wN},${wN}\\)$`),_N=new RegExp(`^hsla\\(${yN},${wN},${wN},${yN}\\)$`),IN={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function SN(){return this.rgb().formatHex()}function jN(){return this.rgb().formatRgb()}function kN(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=bN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?DN(t):3===n?new TN(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?CN(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?CN(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=vN.exec(e))?new TN(t[1],t[2],t[3],1):(t=xN.exec(e))?new TN(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=NN.exec(e))?CN(t[1],t[2],t[3],t[4]):(t=EN.exec(e))?CN(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=MN.exec(e))?UN(t[1],t[2]/100,t[3]/100,1):(t=_N.exec(e))?UN(t[1],t[2]/100,t[3]/100,t[4]):IN.hasOwnProperty(e)?DN(IN[e]):"transparent"===e?new TN(NaN,NaN,NaN,0):null}function DN(e){return new TN(e>>16&255,e>>8&255,255&e,1)}function CN(e,t,n,r){return r<=0&&(e=t=n=NaN),new TN(e,t,n,r)}function AN(e,t,n,r){return 1===arguments.length?function(e){return e instanceof pN||(e=kN(e)),e?new TN((e=e.rgb()).r,e.g,e.b,e.opacity):new TN}(e):new TN(e,t,n,null==r?1:r)}function TN(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function ON(){return`#${RN(this.r)}${RN(this.g)}${RN(this.b)}`}function LN(){const e=zN(this.opacity);return`${1===e?"rgb(":"rgba("}${PN(this.r)}, ${PN(this.g)}, ${PN(this.b)}${1===e?")":`, ${e})`}`}function zN(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function PN(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function RN(e){return((e=PN(e))<16?"0":"")+e.toString(16)}function UN(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new FN(e,t,n,r)}function BN(e){if(e instanceof FN)return new FN(e.h,e.s,e.l,e.opacity);if(e instanceof pN||(e=kN(e)),!e)return new FN;if(e instanceof FN)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(i=t===a?(n-r)/s+6*(n<r):n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new FN(i,s,l,e.opacity)}function FN(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function YN(e){return(e=(e||0)%360)<0?e+360:e}function ZN(e){return Math.max(0,Math.min(1,e||0))}function QN(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}function VN(e,t,n,r,o){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*n+(1+3*e+3*a-3*i)*r+i*o)/6}dN(pN,kN,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:SN,formatHex:SN,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return BN(this).formatHsl()},formatRgb:jN,toString:jN}),dN(TN,AN,fN(pN,{brighter(e){return e=null==e?hN:Math.pow(hN,e),new TN(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?mN:Math.pow(mN,e),new TN(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new TN(PN(this.r),PN(this.g),PN(this.b),zN(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ON,formatHex:ON,formatHex8:function(){return`#${RN(this.r)}${RN(this.g)}${RN(this.b)}${RN(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:LN,toString:LN})),dN(FN,function(e,t,n,r){return 1===arguments.length?BN(e):new FN(e,t,n,null==r?1:r)},fN(pN,{brighter(e){return e=null==e?hN:Math.pow(hN,e),new FN(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?mN:Math.pow(mN,e),new FN(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new TN(QN(e>=240?e-240:e+120,o,r),QN(e,o,r),QN(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new FN(YN(this.h),ZN(this.s),ZN(this.l),zN(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=zN(this.opacity);return`${1===e?"hsl(":"hsla("}${YN(this.h)}, ${100*ZN(this.s)}%, ${100*ZN(this.l)}%${1===e?")":`, ${e})`}`}}));const WN=e=>()=>e;function GN(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):WN(isNaN(e)?t:e)}const HN=function e(t){var n=function(e){return 1===(e=+e)?GN:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):WN(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=AN(e)).r,(t=AN(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=GN(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=a(t),e.opacity=i(t),e+""}}return r.gamma=e,r}(1);function $N(e){return function(t){var n,r,o=t.length,a=new Array(o),i=new Array(o),s=new Array(o);for(n=0;n<o;++n)r=AN(t[n]),a[n]=r.r||0,i[n]=r.g||0,s[n]=r.b||0;return a=e(a),i=e(i),s=e(s),r.opacity=1,function(e){return r.r=a(e),r.g=i(e),r.b=s(e),r+""}}}function XN(e,t){var n,r=t?t.length:0,o=e?Math.min(r,e.length):0,a=new Array(o),i=new Array(r);for(n=0;n<o;++n)a[n]=oE(e[n],t[n]);for(;n<r;++n)i[n]=t[n];return function(e){for(n=0;n<o;++n)i[n]=a[n](e);return i}}function qN(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function JN(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function KN(e,t){var n,r={},o={};for(n in null!==e&&"object"==typeof e||(e={}),null!==t&&"object"==typeof t||(t={}),t)n in e?r[n]=oE(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}$N(function(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],a=e[r+1],i=r>0?e[r-1]:2*o-a,s=r<t-1?e[r+2]:2*a-o;return VN((n-r/t)*t,i,o,a,s)}}),$N(function(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],a=e[r%t],i=e[(r+1)%t],s=e[(r+2)%t];return VN((n-r/t)*t,o,a,i,s)}});var eE=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,tE=new RegExp(eE.source,"g");function nE(e,t){var n,r,o,a=eE.lastIndex=tE.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=eE.exec(e))&&(r=tE.exec(t));)(o=r.index)>a&&(o=t.slice(a,o),s[i]?s[i]+=o:s[++i]=o),(n=n[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,l.push({i,x:JN(n,r)})),a=tE.lastIndex;return a<t.length&&(o=t.slice(a),s[i]?s[i]+=o:s[++i]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}function rE(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,o=t.slice();return function(a){for(n=0;n<r;++n)o[n]=e[n]*(1-a)+t[n]*a;return o}}function oE(e,t){var n,r=typeof t;return null==t||"boolean"===r?WN(t):("number"===r?JN:"string"===r?(n=kN(t))?(t=n,HN):nE:t instanceof kN?HN:t instanceof Date?qN:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?rE:Array.isArray(t)?XN:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?KN:JN)(e,t)}function aE(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function iE(e){return+e}var sE=[0,1];function lE(e){return e}function cE(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:function(e){return function(){return e}}(isNaN(t)?NaN:.5)}function uE(e,t,n){var r=e[0],o=e[1],a=t[0],i=t[1];return o<r?(r=cE(o,r),a=n(i,a)):(r=cE(r,o),a=n(a,i)),function(e){return a(r(e))}}function dE(e,t,n){var r=Math.min(e.length,t.length)-1,o=new Array(r),a=new Array(r),i=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<r;)o[i]=cE(e[i],e[i+1]),a[i]=n(t[i],t[i+1]);return function(t){var n=uN(e,t,1,r)-1;return a[n](o[n](t))}}function fE(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function pE(){var e,t,n,r,o,a,i=sE,s=sE,l=oE,c=lE;function u(){var e=Math.min(i.length,s.length);return c!==lE&&(c=function(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}(i[0],i[e-1])),r=e>2?dE:uE,o=a=null,d}function d(t){return null==t||isNaN(t=+t)?n:(o||(o=r(i.map(e),s,l)))(e(c(t)))}return d.invert=function(n){return c(t((a||(a=r(s,i.map(e),JN)))(n)))},d.domain=function(e){return arguments.length?(i=Array.from(e,iE),u()):i.slice()},d.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},d.rangeRound=function(e){return s=Array.from(e),l=aE,u()},d.clamp=function(e){return arguments.length?(c=!!e||lE,u()):c!==lE},d.interpolate=function(e){return arguments.length?(l=e,u()):l},d.unknown=function(e){return arguments.length?(n=e,d):n},function(n,r){return e=n,t=r,u()}}function mE(){return pE()(lE,lE)}var hE,gE=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yE(e){if(!(t=gE.exec(e)))throw new Error("invalid format: "+e);var t;return new wE({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function wE(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function bE(e,t){if(!isFinite(e)||0===e)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function vE(e){return(e=bE(Math.abs(e)))?e[1]:NaN}function xE(e,t){var n=bE(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}yE.prototype=wE.prototype,wE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const NE={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>xE(100*e,t),r:xE,s:function(e,t){var n=bE(e,t);if(!n)return hE=void 0,e.toPrecision(t);var r=n[0],o=n[1],a=o-(hE=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,i=r.length;return a===i?r:a>i?r+new Array(a-i+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+bE(e,Math.max(0,t+a-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function EE(e){return e}var ME,_E,IE,SE=Array.prototype.map,jE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function kE(e,t,n,r){var o,a=nN(e,t,n);switch((r=yE(null==r?",f":r)).type){case"s":var i=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(o=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(vE(t)/3)))-vE(Math.abs(e)))}(a,i))||(r.precision=o),IE(r,i);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=function(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vE(t)-vE(e))+1}(a,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=function(e){return Math.max(0,-vE(Math.abs(e)))}(a))||(r.precision=o-2*("%"===r.type))}return _E(r)}function DE(e){var t=e.domain;return e.ticks=function(e){var n=t();return eN(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return kE(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,o,a=t(),i=0,s=a.length-1,l=a[i],c=a[s],u=10;for(c<l&&(o=l,l=c,c=o,o=i,i=s,s=o);u-- >0;){if((o=tN(l,c,n))===r)return a[i]=l,a[s]=c,t(a);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}r=o}return e},e}function CE(){var e=mE();return e.copy=function(){return fE(e,CE())},ox.apply(e,arguments),DE(e)}function AE(e){var t;function n(e){return null==e||isNaN(e=+e)?t:e}return n.invert=n,n.domain=n.range=function(t){return arguments.length?(e=Array.from(t,iE),n):e.slice()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return AE(e).unknown(t)},e=arguments.length?Array.from(e,iE):[0,1],DE(n)}function TE(e,t){var n,r=0,o=(e=e.slice()).length-1,a=e[r],i=e[o];return i<a&&(n=r,r=o,o=n,n=a,a=i,i=n),e[r]=t.floor(a),e[o]=t.ceil(i),e}function OE(e){return Math.log(e)}function LE(e){return Math.exp(e)}function zE(e){return-Math.log(-e)}function PE(e){return-Math.exp(-e)}function RE(e){return isFinite(e)?+("1e"+e):e<0?0:e}function UE(e){return(t,n)=>-e(-t,n)}function BE(e){const t=e(OE,LE),n=t.domain;let r,o,a=10;function i(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(a),o=function(e){return 10===e?RE:e===Math.E?Math.exp:t=>Math.pow(e,t)}(a),n()[0]<0?(r=UE(r),o=UE(o),e(zE,PE)):e(OE,LE),t}return t.base=function(e){return arguments.length?(a=+e,i()):a},t.domain=function(e){return arguments.length?(n(e),i()):n()},t.ticks=e=>{const t=n();let i=t[0],s=t[t.length-1];const l=s<i;l&&([i,s]=[s,i]);let c,u,d=r(i),f=r(s);const p=null==e?10:+e;let m=[];if(!(a%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),i>0){for(;d<=f;++d)for(c=1;c<a;++c)if(u=d<0?c/o(-d):c*o(d),!(u<i)){if(u>s)break;m.push(u)}}else for(;d<=f;++d)for(c=a-1;c>=1;--c)if(u=d>0?c/o(-d):c*o(d),!(u<i)){if(u>s)break;m.push(u)}2*m.length<p&&(m=eN(i,s,p))}else m=eN(d,f,Math.min(f-d,p)).map(o);return l?m.reverse():m},t.tickFormat=(e,n)=>{if(null==e&&(e=10),null==n&&(n=10===a?"s":","),"function"!=typeof n&&(a%1||null!=(n=yE(n)).precision||(n.trim=!0),n=_E(n)),e===1/0)return n;const i=Math.max(1,a*e/t.ticks().length);return e=>{let t=e/o(Math.round(r(e)));return t*a<a-.5&&(t*=a),t<=i?n(e):""}},t.nice=()=>n(TE(n(),{floor:e=>o(Math.floor(r(e))),ceil:e=>o(Math.ceil(r(e)))})),t}function FE(){const e=BE(pE()).domain([1,10]);return e.copy=()=>fE(e,FE()).base(e.base()),ox.apply(e,arguments),e}function YE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function ZE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function QE(e){var t=1,n=e(YE(t),ZE(t));return n.constant=function(n){return arguments.length?e(YE(t=+n),ZE(t)):t},DE(n)}function VE(){var e=QE(pE());return e.copy=function(){return fE(e,VE()).constant(e.constant())},ox.apply(e,arguments)}function WE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function GE(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function HE(e){return e<0?-e*e:e*e}function $E(e){var t=e(lE,lE),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(lE,lE):.5===n?e(GE,HE):e(WE(n),WE(1/n)):n},DE(t)}function XE(){var e=$E(pE());return e.copy=function(){return fE(e,XE()).exponent(e.exponent())},ox.apply(e,arguments),e}function qE(){return XE.apply(null,arguments).exponent(.5)}function JE(e){return Math.sign(e)*e*e}function KE(){var e,t=mE(),n=[0,1],r=!1;function o(n){var o=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(t(n));return isNaN(o)?e:r?Math.round(o):o}return o.invert=function(e){return t.invert(JE(e))},o.domain=function(e){return arguments.length?(t.domain(e),o):t.domain()},o.range=function(e){return arguments.length?(t.range((n=Array.from(e,iE)).map(JE)),o):n.slice()},o.rangeRound=function(e){return o.range(e).round(!0)},o.round=function(e){return arguments.length?(r=!!e,o):r},o.clamp=function(e){return arguments.length?(t.clamp(e),o):t.clamp()},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return KE(t.domain(),n).round(r).clamp(t.clamp()).unknown(e)},ox.apply(o,arguments),DE(o)}function eM(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n<t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n<o||void 0===n&&o>=o)&&(n=o)}return n}function tM(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let o of e)null!=(o=t(o,++r,e))&&(n>o||void 0===n&&o>=o)&&(n=o)}return n}function nM(e,t){return(null==e||!(e>=e))-(null==t||!(t>=t))||(e<t?-1:e>t?1:0)}function rM(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=void 0===o?nM:function(e=rN){if(e===rN)return nM;if("function"!=typeof e)throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||0===r?r:(0===e(n,n))-(0===e(t,t))}}(o);r>n;){if(r-n>600){const a=r-n+1,i=t-n+1,s=Math.log(a),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(a-l)/a)*(i-a/2<0?-1:1);rM(e,t,Math.max(n,Math.floor(t-i*l/a+c)),Math.min(r,Math.floor(t+(a-i)*l/a+c)),o)}const a=e[t];let i=n,s=r;for(oM(e,n,t),o(e[r],a)>0&&oM(e,n,r);i<s;){for(oM(e,i,s),++i,--s;o(e[i],a)<0;)++i;for(;o(e[s],a)>0;)--s}0===o(e[n],a)?oM(e,n,s):(++s,oM(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function oM(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function aM(e,t,n=sN){if((r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,a=Math.floor(o),i=+n(e[a],a,e);return i+(+n(e[a+1],a+1,e)-i)*(o-a)}}function iM(){var e,t=[],n=[],r=[];function o(){var e=0,o=Math.max(1,n.length);for(r=new Array(o-1);++e<o;)r[e-1]=aM(t,e/o);return a}function a(t){return null==t||isNaN(t=+t)?e:n[uN(r,t)]}return a.invertExtent=function(e){var o=n.indexOf(e);return o<0?[NaN,NaN]:[o>0?r[o-1]:t[0],o<r.length?r[o]:t[t.length-1]]},a.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(rN),o()},a.range=function(e){return arguments.length?(n=Array.from(e),o()):n.slice()},a.unknown=function(t){return arguments.length?(e=t,a):e},a.quantiles=function(){return r.slice()},a.copy=function(){return iM().domain(t).range(n).unknown(e)},ox.apply(a,arguments)}function sM(){var e,t=0,n=1,r=1,o=[.5],a=[0,1];function i(t){return null!=t&&t<=t?a[uN(o,t,0,r)]:e}function s(){var e=-1;for(o=new Array(r);++e<r;)o[e]=((e+1)*n-(e-r)*t)/(r+1);return i}return i.domain=function(e){return arguments.length?([t,n]=e,t=+t,n=+n,s()):[t,n]},i.range=function(e){return arguments.length?(r=(a=Array.from(e)).length-1,s()):a.slice()},i.invertExtent=function(e){var i=a.indexOf(e);return i<0?[NaN,NaN]:i<1?[t,o[0]]:i>=r?[o[r-1],n]:[o[i-1],o[i]]},i.unknown=function(t){return arguments.length?(e=t,i):i},i.thresholds=function(){return o.slice()},i.copy=function(){return sM().domain([t,n]).range(a).unknown(e)},ox.apply(DE(i),arguments)}function lM(){var e,t=[.5],n=[0,1],r=1;function o(o){return null!=o&&o<=o?n[uN(t,o,0,r)]:e}return o.domain=function(e){return arguments.length?(t=Array.from(e),r=Math.min(t.length,n.length-1),o):t.slice()},o.range=function(e){return arguments.length?(n=Array.from(e),r=Math.min(t.length,n.length-1),o):n.slice()},o.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},o.unknown=function(t){return arguments.length?(e=t,o):e},o.copy=function(){return lM().domain(t).range(n).unknown(e)},ox.apply(o,arguments)}ME=function(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?EE:(t=SE.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var o=e.length,a=[],i=0,s=t[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(o-=s,o+s)),!((l+=s+1)>r));)s=t[i=(i+1)%t.length];return a.reverse().join(n)}),o=void 0===e.currency?"":e.currency[0]+"",a=void 0===e.currency?"":e.currency[1]+"",i=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?EE:function(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}(SE.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function d(e,t){var n=(e=yE(e)).fill,d=e.align,f=e.sign,p=e.symbol,m=e.zero,h=e.width,g=e.comma,y=e.precision,w=e.trim,b=e.type;"n"===b?(g=!0,b="g"):NE[b]||(void 0===y&&(y=12),w=!0,b="g"),(m||"0"===n&&"="===d)&&(m=!0,n="0",d="=");var v=(t&&void 0!==t.prefix?t.prefix:"")+("$"===p?o:"#"===p&&/[boxX]/.test(b)?"0"+b.toLowerCase():""),x=("$"===p?a:/[%p]/.test(b)?l:"")+(t&&void 0!==t.suffix?t.suffix:""),N=NE[b],E=/[defgprs%]/.test(b);function M(e){var t,o,a,l=v,p=x;if("c"===b)p=N(e)+p,e="";else{var M=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:N(Math.abs(e),y),w&&(e=function(e){e:for(var t,n=e.length,r=1,o=-1;r<n;++r)switch(e[r]){case".":o=t=r;break;case"0":0===o&&(o=r),t=r;break;default:if(!+e[r])break e;o>0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),M&&0===+e&&"+"!==f&&(M=!1),l=(M?"("===f?f:c:"-"===f||"("===f?"":f)+l,p=("s"!==b||isNaN(e)||void 0===hE?"":jE[8+hE/3])+p+(M&&"("===f?")":""),E)for(t=-1,o=e.length;++t<o;)if(48>(a=e.charCodeAt(t))||a>57){p=(46===a?i+e.slice(t+1):e.slice(t))+p,e=e.slice(0,t);break}}g&&!m&&(e=r(e,1/0));var _=l.length+e.length+p.length,I=_<h?new Array(h-_+1).join(n):"";switch(g&&m&&(e=r(I+e,I.length?h-p.length:1/0),I=""),d){case"<":e=l+e+p+I;break;case"=":e=l+I+e+p;break;case"^":e=I.slice(0,_=I.length>>1)+l+e+p+I.slice(_);break;default:e=I+l+e+p}return s(e)}return y=void 0===y?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return e+""},M}return{format:d,formatPrefix:function(e,t){var n=3*Math.max(-8,Math.min(8,Math.floor(vE(t)/3))),r=Math.pow(10,-n),o=d(((e=yE(e)).type="f",e),{suffix:jE[8+n/3]});return function(e){return o(r*e)}}}}({thousands:",",grouping:[3],currency:["$",""]}),_E=ME.format,IE=ME.formatPrefix;const cM=1e3,uM=6e4,dM=36e5,fM=864e5,pM=6048e5,mM=31536e6,hM=new Date,gM=new Date;function yM(e,t,n,r){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=t=>(e(t=new Date(+t)),t),o.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),o.round=e=>{const t=o(e),n=o.ceil(e);return e-t<n-e?t:n},o.offset=(e,n)=>(t(e=new Date(+e),null==n?1:Math.floor(n)),e),o.range=(n,r,a)=>{const i=[];if(n=o.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return i;let s;do{i.push(s=new Date(+n)),t(n,a),e(n)}while(s<n&&n<r);return i},o.filter=n=>yM(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(o.count=(t,r)=>(hM.setTime(+t),gM.setTime(+r),e(hM),e(gM),Math.floor(n(hM,gM))),o.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(r?t=>r(t)%e===0:t=>o.count(0,t)%e===0):o:null)),o}const wM=yM(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);wM.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?yM(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):wM:null),wM.range;const bM=yM(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*cM)},(e,t)=>(t-e)/cM,e=>e.getUTCSeconds()),vM=(bM.range,yM(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*cM)},(e,t)=>{e.setTime(+e+t*uM)},(e,t)=>(t-e)/uM,e=>e.getMinutes())),xM=(vM.range,yM(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*uM)},(e,t)=>(t-e)/uM,e=>e.getUTCMinutes())),NM=(xM.range,yM(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*cM-e.getMinutes()*uM)},(e,t)=>{e.setTime(+e+t*dM)},(e,t)=>(t-e)/dM,e=>e.getHours())),EM=(NM.range,yM(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*dM)},(e,t)=>(t-e)/dM,e=>e.getUTCHours())),MM=(EM.range,yM(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*uM)/fM,e=>e.getDate()-1)),_M=(MM.range,yM(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fM,e=>e.getUTCDate()-1)),IM=(_M.range,yM(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/fM,e=>Math.floor(e/fM)));function SM(e){return yM(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+7*t)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*uM)/pM)}IM.range;const jM=SM(0),kM=SM(1),DM=SM(2),CM=SM(3),AM=SM(4),TM=SM(5),OM=SM(6);function LM(e){return yM(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)},(e,t)=>(t-e)/pM)}jM.range,kM.range,DM.range,CM.range,AM.range,TM.range,OM.range;const zM=LM(0),PM=LM(1),RM=LM(2),UM=LM(3),BM=LM(4),FM=LM(5),YM=LM(6),ZM=(zM.range,PM.range,RM.range,UM.range,BM.range,FM.range,YM.range,yM(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()),e=>e.getMonth())),QM=(ZM.range,yM(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear()),e=>e.getUTCMonth())),VM=(QM.range,yM(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()));VM.every=e=>isFinite(e=Math.floor(e))&&e>0?yM(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}):null,VM.range;const WM=yM(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());function GM(e,t,n,r,o,a){const i=[[bM,1,cM],[bM,5,5e3],[bM,15,15e3],[bM,30,3e4],[a,1,uM],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,dM],[o,3,108e5],[o,6,216e5],[o,12,432e5],[r,1,fM],[r,2,1728e5],[n,1,pM],[t,1,2592e6],[t,3,7776e6],[e,1,mM]];function s(t,n,r){const o=Math.abs(n-t)/r,a=aN(([,,e])=>e).right(i,o);if(a===i.length)return e.every(nN(t/mM,n/mM,r));if(0===a)return wM.every(Math.max(nN(t,n,r),1));const[s,l]=i[o/i[a-1][2]<i[a][2]/o?a-1:a];return s.every(l)}return[function(e,t,n){const r=t<e;r&&([e,t]=[t,e]);const o=n&&"function"==typeof n.range?n:s(e,t,n),a=o?o.range(e,+t+1):[];return r?a.reverse():a},s]}WM.every=e=>isFinite(e=Math.floor(e))&&e>0?yM(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null,WM.range;const[HM,$M]=GM(WM,QM,zM,IM,EM,xM),[XM,qM]=GM(VM,ZM,jM,MM,NM,vM);function JM(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function KM(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function e_(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var t_,n_,r_,o_={"-":"",_:" ",0:"0"},a_=/^\s*\d+/,i_=/^%/,s_=/[\\^$*+?|[\]().{}]/g;function l_(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",a=o.length;return r+(a<n?new Array(n-a+1).join(t)+o:o)}function c_(e){return e.replace(s_,"\\$&")}function u_(e){return new RegExp("^(?:"+e.map(c_).join("|")+")","i")}function d_(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function f_(e,t,n){var r=a_.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function p_(e,t,n){var r=a_.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function m_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function h_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function g_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function y_(e,t,n){var r=a_.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function w_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function b_(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function v_(e,t,n){var r=a_.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function x_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function N_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function E_(e,t,n){var r=a_.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function M_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function I_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function S_(e,t,n){var r=a_.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function j_(e,t,n){var r=a_.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function k_(e,t,n){var r=a_.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function D_(e,t,n){var r=i_.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function C_(e,t,n){var r=a_.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function A_(e,t,n){var r=a_.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function T_(e,t){return l_(e.getDate(),t,2)}function O_(e,t){return l_(e.getHours(),t,2)}function L_(e,t){return l_(e.getHours()%12||12,t,2)}function z_(e,t){return l_(1+MM.count(VM(e),e),t,3)}function P_(e,t){return l_(e.getMilliseconds(),t,3)}function R_(e,t){return P_(e,t)+"000"}function U_(e,t){return l_(e.getMonth()+1,t,2)}function B_(e,t){return l_(e.getMinutes(),t,2)}function F_(e,t){return l_(e.getSeconds(),t,2)}function Y_(e){var t=e.getDay();return 0===t?7:t}function Z_(e,t){return l_(jM.count(VM(e)-1,e),t,2)}function Q_(e){var t=e.getDay();return t>=4||0===t?AM(e):AM.ceil(e)}function V_(e,t){return e=Q_(e),l_(AM.count(VM(e),e)+(4===VM(e).getDay()),t,2)}function W_(e){return e.getDay()}function G_(e,t){return l_(kM.count(VM(e)-1,e),t,2)}function H_(e,t){return l_(e.getFullYear()%100,t,2)}function $_(e,t){return l_((e=Q_(e)).getFullYear()%100,t,2)}function X_(e,t){return l_(e.getFullYear()%1e4,t,4)}function q_(e,t){var n=e.getDay();return l_((e=n>=4||0===n?AM(e):AM.ceil(e)).getFullYear()%1e4,t,4)}function J_(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+l_(t/60|0,"0",2)+l_(t%60,"0",2)}function K_(e,t){return l_(e.getUTCDate(),t,2)}function eI(e,t){return l_(e.getUTCHours(),t,2)}function tI(e,t){return l_(e.getUTCHours()%12||12,t,2)}function nI(e,t){return l_(1+_M.count(WM(e),e),t,3)}function rI(e,t){return l_(e.getUTCMilliseconds(),t,3)}function oI(e,t){return rI(e,t)+"000"}function aI(e,t){return l_(e.getUTCMonth()+1,t,2)}function iI(e,t){return l_(e.getUTCMinutes(),t,2)}function sI(e,t){return l_(e.getUTCSeconds(),t,2)}function lI(e){var t=e.getUTCDay();return 0===t?7:t}function cI(e,t){return l_(zM.count(WM(e)-1,e),t,2)}function uI(e){var t=e.getUTCDay();return t>=4||0===t?BM(e):BM.ceil(e)}function dI(e,t){return e=uI(e),l_(BM.count(WM(e),e)+(4===WM(e).getUTCDay()),t,2)}function fI(e){return e.getUTCDay()}function pI(e,t){return l_(PM.count(WM(e)-1,e),t,2)}function mI(e,t){return l_(e.getUTCFullYear()%100,t,2)}function hI(e,t){return l_((e=uI(e)).getUTCFullYear()%100,t,2)}function gI(e,t){return l_(e.getUTCFullYear()%1e4,t,4)}function yI(e,t){var n=e.getUTCDay();return l_((e=n>=4||0===n?BM(e):BM.ceil(e)).getUTCFullYear()%1e4,t,4)}function wI(){return"+0000"}function bI(){return"%"}function vI(e){return+e}function xI(e){return Math.floor(+e/1e3)}function NI(e){return new Date(e)}function EI(e){return e instanceof Date?+e:+new Date(+e)}function MI(e,t,n,r,o,a,i,s,l,c){var u=mE(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),w=c("%b %d"),b=c("%B"),v=c("%Y");function x(e){return(l(e)<e?p:s(e)<e?m:i(e)<e?h:a(e)<e?g:r(e)<e?o(e)<e?y:w:n(e)<e?b:v)(e)}return u.invert=function(e){return new Date(d(e))},u.domain=function(e){return arguments.length?f(Array.from(e,EI)):f().map(NI)},u.ticks=function(t){var n=f();return e(n[0],n[n.length-1],null==t?10:t)},u.tickFormat=function(e,t){return null==t?x:c(t)},u.nice=function(e){var n=f();return e&&"function"==typeof e.range||(e=t(n[0],n[n.length-1],null==e?10:e)),e?f(TE(n,e)):u},u.copy=function(){return fE(u,MI(e,t,n,r,o,a,i,s,l,c))},u}function _I(){return ox.apply(MI(XM,qM,VM,ZM,jM,MM,NM,vM,bM,n_).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function II(){return ox.apply(MI(HM,$M,WM,QM,zM,_M,EM,xM,bM,r_).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function SI(){var e,t,n,r,o,a=0,i=1,s=lE,l=!1;function c(t){return null==t||isNaN(t=+t)?o:s(0===n?.5:(t=(r(t)-e)*n,l?Math.max(0,Math.min(1,t)):t))}function u(e){return function(t){var n,r;return arguments.length?([n,r]=t,s=e(n,r),c):[s(0),s(1)]}}return c.domain=function(o){return arguments.length?([a,i]=o,e=r(a=+a),t=r(i=+i),n=e===t?0:1/(t-e),c):[a,i]},c.clamp=function(e){return arguments.length?(l=!!e,c):l},c.interpolator=function(e){return arguments.length?(s=e,c):s},c.range=u(oE),c.rangeRound=u(aE),c.unknown=function(e){return arguments.length?(o=e,c):o},function(o){return r=o,e=o(a),t=o(i),n=e===t?0:1/(t-e),c}}function jI(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function kI(){var e=DE(SI()(lE));return e.copy=function(){return jI(e,kI())},ax.apply(e,arguments)}function DI(){var e=BE(SI()).domain([1,10]);return e.copy=function(){return jI(e,DI()).base(e.base())},ax.apply(e,arguments)}function CI(){var e=QE(SI());return e.copy=function(){return jI(e,CI()).constant(e.constant())},ax.apply(e,arguments)}function AI(){var e=$E(SI());return e.copy=function(){return jI(e,AI()).exponent(e.exponent())},ax.apply(e,arguments)}function TI(){return AI.apply(null,arguments).exponent(.5)}function OI(){var e=[],t=lE;function n(n){if(null!=n&&!isNaN(n=+n))return t((uN(e,n,1)-1)/(e.length-1))}return n.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(rN),n},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.range=function(){return e.map((n,r)=>t(r/(e.length-1)))},n.quantiles=function(t){return Array.from({length:t+1},(n,r)=>function(e,t,n){if(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n)),(r=e.length)&&!isNaN(t=+t)){if(t<=0||r<2)return tM(e);if(t>=1)return eM(e);var r,o=(r-1)*t,a=Math.floor(o),i=eM(rM(e,a).subarray(0,a+1));return i+(tM(e.subarray(a+1))-i)*(o-a)}}(e,r/t))},n.copy=function(){return OI(t).domain(e)},ax.apply(n,arguments)}function LI(){var e,t,n,r,o,a,i,s=0,l=.5,c=1,u=1,d=lE,f=!1;function p(e){return isNaN(e=+e)?i:(e=.5+((e=+a(e))-t)*(u*e<u*t?r:o),d(f?Math.max(0,Math.min(1,e)):e))}function m(e){return function(t){var n,r,o;return arguments.length?([n,r,o]=t,d=function(e,t){void 0===t&&(t=e,e=oE);for(var n=0,r=t.length-1,o=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(o,o=t[++n]);return function(e){var t=Math.max(0,Math.min(r-1,Math.floor(e*=r)));return a[t](e-t)}}(e,[n,r,o]),p):[d(0),d(.5),d(1)]}}return p.domain=function(i){return arguments.length?([s,l,c]=i,e=a(s=+s),t=a(l=+l),n=a(c=+c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p):[s,l,c]},p.clamp=function(e){return arguments.length?(f=!!e,p):f},p.interpolator=function(e){return arguments.length?(d=e,p):d},p.range=m(oE),p.rangeRound=m(aE),p.unknown=function(e){return arguments.length?(i=e,p):i},function(i){return a=i,e=i(s),t=i(l),n=i(c),r=e===t?0:.5/(t-e),o=t===n?0:.5/(n-t),u=t<e?-1:1,p}}function zI(){var e=DE(LI()(lE));return e.copy=function(){return jI(e,zI())},ax.apply(e,arguments)}function PI(){var e=BE(LI()).domain([.1,1,10]);return e.copy=function(){return jI(e,PI()).base(e.base())},ax.apply(e,arguments)}function RI(){var e=QE(LI());return e.copy=function(){return jI(e,RI()).constant(e.constant())},ax.apply(e,arguments)}function UI(){var e=$E(LI());return e.copy=function(){return jI(e,UI()).exponent(e.exponent())},ax.apply(e,arguments)}function BI(){return UI.apply(null,arguments).exponent(.5)}function FI(e,t){if((o=e.length)>1)for(var n,r,o,a=1,i=e[t[0]],s=i.length;a<o;++a)for(r=i,i=e[t[a]],n=0;n<s;++n)i[n][1]+=i[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function YI(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function ZI(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function QI(e,t){return e[t]}function VI(e){const t=[];return t.key=e,t}t_=function(e){var t=e.dateTime,n=e.date,r=e.time,o=e.periods,a=e.days,i=e.shortDays,s=e.months,l=e.shortMonths,c=u_(o),u=d_(o),d=u_(a),f=d_(a),p=u_(i),m=d_(i),h=u_(s),g=d_(s),y=u_(l),w=d_(l),b={a:function(e){return i[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return l[e.getMonth()]},B:function(e){return s[e.getMonth()]},c:null,d:T_,e:T_,f:R_,g:$_,G:q_,H:O_,I:L_,j:z_,L:P_,m:U_,M:B_,p:function(e){return o[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:vI,s:xI,S:F_,u:Y_,U:Z_,V:V_,w:W_,W:G_,x:null,X:null,y:H_,Y:X_,Z:J_,"%":bI},v={a:function(e){return i[e.getUTCDay()]},A:function(e){return a[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:K_,e:K_,f:oI,g:hI,G:yI,H:eI,I:tI,j:nI,L:rI,m:aI,M:iI,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:vI,s:xI,S:sI,u:lI,U:cI,V:dI,w:fI,W:pI,x:null,X:null,y:mI,Y:gI,Z:wI,"%":bI},x={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=y.exec(t.slice(n));return r?(e.m=w.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return M(e,t,n,r)},d:N_,e:N_,f:k_,g:w_,G:y_,H:M_,I:M_,j:E_,L:j_,m:x_,M:I_,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:v_,Q:C_,s:A_,S:S_,u:p_,U:m_,V:h_,w:f_,W:g_,x:function(e,t,r){return M(e,n,t,r)},X:function(e,t,n){return M(e,r,t,n)},y:w_,Y:y_,Z:b_,"%":D_};function N(e,t){return function(n){var r,o,a,i=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===e.charCodeAt(s)&&(i.push(e.slice(l,s)),null!=(o=o_[r=e.charAt(++s)])?r=e.charAt(++s):o="e"===r?" ":"0",(a=t[r])&&(r=a(n,o)),i.push(r),l=s+1);return i.push(e.slice(l,s)),i.join("")}}function E(e,t){return function(n){var r,o,a=e_(1900,void 0,1);if(M(a,e,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(t&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(o=(r=KM(e_(a.y,0,1))).getUTCDay(),r=o>4||0===o?PM.ceil(r):PM(r),r=_M.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(o=(r=JM(e_(a.y,0,1))).getDay(),r=o>4||0===o?kM.ceil(r):kM(r),r=MM.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),o="Z"in a?KM(e_(a.y,0,1)).getUTCDay():JM(e_(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(o+5)%7:a.w+7*a.U-(o+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,KM(a)):JM(a)}}function M(e,t,n,r){for(var o,a,i=0,s=t.length,l=n.length;i<s;){if(r>=l)return-1;if(37===(o=t.charCodeAt(i++))){if(o=t.charAt(i++),!(a=x[o in o_?t.charAt(i++):o])||(r=a(e,n,r))<0)return-1}else if(o!=n.charCodeAt(r++))return-1}return r}return b.x=N(n,b),b.X=N(r,b),b.c=N(t,b),v.x=N(n,v),v.X=N(r,v),v.c=N(t,v),{format:function(e){var t=N(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=E(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=N(e+="",v);return t.toString=function(){return e},t},utcParse:function(e){var t=E(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),n_=t_.format,t_.parse,r_=t_.utcFormat,t_.utcParse,Array.prototype.slice;var WI=o(4506),GI=o.n(WI),HI=o(1684),$I=o.n(HI),XI=o(7307),qI=o.n(XI),JI=o(2404),KI=o.n(JI),eS=o(8351),tS=o.n(eS);function nS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rS=function(e){return e},oS={"@@functional/placeholder":!0},aS=function(e){return e===oS},iS=function(e){return function t(){return 0===arguments.length||1===arguments.length&&aS(arguments.length<=0?void 0:arguments[0])?t:e.apply(void 0,arguments)}},sS=function e(t,n){return 1===t?n:iS(function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];var i=o.filter(function(e){return e!==oS}).length;return i>=t?n.apply(void 0,o):e(t-i,iS(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a,i=o.map(function(e){return aS(e)?t.shift():e});return n.apply(void 0,(a=i,function(e){if(Array.isArray(e))return nS(e)}(a)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return nS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?nS(e,t):void 0}}(a)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat(t))}))})},lS=function(e){return sS(e.length,e)},cS=function(e,t){for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},uS=lS(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(e){return t[e]}).map(e)}),dS=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!t.length)return rS;var r=t.reverse(),o=r[0],a=r.slice(1);return function(){return a.reduce(function(e,t){return t(e)},o.apply(void 0,arguments))}},fS=function(e){return Array.isArray(e)?e.reverse():e.split("").reverse.join("")},pS=function(e){var t=null,n=null;return function(){for(var r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return t&&o.every(function(e,n){return e===t[n]})?n:(t=o,n=e.apply(void 0,o))}};lS(function(e,t,n){var r=+e;return r+n*(+t-r)}),lS(function(e,t,n){var r=t-+e;return(n-e)/(r||1/0)}),lS(function(e,t,n){var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});const mS=function(e,t,n){for(var r=new(tS())(e),o=0,a=[];r.lt(t)&&o<1e5;)a.push(r.toNumber()),r=r.add(n),o++;return a},hS=function(e){return 0===e?1:Math.floor(new(tS())(e).abs().log(10).toNumber())+1};function gS(e){return function(e){if(Array.isArray(e))return bS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||wS(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yS(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],_n=!0,r=!1,o=void 0;try{for(var a,i=e[Symbol.iterator]();!(_n=(a=i.next()).done)&&(n.push(a.value),!t||n.length!==t);_n=!0);}catch(e){r=!0,o=e}finally{try{_n||null==i.return||i.return()}finally{if(r)throw o}}return n}}(e,t)||wS(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wS(e,t){if(e){if("string"==typeof e)return bS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?bS(e,t):void 0}}function bS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vS(e){var t=yS(e,2),n=t[0],r=t[1],o=n,a=r;return n>r&&(o=r,a=n),[o,a]}function xS(e,t,n){if(e.lte(0))return new(tS())(0);var r=hS(e.toNumber()),o=new(tS())(10).pow(r),a=e.div(o),i=1!==r?.05:.1,s=new(tS())(Math.ceil(a.div(i).toNumber())).add(n).mul(i).mul(o);return t?s:new(tS())(Math.ceil(s))}function NS(e,t,n){var r=1,o=new(tS())(e);if(!o.isint()&&n){var a=Math.abs(e);a<1?(r=new(tS())(10).pow(hS(e)-1),o=new(tS())(Math.floor(o.div(r).toNumber())).mul(r)):a>1&&(o=new(tS())(Math.floor(e)))}else 0===e?o=new(tS())(Math.floor((t-1)/2)):n||(o=new(tS())(Math.floor(e)));var i=Math.floor((t-1)/2),s=dS(uS(function(e){return o.add(new(tS())(e-i).mul(r)).toNumber()}),cS);return s(0,t)}function ES(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new(tS())(0),tickMin:new(tS())(0),tickMax:new(tS())(0)};var a,i=xS(new(tS())(t).sub(e).div(n-1),r,o);a=e<=0&&t>=0?new(tS())(0):(a=new(tS())(e).add(t).div(2)).sub(new(tS())(a).mod(i));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new(tS())(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?ES(e,t,n,r,o+1):(c<n&&(l=t>0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new(tS())(s).mul(i)),tickMax:a.add(new(tS())(l).mul(i))})}var MS=pS(function(e){var t=yS(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=Math.max(o,2),s=yS(vS([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0){var u=c===1/0?[l].concat(gS(cS(0,o-1).map(function(){return 1/0}))):[].concat(gS(cS(0,o-1).map(function(){return-1/0})),[c]);return n>r?fS(u):u}if(l===c)return NS(l,o,a);var d=ES(l,c,i,a),f=d.step,p=d.tickMin,m=d.tickMax,h=mS(p,m.add(new(tS())(.1).mul(f)),f);return n>r?fS(h):h}),_S=(pS(function(e){var t=yS(e,2),n=t[0],r=t[1],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6,a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=Math.max(o,2),s=yS(vS([n,r]),2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[n,r];if(l===c)return NS(l,o,a);var u=xS(new(tS())(c).sub(l).div(i-1),a,0),d=dS(uS(function(e){return new(tS())(l).add(new(tS())(e).mul(u)).toNumber()}),cS),f=d(0,i).filter(function(e){return e>=l&&e<=c});return n>r?fS(f):f}),pS(function(e,t){var n=yS(e,2),r=n[0],o=n[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=yS(vS([r,o]),2),s=i[0],l=i[1];if(s===-1/0||l===1/0)return[r,o];if(s===l)return[s];var c=Math.max(t,2),u=xS(new(tS())(l).sub(s).div(c-1),a,0),d=[].concat(gS(mS(new(tS())(s),new(tS())(l).sub(new(tS())(.99).mul(u)),u)),[l]);return r>o?fS(d):d})),IS=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function SS(e){return SS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SS(e)}function jS(){return jS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jS.apply(this,arguments)}function kS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function DS(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,LS(r.key),r)}}function CS(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(CS=function(){return!!e})()}function AS(e){return AS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},AS(e)}function TS(e,t){return TS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},TS(e,t)}function OS(e,t,n){return(t=LS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LS(e){var t=function(e){if("object"!=SS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=SS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==SS(t)?t:t+""}var zS=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=AS(t),function(e,t){if(t&&("object"===SS(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,CS()?Reflect.construct(t,n||[],AS(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TS(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this.props,t=e.offset,n=e.layout,r=e.width,o=e.dataKey,a=e.data,i=e.dataPointFormatter,s=e.xAxis,l=e.yAxis,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,IS),u=cy(c,!1);"x"===this.props.direction&&"number"!==s.type&&(0,M.A)(!1);var d=a.map(function(e){var a=i(e,o),c=a.x,d=a.y,f=a.value,p=a.errorVal;if(!p)return null;var m,h,g=[];if(Array.isArray(p)){var y=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kS(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(p,2);m=y[0],h=y[1]}else m=h=p;if("vertical"===n){var w=s.scale,b=d+t,x=b+r,N=b-r,E=w(f-m),M=w(f+h);g.push({x1:M,y1:x,x2:M,y2:N}),g.push({x1:E,y1:b,x2:M,y2:b}),g.push({x1:E,y1:x,x2:E,y2:N})}else if("horizontal"===n){var _=l.scale,I=c+t,S=I-r,j=I+r,k=_(f-m),D=_(f+h);g.push({x1:S,y1:D,x2:j,y2:D}),g.push({x1:I,y1:k,x2:I,y2:D}),g.push({x1:S,y1:k,x2:j,y2:k})}return v().createElement(ky,jS({className:"recharts-errorBar",key:"bar-".concat(g.map(function(e){return"".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))},u),g.map(function(e){return v().createElement("line",jS({},e,{key:"line-".concat(e.x1,"-").concat(e.x2,"-").concat(e.y1,"-").concat(e.y2)}))}))});return v().createElement(ky,{className:"recharts-errorBars"},d)}}],r&&DS(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(v().Component);function PS(e){return PS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},PS(e)}function RS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function US(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?RS(Object(n),!0).forEach(function(t){BS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function BS(e,t,n){return t=function(e){var t=function(e){if("object"!=PS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=PS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==PS(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}OS(zS,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"}),OS(zS,"displayName","ErrorBar");var FS=function(e){var t=e.children,n=e.formattedGraphicalItems,r=e.legendWidth,o=e.legendContent,a=iy(t,Mb);if(!a)return null;var i,s=Mb.defaultProps,l=void 0!==s?US(US({},s),a.props):{};return i=a.props&&a.props.payload?a.props&&a.props.payload:"children"===o?(n||[]).reduce(function(e,t){var n=t.item,r=t.props,o=r.sectors||r.data||[];return e.concat(o.map(function(e){return{type:a.props.iconType||n.props.legendType,value:e.name,color:e.fill,payload:e}}))},[]):(n||[]).map(function(e){var t=e.item,n=t.type.defaultProps,r=void 0!==n?US(US({},n),t.props):{},o=r.dataKey,a=r.name,i=r.legendType;return{inactive:r.hide,dataKey:o,type:l.iconType||i||"square",color:XS(t),value:a||o,payload:r}}),US(US(US({},l),Mb.getWithHeight(a,r)),{},{payload:i,item:a})};function YS(e){return YS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},YS(e)}function ZS(e){return function(e){if(Array.isArray(e))return QS(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return QS(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QS(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function QS(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WS(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VS(Object(n),!0).forEach(function(t){GS(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VS(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GS(e,t,n){return t=function(e){var t=function(e){if("object"!=YS(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=YS(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==YS(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HS(e,t,n){return Mg()(e)||Mg()(t)?n:jg(t)?vg()(e,t,n):Rg()(t)?t(e):n}function $S(e,t,n,r){var o=qI()(e,function(e){return HS(e,t)});if("number"===n){var a=o.filter(function(e){return Sg(e)||parseFloat(e)});return a.length?[$I()(a),GI()(a)]:[1/0,-1/0]}return(r?o.filter(function(e){return!Mg()(e)}):o).map(function(e){return jg(e)||e instanceof Date?e:""})}var XS=function(e){var t,n,r=e.type.displayName,o=null!==(t=e.type)&&void 0!==t&&t.defaultProps?WS(WS({},e.type.defaultProps),e.props):e.props,a=o.stroke,i=o.fill;switch(r){case"Line":n=a;break;case"Area":case"Radar":n=a&&"none"!==a?a:i;break;default:n=i}return n},qS=function(e,t,n,r,o){var a=ay(t.props.children,zS).filter(function(e){return function(e,t,n){return!!Mg()(t)||("horizontal"===e?"yAxis"===t:"vertical"===e||"x"===n?"xAxis"===t:"y"!==n||"yAxis"===t)}(r,o,e.props.direction)});if(a&&a.length){var i=a.map(function(e){return e.props.dataKey});return e.reduce(function(e,t){var r=HS(t,n);if(Mg()(r))return e;var o=Array.isArray(r)?[$I()(r),GI()(r)]:[r,r],a=i.reduce(function(e,n){var r=HS(t,n,0),a=o[0]-Math.abs(Array.isArray(r)?r[0]:r),i=o[1]+Math.abs(Array.isArray(r)?r[1]:r);return[Math.min(a,e[0]),Math.max(i,e[1])]},[1/0,-1/0]);return[Math.min(a[0],e[0]),Math.max(a[1],e[1])]},[1/0,-1/0])}return null},JS=function(e,t,n,r,o){var a=t.map(function(t){var a=t.props.dataKey;return"number"===n&&a&&qS(e,t,a,r)||$S(e,a,n,o)});if("number"===n)return a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]);var i={};return a.reduce(function(e,t){for(var n=0,r=t.length;n<r;n++)i[t[n]]||(i[t[n]]=!0,e.push(t[n]));return e},[])},KS=function(e,t){return"horizontal"===e&&"xAxis"===t||"vertical"===e&&"yAxis"===t||"centric"===e&&"angleAxis"===t||"radial"===e&&"radiusAxis"===t},ej=function(e,t,n,r){if(r)return e.map(function(e){return e.coordinate});var o,a,i=e.map(function(e){return e.coordinate===t&&(o=!0),e.coordinate===n&&(a=!0),e.coordinate});return o||i.push(t),a||i.push(n),i},tj=function(e,t,n){if(!e)return null;var r=e.scale,o=e.duplicateDomain,a=e.type,i=e.range,s="scaleBand"===e.realScaleType?r.bandwidth()/2:2,l=(t||n)&&"category"===a&&r.bandwidth?r.bandwidth()/s:0;return l="angleAxis"===e.axisType&&(null==i?void 0:i.length)>=2?2*_g(i[0]-i[1])*l:l,t&&(e.ticks||e.niceTicks)?(e.ticks||e.niceTicks).map(function(e){var t=o?o.indexOf(e):e;return{coordinate:r(t)+l,value:e,offset:l}}).filter(function(e){return!wg()(e.coordinate)}):e.isCategorical&&e.categoricalDomain?e.categoricalDomain.map(function(e,t){return{coordinate:r(e)+l,value:e,index:t,offset:l}}):r.ticks&&!n?r.ticks(e.tickCount).map(function(e){return{coordinate:r(e)+l,value:e,offset:l}}):r.domain().map(function(e,t){return{coordinate:r(e)+l,value:o?o[e]:e,index:t,offset:l}})},nj=new WeakMap,rj=function(e,t){if("function"!=typeof t)return e;nj.has(e)||nj.set(e,new WeakMap);var n=nj.get(e);if(n.has(t))return n.get(t);var r=function(){e.apply(void 0,arguments),t.apply(void 0,arguments)};return n.set(t,r),r},oj=1e-4,aj={sign:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,a=0,i=0;i<t;++i){var s=wg()(e[i][n][1])?e[i][n][0]:e[i][n][1];s>=0?(e[i][n][0]=o,e[i][n][1]=o+s,o=e[i][n][1]):(e[i][n][0]=a,e[i][n][1]=a+s,a=e[i][n][1])}},expand:function(e,t){if((r=e.length)>0){for(var n,r,o,a=0,i=e[0].length;a<i;++a){for(o=n=0;n<r;++n)o+=e[n][a][1]||0;if(o)for(n=0;n<r;++n)e[n][a][1]/=o}FI(e,t)}},none:FI,silhouette:function(e,t){if((n=e.length)>0){for(var n,r=0,o=e[t[0]],a=o.length;r<a;++r){for(var i=0,s=0;i<n;++i)s+=e[i][r][1]||0;o[r][1]+=o[r][0]=-s/2}FI(e,t)}},wiggle:function(e,t){if((o=e.length)>0&&(r=(n=e[t[0]]).length)>0){for(var n,r,o,a=0,i=1;i<r;++i){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],d=u[i][1]||0,f=(d-(u[i-1][1]||0))/2,p=0;p<s;++p){var m=e[t[p]];f+=(m[i][1]||0)-(m[i-1][1]||0)}l+=d,c+=f*d}n[i-1][1]+=n[i-1][0]=a,l&&(a-=c/l)}n[i-1][1]+=n[i-1][0]=a,FI(e,t)}},positive:function(e){var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var o=0,a=0;a<t;++a){var i=wg()(e[a][n][1])?e[a][n][0]:e[a][n][1];i>=0?(e[a][n][0]=o,e[a][n][1]=o+i,o=e[a][n][1]):(e[a][n][0]=0,e[a][n][1]=0)}}},ij=function(e,t,n){var r=t.map(function(e){return e.props.dataKey}),o=aj[n],a=function(){var e=Uw([]),t=ZI,n=FI,r=QI;function o(o){var a,i,s=Array.from(e.apply(this,arguments),VI),l=s.length,c=-1;for(const e of o)for(a=0,++c;a<l;++a)(s[a][c]=[0,+r(e,s[a].key,c,o)]).data=e;for(a=0,i=YI(t(s));a<l;++a)s[i[a]].index=a;return n(s,i),s}return o.keys=function(t){return arguments.length?(e="function"==typeof t?t:Uw(Array.from(t)),o):e},o.value=function(e){return arguments.length?(r="function"==typeof e?e:Uw(+e),o):r},o.order=function(e){return arguments.length?(t=null==e?ZI:"function"==typeof e?e:Uw(Array.from(e)),o):t},o.offset=function(e){return arguments.length?(n=null==e?FI:e,o):n},o}().keys(r).value(function(e,t){return+HS(e,t,0)}).order(ZI).offset(o);return a(e)};function sj(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,a=e.index,i=e.dataKey;if("category"===t.type){if(!t.allowDuplicatedCategory&&t.dataKey&&!Mg()(o[t.dataKey])){var s=Og(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var l=HS(o,Mg()(i)?t.dataKey:i);return Mg()(l)?null:t.scale(l)}var lj=function(e){var t=e.axis,n=e.ticks,r=e.offset,o=e.bandSize,a=e.entry,i=e.index;if("category"===t.type)return n[i]?n[i].coordinate+r:null;var s=HS(a,t.dataKey,t.domain[i]);return Mg()(s)?null:t.scale(s)-o/2+r},cj=function(e,t,n){return Object.keys(e).reduce(function(r,o){var a=e[o].stackedData.reduce(function(e,r){var o=r.slice(t,n+1).reduce(function(e,t){return[$I()(t.concat([e[0]]).filter(Sg)),GI()(t.concat([e[1]]).filter(Sg))]},[1/0,-1/0]);return[Math.min(e[0],o[0]),Math.max(e[1],o[1])]},[1/0,-1/0]);return[Math.min(a[0],r[0]),Math.max(a[1],r[1])]},[1/0,-1/0]).map(function(e){return e===1/0||e===-1/0?0:e})},uj=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dj=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,fj=function(e,t,n){if(Rg()(e))return e(t,n);if(!Array.isArray(e))return t;var r=[];if(Sg(e[0]))r[0]=n?e[0]:Math.min(e[0],t[0]);else if(uj.test(e[0])){var o=+uj.exec(e[0])[1];r[0]=t[0]-o}else Rg()(e[0])?r[0]=e[0](t[0]):r[0]=t[0];if(Sg(e[1]))r[1]=n?e[1]:Math.max(e[1],t[1]);else if(dj.test(e[1])){var a=+dj.exec(e[1])[1];r[1]=t[1]+a}else Rg()(e[1])?r[1]=e[1](t[1]):r[1]=t[1];return r},pj=function(e,t,n){if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var o=Ey()(t,function(e){return e.coordinate}),a=1/0,i=1,s=o.length;i<s;i++){var l=o[i],c=o[i-1];a=Math.min((l.coordinate||0)-(c.coordinate||0),a)}return a===1/0?0:a}return n?void 0:0},mj=function(e,t,n){return e&&e.length?KI()(e,vg()(n,"type.defaultProps.domain"))?t:e:t},hj=function(e,t){var n=e.type.defaultProps?WS(WS({},e.type.defaultProps),e.props):e.props,r=n.dataKey,o=n.name,a=n.unit,i=n.formatter,s=n.tooltipType,l=n.chartType,c=n.hide;return WS(WS({},cy(e,!1)),{},{dataKey:r,unit:a,formatter:i,name:o||r,color:XS(e),value:HS(t,r),type:s,payload:t,chartType:l,hide:c})};function gj(e){return gj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gj(e)}function yj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yj(Object(n),!0).forEach(function(t){bj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function bj(e,t,n){return t=function(e){var t=function(e){if("object"!=gj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=gj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==gj(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var vj=["Webkit","Moz","O","ms"];function xj(e){return xj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xj(e)}function Nj(){return Nj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nj.apply(this,arguments)}function Ej(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ej(Object(n),!0).forEach(function(t){kj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ej(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _j(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Dj(r.key),r)}}function Ij(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ij=function(){return!!e})()}function Sj(e){return Sj=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sj(e)}function jj(e,t){return jj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},jj(e,t)}function kj(e,t,n){return(t=Dj(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dj(e){var t=function(e){if("object"!=xj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=xj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==xj(t)?t:t+""}var Cj=function(e){return e.changedTouches&&!!e.changedTouches.length},Aj=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),kj(n=function(e,t,n){return t=Sj(t),function(e,t){if(t&&("object"===xj(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ij()?Reflect.construct(t,n||[],Sj(e).constructor):t.apply(e,n))}(this,t,[e]),"handleDrag",function(e){n.leaveTimer&&(clearTimeout(n.leaveTimer),n.leaveTimer=null),n.state.isTravellerMoving?n.handleTravellerMove(e):n.state.isSlideMoving&&n.handleSlideDrag(e)}),kj(n,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&n.handleDrag(e.changedTouches[0])}),kj(n,"handleDragEnd",function(){n.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var e=n.props,t=e.endIndex,r=e.onDragEnd,o=e.startIndex;null==r||r({endIndex:t,startIndex:o})}),n.detachDragEndListener()}),kj(n,"handleLeaveWrapper",function(){(n.state.isTravellerMoving||n.state.isSlideMoving)&&(n.leaveTimer=window.setTimeout(n.handleDragEnd,n.props.leaveTimeOut))}),kj(n,"handleEnterSlideOrTraveller",function(){n.setState({isTextActive:!0})}),kj(n,"handleLeaveSlideOrTraveller",function(){n.setState({isTextActive:!1})}),kj(n,"handleSlideDragStart",function(e){var t=Cj(e)?e.changedTouches[0]:e;n.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:t.pageX}),n.attachDragEndListener()}),n.travellerDragStartHandlers={startX:n.handleTravellerDragStart.bind(n,"startX"),endX:n.handleTravellerDragStart.bind(n,"endX")},n.state={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jj(e,t)}(t,e),n=t,r=[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(e){var n=e.startX,r=e.endX,o=this.state.scaleValues,a=this.props,i=a.gap,s=a.data.length-1,l=Math.min(n,r),c=Math.max(n,r),u=t.getIndexInRange(o,l),d=t.getIndexInRange(o,c);return{startIndex:u-u%i,endIndex:d===s?s:d-d%i}}},{key:"getTextOfTick",value:function(e){var t=this.props,n=t.data,r=t.tickFormatter,o=t.dataKey,a=HS(n[e],o,e);return Rg()(r)?r(a,e):a}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(e){var t=this.state,n=t.slideMoveStartX,r=t.startX,o=t.endX,a=this.props,i=a.x,s=a.width,l=a.travellerWidth,c=a.startIndex,u=a.endIndex,d=a.onChange,f=e.pageX-n;f>0?f=Math.min(f,i+s-l-o,i+s-l-r):f<0&&(f=Math.max(f,i-r,i-o));var p=this.getIndex({startX:r+f,endX:o+f});p.startIndex===c&&p.endIndex===u||!d||d(p),this.setState({startX:r+f,endX:o+f,slideMoveStartX:e.pageX})}},{key:"handleTravellerDragStart",value:function(e,t){var n=Cj(t)?t.changedTouches[0]:t;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:e,brushMoveStartX:n.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(e){var t=this.state,n=t.brushMoveStartX,r=t.movingTravellerId,o=t.endX,a=t.startX,i=this.state[r],s=this.props,l=s.x,c=s.width,u=s.travellerWidth,d=s.onChange,f=s.gap,p=s.data,m={startX:this.state.startX,endX:this.state.endX},h=e.pageX-n;h>0?h=Math.min(h,l+c-u-i):h<0&&(h=Math.max(h,l-i)),m[r]=i+h;var g=this.getIndex(m),y=g.startIndex,w=g.endIndex;this.setState(kj(kj({},r,i+h),"brushMoveStartX",e.pageX),function(){var e;d&&(e=p.length-1,("startX"===r&&(o>a?y%f===0:w%f===0)||o<a&&w===e||"endX"===r&&(o>a?w%f===0:y%f===0)||o>a&&w===e)&&d(g))})}},{key:"handleTravellerMoveKeyboard",value:function(e,t){var n=this,r=this.state,o=r.scaleValues,a=r.startX,i=r.endX,s=this.state[t],l=o.indexOf(s);if(-1!==l){var c=l+e;if(!(-1===c||c>=o.length)){var u=o[c];"startX"===t&&u>=i||"endX"===t&&u<=a||this.setState(kj({},t,u),function(){n.props.onChange(n.getIndex({startX:n.state.startX,endX:n.state.endX}))})}}}},{key:"renderBackground",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,a=e.fill,i=e.stroke;return v().createElement("rect",{stroke:i,fill:a,x:t,y:n,width:r,height:o})}},{key:"renderPanorama",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,a=e.data,i=e.children,s=e.padding,l=w.Children.only(i);return l?v().cloneElement(l,{x:t,y:n,width:r,height:o,margin:s,compact:!0,data:a}):null}},{key:"renderTravellerLayer",value:function(e,n){var r,o,a=this,i=this.props,s=i.y,l=i.travellerWidth,c=i.height,u=i.traveller,d=i.ariaLabel,f=i.data,p=i.startIndex,m=i.endIndex,h=Math.max(e,this.props.x),g=Mj(Mj({},cy(this.props,!1)),{},{x:h,y:s,width:l,height:c}),y=d||"Min value: ".concat(null===(r=f[p])||void 0===r?void 0:r.name,", Max value: ").concat(null===(o=f[m])||void 0===o?void 0:o.name);return v().createElement(ky,{tabIndex:0,role:"slider","aria-label":y,"aria-valuenow":e,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[n],onTouchStart:this.travellerDragStartHandlers[n],onKeyDown:function(e){["ArrowLeft","ArrowRight"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),a.handleTravellerMoveKeyboard("ArrowRight"===e.key?1:-1,n))},onFocus:function(){a.setState({isTravellerFocused:!0})},onBlur:function(){a.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(u,g))}},{key:"renderSlide",value:function(e,t){var n=this.props,r=n.y,o=n.height,a=n.stroke,i=n.travellerWidth,s=Math.min(e,t)+i,l=Math.max(Math.abs(t-e)-i,0);return v().createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:a,fillOpacity:.2,x:s,y:r,width:l,height:o})}},{key:"renderText",value:function(){var e=this.props,t=e.startIndex,n=e.endIndex,r=e.y,o=e.height,a=e.travellerWidth,i=e.stroke,s=this.state,l=s.startX,c=s.endX,u={pointerEvents:"none",fill:i};return v().createElement(ky,{className:"recharts-brush-texts"},v().createElement($x,Nj({textAnchor:"end",verticalAnchor:"middle",x:Math.min(l,c)-5,y:r+o/2},u),this.getTextOfTick(t)),v().createElement($x,Nj({textAnchor:"start",verticalAnchor:"middle",x:Math.max(l,c)+a+5,y:r+o/2},u),this.getTextOfTick(n)))}},{key:"render",value:function(){var e=this.props,t=e.data,n=e.className,r=e.children,o=e.x,a=e.y,i=e.width,s=e.height,l=e.alwaysShowText,c=this.state,u=c.startX,d=c.endX,f=c.isTextActive,p=c.isSlideMoving,m=c.isTravellerMoving,h=c.isTravellerFocused;if(!t||!t.length||!Sg(o)||!Sg(a)||!Sg(i)||!Sg(s)||i<=0||s<=0)return null;var g=Oe("recharts-brush",n),y=1===v().Children.count(r),w=function(e,t){var n=e.replace(/(\w)/,function(e){return e.toUpperCase()}),r=vj.reduce(function(e,r){return wj(wj({},e),{},bj({},r+n,t))},{});return r[e]=t,r}("userSelect","none");return v().createElement(ky,{className:g,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:w},this.renderBackground(),y&&this.renderPanorama(),this.renderSlide(u,d),this.renderTravellerLayer(u,"startX"),this.renderTravellerLayer(d,"endX"),(f||p||m||h||l)&&this.renderText())}}],o=[{key:"renderDefaultTraveller",value:function(e){var t=e.x,n=e.y,r=e.width,o=e.height,a=e.stroke,i=Math.floor(n+o/2)-1;return v().createElement(v().Fragment,null,v().createElement("rect",{x:t,y:n,width:r,height:o,fill:a,stroke:"none"}),v().createElement("line",{x1:t+1,y1:i,x2:t+r-1,y2:i,fill:"none",stroke:"#fff"}),v().createElement("line",{x1:t+1,y1:i+2,x2:t+r-1,y2:i+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(e,n){return v().isValidElement(e)?v().cloneElement(e,n):Rg()(e)?e(n):t.renderDefaultTraveller(n)}},{key:"getDerivedStateFromProps",value:function(e,t){var n=e.data,r=e.width,o=e.x,a=e.travellerWidth,i=e.updateId,s=e.startIndex,l=e.endIndex;if(n!==t.prevData||i!==t.prevUpdateId)return Mj({prevData:n,prevTravellerWidth:a,prevUpdateId:i,prevX:o,prevWidth:r},n&&n.length?function(e){var t=e.data,n=e.startIndex,r=e.endIndex,o=e.x,a=e.width,i=e.travellerWidth;if(!t||!t.length)return{};var s=t.length,l=px().domain(xy()(0,s)).range([o,o+a-i]),c=l.domain().map(function(e){return l(e)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:l(n),endX:l(r),scale:l,scaleValues:c}}({data:n,width:r,x:o,travellerWidth:a,startIndex:s,endIndex:l}):{scale:null,scaleValues:null});if(t.scale&&(r!==t.prevWidth||o!==t.prevX||a!==t.prevTravellerWidth)){t.scale.range([o,o+r-a]);var c=t.scale.domain().map(function(e){return t.scale(e)});return{prevData:n,prevTravellerWidth:a,prevUpdateId:i,prevX:o,prevWidth:r,startX:t.scale(e.startIndex),endX:t.scale(e.endIndex),scaleValues:c}}return null}},{key:"getIndexInRange",value:function(e,t){for(var n=0,r=e.length-1;r-n>1;){var o=Math.floor((n+r)/2);e[o]>t?r=o:n=o}return t>=e[r]?r:n}}],r&&_j(n.prototype,r),o&&_j(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(w.PureComponent);function Tj(e){return Tj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Tj(e)}function Oj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Lj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oj(Object(n),!0).forEach(function(t){zj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function zj(e,t,n){return t=function(e){var t=function(e){if("object"!=Tj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Tj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Tj(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}kj(Aj,"displayName","Brush"),kj(Aj,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Pj=Math.PI/180,Rj=function(e){return 180*e/Math.PI},Uj=function(e,t,n,r){return{x:e+Math.cos(-Pj*r)*n,y:t+Math.sin(-Pj*r)*n}},Bj=function(e,t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),a=Math.floor(r/360);return e+360*Math.min(o,a)},Fj=function(e,t){var n=function(e,t){var n=e.x,r=e.y,o=t.cx,a=t.cy,i=function(e,t){var n=e.x,r=e.y,o=t.x,a=t.y;return Math.sqrt(Math.pow(n-o,2)+Math.pow(r-a,2))}({x:n,y:r},{x:o,y:a});if(i<=0)return{radius:i};var s=(n-o)/i,l=Math.acos(s);return r>a&&(l=2*Math.PI-l),{radius:i,angle:Rj(l),angleInRadian:l}}({x:e.x,y:e.y},t),r=n.radius,o=n.angle,a=t.innerRadius,i=t.outerRadius;if(r<a||r>i)return!1;if(0===r)return!0;var s,l=function(e){var t=e.startAngle,n=e.endAngle,r=Math.floor(t/360),o=Math.floor(n/360),a=Math.min(r,o);return{startAngle:t-360*a,endAngle:n-360*a}}(t),c=l.startAngle,u=l.endAngle,d=o;if(c<=u){for(;d>u;)d-=360;for(;d<c;)d+=360;s=d>=c&&d<=u}else{for(;d>c;)d-=360;for(;d<u;)d+=360;s=d>=u&&d<=c}return s?Lj(Lj({},t),{},{radius:r,angle:Bj(d,t)}):null};function Yj(e){return Yj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yj(e)}var Zj=["offset"];function Qj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Wj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vj(Object(n),!0).forEach(function(t){Gj(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vj(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Gj(e,t,n){return t=function(e){var t=function(e){if("object"!=Yj(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Yj(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Yj(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hj(){return Hj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hj.apply(this,arguments)}function $j(e){var t,n=e.offset,r=Wj({offset:void 0===n?5:n},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Zj)),o=r.viewBox,a=r.position,i=r.value,s=r.children,l=r.content,c=r.className,u=void 0===c?"":c,d=r.textBreakAll;if(!o||Mg()(i)&&Mg()(s)&&!(0,w.isValidElement)(l)&&!Rg()(l))return null;if((0,w.isValidElement)(l))return(0,w.cloneElement)(l,r);if(Rg()(l)){if(t=(0,w.createElement)(l,r),(0,w.isValidElement)(t))return t}else t=function(e){var t=e.value,n=e.formatter,r=Mg()(e.children)?t:e.children;return Rg()(n)?n(r):r}(r);var f=function(e){return"cx"in e&&Sg(e.cx)}(o),p=cy(r,!0);if(f&&("insideStart"===a||"insideEnd"===a||"end"===a))return function(e,t,n){var r,o,a=e.position,i=e.viewBox,s=e.offset,l=e.className,c=i,u=c.cx,d=c.cy,f=c.innerRadius,p=c.outerRadius,m=c.startAngle,h=c.endAngle,g=c.clockWise,y=(f+p)/2,w=function(e,t){return _g(t-e)*Math.min(Math.abs(t-e),360)}(m,h),b=w>=0?1:-1;"insideStart"===a?(r=m+b*s,o=g):"insideEnd"===a?(r=h-b*s,o=!g):"end"===a&&(r=h+b*s,o=g),o=w<=0?o:!o;var x=Uj(u,d,y,r),N=Uj(u,d,y,r+359*(o?1:-1)),E="M".concat(x.x,",").concat(x.y,"\n A").concat(y,",").concat(y,",0,1,").concat(o?0:1,",\n ").concat(N.x,",").concat(N.y),M=Mg()(e.id)?Dg("recharts-radial-line-"):e.id;return v().createElement("text",Hj({},n,{dominantBaseline:"central",className:Oe("recharts-radial-bar-label",l)}),v().createElement("defs",null,v().createElement("path",{id:M,d:E})),v().createElement("textPath",{xlinkHref:"#".concat(M)},t))}(r,t,p);var m=f?function(e){var t=e.viewBox,n=e.offset,r=e.position,o=t,a=o.cx,i=o.cy,s=o.innerRadius,l=o.outerRadius,c=(o.startAngle+o.endAngle)/2;if("outside"===r){var u=Uj(a,i,l+n,c),_x=u.x;return{x:_x,y:u.y,textAnchor:_x>=a?"start":"end",verticalAnchor:"middle"}}if("center"===r)return{x:a,y:i,textAnchor:"middle",verticalAnchor:"middle"};if("centerTop"===r)return{x:a,y:i,textAnchor:"middle",verticalAnchor:"start"};if("centerBottom"===r)return{x:a,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=Uj(a,i,(s+l)/2,c);return{x:d.x,y:d.y,textAnchor:"middle",verticalAnchor:"middle"}}(r):function(e){var t=e.viewBox,n=e.parentViewBox,r=e.offset,o=e.position,a=t,i=a.x,s=a.y,l=a.width,c=a.height,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",m=l>=0?1:-1,h=m*r,g=m>0?"end":"start",y=m>0?"start":"end";if("top"===o)return Wj(Wj({},{x:i+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f}),n?{height:Math.max(s-n.y,0),width:l}:{});if("bottom"===o)return Wj(Wj({},{x:i+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p}),n?{height:Math.max(n.y+n.height-(s+c),0),width:l}:{});if("left"===o){var w={x:i-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return Wj(Wj({},w),n?{width:Math.max(w.x-n.x,0),height:c}:{})}if("right"===o){var b={x:i+l+h,y:s+c/2,textAnchor:y,verticalAnchor:"middle"};return Wj(Wj({},b),n?{width:Math.max(n.x+n.width-b.x,0),height:c}:{})}var v=n?{width:l,height:c}:{};return"insideLeft"===o?Wj({x:i+h,y:s+c/2,textAnchor:y,verticalAnchor:"middle"},v):"insideRight"===o?Wj({x:i+l-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},v):"insideTop"===o?Wj({x:i+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},v):"insideBottom"===o?Wj({x:i+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},v):"insideTopLeft"===o?Wj({x:i+h,y:s+d,textAnchor:y,verticalAnchor:p},v):"insideTopRight"===o?Wj({x:i+l-h,y:s+d,textAnchor:g,verticalAnchor:p},v):"insideBottomLeft"===o?Wj({x:i+h,y:s+c-d,textAnchor:y,verticalAnchor:f},v):"insideBottomRight"===o?Wj({x:i+l-h,y:s+c-d,textAnchor:g,verticalAnchor:f},v):Bg()(o)&&(Sg(o.x)||Ig(o.x))&&(Sg(o.y)||Ig(o.y))?Wj({x:i+Cg(o.x,l),y:s+Cg(o.y,c),textAnchor:"end",verticalAnchor:"end"},v):Wj({x:i+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},v)}(r);return v().createElement($x,Hj({className:Oe("recharts-label",u)},p,m,{breakAll:d}),t)}$j.displayName="Label";var Xj=function(e){var t=e.cx,n=e.cy,r=e.angle,o=e.startAngle,a=e.endAngle,i=e.r,s=e.radius,l=e.innerRadius,c=e.outerRadius,u=e.x,d=e.y,f=e.top,p=e.left,m=e.width,h=e.height,g=e.clockWise,y=e.labelViewBox;if(y)return y;if(Sg(m)&&Sg(h)){if(Sg(u)&&Sg(d))return{x:u,y:d,width:m,height:h};if(Sg(f)&&Sg(p))return{x:f,y:p,width:m,height:h}}return Sg(u)&&Sg(d)?{x:u,y:d,width:0,height:0}:Sg(t)&&Sg(n)?{cx:t,cy:n,startAngle:o||r||0,endAngle:a||r||0,innerRadius:l||0,outerRadius:c||s||i||0,clockWise:g}:e.viewBox?e.viewBox:{}};$j.parseViewBox=Xj,$j.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=Xj(e),a=ay(r,$j).map(function(e,n){return(0,w.cloneElement)(e,{viewBox:t||o,key:"label-".concat(n)})});if(!n)return a;var i,s=function(e,t){return e?!0===e?v().createElement($j,{key:"label-implicit",viewBox:t}):jg(e)?v().createElement($j,{key:"label-implicit",viewBox:t,value:e}):(0,w.isValidElement)(e)?e.type===$j?(0,w.cloneElement)(e,{key:"label-implicit",viewBox:t}):v().createElement($j,{key:"label-implicit",content:e,viewBox:t}):Rg()(e)?v().createElement($j,{key:"label-implicit",content:e,viewBox:t}):Bg()(e)?v().createElement($j,Hj({viewBox:t},e,{key:"label-implicit"})):null:null}(e.label,t||o);return[s].concat(function(e){if(Array.isArray(e))return Qj(e)}(i=a)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e,t){if(e){if("string"==typeof e)return Qj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qj(e,t):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())};var qj=function(e,t){var n=e.alwaysShow,r=e.ifOverflow;return n&&(r="extendDomain"),r===t},Jj=o(3916),Kj=o.n(Jj),ek=o(9747),tk=o.n(ek),nk=function(e){return null};nk.displayName="Cell";var rk=o(8090),ok=o.n(rk);function ak(e){return ak="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ak(e)}var ik=["valueAccessor"],sk=["data","dataKey","clockWise","id","textBreakAll"];function lk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ck(){return ck=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ck.apply(this,arguments)}function uk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uk(Object(n),!0).forEach(function(t){fk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fk(e,t,n){return t=function(e){var t=function(e){if("object"!=ak(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ak(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ak(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pk(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var mk=function(e){return Array.isArray(e.value)?ok()(e.value):e.value};function hk(e){var t=e.valueAccessor,n=void 0===t?mk:t,r=pk(e,ik),o=r.data,a=r.dataKey,i=r.clockWise,s=r.id,l=r.textBreakAll,c=pk(r,sk);return o&&o.length?v().createElement(ky,{className:"recharts-label-list"},o.map(function(e,t){var r=Mg()(a)?n(e,t):HS(e&&e.payload,a),o=Mg()(s)?{}:{id:"".concat(s,"-").concat(t)};return v().createElement($j,ck({},cy(e,!0),c,o,{parentViewBox:e.parentViewBox,value:r,textBreakAll:l,viewBox:$j.parseViewBox(Mg()(i)?e:dk(dk({},e),{},{clockWise:i})),key:"label-".concat(t),index:t}))})):null}hk.displayName="LabelList",hk.renderCallByParent=function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.children&&n&&!e.label)return null;var r=ay(e.children,hk).map(function(e,n){return(0,w.cloneElement)(e,{data:t,key:"labelList-".concat(n)})});if(!n)return r;var o,a=function(e,t){return e?!0===e?v().createElement(hk,{key:"labelList-implicit",data:t}):v().isValidElement(e)||Rg()(e)?v().createElement(hk,{key:"labelList-implicit",data:t,content:e}):Bg()(e)?v().createElement(hk,ck({data:t},e,{key:"labelList-implicit"})):null:null}(e.label,t);return[a].concat(function(e){if(Array.isArray(e))return lk(e)}(o=r)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||function(e,t){if(e){if("string"==typeof e)return lk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lk(e,t):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())};var gk=o(1331),yk=o.n(gk),wk=o(3812),bk=o.n(wk);function vk(e){return vk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vk(e)}function xk(){return xk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xk.apply(this,arguments)}function Nk(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ek(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ek(Object(n),!0).forEach(function(t){_k(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ek(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _k(e,t,n){return t=function(e){var t=function(e){if("object"!=vk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vk(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ik=function(e,t,n,r,o){var a,i=n-r;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-i/2,",").concat(t+o),(a+="L ".concat(e+n-i/2-r,",").concat(t+o))+"L ".concat(e,",").concat(t," Z")},Sk={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},jk=function(e){var t=Mk(Mk({},Sk),e),n=(0,w.useRef)(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Nk(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Nk(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,w.useState)(-1),2),o=r[0],a=r[1];(0,w.useEffect)(function(){if(n.current&&n.current.getTotalLength)try{var e=n.current.getTotalLength();e&&a(e)}catch(e){}},[]);var i=t.x,s=t.y,l=t.upperWidth,c=t.lowerWidth,u=t.height,d=t.className,f=t.animationEasing,p=t.animationDuration,m=t.animationBegin,h=t.isUpdateAnimationActive;if(i!==+i||s!==+s||l!==+l||c!==+c||u!==+u||0===l&&0===c||0===u)return null;var g=Oe("recharts-trapezoid",d);return h?v().createElement(Gv,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:u,x:i,y:s},to:{upperWidth:l,lowerWidth:c,height:u,x:i,y:s},duration:p,animationEasing:f,isActive:h},function(e){var r=e.upperWidth,a=e.lowerWidth,i=e.height,s=e.x,l=e.y;return v().createElement(Gv,{canBegin:o>0,from:"0px ".concat(-1===o?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:m,duration:p,easing:f},v().createElement("path",xk({},cy(t,!0),{className:g,d:Ik(s,l,r,a,i),ref:n})))}):v().createElement("g",null,v().createElement("path",xk({},cy(t,!0),{className:g,d:Ik(i,s,l,c,u)})))};function kk(e){return kk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},kk(e)}function Dk(){return Dk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dk.apply(this,arguments)}function Ck(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ak(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ck(Object(n),!0).forEach(function(t){Tk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ck(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Tk(e,t,n){return t=function(e){var t=function(e){if("object"!=kk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=kk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==kk(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ok=function(e){var t=e.cx,n=e.cy,r=e.radius,o=e.angle,a=e.sign,i=e.isExternal,s=e.cornerRadius,l=e.cornerIsExternal,c=s*(i?1:-1)+r,u=Math.asin(s/c)/Pj,d=l?o:o+a*u,f=l?o-a*u:o;return{center:Uj(t,n,c,d),circleTangency:Uj(t,n,r,d),lineTangency:Uj(t,n,c*Math.cos(u*Pj),f),theta:u}},Lk=function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,a=e.startAngle,i=function(e,t){return _g(t-e)*Math.min(Math.abs(t-e),359.999)}(a,e.endAngle),s=a+i,l=Uj(t,n,o,a),c=Uj(t,n,o,s),u="M ".concat(l.x,",").concat(l.y,"\n A ").concat(o,",").concat(o,",0,\n ").concat(+(Math.abs(i)>180),",").concat(+(a>s),",\n ").concat(c.x,",").concat(c.y,"\n ");if(r>0){var d=Uj(t,n,r,a),f=Uj(t,n,r,s);u+="L ".concat(f.x,",").concat(f.y,"\n A ").concat(r,",").concat(r,",0,\n ").concat(+(Math.abs(i)>180),",").concat(+(a<=s),",\n ").concat(d.x,",").concat(d.y," Z")}else u+="L ".concat(t,",").concat(n," Z");return u},zk={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Pk=function(e){var t=Ak(Ak({},zk),e),n=t.cx,r=t.cy,o=t.innerRadius,a=t.outerRadius,i=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=t.className;if(a<o||c===u)return null;var f,p=Oe("recharts-sector",d),m=a-o,h=Cg(i,m,0,!0);return f=h>0&&Math.abs(c-u)<360?function(e){var t=e.cx,n=e.cy,r=e.innerRadius,o=e.outerRadius,a=e.cornerRadius,i=e.forceCornerRadius,s=e.cornerIsExternal,l=e.startAngle,c=e.endAngle,u=_g(c-l),d=Ok({cx:t,cy:n,radius:o,angle:l,sign:u,cornerRadius:a,cornerIsExternal:s}),f=d.circleTangency,p=d.lineTangency,m=d.theta,h=Ok({cx:t,cy:n,radius:o,angle:c,sign:-u,cornerRadius:a,cornerIsExternal:s}),g=h.circleTangency,y=h.lineTangency,w=h.theta,b=s?Math.abs(l-c):Math.abs(l-c)-m-w;if(b<0)return i?"M ".concat(p.x,",").concat(p.y,"\n a").concat(a,",").concat(a,",0,0,1,").concat(2*a,",0\n a").concat(a,",").concat(a,",0,0,1,").concat(2*-a,",0\n "):Lk({cx:t,cy:n,innerRadius:r,outerRadius:o,startAngle:l,endAngle:c});var v="M ".concat(p.x,",").concat(p.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(f.x,",").concat(f.y,"\n A").concat(o,",").concat(o,",0,").concat(+(b>180),",").concat(+(u<0),",").concat(g.x,",").concat(g.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(y.x,",").concat(y.y,"\n ");if(r>0){var x=Ok({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),N=x.circleTangency,E=x.lineTangency,M=x.theta,_=Ok({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),I=_.circleTangency,S=_.lineTangency,j=_.theta,k=s?Math.abs(l-c):Math.abs(l-c)-M-j;if(k<0&&0===a)return"".concat(v,"L").concat(t,",").concat(n,"Z");v+="L".concat(S.x,",").concat(S.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(I.x,",").concat(I.y,"\n A").concat(r,",").concat(r,",0,").concat(+(k>180),",").concat(+(u>0),",").concat(N.x,",").concat(N.y,"\n A").concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(E.x,",").concat(E.y,"Z")}else v+="L".concat(t,",").concat(n,"Z");return v}({cx:n,cy:r,innerRadius:o,outerRadius:a,cornerRadius:Math.min(h,m/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):Lk({cx:n,cy:r,innerRadius:o,outerRadius:a,startAngle:c,endAngle:u}),v().createElement("path",Dk({},cy(t,!0),{className:p,d:f,role:"img"}))},Rk=["option","shapeType","propTransformer","activeClassName","isActive"];function Uk(e){return Uk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uk(e)}function Bk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Fk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bk(Object(n),!0).forEach(function(t){Yk(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bk(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Yk(e,t,n){return t=function(e){var t=function(e){if("object"!=Uk(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Uk(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Uk(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zk(e,t){return Fk(Fk({},t),e)}function Qk(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return v().createElement(rx,n);case"trapezoid":return v().createElement(jk,n);case"sector":return v().createElement(Pk,n);case"symbols":if(function(e){return"symbols"===e}(t))return v().createElement(tb,n);break;default:return null}}function Vk(e){var t,n=e.option,r=e.shapeType,o=e.propTransformer,a=void 0===o?Zk:o,i=e.activeClassName,s=void 0===i?"recharts-active-shape":i,l=e.isActive,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Rk);if((0,w.isValidElement)(n))t=(0,w.cloneElement)(n,Fk(Fk({},c),function(e){return(0,w.isValidElement)(e)?e.props:e}(n)));else if(Rg()(n))t=n(c);else if(yk()(n)&&!bk()(n)){var u=a(n,c);t=v().createElement(Qk,{shapeType:r,elementProps:u})}else{var d=c;t=v().createElement(Qk,{shapeType:r,elementProps:d})}return l?v().createElement(ky,{className:s},t):t}function Wk(e,t){return null!=t&&"trapezoids"in e.props}function Gk(e,t){return null!=t&&"sectors"in e.props}function Hk(e,t){return null!=t&&"points"in e.props}function $k(e,t){var n,r,o=e.x===(null==t||null===(n=t.labelViewBox)||void 0===n?void 0:n.x)||e.x===t.x,a=e.y===(null==t||null===(r=t.labelViewBox)||void 0===r?void 0:r.y)||e.y===t.y;return o&&a}function Xk(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function qk(e,t){var n=e.x===t.x,r=e.y===t.y,o=e.z===t.z;return n&&r&&o}function Jk(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,o=function(e,t){var n;return Wk(e,t)?n="trapezoids":Gk(e,t)?n="sectors":Hk(e,t)&&(n="points"),n}(n,t),a=function(e,t){var n,r;return Wk(e,t)?null===(n=t.tooltipPayload)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.payload)||void 0===n?void 0:n.payload:Gk(e,t)?null===(r=t.tooltipPayload)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.payload)||void 0===r?void 0:r.payload:Hk(e,t)?t.payload:{}}(n,t),i=r.filter(function(e,r){var i=KI()(a,e),s=n.props[o].filter(function(e){var r=function(e,t){var n;return Wk(e,t)?n=$k:Gk(e,t)?n=Xk:Hk(e,t)&&(n=qk),n}(n,t);return r(e,t)}),l=n.props[o].indexOf(s[s.length-1]);return i&&r===l});return r.indexOf(i[i.length-1])}var Kk=["x","y"];function eD(e){return eD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},eD(e)}function tD(){return tD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tD.apply(this,arguments)}function nD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function rD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nD(Object(n),!0).forEach(function(t){oD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function oD(e,t,n){return t=function(e){var t=function(e){if("object"!=eD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=eD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==eD(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aD(e,t){var n=e.x,r=e.y,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Kk),a="".concat(n),i=parseInt(a,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return rD(rD(rD(rD(rD({},t),o),i?{x:i}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function iD(e){return v().createElement(Vk,tD({shapeType:"rectangle",propTransformer:aD,activeClassName:"recharts-active-bar"},e))}var sD,lD=["value","background"];function cD(e){return cD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cD(e)}function uD(){return uD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uD.apply(this,arguments)}function dD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function fD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dD(Object(n),!0).forEach(function(t){yD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function pD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,wD(r.key),r)}}function mD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mD=function(){return!!e})()}function hD(e){return hD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hD(e)}function gD(e,t){return gD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},gD(e,t)}function yD(e,t,n){return(t=wD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wD(e){var t=function(e){if("object"!=cD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cD(t)?t:t+""}var bD=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return yD(e=function(e,t,n){return t=hD(t),function(e,t){if(t&&("object"===cD(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,mD()?Reflect.construct(t,n||[],hD(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!1}),yD(e,"id",Dg("recharts-bar-")),yD(e,"handleAnimationEnd",function(){var t=e.props.onAnimationEnd;e.setState({isAnimationFinished:!0}),t&&t()}),yD(e,"handleAnimationStart",function(){var t=e.props.onAnimationStart;e.setState({isAnimationFinished:!1}),t&&t()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gD(e,t)}(t,e),n=t,r=[{key:"renderRectanglesStatically",value:function(e){var t=this,n=this.props,r=n.shape,o=n.dataKey,a=n.activeIndex,i=n.activeBar,s=cy(this.props,!1);return e&&e.map(function(e,n){var l=n===a,c=l?i:r,u=fD(fD(fD({},s),e),{},{isActive:l,option:c,index:n,dataKey:o,onAnimationStart:t.handleAnimationStart,onAnimationEnd:t.handleAnimationEnd});return v().createElement(ky,uD({className:"recharts-bar-rectangle"},$g(t.props,e,n),{key:"rectangle-".concat(null==e?void 0:e.x,"-").concat(null==e?void 0:e.y,"-").concat(null==e?void 0:e.value,"-").concat(n)}),v().createElement(iD,u))})}},{key:"renderRectanglesWithAnimation",value:function(){var e=this,t=this.props,n=t.data,r=t.layout,o=t.isAnimationActive,a=t.animationBegin,i=t.animationDuration,s=t.animationEasing,l=t.animationId,c=this.state.prevData;return v().createElement(Gv,{begin:a,duration:i,isActive:o,easing:s,from:{t:0},to:{t:1},key:"bar-".concat(l),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(t){var o=t.t,a=n.map(function(e,t){var n=c&&c[t];if(n){var a=Tg(n.x,e.x),i=Tg(n.y,e.y),s=Tg(n.width,e.width),l=Tg(n.height,e.height);return fD(fD({},e),{},{x:a(o),y:i(o),width:s(o),height:l(o)})}if("horizontal"===r){var u=Tg(0,e.height)(o);return fD(fD({},e),{},{y:e.y+e.height-u,height:u})}var d=Tg(0,e.width)(o);return fD(fD({},e),{},{width:d})});return v().createElement(ky,null,e.renderRectanglesStatically(a))})}},{key:"renderRectangles",value:function(){var e=this.props,t=e.data,n=e.isAnimationActive,r=this.state.prevData;return!(n&&t&&t.length)||r&&KI()(r,t)?this.renderRectanglesStatically(t):this.renderRectanglesWithAnimation()}},{key:"renderBackground",value:function(){var e=this,t=this.props,n=t.data,r=t.dataKey,o=t.activeIndex,a=cy(this.props.background,!1);return n.map(function(t,n){t.value;var i=t.background,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(t,lD);if(!i)return null;var l=fD(fD(fD(fD(fD({},s),{},{fill:"#eee"},i),a),$g(e.props,t,n)),{},{onAnimationStart:e.handleAnimationStart,onAnimationEnd:e.handleAnimationEnd,dataKey:r,index:n,className:"recharts-bar-background-rectangle"});return v().createElement(iD,uD({key:"background-bar-".concat(n),option:e.props.background,isActive:n===o},l))})}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.data,o=n.xAxis,a=n.yAxis,i=n.layout,s=ay(n.children,zS);if(!s)return null;var l="vertical"===i?r[0].height/2:r[0].width/2,c=function(e,t){var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:HS(e,t)}},u={clipPath:e?"url(#clipPath-".concat(t,")"):null};return v().createElement(ky,u,s.map(function(e){return v().cloneElement(e,{key:"error-bar-".concat(t,"-").concat(e.props.dataKey),data:r,xAxis:o,yAxis:a,layout:i,offset:l,dataPointFormatter:c})}))}},{key:"render",value:function(){var e=this.props,t=e.hide,n=e.data,r=e.className,o=e.xAxis,a=e.yAxis,i=e.left,s=e.top,l=e.width,c=e.height,u=e.isAnimationActive,d=e.background,f=e.id;if(t||!n||!n.length)return null;var p=this.state.isAnimationFinished,m=Oe("recharts-bar",r),h=o&&o.allowDataOverflow,g=a&&a.allowDataOverflow,y=h||g,w=Mg()(f)?this.id:f;return v().createElement(ky,{className:m},h||g?v().createElement("defs",null,v().createElement("clipPath",{id:"clipPath-".concat(w)},v().createElement("rect",{x:h?i:i-l/2,y:g?s:s-c/2,width:h?l:2*l,height:g?c:2*c}))):null,v().createElement(ky,{className:"recharts-bar-rectangles",clipPath:y?"url(#clipPath-".concat(w,")"):null},d?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(y,w),(!u||p)&&hk.renderCallByParent(this.props,n))}}],o=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curData:e.data,prevData:t.curData}:e.data!==t.curData?{curData:e.data}:null}}],r&&pD(n.prototype,r),o&&pD(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(w.PureComponent);function vD(e){return vD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vD(e)}function xD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_D(r.key),r)}}function ND(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ED(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ND(Object(n),!0).forEach(function(t){MD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ND(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function MD(e,t,n){return(t=_D(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _D(e){var t=function(e){if("object"!=vD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vD(t)?t:t+""}sD=bD,yD(bD,"displayName","Bar"),yD(bD,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!ew.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"}),yD(bD,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,o=e.bandSize,a=e.xAxis,i=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=function(e,t){if(!e)return null;for(var n=0,r=e.length;n<r;n++)if(e[n].item===t)return e[n].position;return null}(r,n);if(!p)return null;var m=t.layout,h=n.type.defaultProps,g=void 0!==h?fD(fD({},h),n.props):n.props,y=g.dataKey,w=g.children,b=g.minPointSize,v="horizontal"===m?i:a,x=c?v.scale.domain():null,N=function(e){var t=e.numericAxis,n=t.scale.domain();if("number"===t.type){var r=Math.min(n[0],n[1]),o=Math.max(n[0],n[1]);return r<=0&&o>=0?0:o<0?o:r}return n[0]}({numericAxis:v}),E=ay(w,nk),_=d.map(function(e,t){var r,d,f,h,g,w;c?r=function(e,t){if(!t||2!==t.length||!Sg(t[0])||!Sg(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),o=[e[0],e[1]];return(!Sg(e[0])||e[0]<n)&&(o[0]=n),(!Sg(e[1])||e[1]>r)&&(o[1]=r),o[0]>r&&(o[0]=r),o[1]<n&&(o[1]=n),o}(c[u+t],x):(r=HS(e,y),Array.isArray(r)||(r=[N,r]));var v=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(n,r){if("number"==typeof e)return e;var o=Sg(n)||function(e){return Mg()(e)}(n);return o?e(n,r):(o||(0,M.A)(!1),t)}}(b,sD.defaultProps.minPointSize)(r[1],t);if("horizontal"===m){var _,I=[i.scale(r[0]),i.scale(r[1])],S=I[0],j=I[1];d=lj({axis:a,ticks:s,bandSize:o,offset:p.offset,entry:e,index:t}),f=null!==(_=null!=j?j:S)&&void 0!==_?_:void 0,h=p.size;var k=S-j;if(g=Number.isNaN(k)?0:k,w={x:d,y:i.y,width:h,height:i.height},Math.abs(v)>0&&Math.abs(g)<Math.abs(v)){var D=_g(g||v)*(Math.abs(v)-Math.abs(g));f-=D,g+=D}}else{var C=[a.scale(r[0]),a.scale(r[1])],A=C[0],T=C[1];d=A,f=lj({axis:i,ticks:l,bandSize:o,offset:p.offset,entry:e,index:t}),h=T-A,g=p.size,w={x:a.x,y:f,width:a.width,height:g},Math.abs(v)>0&&Math.abs(h)<Math.abs(v)&&(h+=_g(h||v)*(Math.abs(v)-Math.abs(h)))}return fD(fD(fD({},e),{},{x:d,y:f,width:h,height:g,value:c?r:r[1],payload:e,background:w},E&&E[t]&&E[t].props),{},{tooltipPayload:[hj(n,e)],tooltipPosition:{x:d+h/2,y:f+g/2}})});return fD({data:_,layout:m},f)});var ID=function(e,t){var n=e.x,r=e.y,o=t.x,a=t.y;return{x:Math.min(n,o),y:Math.min(r,a),width:Math.abs(o-n),height:Math.abs(a-r)}},SD=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.scale=t}return t=e,n=[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.bandAware,r=t.position;if(void 0!==e){if(r)switch(r){case"start":default:return this.scale(e);case"middle":var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+o;case"end":var a=this.bandwidth?this.bandwidth():0;return this.scale(e)+a}if(n){var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(e)+i}return this.scale(e)}}},{key:"isInRange",value:function(e){var t=this.range(),n=t[0],r=t[t.length-1];return n<=r?e>=n&&e<=r:e>=r&&e<=n}}],r=[{key:"create",value:function(t){return new e(t)}}],n&&xD(t.prototype,n),r&&xD(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();MD(SD,"EPS",1e-4);var jD=function(e){var t=Object.keys(e).reduce(function(t,n){return ED(ED({},t),{},MD({},n,SD.create(e[n])))},{});return ED(ED({},t),{},{apply:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.bandAware,o=n.position;return Kj()(e,function(e,n){return t[n].apply(e,{bandAware:r,position:o})})},isInRange:function(e){return tk()(e,function(e,n){return t[n].isInRange(e)})}})};function kD(){return kD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kD.apply(this,arguments)}function DD(e){return DD="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},DD(e)}function CD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function AD(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?CD(Object(n),!0).forEach(function(t){PD(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CD(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function TD(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RD(r.key),r)}}function OD(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(OD=function(){return!!e})()}function LD(e){return LD=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},LD(e)}function zD(e,t){return zD=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},zD(e,t)}function PD(e,t,n){return(t=RD(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RD(e){var t=function(e){if("object"!=DD(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=DD(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==DD(t)?t:t+""}var UD=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=LD(t),function(e,t){if(t&&("object"===DD(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,OD()?Reflect.construct(t,n||[],LD(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zD(e,t)}(t,e),n=t,r=[{key:"render",value:function(){var e=this.props,n=e.x,r=e.y,o=e.r,a=e.alwaysShow,i=e.clipPathId,s=jg(n),l=jg(r);if(zg(void 0===a,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!s||!l)return null;var c=function(e){var t=e.x,n=e.y,r=e.xAxis,o=e.yAxis,a=jD({x:r.scale,y:o.scale}),i=a.apply({x:t,y:n},{bandAware:!0});return qj(e,"discard")&&!a.isInRange(i)?null:i}(this.props);if(!c)return null;var u=c.x,d=c.y,f=this.props,p=f.shape,m=f.className,h=AD(AD({clipPath:qj(this.props,"hidden")?"url(#".concat(i,")"):void 0},cy(this.props,!0)),{},{cx:u,cy:d});return v().createElement(ky,{className:Oe("recharts-reference-dot",m)},t.renderDot(p,h),$j.renderCallByParent(this.props,{x:u-o,y:d-o,width:2*o,height:2*o}))}}],r&&TD(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(v().Component);PD(UD,"displayName","ReferenceDot"),PD(UD,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1}),PD(UD,"renderDot",function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):Rg()(e)?e(t):v().createElement(Ib,kD({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"}))});var BD=o(2426),FD=o.n(BD),YD=o(7309),ZD=o.n(YD),QD=o(104),VD=o.n(QD)()(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),WD=(0,w.createContext)(void 0),GD=(0,w.createContext)(void 0),HD=(0,w.createContext)(void 0),$D=(0,w.createContext)({}),XD=(0,w.createContext)(void 0),qD=(0,w.createContext)(0),JD=(0,w.createContext)(0),KD=function(e){var t=e.state,n=t.xAxisMap,r=t.yAxisMap,o=t.offset,a=e.clipPathId,i=e.children,s=e.width,l=e.height,c=VD(o);return v().createElement(WD.Provider,{value:n},v().createElement(GD.Provider,{value:r},v().createElement($D.Provider,{value:o},v().createElement(HD.Provider,{value:c},v().createElement(XD.Provider,{value:a},v().createElement(qD.Provider,{value:l},v().createElement(JD.Provider,{value:s},i)))))))},eC=function(e){var t=(0,w.useContext)(WD);null==t&&(0,M.A)(!1);var n=t[e];return null==n&&(0,M.A)(!1),n},tC=function(e){var t=(0,w.useContext)(GD);null==t&&(0,M.A)(!1);var n=t[e];return null==n&&(0,M.A)(!1),n},nC=function(){return(0,w.useContext)(JD)},rC=function(){return(0,w.useContext)(qD)};function oC(e){return oC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oC(e)}function aC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fC(r.key),r)}}function iC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(iC=function(){return!!e})()}function sC(e){return sC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},sC(e)}function lC(e,t){return lC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lC(e,t)}function cC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function uC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?cC(Object(n),!0).forEach(function(t){dC(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function dC(e,t,n){return(t=fC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fC(e){var t=function(e){if("object"!=oC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=oC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oC(t)?t:t+""}function pC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mC(){return mC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mC.apply(this,arguments)}function hC(e){var t=e.x,n=e.y,r=e.segment,o=e.xAxisId,a=e.yAxisId,i=e.shape,s=e.className,l=e.alwaysShow,c=(0,w.useContext)(XD),u=eC(o),d=tC(a),f=(0,w.useContext)(HD);if(!c||!f)return null;zg(void 0===l,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var p=function(e,t,n,r,o,a,i,s,l){var c=o.x,u=o.y,d=o.width,f=o.height;if(n){var p=l.y,m=e.y.apply(p,{position:a});if(qj(l,"discard")&&!e.y.isInRange(m))return null;var h=[{x:c+d,y:m},{x:c,y:m}];return"left"===s?h.reverse():h}if(t){var g=l.x,y=e.x.apply(g,{position:a});if(qj(l,"discard")&&!e.x.isInRange(y))return null;var w=[{x:y,y:u+f},{x:y,y:u}];return"top"===i?w.reverse():w}if(r){var b=l.segment.map(function(t){return e.apply(t,{position:a})});return qj(l,"discard")&&FD()(b,function(t){return!e.isInRange(t)})?null:b}return null}(jD({x:u.scale,y:d.scale}),jg(t),jg(n),r&&2===r.length,f,e.position,u.orientation,d.orientation,e);if(!p)return null;var m,h=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return pC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pC(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(p,2),g=h[0],y=g.x,b=g.y,x=h[1],N=x.x,E=x.y,M=uC(uC({clipPath:qj(e,"hidden")?"url(#".concat(c,")"):void 0},cy(e,!0)),{},{x1:y,y1:b,x2:N,y2:E});return v().createElement(ky,{className:Oe("recharts-reference-line",s)},function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):Rg()(e)?e(t):v().createElement("line",mC({},t,{className:"recharts-reference-line-line"}))}(i,M),$j.renderCallByParent(e,ID({x:(m={x1:y,y1:b,x2:N,y2:E}).x1,y:m.y1},{x:m.x2,y:m.y2})))}var gC=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=sC(t),function(e,t){if(t&&("object"===oC(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,iC()?Reflect.construct(t,n||[],sC(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lC(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return v().createElement(hC,this.props)}}])&&aC(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(v().Component);function yC(){return yC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yC.apply(this,arguments)}function wC(e){return wC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wC(e)}function bC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function vC(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bC(Object(n),!0).forEach(function(t){_C(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bC(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function xC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,IC(r.key),r)}}function NC(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(NC=function(){return!!e})()}function EC(e){return EC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},EC(e)}function MC(e,t){return MC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},MC(e,t)}function _C(e,t,n){return(t=IC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IC(e){var t=function(e){if("object"!=wC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wC(t)?t:t+""}dC(gC,"displayName","ReferenceLine"),dC(gC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});var SC=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=EC(t),function(e,t){if(t&&("object"===wC(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,NC()?Reflect.construct(t,n||[],EC(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MC(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){var e=this.props,n=e.x1,r=e.x2,o=e.y1,a=e.y2,i=e.className,s=e.alwaysShow,l=e.clipPathId;zg(void 0===s,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var c=jg(n),u=jg(r),d=jg(o),f=jg(a),p=this.props.shape;if(!(c||u||d||f||p))return null;var m=function(e,t,n,r,o){var a=o.x1,i=o.x2,s=o.y1,l=o.y2,c=o.xAxis,u=o.yAxis;if(!c||!u)return null;var d=jD({x:c.scale,y:u.scale}),f={x:e?d.x.apply(a,{position:"start"}):d.x.rangeMin,y:n?d.y.apply(s,{position:"start"}):d.y.rangeMin},p={x:t?d.x.apply(i,{position:"end"}):d.x.rangeMax,y:r?d.y.apply(l,{position:"end"}):d.y.rangeMax};return!qj(o,"discard")||d.isInRange(f)&&d.isInRange(p)?ID(f,p):null}(c,u,d,f,this.props);if(!m&&!p)return null;var h=qj(this.props,"hidden")?"url(#".concat(l,")"):void 0;return v().createElement(ky,{className:Oe("recharts-reference-area",i)},t.renderRect(p,vC(vC({clipPath:h},cy(this.props,!0)),m)),$j.renderCallByParent(this.props,m))}}])&&xC(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(v().Component);function jC(e){return function(e){if(Array.isArray(e))return kC(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return kC(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kC(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function kC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}_C(SC,"displayName","ReferenceArea"),_C(SC,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1}),_C(SC,"renderRect",function(e,t){return v().isValidElement(e)?v().cloneElement(e,t):Rg()(e)?e(t):v().createElement(rx,yC({},t,{className:"recharts-reference-area-rect"}))});var DC=function(e,t,n,r,o){var a=ay(e,gC),i=ay(e,UD),s=[].concat(jC(a),jC(i)),l=ay(e,SC),c="".concat(r,"Id"),u=r[0],d=t;if(s.length&&(d=s.reduce(function(e,t){if(t.props[c]===n&&qj(t.props,"extendDomain")&&Sg(t.props[u])){var r=t.props[u];return[Math.min(e[0],r),Math.max(e[1],r)]}return e},d)),l.length){var f="".concat(u,"1"),p="".concat(u,"2");d=l.reduce(function(e,t){if(t.props[c]===n&&qj(t.props,"extendDomain")&&Sg(t.props[f])&&Sg(t.props[p])){var r=t.props[f],o=t.props[p];return[Math.min(e[0],r,o),Math.max(e[1],r,o)]}return e},d)}return o&&o.length&&(d=o.reduce(function(e,t){return Sg(t)?[Math.min(e[0],t),Math.max(e[1],t)]:e},d)),d},CC=o(228),AC=new(o.n(CC)()),TC="recharts.syncMouseEvents";function OC(e){return OC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},OC(e)}function LC(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PC(r.key),r)}}function zC(e,t,n){return(t=PC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PC(e){var t=function(e){if("object"!=OC(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=OC(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==OC(t)?t:t+""}var RC=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),zC(this,"activeIndex",0),zC(this,"coordinateList",[]),zC(this,"layout","horizontal")},t=[{key:"setDetails",value:function(e){var t,n=e.coordinateList,r=void 0===n?null:n,o=e.container,a=void 0===o?null:o,i=e.layout,s=void 0===i?null:i,l=e.offset,c=void 0===l?null:l,u=e.mouseHandlerCallback,d=void 0===u?null:u;this.coordinateList=null!==(t=null!=r?r:this.coordinateList)&&void 0!==t?t:[],this.container=null!=a?a:this.container,this.layout=null!=s?s:this.layout,this.offset=null!=c?c:this.offset,this.mouseHandlerCallback=null!=d?d:this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(e){if(0!==this.coordinateList.length)switch(e.key){case"ArrowRight":if("horizontal"!==this.layout)return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break;case"ArrowLeft":if("horizontal"!==this.layout)return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse()}}},{key:"setIndex",value:function(e){this.activeIndex=e}},{key:"spoofMouse",value:function(){var e,t;if("horizontal"===this.layout&&0!==this.coordinateList.length){var n=this.container.getBoundingClientRect(),r=n.x,o=n.y,a=n.height,i=this.coordinateList[this.activeIndex].coordinate,s=(null===(e=window)||void 0===e?void 0:e.scrollX)||0,l=(null===(t=window)||void 0===t?void 0:t.scrollY)||0,c=r+i+s,u=o+this.offset.top+a/2+l;this.mouseHandlerCallback({pageX:c,pageY:u})}}}],t&&LC(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function UC(){}function BC(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function FC(e){this._context=e}function YC(e){this._context=e}function ZC(e){this._context=e}FC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:BC(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:BC(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},YC.prototype={areaStart:UC,areaEnd:UC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:BC(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ZC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:BC(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};class QC{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}function VC(e){this._context=e}function WC(e){this._context=e}function GC(e){return new WC(e)}function HC(e){return e<0?-1:1}function $C(e,t,n){var r=e._x1-e._x0,o=t-e._x1,a=(e._y1-e._y0)/(r||o<0&&-0),i=(n-e._y1)/(o||r<0&&-0),s=(a*o+i*r)/(r+o);return(HC(a)+HC(i))*Math.min(Math.abs(a),Math.abs(i),.5*Math.abs(s))||0}function XC(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function qC(e,t,n){var r=e._x0,o=e._y0,a=e._x1,i=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,o+s*t,a-s,i-s*n,a,i)}function JC(e){this._context=e}function KC(e){this._context=new eA(e)}function eA(e){this._context=e}function tA(e){this._context=e}function nA(e){var t,n,r=e.length-1,o=new Array(r),a=new Array(r),i=new Array(r);for(o[0]=0,a[0]=2,i[0]=e[0]+2*e[1],t=1;t<r-1;++t)o[t]=1,a[t]=4,i[t]=4*e[t]+2*e[t+1];for(o[r-1]=2,a[r-1]=7,i[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=o[t]/a[t-1],a[t]-=n,i[t]-=n*i[t-1];for(o[r-1]=i[r-1]/a[r-1],t=r-2;t>=0;--t)o[t]=(i[t]-o[t+1])/a[t];for(a[r-1]=(e[r]+o[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-o[t+1];return[o,a]}function rA(e,t){this._context=e,this._t=t}function oA(e){return e[0]}function aA(e){return e[1]}function iA(e,t){var n=Uw(!0),r=null,o=GC,a=null,i=Ww(s);function s(s){var l,c,u,d=(s=YI(s)).length,f=!1;for(null==r&&(a=o(u=i())),l=0;l<=d;++l)!(l<d&&n(c=s[l],l,s))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(c,l,s),+t(c,l,s));if(u)return a=null,u+""||null}return e="function"==typeof e?e:void 0===e?oA:Uw(e),t="function"==typeof t?t:void 0===t?aA:Uw(t),s.x=function(t){return arguments.length?(e="function"==typeof t?t:Uw(+t),s):e},s.y=function(e){return arguments.length?(t="function"==typeof e?e:Uw(+e),s):t},s.defined=function(e){return arguments.length?(n="function"==typeof e?e:Uw(!!e),s):n},s.curve=function(e){return arguments.length?(o=e,null!=r&&(a=o(r)),s):o},s.context=function(e){return arguments.length?(null==e?r=a=null:a=o(r=e),s):r},s}function sA(e,t,n){var r=null,o=Uw(!0),a=null,i=GC,s=null,l=Ww(c);function c(c){var u,d,f,p,m,h=(c=YI(c)).length,g=!1,y=new Array(h),w=new Array(h);for(null==a&&(s=i(m=l())),u=0;u<=h;++u){if(!(u<h&&o(p=c[u],u,c))===g)if(g=!g)d=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=u-1;f>=d;--f)s.point(y[f],w[f]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+e(p,u,c),w[u]=+t(p,u,c),s.point(r?+r(p,u,c):y[u],n?+n(p,u,c):w[u]))}if(m)return s=null,m+""||null}function u(){return iA().defined(o).curve(i).context(a)}return e="function"==typeof e?e:void 0===e?oA:Uw(+e),t="function"==typeof t?t:Uw(void 0===t?0:+t),n="function"==typeof n?n:void 0===n?aA:Uw(+n),c.x=function(t){return arguments.length?(e="function"==typeof t?t:Uw(+t),r=null,c):e},c.x0=function(t){return arguments.length?(e="function"==typeof t?t:Uw(+t),c):e},c.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:Uw(+e),c):r},c.y=function(e){return arguments.length?(t="function"==typeof e?e:Uw(+e),n=null,c):t},c.y0=function(e){return arguments.length?(t="function"==typeof e?e:Uw(+e),c):t},c.y1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Uw(+e),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(e){return arguments.length?(o="function"==typeof e?e:Uw(!!e),c):o},c.curve=function(e){return arguments.length?(i=e,null!=a&&(s=i(a)),c):i},c.context=function(e){return arguments.length?(null==e?a=s=null:s=i(a=e),c):a},c}function lA(e){return lA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lA(e)}function cA(){return cA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cA.apply(this,arguments)}function uA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function dA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uA(Object(n),!0).forEach(function(t){fA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fA(e,t,n){return t=function(e){var t=function(e){if("object"!=lA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=lA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==lA(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}VC.prototype={areaStart:UC,areaEnd:UC,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}},WC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}},JC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:qC(this,this._t0,XC(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(t=+t,(e=+e)!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,qC(this,XC(this,n=$C(this,e,t)),n);break;default:qC(this,this._t0,n=$C(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(KC.prototype=Object.create(JC.prototype)).point=function(e,t){JC.prototype.point.call(this,t,e)},eA.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,a){this._context.bezierCurveTo(t,e,r,n,a,o)}},tA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),2===n)this._context.lineTo(e[1],t[1]);else for(var r=nA(e),o=nA(t),a=0,i=1;i<n;++a,++i)this._context.bezierCurveTo(r[0][a],o[0][a],r[1][a],o[1][a],e[i],t[i]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}},rA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};var pA={curveBasisClosed:function(e){return new YC(e)},curveBasisOpen:function(e){return new ZC(e)},curveBasis:function(e){return new FC(e)},curveBumpX:function(e){return new QC(e,!0)},curveBumpY:function(e){return new QC(e,!1)},curveLinearClosed:function(e){return new VC(e)},curveLinear:GC,curveMonotoneX:function(e){return new JC(e)},curveMonotoneY:function(e){return new KC(e)},curveNatural:function(e){return new tA(e)},curveStep:function(e){return new rA(e,.5)},curveStepAfter:function(e){return new rA(e,1)},curveStepBefore:function(e){return new rA(e,0)}},mA=function(e){return e.x===+e.x&&e.y===+e.y},hA=function(e){return e.x},gA=function(e){return e.y},yA=function(e){var t=e.className,n=e.points,r=e.path,o=e.pathRef;if(!(n&&n.length||r))return null;var a=n&&n.length?function(e){var t,n=e.type,r=void 0===n?"linear":n,o=e.points,a=void 0===o?[]:o,i=e.baseLine,s=e.layout,l=e.connectNulls,c=void 0!==l&&l,u=function(e,t){if(Rg()(e))return e;var n="curve".concat(gw()(e));return"curveMonotone"!==n&&"curveBump"!==n||!t?pA[n]||GC:pA["".concat(n).concat("vertical"===t?"Y":"X")]}(r,s),d=c?a.filter(function(e){return mA(e)}):a;if(Array.isArray(i)){var f=c?i.filter(function(e){return mA(e)}):i,p=d.map(function(e,t){return dA(dA({},e),{},{base:f[t]})});return t="vertical"===s?sA().y(gA).x1(hA).x0(function(e){return e.base.x}):sA().x(hA).y1(gA).y0(function(e){return e.base.y}),t.defined(mA).curve(u),t(p)}return(t="vertical"===s&&Sg(i)?sA().y(gA).x1(hA).x0(i):Sg(i)?sA().x(hA).y1(gA).y0(i):iA().x(hA).y(gA)).defined(mA).curve(u),t(d)}(e):r;return w.createElement("path",cA({},cy(e,!1),Hg(e),{className:Oe("recharts-curve",t),d:a,ref:o}))};function wA(e){return wA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wA(e)}var bA=["x","y","top","left","width","height","className"];function vA(){return vA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vA.apply(this,arguments)}function xA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function NA(e,t,n){return t=function(e){var t=function(e){if("object"!=wA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=wA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==wA(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var EA=function(e,t,n,r,o,a){return"M".concat(e,",").concat(o,"v").concat(r,"M").concat(a,",").concat(t,"h").concat(n)},MA=function(e){var t=e.x,n=void 0===t?0:t,r=e.y,o=void 0===r?0:r,a=e.top,i=void 0===a?0:a,s=e.left,l=void 0===s?0:s,c=e.width,u=void 0===c?0:c,d=e.height,f=void 0===d?0:d,p=e.className,m=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xA(Object(n),!0).forEach(function(t){NA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({x:n,y:o,top:i,left:l,width:u,height:f},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,bA));return Sg(n)&&Sg(o)&&Sg(u)&&Sg(f)&&Sg(i)&&Sg(l)?v().createElement("path",vA({},cy(m,!0),{className:Oe("recharts-cross",p),d:EA(n,o,u,f,i,l)})):null};function _A(e){var t=e.cx,n=e.cy,r=e.radius,o=e.startAngle,a=e.endAngle;return{points:[Uj(t,n,r,o),Uj(t,n,r,a)],cx:t,cy:n,radius:r,startAngle:o,endAngle:a}}function IA(e,t,n){var r,o,a,i;if("horizontal"===e)a=r=t.x,o=n.top,i=n.top+n.height;else if("vertical"===e)i=o=t.y,r=n.left,a=n.left+n.width;else if(null!=t.cx&&null!=t.cy){if("centric"!==e)return _A(t);var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,d=t.angle,f=Uj(s,l,c,d),p=Uj(s,l,u,d);r=f.x,o=f.y,a=p.x,i=p.y}return[{x:r,y:o},{x:a,y:i}]}function SA(e){return SA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},SA(e)}function jA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function kA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jA(Object(n),!0).forEach(function(t){DA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DA(e,t,n){return t=function(e){var t=function(e){if("object"!=SA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=SA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==SA(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CA(e){var t,n,r,o=e.element,a=e.tooltipEventType,i=e.isActive,s=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,d=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,m=null!==(t=o.props.cursor)&&void 0!==t?t:null===(n=o.type.defaultProps)||void 0===n?void 0:n.cursor;if(!o||!m||!i||!s||"ScatterChart"!==p&&"axis"!==a)return null;var h=yA;if("ScatterChart"===p)r=s,h=MA;else if("BarChart"===p)r=function(e,t,n,r){var o=r/2;return{stroke:"none",fill:"#ccc",x:"horizontal"===e?t.x-o:n.left+.5,y:"horizontal"===e?n.top+.5:t.y-o,width:"horizontal"===e?r:n.width-1,height:"horizontal"===e?n.height-1:r}}(f,s,c,d),h=rx;else if("radial"===f){var g=_A(s),y=g.cx,b=g.cy,v=g.radius;r={cx:y,cy:b,startAngle:g.startAngle,endAngle:g.endAngle,innerRadius:v,outerRadius:v},h=Pk}else r={points:IA(f,s,c)},h=yA;var x=kA(kA(kA(kA({stroke:"#ccc",pointerEvents:"none"},c),r),cy(m,!1)),{},{payload:l,payloadIndex:u,className:Oe("recharts-tooltip-cursor",m.className)});return(0,w.isValidElement)(m)?(0,w.cloneElement)(m,x):(0,w.createElement)(h,x)}var AA=["item"],TA=["children","className","width","height","style","compact","title","desc"];function OA(e){return OA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},OA(e)}function LA(){return LA=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LA.apply(this,arguments)}function zA(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||ZA(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PA(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function RA(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,HA(r.key),r)}}function UA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(UA=function(){return!!e})()}function BA(e){return BA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BA(e)}function FA(e,t){return FA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},FA(e,t)}function YA(e){return function(e){if(Array.isArray(e))return QA(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ZA(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZA(e,t){if(e){if("string"==typeof e)return QA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QA(e,t):void 0}}function QA(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function VA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function WA(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VA(Object(n),!0).forEach(function(t){GA(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VA(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function GA(e,t,n){return(t=HA(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HA(e){var t=function(e){if("object"!=OA(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=OA(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==OA(t)?t:t+""}var $A={xAxis:["bottom","top"],yAxis:["left","right"]},XA={width:"100%",height:"100%"},qA={x:0,y:0};function JA(e){return e}var KA=function(e,t){var n=t.graphicalItems,r=t.dataStartIndex,o=t.dataEndIndex,a=(null!=n?n:[]).reduce(function(e,t){var n=t.props.data;return n&&n.length?[].concat(YA(e),YA(n)):e},[]);return a.length>0?a:e&&e.length&&Sg(r)&&Sg(o)?e.slice(r,o+1):[]};function eT(e){return"number"===e?[0,"auto"]:void 0}var tT=function(e,t,n,r){var o=e.graphicalItems,a=e.tooltipAxis,i=KA(t,e);return n<0||!o||!o.length||n>=i.length?null:o.reduce(function(o,s){var l,c,u=null!==(l=s.props.data)&&void 0!==l?l:t;return u&&e.dataStartIndex+e.dataEndIndex!==0&&e.dataEndIndex-e.dataStartIndex>=n&&(u=u.slice(e.dataStartIndex,e.dataEndIndex+1)),(c=a.dataKey&&!a.allowDuplicatedCategory?Og(void 0===u?i:u,a.dataKey,r):u&&u[n]||i[n])?[].concat(YA(o),[hj(s,c)]):o},[])},nT=function(e,t,n,r){var o=r||{x:e.chartX,y:e.chartY},a=function(e,t){return"horizontal"===t?e.x:"vertical"===t?e.y:"centric"===t?e.angle:e.radius}(o,n),i=e.orderedTooltipTicks,s=e.tooltipAxis,l=e.tooltipTicks,c=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,i=null!==(t=null==n?void 0:n.length)&&void 0!==t?t:0;if(i<=1)return 0;if(o&&"angleAxis"===o.axisType&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var s=o.range,l=0;l<i;l++){var c=l>0?r[l-1].coordinate:r[i-1].coordinate,u=r[l].coordinate,d=l>=i-1?r[0].coordinate:r[l+1].coordinate,f=void 0;if(_g(u-c)!==_g(d-u)){var p=[];if(_g(d-u)===_g(s[1]-s[0])){f=d;var m=u+s[1]-s[0];p[0]=Math.min(m,(m+c)/2),p[1]=Math.max(m,(m+c)/2)}else{f=c;var h=d+s[1]-s[0];p[0]=Math.min(u,(h+u)/2),p[1]=Math.max(u,(h+u)/2)}var g=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>g[0]&&e<=g[1]||e>=p[0]&&e<=p[1]){a=r[l].index;break}}else{var y=Math.min(c,d),w=Math.max(c,d);if(e>(y+u)/2&&e<=(w+u)/2){a=r[l].index;break}}}else for(var b=0;b<i;b++)if(0===b&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b>0&&b<i-1&&e>(n[b].coordinate+n[b-1].coordinate)/2&&e<=(n[b].coordinate+n[b+1].coordinate)/2||b===i-1&&e>(n[b].coordinate+n[b-1].coordinate)/2){a=n[b].index;break}return a}(a,i,l,s);if(c>=0&&l){var u=l[c]&&l[c].value,d=tT(e,t,c,u),f=function(e,t,n,r){var o=t.find(function(e){return e&&e.index===n});if(o){if("horizontal"===e)return{x:o.coordinate,y:r.y};if("vertical"===e)return{x:r.x,y:o.coordinate};if("centric"===e){var a=o.coordinate,i=r.radius;return WA(WA(WA({},r),Uj(r.cx,r.cy,i,a)),{},{angle:a,radius:i})}var s=o.coordinate,l=r.angle;return WA(WA(WA({},r),Uj(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return qA}(n,i,c,o);return{activeTooltipIndex:c,activeLabel:u,activePayload:d,activeCoordinate:f}}return null},rT=function(e,t){var n=t.axisType,r=void 0===n?"xAxis":n,o=t.AxisComp,a=t.graphicalItems,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.children,u="".concat(r,"Id"),d=ay(c,o),f={};return d&&d.length?f=function(e,t){var n=t.axes,r=t.graphicalItems,o=t.axisType,a=t.axisIdKey,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=e.stackOffset,f=KS(c,o);return n.reduce(function(t,n){var p,m=void 0!==n.type.defaultProps?WA(WA({},n.type.defaultProps),n.props):n.props,h=m.type,g=m.dataKey,y=m.allowDataOverflow,w=m.allowDuplicatedCategory,b=m.scale,v=m.ticks,x=m.includeHidden,N=m[a];if(t[N])return t;var E,M,_,I=KA(e.data,{graphicalItems:r.filter(function(e){var t;return(a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a])===N}),dataStartIndex:s,dataEndIndex:l}),S=I.length;(function(e,t,n){if("number"===n&&!0===t&&Array.isArray(e)){var r=null==e?void 0:e[0],o=null==e?void 0:e[1];if(r&&o&&Sg(r)&&Sg(o))return!0}return!1})(m.domain,y,h)&&(E=fj(m.domain,null,y),!f||"number"!==h&&"auto"===b||(_=$S(I,g,"category")));var j=eT(h);if(!E||0===E.length){var k,D=null!==(k=m.domain)&&void 0!==k?k:j;if(g){if(E=$S(I,g,h),"category"===h&&f){var C=function(e){if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++){if(n[e[r]])return!0;n[e[r]]=!0}return!1}(E);w&&C?(M=E,E=xy()(0,S)):w||(E=mj(D,E,n).reduce(function(e,t){return e.indexOf(t)>=0?e:[].concat(YA(e),[t])},[]))}else if("category"===h)E=w?E.filter(function(e){return""!==e&&!Mg()(e)}):mj(D,E,n).reduce(function(e,t){return e.indexOf(t)>=0||""===t||Mg()(t)?e:[].concat(YA(e),[t])},[]);else if("number"===h){var A=function(e,t,n,r,o){var a=t.map(function(t){return qS(e,t,n,o,r)}).filter(function(e){return!Mg()(e)});return a&&a.length?a.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0]):null}(I,r.filter(function(e){var t,n,r=a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===N&&(x||!o)}),g,o,c);A&&(E=A)}!f||"number"!==h&&"auto"===b||(_=$S(I,g,"category"))}else E=f?xy()(0,S):i&&i[N]&&i[N].hasStack&&"number"===h?"expand"===d?[0,1]:cj(i[N].stackGroups,s,l):JS(I,r.filter(function(e){var t=a in e.props?e.props[a]:e.type.defaultProps[a],n="hide"in e.props?e.props.hide:e.type.defaultProps.hide;return t===N&&(x||!n)}),h,c,!0);if("number"===h)E=DC(u,E,N,o,v),D&&(E=fj(D,E,y));else if("category"===h&&D){var T=D;E.every(function(e){return T.indexOf(e)>=0})&&(E=T)}}return WA(WA({},t),{},GA({},N,WA(WA({},m),{},{axisType:o,domain:E,categoricalDomain:_,duplicateDomain:M,originalDomain:null!==(p=m.domain)&&void 0!==p?p:j,isCategorical:f,layout:c})))},{})}(e,{axes:d,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:i,dataStartIndex:s,dataEndIndex:l}):a&&a.length&&(f=function(e,t){var n=t.graphicalItems,r=t.Axis,o=t.axisType,a=t.axisIdKey,i=t.stackGroups,s=t.dataStartIndex,l=t.dataEndIndex,c=e.layout,u=e.children,d=KA(e.data,{graphicalItems:n,dataStartIndex:s,dataEndIndex:l}),f=d.length,p=KS(c,o),m=-1;return n.reduce(function(e,t){var h,g=(void 0!==t.type.defaultProps?WA(WA({},t.type.defaultProps),t.props):t.props)[a],y=eT("number");return e[g]?e:(m++,p?h=xy()(0,f):i&&i[g]&&i[g].hasStack?(h=cj(i[g].stackGroups,s,l),h=DC(u,h,g,o)):(h=fj(y,JS(d,n.filter(function(e){var t,n,r=a in e.props?e.props[a]:null===(t=e.type.defaultProps)||void 0===t?void 0:t[a],o="hide"in e.props?e.props.hide:null===(n=e.type.defaultProps)||void 0===n?void 0:n.hide;return r===g&&!o}),"number",c),r.defaultProps.allowDataOverflow),h=DC(u,h,g,o)),WA(WA({},e),{},GA({},g,WA(WA({axisType:o},r.defaultProps),{},{hide:!0,orientation:vg()($A,"".concat(o,".").concat(m%2),null),domain:h,originalDomain:y,isCategorical:p,layout:c}))))},{})}(e,{Axis:o,graphicalItems:a,axisType:r,axisIdKey:u,stackGroups:i,dataStartIndex:s,dataEndIndex:l})),f},oT=function(e){var t=e.children,n=e.defaultShowTooltip,r=iy(t,Aj),o=0,a=0;return e.data&&0!==e.data.length&&(a=e.data.length-1),r&&r.props&&(r.props.startIndex>=0&&(o=r.props.startIndex),r.props.endIndex>=0&&(a=r.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:Boolean(n)}},aT=function(e){return"horizontal"===e?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:"vertical"===e?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:"centric"===e?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},iT=function(e,t){return"xAxis"===t?e[t].width:"yAxis"===t?e[t].height:void 0},sT=["type","layout","connectNulls","ref"],lT=["key"];function cT(e){return cT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cT(e)}function uT(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function dT(){return dT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dT.apply(this,arguments)}function fT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function pT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fT(Object(n),!0).forEach(function(t){vT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function mT(e){return function(e){if(Array.isArray(e))return hT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return hT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hT(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function gT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,xT(r.key),r)}}function yT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(yT=function(){return!!e})()}function wT(e){return wT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},wT(e)}function bT(e,t){return bT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},bT(e,t)}function vT(e,t,n){return(t=xT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xT(e){var t=function(e){if("object"!=cT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=cT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==cT(t)?t:t+""}var NT=function(e){function t(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return vT(e=function(e,t,n){return t=wT(t),function(e,t){if(t&&("object"===cT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,yT()?Reflect.construct(t,n||[],wT(e).constructor):t.apply(e,n))}(this,t,[].concat(r)),"state",{isAnimationFinished:!0,totalLength:0}),vT(e,"generateSimpleStrokeDasharray",function(e,t){return"".concat(t,"px ").concat(e-t,"px")}),vT(e,"getStrokeDasharray",function(n,r,o){var a=o.reduce(function(e,t){return e+t});if(!a)return e.generateSimpleStrokeDasharray(r,n);for(var i=Math.floor(n/a),s=n%a,l=r-n,c=[],u=0,d=0;u<o.length;d+=o[u],++u)if(d+o[u]>s){c=[].concat(mT(o.slice(0,u)),[s-d]);break}var f=c.length%2==0?[0,l]:[l];return[].concat(mT(t.repeat(o,i)),mT(c),f).map(function(e){return"".concat(e,"px")}).join(", ")}),vT(e,"id",Dg("recharts-line-")),vT(e,"pathRef",function(t){e.mainCurve=t}),vT(e,"handleAnimationEnd",function(){e.setState({isAnimationFinished:!0}),e.props.onAnimationEnd&&e.props.onAnimationEnd()}),vT(e,"handleAnimationStart",function(){e.setState({isAnimationFinished:!1}),e.props.onAnimationStart&&e.props.onAnimationStart()}),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bT(e,t)}(t,e),n=t,r=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();this.setState({totalLength:e})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var e=this.getTotalLength();e!==this.state.totalLength&&this.setState({totalLength:e})}}},{key:"getTotalLength",value:function(){var e=this.mainCurve;try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(e,t){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var n=this.props,r=n.points,o=n.xAxis,a=n.yAxis,i=n.layout,s=ay(n.children,zS);if(!s)return null;var l=function(e,t){return{x:e.x,y:e.y,value:e.value,errorVal:HS(e.payload,t)}},c={clipPath:e?"url(#clipPath-".concat(t,")"):null};return v().createElement(ky,c,s.map(function(e){return v().cloneElement(e,{key:"bar-".concat(e.props.dataKey),data:r,xAxis:o,yAxis:a,layout:i,dataPointFormatter:l})}))}},{key:"renderDots",value:function(e,n,r){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.dot,i=o.points,s=o.dataKey,l=cy(this.props,!1),c=cy(a,!0),u=i.map(function(e,n){var r=pT(pT(pT({key:"dot-".concat(n),r:3},l),c),{},{index:n,cx:e.x,cy:e.y,value:e.value,dataKey:s,payload:e.payload,points:i});return t.renderDotItem(a,r)}),d={clipPath:e?"url(#clipPath-".concat(n?"":"dots-").concat(r,")"):null};return v().createElement(ky,dT({className:"recharts-line-dots",key:"dots"},d),u)}},{key:"renderCurveStatically",value:function(e,t,n,r){var o=this.props,a=o.type,i=o.layout,s=o.connectNulls,l=(o.ref,uT(o,sT)),c=pT(pT(pT({},cy(l,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:t?"url(#clipPath-".concat(n,")"):null,points:e},r),{},{type:a,layout:i,connectNulls:s});return v().createElement(yA,dT({},c,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(e,t){var n=this,r=this.props,o=r.points,a=r.strokeDasharray,i=r.isAnimationActive,s=r.animationBegin,l=r.animationDuration,c=r.animationEasing,u=r.animationId,d=r.animateNewValues,f=r.width,p=r.height,m=this.state,h=m.prevPoints,g=m.totalLength;return v().createElement(Gv,{begin:s,duration:l,isActive:i,easing:c,from:{t:0},to:{t:1},key:"line-".concat(u),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(r){var i=r.t;if(h){var s=h.length/o.length,l=o.map(function(e,t){var n=Math.floor(t*s);if(h[n]){var r=h[n],o=Tg(r.x,e.x),a=Tg(r.y,e.y);return pT(pT({},e),{},{x:o(i),y:a(i)})}if(d){var l=Tg(2*f,e.x),c=Tg(p/2,e.y);return pT(pT({},e),{},{x:l(i),y:c(i)})}return pT(pT({},e),{},{x:e.x,y:e.y})});return n.renderCurveStatically(l,e,t)}var c,u=Tg(0,g)(i);if(a){var m="".concat(a).split(/[,\s]+/gim).map(function(e){return parseFloat(e)});c=n.getStrokeDasharray(u,g,m)}else c=n.generateSimpleStrokeDasharray(g,u);return n.renderCurveStatically(o,e,t,{strokeDasharray:c})})}},{key:"renderCurve",value:function(e,t){var n=this.props,r=n.points,o=n.isAnimationActive,a=this.state,i=a.prevPoints,s=a.totalLength;return o&&r&&r.length&&(!i&&s>0||!KI()(i,r))?this.renderCurveWithAnimation(e,t):this.renderCurveStatically(r,e,t)}},{key:"render",value:function(){var e,t=this.props,n=t.hide,r=t.dot,o=t.points,a=t.className,i=t.xAxis,s=t.yAxis,l=t.top,c=t.left,u=t.width,d=t.height,f=t.isAnimationActive,p=t.id;if(n||!o||!o.length)return null;var m=this.state.isAnimationFinished,h=1===o.length,g=Oe("recharts-line",a),y=i&&i.allowDataOverflow,w=s&&s.allowDataOverflow,b=y||w,x=Mg()(p)?this.id:p,N=null!==(e=cy(r,!1))&&void 0!==e?e:{r:3,strokeWidth:2},E=N.r,M=void 0===E?3:E,_=N.strokeWidth,I=void 0===_?2:_,S=(function(e){return e&&"object"===Kg(e)&&"clipDot"in e}(r)?r:{}).clipDot,j=void 0===S||S,k=2*M+I;return v().createElement(ky,{className:g},y||w?v().createElement("defs",null,v().createElement("clipPath",{id:"clipPath-".concat(x)},v().createElement("rect",{x:y?c:c-u/2,y:w?l:l-d/2,width:y?u:2*u,height:w?d:2*d})),!j&&v().createElement("clipPath",{id:"clipPath-dots-".concat(x)},v().createElement("rect",{x:c-k/2,y:l-k/2,width:u+k,height:d+k}))):null,!h&&this.renderCurve(b,x),this.renderErrorBar(b,x),(h||r)&&this.renderDots(b,j,x),(!f||m)&&hk.renderCallByParent(this.props,o))}}],o=[{key:"getDerivedStateFromProps",value:function(e,t){return e.animationId!==t.prevAnimationId?{prevAnimationId:e.animationId,curPoints:e.points,prevPoints:t.curPoints}:e.points!==t.curPoints?{curPoints:e.points}:null}},{key:"repeat",value:function(e,t){for(var n=e.length%2!=0?[].concat(mT(e),[0]):e,r=[],o=0;o<t;++o)r=[].concat(mT(r),mT(n));return r}},{key:"renderDotItem",value:function(e,t){var n;if(v().isValidElement(e))n=v().cloneElement(e,t);else if(Rg()(e))n=e(t);else{var r=t.key,o=uT(t,lT),a=Oe("recharts-line-dot","boolean"!=typeof e?e.className:"");n=v().createElement(Ib,dT({key:r},o,{className:a}))}return n}}],r&&gT(n.prototype,r),o&&gT(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(w.PureComponent);function ET(e,t,n){if(t<1)return[];if(1===t&&void 0===n)return e;for(var r=[],o=0;o<e.length;o+=t){if(void 0!==n&&!0!==n(e[o]))return;r.push(e[o])}return r}function MT(e,t,n,r,o){if(e*t<e*r||e*t>e*o)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-o)<=0}function _T(e){return _T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_T(e)}function IT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ST(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IT(Object(n),!0).forEach(function(t){jT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function jT(e,t,n){return t=function(e){var t=function(e){if("object"!=_T(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=_T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_T(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kT(e,t,n){var r=e.tick,o=e.ticks,a=e.viewBox,i=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,d=e.angle;if(!o||!o.length||!r)return[];if(Sg(l)||ew.isSsr)return function(e,t){return ET(e,t+1)}(o,"number"==typeof l&&Sg(l)?l:0);var f=[],p="top"===s||"bottom"===s?"width":"height",m=u&&"width"===p?xx(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},h=function(e,r){var o=Rg()(c)?c(e.value,r):e.value;return"width"===p?function(e,t,n){return function(e){var t=e.width,n=e.height,r=function(e){return(e%180+180)%180}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:0),o=r*Math.PI/180,a=Math.atan(n/t),i=o>a&&o<Math.PI-a?n/Math.sin(o):t/Math.cos(o);return Math.abs(i)}({width:e.width+t.width,height:e.height+t.height},n)}(xx(o,{fontSize:t,letterSpacing:n}),m,d):xx(o,{fontSize:t,letterSpacing:n})[p]},g=o.length>=2?_g(o[1].coordinate-o[0].coordinate):1,y=function(e,t,n){var r="width"===n,o=e.x,a=e.y,i=e.width,s=e.height;return 1===t?{start:r?o:a,end:r?o+i:a+s}:{start:r?o+i:a+s,end:r?o:a}}(a,g,p);return"equidistantPreserveStart"===l?function(e,t,n,r,o){for(var a,i=(r||[]).slice(),s=t.start,l=t.end,c=0,u=1,d=s,f=function(){var t=null==r?void 0:r[c];if(void 0===t)return{v:ET(r,u)};var a,i=c,f=function(){return void 0===a&&(a=n(t,i)),a},p=t.coordinate,m=0===c||MT(e,p,f,d,l);m||(c=0,d=s,u+=1),m&&(d=p+e*(f()/2+o),c+=u)};u<=i.length;)if(a=f())return a.v;return[]}(g,y,h,o,i):(f="preserveStart"===l||"preserveStartEnd"===l?function(e,t,n,r,o,a){var i=(r||[]).slice(),s=i.length,l=t.start,c=t.end;if(a){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);i[s-1]=u=ST(ST({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate}),MT(e,u.tickCoord,function(){return d},l,c)&&(c=u.tickCoord-e*(d/2+o),i[s-1]=ST(ST({},u),{},{isShow:!0}))}for(var p=a?s-1:s,m=function(t){var r,a=i[t],s=function(){return void 0===r&&(r=n(a,t)),r};if(0===t){var u=e*(a.coordinate-e*s()/2-l);i[t]=a=ST(ST({},a),{},{tickCoord:u<0?a.coordinate-u*e:a.coordinate})}else i[t]=a=ST(ST({},a),{},{tickCoord:a.coordinate});MT(e,a.tickCoord,s,l,c)&&(l=a.tickCoord+e*(s()/2+o),i[t]=ST(ST({},a),{},{isShow:!0}))},h=0;h<p;h++)m(h);return i}(g,y,h,o,i,"preserveStartEnd"===l):function(e,t,n,r,o){for(var a=(r||[]).slice(),i=a.length,s=t.start,l=t.end,c=function(t){var r,c=a[t],u=function(){return void 0===r&&(r=n(c,t)),r};if(t===i-1){var d=e*(c.coordinate+e*u()/2-l);a[t]=c=ST(ST({},c),{},{tickCoord:d>0?c.coordinate-d*e:c.coordinate})}else a[t]=c=ST(ST({},c),{},{tickCoord:c.coordinate});MT(e,c.tickCoord,u,s,l)&&(l=c.tickCoord-e*(u()/2+o),a[t]=ST(ST({},c),{},{isShow:!0}))},u=i-1;u>=0;u--)c(u);return a}(g,y,h,o,i),f.filter(function(e){return e.isShow}))}vT(NT,"displayName","Line"),vT(NT,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!ew.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),vT(NT,"getComposedData",function(e){var t=e.props,n=e.xAxis,r=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,i=e.dataKey,s=e.bandSize,l=e.displayedData,c=e.offset,u=t.layout,d=l.map(function(e,t){var l=HS(e,i);return"horizontal"===u?{x:sj({axis:n,ticks:o,bandSize:s,entry:e,index:t}),y:Mg()(l)?null:r.scale(l),value:l,payload:e}:{x:Mg()(l)?null:n.scale(l),y:sj({axis:r,ticks:a,bandSize:s,entry:e,index:t}),value:l,payload:e}});return pT({points:d,layout:u},c)});var DT=["viewBox"],CT=["viewBox"],AT=["ticks"];function TT(e){return TT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},TT(e)}function OT(){return OT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OT.apply(this,arguments)}function LT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function zT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?LT(Object(n),!0).forEach(function(t){YT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function PT(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function RT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,ZT(r.key),r)}}function UT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(UT=function(){return!!e})()}function BT(e){return BT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},BT(e)}function FT(e,t){return FT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},FT(e,t)}function YT(e,t,n){return(t=ZT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZT(e){var t=function(e){if("object"!=TT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=TT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==TT(t)?t:t+""}var QT=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=BT(t),function(e,t){if(t&&("object"===TT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,UT()?Reflect.construct(t,n||[],BT(e).constructor):t.apply(e,n))}(this,t,[e])).state={fontSize:"",letterSpacing:""},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FT(e,t)}(t,e),n=t,r=[{key:"shouldComponentUpdate",value:function(e,t){var n=e.viewBox,r=PT(e,DT),o=this.props,a=o.viewBox,i=PT(o,CT);return!Yg(n,a)||!Yg(r,i)||!Yg(t,this.state)}},{key:"componentDidMount",value:function(){var e=this.layerReference;if(e){var t=e.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];t&&this.setState({fontSize:window.getComputedStyle(t).fontSize,letterSpacing:window.getComputedStyle(t).letterSpacing})}}},{key:"getTickLineCoord",value:function(e){var t,n,r,o,a,i,s=this.props,l=s.x,c=s.y,u=s.width,d=s.height,f=s.orientation,p=s.tickSize,m=s.mirror,h=s.tickMargin,g=m?-1:1,y=e.tickSize||p,w=Sg(e.tickCoord)?e.tickCoord:e.coordinate;switch(f){case"top":t=n=e.coordinate,i=(r=(o=c+ +!m*d)-g*y)-g*h,a=w;break;case"left":r=o=e.coordinate,a=(t=(n=l+ +!m*u)-g*y)-g*h,i=w;break;case"right":r=o=e.coordinate,a=(t=(n=l+ +m*u)+g*y)+g*h,i=w;break;default:t=n=e.coordinate,i=(r=(o=c+ +m*d)+g*y)+g*h,a=w}return{line:{x1:t,y1:r,x2:n,y2:o},tick:{x:a,y:i}}}},{key:"getTickTextAnchor",value:function(){var e,t=this.props,n=t.orientation,r=t.mirror;switch(n){case"left":e=r?"start":"end";break;case"right":e=r?"end":"start";break;default:e="middle"}return e}},{key:"getTickVerticalAnchor",value:function(){var e=this.props,t=e.orientation,n=e.mirror,r="end";switch(t){case"left":case"right":r="middle";break;case"top":r=n?"start":"end";break;default:r=n?"end":"start"}return r}},{key:"renderAxisLine",value:function(){var e=this.props,t=e.x,n=e.y,r=e.width,o=e.height,a=e.orientation,i=e.mirror,s=e.axisLine,l=zT(zT(zT({},cy(this.props,!1)),cy(s,!1)),{},{fill:"none"});if("top"===a||"bottom"===a){var c=+("top"===a&&!i||"bottom"===a&&i);l=zT(zT({},l),{},{x1:t,y1:n+c*o,x2:t+r,y2:n+c*o})}else{var u=+("left"===a&&!i||"right"===a&&i);l=zT(zT({},l),{},{x1:t+u*r,y1:n,x2:t+u*r,y2:n+o})}return v().createElement("line",OT({},l,{className:Oe("recharts-cartesian-axis-line",vg()(s,"className"))}))}},{key:"renderTicks",value:function(e,n,r){var o=this,a=this.props,i=a.tickLine,s=a.stroke,l=a.tick,c=a.tickFormatter,u=a.unit,d=kT(zT(zT({},this.props),{},{ticks:e}),n,r),f=this.getTickTextAnchor(),p=this.getTickVerticalAnchor(),m=cy(this.props,!1),h=cy(l,!1),g=zT(zT({},m),{},{fill:"none"},cy(i,!1)),y=d.map(function(e,n){var r=o.getTickLineCoord(e),a=r.line,y=r.tick,w=zT(zT(zT(zT({textAnchor:f,verticalAnchor:p},m),{},{stroke:"none",fill:s},h),y),{},{index:n,payload:e,visibleTicksCount:d.length,tickFormatter:c});return v().createElement(ky,OT({className:"recharts-cartesian-axis-tick",key:"tick-".concat(e.value,"-").concat(e.coordinate,"-").concat(e.tickCoord)},$g(o.props,e,n)),i&&v().createElement("line",OT({},g,a,{className:Oe("recharts-cartesian-axis-tick-line",vg()(i,"className"))})),l&&t.renderTickItem(l,w,"".concat(Rg()(c)?c(e.value,n):e.value).concat(u||"")))});return v().createElement("g",{className:"recharts-cartesian-axis-ticks"},y)}},{key:"render",value:function(){var e=this,t=this.props,n=t.axisLine,r=t.width,o=t.height,a=t.ticksGenerator,i=t.className;if(t.hide)return null;var s=this.props,l=s.ticks,c=PT(s,AT),u=l;return Rg()(a)&&(u=l&&l.length>0?a(this.props):a(c)),r<=0||o<=0||!u||!u.length?null:v().createElement(ky,{className:Oe("recharts-cartesian-axis",i),ref:function(t){e.layerReference=t}},n&&this.renderAxisLine(),this.renderTicks(u,this.state.fontSize,this.state.letterSpacing),$j.renderCallByParent(this.props))}}],o=[{key:"renderTickItem",value:function(e,t,n){var r=Oe(t.className,"recharts-cartesian-axis-tick-value");return v().isValidElement(e)?v().cloneElement(e,zT(zT({},t),{},{className:r})):Rg()(e)?e(zT(zT({},t),{},{className:r})):v().createElement($x,OT({},t,{className:"recharts-cartesian-axis-tick-value"}),n)}}],r&&RT(n.prototype,r),o&&RT(n,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r,o}(w.Component);function VT(e){return VT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},VT(e)}function WT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qT(r.key),r)}}function GT(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(GT=function(){return!!e})()}function HT(e){return HT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},HT(e)}function $T(e,t){return $T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},$T(e,t)}function XT(e,t,n){return(t=qT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qT(e){var t=function(e){if("object"!=VT(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=VT(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==VT(t)?t:t+""}function JT(){return JT=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},JT.apply(this,arguments)}function KT(e){var t=e.xAxisId,n=nC(),r=rC(),o=eC(t);return null==o?null:w.createElement(QT,JT({},o,{className:Oe("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return tj(e,!0)}}))}YT(QT,"displayName","CartesianAxis"),YT(QT,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var eO=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=HT(t),function(e,t){if(t&&("object"===VT(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,GT()?Reflect.construct(t,n||[],HT(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$T(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return w.createElement(KT,this.props)}}])&&WT(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(w.Component);function tO(e){return tO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tO(e)}function nO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sO(r.key),r)}}function rO(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(rO=function(){return!!e})()}function oO(e){return oO=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oO(e)}function aO(e,t){return aO=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},aO(e,t)}function iO(e,t,n){return(t=sO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sO(e){var t=function(e){if("object"!=tO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=tO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==tO(t)?t:t+""}function lO(){return lO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lO.apply(this,arguments)}XT(eO,"displayName","XAxis"),XT(eO,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});var cO=function(e){var t=e.yAxisId,n=nC(),r=rC(),o=tC(t);return null==o?null:w.createElement(QT,lO({},o,{className:Oe("recharts-".concat(o.axisType," ").concat(o.axisType),o.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(e){return tj(e,!0)}}))},uO=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=oO(t),function(e,t){if(t&&("object"===tO(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,rO()?Reflect.construct(t,n||[],oO(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&aO(e,t)}(t,e),n=t,(r=[{key:"render",value:function(){return w.createElement(cO,this.props)}}])&&nO(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(w.Component);iO(uO,"displayName","YAxis"),iO(uO,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});var dO=function(e){var t=e.chartName,n=e.GraphicalChild,r=e.defaultTooltipEventType,o=void 0===r?"axis":r,a=e.validateTooltipEventTypes,i=void 0===a?["axis"]:a,s=e.axisComponents,l=e.legendContent,c=e.formatAxisMap,u=e.defaultProps,d=function(e,r){var o=e.props,a=e.dataStartIndex,i=e.dataEndIndex,l=e.updateId;if(!sy({props:o}))return null;var u=o.children,d=o.layout,f=o.stackOffset,p=o.data,m=o.reverseStackOrder,h=aT(d),g=h.numericAxisName,y=h.cateAxisName,w=ay(u,n),b=function(e,t,n,r,o,a){if(!e)return null;var i=(a?t.reverse():t).reduce(function(e,t){var o,a=null!==(o=t.type)&&void 0!==o&&o.defaultProps?WS(WS({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(a.hide)return e;var s=a[n],l=e[s]||{hasStack:!1,stackGroups:{}};if(jg(i)){var c=l.stackGroups[i]||{numericAxisId:n,cateAxisId:r,items:[]};c.items.push(t),l.hasStack=!0,l.stackGroups[i]=c}else l.stackGroups[Dg("_stackId_")]={numericAxisId:n,cateAxisId:r,items:[t]};return WS(WS({},e),{},GS({},s,l))},{});return Object.keys(i).reduce(function(t,a){var s=i[a];return s.hasStack&&(s.stackGroups=Object.keys(s.stackGroups).reduce(function(t,a){var i=s.stackGroups[a];return WS(WS({},t),{},GS({},a,{numericAxisId:n,cateAxisId:r,items:i.items,stackedData:ij(e,i.items,o)}))},{})),WS(WS({},t),{},GS({},a,s))},{})}(p,w,"".concat(g,"Id"),"".concat(y,"Id"),f,m),v=s.reduce(function(e,t){var n="".concat(t.axisType,"Map");return WA(WA({},e),{},GA({},n,rT(o,WA(WA({},t),{},{graphicalItems:w,stackGroups:t.axisType===g&&b,dataStartIndex:a,dataEndIndex:i}))))},{}),x=function(e,t){var n=e.props,r=(e.graphicalItems,e.xAxisMap),o=void 0===r?{}:r,a=e.yAxisMap,i=void 0===a?{}:a,s=n.width,l=n.height,c=n.children,u=n.margin||{},d=iy(c,Aj),f=iy(c,Mb),p=Object.keys(i).reduce(function(e,t){var n=i[t],r=n.orientation;return n.mirror||n.hide?e:WA(WA({},e),{},GA({},r,e[r]+n.width))},{left:u.left||0,right:u.right||0}),m=Object.keys(o).reduce(function(e,t){var n=o[t],r=n.orientation;return n.mirror||n.hide?e:WA(WA({},e),{},GA({},r,vg()(e,"".concat(r))+n.height))},{top:u.top||0,bottom:u.bottom||0}),h=WA(WA({},m),p),g=h.bottom;d&&(h.bottom+=d.props.height||Aj.defaultProps.height),f&&t&&(h=function(e,t,n,r){var o=n.children,a=n.width,i=n.margin,s=a-(i.left||0)-(i.right||0),l=FS({children:o,legendWidth:s});if(l){var c=r||{},u=c.width,d=c.height,f=l.align,p=l.verticalAlign,m=l.layout;if(("vertical"===m||"horizontal"===m&&"middle"===p)&&"center"!==f&&Sg(e[f]))return WS(WS({},e),{},GS({},f,e[f]+(u||0)));if(("horizontal"===m||"vertical"===m&&"center"===f)&&"middle"!==p&&Sg(e[p]))return WS(WS({},e),{},GS({},p,e[p]+(d||0)))}return e}(h,0,n,t));var y=s-h.left-h.right,w=l-h.top-h.bottom;return WA(WA({brushBottom:g},h),{},{width:Math.max(y,0),height:Math.max(w,0)})}(WA(WA({},v),{},{props:o,graphicalItems:w}),null==r?void 0:r.legendBBox);Object.keys(v).forEach(function(e){v[e]=c(o,v[e],x,e.replace("Map",""),t)});var N,E,_=v["".concat(y,"Map")],I=(N=Ag(_),{tooltipTicks:E=tj(N,!1,!0),orderedTooltipTicks:Ey()(E,function(e){return e.coordinate}),tooltipAxis:N,tooltipAxisBandSize:pj(N,E)}),S=function(e,t){var n=t.graphicalItems,r=t.stackGroups,o=t.offset,a=t.updateId,i=t.dataStartIndex,l=t.dataEndIndex,c=e.barSize,u=e.layout,d=e.barGap,f=e.barCategoryGap,p=e.maxBarSize,m=aT(u),h=m.numericAxisName,g=m.cateAxisName,y=function(e){return!(!e||!e.length)&&e.some(function(e){var t=ty(e&&e.type);return t&&t.indexOf("Bar")>=0})}(n),w=[];return n.forEach(function(n,m){var b=KA(e.data,{graphicalItems:[n],dataStartIndex:i,dataEndIndex:l}),v=void 0!==n.type.defaultProps?WA(WA({},n.type.defaultProps),n.props):n.props,x=v.dataKey,N=v.maxBarSize,E=v["".concat(h,"Id")],_=v["".concat(g,"Id")],I=s.reduce(function(e,n){var r=t["".concat(n.axisType,"Map")],o=v["".concat(n.axisType,"Id")];r&&r[o]||"zAxis"===n.axisType||(0,M.A)(!1);var a=r[o];return WA(WA({},e),{},GA(GA({},n.axisType,a),"".concat(n.axisType,"Ticks"),tj(a)))},{}),S=I[g],j=I["".concat(g,"Ticks")],k=r&&r[E]&&r[E].hasStack&&function(e,t){var n,r=(null!==(n=e.type)&&void 0!==n&&n.defaultProps?WS(WS({},e.type.defaultProps),e.props):e.props).stackId;if(jg(r)){var o=t[r];if(o){var a=o.items.indexOf(e);return a>=0?o.stackedData[a]:null}}return null}(n,r[E].stackGroups),D=ty(n.type).indexOf("Bar")>=0,C=pj(S,j),A=[],T=y&&function(e){var t=e.barSize,n=e.totalSize,r=e.stackGroups,o=void 0===r?{}:r;if(!o)return{};for(var a={},i=Object.keys(o),s=0,l=i.length;s<l;s++)for(var c=o[i[s]].stackGroups,u=Object.keys(c),d=0,f=u.length;d<f;d++){var p=c[u[d]],m=p.items,h=p.cateAxisId,g=m.filter(function(e){return ty(e.type).indexOf("Bar")>=0});if(g&&g.length){var y=g[0].type.defaultProps,w=void 0!==y?WS(WS({},y),g[0].props):g[0].props,b=w.barSize,v=w[h];a[v]||(a[v]=[]);var x=Mg()(b)?t:b;a[v].push({item:g[0],stackList:g.slice(1),barSize:Mg()(x)?void 0:Cg(x,n,0)})}}return a}({barSize:c,stackGroups:r,totalSize:iT(I,g)});if(D){var O,L,z=Mg()(N)?p:N,P=null!==(O=null!==(L=pj(S,j,!0))&&void 0!==L?L:z)&&void 0!==O?O:0;A=function(e){var t=e.barGap,n=e.barCategoryGap,r=e.bandSize,o=e.sizeList,a=void 0===o?[]:o,i=e.maxBarSize,s=a.length;if(s<1)return null;var l,c=Cg(t,r,0,!0),u=[];if(a[0].barSize===+a[0].barSize){var d=!1,f=r/s,p=a.reduce(function(e,t){return e+t.barSize||0},0);(p+=(s-1)*c)>=r&&(p-=(s-1)*c,c=0),p>=r&&f>0&&(d=!0,p=s*(f*=.9));var m={offset:((r-p)/2|0)-c,size:0};l=a.reduce(function(e,t){var n={item:t.item,position:{offset:m.offset+m.size+c,size:d?f:t.barSize}},r=[].concat(ZS(e),[n]);return m=r[r.length-1].position,t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:m})}),r},u)}else{var h=Cg(n,r,0,!0);r-2*h-(s-1)*c<=0&&(c=0);var g=(r-2*h-(s-1)*c)/s;g>1&&(g>>=0);var y=i===+i?Math.min(g,i):g;l=a.reduce(function(e,t,n){var r=[].concat(ZS(e),[{item:t.item,position:{offset:h+(g+c)*n+(g-y)/2,size:y}}]);return t.stackList&&t.stackList.length&&t.stackList.forEach(function(e){r.push({item:e,position:r[r.length-1].position})}),r},u)}return l}({barGap:d,barCategoryGap:f,bandSize:P!==C?P:C,sizeList:T[_],maxBarSize:z}),P!==C&&(A=A.map(function(e){return WA(WA({},e),{},{position:WA(WA({},e.position),{},{offset:e.position.offset-P/2})})}))}var R=n&&n.type&&n.type.getComposedData;R&&w.push({props:WA(WA({},R(WA(WA({},I),{},{displayedData:b,props:e,dataKey:x,item:n,bandSize:C,barPosition:A,offset:o,stackedData:k,layout:u,dataStartIndex:i,dataEndIndex:l}))),{},GA(GA(GA({key:n.key||"item-".concat(m)},h,I[h]),g,I[g]),"animationId",a)),childIndex:py(n,e.children),item:n})}),w}(o,WA(WA({},v),{},{dataStartIndex:a,dataEndIndex:i,updateId:l,graphicalItems:w,stackGroups:b,offset:x}));return WA(WA({formattedGraphicalItems:S,graphicalItems:w,offset:x,stackGroups:b},I),v)},f=function(e){function n(e){var r,o,a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),GA(a=function(e,t,n){return t=BA(t),function(e,t){if(t&&("object"===OA(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,UA()?Reflect.construct(t,n||[],BA(e).constructor):t.apply(e,n))}(this,n,[e]),"eventEmitterSymbol",Symbol("rechartsEventEmitter")),GA(a,"accessibilityManager",new RC),GA(a,"handleLegendBBoxUpdate",function(e){if(e){var t=a.state,n=t.dataStartIndex,r=t.dataEndIndex,o=t.updateId;a.setState(WA({legendBBox:e},d({props:a.props,dataStartIndex:n,dataEndIndex:r,updateId:o},WA(WA({},a.state),{},{legendBBox:e}))))}}),GA(a,"handleReceiveSyncEvent",function(e,t,n){if(a.props.syncId===e){if(n===a.eventEmitterSymbol&&"function"!=typeof a.props.syncMethod)return;a.applySyncEvent(t)}}),GA(a,"handleBrushChange",function(e){var t=e.startIndex,n=e.endIndex;if(t!==a.state.dataStartIndex||n!==a.state.dataEndIndex){var r=a.state.updateId;a.setState(function(){return WA({dataStartIndex:t,dataEndIndex:n},d({props:a.props,dataStartIndex:t,dataEndIndex:n,updateId:r},a.state))}),a.triggerSyncEvent({dataStartIndex:t,dataEndIndex:n})}}),GA(a,"handleMouseEnter",function(e){var t=a.getMouseInfo(e);if(t){var n=WA(WA({},t),{},{isTooltipActive:!0});a.setState(n),a.triggerSyncEvent(n);var r=a.props.onMouseEnter;Rg()(r)&&r(n,e)}}),GA(a,"triggeredAfterMouseMove",function(e){var t=a.getMouseInfo(e),n=t?WA(WA({},t),{},{isTooltipActive:!0}):{isTooltipActive:!1};a.setState(n),a.triggerSyncEvent(n);var r=a.props.onMouseMove;Rg()(r)&&r(n,e)}),GA(a,"handleItemMouseEnter",function(e){a.setState(function(){return{isTooltipActive:!0,activeItem:e,activePayload:e.tooltipPayload,activeCoordinate:e.tooltipPosition||{x:e.cx,y:e.cy}}})}),GA(a,"handleItemMouseLeave",function(){a.setState(function(){return{isTooltipActive:!1}})}),GA(a,"handleMouseMove",function(e){e.persist(),a.throttleTriggeredAfterMouseMove(e)}),GA(a,"handleMouseLeave",function(e){a.throttleTriggeredAfterMouseMove.cancel();var t={isTooltipActive:!1};a.setState(t),a.triggerSyncEvent(t);var n=a.props.onMouseLeave;Rg()(n)&&n(t,e)}),GA(a,"handleOuterEvent",function(e){var t,n=function(e){var t=e&&e.type;return t&&ey[t]?ey[t]:null}(e),r=vg()(a.props,"".concat(n));n&&Rg()(r)&&r(null!==(t=/.*touch.*/i.test(n)?a.getMouseInfo(e.changedTouches[0]):a.getMouseInfo(e))&&void 0!==t?t:{},e)}),GA(a,"handleClick",function(e){var t=a.getMouseInfo(e);if(t){var n=WA(WA({},t),{},{isTooltipActive:!0});a.setState(n),a.triggerSyncEvent(n);var r=a.props.onClick;Rg()(r)&&r(n,e)}}),GA(a,"handleMouseDown",function(e){var t=a.props.onMouseDown;Rg()(t)&&t(a.getMouseInfo(e),e)}),GA(a,"handleMouseUp",function(e){var t=a.props.onMouseUp;Rg()(t)&&t(a.getMouseInfo(e),e)}),GA(a,"handleTouchMove",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.throttleTriggeredAfterMouseMove(e.changedTouches[0])}),GA(a,"handleTouchStart",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.handleMouseDown(e.changedTouches[0])}),GA(a,"handleTouchEnd",function(e){null!=e.changedTouches&&e.changedTouches.length>0&&a.handleMouseUp(e.changedTouches[0])}),GA(a,"handleDoubleClick",function(e){var t=a.props.onDoubleClick;Rg()(t)&&t(a.getMouseInfo(e),e)}),GA(a,"handleContextMenu",function(e){var t=a.props.onContextMenu;Rg()(t)&&t(a.getMouseInfo(e),e)}),GA(a,"triggerSyncEvent",function(e){void 0!==a.props.syncId&&AC.emit(TC,a.props.syncId,e,a.eventEmitterSymbol)}),GA(a,"applySyncEvent",function(e){var t=a.props,n=t.layout,r=t.syncMethod,o=a.state.updateId,i=e.dataStartIndex,s=e.dataEndIndex;if(void 0!==e.dataStartIndex||void 0!==e.dataEndIndex)a.setState(WA({dataStartIndex:i,dataEndIndex:s},d({props:a.props,dataStartIndex:i,dataEndIndex:s,updateId:o},a.state)));else if(void 0!==e.activeTooltipIndex){var l=e.chartX,c=e.chartY,u=e.activeTooltipIndex,f=a.state,p=f.offset,m=f.tooltipTicks;if(!p)return;if("function"==typeof r)u=r(m,e);else if("value"===r){u=-1;for(var h=0;h<m.length;h++)if(m[h].value===e.activeLabel){u=h;break}}var g=WA(WA({},p),{},{x:p.left,y:p.top}),y=Math.min(l,g.x+g.width),w=Math.min(c,g.y+g.height),b=m[u]&&m[u].value,v=tT(a.state,a.props.data,u),x=m[u]?{x:"horizontal"===n?m[u].coordinate:y,y:"horizontal"===n?w:m[u].coordinate}:qA;a.setState(WA(WA({},e),{},{activeLabel:b,activeCoordinate:x,activePayload:v,activeTooltipIndex:u}))}else a.setState(e)}),GA(a,"renderCursor",function(e){var n,r=a.state,o=r.isTooltipActive,i=r.activeCoordinate,s=r.activePayload,l=r.offset,c=r.activeTooltipIndex,u=r.tooltipAxisBandSize,d=a.getTooltipEventType(),f=null!==(n=e.props.active)&&void 0!==n?n:o,p=a.props.layout,m=e.key||"_recharts-cursor";return v().createElement(CA,{key:m,activeCoordinate:i,activePayload:s,activeTooltipIndex:c,chartName:t,element:e,isActive:f,layout:p,offset:l,tooltipAxisBandSize:u,tooltipEventType:d})}),GA(a,"renderPolarAxis",function(e,t,n){var r=vg()(e,"type.axisType"),o=vg()(a.state,"".concat(r,"Map")),i=e.type.defaultProps,s=void 0!==i?WA(WA({},i),e.props):e.props,l=o&&o[s["".concat(r,"Id")]];return(0,w.cloneElement)(e,WA(WA({},l),{},{className:Oe(r,l.className),key:e.key||"".concat(t,"-").concat(n),ticks:tj(l,!0)}))}),GA(a,"renderPolarGrid",function(e){var t=e.props,n=t.radialLines,r=t.polarAngles,o=t.polarRadius,i=a.state,s=i.radiusAxisMap,l=i.angleAxisMap,c=Ag(s),u=Ag(l),d=u.cx,f=u.cy,p=u.innerRadius,m=u.outerRadius;return(0,w.cloneElement)(e,{polarAngles:Array.isArray(r)?r:tj(u,!0).map(function(e){return e.coordinate}),polarRadius:Array.isArray(o)?o:tj(c,!0).map(function(e){return e.coordinate}),cx:d,cy:f,innerRadius:p,outerRadius:m,key:e.key||"polar-grid",radialLines:n})}),GA(a,"renderLegend",function(){var e=a.state.formattedGraphicalItems,t=a.props,n=t.children,r=t.width,o=t.height,i=a.props.margin||{},s=r-(i.left||0)-(i.right||0),c=FS({children:n,formattedGraphicalItems:e,legendWidth:s,legendContent:l});if(!c)return null;var u=c.item,d=PA(c,AA);return(0,w.cloneElement)(u,WA(WA({},d),{},{chartWidth:r,chartHeight:o,margin:i,onBBoxUpdate:a.handleLegendBBoxUpdate}))}),GA(a,"renderTooltip",function(){var e,t=a.props,n=t.children,r=t.accessibilityLayer,o=iy(n,mw);if(!o)return null;var i=a.state,s=i.isTooltipActive,l=i.activeCoordinate,c=i.activePayload,u=i.activeLabel,d=i.offset,f=null!==(e=o.props.active)&&void 0!==e?e:s;return(0,w.cloneElement)(o,{viewBox:WA(WA({},d),{},{x:d.left,y:d.top}),active:f,label:u,payload:f?c:[],coordinate:l,accessibilityLayer:r})}),GA(a,"renderBrush",function(e){var t=a.props,n=t.margin,r=t.data,o=a.state,i=o.offset,s=o.dataStartIndex,l=o.dataEndIndex,c=o.updateId;return(0,w.cloneElement)(e,{key:e.key||"_recharts-brush",onChange:rj(a.handleBrushChange,e.props.onChange),data:r,x:Sg(e.props.x)?e.props.x:i.left,y:Sg(e.props.y)?e.props.y:i.top+i.height+i.brushBottom-(n.bottom||0),width:Sg(e.props.width)?e.props.width:i.width,startIndex:s,endIndex:l,updateId:"brush-".concat(c)})}),GA(a,"renderReferenceElement",function(e,t,n){if(!e)return null;var r=a.clipPathId,o=a.state,i=o.xAxisMap,s=o.yAxisMap,l=o.offset,c=e.type.defaultProps||{},u=e.props,d=u.xAxisId,f=void 0===d?c.xAxisId:d,p=u.yAxisId,m=void 0===p?c.yAxisId:p;return(0,w.cloneElement)(e,{key:e.key||"".concat(t,"-").concat(n),xAxis:i[f],yAxis:s[m],viewBox:{x:l.left,y:l.top,width:l.width,height:l.height},clipPathId:r})}),GA(a,"renderActivePoints",function(e){var t=e.item,r=e.activePoint,o=e.basePoint,a=e.childIndex,i=e.isRange,s=[],l=t.props.key,c=void 0!==t.item.type.defaultProps?WA(WA({},t.item.type.defaultProps),t.item.props):t.item.props,u=c.activeDot,d=WA(WA({index:a,dataKey:c.dataKey,cx:r.x,cy:r.y,r:4,fill:XS(t.item),strokeWidth:2,stroke:"#fff",payload:r.payload,value:r.value},cy(u,!1)),Hg(u));return s.push(n.renderActiveDot(u,d,"".concat(l,"-activePoint-").concat(a))),o?s.push(n.renderActiveDot(u,WA(WA({},d),{},{cx:o.x,cy:o.y}),"".concat(l,"-basePoint-").concat(a))):i&&s.push(null),s}),GA(a,"renderGraphicChild",function(e,t,n){var r=a.filterFormatItem(e,t,n);if(!r)return null;var o=a.getTooltipEventType(),i=a.state,s=i.isTooltipActive,l=i.tooltipAxis,c=i.activeTooltipIndex,u=i.activeLabel,d=iy(a.props.children,mw),f=r.props,p=f.points,m=f.isRange,h=f.baseLine,g=void 0!==r.item.type.defaultProps?WA(WA({},r.item.type.defaultProps),r.item.props):r.item.props,y=g.activeDot,b=g.hide,v=g.activeBar,x=g.activeShape,N=Boolean(!b&&s&&d&&(y||v||x)),E={};"axis"!==o&&d&&"click"===d.props.trigger?E={onClick:rj(a.handleItemMouseEnter,e.props.onClick)}:"axis"!==o&&(E={onMouseLeave:rj(a.handleItemMouseLeave,e.props.onMouseLeave),onMouseEnter:rj(a.handleItemMouseEnter,e.props.onMouseEnter)});var M=(0,w.cloneElement)(e,WA(WA({},r.props),E));if(N){if(!(c>=0)){var _,I=(null!==(_=a.getItemByXY(a.state.activeCoordinate))&&void 0!==_?_:{graphicalItem:M}).graphicalItem,S=I.item,j=void 0===S?e:S,k=I.childIndex,D=WA(WA(WA({},r.props),E),{},{activeIndex:k});return[(0,w.cloneElement)(j,D),null,null]}var C,A;if(l.dataKey&&!l.allowDuplicatedCategory){var T="function"==typeof l.dataKey?function(e){return"function"==typeof l.dataKey?l.dataKey(e.payload):null}:"payload.".concat(l.dataKey.toString());C=Og(p,T,u),A=m&&h&&Og(h,T,u)}else C=null==p?void 0:p[c],A=m&&h&&h[c];if(x||v){var O=void 0!==e.props.activeIndex?e.props.activeIndex:c;return[(0,w.cloneElement)(e,WA(WA(WA({},r.props),E),{},{activeIndex:O})),null,null]}if(!Mg()(C))return[M].concat(YA(a.renderActivePoints({item:r,activePoint:C,basePoint:A,childIndex:c,isRange:m})))}return m?[M,null,null]:[M,null]}),GA(a,"renderCustomized",function(e,t,n){return(0,w.cloneElement)(e,WA(WA({key:"recharts-customized-".concat(n)},a.props),a.state))}),GA(a,"renderMap",{CartesianGrid:{handler:JA,once:!0},ReferenceArea:{handler:a.renderReferenceElement},ReferenceLine:{handler:JA},ReferenceDot:{handler:a.renderReferenceElement},XAxis:{handler:JA},YAxis:{handler:JA},Brush:{handler:a.renderBrush,once:!0},Bar:{handler:a.renderGraphicChild},Line:{handler:a.renderGraphicChild},Area:{handler:a.renderGraphicChild},Radar:{handler:a.renderGraphicChild},RadialBar:{handler:a.renderGraphicChild},Scatter:{handler:a.renderGraphicChild},Pie:{handler:a.renderGraphicChild},Funnel:{handler:a.renderGraphicChild},Tooltip:{handler:a.renderCursor,once:!0},PolarGrid:{handler:a.renderPolarGrid,once:!0},PolarAngleAxis:{handler:a.renderPolarAxis},PolarRadiusAxis:{handler:a.renderPolarAxis},Customized:{handler:a.renderCustomized}}),a.clipPathId="".concat(null!==(r=e.id)&&void 0!==r?r:Dg("recharts"),"-clip"),a.throttleTriggeredAfterMouseMove=mg()(a.triggeredAfterMouseMove,null!==(o=e.throttleDelay)&&void 0!==o?o:1e3/60),a.state={},a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FA(e,t)}(n,e),r=n,a=[{key:"componentDidMount",value:function(){var e,t;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:null!==(e=this.props.margin.left)&&void 0!==e?e:0,top:null!==(t=this.props.margin.top)&&void 0!==t?t:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var e=this.props,t=e.children,n=e.data,r=e.height,o=e.layout,a=iy(t,mw);if(a){var i=a.props.defaultIndex;if(!("number"!=typeof i||i<0||i>this.state.tooltipTicks.length-1)){var s=this.state.tooltipTicks[i]&&this.state.tooltipTicks[i].value,l=tT(this.state,n,i,s),c=this.state.tooltipTicks[i].coordinate,u=(this.state.offset.top+r)/2,d="horizontal"===o?{x:c,y:u}:{y:c,x:u},f=this.state.formattedGraphicalItems.find(function(e){return"Scatter"===e.item.type.name});f&&(d=WA(WA({},d),f.props.points[i].tooltipPosition),l=f.props.points[i].tooltipPayload);var p={activeTooltipIndex:i,isTooltipActive:!0,activeLabel:s,activePayload:l,activeCoordinate:d};this.setState(p),this.renderCursor(a),this.accessibilityManager.setIndex(i)}}}},{key:"getSnapshotBeforeUpdate",value:function(e,t){return this.props.accessibilityLayer?(this.state.tooltipTicks!==t.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==e.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==e.margin&&this.accessibilityManager.setDetails({offset:{left:null!==(n=this.props.margin.left)&&void 0!==n?n:0,top:null!==(r=this.props.margin.top)&&void 0!==r?r:0}}),null):null;var n,r}},{key:"componentDidUpdate",value:function(e){uy([iy(e.children,mw)],[iy(this.props.children,mw)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var e=iy(this.props.children,mw);if(e&&"boolean"==typeof e.props.shared){var t=e.props.shared?"axis":"item";return i.indexOf(t)>=0?t:o}return o}},{key:"getMouseInfo",value:function(e){if(!this.container)return null;var t,n=this.container,r=n.getBoundingClientRect(),o=(t=r).top+window.scrollY-document.documentElement.clientTop,a=t.left+window.scrollX-document.documentElement.clientLeft,i={chartX:Math.round(e.pageX-a),chartY:Math.round(e.pageY-o)},s=r.width/n.offsetWidth||1,l=this.inRange(i.chartX,i.chartY,s);if(!l)return null;var c=this.state,u=c.xAxisMap,d=c.yAxisMap,f=this.getTooltipEventType(),p=nT(this.state,this.props.data,this.props.layout,l);if("axis"!==f&&u&&d){var m=Ag(u).scale,h=Ag(d).scale,g=m&&m.invert?m.invert(i.chartX):null,y=h&&h.invert?h.invert(i.chartY):null;return WA(WA({},i),{},{xValue:g,yValue:y},p)}return p?WA(WA({},i),p):null}},{key:"inRange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=this.props.layout,o=e/n,a=t/n;if("horizontal"===r||"vertical"===r){var i=this.state.offset;return o>=i.left&&o<=i.left+i.width&&a>=i.top&&a<=i.top+i.height?{x:o,y:a}:null}var s=this.state,l=s.angleAxisMap,c=s.radiusAxisMap;if(l&&c){var u=Ag(l);return Fj({x:o,y:a},u)}return null}},{key:"parseEventsOfWrapper",value:function(){var e=this.props.children,t=this.getTooltipEventType(),n=iy(e,mw),r={};return n&&"axis"===t&&(r="click"===n.props.trigger?{onClick:this.handleClick}:{onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu}),WA(WA({},Hg(this.props,this.handleOuterEvent)),r)}},{key:"addListener",value:function(){AC.on(TC,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){AC.removeListener(TC,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(e,t,n){for(var r=this.state.formattedGraphicalItems,o=0,a=r.length;o<a;o++){var i=r[o];if(i.item===e||i.props.key===e.key||t===ty(i.item.type)&&n===i.childIndex)return i}return null}},{key:"renderClipPath",value:function(){var e=this.clipPathId,t=this.state.offset,n=t.left,r=t.top,o=t.height,a=t.width;return v().createElement("defs",null,v().createElement("clipPath",{id:e},v().createElement("rect",{x:n,y:r,height:o,width:a})))}},{key:"getXScales",value:function(){var e=this.state.xAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=zA(t,2),r=n[0],o=n[1];return WA(WA({},e),{},GA({},r,o.scale))},{}):null}},{key:"getYScales",value:function(){var e=this.state.yAxisMap;return e?Object.entries(e).reduce(function(e,t){var n=zA(t,2),r=n[0],o=n[1];return WA(WA({},e),{},GA({},r,o.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(e){var t;return null===(t=this.state.xAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getYScaleByAxisId",value:function(e){var t;return null===(t=this.state.yAxisMap)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.scale}},{key:"getItemByXY",value:function(e){var t=this.state,n=t.formattedGraphicalItems,r=t.activeItem;if(n&&n.length)for(var o=0,a=n.length;o<a;o++){var i=n[o],s=i.props,l=i.item,c=void 0!==l.type.defaultProps?WA(WA({},l.type.defaultProps),l.props):l.props,u=ty(l.type);if("Bar"===u){var d=(s.data||[]).find(function(t){return tx(e,t)});if(d)return{graphicalItem:i,payload:d}}else if("RadialBar"===u){var f=(s.data||[]).find(function(t){return Fj(e,t)});if(f)return{graphicalItem:i,payload:f}}else if(Wk(i,r)||Gk(i,r)||Hk(i,r)){var p=Jk({graphicalItem:i,activeTooltipItem:r,itemData:c.data}),m=void 0===c.activeIndex?p:c.activeIndex;return{graphicalItem:WA(WA({},i),{},{childIndex:m}),payload:Hk(i,r)?c.data[p]:i.props.data[p]}}}return null}},{key:"render",value:function(){var e=this;if(!sy(this))return null;var t,n,r=this.props,o=r.children,a=r.className,i=r.width,s=r.height,l=r.style,c=r.compact,u=r.title,d=r.desc,f=PA(r,TA),p=cy(f,!1);if(c)return v().createElement(KD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},v().createElement(Iy,LA({},p,{width:i,height:s,title:u,desc:d}),this.renderClipPath(),fy(o,this.renderMap)));this.props.accessibilityLayer&&(p.tabIndex=null!==(t=this.props.tabIndex)&&void 0!==t?t:0,p.role=null!==(n=this.props.role)&&void 0!==n?n:"application",p.onKeyDown=function(t){e.accessibilityManager.keyboardEvent(t)},p.onFocus=function(){e.accessibilityManager.focus()});var m=this.parseEventsOfWrapper();return v().createElement(KD,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},v().createElement("div",LA({className:Oe("recharts-wrapper",a),style:WA({position:"relative",cursor:"default",width:i,height:s},l)},m,{ref:function(t){e.container=t}}),v().createElement(Iy,LA({},p,{width:i,height:s,title:u,desc:d,style:XA}),this.renderClipPath(),fy(o,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}],a&&RA(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(w.Component);GA(f,"displayName",t),GA(f,"defaultProps",WA({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},u)),GA(f,"getDerivedStateFromProps",function(e,t){var n=e.dataKey,r=e.data,o=e.children,a=e.width,i=e.height,s=e.layout,l=e.stackOffset,c=e.margin,u=t.dataStartIndex,f=t.dataEndIndex;if(void 0===t.updateId){var p=oT(e);return WA(WA(WA({},p),{},{updateId:0},d(WA(WA({props:e},p),{},{updateId:0}),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:i,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(n!==t.prevDataKey||r!==t.prevData||a!==t.prevWidth||i!==t.prevHeight||s!==t.prevLayout||l!==t.prevStackOffset||!Yg(c,t.prevMargin)){var m=oT(e),h={chartX:t.chartX,chartY:t.chartY,isTooltipActive:t.isTooltipActive},g=WA(WA({},nT(t,r,s)),{},{updateId:t.updateId+1}),y=WA(WA(WA({},m),h),g);return WA(WA(WA({},y),d(WA({props:e},y),t)),{},{prevDataKey:n,prevData:r,prevWidth:a,prevHeight:i,prevLayout:s,prevStackOffset:l,prevMargin:c,prevChildren:o})}if(!uy(o,t.prevChildren)){var w,b,v,x,N=iy(o,Aj),E=N&&null!==(w=null===(b=N.props)||void 0===b?void 0:b.startIndex)&&void 0!==w?w:u,M=N&&null!==(v=null===(x=N.props)||void 0===x?void 0:x.endIndex)&&void 0!==v?v:f,_=E!==u||M!==f,I=Mg()(r)||_?t.updateId+1:t.updateId;return WA(WA({updateId:I},d(WA(WA({props:e},t),{},{updateId:I,dataStartIndex:E,dataEndIndex:M}),t)),{},{prevChildren:o,dataStartIndex:E,dataEndIndex:M})}return null}),GA(f,"renderActiveDot",function(e,t,n){var r;return r=(0,w.isValidElement)(e)?(0,w.cloneElement)(e,t):Rg()(e)?e(t):v().createElement(Ib,t),v().createElement(ky,{className:"recharts-active-dot",key:n},r)});var p=(0,w.forwardRef)(function(e,t){return v().createElement(f,LA({},e,{ref:t}))});return p.displayName=f.displayName,p}({chartName:"LineChart",GraphicalChild:NT,axisComponents:[{axisType:"xAxis",AxisComp:eO},{axisType:"yAxis",AxisComp:uO}],formatAxisMap:function(t,n,r,o,a){var i=t.width,s=t.height,l=t.layout,c=t.children,u=Object.keys(n),d={left:r.left,leftMirror:r.left,right:i-r.right,rightMirror:i-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},f=!!iy(c,bD);return u.reduce(function(i,s){var c,u,p,m,h,g=n[s],y=g.orientation,w=g.domain,b=g.padding,v=void 0===b?{}:b,x=g.mirror,N=g.reversed,E="".concat(y).concat(x?"Mirror":"");if("number"===g.type&&("gap"===g.padding||"no-gap"===g.padding)){var M=w[1]-w[0],_=1/0,I=g.categoricalDomain.sort(Lg);if(I.forEach(function(e,t){t>0&&(_=Math.min((e||0)-(I[t-1]||0),_))}),Number.isFinite(_)){var S=_/M,j="vertical"===g.layout?r.height:r.width;if("gap"===g.padding&&(c=S*j/2),"no-gap"===g.padding){var k=Cg(t.barCategoryGap,S*j),D=S*j/2;c=D-k-(D-k)/j*k}}}u="xAxis"===o?[r.left+(v.left||0)+(c||0),r.left+r.width-(v.right||0)-(c||0)]:"yAxis"===o?"horizontal"===l?[r.top+r.height-(v.bottom||0),r.top+(v.top||0)]:[r.top+(v.top||0)+(c||0),r.top+r.height-(v.bottom||0)-(c||0)]:g.range,N&&(u=[u[1],u[0]]);var C=function(t,n,r){var o=t.scale,a=t.type,i=t.layout,s=t.axisType;if("auto"===o)return"radial"===i&&"radiusAxis"===s?{scale:dx(),realScaleType:"band"}:"radial"===i&&"angleAxis"===s?{scale:CE(),realScaleType:"linear"}:"category"===a&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:px(),realScaleType:"point"}:"category"===a?{scale:dx(),realScaleType:"band"}:{scale:CE(),realScaleType:"linear"};if(gg()(o)){var l="scale".concat(gw()(o));return{scale:(e[l]||px)(),realScaleType:e[l]?l:"point"}}return Rg()(o)?{scale:o}:{scale:px(),realScaleType:"point"}}(g,a,f),A=C.scale,T=C.realScaleType;A.domain(w).range(u),function(e){var t=e.domain();if(t&&!(t.length<=2)){var n=t.length,r=e.range(),o=Math.min(r[0],r[1])-oj,a=Math.max(r[0],r[1])+oj,i=e(t[0]),s=e(t[n-1]);(i<o||i>a||s<o||s>a)&&e.domain([t[0],t[n-1]])}}(A);var O=function(e,t){var n=t.realScaleType,r=t.type,o=t.tickCount,a=t.originalDomain,i=t.allowDecimals,s=n||t.scale;if("auto"!==s&&"linear"!==s)return null;if(o&&"number"===r&&a&&("auto"===a[0]||"auto"===a[1])){var l=e.domain();if(!l.length)return null;var c=MS(l,o,i);return e.domain([$I()(c),GI()(c)]),{niceTicks:c}}if(o&&"number"===r){var u=e.domain();return{niceTicks:_S(u,o,i)}}return null}(A,ED(ED({},g),{},{realScaleType:T}));"xAxis"===o?(h="top"===y&&!x||"bottom"===y&&x,p=r.left,m=d[E]-h*g.height):"yAxis"===o&&(h="left"===y&&!x||"right"===y&&x,p=d[E]-h*g.width,m=r.top);var L=ED(ED(ED({},g),O),{},{realScaleType:T,x:p,y:m,scale:A,width:"xAxis"===o?r.width:g.width,height:"yAxis"===o?r.height:g.height});return L.bandSize=pj(L,O),g.hide||"xAxis"!==o?g.hide||(d[E]+=(h?-1:1)*L.width):d[E]+=(h?-1:1)*L.height,ED(ED({},i),{},MD({},s,L))},{})}}),fO=["x1","y1","x2","y2","key"],pO=["offset"];function mO(e){return mO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mO(e)}function hO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function gO(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hO(Object(n),!0).forEach(function(t){yO(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hO(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yO(e,t,n){return t=function(e){var t=function(e){if("object"!=mO(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=mO(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==mO(t)?t:t+""}(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wO(){return wO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wO.apply(this,arguments)}function bO(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var vO=function(e){var t=e.fill;if(!t||"none"===t)return null;var n=e.fillOpacity,r=e.x,o=e.y,a=e.width,i=e.height,s=e.ry;return v().createElement("rect",{x:r,y:o,ry:s,width:a,height:i,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function xO(e,t){var n;if(v().isValidElement(e))n=v().cloneElement(e,t);else if(Rg()(e))n=e(t);else{var r=t.x1,o=t.y1,a=t.x2,i=t.y2,s=t.key,l=bO(t,fO),c=cy(l,!1),u=(c.offset,bO(c,pO));n=v().createElement("line",wO({},u,{x1:r,y1:o,x2:a,y2:i,fill:"none",key:s}))}return n}function NO(e){var t=e.x,n=e.width,r=e.horizontal,o=void 0===r||r,a=e.horizontalPoints;if(!o||!a||!a.length)return null;var i=a.map(function(r,a){var i=gO(gO({},e),{},{x1:t,y1:r,x2:t+n,y2:r,key:"line-".concat(a),index:a});return xO(o,i)});return v().createElement("g",{className:"recharts-cartesian-grid-horizontal"},i)}function EO(e){var t=e.y,n=e.height,r=e.vertical,o=void 0===r||r,a=e.verticalPoints;if(!o||!a||!a.length)return null;var i=a.map(function(r,a){var i=gO(gO({},e),{},{x1:r,y1:t,x2:r,y2:t+n,key:"line-".concat(a),index:a});return xO(o,i)});return v().createElement("g",{className:"recharts-cartesian-grid-vertical"},i)}function MO(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,a=e.width,i=e.height,s=e.horizontalPoints,l=e.horizontal;if(void 0!==l&&!l||!t||!t.length)return null;var c=s.map(function(e){return Math.round(e+o-o)}).sort(function(e,t){return e-t});o!==c[0]&&c.unshift(0);var u=c.map(function(e,s){var l=c[s+1]?c[s+1]-e:o+i-e;if(l<=0)return null;var u=s%t.length;return v().createElement("rect",{key:"react-".concat(s),y:e,x:r,height:l,width:a,stroke:"none",fill:t[u],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return v().createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function _O(e){var t=e.vertical,n=void 0===t||t,r=e.verticalFill,o=e.fillOpacity,a=e.x,i=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(e){return Math.round(e+a-a)}).sort(function(e,t){return e-t});a!==u[0]&&u.unshift(0);var d=u.map(function(e,t){var n=u[t+1]?u[t+1]-e:a+s-e;if(n<=0)return null;var c=t%r.length;return v().createElement("rect",{key:"react-".concat(t),x:e,y:i,width:n,height:l,stroke:"none",fill:r[c],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return v().createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var IO=function(e,t){var n=e.xAxis,r=e.width,o=e.height,a=e.offset;return ej(kT(gO(gO(gO({},QT.defaultProps),n),{},{ticks:tj(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),a.left,a.left+a.width,t)},SO=function(e,t){var n=e.yAxis,r=e.width,o=e.height,a=e.offset;return ej(kT(gO(gO(gO({},QT.defaultProps),n),{},{ticks:tj(n,!0),viewBox:{x:0,y:0,width:r,height:o}})),a.top,a.top+a.height,t)},jO={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function kO(e){var t,n,r,o,a,i,s,l,c=nC(),u=rC(),d=(0,w.useContext)($D),f=gO(gO({},e),{},{stroke:null!==(t=e.stroke)&&void 0!==t?t:jO.stroke,fill:null!==(n=e.fill)&&void 0!==n?n:jO.fill,horizontal:null!==(r=e.horizontal)&&void 0!==r?r:jO.horizontal,horizontalFill:null!==(o=e.horizontalFill)&&void 0!==o?o:jO.horizontalFill,vertical:null!==(a=e.vertical)&&void 0!==a?a:jO.vertical,verticalFill:null!==(i=e.verticalFill)&&void 0!==i?i:jO.verticalFill,x:Sg(e.x)?e.x:d.left,y:Sg(e.y)?e.y:d.top,width:Sg(e.width)?e.width:d.width,height:Sg(e.height)?e.height:d.height}),p=f.x,m=f.y,h=f.width,g=f.height,y=f.syncWithTicks,b=f.horizontalValues,x=f.verticalValues,N=(s=(0,w.useContext)(WD),Ag(s)),E=(l=(0,w.useContext)(GD),ZD()(l,function(e){return tk()(e.domain,Number.isFinite)})||Ag(l));if(!Sg(h)||h<=0||!Sg(g)||g<=0||!Sg(p)||p!==+p||!Sg(m)||m!==+m)return null;var M=f.verticalCoordinatesGenerator||IO,_=f.horizontalCoordinatesGenerator||SO,I=f.horizontalPoints,S=f.verticalPoints;if((!I||!I.length)&&Rg()(_)){var j=b&&b.length,k=_({yAxis:E?gO(gO({},E),{},{ticks:j?b:E.ticks}):void 0,width:c,height:u,offset:d},!!j||y);zg(Array.isArray(k),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(mO(k),"]")),Array.isArray(k)&&(I=k)}if((!S||!S.length)&&Rg()(M)){var D=x&&x.length,C=M({xAxis:N?gO(gO({},N),{},{ticks:D?x:N.ticks}):void 0,width:c,height:u,offset:d},!!D||y);zg(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(mO(C),"]")),Array.isArray(C)&&(S=C)}return v().createElement("g",{className:"recharts-cartesian-grid"},v().createElement(vO,{fill:f.fill,fillOpacity:f.fillOpacity,x:f.x,y:f.y,width:f.width,height:f.height,ry:f.ry}),v().createElement(NO,wO({},f,{offset:d,horizontalPoints:I,xAxis:N,yAxis:E})),v().createElement(EO,wO({},f,{offset:d,verticalPoints:S,xAxis:N,yAxis:E})),v().createElement(MO,wO({},f,{horizontalPoints:I})),v().createElement(_O,wO({},f,{verticalPoints:S})))}kO.displayName="CartesianGrid";const DO=w.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:a=!1,label:i,labelFormatter:s,labelClassName:l,formatter:c,color:u,nameKey:d="name",labelKey:f},p)=>{if(!e||!t?.length)return null;const m=1===t.length&&"dot"!==r;return(0,R.jsxs)("div",{ref:p,className:Le("grid min-w-[8rem] items-start gap-1.5 rounded-lg border bg-tooltip-background-light px-3 py-2 text-xs shadow-xl",n),children:[m?null:(()=>{if(o||!t?.length)return null;const[e]=t,n=s?s(i||""):e[f]||i;return n?(0,R.jsx)("div",{className:Le("font-medium",l),children:n}):null})(),(0,R.jsx)("div",{className:"grid gap-1.5",children:t.map((e,t)=>{const n=u||e.color||"#000";return(0,R.jsxs)("div",{className:Le("flex w-full items-stretch gap-2","dot"===r&&"items-center"),children:[!a&&(0,R.jsx)("div",{className:Le({"size-2.5 ":"dot"===r,"w-1 h-full":"line"===r,"w-0 border-[0.5px] border-dashed":"dashed"===r}),style:{backgroundColor:"dot"===r||"line"===r?n:"",borderColor:"dashed"===r?n:""}}),(0,R.jsxs)("div",{className:"flex-1 flex justify-between items-center gap-2",children:[(0,R.jsx)("span",{children:e[d]||e.dataKey}),(0,R.jsx)("span",{className:"font-mono font-medium",children:c?c(e.value??""):e.value??""})]})]},e.dataKey||t)})})]})});DO.displayName="ChartTooltipContent";const CO="#6B7280",AO=[{stroke:"#2563EB"},{stroke:"#38BDF8"}],TO=({data:e,dataKeys:t=[],seriesLabels:n,colors:r=[],showXAxis:o=!1,showYAxis:a=!1,showTooltip:i=!0,tooltipIndicator:s="dot",tooltipLabelKey:l,showCartesianGrid:c=!0,xAxisTickFormatter:u,yAxisTickFormatter:d,tickFormatter:f,xAxisDataKey:p,yAxisDataKey:m,xAxisFontSize:h="sm",xAxisFontColor:g=CO,yAxisFontColor:y=CO,chartWidth:w=350,chartHeight:b=200,withDots:v=!1,lineChartWrapperProps:x,strokeDasharray:N="3 3",gridColor:E="#E5E7EB",biaxial:M=!1,noDataComponent:_})=>{const I=r.length>0?r:AO,S={sm:"12px",md:"14px",lg:"16px"},j=S[h]||S.sm,k=(e=0)=>Array.isArray(y)?y[e]||y[0]||CO:y;return e&&0!==e.length?(0,R.jsx)("div",{role:"img","aria-label":"Line chart",children:(0,R.jsx)(by,{width:w,height:b,children:(0,R.jsxs)(dO,{...x,data:e,children:[c&&(0,R.jsx)(kO,{strokeDasharray:N,horizontal:!1,stroke:E}),(0,R.jsx)(eO,{dataKey:p,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:u||f,tick:{fontSize:j,fill:g},hide:!o,interval:"equidistantPreserveStart"}),(0,R.jsx)(uO,{yAxisId:"left",dataKey:M?t[0]:m,tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:d,tick:{fontSize:j,fill:k(0)},hide:!a,orientation:"left"}),M&&t.length>1&&(0,R.jsx)(uO,{yAxisId:"right",dataKey:t[1],tickLine:!1,axisLine:!1,tickMargin:8,tickFormatter:d,tick:{fontSize:j,fill:k(1)},orientation:"right",hide:!a}),i&&(0,R.jsx)(mw,{content:(0,R.jsx)(DO,{indicator:s,labelKey:l})}),t.map((e,t)=>{let r="left";return M&&t>0&&(r="right"),(0,R.jsx)(NT,{type:"monotone",dataKey:e,name:n?.[e],stroke:I[t].stroke,fill:I[t].stroke,strokeWidth:2,dot:v,yAxisId:r},e)})]})})}):_||(0,R.jsx)(yp,{size:"sm",variant:"help",children:"No data available"})},OO="#F06434",LO=(e,t=2)=>{const n=Math.abs(Number(e)||0).toFixed(t),[r,o]=n.split("."),a=r.replace(/\B(?=(\d{3})+(?!\d))/g,null!==(i=cartflows_admin?.woo_thousand_sep)&&void 0!==i?i:",");var i;return(Number(e)<0?"-":"")+(o?a+(cartflows_admin?.woo_decimal_sep||".")+o:a)},zO=e=>{const t=cartflows_admin?.woo_currency||"";switch(cartflows_admin?.woo_currency_pos||"left"){case"right":return e+t;case"right_space":return e+" "+t;case"left_space":return t+" "+e;default:return t+e}},PO=(e,t=2)=>zO(LO(e,t)),RO=e=>new Intl.NumberFormat(document.documentElement.lang||void 0,{notation:"compact",maximumFractionDigits:1}).format(Number(e)||0),UO=e=>zO(RO(e)),BO=e=>(e=>{const[t,n,r]=String(e).split("-").map(Number);return new Date(t,n-1,r)})(e).toLocaleDateString(void 0,{month:"short",day:"numeric"}),FO=function(e){const[{analyticsData:t}]=l(),n=t?.flow_stats?.revenue_by_date||[],r=e.dateRange.map(e=>{const t=BO(e),r=n.find(t=>t.OrderDate===e);return{date:t,revenue:r?Number(r.Revenue):0}});return(0,a.createElement)("div",null,(0,a.createElement)(TO,{data:r,dataKeys:["revenue"],xAxisDataKey:"date",yAxisDataKey:"revenue",colors:[{stroke:OO}],showXAxis:!0,showYAxis:!0,yAxisTickFormatter:UO,chartWidth:"100%",chartHeight:305}))},YO=function(e){const[{analyticsData:t}]=l(),n=t?.flow_stats?.orders_by_date||[],r=e.dateRange.map(e=>{const t=BO(e),r=n.find(t=>t.OrderDate===e);return{date:t,orders:r?Number(r.OrderCount):0}});return(0,a.createElement)("div",null,(0,a.createElement)(TO,{data:r,dataKeys:["orders"],xAxisDataKey:"date",yAxisDataKey:"orders",colors:[{stroke:OO}],showXAxis:!0,showYAxis:!0,yAxisTickFormatter:RO,chartWidth:"100%",chartHeight:305}))},ZO=({title:e="",description:t=(0,z.__)("Upgrade your plan anytime and get more detailed analytics data.","cartflows"),containerClass:n="",innerContainerClass:r=""})=>{const o=(0,P.applyFilters)("cartflows.upgradeNotice.content",{title:e,description:t,ctaLabel:(0,z.__)("Upgrade to PRO","cartflows"),ctaHref:getUpgradeToProUrl()});return(0,a.createElement)("div",{className:`wcf-upgrade-to-pro-notice-container ${n}`},(0,a.createElement)("div",{className:`wcf-upgrade-to-pro-notice-inner-container ${r} `},(0,a.createElement)("div",{className:"flex justify-center mb-5"},(0,a.createElement)(Rp,null)),(0,a.createElement)(_h,{size:"md",tag:"h3",title:o.title,className:"mb-1 justify-center"}),(0,a.createElement)(Ch,{size:14,color:"secondary",className:"mb-5 text-center"},o.description),(0,a.createElement)("div",{className:"flex justify-center"},(0,a.createElement)(Wo,{tag:"a",href:o.ctaHref,variant:"primary",size:"md",target:"_blank",rel:"noreferrer",icon:(0,a.createElement)(zp,null),iconPosition:"right",className:"no-underline"},o.ctaLabel))))},QO={total_views:{title:(0,z.__)("See Exactly How Much Traffic Your Funnels Get","cartflows"),description:(0,z.__)("Unlock Pro and track visits across every funnel in real time.","cartflows"),dataKey:"visits",yAxisTickFormatter:RO},offer_revenue:{title:(0,z.__)("Discover How Much Your Offers Actually Earn","cartflows"),description:(0,z.__)("Unlock Pro and see exactly how upsells, downsells, and bumps drive revenue.","cartflows"),dataKey:"offer_revenue",yAxisTickFormatter:UO}},VO=function({slug:e,dateRange:t}){const n=QO[e]||QO.total_views,r=t.map(e=>({date:BO(e),[n.dataKey]:0}));return(0,a.createElement)("div",{className:"relative"},(0,a.createElement)(ZO,{title:n.title,description:n.description,containerClass:"bg-border-transparent-subtle bg-opacity-25 absolute z-10 w-full h-full flex border border-border-subtle",innerContainerClass:"border border-border-subtle shadow-lg p-5 rounded-lg w-1/3 m-auto text-center bg-background-primary"}),(0,a.createElement)("div",{className:"blur-[2px]"},(0,a.createElement)(TO,{data:r,dataKeys:[n.dataKey],xAxisDataKey:"date",yAxisDataKey:n.dataKey,colors:[{stroke:OO}],showXAxis:!0,showYAxis:!0,yAxisTickFormatter:n.yAxisTickFormatter,chartWidth:"100%",chartHeight:305})))},WO=({variant:e="rectangular",className:t,...n})=>{const r={circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"}[e],o={circular:"size-10",rectangular:"w-96 h-3"}[e];return(0,R.jsx)("div",{role:"status","aria-label":"Loading",className:Le(r,"animate-pulse",o,t),...n})},GO=function(){return(0,a.createElement)("div",{className:"flex flex-col gap-5"},(0,a.createElement)("div",{className:"flex justify-between gap-6 border-0 border-b border-solid border-border-subtle"},Array.from({length:4}).map((e,t)=>(0,a.createElement)("div",{key:t,className:"flex flex-col gap-2.5 items-start flex-1 px-3 pb-4 pt-2.5"},(0,a.createElement)(WO,{className:"w-24 h-3 rounded"}),(0,a.createElement)(WO,{className:"w-28 h-7 rounded"})))),(0,a.createElement)("div",{className:"p-1"},(0,a.createElement)(WO,{variant:"rectangular",className:"w-full h-64 rounded-md"})))},HO=Fo("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),$O=(0,w.forwardRef)(({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:o,indeterminate:a,disabled:i,size:s="md",className:l,...c},u)=>{const d=(0,w.useMemo)(()=>e||`checkbox-${Bm()}`,[e]),f=(0,w.useMemo)(()=>`${d}-description`,[d]),p=(0,w.useMemo)(()=>typeof r<"u",[r]),[m,h]=(0,w.useState)(n||!1),g="primary",y={sm:{checkbox:"size-4 rounded gap-1",icon:"size-3",text:"text-sm",description:"text-sm",gap:"gap-0.5"},md:{checkbox:"size-5 rounded gap-1",icon:"size-4",text:"text-base",description:"text-sm",gap:"gap-1"}},b={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},v=(0,w.useCallback)(()=>p?r:m,[p,r,m]),x=(0,w.useCallback)(()=>(0,w.isValidElement)(t)?t:t?.heading||t?.description?(0,R.jsxs)("div",{className:y[s].gap,children:[t?.heading&&(0,R.jsx)(yp,{className:Le("text-text-primary font-medium leading-4 m-0",y[s].text,y[s].gap,i&&"text-text-disabled"),htmlFor:d,children:t?.heading}),t?.description&&(0,R.jsx)(yp,{tag:"p",id:f,className:Le("font-normal leading-5 m-0",y[s].description,i&&"text-text-disabled"),variant:"help",children:t?.description})]}):null,[t,s,i]);return(0,R.jsxs)("div",{className:Le("inline-flex items-center justify-center gap-2",!!t&&"items-start",i&&"cursor-not-allowed"),children:[(0,R.jsxs)("span",{className:Le("relative flex items-center justify-center rounded-full p-0.5",!i&&"cursor-pointer"),children:[(0,R.jsx)("input",{ref:u,id:d,type:"checkbox",...a&&{"aria-checked":"mixed"},...t?.description&&{"aria-describedby":f},className:Le("peer relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid focus:outline-none",b[g].checkbox,y[s].checkbox,i&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",l),checked:v(),onChange:e=>{if(i)return;const t=e.target.checked;p||h(t),"function"==typeof o&&o(t)},disabled:i,...c}),(0,R.jsx)("span",{"aria-hidden":"true",className:Le("pointer-events-none inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",b[g].icon,i&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:a?(0,R.jsx)(HO,{className:Le(y[s]?.icon)}):(0,R.jsx)(Zo,{className:Le(y[s]?.icon)})})]}),!!t&&x()]})});$O.displayName="Checkbox";const XO=function(e){const{name:t,id:n,label:r,value:o,desc:i,backComp:s=!1,tooltip:l,onClick:c,notice:u,child_class:d="",isDisabled:f=!1,isPro:p=!1}=e,[m,h]=(0,a.useState)(o);(0,a.useEffect)(()=>{h(o)},[o]);const g=s?"enable":"yes",y=s?"disable":"no";return(0,a.createElement)("div",{className:"wcf-field wcf-checkbox-field text-left"},(0,a.createElement)("div",{className:"wcf-field__data flex items-center gap-2.5"},(0,a.createElement)("div",{className:`wcf-field__data--content ${d}`},(0,a.createElement)("input",{type:"hidden",name:t,value:m}),(0,a.createElement)($O,{id:n||t,checked:g===m,onChange:function(e){let r;if(e){if(u&&!function(){switch(u.type){case"alert":return alert(u.message),!0;case"confirm":return!!confirm(u.message);case"prompt":return prompt(u.message)===u.check.toUpperCase();default:return!1}}())return;h(g),r=g}else h(y),r=y;const o={target:{checked:e,id:n||t}},a=new CustomEvent("wcf:checkbox:change",{bubbles:!0,detail:{e:o,name:t,value:r}});document.dispatchEvent(a),c&&c(o)},disabled:f,className:e.class||e.className})),r&&(0,a.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-text-primary text-left w-full md:w-80 lg:w-80"},(0,a.createElement)("label",{htmlFor:n||t,className:"mr-3"},r,l&&(0,a.createElement)(HZ,{text:l}),!wcfCartflowsPro()&&p&&(0,a.createElement)("span",{className:"ml-2 inline-flex align-middle"},(0,a.createElement)(Rp,null))))),i&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Vh(i)))},qO={primary:{checkbox:"border-border-strong hover:border-border-interactive checked:border-border-interactive bg-white checked:bg-toggle-on checked:hover:bg-toggle-on-hover checked:hover:border-toggle-on-hover focus:ring-2 focus:ring-offset-2 focus:ring-focus",icon:"text-white"}},JO={sm:"text-sm leading-5",md:"text-base leading-6"},KO={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},eL={xs:"py-1 px-1 text-sm gap-0.5 [&>svg]:size-4",sm:"py-1 px-1.5 text-base gap-1 [&>svg]:size-4",md:"py-2 px-2.5 text-base gap-1 [&>svg]:size-5",lg:"py-2.5 px-3 text-base gap-1 [&>svg]:size-6"},tL=({label:e,switchId:t,disabled:n=!1,children:r,size:o})=>{const a={xs:"text-xs leading-4 font-medium",sm:"text-sm leading-5 font-medium",md:"text-base leading-6 font-medium"},i={xs:"text-xs leading-4 font-normal",sm:"text-sm leading-5 font-normal",md:"text-sm leading-5 font-normal"},s={xs:"space-y-0.5",sm:"space-y-0.5",md:"space-y-1"};if((0,w.isValidElement)(e))return(0,R.jsxs)("div",{className:Le("inline-flex items-center gap-3","items-start"),children:[r,e]});const l=!e?.heading&&!e?.description,c=e?.heading&&e?.description?"items-start":"items-center";return l?r:(0,R.jsxs)("div",{className:Le("inline-flex",c,"gap-3"),children:[r,(()=>{const{heading:r="",description:l=""}=e||{};return(0,R.jsxs)("div",{className:Le("space-y-0.5",s[o]),children:[r&&(0,R.jsx)(yp,{htmlFor:t,className:Le("m-0",a[o]),...n&&{variant:"disabled"},children:r}),l&&(0,R.jsx)(yp,{tag:"p",variant:"help",className:Le("text-sm font-normal leading-5 m-0",i[o]),...n&&{variant:"disabled"},children:l})]})})()]})},nL=(0,w.forwardRef)(({id:e,onChange:t,value:n,defaultValue:r=!1,size:o="sm",disabled:a=!1,label:i={heading:"",description:""},name:s,className:l,...c},u)=>{const d="lg"===o?"md":o,f=(0,w.useMemo)(()=>typeof n<"u",[n]),p=(0,w.useMemo)(()=>e||`switch-${Bm()}`,[]),[m,h]=(0,w.useState)(r),g="primary",y=(0,w.useCallback)(()=>f?n:m,[f,n,m]),b={primary:{input:"bg-toggle-off checked:bg-toggle-on focus:ring focus:ring-toggle-on focus:ring-offset-2 border border-solid border-toggle-off-border checked:border-toggle-on-border shadow-toggleContainer focus:outline-none checked:focus:border-toggle-on-border focus:border-toggle-off-border",toggleDial:"bg-toggle-dial-background shadow-toggleDial"}},v={md:{container:"w-11 h-6",toggleDial:"size-4 peer-checked:translate-x-5"},sm:{container:"w-10 h-5",toggleDial:"size-3 peer-checked:translate-x-5"},xs:{container:"w-8 h-4",toggleDial:"size-2.5 peer-checked:translate-x-3.75"}};return(0,R.jsx)(tL,{label:i,switchId:p,disabled:a,size:d,children:(0,R.jsxs)("div",{className:Le("relative group/switch inline-block cursor-pointer rounded-full shrink-0",v[d].container,l),children:[(0,R.jsx)("input",{ref:u,id:p,type:"checkbox",role:"switch",className:Le("peer appearance-none absolute rounded-full cursor-pointer transition-colors duration-300 h-full w-full before:content-[''] checked:before:content-[''] m-0 checked:[background-image:none]",b[g].input,a&&"bg-toggle-off-disabled disabled:border-transparent disabled:cursor-not-allowed checked:disabled:bg-toggle-on-disabled disabled:shadow-toggle-disabled",!a&&{primary:{input:"group-hover/switch:bg-toggle-off-hover checked:group-hover/switch:bg-toggle-on-hover checked:group-hover/switch:border-toggle-on-border"}}[g].input),checked:y(),onChange:e=>{if(a)return;const n=e.target.checked;f||h(n),"function"==typeof t&&t(n)},disabled:a,name:s,...c}),(0,R.jsx)("span",{"aria-hidden":"true",className:Le("peer/toggle-dial pointer-events-none bg-white border rounded-full absolute cursor-pointer shadow-md before:content[''] before:transition-opacity before:opacity-0 hover:before:opacity-10 before:hidden border-none transition-all duration-300 top-2/4 not-rtl:left-1 rtl:right-1 -translate-y-2/4 before:w-10 before:h-10 before:rounded-full before:absolute before:top-2/4 not-rtl:before:left-2/4 rtl:before:right-2/4 before:-translate-y-2/4 before:-translate-x-2/4",v[d].toggleDial,b[g].toggleDial,a&&"peer-disabled:cursor-not-allowed",!a&&{md:"group-hover/switch:size-5 group-focus-within/switch:size-5 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",sm:"group-hover/switch:size-4 group-focus-within/switch:size-4 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5",xs:"group-hover/switch:size-3.25 group-focus-within/switch:size-3.25 not-rtl:group-focus-within/switch:left-0.5 rtl:group-focus-within/switch:right-0.5 not-rtl:group-hover/switch:left-0.5 rtl:group-hover/switch:right-0.5"}[d])})]})})});nL.displayName="Switch";const rL=(0,w.createContext)({}),oL=()=>(0,w.useContext)(rL),aL=({children:e,name:t,style:n="simple",size:r="md",value:o,defaultValue:a,by:i="id",as:s="div",onChange:l,className:c,disableGroup:u=!1,vertical:d=!1,columns:f=4,multiSelection:p=!1,gapClassName:m="gap-2"})=>{const h=(0,w.useMemo)(()=>typeof o<"u",[o]),g=(0,w.useMemo)(()=>t||`radio-button-group-${Bm()}`,[t]);let y;y=h?o:p?a??[]:a;const[b,v]=(0,w.useState)(y),x=(0,w.useCallback)(e=>{if(p)v(t=>{let n;return n=Array.isArray(t)&&"string"==typeof e&&t.includes(e)?t.filter(t=>t!==e):[...Array.isArray(t)?t:[],..."string"==typeof e?[e]:[]],"function"==typeof l&&l(n),n});else{if(h||v(e),"function"!=typeof l)return;l(e)}},[l]);c=Le("grid grid-cols-4",Re[f],m,"tile"===n&&"gap-0",d&&"grid-cols-1",c);const N=Le("tile"===n?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",c),E=()=>(0,R.jsx)(rL.Provider,{value:{name:g,value:h?o:b,by:i,onChange:x,isControlled:h,disableAll:u,style:n,columns:f,multiSelection:p,size:r},children:w.Children.map(e,e=>(0,w.isValidElement)(e)?e:null)});return(0,R.jsx)(R.Fragment,{children:"tile"===n?(0,R.jsx)("div",{className:N,children:E()}):(0,R.jsx)(s,{...s===w.Fragment?{}:{className:c},children:E()})})};aL.displayName="RadioButton.Group";const iL=(0,w.forwardRef)(({id:e,label:t,value:n,children:r,disabled:o,icon:a=null,inlineIcon:i=!1,hideSelection:s=!1,reversePosition:l=!1,borderOn:c=!1,borderOnActive:u=!0,badgeItem:d=null,useSwitch:f=!1,info:p,minWidth:m=!0,...h},g)=>{const{buttonWrapperClasses:y,...b}=h,v=oL(),{name:x,value:N,by:E,onChange:M,disableAll:_,checked:I,multiSelection:S,size:j="md"}=v,k="primary",D=(0,w.useMemo)(()=>e||`radio-button-${Bm()}`,[e]),C=(0,w.useMemo)(()=>_||o,[_,o]),A=(0,w.useMemo)(()=>S?Array.isArray(N)&&N.includes(n):typeof I<"u"?I:typeof N==typeof n&&("string"==typeof N?N===n:Array.isArray(N)?N.includes(n):N[E]===n[E]),[N,n,I]),T=(0,w.useCallback)(()=>(0,w.isValidElement)(t)?t:t?.heading?(0,R.jsxs)("div",{className:Le(!i&&{"space-y-3":"sm"===j,"space-y-4":"md"===j},l&&!c&&(f?"ml-10":"ml-4"),i&&"flex gap-2",i&&!t.description&&"items-center"),children:[a&&(0,R.jsx)(R.Fragment,{children:a}),(0,R.jsxs)("div",{className:Le(!a||!f||a&&d?{"space-y-0.5":"sm"===j,"space-y-1":"md"===j}:"space-y-0.5"),children:[(0,R.jsx)("p",{className:Le("text-text-primary font-medium m-0 [overflow-wrap:anywhere]",JO[j],o&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&(0,R.jsx)("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0 [overflow-wrap:anywhere]",children:t.description})]})]}):null,[t,l,c,f]);if("tile"===v.style)return(0,R.jsx)(sL,{id:e,label:t,value:n,disabled:o,size:j,children:r});const O=()=>{C||(S?f&&M(n,!A):M(n))};let L="pr-12";l&&c&&(L=f?"pl-16":"pl-12");let z="right-3 mr-0.5";return l&&(z=c?"left-3 ml-0.5":"left-0"),(0,R.jsxs)("label",{className:Le("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",m&&"min-w-[180px]",c&&"outline outline-field-border outline-1 rounded-md shadow-sm hover:outline-border-interactive",u&&c&&A&&"outline-border-interactive",{"pl-3.5 pr-2.5 py-2.5":"sm"===j&&!(a&&f),"p-3":"sm"===j&&(a&&f||a&&d),"pl-4 pr-3 py-3":"md"===j&&!(a&&f),"p-4":"md"===j&&(a&&f||a&&d)},L,C&&"cursor-not-allowed opacity-40",y),htmlFor:D,onClick:O,children:[!!t&&(0,R.jsx)("label",{className:Le("cursor-pointer",C&&"cursor-not-allowed"),htmlFor:D,children:T()}),!!p&&(0,R.jsx)("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:(0,R.jsx)(ea,{title:p?.heading,content:p?.description,children:(0,R.jsx)(Yo,{className:Le("text-text-primary",KO[j]?.info)})})}),(0,R.jsxs)("label",{className:Le("absolute flex items-center cursor-pointer rounded-full gap-2",z,C&&"cursor-not-allowed",i&&(l&&c?"ml-3":"mr-3")),onClick:O,children:[!!d&&d,!s&&(f?(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(nL,{defaultValue:!1,size:j,onChange:()=>{S?M(n,!A):M(n)},checked:A,...b,"aria-label":t?.heading??"Switch"})}):(0,R.jsxs)("span",{className:"relative p-0.5",children:[(0,R.jsx)("input",{ref:g,id:D,type:S?"checkbox":"radio",className:Le("peer flex relative cursor-pointer appearance-none transition-all m-0 before:content-[''] checked:before:content-[''] checked:before:hidden before:hidden !border-1.5 border-solid focus-within:outline-none",!S&&"rounded-full",qO[k].checkbox,KO[j].checkbox,C&&"disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled cursor-not-allowed"),name:x,value:n,onChange:e=>M(e.target.value),checked:A,disabled:C,...b}),(0,R.jsx)("span",{className:Le("inline-flex items-center absolute top-2/4 not-rtl:left-2/4 rtl:right-2/4 -translate-y-2/4 -translate-x-2/4 text-white opacity-0 transition-opacity peer-checked:opacity-100",qO[k].icon,C&&"peer-disabled:text-border-disabled cursor-not-allowed"),children:S?(0,R.jsx)(Zo,{className:"sm"===j?"size-3":"size-4"}):(0,R.jsx)("div",{className:Le("rounded-full bg-current",KO[j]?.icon)})})]}))]})]})});iL.displayName="RadioButton.Button";const sL=({id:e,children:t,value:n,disabled:r,size:o="md",...a})=>{const i=oL(),{name:s,value:l,by:c,onChange:u,disableAll:d,checked:f}=i||{},p=(0,w.useMemo)(()=>e||`radio-button-${Bm()}`,[e]),m=(0,w.useMemo)(()=>d||r,[d,r]),h=(0,w.useMemo)(()=>typeof f<"u"?f:typeof l==typeof n&&("string"==typeof l?l===n:Array.isArray(l)?l.includes(n):!(!l||!c)&&l[c]===n[c]),[l,n,f,c]),g=Le("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",m?"text-text-disabled cursor-not-allowed":"",eL[o],"border-0 border-r border-border-subtle border-solid");return(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)("button",{type:"button",id:p,"aria-label":"Radio Button",className:Le(g,"first:rounded-tl first:rounded-bl first:border-0 first:border-r first:border-border-subtle last:rounded-tr last:rounded-br last:border-0",h&&"bg-button-disabled"),onClick:()=>{u&&u(n)},disabled:m,...a,children:[(0,R.jsx)("input",{type:"hidden",value:n,name:s,checked:h,onChange:e=>u?.(e.target.value)}),t]})})},lL=Object.assign(iL,{Group:aL,Button:iL}),cL=function(e){const{name:t,label:n,value:r,options:o,desc:i,child_class:s="",child_className:l="",onClick:c=""}=e,[u,d]=(0,a.useState)(r);return(0,a.useEffect)(()=>{d(r)},[r]),(0,a.createElement)("div",{className:"wcf-field wcf-radio-field"},(0,a.createElement)("div",{className:"wcf-field__data block"},n&&(0,a.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-left w-full md:w-80 lg:w-80 mb-2"},(0,a.createElement)("label",{className:"text-text-primary text-base font-medium"},n)),(0,a.createElement)("div",{className:"wcf-field__data--content"},o&&(0,a.createElement)(lL.Group,{name:t,value:u,onChange:function(t){d(t);const n=new CustomEvent("wcf:radio:change",{bubbles:!0,detail:{e:{target:{value:t}},name:e.name,value:t}});document.dispatchEvent(n),c&&c(t)},vertical:!0,gapClassName:"gap-0"},o.map(e=>(0,a.createElement)(lL.Button,(0,N.A)({key:e.value,value:e.value,minWidth:!1,buttonWrapperClasses:`wcf-radio-field__option py-1.5 [&_label]:text-left ${e.desc?"[&_p:last-child]:!text-text-secondary":""} ${l||s}`},(e.label||e.desc)&&{label:{heading:e.label||"",...e.desc&&{description:e.desc}}})))))),i&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Vh(i)))},uL=Fo("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),dL=Fo("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),fL={sm:{icon:"[&>svg]:size-4",searchIcon:"[&>svg]:size-4",selectButton:"px-2.5 py-2 rounded text-xs font-medium leading-4 min-h-[2rem]",multiSelect:"pl-2 pr-2 py-1.5",displaySelected:"text-xs font-normal",dropdown:"rounded-md",dropdownItemsWrapper:"p-1.5",searchbarWrapper:"p-3 flex items-center gap-0.5",searchbar:"font-medium text-sm",searchbarIcon:"size-4",label:"text-sm font-medium"},md:{icon:"[&>svg]:size-5",searchIcon:"[&>svg]:size-5",selectButton:"px-3.5 py-2.5 rounded-md text-sm font-medium leading-4 min-h-[2.5rem]",multiSelect:"pl-2 pr-2.5 py-2",displaySelected:"text-sm font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-sm font-medium"},lg:{icon:"[&>svg]:size-6",searchIcon:"[&>svg]:size-5",selectButton:"px-4 py-3 rounded-lg text-sm font-medium leading-5 min-h-[3rem]",multiSelect:"pl-2.5 pr-3 py-2.5",displaySelected:"text-base font-normal",dropdown:"rounded-lg",dropdownItemsWrapper:"p-2",searchbarWrapper:"p-2.5 flex items-center gap-1",searchbar:"font-medium text-sm",searchbarIcon:"size-5",label:"text-base font-medium"}},pL="group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",mL="group-disabled:text-field-color-disabled",hL={sm:"w-[calc(100%+0.75rem)] translate-x-[-0.375rem]",md:"w-[calc(100%+1rem)] translate-x-[-0.5rem]",lg:"w-[calc(100%+1rem)] translate-x-[-0.5rem]"},gL={sm:"py-1.5 px-2 text-xs font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},yL=e=>Array.isArray(e)?e:null===e||typeof e>"u"||""===e?[]:[e],wL=e=>null===e||"boolean"==typeof e?"":"string"==typeof e||"number"==typeof e?e.toString():Array.isArray(e)?e.map(wL).join(" ").trim():(0,w.isValidElement)(e)?e.props&&e.props.children?wL(e.props.children):"":"object"==typeof e&&"textContent"in e?e.textContent?.toString().toLowerCase()||"":"object"==typeof e&&"children"in e?wL(e.children):"",bL=Fo("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),vL=({variant:e="primary",size:t="md",icon:n=null,className:r=""})=>{const o={primary:"text-brand-primary-600",secondary:"text-background-primary"}[e],a={sm:"[&>svg]:size-4",md:"[&>svg]:size-5",lg:"[&>svg]:size-6",xl:"[&>svg]:size-8"}[t];return(0,R.jsx)("span",{role:"status","aria-label":"Loading",className:Le("flex",a,o,r),children:n||(0,R.jsx)(bL,{className:"animate-spin shrink-0","aria-hidden":"true"})})},xL=(0,w.createContext)({}),NL=()=>(0,w.useContext)(xL),EL=(0,w.forwardRef)(({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,render:o,label:a,className:i,...s},l)=>{const{sizeValue:c,getReferenceProps:u,getValues:d,selectId:f,refs:p,isOpen:m,multiple:h,combobox:g,inlineSearch:y,setSelected:b,onChange:v,isControlled:x,disabled:N,by:E,searchKeyword:M,setSearchKeyword:_,searchPlaceholder:I,context:S,activeIndex:j,optionValuesRef:k,handleSelect:D}=NL(),C={sm:"xs",md:"sm",lg:"md"}[c],A=(0,w.useRef)(null),[T,O]=(0,w.useState)(!1);(0,w.useEffect)(()=>{m||O(!1)},[m]);const L=(0,w.useMemo)(()=>{if(!y||h)return"";const e=d();if(!e)return"";if("function"==typeof o){const t=o(e);if("string"==typeof t)return t}if("string"==typeof e||"number"==typeof e)return String(e);const t=e.name;return"string"==typeof t?t:""},[y,h,d,o]),z=(0,w.useCallback)(()=>{if(t)return t;const e="text-field-placeholder group-disabled:text-icon-disabled";return g?(0,R.jsx)(uL,{className:e}):(0,R.jsx)(Gp,{className:e})},[t]),P=(0,w.useCallback)(()=>{const t=d();if(!t)return null;if(h)return yL(t).map(e=>(0,R.jsx)(na,{className:"cursor-default",icon:r,type:"rounded",size:C,onMouseDown:U(e),label:"function"==typeof o?o(e):e.toString(),closable:!0,disabled:N},String(null!==e&&"object"==typeof e?e[E]:e)));const n=Array.isArray(t)&&t.length?t[0]:t;let a="string"==typeof n?n:"";return"function"==typeof o&&(a=o(n)),"function"==typeof e&&"function"!=typeof o&&(a=e({value:n})),((0,w.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof o&&(a=e),(0,R.jsx)("span",{className:Le("truncate",fL[c].displaySelected,mL),children:a})},[d,N,h,o,e,E]),U=e=>t=>{t?.preventDefault(),t?.stopPropagation();const n=[...yL(d())],r=n.findIndex(t=>null!==t&&null!==e&&"object"==typeof t?t[E]===e[E]:t===e);-1!==r&&(n.splice(r,1),x||b(n),"function"==typeof v&&v(n))};if(y){let e="";!h&&d()?e=m&&T?M:L:m&&(e=M);const t=h?!yL(d()).length:!d()&&!M;return(0,R.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!a&&(0,R.jsx)("label",{className:Le(fL[c]?.label,"text-field-label"),htmlFor:f,children:a}),(0,R.jsxs)("div",{ref:p.setPositionReference,className:Le("flex flex-wrap items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white cursor-text","outline outline-1 outline-field-border border-none","focus-within:ring-2 focus-within:ring-offset-2 focus-within:outline-focus-border focus-within:ring-focus","[&:hover:not(:focus-within):not(:has(:disabled))]:outline-border-strong",fL[c].selectButton,h&&fL[c].multiSelect,pL,i),onMouseDown:e=>{e.target!==A.current&&(e.preventDefault(),A.current?.focus())},children:[(0,R.jsxs)("div",{className:"flex-1 flex flex-wrap items-center gap-1.5 overflow-hidden",children:[h&&P(),(0,R.jsx)("input",{ref:Ko(p.setReference,A),id:f,type:"text",autoComplete:"off","aria-autocomplete":"list",disabled:N,placeholder:t?I:"",value:e,className:Le("flex-1 min-w-[4rem] bg-transparent border-0 outline-none focus:ring-0 p-0","placeholder:text-field-placeholder",fL[c].displaySelected,mL),...u({onFocus:()=>{m||S.onOpenChange(!0)},onClick:()=>{m||S.onOpenChange(!0)},onChange:e=>{O(!0),_(e.target.value),m||S.onOpenChange(!0)},onKeyDown:t=>{if("Enter"===t.key&&null!==j&&j>=0){t.preventDefault();const e=k.current[j];return void(void 0!==e&&D(j,e))}if("Backspace"===t.key&&!e&&h){t.preventDefault();const e=yL(d());e.length&&U(e[e.length-1])()}}})})]}),(0,R.jsx)("div",{className:Le("flex items-center [&>svg]:shrink-0",fL[c].icon),children:z()})]})]})}return(0,R.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!a&&(0,R.jsx)("label",{className:Le(fL[c]?.label,"text-field-label"),htmlFor:f,children:a}),(0,R.jsxs)("button",{id:f,ref:Ko(p.setReference,l),className:Le("flex items-center justify-between w-full box-border transition-[outline,background-color,color,box-shadow] duration-200 bg-white","outline outline-1 outline-field-border border-none cursor-pointer",!m&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",fL[c].selectButton,h&&fL[c].multiSelect,pL,i),tabIndex:0,disabled:N,...s,...u(),children:[(0,R.jsxs)("div",{className:Le("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",d()&&"flex flex-wrap"),children:[P(),(h?!yL(d()).length:!d())&&(0,R.jsx)("div",{className:Le("[grid-area:1/1/2/3] text-field-input px-1",fL[c].displaySelected,mL),children:n})]}),(0,R.jsx)("div",{className:Le("flex items-center [&>svg]:shrink-0",fL[c].icon),children:z()})]})]})});function ML({label:e,children:t,className:n,...r}){const{index:o,totalGroups:a}=r,{sizeValue:i}=NL();return(0,R.jsxs)(w.Fragment,{children:[(0,R.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,R.jsx)("div",{className:Le("p-2 font-normal text-text-tertiary",{sm:"text-xs",md:"text-xs",lg:"text-sm"}[i],n),id:`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:e}),(0,R.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),o<a&&!!(t&&w.Children.count(t)>0)&&(0,R.jsx)("hr",{className:Le("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",hL[i])})]})}function _L({children:e,className:t}){const{isOpen:n,context:r,refs:o,combobox:a,inlineSearch:i,floatingStyles:s,getFloatingProps:l,sizeValue:c,setSearchKeyword:u,setActiveIndex:d,setSelectedIndex:f,value:p,selected:m,getValues:h,searchKeyword:g,listContentRef:y,by:b,searchPlaceholder:v,activeIndex:x,searchFn:N,debounceDelay:E,selectId:M,optionValuesRef:_}=NL(),I=(0,w.useMemo)(()=>{const t=h();let n=-1;if(t){let r=w.Children.toArray(e);r.length>0&&(0,w.isValidElement)(r[0])&&r[0].type===ML&&(r=w.Children.toArray(e).map(e=>(0,w.isValidElement)(e)?w.Children.toArray(e.props.children):[]).flat()),n=r.findIndex(e=>{if(!(0,w.isValidElement)(e))return!1;const n=e.props.value;return"object"==typeof n&&"object"==typeof t?n[b]===t[b]:n===t})}return n},[p,m,e,b]);(0,w.useLayoutEffect)(()=>{n||(d(I),f(I))},[I,n]),(0,w.useLayoutEffect)(()=>{n&&(a&&[-1,null].includes(x)||d(-1))},[g,n]);const S=(0,w.useMemo)(()=>{let t=0,n=0;w.Children.forEach(e,e=>{if((0,w.isValidElement)(e)&&e.type===ML){let n=!1;if(g&&!N){const t=g.toLowerCase(),r=(e.props.label?.toLowerCase()||"").includes(t),o=w.Children.toArray(e.props.children).some(e=>!!(0,w.isValidElement)(e)&&(wL(e.props.children)?.toLowerCase()).includes(t));n=r||o}else n=!0;n&&t++}}),n=Math.max(0,t-1);let r=0,o=0;return _.current=[],w.Children.map(e,e=>{if(!(0,w.isValidElement)(e))return null;if(e.type===ML){let t=!1;if(g&&!N){const n=g.toLowerCase();t=(e.props.label?.toLowerCase()||"").includes(n)}const a=w.Children.map(e.props.children,e=>{if(!(0,w.isValidElement)(e))return null;if(t){const t=r++;_.current[t]=e.props.value;const n={...e.props,index:t,id:`${M}-option-${t}`};return(0,w.cloneElement)(e,n)}if(g&&!N){const t=wL(e.props.children)?.toLowerCase(),n=g.toLowerCase();if(!t?.includes(n))return null}const n=r++;_.current[n]=e.props.value;const o={...e.props,index:n,id:`${M}-option-${n}`};return(0,w.cloneElement)(e,o)});if(!a?.some(e=>null!==e))return null;const i={...e.props,children:a,index:o,totalGroups:n};return o++,(0,w.cloneElement)(e,i)}if(g&&!N){const t=wL(e.props?.children)?.toLowerCase(),n=g.toLowerCase();if(!t?.includes(n))return null}const t=r++;return _.current[t]=e.props.value,(0,w.cloneElement)(e,{...e.props,index:t,id:`${M}-option-${t}`})})},[g,p,m,e,N,M,_]),j=w.Children.count(S);(0,w.useEffect)(()=>{y.current=[];let t=w.Children.toArray(e);t&&(0,w.isValidElement)(t[0])&&t[0].type===ML&&(t=w.Children.toArray(t).map(e=>(0,w.isValidElement)(e)?e.props.children:null).filter(Boolean)),w.Children.forEach(t,e=>{if(!(0,w.isValidElement)(e))return;const t=wL(e.props?.children)?.toLowerCase();if(g&&!N){const e=g.toLowerCase();if(!t?.includes(e))return}y.current.push(t)})},[g,N]);const[k,D]=(0,w.useState)(!1),C=(0,w.useCallback)(async()=>{if(N&&"function"==typeof N&&!k){D(!0);try{await N(g)}catch(e){console.error(e)}finally{D(!1)}}},[g]),A=((e,t=500)=>{const n=(0,w.useRef)(null);return(0,w.useCallback)((...r)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>e(...r),t)},[e,t])})(C,E);(0,w.useEffect)(()=>{"function"==typeof N&&A()},[A]);const T=(0,R.jsxs)("div",{ref:o.setFloating,className:Le("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",a&&!i&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",fL[c].dropdown,!(a&&!i)&&"h-auto",a&&!i?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...s,zIndex:1},...l(),children:[a&&!i&&(0,R.jsxs)("div",{className:Le(fL[c].searchbarWrapper),children:[k?(0,R.jsx)(vL,{className:fL[c].searchbarIcon}):(0,R.jsx)(dL,{className:Le("text-icon-secondary shrink-0",fL[c].searchbarIcon)}),(0,R.jsx)("input",{className:Le("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",fL[c].searchbar),type:"search",name:"keyword","aria-label":"Search options",placeholder:v,onChange:e=>u(e.target.value),value:g,autoComplete:"off"})]}),(0,R.jsxs)("div",{className:Le("overflow-y-auto overflow-x-hidden",!(a&&!i)&&"w-full h-full",fL[c].dropdownItemsWrapper),children:[!!j&&S,!j&&(0,R.jsx)("div",{className:Le("p-2 text-center font-medium text-field-placeholder",gL[c]),children:"No items found"})]})]});return(0,R.jsx)(R.Fragment,{children:n&&(0,R.jsx)(R.Fragment,{children:i?T:(0,R.jsx)(so,{context:r,modal:!1,visuallyHiddenDismiss:!0,children:T})})})}function IL({children:e,root:t,id:n}){return(0,R.jsx)(Kr,{id:n,root:t,children:e})}function SL({value:e,selected:t,children:n,className:r,...o}){const{sizeValue:a,getItemProps:i,onKeyDownItem:s,onClickItem:l,activeIndex:c,selectedIndex:u,updateListRef:d,getValues:f,by:p,multiple:m,inlineSearch:h}=NL(),{index:g,id:y}=o,b=(0,w.useRef)(g),v=(0,w.useMemo)(()=>{if(!m)return!1;const t=f();return!!t&&yL(t).some(t=>null!==t&&null!==e&&"object"==typeof t?t[p]===e[p]:t===e)},[e,f,m,p]),x=(0,w.useMemo)(()=>"boolean"==typeof t?t:m?v:g===u,[v,u,t,m,g]);let N;return h||(N=g===c?0:-1),(0,R.jsxs)("div",{id:y,className:Le("w-full flex items-center justify-between text-text-primary hover:bg-button-tertiary-hover rounded-md transition-all duration-150 cursor-pointer focus:outline-none focus-within:outline-none outline-none",gL[a],g===c&&"bg-button-tertiary-hover",r),ref:e=>{d(g,e)},role:"option",tabIndex:N,"aria-selected":x&&g===c,...i({onClick(){l(b.current,e)},onKeyDown(t){s(t,b.current,e)}}),children:[(0,R.jsx)("span",{className:"w-full truncate",children:n}),x&&(0,R.jsx)(Zo,{className:Le("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[a])})]})}const jL=({id:e,size:t="md",value:n,defaultValue:r,onChange:o,by:a="id",children:i,multiple:s=!1,combobox:l=!1,inlineSearch:c=!1,disabled:u=!1,searchPlaceholder:d="Search...",searchFn:f,debounceDelay:p=500})=>{const m=(0,w.useMemo)(()=>e||`select-${Bm()}`,[e]),h=(0,w.useMemo)(()=>typeof n<"u",[n]),[g,y]=(0,w.useState)(r),[b,v]=(0,w.useState)(""),x=(0,w.useCallback)(()=>h?n:g,[h,n,g]),[N,E]=(0,w.useState)(!1),[M,_]=(0,w.useState)(null),[I,S]=(0,w.useState)(null),j={sm:l&&!c?256:172,md:l&&!c?256:216,lg:l&&!c?256:216},{refs:k,floatingStyles:D,context:C}=bo({strategy:"fixed",placement:"bottom-start",open:N,onOpenChange:E,whileElementsMounted:Un,middleware:[Hn(5),Xn({padding:10}),qn({apply({rects:e,elements:n,availableHeight:r}){Object.assign(n.floating.style,{maxHeight:`min(${r}px, ${j[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10})]}),A=(0,w.useRef)([]),T=(0,w.useRef)([]),O=(0,w.useRef)(!1),L=(0,w.useRef)([]);(0,w.useEffect)(()=>{N||v("")},[N]);const z=mo(C,{event:"mousedown",enabled:!c}),P=wo(C),U=Co(C,{role:"listbox"}),B=ko(C,{listRef:A,activeIndex:M,selectedIndex:I,onNavigate:_,loop:!0,virtual:c}),F=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:a,activeIndex:i,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:f=[],selectedIndex:p=null}=t,m=w.useRef(),h=w.useRef(""),g=w.useRef(null!=(n=null!=p?p:i)?n:-1),y=w.useRef(null),b=tr(s),v=tr(l),x=kr(u),N=kr(f);mr(()=>{r&&(clearTimeout(m.current),y.current=null,h.current="")},[r]),mr(()=>{var e;r&&""===h.current&&(g.current=null!=(e=null!=p?p:i)?e:-1)},[r,p,i]);const E=tr(e=>{e?o.current.typing||(o.current.typing=e,v(e)):o.current.typing&&(o.current.typing=e,v(e))}),M=tr(e=>{function t(e,t,n){const r=x.current?x.current(t,n):t.find(e=>0===(null==e?void 0:e.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())));return r?e.indexOf(r):-1}const n=a.current;if(h.current.length>0&&" "!==h.current[0]&&(-1===t(n,n,h.current)?E(!1):" "===e.key&&At(e)),null==n||N.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(At(e),E(!0)),n.every(e=>{var t,n;return!e||(null==(t=e[0])?void 0:t.toLocaleLowerCase())!==(null==(n=e[1])?void 0:n.toLocaleLowerCase())})&&h.current===e.key&&(h.current="",g.current=y.current),h.current+=e.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",g.current=y.current,E(!1)},d);const o=g.current,i=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],h.current);-1!==i?(b(i),y.current=i):" "!==e.key&&(h.current="",E(!1))}),_=w.useMemo(()=>({onKeyDown:M}),[M]),I=w.useMemo(()=>({onKeyDown:M,onKeyUp(e){" "===e.key&&E(!1)}}),[M,E]);return w.useMemo(()=>c?{reference:_,floating:I}:{},[c,_,I])}(C,{listRef:T,activeIndex:M,selectedIndex:I,onMatch:N?_:S,onTypingChange(e){O.current=e}}),{getReferenceProps:Y,getFloatingProps:Z,getItemProps:Q}=Eo([P,U,B,z,...l||c?[]:[F]]),V=(e,t)=>{if(s)return((e,t)=>{const n=[...yL(x())],r=n.findIndex(e=>null!==e&&null!==t&&"object"==typeof e?e[a]===t[a]:e===t);-1!==r?(n.splice(r,1),I===e&&S(null)):(n.push(t),S(e)),h||y(n),c&&(k.domReference.current??k.reference.current)?.focus(),v(""),"function"==typeof o&&o(n)})(e,t);S(e),h||y(t),(k.domReference.current??k.reference.current)?.focus(),E(!1),v(""),"function"==typeof o&&o(t)},W=(0,w.useCallback)((e,t)=>{A.current[e]=t},[]);return(0,R.jsx)(xL.Provider,{value:{selectedIndex:I,setSelectedIndex:S,activeIndex:M,setActiveIndex:_,selected:g,setSelected:y,handleSelect:V,combobox:l,inlineSearch:c,optionValuesRef:L,sizeValue:t,multiple:s,onChange:o,isTypingRef:O,getItemProps:Q,onClickItem:(e,t)=>{V(e,t)},onKeyDownItem:(e,t,n)=>{"Enter"===e.key&&(e.preventDefault(),V(t,n))," "===e.key&&!O.current&&(e.preventDefault(),V(t,n))},getValues:x,selectId:m,getReferenceProps:Y,isOpen:N,value:n,updateListRef:W,refs:k,listContentRef:T,by:a,getFloatingProps:Z,floatingStyles:D,context:C,searchKeyword:b,setSearchKeyword:v,disabled:u,isControlled:h,searchPlaceholder:d,searchFn:f,debounceDelay:p},children:i})};jL.displayName="Select";const kL=Object.assign(jL,{Portal:IL,Button:EL,Options:_L,Option:SL,OptionGroup:ML});IL.displayName="Select.Portal",EL.displayName="Select.Button",_L.displayName="Select.Options",SL.displayName="Select.Option",ML.displayName="Select.OptionGroup";const DL=function(e){const{name:t,id:n,label:r,desc:o,tooltip:i,options:s,onSelect:l,prodata:c,after:u,sectionClass:d="",wrapperClass:f="",contentClass:p="",labelClass:m="",descClass:h="",displayAlign:g="horizontal",isDisabled:y=!1,size:w="md"}=e,[b,v]=(0,a.useState)(e.value),x=(0,a.useRef)(null),N=d||"text-left",E=m||"text-sm font-medium text-text-primary mb-2",M=h||"text-sm font-normal text-text-tertiary mt-2";let _=f||"flex items-center gap-2.5",I=p||"";return"horizontal_inline"===g?(_="flex items-center justify-between gap-2.5",I="w-[300px]"):"horizontal"!==g&&(_="block w-full text-left"),(0,a.useEffect)(()=>{v(e.value),x.current&&(x.current.value=e.value)},[e.value]),(0,a.createElement)("div",{className:`wcf-field wcf-select-option ${N}`},(0,a.createElement)("div",{className:`wcf-field__data ${_}`},r&&(0,a.createElement)("div",{className:`wcf-field__data--label ${E}`},(0,a.createElement)("label",{htmlFor:n||t},r,i&&(0,a.createElement)(HZ,{text:i}))),(0,a.createElement)("div",{className:`wcf-field__data--content ${I}`},(0,a.createElement)("input",{type:"hidden",ref:x,id:n||t,name:t,defaultValue:b,className:e.class?e.class:""}),(0,a.createElement)(kL,{value:b,onChange:function(n){if(c&&n in c)return;v(n),x.current&&(x.current.value=n);const r={target:{value:n,name:t}},o=new CustomEvent("wcf:select:change",{bubbles:!0,detail:{e:r,name:e.name,value:n}});document.dispatchEvent(o),e?.callback&&e.callback(r,e.name,n),l&&l(r)},disabled:y,size:w},(0,a.createElement)(kL.Button,{type:"button",className:e.class?e.class:"",render:function(e){if(!e)return null;for(const t of s||[])if(t.isopt){for(const n of t.options||[])if(String(n.value)===String(e))return n.label}else if(String(t.value)===String(e))return c&&e in c?c[e]:t.label;return e}}),(0,a.createElement)(kL.Options,null,s&&s.map(e=>{if(e.isopt)return(0,a.createElement)(kL.OptionGroup,{label:e.title,key:e.title},e.options.map(e=>(0,a.createElement)(kL.Option,{value:e.value,key:e.value},e.label)));let t=e.label,n=!1;return c&&e.value in c&&(t=c[e.value],n=!0),(0,a.createElement)(kL.Option,{value:e.value,key:e.value,className:n?"opacity-50 pointer-events-none":""},t)})))),u&&(0,a.createElement)("div",{className:`wcf-field__data--content__after ${M}`},u)),o&&(0,a.createElement)("div",{className:`wcf-field__desc ${M}`},Vh(o)))},CL=function(e){const{name:t,id:n,label:r,value:o,placeholder:i,tooltip:s,desc:l,readonly:c,icon:u,textFieldType:d="text",onChangeCB:f,sectionClass:p=!1,wrapperClass:m=!1,contentClass:h,labelClass:g="",descClass:y="text-sm font-normal text-text-tertiary mt-2",displayAlign:w="horizontal",size:b="md",attr:v}=e,[x,N]=(0,a.useState)(o),E=(0,a.useRef)(null),M=p||"text-left",_=`${e.class?e.class:""} ${c?"bg-background-secondary":""} w-full`;let I=m||"flex items-center justify-between gap-2.5",S=g||"text-sm font-medium text-text-primary text-left";const j=null!=h?h:r&&"horizontal"===w?"w-1/2":"w-full";return"horizontal"!==w&&(I="block w-full text-left",S+=" mb-2"),(0,a.useEffect)(()=>{N(o),E.current&&(E.current.value=null!=o?o:"")},[o]),(0,a.createElement)("div",{className:`wcf-field wcf-text-field ${M} `},(0,a.createElement)("div",{className:`wcf-field__data ${I}`},r&&(0,a.createElement)("div",{className:`wcf-field__data--label ${S}`},(0,a.createElement)("label",{className:"whitespace-nowrap",htmlFor:n||t},r,s&&(0,a.createElement)(HZ,{text:s}))),(0,a.createElement)("div",{className:`wcf-field__data--content ${j}`},(0,a.createElement)("input",{type:"hidden",ref:E,className:e.class?e.class:"",defaultValue:null!=x?x:""}),(0,a.createElement)(Ym,{ref:v?.ref,type:d,value:sg(x),id:n||t,name:t,onChange:function(e){N(e),E.current&&(E.current.value=e);const n=new CustomEvent("wcf:text:change",{bubbles:!0,detail:{e:{target:{value:e,name:t}},name:t,value:e}});document.dispatchEvent(n),f&&f(e)},placeholder:i,readOnly:c,size:b,className:_}))),u&&(0,a.createElement)("div",{className:"wcf-text-field__icon"},(0,a.createElement)("span",{className:u})),l&&(0,a.createElement)("div",{className:`wcf-field__desc ${y}`},Vh(l)))},AL=e=>"number"==typeof e?`${e}px`:e,TL=(0,w.forwardRef)(({id:e,defaultValue:t="",value:n,size:r="sm",className:o="",disabled:a=!1,onChange:i=()=>{},error:s=!1,onError:l=()=>{},autoResize:c=!1,minHeight:u,maxHeight:d=160,style:f,...p},m)=>{const h=(0,w.useRef)(null),g=(0,w.useMemo)(()=>e||`input-textarea-${Bm()}`,[e]),y=(0,w.useMemo)(()=>typeof n<"u",[n]),[b,v]=(0,w.useState)(t),x=(0,w.useCallback)(()=>y?n:b,[y,n,b]);(0,w.useLayoutEffect)(()=>{if(!c)return;const e=h.current;e&&(e.style.height="auto",e.style.height=`${e.scrollHeight}px`)},[c,x(),u,d]);const N=a?"hover:border-border-disabled":"hover:border-border-strong",E=s?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"",M=a?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",_={...f??{},minHeight:AL(u),maxHeight:AL(d),...c&&{resize:"none",overflow:null!==d?"auto":"hidden"}};return(0,R.jsx)("textarea",{ref:Ko(h,m),id:g,className:Le("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none focus-visible:outline-none transition ease-in-out duration-200",M,{sm:"px-3 rounded text-xs",md:"px-3 rounded-md text-sm",lg:"px-4 rounded-lg text-base"}[r],"focus:border-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",N,E,o),disabled:a,onChange:e=>{if(a)return;const t=e.target.value;y||v(t),"function"==typeof i&&i(t)},onInvalid:l,value:x(),style:_,...s&&{"aria-invalid":!0},...p})});TL.displayName="TextArea";const OL=function(e){const{name:t,value:n,label:r,desc:o,id:i,placeholder:s,tooltip:l,rows:c,cols:u,sectionClass:d=!1,wrapperClass:f=!1,labelClass:p="",descClass:m="text-sm font-normal text-text-tertiary mt-2",displayAlign:h="horizontal",size:g="md"}=e,y=d||"text-left",w=`${e.class?e.class:""} !w-full !max-w-full input-field !px-3 !py-2.5 !text-sm font-normal`;let b=f||"flex flex-col gap-2.5",v=p||"text-sm font-medium text-text-primary text-left mb-2";"horizontal"!==h&&(b="block w-full text-left",v+=" mb-2");const[x,N]=(0,a.useState)(n);return(0,a.useEffect)(()=>{N(n)},[n]),(0,a.createElement)("div",{className:`wcf-field wcf-textarea-field ${y} `},(0,a.createElement)("div",{className:`wcf-field__data ${b}`},r&&(0,a.createElement)("div",{className:`wcf-field__data--label ${v}`},(0,a.createElement)("label",{htmlFor:i||t},r,l&&(0,a.createElement)(HZ,{text:l}))),(0,a.createElement)("div",{className:"wcf-field__data--content w-full"},(0,a.createElement)(TL,{id:i||t,size:g,name:t,value:sg(x),onChange:function(e){N(e);const n=new CustomEvent("wcf:textarea:change",{bubbles:!0,detail:{e:{target:{value:e,name:t}},name:t,value:e}});document.dispatchEvent(n)},placeholder:s,rows:c||"10",cols:u||"60",className:w}))),o&&(0,a.createElement)("div",{className:`wcf-field__desc ${m}`},Vh(o)))},LL=function(e){const{name:t,value:n,label:r,id:o,tooltip:i,displayAlign:s="horizontal",language:l="javascript",sectionClass:c=!1,wrapperClass:u=!1,labelClass:d=""}=e,f=function(e){if(!e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value}(n),p=(0,a.useRef)(null),m=(0,a.useRef)(null),h=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!p.current||!window.wp?.codeEditor||m.current)return;const e=wp.codeEditor.defaultSettings?JSON.parse(JSON.stringify(wp.codeEditor.defaultSettings)):{};let n;e.codemirror={...e.codemirror,mode:"css"===l?"css":"javascript",lineNumbers:!0,indentUnit:4,tabSize:4};try{n=wp.codeEditor.initialize(p.current,e),m.current=n.codemirror}catch(e){return}m.current.on("change",e=>{const n=e.getValue(),r=new CustomEvent("wcf:code:change",{bubbles:!0,detail:{name:t,value:n}});document.dispatchEvent(r)});const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&m.current&&m.current.refresh()})},{threshold:.1});return h.current&&r.observe(h.current),()=>{m.current&&(m.current.toTextArea(),m.current=null),r.disconnect()}},[]);const g=c||"text-left",y=d||"text-sm font-medium text-text-primary text-left mb-2";let w=u||"flex items-center gap-2.5";return"horizontal"!==s&&(w="block w-full text-left"),(0,a.createElement)("div",{ref:h,className:`wcf-field wcf-code-field ${g}`},(0,a.createElement)("div",{className:`wcf-field__data ${w}`},r&&(0,a.createElement)("div",{className:`wcf-field__data--label ${y}`},(0,a.createElement)("label",{htmlFor:o},r,i&&(0,a.createElement)(HZ,{text:i}))),(0,a.createElement)("div",{className:"wcf-field__data--content"},(0,a.createElement)("textarea",{ref:p,id:o,name:t,defaultValue:f}))))},zL=Fo("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),PL=(0,a.forwardRef)((e,t)=>{const[{settingsProcess:n},r]=p();"saved"===n&&setTimeout(()=>{document.getElementsByClassName("wcf-button--save-global-settings")[0].blur(),r({status:"RESET"})},2e3);const o=e.icon?e.icon:"",i=e.iconClass?e.iconClass:"",s=e.className||e.class||"",l="processing"===n?"wcf-disabled":"";return(0,a.createElement)("div",{className:"wcf-field wcf-submit wcf-submit-field"},(0,a.createElement)(Wo,{ref:t,type:"submit",variant:"primary",className:`wcf-button--save-global-settings ${s} ${l}`,onClick:function(e){const t=e.target.closest("form");!t||t.checkValidity()?r({status:"PROCESSING"}):t.reportValidity()},loading:"processing"===n,icon:function(){if("processing"===n)return(0,a.createElement)(vL,{size:"sm",variant:"secondary",className:i});if("saved"===n)return(0,a.createElement)(Zo,{className:`w-4 h-4 stroke-2 ${i}`});switch(o){case"plus":return(0,a.createElement)(zL,{className:`w-4 h-4 stroke-2 ${i}`});case"loader":return(0,a.createElement)(Dp,{className:`w-4 h-4 stroke-2 ${i}`});case"close":return(0,a.createElement)(ta,{className:`w-4 h-4 stroke-2 ${i}`});case"check":return(0,a.createElement)(Zo,{className:`w-4 h-4 stroke-2 ${i}`});default:return null}}()},"saved"===n&&(0,z.__)("Settings Saved","cartflows"),"processing"===n&&(0,z.__)("Saving…","cartflows"),!n&&(0,z.__)("Save Settings","cartflows")))}),RL=PL;function UL(e){return UL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},UL(e)}function BL(e){var t=function(e){if("object"!=UL(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=UL(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==UL(t)?t:t+""}function FL(e,t,n){return(t=BL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZL(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?YL(Object(n),!0).forEach(function(t){FL(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YL(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function QL(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,BL(r.key),r)}}var VL=o(3662);function WL(e){return WL=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},WL(e)}function GL(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(GL=function(){return!!e})()}function HL(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function $L(e,t){if(e){if("string"==typeof e)return HL(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HL(e,t):void 0}}function XL(e){return function(e){if(Array.isArray(e))return HL(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||$L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var qL=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),JL=Math.abs,KL=String.fromCharCode,ez=Object.assign;function tz(e){return e.trim()}function nz(e,t,n){return e.replace(t,n)}function rz(e,t){return e.indexOf(t)}function oz(e,t){return 0|e.charCodeAt(t)}function az(e,t,n){return e.slice(t,n)}function iz(e){return e.length}function sz(e){return e.length}function lz(e,t){return t.push(e),e}var cz=1,uz=1,dz=0,fz=0,pz=0,mz="";function hz(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:cz,column:uz,length:i,return:""}}function gz(e,t){return ez(hz("",null,null,"",null,null,0),e,{length:-e.length},t)}function yz(){return pz=fz>0?oz(mz,--fz):0,uz--,10===pz&&(uz=1,cz--),pz}function wz(){return pz=fz<dz?oz(mz,fz++):0,uz++,10===pz&&(uz=1,cz++),pz}function bz(){return oz(mz,fz)}function vz(){return fz}function xz(e,t){return az(mz,e,t)}function Nz(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Ez(e){return cz=uz=1,dz=iz(mz=e),fz=0,[]}function Mz(e){return mz="",e}function _z(e){return tz(xz(fz-1,jz(91===e?e+2:40===e?e+1:e)))}function Iz(e){for(;(pz=bz())&&pz<33;)wz();return Nz(e)>2||Nz(pz)>3?"":" "}function Sz(e,t){for(;--t&&wz()&&!(pz<48||pz>102||pz>57&&pz<65||pz>70&&pz<97););return xz(e,vz()+(t<6&&32==bz()&&32==wz()))}function jz(e){for(;wz();)switch(pz){case e:return fz;case 34:case 39:34!==e&&39!==e&&jz(pz);break;case 40:41===e&&jz(e);break;case 92:wz()}return fz}function kz(e,t){for(;wz()&&e+pz!==57&&(e+pz!==84||47!==bz()););return"/*"+xz(t,fz-1)+"*"+KL(47===e?e:wz())}function Dz(e){for(;!Nz(bz());)wz();return xz(e,fz)}var Cz="-ms-",Az="-moz-",Tz="-webkit-",Oz="comm",Lz="rule",zz="decl",Pz="@keyframes";function Rz(e,t){for(var n="",r=sz(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Uz(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case zz:return e.return=e.return||e.value;case Oz:return"";case Pz:return e.return=e.value+"{"+Rz(e.children,r)+"}";case Lz:e.value=e.props.join(",")}return iz(n=Rz(e.children,r))?e.return=e.value+"{"+n+"}":""}function Bz(e){return Mz(Fz("",null,null,null,[""],e=Ez(e),0,[0],e))}function Fz(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,m=0,h=1,g=1,y=1,w=0,b="",v=o,x=a,N=r,E=b;g;)switch(m=w,w=wz()){case 40:if(108!=m&&58==oz(E,d-1)){-1!=rz(E+=nz(_z(w),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:E+=_z(w);break;case 9:case 10:case 13:case 32:E+=Iz(m);break;case 92:E+=Sz(vz()-1,7);continue;case 47:switch(bz()){case 42:case 47:lz(Zz(kz(wz(),vz()),t,n),l);break;default:E+="/"}break;case 123*h:s[c++]=iz(E)*y;case 125*h:case 59:case 0:switch(w){case 0:case 125:g=0;case 59+u:-1==y&&(E=nz(E,/\f/g,"")),p>0&&iz(E)-d&&lz(p>32?Qz(E+";",r,n,d-1):Qz(nz(E," ","")+";",r,n,d-2),l);break;case 59:E+=";";default:if(lz(N=Yz(E,t,n,c,u,o,s,b,v=[],x=[],d),a),123===w)if(0===u)Fz(E,t,N,N,v,a,d,s,x);else switch(99===f&&110===oz(E,3)?100:f){case 100:case 108:case 109:case 115:Fz(e,N,N,r&&lz(Yz(e,N,N,0,0,o,s,b,o,v=[],d),x),o,x,d,s,r?v:x);break;default:Fz(E,N,N,N,[""],x,0,s,x)}}c=u=p=0,h=y=1,b=E="",d=i;break;case 58:d=1+iz(E),p=m;default:if(h<1)if(123==w)--h;else if(125==w&&0==h++&&125==yz())continue;switch(E+=KL(w),w*h){case 38:y=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(iz(E)-1)*y,y=1;break;case 64:45===bz()&&(E+=_z(wz())),f=bz(),u=d=iz(b=E+=Dz(vz())),w++;break;case 45:45===m&&2==iz(E)&&(h=0)}}return a}function Yz(e,t,n,r,o,a,i,s,l,c,u){for(var d=o-1,f=0===o?a:[""],p=sz(f),m=0,h=0,g=0;m<r;++m)for(var y=0,w=az(e,d+1,d=JL(h=i[m])),b=e;y<p;++y)(b=tz(h>0?f[y]+" "+w:nz(w,/&\f/g,f[y])))&&(l[g++]=b);return hz(e,t,n,0===o?Lz:s,l,c,u)}function Zz(e,t,n){return hz(e,t,n,Oz,KL(pz),az(e,2,-2),0)}function Qz(e,t,n,r){return hz(e,t,n,zz,az(e,0,r),az(e,r+1,-1),r)}var Vz=function(e,t,n){for(var r=0,o=0;r=o,o=bz(),38===r&&12===o&&(t[n]=1),!Nz(o);)wz();return xz(e,fz)},Wz=new WeakMap,Gz=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||Wz.get(n))&&!r){Wz.set(e,!0);for(var o=[],a=function(e,t){return Mz(function(e,t){var n=-1,r=44;do{switch(Nz(r)){case 0:38===r&&12===bz()&&(t[n]=1),e[n]+=Vz(fz-1,t,n);break;case 2:e[n]+=_z(r);break;case 4:if(44===r){e[++n]=58===bz()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=KL(r)}}while(r=wz());return e}(Ez(e),t))}(t,o),i=n.props,s=0,l=0;s<a.length;s++)for(var c=0;c<i.length;c++,l++)e.props[l]=o[s]?a[s].replace(/&\f/g,i[c]):i[c]+" "+a[s]}}},Hz=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function $z(e,t){switch(function(e,t){return 45^oz(e,0)?(((t<<2^oz(e,0))<<2^oz(e,1))<<2^oz(e,2))<<2^oz(e,3):0}(e,t)){case 5103:return Tz+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Tz+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Tz+e+Az+e+Cz+e+e;case 6828:case 4268:return Tz+e+Cz+e+e;case 6165:return Tz+e+Cz+"flex-"+e+e;case 5187:return Tz+e+nz(e,/(\w+).+(:[^]+)/,Tz+"box-$1$2"+Cz+"flex-$1$2")+e;case 5443:return Tz+e+Cz+"flex-item-"+nz(e,/flex-|-self/,"")+e;case 4675:return Tz+e+Cz+"flex-line-pack"+nz(e,/align-content|flex-|-self/,"")+e;case 5548:return Tz+e+Cz+nz(e,"shrink","negative")+e;case 5292:return Tz+e+Cz+nz(e,"basis","preferred-size")+e;case 6060:return Tz+"box-"+nz(e,"-grow","")+Tz+e+Cz+nz(e,"grow","positive")+e;case 4554:return Tz+nz(e,/([^-])(transform)/g,"$1"+Tz+"$2")+e;case 6187:return nz(nz(nz(e,/(zoom-|grab)/,Tz+"$1"),/(image-set)/,Tz+"$1"),e,"")+e;case 5495:case 3959:return nz(e,/(image-set\([^]*)/,Tz+"$1$`$1");case 4968:return nz(nz(e,/(.+:)(flex-)?(.*)/,Tz+"box-pack:$3"+Cz+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Tz+e+e;case 4095:case 3583:case 4068:case 2532:return nz(e,/(.+)-inline(.+)/,Tz+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(iz(e)-1-t>6)switch(oz(e,t+1)){case 109:if(45!==oz(e,t+4))break;case 102:return nz(e,/(.+:)(.+)-([^]+)/,"$1"+Tz+"$2-$3$1"+Az+(108==oz(e,t+3)?"$3":"$2-$3"))+e;case 115:return~rz(e,"stretch")?$z(nz(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==oz(e,t+1))break;case 6444:switch(oz(e,iz(e)-3-(~rz(e,"!important")&&10))){case 107:return nz(e,":",":"+Tz)+e;case 101:return nz(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Tz+(45===oz(e,14)?"inline-":"")+"box$3$1"+Tz+"$2$3$1"+Cz+"$2box$3")+e}break;case 5936:switch(oz(e,t+11)){case 114:return Tz+e+Cz+nz(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Tz+e+Cz+nz(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Tz+e+Cz+nz(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Tz+e+Cz+e+e}return e}var Xz=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case zz:e.return=$z(e.value,e.length);break;case Pz:return Rz([gz(e,{value:nz(e.value,"@","@"+Tz)})],r);case Lz:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Rz([gz(e,{props:[nz(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Rz([gz(e,{props:[nz(t,/:(plac\w+)/,":"+Tz+"input-$1")]}),gz(e,{props:[nz(t,/:(plac\w+)/,":-moz-$1")]}),gz(e,{props:[nz(t,/:(plac\w+)/,Cz+"input-$1")]})],r)}return""})}}],qz=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,a=e.stylisPlugins||Xz,i={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)i[t[n]]=!0;s.push(e)});var l,c,u,d,f=[Uz,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(c=[Gz,Hz].concat(a,f),u=sz(c),function(e,t,n,r){for(var o="",a=0;a<u;a++)o+=c[a](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,Rz(Bz(e?e+"{"+t.styles+"}":t.styles),p),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new qL({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return m.sheet.hydrate(s),m},Jz=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Kz={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function eP(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var tP=/[A-Z]|^ms/g,nP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,rP=function(e){return 45===e.charCodeAt(1)},oP=function(e){return null!=e&&"boolean"!=typeof e},aP=eP(function(e){return rP(e)?e:e.replace(tP,"-$&").toLowerCase()}),iP=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(nP,function(e,t,n){return lP={name:t,styles:n,next:lP},t})}return 1===Kz[e]||rP(e)||"number"!=typeof t||0===t?t:t+"px"};function sP(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return lP={name:o.name,styles:o.styles,next:lP},o.name;var a=n;if(void 0!==a.styles){var i=a.next;if(void 0!==i)for(;void 0!==i;)lP={name:i.name,styles:i.styles,next:lP},i=i.next;return a.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=sP(e,t,n[o])+";";else for(var a in n){var i=n[a];if("object"!=typeof i){var s=i;null!=t&&void 0!==t[s]?r+=a+"{"+t[s]+"}":oP(s)&&(r+=aP(a)+":"+iP(a,s)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var l=sP(e,t,i);switch(a){case"animation":case"animationName":r+=aP(a)+":"+l+";";break;default:r+=a+"{"+l+"}"}}else for(var c=0;c<i.length;c++)oP(i[c])&&(r+=aP(a)+":"+iP(a,i[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=lP,l=n(e);return lP=s,sP(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var lP,cP=/label:\s*([^\s;{]+)\s*(;|$)/g;function uP(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";lP=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=sP(n,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=sP(n,t,e[i]),r&&(o+=a[i]);cP.lastIndex=0;for(var s,l="";null!==(s=cP.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:lP}}var dP,fP,pP=!!w.useInsertionEffect&&w.useInsertionEffect,mP=pP||function(e){return e()},hP=(pP||w.useLayoutEffect,w.createContext("undefined"!=typeof HTMLElement?qz({key:"css"}):null)),gP=(hP.Provider,function(e){return(0,w.forwardRef)(function(t,n){var r=(0,w.useContext)(hP);return e(t,r,n)})}),yP=w.createContext({}),wP={}.hasOwnProperty,bP="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",vP=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Jz(t,n,r),mP(function(){return function(e,t,n){Jz(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},xP=gP(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[bP],a=[r],i="";"string"==typeof e.className?i=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,a,e.className):null!=e.className&&(i=e.className+" ");var s=uP(a,void 0,w.useContext(yP));i+=t.key+"-"+s.name;var l={};for(var c in e)wP.call(e,c)&&"css"!==c&&c!==bP&&(l[c]=e[c]);return l.className=i,n&&(l.ref=n),w.createElement(w.Fragment,null,w.createElement(vP,{cache:t,serialized:s,isStringTag:"string"==typeof o}),w.createElement(o,l))}),NP=xP,EP=(o(4146),function(e,t){var n=arguments;if(null==t||!wP.call(t,"css"))return w.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=NP,o[1]=function(e,t){var n={};for(var r in t)wP.call(t,r)&&(n[r]=t[r]);return n[bP]=e,n}(e,t);for(var a=2;a<r;a++)o[a]=n[a];return w.createElement.apply(null,o)});function MP(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return uP(t)}function _P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||$L(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IP(e,t){if(null==e)return{};var n,r,o=(0,E.A)(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}dP=EP||(EP={}),fP||(fP=dP.JSX||(dP.JSX={}));var SP=w.useLayoutEffect,jP=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],kP=function(){};function DP(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function CP(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a=[].concat(r);if(t&&e)for(var i in t)t.hasOwnProperty(i)&&t[i]&&a.push("".concat(DP(e,i)));return a.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var AP=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===UL(e)&&null!==e?[e]:[];var t},TP=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,ZL({},IP(e,jP))},OP=function(e,t,n){var r=e.cx,o=e.getStyles,a=e.getClassNames,i=e.className;return{css:o(t,e),className:r(null!=n?n:{},a(t,e),i)}};function LP(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function zP(e){return LP(e)?window.pageYOffset:e.scrollTop}function PP(e,t){LP(e)?window.scrollTo(0,t):e.scrollTop=t}function RP(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:kP,o=zP(e),a=t-o,i=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(i+=10,o,a,n);PP(e,s),i<n?window.requestAnimationFrame(t):r(e)}()}function UP(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?PP(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&PP(e,Math.max(t.offsetTop-o,0))}function BP(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var FP=!1,YP={get passive(){return FP=!0}},ZP="undefined"!=typeof window?window:{};ZP.addEventListener&&ZP.removeEventListener&&(ZP.addEventListener("p",kP,YP),ZP.removeEventListener("p",kP,!1));var QP=FP;function VP(e){return null!=e}function WP(e,t,n){return e?t:n}var GP=["children","innerProps"],HP=["children","innerProps"];var $P,XP=function(e){return"auto"===e?"bottom":e},qP=(0,w.createContext)(null),JP=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,a=e.menuPosition,i=e.menuShouldScrollIntoView,s=e.theme,l=((0,w.useContext)(qP)||{}).setPortalPlacement,c=(0,w.useRef)(null),u=_P((0,w.useState)(r),2),d=u[0],f=u[1],p=_P((0,w.useState)(null),2),m=p[0],h=p[1],g=s.spacing.controlHeight;return SP(function(){var e=c.current;if(e){var t="fixed"===a,s=function(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,a=e.shouldScroll,i=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,m=f.height,h=f.top,g=n.offsetParent.getBoundingClientRect().top,y=i||LP(u=l)?window.innerHeight:u.clientHeight,w=zP(l),b=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),x=g-v,N=y-h,E=x+w,M=d-w-h,_=p-y+w+b,I=w+h-v,S=160;switch(o){case"auto":case"bottom":if(N>=m)return{placement:"bottom",maxHeight:t};if(M>=m&&!i)return a&&RP(l,_,S),{placement:"bottom",maxHeight:t};if(!i&&M>=r||i&&N>=r)return a&&RP(l,_,S),{placement:"bottom",maxHeight:i?N-b:M-b};if("auto"===o||i){var j=t,k=i?x:E;return k>=r&&(j=Math.min(k-b-s,t)),{placement:"top",maxHeight:j}}if("bottom"===o)return a&&PP(l,_),{placement:"bottom",maxHeight:t};break;case"top":if(x>=m)return{placement:"top",maxHeight:t};if(E>=m&&!i)return a&&RP(l,I,S),{placement:"top",maxHeight:t};if(!i&&E>=r||i&&x>=r){var D=t;return(!i&&E>=r||i&&x>=r)&&(D=i?x-v:E-v),a&&RP(l,I,S),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:i&&!t,isFixedPosition:t,controlHeight:g});f(s.maxHeight),h(s.placement),null==l||l(s.placement)}},[r,o,a,i,n,l,g]),t({ref:c,placerProps:ZL(ZL({},e),{},{placement:m||XP(o),maxHeight:d})})},KP=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return ZL({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},eR=KP,tR=KP,nR=["size"],rR=["innerProps","isRtl","size"],oR={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},aR=function(e){var t=e.size,n=IP(e,nR);return EP("svg",(0,N.A)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:oR},n))},iR=function(e){return EP(aR,(0,N.A)({size:20},e),EP("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},sR=function(e){return EP(aR,(0,N.A)({size:20},e),EP("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},lR=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,a=r.colors;return ZL({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*o,":hover":{color:n?a.neutral80:a.neutral40}})},cR=lR,uR=lR,dR=function(){var e=MP.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}($P||($P=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),fR=function(e){var t=e.delay,n=e.offset;return EP("span",{css:MP({animation:"".concat(dR," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},pR=["data"],mR=["innerRef","isDisabled","isHidden","inputClassName"],hR={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},gR={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":ZL({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},hR)},yR=function(e){return ZL({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},hR)},wR=function(e){var t=e.children,n=e.innerProps;return EP("div",n,t)},bR={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return EP("div",(0,N.A)({},OP(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||EP(iR,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,a=e.innerProps,i=e.menuIsOpen;return EP("div",(0,N.A)({ref:o},OP(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":i}),a,{"aria-disabled":n||void 0}),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return EP("div",(0,N.A)({},OP(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||EP(sR,null))},DownChevron:sR,CrossIcon:iR,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,a=e.Heading,i=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return EP("div",(0,N.A)({},OP(e,"group",{group:!0}),s),EP(a,(0,N.A)({},i,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),EP("div",null,t))},GroupHeading:function(e){var t=TP(e);t.data;var n=IP(t,pR);return EP("div",(0,N.A)({},OP(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return EP("div",(0,N.A)({},OP(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return EP("span",(0,N.A)({},t,OP(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=TP(e),o=r.innerRef,a=r.isDisabled,i=r.isHidden,s=r.inputClassName,l=IP(r,mR);return EP("div",(0,N.A)({},OP(e,"input",{"input-container":!0}),{"data-value":n||""}),EP("input",(0,N.A)({className:t({input:!0},s),ref:o,style:yR(i),disabled:a},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,a=IP(e,rR);return EP("div",(0,N.A)({},OP(ZL(ZL({},a),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),EP(fR,{delay:0,offset:n}),EP(fR,{delay:160,offset:!0}),EP(fR,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return EP("div",(0,N.A)({},OP(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return EP("div",(0,N.A)({},OP(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,a=e.menuPlacement,i=e.menuPosition,s=(0,w.useRef)(null),l=(0,w.useRef)(null),c=_P((0,w.useState)(XP(a)),2),u=c[0],d=c[1],f=(0,w.useMemo)(function(){return{setPortalPlacement:d}},[]),p=_P((0,w.useState)(null),2),m=p[0],h=p[1],g=(0,w.useCallback)(function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===i?0:window.pageYOffset,n=e[u]+t;n===(null==m?void 0:m.offset)&&e.left===(null==m?void 0:m.rect.left)&&e.width===(null==m?void 0:m.rect.width)||h({offset:n,rect:e})}},[r,i,u,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);SP(function(){g()},[g]);var y=(0,w.useCallback)(function(){"function"==typeof l.current&&(l.current(),l.current=null),r&&s.current&&(l.current=Un(r,s.current,g,{elementResize:"ResizeObserver"in window}))},[r,g]);SP(function(){y()},[y]);var b=(0,w.useCallback)(function(e){s.current=e,y()},[y]);if(!t&&"fixed"!==i||!m)return null;var v=EP("div",(0,N.A)({ref:b},OP(ZL(ZL({},e),{},{offset:m.offset,position:i,rect:m.rect}),"menuPortal",{"menu-portal":!0}),o),n);return EP(qP.Provider,{value:f},t?(0,bn.createPortal)(v,t):v)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=IP(e,HP);return EP("div",(0,N.A)({},OP(ZL(ZL({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=IP(e,GP);return EP("div",(0,N.A)({},OP(ZL(ZL({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,a=e.isDisabled,i=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return EP(l,{data:r,innerProps:ZL(ZL({},OP(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:s},EP(c,{data:r,innerProps:ZL({},OP(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),EP(u,{data:r,innerProps:ZL(ZL({},OP(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},i),selectProps:s}))},MultiValueContainer:wR,MultiValueLabel:wR,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return EP("div",(0,N.A)({role:"button"},n),t||EP(iR,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.innerRef,i=e.innerProps;return EP("div",(0,N.A)({},OP(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:a,"aria-disabled":n},i),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return EP("div",(0,N.A)({},OP(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return EP("div",(0,N.A)({},OP(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return EP("div",(0,N.A)({},OP(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return EP("div",(0,N.A)({},OP(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},vR=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function xR(e,t){return e===t||!(!vR(e)||!vR(t))}function NR(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!xR(e[n],t[n]))return!1;return!0}for(var ER={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},MR=function(e){return EP("span",(0,N.A)({css:ER},e))},_R={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,a=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return a?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,a=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,a?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,a=void 0===o?"":o,i=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&i)return"value ".concat(a," focused, ").concat(u(i,n),".");if("menu"===t&&c){var d=s?" disabled":"",f="".concat(l?" selected":"").concat(d);return"".concat(a).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},IR=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,i=e.selectValue,s=e.selectProps,l=e.id,c=e.isAppleDevice,u=s.ariaLiveMessages,d=s.getOptionLabel,f=s.inputValue,p=s.isMulti,m=s.isOptionDisabled,h=s.isSearchable,g=s.menuIsOpen,y=s.options,b=s.screenReaderStatus,v=s.tabSelectsValue,x=s.isLoading,N=s["aria-label"],E=s["aria-live"],M=(0,w.useMemo)(function(){return ZL(ZL({},_R),u||{})},[u]),_=(0,w.useMemo)(function(){var e,n="";if(t&&M.onChange){var r=t.option,o=t.options,a=t.removedValue,s=t.removedValues,l=t.value,c=a||r||(e=l,Array.isArray(e)?null:e),u=c?d(c):"",f=o||s||void 0,p=f?f.map(d):[],h=ZL({isDisabled:c&&m(c,i),label:u,labels:p},t);n=M.onChange(h)}return n},[t,M,m,i,d]),I=(0,w.useMemo)(function(){var e="",t=n||r,a=!!(n&&i&&i.includes(n));if(t&&M.onFocus){var s={focused:t,label:d(t),isDisabled:m(t,i),isSelected:a,options:o,context:t===n?"menu":"value",selectValue:i,isAppleDevice:c};e=M.onFocus(s)}return e},[n,r,d,m,M,o,i,c]),S=(0,w.useMemo)(function(){var e="";if(g&&y.length&&!x&&M.onFilter){var t=b({count:o.length});e=M.onFilter({inputValue:f,resultsMessage:t})}return e},[o,f,g,M,y,b,x]),j="initial-input-focus"===(null==t?void 0:t.action),k=(0,w.useMemo)(function(){var e="";if(M.guidance){var t=r?"value":g?"menu":"input";e=M.guidance({"aria-label":N,context:t,isDisabled:n&&m(n,i),isMulti:p,isSearchable:h,tabSelectsValue:v,isInitialFocus:j})}return e},[N,n,r,p,m,h,g,M,i,v,j]),D=EP(w.Fragment,null,EP("span",{id:"aria-selection"},_),EP("span",{id:"aria-focused"},I),EP("span",{id:"aria-results"},S),EP("span",{id:"aria-guidance"},k));return EP(w.Fragment,null,EP(MR,{id:l},j&&D),EP(MR,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!j&&D))},SR=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],jR=new RegExp("["+SR.map(function(e){return e.letters}).join("")+"]","g"),kR={},DR=0;DR<SR.length;DR++)for(var CR=SR[DR],AR=0;AR<CR.letters.length;AR++)kR[CR.letters[AR]]=CR.base;var TR=function(e){return e.replace(jR,function(e){return kR[e]})},OR=function(e,t){void 0===t&&(t=NR);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var a=e.apply(this,r);return n={lastResult:a,lastArgs:r,lastThis:this},a}return r.clear=function(){n=null},r}(TR),LR=function(e){return e.replace(/^\s+|\s+$/g,"")},zR=function(e){return"".concat(e.label," ").concat(e.value)},PR=["innerRef"];function RR(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=_P(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=_P(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(IP(e,PR),"onExited","in","enter","exit","appear");return EP("input",(0,N.A)({ref:t},n,{css:MP({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var UR=["boxSizing","height","overflow","paddingRight","position"],BR={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function FR(e){e.cancelable&&e.preventDefault()}function YR(e){e.stopPropagation()}function ZR(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function QR(){return"ontouchstart"in window||navigator.maxTouchPoints}var VR=!("undefined"==typeof window||!window.document||!window.document.createElement),WR=0,GR={capture:!1,passive:!1},HR=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},$R={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function XR(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,a=e.onTopLeave,i=(0,w.useRef)(!1),s=(0,w.useRef)(!1),l=(0,w.useRef)(0),c=(0,w.useRef)(null),u=(0,w.useCallback)(function(e,t){if(null!==c.current){var l=c.current,u=l.scrollTop,d=l.scrollHeight,f=l.clientHeight,p=c.current,m=t>0,h=d-f-u,g=!1;h>t&&i.current&&(r&&r(e),i.current=!1),m&&s.current&&(a&&a(e),s.current=!1),m&&t>h?(n&&!i.current&&n(e),p.scrollTop=d,g=!0,i.current=!0):!m&&-t>u&&(o&&!s.current&&o(e),p.scrollTop=0,g=!0,s.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,r,o,a]),d=(0,w.useCallback)(function(e){u(e,e.deltaY)},[u]),f=(0,w.useCallback)(function(e){l.current=e.changedTouches[0].clientY},[]),p=(0,w.useCallback)(function(e){var t=l.current-e.changedTouches[0].clientY;u(e,t)},[u]),m=(0,w.useCallback)(function(e){if(e){var t=!!QP&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",f,t),e.addEventListener("touchmove",p,t)}},[p,f,d]),h=(0,w.useCallback)(function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",f,!1),e.removeEventListener("touchmove",p,!1))},[p,f,d]);return(0,w.useEffect)(function(){if(t){var e=c.current;return m(e),function(){h(e)}}},[t,m,h]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,w.useRef)({}),a=(0,w.useRef)(null),i=(0,w.useCallback)(function(e){if(VR){var t=document.body,n=t&&t.style;if(r&&UR.forEach(function(e){var t=n&&n[e];o.current[e]=t}),r&&WR<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,s=window.innerWidth-i+a||0;Object.keys(BR).forEach(function(e){var t=BR[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&QR()&&(t.addEventListener("touchmove",FR,GR),e&&(e.addEventListener("touchstart",ZR,GR),e.addEventListener("touchmove",YR,GR))),WR+=1}},[r]),s=(0,w.useCallback)(function(e){if(VR){var t=document.body,n=t&&t.style;WR=Math.max(WR-1,0),r&&WR<1&&UR.forEach(function(e){var t=o.current[e];n&&(n[e]=t)}),t&&QR()&&(t.removeEventListener("touchmove",FR,GR),e&&(e.removeEventListener("touchstart",ZR,GR),e.removeEventListener("touchmove",YR,GR)))}},[r]);return(0,w.useEffect)(function(){if(t){var e=a.current;return i(e),function(){s(e)}}},[t,i,s]),function(e){a.current=e}}({isEnabled:n});return EP(w.Fragment,null,n&&EP("div",{onClick:HR,css:$R}),t(function(e){o(e),a(e)}))}var qR={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},JR=function(e){var t=e.name,n=e.onFocus;return EP("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:qR,value:"",onChange:function(){}})};function KR(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function eU(){return KR(/^Mac/i)}var tU={clearIndicator:uR,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,a=o.colors,i=o.borderRadius;return ZL({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?a.neutral5:a.neutral0,borderColor:n?a.neutral10:r?a.primary:a.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:r?a.primary:a.neutral30}})},dropdownIndicator:cR,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return ZL({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,a=r.colors;return ZL({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?a.neutral10:a.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,a=o.spacing,i=o.colors;return ZL(ZL({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},gR),t?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:i.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,a=o.colors,i=o.spacing.baseUnit;return ZL({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*i})},loadingMessage:tR,menu:function(e,t){var n,r=e.placement,o=e.theme,a=o.borderRadius,i=o.spacing,s=o.colors;return ZL((FL(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),FL(n,"position","absolute"),FL(n,"width","100%"),FL(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:i.menuGutter,marginTop:i.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return ZL({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,a=n.colors;return ZL({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,a=e.cropWithEllipsis;return ZL({overflow:"hidden",textOverflow:a||void 0===a?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,a=n.colors,i=e.isFocused;return ZL({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:i?a.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},noOptionsMessage:eR,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.theme,i=a.spacing,s=a.colors;return ZL({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return ZL({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,a=r.colors;return ZL({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,a=e.selectProps.controlShouldRenderValue;return ZL({alignItems:"center",display:r&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},nU={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},rU={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:BP(),captureMenuScroll:!BP(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=ZL({ignoreCase:!0,ignoreAccents:!0,stringify:zR,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,s=n.matchFrom,l=i?LR(t):t,c=i?LR(a(e)):a(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=OR(l),c=TR(c)),"start"===s?c.substr(0,l.length)===l:c.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function oU(e,t,n,r){return{type:"option",data:t,isDisabled:fU(e,t,n),isSelected:pU(e,t,n),label:uU(e,t),value:dU(e,t),index:r}}function aU(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return oU(e,n,t,r)}).filter(function(t){return lU(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=oU(e,n,t,r);return lU(e,a)?a:void 0}).filter(VP)}function iU(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,XL(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function sU(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,XL(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function lU(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,s=t.value;return(!hU(e)||!a)&&mU(e,{label:i,value:s,data:o},r)}var cU=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},uU=function(e,t){return e.getOptionLabel(t)},dU=function(e,t){return e.getOptionValue(t)};function fU(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function pU(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=dU(e,t);return n.some(function(t){return dU(e,t)===r})}function mU(e,t,n){return!e.filterOption||e.filterOption(t,n)}var hU=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},gU=1,yU=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&(0,VL.A)(e,t)}(n,e);var t=function(e){var t=GL();return function(){var n,r=WL(e);if(t){var o=WL(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==UL(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,n)}}(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,a=n.name;t.name=a,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,a=o.closeMenuOnSelect,i=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),a&&(r.setState({inputIsHiddenAfterUpdate:!i}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,a=t.name,i=r.state.selectValue,s=o&&r.isOptionSelected(e,i),l=r.isOptionDisabled(e,i);if(s){var c=r.getOptionValue(e);r.setValue(i.filter(function(e){return r.getOptionValue(e)!==c}),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:a});o?r.setValue([].concat(XL(i),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),a=n.filter(function(e){return r.getOptionValue(e)!==o}),i=WP(t,a,a[0]||null);r.onChange(i,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(WP(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),a=WP(e,o,o[0]||null);n&&r.onChange(a,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return cU(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return sU(aU(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return CP.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return uU(r.props,e)},r.getOptionValue=function(e){return dU(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=tU[e](t,n);o.boxSizing="border-box";var a=r.props.styles[e];return a?a(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,ZL(ZL({},bR),e.components);var e},r.buildCategorizedOptions=function(){return aU(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return iU(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:ZL({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&LP(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),a=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||a>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return hU(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,a=t.escapeClearsValue,i=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,m=p.focusedOption,h=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||i)return;r.focusValue("previous");break;case"ArrowRight":if(!n||i)return;r.focusValue("next");break;case"Delete":case"Backspace":if(i)return;if(h)r.removeValue(h);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!m||f&&r.isOptionSelected(m,g))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(c){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:i}),r.onMenuClose()):s&&a&&r.clearValue();break;case" ":if(i)return;if(!c){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++gU),r.state.selectValue=AP(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),a=r.buildFocusableOptions(),i=a.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=a[i],r.state.focusedOptionId=cU(o,a[i])}return r}return function(e,t,n){t&&QL(e.prototype,t),n&&QL(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&UP(this.menuListRef,this.focusedOptionRef),(eU()||KR(/^iPhone/i)||KR(/^iPad/i)||eU()&&navigator.maxTouchPoints>1)&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(UP(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,a=this.buildFocusableOptions(),i="first"===e?0:a.length-1;if(!this.props.isMulti){var s=a.indexOf(r[0]);s>-1&&(i=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:a[i],focusedOptionId:this.getFocusedOptionId(a[i])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var a=n.length-1,i=-1;if(n.length){switch(e){case"previous":i=0===o?0:-1===o?a:o-1;break;case"next":o>-1&&o<a&&(i=o+1)}this.setState({inputIsHidden:-1!==i,focusedValue:n[i]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,a=r.indexOf(n);n||(a=-1),"up"===e?o=a>0?a-1:r.length-1:"down"===e?o=(a+1)%r.length:"pageup"===e?(o=a-t)<0&&(o=0):"pagedown"===e?(o=a+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(nU):ZL(ZL({},nU),this.props.theme):nU}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,a=this.selectOption,i=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:a,selectProps:s,setValue:i,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return fU(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return pU(this.props,e,t)}},{key:"filterOption",value:function(e,t){return mU(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,a=e.tabIndex,i=e.form,s=e.menuIsOpen,l=e.required,c=this.getComponents().Input,u=this.state,d=u.inputIsHidden,f=u.ariaSelection,p=this.commonProps,m=r||this.getElementId("input"),h=ZL(ZL(ZL({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?w.createElement(c,(0,N.A)({},p,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:i,type:"text",value:o},h)):w.createElement(RR,(0,N.A)({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:kP,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:i,value:""},h))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,a=t.MultiValueRemove,i=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,u=c.controlShouldRenderValue,d=c.isDisabled,f=c.isMulti,p=c.inputValue,m=c.placeholder,h=this.state,g=h.selectValue,y=h.focusedValue,b=h.isFocused;if(!this.hasValue()||!u)return p?null:w.createElement(s,(0,N.A)({},l,{key:"placeholder",isDisabled:d,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),m);if(f)return g.map(function(t,i){var s=t===y,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return w.createElement(n,(0,N.A)({},l,{components:{Container:r,Label:o,Remove:a},isFocused:s,isDisabled:d,key:c,index:i,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))});if(p)return null;var v=g[0];return w.createElement(i,(0,N.A)({},l,{data:v,isDisabled:d}),this.formatOptionLabel(v,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var i={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(e,(0,N.A)({},t,{innerProps:i,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,a=this.state.isFocused;return e&&o?w.createElement(e,(0,N.A)({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:a})):null}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,a=this.state.isFocused;return w.createElement(n,(0,N.A)({},r,{isDisabled:o,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return w.createElement(e,(0,N.A)({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,a=t.MenuList,i=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,u=this.commonProps,d=this.state.focusedOption,f=this.props,p=f.captureMenuScroll,m=f.inputValue,h=f.isLoading,g=f.loadingMessage,y=f.minMenuHeight,b=f.maxMenuHeight,v=f.menuIsOpen,x=f.menuPlacement,E=f.menuPosition,M=f.menuPortalTarget,_=f.menuShouldBlockScroll,I=f.menuShouldScrollIntoView,S=f.noOptionsMessage,j=f.onMenuScrollToTop,k=f.onMenuScrollToBottom;if(!v)return null;var D,C=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,s=t.label,l=t.value,f=d===o,p=a?void 0:function(){return e.onOptionHover(o)},m=a?void 0:function(){return e.selectOption(o)},h="".concat(e.getElementId("option"),"-").concat(n),g={id:h,onClick:m,onMouseMove:p,onMouseOver:p,tabIndex:-1,role:"option","aria-selected":e.state.isAppleDevice?void 0:i};return w.createElement(c,(0,N.A)({},u,{innerProps:g,data:o,isDisabled:a,isSelected:i,key:h,label:s,type:r,value:l,isFocused:f,innerRef:f?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=this.getCategorizedOptions().map(function(t){if("group"===t.type){var o=t.data,a=t.options,i=t.index,s="".concat(e.getElementId("group"),"-").concat(i),l="".concat(s,"-heading");return w.createElement(n,(0,N.A)({},u,{key:s,data:o,options:a,Heading:r,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return C(e,"".concat(i,"-").concat(e.index))}))}if("option"===t.type)return C(t,"".concat(t.index))});else if(h){var A=g({inputValue:m});if(null===A)return null;D=w.createElement(s,u,A)}else{var T=S({inputValue:m});if(null===T)return null;D=w.createElement(l,u,T)}var O={minMenuHeight:y,maxMenuHeight:b,menuPlacement:x,menuPosition:E,menuShouldScrollIntoView:I},L=w.createElement(JP,(0,N.A)({},u,O),function(t){var n=t.ref,r=t.placerProps,i=r.placement,s=r.maxHeight;return w.createElement(o,(0,N.A)({},u,O,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:h,placement:i}),w.createElement(XR,{captureEnabled:p,onTopArrive:j,onBottomArrive:k,lockEnabled:_},function(t){return w.createElement(a,(0,N.A)({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:h,maxHeight:s,focusedOption:d}),D)}))});return M||"fixed"===E?w.createElement(i,(0,N.A)({},u,{appendTo:M,controlElement:this.controlRef,menuPlacement:x,menuPosition:E}),L):L}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,a=t.name,i=t.required,s=this.state.selectValue;if(i&&!this.hasValue()&&!r)return w.createElement(JR,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(o){if(n){var l=s.map(function(t){return e.getOptionValue(t)}).join(n);return w.createElement("input",{name:a,type:"hidden",value:l})}var c=s.length>0?s.map(function(t,n){return w.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})}):w.createElement("input",{name:a,type:"hidden",value:""});return w.createElement("div",null,c)}var u=s[0]?this.getOptionValue(s[0]):"";return w.createElement("input",{name:a,type:"hidden",value:u})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,a=t.isFocused,i=t.selectValue,s=this.getFocusableOptions();return w.createElement(IR,(0,N.A)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:i,focusableOptions:s,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,a=this.props,i=a.className,s=a.id,l=a.isDisabled,c=a.menuIsOpen,u=this.state.isFocused,d=this.commonProps=this.getCommonProps();return w.createElement(r,(0,N.A)({},d,{className:i,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:u}),this.renderLiveRegion(),w.createElement(t,(0,N.A)({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:u,menuIsOpen:c}),w.createElement(o,(0,N.A)({},d,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),w.createElement(n,(0,N.A)({},d,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,a=t.ariaSelection,i=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,m=AP(u),h={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var g=d?function(e,t){return iU(aU(e,t))}(e,m):[],y=d?sU(aU(e,m),"".concat(l,"-option")):[],w=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,m):null,b=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);h={selectValue:m,focusedOption:b,focusedOptionId:cU(y,b),focusableOptionsWithIds:y,focusedValue:w,clearFocusValueOnUpdate:!1}}var v=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=a,N=i&&s;return i&&!N&&(x={value:WP(p,m,m[0]||null),options:m,action:"initial-input-focus"},N=!s),"initial-input-focus"===(null==a?void 0:a.action)&&(x=null),ZL(ZL(ZL({},h),v),{},{prevProps:e,ariaSelection:x,prevWasFocused:N})}}]),n}(w.Component);yU.defaultProps=rU;var wU=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"],bU=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],vU=(0,w.forwardRef)(function(e,t){var n=function(e){var t=e.defaultOptions,n=void 0!==t&&t,r=e.cacheOptions,o=void 0!==r&&r,a=e.loadOptions;e.options;var i=e.isLoading,s=void 0!==i&&i,l=e.onInputChange,c=e.filterOption,u=void 0===c?null:c,d=IP(e,bU),f=d.inputValue,p=(0,w.useRef)(void 0),m=(0,w.useRef)(!1),h=_P((0,w.useState)(Array.isArray(n)?n:void 0),2),g=h[0],y=h[1],b=_P((0,w.useState)(void 0!==f?f:""),2),v=b[0],x=b[1],N=_P((0,w.useState)(!0===n),2),E=N[0],M=N[1],_=_P((0,w.useState)(void 0),2),I=_[0],S=_[1],j=_P((0,w.useState)([]),2),k=j[0],D=j[1],C=_P((0,w.useState)(!1),2),A=C[0],T=C[1],O=_P((0,w.useState)({}),2),L=O[0],z=O[1],P=_P((0,w.useState)(void 0),2),R=P[0],U=P[1],B=_P((0,w.useState)(void 0),2),F=B[0],Y=B[1];o!==F&&(z({}),Y(o)),n!==R&&(y(Array.isArray(n)?n:void 0),U(n)),(0,w.useEffect)(function(){return m.current=!0,function(){m.current=!1}},[]);var Z=(0,w.useCallback)(function(e,t){if(!a)return t();var n=a(e,t);n&&"function"==typeof n.then&&n.then(t,function(){return t()})},[a]);(0,w.useEffect)(function(){!0===n&&Z(v,function(e){m.current&&(y(e||[]),M(!!p.current))})},[]);var Q=(0,w.useCallback)(function(e,t){var n=function(e,t,n){if(n){var r=n(e,t);if("string"==typeof r)return r}return e}(e,t,l);if(!n)return p.current=void 0,x(""),S(""),D([]),M(!1),void T(!1);if(o&&L[n])x(n),S(n),D(L[n]),M(!1),T(!1);else{var r=p.current={};x(n),M(!0),T(!I),Z(n,function(e){m&&r===p.current&&(p.current=void 0,M(!1),S(n),D(e||[]),T(!1),z(e?ZL(ZL({},L),{},FL({},n,e)):L))})}},[o,Z,I,L,l]),V=A?[]:v&&I?k:g||[];return ZL(ZL({},d),{},{options:V,isLoading:E||s,onInputChange:Q,filterOption:u})}(e),r=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,a=e.defaultValue,i=void 0===a?null:a,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,p=e.value,m=IP(e,wU),h=_P((0,w.useState)(void 0!==s?s:n),2),g=h[0],y=h[1],b=_P((0,w.useState)(void 0!==l?l:o),2),v=b[0],x=b[1],N=_P((0,w.useState)(void 0!==p?p:i),2),E=N[0],M=N[1],_=(0,w.useCallback)(function(e,t){"function"==typeof c&&c(e,t),M(e)},[c]),I=(0,w.useCallback)(function(e,t){var n;"function"==typeof u&&(n=u(e,t)),y(void 0!==n?n:e)},[u]),S=(0,w.useCallback)(function(){"function"==typeof f&&f(),x(!0)},[f]),j=(0,w.useCallback)(function(){"function"==typeof d&&d(),x(!1)},[d]),k=void 0!==s?s:g,D=void 0!==l?l:v,C=void 0!==p?p:E;return ZL(ZL({},m),{},{inputValue:k,menuIsOpen:D,onChange:_,onInputChange:I,onMenuClose:j,onMenuOpen:S,value:C})}(n);return w.createElement(yU,(0,N.A)({ref:t},r))}),xU=vU;const NU=e=>e.isSelected?"#F3F4F6":e.isFocused?"#F9FAFB":"transparent",EU=function(e){const{label:t,name:n,desc:r,value:o,tooltip:i,placeholder:s,onChangeCB:l,options:c,isMulti:u=!1,isSearchable:d=!0,attr:f}=e,[p,m]=(0,a.useState)(o);(0,a.useEffect)(()=>{m(o)},[o]);const h={control:e=>({...e,borderColor:"#E5E7EB",boxShadow:"","&:hover":{borderColor:"none"}}),option:(e,t)=>({...e,backgroundColor:NU(t),color:"#111827",cursor:"pointer","&:active":{backgroundColor:"#F3F4F6"}})};return(0,a.createElement)("div",{className:"wcf-select2-field"},(0,a.createElement)("div",{className:"wcf-selection-field"},t&&(0,a.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-text-primary mb-2"},(0,a.createElement)("label",null,t,i&&(0,a.createElement)(HZ,{text:i}))),(0,a.createElement)(xU,(0,N.A)({className:"wcf-select2-input",classNamePrefix:"wcf",name:n,isClearable:!0,value:p,getOptionLabel:e=>e.label,getOptionValue:e=>e.value,loadOptions:e=>new Promise(t=>{setTimeout(()=>{t((e=>c.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())))(e))},1e3)}),onChange:t=>{m(t);const n=new CustomEvent("wcf:select2:change",{bubbles:!0,detail:{e:{},name:e.name,value:t}});document.dispatchEvent(n),l&&l(t)},placeholder:s,defaultOptions:c,cacheOptions:!0,isMulti:u,delimiter:u&&!n?.endsWith("[]")?",":void 0,styles:h,isSearchable:d},f))),r&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-regular"},Vh(r)))};var MU=o(5901);const _U=(0,a.createContext)();window.cartflows=window.cartflows||{},window.cartflows.editorStateContext=_U;const IU=({reducer:e,initialState:t,children:n})=>(window.cartflows.editorStateContext=_U,(0,a.createElement)(_U.Provider,{value:(0,a.useReducer)(e,t)},n)),SU=()=>(0,a.useContext)(_U);function jU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636"}))}const kU=w.forwardRef(jU);function DU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 14.25 6-6m4.5-3.493V21.75l-3.75-1.5-3.75 1.5-3.75-1.5-3.75 1.5V4.757c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0c1.1.128 1.907 1.077 1.907 2.185ZM9.75 9h.008v.008H9.75V9Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm4.125 4.5h.008v.008h-.008V13.5Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const CU=w.forwardRef(DU);function AU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m-3-2.818.879.659c1.171.879 3.07.879 4.242 0 1.172-.879 1.172-2.303 0-3.182C13.536 12.219 12.768 12 12 12c-.725 0-1.45-.22-2.003-.659-1.106-.879-1.106-2.303 0-3.182s2.9-.879 4.006 0l.415.33M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const TU=w.forwardRef(AU);function OU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z"}))}const LU=w.forwardRef(OU);function zU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z"}),w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const PU=w.forwardRef(zU);function RU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const UU=w.forwardRef(RU);function BU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const FU=w.forwardRef(BU),YU=function(e){const[{options:t},n]=SU(),{index:r,field_name:o,product_data:i,productOptdata:s}=e,l=""===i.discount_type?"disable":"enable",[c,u]=(0,a.useState)(l),[d,f]=(0,a.useState)(i.discount_type),[p,m]=(0,a.useState)(i.discount_value||""),[h,g]=(0,a.useState)(!1),[y,w]=(0,a.useState)(s.product_name||""),[b,v]=(0,a.useState)(s.product_subtext||""),[x,N]=(0,a.useState)(s.highlight_text||""),[E,M]=(0,a.useState)("yes"===s.enable_highlight),_=t["wcf-checkout-products"],I=t["wcf-product-options"],S=t["wcf-enable-product-options"],j=r===_.length-1;(0,a.useEffect)(()=>{f(i.discount_type),m(i.discount_value||"")},[i.discount_type,i.discount_value]),(0,a.useEffect)(()=>{w(s.product_name||""),v(s.product_subtext||""),N(s.highlight_text||""),M("yes"===s.enable_highlight)},[s.product_name,s.product_subtext,s.highlight_text,s.enable_highlight]);const k=[{value:"",label:(0,z.__)("Original","cartflows"),icon:(0,a.createElement)(kU,{className:"w-4 h-4"})},{value:"discount_percent",label:(0,z.__)("Percentage","cartflows"),icon:(0,a.createElement)(CU,{className:"w-4 h-4"})},{value:"discount_price",label:(0,z.__)("Price","cartflows"),icon:(0,a.createElement)(TU,{className:"w-4 h-4"})}],D=k.find(e=>e.value===d)||k[0];return function(){const e=i.discount_type,t=parseFloat(i.discount_value),n=parseFloat(i.regular_price);let r=0;"discount_percent"===e?t>0&&(r=n-n*t/100):"discount_price"===e&&t>0&&(r=n-t),i.sell_price=r.toFixed(2)}(),(0,a.createElement)("div",{key:i.unique_id},(0,a.createElement)("div",{className:`wcf-product-selection--selected-product flex items-center p-3 gap-3 ${function(){let e="";return"yes"===s.add_to_cart?e+=h?"relative border-[0.5px] border-b-0 border-solid border-brand-300 bg-brand-25 ":"relative border-[0.5px] border-solid border-brand-300 bg-brand-25 ":e+=h?"border-[0.5px] border-b-0 border-solid border-border-subtle bg-background-secondary ":"border-[0.5px] border-solid border-border-subtle bg-background-secondary ",e+=j&&!h?" rounded-b-md":"",e}()}`},(0,a.createElement)("div",{className:"wcf-product-selection--product-title whitespace-nowrap text-sm font-medium text-text-primary w-1/2"},(0,a.createElement)("div",{className:"flex gap-3 items-center"},(0,a.createElement)("div",{className:"wcf-product-selection--sortable-toggle flex cursor-move text-text-tertiary"},(0,a.createElement)(LU,{className:"w-6 h-6 stroke-1","aria-hidden":"true"}),(0,a.createElement)(LU,{className:"w-6 h-6 stroke-1 -ml-4","aria-hidden":"true"})),(0,a.createElement)("div",{className:"wcf-product-selection--product-image w-20 h-20"},(0,a.createElement)("img",{src:i&&i.img_url?i.img_url:cartflows_admin.image_placeholder,className:"product-image rounded-md w-full h-full aspect-{3/2} object-contain",alt:Vh(i.name)})),(0,a.createElement)("div",{className:"wcf-product-selection--product-title_text cursor-default"},(0,a.createElement)("div",{className:"wcf-product-repeater-field__title whitespace-normal text-left","data-product_id":i.product},Vh(i.name)),(0,a.createElement)("div",{className:"wcf-product-repeater-field__reg-price mt-1"},(0,a.createElement)("div",{className:"flex gap-2"},(0,a.createElement)("span",{className:"wcf-product--reg-price "+("enable"===l&&0<i.discount_value?"line-through text-text-tertiary":""),title:(0,z.__)("Regular Price of the product","cartflows")},cartflows_admin.woo_currency+i.regular_price),"enable"===l&&0<i.discount_value&&(0,a.createElement)("span",{className:"wcf-product--sale-price",title:(0,z.__)("Price after discount.","cartflows")},cartflows_admin.woo_currency+i.sell_price)))))),(0,a.createElement)("div",{className:"wcf-product-selection--set-default whitespace-nowrap text-sm text-text-secondary w-[10%] flex justify-center items-center"},function(e){let o="";return wcfCartflowsPro()&&"yes"===S?"force-all"===I?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(nL,{size:"sm",value:!0,disabled:!0,name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`}),(0,a.createElement)("input",{type:"hidden",name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`,value:"yes"})):"single-selection"===I?(("yes"===e.add_to_cart||e.chosen)&&(o=e.unique_id),(0,a.createElement)(lL.Group,{name:"wcf_default_add_to_cart[]",value:o,onChange:()=>{t["wcf-checkout-products"][r].add_to_cart="yes",t["wcf-product-options-data"]={[e.unique_id]:{add_to_cart:"yes"}}},style:"simple",size:"sm",columns:1},(0,a.createElement)(lL.Button,{value:e.unique_id,hideSelection:!1,minWidth:!1,buttonWrapperClasses:"p-0 flex items-center justify-center"}))):"multiple-selection"===I?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(nL,{size:"sm",value:"yes"===e.add_to_cart,onChange:r=>{n({type:"SET_OPTION",name:"wcf-product-options-data",value:{...t["wcf-product-options-data"],[e.unique_id]:{...t["wcf-product-options-data"]?.[e.unique_id],add_to_cart:r?"yes":"no"}}})}}),(0,a.createElement)("input",{type:"hidden",name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`,value:e.add_to_cart})):void 0:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(nL,{size:"sm",value:!0,disabled:!0,name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`}),(0,a.createElement)("input",{type:"hidden",name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`,value:"yes"}))}(s)),(0,a.createElement)("div",{className:"wcf-product-selection--product-qty whitespace-nowrap text-sm text-text-secondary w-[10%]"},(0,a.createElement)("div",{className:"w-16 shrink-0"},(0,a.createElement)(Ym,{type:"number",size:"md",name:`wcf-checkout-products[${r}][quantity]`,value:i.quantity,min:1,onChange:e=>{const t=[..._];t[r]={...t[r],quantity:parseInt(e,10)||1},n({type:"UPDATE_CHECKOUT_PRODUCTS",field_name:o,products:t})}}))),(0,a.createElement)("div",{className:"wcf-product-selection--product-discount flex items-center gap-2 whitespace-nowrap text-sm text-text-secondary w-2/3"},(0,a.createElement)("input",{type:"hidden",name:`wcf-checkout-products[${r}][discount_type]`,value:d}),(0,a.createElement)("div",{className:"w-16 shrink-0"},(0,a.createElement)(Ym,{type:"number",size:"md",name:`wcf-checkout-products[${r}][discount_value]`,value:"disable"===c?"":p,disabled:"disable"===c,placeholder:"disable"===c?"":"0",min:1,step:"any",onChange:e=>m(e)})),(0,a.createElement)(nm,{placement:"bottom-start"},(0,a.createElement)(nm.Trigger,null,(0,a.createElement)("button",{type:"button",className:"appearance-none bg-background-primary border border-solid border-border-subtle shadow-sm rounded-md h-10 w-[130px] px-2 py-2 flex items-center justify-between gap-1 cursor-pointer focus:outline-none focus:ring-2 focus:ring-brand-600 focus:ring-offset-2"},(0,a.createElement)("span",{className:"flex items-center gap-1"},(0,a.createElement)("span",{className:"size-4 shrink-0 flex items-center"},D.icon),(0,a.createElement)("span",{className:"text-sm font-normal text-text-primary"},D.label)),(0,a.createElement)(Gp,{className:"size-3.5 shrink-0 text-icon-secondary"}))),(0,a.createElement)(nm.ContentWrapper,{className:"z-50"},(0,a.createElement)(nm.Content,null,(0,a.createElement)(nm.List,null,k.map(e=>(0,a.createElement)(nm.Item,{key:e.value,active:d===e.value,onClick:()=>{f(e.value),function(e,t,n){u(""===n?"disable":"enable")}(0,0,e.value)}},(0,a.createElement)("span",{className:"flex items-center gap-2 text-sm"},e.icon,e.label)))))))),(0,a.createElement)("div",{className:"wcf-product-selection-actions flex gap-2 relative whitespace-nowrap text-right text-sm font-medium w-[10%] justify-center"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",icon:(0,a.createElement)(PU,{className:"w-4 h-4"}),onClick:()=>g(!h),className:`${"yes"===S?"visible":"invisible"} ${h?"bg-brand-50 text-brand-500":""}`,type:"button"}),(0,a.createElement)(Wo,{variant:"ghost",size:"xs",icon:(0,a.createElement)(UU,{className:"w-4 h-4"}),onClick:function(){const e=i.unique_id;e&&n({type:"REMOVE_CHECKOUT_PRODUCT",field_name:o,unique_id:e})},"data-index":r,type:"button",className:"text-icon-secondary hover:text-support-error"})),(0,a.createElement)("input",{name:`wcf-checkout-products[${r}][product]`,type:"hidden",className:"wcf-checkout-product-id",value:i.product}),(0,a.createElement)("input",{name:`wcf-checkout-products[${r}][unique_id]`,type:"hidden",className:"wcf-checkout-product-unique",value:i.unique_id})),h&&(0,a.createElement)("div",{className:"wcf-product-field-item-settings flex flex-col gap-5 p-6 bg-background-primary "+(h&&"yes"===s.add_to_cart?"border-[0.5px] border-t-0 border-solid border-brand-300":"border-[0.5px] border-t-0 border-solid border-border-subtle"),id:"product-option-index-"+r,"data-id":i.product_id},(0,a.createElement)("div",{className:"flex flex-col gap-1.5"},(0,a.createElement)(Ym,{name:`wcf-product-options-data[${s.unique_id}][product_name]`,label:(0,z.__)("Product Name","cartflows"),value:y,size:"md",onChange:e=>w(e)}),(0,a.createElement)(yp,{variant:"help",size:"sm",tag:"p"},(0,a.createElement)(FU,null),(0,z.__)("Use {{product_name}} and {{quantity}} to dynamically fetch respective product details.","cartflows"))),(0,a.createElement)("div",{className:"flex flex-col gap-1.5"},(0,a.createElement)(Ym,{name:`wcf-product-options-data[${s.unique_id}][product_subtext]`,label:(0,z.__)("Subtext","cartflows"),value:b,size:"md",onChange:e=>v(e)}),(0,a.createElement)(yp,{variant:"help",size:"sm",tag:"p"},(0,a.createElement)(FU,null),(0,z.__)("Use {{quantity}}, {{discount_value}}, {{discount_percent}} to dynamically fetch respective product details.","cartflows"))),(0,a.createElement)("div",{className:"flex"},(0,a.createElement)($O,{id:`wcf-product-options-data-enable-highlight-${s.unique_id}`,checked:E,label:{heading:(0,z.__)("Enable Highlight","cartflows")},size:"sm",onChange:e=>M(e)})),(0,a.createElement)("input",{type:"hidden",name:`wcf-product-options-data[${s.unique_id}][enable_highlight]`,value:E?"yes":"no"}),(0,a.createElement)("div",{className:E?"":"hidden"},(0,a.createElement)(Ym,{name:`wcf-product-options-data[${s.unique_id}][highlight_text]`,label:(0,z.__)("Highlight Text","cartflows"),value:x,size:"md",onChange:e=>N(e)})),(0,a.createElement)("input",{name:`wcf-product-options-data[${s.unique_id}][unique_id]`,type:"hidden",className:"wcf-product-options-unique-id",value:s.unique_id})))};function ZU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const QU=w.forwardRef(ZU),VU=function(){return(0,a.createElement)("a",{className:"wcf-create-new-product text-sm font-medium text-brand-500 hover:text-brand-600 inline-flex items-center gap-1.5 cursor-pointer mt-5 w-full focus:outline-none focus:ring-0 focus:text-brand-500 no-underline",rel:"noreferrer",target:"_blank",href:cartflows_admin.create_product_src},(0,a.createElement)(QU,{className:"w-4 h-4 stroke-2","aria-hidden":"true"}),(0,z.__)("Create New Product","cartflows"))},WU=function(e){const[{options:t},n]=SU(),{name:r,value:o}=e,i=t[r],[s,l]=(0,a.useState)(),[c,u]=(0,a.useState)(""),[d,f]=(0,a.useState)(!1),p=(0,z.__)("Add","cartflows"),[m,h]=(0,a.useState)({isInProcessing:!1,buttonText:p}),{isInProcessing:g,buttonText:y}=m,w=t["wcf-product-options"],b=t["wcf-product-options-data"];(0,a.useEffect)(()=>(n({type:"UPDATE_CHECKOUT_PRODUCTS",field_name:r,products:o}),()=>{}),[]);let v=0;const x=wcfCartflowsPro()?function(){const e={};b&&Object.keys(b).map(t=>{const n=b[t];return e[t]={...n},""});const t=[],n={enable_highlight:"no",highlight_text:"",product_name:"",product_subtext:"",add_to_cart:"yes"};return v=0,i.map(function(r){if(r?.unique_id){let o={...n};const a=r.unique_id;e[a]&&(o={...e[a]}),o.product_id=r?.product,o.product_name=o.product_name?o.product_name:r?.name,o.product_title=r?.name,o.unique_id=r.unique_id,"single-selection"!==w&&(o.add_to_cart=o.add_to_cart?o.add_to_cart:"yes"),"single-selection"===w&&(o.add_to_cart&&"no"!==o.add_to_cart&&v++,e[a]||(o.add_to_cart="no")),t.push(o)}return"single-selection"===w&&0===v&&(t[0].add_to_cart="yes"),""}),t}():[];return(0,a.createElement)("div",{className:"wcf-checkout-product-selection-field"},i&&0===i.length&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{name:"wcf-checkout-products",type:"hidden",value:""}),(0,a.createElement)("div",{className:"flex flex-col items-center justify-center py-8 px-4 border border-dashed border-border-subtle rounded-lg bg-background-secondary"},(0,a.createElement)(Ch,{size:"sm",className:"text-text-tertiary text-center"},(0,z.__)("No products added yet. Search and add products below.","cartflows")))),i&&i.length>0&&(0,a.createElement)("div",{className:"border border-solid border-border-subtle rounded-lg"},(0,a.createElement)("div",{className:"wcf-product-selection--header bg-background-secondary border-b border-border-subtle flex items-center gap-3 p-3"},(0,a.createElement)(Ch,{size:"xs",weight:"medium",className:"text-text-secondary w-2/5"},(0,z.__)("Product","cartflows")),(0,a.createElement)(Ch,{size:"xs",weight:"medium",className:"text-text-secondary w-[10%] text-center"},(0,z.__)("Default","cartflows")),(0,a.createElement)(Ch,{size:"xs",weight:"medium",className:"text-text-secondary w-[10%] text-center"},(0,z.__)("Qty","cartflows")),(0,a.createElement)(Ch,{size:"xs",weight:"medium",className:"text-text-secondary w-2/3"},(0,z.__)("Discount","cartflows")),(0,a.createElement)("div",{className:"w-[10%]"})),(0,a.createElement)(MU.ReactSortable,{list:i,setList:e=>n({type:"UPDATE_CHECKOUT_PRODUCTS",field_name:r,products:e}),direction:"vertical",filter:".wcf-field, .wcf-product-selection-actions",preventOnFilter:!1,className:"wcf-checkout-product-selection-field__content"},i.map((e,t)=>("yes"===e.add_to_cart&&v++,(0,a.createElement)(YU,{key:e.unique_id,index:t,field_name:r,product_data:e,productOptdata:x.length>0?x[t]:[]}))))),(0,a.createElement)("div",{className:"wcf-checkout-product-selection-field__add-new flex items-end gap-3 mt-8"},(0,a.createElement)("div",{className:"flex-1"},(0,a.createElement)(VZ,{name:"",desc:"",class:d?"border border-brand-600":"",field:"product",value:c,allowed_products:"",include_products:"braintree-subscription, braintree-variable-subscription",excluded_products:"grouped",excluded_product_ids:cartflows_admin?.restrict_duplicate_checkout_products?(i||[]).map(e=>Number(e.product)):[],placeholder:(0,z.__)("Search for a Product","cartflows"),onChangeCB:l})),(0,a.createElement)(Wo,{type:"button",variant:"outline",size:"md",icon:(0,a.createElement)(QU,{className:"w-4 h-4"}),iconPosition:"left",loading:g,disabled:g,onClick:function(e){const o=s?.value;o?(e.target.blur(),h({isInProcessing:!0,buttonText:(0,z.__)("Adding…","cartflows")}),L()({path:`/cartflows/v1/admin/product-data/${o}`}).then(e=>{const a={product:o,quantity:"1",discount_type:"",discount_value:"",unique_id:Math.random().toString(36).substring(2,10),name:s?.label,img_url:e?.img_url,regular_price:e?.regular_price};if(n({type:"ADD_CHECKOUT_PRODUCT",field_name:r,product_data:a}),u(null),wcfCartflowsPro()){const e=t["wcf-product-options-data"];e[a.unique_id]={enable_highlight:"no",highlight_text:"",product_name:"",product_subtext:""},n({type:"SET_OPTION",name:"wcf-product-options-data",value:e})}h({isInProcessing:!1,buttonText:p})}),l(null)):(f(!0),e.target.blur(),setTimeout(()=>{f(!1)},3e3))},className:"shrink-0"},y)),d&&(0,a.createElement)(Ch,{size:"sm",className:"text-support-error mt-1"},(0,z.__)("Please search and select at-least one product to add.","cartflows")),(0,a.createElement)(VU,null))},GU=window.wp.components,HU=Fo("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),$U=function(e){const{name:t,label:n,value:r,isActive:o=!0,tooltip:i,sectionClass:s="",wrapperClass:l="",labelClass:c="",displayAlign:u="horizontal",showOverlay:d=!1,size:f="md",default:p=""}=e,[m,h]=(0,a.useState)(!1),[g,y]=(0,a.useState)(r),[w,b]=(0,a.useState)(!1),v=(0,a.useRef)(null);(0,a.useEffect)(()=>{y(r)},[r]);const x=`wcf-colorpicker-${String(t).replace(/[\[\]]/g,"-")}`,N=s||"text-left",E="horizontal"!==u?"block w-full text-left":l||"flex justify-between items-center gap-2.5",M="horizontal"!==u?`${c||"text-sm font-medium text-text-primary"} mb-2`:`${c||"text-sm font-medium text-text-primary"}`,_=e=>{e.stopPropagation(),document.dispatchEvent(new CustomEvent("closeAllColorPickers",{detail:{name:t}})),h(!m)},I=!!p&&String(g).toLowerCase()===p.toLowerCase(),S=t=>{const n=t||"";y(n);const r=new CustomEvent("wcf:color:change",{bubbles:!0,detail:{e:"color",name:e.name,value:n}});document.dispatchEvent(r)};return(0,a.useEffect)(()=>{const e=e=>{!v.current||v.current.contains(e.target)||e.target.closest(".wcf-colorpicker-swatch-wrap")||e.target.closest(".wcf-colorpicker-reset")||h(!1)},n=e=>{e.detail.name!==t?h(!1):h(!m)};return document.addEventListener("closeAllColorPickers",n),document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("closeAllColorPickers",n)}},[t]),(0,a.useEffect)(()=>{if(!m)return;const e=e=>{"Escape"===e.key&&h(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[m]),(0,a.createElement)("div",{className:`wcf-field wcf-color-field ${N} ${o?"":"wcf-hide"}`},(0,a.createElement)("div",{className:`wcf-field__data ${E}`},n&&(0,a.createElement)("div",{className:`wcf-field__data--label ${M}`},(0,a.createElement)("label",{id:`${x}-label`},n),i&&(0,a.createElement)(HZ,{text:i})),(0,a.createElement)("div",{className:"wcf-field__data--content"},(0,a.createElement)("div",{className:"wcf-colorpicker-selector flex items-center sm:justify-end"},(0,a.createElement)("div",{className:`wcf-colorpicker-swatch-wrap box-border flex items-center gap-2.5 ${"sm"===f?"h-8 rounded pl-1.5 pr-2.5":"h-10 rounded-md pl-2 pr-3"} bg-background-primary border border-solid border-border-subtle hover:border-gray-300 cursor-pointer focus-visible:ring-1 focus-visible:ring-border-interactive focus-visible:outline-none ${"horizontal"!==u?"w-full":"w-44"}`,onClick:_,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),_(e))},role:"button",tabIndex:"0","aria-haspopup":"true","aria-expanded":m,"aria-controls":x,"aria-labelledby":n?`${x}-label`:void 0,id:`${x}-trigger`},(0,a.createElement)("span",{className:`wcf-colorpicker-swatch ${"sm"===f?"w-5 h-5":"w-6 h-6"} rounded flex-shrink-0 border-[0.5px] border-solid border-black/10`,style:g?{background:g}:{background:"conic-gradient(#E7E9EC 0 25%, #FFFFFF 0 50%, #E7E9EC 0 75%, #FFFFFF 0) 0 0 / 12px 12px"},"aria-hidden":"true"}),(0,a.createElement)("span",{className:"wcf-colorpicker-label flex-1 text-sm whitespace-nowrap overflow-hidden text-ellipsis "+(g?"font-medium text-text-primary":"text-text-tertiary")},g?g.toUpperCase():(0,z.__)("Select color","cartflows")),g&&!I&&(0,a.createElement)(HZ,{text:(0,z.__)("Reset","cartflows"),classes:"!ml-0",icon:(0,a.createElement)("button",{type:"button",onClick:e=>{e.stopPropagation(),g&&!I&&(b(!0),setTimeout(()=>b(!1),500),S(p))},"aria-label":(0,z.__)("Reset color","cartflows"),className:"wcf-colorpicker-reset flex bg-transparent border-0 p-0 cursor-pointer text-text-tertiary hover:text-text-primary focus-visible:ring-1 focus-visible:ring-border-interactive focus-visible:outline-none rounded-sm"},(0,a.createElement)(HU,{className:`w-3.5 h-3.5 transform ${w?"-rotate-180":""} transition-transform duration-500`,"aria-hidden":"true"}))}),(0,a.createElement)("input",{type:"hidden",name:t,value:g}))),(0,a.createElement)("div",{className:"wcf-color-picker relative",ref:v},m?(0,a.createElement)("div",{className:"wcf-color-picker-popover absolute z-10 right-0 top-3",id:x},d&&(0,a.createElement)("div",{className:"wcf-color-picker-cover fixed inset-0",onClick:()=>{h(!1)}}),(0,a.createElement)("div",{className:"bg-background-primary shadow-lg relative rounded-md overflow-hidden"},(0,a.createElement)(GU.ColorPicker,{color:g,onChange:S,enableAlpha:!1}))):null))))},XU=e=>e.isSelected?"#F3F4F6":e.isFocused?"#F9FAFB":"transparent",qU=function(e){const{name:t,label:n,value:r,desc:o,tooltip:i,font_weight_name:s="",font_weight_value:l="",sectionClass:c=!1,wrapperClass:u=!1,labelClass:d="",displayAlign:f="horizontal"}=e,p=c||"text-left";let m=u||"flex items-center gap-2.5",h=d||"text-sm font-medium text-text-primary";"horizontal"!==f&&(m="block w-full text-left",h+=" mb-2");const g=cartflows_admin.cf_font_family,y=r||"Default",[w,b]=(0,a.useState)({value:r,label:r&&r.match(/'([^']+)'/)?r.match(/'([^']+)'/)[1]:y}),[v,x]=(0,a.useState)(l),N=function(e){let t=e.value;const n=[];if(void 0===t||""===t)return n.push({value:"",label:"Default"}),n;const r=t.match("'(.*)'"),o={};r&&r[1]&&(t=r[1]);const a={};return cartflows_admin.google_fonts[t]?(cartflows_admin.google_fonts[t].variants.map(e=>(e.includes("italic")||(a[e]=cartflows_admin.font_weights[e]),"")),Object.keys(a).map(e=>{const t=a[e];return n.push({value:e,label:t}),""}),o[t.replace(" ","+")]=a):cartflows_admin.system_fonts[t]&&(cartflows_admin.system_fonts[t].variants.map(e=>(e.includes("italic")||(a[e]=cartflows_admin.font_weights[e]),"")),Object.keys(a).map(e=>{const t=a[e];return n.push({val:e,label:t}),""})),n};let E=N(w);const M={control:(e,t)=>({...e,borderColor:"#E5E7EB",boxShadow:t.isFocused?"none":"",borderRadius:"6px","&:hover":{borderColor:"none"}}),option:(e,t)=>({...e,backgroundColor:XU(t),color:"#111827",cursor:"pointer","&:active":{backgroundColor:"#F3F4F6"}})};return(0,a.createElement)("div",{className:`wcf-field wcf-font-family-field ${p} `},(0,a.createElement)("div",{className:`wcf-field__data ${m}`},n&&(0,a.createElement)("div",{className:`wcf-field__data--label ${h}`},(0,a.createElement)("label",null,n,i&&(0,a.createElement)(HZ,{text:i}))),(0,a.createElement)("div",{className:"wcf-selection-field"},(0,a.createElement)(xU,{name:t,className:"wcf-select2-input",classNamePrefix:"wcf",cacheOptions:!0,defaultOptions:g,value:w,loadOptions:e=>new Promise(t=>{setTimeout(()=>{t((e=>{const t=g[1].options,n=g[2].options,r=g[0];return t.concat(n,r).filter(t=>t.label.toLowerCase().includes(e.toLowerCase()))})(e))},1e3)}),onChange:t=>{b(t);const n=N(t);E=n;const r=new CustomEvent("wcf:font:change",{bubbles:!0,detail:{name:e.name,value:t.value}});document.dispatchEvent(r)},styles:M}))),o&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Vh(o)),""!==s&&(0,a.createElement)("div",{className:"wcf-font-weight-field mt-5"},(0,a.createElement)(DL,{name:s,className:"wcf-select-input",value:v,onChange:function(e){x(e)},options:E,label:"Font Weight",displayAlign:f})))};function JU({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5m-13.5-9L12 3m0 0 4.5 4.5M12 3v13.5"}))}const KU=w.forwardRef(JU),{__:eB}=wp.i18n,tB=function(e){const{name:t,tooltip:n,value:r,label:o,objName:i,objValue:s,singleButton:l=!1,sectionClass:c="",wrapperClass:u="",labelClass:d,desc:f,descClass:p,displayAlign:m="horizontal"}=e,[h,g]=(0,a.useState)(r),[y,w]=(0,a.useState)(s),[b,v]=(0,a.useState)(!r),x=(0,a.useRef)(null),N=c||"text-left",E=p||"text-sm font-normal text-text-tertiary mt-2";let M=u||"flex items-center gap-2.5",_=d||"text-sm font-medium text-text-primary mb-2";"horizontal"!==m&&(M="block w-full text-left",_+=" mb-2");const I=e=>{e.preventDefault(),x.current||(x.current=wp.media({multiple:!1}),x.current.on("select",function(){const n=x.current.state().get("selection").first().toJSON(),r=n.sizes?.medium?.url||n.url;g(r),w(n),v(!r),S(e,t,r),S(e,i,n)})),x.current.open()},S=(e,t,n)=>{e.preventDefault();const r=new CustomEvent("wcf:image-selector:change",{bubbles:!0,detail:{e,img_obj:t,url:n}});document.dispatchEvent(r)};return(0,a.createElement)("div",{className:`wcf-field wcf-image-selector-field ${N}`},(0,a.createElement)("div",{className:`wcf-field__data ${M}`},o&&(0,a.createElement)("div",{className:`wcf-field__data--label ${_}`},(0,a.createElement)("label",{htmlFor:t},o,n&&(0,a.createElement)(HZ,{text:n}))),(0,a.createElement)("div",{className:"wcf-field__data--content"},(0,a.createElement)("div",{className:"wcf-image-selector-field__input p-0"},h&&!b&&(0,a.createElement)("div",{className:"text-center border-solid border-border-muted mb-3 leading-4"},(0,a.createElement)("img",{src:h,className:"saved-image",name:t,width:"150",alt:eB("Image Preview","cartflows")})),(0,a.createElement)("input",{type:"hidden",id:t,className:"wcf-image",name:t,value:h}),(0,a.createElement)("input",{type:"hidden",className:"wcf-image-obj",name:i,value:JSON.stringify(y)}),!l&&b&&(0,a.createElement)("div",{className:"mt-2 flex flex-col items-center justify-center gap-3 rounded border border-dashed border-border-subtle hover:border-primary-500 px-6 py-6 cursor-pointer",onClick:I},(0,a.createElement)(KU,{className:"h-5 w-5 text-text-tertiary","aria-hidden":"true"}),(0,a.createElement)(Eh,{direction:"column",align:"center",gap:"xs",className:"text-center"},(0,a.createElement)(Ch,{as:"p",size:14,weight:500,color:"primary",className:"m-0"},eB("Drag and drop or browse files","cartflows")),(0,a.createElement)(Ch,{as:"p",size:12,color:"secondary",className:"m-0"},eB("PNG, JPG, GIF up to 10MB","cartflows")))),(0,a.createElement)(Eh,{gap:"sm",className:"wcf-image-selector-field-buttons m-0 p-0"},l&&(0,a.createElement)(Wo,{variant:"outline",size:"sm",className:"wcf-select-image",onClick:I},eB(h?"Change Image":"Select Image","cartflows")),h&&(0,a.createElement)(Wo,{variant:"outline",size:"sm",className:"wcf-remove-image",onClick:e=>{e.preventDefault(),g(""),v(!0),w(""),S(e,t,""),S(e,i,"")}},eB("Remove Image","cartflows")))))),f&&(0,a.createElement)(Eh,{align:"center",gap:"xs",className:`wcf-field__desc ${E}`},(0,a.createElement)(FU,{className:"w-3 h-3 text-text-secondary shrink-0"}),Vh(f)))},nB=function(e){const{name:t,id:n,label:r,desc:o,value:i,tooltip:s,placeholder:l,min:c,max:u,width:d,afterfield:f,readonly:p,wrapperClass:m=!1,labelClass:h,sectionClass:g,descClass:y,displayAlign:w="horizontal",step:b="1",size:v="md"}=e,[x,N]=(0,a.useState)(i),E=(0,a.useRef)(null),M=g||"text-left",_=y||"text-sm font-normal text-text-tertiary mt-2",I="horizontal"===w,S=h||"text-sm font-medium text-text-primary text-left"+(I?"":" mb-2");let j=m||"flex items-center justify-between gap-2.5";const k=I&&r?"flex items-center justify-end gap-1.5":"flex items-center w-full";I||(j="block w-full text-left");const D=I&&r&&!d?"!w-44":"!w-full";return(0,a.useEffect)(()=>{N(i),E.current&&(E.current.value=null!=i?i:"")},[i]),(0,a.createElement)("div",{className:`wcf-field wcf-number-field ${M}`},(0,a.createElement)("div",{className:`wcf-field__data ${j}`},r&&(0,a.createElement)("div",{className:`wcf-field__data--label ${S}`},(0,a.createElement)("label",{htmlFor:n||t},r,s&&(0,a.createElement)(HZ,{text:s}))),(0,a.createElement)("div",{className:`wcf-field__data--content ${k}`},(0,a.createElement)("input",{type:"hidden",ref:E,className:e.class?e.class:"",defaultValue:null!=x?x:""}),(0,a.createElement)(Ym,{type:"number",name:t,value:x,id:n||t,onChange:function(e){let n=e;if("any"===b&&n?.includes(".")){const[e,t]=n.split(".");t.length>2&&(n=`${e}.${t.substring(0,2)}`)}const r=document.getElementsByName(t);r[0]&&r[0].setAttribute("value",n),E.current&&(E.current.value=n),N(n);const o=new CustomEvent("wcf:number:change",{bubbles:!0,detail:{e:{target:{value:n,name:t}},name:t,value:n}});document.dispatchEvent(o)},placeholder:l,min:c,max:u,readOnly:p,disabled:p,inputMode:"numeric",step:b,style:{width:d},size:v,className:`${e.class?e.class:D}`}),f&&(0,a.createElement)("span",{className:"wcf-field__data--after-field ml-1 font-medium"},f))),o&&(0,a.createElement)("div",{className:`wcf-field__desc ${_}`},Vh(o)))},rB=Fo("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),oB=Fo("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),aB=(0,w.createContext)(void 0);function iB(){const e=(0,w.useContext)(aB);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}const sB={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function lB(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const cB={date:lB({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:lB({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:lB({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},uB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function dB(e){return(t,n)=>{let r;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,o=n?.width?String(n.width):t;r=e.formattingValues[o]||e.formattingValues[t]}else{const t=e.defaultWidth,o=n?.width?String(n.width):e.defaultWidth;r=e.values[o]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const fB={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:dB({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:dB({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:dB({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:dB({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:dB({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function pB(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(s,e=>e.test(i)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(s,e=>e.test(i));let c;return c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c,{value:c,rest:t.slice(i.length)}}}const mB={ordinalNumber:(hB={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(hB.matchPattern);if(!n)return null;const r=n[0],o=e.match(hB.parsePattern);if(!o)return null;let a=hB.valueCallback?hB.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:pB({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:pB({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:pB({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:pB({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:pB({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var hB;const gB={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=sB[e];return r="string"==typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r},formatLong:cB,formatRelative:(e,t,n,r)=>uB[e],localize:fB,match:mB,options:{weekStartsOn:0,firstWeekContainsDate:1}};let yB={};function wB(){return yB}Math.pow(10,8);const bB=6048e5,vB=Symbol.for("constructDateFrom");function xB(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&vB in e?e[vB](t):e instanceof Date?new e.constructor(t):new Date(t)}function NB(e,t){return xB(t||e,e)}function EB(e){const t=NB(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function MB(e,...t){const n=xB.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function _B(e,t){const n=NB(e,t?.in);return n.setHours(0,0,0,0),n}function IB(e,t,n){const[r,o]=MB(n?.in,e,t),a=_B(r),i=_B(o),s=+a-EB(a),l=+i-EB(i);return Math.round((s-l)/864e5)}function SB(e,t){const n=NB(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function jB(e,t){const n=wB(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=NB(e,t?.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function kB(e,t){return jB(e,{...t,weekStartsOn:1})}function DB(e,t){const n=NB(e,t?.in),r=n.getFullYear(),o=xB(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=kB(o),i=xB(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=kB(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function CB(e,t){const n=NB(e,t?.in),r=+kB(n)-+function(e,t){const n=DB(e,t),r=xB(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),kB(r)}(n);return Math.round(r/bB)+1}function AB(e,t){const n=NB(e,t?.in),r=n.getFullYear(),o=wB(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=xB(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=jB(i,t),l=xB(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=jB(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function TB(e,t){const n=NB(e,t?.in),r=+jB(n,t)-+function(e,t){const n=wB(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=AB(e,t),a=xB(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),jB(a,t)}(n,t);return Math.round(r/bB)+1}function OB(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const LB={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return OB("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):OB(n+1,2)},d:(e,t)=>OB(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>OB(e.getHours()%12||12,t.length),H:(e,t)=>OB(e.getHours(),t.length),m:(e,t)=>OB(e.getMinutes(),t.length),s:(e,t)=>OB(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return OB(Math.trunc(r*Math.pow(10,n-3)),t.length)}},zB={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return LB.y(e,t)},Y:function(e,t,n,r){const o=AB(e,r),a=o>0?o:1-o;return"YY"===t?OB(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):OB(a,t.length)},R:function(e,t){return OB(DB(e),t.length)},u:function(e,t){return OB(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return OB(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return OB(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return LB.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return OB(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=TB(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):OB(o,t.length)},I:function(e,t,n){const r=CB(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):OB(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):LB.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=NB(e,t?.in);return IB(n,SB(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):OB(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return OB(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return OB(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=0===r?7:r;switch(t){case"i":return String(o);case"ii":return OB(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return LB.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):LB.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):OB(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):OB(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):LB.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):LB.s(e,t)},S:function(e,t){return LB.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return RB(r);case"XXXX":case"XX":return UB(r);default:return UB(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return RB(r);case"xxxx":case"xx":return UB(r);default:return UB(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+PB(r,":");default:return"GMT"+UB(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+PB(r,":");default:return"GMT"+UB(r,":")}},t:function(e,t,n){return OB(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return OB(+e,t.length)}};function PB(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return 0===a?n+String(o):n+String(o)+t+OB(a,2)}function RB(e,t){return e%60==0?(e>0?"-":"+")+OB(Math.abs(e)/60,2):UB(e,t)}function UB(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+OB(Math.trunc(r/60),2)+t+OB(r%60,2)}const BB=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},FB=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},YB={p:FB,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return BB(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;default:a=t.dateTime({width:"full"})}return a.replace("{{date}}",BB(r,t)).replace("{{time}}",FB(o,t))}},ZB=/^D+$/,QB=/^Y+$/,VB=["D","DD","YY","YYYY"];function WB(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}const GB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,HB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,$B=/^'([^]*?)'?$/,XB=/''/g,qB=/[a-zA-Z]/;function JB(e,t,n){const r=wB(),o=n?.locale??r.locale??gB,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=NB(e,n?.in);if(!function(e){return!(!WB(e)&&"number"!=typeof e||isNaN(+NB(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(HB).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,YB[t])(e,o.formatLong):e}).join("").match(GB).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:KB(e)};if(zB[t])return{isToken:!0,value:e};if(t.match(qB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(r=>{if(!r.isToken)return r.value;const a=r.value;return(!n?.useAdditionalWeekYearTokens&&function(e){return QB.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return ZB.test(e)}(a))&&function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}(e,t,n);if(console.warn(r),VB.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,zB[a[0]])(s,a,o.localize,c)}).join("")}function KB(e){const t=e.match($B);return t?t[1].replace(XB,"'"):e}const eF={...gB,labels:{labelDayButton:(e,t,n,r)=>{let o;o=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>JB(e,t,{locale:gB,...n});let a=o(e,"PPPP");return t.today&&(a=`Today, ${a}`),t.selected&&(a=`${a}, selected`),a},labelMonthDropdown:"Choose the Month",labelNext:"Go to the Next Month",labelPrevious:"Go to the Previous Month",labelWeekNumber:e=>`Week ${e}`,labelYearDropdown:"Choose the Year",labelGrid:(e,t,n)=>{let r;return r=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>JB(e,n,{locale:gB,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;o=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>JB(e,t,{locale:gB,...n});let a=o(e,"PPPP");return t?.today&&(a=`Today, ${a}`),a},labelNav:"Navigation bar",labelWeekNumberHeader:"Week Number",labelWeekday:(e,t,n)=>{let r;return r=n&&"function"==typeof n.format?n.format.bind(n):(e,n)=>JB(e,n,{locale:gB,...t}),r(e,"cccc")}}};Symbol.for("constructDateFrom");const tF={},nF={};function rF(e,t){try{const n=(tF[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in nF?nF[n]:aF(n,n.split(":"))}catch{if(e in nF)return nF[e];const t=e?.match(oF);return t?aF(e,t.slice(1)):NaN}}const oF=/([+-]\d\d):?(\d\d)?/;function aF(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return nF[e]=60*n+r>0?60*n+r+o:60*n-r-o}class iF extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(rF(this.timeZone,this))?this.setTime(NaN):e.length?"number"==typeof e[0]&&(1===e.length||2===e.length&&"number"!=typeof e[1])?this.setTime(e[0]):"string"==typeof e[0]?this.setTime(+new Date(e[0])):e[0]instanceof Date?this.setTime(+e[0]):(this.setTime(+new Date(...e)),cF(this),lF(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new iF(...t,e):new iF(Date.now(),e)}withTimeZone(e){return new iF(+this,e)}getTimezoneOffset(){const e=-rF(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),lF(this),+this}[Symbol.for("constructDateFrom")](e){return new iF(+new Date(e),this.timeZone)}}const sF=/^(get|set)(?!UTC)/;function lF(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-rF(e.timeZone,e)))}function cF(e){const t=rF(e.timeZone,e),n=t>0?Math.floor(t):Math.ceil(t),r=new Date(+e);r.setUTCHours(r.getUTCHours()-1);const o=-new Date(+e).getTimezoneOffset(),a=o- -new Date(+r).getTimezoneOffset(),i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=o-n;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const l=new Date(+e);l.setUTCSeconds(0);const c=o>0?l.getSeconds():(l.getSeconds()-60)%60,u=Math.round(-60*rF(e.timeZone,e))%60;(u||c)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+u),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+u+c));const d=rF(e.timeZone,e),f=d>0?Math.floor(d):Math.ceil(d),p=-new Date(+e).getTimezoneOffset()-f-s;if(f!==n&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const t=rF(e.timeZone,e),n=f-(t>0?Math.floor(t):Math.ceil(t));n&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+n),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+n))}}Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!sF.test(e))return;const t=e.replace(sF,"$1UTC");iF.prototype[t]&&(e.startsWith("get")?iF.prototype[e]=function(){return this.internal[t]()}:(iF.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),function(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),cF(e)}(this),+this},iF.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),lF(this),+this}))});class uF extends iF{static tz(e,...t){return t.length?new uF(...t,e):new uF(Date.now(),e)}toISOString(){const[e,t,n]=this.tzComponents(),r=`${e}${t}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[e,t,n,r]=this.internal.toUTCString().split(" ");return`${e?.slice(0,-1)} ${n} ${t} ${r}`}toTimeString(){const e=this.internal.toUTCString().split(" ")[4],[t,n,r]=this.tzComponents();return`${e} GMT${t}${n}${r} (${function(e,t,n="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:n}).format(t).split(/\s/g).slice(2).join(" ")}(this.timeZone,this)})`}toLocaleString(e,t){return Date.prototype.toLocaleString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleDateString(e,t){return Date.prototype.toLocaleDateString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}toLocaleTimeString(e,t){return Date.prototype.toLocaleTimeString.call(this,e,{...t,timeZone:t?.timeZone||this.timeZone})}tzComponents(){const e=this.getTimezoneOffset();return[e>0?"-":"+",String(Math.floor(Math.abs(e)/60)).padStart(2,"0"),String(Math.abs(e)%60).padStart(2,"0")]}withTimeZone(e){return new uF(+this,e)}[Symbol.for("constructDateFrom")](e){return new uF(+new Date(e),this.timeZone)}}function dF(e,t,n){const r=NB(e,n?.in);return isNaN(t)?xB(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function fF(e,t,n){const r=NB(e,n?.in);if(isNaN(t))return xB(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),a=xB(n?.in||e,r.getTime());return a.setMonth(r.getMonth()+t+1,0),o>=a.getDate()?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}function pF(e,t,n){const[r,o]=MB(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}function mF(e,t){const[n,r]=MB(e,t.start,t.end);return{start:n,end:r}}function hF(e,t){const n=wB(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=NB(e,t?.in),a=o.getDay(),i=6+(a<r?-7:0)-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function gF(e,t){const n=NB(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function yF(e,t){return+NB(e)>+NB(t)}function wF(e,t){return+NB(e)<+NB(t)}function bF(e,t,n){const[r,o]=MB(n?.in,e,t);return+_B(r)===+_B(o)}function vF(e,t,n){const r=NB(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=xB(n?.in||e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=function(e,t){const n=NB(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=xB(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}(i);return r.setMonth(t,Math.min(a,s)),r}function xF(e,t){const n=NB(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function NF(e,t){const n=t.startOfMonth(e),r=n.getDay();return 1===r?n:0===r?t.addDays(n,-6):t.addDays(n,-1*(r-1))}class EF{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?uF.tz(this.options.timeZone):new this.Date,this.newDate=(e,t,n)=>this.overrides?.newDate?this.overrides.newDate(e,t,n):this.options.timeZone?new uF(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):dF(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):fF(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return dF(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,n){return fF(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):IB(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):pF(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):function(e,t){const{start:n,end:r}=mF(t?.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);const l=[];for(;+i<=a;)l.push(xB(n,i)),i.setMonth(i.getMonth()+s);return o?l.reverse():l}(e),this.eachYearOfInterval=e=>{const t=this.overrides?.eachYearOfInterval?this.overrides.eachYearOfInterval(e):function(e,t){const{start:n,end:r}=mF(t?.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setMonth(0,1);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);const l=[];for(;+i<=a;)l.push(xB(n,i)),i.setFullYear(i.getFullYear()+s);return o?l.reverse():l}(e),n=new Set(t.map(e=>this.getYear(e)));if(n.size===t.length)return t;const r=[];return n.forEach(e=>{r.push(new Date(e,0,1))}),r},this.endOfBroadcastWeek=e=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(e):function(e,t){const n=NF(e,t),r=function(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,1-r),a=t.addDays(o,34);return t.getMonth(e)===t.getMonth(a)?5:4}(e,t);return t.addDays(n,7*r-1)}(e,this),this.endOfISOWeek=e=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(e):function(e,t){return hF(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):gF(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):hF(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=NB(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}(e),this.format=(e,t,n)=>{const r=this.overrides?.format?this.overrides.format(e,t,this.options):JB(e,t,this.options);return this.options.numerals&&"latn"!==this.options.numerals?this.replaceDigits(r):r},this.getISOWeek=e=>this.overrides?.getISOWeek?this.overrides.getISOWeek(e):CB(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return NB(e,t?.in).getMonth()}(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return NB(e,t?.in).getFullYear()}(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):TB(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):yF(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):wF(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):WB(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):bF(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t,n){const[r,o]=MB(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}(e,t),this.isSameYear=(e,t)=>this.overrides?.isSameYear?this.overrides.isSameYear(e,t):function(e,t,n){const[r,o]=MB(n?.in,e,t);return r.getFullYear()===o.getFullYear()}(e,t),this.max=e=>this.overrides?.max?this.overrides.max(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=xB.bind(null,e));const t=NB(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),xB(r,n||NaN)}(e),this.min=e=>this.overrides?.min?this.overrides.min(e):function(e,t){let n,r=t?.in;return e.forEach(e=>{r||"object"!=typeof e||(r=xB.bind(null,e));const t=NB(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),xB(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):vF(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=NB(e,n?.in);return isNaN(+r)?xB(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):NF(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):_B(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):kB(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):xF(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):jB(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):SB(e),this.options={locale:eF,...e},this.overrides=t}getDigitMap(){const{numerals:e="latn"}=this.options,t=new Intl.NumberFormat("en-US",{numberingSystem:e}),n={};for(let e=0;e<10;e++)n[e.toString()]=t.format(e);return n}replaceDigits(e){const t=this.getDigitMap();return e.replace(/\d/g,e=>t[e]||e)}formatNumber(e){return this.replaceDigits(e.toString())}getMonthYearOrder(){const e=this.options.locale?.code;return e&&EF.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:r}=this.options,o=t?.code;if(o&&EF.yearFirstLocales.has(o))try{return new Intl.DateTimeFormat(o,{month:"long",year:"numeric",timeZone:n,numberingSystem:r}).format(e)}catch{}const a="year-first"===this.getMonthYearOrder()?"y LLLL":"LLLL y";return this.format(e,a)}}EF.yearFirstLocales=new Set(["eu","hu","ja","ja-Hira","ja-JP","ko","ko-KR","lt","lt-LT","lv","lv-LV","mn","mn-MN","zh","zh-CN","zh-HK","zh-TW"]);const MF=new EF;var _F,IF,SF,jF;function kF(e,t,n=!1,r=MF){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!(n||!o)&&s(o,t)}function DF(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function CF(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function AF(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function TF(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function OF(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function LF(e,t){return Array.isArray(e)&&e.every(t.isDate)}function zF(e,t,n=MF){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(t=>{if("boolean"==typeof t)return t;if(n.isDate(t))return o(e,t);if(LF(t,n))return t.some(t=>o(e,t));if(CF(t))return kF(t,e,!1,n);if(OF(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if(DF(t)){const n=a(t.before,e)>0,r=a(t.after,e)<0;return i(t.before,t.after)?r&&n:n||r}return AF(t)?a(e,t.after)>0:TF(t)?a(t.before,e)>0:"function"==typeof t&&t(e)})}function PF(e){return w.createElement("button",{...e})}function RF(e){return w.createElement("span",{...e})}function UF(e){const{size:t=24,orientation:n="left",className:r}=e;return w.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&w.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&w.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&w.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&w.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function BF(e){const{day:t,modifiers:n,...r}=e;return w.createElement("td",{...r})}function FF(e){const{day:t,modifiers:n,...r}=e,o=w.useRef(null);return w.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),w.createElement("button",{ref:o,...r})}function YF(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[_F.Dropdown],n].join(" "),s=t?.find(({value:e})=>e===a.value);return w.createElement("span",{"data-disabled":a.disabled,className:o[_F.DropdownRoot]},w.createElement(r.Select,{className:i,...a},t?.map(({value:e,label:t,disabled:n})=>w.createElement(r.Option,{key:e,value:e,disabled:n},t))),w.createElement("span",{className:o[_F.CaptionLabel],"aria-hidden":!0},s?.label,w.createElement(r.Chevron,{orientation:"down",size:18,className:o[_F.Chevron]})))}function ZF(e){return w.createElement("div",{...e})}function QF(e){return w.createElement("div",{...e})}function VF(e){const{calendarMonth:t,displayIndex:n,...r}=e;return w.createElement("div",{...r},e.children)}function WF(e){const{calendarMonth:t,displayIndex:n,...r}=e;return w.createElement("div",{...r})}function GF(e){return w.createElement("table",{...e})}function HF(e){return w.createElement("div",{...e})}function $F(e){const{components:t}=iB();return w.createElement(t.Dropdown,{...e})}function XF(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:l,labelNext:c}}=iB(),u=(0,w.useCallback)(e=>{o&&n?.(e)},[o,n]),d=(0,w.useCallback)(e=>{r&&t?.(e)},[r,t]);return w.createElement("nav",{...a},w.createElement(i.PreviousMonthButton,{type:"button",className:s[_F.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":l(r),onClick:d},w.createElement(i.Chevron,{disabled:!r||void 0,className:s[_F.Chevron],orientation:"left"})),w.createElement(i.NextMonthButton,{type:"button",className:s[_F.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":c(o),onClick:u},w.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:s[_F.Chevron]})))}function qF(e){const{components:t}=iB();return w.createElement(t.Button,{...e})}function JF(e){return w.createElement("option",{...e})}function KF(e){const{components:t}=iB();return w.createElement(t.Button,{...e})}function eY(e){const{rootRef:t,...n}=e;return w.createElement("div",{...n,ref:t})}function tY(e){return w.createElement("select",{...e})}function nY(e){const{week:t,...n}=e;return w.createElement("tr",{...n})}function rY(e){return w.createElement("th",{...e})}function oY(e){return w.createElement("thead",{"aria-hidden":!0},w.createElement("tr",{...e}))}function aY(e){const{week:t,...n}=e;return w.createElement("th",{...n})}function iY(e){return w.createElement("th",{...e})}function sY(e){return w.createElement("tbody",{...e})}function lY(e){const{components:t}=iB();return w.createElement(t.Dropdown,{...e})}function cY(){const e={};for(const t in _F)e[_F[t]]=`rdp-${_F[t]}`;for(const t in IF)e[IF[t]]=`rdp-${IF[t]}`;for(const t in SF)e[SF[t]]=`rdp-${SF[t]}`;for(const t in jF)e[jF[t]]=`rdp-${jF[t]}`;return e}function uY(e,t,n){return(n??new EF(t)).formatMonthYear(e)}!function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"}(_F||(_F={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(IF||(IF={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(SF||(SF={})),function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"}(jF||(jF={}));const dY=uY;function fY(e,t,n){return(n??new EF(t)).format(e,"d")}function pY(e,t=MF){return t.format(e,"LLLL")}function mY(e,t,n){return(n??new EF(t)).format(e,"cccccc")}function hY(e,t=MF){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function gY(){return""}function yY(e,t=MF){return t.format(e,"yyyy")}const wY=yY;function bY(e,t,n,r){let o=(r??new EF(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const vY=bY;function xY(e,t,n){return(n??new EF(t)).formatMonthYear(e)}const NY=xY;function EY(e,t,n,r){let o=(r??new EF(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function MY(e){return"Choose the Month"}function _Y(){return""}const IY="Go to the Next Month";function SY(e,t){return IY}function jY(e){return"Go to the Previous Month"}function kY(e,t,n){return(n??new EF(t)).format(e,"cccc")}function DY(e,t){return`Week ${e}`}function CY(e){return"Week Number"}function AY(e){return"Choose the Year"}const TY=(e,t,n)=>t||(n?"function"==typeof n?n:(...e)=>n:e);function OY(e,t){const n=t.locale?.labels??{};return{...r,...e??{},labelDayButton:TY(bY,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:TY(MY,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:TY(SY,e?.labelNext,n.labelNext),labelPrevious:TY(jY,e?.labelPrevious,n.labelPrevious),labelWeekNumber:TY(DY,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:TY(AY,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:TY(xY,e?.labelGrid,n.labelGrid),labelGridcell:TY(EY,e?.labelGridcell,n.labelGridcell),labelNav:TY(_Y,e?.labelNav,n.labelNav),labelWeekNumberHeader:TY(CY,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:TY(kY,e?.labelWeekday,n.labelWeekday)}}function LY(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:l,getMonth:c}=o;return l({start:i(e),end:s(e)}).map(e=>{const i=r.formatMonthDropdown(e,o);return{value:c(e),label:i,disabled:t&&e<a(t)||n&&e>a(n)||!1}})}function zY(e,t,n,r,o=!1){if(!e)return;if(!t)return;const{startOfYear:a,endOfYear:i,eachYearOfInterval:s,getYear:l}=r,c=s({start:a(e),end:i(t)});return o&&c.reverse(),c.map(e=>{const t=n.formatYearDropdown(e,r);return{value:l(e),label:t,disabled:!1}})}const PY=e=>e instanceof HTMLElement?e:null,RY=e=>[...e.querySelectorAll("[data-animated-month]")??[]],UY=e=>PY(e.querySelector("[data-animated-caption]")),BY=e=>PY(e.querySelector("[data-animated-weeks]"));function FY(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:s=1}=e;let l=o||a||i;const{differenceInCalendarMonths:c,addMonths:u,startOfMonth:d}=r;return n&&c(n,l)<s-1&&(l=u(n,-1*(s-1))),t&&c(l,t)<0&&(l=t),d(l)}class YY{constructor(e,t,n=MF){this.date=e,this.displayMonth=t,this.outside=Boolean(t&&!n.isSameMonth(e,t)),this.dateLib=n,this.isoDate=n.format(e,"yyyy-MM-dd"),this.displayMonthId=n.format(t,"yyyy-MM"),this.dateMonthId=n.format(e,"yyyy-MM")}isEqualTo(e){return this.dateLib.isSameDay(e.date,this.date)&&this.dateLib.isSameMonth(e.displayMonth,this.displayMonth)}}class ZY{constructor(e,t){this.days=t,this.weekNumber=e}}class QY{constructor(e,t){this.date=e,this.weeks=t}}function VY(e,t){const[n,r]=(0,w.useState)(e);return[void 0===t?n:t,r]}var WY;function GY(e){return!e[IF.disabled]&&!e[IF.hidden]&&!e[IF.outside]}function HY(e,t,n,r,o,a,i,s=0){if(s>365)return;const l=function(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:l}=a,{addDays:c,addMonths:u,addWeeks:d,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:h,max:g,min:y,startOfBroadcastWeek:w,startOfISOWeek:b,startOfWeek:v}=i,x={day:c,week:d,month:u,year:f,startOfWeek:e=>l?w(e,i):s?b(e):v(e),endOfWeek:e=>l?p(e):s?m(e):h(e)};let N=x[e](n,"after"===t?1:-1);return"before"===t&&r?N=g([r,N]):"after"===t&&o&&(N=y([o,N])),N}(e,t,n.date,r,o,a,i),c=Boolean(a.disabled&&zF(l,a.disabled,i)),u=Boolean(a.hidden&&zF(l,a.hidden,i)),d=new YY(l,l,i);return c||u?HY(e,t,d,r,o,a,i,s+1):d}function $Y(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=(0,w.useState)(),l=function(e,t,n,r){let o,a=-1;for(const i of e){const e=t(i);GY(e)&&(e[IF.focused]&&a<WY.FocusedModifier?(o=i,a=WY.FocusedModifier):r?.isEqualTo(i)&&a<WY.LastFocused?(o=i,a=WY.LastFocused):n(i.date)&&a<WY.Selected?(o=i,a=WY.Selected):e[IF.today]&&a<WY.Today&&(o=i,a=WY.Today))}return o||(o=e.find(e=>GY(t(e)))),o}(t.days,n,r||(()=>!1),i),[c,u]=(0,w.useState)(a?l:void 0);return{isFocusTarget:e=>Boolean(l?.isEqualTo(e)),setFocused:u,focused:c,blur:()=>{s(c),u(void 0)},moveFocus:(n,r)=>{if(!c)return;const a=HY(n,r,c,t.navStart,t.navEnd,e,o);if(a){if(e.disableNavigation&&!t.days.some(e=>e.isEqualTo(a)))return;t.goToDay(a),u(a)}}}}function XY(e,t,n=MF){return kF(e,t.from,!1,n)||kF(e,t.to,!1,n)||kF(t,e.from,!1,n)||kF(t,e.to,!1,n)}function qY(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:i,onSelect:s}=e,[l,c]=VY(a,s?a:void 0),u=s?a:l;return{selected:u,select:(a,l,d)=>{const{min:f,max:p}=e;let m;if(a){const e=u?.from,n=u?.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(a,e);m=!o||!r&&u?.from?function(e,t,n=0,r=0,o=!1,a=MF){const{from:i,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:u}=a;let d;if(i||s){if(i&&!s)d=l(i,e)?0===n?{from:i,to:e}:o?{from:i,to:void 0}:void 0:u(e,i)?{from:e,to:i}:{from:i,to:e};else if(i&&s)if(l(i,e)&&l(s,e))d=o?{from:i,to:s}:void 0;else if(l(i,e))d={from:i,to:n>0?void 0:e};else if(l(s,e))d={from:e,to:n>0?void 0:e};else if(u(e,i))d={from:e,to:s};else if(c(e,i))d={from:i,to:e};else{if(!c(e,s))throw new Error("Invalid range");d={from:i,to:e}}}else d={from:e,to:n>0?void 0:e};if(d?.from&&d?.to){const t=a.differenceInCalendarDays(d.to,d.from);(r>0&&t>r||n>1&&t<n)&&(d={from:e,to:void 0})}return d}(a,u,f,p,i,t):!i&&s?void 0:{from:a,to:void 0}}return r&&n&&m?.from&&m.to&&function(e,t,n=MF){const r=Array.isArray(t)?t:[t],o=r.filter(e=>"function"!=typeof e),a=o.some(t=>"boolean"==typeof t?t:n.isDate(t)?kF(e,t,!1,n):LF(t,n)?t.some(t=>kF(e,t,!1,n)):CF(t)?!(!t.from||!t.to)&&XY(e,{from:t.from,to:t.to},n):OF(t)?function(e,t,n=MF){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let e=0;e<=i;e++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}(e,t.dayOfWeek,n):DF(t)?n.isAfter(t.before,t.after)?XY(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):zF(e.from,t,n)||zF(e.to,t,n):!(!AF(t)&&!TF(t))&&(zF(e.from,t,n)||zF(e.to,t,n)));if(a)return!0;const i=r.filter(e=>"function"==typeof e);if(i.length){let t=e.from;const r=n.differenceInCalendarDays(e.to,e.from);for(let e=0;e<=r;e++){if(i.some(e=>e(t)))return!0;t=n.addDays(t,1)}}return!1}({from:m.from,to:m.to},n,t)&&(m.from=a,m.to=void 0),s||c(m),s?.(m,a,l,d),m},isSelected:e=>u&&kF(u,e,!1,t)}}function JY(e,t){return e instanceof uF&&e.timeZone===t?e:new uF(e,t)}function KY(e,t,n){if(!n)return JY(e,t);const r=JY(e,t),o=new uF(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(o.getTime())}function eZ(e,t,n){return"boolean"==typeof e||"function"==typeof e?e:e instanceof Date?KY(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?KY(e,t,n):e):CF(e)?{...e,from:e.from?JY(e.from,t):e.from,to:e.to?JY(e.to,t):e.to}:DF(e)?{before:KY(e.before,t,n),after:KY(e.after,t,n)}:AF(e)?{after:KY(e.after,t,n)}:TF(e)?{before:KY(e.before,t,n)}:e}function tZ(e,t,n){return e?Array.isArray(e)?e.map(e=>eZ(e,t,n)):eZ(e,t,n):e}function nZ(e){let r=e;const o=r.timeZone;if(o&&(r={...e,timeZone:o},r.today&&(r.today=JY(r.today,o)),r.month&&(r.month=JY(r.month,o)),r.defaultMonth&&(r.defaultMonth=JY(r.defaultMonth,o)),r.startMonth&&(r.startMonth=JY(r.startMonth,o)),r.endMonth&&(r.endMonth=JY(r.endMonth,o)),"single"===r.mode&&r.selected?r.selected=JY(r.selected,o):"multiple"===r.mode&&r.selected?r.selected=r.selected?.map(e=>JY(e,o)):"range"===r.mode&&r.selected&&(r.selected={from:r.selected.from?JY(r.selected.from,o):r.selected.from,to:r.selected.to?JY(r.selected.to,o):r.selected.to}),void 0!==r.disabled&&(r.disabled=tZ(r.disabled,o)),void 0!==r.hidden&&(r.hidden=tZ(r.hidden,o)),r.modifiers)){const e={};Object.keys(r.modifiers).forEach(t=>{e[t]=tZ(r.modifiers?.[t],o)}),r.modifiers=e}const{components:a,formatters:i,labels:s,dateLib:l,locale:c,classNames:u}=(0,w.useMemo)(()=>{const e={...eF,...r.locale},o=r.broadcastCalendar?1:r.weekStartsOn,a=r.noonSafe&&r.timeZone?function(e,t={}){const{weekStartsOn:n,locale:r}=t,o=n??r?.options?.weekStartsOn??0,a=t=>{const n="number"==typeof t||"string"==typeof t?new Date(t):t;return new uF(n.getFullYear(),n.getMonth(),n.getDate(),12,0,0,e)},i=e=>{const t=a(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0)};return{today:()=>a(uF.tz(e)),newDate:(t,n,r)=>new uF(t,n,r,12,0,0,e),startOfDay:e=>a(e),startOfWeek:(e,t)=>{const n=a(e),r=t?.weekStartsOn??o,i=(n.getDay()-r+7)%7;return n.setDate(n.getDate()-i),n},startOfISOWeek:e=>{const t=a(e),n=(t.getDay()-1+7)%7;return t.setDate(t.getDate()-n),t},startOfMonth:e=>{const t=a(e);return t.setDate(1),t},startOfYear:e=>{const t=a(e);return t.setMonth(0,1),t},endOfWeek:(e,t)=>{const n=a(e),r=(((t?.weekStartsOn??o)+6)%7-n.getDay()+7)%7;return n.setDate(n.getDate()+r),n},endOfISOWeek:e=>{const t=a(e),n=(7-t.getDay())%7;return t.setDate(t.getDate()+n),t},endOfMonth:e=>{const t=a(e);return t.setMonth(t.getMonth()+1,0),t},endOfYear:e=>{const t=a(e);return t.setMonth(11,31),t},eachMonthOfInterval:t=>{const n=a(t.start),r=a(t.end),o=[],i=new uF(n.getFullYear(),n.getMonth(),1,12,0,0,e),s=12*r.getFullYear()+r.getMonth();for(;12*i.getFullYear()+i.getMonth()<=s;)o.push(new uF(i,e)),i.setMonth(i.getMonth()+1,1);return o},addDays:(e,t)=>{const n=a(e);return n.setDate(n.getDate()+t),n},addWeeks:(e,t)=>{const n=a(e);return n.setDate(n.getDate()+7*t),n},addMonths:(e,t)=>{const n=a(e);return n.setMonth(n.getMonth()+t),n},addYears:(e,t)=>{const n=a(e);return n.setFullYear(n.getFullYear()+t),n},eachYearOfInterval:t=>{const n=a(t.start),r=a(t.end),o=[],i=new uF(n.getFullYear(),0,1,12,0,0,e);for(;i.getFullYear()<=r.getFullYear();)o.push(new uF(i,e)),i.setFullYear(i.getFullYear()+1,0,1);return o},getWeek:(e,t)=>TB(i(e),{weekStartsOn:t?.weekStartsOn??o,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>CB(i(e)),differenceInCalendarDays:(e,t)=>IB(i(e),i(t)),differenceInCalendarMonths:(e,t)=>pF(i(e),i(t))}}(r.timeZone,{weekStartsOn:o,locale:e}):void 0,i=r.dateLib&&a?{...a,...r.dateLib}:r.dateLib??a,s=new EF({locale:e,weekStartsOn:o,firstWeekContainsDate:r.firstWeekContainsDate,useAdditionalWeekYearTokens:r.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:r.useAdditionalDayOfYearTokens,timeZone:r.timeZone,numerals:r.numerals},i);return{dateLib:s,components:(c=r.components,{...t,...c}),formatters:(l=r.formatters,l?.formatMonthCaption&&!l.formatCaption&&(l.formatCaption=l.formatMonthCaption),l?.formatYearCaption&&!l.formatYearDropdown&&(l.formatYearDropdown=l.formatYearCaption),{...n,...l}),labels:OY(r.labels,s.options),locale:e,classNames:{...cY(),...r.classNames}};var l,c},[r.locale,r.broadcastCalendar,r.weekStartsOn,r.firstWeekContainsDate,r.useAdditionalWeekYearTokens,r.useAdditionalDayOfYearTokens,r.timeZone,r.numerals,r.dateLib,r.noonSafe,r.components,r.formatters,r.labels,r.classNames]);r.today||(r={...r,today:l.today()});const{captionLayout:d,mode:f,navLayout:p,numberOfMonths:m=1,onDayBlur:h,onDayClick:g,onDayFocus:y,onDayKeyDown:b,onDayMouseEnter:v,onDayMouseLeave:x,onNextClick:N,onPrevClick:E,showWeekNumber:M,styles:_}=r,{formatCaption:I,formatDay:S,formatMonthDropdown:j,formatWeekNumber:k,formatWeekNumberHeader:D,formatWeekdayName:C,formatYearDropdown:A}=i,T=function(e,t){const[n,r]=function(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:l,endOfYear:c,newDate:u,today:d}=t,{fromYear:f,toYear:p,fromMonth:m,toMonth:h}=e;!n&&m&&(n=m),!n&&f&&(n=t.newDate(f,0,1)),!r&&h&&(r=h),!r&&p&&(r=u(p,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=i(n):f?n=u(f,0,1):!n&&g&&(n=o(l(e.today??d(),-100))),r?r=s(r):p?r=u(p,11,31):!r&&g&&(r=c(e.today??d())),[n?a(n):n,r?a(r):r]}(e,t),{startOfMonth:o,endOfMonth:a}=t,i=FY(e,n,r,t),[s,l]=VY(i,e.month?i:void 0);(0,w.useEffect)(()=>{const o=FY(e,n,r,t);l(o)},[e.timeZone]);const{months:c,weeks:u,days:d,previousMonth:f,nextMonth:p}=(0,w.useMemo)(()=>{const o=function(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let n=0;n<o;n++){const o=r.addMonths(e,n);if(t&&o>t)break;a.push(o)}return a}(s,r,{numberOfMonths:e.numberOfMonths},t),i=function(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:l}=n??{},{addDays:c,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:h,isAfter:g,startOfBroadcastWeek:y,startOfISOWeek:w,startOfWeek:b}=r,v=l?y(o,r):i?w(o):b(o),x=l?f(a):i?p(m(a)):h(m(a)),N=t&&(l?f(t):i?p(t):h(t)),E=u(N&&g(x,N)?N:x,v),M=d(a,o)+1,_=[];for(let e=0;e<=E;e++){const t=c(v,e);_.push(t)}const I=(l?35:42)*M;if(s&&_.length<I){const e=I-_.length;for(let t=0;t<e;t++){const e=c(_[_.length-1],1);_.push(e)}}return _}(o,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),l=function(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:l,getISOWeek:c,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((e,m)=>{const h=n.broadcastCalendar?d(m,r):n.ISOWeek?f(m):p(m),g=n.broadcastCalendar?a(m):n.ISOWeek?i(s(m)):l(s(m)),y=t.filter(e=>e>=h&&e<=g),w=n.broadcastCalendar?35:42;if(n.fixedWeeks&&y.length<w){const e=t.filter(e=>{const t=w-y.length;return e>g&&e<=o(g,t)});y.push(...e)}const b=y.reduce((e,t)=>{const o=n.ISOWeek?c(t):u(t),a=e.find(e=>e.weekNumber===o),i=new YY(t,m,r);return a?a.days.push(i):e.push(new ZY(o,[i])),e},[]),v=new QY(m,b);return e.push(v),e},[]);return n.reverseMonths?m.reverse():m}(o,i,{broadcastCalendar:e.broadcastCalendar,fixedWeeks:e.fixedWeeks,ISOWeek:e.ISOWeek,reverseMonths:e.reverseMonths},t),c=function(e){return e.reduce((e,t)=>e.concat(t.weeks.slice()),[].slice())}(l),u=function(e){const t=[];return e.reduce((e,n)=>{const r=n.weeks.reduce((e,t)=>e.concat(t.days.slice()),t.slice());return e.concat(r.slice())},t.slice())}(l),d=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=r,c=o?a??1:1,u=i(e);return t&&l(u,t)<=0?void 0:s(u,-c)}(s,n,e,t),f=function(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=r,c=o?a:1,u=i(e);return t&&l(t,e)<a?void 0:s(u,c)}(s,r,e,t);return{months:l,weeks:c,days:u,previousMonth:d,nextMonth:f}},[t,s.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:m,onMonthChange:h}=e,g=e=>{if(m)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),l(t),h?.(t)},y={months:c,weeks:u,days:d,navStart:n,navEnd:r,previousMonth:f,nextMonth:p,goToMonth:g,goToDay:e=>{(e=>u.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||g(e.date)}};return y}(r,l),{days:O,months:L,navStart:z,navEnd:P,previousMonth:R,nextMonth:U,goToMonth:B}=T,F=function(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:l,broadcastCalendar:c,today:u=o.today()}=t,{isSameDay:d,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:h,isAfter:g}=o,y=n&&p(n),w=r&&h(r),b={[IF.focused]:[],[IF.outside]:[],[IF.disabled]:[],[IF.hidden]:[],[IF.today]:[]},v={};for(const t of e){const{date:e,displayMonth:n}=t,r=Boolean(n&&!f(e,n)),p=Boolean(y&&m(e,y)),h=Boolean(w&&g(e,w)),x=Boolean(a&&zF(e,a,o)),N=Boolean(i&&zF(e,i,o))||p||h||!c&&!l&&r||c&&!1===l&&r,E=d(e,u);r&&b.outside.push(t),x&&b.disabled.push(t),N&&b.hidden.push(t),E&&b.today.push(t),s&&Object.keys(s).forEach(n=>{const r=s?.[n];r&&zF(e,r,o)&&(v[n]?v[n].push(t):v[n]=[t])})}return e=>{const t={[IF.focused]:!1,[IF.disabled]:!1,[IF.hidden]:!1,[IF.outside]:!1,[IF.today]:!1},n={};for(const n in b){const r=b[n];t[n]=r.some(t=>t===e)}for(const t in v)n[t]=v[t].some(t=>t===e);return{...t,...n}}}(O,r,z,P,l),{isSelected:Y,select:Z,selected:Q}=function(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=VY(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t;return{selected:s,select:(e,t,n)=>{let a=e;return!r&&s&&s&&l(e,s)&&(a=void 0),o||i(a),o?.(a,e,t,n),a},isSelected:e=>!!s&&l(s,e)}}(e,t),r=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=VY(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t,c=e=>s?.some(t=>l(t,e))??!1,{min:u,max:d}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(c(e)){if(s?.length===u)return;if(r&&1===s?.length)return;a=s?.filter(t=>!l(t,e))}else a=s?.length===d?[e]:[...a,e];return o||i(a),o?.(a,e,t,n),a},isSelected:c}}(e,t),o=qY(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}(r,l)??{},{blur:V,focused:W,isFocusTarget:G,moveFocus:H,setFocused:$}=$Y(r,T,F,Y??(()=>!1),l),{labelDayButton:X,labelGridcell:q,labelGrid:J,labelMonthDropdown:K,labelNav:ee,labelPrevious:te,labelNext:ne,labelWeekday:re,labelWeekNumber:oe,labelWeekNumberHeader:ae,labelYearDropdown:ie}=s,se=(0,w.useMemo)(()=>function(e,t,n,r){const o=r??e.today(),a=n?e.startOfBroadcastWeek(o,e):t?e.startOfISOWeek(o):e.startOfWeek(o),i=[];for(let t=0;t<7;t++){const n=e.addDays(a,t);i.push(n)}return i}(l,r.ISOWeek,r.broadcastCalendar,r.today),[l,r.ISOWeek,r.broadcastCalendar,r.today]),le=void 0!==f||void 0!==g,ce=(0,w.useCallback)(()=>{R&&(B(R),E?.(R))},[R,B,E]),ue=(0,w.useCallback)(()=>{U&&(B(U),N?.(U))},[B,U,N]),de=(0,w.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),$(e),t.disabled||(Z?.(e.date,t,n),g?.(e.date,t,n))},[Z,g,$]),fe=(0,w.useCallback)((e,t)=>n=>{$(e),y?.(e.date,t,n)},[y,$]),pe=(0,w.useCallback)((e,t)=>n=>{V(),h?.(e.date,t,n)},[V,h]),me=(0,w.useCallback)((e,t)=>n=>{const o={ArrowLeft:[n.shiftKey?"month":"day","rtl"===r.dir?"after":"before"],ArrowRight:[n.shiftKey?"month":"day","rtl"===r.dir?"before":"after"],ArrowDown:[n.shiftKey?"year":"week","after"],ArrowUp:[n.shiftKey?"year":"week","before"],PageUp:[n.shiftKey?"year":"month","before"],PageDown:[n.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[n.key]){n.preventDefault(),n.stopPropagation();const[e,t]=o[n.key];H(e,t)}b?.(e.date,t,n)},[H,b,r.dir]),he=(0,w.useCallback)((e,t)=>n=>{v?.(e.date,t,n)},[v]),ge=(0,w.useCallback)((e,t)=>n=>{x?.(e.date,t,n)},[x]),ye=(0,w.useCallback)(e=>t=>{const n=Number(t.target.value),r=l.setMonth(l.startOfMonth(e),n);B(r)},[l,B]),we=(0,w.useCallback)(e=>t=>{const n=Number(t.target.value),r=l.setYear(l.startOfMonth(e),n);B(r)},[l,B]),{className:be,style:ve}=(0,w.useMemo)(()=>({className:[u[_F.Root],r.className].filter(Boolean).join(" "),style:{..._?.[_F.Root],...r.style}}),[u,r.className,r.style,_]),xe=function(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([e,n])=>{e.startsWith("data-")&&(t[e]=n)}),t}(r),Ne=(0,w.useRef)(null);!function(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=(0,w.useRef)(null),s=(0,w.useRef)(r),l=(0,w.useRef)(!1);(0,w.useLayoutEffect)(()=>{const c=s.current;if(s.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==c.length&&r.length===c.length))return;const u=a.isSameMonth(r[0].date,c[0].date),d=a.isAfter(r[0].date,c[0].date),f=d?n[jF.caption_after_enter]:n[jF.caption_before_enter],p=d?n[jF.weeks_after_enter]:n[jF.weeks_before_enter],m=i.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(RY(h).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=PY(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=UY(e);n&&n.classList.remove(f);const r=BY(e);r&&r.classList.remove(p)}),i.current=h):i.current=null,l.current||u||o)return;const g=m instanceof HTMLElement?RY(m):[],y=RY(e.current);if(y?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){l.current=!0;const t=[];e.current.style.isolation="isolate";const r=(w=e.current,PY(w.querySelector("[data-animated-nav]")));r&&(r.style.zIndex="1"),y.forEach((o,a)=>{const i=g[a];if(!i)return;o.style.position="relative",o.style.overflow="hidden";const s=UY(o);s&&s.classList.add(f);const c=BY(o);c&&c.classList.add(p);const u=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),r&&(r.style.zIndex=""),s&&s.classList.remove(f),c&&c.classList.remove(p),o.style.position="",o.style.overflow="",o.contains(i)&&o.removeChild(i)};t.push(u),i.style.pointerEvents="none",i.style.position="absolute",i.style.overflow="hidden",i.setAttribute("aria-hidden","true");const m=(e=>PY(e.querySelector("[data-animated-weekdays]")))(i);m&&(m.style.opacity="0");const h=UY(i);h&&(h.classList.add(d?n[jF.caption_before_exit]:n[jF.caption_after_exit]),h.addEventListener("animationend",u));const y=BY(i);y&&y.classList.add(d?n[jF.weeks_before_exit]:n[jF.weeks_after_exit]),o.insertBefore(i,o.firstChild)})}var w})}(Ne,Boolean(r.animate),{classNames:u,months:L,focused:W,dateLib:l});const Ee={dayPickerProps:r,selected:Q,select:Z,isSelected:Y,months:L,nextMonth:U,previousMonth:R,goToMonth:B,getModifiers:F,components:a,classNames:u,styles:_,labels:s,formatters:i};return w.createElement(aB.Provider,{value:Ee},w.createElement(a.Root,{rootRef:r.animate?Ne:void 0,className:be,style:ve,dir:r.dir,id:r.id,lang:r.lang??c.code,nonce:r.nonce,title:r.title,role:r.role,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],...xe},w.createElement(a.Months,{className:u[_F.Months],style:_?.[_F.Months]},!r.hideNavigation&&!p&&w.createElement(a.Nav,{"data-animated-nav":r.animate?"true":void 0,className:u[_F.Nav],style:_?.[_F.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:ue,previousMonth:R,nextMonth:U}),L.map((e,t)=>w.createElement(a.Month,{"data-animated-month":r.animate?"true":void 0,className:u[_F.Month],style:_?.[_F.Month],key:t,displayIndex:t,calendarMonth:e},"around"===p&&!r.hideNavigation&&0===t&&w.createElement(a.PreviousMonthButton,{type:"button",className:u[_F.PreviousMonthButton],tabIndex:R?void 0:-1,"aria-disabled":!R||void 0,"aria-label":te(R),onClick:ce,"data-animated-button":r.animate?"true":void 0},w.createElement(a.Chevron,{disabled:!R||void 0,className:u[_F.Chevron],orientation:"rtl"===r.dir?"right":"left"})),w.createElement(a.MonthCaption,{"data-animated-caption":r.animate?"true":void 0,className:u[_F.MonthCaption],style:_?.[_F.MonthCaption],calendarMonth:e,displayIndex:t},d?.startsWith("dropdown")?w.createElement(a.DropdownNav,{className:u[_F.Dropdowns],style:_?.[_F.Dropdowns]},(()=>{const t="dropdown"===d||"dropdown-months"===d?w.createElement(a.MonthsDropdown,{key:"month",className:u[_F.MonthsDropdown],"aria-label":K(),classNames:u,components:a,disabled:Boolean(r.disableNavigation),onChange:ye(e.date),options:LY(e.date,z,P,i,l),style:_?.[_F.Dropdown],value:l.getMonth(e.date)}):w.createElement("span",{key:"month"},j(e.date,l)),n="dropdown"===d||"dropdown-years"===d?w.createElement(a.YearsDropdown,{key:"year",className:u[_F.YearsDropdown],"aria-label":ie(l.options),classNames:u,components:a,disabled:Boolean(r.disableNavigation),onChange:we(e.date),options:zY(z,P,i,l,Boolean(r.reverseYears)),style:_?.[_F.Dropdown],value:l.getYear(e.date)}):w.createElement("span",{key:"year"},A(e.date,l));return"year-first"===l.getMonthYearOrder()?[n,t]:[t,n]})(),w.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},I(e.date,l.options,l))):w.createElement(a.CaptionLabel,{className:u[_F.CaptionLabel],role:"status","aria-live":"polite"},I(e.date,l.options,l))),"around"===p&&!r.hideNavigation&&t===m-1&&w.createElement(a.NextMonthButton,{type:"button",className:u[_F.NextMonthButton],tabIndex:U?void 0:-1,"aria-disabled":!U||void 0,"aria-label":ne(U),onClick:ue,"data-animated-button":r.animate?"true":void 0},w.createElement(a.Chevron,{disabled:!U||void 0,className:u[_F.Chevron],orientation:"rtl"===r.dir?"left":"right"})),t===m-1&&"after"===p&&!r.hideNavigation&&w.createElement(a.Nav,{"data-animated-nav":r.animate?"true":void 0,className:u[_F.Nav],style:_?.[_F.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:ue,previousMonth:R,nextMonth:U}),w.createElement(a.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===f||"range"===f,"aria-label":J(e.date,l.options,l)||void 0,className:u[_F.MonthGrid],style:_?.[_F.MonthGrid]},!r.hideWeekdays&&w.createElement(a.Weekdays,{"data-animated-weekdays":r.animate?"true":void 0,className:u[_F.Weekdays],style:_?.[_F.Weekdays]},M&&w.createElement(a.WeekNumberHeader,{"aria-label":ae(l.options),className:u[_F.WeekNumberHeader],style:_?.[_F.WeekNumberHeader],scope:"col"},D()),se.map(e=>w.createElement(a.Weekday,{"aria-label":re(e,l.options,l),className:u[_F.Weekday],key:String(e),style:_?.[_F.Weekday],scope:"col"},C(e,l.options,l)))),w.createElement(a.Weeks,{"data-animated-weeks":r.animate?"true":void 0,className:u[_F.Weeks],style:_?.[_F.Weeks]},e.weeks.map(e=>w.createElement(a.Week,{className:u[_F.Week],key:e.weekNumber,style:_?.[_F.Week],week:e},M&&w.createElement(a.WeekNumber,{week:e,style:_?.[_F.WeekNumber],"aria-label":oe(e.weekNumber,{locale:c}),className:u[_F.WeekNumber],scope:"row",role:"rowheader"},k(e.weekNumber,l)),e.days.map(e=>{const{date:t}=e,n=F(e);if(n[IF.focused]=!n.hidden&&Boolean(W?.isEqualTo(e)),n[SF.selected]=Y?.(t)||n.selected,CF(Q)){const{from:e,to:r}=Q;n[SF.range_start]=Boolean(e&&r&&l.isSameDay(t,e)),n[SF.range_end]=Boolean(e&&r&&l.isSameDay(t,r)),n[SF.range_middle]=kF(Q,t,!0,l)}const o=function(e,t={},n={}){let r={...t?.[_F.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{r={...r,...n?.[e]}}),r}(n,_,r.modifiersStyles),i=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[r])=>(n[r]?e.push(n[r]):t[IF[r]]?e.push(t[IF[r]]):t[SF[r]]&&e.push(t[SF[r]]),e),[t[_F.Day]])}(n,u,r.modifiersClassNames),s=le||n.hidden?void 0:q(t,n,l.options,l);return w.createElement(a.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:n,className:i.join(" "),style:o,role:"gridcell","aria-selected":n.selected||void 0,"aria-label":s,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":n.selected||void 0,"data-disabled":n.disabled||void 0,"data-hidden":n.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":n.focused||void 0,"data-today":n.today||void 0},!n.hidden&&le?w.createElement(a.DayButton,{className:u[_F.DayButton],style:_?.[_F.DayButton],type:"button",day:e,modifiers:n,disabled:!n.focused&&n.disabled||void 0,"aria-disabled":n.focused&&n.disabled||void 0,tabIndex:G(e)?0:-1,"aria-label":X(t,n,l.options,l),onClick:de(e,n),onBlur:pe(e,n),onFocus:fe(e,n),onKeyDown:me(e,n),onMouseEnter:he(e,n),onMouseLeave:ge(e,n)},S(t,l.options,l)):!n.hidden&&S(e.date,l.options,l))})))))))),r.footer&&w.createElement(a.Footer,{className:u[_F.Footer],style:_?.[_F.Footer],role:"status","aria-live":"polite"},r.footer)))}function rZ(e,t,n){const r=NB(e,n?.in);return r.setMinutes(t),r}function oZ(e,t,n){const r=NB(e,n?.in);return r.setHours(t),r}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(WY||(WY={}));const aZ=()=>(0,R.jsx)("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"}),iZ=e=>JB(e,"E").slice(0,1),sZ=(e,t=24)=>Array.from({length:t},(t,n)=>e+n),lZ=(e,t)=>t?rZ(oZ(e,function(e,t){return NB(e,t?.in).getHours()}(t)),function(e,t){return NB(e,t?.in).getMinutes()}(t)):e,cZ=e=>"multiple"===e?[]:"range"===e?{from:void 0,to:void 0}:void 0,uZ=({width:e,className:t,classNames:n,selectedDates:r,setSelectedDates:o,showOutsideDays:a=!0,mode:i="single",variant:s="normal",alignment:l="horizontal",numberOfMonths:c,enableTimeSelection:u=!1,disabled:d,...f})=>{const p=w.isValidElement(f.footer)||"function"==typeof f.footer,m=u&&"multiple"!==i,[h,g]=(0,w.useState)(!1),[y,b]=(0,w.useState)(!1),[v,x]=(0,w.useState)((new Date).getFullYear()),[N,E]=(0,w.useState)(v-v%24);void 0===r&&(r="multiple"===i?[]:"range"===i?{from:void 0,to:void 0}:void 0);const M=({weekdays:e})=>(0,R.jsx)("div",{className:"flex justify-between",children:e.map((e,t)=>(0,R.jsx)("button",{className:"h-10 w-10 px-1.5 py-2 text-center text-text-secondary text-sm font-normal content-center bg-transparent border-none shrink-0",children:e},t))}),_=e=>(0,R.jsx)("div",{className:"flex flex-col bsf-force-ui-month-weeks",children:e.children[1].props.children.map((e,t)=>(0,R.jsx)("div",{className:"flex flex-row justify-between",children:e},t))}),I=(e,t,n)=>(0,R.jsxs)("div",{className:"flex flex-col items-start gap-1 flex-1",children:[(0,R.jsx)("span",{className:"text-xs font-medium text-text-secondary",children:n}),(0,R.jsx)("input",{type:"time",className:Le("w-full px-2 py-1 rounded text-sm font-normal text-text-primary bg-field-secondary-background outline outline-1 outline-border-subtle border-none transition-[color,box-shadow,outline] duration-200","focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",!t&&"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled"),value:t?JB(t,"HH:mm"):"",disabled:!t,onChange:t=>((e,t)=>{const{value:n}=e.target;if(!n)return;if("single"===t){if(!(r instanceof Date))return;const[e,t]=n.split(":").map(Number);return void o(rZ(oZ(r,e),t))}const a=r;if(!a?.[t])return;const[i,s]=n.split(":").map(Number),l=rZ(oZ(a[t],i),s),c={...a,[t]:l},u="from"===t?"to":"from";c.from&&c.to&&yF(c.from,c.to)&&(c[u]=lZ(c[u],l)),o(c)})(t,e),"aria-label":n})]}),S=m?(0,R.jsx)("div",{className:Le("flex items-end gap-3 p-2 bg-background-primary border-solid border-border-subtle","presets"===s?"border-l border-r border-t-0 border-b":"border border-t-0",!p&&("presets"===s?"rounded-br-md":"rounded-bl-md rounded-br-md")),children:"single"===i?I("single",r,"Time"):(0,R.jsxs)(R.Fragment,{children:[I("from",r?.from,"Start time"),I("to",r?.to,"End time")]})}):null,j=Le("relative bg-background-primary shadow-datepicker-wrapper",e,"vertical"===l?"flex flex-col":"flex flex-row gap-3","normal"===s?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"","presets"===s?"rounded-tr-md border border-solid border-border-subtle":"","dualdate"===s?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",p||m?"rounded-b-none":"rounded-bl-md rounded-br-md");return(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(nZ,{mode:i,selected:r,onSelect:(e,t)=>{if("range"===i){const n=r,a=e=>{return!!e&&(u?bF(t,e):(n=e,+NB(t)===+NB(n)));var n},i=(e,t)=>u?lZ(e,t):e;if(!n?.from&&!n?.to||n?.from&&n?.to)return a(n?.from)||a(n?.to)?void o({from:void 0,to:void 0}):void o({from:i(t,n?.from),to:void 0});if(n?.from&&!n?.to){if(u?wF(t,_B(n.from)):t<n.from)return void o({from:i(t,n.from),to:n.from});let e=i(t,n.to);return u&&wF(e,n.from)&&(e=lZ(e,n.from)),void o({from:n.from,to:e})}o(e)}else if("multiple"===i)r.some(e=>JB(e,"yyyy-MM-dd")===JB(t,"yyyy-MM-dd"))?o(r.filter(e=>JB(e,"yyyy-MM-dd")!==JB(t,"yyyy-MM-dd"))):o([...r,t]);else if("single"===i){if(u&&e instanceof Date&&r instanceof Date)return void o(lZ(e,r));o(e)}},hideNavigation:!0,captionLayout:"label",className:Le(t),formatters:{formatWeekdayName:iZ},classNames:{months:j,month:"flex flex-col p-2 gap-1 text-center w-full",caption:"relative flex justify-center items-center",table:"w-full border-separate border-spacing-0",head_row:"flex mb-1",head_cell:"text-muted-foreground rounded-md w-10 font-normal text-sm",row:"flex w-full mt-2",cell:"h-10 w-10 text-center text-sm p-0 relative",...n},numberOfMonths:c,showOutsideDays:!0,components:{MonthCaption:function(e){const{goToMonth:t,nextMonth:n,previousMonth:r}=iB(),o=JB(e.calendarMonth.date,"yyyy"),a=JB(e.calendarMonth.date,"MMMM"),i=new Date(e.calendarMonth.date);i.setDate(i.getDate()-i.getDay());const s=Array.from({length:7},(e,t)=>{const n=new Date(i);return n.setDate(i.getDate()+t),iZ(n)});let l;return l=y?`${N} - ${N+23}`:h?o:`${a} ${o}`,(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)("div",{className:"flex justify-between",children:[(0,R.jsx)(Wo,{variant:"ghost",onClick:()=>{if(y)E(N-24);else if(h){const n=new Date(v-1,e.calendarMonth.date.getMonth());x(n.getFullYear()),t(n)}else t(r)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Previous Button",icon:(0,R.jsx)(rB,{className:"h-4 w-4 text-button-tertiary-color"})}),(0,R.jsx)(Wo,{variant:"ghost",onClick:()=>{c>1||(h?(b(!0),g(!1)):y?b(!1):g(!h))},children:l}),(0,R.jsx)(Wo,{variant:"ghost",onClick:()=>{if(y)E(N+24);else if(h){const n=new Date(v+1,e.calendarMonth.date.getMonth());x(n.getFullYear()),t(n)}else t(n)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Next Button",icon:(0,R.jsx)(oB,{className:"h-4 w-4 text-button-tertiary-color"})})]}),y&&(0,R.jsx)("div",{className:"grid grid-cols-4 w-full",children:sZ(N).map(n=>(0,R.jsxs)(Wo,{variant:"ghost",onClick:()=>(n=>{x(n),b(!1),g(!0),t(new Date(n,e.calendarMonth.date.getMonth()))})(n),className:Le("h-10 w-full text-center font-normal relative",n===v&&n!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",n===(new Date).getFullYear()&&"font-semibold"),children:[n,n===(new Date).getFullYear()&&aZ()]},n))}),h&&!y&&(0,R.jsx)("div",{className:"grid grid-cols-4 gap-2 my-12",children:Array.from({length:12},(n,r)=>(0,R.jsxs)(Wo,{variant:"ghost",onClick:()=>{g(!1),t(new Date(v,r))},className:Le("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",r===e.calendarMonth.date.getMonth()&&r!==(new Date).getMonth()&&v===e.calendarMonth.date.getFullYear()&&e.calendarMonth.date.getFullYear()!==(new Date).getFullYear()&&"bg-background-brand text-text-on-color hover:bg-background-brand hover:text-black",r===(new Date).getMonth()&&(new Date).getFullYear()===v&&"font-semibold"),children:[JB(new Date(0,r),"MMM"),(new Date).getMonth()===r&&(new Date).getFullYear()===v&&aZ()]},r))}),!h&&!y&&(0,R.jsx)(M,{weekdays:s})]})},DayButton:({day:e,modifiers:t,...n})=>{const{selected:o,today:i,disabled:s,outside:l,range_middle:c,range_start:u,range_end:d}=t,f=u||d||c,p=new Date,m=r?.to,h=JB(e.displayMonth,"yyyy-MM")===JB(p,"yyyy-MM"),g=m&&JB(m,"yyyy-MM")===JB(e.date,"yyyy-MM"),y=function(e,t,n){return fF(e,-t,n)}(p,1),w=JB(e.date,"yyyy-MM")===JB(y,"yyyy-MM"),b=h||g||f,v=!a&&l,x=Le("h-10 w-10 flex items-center justify-center transition text-text-secondary relative text-sm","border-none rounded",!o&&!f||l?"bg-transparent hover:bg-button-tertiary-hover":"bg-background-brand text-text-on-color",c&&b&&!l?"bg-brand-background-50 text-text-secondary rounded-none":"",s?"opacity-50 cursor-not-allowed text-text-disabled":"cursor-pointer",l&&!f||!b&&l||l&&!w||l?"bg-transparent opacity-50 text-text-disabled cursor-auto":"");return(0,R.jsxs)("button",{className:Le(x,i&&"font-semibold",v&&"opacity-0",u&&"fui-range-start",d&&"fui-range-end",c&&"fui-range-middle",{"[&:is([data-hover=true])]:bg-brand-background-50 [&:is([data-hover=true])]:rounded-none":!f&&!o}),disabled:s||l,onClick:e=>{"function"==typeof n.onClick&&n.onClick(e)},onMouseEnter:e=>{"function"==typeof n.onMouseEnter&&n.onMouseEnter(e),e.currentTarget.setAttribute("data-hover","true")},onMouseLeave:e=>{"function"==typeof n.onMouseLeave&&n.onMouseLeave(e),e.currentTarget.setAttribute("data-hover","false")},"aria-label":JB(e.date,"EEEE, MMMM do, yyyy"),"data-selected":o,"data-day":JB(e.date,"yyyy-MM-dd"),children:[n.children,i&&b&&(0,R.jsx)("span",{className:"absolute h-1 w-1 bg-background-brand rounded-full bottom-1"})]})},Day:e=>{const t=Object.entries(e).reduce((e,[t,n])=>(t.startsWith("data-")&&(e[t]=n),e),{});return(0,R.jsx)("div",{...t,className:Le(e.className,"inline-flex"),children:e.children})},Weekdays:()=>(0,R.jsx)(R.Fragment,{}),Week:e=>(0,R.jsx)("div",{className:Le("bsf-force-ui-month-week flex flex-row",e.className),children:e.children}),Months:e=>(0,R.jsx)(R.Fragment,{children:(0,R.jsx)("div",{className:Le("bsf-force-ui-date-picker-month",j),children:e?.children?.map((e,t)=>e?(0,R.jsx)(w.Fragment,{children:e.map((e,t)=>(0,R.jsxs)(w.Fragment,{children:[t>0&&(0,R.jsx)("div",{className:"border border-solid border-border-subtle border-l-0"}),e]},t))},t):null)})}),MonthGrid:e=>h||y?(0,R.jsx)(R.Fragment,{}):(0,R.jsx)(_,{...e})},..."range"===i?{required:!1}:{},...f,footer:m?(0,R.jsxs)(R.Fragment,{children:[S,f.footer]}):f.footer,onDayMouseEnter:(e,t,n)=>{if("range"!==i)return;const o=r;if(o?.from&&o?.to||!o?.from&&!o?.to)return void Array.from(document.querySelectorAll("[data-hover]")).forEach(e=>{e.setAttribute("data-hover","false")});const a=n.target,l=new Date(a.dataset.day),c=wF(l,o.from),u=yF(l,o.to);let d;switch(s){case"dualdate":case"presets":d=a.closest(".bsf-force-ui-date-picker-month");break;default:d=a.closest(".bsf-force-ui-month-weeks")}const f=Array.from(d.querySelectorAll("button"));u&&f.sort((e,t)=>yF(new Date(e.dataset.day),new Date(t.dataset.day))?-1:1),c&&f.sort((e,t)=>wF(new Date(e.dataset.day),new Date(t.dataset.day))?1:-1);const p=f.indexOf(a),m=f.findIndex(e=>"true"===e.getAttribute("data-selected")),h=[],g=Math.min(p,m),y=Math.max(p,m);for(let e=g;e<=y;e++)f[e]?.disabled||h.push(f[e]);f.forEach(e=>{e.setAttribute("data-hover",h.includes(e)?"true":"false")})},disabled:d})})};function dZ(e){return _B(Date.now(),e)}function fZ(e){return xB(e,Date.now())}function pZ(e){const t=fZ(e?.in),n=t.getFullYear(),r=t.getMonth(),o=t.getDate(),a=fZ(e?.in);return a.setFullYear(n,r,o-1),a.setHours(0,0,0,0),a}function mZ(e,t,n){return dF(e,-t,n)}const hZ=({selectionType:e="single",variant:t="normal",presets:n=[],onCancel:r,onApply:o,onDateSelect:a,applyButtonText:i="Apply",cancelButtonText:s="Cancel",showOutsideDays:l=!0,isFooter:c=!0,enableTimeSelection:u=!1,selected:d,disabled:f,...p})=>{const[m,h]=(0,w.useState)(()=>{if(!d)return cZ(e);const t="multiple"===e&&Array.isArray(d),n="single"===e&&d instanceof Date;return t||"range"===e&&"from"in d&&"to"in d||n?d:cZ(e)}),g=e=>{h(e),a&&a(e)},y=[{label:"Today",range:{from:dZ(),to:dZ()}},{label:"Yesterday",range:{from:pZ(),to:pZ()}},{label:"This Week",range:{from:jB(new Date,{weekStartsOn:1}),to:hF(new Date,{weekStartsOn:1})}},{label:"Last 7 Days",range:{from:_B(mZ(new Date,6)),to:_B(new Date)}},{label:"This Month",range:{from:xF(new Date),to:gF(new Date)}},{label:"Last 30 Days",range:{from:_B(mZ(new Date,29)),to:_B(new Date)}}],b=n.length>0?n:y,v=()=>{h("multiple"===e?[]:{from:void 0,to:void 0}),r&&r()},x=()=>{o&&o(m)};return"normal"===t?(0,R.jsx)(uZ,{...p,mode:e,variant:t,width:"w-[18.5rem]",enableTimeSelection:u,selectedDates:m,showOutsideDays:l,setSelectedDates:g,footer:c&&(0,R.jsxs)("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[(0,R.jsx)(Wo,{variant:"outline",onClick:v,children:s}),(0,R.jsx)(Wo,{onClick:x,children:i})]}),disabled:f}):"dualdate"===t?(0,R.jsx)(uZ,{mode:e,numberOfMonths:2,alignment:"horizontal",enableTimeSelection:u,selectedDates:m,setSelectedDates:g,showOutsideDays:l,variant:t,width:"w-auto",footer:(0,R.jsxs)("div",{className:"flex bg-background-primary justify-end p-2 gap-3 border border-solid border-border-subtle border-t-0 rounded-md rounded-tl-none rounded-tr-none",children:[(0,R.jsx)(Wo,{variant:"outline",onClick:v,children:s}),(0,R.jsx)(Wo,{onClick:x,children:i})]}),disabled:f,...p}):"presets"===t?(0,R.jsxs)("div",{className:"flex flex-row shadow-datepicker-wrapper",children:[(0,R.jsx)("div",{className:"flex flex-col gap-1 p-3 items-start border border-solid border-border-subtle border-r-0 rounded-tl-md rounded-bl-md bg-background-primary",children:b.map((e,t)=>{const n=m&&"from"in m&&"to"in m&&m.from?.getTime()===e.range.from.getTime()&&m.to?.getTime()===e.range.to.getTime();return(0,R.jsx)(Wo,{onClick:()=>(e=>{h(e)})(e.range),variant:"ghost",className:Le("text-left font-medium text-sm text-nowrap w-full",n&&"bg-brand-background-50"),children:e.label},t)})}),(0,R.jsx)(uZ,{...p,mode:e,enableTimeSelection:u,selectedDates:m,setSelectedDates:g,variant:t,showOutsideDays:l,width:"w-auto",numberOfMonths:2,footer:(0,R.jsxs)("div",{className:"flex justify-end p-2 gap-3 border-l border-r border-t-0 border-b border-solid border-border-subtle bg-background-primary rounded-br-md",children:[(0,R.jsx)(Wo,{variant:"outline",onClick:v,children:s}),(0,R.jsx)(Wo,{onClick:x,children:i})]}),disabled:f})]}):void 0},gZ=Fo("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),yZ=e=>{if(!e)return null;if(e instanceof Date)return e;if("string"==typeof e&&/^\d{4}-\d{2}-\d{2}$/.test(e)){const[t,n,r]=e.split("-").map(Number);return new Date(t,n-1,r)}return new Date(e)},wZ=e=>e?e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"}):"mmm dd, yyyy",bZ=()=>{const e=new Date,t=new Date(e),n=new Date(e);n.setDate(n.getDate()-1);const r=new Date(e),o=r.getDay(),a=0===o?6:o-1;r.setDate(e.getDate()-a);const i=new Date(r);i.setDate(r.getDate()+6);const s=new Date(r);s.setDate(s.getDate()-7);const l=new Date(s);l.setDate(s.getDate()+6);const c=new Date(e.getFullYear(),e.getMonth(),1),u=new Date(e),d=new Date(e.getFullYear(),e.getMonth()-1,1),f=new Date(e.getFullYear(),e.getMonth(),0);return[{label:(0,z.__)("Today","cartflows"),range:{from:t,to:t}},{label:(0,z.__)("Yesterday","cartflows"),range:{from:n,to:n}},{label:(0,z.__)("This Week","cartflows"),range:{from:r,to:i}},{label:(0,z.__)("Last Week","cartflows"),range:{from:s,to:l}},{label:(0,z.__)("This Month","cartflows"),range:{from:c,to:u}},{label:(0,z.__)("Last Month","cartflows"),range:{from:d,to:f}}]},vZ=function(e){const{label:t,value:n,tooltip:r,desc:o,onChangeCB:i,sectionClass:s="",wrapperClass:l="",fieldParentWrapperClass:c="w-full",placeholder:u=(0,z.__)("Select Date Range","cartflows")}=e,[d,f]=(0,a.useState)(!1),p=(0,a.useRef)(null),m=(0,a.useRef)(null),[h,g]=(0,a.useState)({from:yZ(n?.startDate),to:yZ(n?.endDate)});return(0,a.useEffect)(()=>{g({from:yZ(n?.startDate),to:yZ(n?.endDate)})},[n?.startDate,n?.endDate]),(0,a.useEffect)(()=>{const e=e=>{m.current&&!m.current.contains(e.target)&&p.current&&!p.current.contains(e.target)&&f(!1)},t=e=>{"Escape"===e.key&&(f(!1),p.current?.focus())};return d&&(document.addEventListener("mousedown",e),document.addEventListener("keydown",t),m.current?.querySelector('button, [tabindex="0"]')?.focus()),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[d]),(0,a.createElement)("div",{className:`wcf-field wcf-date-field ${s}`},(0,a.createElement)("div",{className:`wcf-field__data flex items-center gap-2.5 ${l}`},t&&(0,a.createElement)("div",{className:"wcf-field__data--label text-sm font-medium"},(0,a.createElement)("label",null,t,r&&(0,a.createElement)(HZ,{text:r}))),(0,a.createElement)("div",{className:`wcf-field__data--content relative ${c}`},(0,a.createElement)(Wo,{ref:p,icon:(0,a.createElement)(gZ,{className:"h-4 w-4 text-text-secondary","aria-hidden":"true"}),iconPosition:"right",size:"sm",tag:"button",type:"button",variant:"outline",className:"justify-between whitespace-nowrap text-text-secondary font-normal min-w-[194px]","aria-haspopup":"dialog","aria-expanded":d,onClick:()=>f(e=>!e)},h?.from&&h?.to?`${wZ(h.from)} - ${wZ(h.to)}`:u),d&&(0,a.createElement)("div",{ref:m,role:"dialog","aria-label":(0,z.__)("Select date range","cartflows"),className:"absolute z-[9999] rounded-lg shadow-lg top-full right-0 mt-1 overflow-x-auto"},(0,a.createElement)(hZ,{key:"range",applyButtonText:(0,z.__)("Apply","cartflows"),cancelButtonText:(0,z.__)("Cancel","cartflows"),disabled:{after:new Date},onApply:e=>{g(e),f(!1),i&&i({startDate:e.from,endDate:e.to})},onCancel:()=>{f(!1)},presets:bZ(),selected:h,selectionType:"range",showOutsideDays:!0,variant:"presets"})))),o&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-regular"},Vh(o)))},xZ=e=>{if(!e||"string"!=typeof e)return null;const t=e.trim().match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[ T](\d{1,2}):(\d{2}))?$/);return t?new Date(Number(t[1]),Number(t[2])-1,Number(t[3]),t[4]?Number(t[4]):0,t[5]?Number(t[5]):0):null},NZ=e=>String(e).padStart(2,"0"),EZ=function(e){const{name:t,id:n,label:r,value:o,placeholder:i,tooltip:s,desc:l,displayAlign:c="vertical"}=e,[u,d]=(0,a.useState)(o||""),[f,p]=(0,a.useState)(!1),m=(0,a.useRef)(null),h=(0,a.useRef)(null);(0,a.useEffect)(()=>{d(o||"")},[o]),(0,a.useEffect)(()=>{if(!f)return;const e=e=>{m.current&&!m.current.contains(e.target)&&h.current&&!h.current.contains(e.target)&&p(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f]);const g="horizontal"===c?"flex items-center justify-between gap-2.5":"block w-full text-left",y="text-sm font-medium text-text-primary text-left"+("horizontal"===c?"":" mb-2");return(0,a.createElement)("div",{className:"wcf-field wcf-datetime-field text-left"},(0,a.createElement)("div",{className:`wcf-field__data ${g}`},r&&(0,a.createElement)("div",{className:`wcf-field__data--label ${y}`},(0,a.createElement)("label",{className:"whitespace-nowrap"},r,s&&(0,a.createElement)(HZ,{text:s}))),(0,a.createElement)("div",{className:"wcf-field__data--content relative "+(r&&"horizontal"===c?"w-1/2":"w-full")},(0,a.createElement)("input",{type:"hidden",name:t,className:e.class?e.class:"",value:u,readOnly:!0}),(0,a.createElement)(Wo,{ref:h,id:n,icon:(0,a.createElement)(gZ,{className:"h-4 w-4 text-text-secondary","aria-hidden":"true"}),iconPosition:"right",size:"md",tag:"button",type:"button",variant:"outline",className:"w-full justify-between text-text-primary font-normal",onClick:()=>p(e=>!e)},u?(e=>e instanceof Date&&!isNaN(e)?e.toLocaleString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"}):"")(xZ(u)):i||(0,z.__)("Select date & time","cartflows")),f&&(0,a.createElement)("div",{ref:m,className:"absolute z-[9999] rounded-lg shadow-lg top-full left-0 mt-1 overflow-x-auto"},(0,a.createElement)(hZ,{key:"single-datetime",selectionType:"single",enableTimeSelection:!0,variant:"normal",applyButtonText:(0,z.__)("Apply","cartflows"),cancelButtonText:(0,z.__)("Cancel","cartflows"),onApply:e=>{(e=>{d(e);const n=new CustomEvent("wcf:datetime:change",{bubbles:!0,detail:{e:{target:{value:e,name:t}},name:t,value:e}});document.dispatchEvent(n)})((e=>e instanceof Date&&!isNaN(e)?`${e.getFullYear()}-${NZ(e.getMonth()+1)}-${NZ(e.getDate())} ${NZ(e.getHours())}:${NZ(e.getMinutes())}`:"")(e instanceof Date?e:null)),p(!1)},onCancel:()=>p(!1),selected:xZ(u),showOutsideDays:!0})))),l&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Vh(l)))},MZ=Fo("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),_Z=Fo("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),IZ=function(e){var t,n;const{content:r,custom_class:o="",icon:i=""}=e,s=function(e){switch(e){case"info":return{icon:Yo,color:"text-text-secondary"};case"error":return{icon:MZ,color:"text-support-error"};case"success":return{icon:_Z,color:"text-support-success"};case"warning":return{icon:Qo,color:"text-support-warning"};default:return null}}(i),l=null!==(t=s?.icon)&&void 0!==t?t:null,c=null!==(n=s?.color)&&void 0!==n?n:"";return(0,a.createElement)("div",{className:`wcf-field wcf-doc-field ${o}`},r&&(0,a.createElement)("div",{className:"wcf-field__doc-content flex items-center gap-1 text-sm font-normal text-text-primary mt-2 text-left"},l&&(0,a.createElement)(l,{size:16,className:c}),Vh(r)))},SZ=function(e){const{label:t,desc:n,sectionClass:r,descClass:o,labelClass:i=""}=e,s=r&&""!==r?r:"text-left",l=""!==i?i:"block text-base font-medium text-text-primary mb-5",c=""!==o?o:"text-sm font-normal text-text-secondary mt-2";return(0,a.createElement)("div",{className:`wcf-field wcf-section-heading-field ${s}`},t&&(0,a.createElement)("div",{className:"wcf-field__data--label"},(0,a.createElement)("label",{className:l},t)),n&&(0,a.createElement)("div",{className:`wcf-field__desc ${c}`},Vh(n)))},jZ=function(e){const{notice:t="",feature:n="this",plan_required:r="pro"}=e;return""!==t?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-pro-notice"},(0,a.createElement)("p",{className:"wcf-pro-update-notice"},Vh(t)))):wcfCartflowsTypePlusPro()||"pro"===r?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-pro-notice"},(0,a.createElement)("p",{className:"wcf-pro-update-notice"},Vh((0,z.sprintf)( |
| 6 |
// translators: %1$s: anchor tag start, %2$s: anchor tag end, %3$s: feature name. |
| 7 |
// translators: %1$s: anchor tag start, %2$s: anchor tag end, %3$s: feature name. |
| 8 |
(0,z.__)("Please upgrade to the %1$s CartFlows Pro %2$s to use %3$s feature.","cartflows"),`<a href="${getUtmUrl("https://cartflows.com",{utm_campaign:"feature"})}" target="_blank">`,"</a>",n)))))):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-pro-notice"},(0,a.createElement)("p",{className:"wcf-pro-update-notice"},Vh((0,z.sprintf)( |
| 9 |
// translators: %1$s: anchor tag start, %2$s: anchor tag end, %3$s: feature name. |
| 10 |
// translators: %1$s: anchor tag start, %2$s: anchor tag end, %3$s: feature name. |
| 11 |
(0,z.__)("Please upgrade to the %1$s CartFlows Higher Plan %2$s to use %3$s feature.","cartflows"),`<a href="${getUtmUrl("https://cartflows.com",{utm_campaign:"feature"})}" target="_blank">`,"</a>",n))))))},kZ={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},DZ={input:{sm:"py-1.5 px-2 rounded",md:"p-2.5 rounded-md",lg:"p-3 rounded-md"},content:{sm:"p-1.5",md:"p-1.5",lg:"p-2"},title:{sm:"p-2 text-xs",md:"p-2 text-sm",lg:"p-2 text-sm"},item:{sm:"text-sm text-text-secondary rounded",md:"text-base text-text-secondary rounded-md",lg:"text-base text-text-secondary rounded-md"},icon:{sm:"p-1 text-sm [&>svg]:size-4 text-icon-secondary",md:"p-2 text-base [&>svg]:size-5 text-icon-secondary",lg:"p-2 text-base [&>svg]:size-5 text-icon-secondary"},dialog:{sm:"mt-1 rounded-md",md:"mt-1.5 rounded-lg",lg:"mt-1.5 rounded-lg"}},CZ={primary:"bg-field-primary-background outline outline-1 outline-field-border hover:outline-border-strong focus-within:outline-focus-border focus-within:hover:outline-focus-border",secondary:"bg-field-secondary-background outline outline-1 outline-field-border hover:outline-border-strong focus-within:outline-focus-border focus-within:hover:outline-focus-border",ghost:"bg-field-secondary-background outline outline-1 outline-transparent focus-within:outline-focus-border"},AZ={ghost:"cursor-not-allowed text-text-disabled placeholder:text-text-disabled",primary:"outline-border-disabled hover:outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled",secondary:"outline-border-disabled hover:outline-border-disabled cursor-not-allowed text-text-disabled placeholder:text-text-disabled"},TZ=(0,w.createContext)({}),OZ=()=>(0,w.useContext)(TZ),LZ=(0,w.forwardRef)(({className:e,size:t="sm",open:n=!1,setOpen:r,onOpenChange:o,loading:a=!1,clearAfterSelect:i=!0,closeAfterSelect:s=!0,variant:l="primary",filter:c=!0,...u},d)=>{const[f,p]=(0,w.useState)(""),[m,h]=(0,w.useState)(a??!1),[g,y]=(0,w.useState)(null),b=w.useRef([]),v=(0,w.useMemo)(()=>"function"==typeof r?r:o,[r,o]),{refs:x,floatingStyles:N,context:E}=bo({open:n,onOpenChange:v,placement:"bottom-start",whileElementsMounted:Un,middleware:[Hn(2),Xn({padding:10}),qn({apply({rects:e,elements:t,availableHeight:n}){t.floating.style.maxHeight=`${n}px`,t.floating.style.width=`${e.reference.width}px`,t.floating.style.fontFamily=window.getComputedStyle(t.reference).fontFamily}})]}),M=ko(E,{listRef:b,activeIndex:g,onNavigate:y,loop:!0,openOnArrowKeyDown:!1}),_=wo(E),{getReferenceProps:I,getFloatingProps:S,getItemProps:j}=Eo([_,M]);return(0,w.useEffect)(()=>{const e=Ue(),t=t=>{const n="Mac OS"===e?t.metaKey:t.ctrlKey;if("/"===t.key&&n&&(t.preventDefault(),x.reference&&x.reference.current)){const e=x.reference.current instanceof HTMLElement?x.reference.current.querySelector("input"):null;e&&e.focus()}};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[x.reference]),(0,w.useEffect)(()=>{n||y(null)},[n]),(0,R.jsx)(TZ.Provider,{value:{size:t,open:n,onOpenChange:v,refs:x,floatingStyles:N,context:E,getReferenceProps:I,getFloatingProps:S,getItemProps:j,activeIndex:g,setActiveIndex:y,listRef:b,searchTerm:f,setSearchTerm:p,isLoading:m,setIsLoading:h,clearAfterSelect:i,closeAfterSelect:s,variant:l,filter:c},children:(0,R.jsx)("div",{className:Le("searchbox-wrapper box-border relative w-full",e),...u,ref:d})})});LZ.displayName="SearchBox";const zZ=(0,w.forwardRef)(({className:e,type:t="text",placeholder:n="Search...",disabled:r=!1,onChange:o=()=>{},...a},i)=>{const{size:s,refs:l,getReferenceProps:c,searchTerm:u,setSearchTerm:d,open:f,setActiveIndex:p,listRef:m,onOpenChange:h,variant:g}=OZ(),y="lg"===s?"sm":"xs";return(0,R.jsxs)("div",{ref:l.setReference,className:Le("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-all ease-in-out duration-200",CZ[g],DZ.input[s],r?AZ[g]:"focus-within:ring-2 focus-within:ring-focus focus-within:ring-offset-2 focus-within:border-focus-border focus-within:hover:border-focus-border",e),...c(),children:[(0,R.jsx)("span",{className:Le(kZ[s],r?"text-icon-disabled":"text-icon-secondary group-hover:text-icon-primary group-focus-within:text-icon-primary","flex justify-center items-center"),children:(0,R.jsx)(dL,{})}),(0,R.jsx)("input",{type:t,ref:i,className:Le(kZ[s],"flex-grow font-medium bg-transparent border-none outline-none border-transparent focus:ring-0 p-0 min-h-fit",r&&"text-field-placeholder focus-within:text-field-input group-hover:text-field-input placeholder:text-field-placeholder"),disabled:r,value:u,onChange:e=>{const t=e.target.value;d(t),o(t),"function"==typeof h&&(t.trim()?h(!0):h(!1))},onFocus:()=>{r||"function"!=typeof h||u?.trim()&&h(!0)},onKeyDown:e=>{if(!r){if("ArrowDown"===e.key||"ArrowUp"===e.key)return void(f&&(e.preventDefault(),"ArrowDown"===e.key?p(e=>null===e?0:e):"ArrowUp"===e.key&&p(e=>{const t=m?.current?.length||0;return null===e&&t>0?t-1:e})));"Escape"===e.key&&h(!1)}},placeholder:n,...Ye(a,["size","open","onOpenChange","loading"])}),(0,R.jsx)(na,{label:"Mac OS"===Ue()?"⌘/":"Ctrl /",size:y,type:"rounded",variant:"neutral",className:"bg-background-primary"})]})});zZ.displayName="SearchBox.Input";const PZ=({className:e,children:t,...n})=>{const{size:r,open:o,refs:a,floatingStyles:i,getFloatingProps:s,context:l}=OZ();return o?(0,R.jsx)(so,{context:l,initialFocus:-1,returnFocus:!0,children:(0,R.jsx)("div",{ref:a.setFloating,style:{...i},className:Le("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap focus:outline-none",DZ.dialog[r],e),...s(),...n,children:t})}):null};PZ.displayName="SearchBox.Content";const RZ=({children:e,id:t,root:n})=>(0,R.jsx)(Kr,{id:t,root:n,children:e});RZ.displayName="SearchBox.Portal";const UZ=({children:e,className:t})=>{const{searchTerm:n,isLoading:r,listRef:o,filter:a=!0}=OZ();if(!a)return(0,R.jsx)(yr,{elementsRef:o,children:(0,R.jsx)("div",{className:t,children:e})});const i=w.Children.toArray(e).map(e=>{if(w.isValidElement(e)&&e.type===FZ){const t=w.Children.toArray(e.props.children).filter(e=>w.isValidElement(e)&&"string"==typeof e.props.children&&e.props.children.toLowerCase().includes(n.toLowerCase()));return t.length>0?(0,w.cloneElement)(e,{children:t}):null}return e}).filter(Boolean);return r?(0,R.jsx)(ZZ,{}):(0,R.jsx)(yr,{elementsRef:o,children:(0,R.jsx)("div",{className:t,children:i.some(e=>w.isValidElement(e)&&e.type!==QZ)?i:(0,R.jsx)(BZ,{})})})};UZ.displayName="SearchBox.List";const BZ=({children:e="No results found.",className:t})=>{const{size:n}=OZ();return(0,R.jsx)("div",{className:Le("flex justify-center items-center",DZ.item[n],"text-text-tertiary p-4",t),children:e})};BZ.displayName="SearchBox.Empty";const FZ=({heading:e,children:t})=>{const{size:n}=OZ();return(0,R.jsxs)("div",{className:Le(DZ.content[n],DZ.item[n]),children:[e&&(0,R.jsx)("div",{className:Le(DZ.title[n],"text-text-tertiary"),children:e}),t]})};FZ.displayName="SearchBox.Group";const YZ=(0,w.forwardRef)(({className:e,icon:t,children:n,onClick:r,...o},a)=>{const{size:i,setSearchTerm:s,clearAfterSelect:l,getItemProps:c,activeIndex:u,onOpenChange:d,closeAfterSelect:f}=OZ(),{ref:p,index:m}=function(e){void 0===e&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:a,labelsRef:i}=w.useContext(gr),[s,l]=w.useState(null),c=w.useRef(null),u=w.useCallback(e=>{if(c.current=e,null!==s&&(a.current[s]=e,i)){var n;const r=void 0!==t;i.current[s]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}},[s,a,i,t]);return mr(()=>{const e=c.current;if(e)return n(e),()=>{r(e)}},[n,r]),mr(()=>{const e=c.current?o.get(c.current):null;null!=e&&l(e)},[o]),w.useMemo(()=>({ref:u,index:null==s?-1:s}),[s,u])}(),h=u===m;return(0,R.jsxs)("button",{type:"button",ref:e=>{"function"==typeof a?a(e):a&&(a.current=e),p(e)},className:Le("flex w-full items-center justify-start gap-1 p-1 cursor-pointer border-none bg-transparent text-left focus:outline-none",h&&"bg-background-secondary",!h&&"hover:bg-background-secondary focus:bg-background-secondary",DZ.item[i],e),...c?.({role:"option","aria-selected":h,onClick:()=>{"function"==typeof r&&r(),l&&s(""),f&&d(!1)},...o}),children:[t&&(0,R.jsx)("span",{className:Le(DZ.icon[i],"flex items-center justify-center"),children:t}),(0,R.jsx)("span",{className:Le("flex-grow py-0.5 px-1 font-normal",DZ.item[i]),children:n})]})});YZ.displayName="SearchBox.Item";const ZZ=({loadingIcon:e=(0,R.jsx)(vL,{})})=>{const{size:t}=OZ(),n=w.isValidElement(e)?(0,w.cloneElement)(e,{size:t}):e;return(0,R.jsx)("div",{className:Le("flex justify-center p-4",kZ[t],DZ.item[t]),children:n})};ZZ.displayName="SearchBox.Loading";const QZ=(0,w.forwardRef)(({className:e,...t},n)=>(0,R.jsx)("hr",{ref:n,className:Le("border-0 border-t border-border-subtle border-solid m-0",e),...t}));QZ.displayName="SearchBox.Separator",LZ.Input=zZ,LZ.Loading=ZZ,LZ.Separator=QZ,LZ.Content=PZ,LZ.List=UZ,LZ.Empty=BZ,LZ.Group=FZ,LZ.Item=YZ,LZ.Portal=RZ;const VZ=function(e){const{label:t,name:n,desc:r,value:o,allowed_products:i=[],include_products:s=[],excluded_products:l=[],excluded_product_ids:c=[],tooltip:u,placeholder:d,onChangeCB:f,nameComp:p,attr:m,isMulti:h=!1,showLabelOnly:g=!1,sectionClass:y="",wrapperClass:w="",labelClass:b="",descClass:v=""}=e,x=e=>h?e:Array.isArray(e)?e[0]||null:e,[E,M]=(0,a.useState)(x(o)),[_,I]=(0,a.useState)([]),[S,j]=(0,a.useState)(!1),[k,D]=(0,a.useState)(!1),[C,A]=(0,a.useState)(!1),T=(0,a.useRef)(null),O=(0,a.useRef)("");(0,a.useEffect)(()=>{M(x(o))},[o]);const P=Array.isArray(c)&&c.length>0,R=async(e,t)=>{const n=new window.FormData;return n.append("allowed_products",i),n.append("include_products",s),n.append("exclude_products",l),n.append("action","cartflows_json_search_products"),n.append("security",cartflows_admin.json_search_products_nonce),n.append("term",e),t&&P&&n.append("exclude_product_ids",c.join(",")),await L()({url:cartflows_admin.ajax_url,method:"POST",body:n})||[]},U=e=>e?.label?g||!e.value?e.label:`${e.label} (#${e.value})`:"";return(0,a.createElement)("div",{className:`wcf-select2-field wcf-product-field ${y}`},(0,a.createElement)("div",{className:`wcf-selection-field ${w}`},t&&(0,a.createElement)("label",{className:`block text-sm font-medium text-left mb-2 ${b}`},t,u&&(0,a.createElement)(HZ,{text:u})),h?(E||[]).map(e=>(0,a.createElement)("input",{key:e.value,type:"hidden",name:`${n}[]`,value:e.value})):(0,a.createElement)("input",{type:"hidden",name:p?n:`${n}[]`,value:E?.value||""}),h&&(E||[]).length>0&&(0,a.createElement)("div",{className:"mb-2 flex flex-wrap gap-1.5"},(E||[]).map(t=>(0,a.createElement)(na,{key:t.value,label:U(t),size:"sm",type:"pill",variant:"neutral",closable:!0,onClose:()=>(t=>{const n=(E||[]).filter(e=>e.value!==t.value);M(n);const r=new CustomEvent("wcf:product:change",{bubbles:!0,detail:{e:{},name:e.name,value:n}});document.dispatchEvent(r),f&&f(n)})(t)}))),!h&&E?.label&&(0,a.createElement)("div",{className:"mb-2 flex"},(0,a.createElement)(na,{label:U(E),size:"sm",type:"pill",variant:"neutral",closable:!0,onClose:()=>{M(null);const t=new CustomEvent("wcf:product:change",{bubbles:!0,detail:{e:{},name:e.name,value:null}});document.dispatchEvent(t),f&&f(null)}})),(0,a.createElement)(LZ,(0,N.A)({open:S,setOpen:e=>{e&&O.current.length<3||j(e)},filter:!1,size:"md",variant:"secondary",clearAfterSelect:!0,closeAfterSelect:!0},m),(0,a.createElement)(LZ.Input,{ref:T,placeholder:d||(0,z.__)("Search for a Product","cartflows"),onChange:async e=>{if(O.current=e,e.length>=3){D(!0);const t=await R(e,!0);if(O.current!==e)return;if(I(t),0===t.length&&P){const t=await R(e,!1);if(O.current!==e)return;A(t.length>0)}else A(!1);D(!1)}else I([]),A(!1),D(!1)},className:"[&>span:last-of-type]:hidden [&>span:first-of-type>svg]:size-4 !w-auto"}),(0,a.createElement)(LZ.Portal,null,(0,a.createElement)(LZ.Content,null,(0,a.createElement)(LZ.List,null,k&&(0,a.createElement)(LZ.Loading,null),!k&&_.length>0&&(0,a.createElement)(LZ.Group,null,_.map(t=>(0,a.createElement)(LZ.Item,{key:t.value,onClick:()=>(t=>{const n=h?[...E||[],t]:t;M(n);const r=new CustomEvent("wcf:product:change",{bubbles:!0,detail:{e:{},name:e.name,value:n}});document.dispatchEvent(r),f&&f(n)})(t)},(0,a.createElement)("div",{className:"wcf-select-option--row flex w-full items-center justify-between cursor-pointer"},(0,a.createElement)("div",{className:"wcf-select-option--row-option flex items-center gap-3"},(0,a.createElement)("span",null,t?.label||""," ",t.value?"(#"+t?.value+")":""),t?.type_label&&(0,a.createElement)("span",{className:"wcf-badge wcf-badge--neutral text-xs leading-[0.5rem] capitalize !py-1.5 !px-2 cursor-pointer"},t.type_label),t?.stock_status&&(0,a.createElement)("span",{className:`wcf-badge ${t.in_stock?"wcf-badge--success":"wcf-badge--error"} text-xs leading-[0.5rem] capitalize !py-1.5 !px-2 cursor-pointer`},t?.stock_status||"")),t.price_range&&(0,a.createElement)("div",null,(0,a.createElement)("span",{className:"text-xs leading-3 font-normal cursor-pointer"},t?.price_range)))))),!k&&0===_.length&&S&&(0,a.createElement)(LZ.Empty,null,C?(0,z.__)("All matching products are already added.","cartflows"):(0,z.__)("No products found.","cartflows"))))))),r&&(0,a.createElement)("div",{className:`wcf-field-desc text-sm font-normal text-text-tertiary mt-3 ${v}`},Vh(r)))},WZ=function(e){const{label:t,name:n,desc:r,value:o,tooltip:i,placeholder:s,onChangeCB:l,nameComp:c,isMulti:u=!1,sectionClass:d="",wrapperClass:f="",descClass:p="",fieldClass:m="",size:h="md",attr:g}=e,y=e=>!u&&Array.isArray(e)?e[0]||null:e,[w,b]=(0,a.useState)(()=>y(o)),[v,x]=(0,a.useState)([]),[E,M]=(0,a.useState)(!1),[_,I]=(0,a.useState)(!1),S=(0,a.useRef)(null),j=(0,a.useRef)("");return(0,a.useEffect)(()=>{b(y(o))},[o]),(0,a.createElement)("div",{className:`wcf-select2-field wcf-coupon-field ${d}`},(0,a.createElement)("div",{className:`wcf-coupon-field-wrapper ${f}`},t&&(0,a.createElement)("label",{className:"block text-sm font-medium text-left mb-2",htmlFor:`${n}-search`},t,i&&(0,a.createElement)(HZ,{text:i})),u?(w||[]).map(e=>(0,a.createElement)("input",{key:e.value,type:"hidden",name:`${n}[]`,value:e.value})):(0,a.createElement)("input",{type:"hidden",name:c?n:`${n}[]`,value:w?.value||""}),(0,a.createElement)(LZ,(0,N.A)({open:E,setOpen:e=>{e&&j.current.length<3||M(e)},filter:!1,size:h,variant:"secondary",clearAfterSelect:!0,closeAfterSelect:!0},g),(0,a.createElement)(LZ.Input,{id:`${n}-search`,ref:S,placeholder:s||(0,z.__)("Search for a coupon","cartflows"),onChange:async e=>{if(j.current=e,e.length>=3){I(!0);const t=new window.FormData;t.append("action","cartflows_json_search_coupons"),t.append("security",cartflows_admin.json_search_coupons_nonce),t.append("term",e);const n=await L()({url:cartflows_admin.ajax_url,method:"POST",body:t});x(n||[]),I(!1)}else x([]),I(!1)},className:`[&>span:last-of-type]:hidden [&>span:last-of-type]:absolute [&>span:first-of-type>svg]:size-4 !w-auto ${m}`}),(0,a.createElement)(LZ.Portal,null,(0,a.createElement)(LZ.Content,null,(0,a.createElement)(LZ.List,null,_&&(0,a.createElement)(LZ.Loading,null),!_&&v.length>0&&(0,a.createElement)(LZ.Group,null,v.map(t=>(0,a.createElement)(LZ.Item,{key:t.value,onClick:()=>(t=>{const n=u?[...w||[],t]:t;b(n);const r=new CustomEvent("wcf:coupon:change",{bubbles:!0,detail:{e:{},name:e.name,value:n}});document.dispatchEvent(r),l&&l(n)})(t)},(0,a.createElement)("span",null,t?.label||"")))),!_&&0===v.length&&E&&(0,a.createElement)(LZ.Empty,null,(0,z.__)("No coupons found.","cartflows")))))),u&&(w||[]).length>0&&(0,a.createElement)("div",{className:"mt-2 flex flex-wrap gap-1.5"},(w||[]).map(t=>(0,a.createElement)(na,{key:t.value,label:t.label,size:"sm",type:"pill",variant:"neutral",closable:!0,onClose:()=>(t=>{const n=(w||[]).filter(e=>e.value!==t.value);b(n);const r=new CustomEvent("wcf:coupon:change",{bubbles:!0,detail:{e:{},name:e.name,value:n}});document.dispatchEvent(r),l&&l(n)})(t)}))),!u&&w?.label&&(0,a.createElement)("div",{className:"mt-2 flex"},(0,a.createElement)(na,{label:w.label,size:"sm",type:"pill",variant:"neutral",closable:!0,onClose:()=>{b(null);const t=new CustomEvent("wcf:coupon:change",{bubbles:!0,detail:{e:{},name:e.name,value:null}});document.dispatchEvent(t),l&&l(null)}}))),r&&(0,a.createElement)("div",{className:`wcf-field-desc flex items-start gap-1 text-sm font-normal text-text-tertiary mt-3 text-left ${p}`},(0,a.createElement)(Yo,{className:"w-4 h-4 shrink-0 mt-px"}),(0,a.createElement)("span",null,Vh(r))))},GZ=Fo("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),HZ=function(e){const{text:t,position:n="default",classes:r="text-text-tertiary",icon:o="",portalId:i="wcf-settings-app",triggers:s=["hover","focus"],arrow:l=!0,interactive:c=!1}=e,u="default"===n?"bottom":n,d=("string"==typeof t?t.replace(/<[^>]+>/g,"").trim():"")||(0,z.__)("More information","cartflows");return(0,a.createElement)(ea,{content:"string"==typeof t?Vh(t):t,placement:u,arrow:l,interactive:c,tooltipPortalId:i,triggers:s,className:"z-[999999]"},(0,a.createElement)("span",{tabIndex:0,"aria-label":d,className:vp()(r,"wcf-tooltip-icon inline-flex cursor-pointer ml-1")},""===o?(0,a.createElement)(GZ,{className:"w-3.5 h-3.5 stroke-2"}):o))},$Z=function(e){const{subClass:t="",label:n,desc:r}=e;return(0,a.createElement)("div",{className:"wcf-field wcf-sub-heading-field"},n&&(0,a.createElement)("div",{className:`wcf-field__data--label ${t}`},(0,a.createElement)("label",null,n)),r&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-regular"},Vh(r)))},XZ=function(e){const{name:t,id:n,label:r,value:o,placeholder:i,tooltip:s,desc:l,type:c,min:u,max:d,readonly:f,icon:p,onChangeCB:m,iconOnClick:h,afterClickIcon:g,attr:y}=e,[w,b]=(0,a.useState)(o),[v,x]=(0,a.useState)(c||"password"),[E,M]=(0,a.useState)(p||"");return(0,a.useEffect)(()=>{b(o),x(c),M(p)},[o]),(0,a.createElement)("div",{className:"wcf-field wcf-password-field text-left"},(0,a.createElement)("div",{className:"wcf-field__data flex items-center justify-between gap-2.5"},r&&(0,a.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-text-primary text-left"},(0,a.createElement)("label",{className:"whitespace-nowrap",htmlFor:n||t},r,s&&(0,a.createElement)(HZ,{text:s}))),(0,a.createElement)("div",{className:"wcf-field__data--content w-1/2"},(0,a.createElement)(Ym,(0,N.A)({type:v,name:t,value:w,id:n||t,onChange:function(n){b(n);const r=new CustomEvent("wcf:password:change",{bubbles:!0,detail:{e:{target:{value:n,name:t}},name:e.name,value:n}});document.dispatchEvent(r),m&&m(n)},placeholder:i,min:u,max:d,readOnly:f,size:"md",className:`${e.class?e.class:""} w-full`,suffix:E?(0,a.createElement)("span",{className:`${E} pointer-events-auto cursor-pointer`,onClick:function(){h&&"show_field_value"===h&&("text"===v?(x("password"),M(p)):(x("text"),M(g)))},role:"button",tabIndex:0}):null},y)))),l&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Vh(l)))},qZ=function(){return(0,a.createElement)("div",{className:"wcf-field wcf-separator-field border-x-0 border-t-0 border-b border-solid border-border-subtle"})},JZ=function(e){const t=e.data;let n=e.value;const r=e.displayAs?e.displayAs:"tr";let o="";switch(""===n&&(n=t.value),t.type){case"text":o=(0,a.createElement)(CL,{id:t.name,sectionClass:t?.sectionClass,wrapperClass:t?.wrapperClass,labelClass:t?.labelClass,descClass:t?.descClass,class:t?.class,name:t.name,value:t.value?t.value:n,label:t.label,placeholder:t.placeholder,readonly:t.readonly,desc:t.desc,tooltip:t.tooltip,displayAlign:t.display_align,size:e.fieldSize});break;case"datetime":o=(0,a.createElement)(EZ,{id:t.name,name:t.name,value:t.value?t.value:n,label:t.label,placeholder:t.placeholder,desc:t.desc,tooltip:t.tooltip,displayAlign:t.display_align,class:t?.class});break;case"number":o=(0,a.createElement)(nB,{type:t.type,id:t.name,class:t?.class,name:t.name,value:n,label:t.label,placeholder:t.placeholder,readonly:t.readonly,min:t.min,max:t.max,desc:t.desc,tooltip:t.tooltip,afterfield:t.afterfield,width:t.width,sectionClass:t?.sectionClass,wrapperClass:t?.wrapperClass,labelClass:t?.labelClass,descClass:t?.descClass,displayAlign:t?.display_align,size:e.fieldSize});break;case"checkbox":o=(0,a.createElement)(XO,{id:t.name,name:t.name,className:t?.class,value:n,label:t.label,desc:t.desc,notice:t.notice,backComp:t.backComp,tooltip:t.tooltip,child_className:t.child_class,isDisabled:t.isDisabled,displayAlign:t.display_align,isPro:t.is_pro});break;case"toggle":o=(0,a.createElement)(nQ,{id:t.name,name:t.name,className:t.class,value:n,label:t.label,desc:t.desc,notice:t.notice,backComp:t.backComp,tooltip:t.tooltip,child_className:t.child_class,displayAlign:t.display_align,fullWidth:t.is_fullwidth,isDisabled:t?.is_disabled});break;case"radio":o=(0,a.createElement)(cL,{id:t.name,name:t.name,value:void 0===n?"":n,label:t.label,options:t.options,desc:t.desc,tooltip:t.tooltip,child_className:t.child_class});break;case"textarea":o=(0,a.createElement)(OL,{id:t.name,name:t.name,className:t?.class,value:n,label:t.label,desc:t.desc,tooltip:t.tooltip,rows:t.rows,cols:t.cols,displayAlign:t.display_align,size:e.fieldSize});break;case"code":o=(0,a.createElement)(LL,{id:t.name,name:t.name,value:n,label:t.label,tooltip:t.tooltip,displayAlign:t.display_align,language:t.language});break;case"select":o=(0,a.createElement)(DL,{id:t.name,name:t.name,class:t.class,value:n,label:t.label,options:t.options,desc:t.desc,tooltip:t.tooltip,prodata:t?.pro_options,sectionClass:t?.sectionClass,wrapperClass:t?.wrapperClass,contentClass:t?.contentClass,labelClass:t?.labelClass,descClass:t?.descClass,displayAlign:t?.display_align,isDisabled:t.isDisabled,size:e.fieldSize});break;case"select_card":o=(0,a.createElement)(rQ,{id:t.name,name:t.name,value:n,label:t.label,options:t.options,desc:t.desc,tooltip:t.tooltip,prodata:t?.pro_options,layout:t?.layout,showRadio:t?.display_radio});break;case"select2":o=(0,a.createElement)(EU,{id:t.name,name:t.name,value:n,label:t.label,placeholder:t.placeholder,desc:t.desc,tooltip:t.tooltip,options:t.options,isMulti:t.isMulti,displayAlign:t.display_align,isSearchable:t?.enable_search});break;case"product":o=(0,a.createElement)("div",null,(0,a.createElement)(VZ,{name:t.name,label:t.label,desc:t.desc,field:t.fieldtype,allowed_products:t.allowed_product_types?t.allowed_product_types:"",include_products:t.include_product_types?t.include_product_types:"",excluded_products:t.excluded_product_types?t.excluded_product_types:"",placeholder:t.placeholder,tooltip:t.tooltip,value:n,nameComp:t.nameComp,sectionClass:t?.sectionClass,wrapperClass:t?.wrapperClass,labelClass:t?.labelClass,descClass:t?.descClass}));break;case"coupon":o=(0,a.createElement)("div",null,(0,a.createElement)(WZ,{name:t.name,label:t.label,desc:t.desc,field:t.fieldtype,placeholder:t.placeholder,tooltip:t.tooltip,value:n,nameComp:t.nameComp}));break;case"product-repeater":o=(0,a.createElement)(WU,{id:t.name,name:t.name,value:n,label:t.label,products:t.products});break;case"font-family":o=(0,a.createElement)(qU,{id:t.name,name:t.name,value:n,label:t.label,desc:t.desc,tooltip:t.tooltip,font_weight_name:t.font_weight_name,font_weight_value:t.font_weight_value,displayAlign:t.display_align});break;case"separator":o=(0,a.createElement)(qZ,null);break;case"sub-heading":o=(0,a.createElement)($Z,{subclassName:t.subClass,label:t.label,desc:t.desc});break;case"color-picker":o=(0,a.createElement)($U,{id:t.name,name:t.name,label:t.label,value:n,default:t.default,desc:t.desc,tooltip:t.tooltip,displayAlign:t.display_align,withBg:t.withBg,size:e.fieldSize});break;case"password":o=(0,a.createElement)(XZ,{type:t.type,id:t.name,name:t.name,value:t.value?t.value:n,label:t.label,placeholder:t.placeholder,readonly:t.readonly,desc:t.desc,tooltip:t.tooltip,class:t.class,icon:t.icon,iconOnClick:t.iconclick,afterClickIcon:t.afterIcon});break;case"image-selector":const r=t?.objName?t?.objName:"product_img_obj",i=e?.options&&e?.options[r]?e?.options[r]:t?.value;o=(0,a.createElement)(tB,{id:t.name,name:t.name,label:t.label,value:n,desc:t.desc,tooltip:t.tooltip,isNameArray:t.isNameArray,objName:r,objValue:i,singleButton:t?.singleButton,sectionClass:t?.sectionClass,wrapperClass:t?.wrapperClass,labelClass:t?.labelClass,descClass:t?.descClass,displayAlign:t?.display_align});break;case"doc":o=(0,a.createElement)(IZ,{content:t?.content,icon:t?.icon||""});break;case"pro-notice":o=(0,a.createElement)("p",{className:"wcf-pro-update-notice"},(0,z.sprintf)(/* translators: %s is replaced with feature name */ /* translators: %s is replaced with feature name */ |
| 12 |
(0,z.__)("Please upgrade to the CartFlows Higher Plan to use the %s feature.","cartflows"),t.feature));break;case"heading":o=(0,a.createElement)(SZ,{label:t.label,desc:t.desc,sectionClass:t?.sectionClass,labelClass:t?.labelClass,descClass:t?.descClass});break;case"alert":o=(0,a.createElement)(cQ,{variant:t.variant,label:t.label,desc:t.desc,className:t?.class});break;case"checkout-link-generator":o=(0,a.createElement)(iQ,{stepId:t.step_id});break;case"wp-editor":o=(0,a.createElement)(KZ,{name:t.name,value:n,label:t.label,desc:t.desc,tooltip:t.tooltip,rows:t.rows,cols:t.cols,id:t.id,sectionClass:t?.sectionClass,wrapperClass:t?.wrapperClass,labelClass:t?.labelClass,descClass:t?.descClass,displayAlign:t?.display_align})}return"tr"===r?(0,a.createElement)("tr",{className:`wcf-field-row-${e.field} ${e.class?e.class:""} ${e.isActive?"":"wcf-hide"}`,key:t.name},(0,a.createElement)("th",{scope:"row",className:"py-2"},(0,a.createElement)(a.Fragment,null,o))):(0,a.createElement)("div",{key:t.name,className:`wcf-${e.tabName}-tab--row wcf-field-row-${e.field} mb-4 last:mb-0 ${e.class?e.class:""} ${e.isActive?"":"hidden"}`},o)},KZ=function(e){const{name:t,value:n,label:r,desc:o,id:i,tooltip:s,rows:l,cols:c,sectionClass:u=!1,wrapperClass:d=!1,labelClass:f,descClass:p,displayAlign:m="horizontal"}=e,[h,g]=(0,a.useState)(n),y=u||"text-left",w=p||"text-sm font-normal text-text-tertiary mt-2";let b=d||"flex items-center gap-2.5",v=f||"text-sm font-medium text-text-primary text-left mb-2";function x(t,n){g(n);const r=new CustomEvent("wcf:wpeditor:change",{bubbles:!0,detail:{e:t,name:e.name,value:n}});document.dispatchEvent(r)}return"horizontal"!==m&&(b="block w-full text-left",v+=" mb-2"),(0,a.useEffect)(()=>{let e=!0;return e&&(wp.editor.initialize(i,{tinymce:!0,quicktags:!0,mediaButtons:!1}),jQuery(document).on("tinymce-editor-setup",function(e,n){n.settings.toolbar1="bold,italic,underline,blockquote,strikethrough,bullist,numlist,alignleft,aligncenter,alignright,undo,redo,cartflows_ob",n.on("change",function(){x(e,n.getContent())}),n.on("keyup",function(){x(e,n.getContent())}),n.settings.forced_root_block=!1,"desc_text"===t&&n.addButton("cartflows_ob",{type:"menubutton",text:"",icon:"cartflows-logo cartflows-logo-icon",menu:[{text:"Product Name",value:"{{product_name}}",onclick(){n.insertContent(this.value())}},{text:"Product Desc",value:"{{product_desc}}",onclick(){n.insertContent(this.value())}},{text:"Product Price",value:"{{product_price}}",onclick(){n.insertContent(this.value())}},{text:"Product Quantity",value:"{{quantity}}",onclick(){n.insertContent(this.value())}}].sort(function(e,t){return e.text.localeCompare(t.text)})})})),()=>{e=!1,tinymce.activeEditor.destroy()}},[]),(0,a.createElement)("div",{className:`wcf-field wcf-wp-editor-field ${y}`},(0,a.createElement)("div",{className:`wcf-field__data ${b}`},r&&(0,a.createElement)("div",{className:`wcf-field__data--label ${v}`},(0,a.createElement)("label",null,r,s&&(0,a.createElement)(HZ,{text:s}))),(0,a.createElement)("div",{className:"wcf-field__data--content"},(0,a.createElement)("textarea",{className:e.class,name:t,value:h,id:i,rows:l||"10",cols:c||"60",onChange:function(t){g(t.target.value);const n=new CustomEvent("wcf:wpeditor:change",{bubbles:!0,detail:{e:t,name:e.name,value:t.target.value}});document.dispatchEvent(n)}}))),o&&(0,a.createElement)("div",{className:`wcf-field__desc ${w}`},Vh(o)))};function eQ({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"}))}const tQ=w.forwardRef(eQ),nQ=function({onChange:e,...t}){const{name:n,id:r,label:o,value:i,desc:s,backComp:l=!1,onClick:c,notice:u,isDisabled:d=!1,tooltip:f,sectionClass:p="",wrapperClass:m="",labelClass:h="",descClass:g="",displayAlign:y="horizontal",fullWidth:w=!0}=t,[b,v]=(0,a.useState)(i),[x,N]=(0,a.useState)(!1),[E,M]=(0,a.useState)(""),_=p||"text-left",I=h||"text-sm font-medium text-text-primary",S=g||"text-sm font-normal text-text-secondary mt-2";let j=m||`flex ${s?"items-start":"items-center"} py-1 ${w?"justify-between":""}`;"horizontal"!==y&&(j="block w-full text-left"),(0,a.useEffect)(()=>{v(i)},[i]);const k=l?"enable":"yes",D=l?"disable":"no",C=(0,a.useCallback)(t=>{const r=t?k:D;v(r);const o=new CustomEvent("wcf:toggle:change",{bubbles:!0,detail:{name:n,value:r}});document.dispatchEvent(o),e&&e({name:n,value:r}),c&&c()},[k,D,n,e,c]);function A(){"prompt"===u.type&&E!==u.check.toUpperCase()||(N(!1),M(""),"alert"!==u.type&&C(!0))}function T(){N(!1),M("")}return(0,a.createElement)("div",{className:`wcf-field wcf-toggle-field ${_} `},(0,a.createElement)("div",{className:`wcf-field__data ${j}`},o&&(0,a.createElement)("div",{className:"wcf-field__data--content-left flex-1 min-w-0"},(0,a.createElement)("div",{className:`wcf-field__data--label ${I}`},(0,a.createElement)("label",{htmlFor:r||n},o,f&&(0,a.createElement)(HZ,{text:f}))),s&&(0,a.createElement)("div",{className:`wcf-field__desc ${S}`},Vh(s))),(0,a.createElement)("div",{className:"wcf-field__data--content-right ml-2"},(0,a.createElement)("div",{className:"flex justify-center"},(0,a.createElement)("input",{type:"hidden",name:n,value:b}),(0,a.createElement)(nL,{id:r||n,value:k===b,onChange:function(e){if(e&&u)return"alert"===u.type?void N(!0):"confirm"===u.type||"prompt"===u.type?(M(""),void N(!0)):void 0;C(e)},disabled:d})))),!o&&s&&(0,a.createElement)("div",{className:`wcf-field__desc ${S}`},Vh(s)),function(){if(!u)return null;const e="prompt"===u.type,t="alert"===u.type,n=!e||E===u.check.toUpperCase();return(0,a.createElement)(Im,{open:x,setOpen:e=>{e||T()},exitOnClickOutside:!1,exitOnEsc:!0,className:"wcf-toggle-notice-popup"},(0,a.createElement)(Im.Panel,{className:"sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)("div",{className:"flex items-center gap-2"},(0,a.createElement)(tQ,{className:"w-8 h-8 text-support-warning","aria-hidden":"true"}),(0,a.createElement)(Im.Title,null,t?(0,z.__)("Notice","cartflows"):(0,z.__)("Confirmation Required","cartflows"))),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)("p",{className:"text-sm text-text-secondary m-0"},u.message),e&&(0,a.createElement)("div",{className:"mt-4"},(0,a.createElement)(Ym,{value:E,onChange:e=>M(e),placeholder:u.check.toUpperCase(),size:"md"}))),(0,a.createElement)(Im.Footer,{className:"flex gap-3 justify-end"},t?(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:T},(0,z.__)("OK","cartflows")):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:T},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(Wo,{variant:"primary",size:"md",destructive:!0,onClick:A,disabled:!n},(0,z.__)("Confirm","cartflows"))))))}())},rQ=function(e){const{name:t,label:n,desc:r,tooltip:o,options:i,layout:s="horizontal",value:l,showRadio:c=!0,after:u}=e;(0,a.useEffect)(()=>{void 0===l&&f("")},[]);const[d,f]=(0,a.useState)(l);function p(t){f(t);const n=new CustomEvent("wcf:selectioncard:change",{bubbles:!0,detail:{e:{},name:e.name,newValue:t}});document.dispatchEvent(n)}function m(e){return e.tooltip?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(HZ,{text:e.tooltip}),e.label):e.desc?{heading:e.label,description:e.desc}:e.label}return(0,a.createElement)("div",{className:"wcf-field wcf-select-option--card"},(0,a.createElement)("div",{className:"wcf-field__data flex flex-col gap-6"},n&&r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-field__data--content-left"},n&&(0,a.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-text-primary text-left"},(0,a.createElement)("label",null,n,o&&(0,a.createElement)(HZ,{text:o})))),(0,a.createElement)("div",{className:"wcf-field__desc text-sm text-left font-normal text-text-tertiary"},Vh(r))),(0,a.createElement)("div",{className:"wcf-field__data--content-right w-full"},"horizontal"===s?(0,a.createElement)("div",{className:"grid gap-[13px]",style:{gridTemplateColumns:`repeat(${i.length}, minmax(0, 1fr))`}},i.map(e=>{const n=d===e.value;return(0,a.createElement)("label",{key:e.value,className:"flex flex-col items-center gap-3 p-3 rounded-md cursor-pointer transition-all relative border border-solid "+(n?"border-brand-300 bg-brand-25":"border-border-subtle hover:border-border-interactive")},(0,a.createElement)("input",{type:"radio",name:t,value:e.value,checked:n,onChange:()=>p(e.value),className:"sr-only"}),c&&(0,a.createElement)("span",{className:"absolute top-2.5 right-2.5 size-4 rounded-full border border-solid flex items-center justify-center "+(n?"bg-toggle-on border-toggle-on":"bg-background-primary border-field-border")},n&&(0,a.createElement)("span",{className:"size-1.5 rounded-full bg-background-primary"})),e.image&&(0,a.createElement)("img",{src:e.image,alt:e.label,className:"wcf-selection-card--image size-11"}),(0,a.createElement)("span",{className:"text-sm font-semibold text-center leading-5 whitespace-nowrap flex items-center gap-1 "+(n?"text-brand-500":"text-text-primary")},e.tooltip&&(0,a.createElement)(HZ,{text:e.tooltip,classes:n?"text-brand-500":"hover:text-brand-500"}),e.label))})):(0,a.createElement)(lL.Group,{name:t,value:d,onChange:p,style:"simple",vertical:!0,columns:1,gapClassName:"gap-0"},i.map((e,t)=>(0,a.createElement)(lL.Button,(0,N.A)({key:t,value:e.value,label:m(e)},e.image&&{icon:(0,a.createElement)("img",{src:e.image,alt:e.label,className:"wcf-selection-card--image w-12 h-12"})},{minWidth:!1,buttonWrapperClasses:"[&_label]:text-left "+(e.desc?"[&_p:last-child]:!text-text-secondary":"")}))))),u&&(0,a.createElement)("div",{className:"wcf-field__data--content__after"},u)),!n&&r&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Vh(r)))},oQ=function(e){const{name:t,id:n,label:r,desc:o,tooltip:i,options:s,onSelect:l,after:c,isSearchable:u=!1}=e,[d,f]=(0,a.useState)(()=>s.find(t=>t.value===e.value)||null),p=(0,a.useRef)(null);return(0,a.createElement)("div",{className:"wcf-field wcf-select-with-icons-option"},(0,a.createElement)("div",{className:"wcf-field__data"},r&&(0,a.createElement)("div",{className:"wcf-field__data--label text-sm font-normal text-left"},(0,a.createElement)("label",{htmlFor:n||t},r,i&&(0,a.createElement)(HZ,{text:i}))),(0,a.createElement)("div",{className:"wcf-field__data--content"},(0,a.createElement)("input",{type:"hidden",ref:p,name:t,defaultValue:d?.value||""}),(0,a.createElement)(kL,{id:n||t,value:d,onChange:function(t){f(t),p.current&&(p.current.value=t.value);const n=new CustomEvent("wcf:select:change",{bubbles:!0,detail:{e:t,name:e.name,value:t.value,icon:t.icon}});document.dispatchEvent(n),e?.callback&&e.callback(t,e.name,t.value),l&&l()},by:"value",combobox:u,size:"sm"},(0,a.createElement)(kL.Button,{placeholder:"",render:e=>(0,a.createElement)(HZ,{text:e?.label||"",icon:e?.icon||(0,a.createElement)(kU,{className:"w-5 h-5"}),classes:"!ml-0"}),type:"button",className:e.class}),(0,a.createElement)(kL.Options,null,s.map(e=>(0,a.createElement)(kL.Option,{key:e.value,value:e},(0,a.createElement)(HZ,{text:e.label,icon:e.icon,classes:"group-hover:text-text-on-color !ml-0"})))))),c&&(0,a.createElement)("div",{className:"wcf-field__data--content__after"},c)),o&&(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-regular"},Vh(o)))},aQ=e=>(0,a.createElement)("span",{className:`inline-block h-18 w-18 animate-spin rounded-full border-2 border-solid border-brand-500 border-r-transparent align-[-0.125em] mr-1 ${e.className?e.className:""}`}),iQ=function(){const[{step_data:e,flow_type:t}]=SU(),n=e?.id||null,r="storeCheckout"===t,o=(0,P.applyFilters)("cartflows.settings.checkoutLinkGenerator",null);return o?(0,a.createElement)("div",{className:"wcf-field wcf-checkout-link-generator-field"},(0,a.createElement)(o,{preSelectedStepId:n,isStoreCheckout:r})):(0,a.createElement)(Ch,{size:"sm",color:"secondary"},(0,z.__)("Please update CartFlows Pro to the latest version to use this setting.","cartflows"))},sQ=({design:e="inline",theme:t="light",variant:n="neutral",className:r="",title:o="",content:a="",icon:i=null,onClose:s,action:l={label:"",onClick:()=>{},type:"link"}})=>{const c=()=>{"function"==typeof s&&s()},u={neutral:"ring-alert-border-neutral bg-alert-background-neutral",custom:"ring-alert-border-neutral bg-alert-background-neutral",info:"ring-alert-border-info bg-alert-background-info",success:"ring-alert-border-green bg-alert-background-green",warning:"ring-alert-border-warning bg-alert-background-warning",error:"ring-alert-border-danger bg-alert-background-danger"},d="bg-background-inverse ring-background-inverse",f={light:"text-icon-secondary",dark:"text-icon-inverse"},p=()=>{l?.onClick?.(c)};return"stack"===e?(0,R.jsx)("div",{role:"alert",className:Le("flex items-center justify-start p-4 gap-2 relative ring-1 rounded-md shadow-lg","dark"===t?d:u?.[n],r),children:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:$o({variant:n,icon:i,theme:t})}),(0,R.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-7",children:[qo({title:o,theme:t}),Jo({content:a,theme:t}),l?.label&&"function"==typeof l?.onClick&&(0,R.jsx)("div",{className:"mt-2.5",children:Xo({actionLabel:l?.label,actionType:l?.type??"button",onAction:p,theme:t})})]}),(0,R.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,R.jsx)("button",{className:Le("bg-transparent m-0 p-0 border-none focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-none cursor-pointer rounded",f[t]??f.light),onClick:()=>c(),"aria-label":"Close alert",children:(0,R.jsx)(ta,{"aria-hidden":"true"})})})]})}):(0,R.jsxs)("div",{role:"alert",className:Le("flex items-center justify-between p-3 gap-2 relative ring-1 rounded-lg shadow-lg","dark"===t?d:u?.[n],r),children:[(0,R.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,R.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:$o({variant:n,icon:i,theme:t})}),(0,R.jsxs)("p",{className:"content-start space-x-1 my-0 mr-10 px-1",children:[qo({title:o,theme:t,inline:!0}),Jo({content:a,theme:t,inline:!0})]})]}),(0,R.jsxs)("div",{className:"flex h-full justify-start gap-4 [&_svg]:size-4",children:[l?.label&&"function"==typeof l?.onClick&&(0,R.jsx)("div",{className:"self-center flex h-5",children:Xo({actionLabel:l?.label,actionType:l?.type??"button",onAction:p,theme:t})}),"function"==typeof s&&(0,R.jsx)("button",{className:Le("self-start bg-transparent m-0 border-none p-0.5 focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-none cursor-pointer size-5 rounded",f[t]??f.light),onClick:()=>c(),"aria-label":"Close alert",children:(0,R.jsx)(ta,{"aria-hidden":"true"})})]})]})},lQ=["neutral","info","success","warning","error"],cQ=function({variant:e="neutral",label:t="",desc:n="",className:r=""}){const o=lQ.includes(e)?e:"neutral";return(0,a.createElement)(sQ,{className:`wcf-field wcf-alert-field shadow-none ${r}`,variant:o,design:"inline",title:t,content:n?Vh(n):""})},uQ=(0,w.createContext)(null);const dQ=e=>!e.isLayoutDirty&&e.willUpdate(!1);function fQ(){const e=new Set,t=new WeakMap,n=()=>e.forEach(dQ);return{add:r=>{e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:r=>{e.delete(r);const o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}const pQ=e=>!0===e,mQ=({children:e,id:t,inherit:n=!0})=>{const r=(0,w.useContext)(El),o=(0,w.useContext)(uQ),[a,i]=function(){const e=function(){const e=(0,w.useRef)(!1);return ql(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),[t,n]=(0,w.useState)(0),r=(0,w.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,w.useCallback)(()=>xi.postRender(r),[r]),t]}(),s=(0,w.useRef)(null),l=r.id||o;null===s.current&&((e=>pQ(!0===e)||"id"===e)(n)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:pQ(n)&&r.group||fQ()});const c=(0,w.useMemo)(()=>({...s.current,forceRender:a}),[i]);return(0,R.jsx)(El.Provider,{value:c,children:e})},hQ=(0,w.createContext)({}),gQ=()=>(0,w.useContext)(hQ),yQ=(0,w.createContext)(null),wQ=({children:e,activeItem:t=null,onChange:n,className:r,size:o="sm",orientation:a="horizontal",variant:i="pill",iconPosition:s="left",width:l="full","aria-label":c})=>{const u=(0,w.useMemo)(()=>Bm(),[]),d=gQ(),f="activeItem"in d,p=d?.activeItem||t,m=(0,w.useCallback)((e,t)=>{n&&n({event:e,value:t})},[n]);let h,g="rounded-full",y="p-1",b="ring-1 ring-tab-border";"vertical"===a?h="gap-0.5":("rounded"===i||"pill"===i)&&("xs"===o||"sm"===o?h="gap-0.5":("md"===o||"lg"===o)&&(h="gap-1")),"rounded"===i||"vertical"===a?g="rounded-md":"underline"===i&&(g="rounded-none",y="p-0",b="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===o?h="gap-0":"sm"===o?h="gap-2.5":("md"===o||"lg"===o)&&(h="gap-3"));const v=Le(`box-border [&>*]:box-border flex items-center ${"full"===l?"w-full":""} ${"vertical"===a?"flex-col":""}`,g,y,h,b,"underline"!==i?"bg-tab-background":"",r);return(0,R.jsx)("div",{className:v,role:"tablist","aria-orientation":a,...c&&{"aria-label":c},onKeyDown:e=>{const t=Array.from(e.currentTarget.querySelectorAll('[role="tab"]:not([disabled])')),n=t.findIndex(t=>t===e.currentTarget.ownerDocument.activeElement);if(-1===n)return;const r="vertical"!==a,o=r?"ArrowLeft"===e.key:"ArrowUp"===e.key,i=r?"ArrowRight"===e.key:"ArrowDown"===e.key;if(!o&&!i&&"Home"!==e.key&&"End"!==e.key)return;e.preventDefault();let s=n;o?s=n<=0?t.length-1:n-1:i?s=n>=t.length-1?0:n+1:"Home"===e.key?s=0:"End"===e.key&&(s=t.length-1),t[s].focus()},children:(0,R.jsx)(yQ.Provider,{value:{activeItem:p,onChange:m,size:o,variant:i,orientation:a,iconPosition:s,width:l,hasPanels:f},children:(0,R.jsx)(mQ,{id:u,children:w.Children.map(e,e=>(0,w.isValidElement)(e)?w.cloneElement(e):null)})})})};wQ.displayName="Tabs.Group";const bQ=(0,w.forwardRef)(({slug:e,text:t,icon:n,className:r,disabled:o=!1,badge:a=null,...i},s)=>{const l=(0,w.useContext)(yQ);if(!l)throw new Error("Tab should be used inside Tabs Group");const{activeItem:c,onChange:u,size:d,variant:f,orientation:p,iconPosition:m,width:h,hasPanels:g}=l,y={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===f?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===f?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===f?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[d],b=Le("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===h?"flex-1":"","vertical"===p?"w-full justify-between":"");let v="rounded-full";"rounded"===f?v="rounded-md":"underline"===f&&(v="rounded-none");const x=Le(b,"border-none",v,"hover:text-text-primary","focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-border-strong",y,c===e?"bg-background-primary text-text-primary shadow-sm":"",o?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",r),N=Le("flex items-center gap-1");return(0,R.jsxs)(op.button,{ref:s,className:x,disabled:o,onClick:n=>{u(n,{slug:e,text:t})},layoutRoot:!0,role:"tab","aria-selected":c===e,...g&&{"aria-controls":`panel-${e}`},id:`tab-${e}`,tabIndex:c===e?0:-1,...i,children:[c===e&&"underline"===f&&(0,R.jsx)(op.span,{layoutId:"underline",layoutDependency:c,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,R.jsxs)("span",{className:N,children:["left"===m&&n&&(0,R.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,"right"===m&&n&&(0,R.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),a&&(0,w.isValidElement)(a)&&a]})});bQ.displayName="Tabs.Tab";const vQ=({activeItem:e,children:t})=>(0,R.jsx)(hQ.Provider,{value:{activeItem:e},children:t}),xQ=({slug:e,children:t})=>{const n=gQ();if(!n)throw new Error("TabPanel should be used inside Tabs");return e!==n.activeItem?null:(0,R.jsx)("div",{role:"tabpanel",id:`panel-${e}`,"aria-labelledby":`tab-${e}`,tabIndex:0,children:t})};function NQ(e,t){const n=new Date(e.getTime()),r=[];for(;n<=t;)r.push(new Date(n).toISOString().slice(0,10)),n.setDate(n.getDate()+1);return r}function EQ(){const e=new Date,t=new Date;return t.setDate(t.getDate()-7),NQ(t,e)}xQ.displayName="Tabs.Panel",vQ.Group=wQ,vQ.Tab=bQ,vQ.Panel=xQ;const MQ=function(){const[{analyticsData:e},t]=l(),[n,r]=(0,a.useState)("total_revenue"),[o,i]=(0,a.useState)(),[s,c]=(0,a.useState)(),[u,d]=(0,a.useState)(),[f,p]=(0,a.useState)(),[m,h]=(0,a.useState)(EQ),[g,y]=(0,a.useState)(!0),w=new Date,b=w.toISOString().slice(0,10);w.setDate(w.getDate()-7);const v=w.toISOString().slice(0,10),x="active"===cartflows_admin.woocommerce_status,N=function(e){i(void 0!==e?.total_revenue?e?.total_revenue:0),c(void 0!==e?.total_offers_revenue?e?.total_offers_revenue:0),d(void 0!==e?.total_orders?e?.total_orders:0),p(void 0!==e?.total_visits?e?.total_visits:0),y(!1)};(0,a.useEffect)(()=>{let n=!0;return e?N(e?.flow_stats):(async()=>{const e=new window.FormData;let r=new Date,o=new Date;o.setDate(o.getDate()-7),h(NQ(o,r)),o=fg(o),r=fg(r),e.append("date_to",r),e.append("date_from",o),e.append("action","cartflows_get_all_flows_stats"),e.append("security",cartflows_admin.get_all_flows_stats_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{n&&e?.data?.flow_stats&&(t({type:"SET_ANALYTICS_DATA",analyticsData:e.data}),N(e.data.flow_stats))})})(),()=>{n=!1}},[]);const E=[{name:(0,z.__)("Total Revenue","cartflows"),tooltip:(0,z.__)("This shows the total amount of money earned from all your funnels combined.","cartflows"),slug:"total_revenue",value:o,percentChange:e?.flow_stats?.total_revenue_change||null},{name:(0,z.__)("Total Orders","cartflows"),tooltip:(0,z.__)("This shows the total number of orders placed through your CartFlows checkout pages.","cartflows"),slug:"total_orders",value:u,percentChange:e?.flow_stats?.total_orders_change||null},{name:(0,z.__)("Total Views","cartflows"),tooltip:(0,z.__)("This shows the total number of times people visited any step in your funnel.","cartflows"),slug:"total_views",value:f,percentChange:e?.flow_stats?.total_visits_change||null},{name:(0,z.__)("Offer Revenue","cartflows"),tooltip:(0,z.__)("This shows the total amount of money earned from your Upsell and Downsell offers.","cartflows"),slug:"offer_revenue",value:s,percentChange:e?.flow_stats?.total_offers_revenue_change||null}],M=(0,P.applyFilters)("cartflows.dashboard.graphs",{total_revenue:{component:FO},total_orders:{component:YO},total_views:{component:VO,locked:!0},offer_revenue:{component:VO,locked:!0}}),_=e=>!0===M[e]?.locked,I=e=>_(e.slug)?"-":0!==parseInt(e.value)?Vh(e.value.toString()):["total_revenue","offer_revenue"].includes(e.slug)?(cartflows_admin?.woo_currency||"")+"0.00":"0";return(0,a.createElement)("div",{className:"bg-background-primary p-5 flex flex-col gap-3 border border-solid border-border-subtle rounded-lg shadow-sm wcf-analytics"},(0,a.createElement)("div",{className:"flex flex-wrap items-center justify-between gap-3 p-1"},(0,a.createElement)(_h,{size:"xs",tag:"h3",title:(0,z.__)("Overview","cartflows"),className:"[&_h3]:text-text-primary tracking-[-0.144px]"}),(0,a.createElement)(vZ,{classNames:"wcf-custom-filter-input !w-72 !h-full date-picker-field !pl-4 !px-4 !py-3 !pr-7 text-sm font-normal text-text-tertiary !rounded-md !border-border-subtle focus:!ring-brand-100 focus:!border-brand-500 focus:!shadow-none !outline-0 !outline-none",value:{endDate:b,startDate:v},onChangeCB:function(e){let n=new Date(e.startDate),r=new Date(e.endDate);i(),c(),d(),p(),y(!0),h(NQ(n,r)),n=fg(n),r=fg(r);const o=new window.FormData;o.append("date_to",r),o.append("date_from",n),o.append("action","cartflows_get_all_flows_stats"),o.append("security",cartflows_admin.get_all_flows_stats_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:o}).then(e=>{e?.data?.flow_stats&&(t({type:"SET_ANALYTICS_DATA",analyticsData:e.data}),N(e.data.flow_stats))})}})),(!e||g)&&(0,a.createElement)(GO,null),e&&!g&&(0,a.createElement)(a.Fragment,null,x?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"overflow-x-auto"},(0,a.createElement)(vQ.Group,{variant:"underline",size:"sm",width:"auto",activeItem:n,onChange:({value:e})=>r(e.slug),className:"min-w-max [&>div]:gap-6 lg:[&>div]:gap-12 xl:[&>div]:gap-24"},E.map(e=>(0,a.createElement)(vQ.Tab,{key:e.slug,slug:e.slug,className:"!items-start !justify-start !bg-transparent !shadow-none min-w-fit xl:min-w-[172px] !px-3 !pb-4 !pt-2.5",text:(0,a.createElement)("div",{className:"flex flex-col gap-2 items-start"},(0,a.createElement)("div",{className:"flex items-center gap-5"},(0,a.createElement)("div",{className:"gap-1"},(0,a.createElement)(Ch,{as:"span",size:14,weight:500,className:"whitespace-nowrap"},e.name),e.tooltip&&(0,a.createElement)(HZ,{text:e.tooltip})),_(e.slug)&&(0,a.createElement)(Rp,null)),(0,a.createElement)("div",{className:"flex items-center gap-2"},(0,a.createElement)(Ch,{as:"span",size:30,weight:600,color:"primary"},I(e)),e.percentChange&&(0,a.createElement)(na,{label:e.percentChange,variant:"green",size:"xs",type:"pill",icon:(0,a.createElement)(Zh,{className:"size-3"})})))})))),(0,a.createElement)("div",{className:"p-1"},function(){const t=(M[n]||M.total_revenue).component;return(0,a.createElement)(t,{slug:n,dateRange:m,analyticsData:e})}())):(0,a.createElement)("div",{className:"text-center px-8 py-12"},(0,a.createElement)("div",{className:"flex justify-center mb-3"},(0,a.createElement)(Qo,{className:"h-10 w-10 text-brand-500"})),(0,a.createElement)("h3",{className:"mt-2 text-base font-medium text-text-primary"},(0,z.__)("WooCommerce plugin is required.","cartflows")),(0,a.createElement)("p",{className:"mt-1 text-sm text-text-secondary"},(0,z.__)("You need WooCommerce plugin installed and activated to view the overview","cartflows")))))},_Q=(0,w.createContext)(void 0),IQ=()=>{const e=(0,w.useContext)(_Q);if(!e)throw new Error("Table components must be used within Table component");return e},SQ=({children:e,className:t,checkboxSelection:n=!1,...r})=>{const o={checkboxSelection:n},a=w.Children.toArray(e).find(e=>w.isValidElement(e)&&e.type===TQ),i=w.Children.toArray(e).filter(e=>w.isValidElement(e)&&e.type!==TQ);return(0,R.jsx)(_Q.Provider,{value:o,children:(0,R.jsxs)("div",{className:"flow-root border-0.5 border-solid border-border-subtle rounded-md divide-y-0.5 divide-x-0 divide-solid divide-border-subtle overflow-hidden",children:[(0,R.jsx)("div",{className:"overflow-x-auto w-full",children:(0,R.jsx)("div",{className:"relative",children:(0,R.jsx)("table",{className:Le("table-fixed min-w-full border-collapse border-spacing-0",t),...r,children:i})})}),a]})})},jQ=({children:e,className:t,selected:n,onChangeSelection:r,indeterminate:o,disabled:a,...i})=>{const{checkboxSelection:s}=IQ();return(0,R.jsx)("thead",{className:Le("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...i,children:(0,R.jsxs)("tr",{children:[s&&(0,R.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,R.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,R.jsx)($O,{size:"sm",checked:n,indeterminate:o,disabled:a,onChange:e=>{"function"==typeof r&&r(e)},"aria-label":n?"Deselect all":"Select all"})})}),e]})})},kQ=({children:e,className:t,...n})=>(0,R.jsx)("th",{scope:"col",className:Le("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...n,children:e}),DQ=({children:e,className:t,...n})=>(0,R.jsx)("tbody",{className:Le("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...n,children:e}),CQ=({children:e,selected:t,value:n,className:r,onChangeSelection:o,...a})=>{const{checkboxSelection:i}=IQ();return(0,R.jsxs)("tr",{className:Le("hover:bg-background-secondary",t&&"bg-background-secondary",r),...a,children:[i&&(0,R.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,R.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,R.jsx)($O,{size:"sm",checked:t,onChange:e=>{"function"==typeof o&&o(e,n)},"aria-label":"Select row"})})}),e]})},AQ=({children:e,className:t,...n})=>(0,R.jsx)("td",{className:Le("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...n,children:e}),TQ=({children:e,className:t,...n})=>{const{checkboxSelection:r}=IQ();return(0,R.jsx)("div",{className:Le("px-3 py-3",r&&"px-4",t),...n,children:e})};function OQ({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 19.5 15-15m0 0H8.25m11.25 0v11.25"}))}SQ.displayName="Table",jQ.displayName="Table.Head",kQ.displayName="Table.HeadCell",DQ.displayName="Table.Body",CQ.displayName="Table.Row",AQ.displayName="Table.Cell",TQ.displayName="Table.Footer",SQ.Head=jQ,SQ.HeadCell=kQ,SQ.Body=DQ,SQ.Row=CQ,SQ.Cell=AQ,SQ.Footer=TQ;const LQ=w.forwardRef(OQ),zQ=o.p+"images/dashboard-recent-orders.cc607510.png",PQ=e=>{switch(e){case"Processing":case"Completed":return"green";case"Failed":return"red";case"Refunded":return"neutral";default:return"yellow"}},RQ=function(){const[{analyticsData:e}]=l(),t=e&&e.recent_orders?e.recent_orders:[],n="active"===cartflows_admin.woocommerce_status;return(0,a.createElement)("div",{className:"wcf-recent-orders shrink-0 p-5 bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm overflow-hidden flex flex-col gap-3"},(0,a.createElement)("div",{className:"flex items-center justify-between p-1"},(0,a.createElement)(_h,{size:"xs",tag:"h3",title:(0,z.__)("Recent Orders","cartflows"),className:"tracking-[-0.1px]"}),t.length>0&&(0,a.createElement)(Wo,{variant:"ghost",size:"xs",tag:"a",href:cartflows_admin.woo_order_url,target:"_blank",rel:"noreferrer",icon:(0,a.createElement)(LQ,null),iconPosition:"right",className:"no-underline hover:no-underline"},(0,z.__)("View all","cartflows"))),n?(0,a.createElement)("div",{className:"overflow-x-auto"},(0,a.createElement)(SQ,{className:"min-w-full"},(0,a.createElement)(SQ.Head,null,(0,a.createElement)(SQ.HeadCell,{className:"w-[24%] pr-9"},(0,z.__)("Customer","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"w-[21%]"},(0,z.__)("Date","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"w-[19%]"},(0,z.__)("Status","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"w-[23%]"},(0,z.__)("Payment Method","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"w-[13%]"},(0,z.__)("Value","cartflows"))),(0,a.createElement)(SQ.Body,null,0===t.length?(0,a.createElement)(SQ.Row,null,(0,a.createElement)(SQ.Cell,{colSpan:5,className:"py-12"},(0,a.createElement)("div",{className:"flex flex-col items-center gap-3"},(0,a.createElement)("img",{src:zQ,alt:"",width:"78",height:"72"}),(0,a.createElement)("div",{className:"flex flex-col items-center gap-1"},(0,a.createElement)("p",{className:"text-lg font-semibold text-text-primary m-0"},(0,z.__)("Find recent order here","cartflows")),(0,a.createElement)("p",{className:"text-sm text-text-tertiary m-0"},(0,z.__)("Once you have received orders, come back to find it again easily","cartflows")))))):t.map(e=>(0,a.createElement)(SQ.Row,{key:e.order_id},(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap pr-9 py-4"},(0,a.createElement)("div",{className:"flex flex-col gap-1"},(0,a.createElement)("span",{className:"font-medium text-sm leading-5 text-text-primary"},e.customer_name),(0,a.createElement)("span",{className:"text-xs leading-4 text-text-tertiary"},e.customer_email))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},(0,a.createElement)("div",{className:"flex flex-col gap-0.5"},(0,a.createElement)("span",null,e.order_date),(0,a.createElement)("span",null,(0,z.sprintf)(/* translators: %s: order time */ /* translators: %s: order time */ |
| 13 |
(0,z.__)("at %s","cartflows"),e.order_time)))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap py-4"},(0,a.createElement)("div",{className:"flex"},(0,a.createElement)(na,{label:e.order_status,type:"pill",variant:PQ(e.order_status),size:"xs"}))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap py-4"},e.payment_method),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap py-4"},Vh(e.order_total))))))):(0,a.createElement)("div",{className:"text-center px-8 py-12"},(0,a.createElement)("div",{className:"flex justify-center mb-3"},(0,a.createElement)(tQ,{className:"h-10 w-10 text-brand-500"})),(0,a.createElement)("h3",{className:"mt-2 text-base font-medium text-text-primary"},(0,z.__)("WooCommerce plugin is required.","cartflows")),(0,a.createElement)("p",{className:"mt-1 text-sm text-text-secondary"},(0,z.__)("You need WooCommerce plugin installed and activated to view the recent orders","cartflows"))))},UQ=({dummy_data_type:e="funnel"})=>{const t="undefined"!=typeof cartflows_admin&&cartflows_admin?.woo_currency||"$",n=[{id:1,flow_title:"Summer Sale Funnel",step_title:"Summer Sale Landing",total_visits:1245,unique_visits:892,conversions:156,conversion_rate:"17.5",revenue:`${t}15,600.00`},{id:2,flow_title:"Black Friday Special",step_title:"Summer Sale Checkout",total_visits:2150,unique_visits:1678,conversions:284,conversion_rate:"16.9",revenue:`${t}28,400.00`},{id:3,flow_title:"Product Launch Campaign",step_title:"Summer Sale One-click Upsell",total_visits:987,unique_visits:745,conversions:142,conversion_rate:"19.1",revenue:`${t}21,300.00`},{id:4,flow_title:"New Customer Welcome",step_title:"Summer Sale Optin",total_visits:1567,unique_visits:1234,conversions:198,conversion_rate:"16.0",revenue:`${t}9,900.00`},{id:5,flow_title:"Spring Collection",step_title:"Summer Sale Thank You",total_visits:845,unique_visits:623,conversions:87,conversion_rate:"14.0",revenue:`${t}8,700.00`}];return(0,a.createElement)(SQ,{className:"min-w-full"},(0,a.createElement)(SQ.Head,null,(0,a.createElement)(SQ.HeadCell,null,"step"===e?(0,z.__)("Step Name","cartflows"):(0,z.__)("Funnel Name","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Total Visits","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Unique Visits","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Conversions","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Conversion Rate","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Revenue","cartflows"))),(0,a.createElement)(SQ.Body,null,n.map(t=>(0,a.createElement)(SQ.Row,{key:t.id},(0,a.createElement)(SQ.Cell,{className:"whitespace-wrap font-medium"},"step"===e?t.step_title:t.flow_title),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},t.total_visits),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},t.unique_visits),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},t.conversions),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},t.conversion_rate+"%"),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},Vh(t.revenue))))))},BQ=()=>{const e="undefined"!=typeof cartflows_admin&&cartflows_admin?.woo_currency||"$",t=[{id:1,product_title:"Premium Membership",product_type:"checkout",total_orders:245,conversions:198,conversion_rate:"80.8",revenue:`${e}24,500.00`},{id:2,product_title:"Business Course Bundle",product_type:"bump",total_orders:156,conversions:134,conversion_rate:"85.9",revenue:`${e}31,200.00`},{id:3,product_title:"eBook Collection",product_type:"upsell",total_orders:389,conversions:312,conversion_rate:"80.2",revenue:`${e}7,800.00`},{id:4,product_title:"Advanced Training Package",product_type:"downsell",total_orders:178,conversions:145,conversion_rate:"81.5",revenue:`${e}21,750.00`},{id:5,product_title:"Starter Kit",product_type:"optin",total_orders:423,conversions:367,conversion_rate:"86.8",revenue:`${e}18,350.00`}];return(0,a.createElement)(SQ,{className:"min-w-full"},(0,a.createElement)(SQ.Head,null,(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Product Name","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("No. of Orders","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Conversions","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Conversion Rate","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Revenue","cartflows"))),(0,a.createElement)(SQ.Body,null,t.map(e=>{return(0,a.createElement)(SQ.Row,{key:e.id},(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap font-medium"},(0,a.createElement)("div",{className:"flex items-center gap-2"},(0,a.createElement)("span",null,e.product_title),e.product_type&&((t=e.product_type)?(0,a.createElement)("span",{className:"wcf-badge bg-brand-25 border border-brand-300 text-brand-600 rounded-2xl text-[11px] leading-4 cursor-default font-normal ml-2 capitalize"},t||""):null))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},e.total_orders),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},e.conversions),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},e.conversion_rate+" %"),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},Vh(e.revenue)));var t})))},FQ=()=>(0,a.createElement)(SQ,{className:"min-w-full"},(0,a.createElement)(SQ.Head,null,(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Funnel Name","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Opt-in Step","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Opt-in Form","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"!hidden"},(0,z.__)("Popup","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"!hidden"},(0,z.__)("Lead Magnets","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Conversion Rate","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"!hidden"},(0,z.__)("Date & Time","cartflows"))),(0,a.createElement)(SQ.Body,null,[{id:1,flow_title:"Newsletter Signup Flow",step_title:"Welcome Newsletter",optin_form:"23",conversion_rate:"68.5"},{id:2,flow_title:"Free eBook Download",step_title:"Download Landing Page",optin_form:"45",conversion_rate:"72.3"},{id:3,flow_title:"Webinar Registration",step_title:"Webinar Signup",optin_form:"12",conversion_rate:"65.8"},{id:4,flow_title:"Free Trial Access",step_title:"Trial Registration",optin_form:"20",conversion_rate:"78.2"},{id:5,flow_title:"Course Preview Access",step_title:"Preview Optin",optin_form:"67",conversion_rate:"61.4"}].map(e=>(0,a.createElement)(SQ.Row,{key:e.id},(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap font-medium"},e.flow_title),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},e.step_title),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},e.optin_form),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap !hidden"}),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap !hidden"}),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},e.conversion_rate+"%"),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap !hidden"}))))),YQ=function(){const[{analyticsData:e}]=l(),t="active"===cartflows_admin.woocommerce_status,n=e?.flow_stats?.top_performing_funnels,r=(0,P.applyFilters)("cartflows.dashboard.topPerformingFunnels",null);return(0,a.createElement)("div",{className:"wcf-top-performing-funnels shrink-0 p-5 bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm overflow-hidden flex flex-col gap-3"},(0,a.createElement)("div",{className:"flex items-center justify-between p-1"},(0,a.createElement)(_h,{size:"xs",tag:"h3",title:(0,z.__)("Top Performing Funnels","cartflows"),className:"tracking-[-0.1px]"}),n?.length>0&&(0,a.createElement)(Wo,{variant:"ghost",size:"xs",tag:"a",href:cartflows_admin.admin_url+"?page=cartflows&path=analytics&type=flows",target:"_blank",rel:"noreferrer",icon:(0,a.createElement)(kp,null),iconPosition:"right",className:"no-underline"},(0,z.__)("View all","cartflows"))),t?r?(0,a.createElement)(r,{topPerformingFunnels:n}):(0,a.createElement)("div",{className:"overflow-hidden relative rounded-lg"},(0,a.createElement)(ZO,{title:(0,z.__)("See Which Funnels Earn the Most Revenue","cartflows"),description:(0,z.__)("Unlock Pro and instantly see each funnel’s revenue, visits, and conversion rate.","cartflows"),containerClass:"absolute z-10 inset-0 flex items-center justify-center bg-[rgba(244,244,245,0.32)] backdrop-blur-[2.5px]",innerContainerClass:"border border-border-subtle shadow-[0px_10px_32px_0px_rgba(149,160,178,0.2)] p-6 rounded-xl max-w-sm w-full text-center bg-background-primary"}),(0,a.createElement)("div",{className:"pointer-events-none select-none"},(0,a.createElement)(UQ,null))):(0,a.createElement)("div",{className:"text-center px-8 py-12"},(0,a.createElement)("div",{className:"flex justify-center mb-3"},(0,a.createElement)(Qo,{className:"h-10 w-10 text-brand-500"})),(0,a.createElement)("h3",{className:"mt-2 text-base font-medium text-text-primary"},(0,z.__)("WooCommerce plugin is required.","cartflows")),(0,a.createElement)("p",{className:"mt-1 text-sm text-text-secondary"},(0,z.__)("You need WooCommerce plugin installed and activated to view the recent orders","cartflows"))))},ZQ=function(){const[e,t]=(0,a.useState)({errorFor:!1,errorMsg:!1}),[n,r]=(0,a.useState)({}),{errorFor:o,errorMsg:i}=e,s=(e,t)=>{r(n=>({...n,[e]:t}))},l=(e,t,n)=>{const r=new window.FormData;r.append("action","cartflows_activate_plugin"),r.append("init",t),r.append("security",cartflows_admin.activate_plugin_nonce),s(e,(0,z.__)("Activating…","cartflows")),L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{s(e,(0,z.__)("Activated","cartflows")),n&&(window.location=n)})},c={"woo-cart-abandonment-recovery":{id:0,subtitle:(0,z.__)("Recover abandonded carts with ease.","cartflows")},"modern-cart":{id:1,subtitle:(0,z.__)("Fast and customizable cart for your website.","cartflows")},"power-coupons":{id:2,subtitle:(0,z.__)("Convert more with automated coupons.","cartflows")},"variation-swatches-woo":{id:3,subtitle:(0,z.__)("Product choices made visual and clickable.","cartflows")}},u=Object.keys(c),d=cartflows_admin.integrations.plugins.filter(e=>u.includes(e.slug)).sort((e,t)=>c[e.slug].id-c[t.slug].id),f=(e,r)=>{const u=(e=>"active"===e.status||n[e.slug]===(0,z.__)("Activated","cartflows"))(e),d=(e=>n[e.slug]?n[e.slug]:e.isPro&&"not-installed"===e.status?(0,z.__)("Let's Go","cartflows"):(e=>{switch(e){case"active":return(0,z.__)("Active","cartflows");case"inactive":return(0,z.__)("Activate","cartflows");default:return(0,z.__)("Install","cartflows")}})(e.status))(e),f=[(0,z.__)("Installing…","cartflows"),(0,z.__)("Activating…","cartflows")].includes(n[e.slug]);return(0,a.createElement)("div",{key:r,className:"bg-background-primary rounded-lg shadow-sm p-2 flex flex-col gap-5"},(0,a.createElement)("div",{className:"flex items-start justify-between px-1 py-1"},e.logoPath&&(0,a.createElement)("img",{src:e.logoPath.icon_path,className:"w-6 h-6 min-w-6 min-h-6",alt:e.title}),(0,a.createElement)("div",{className:"flex items-center gap-2"},u?(0,a.createElement)("span",{className:"text-xs font-semibold text-support-success"},(0,z.__)("Activated","cartflows")):(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"!px-0 !text-brand-600 font-semibold leading-4",disabled:f,onClick:()=>(e=>{const{slug:n,isPro:r,link:o,status:a,path:i,redirection:c}=e;if("true"!==String(r).toLowerCase()||"not-installed"!==a)switch(((e,t="plugin")=>"activated"===e?"":"installed"===e||"inactive"===e?"cartflows_recommended_"+t+"_activate":"cartflows_recommended_"+t+"_install")(a,"plugin")){case"cartflows_recommended_plugin_activate":l(n,i,c);break;case"cartflows_recommended_plugin_install":s(n,(0,z.__)("Installing…","cartflows")),((e,n,r)=>{new Promise((o,a)=>{wp.updates.queue.push({action:"install-plugin",data:{slug:e,success(t){s(e,(0,z.__)("Installed","cartflows")),o(t),l(e,n,r)},error(n){a(n),s(e,(0,z.__)("Failed","cartflows")),t({errorFor:`${e}_error`,errorMsg:n?.errorMessage}),setTimeout(()=>{s(e,null),t({errorFor:!1,errorMsg:!1})},1500)}}}),wp.updates.queueChecker()})})(n,i,c)}else window.open(o,"_blank","noopener,noreferrer")})(e)},d),o===`${e.slug}_error`&&i&&(0,a.createElement)("p",{id:`${e.slug}_error`,className:"text-[10px] text-brand-500"},i))),(0,a.createElement)("div",{className:"flex flex-col gap-0.5 px-1 py-1"},(0,a.createElement)("p",{className:"text-sm font-medium text-text-primary m-0"},e.title),(0,a.createElement)("p",{className:"text-xs text-text-tertiary m-0"},c[e.slug]?.subtitle||e.subtitle)))};return(0,a.createElement)("div",{className:"wcf-extend-your-store shrink-0 bg-background-primary border-0.5 border-solid border-border-subtle rounded-lg shadow-sm overflow-hidden p-3"},(0,a.createElement)("div",{className:"flex flex-col gap-3 w-full"},(0,a.createElement)("div",{className:"flex items-center w-full p-1"},(0,a.createElement)(Ch,{size:14,as:"h3",color:"primary"},(0,z.__)("Extend Your Website","cartflows"))),(0,a.createElement)("div",{className:"bg-background-secondary rounded-md p-1 grid grid-cols-1 sm:grid-cols-2 gap-1"},d.map((e,t)=>f(e,t)))))};function QQ({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"}))}const VQ=w.forwardRef(QQ),WQ=o.p+"images/upgrade.823abf92.png",GQ=[(0,z.__)("One-Click Upsells: Add revenue to every order automatically.","cartflows"),(0,z.__)("Order Bumps: Sell more at checkout.","cartflows"),(0,z.__)("A/B Split Testing: Find your top-converting funnel.","cartflows"),(0,z.__)("Advanced Analytics: See exactly what earns more.","cartflows")],HQ=function(){const e=getUpgradeToProUrl();return(0,a.createElement)("div",{className:"wcf-upgrade-to-pro-card bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm overflow-hidden p-3"},(0,a.createElement)("div",{className:"flex items-center justify-center"},(0,a.createElement)("img",{src:WQ,alt:(0,z.__)("CartFlows Pro upgrade illustration","cartflows"),className:"w-full max-h-52 object-contain"})),(0,a.createElement)("div",{className:"p-2 pt-4 flex flex-col gap-4"},(0,a.createElement)("div",{className:"flex flex-col gap-2"},(0,a.createElement)(_h,{tag:"h3",size:"xs",title:(0,z.__)("Sell More with CartFlows Pro","cartflows")}),(0,a.createElement)(Ch,{size:14,color:"secondary"},(0,z.__)("Turn every visitor into more revenue with smarter funnels.","cartflows"))),(0,a.createElement)("ul",{className:"list-none p-0 m-0 flex flex-col gap-2.5"},GQ.map((e,t)=>(0,a.createElement)("li",{key:t,className:"flex items-start gap-2"},(0,a.createElement)(VQ,{className:"w-4 h-4 text-brand-500 shrink-0 mt-0.5"}),(0,a.createElement)(Ch,{size:14,color:"secondary"},e)))),(0,a.createElement)(Wo,{tag:"a",href:e,variant:"primary",size:"md",className:"text-center justify-center no-underline",target:"_blank",rel:"noreferrer"},(0,z.__)("Upgrade Now","cartflows"))))};function $Q({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const XQ=w.forwardRef($Q),qQ="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI5NSIgaGVpZ2h0PSI5NSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PGcgZmlsbD0iI2YwNjMzNSI+PHBhdGggZD0iTTU4Ljk0MiA1LjYwOWMtMy40NDQgMy4zNTQtNS41ODcgOC4wMzYtNS41ODcgMTMuMjJ2MzAuNzE4YTguMTkgOC4xOSAwIDAgMS04LjE4OCA4LjE4OEgyNC41NzRhOC4xOSA4LjE5IDAgMCAxLTguMTg4LTguMTg4IDguMTkgOC4xOSAwIDAgMSA4LjE4OC04LjE4OGgyMi41ODNWMjQuOTc0SDI0LjU3NGEyNC42MiAyNC42MiAwIDAgMC00LjA5OS4zNEM4Ljg2IDI3LjI2IDAgMzcuMzc3IDAgNDkuNTQ3YzAgMTAuNyA2Ljg0MyAxOS44MDMgMTYuMzg2IDIzLjE3NmEyNC42MSAyNC42MSAwIDAgMCA4LjE4OSAxLjM5OWgyMC41OTJhMjQuNjIgMjQuNjIgMCAwIDAgOC4xODktMS4zOTlDNjIuODk3IDY5LjM1IDY5Ljc0IDYwLjI0NyA2OS43NCA0OS41NDd2LTguMTg4YzkuMDUgMCAxNi4zODYtNy4zMzcgMTYuMzg2LTE2LjM4Nkg2OS43NHYtNi4xNDVjMC0xLjEzLjkxNS0yLjA0NCAyLjA0NS0yLjA0NGg0LjA5OGM0Ljk5NiAwIDkuNTI1LTEuOTgyIDEyLjg0My01LjIxMiAyLjk4Ny0yLjkwNSA0Ljk5Ni02LjgwNyA1LjQ3MS0xMS4xNzRINzEuNzg2YTE4LjM3NyAxOC4zNzcgMCAwIDAtMTIuODQ0IDUuMjExTTI0LjU3NSA3OC4yMThhOC4xOTEgOC4xOTEgMCAxIDAgMCAxNi4zODMgOC4xOTEgOC4xOTEgMCAwIDAgMC0xNi4zODNNNDkuMTQ5IDc4LjIxOGE4LjE5MiA4LjE5MiAwIDEgMCAwIDE2LjM4MyA4LjE5MiA4LjE5MiAwIDAgMCAwLTE2LjM4MyIvPjwvZz48L3N2Zz4=",JQ=[{icon:TU,value:"₹18,450",label:(0,z.__)("Recovered Revenue","cartflows")},{icon:pm,value:"₹52,300",label:(0,z.__)("Recoverable Revenue","cartflows")},{icon:XQ,value:"28%",label:(0,z.__)("Recovery Rate","cartflows")}],KQ=function(){return(0,a.createElement)("div",{className:"wcf-summarized-report bg-background-primary border border-solid border-border-subtle rounded-lg shadow-sm overflow-hidden"},(0,a.createElement)("div",{className:"border-b border-solid border-border-subtle flex items-start gap-3 px-6 py-5"},(0,a.createElement)("img",{src:qQ,alt:"",className:"w-[31px] h-[31px] rounded-sm shrink-0"}),(0,a.createElement)(_h,{size:"md",tag:"h3",className:"tracking-[-0.1px]"},(0,z.__)("Summarized Report","cartflows"))),(0,a.createElement)("div",{className:"relative"},(0,a.createElement)("div",null,JQ.map((e,t)=>{const n=e.icon;return(0,a.createElement)("div",{key:t,className:"flex items-center gap-4 px-7 py-4"+(t<JQ.length-1?" border-b border-solid border-border-subtle":"")},(0,a.createElement)("div",{className:"flex items-center justify-center w-[50px] h-[56px] rounded-[28px] bg-background-primary shrink-0"},(0,a.createElement)(n,{className:"w-[30px] h-[30px] text-icon-secondary"})),(0,a.createElement)("div",{className:"flex flex-col gap-1"},(0,a.createElement)(_h,{size:"md",tag:"span",className:"tracking-[-0.1px]"},e.value),(0,a.createElement)(Ch,{size:16,color:"tertiary"},e.label)))})),(0,a.createElement)("div",{className:"border-t border-solid border-border-subtle px-7 py-4 flex items-center justify-center"},(0,a.createElement)("a",{href:"https://wordpress.org/plugins/woo-cart-abandonment-recovery/",target:"_blank",rel:"noreferrer",className:"flex items-center gap-1 no-underline"},(0,a.createElement)(LQ,{className:"w-[22px] h-[22px] text-primary-500"}),(0,a.createElement)(Ch,{size:18,weight:"medium",className:"text-primary-500"},(0,z.__)("View Detailed Report","cartflows")))),(0,a.createElement)("div",{className:"absolute inset-0 bg-background-primary/80 backdrop-blur-[2.5px] flex flex-col items-center justify-center gap-3 p-6"},(0,a.createElement)("img",{src:qQ,alt:"",className:"w-[38px] h-[38px] rounded-sm"}),(0,a.createElement)("div",{className:"flex flex-col items-center gap-1 text-center"},(0,a.createElement)(_h,{size:"sm",tag:"h4"},(0,z.__)("Recover Your Lost Revenue Now!","cartflows")),(0,a.createElement)(Ch,{size:14,color:"secondary"},(0,z.__)("Automatically convert abandoned carts into revenue.","cartflows"))),(0,a.createElement)(Wo,{tag:"a",href:"https://wordpress.org/plugins/woo-cart-abandonment-recovery/",target:"_blank",rel:"noreferrer",variant:"primary",size:"sm",icon:(0,a.createElement)(zp,null),iconPosition:"right",className:"no-underline"},(0,z.__)("Install to View Full Report","cartflows")))))};function eV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"}))}const tV=w.forwardRef(eV);function nV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"}))}const rV=w.forwardRef(nV);function oV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"}))}const aV=w.forwardRef(oV);function iV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"}))}const sV=w.forwardRef(iV);function lV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.59 14.37a6 6 0 0 1-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 0 0 6.16-12.12A14.98 14.98 0 0 0 9.631 8.41m5.96 5.96a14.926 14.926 0 0 1-5.841 2.58m-.119-8.54a6 6 0 0 0-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 0 0-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 0 1-2.448-2.448 14.9 14.9 0 0 1 .06-.312m-2.24 2.39a4.493 4.493 0 0 0-1.757 4.306 4.493 4.493 0 0 0 4.306-1.758M16.5 9a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Z"}))}const cV=w.forwardRef(lV),uV=[{icon:tV,label:(0,z.__)("Knowledge Base","cartflows"),href:getKbDocUrl("https://cartflows.com/docs")},{icon:rV,label:(0,z.__)("Help Center","cartflows"),href:getUtmUrl("https://cartflows.com/support",{utm_campaign:"support"})},{icon:aV,label:(0,z.__)("Join the Community","cartflows"),href:"https://www.facebook.com/groups/cartflows"},{icon:sV,label:(0,z.__)("Rate Us","cartflows"),href:"https://wordpress.org/support/plugin/cartflows/reviews/#new-post"}],dV=function(){const e=(cartflows_admin?.admin_base_url||"")+"index.php?page=cartflows-onboarding",t=[...cartflows_admin?.is_onboarding_completed?[]:[{icon:cV,label:(0,z.__)("Launch Setup","cartflows"),href:e,internal:!0}],...uV];return(0,a.createElement)("div",{className:"wcf-quick-access bg-background-primary border border-solid border-border-subtle rounded-lg shadow-sm p-3 flex flex-col gap-2"},(0,a.createElement)(Ch,{size:14,as:"h3",children:(0,z.__)("Quick Access","cartflows"),color:"primary",className:"p-1"}),(0,a.createElement)("div",{className:"flex flex-col gap-2 bg-field-primary-background p-1 rounded-lg"},t.map(({icon:e,label:t,href:n,internal:r})=>(0,a.createElement)("a",(0,N.A)({key:n,href:n},r?{}:{target:"_blank",rel:"noreferrer"},{className:"flex items-center gap-1 p-3 bg-background-primary rounded-md shadow-sm no-underline hover:bg-background-secondary transition-colors group/quick-access"}),(0,a.createElement)(e,{className:"size-4.5 text-icon-primary shrink-0"}),(0,a.createElement)(Ch,{size:14,weight:400,className:"px-1 group-hover/quick-access:text-link-primary-hover transition-colors"},t)))))},fV=function(){const[{setup_checklist_data:e}]=l(),t=!function(e){return Ph(e).every(e=>Object.values(e).every(e=>e.completed))}(e),n=!!cartflows_admin?.is_pro;return(0,a.createElement)("div",{className:"wcf-home-page-wrapper"},t&&(0,a.createElement)("div",{className:"wcf-col--row mb-6 md:mb-8"},(0,a.createElement)("div",{className:"wcf-col w-full"},(0,a.createElement)(Yh,null))),(0,a.createElement)("div",{className:"wcf-col--row flex flex-col lg:flex-row w-full gap-6 md:gap-8 justify-between"},(0,a.createElement)("div",{className:"wcf-col w-full flex flex-col gap-6 md:gap-8 lg:w-[64.5%]"},(0,a.createElement)(MQ,null),(0,a.createElement)(RQ,null),(0,a.createElement)(YQ,null)),(0,a.createElement)("div",{className:"wcf-col w-full flex flex-col gap-6 md:gap-8 lg:w-[33%]"},(0,a.createElement)("div",{className:"hidden"},!n&&(0,a.createElement)(KQ,null)),!n&&(0,a.createElement)(HQ,null),(0,a.createElement)(ZQ,null),(0,a.createElement)(dV,null))))},pV={xs:{general:"text-xs min-w-6 h-6",ellipse:"text-xs min-w-6",icon:"size-4"},sm:{general:"text-xs min-w-8 h-8",ellipse:"text-xs min-w-8",icon:"size-4"},md:{general:"text-sm min-w-10 h-10",ellipse:"text-sm min-w-10",icon:"size-5"},lg:{general:"text-base min-w-12 h-12",ellipse:"text-base min-w-12",icon:"size-6"}},mV="group disabled:border-field-border-disabled opacity-50",hV=(0,w.createContext)({size:"sm",disabled:!1}),gV=()=>(0,w.useContext)(hV),yV=({size:e="sm",disabled:t=!1,ariaLabel:n="Pagination",children:r,className:o,...a})=>(0,R.jsx)(hV.Provider,{value:{size:e,disabled:t},children:(0,R.jsx)("nav",{"aria-label":n,className:Le("flex w-full justify-center box-border m-0",o),...a,children:r})});yV.displayName="Pagination";const wV=(0,w.forwardRef)(({className:e,...t},n)=>(0,R.jsx)("ul",{ref:n,className:Le("m-0 p-0 w-full flex justify-center flex-row items-center gap-1","list-none",e),...t}));wV.displayName="Pagination.Content";const bV=(0,w.forwardRef)(({isActive:e=!1,ariaLabel:t,className:n,children:r,...o},a)=>{const{disabled:i}=gV();return(0,R.jsx)("li",{ref:a,className:Le("flex",i&&mV),children:(0,R.jsx)(vV,{isActive:e,disabled:i,"aria-label":t,className:n,...o,children:r})})});bV.displayName="Pagination.Item";const vV=({isActive:e=!1,tag:t="button",children:n,className:r,...o})=>{const{size:a,disabled:i}=gV(),s=e=>e.preventDefault();return(0,R.jsx)(Wo,{tag:t,size:a,variant:"ghost",className:Le("no-underline bg-transparent p-0 m-0 border-none","flex justify-center items-center rounded text-button-secondary","focus:outline focus:outline-1 focus:outline-border-subtle focus:bg-button-tertiary-hover",pV[a].general,!i&&e&&"text-button-primary active:text-button-primary bg-brand-background-50",i&&[mV,"group-disabled:text-field-color-disabled","focus:ring-transparent cursor-not-allowed"],r),disabled:i,...o,"aria-current":e?"page":void 0,onClick:e=>ze(o.onClick||(()=>{}),i?s:()=>{})(e),children:(0,R.jsx)("span",{className:"px-1 flex",children:n})})},xV=e=>{const{size:t,disabled:n}=gV();return(0,R.jsx)("li",{className:Le("flex",n&&mV),children:(0,R.jsx)(vV,{"aria-label":"Go to previous page",className:Le("[&>span]:flex [&>span]:items-center"),...e,children:(0,R.jsx)(rB,{className:Le(pV[t].icon)})})})};xV.displayName="Pagination.Previous";const NV=e=>{const{size:t,disabled:n}=gV();return(0,R.jsx)("li",{className:Le("flex",n&&mV),children:(0,R.jsx)(vV,{"aria-label":"Go to next page",className:Le("[&>span]:flex [&>span]:items-center"),...e,children:(0,R.jsx)(oB,{className:Le(pV[t].icon)})})})};NV.displayName="Pagination.Next";const EV=e=>{const{size:t,disabled:n}=gV();return(0,R.jsxs)("li",{className:Le("flex",n&&mV),children:[(0,R.jsx)("span",{className:Le("flex justify-center",pV[t].ellipse,n&&mV),"aria-hidden":"true",...e,children:"•••"}),(0,R.jsx)("span",{className:"sr-only",children:"More pages"})]})};EV.displayName="Pagination.Ellipsis",yV.Content=wV,yV.Item=bV,yV.Previous=xV,yV.Next=NV,yV.Ellipsis=EV;const MV=(e,t={})=>{const n={page:"cartflows",path:"flows"};return["post_status","s","mode","filter","from","to","per_page","paged"].forEach(t=>{const r=e.get(t);r&&(n[t]=r)}),Object.entries(t).forEach(([e,t])=>{null==t?delete n[e]:n[e]=t}),"?"+Object.entries(n).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&")},_V=[10,20,50,100],IV=function({currentPage:e,maxPages:t,perPage:n,onPerPageChange:r}){const[,o]=l(),i=new URLSearchParams((0,g.useLocation)().search),s=(0,g.useHistory)(),c=e=>{o({type:"SET_FLOWS",flows:null}),s.push({pathname:"admin.php",search:MV(i,{paged:e})})};if(1>=t)return"";const u=((e,t,n=1)=>{const r=2*n;if(r+5>=t)return Array.from({length:t},(e,t)=>t+1);const o=Math.max(e-n,1)>2,a=Math.min(e+n,t)<t-1,i=t,s=[];if(!o&&a){const e=3+r,t=Array.from({length:e},(e,t)=>t+1);s.push(...t,"ellipsis",i)}else if(o&&!a){const e=3+r,n=Array.from({length:e},(n,r)=>t-e+r+1);s.push(1,"ellipsis",...n)}else if(o&&a){const t=Array.from({length:r+1},(t,r)=>e-n+r);s.push(1,"ellipsis",...t,"ellipsis",i)}return s})(e,t);return(0,a.createElement)("div",{className:"flex items-center justify-between flex-wrap gap-4 w-full"},(0,a.createElement)("div",{className:"flex items-center gap-3"},(0,a.createElement)(Ch,{size:14,color:"secondary"},(0,z.__)("Page","cartflows")," ",e," ",(0,z.__)("out of","cartflows")," ",t),(0,a.createElement)("div",{className:"w-20"},(0,a.createElement)(kL,{value:n,onChange:r,size:"sm"},(0,a.createElement)(kL.Button,{render:e=>e}),(0,a.createElement)(kL.Options,{className:"z-999999"},_V.map(e=>(0,a.createElement)(kL.Option,{key:e,value:e},e)))))),(0,a.createElement)(yV,{className:"!w-fit",size:"sm"},(0,a.createElement)(yV.Content,null,(0,a.createElement)(yV.Previous,{onClick:()=>c(e-1),disabled:1===e,className:1===e?"opacity-50 text-text-tertiary cursor-not-allowed":""}),u.map((t,n)=>"ellipsis"===t?(0,a.createElement)(yV.Ellipsis,{key:`ellipsis-${n}`}):(0,a.createElement)(yV.Item,{key:t,isActive:e===t,onClick:()=>c(t)},t)),(0,a.createElement)(yV.Next,{onClick:()=>c(e+1),disabled:e===t,className:e===t?"opacity-50 text-text-tertiary cursor-not-allowed":""}))))};function SV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const jV=w.forwardRef(SV);function kV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const DV=w.forwardRef(kV);function CV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3"}))}const AV=w.forwardRef(CV),TV=Fo("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]),OV=Fo("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);function LV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const zV=w.forwardRef(LV),PV=({importBtnString:e="",open:t,setOpen:n,hideTrigger:r=!1})=>{const[o,i]=(0,a.useState)(!1),s=null!=t?t:o,l=null!=n?n:i,[c,u]=(0,a.useState)(!1),[d,f]=(0,a.useState)(null),[p,m]=(0,a.useState)({selectedFile:"",processText:(0,z.__)("Import Funnel","cartflows"),process:!1}),{selectedFile:h,process:g}=p;function y(){m({...p,selectedFile:""}),u(!1),f(null),l(!1)}const[w,b]=(0,a.useState)(!1),v=function(e){e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?b(!0):"dragleave"===e.type&&b(!1)};return(0,a.createElement)(a.Fragment,null,!r&&(0,a.createElement)(Wo,{variant:"outline",size:"sm",icon:(0,a.createElement)(KU,{className:"!size-3.5","aria-hidden":"true"}),iconPosition:"left",onClick:()=>l(!s)},e||(0,z.__)("Import","cartflows")),(0,a.createElement)(Im,{open:s,setOpen:e=>{e||y()},exitOnClickOutside:!1,className:"wcf-json-importer"},(0,a.createElement)(Im.Panel,{className:"sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,null,(0,z.__)("Import Funnel","cartflows")),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)("p",{className:"text-sm text-text-secondary mb-4"},(0,z.__)("You can specify a file to import by either dragging it into the drag and drop area.(Maximum file size of 5MB; .json file extensions only.)","cartflows")),(0,a.createElement)("form",{method:"post",encType:"multipart/form-data",onDragEnter:v},(0,a.createElement)("div",{className:"flex items-center justify-center w-full"},(0,a.createElement)("label",{htmlFor:"dropzone-file",className:vp()("flex flex-col items-center justify-center w-full border-2 border-border-subtle border-dashed rounded-lg cursor-pointer hover:border-border-strong",w?"bg-background-primary":"")},(0,a.createElement)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6"},(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6 text-text-tertiary","aria-hidden":"true"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})),(0,a.createElement)("p",{className:"mt-2 block text-sm font-medium text-text-primary"},(0,a.createElement)("span",{className:"font-semibold"},h?(0,z.__)("Change a file","cartflows"):(0,z.__)("Upload a file","cartflows"))," ",(0,z.__)("or drag and drop","cartflows")),(0,a.createElement)("p",{className:"mt-2 block text-xs font-normal text-text-secondary"},(0,z.__)("JSON file up to 5MB","cartflows"))),(0,a.createElement)("input",{id:"dropzone-file",type:"file",className:"hidden",accept:"application/JSON",name:"file",onChange:function(e){m({...p,selectedFile:e.target.files[0]})}}))),h&&(0,a.createElement)("div",{className:"rounded-md bg-alert-background-green p-4 mt-5"},(0,a.createElement)("div",{className:"flex items-center justify-between"},(0,a.createElement)("div",{className:"wcf-import-flow--file-info flex items-center gap-1"},(0,a.createElement)("div",{className:"flex-shrink-0"},(0,a.createElement)(zV,{className:"w-6 h-6 text-text-tertiary","aria-hidden":"true"})),(0,a.createElement)("div",{className:"wcf-import-flow--message"},(0,a.createElement)("p",{className:"text-sm font-medium text-support-success"},(0,z.sprintf)(/* translators: %s is replaced with the file name. */ /* translators: %s is replaced with the file name. */ |
| 14 |
(0,z.__)("File Selected: %s","cartflows"),h.name)))),(0,a.createElement)("div",{className:"wcf-import-flow--close-btn"},(0,a.createElement)("div",{className:"-mx-1.5 -my-1.5"},(0,a.createElement)("button",{type:"button",className:"inline-flex rounded-md bg-alert-background-green p-1.5 text-support-success hover:bg-alert-background-green focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2 focus:ring-offset-green-50",onClick:()=>{document.getElementById("dropzone-file").value=null,m({...p,selectedFile:null})}},(0,a.createElement)("span",{className:"sr-only"},"Dismiss"),(0,a.createElement)(jV,{className:"h-5 w-5","aria-hidden":"true"})))))),w&&(0,a.createElement)("div",{className:"absolute w-full h-full rounded-2xl inset-0",onDragEnter:v,onDragLeave:v,onDragOver:v,onDrop:function(e){e.preventDefault(),e.stopPropagation(),b(!1),e.dataTransfer.files&&e.dataTransfer.files[0]&&m({...p,selectedFile:e.dataTransfer.files[0]})}})),c&&(0,a.createElement)("div",{className:"mt-4 sm:flex sm:items-start"},(0,a.createElement)("div",{className:"mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-alert-background-danger sm:mx-0 sm:h-10 sm:w-10"},(0,a.createElement)(tQ,{className:"h-6 w-6 text-brand-600","aria-hidden":"true"})),(0,a.createElement)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},(0,a.createElement)("h3",{className:"text-lg font-medium leading-6 text-text-primary"},(0,z.__)("Replace Store Checkout Funnel?","cartflows")),(0,a.createElement)("div",{className:"mt-2"},(0,a.createElement)("p",{className:"text-sm text-text-secondary"},d?.message||(0,z.__)("A Store Checkout funnel already exists. Importing will replace the current Store Checkout funnel.","cartflows")))))),(0,a.createElement)(Im.Footer,{className:"flex gap-3 justify-end"},(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:y},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(Wo,{variant:"primary",size:"md",disabled:g,onClick:c?function(){if(!d)return;m({...p,process:!0,processText:(0,z.__)("Importing..","cartflows")});const e=new window.FormData;e.append("action","cartflows_import_json_flow"),e.append("security",cartflows_admin.import_json_flow_nonce),e.append("flow_data",JSON.stringify(d.flow_data)),e.append("check_store_checkout","yes"),e.append("force_import","yes"),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{m({...p,processText:"Redirecting..",process:!1}),cartflows_admin.admin_base_url?window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=store-checkout`:window.location=e.data.redirect_url})}:function(){if(!h||g)return;if("application/json"!==h.type)return void alert((0,z.__)("Please select the valid json file.","cartflows"));m({...p,process:!0,processText:(0,z.__)("Importing..","cartflows")});const e=new FileReader;e.readAsText(h,"UTF-8"),e.onload=e=>{let t=e.target.result;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){}const n=function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){return!1}return Array.isArray(e)?e.some(e=>"store-checkout"===e.flow_type):!(!e||"object"!=typeof e)&&"store-checkout"===e.flow_type}(t),r=new window.FormData;r.append("action","cartflows_import_json_flow"),r.append("security",cartflows_admin.import_json_flow_nonce),r.append("flow_data",t),r.append("check_store_checkout",n?"yes":"no"),L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(e=>{e.data.requires_confirmation?(f(e.data),u(!0),m({...p,process:!1,processText:(0,z.__)("Import Funnel","cartflows")})):(m({...p,processText:"Redirecting..",process:!1}),n&&cartflows_admin.admin_base_url?window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=store-checkout`:window.location=e.data.redirect_url)})}}},g&&(0,a.createElement)(aQ,null),!g&&(c?(0,z.__)("Replace & Import","cartflows"):p.processText))))))};function RV(e){if(e)return(0,a.createElement)(Im,{open:e.isOpen,setOpen:t=>{t||e.onClose()},exitOnClickOutside:!1,exitOnEsc:!1,className:"wcf-confirm-popup"},(0,a.createElement)(Im.Portal,null,(0,a.createElement)(Im.Panel,{className:"wcf-confirm-popup-wrapper !p-3 !gap-4"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)("div",{className:"flex gap-2.5 p-2"},(0,a.createElement)(Qo,{className:"w-6 h-6 text-support-warning shrink-0 mt-0.5","aria-hidden":"true"}),(0,a.createElement)("div",{className:"flex flex-col gap-1.5 flex-1 min-w-0"},(0,a.createElement)("div",{className:"flex items-center justify-between"},(0,a.createElement)(Im.Title,{className:"!text-lg"},e.title),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)("p",{className:"text-sm text-text-secondary m-0"},e.description))),(0,a.createElement)(Im.Footer,{className:"!p-2 flex gap-3 justify-end"},(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:e.onClose},e.cancelBtnText),(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:e.onConfirm,disabled:e.isLoading},e.isLoading?(0,a.createElement)(aQ,{className:"border-white border-r-transparent"}):e.actionBtnText)))))}const UV=(0,a.createContext)();function BV(){return(0,a.useContext)(UV)}const FV=function(e){const{bulk_actions:t,selected_ids:n}=e,[,r]=l(),[o,i]=(0,a.useState)(!1);let s=new URLSearchParams((0,g.useLocation)().search).get("paged");s||(s=1);const c=BV();return(0,a.createElement)(Eh,{direction:"row",align:"center",className:"gap-3"},t.map(t=>{const s="trash"===t.value||"delete_permanently"===t.value;return(0,a.createElement)(Eh.Item,{key:t.value},(0,a.createElement)(Wo,(0,N.A)({variant:"outline",size:"sm",icon:t.icon,iconPosition:"left",onClick:()=>async function(t){let o="",a="";const s=n.map(String);if(0===s.length||"-1"===t)return;const l=s.length,u={trash:(0,z.__)("Trash","cartflows"),restore:(0,z.__)("Restore","cartflows"),delete_permanently:(0,z.__)("Delete Permanently","cartflows"),draft:(0,z.__)("Draft","cartflows"),publish:(0,z.__)("Publish","cartflows"),export:(0,z.__)("Export","cartflows")}[t]||t.replace("_"," "),d={trash:(0,z._n)("Funnel trashed successfully!","Funnels trashed successfully!",l,"cartflows"),restore:(0,z._n)("Funnel restored successfully!","Funnels restored successfully!",l,"cartflows"),delete_permanently:(0,z._n)("Funnel deleted successfully!","Funnels deleted successfully!",l,"cartflows"),draft:(0,z._n)("Funnel moved to draft!","Funnels moved to draft!",l,"cartflows"),publish:(0,z._n)("Funnel published successfully!","Funnels published successfully!",l,"cartflows"),export:(0,z._n)("Funnel exported successfully!","Funnels exported successfully!",l,"cartflows")};if(!await c({title:(0,z.sprintf)( |
| 15 |
// translators: %s: action name. |
| 16 |
// translators: %s: action name. |
| 17 |
(0,z.__)("%s This Flow","cartflows"),u),description:(0,z.sprintf)( |
| 18 |
// translators: %s: action status name. |
| 19 |
// translators: %s: action status name. |
| 20 |
(0,z.__)("Do you want to %s this flow? Are you sure?","cartflows"),u),actionBtnText:(0,z.__)("Confirm","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")}))return;const f=new window.FormData;switch(i(!0),t){case"trash":o="cartflows_trash_flows_in_bulk",a=cartflows_admin.trash_flows_in_bulk_nonce,f.append("new_status","trash");break;case"restore":case"publish":o="cartflows_update_flow_post_status",a=cartflows_admin.update_flow_post_status_nonce,f.append("new_status","publish");break;case"delete_permanently":o="cartflows_delete_flows_permanently",a=cartflows_admin.delete_flows_permanently_nonce;break;case"draft":o="cartflows_update_flow_post_status",a=cartflows_admin.update_flow_post_status_nonce,f.append("new_status","draft");break;case"export":o="cartflows_export_flows_in_bulk",a=cartflows_admin.export_flows_in_bulk_nonce}f.append("action",o),f.append("security",a),f.append("flow_ids",[s]),L()({url:cartflows_admin.ajax_url,method:"POST",body:f}).then(n=>{if("export"===t&&n.success){const e=new Date,t="cartflows-flows-export-"+e.getDate()+"-"+(e.getMonth()+1)+"-"+e.getFullYear()+".json",r=JSON.stringify(n.data.flows),o=new Blob([r],{type:"application/json"});if(document.documentMode)window.navigator.msSaveOrOpenBlob(o,t);else{const e=document.createElement("a");e.href=URL.createObjectURL(o),e.download=t,e.click()}}if(i(!1),e.closeCallback(),n.success){const e=d[t];e&&Vm.success(e)}else Vm.error(n?.data?.message||(0,z.__)("Something went wrong.","cartflows"));r({type:"SET_FLOWS",flows:null})})}(t.value),disabled:o},s?{destructive:!0}:{}),t.label))}),o&&(0,a.createElement)(Eh.Item,null,(0,a.createElement)(vL,{variant:"primary",size:"sm"})))},YV=function({selectedIds:e=[],bulkActions:t=[],onClearSelection:n,flows_count:r=0}){const[{active_flows_count:o,trash_flows_count:i,draft_flows_count:s},c]=l(),u=(0,g.useHistory)(),d=new URLSearchParams((0,g.useLocation)().search),f=d.get("post_status"),p=d.get("s"),m=d.get("mode"),h=d.get("filter"),y=d.get("from"),w=d.get("to"),[b,v]=(0,a.useState)(p||""),[x,N]=(0,a.useState)(!1),[E,M]=(0,a.useState)({isProcessing:!1,buttonText:(0,z.__)("Export All","cartflows")});(0,a.useEffect)(()=>{v(p||"")},[p]);const _=""===r?"":" ("+r+")",I=f||"active_flow",S=!!f||!!p||!!m||"date"===h,j=e=>{c({type:"SET_FLOWS",flows:null}),u.push({pathname:"admin.php",search:MV(d,e)})},k=e=>{e?.preventDefault?.(),M({isProcessing:!0,buttonText:(0,z.__)("Exporting…","cartflows")});const t=new window.FormData;t.append("action","cartflows_export_all_flows"),t.append("security",cartflows_admin.export_all_flows_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(e=>{if(e.success){const t=new Date,n="cartflows-flows-export-"+t.getDate()+"-"+(t.getMonth()+1)+"-"+t.getFullYear()+".json";if(e.data.export){const t=JSON.stringify(e.data.flows),r=new Blob([t],{type:"application/json"});if(document.documentMode)window.navigator.msSaveOrOpenBlob(r,n);else{const e=document.createElement("a");e.href=URL.createObjectURL(r),e.download=n,e.click()}M({isProcessing:!1,buttonText:(0,z.__)("Export All","cartflows")})}}})},D=[{key:"active_flow",label:(0,z.sprintf)(/* translators: %d: count */ /* translators: %d: count */ |
| 21 |
(0,z.__)("Published (%d)","cartflows"),o)},{key:"draft",label:(0,z.sprintf)(/* translators: %d: count */ /* translators: %d: count */ |
| 22 |
(0,z.__)("Draft (%d)","cartflows"),s)},{key:"trash",label:(0,z.sprintf)(/* translators: %d: count */ /* translators: %d: count */ |
| 23 |
(0,z.__)("Trash (%d)","cartflows"),i)}];return e.length>0?(0,a.createElement)(Eh,{direction:"row",align:"center",wrap:"wrap",className:"gap-3"},(0,a.createElement)(Eh.Item,null,(0,a.createElement)(Ch,{size:14,color:"secondary",className:"whitespace-nowrap"},(0,z.sprintf)(/* translators: %d: number of selected items */ /* translators: %d: number of selected items */ |
| 24 |
(0,z.__)("%d selected","cartflows"),e.length))),(0,a.createElement)(FV,{bulk_actions:t,selected_ids:e,closeCallback:n})):(0,a.createElement)(Eh,{direction:"row",align:"center",justify:"end",wrap:"wrap",className:"gap-3"},S&&(0,a.createElement)(Eh.Item,null,(0,a.createElement)(Wo,{variant:"outline",size:"sm",onClick:()=>{c({type:"SET_FLOWS",flows:null});const e=d.get("per_page"),t={page:"cartflows",path:"flows"};e&&(t.per_page=e),u.push({pathname:"admin.php",search:"?"+Object.entries(t).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`).join("&")})},icon:(0,a.createElement)(jV,{className:"w-4 h-4"}),iconPosition:"left",className:"min-w-fit",destructive:!0},(0,z.__)("Clear Filters","cartflows"))),(0,a.createElement)(Eh.Item,null,(0,a.createElement)("div",{className:"min-w-[160px]"},(0,a.createElement)(kL,{key:`${o}-${s}-${i}`,value:I,onChange:e=>{j({post_status:"active_flow"===e?null:e,paged:null})},size:"sm"},(0,a.createElement)(kL.Button,null,(e=>{const t=D.find(t=>t.key===e);return t?t.label:(0,z.__)("All Funnels","cartflows")})(I)),(0,a.createElement)(kL.Options,{className:"z-999999"},D.map(e=>(0,a.createElement)(kL.Option,{key:e.key,value:e.key},e.label)))))),(0,a.createElement)(Eh.Item,null,(0,a.createElement)(vZ,{value:{startDate:y,endDate:w},onChangeCB:e=>{null!==e.startDate?j({filter:"date",from:e.startDate.toISOString(),to:e.endDate.toISOString(),paged:null}):j({filter:null,from:null,to:null,paged:null})},placeholder:(0,z.__)("Filter by Date","cartflows"),sectionClass:"",wrapperClass:"",fieldParentWrapperClass:""})),(0,a.createElement)(Eh.Item,null,(0,a.createElement)(Ym,{type:"text",size:"sm",placeholder:(0,z.__)("Search funnels…","cartflows"),value:b,onChange:v,onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),0!==b.length&&b.length<3||j({s:0===b.length?null:b,paged:null}))},prefix:(0,a.createElement)(DV,{className:"w-4 h-4 text-icon-secondary"}),className:"min-w-[200px]"})),(0,a.createElement)(Eh.Item,{className:"hidden lg:block"},(0,a.createElement)(PV,null)),(0,a.createElement)(Eh.Item,{className:"hidden lg:block"},(0,a.createElement)(Wo,{variant:"outline",size:"sm",icon:(0,a.createElement)(AV,{className:"!size-3.5"}),iconPosition:"left",loading:E.isProcessing,disabled:!(r>0)||E.isProcessing,onClick:r>0?k:()=>{}},E.isProcessing?E.buttonText:(0,z.__)("Export All","cartflows")+_)),(0,a.createElement)(Eh.Item,{className:"lg:hidden"},(0,a.createElement)(nm,{placement:"bottom-end"},(0,a.createElement)(nm.Trigger,null,(0,a.createElement)(Wo,{variant:"outline",size:"sm",icon:(0,a.createElement)(TV,{className:"size-4"}),"aria-label":(0,z.__)("More actions","cartflows")})),(0,a.createElement)(nm.ContentWrapper,{className:"z-999999"},(0,a.createElement)(nm.Content,{size:"sm",className:"min-w-[180px] bg-background-primary"},(0,a.createElement)(nm.List,null,(0,a.createElement)(nm.Item,{onClick:()=>N(!0)},(0,a.createElement)(Fm,null),(0,z.__)("Import","cartflows")),(0,a.createElement)(nm.Item,{disabled:!(r>0)||E.isProcessing,onClick:()=>k()},(0,a.createElement)(OV,null),E.isProcessing?E.buttonText:(0,z.__)("Export All","cartflows")+_))))),(0,a.createElement)(PV,{hideTrigger:!0,open:x,setOpen:N})))},ZV=function({flows_count:e,selectedIds:t,bulkActions:n,onClearSelection:r}){const[o,i]=(0,a.useState)("hide"),[s,l]=(0,a.useState)(""),[{page_builder:c}]=p();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Eh,{direction:"row",align:"center",justify:"between",wrap:"wrap",gap:"xs",className:"w-full"},(0,a.createElement)(Eh.Item,null,(0,a.createElement)(Eh,{direction:"row",align:"center",wrap:"nowrap",className:"gap-4 sm:gap-6"},(0,a.createElement)(Eh.Item,null,(0,a.createElement)("h1",{className:"text-xl whitespace-nowrap font-semibold text-text-primary leading-[30px] tracking-[-0.005em] m-0"},(0,z.__)("Funnels","cartflows"))),(0,a.createElement)(Eh.Item,null,(0,a.createElement)(Wo,{variant:"primary",size:"sm",tag:C,to:{pathname:"admin.php",search:"?page=cartflows&path=library"},icon:(0,a.createElement)(QU,{className:"w-4 h-4"}),iconPosition:"left",className:"no-underline",onClick:e=>{"bricks-builder"===c&&(e.preventDefault(),i("show"))}},(0,z.__)("Create New Funnel","cartflows"))))),(0,a.createElement)(Eh.Item,{className:"ml-auto"},(0,a.createElement)(YV,{selectedIds:t,bulkActions:n,onClearSelection:r,flows_count:e}))),(0,a.createElement)(th,{visibility:o,setVisibility:i,type:"blank",flowName:s,setFlowName:l}))},QV=window.moment;var VV=o.n(QV),WV=o(4601);function GV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"}))}const HV=w.forwardRef(GV);function $V({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15 15 6-6m0 0-6-6m6 6H9a6 6 0 0 0 0 12h3"}))}const XV=w.forwardRef($V);function qV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z"}),w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const JV=w.forwardRef(qV);function KV({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const eW=w.forwardRef(KV);function tW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const nW=w.forwardRef(tW);function rW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const oW=w.forwardRef(rW);function aW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75"}))}const iW=w.forwardRef(aW),sW=function({flow:e,selected:t,onChangeSelection:n}){const r=e.ID,o=e.post_title,i=e.actions,s="Publish"===e.post_status?(0,z.__)(" Published ","cartflows"):e.post_status,c=e.post_modified_gmt,u=e.flow_test_mode,d=e.step_count||0,f=void 0!==e.revenue?e.revenue:cartflows_admin.woo_currency+"0",[{active_flows_count:p},m]=l(),h=new URLSearchParams((0,g.useLocation)().search).get("post_status"),y=BV(),w=async e=>{if(e.preventDefault(),!await y({title:(0,z.__)("Trash Funnel","cartflows"),description:(0,z.__)("Do you really want to trash this funnel?","cartflows"),actionBtnText:(0,z.__)("Delete","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")}))return;const t=new window.FormData;t.append("action","cartflows_delete_flow"),t.append("security",cartflows_admin.delete_flow_nonce),t.append("flow_id",r),window.wcfAction="deleteFlow",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{Vm.success((0,z.__)("Funnel deleted successfully!","cartflows")),m({type:"SET_FLOWS",flows:null})}))},b=async e=>{if(e.preventDefault(),!await y({title:(0,z.__)("Restore Funnel","cartflows"),description:(0,z.__)("Do you really want to restore this funnel?","cartflows"),actionBtnText:(0,z.__)("Restore","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")}))return;const t=new window.FormData;t.append("action","cartflows_restore_flow"),t.append("security",cartflows_admin.restore_flow_nonce),t.append("flow_id",r),window.wcfAction="restoreFlow",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(e=>{e.success&&(Vm.success((0,z.__)("Funnel restored successfully!","cartflows")),m({type:"SET_FLOWS",flows:null}))}))};return(0,a.createElement)(SQ.Row,{key:r,selected:t,value:r,className:"hover:!bg-background-primary"},(0,a.createElement)(SQ.Cell,{className:"w-4 p-3 text-center"},(0,a.createElement)($O,{size:"sm",checked:t,onChange:e=>n(e,r),"aria-label":(0,z.__)("Select row","cartflows")})),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)("a",{className:"wcf-flow-row__link flex flex-col gap-1 no-underline cursor-pointer hover:text-link-primary",href:i?.edit.link,title:o},(0,a.createElement)("span",{className:"block text-sm font-medium text-text-primary hover:text-link-primary hover:underline"},function(){let e=ug(o,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length);return""===o&&(e=(0,z.__)("(no title)","cartflows")),"Draft"===s&&(e=(0,a.createElement)("span",{className:"wcf-draft-flow-title"},(0,a.createElement)("span",{className:"flex"},e,(0,a.createElement)(HV,{className:"h-5 w-5"}),(0,a.createElement)("span",{className:"wcf-draft-flow-status"},(0,z.__)("Draft","cartflows"))))),e}()),(0,a.createElement)("span",{className:"block text-[12px] font-normal text-text-secondary"},(0,z.sprintf)(/* translators: %d: number of steps */ /* translators: %d: number of steps */ |
| 25 |
(0,z.__)("(%d Steps)","cartflows"),d)))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)(ea,{content:(0,a.createElement)("span",null,(0,z.sprintf)(/* translators: %s date */ /* translators: %s date */ |
| 26 |
(0,z.__)("Last Modified: %s","cartflows"),c)),placement:"top",variant:"dark",arrow:!0,tooltipPortalId:"wcf-settings-app",className:"z-999999"},(0,a.createElement)("span",{className:"text-sm text-text-secondary"},VV().utc(c).local().startOf("seconds").fromNow()))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)(na,{label:u?(0,z.__)("Sandbox","cartflows"):(0,z.__)("Live","cartflows"),type:"pill",variant:u?"yellow":"green",size:"sm",className:"w-fit"})),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},"active"===cartflows_admin.woocommerce_status&&f?(0,a.createElement)("span",{className:"text-sm text-text-secondary"},Vh(f)):(0,a.createElement)(ea,{content:(0,z.__)("WooCommerce Required to display the revenue.","cartflows"),placement:"top",variant:"dark",arrow:!0,tooltipPortalId:"wcf-settings-app",className:"z-999999"},(0,a.createElement)("span",null,(0,a.createElement)(nW,{className:"w-18 h-18 stroke-2 text-support-error hover:text-text-error","aria-hidden":"true"})))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)("div",{className:"wcf-flow-row__action-btns flex relative items-center gap-2 justify-end"},("trash"===h?[{key:"restore",label:(0,z.__)("Restore Flow","cartflows"),icon:(0,a.createElement)(XV,{className:"size-4","aria-hidden":"true"}),onClick:b},{key:"delete",label:(0,z.__)("Delete Flow","cartflows"),icon:(0,a.createElement)(UU,{className:"size-4","aria-hidden":"true"}),onClick:w}]:[{key:"view",label:(0,z.__)("View Funnel","cartflows"),icon:(0,a.createElement)(JV,{className:"size-4","aria-hidden":"true"}),tag:"a",href:i?.view.link,extraProps:i?.view.attr},{key:"edit",label:(0,z.__)("Edit Funnel","cartflows"),icon:(0,a.createElement)(eW,{className:"size-4","aria-hidden":"true"}),tag:"a",href:i?.edit.link}]).map(e=>(0,a.createElement)(ea,{key:e.key,content:e.label,placement:"top",variant:"dark",arrow:!0,tooltipPortalId:"wcf-settings-app"},(0,a.createElement)(Wo,(0,N.A)({variant:"ghost",size:"xs",icon:e.icon,className:"p-1.5 text-text-primary [&>svg]:size-4"},e.tag?{tag:e.tag,href:e.href}:{},e.extraProps||{},{onClick:e.onClick})))),"trash"!==h&&(0,a.createElement)(nm,{placement:"bottom-end",className:"wcf-flow-row__actions-menu"},(0,a.createElement)(nm.Trigger,null,(0,a.createElement)(Wo,{className:"p-1.5",variant:"ghost",size:"xs","aria-label":(0,z.__)("More Options","cartflows"),icon:(0,a.createElement)(LU,{className:"size-4","aria-hidden":"true"})})),(0,a.createElement)(nm.ContentWrapper,{className:"z-50"},(0,a.createElement)(nm.Content,{className:"wcf-actions-menu__dropdown_menu",size:"sm"},(0,a.createElement)(nm.List,null,("draft"===h||"Draft"===s)&&(0,a.createElement)(nm.Item,{onClick:function(){const e=new window.FormData;e.append("new_status","publish"),e.append("action","cartflows_update_flow_post_status"),e.append("security",cartflows_admin.update_flow_post_status_nonce),e.append("flow_ids",[r]),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{Vm.success((0,z.__)("Funnel published successfully!","cartflows")),m({type:"SET_FLOWS",flows:null})})},className:"hover:bg-primary-25 hover:text-primary-600"},(0,a.createElement)(oW,{className:"size-4"}),(0,z.__)("Publish","cartflows")),(0,a.createElement)(nm.Item,{onClick:async e=>{if(e.preventDefault(),!wcfCartflowsPro()&&p>=3)return null;if(!await y({title:(0,z.__)("Duplicate Funnel","cartflows"),description:(0,z.__)("Do you really want to duplicate this funnel?","cartflows"),actionBtnText:(0,z.__)("Duplicate","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")}))return;const t=new window.FormData;t.append("action","cartflows_clone_flow"),t.append("security",cartflows_admin.clone_flow_nonce),t.append("id",r),window.wcfAction="cloneFlow",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{Vm.success((0,z.__)("Funnel cloned successfully!","cartflows")),m({type:"SET_FLOWS",flows:null})}))},disabled:!wcfCartflowsPro()&&p>=3,className:"hover:bg-primary-25 hover:text-primary-600 aria-disabled:text-text-on-button-disabled aria-disabled:hover:text-text-on-button-disabled aria-disabled:hover:bg-transparent"},(0,a.createElement)(iW,{className:"size-4"}),wcfCartflowsPro()||p<3?(0,z.__)("Duplicate","cartflows"):(0,z.__)("Duplicate (Pro)","cartflows")),(0,a.createElement)(nm.Item,{onClick:e=>{e.preventDefault();const t=new window.FormData;t.append("action","cartflows_export_flow"),t.append("security",cartflows_admin.export_flow_nonce),t.append("flow_id",r),window.wcfAction="exportFlow",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(e=>{if(e.success){const t=e.data.flow_name||`flow-${r}.json`,n=JSON.stringify(e.data.flows),o=new Blob([n],{type:"application/json"});if(document.documentMode)window.navigator.msSaveOrOpenBlob(o,t);else{const e=document.createElement("a");e.href=URL.createObjectURL(o),e.download=t,e.click()}Vm.success((0,z.__)("Funnel exported successfully!","cartflows"))}}))},className:"hover:bg-primary-25 hover:text-primary-600"},(0,a.createElement)(AV,{className:"size-4"}),(0,z.__)("Export","cartflows")),(0,a.createElement)(nm.Separator,null),"trash"!==h?(0,a.createElement)(nm.Item,{onClick:async e=>{if(e.preventDefault(),!await y({title:(0,z.__)("Trash Funnel","cartflows"),description:(0,z.__)("Do you really want to trash this Funnel?","cartflows"),actionBtnText:(0,z.__)("Trash","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")}))return;const t=new window.FormData;t.append("action","cartflows_trash_flow"),t.append("security",cartflows_admin.trash_flow_nonce),t.append("flow_id",r),window.wcfAction="deleteFlow",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(e=>{e.success&&(Vm.success((0,z.__)("Funnel trashed successfully!","cartflows")),m({type:"SET_FLOWS",flows:null}))}))},className:"hover:bg-alert-background-danger hover:text-support-error"},(0,a.createElement)(UU,{className:"size-4"}),(0,z.__)("Move to Trash","cartflows")):(0,a.createElement)(nm.Item,{onClick:b,className:"hover:bg-primary-25 hover:text-primary-600"},(0,a.createElement)(XV,{className:"size-4"}),(0,z.__)("Restore","cartflows")),"trash"===h&&(0,a.createElement)(nm.Item,{onClick:w,className:"hover:bg-alert-background-danger hover:text-support-error"},(0,a.createElement)(UU,{className:"size-4"}),(0,z.__)("Delete","cartflows")))))))))};function lW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"}))}const cW=w.forwardRef(lW);function uW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9.75v6.75m0 0-3-3m3 3 3-3m-8.25 6a4.5 4.5 0 0 1-1.41-8.775 5.25 5.25 0 0 1 10.233-2.33 3 3 0 0 1 3.758 3.848A3.752 3.752 0 0 1 18 19.5H6.75Z"}))}const dW=w.forwardRef(uW);function fW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const pW=w.forwardRef(fW),mW=o.p+"images/searching.d25c54d6.png",hW=function(){const[{flows_data:e,active_flows_count:t,draft_flows_count:n,trash_flows_count:r,flows_pagination:o},i]=l(),s=new URLSearchParams((0,g.useLocation)().search),c=(0,g.useHistory)();let u=s.get("paged");const d=s.get("post_status"),f=s.get("s"),m=s.get("filter"),h=s.get("mode"),y=parseInt(s.get("per_page"))||10,w=s.get("from"),b=s.get("to"),[v,x]=(0,a.useState)(!1),[N,E]=(0,a.useState)([]),[M,_]=(0,a.useState)("hide"),[I,S]=(0,a.useState)(""),[{page_builder:j}]=p(),k=(0,a.useRef)(!1),D=(0,a.useRef)(""),[A,T]=(0,a.useState)(0),O=[u,y,d,f,h,m,"date"===m?w:"","date"===m?b:""].join("|");let P=!0;(e||v)&&(P=!1),u||(u=1);const R=[{value:"draft",label:(0,z.__)("Draft","cartflows"),icon:(0,a.createElement)(cW,{className:"w-18 h-18 stroke-2","data-action":"draft"})},{value:"trash",label:(0,z.__)("Trash","cartflows"),icon:(0,a.createElement)(UU,{className:"w-18 h-18 stroke-2","data-action":"trash"})},{value:"export",label:(0,z.__)("Export","cartflows"),icon:(0,a.createElement)(dW,{className:"w-18 h-18 stroke-2","data-action":"export"})}],U=[{value:"restore",label:(0,z.__)("Restore","cartflows"),icon:(0,a.createElement)(XV,{className:"w-18 h-18 stroke-2","data-action":"restore"})},{value:"delete_permanently",label:(0,z.__)("Delete","cartflows"),icon:(0,a.createElement)(UU,{className:"w-18 h-18 stroke-2","data-action":"delete_permanently"})}],B=[{value:"publish",label:(0,z.__)("Publish","cartflows"),icon:(0,a.createElement)(oW,{className:"w-18 h-18 stroke-2","data-action":"publish"})},{value:"export",label:(0,z.__)("Export","cartflows"),icon:(0,a.createElement)(dW,{className:"w-18 h-18 stroke-2","data-action":"export"})},{value:"trash",label:(0,z.__)("Move to Trash","cartflows"),icon:(0,a.createElement)(UU,{className:"w-18 h-18 stroke-2","data-action":"trash"})},{value:"delete_permanently",label:(0,z.__)("Delete","cartflows"),icon:(0,a.createElement)(UU,{className:"w-18 h-18 stroke-2","data-action":"delete_permanently"})}];let F=[];"Publish"===d||null===d?F=R:"trash"===d?F=U:"draft"===d&&(F=B),(0,a.useEffect)(()=>{if(null!==e)return;if(D.current=O,k.current)return;k.current=!0,E([]);const t=O,n=new window.FormData;if(n.append("paged",u),n.append("per_page",y),d&&n.append("post_status",d),f&&n.append("s",f),h&&n.append("mode",h),"date"===m){const e=new Date(w),t=new Date(b);n.append("start_date",fg(e)),n.append("end_date",fg(t))}x(!1),(async()=>{L()({path:"/cartflows/v1/admin/flows/",method:"POST",body:n}).then(e=>{t===D.current&&(i({type:"SET_FLOWS_DATA",flows:e.items,pagination:e.pagination,found_posts:e.found_posts,active_flows_count:e.active_flows_count,trash_flows_count:e.trash_flows_count,draft_flows_count:e.draft_flows_count}),!1===e.status?x(!0):x(!1))}).finally(()=>{k.current=!1,t!==D.current&&T(e=>e+1)})})()},[e,O,A]);const Y=(e,t)=>{E(e?[...N,t]:N.filter(e=>e!==t))};if(!P&&0===t&&0===n&&0===r){const e=[(0,z.__)("One Click Upsells","cartflows"),(0,z.__)("Checkout Editor","cartflows"),(0,z.__)("Order Bumps","cartflows"),(0,z.__)("Dynamic Offers","cartflows"),(0,z.__)("A/B Split Testing","cartflows"),(0,z.__)("Cart Abandonment Recovery","cartflows"),(0,z.__)("Conversion Templates","cartflows"),(0,z.__)("Insights","cartflows")];return(0,a.createElement)("main",{className:"wcf-no-flows-found-screen"},(0,a.createElement)("div",{className:"grid grid-cols-1 gap-4 items-start lg:grid-cols-5 lg:gap-10 xl:gap-10 rounded-lg bg-background-primary overflow-hidden border-0.5 border-solid border-border-subtle shadow-sm p-5 md:p-10"},(0,a.createElement)("div",{className:"grid grid-cols-1 gap-4 lg:col-span-2 h-full"},(0,a.createElement)("div",{className:"wcf-video-container"},(0,a.createElement)("iframe",{className:"wcf-video rounded-md",src:"https://www.youtube.com/embed/tCm60PWOd0M?showinfo=0&autoplay=0&mute=0&rel=0",allow:"autoplay",title:"YouTube video player",frameBorder:"0",allowFullScreen:!0}))),(0,a.createElement)("div",{className:"grid grid-cols-1 gap-4 lg:col-span-3 h-full"},(0,a.createElement)("div",{className:"flex flex-col justify-center h-full"},(0,a.createElement)("h2",{className:"text-text-primary text-3xl pb-3 font-semibold text-left m-0"},(0,z.__)("Create your first funnel","cartflows")),(0,a.createElement)("p",{className:"text-base text-text-secondary pb-5 m-0"},(0,z.__)("Build a sales funnel with everything you need to generate leads and grow sales.","cartflows")),(0,a.createElement)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-2 pb-6"},e.map(e=>(0,a.createElement)("div",{key:e,className:"flex items-center gap-1.5 text-base text-field-label"},(0,a.createElement)(pW,{className:"w-3 h-3 stroke-2 text-text-tertiary flex-shrink-0"}),e))),(0,a.createElement)("span",{className:"relative z-0 inline-flex flex-col sm:flex-row justify-start items-center w-full gap-4"},(0,a.createElement)(Wo,{variant:"primary",size:"sm",tag:C,to:{pathname:"admin.php",search:"?page=cartflows&path=library"},icon:(0,a.createElement)(QU,{className:"w-18 h-18 stroke-2"}),iconPosition:"left",className:"no-underline",onClick:e=>{"bricks-builder"===j&&(e.preventDefault(),_("show"))}},(0,z.__)("Create Funnel","cartflows")),(0,a.createElement)("span",{className:"divider hidden sm:block w-px sm:h-9 bg-background-secondary"}),(0,a.createElement)(PV,{importBtnString:(0,z.__)("Import from JSON file","cartflows")}))))),(0,a.createElement)(th,{visibility:M,setVisibility:_,type:"blank",flowName:I,setFlowName:S}))}const Z=!P&&e&&0===e.length,Q=!P&&e&&e.length>0;return(0,a.createElement)("div",{className:"wcf-flows-page-wrapper flex flex-col gap-6"},(0,a.createElement)(Eh,{direction:"column",className:"rounded-xl bg-background-primary border-0.5 border-solid border-border-subtle shadow-sm-blur-2 p-4 gap-4"},(0,a.createElement)(Eh.Item,{className:"p-1"},(0,a.createElement)(ZV,{flows_count:t+n,selectedIds:N,bulkActions:F,onClearSelection:()=>E([])})),(0,a.createElement)(Eh.Item,{className:"border-t border-border-subtle"},Z&&(0,a.createElement)("div",{className:"wcf-no-flows-found text-center bg-background-primary px-4 py-10 md:p-20"},(0,a.createElement)("div",{className:"wcf-no-flows--content-block mx-auto max-w-2xl flex flex-col items-center gap-3"},(0,a.createElement)("img",{src:mW,alt:"",width:"120",height:"100"}),(0,a.createElement)("div",{className:"flex flex-col items-center gap-1"},(0,a.createElement)("p",{className:"text-lg font-semibold text-text-primary m-0"},null!==f?(0,z.sprintf)(/* translators: %s Search term */ /* translators: %s Search term */ |
| 27 |
(0,z.__)('No matching results found for the search term "%s".',"cartflows"),f):(0,z.__)("No funnels found for the selected filter.","cartflows")),(0,a.createElement)("p",{className:"text-sm text-text-tertiary m-0"},(0,z.__)("Please try using different keywords, date range, or filters to refine your results.","cartflows"))),(0,a.createElement)("div",{className:"wcf-no-flows--divider relative mt-3 mx-auto max-w-xs w-full"},(0,a.createElement)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true"},(0,a.createElement)("div",{className:"w-full border-t border-dashed border-border-subtle"})),(0,a.createElement)("div",{className:"relative flex justify-center"},(0,a.createElement)("span",{className:"bg-background-primary px-2 text-sm text-text-tertiary lowercase"},(0,z.__)("or","cartflows")))),(0,a.createElement)("div",{className:"mt-3"},(0,a.createElement)(Wo,{variant:"primary",size:"sm",tag:C,to:{pathname:"admin.php",search:"?page=cartflows&path=library"},icon:(0,a.createElement)(QU,{className:"w-18 h-18 stroke-2"}),iconPosition:"left",className:"no-underline"},(0,z.__)("Create New","cartflows"))))),(P||Q)&&(0,a.createElement)("div",{className:"wcf-flows-table bg-background-primary "+("trash"===d?"wcf-flows-table-trash":"")},(0,a.createElement)(SQ,null,(0,a.createElement)(SQ.Head,null,(0,a.createElement)(SQ.HeadCell,{className:"w-4 p-3 text-center"},(0,a.createElement)($O,{size:"sm",checked:!P&&N.length>0,indeterminate:!P&&N.length>0&&N.length<(e?.length||0),onChange:t=>{const n=N.length>0&&N.length<e.length;E(t||n?e.map(e=>e.ID):[])},"aria-label":N.length>0?(0,z.__)("Deselect all","cartflows"):(0,z.__)("Select all","cartflows")})),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Name","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Last Updated","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Mode","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Sales","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"w-[181px] text-right"},(0,z.__)("Actions","cartflows"))),(0,a.createElement)(SQ.Body,null,P?Array.from({length:10},(e,t)=>(0,a.createElement)(SQ.Row,{key:t,className:"relative"},(0,a.createElement)(SQ.Cell,{className:"w-4 p-3 text-center"},(0,a.createElement)(WO,{className:"mx-auto size-4 rounded-md"})),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)("div",{className:"flex flex-col gap-1.5"},(0,a.createElement)(WO,{className:"h-4 w-full rounded-md"}),(0,a.createElement)(WO,{className:"h-3 w-16 rounded-md"}))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)(WO,{className:"h-4 w-24 rounded-md"})),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)(WO,{className:"h-5 w-16 rounded-full"})),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)(WO,{className:"h-4 w-12 rounded-md"})),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap px-3 py-3"},(0,a.createElement)(WO,{className:"h-5 w-full rounded-md"})))):e&&e.map(e=>(0,a.createElement)(sW,{key:e.ID,flow:e,selected:N.includes(e.ID),onChangeSelection:Y}))),(P||parseInt(o?.max_pages)>1)&&(0,a.createElement)(SQ.Footer,{className:"flex flex-col md:flex-row md:justify-between"},P?(0,a.createElement)("div",{className:"w-full flex items-center justify-between"},(0,a.createElement)(WO,{className:"h-8 w-24 rounded-md"}),(0,a.createElement)(WO,{className:"h-8 w-32 rounded-md"})):(0,a.createElement)(IV,{currentPage:parseInt(u),maxPages:parseInt(o?.max_pages),perPage:y,onPerPageChange:e=>{i({type:"SET_FLOWS",flows:null});const t=new URLSearchParams;t.set("page","cartflows"),t.set("path","flows"),t.set("paged","1"),t.set("per_page",String(e)),d&&t.set("post_status",d),f&&t.set("s",f),h&&t.set("mode",h),"date"===m&&(t.set("filter","date"),t.set("from",s.get("from")),t.set("to",s.get("to"))),c.push({pathname:"admin.php",search:"?"+t.toString()})}})))))))},gW=Fo("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),yW=Fo("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),wW=(0,w.createContext)({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),bW=({children:e,className:t,onCollapseChange:n,collapsible:r=!0,borderOn:o=!0,collapsed:a=!1,...i})=>{const s=(0,w.useRef)(null),[l,c]=(0,w.useState)(()=>!r&&a?a:Fe("sidebar-collapsed")||(typeof window>"u"?a:window.innerWidth<1280));return(0,w.useEffect)(()=>{"function"==typeof n&&n(l)},[l,n]),(0,w.useEffect)(()=>{if(!r&&a)return;const e=()=>{const e=window.innerWidth<1280;if(r)if(e)c(!0),Be("sidebar-collapsed",!0);else{const e=Fe("sidebar-collapsed");c(e||!1)}else c(!1),(e=>{if(!(typeof window>"u"))try{localStorage.removeItem(e)}catch(e){console.error(e)}})("sidebar-collapsed")};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[r]),(0,R.jsx)(wW.Provider,{value:{isCollapsed:l,setIsCollapsed:c,collapsible:r},children:(0,R.jsx)("nav",{ref:s,"aria-label":"Sidebar",className:Le("h-full overflow-auto w-72 px-4 py-4 gap-4 flex flex-col bg-background-primary",o&&"border-0 border-r border-solid border-border-subtle","transition-all duration-200",l&&"w-16 px-2",t),...i,children:e})})};bW.displayName="Sidebar";const vW=({children:e})=>(0,R.jsx)("div",{className:"space-y-2",children:e});vW.displayName="Sidebar.Header";const xW=({children:e})=>(0,R.jsx)("div",{className:Le("space-y-4 grow items-start"),children:e});xW.displayName="Sidebar.Body";const NW=({children:e})=>{const{isCollapsed:t,setIsCollapsed:n,collapsible:r}=(0,w.useContext)(wW);return(0,R.jsxs)("div",{className:"space-y-4",children:[e,r&&(0,R.jsx)("button",{className:Le("bg-transparent w-full border-0 p-0 m-0 flex items-center gap-2 text-base cursor-pointer",t&&"justify-center"),onClick:()=>{n(!t),Be("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(ea,{title:"Expand",children:(0,R.jsx)(gW,{className:"size-5"})})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(yW,{className:"size-5"})," Collapse"]})})]})};NW.displayName="Sidebar.Footer";const EW=({children:e,className:t})=>(0,R.jsx)("div",{className:Le("w-full",t),children:e});EW.displayName="Sidebar.Item";const MW=Object.assign(bW,{Header:vW,Body:xW,Footer:NW,Item:EW}),_W=function(e){const{settings:t}=e,[{options:n}]=l();return(0,a.createElement)("table",{className:"wcf-global-settings-content-table w-full"},(0,a.createElement)("tbody",null,t?.fields&&Object.keys(t.fields).map(e=>{const r=t.fields[e],o=n[r.name]?n[r.name]:"",i=dg.isActiveControl(r,n);return(0,a.createElement)(JZ,{key:e,data:r,value:o,isActive:i,field:e})})))},IW=({type:e="simple",defaultValue:t=[],autoClose:n=!1,disabled:r=!1,children:o,className:a})=>{const[i,s]=(0,w.useState)(Array.isArray(t)?t:[t]);return(0,R.jsx)("div",{className:Le("boxed"===e?"space-y-3":"",a),children:w.Children.map(o,t=>{if(w.isValidElement(t)&&"value"in t.props){const o=!1!==t.props.collapsible,a=!o||i.includes(t.props.value);return w.cloneElement(t,{isOpen:a,onToggle:o?()=>(e=>{s(t=>n?t.includes(e)?[]:[e]:t.includes(e)?t.filter(t=>t!==e):[...t,e])})(t.props.value):void 0,type:e,disabled:r||t.props.disabled})}return t})})};IW.displayName="Accordion";const SW=({isOpen:e,onToggle:t,type:n="simple",disabled:r=!1,children:o,className:a})=>{const i=(0,w.useMemo)(()=>`accordion-content-${Bm()}`,[]),s=(0,w.useMemo)(()=>`accordion-trigger-${Bm()}`,[]),l={simple:"border-0",separator:"border-0 border-b border-solid border-border-subtle",boxed:"border border-solid border-border-subtle rounded-md"}[n];return(0,R.jsx)("div",{className:Le(l,a),children:w.Children.map(o,o=>w.isValidElement(o)?w.cloneElement(o,{isOpen:e,onToggle:t,type:n,disabled:r,contentId:i,triggerId:s}):o)})};SW.displayName="Accordion.Item";const jW=({onClick:e,onToggle:t,isOpen:n,iconType:r="arrow",collapsible:o=!0,disabled:a=!1,tag:i="h3",type:s="simple",children:l,className:c,contentId:u,triggerId:d,...f})=>{const p={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[s];return(0,R.jsx)(i,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:(0,R.jsxs)("button",{id:d,className:Le("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",p,a&&"cursor-not-allowed opacity-40",c),onClick:ze(e,!a&&o?t:void 0),"aria-expanded":n,"aria-controls":u,"aria-disabled":a,disabled:a,...f,children:[(0,R.jsx)("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:l}),o?"arrow"===r?(0,R.jsx)(Gp,{className:Le("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",n?"rotate-180":"rotate-0"),"aria-hidden":"true"}):"plus-minus"===r?(0,R.jsx)(op.span,{initial:{opacity:0,rotate:n?-180:0},animate:{opacity:1,rotate:n?0:180},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center flex-shrink-0 text-icon-secondary","aria-hidden":"true",children:n?(0,R.jsx)(HO,{}):(0,R.jsx)(zL,{})},n?"minus":"plus"):null:null]})})};jW.displayName="Accordion.Trigger";const kW=({isOpen:e,disabled:t=!1,type:n="simple",children:r,className:o,contentId:a,triggerId:i})=>{const s={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[n];return(0,R.jsx)("div",{className:Le("text-text-secondary w-full text-sm box-border",t&&"opacity-40",o),role:"region",id:a,"aria-labelledby":i,"aria-hidden":!e,children:(0,R.jsx)(Wp,{initial:!1,children:e&&(0,R.jsx)(op.div,{variants:{open:{height:"auto",opacity:1,overflow:"unset",transition:{overflow:{delay:1}}},closed:{height:0,opacity:0,overflow:"hidden"}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},children:(0,R.jsx)("div",{className:Le(s),children:r})},"content")})})};kW.displayName="Accordion.Content";const DW=Object.assign(IW,{Item:SW,Trigger:jW,Content:kW}),CW=o.p+"images/facebook.45f6105e.png",AW=o.p+"images/google.7d03dc5b.png",TW={_cartflows_facebook:CW,_cartflows_google_analytics:AW,_cartflows_google_auto_address:AW,_cartflows_tiktok:o.p+"images/tiktok-logo.ba162390.png",_cartflows_pinterest:o.p+"images/pinterest.63ab968b.png",_cartflows_google_ads:o.p+"images/googleads.b4896752.png",_cartflows_snapchat:o.p+"images/snapchat.b0f205c4.png"},OW=function({title:e,settings:t,meta_key:n}){const r=t.title.replace(/ /g,"_").toLowerCase(),o=t.title.replace(/ /g,"-").toLowerCase(),i=TW[n]||"";return(0,a.createElement)(DW,{type:"boxed",className:`wcf-${o} mb-5`},(0,a.createElement)(DW.Item,{value:r},(0,a.createElement)(DW.Trigger,{iconType:"arrow",onClick:e=>e.preventDefault()},(0,a.createElement)("div",{className:"flex items-center gap-2"},i&&(0,a.createElement)("img",{src:i,alt:e,className:"w-5 h-5 object-contain"}),(0,a.createElement)("span",{className:"text-base font-medium text-text-primary"},e))),(0,a.createElement)(DW.Content,null,(0,a.createElement)(_W,{settings:t,meta_key:n}))))};function LW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const zW=w.forwardRef(LW),PW=function({roles:e}){const[{options:t},n]=l();return(0,a.createElement)("div",{className:"wcf-user-role--container flex flex-col gap-2"},Object.keys(e).map(r=>{var o;const i=e[r],s=i?.fields?.["roles-structure"];if(!s)return null;const l=s.name,c=null!==(o=t[l])&&void 0!==o?o:"no_access";return(0,a.createElement)("div",{key:r,className:"wcf-user-role__row flex items-center justify-between gap-6 py-3 border-0 border-b border-solid border-border-subtle last:border-b-0"},(0,a.createElement)("div",{className:"wcf-user-role__name w-40 shrink-0 text-sm font-medium text-text-primary"},i.role_name),(0,a.createElement)("div",{className:"wcf-user-role__access"},(0,a.createElement)(vQ.Group,{activeItem:c,size:"sm",variant:"rounded",width:"auto",iconPosition:"right",onChange:({value:e})=>((e,t)=>{window.wcfUnsavedChanges=!0,n({type:"SET_OPTION",name:e,value:t})})(l,e.slug)},s.options.map(e=>(0,a.createElement)(vQ.Tab,{key:e.value,slug:e.value,text:e.label,type:"button",className:e.value===c?"ring-1 ring-brand-500 !bg-brand-25 !text-brand-600":"",icon:e.tooltip?(0,a.createElement)(ea,{content:e.tooltip,placement:"top",arrow:!0},(0,a.createElement)("span",{className:"inline-flex"},(0,a.createElement)(Yo,{className:"size-3.5 cursor-help "+(e.value===c?"text-brand-600":"text-text-tertiary")}))):null}))),(0,a.createElement)("input",{type:"hidden",name:l,value:c})))}),(0,a.createElement)(IZ,{content:(0,z.sprintf)( |
| 28 |
// translators: %1$s: link html start, %2$s: link html end |
| 29 |
// translators: %1$s: link html start, %2$s: link html end |
| 30 |
(0,z.__)("For more information about the user role manager settings please %1$sClick here.%2$s","cartflows"),`<a href="${getKbDocUrl("https://cartflows.com/docs/user-role-manager/",{utm_campaign:"user_role_manager"})}" class="text-brand-500 hover:text-brand-600" target="_blank">`,"</a>")}))};function RW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const UW=w.forwardRef(RW),BW=function({webhook:e,availableEvents:t,onSave:n,onCancel:r}){const o=!!e,[i,s]=(0,a.useState)(e?e.name:""),[l,c]=(0,a.useState)(e?e.url:""),[u,d]=(0,a.useState)(e&&e.events||[]),[f,p]=(0,a.useState)(!e||e.enabled),[m,h]=(0,a.useState)(e?e.max_retries:3),[g]=(0,a.useState)(e?e.secret:""),[y,w]=(0,a.useState)(!1),[b,v]=(0,a.useState)(""),[x,N]=(0,a.useState)(!1),E=Object.keys(t),M=E.length>0&&u.length===E.length;return(0,a.createElement)("div",{className:"wcf-webhook--container w-full"},(0,a.createElement)("div",{className:"wcf-back-to-webhooks-cta-container mb-6 flex flex-col gap-2 items-start"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",icon:(0,a.createElement)(UW,null),iconPosition:"left",onClick:r,className:"!p-0"},(0,z.__)("Back to Webhooks","cartflows")),(0,a.createElement)(_h,{tag:"h4",size:"sm",title:o?(0,z.__)("Edit Webhook","cartflows"):(0,z.__)("Add New Webhook","cartflows"),className:"[&_h4]:text-text-primary"})),b&&(0,a.createElement)("div",{className:"mb-4"},(0,a.createElement)(sQ,{variant:"error",design:"inline",content:b,onClose:()=>v("")})),(0,a.createElement)("div",{className:"wcf-webhook-wrapper"},(0,a.createElement)("div",{className:"wcf-webhook-fields-wrapper space-y-6"},(0,a.createElement)("div",{className:"wcf-field wcf-text-field text-left"},(0,a.createElement)("div",{className:"wcf-field__data flex flex-col items-start gap-2 justify-between"},(0,a.createElement)(yp,{tag:"label",size:"md",htmlFor:"webhook-name",className:"text-text-primary font-medium"},(0,z.__)("Name","cartflows")),(0,a.createElement)("div",{className:"w-full"},(0,a.createElement)(Ym,{id:"webhook-name",type:"text",size:"md",value:i,onChange:e=>s(e),placeholder:(0,z.__)("e.g. CRM Integration","cartflows")})))),(0,a.createElement)("div",{className:"wcf-field wcf-text-field text-left"},(0,a.createElement)("div",{className:"wcf-field__data flex flex-col items-start gap-2 justify-between"},(0,a.createElement)(yp,{tag:"label",size:"md",htmlFor:"webhook-endpoint-url",className:"text-text-primary font-medium"},(0,z.__)("Endpoint URL","cartflows")),(0,a.createElement)("div",{className:"w-full"},(0,a.createElement)(Ym,{id:"webhook-endpoint-url",type:"url",size:"md",value:l,onChange:e=>c(e),placeholder:"https://example.com/webhook"})))),(0,a.createElement)("div",{className:"wcf-field wcf-checkbox-field text-left"},(0,a.createElement)("div",{className:"wcf-field__data flex flex-col items-start gap-3 justify-between"},(0,a.createElement)("div",{className:"wcf-field__data--content-left"},(0,a.createElement)(yp,{tag:"span",size:"md",className:"text-text-primary font-medium"},(0,z.__)("Events","cartflows")),(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-secondary mt-1"},(0,z.__)("Select events that will trigger this webhook.","cartflows"))),(0,a.createElement)("div",{className:"wcf-field__data--content-right w-full"},(0,a.createElement)("div",{className:"mb-2 flex items-center"},(0,a.createElement)($O,{id:"webhook-select-all-events",checked:M,onChange:()=>{u.length===E.length?d([]):d(E)},size:"sm",label:{heading:(0,z.__)("Select All","cartflows")}})),(0,a.createElement)("div",{className:"flex flex-col gap-2 border border-solid border-border-subtle rounded-md p-3"},Object.entries(t).map(([e,t])=>(0,a.createElement)("div",{key:e,className:"flex items-center"},(0,a.createElement)($O,{id:`webhook-event-${e}`,checked:u.includes(e),onChange:()=>{return t=e,void(u.includes(t)?d(u.filter(e=>e!==t)):d([...u,t]));var t},size:"sm",label:{heading:t}}))))))),(0,a.createElement)("div",{className:"wcf-field wcf-toggle-field text-left"},(0,a.createElement)("div",{className:"wcf-field__data flex items-center gap-6 justify-between"},(0,a.createElement)(yp,{tag:"span",size:"md",className:"text-text-primary font-medium"},(0,z.__)("Enabled","cartflows")),(0,a.createElement)(nL,{id:"webhook-enabled",size:"sm",value:!!f,onChange:e=>p(e)}))),(0,a.createElement)("div",{className:"wcf-field wcf-text-field text-left"},(0,a.createElement)("div",{className:"wcf-field__data flex flex-col items-start gap-2 justify-between"},(0,a.createElement)("div",{className:"wcf-field__data--content-left"},(0,a.createElement)(yp,{tag:"label",size:"md",htmlFor:"webhook-max-retries",className:"text-text-primary font-medium"},(0,z.__)("Max Retries","cartflows")),(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-secondary mt-1"},(0,z.__)("Number of retry attempts for failed deliveries (0-5).","cartflows"))),(0,a.createElement)("div",{className:"w-full"},(0,a.createElement)(Ym,{id:"webhook-max-retries",type:"number",min:"0",max:"5",size:"md",value:String(m),onChange:e=>{const t=parseInt(e);h(Math.min(5,Math.max(0,Number.isNaN(t)?0:t)))}})))),o&&g&&(0,a.createElement)("div",{className:"wcf-field wcf-text-field text-left"},(0,a.createElement)("div",{className:"wcf-field__data flex flex-col items-start gap-2 justify-between"},(0,a.createElement)("div",{className:"wcf-field__data--content-left"},(0,a.createElement)(yp,{tag:"span",size:"md",className:"text-text-primary font-medium"},(0,z.__)("Secret Key","cartflows")),(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-secondary mt-1"},(0,z.__)("Used to sign webhook payloads (HMAC-SHA256).","cartflows"))),(0,a.createElement)("div",{className:"wcf-field__data--content-right w-full"},(0,a.createElement)("div",{className:"flex items-center gap-2"},(0,a.createElement)("code",{className:"text-xs bg-background-secondary px-3 py-2 rounded-md border border-solid border-border-subtle font-mono text-text-primary break-all"},g),(0,a.createElement)(Wo,{variant:"ghost",size:"xs",icon:(0,a.createElement)(cW,null),onClick:()=>{g&&(navigator.clipboard.writeText(g),N(!0),setTimeout(()=>N(!1),2e3))},"aria-label":(0,z.__)("Copy to clipboard","cartflows"),title:(0,z.__)("Copy to clipboard","cartflows")}),x&&(0,a.createElement)("span",{className:"text-xs text-support-success"},(0,z.__)("Copied!","cartflows"))))))),(0,a.createElement)("div",{className:"wcf-webhook-actions-wrapper flex items-center gap-3 mt-8 pt-6"},(0,a.createElement)(Wo,{variant:"primary",size:"sm",onClick:()=>{if(v(""),!i.trim())return void v((0,z.__)("Please enter a webhook name.","cartflows"));if(!l.trim())return void v((0,z.__)("Please enter a webhook URL.","cartflows"));try{new URL(l)}catch{return void v((0,z.__)("Please enter a valid URL.","cartflows"))}if(0===u.length)return void v((0,z.__)("Please select at least one event.","cartflows"));const t={name:i.trim(),url:l.trim(),events:u,enabled:f,max_retries:m},r=o?"/cartflows/v1/admin/webhooks/"+e.id:"/cartflows/v1/admin/webhooks/",a=o?"PUT":"POST";w(!0),L()({path:r,method:a,data:t}).then(e=>{e.success?n():v(e.message||(0,z.__)("Failed to save webhook.","cartflows"))}).catch(e=>{v(e.message||(0,z.__)("Something went wrong.","cartflows"))}).finally(()=>{w(!1)})},loading:y,disabled:y},o?(0,z.__)("Update Webhook","cartflows"):(0,z.__)("Create Webhook","cartflows")),(0,a.createElement)(Wo,{variant:"outline",size:"sm",onClick:r},(0,z.__)("Cancel","cartflows")))))};function FW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"}))}const YW=w.forwardRef(FW),ZW=function(){const e=BV(),[t,n]=(0,a.useState)([]),[r,o]=(0,a.useState)({}),[i,s]=(0,a.useState)(!0),[l,c]=(0,a.useState)(!1),[u,d]=(0,a.useState)(null),[f,p]=(0,a.useState)(null),[m,h]=(0,a.useState)(null),g=(0,a.useCallback)(()=>{s(!0),L()({path:"/cartflows/v1/admin/webhooks/"}).then(e=>{e.success&&n(e.webhooks||[]),s(!1)})},[]),y=(0,a.useCallback)(()=>{L()({path:"/cartflows/v1/admin/webhooks/events"}).then(e=>{e.success&&o(e.events||{})})},[]);(0,a.useEffect)(()=>{g(),y()},[g,y]);return l?(0,a.createElement)(BW,{webhook:u,availableEvents:r,onSave:()=>{c(!1),d(null),g()},onCancel:()=>{c(!1),d(null)}}):(0,a.createElement)("div",{className:"wcf-webhooks w-full"},(0,a.createElement)("div",{className:"flex items-start justify-between gap-4 mb-6"},(0,a.createElement)("div",{className:"flex flex-col gap-1"},(0,a.createElement)(_h,{tag:"h4",size:"sm",title:(0,z.__)("Webhooks","cartflows"),className:"[&_h4]:text-text-primary"})),(0,a.createElement)(Wo,{variant:"primary",size:"sm",icon:(0,a.createElement)(QU,null),iconPosition:"left",onClick:()=>{d(null),c(!0)},className:"whitespace-nowrap"},(0,z.__)("Add New Webhook","cartflows"))),i?(0,a.createElement)("div",{className:"flex items-center justify-center py-12"},(0,a.createElement)(Op,{className:"w-6 h-6 animate-spin text-text-tertiary"})):0===t.length?(0,a.createElement)("div",{className:"text-center py-4 border border-dashed border-border-subtle rounded-lg"},(0,a.createElement)("p",{className:"text-sm text-text-tertiary m-0"},(0,z.__)('No webhooks configured yet. Click "Add New Webhook" to get started.',"cartflows"))):(0,a.createElement)("div",{className:"overflow-x-auto"},(0,a.createElement)(SQ,{className:"min-w-full"},(0,a.createElement)(SQ.Head,null,(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Name","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("URL","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Events","cartflows")),(0,a.createElement)(SQ.HeadCell,null,(0,z.__)("Status","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"whitespace-nowrap"},(0,z.__)("Last Delivery","cartflows")),(0,a.createElement)(SQ.HeadCell,{className:"text-right"},(0,z.__)("Actions","cartflows"))),(0,a.createElement)(SQ.Body,null,t.map(t=>(0,a.createElement)(SQ.Row,{key:t.id},(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap font-medium text-text-primary"},t.name),(0,a.createElement)(SQ.Cell,{className:"text-text-secondary max-w-xs truncate"},t.url),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap text-text-secondary"},t.events?t.events.length:0," ",(0,z.__)("events","cartflows")),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},(0,a.createElement)(nL,{size:"sm",value:!!t.enabled,onChange:()=>(e=>{L()({path:"/cartflows/v1/admin/webhooks/"+e.id,method:"PUT",data:{enabled:!e.enabled}}).then(e=>{e.success&&g()})})(t)})),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap"},(0,a.createElement)("div",{className:"flex items-center gap-2"},(e=>{const t=e.last_delivery;return t&&t.status?"success"===t.status?(0,a.createElement)(na,{label:(0,z.__)("Success","cartflows"),type:"pill",variant:"green",size:"xs",disableHover:!0}):(0,a.createElement)("span",{title:t.error||""},(0,a.createElement)(na,{label:(0,z.__)("Failed","cartflows"),type:"pill",variant:"red",size:"xs",disableHover:!0})):(0,a.createElement)(na,{label:(0,z.__)("Never triggered","cartflows"),type:"pill",variant:"neutral",size:"xs",disableHover:!0})})(t),m&&m.id===t.id&&(0,a.createElement)("span",{className:"text-xs "+(m.success?"text-support-success":"text-support-error")},m.success?(0,z.__)("Test sent!","cartflows"):m.error))),(0,a.createElement)(SQ.Cell,{className:"whitespace-nowrap text-right"},(0,a.createElement)("div",{className:"flex items-center justify-end gap-1"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",icon:f===t.id?(0,a.createElement)(Op,{className:"animate-spin"}):(0,a.createElement)(YW,null),onClick:()=>(e=>{p(e),h(null),L()({path:"/cartflows/v1/admin/webhooks/"+e+"/test",method:"POST"}).then(t=>{p(null),h({id:e,success:t.success,response_code:t.response_code,error:t.error}),g(),setTimeout(()=>h(null),5e3)})})(t.id),disabled:f===t.id,"aria-label":(0,z.__)("Send Test","cartflows"),title:(0,z.__)("Send Test","cartflows")}),(0,a.createElement)(Wo,{variant:"ghost",size:"xs",icon:(0,a.createElement)(eW,null),onClick:()=>(e=>{d(e),c(!0)})(t),"aria-label":(0,z.__)("Edit","cartflows"),title:(0,z.__)("Edit","cartflows")}),(0,a.createElement)(Wo,{variant:"ghost",size:"xs",destructive:!0,icon:(0,a.createElement)(UU,null),onClick:()=>(async t=>{await e({title:(0,z.__)("Delete Webhook","cartflows"),description:(0,z.__)("Are you sure you want to delete this webhook?","cartflows"),actionBtnText:(0,z.__)("Delete","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")})&&L()({path:"/cartflows/v1/admin/webhooks/"+t,method:"DELETE"}).then(e=>{e.success&&g()})})(t.id),"aria-label":(0,z.__)("Delete","cartflows"),title:(0,z.__)("Delete","cartflows")})))))))))},QW=e=>{const{pluginName:t,isPopupOpen:n,setIsPopupOpen:r,previousVersionSelect:o,setIsConfirming:i}=e,[s,l]=(0,a.useState)(n);return(0,a.useEffect)(()=>{l(e=>e!==n?n:e)},[n]),(0,a.createElement)(Im,{open:s,setOpen:e=>{l(e),e||r(!1)},exitOnClickOutside:!1},(0,a.createElement)(Im.Panel,{className:"!p-3 !gap-4"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)("div",{className:"flex gap-2.5 p-2"},(0,a.createElement)(tQ,{className:"w-6 h-6 text-support-warning shrink-0 mt-0.5","aria-hidden":"true"}),(0,a.createElement)("div",{className:"flex flex-col gap-1.5 flex-1 min-w-0"},(0,a.createElement)("div",{className:"flex items-center justify-between"},(0,a.createElement)(Im.Title,{className:"!text-lg"},(0,z.__)("Rollback to Previous Version","cartflows")),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)("p",{className:"text-sm text-text-secondary m-0"},(0,z.sprintf)( |
| 31 |
// translators: %1$s is the selected product of CartFlows, %2$s is the selected version of CartFlows. |
| 32 |
// translators: %1$s is the selected product of CartFlows, %2$s is the selected version of CartFlows. |
| 33 |
(0,z.__)("Are you sure you want to rollback to %1$s v%2$s?","cartflows"),t,o)))),(0,a.createElement)(Im.Footer,{className:"!p-2 flex gap-3 justify-end"},(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:()=>{r(!1)}},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:()=>{const e=cartflows_admin.rollback_url.replace("VERSION",o);r(!1),i(!0),window.location.href=e}},(0,z.__)("Rollback","cartflows")))))},VW=()=>{const e=cartflows_admin.cartflows_previous_versions,[t,n]=(0,a.useState)(e[0].value),[r,o]=(0,a.useState)(!1),[i,s]=(0,a.useState)(!1),[l,c]=(0,a.useState)("");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("section",{className:"wcf-version-control py-2"},(0,a.createElement)("div",{className:"flex flex-col sm:flex-row gap-6 items-start sm:items-center justify-between"},(0,a.createElement)("div",{className:"wcf-version-control--content flex flex-col gap-1"},(0,a.createElement)("h3",{className:"text-base font-medium text-text-primary m-0"},(0,z.__)("Rollback to Previous Version","cartflows")),(0,a.createElement)("p",{className:"text-sm text-text-secondary m-0"},(0,z.__)("Experiencing an issue with the current version of Cartflows? Roll back to a previous version to help troubleshoot the problem.","cartflows"))),(0,a.createElement)("div",{className:"wcf-version-control--action flex gap-2 items-center shrink-0"},(0,a.createElement)(kL,{value:t,onChange:e=>n(e),size:"md"},(0,a.createElement)(kL.Button,{placeholder:t,className:"!w-24",type:"button"}),(0,a.createElement)(kL.Options,null,e.map(e=>(0,a.createElement)(kL.Option,{key:e.value,value:e.value},e.label)))),(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:()=>{c("CartFlows"),o(!0)},disabled:i,loading:i},(0,z.__)("Rollback","cartflows"))))),(0,a.createElement)(QW,{pluginName:l,isPopupOpen:r,setIsPopupOpen:o,previousVersionSelect:t,setIsConfirming:s}))},WW=({buttonLink:e,ctaText:t}={})=>{const[{license_status:n}]=p(),r=t||(0,z.__)("Upgrade to CartFlows Pro","cartflows"),o=new URLSearchParams((0,g.useLocation)().search).get("tab"),i=cartflows_admin.cf_pro_status;return wcfCartflowsTypePro()||"inactive"!==i||"pro"!==wcfInactivepluginType()?wcfCartflowsTypePlusPro()?"Activated"!==n?"analytics"===o?(0,a.createElement)($m,{buttonLink:e,title:r}):(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Jm,{title:(0,z.__)("Activate the License","cartflows")}))):null:wcfInactiveProPlus()?(0,a.createElement)(Hm,null):(0,a.createElement)($m,{buttonLink:e,title:r}):(0,a.createElement)(Hm,null)},GW=({title:e,description:t,buttonLink:n,onButtonClick:r,buttonText:o,className:i=""})=>(0,a.createElement)("div",{className:i},(0,a.createElement)(Eh,{direction:"row",align:"stretch",gap:"xs",className:"bg-brand-25 border border-solid border-brand-200 rounded-lg p-3 shadow-sm"},(0,a.createElement)(Eh,{direction:"row",align:"center",gap:"xs",className:"flex-1"},(0,a.createElement)(Eh,{direction:"column",gap:"xs",className:"flex-1"},(0,a.createElement)(Ch,{size:14,weight:600,color:"primary",lineHeight:20},e),(0,a.createElement)(Ch,{size:14,weight:400,color:"secondary",lineHeight:20},t)),(0,a.createElement)(Eh,{align:"center",gap:"xs",className:"shrink-0"},r?(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:r,className:"inline-flex items-center justify-center"},o||(0,z.__)("Upgrade to CartFlows Pro","cartflows")):(0,a.createElement)(WW,{buttonLink:n}))))),HW=()=>(0,a.createElement)(Ch,{size:"sm",color:"secondary"},(0,z.__)("Please update CartFlows Pro to the latest version to use this setting.","cartflows")),$W=function(e){const[{globaldata:t},n]=l(),[r,o]=(0,a.useState)(!1),[i,s]=(0,a.useState)((0,z.__)("Regenerate Now","cartflows")),[c,u]=(0,a.useState)({buttonText:(0,z.__)("Reset Settings","cartflows"),buttonProcess:!1}),{buttonText:d,buttonProcess:f}=c;let p=[],m="",h=[];switch(e.tab){case"general":p=t.settings.general,m="_cartflows_common";break;case"integrations":p.title="",m="";break;case"permalink":p=t.settings.permalink;break;case"other":p=t.settings.other;break;case"user_role_manager":p=t.settings.user_role_manager,m="_cartflows_common",h=p.roles;break;case"offer":p=t.settings.offer;break;case"webhooks":p=t.settings.webhooks;break;case"automations":p=t.settings.automations;break;case"version_control":p=t.settings.version_control;break;case"global_scripts":p=t.settings.global_scripts;break;case"checkout_links":break;default:p=t.general,m="_cartflows_common"}if("license"===e.tab){if(!wcfCartflowsPro())return null;const e=(0,P.applyFilters)("cartflows.settings.license",null);return e?(0,a.createElement)(e,null):(0,a.createElement)(HW,null)}const g=(0,P.applyFilters)("cartflows.settings.checkoutLinkGenerator",null),y=(0,P.applyFilters)("cartflows.settings.offer",null),w=(0,P.applyFilters)("cartflows.settings.generalProFields",null),b=(0,P.applyFilters)("cartflows.settings.permalinkProFields",null);let v=p;p?.fields&&("general"===e.tab&&w||"permalink"===e.tab&&b)&&(v={...p,fields:Object.fromEntries(Object.entries(p.fields).filter(([,e])=>!e.is_pro))});const x=v?.fields&&!("offer"===e.tab&&y);return(0,a.createElement)("div",{className:"wcf-general-settings h-full"},!wcfCartflowsPro()&&"offer"===e.tab&&(0,a.createElement)(GW,{title:(0,z.__)("Unlock Premium Features with CartFlows PRO!","cartflows"),description:(0,z.__)("Get the tools you need to create powerful sales funnels, increase conversions, and grow your business with ease.","cartflows")}),"integrations"===e.tab&&(0,a.createElement)("div",{className:"mx-auto max-w-7xl wcf-facebook-pixel-setting-wrapper"},(0,a.createElement)(OW,{title:(0,z.__)("Facebook Pixel","cartflows"),settings:t.settings["facebook-pixel"],meta_key:"_cartflows_facebook"}),(0,a.createElement)(OW,{title:(0,z.__)("Google Analytics Pixel","cartflows"),settings:t.settings["ga-analytics"],meta_key:"_cartflows_google_analytics"}),(0,a.createElement)(OW,{title:(0,z.__)("Google Ads Pixel","cartflows"),settings:t.settings["google-ads"],meta_key:"_cartflows_google_ads"}),(0,a.createElement)(OW,{title:(0,z.__)("Tiktok Pixel","cartflows"),settings:t.settings["tiktok-pixel"],meta_key:"_cartflows_tiktok"}),(0,a.createElement)(OW,{title:(0,z.__)("Pinterest Tag","cartflows"),settings:t.settings["pinterest-tag"],meta_key:"_cartflows_pinterest"}),(0,a.createElement)(OW,{title:(0,z.__)("Snapchat Pixel","cartflows"),settings:t.settings["snapchat-pixel"],meta_key:"_cartflows_snapchat"}),(0,a.createElement)(OW,{title:(0,z.__)("Google Auto Address","cartflows"),settings:t.settings["g-address-autocomplete"],meta_key:"_cartflows_google_auto_address"})),"other"===e.tab&&(0,a.createElement)("div",{className:"wcf-field wcf-re-generate-css-field pb-2"},(0,a.createElement)("div",{className:"wcf-field__data flex items-center gap-6 justify-between"},(0,a.createElement)("div",{className:"wcf-field__data--content-left flex-1 min-w-0"},(0,a.createElement)("div",{className:"wcf-field__data--label text-base font-medium text-left text-text-primary"},(0,a.createElement)("label",null,(0,z.__)("Regenerate Inline CSS","cartflows"))),(0,a.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-secondary mt-2"},Vh((0,z.sprintf)( |
| 34 |
// translators: %1$1s: link html start, %2$2s: link html end |
| 35 |
// translators: %1$1s: link html start, %2$2s: link html end |
| 36 |
(0,z.__)("If you are using the CartFlows Shortcode and using the Design Settings, then this option will regenerate the steps inline CSS. To learn more, %1$1s Click here %2$2s.","cartflows"),`<a href="${getKbDocUrl("https://cartflows.com/docs/regenerate-the-steps-dynamic-css-for-shortcodes/")}" target="_blank">`,"</a>")))),(0,a.createElement)("div",{className:"wcf-field__data--content-right shrink-0"},(0,a.createElement)(Wo,{variant:"outline",size:"sm",type:"button",icon:(0,a.createElement)(Op,{className:"w-4 h-4 stroke-2"}),loading:r,disabled:r,onClick:function(e){e.preventDefault(),s((0,z.__)(" Regenerating….","cartflows")),o(!0);const t=new window.FormData;t.append("action","cartflows_regenerate_css_for_steps"),t.append("security",cartflows_admin.regenerate_css_for_steps_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(t=>{t.success&&(s((0,z.__)("Regenerated","cartflows")),setTimeout(()=>{s((0,z.__)("Regenerate Now","cartflows"))},3e3),o(!1),e.target.blur())})}},i)))),"webhooks"===e.tab&&(0,a.createElement)(ZW,null),"version_control"===e.tab&&(0,a.createElement)(VW,null),"user_role_manager"===e.tab&&(0,a.createElement)(PW,{roles:h}),"checkout_links"===e.tab&&(g?(0,a.createElement)(g,null):(0,a.createElement)(HW,null)),"permalink"===e.tab&&(0,a.createElement)("div",{className:"wcf-field wcf-permalink-reset-field"},(0,a.createElement)("div",{className:"wcf-field__data flex items-center gap-6 justify-between"},(0,a.createElement)("div",{className:"wcf-field__data--content-left flex-1 min-w-0"},(0,a.createElement)("div",{className:"wcf-field__data--label text-base font-medium text-left text-text-primary"},(0,a.createElement)("label",null,(0,z.__)("Permalink Structure","cartflows")))),(0,a.createElement)("div",{className:"wcf-field__data--content-right shrink-0"},(0,a.createElement)(Wo,{name:"reset",id:"reset",variant:"outline",size:"sm",type:"submit",icon:"saved"===f?(0,a.createElement)(zW,{className:"w-4 h-4 stroke-2"}):(0,a.createElement)(Op,{className:"w-4 h-4 stroke-2"}),loading:"processing"===f,disabled:"processing"===f,onClick:function(e){e.preventDefault(),u({buttonText:(0,z.__)("Updating","cartflows"),buttonProcess:"processing"});const t=new window.FormData;t.append("action","cartflows_save_global_settings"),t.append("security",cartflows_admin.save_global_settings_nonce),t.append("setting_tab","permalink"),t.append("reset",!0),L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{L()({path:"/cartflows/v1/admin/commonsettings/"}).then(e=>{n({type:"SET_SETTINGS",commondata:e})}),u({buttonText:(0,z.__)("Reset successfully","cartflows"),buttonProcess:"saved"}),setTimeout(()=>{u({buttonText:(0,z.__)("Reset Settings","cartflows"),buttonProcess:!1})},3e3)})}},d)))),x&&(0,a.createElement)("div",{className:"wcf-general-settings--table-wrapper"},(0,a.createElement)(_W,{settings:v,meta_key:m})),"offer"===e.tab&&y&&(0,a.createElement)("div",{className:"wcf-general-settings--table-wrapper"},(0,a.createElement)(y,null)),"general"===e.tab&&w&&(0,a.createElement)("div",{className:"wcf-general-settings--table-wrapper"},(0,a.createElement)(w,null)),"permalink"===e.tab&&b&&(0,a.createElement)("div",{className:"wcf-general-settings--table-wrapper"},(0,a.createElement)(b,null)),"permalink"===e.tab&&(0,a.createElement)(IZ,{content:(0,z.sprintf)( |
| 37 |
// translators: %1$s: link html start, %2$s: link html end |
| 38 |
// translators: %1$s: link html start, %2$s: link html end |
| 39 |
(0,z.__)("For more information about the CartFlows Permalink settings please %1$sClick here.%2$s","cartflows"),`<a href="${getKbDocUrl("https://cartflows.com/docs/cartflows-permalink-settings/")}" target="_blank">`,"</a>")}))},XW=({title:e,description:t,actions:n=null,afterHeader:r=null,cardWrapper:o=!0,fullWidth:i=!1,children:s})=>(0,a.createElement)("div",{className:"flex-1 min-w-0 flex flex-col gap-6 mt-8 "+(i?"w-full pr-6 md:pr-8":"max-w-[45rem] mx-auto")},(0,a.createElement)(Eh,{direction:"column",className:"gap-3"},(0,a.createElement)("div",{className:"flex items-start justify-between gap-3"},(0,a.createElement)(Eh,{direction:"column",className:"gap-0.5 flex-1 min-w-0"},e&&(0,a.createElement)(_h,{tag:"h4",size:"sm",title:e,className:"[&_h4]:text-text-primary"}),t&&(0,a.createElement)(Ch,{size:14,weight:400,color:"secondary"},t)),n&&(0,a.createElement)("div",{className:"shrink-0 flex items-center"},n)),r),o?(0,a.createElement)("div",{className:"bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm p-6"},s):s),qW=function(){return(0,a.createElement)("div",{className:"wcf-settings-page flex gap-6 items-start -m-6 md:-m-8"},(0,a.createElement)("div",{className:"h-full min-h-screen flex flex-col w-auto sticky top-0 lg:top-4 sidebar after:content-[''] after:fixed after:left-0 after:top-0 after:w-16 lg:after:w-[420px] after:h-screen after:bg-background-primary after:-z-10"},(0,a.createElement)("div",{className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none box-border flex-grow bg-background-primary border-0 border-r border-solid border-border-subtle"},(0,a.createElement)("div",{className:"flex flex-col gap-5"},[["w-16",["w-16"]],["w-28",["w-20","w-14","w-24","w-32"]],["w-40",["w-24","w-24"]],["w-20",["w-28","w-20"]]].map(([e,t],n)=>(0,a.createElement)("div",{key:n,className:"flex flex-col"},(0,a.createElement)(WO,{className:`${e} h-2.5 mb-2 lg:block hidden`}),(0,a.createElement)("div",{className:"flex flex-col gap-0.5"},t.map((e,t)=>(0,a.createElement)("div",{key:t,className:"flex items-center gap-2.5 px-3 py-2 lg:justify-start justify-center"},(0,a.createElement)(WO,{className:"w-5 h-5 rounded"}),(0,a.createElement)(WO,{className:`h-3 ${e} lg:block hidden`}))))))))),(0,a.createElement)("div",{className:"flex-1 min-w-0 flex flex-col gap-6 max-w-[43.5rem] mx-auto mt-8"},(0,a.createElement)("div",{className:"flex justify-between items-center"},(0,a.createElement)(WO,{className:"w-28 h-5"}),(0,a.createElement)(WO,{className:"w-28 h-8 rounded-lg"})),(0,a.createElement)("div",{className:"bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm p-6 flex flex-col gap-6"},["w-32","w-40","w-28","w-36"].map((e,t)=>(0,a.createElement)("div",{key:t,className:"flex flex-col gap-2"},(0,a.createElement)(WO,{className:`${e} h-3.5`}),(0,a.createElement)(WO,{className:"w-full h-10"}))))))};function JW(){const[{options:e},t]=l(),n=function(n){const{name:r,value:o}=n.detail;void 0!==e[r]&&(window.wcfUnsavedChanges=!0,t({type:"SET_OPTION",name:r,value:o}))},r=[{type:"select"},{type:"select2"},{type:"checkbox"},{type:"text"},{type:"textarea"},{type:"code"},{type:"number"},{type:"radio"},{type:"color"},{type:"font"},{type:"product"},{type:"coupon"},{type:"toggle"},{type:"selectioncard"}];(0,a.useEffect)(()=>(e&&r.map(function(e){return document.addEventListener(`wcf:${e.type}:change`,n),""}),()=>{r.map(function(e){return document.removeEventListener(`wcf:${e.type}:change`,n),""})}),[e])}function KW({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 0 1 3 3m3 0a6 6 0 0 1-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1 1 21.75 8.25Z"}))}const eG=w.forwardRef(KW);function tG({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z"}))}const nG=w.forwardRef(tG);function rG({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.19 8.688a4.5 4.5 0 0 1 1.242 7.244l-4.5 4.5a4.5 4.5 0 0 1-6.364-6.364l1.757-1.757m13.35-.622 1.757-1.757a4.5 4.5 0 0 0-6.364-6.364l-4.5 4.5a4.5 4.5 0 0 0 1.242 7.244"}))}const oG=w.forwardRef(rG);function aG({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const iG=w.forwardRef(aG);function sG({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m3.75 13.5 10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75Z"}))}const lG=w.forwardRef(sG);function cG({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"}))}const uG=w.forwardRef(cG);function dG({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.348 14.652a3.75 3.75 0 0 1 0-5.304m5.304 0a3.75 3.75 0 0 1 0 5.304m-7.425 2.121a6.75 6.75 0 0 1 0-9.546m9.546 0a6.75 6.75 0 0 1 0 9.546M5.106 18.894c-3.808-3.807-3.808-9.98 0-13.788m13.788 0c3.808 3.807 3.808 9.98 0 13.788M12 12h.008v.008H12V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const fG=w.forwardRef(dG);function pG({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"}))}const mG=w.forwardRef(pG);function hG({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const gG=w.forwardRef(hG),yG=function(e){const{fontSize:t,width:n,style:r}=e;return(0,a.createElement)("div",{className:"wcf-skeleton bg-background-secondary block leading-5 wcf-skeleton--text wcf-skeleton--wave",style:{fontSize:t,width:n,...r}})},wG=function(e){const{height:t,style:n}=e;return(0,a.createElement)("div",{className:"wcf-skeleton-base wcf-skeleton--spacer h-6",style:{height:t,...n}})},bG=function(e){const{width:t,height:n,style:r}=e;return(0,a.createElement)("div",{className:"wcf-skeleton block leading-5 wcf-skeleton--rect bg-background-secondary rounded-md animate-pulse",style:{width:t,height:n,...r}})},vG=()=>(0,a.createElement)("div",{className:"bg-background-secondary rounded w-full flex justify-center items-center mb-4 border border-border-subtle h-[70vh]"},(0,a.createElement)("div",{className:"flex items-center justify-center flex-col w-3/4"},(0,a.createElement)(yG,{fontSize:"25px",width:"300px",style:{marginBottom:"10px"}}),(0,a.createElement)(yG,{width:"80%",fontSize:"15px",style:{marginBottom:"5px"}}),(0,a.createElement)(yG,{width:"80%",fontSize:"15px",style:{marginBottom:"5px"}}),(0,a.createElement)(yG,{width:"65%",fontSize:"15px",style:{marginBottom:"5px"}}),(0,a.createElement)(wG,{height:"10px"}),(0,a.createElement)(yG,{width:"60%",fontSize:"15px",style:{marginBottom:"5px"}}),(0,a.createElement)(yG,{width:"50%",fontSize:"15px",style:{marginBottom:"5px"}}),(0,a.createElement)(yG,{width:"35%",fontSize:"15px",style:{marginBottom:"5px"}}))),xG=o.p+"images/ottokit_banner.030a4b67.png",NG=({sureTriggersStatus:e,setSureTriggersStatus:t,sureTriggersConnected:n,setSureTriggersConnected:r})=>{const[{globaldata:o},i]=l(),[s,c]=(0,a.useState)(!0),[u,d]=(0,a.useState)(!1),f=[(0,z.__)("Send orders to 100+ popular apps.","cartflows"),(0,z.__)("Build automated workflows that run instantly.","cartflows"),(0,z.__)("Create custom app integrations using our Custom App feature.","cartflows"),(0,z.__)("Keep your tools in sync automatically.","cartflows")],p=e=>{e&&(r(!0),i({type:"SET_SURETRIGGERS_CONFIG",config:e}),c(!1))};(0,a.useEffect)(()=>{const e=o?.settings?.automations;if(e){const t=e?.suretriggers;if(t){const e=t.connected;n||r(e),n&&t.data&&p(t.data)}c(!1)}},[o,n]);const m=e=>{t("activating"),d(!0);const n=new window.FormData;n.append("action","cartflows_activate_plugin"),n.append("init",e),n.append("security",cartflows_admin.activate_plugin_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(e=>{d(!1),e.data&&e.data.success?t("active"):t("fail")})},h=()=>{const e=new window.FormData;e.append("action","cartflows_get_suretriggers_data"),e.append("security",cartflows_admin.get_suretriggers_data_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(r=>{if(r&&r?.success)if(t("active"),d(!1),r?.data?.connected)p(r?.data?.data);else{const o={width:800,height:720},a={left:(screen.width-o.width)/2,top:(screen.height-o.height)/2},i=window.open(r?.data?.redirection,"",`width=${o.width},height=${o.height},top=${a.top},left=${a.left},scrollbars=0`);let s=0;const l=setInterval(()=>{t("connecting"),d(!0),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.success?e?.data?.connected&&(i.close(),clearInterval(l),n||(t("active"),p(e?.data?.data)),d(!1)):s++}),(s>=240||i.closed)&&(i.closed||i.close(),clearInterval(l),t("active"),d(!1))},500)}else t("fail")})};let g;return g=s?(0,a.createElement)(vG,null):(0,a.createElement)("div",{className:"bg-background-primary border border-solid border-border-subtle rounded-lg shadow-sm p-4 mt-8 mr-6"},(0,a.createElement)("div",{className:"bg-background-secondary p-2"},(0,a.createElement)("div",{className:"flex flex-col md:flex-row gap-10 items-center bg-background-primary p-6"},(0,a.createElement)("div",{className:"flex-shrink-0 aspect-square rounded-lg overflow-hidden flex items-center justify-center"},(0,a.createElement)("img",{src:xG,alt:"OttoKit",className:"w-[300px]"})),(0,a.createElement)("div",{className:"flex-1 flex flex-col gap-4"},(0,a.createElement)(_h,{tag:"h2",size:"md",title:(0,z.__)("Automate Your Funnels with OttoKit","cartflows")}),(0,a.createElement)("p",{className:"m-0 text-base leading-6 text-text-secondary"},(0,z.__)("Every order should trigger something — a Slack alert, a CRM lead, a follow-up email, or a new row in Google Sheets.","cartflows")),(0,a.createElement)("ul",{className:"list-disc pl-5 m-0 space-y-2 text-base leading-6 text-text-secondary marker:text-text-tertiary"},f.map((e,t)=>(0,a.createElement)("li",{key:t},e))),(0,a.createElement)("div",{className:"pt-2"},n?(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:()=>window.open("https://app.ottokit.com/recipes?page=1&search=cartflows","_blank","noopener,noreferrer")},(0,z.__)("Open Settings","cartflows")):(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:function(r){if(r.preventDefault(),"not-installed"===e){t("installing"),d(!0);const e=new window.FormData;e.append("action","cartflows_install_plugin"),e.append("slug","suretriggers"),e.append("_ajax_nonce",cartflows_admin.plugin_installer_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.success?m("suretriggers/suretriggers.php"):(d(!1),t("fail"))})}else"active"!==e?m("suretriggers/suretriggers.php"):"active"!==e||n||h()},disabled:u},u&&(0,a.createElement)(aQ,{className:"!border-[#172A39] !border-r-transparent"}),function(e){let t="";switch(e){case"active":t=n?(0,z.__)("Activated","cartflows"):(0,z.__)("Connect Your Website","cartflows");break;case"inactive":t=(0,z.__)("Activate","cartflows");break;case"not-installed":t=(0,z.__)("Install OttoKit for Free","cartflows");break;case"installing":t=(0,z.__)("Installing…","cartflows");break;case"activating":t=(0,z.__)("Activating…","cartflows");break;case"fail":t=(0,z.__)("Failed","cartflows");break;case"reload":t=(0,z.__)("Reloading","cartflows");break;case"connect":t=(0,z.__)("Connect Your Website","cartflows");break;case"connecting":t=(0,z.__)("Connecting","cartflows");break;default:t=(0,z.__)("Install","cartflows")}return t}(e))))))),(0,a.createElement)("section",{"aria-labelledby":(0,z.__)("Automations","cartflows")},g)},EG=function(){const[{globaldata:e}]=l(),[t,n]=(0,a.useState)(e?.settings?.automations?.suretriggers?.status||cartflows_admin?.suretriggers_status),[r,o]=(0,a.useState)(e?.settings?.automations?.suretriggers?.connected||!1);return(0,a.createElement)("div",{className:"wcf-automation-page-wrapper"},(0,a.createElement)(NG,{sureTriggersStatus:t,setSureTriggersStatus:n,sureTriggersConnected:r,setSureTriggersConnected:o}))},MG=Fo("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),_G=Fo("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),IG=({title:e,description:t})=>(0,a.createElement)("div",{className:"flex flex-col items-center justify-center text-center py-12 px-6"},(0,a.createElement)("div",{className:"size-12 rounded-lg border border-dashed border-border-subtle flex items-center justify-center mb-4"},(0,a.createElement)(MG,{className:"size-5 text-text-tertiary"})),(0,a.createElement)(_h,{size:"xs",tag:"h3",title:e}),(0,a.createElement)(Ch,{as:"p",size:14,color:"help",className:"mt-1"},t)),SG=[{label:(0,z.__)("Account","cartflows"),items:[{name:(0,z.__)("License","cartflows"),slug:"license",icon:eG,proOnly:!0}]},{label:(0,z.__)("Funnel Settings","cartflows"),items:[{name:(0,z.__)("General","cartflows"),slug:"general",icon:PU},{name:(0,z.__)("Order","cartflows"),slug:"offer",icon:nG},{name:(0,z.__)("Permalink","cartflows"),slug:"permalink",icon:oG},{name:(0,z.__)("User Role Manager","cartflows"),slug:"user_role_manager",icon:iG}]},{label:(0,z.__)("Integrations & Extensions","cartflows"),items:[{name:(0,z.__)("Integrations","cartflows"),slug:"integrations",icon:({className:e})=>(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e},(0,a.createElement)("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1.5"}),(0,a.createElement)("rect",{x:"3",y:"7",width:"14",height:"14",rx:"2"}))},{name:(0,z.__)("Automations","cartflows"),slug:"automations",icon:lG},{name:(0,z.__)("Extensions","cartflows"),slug:"addons",icon:uG},{name:(0,z.__)("Webhooks","cartflows"),slug:"webhooks",icon:fG}]},{label:(0,z.__)("Utilities","cartflows"),items:[{name:(0,z.__)("Global CSS & Scripts","cartflows"),slug:"global_scripts",icon:mG},{name:(0,z.__)("Version Control","cartflows"),slug:"version_control",icon:({className:e})=>(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:e},(0,a.createElement)("circle",{cx:"18",cy:"18",r:"3"}),(0,a.createElement)("circle",{cx:"6",cy:"6",r:"3"}),(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 6h3a2 2 0 0 1 2 2v7"}),(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11 18H8a2 2 0 0 1-2-2V9"}))},{name:(0,z.__)("Advanced","cartflows"),slug:"other",icon:gG},{name:(0,z.__)("Logs","cartflows"),slug:"log",icon:zV}]}],jG=["version_control","automations","addons","license","log","webhooks"],kG={automations:EG,addons:function(){const[e,t]=(0,a.useState)({errorFor:!1,errorMsg:!1}),{errorFor:n,errorMsg:r}=e,o=(e,t="plugin")=>"activated"===e?"":"installed"===e||"inactive"===e?"cartflows_recommended_"+t+"_activate":"cartflows_recommended_"+t+"_install",i=function(e){let t="";switch(e){case"active":t=(0,z.__)("Active","cartflows");break;case"inactive":t=(0,z.__)("Activate","cartflows");break;default:t=(0,z.__)("Install","cartflows")}return t},s=e=>{e.preventDefault();const t=e.target.dataset.action,n=e.target.dataset.is_pro,r=e.target.dataset.page_link,o=e.target.dataset.status;if("true"!==n.toLowerCase()||"not-installed"!==o)switch(t){case"cartflows_recommended_plugin_activate":u(e);break;case"cartflows_recommended_plugin_install":e.target.innerText=(0,z.__)("Installing…","cartflows"),c(e,"install-plugin")}else window.open(r,"_blank","noopener,noreferrer")},l=e=>{switch(e.target.dataset.action){case"cartflows_recommended_theme_activate":d(e);break;case"cartflows_recommended_theme_install":e.target.innerText=(0,z.__)("Installing…","cartflows"),c(e,"install-theme"),d(e)}},c=(e,n)=>new Promise((r,o)=>{wp.updates.queue.push({action:n,data:{slug:e.target.dataset.slug,success(t){e.target.innerText=(0,z.__)("Installed","cartflows"),r(t,e.target.dataset),u(e)},error(n){o(n,e.target.dataset),e.target.innerText=(0,z.__)("Failed","cartflows"),t({errorFor:`${e.target.dataset.slug}_error`,errorMsg:n?.errorMessage}),setTimeout(function(){e.target.innerText=(0,z.__)("Install","cartflows"),t({errorFor:!1,errorMsg:!1})},1500)}}}),wp.updates.queueChecker()}),u=e=>{const t=new window.FormData;t.append("action","cartflows_activate_plugin"),t.append("init",e.target.dataset.init),t.append("security",cartflows_admin.activate_plugin_nonce),e.target.innerText=(0,z.__)("Activating…","cartflows"),L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{e.target.className="text-support-success pointer-events-none text-sm font-semibold border-0 bg-transparent shadow-none p-0",e.target.innerText=(0,z.__)("Activated","cartflows"),e.target.dataset.redirection&&(window.location=e.target.dataset.redirection)})},d=e=>{const t=new window.FormData;t.append("action","cartflows_activate_theme"),t.append("theme_slug",e.target.dataset.slug),t.append("security",cartflows_admin.activate_theme_nonce),e.target.innerText=(0,z.__)("Activating…","cartflows"),L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{e.target.className="wcf-activated-theme text-support-success pointer-events-none text-sm font-semibold border-0 bg-transparent shadow-none p-0",e.target.innerText=(0,z.__)("Activated","cartflows");const t=document.querySelectorAll(".recommended-themes-wrapper .wcf-activated-theme");Array.from(t).forEach(function(t){t!==e.target&&(t.innerText=(0,z.__)("Activate","cartflows"),t.className="text-sm font-semibold text-text-primary py-2 px-4 border border-solid border-border-subtle rounded-lg bg-background-primary hover:bg-background-secondary cursor-pointer")})})},f=cartflows_admin.integrations.plugins.map((e,t)=>(0,a.createElement)("div",{key:t,className:"box-border bg-background-primary relative border border-solid border-border-subtle rounded-md p-5 flex flex-col gap-4 snap-start"},(0,a.createElement)("div",{className:"flex items-center justify-between"},e.logoPath&&(0,a.createElement)("img",{src:e.logoPath.icon_path,className:"w-10 h-10 min-w-[40px] min-h-[40px]",alt:e.title}),e.hot_badge&&(0,a.createElement)(na,{label:(0,z.__)("Hot","cartflows"),variant:"yellow",size:"xs",type:"pill"})),(0,a.createElement)("div",{className:"flex flex-col gap-2"},(0,a.createElement)("div",{className:"text-base font-medium text-text-primary"},e.title),(0,a.createElement)("p",{className:"text-sm font-normal text-text-secondary leading-relaxed m-0"},e.subtitle)),(0,a.createElement)("div",{className:"flex items-center gap-3 mt-auto"},(0,a.createElement)("button",{"data-slug":e.slug,"data-redirection":e.redirection,"data-action":o(e.status,"plugin"),"data-status":e.status,"data-is_pro":e.isPro,"data-page_link":e.link,"data-init":e.path,type:"button",onClick:s,className:vp()("active"===e.status?"text-support-success pointer-events-none text-sm font-semibold border-0 bg-transparent shadow-none p-0":"text-sm font-semibold text-text-primary py-2 px-4 border border-solid border-border-subtle rounded-lg bg-background-primary hover:bg-background-secondary cursor-pointer")},e.isPro&&"not-installed"===e.status?(0,z.__)("Let's Go","cartflows"):i(e.status)),n===`${e.slug}_error`&&r&&(0,a.createElement)("p",{id:`${e.slug}_error`,className:"text-xs text-brand-500"},r)))),p=cartflows_admin.integrations.themes.map((e,t)=>(0,a.createElement)("div",{key:t,className:vp()(e.isPro?"bg-field-primary-background":"bg-background-primary","box-border relative border border-solid border-border-subtle rounded-md p-5 flex flex-col gap-4 snap-start")},(0,a.createElement)("div",null,e.logoPath&&(0,a.createElement)("img",{src:e.logoPath.icon_path,className:"w-10 h-10 min-w-[40px] min-h-[40px]",alt:e.title})),(0,a.createElement)("div",{className:"flex flex-col gap-2"},(0,a.createElement)("div",{className:"text-base font-medium text-text-primary"},e.title),(0,a.createElement)("p",{className:"text-sm font-normal text-text-secondary leading-relaxed m-0"},e.subtitle)),(0,a.createElement)("div",{className:"flex items-center gap-3 mt-auto"},(0,a.createElement)("button",{"data-slug":e.slug,"data-redirection":e.redirection,"data-action":o(e.status,"theme"),type:"button",onClick:l,className:vp()("active"===e.status?"wcf-activated-theme text-support-success pointer-events-none text-sm font-semibold border-0 bg-transparent shadow-none p-0":"text-sm font-semibold text-text-primary py-2 px-4 border border-solid border-border-subtle rounded-lg bg-background-primary hover:bg-background-secondary cursor-pointer")},i(e.status)),n===`${e.slug}_error`&&r&&(0,a.createElement)("p",{id:`${e.slug}_error`,className:"text-xs text-brand-500"},r))));return(0,a.createElement)("div",{className:"flex flex-col gap-8 bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm p-6 max-w-4xl mx-auto mt-6"},(0,a.createElement)("div",{className:"recommended-plugins-block"},(0,a.createElement)(_h,{tag:"h4",size:"sm",title:(0,z.__)("Extensions","cartflows"),description:(0,z.__)("WooCommerce Extensions that will elevate your online store from good to exceptional.","cartflows"),className:"[&_h4]:text-text-primary [&_h4]:!font-medium"}),(0,a.createElement)("div",{className:"grid grid-flow-row auto-rows-min grid-cols-1 gap-1 sm:grid-cols-2 p-1 bg-background-secondary rounded-md mt-4"},f)),(0,a.createElement)("div",{className:"recommended-themes-wrapper recommended-themes-block"},(0,a.createElement)(_h,{tag:"h4",size:"sm",title:(0,z.__)("Recommended Themes","cartflows"),description:(0,z.__)("Carefully curated themes to power beautiful, fast, and conversion-focused online stores.","cartflows"),className:"[&_h4]:text-text-primary [&_h4]:!font-medium"}),(0,a.createElement)("div",{className:"grid grid-flow-row auto-rows-min grid-cols-1 gap-1 sm:grid-cols-2 p-1 bg-background-secondary rounded-md mt-4"},p)))},log:function(){const e=cartflows_admin?.logs||{},t=Object.keys(e),n=t.length>0,[r,o]=(0,a.useState)(""),[i,s]=(0,a.useState)(""),[l,c]=(0,a.useState)((0,z.__)("Copy","cartflows")),[u,d]=(0,a.useState)((0,z.__)("Download","cartflows")),[f,p]=(0,a.useState)((0,z.__)("Delete","cartflows")),[m,h]=(0,a.useState)(!1),[g,y]=(0,a.useState)(!1);return n?(0,a.createElement)("div",{className:"flex-1 min-w-0 flex flex-col gap-6 max-w-4xl mx-auto mt-8"},(0,a.createElement)("div",{className:"flex justify-between items-center"},(0,a.createElement)(_h,{tag:"h4",size:"sm",title:(0,z.__)("Logs","cartflows"),className:"[&_h4]:text-text-primary"})),(0,a.createElement)("div",{className:"bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm"},(0,a.createElement)("div",{className:"flex items-center justify-between gap-3 p-4 border-0 border-b border-solid border-border-subtle"},(0,a.createElement)(nm,null,(0,a.createElement)(nm.Trigger,null,(0,a.createElement)("button",{type:"button",className:"inline-flex items-center justify-between gap-2 w-72 px-3 py-2 text-sm text-text-primary bg-background-primary border border-solid border-border-subtle rounded-md hover:border-border-strong transition-colors cursor-pointer text-left truncate"},(0,a.createElement)("span",{className:"truncate"},e[i]||(0,z.__)("Select log","cartflows")),(0,a.createElement)(Gp,{className:"size-4 shrink-0 text-text-tertiary"}))),(0,a.createElement)(nm.Portal,null,(0,a.createElement)(nm.ContentWrapper,null,(0,a.createElement)(nm.Content,{className:"w-max max-w-lg max-h-72 overflow-y-auto"},(0,a.createElement)(nm.List,{className:"!text-xs"},(0,a.createElement)(nm.Item,{onClick:function(){s(""),o("")},className:"!text-xs !py-1.5"},(0,z.__)("Select log","cartflows")),t.map(t=>(0,a.createElement)(nm.Item,{key:t,onClick:()=>function(e){s(e);const t=new window.FormData;t.append("action","cartflows_show_cf_log"),t.append("security",cartflows_admin.show_cf_log_nonce),t.append("log_key",e),L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(e=>{o(e.log_content)})}(t),className:"!text-xs !py-1.5"},e[t]))))))),(0,a.createElement)("div",{className:"flex items-center gap-2"},(0,a.createElement)(Wo,{type:"button",variant:"outline",size:"xs",disabled:!i,onClick:async()=>{try{await async function(e){if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(e);else{const t=document.createElement("textarea");t.value=e,t.style.position="absolute",t.style.left="-999999px",document.body.prepend(t),t.select();try{document.execCommand("copy")}catch(e){}finally{t.remove()}}}(r),c((0,z.__)("Copied!","cartflows")),setTimeout(()=>{c((0,z.__)("Copy","cartflows"))},1e3)}catch(e){}},icon:(0,a.createElement)(_G,{className:"size-3.5"})},l),(0,a.createElement)(Wo,{type:"button",variant:"outline",size:"xs",disabled:!i||g,onClick:function(t){if(t.preventDefault(),g)return;y(!0);const n=new window.FormData;d((0,z.__)("Downloading…","cartflows")),n.append("action","cartflows_download_cf_log"),n.append("security",cartflows_admin.download_cf_log_nonce),n.append("log_key",i),L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(t=>{if(!t||!t.success||!t.data)return void Vm.error((0,z.__)("Log file could not be downloaded. Please try again.","cartflows"));const n=t.data.file_content||"",r=e[i],o=new Blob([n],{type:"text/log"}),a=document.createElement("a");a.href=URL.createObjectURL(o),a.download=r,a.click(),Vm.success((0,z.__)("Log file downloaded.","cartflows"))}).catch(()=>{Vm.error((0,z.__)("Log file could not be downloaded. Please try again.","cartflows"))}).finally(()=>{y(!1),d((0,z.__)("Download","cartflows"))})},icon:(0,a.createElement)(OV,{className:"size-3.5"})},u),(0,a.createElement)(Wo,{type:"button",variant:"outline",size:"xs",destructive:!0,disabled:!i||m,onClick:function(e){if(e.preventDefault(),m)return;h(!0);const t=new window.FormData;p((0,z.__)("Deleting…","cartflows")),t.append("action","cartflows_delete_cf_log"),t.append("security",cartflows_admin.delete_cf_log_nonce),t.append("log_key",i),L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(e=>{e&&e.success?(Vm.success((0,z.__)("Log file deleted successfully.","cartflows")),setTimeout(()=>window.location.reload(),1200)):(h(!1),p((0,z.__)("Delete","cartflows")),Vm.error((0,z.__)("Log file could not be deleted. Please try again.","cartflows")))}).catch(()=>{h(!1),p((0,z.__)("Delete","cartflows")),Vm.error((0,z.__)("Log file could not be deleted. Please try again.","cartflows"))})},icon:(0,a.createElement)(Vo,{className:"size-3.5"})},f))),i?(0,a.createElement)("div",{className:"overflow-auto max-h-[60vh] p-4"},(0,a.createElement)("pre",{id:"wcf-log--text",className:"wcf-log--text text-xs font-mono leading-relaxed text-text-secondary whitespace-pre-wrap break-all m-0"},r)):(0,a.createElement)(IG,{title:(0,z.__)("No log file selected","cartflows"),description:(0,z.__)("Select a log file from the dropdown to view its contents.","cartflows")}))):(0,a.createElement)("div",{className:"flex-1 min-w-0 flex flex-col gap-6 max-w-4xl mx-auto mt-8"},(0,a.createElement)(_h,{tag:"h4",size:"sm",title:(0,z.__)("Logs","cartflows"),className:"[&_h4]:text-text-primary"}),(0,a.createElement)("div",{className:"bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm p-6"},(0,a.createElement)(IG,{title:(0,z.__)("No logs found","cartflows"),description:(0,z.__)("Log files will appear here when CartFlows generates debug logs.","cartflows")})))}},DG=["webhooks"];function CG({initialTab:e}){const[{globaldata:t},n]=l(),[,r]=p(),o=(0,g.useHistory)(),i=(0,g.useLocation)(),s=new URLSearchParams(i.search).get("tab"),[c,u]=(0,a.useState)(s||e||"general"),[d,f]=(0,a.useState)(!1);(0,a.useEffect)(()=>{const e=new URLSearchParams(i.search).get("tab");e&&e!==c&&u(e)},[i.search]),JW();let m=!0;void 0===t.length&&(m=!1),(0,a.useEffect)(()=>{t.length<1&&L()({path:"/cartflows/v1/admin/commonsettings/"}).then(e=>{n({type:"SET_SETTINGS",commondata:e}),n({type:"SET_PAGE_BUILDER",pagebuilder:e.options["_cartflows_common[default_page_builder]"]})})},[]);const h=cartflows_admin?.current_user_can_manage_cartflows;if(!h)return(0,a.createElement)("div",{className:"flex items-center justify-center p-12 text-center"},(0,a.createElement)(_h,{tag:"h3",size:"md",title:(0,z.__)("Access Restricted","cartflows"),description:(0,z.__)("You do not have permission to manage CartFlows settings.","cartflows")}));if(m)return(0,a.createElement)(qW,null);const y=SG.map(e=>({...e,items:e.items.filter(e=>!e.proOnly||wcfCartflowsPro())})).filter(e=>e.items.length>0),w=y.flatMap(e=>e.items),b=w.find(e=>e.slug===c),v=t?.settings?.[c]?.description||"";return(0,a.createElement)("form",{className:"wcf-settings-page flex gap-6 items-start -m-6 md:-m-8",onSubmit:e=>{e.preventDefault(),f(!0);const t=new window.FormData(e.target);t.append("action","cartflows_save_global_settings"),t.append("security",cartflows_admin.save_global_settings_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(e=>{e?.success&&e?.data?.redirect_to?window.location.replace(e.data.redirect_to):(r({status:"SAVED"}),f(!1),e.success&&(e?.data?.skipped_fields?.length?Vm.error(e?.data?.messsage||(0,z.__)("Saved, but some fields were not updated because your account cannot edit scripts.","cartflows")):Vm.success((0,z.__)("Settings saved successfully!","cartflows")),L()({path:"/cartflows/v1/admin/commonsettings/"}).then(e=>{const t=e.options["_cartflows_common[default_page_builder]"];window.cartflows_admin&&(window.cartflows_admin.default_page_builder=t,window.cartflows_admin.page_builder=t),n({type:"SET_SETTINGS",commondata:e}),n({type:"SET_PAGE_BUILDER",pagebuilder:t})})))})}},(0,a.createElement)("input",{type:"hidden",name:"setting_tab",defaultValue:c,key:c}),(0,a.createElement)("div",{className:"h-full min-h-screen flex flex-col w-auto sticky top-0 lg:top-4 sidebar after:content-[''] after:fixed after:left-0 after:top-0 after:w-16 lg:after:w-[420px] after:h-screen after:bg-background-primary after:-z-10"},(0,a.createElement)(MW,{borderOn:!0,className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none box-border flex-grow"},(0,a.createElement)(MW.Body,{className:"!p-0"},(0,a.createElement)(MW.Item,{className:"!p-0"},(0,a.createElement)("div",{className:"flex flex-col"},y.map((e,t)=>(0,a.createElement)(a.Fragment,{key:e.label},t>0&&(0,a.createElement)("div",{className:"border-0 border-t border-solid border-border-subtle"}),(0,a.createElement)("div",{className:"flex flex-col px-3 py-2"},(0,a.createElement)("p",{className:"text-sm font-normal text-text-tertiary p-1 m-0 lg:block hidden"},e.label),(0,a.createElement)(Xp,{size:"sm",className:"!p-0"},(0,a.createElement)(Xp.List,{open:!0,className:"!gap-0 !p-0"},e.items.map(e=>{const t=e.icon,n=c===e.slug;return(0,a.createElement)(Xp.Item,{key:e.slug,active:n,onClick:()=>{e.link?o.push({pathname:"admin.php",search:e.link}):(e=>{if(e===c)return;u(e);const t=new URLSearchParams(i.search);t.set("tab",e),o.push({search:t.toString()})})(e.slug)},className:"cursor-pointer rounded-md lg:justify-start justify-center "+(n?"bg-side-nav-active hover:bg-side-nav-active":"hover:bg-background-secondary")},(0,a.createElement)(t,{className:"!size-5 shrink-0"}),(0,a.createElement)("span",{className:"!text-base lg:block hidden text-text-primary"},e.name))}))))))))))),function(e,t,n,r){const o=kG[e];if(o)return(0,a.createElement)("div",{className:"w-full"},(0,a.createElement)(o,null));const i="offer"===e&&!wcfCartflowsPro(),s=jG.includes(e)||i?null:(0,a.createElement)(Wo,{variant:"primary",type:"submit",size:"sm",disabled:n},n?(0,z.__)("Saving…","cartflows"):(0,z.__)("Save Settings","cartflows"));return(0,a.createElement)(XW,{title:t?.name||"",description:r||"",actions:s,cardWrapper:!i,fullWidth:DG.includes(e)},(0,a.createElement)($W,{tab:e}))}(c,b,d,v))}const AG=function({initialTab:e}){return(0,a.createElement)(s,{initialState:u,reducer:d},(0,a.createElement)(CG,{initialTab:e}))},TG=function(){const e="not-installed"===cartflows_admin.woocommerce_status?(0,z.__)("Install WooCommerce","cartflows"):(0,z.__)("Activate WooCommerce","cartflows"),[t,n]=(0,a.useState)(e),[r,o]=(0,a.useState)(!1);return setTimeout(function(){!function(){const e=document.getElementById("wpwrap");e&&e.removeAttribute("inert")}()},1e3),(0,a.createElement)(Im,{open:!0,setOpen:()=>{},exitOnClickOutside:!1,exitOnEsc:!1},(0,a.createElement)(Im.Panel,{className:"sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center gap-3 !space-y-0"},(0,a.createElement)("div",{className:"mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-alert-background-danger sm:mx-0 sm:h-10 sm:w-10"},(0,a.createElement)(tQ,{className:"h-6 w-6 text-text-error","aria-hidden":"true"})),(0,a.createElement)("div",null,(0,a.createElement)(Im.Title,null,(0,z.__)("Plugin Required","cartflows")),(0,a.createElement)("div",{className:"mt-2"},(0,a.createElement)("p",{className:"text-sm text-text-secondary m-0"},(0,z.__)("You need WooCommerce plugin installed and activated to access this page.","cartflows"))))),(0,a.createElement)(Im.Footer,{className:"flex gap-3 justify-end"},(0,a.createElement)(Wo,{variant:"primary",size:"md",className:"no-underline text-center",icon:r?(0,a.createElement)(Op,{className:"animate-spin"}):null,iconPosition:"left",onClick:e=>{if(e.preventDefault(),"not-installed"===cartflows_admin.woocommerce_status)n((0,z.__)("Installing","cartflows")),o(!0),wp.updates.queue.push({action:"install-plugin",data:{slug:"woocommerce"}}),wp.updates.queueChecker();else{n((0,z.__)("Activating","cartflows")),o(!0);const e=new window.FormData;e.append("action","cartflows_activate_plugin"),e.append("init","woocommerce/woocommerce.php"),e.append("security",cartflows_admin.activate_plugin_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.data&&e.data.success?n((0,z.__)("Activated","cartflows")):n((0,z.__)("Failed","cartflows")),n((0,z.__)("Redirecting","cartflows")),window.location.reload()})}}},t))))},OG=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getCFProStatus:n,getLicenseStatus:r}=e("wcf/importer");return{flowsCount:t(),cf_pro_status:n(),license_status:r()}}))(({visibility:e,setVisibility:t,errorMessage:n,title:r})=>{const o=r||(0,z.__)("Error","cartflows");return(0,a.createPortal)((0,a.createElement)("div",{className:`wcf-name-your-flow ${e}`},(0,a.createElement)(Im,{open:"show"===e,setOpen:e=>{e||t("hide")},exitOnClickOutside:!0},(0,a.createElement)(Im.Panel,{className:"sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,{className:"wcf-name-your-flow--title"},o),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)("div",{className:"wcf-name-your-flow__body"},(0,a.createElement)("p",null,n))),(0,a.createElement)(Im.Footer,{className:"wcf-name-your-flow--footer bg-brand-25 flex justify-end gap-4"},(0,a.createElement)(Wo,{variant:"outline",size:"md",className:"no-underline text-center",onClick:()=>t("hide")},(0,z.__)("Close","cartflows")))))),document.getElementById("wcf-json-importer"))}),LG=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getCFProStatus:n,getWooCommerceStatus:r}=e("wcf/importer");return{flowsCount:t(),cf_pro_status:n(),woocommerce_status:r()}}))(({preview:e,cf_pro_status:t,woocommerce_status:n,flowName:r,isStoreCheckout:o})=>{const[{license_status:i}]=p(),[s,l]=(0,a.useState)({isProcessing:!1,buttonText:"Import Funnel"}),{isProcessing:c,buttonText:u}=s,[d,f]=(0,a.useState)(!1),[m,h]=(0,a.useState)("hide"),[g,y]=(0,a.useState)(""),[w,b]=(0,a.useState)(""),v=function(e){e.preventDefault(),d?N():x()},x=function(){f(!0),document.addEventListener("click",N)},N=function(){f(!1),document.removeEventListener("click",N)};if("pro"===e.type){if(!wcfCartflowsTypePro())return"inactive"===t&&"pro"===wcfInactivepluginType()?(0,a.createElement)(Hm,null):(0,a.createElement)($m,null);if(wcfCartflowsTypePro()&&"Activated"!==i)return(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Jm,null)))}return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(OG,{visibility:m,setVisibility:h,errorMessage:g,title:w}),(0,a.createElement)("div",{className:"wcf-flow-import__button wcf-store-checkout-import__button"},(0,a.createElement)(Wo,{variant:"primary",size:"md",loading:c,disabled:c,onClick:t=>{t.preventDefault(),c||((e,t,n,r,o,i,s,l,c,u,d)=>{if("active"!==i)return"inactive"===i?(l((0,a.createElement)(Wm,null)),void s("show ")):(l((0,a.createElement)(Gm,null)),void s("show "));t({isProcessing:!0,buttonText:"Importing Complete Funnel.."});const f=new window.FormData;f.append("action","cartflows_import_flow"),f.append("flow_name",n),f.append("security",cartflows_admin.import_flow_nonce),f.append("flow",JSON.stringify(e)),f.append("store_checkout",r),f.append("creation_method","ready_made_template"),L()({url:cartflows_admin.ajax_url,method:"POST",body:f}).then(e=>{e.success?(t({isProcessing:!1,buttonText:"Imported! Redirecting..."}),Vm.success((0,z.__)("Funnel imported successfully!","cartflows")),setTimeout(()=>{let t=`admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e.data.new_flow_id}`;r&&(t=`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e.data.new_flow_id}`),window.location=`${cartflows_admin.admin_base_url+t}`},3e3)):"call_to_action"in e.data?(l((0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"wcf-message wcf-message--error",dangerouslySetInnerHTML:{__html:e.data.call_to_action}}),d&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("a",{className:"wcf-error-message--toggle",onClick:u},(0,z.__)("Click for more info","cartflows")),(0,a.createElement)("div",{className:"wcf-error--info",dangerouslySetInnerHTML:{__html:e.data.message}})))),s("show ")):t({isProcessing:!1,buttonText:e.data.message})})})(e,l,r,o,0,n,h,y,0,v,d)}},u)))}),zG=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getCFProStatus:n,getLicenseStatus:r,getWooCommerceStatus:o}=e("wcf/importer");return{flowsCount:t(),cf_pro_status:n(),license_status:r(),woocommerce_status:o()}}))(({flowName:e,isStoreCheckout:t})=>{const[n,r]=(0,a.useState)((0,z.__)("Create Store Checkout","cartflows")),[o,i]=(0,a.useState)(!1);return(0,a.createElement)("div",{className:"wcf-name-your-flow__actions"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)("button",{className:"wcf-button wcf-primary-button",onClick:n=>{n.preventDefault(),jQuery(n.target).closest(".wcf-name-your-flow__inner").find(".input-field").attr("disabled","disabled"),((e,t,n,r,o)=>{if(n)return;e("Creating Flow.."),r(!0);const a=new window.FormData;a.append("action","cartflows_create_flow"),a.append("security",cartflows_admin.create_flow_nonce),a.append("flow_name",t),a.append("store_checkout",o),a.append("creation_method","scratch"),L()({url:cartflows_admin.ajax_url,method:"POST",body:a}).then(t=>{console.log(t),t.success?(e((0,z.__)("Created! Redirecting…","cartflows")),r(!1),Vm.success((0,z.__)("Funnel created successfully!","cartflows")),setTimeout(()=>{let e=`admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${t.data.flow_id}`;o&&(e=`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t.data.flow_id}`),window.location=`${cartflows_admin.admin_base_url+e}`},3e3)):(e((0,z.__)("Failed to Create Flow!","cartflows")),Vm.error((0,z.__)("Failed to create funnel.","cartflows")))})})(r,e,o,i,t)}},n)))}),PG=({preview:e,type:t,flowName:n,setErrorDesc:r,setVisibility:o})=>(0,a.createElement)(Im.Footer,{className:"wcf-name-your-flow--footer bg-brand-25 flex justify-end gap-4"},"import"===t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",className:"no-underline text-center",onClick:()=>o("hide")},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(LG,{preview:e,flowName:n,setErrorDesc:r,isStoreCheckout:!0})),"blank"===t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",className:"no-underline text-center",onClick:()=>o("hide")},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(zG,{flowName:n,isStoreCheckout:!0}))),RG=e=>{const{cf_pro_status:t,setVisibility:n,preview:r,type:o,flowName:i,setFlowName:s}=e,[{flows_limit_over:l}]=p(),[c,u]=(0,a.useState)(""),[d,f]=(0,a.useState)(0);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,{className:"wcf-name-your-flow--title"},l?(0,z.__)("Upgrade To CartFlows Pro","cartflows"):(0,z.__)("Name Your Store Checkout","cartflows")),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,l?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-name-your-flow__footer"},(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required wcf-upgrade-pro"},(0,a.createElement)("div",{className:"wcf-flow-import__message"},(0,a.createElement)("p",null,(0,z.__)("You can't create more than 3 flows in free version. Upgrade to CartFlows Pro for adding more flows and other features.","cartflows"))),(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)("a",{href:getKbDocUrl("https://cartflows.com/"),target:"_blank",className:"wcf-button wcf-button--primary",rel:"noreferrer"},(0,z.__)("Upgrade To Cartflows Pro","cartflows")))))))):(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"flex justify-between py-2"},(0,a.createElement)("div",{className:"wcf-name-your-flow--field-title"},(0,a.createElement)("label",{className:"flex gap-1 text-base font-normal text-text-primary"},(0,z.__)("Store Checkout Name","cartflows"))),(0,a.createElement)("div",{className:"wcf-name-your-flow--word-count"},(0,a.createElement)("span",{className:"text-xs font-normal "+(40===d?"text-brand-500":"text-text-tertiary")},d,"/40"))),(0,a.createElement)("input",{type:"text",className:"input-field w-full !px-4 !py-2 text-sm font-normal !rounded-md text-text-tertiary !border-border-subtle focus:ring focus:!ring-brand-100 focus:!border-brand-500 focus:!shadow-none !outline-0 !outline-none",value:i,onChange:e=>{const{value:t}=e.target;t.length<=40&&(f(t.length),s(t))},placeholder:(0,z.__)("Enter Store Checkout Name","cartflows")})),""!==c&&(0,a.createElement)("div",{className:"mt-5"},(0,a.createElement)("p",{className:"text-sm font-regular text-text-secondary"},c)))),(0,a.createElement)(PG,{cf_pro_status:t,setVisibility:n,preview:r,type:o,flowName:i,setFlowName:s,setErrorDesc:u}))},UG=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getCFProStatus:n,getLicenseStatus:r}=e("wcf/importer");return{flowsCount:t(),cf_pro_status:n(),license_status:r()}}))(({visibility:e,setVisibility:t,preview:n,type:r,flowName:o,setFlowName:i,cf_pro_status:s})=>(0,a.createElement)(Im,{open:"show"===e,setOpen:e=>{e||t("hide")},exitOnClickOutside:!0},(0,a.createElement)(Im.Panel,{className:"wcf-name-your-flow__inner sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(RG,{cf_pro_status:s,setVisibility:t,preview:n,type:r,flowName:o,setFlowName:i})))),BG=o.p+"images/launch.70174609.png",FG=function(){const[e,t]=(0,a.useState)("hide"),[n,r]=(0,a.useState)(""),[{page_builder:o}]=p(),i=[(0,z.__)("Improved user experience","cartflows"),(0,z.__)("Flexibility and customization","cartflows"),(0,z.__)("Brand consistency","cartflows"),(0,z.__)("Competitive advantage","cartflows"),(0,z.__)("Increased trust and credibility","cartflows")];return(0,a.createElement)("main",{className:"wcf-no-flows-found-screen"},(0,a.createElement)("div",{className:"grid grid-cols-1 gap-4 items-start lg:grid-cols-5 lg:gap-10 xl:gap-10 rounded-lg bg-background-primary overflow-hidden border-0.5 border-solid border-border-subtle shadow-sm px-10 py-10"},(0,a.createElement)("div",{className:"grid grid-cols-1 gap-4 lg:col-span-2 h-full"},(0,a.createElement)("div",{className:"wcf-video-container"},(0,a.createElement)("iframe",{className:"wcf-video rounded-md",src:"https://www.youtube.com/embed/tCm60PWOd0M?showinfo=0&autoplay=0&mute=0&rel=0",allow:"autoplay",title:"YouTube video player",frameBorder:"0",allowFullScreen:!0}))),(0,a.createElement)("div",{className:"grid grid-cols-1 gap-4 lg:col-span-3 h-full"},(0,a.createElement)("div",{className:"relative h-full",style:{backgroundImage:`url(${BG})`,backgroundRepeat:"no-repeat",backgroundPosition:"right bottom",backgroundSize:"120px"}},(0,a.createElement)("div",{className:"flex flex-col justify-center h-full"},(0,a.createElement)("h2",{className:"text-text-primary text-3xl pb-3 font-semibold text-left m-0"},(0,z.__)("Create a global store checkout","cartflows")),(0,a.createElement)("p",{className:"text-base text-text-secondary pb-5 m-0"},(0,z.__)("A well-designed checkout page can help streamline the checkout process, reduce cart abandonment rates and increase conversions.","cartflows")),(0,a.createElement)("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 pb-6"},i.map(e=>(0,a.createElement)("div",{key:e,className:"flex items-center gap-1.5 text-base text-field-label"},(0,a.createElement)(pW,{className:"w-3 h-3 stroke-2 text-text-tertiary flex-shrink-0"}),e))),(0,a.createElement)("div",null,(0,a.createElement)(Wo,{variant:"primary",size:"sm",tag:C,to:{pathname:"admin.php",search:"?page=cartflows&path=store-checkout-library"},icon:(0,a.createElement)(QU,{className:"w-18 h-18 stroke-2"}),iconPosition:"left",className:"no-underline w-fit",onClick:e=>{"bricks-builder"===o&&(e.preventDefault(),t("show"))}},(0,z.__)("Create Store Checkout","cartflows"))))))),(0,a.createElement)(UG,{visibility:e,setVisibility:t,type:"blank",flowName:n,setFlowName:r}))},YG=function(){return(0,a.createElement)("div",{className:"wcf-flows-page-wrapper"},(0,a.createElement)(FG,null))},ZG=Fo("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]),QG=function({trend:e}){if(e?.isNew)return(0,a.createElement)("div",{className:"flex"},(0,a.createElement)(na,{label:(0,z.__)("New","cartflows"),size:"xxs",variant:"green",type:"pill"}));if(!e||null===e.percentage||e.percentage<=0)return null;const t=e.isIncrease;let n=null;"number"==typeof e.baselineValue&&(n=e.isCurrency?PO(e.baselineValue):LO(e.baselineValue,0));const r=null!==n?(0,z.sprintf)(/* translators: 1: percentage, 2: up/down, 3: baseline value, 4: comparison range */ /* translators: 1: percentage, 2: up/down, 3: baseline value, 4: comparison range */ |
| 40 |
(0,z.__)("%1$s%% %2$s vs %3$s (%4$s)","cartflows"),e.percentage,t?(0,z.__)("up","cartflows"):(0,z.__)("down","cartflows"),n,e.baselineLabel||(0,z.__)("previous period","cartflows")):"";return(0,a.createElement)("div",{title:r||void 0,"aria-label":r||void 0,className:"inline-flex items-center gap-0.5 px-2 py-0.5 rounded-full text-xs font-medium "+(t?"bg-alert-background-green text-support-success border border-alert-border-green":"bg-alert-background-danger text-text-error border border-alert-border-danger")},t?(0,a.createElement)(Zh,{className:"w-3 h-3"}):(0,a.createElement)(ZG,{className:"w-3 h-3"}),(0,a.createElement)("span",null,e.percentage,"%"))},VG={ArrowRight:1,ArrowDown:1,ArrowLeft:-1,ArrowUp:-1},WG=function({item:e,isActive:t,onClick:n,trend:r,showProBadge:o=!1,statSuffix:i=""}){const s=null!==e.stat_raw&&void 0!==e.stat_raw;let l;return l=e.stat?Vh(e.stat.toString()):s?PO(0):"0",i&&(l+=i),(0,a.createElement)("div",{role:"tab",id:`wcf-analytics-tab-${e.graphType}`,tabIndex:t?0:-1,"aria-selected":t,"aria-controls":"wcf-analytics-tabpanel","aria-label":e.name,className:"wcf-analytics--stats-tab flex flex-col gap-2 px-4 py-4 rounded-lg border border-solid transition-shadow duration-200 relative cursor-pointer min-w-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-500 "+(t?"border-brand-500 bg-primary-25 shadow-md":"border-border-subtle bg-background-primary shadow-none hover:border-brand-300 hover:shadow-sm"),onClick:n,onKeyDown:e=>{if("Enter"===e.key||" "===e.key)return e.preventDefault(),void n();const t=Array.from(e.currentTarget.closest('[role="tablist"]')?.querySelectorAll('[role="tab"]')||[]),r=t.indexOf(e.currentTarget);if(r<0)return;let o=null;VG[e.key]?o=(r+VG[e.key]+t.length)%t.length:"Home"===e.key?o=0:"End"===e.key&&(o=t.length-1),null!==o&&(e.preventDefault(),t[o].focus(),t[o].click())}},(0,a.createElement)("div",{className:"flex items-center min-w-0"},(0,a.createElement)(Ch,{as:"span",size:12,weight:600,className:t?"text-primary-500":"text-text-secondary"},e.name),(0,a.createElement)(HZ,{text:e.tooltip,classes:"text-text-tertiary inline-flex shrink-0"}),o&&(0,a.createElement)(Rp,null)),(0,a.createElement)("div",{className:"flex items-end justify-between gap-2 flex-wrap"},(0,a.createElement)(Ch,{as:"div",size:20,weight:600,color:"primary",className:"tracking-tight tabular-nums"},l),(0,a.createElement)(QG,{trend:r})))},GG="__all__",HG=e=>""===e?GG:e,$G=e=>GG===e?"":e,XG=function({title:e,selectedFlow:t,onFlowChange:n,flowOptions:r,flowsLoading:o,dateValue:i,onDateChange:s,comparisonPeriod:l,onComparisonPeriodChange:c,comparisonPeriodOptions:u}){const d=(e=>{const t={};return e.forEach(e=>{t[e.label]=(t[e.label]||0)+1}),e.map(e=>t[e.label]>1&&e.value?{...e,label:`${e.label} (#${e.value})`}:e)})(r||[]);return(0,a.createElement)("div",{className:"bg-background-primary flex flex-wrap justify-between items-center gap-3"},(0,a.createElement)(_h,{size:"lg",tag:"h1",title:e,className:"[&_h1]:text-text-primary"}),(0,a.createElement)("div",{className:"wcf-metabox--filters-wrapper flex flex-wrap items-center gap-3 w-full lg:w-auto lg:ml-auto"},(0,a.createElement)("div",{className:"w-48"},(0,a.createElement)(kL,{value:HG(t.value),onChange:e=>{const t=$G(e),r=d.find(e=>e.value===t);n(r||{value:t,label:t})},disabled:o,size:"sm"},(0,a.createElement)(kL.Button,{type:"button",render:e=>{if(o)return(0,z.__)("Loading flows…","cartflows");const t=d.find(t=>t.value===$G(e));return t?(0,a.createElement)("span",{className:"block w-full truncate",title:sg(t.label)},sg(t.label)):(0,z.__)("Select Flow","cartflows")}}),(0,a.createElement)(kL.Options,null,d&&d.map(e=>{const t=HG(e.value);return(0,a.createElement)(kL.Option,{value:t,key:t,className:"[&>span]:!whitespace-normal [&>span]:!overflow-visible"},sg(e.label))})))),(0,a.createElement)(vZ,{value:i,onChangeCB:s}),(0,a.createElement)("div",{className:"w-48"},(0,a.createElement)(kL,{value:l,onChange:c,size:"sm"},(0,a.createElement)(kL.Button,{type:"button",render:e=>{const t=u.find(t=>t.value===e);return t?t.label:e}}),(0,a.createElement)(kL.Options,null,u&&u.map(e=>(0,a.createElement)(kL.Option,{value:e.value,key:e.value},e.label)))))))},qG=()=>{const e="undefined"!=typeof cartflows_admin&&cartflows_admin?.woo_currency||"$";return[{name:(0,z.__)("Total Visitors","cartflows"),stat:"12,485",stat_raw:null,tooltip:"",graphType:"total_visitors",trend:{percentage:12,isIncrease:!0}},{name:(0,z.__)("Total Orders","cartflows"),stat:"1,284",stat_raw:null,tooltip:"",graphType:"total_orders",trend:{percentage:8,isIncrease:!0}},{name:(0,z.__)("Total Revenue","cartflows"),stat:`${e}48,240`,stat_raw:48240,tooltip:"",graphType:"total_revenue",trend:{percentage:15,isIncrease:!0}},{name:(0,z.__)("Avg. Order Value","cartflows"),stat:`${e}37.56`,stat_raw:37.56,tooltip:"",graphType:"avg_revenue",trend:{percentage:4,isIncrease:!0}},{name:(0,z.__)("Bump Revenue","cartflows"),stat:`${e}6,820`,stat_raw:6820,tooltip:"",graphType:"bump_revenue",trend:{percentage:6,isIncrease:!1}},{name:(0,z.__)("Offer Revenue","cartflows"),stat:`${e}9,410`,stat_raw:9410,tooltip:"",graphType:"offer_revenue",trend:{percentage:11,isIncrease:!0}},{name:(0,z.__)("Revenue Per Visit","cartflows"),stat:`${e}3.86`,stat_raw:3.86,tooltip:"",graphType:"per_visit_revenue",trend:{percentage:9,isIncrease:!0}},{name:(0,z.__)("Revenue Per Customer","cartflows"),stat:`${e}6.12`,stat_raw:6.12,tooltip:"",graphType:"per_unique_visitor_revenue",trend:{percentage:3,isIncrease:!0}}]},JG=[{date:"Day 1",value:820},{date:"Day 2",value:1150},{date:"Day 3",value:980},{date:"Day 4",value:1420},{date:"Day 5",value:1680},{date:"Day 6",value:1510},{date:"Day 7",value:1935}],KG={flows:{title:(0,z.__)("Funnel Analytics","cartflows"),nudgeTitle:(0,z.__)("Discover What’s Actually Driving Your Funnel Revenue","cartflows"),nudgeDescription:(0,z.__)("See average order value, revenue per visit, and bump offer breakdowns for every funnel and step. Upgrade to CartFlows Pro and make smarter decisions with real data.","cartflows")},conversion:{title:(0,z.__)("Conversions Analytics","cartflows"),nudgeTitle:(0,z.__)("Find Out Exactly Where Customers Convert and Why","cartflows"),nudgeDescription:(0,z.__)("See conversions broken down by step, product, and device — and spot every drop-off point. Upgrade to CartFlows Pro and fix what’s costing you sales.","cartflows")},optin:{title:(0,z.__)("Opt-in Analytics","cartflows"),nudgeTitle:(0,z.__)("See Which Opt-in Funnels Grow Your List Fastest","cartflows"),nudgeDescription:(0,z.__)("Track every form’s submissions and conversion rates side by side — and know exactly which funnels build your list most effectively. Upgrade to Pro to see it all.","cartflows")}},eH={flows:qG,conversion:()=>[{name:(0,z.__)("Total Visitors","cartflows"),stat:"12,485",stat_raw:null,tooltip:"",graphType:"total_visitors",trend:{percentage:11,isIncrease:!0}},{name:(0,z.__)("Total Conversions","cartflows"),stat:"894",stat_raw:null,tooltip:"",graphType:"total_conversions",trend:{percentage:14,isIncrease:!0}},{name:(0,z.__)("Bump Conversions","cartflows"),stat:"156",stat_raw:null,tooltip:"",graphType:"total_bump_conversions",trend:{percentage:7,isIncrease:!0}},{name:(0,z.__)("Offer Conversions","cartflows"),stat:"213",stat_raw:null,tooltip:"",graphType:"offer_conversions",trend:{percentage:9,isIncrease:!0}},{name:(0,z.__)("Laptop Conversions","cartflows"),stat:"521",stat_raw:null,tooltip:"",graphType:"laptop_conversion_rate",trend:{percentage:5,isIncrease:!0}},{name:(0,z.__)("Mobile Conversions","cartflows"),stat:"373",stat_raw:null,tooltip:"",graphType:"mobile_conversion_rate",trend:{percentage:3,isIncrease:!1}}],optin:()=>[{name:(0,z.__)("Total Submissions","cartflows"),stat:"1,842",stat_raw:null,tooltip:"",graphType:"total_submissions",trend:{percentage:13,isIncrease:!0}},{name:(0,z.__)("Conversion Rate","cartflows"),stat:"24.8%",stat_raw:null,tooltip:"",graphType:"conversion_rate",trend:{percentage:6,isIncrease:!0}}]},tH=function({page:e="flows"}){const t=KG[e]||KG.flows,n=(eH[e]||qG)(),r=new Date,o=new Date;o.setDate(r.getDate()-7);const i={title:t.title,selectedFlow:{value:"",label:(0,z.__)("All Funnels","cartflows")},onFlowChange:()=>{},flowOptions:[],flowsLoading:!1,dateValue:{startDate:o,endDate:r},onDateChange:()=>{},comparisonPeriod:"previous-period",onComparisonPeriodChange:()=>{},comparisonPeriodOptions:[{value:"previous-period",label:(0,z.__)("vs. Previous Period","cartflows")}]};return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("section",{"aria-labelledby":"section-1-title",className:"blur-[2px] pointer-events-none select-none","aria-hidden":"true"},(0,a.createElement)("div",{className:"p-6 rounded-xl bg-background-primary overflow-hidden shadow-sm flex flex-col gap-3 justify-center h-full"},(0,a.createElement)(XG,i),(0,a.createElement)("div",{className:"p-2 flex flex-col gap-2 bg-background-secondary rounded-lg"},(0,a.createElement)("div",{className:"wcf-analytics--stats-tabs-container"},(0,a.createElement)("div",{className:"wcf-analytics--stats-tabs m-0"},(0,a.createElement)("div",{className:"gap-2 grid grid-cols-2 md:grid-cols-4 w-full box-border"},n.map((e,t)=>(0,a.createElement)(WG,{key:e.graphType,item:e,isActive:0===t,onClick:()=>{},trend:e.trend,showProBadge:!1}))))),(0,a.createElement)("div",{className:"bg-background-primary rounded-lg shadow-sm"},(0,a.createElement)("div",{className:"wcf-analytics--tab-content"},(0,a.createElement)(TO,{data:JG,dataKeys:["value"],xAxisDataKey:"date",colors:[{stroke:OO}],showXAxis:!0,showYAxis:!0,chartWidth:"100%",chartHeight:305})))),"conversion"===e&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"mt-8 bg-background-primary rounded-lg shadow-sm p-6"},(0,a.createElement)(_h,{size:"sm",tag:"h2",title:(0,z.__)("Funnel Name","cartflows"),className:"[&_h2]:text-text-primary mb-4"}),(0,a.createElement)("div",{className:"overflow-x-auto"},(0,a.createElement)(UQ,{dummy_data_type:"step"}))),(0,a.createElement)("div",{className:"mt-8 bg-background-primary rounded-lg shadow-sm p-6"},(0,a.createElement)(_h,{size:"sm",tag:"h2",title:(0,z.__)("Product Details","cartflows"),className:"[&_h2]:text-text-primary mb-4"}),(0,a.createElement)("div",{className:"overflow-x-auto"},(0,a.createElement)(BQ,null)))),"optin"===e&&(0,a.createElement)("div",{className:"mt-8 bg-background-primary rounded-lg shadow-sm p-6"},(0,a.createElement)(_h,{size:"sm",tag:"h2",title:(0,z.__)("Overview","cartflows"),className:"[&_h2]:text-text-primary mb-4"}),(0,a.createElement)("div",{className:"overflow-x-auto"},(0,a.createElement)(FQ,null))),"flows"===e&&(0,a.createElement)("div",{className:"mt-8 bg-background-primary rounded-lg shadow-sm p-6"},(0,a.createElement)(_h,{size:"sm",tag:"h2",title:(0,z.__)("All Funnels","cartflows"),className:"[&_h2]:text-text-primary mb-4"}),(0,a.createElement)("div",{className:"overflow-x-auto"},(0,a.createElement)(UQ,null))))),(0,a.createElement)("div",{className:"fixed top-0 right-0 bottom-0 left-0 sm:left-[36px] min-[961px]:left-[160px] [body.folded_&]:left-[36px] z-10 bg-black/30 pointer-events-none"},(0,a.createElement)("div",{className:"h-full flex items-center justify-center px-4"},(0,a.createElement)(ZO,{title:t.nudgeTitle,description:t.nudgeDescription,containerClass:"pointer-events-auto",innerContainerClass:"border border-border-subtle shadow-lg p-8 rounded-lg max-w-md w-full text-center bg-background-primary"}))))},nH=["flows","optin","conversion"],rH=function(){const e=(0,g.useLocation)(),t=new URLSearchParams(e.search).get("type")||"flows",n=nH.includes(t)?t:"flows",r=(0,P.applyFilters)("cartflows.analytics.pages",{})[n];return(0,a.createElement)("div",null,r?(0,a.createElement)(r,null):(0,a.createElement)(tH,{page:n}))},oH=cartflows_admin.default_page_builder,aH=cartflows_admin.required_plugins,iH=cartflows_admin.required_plugins[oH],sH={};sH[oH]=Object.values(cartflows_admin.flows_and_steps);const lH={};lH[oH]=Object.values(cartflows_admin.store_checkout_flows_and_steps);const cH={default_page_builder:oH,page_builder_group_data:aH,page_builder_group:iH,preview:{},woocommerce_status:cartflows_admin.woocommerce_status,requiredPluginsData:cartflows_admin.required_plugins_data,missingPlugins:cartflows_admin.is_any_required_plugins_missing,flow_count:4,cf_pro_status:cartflows_admin.cf_pro_status,all_flows:{...sH},store_checkout_flows:{...lH},all_step_templates:(()=>{const e=[],t=cartflows_admin.flows_and_steps;return t&&t.forEach(t=>{t.steps.forEach(n=>{n.template_ID=t.ID,n.template_type=t.type,e.push(n)})}),e})(),currentFlowSteps:Object.values(cartflows_admin.currentFlowSteps).length?cartflows_admin.currentFlowSteps["wcf-steps"]:[],flowsCount:(()=>{if(!Object.values(cartflows_admin.flows_count).length)return 0;let e=0;for(status in cartflows_admin.flows_count)"publish"===status&&(e+=parseInt(cartflows_admin.flows_count[status]));return e})(),currentFlowId:cartflows_admin.flow_id,selectedStep:"",license_status:cartflows_admin.license_status,stepTypes:{landing:"Landing",checkout:"Checkout",upsell:"Upsell",downsell:"Downsell",thankyou:"Thank You",optin:"Optin"},storeStepTypes:{upsell:"Upsell",downsell:"Downsell",thankyou:"Thank You"}},uH={getCount:({age:e})=>e,getAllFlows:({all_flows:e})=>e,getStoreCheckoutFlows:({store_checkout_flows:e})=>e,getFlowsList:({all_flows:e},t)=>e[t]?e[t]:[],getStoreCheckoutFlowsList:({store_checkout_flows:e},t)=>e[t]?e[t]:[],getAllStepTemplates:({all_step_templates:e})=>e,isLimitReached:({cf_pro_status:e,flow_count:t})=>("not-installed"===e||"inactive"===e)&&t>=3,getFlowsCount:({})=>0,getcurrentFlowId:({currentFlowId:e})=>e,getLicenseStatus:({license_status:e})=>e,getselectedStepTitle:({stepTypes:e,selectedStep:t})=>e[t]||"",getselectedStep:({selectedStep:e})=>e,getstepTypes:({stepTypes:e})=>e,getStoreStepTypes:({storeStepTypes:e})=>e,getcurrentFlowSteps:({currentFlowSteps:e})=>e,getMissingPlugins:({missingPlugins:e})=>e,getPreview:({preview:e})=>e,getWooCommerceStatus:({woocommerce_status:e})=>e,getDefaultPageBuilder:({default_page_builder:e})=>e,getPageBuilderGroup:({page_builder_group:e})=>e,getFlowCount:({flow_count:e})=>e,getCFProStatus:({cf_pro_status:e})=>e,getCurrentPageBuilderData:({page_builder_group_data:e},t)=>e[t],getRequiredPluginsData:({requiredPluginsData:e})=>e},dH={updateWooCommerceStatus:e=>({type:"UPDATE_WOOCOMMERCE_STATUS",woocommerce_status:e}),updateCFProStatus:e=>({type:"UPDATE_CF_PRO_STATUS",cf_pro_status:e}),setMissingPlugins:e=>({type:"SET_MISSING_PLUGINS",missingPlugins:e}),setPreview:e=>({type:"SET_PREVIEW",preview:e}),setSelectedStep:e=>({type:"SET_SELECTED_STEP",selectedStep:e}),setRequiredPlugins:(e,t)=>({type:"SET_REQUIRED_PLUGINS",page_builder:e,value:t}),setAllFlows:(e,t)=>({type:"SET_ALL_FLOWS",flows:e,page_builder:t})},{registerStore:fH}=wp.data;fH("wcf/importer",{reducer:(e=cH,t)=>"SET_MISSING_PLUGINS"===t.type?(console.log("SET_MISSING_PLUGINS",t),{...e,missingPlugins:t.missingPlugins}):"UPDATE_WOOCOMMERCE_STATUS"===t.type?(console.log("UPDATE_WOOCOMMERCE_STATUS",t),{...e,woocommerce_status:t.woocommerce_status}):"UPDATE_CF_PRO_STATUS"===t.type?(console.log("UPDATE_CF_PRO_STATUS",t),{...e,cf_pro_status:t.cf_pro_status}):"SET_SELECTED_STEP"===t.type?(console.log("SET_SELECTED_STEP",t),{...e,selectedStep:t.selectedStep}):"SET_PREVIEW"===t.type?(console.log("SET_PREVIEW",t),{...e,preview:t.preview}):"SET_REQUIRED_PLUGINS"===t.type?(e.requiredPluginsData[t.page_builder]=t.value,{...e}):"SET_ALL_FLOWS"===t.type?(e.all_flows[t.page_builder]=t.flows,{...e}):e,actions:dH,selectors:uH});const pH=(0,Rm.compose)((0,Um.withDispatch)(e=>{const{setPreview:t}=e("wcf/importer");return{setPreview(e){t(e)}}}))(function({item:e,setPreview:t}){const{thumbnail_image_url:n,title:r,type:o}=e;return(0,a.createElement)("div",{className:"wcf-flow-template--item group relative cursor-pointer transition ease-in-out delay-150 rounded-lg shadow-md",onClick:()=>t(e)},"pro"===o&&(0,a.createElement)("div",{className:"z-10 absolute top-5 right-5"},(0,a.createElement)(Rp,null)),(0,a.createElement)("div",{className:"wcf-item__inner bg-background-primary border border-border-subtle"},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap sm:max-h-96 max-h-56 overflow-hidden relative"},(0,a.createElement)("div",{className:"wcf-item__thumbnail overflow-hidden"},(0,a.createElement)("img",{className:"wcf-flow-template--thumbnail-image w-full",src:n,title:r,alt:r})),(0,a.createElement)("div",{className:"wcf-item__view invisible group-hover:visible absolute backdrop-brightness-50 top-0 w-full h-full transition ease-in-out delay-150"},(0,a.createElement)("div",{className:"mx-auto my-0 text-center flex flex-col gap-4 relative top-1/2"},(0,a.createElement)("div",{className:"wcf-item__btn"},(0,a.createElement)(Wo,{variant:"primary",size:"sm",icon:(0,a.createElement)(qm,{className:"w-4 h-4 stroke-2"}),className:"mx-auto"},(0,z.__)("View All Steps","cartflows")))))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},r))))});function mH({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 12h-15m0 0 6.75 6.75M4.5 12l6.75-6.75"}))}const hH=w.forwardRef(mH);function gH({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 8.25H7.5a2.25 2.25 0 0 0-2.25 2.25v9a2.25 2.25 0 0 0 2.25 2.25h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25H15M9 12l3 3m0 0 3-3m-3 3V2.25"}))}const yH=w.forwardRef(gH),wH=function({item:e,setPreviewImageURL:t,currentPreviewID:n,setCurrentPreviewID:r}){const{ID:o,title:i,type:s,thumbnail_image_url:l,featured_image_url:c}=e,u="wcf-item__inner rounded-lg cursor-pointer border border-solid "+(n===o?"!border-brand-500":"border-border-subtle");return(0,a.createElement)("div",{className:"wcf-item wcf-item--preview mb-8"},"pro"===s&&(0,a.createElement)("div",{className:"mb-1"},(0,a.createElement)(Rp,null)),(0,a.createElement)("div",{className:u,onClick:()=>{t(c),r(o)}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail max-h-[200px] overflow-hidden"},(0,a.createElement)("img",{className:"wcf-item__thumbnail-image w-full rounded-lg",src:`${l}`,alt:(0,z.__)("Funnel thumbnail image","cartflows")}))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap p-4 bg-background-primary border-t border-border-subtle rounded-bl-lg rounded-br-lg"},(0,a.createElement)("div",{className:"wcf-item__step-type text-xs font-normal text-field-placeholder mb-1"},(d=s,{landing:(0,z.__)("Landing","cartflows"),checkout:(0,z.__)("Checkout","cartflows"),thankyou:(0,z.__)("Thank You","cartflows"),optin:(0,z.__)("Opt-In","cartflows"),"optin-thankyou":(0,z.__)("Thank You","cartflows")}[d]||d)),(0,a.createElement)("div",{className:"wcf-item__heading text-text-primary text-sm font-medium"},i))));var d},bH=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getPreview:t}=e("wcf/importer");return{preview:t()}}),(0,Um.withDispatch)(e=>{const{setPreview:t}=e("wcf/importer");return{setPreview:t}}))(function({preview:e,setPreview:t}){const{featured_image_url:n,steps:r}=e,o=cartflows_admin.template_library_url+"preview/?flow="+e.ID,i=Object.values(r),s=i.length?i[0].ID:"",[l,c]=(0,a.useState)(n),[u,d]=(0,a.useState)(s),[f,p]=(0,a.useState)("hide"),[m,h]=(0,a.useState)("");return window.scrollTo(0,0),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-flow-preview-wrap"},(0,a.createElement)("div",{className:"wcf-flow-preview--header bg-background-primary flex justify-between items-center mb-9 -m-8 sm:px-8 py-6 sm:flex-row flex-col gap-3"},(0,a.createElement)("div",{className:"wcf-flow-preview--left-section flex justify-between items-center gap-4"},(0,a.createElement)(Wo,{variant:"ghost",size:"sm",icon:(0,a.createElement)(hH,{className:"w-5 h-5 stroke-2"}),onClick:()=>t({})}),(0,a.createElement)("h3",{className:"text-xl text-text-primary font-semibold"},(0,z.__)("Funnel Preview","cartflows"))),(0,a.createElement)("div",{className:"wcf-flow-preview--right-section"},(0,a.createElement)("div",{className:"wcf-flow-preview__actions flex justify-between items-center gap-4"},(0,a.createElement)(Wo,{variant:"outline",size:"md",tag:"a",href:o,target:"_blank",rel:"noreferrer",className:"no-underline",icon:(0,a.createElement)(qm,{className:"w-5 h-5 stroke-2"})},(0,z.__)("Live Preview","cartflows")),(0,a.createElement)(Wo,{variant:"primary",size:"md",icon:(0,a.createElement)(yH,{className:"w-5 h-5 stroke-2"}),onClick:()=>{p("hide"===f?"show":"hide")}},(0,z.__)("Import Funnel","cartflows")),(0,a.createElement)(th,{visibility:f,setVisibility:p,preview:e,type:"import",flowName:m,setFlowName:h})))),(0,a.createElement)("div",{className:"wcf-flow-preview flex sm:flex-row flex-col-reverse p-6 bg-background-primary shadow-sm rounded-md"},(0,a.createElement)("div",{className:"wcf-flow-preview__item w-full sm:w-4/5 sm:px-6 p-0 border-0 border-r border-solid border-border-subtle"},(0,a.createElement)("div",{className:"border border-solid border-border-subtle rounded-lg"},(0,a.createElement)("div",{className:"wcf-window--header bg-background-primary p-2 flex items-center rounded-tl-lg rounded-tr-lg"},(0,a.createElement)("div",{className:"wcf-window--buttons flex justify-start gap-1 items-center w-2/4"},(0,a.createElement)("span",{className:"bg-background-secondary rounded-full p-1"}),(0,a.createElement)("span",{className:"bg-background-secondary rounded-full p-1"}),(0,a.createElement)("span",{className:"bg-background-secondary rounded-full p-1"})),(0,a.createElement)("div",{className:"wcf-window--title capitalize text-xs font-medium text-text-secondary w-2/4 -ml-12"},`${i.find(e=>e.ID===u).type} Page`)),(0,a.createElement)("div",{className:"wcf-flow-preview__inner max-h-screen overflow-y-auto"},(0,a.createElement)("div",{className:"wcf-flow-preview__thumbnail-wrap"},(0,a.createElement)("img",{className:"wcf-flow-preview__thumbnail w-full",src:l,alt:(0,z.__)("Funnel Preview","cartflows")}))))),(0,a.createElement)("div",{className:"wcf-flow-preview__list w-full sm:w-[20%] sm:px-6 p-0"},i.map(e=>(0,a.createElement)(wH,{key:e.ID,item:e,setPreviewImageURL:c,currentPreviewID:u,setCurrentPreviewID:d}))))))}),vH=({preview:e,type:t,flowName:n,setVisibility:r})=>(0,a.createElement)(Im.Footer,{className:"wcf-name-your-flow--footer bg-brand-25 flex justify-end gap-4"},"import"===t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",className:"no-underline text-center",onClick:()=>r("hide")},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(LG,{preview:e,flowName:n,isStoreCheckout:!0})),"blank"===t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",className:"no-underline text-center",onClick:()=>r("hide")},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(zG,{flowName:n,isStoreCheckout:!0}))),xH=e=>{const{cf_pro_status:t,setVisibility:n,preview:r,type:o,setFlowName:i}=e;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,{className:"wcf-name-your-flow--title"},(0,z.__)("Create Store Checkout","cartflows")),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)("div",{className:"wcf-name-your-store-flow--content"},(0,a.createElement)("p",{className:"text-sm font-medium leading-6 text-text-primary mb-4"},(0,z.__)("Set up a Store Checkout in just one click:","cartflows")),(0,a.createElement)("ul",{className:"text-sm text-text-secondary mb-4 list-inside"},(0,a.createElement)("li",{className:"flex gap-2 items-center"},(0,a.createElement)(oW,{className:"h-18 w-18 text-brand-600","aria-hidden":"true"}),(0,z.__)("Checkout Page","cartflows")),(0,a.createElement)("li",{className:"flex gap-2 items-center"},(0,a.createElement)(oW,{className:"h-18 w-18 text-brand-600","aria-hidden":"true"}),(0,z.__)("Thank You Page","cartflows"))),(0,a.createElement)("p",{className:"text-sm text-text-secondary"},(0,z.__)("Use ready-made templates from the CartFlows Library, our custom widget, or shortcodes on each page to set this up easily—no coding needed!","cartflows")))),(0,a.createElement)(vH,{cf_pro_status:t,setVisibility:n,preview:r,type:o,flowName:"Store Checkout",setFlowName:i}))},NH=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getCFProStatus:n,getLicenseStatus:r}=e("wcf/importer");return{flowsCount:t(),cf_pro_status:n(),license_status:r()}}))(({visibility:e,setVisibility:t,preview:n,type:r,flowName:o,setFlowName:i,cf_pro_status:s})=>(0,a.createElement)(Im,{open:"show"===e,setOpen:e=>{e||t("hide")},exitOnClickOutside:!0},(0,a.createElement)(Im.Panel,{className:"wcf-name-your-flow__inner sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(xH,{cf_pro_status:s,setVisibility:t,preview:n,type:r,flowName:o,setFlowName:i})))),EH=(0,Rm.compose)((0,Um.withSelect)(()=>({page_builder_group:cartflows_admin.required_plugins[cartflows_admin?.page_builder],default_page_builder:cartflows_admin?.page_builder})),(0,Um.withDispatch)(e=>{const{setRequiredPlugins:t,setAllFlows:n}=e("wcf/importer");return{setRequiredPlugins:t,setAllFlows:n}}))(({setRequiredPlugins:e,setAllFlows:t,default_page_builder:n,page_builder_group:r})=>{const o=cartflows_admin?.default_page_builder||"other",[i,s]=(0,a.useState)(!1),l=new URLSearchParams((0,g.useLocation)()?.search);let c=l.get("path")?l.get("path"):"";"store-checkout-library"===c&&(c="store-checkout");const u=r.title;let d=`Please click here and activate ${u}`,f="";if("divi"===n){f=r["theme-status"];const e=r["plugin-status"];"deactivate"===f||"install"===e?d=`Please activate ${u}`:"deactivate"!==f&&"not-installed"!==f||"install"!==e||(d=`Please install and activate ${u}`)}function p(n){const r=new window.FormData;r.append("action","cartflows_activate_plugin"),r.append("init",n.init),r.append("security",cartflows_admin.activate_plugin_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{s(!1),e(o,"no"),t([]),window.location.reload()})}const[m,h]=(0,a.useState)("hide"),[y,w]=(0,a.useState)("");return(0,a.createElement)("div",{className:"wcf-flow-importer wcf-flow-library--other"},(0,a.createElement)("div",{className:"wcf-flow-library-importer__header bg-background-primary px-8 py-6 flex justify-between items-center border-b border-border-subtle"},(0,a.createElement)("h3",{className:"wcf-flow-importer__header-title text-xl font-semibold text-text-primary"},"store-checkout"===c?(0,z.__)("Store Checkout Templates","cartflows"):(0,z.__)("Funnel Templates","cartflows"))),(0,a.createElement)("div",{className:"wcf-flow-library-importer__list bg-background-primary px-10 py-14"},"store-checkout"===c?(0,a.createElement)(NH,{visibility:m,setVisibility:h,type:"blank",flowName:y,setFlowName:w}):(0,a.createElement)(th,{visibility:m,setVisibility:h,type:"blank",flowName:y,setFlowName:w}),(0,a.createElement)("div",{className:"wcf-item wcf-item--start-from-blank flex gap-6 mx-auto max-w-4xl"},(0,a.createElement)("div",{className:"wcf-item__inner relative cursor-pointer group bg-gray-25 p-5 text-center flex flex-col border border-border-subtle hover:border-brand-300 rounded-md items-center justify-center h-72 w-2/3",onClick:()=>{h("hide"===m?"show":"hide")}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail"},(0,a.createElement)("div",{className:"wcf-flow-importer__start-from-blank-icon bg-background-primary p-6 rounded-full flex items-center justify-center"},(0,a.createElement)(QU,{className:"wcf-icon-start-from-blank w-7 h-7 stroke-1 text-text-tertiary group-hover:text-brand-300"})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-t border-border-subtle absolute bottom-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Start from scratch","cartflows")))),(0,a.createElement)("div",{className:"wcf_item__info flex flex-col gap-6 justify-center w-3/4"},(0,a.createElement)("h3",{className:"wcf_item__info--title text-xl text-text-primary font-semibold"},(0,z.__)("It seems that the page builder you selected is inactive.","cartflows")),(0,a.createElement)("p",{className:"wcf_item__info--notice text-base text-text-secondary font-normal"},i&&(0,a.createElement)("span",{className:"text-sm text-text-secondary"},(0,z.__)("Processing…","cartflows")),(0,a.createElement)("a",{href:"#",onClick:function(e){e.preventDefault(),s(!0);const t=cartflows_admin.required_plugins[n].plugins;let r=0,o=0;for(const e of t)"install"===e.status&&r++,"activate"===e.status&&o++;r?function(e){for(const t of e)"install"===t.status&&wp.updates.queue.push({action:"install-plugin",data:{slug:t.slug,init:t.init,name:t.name,success(){p(t)},error(){}}});wp.updates.queueChecker()}(t):o&&function(e){for(const t of e)"activate"===t.status&&p(t)}(t)},className:"text-brand-500 hover:text-brand-600"},d),(0,z.__)(" to see CartFlows templates. If you prefer another page builder tool, you can ","cartflows"),(0,a.createElement)(C,{key:`?page=${cartflows_admin.home_slug}&path=settings&tab=general`,to:{pathname:"admin.php",search:`?page=${cartflows_admin.home_slug}&path=settings&tab=general`},onClick:function(e){e.preventDefault(),window.location=e.target.href},className:"text-brand-500 hover:text-brand-600"},(0,z.__)("select it here","cartflows")),"."),(0,a.createElement)("span",{className:"wcf_item__info--desc text-base text-text-secondary font-normal"},(0,z.__)("Are you using any other page builder? No worries. CartFlows works well with every other page builder. Right now we do not have ready templates for every page builder but we are planning to add it very soon.","cartflows")),(0,a.createElement)("a",{className:"wcf_item__info--doc text-text-secondary hover:text-brand-500 flex items-center gap-2 text-sm",href:getKbDocUrl("https://cartflows.com/docs/how-to-use-cartflows-with-your-own-template/"),target:"_blank",rel:"noreferrer"},(0,z.__)("Learn How ","cartflows"),(0,a.createElement)("i",{className:"dashicons dashicons-external"}))))))}),MH=(0,a.memo)(e=>{const t=(0,z.__)("Sync Library","cartflows"),{template:n}=e,r=n||"",[o,i]=(0,a.useState)({isProcessing:!1,buttonText:t}),{isProcessing:s,buttonText:l}=o,c=async(e,t)=>{const n=new window.FormData;n.append("action","cartflows_import_sites"),n.append("page_no",e),n.append("template",r),n.append("security",cartflows_admin.import_sites_nonce),await L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(n=>{n.success&&(i({isProcessing:!0,buttonText:(0,z.sprintf)(/* translators: %d is replaced with the condition number */ /* translators: %d is replaced with the condition number */ |
| 41 |
(0,z.__)("Importing page %d","cartflows"),e)}),e===t&&(async()=>{const e=new window.FormData;e.append("action","cartflows_update_library_complete"),e.append("template",r),e.append("security",cartflows_admin.update_library_complete_nonce),i({isProcessing:!0,buttonText:(0,z.__)("Sync Complete","cartflows")}),await L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.success&&i({isProcessing:!1,buttonText:(0,z.__)("Sync Complete","cartflows")})}).catch(()=>{})})())}).catch(()=>{})};return(0,a.createElement)(Wo,{variant:"outline",size:"md",loading:s,icon:(0,a.createElement)(Op,{className:"w-4 h-4 stroke-1 "+(s?"animate-spin":"")}),className:"wcf-sync whitespace-nowrap sm:whitespace-normal",onClick:e=>{e.preventDefault(),i({isProcessing:!0,buttonText:(0,z.__)("Syncing Library…","cartflows")}),(async()=>{try{const e=new window.FormData;e.append("action","cartflows_sync_library"),e.append("template",r),e.append("security",cartflows_admin.sync_library_nonce),await L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.success&&("updated"===e.data?(i({isProcessing:!1,buttonText:(0,z.__)("Library Synced","cartflows")}),setTimeout(()=>{i({isProcessing:!1,buttonText:t})},5e3)):(async()=>{const e=new window.FormData;e.append("action","cartflows_request_count"),e.append("template",r),e.append("security",cartflows_admin.request_count_nonce),await L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(async e=>{if(e.success){i({isProcessing:!0,buttonText:"Importing Pages.."});const t=e.data.count;for(let e=1;e<=t;e++)c(e,t)}else i({isProcessing:!1,buttonText:t})}).catch(()=>{})})())}).catch(()=>{})}catch(e){}})()}},l)}),_H=()=>{const[e,t]=(0,a.useState)("hide"),[n,r]=(0,a.useState)("");return(0,a.createElement)("div",{className:"wcf-flow-library-importer wcf-flow-library--other"},(0,a.createElement)("div",{className:"wcf-flow-library-importer__list bg-background-primary px-10 py-14 border border-solid border-border-subtle rounded-md shadow-sm"},(0,a.createElement)(th,{visibility:e,setVisibility:t,type:"blank",flowName:n,setFlowName:r}),(0,a.createElement)("div",{className:"wcf-item wcf-item--start-from-blank flex gap-6 mx-auto max-w-4xl"},(0,a.createElement)("div",{className:"wcf-item__inner relative cursor-pointer group bg-gray-25 p-5 text-center flex flex-col border border-solid border-border-subtle hover:border-brand-300 rounded-md items-center justify-center h-72 w-2/3",onClick:()=>{t("hide"===e?"show":"hide")}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail"},(0,a.createElement)("div",{className:"wcf-flow-importer__start-from-blank-icon bg-background-primary p-6 rounded-full flex items-center justify-center"},(0,a.createElement)(QU,{className:"w-7 h-7 stroke-1 text-text-tertiary group-hover:text-brand-300"})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-t border-border-subtle absolute bottom-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Start from scratch","cartflows")))),(0,a.createElement)("div",{className:"wcf_item__info flex flex-col gap-3 justify-center w-3/4"},(0,a.createElement)("h3",{className:"wcf_item__info--title text-xl text-text-primary font-semibold m-0"},(0,z.__)("No Results Found.","cartflows")),(0,a.createElement)("span",{className:"wcf_item__info--desc text-base text-text-secondary font-normal"},(0,z.__)("Don't see a funnel that you would like to import?","cartflows")),(0,a.createElement)("a",{className:"wcf_item__info--doc text-sm text-text-secondary font-normal hover:text-brand-300 flex gap-1",href:getUtmUrl("https://cartflows.com/funnel-suggestions/",{utm_campaign:"suggestions"}),target:"_blank",rel:"noreferrer"},(0,z.__)("Please suggest us ","cartflows"),(0,a.createElement)(qm,{className:"w-5 h-5 stroke-1 text-text-tertiary hover:text-brand-300"}))))))},IH=function(){return(0,a.createElement)("div",{className:"wcf-flow-importer__list wcf-items-list grid grid-cols-2 sm:grid-cols-4 gap-6 is-placeholder mb-9"},Array.from({length:12}).map((e,t)=>(0,a.createElement)("div",{key:t,className:"wcf-item"},(0,a.createElement)("div",{className:"bg-background-primary border border-border-subtle rounded-lg overflow-hidden"},(0,a.createElement)(WO,{className:"w-full h-52"}),(0,a.createElement)("div",{className:"p-4 border-t border-border-subtle"},(0,a.createElement)(WO,{className:"w-full h-4"}))))))},SH=(0,Rm.compose)((0,Um.withDispatch)(e=>{const{setAllFlows:t}=e("wcf/importer");return{setAllFlows:t}}))(function({setAllFlows:e}){let t="no";const n=(0,g.useHistory)(),r=cartflows_admin?.default_page_builder||"other",[o,i]=(0,a.useState)(""),[s,l]=(0,a.useState)(!1),{currentPageBuilderData:c,requiredPluginsData:u,preview:d,all_flows:f,flows_list:p}=(0,Um.useSelect)(e=>({currentPageBuilderData:e("wcf/importer").getCurrentPageBuilderData(r),requiredPluginsData:e("wcf/importer").getRequiredPluginsData(),preview:e("wcf/importer").getPreview(),all_flows:e("wcf/importer").getAllFlows(),flows_list:e("wcf/importer").getFlowsList(r)}));if("yes"===u[r]&&c&&c?.plugins&&c?.plugins.map(function(e){return"install"!==e.status&&"activate"!==e.status||(t="yes"),""}),"yes"===t)return(0,a.createElement)(EH,null);(0,a.useEffect)(()=>{let t=!0;if(!f[r]){const n=new window.FormData;n.append("action","cartflows_get_flows_list"),n.append("security",cartflows_admin.get_flows_list_nonce),l(!0),(async()=>{L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(n=>{if(l(!1),t&&n?.data?.flows){const t=Object.values(n.data.flows);h(t),e(t,r)}})})()}return()=>{t=!1}},[f]);const[m,h]=(0,a.useState)(p),[y,w]=(0,a.useState)("hide"),[b,v]=(0,a.useState)("");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-flow-importer"},Object.keys(d).length?(0,a.createElement)(bH,null):(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-flow-importer__header bg-background-primary px-8 py-6 flex justify-between items-start sm:items-center mb-9 -m-8 sm:flex-row flex-col gap-3"},(0,a.createElement)("h3",{className:"wcf-flow-importer__header-title text-xl font-semibold text-text-primary m-0 flex items-center gap-2"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs","aria-label":(0,z.__)("Back to Funnels","cartflows"),icon:(0,a.createElement)(UW,{className:"w-6 h-6 stroke-1 text-text-primary"}),onClick:()=>{n.push("admin.php?page=cartflows&path=flows")}}),(0,z.__)("Choose a Funnel Template","cartflows")),(0,a.createElement)("div",{className:"wcf-flow-importer__actions gap-4 flex justify-between items-center"},(0,a.createElement)("div",{className:"wcf-flow-importer__actions-content-left"},(0,a.createElement)("div",{className:"wcf-flow-importer__actions-search w-56"},(0,a.createElement)(Ym,{type:"text",value:o,onChange:function(e){if(i(e),e&&e.length>=3){const t=e.toLowerCase(),n=p.filter(function(e){return(e.title&&e.title.toLowerCase()||"").includes(t)});h(n)}else h(p)},placeholder:(0,z.__)("Search Templates","cartflows"),size:"md",prefix:(0,a.createElement)(DV,{className:"size-4 text-field-placeholder"}),suffix:o.length>=3?(0,a.createElement)(jV,{className:"size-4 cursor-pointer text-field-placeholder pointer-events-auto",onClick:()=>{i(""),h(p)}}):null}))),(0,a.createElement)("div",{className:"divider w-px bg-background-secondary h-7"}),(0,a.createElement)("div",{className:"wcf-flow-importer__actions-content-right"},(0,a.createElement)("div",{className:"wcf-flow-importer__actions-buttons"},(0,a.createElement)(MH,null))))),s&&(0,a.createElement)(IH,null),p.length>0&&0===m.length&&(0,a.createElement)(_H,null),!(p.length>0&&0===m.length)&&(0,a.createElement)("div",{className:"wcf-flow-importer__list wcf-items-list grid grid-cols-1 sm:grid-cols-4 gap-6 p-6 bg-background-primary shadow-sm rounded-md"},(0,a.createElement)(th,{visibility:y,setVisibility:w,type:"blank",flowName:b,setFlowName:v}),(0,a.createElement)("div",{className:"wcf-item wcf-item__start-from-blank sm:h-full lg:h-full sm:min-h-full lg:min-h-full min-h-72 bg-background-primary rounded-lg relative start-scratch"},(0,a.createElement)("div",{className:"wcf-item__inner relative cursor-pointer bg-background-secondary text-center h-full flex flex-col gap-4 items-center justify-center shadow-md",onClick:()=>{w("hide"===y?"show":"hide")}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail"},(0,a.createElement)("div",{className:"wcf-flow-importer__start-from-blank-icon bg-background-primary p-6 rounded-full flex items-center justify-center"},(0,a.createElement)(QU,{className:"w-7 h-7 stroke-2 text-text-tertiary"})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-t border-border-subtle absolute bottom-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Start from scratch","cartflows"))))),p.length>0&&0<m.length&&m.map(e=>(0,a.createElement)(pH,{key:e.ID,item:e}))))))}),jH=e=>{const t=(0,g.useHistory)(),[n,r]=(0,a.useState)("hide"),[o,i]=(0,a.useState)(""),s=e.page_builder;return(0,a.createElement)("div",{className:"wcf-flow-library-importer wcf-flow-library--other"},(0,a.createElement)("div",{className:"wcf-flow-library-importer__header bg-background-primary px-8 py-6 flex justify-between items-center border-b border-border-subtle"},(0,a.createElement)("h3",{className:"wcf-flow-importer__header-title text-xl font-semibold text-text-primary m-0 flex items-center gap-2"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs","aria-label":(0,z.__)("Back to Funnels","cartflows"),icon:(0,a.createElement)(UW,{className:"w-6 h-6 stroke-1 text-text-primary"}),onClick:()=>{t.push("admin.php?page=cartflows&path=flows")}}),(0,z.__)("Start from Scratch","cartflows"))),(0,a.createElement)("div",{className:"wcf-flow-library-importer__list bg-background-primary px-10 py-14"},(0,a.createElement)(th,{visibility:n,setVisibility:r,type:"blank",flowName:o,setFlowName:i}),(0,a.createElement)("div",{className:"wcf-item wcf-item--start-from-blank flex gap-6 mx-auto max-w-4xl"},(0,a.createElement)("div",{className:"wcf-item__inner relative cursor-pointer group bg-gray-25 p-5 text-center flex flex-col border border-border-subtle hover:border-brand-300 rounded-md items-center justify-center h-72 w-2/3",onClick:()=>{r("hide"===n?"show":"hide")}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail"},(0,a.createElement)("div",{className:"wcf-flow-importer__start-from-blank-icon bg-background-primary p-6 rounded-full flex items-center justify-center"},(0,a.createElement)(QU,{className:"w-7 h-7 stroke-1 text-text-tertiary group-hover:text-brand-300"})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-t border-border-subtle absolute bottom-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Start from scratch","cartflows")))),(0,a.createElement)("div",{className:"wcf_item__info flex flex-col gap-6 justify-center w-3/4"},(0,a.createElement)("h3",{className:"wcf_item__info--title text-xl text-text-primary font-semibold"},"bricks-builder"===s&&(0,z.__)("It seems that you are using the Bricks Builder.","cartflows"),"other"===s&&(0,z.__)("It seems that you are using the page builder other than Elementor, Beaver Builder, Block Builder.","cartflows")),(0,a.createElement)("span",{className:"wcf_item__info--desc text-base text-text-secondary font-normal mt-2"},"bricks-builder"===s&&(0,z.__)("Are you using Bricks Builder? No worries. CartFlows works well with Bricks Builder. Right now we do not have ready templates for Bricks Builder but we are planning to add it very soon.","cartflows"),"other"===s&&(0,z.__)("Are you using any other page builder? No worries. CartFlows works well with every other page builder. Right now we do not have ready templates for every page builder but we are planning to add it very soon.","cartflows")),(0,a.createElement)("span",{className:"mt-2"},(0,a.createElement)("a",{className:"wcf_item__info--doc text-text-secondary hover:text-brand-500 flex items-center gap-2 text-sm",href:getKbDocUrl("https://cartflows.com/docs/how-to-use-cartflows-with-your-own-template/"),target:"_blank",rel:"noreferrer"},(0,z.__)("Learn How ","cartflows"),(0,a.createElement)(qm,{className:"w-18 h-18 stroke-1"})))))))},kH=()=>{const e=cartflows_admin?.default_page_builder||"other";return"bricks-builder"!==e&&"other"!==e?(0,a.createElement)(SH,null):(0,a.createElement)(jH,{page_builder:e})},DH=function({item:e,setPreviewImageURL:t,currentPreviewID:n,setCurrentPreviewID:r}){const{ID:o,title:i,type:s,thumbnail_image_url:l,featured_image_url:c}=e,u="wcf-item__inner rounded-lg cursor-pointer border border-solid "+(n===o?"!border-brand-500":"border-border-subtle");return(0,a.createElement)("div",{className:"wcf-item wcf-item--preview mb-8"},"pro"===s&&(0,a.createElement)("div",{className:"mb-1"},(0,a.createElement)(Rp,null)),(0,a.createElement)("div",{className:u,onClick:()=>{t(c),r(o)}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail max-h-[200px] overflow-hidden"},(0,a.createElement)("img",{className:"wcf-item__thumbnail-image w-full rounded-lg",src:`${l}`,alt:(0,z.__)("Store Checkout thumbnail","cartflows")}))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap p-4 bg-background-primary border-t border-border-subtle rounded-bl-lg rounded-br-lg"},(0,a.createElement)("div",{className:"wcf-item__step-type text-xs font-normal text-field-placeholder mb-1"},(d=s,{landing:(0,z.__)("Landing","cartflows"),checkout:(0,z.__)("Checkout","cartflows"),thankyou:(0,z.__)("Thank You","cartflows"),optin:(0,z.__)("Opt-In","cartflows"),"optin-thankyou":(0,z.__)("Thank You","cartflows")}[d]||d)),(0,a.createElement)("div",{className:"wcf-item__heading text-text-primary text-sm font-medium"},i))));var d},CH=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getPreview:t}=e("wcf/importer");return{preview:t()}}),(0,Um.withDispatch)(e=>{const{setPreview:t}=e("wcf/importer");return{setPreview:t}}))(function({preview:e,setPreview:t}){const{featured_image_url:n,steps:r}=e,o=cartflows_admin.template_library_url+"preview/?flow="+e.ID,i=[];Object.values(r).forEach(function(e){["checkout","thankyou"].includes(e.type)&&i.push(e)});const s=i.length?i[0].ID:"",[l,c]=(0,a.useState)(n),[u,d]=(0,a.useState)(s),[f,p]=(0,a.useState)("");return window.scrollTo(0,0),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-flow-preview-wrap"},(0,a.createElement)("div",{className:"wcf-flow-preview--header bg-background-primary flex justify-between items-center mb-9 -m-8 sm:px-8 py-6 sm:flex-row flex-col gap-3"},(0,a.createElement)("div",{className:"wcf-flow-preview--left-section flex justify-between items-center gap-4"},(0,a.createElement)(Wo,{variant:"ghost",size:"sm",icon:(0,a.createElement)(hH,{className:"w-5 h-5 stroke-2"}),onClick:()=>t({})}),(0,a.createElement)("span",{className:"wcf-flows-header__text sr-only"}," ",(0,z.__)("Back","cartflows")," "),(0,a.createElement)("h3",{className:"text-xl text-text-primary font-semibold"},(0,z.__)("Funnel Preview","cartflows"))),(0,a.createElement)("div",{className:"wcf-flow-preview--right-section"},(0,a.createElement)("div",{className:"wcf-flow-preview__actions flex justify-between items-center gap-4"},(0,a.createElement)(Wo,{variant:"outline",size:"md",tag:"a",href:o,target:"_blank",rel:"noreferrer",className:"no-underline",icon:(0,a.createElement)(qm,{className:"w-5 h-5 stroke-2"})},(0,z.__)("Live Preview","cartflows")),(0,a.createElement)(LG,{preview:e,flowName:(0,z.__)("Store Checkout","cartflows"),inputFieldVisibility:f,setInputFieldVisibility:p,isStoreCheckout:!0})))),(0,a.createElement)("div",{className:"wcf-flow-preview flex sm:flex-row flex-col-reverse p-6 bg-background-primary shadow-sm rounded-md"},(0,a.createElement)("div",{className:"wcf-flow-preview__item w-full sm:w-4/5 sm:px-6 p-0 border-0 border-r border-solid border-border-subtle"},(0,a.createElement)("div",{className:"border border-solid border-border-subtle rounded-lg"},(0,a.createElement)("div",{className:"wcf-window--header bg-background-primary p-2 flex items-center rounded-tl-lg rounded-tr-lg"},(0,a.createElement)("div",{className:"wcf-window--buttons flex justify-start gap-1 items-center w-2/4"},(0,a.createElement)("span",{className:"bg-background-secondary rounded-full p-1"}),(0,a.createElement)("span",{className:"bg-background-secondary rounded-full p-1"}),(0,a.createElement)("span",{className:"bg-background-secondary rounded-full p-1"})),(0,a.createElement)("div",{className:"wcf-window--title capitalize text-xs font-medium text-text-secondary w-2/4 -ml-12"},`${i.find(e=>e.ID===u).type} Page`)),(0,a.createElement)("div",{className:"wcf-flow-preview__inner max-h-screen overflow-y-auto"},(0,a.createElement)("div",{className:"wcf-flow-preview__thumbnail-wrap"},(0,a.createElement)("img",{className:"wcf-flow-preview__thumbnail w-full",src:l,alt:(0,z.__)("Funnel Preview","cartflows")}))))),(0,a.createElement)("div",{className:"wcf-flow-preview__list w-full sm:w-[20%] sm:px-6 p-0"},i.map(e=>(0,a.createElement)(DH,{key:e.ID,item:e,setPreviewImageURL:c,currentPreviewID:u,setCurrentPreviewID:d}))))))}),AH=()=>{const[e,t]=(0,a.useState)("hide"),[n,r]=(0,a.useState)("");return(0,a.createElement)("div",{className:"wcf-flow-library-importer wcf-flow-library--other"},(0,a.createElement)("div",{className:"wcf-flow-library-importer__list bg-background-primary px-10 py-14 border border-solid border-border-subtle rounded-md shadow-sm"},(0,a.createElement)(NH,{visibility:e,setVisibility:t,type:"blank",flowName:n,setFlowName:r}),(0,a.createElement)("div",{className:"wcf-item wcf-item--start-from-blank flex gap-6 mx-auto max-w-4xl"},(0,a.createElement)("div",{className:"wcf-item__inner relative cursor-pointer group bg-gray-25 p-5 text-center flex flex-col border border-solid border-border-subtle hover:border-brand-300 rounded-md items-center justify-center h-72 w-2/3",onClick:()=>{t("hide"===e?"show":"hide")}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail"},(0,a.createElement)("div",{className:"wcf-flow-importer__start-from-blank-icon bg-background-primary p-6 rounded-full flex items-center justify-center"},(0,a.createElement)(QU,{className:"w-7 h-7 stroke-1 text-text-tertiary group-hover:text-brand-300"})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-t border-border-subtle absolute bottom-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Start from scratch","cartflows")))),(0,a.createElement)("div",{className:"wcf_item__info flex flex-col gap-3 justify-center w-3/4"},(0,a.createElement)("h3",{className:"wcf_item__info--title text-xl text-text-primary font-semibold m-0"},(0,z.__)("No Results Found.","cartflows")),(0,a.createElement)("span",{className:"wcf_item__info--desc text-base text-text-secondary font-normal"},(0,z.__)("Don't see a funnel that you would like to import?","cartflows")),(0,a.createElement)("a",{className:"wcf_item__info--doc text-sm text-text-secondary font-normal hover:text-brand-300 flex gap-1",href:getUtmUrl("https://cartflows.com/funnel-suggestions/",{utm_campaign:"suggestions"}),target:"_blank",rel:"noreferrer"},(0,z.__)("Please suggest us ","cartflows"),(0,a.createElement)(qm,{className:"w-5 h-5 stroke-1 text-text-tertiary hover:text-brand-300"}))))))},TH=()=>{const[e,t]=(0,a.useState)("hide"),[n,r]=(0,a.useState)("");return(0,a.createElement)("div",{className:"wcf-flow-importer wcf-search-404"},(0,a.createElement)("div",{className:"wcf-flow-importer__list wcf-items-list wcf-row wcf-flow-row"},(0,a.createElement)(NH,{visibility:e,setVisibility:t,type:"blank",flowName:n,setFlowName:r}),(0,a.createElement)("div",{className:"wcf-item wcf-item__start-from-blank"},(0,a.createElement)("div",{className:"wcf-item__inner",onClick:()=>{t("hide"===e?"show":"hide")}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail"},(0,a.createElement)("div",{className:"wcf-flow-importer__start-from-blank-icon"},(0,a.createElement)("span",{className:"wcf-icon dashicons dashicons-plus wcf-icon-start-from-blank"})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap"},(0,a.createElement)("div",{className:"wcf-item__heading"},(0,z.__)("Start from scratch","cartflows")))),(0,a.createElement)("div",{className:"wcf_item__info"},(0,a.createElement)("h3",{className:"wcf_item__info--title"},(0,z.__)("Oops!!! No template Found.","cartflows")),(0,a.createElement)("span",{className:"wcf_item__info--desc"},(0,z.__)("Seems like no template is available for chosen editor.","cartflows"))))))},OH=(0,Rm.compose)((0,Um.withDispatch)(e=>{const{setAllFlows:t}=e("wcf/importer");return{setAllFlows:t}}))(function({setAllFlows:e}){let t="no";const n=(0,g.useHistory)(),[{page_builder:r}]=l(),[o,i]=(0,a.useState)(""),[s,c]=(0,a.useState)(!1),{currentPageBuilderData:u,requiredPluginsData:d,preview:f,store_checkout_flows:p,flows_list:m}=(0,Um.useSelect)(e=>({currentPageBuilderData:e("wcf/importer").getCurrentPageBuilderData(r),requiredPluginsData:e("wcf/importer").getRequiredPluginsData(),preview:e("wcf/importer").getPreview(),store_checkout_flows:e("wcf/importer").getStoreCheckoutFlows(),flows_list:e("wcf/importer").getFlowsList(r)}));if("yes"===d[r]&&u&&u?.plugins&&u?.plugins.map(function(e){return"install"!==e.status&&"activate"!==e.status||(t="yes"),""}),"yes"===t)return(0,a.createElement)(EH,null);(0,a.useEffect)(()=>{let t=!0;if(!p[r]){const n=new window.FormData;n.append("action","cartflows_get_flows_list"),n.append("security",cartflows_admin.get_flows_list_nonce),c(!0),(async()=>{L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(n=>{if(c(!1),t&&n?.data?.flows){const t=Object.values(n.data.flows);y(t),e(t,r)}})})()}return()=>{t=!1}},[p]);const[h,y]=(0,a.useState)(m),[w,b]=(0,a.useState)("hide"),[v,x]=(0,a.useState)("");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-flow-importer"},Object.keys(f).length?(0,a.createElement)(CH,null):(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-flow-importer__header bg-background-primary px-8 py-6 flex justify-between items-start sm:items-center mb-9 -m-8 sm:flex-row flex-col gap-3"},(0,a.createElement)("h3",{className:"wcf-flow-importer__header-title text-xl font-semibold text-text-primary m-0 flex items-center gap-2"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs","aria-label":(0,z.__)("Back to Store Checkout","cartflows"),icon:(0,a.createElement)(UW,{className:"w-6 h-6 stroke-1 text-text-primary"}),onClick:()=>{n.push("admin.php?page=cartflows&path=store-checkout")}}),(0,z.__)("Store Checkout Templates","cartflows")),(0,a.createElement)("div",{className:"wcf-flow-importer__actions gap-4 flex justify-between items-center"},(0,a.createElement)("div",{className:"wcf-flow-importer__actions-content-left"},(0,a.createElement)("div",{className:"wcf-flow-importer__actions-search w-56"},(0,a.createElement)(Ym,{type:"text",value:o,onChange:function(e){if(i(e),e&&e.length>=3){const t=e.toLowerCase(),n=m.filter(function(e){return(e.title&&e.title.toLowerCase()||"").includes(t)});y(n)}else y(m)},placeholder:(0,z.__)("Search Templates","cartflows"),size:"md",prefix:(0,a.createElement)(DV,{className:"size-4 text-field-placeholder"}),suffix:o.length>=3?(0,a.createElement)(jV,{className:"size-4 cursor-pointer text-field-placeholder pointer-events-auto",onClick:()=>{i(""),y(m)}}):null}))),(0,a.createElement)("div",{className:"divider w-px bg-border-subtle h-7"}),(0,a.createElement)("div",{className:"wcf-flow-importer__actions-content-right"},(0,a.createElement)("div",{className:"wcf-flow-importer__actions-buttons"},(0,a.createElement)(MH,{template:"store-checkout"}))))),s&&(0,a.createElement)(IH,null),!s&&m.length<1&&h.length<1&&(0,a.createElement)(TH,null),m.length>0&&0===h.length&&(0,a.createElement)(AH,null),!(m.length>0&&0===h.length)&&(0,a.createElement)("div",{className:"wcf-flow-importer__list wcf-items-list grid grid-cols-1 sm:grid-cols-4 gap-6 p-6 bg-background-primary shadow-sm rounded-md"},(0,a.createElement)(NH,{visibility:w,setVisibility:b,type:"blank",flowName:v,setFlowName:x}),(0,a.createElement)("div",{className:"wcf-item wcf-item__start-from-blank sm:h-full lg:h-full sm:min-h-full lg:min-h-full min-h-72 bg-background-primary rounded-lg relative"},(0,a.createElement)("div",{className:"wcf-item__inner relative cursor-pointer bg-background-secondary text-center h-full flex flex-col gap-4 items-center justify-center",onClick:()=>{b("hide"===w?"show":"hide")}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail"},(0,a.createElement)("div",{className:"wcf-flow-importer__start-from-blank-icon bg-background-primary p-6 rounded-full flex items-center justify-center"},(0,a.createElement)(QU,{className:"w-7 h-7 stroke-2 text-text-tertiary"})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-t border-border-subtle absolute bottom-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Start from scratch","cartflows"))))),m.length>0&&0<h.length&&h.map(e=>(0,a.createElement)(pH,{key:e.ID,item:e}))))))}),LH=e=>{const t=(0,g.useHistory)(),[n,r]=(0,a.useState)("hide"),[o,i]=(0,a.useState)(""),s=e.page_builder;return(0,a.createElement)("div",{className:"wcf-store-library-importer wcf-store-library--other"},(0,a.createElement)("div",{className:"wcf-store-library-importer__header bg-background-primary px-8 py-6 flex justify-between items-center border-b border-border-subtle"},(0,a.createElement)("div",{className:"wcf-store-importer__header-title text-xl font-semibold text-text-primary m-0 flex items-center gap-2"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs","aria-label":(0,z.__)("Back to Store Checkout","cartflows"),icon:(0,a.createElement)(UW,{className:"w-6 h-6 stroke-1 text-text-primary"}),onClick:()=>{t.push("admin.php?page=cartflows&path=store-checkout")}}),(0,z.__)("Start from Scratch","cartflows"))),(0,a.createElement)("div",{className:"wcf-store-library-importer__list bg-background-primary px-10 py-14"},(0,a.createElement)(UG,{visibility:n,setVisibility:r,type:"blank",flowName:o,setFlowName:i}),(0,a.createElement)("div",{className:"wcf-item wcf-item--start-from-blank flex gap-6 mx-auto max-w-4xl"},(0,a.createElement)("div",{className:"wcf-item__inner relative cursor-pointer group bg-gray-25 p-5 text-center flex flex-col border border-border-subtle hover:border-brand-300 rounded-md items-center justify-center h-72 w-2/3",onClick:()=>{r("hide"===n?"show":"hide")}},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap"},(0,a.createElement)("div",{className:"wcf-item__thumbnail"},(0,a.createElement)("div",{className:"wcf-store-importer__start-from-blank-icon bg-background-primary p-6 rounded-full flex items-center justify-center"},(0,a.createElement)(QU,{className:"w-7 h-7 stroke-1 text-text-tertiary group-hover:text-brand-300"})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-t border-border-subtle absolute bottom-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Start from scratch","cartflows")))),(0,a.createElement)("div",{className:"wcf_item__info flex flex-col gap-6 justify-center w-3/4"},(0,a.createElement)("h3",{className:"wcf_item__info--title text-xl text-text-primary font-semibold"},"bricks-builder"===s&&(0,z.__)("It seems that you are using the Bricks Builder.","cartflows"),"other"===s&&(0,z.__)("It seems that you are using the page builder other than Elementor, Beaver Builder, Block Builder.","cartflows")),(0,a.createElement)("span",{className:"wcf_item__info--desc text-base text-text-secondary font-normal mt-2"},"bricks-builder"===s&&(0,z.__)("Are you using Bricks Builder? No worries. CartFlows works well with Bricks Builder. Right now we do not have ready templates for Bricks Builder but we are planning to add it very soon.","cartflows"),"other"===s&&(0,z.__)("Are you using any other page builder? No worries. CartFlows works well with every other page builder. Right now we do not have ready templates for every page builder but we are planning to add it very soon.","cartflows")),(0,a.createElement)("span",{className:"mt-2"},(0,a.createElement)("a",{className:"wcf_item__info--doc text-text-secondary hover:text-brand-500 flex items-center gap-2 text-sm",href:getKbDocUrl("https://cartflows.com/docs/how-to-use-cartflows-with-your-own-template/"),target:"_blank",rel:"noreferrer"},(0,z.__)("Learn How ","cartflows"),(0,a.createElement)(qm,{className:"w-18 h-18 stroke-1"})))))))},zH=()=>{const[{page_builder:e}]=l();return"other"!==e&&"bricks-builder"!==e?(0,a.createElement)(OH,null):(0,a.createElement)(LH,{page_builder:e})},PH={flow_id:cartflows_admin?.flow_id?cartflows_admin?.flow_id:0,is_cf_pro:!!cartflows_admin?.is_pro&&cartflows_admin.is_pro,page_slug:cartflows_admin?.home_slug?cartflows_admin.home_slug:"cartflows",page_builder:cartflows_admin?.page_builder?cartflows_admin.page_builder:"other",global_checkout:parseInt(cartflows_admin.global_checkout),flows:[],flow_analytics:{},flow_settings:{},title:!1,flow_title:"",flow_slug:"",flow_link:"#",is_flow_instant_checkout:!1,emptySteps:!1,steps:[],options:null,current_step:null,flow_type:"flows",status:null,step_id:0,admin_url:"test_url",page_builder_name:cartflows_admin?.page_builder_name?cartflows_admin.page_builder_name:"",step_data:{},view_url:"#",edit_url:"#",edit_builder_url:"#",settings_data:{},step_title:!1,step_slug:"",design_settings:null,page_settings:null,billing_fields:null,shipping_fields:null,ob_id:null,current_ob:null,suretriggers_config:[]},RH=(e,t,n)=>{if(!t)return e;const r=(e.options?.["wcf-order-bumps"]||[]).map(e=>e.id===t?{...e,...n}:e),o=r.find(e=>e.id===t)||null;return{...e,options:{...e.options,"wcf-order-bumps":r},current_ob:o||e.current_ob}},UH=(e,t,n,r)=>{if("wcf-order-bumps"!==n||!Array.isArray(e)||!t)return e;const o=e.findIndex(e=>String(e?.id)===String(t));if(-1===o)return e;const a=e.slice();return a[o]={...a[o],order_bumps:r},a},BH=(e,t)=>{switch(t.type){case"SET_FLOW_DATA":t.data.options.post_title=t.data.title,t.data.options.post_name=t.data.slug;const n={};return Array.isArray(t.data.steps)&&t.data.steps.forEach(e=>{const t=e?.ob_ab_stats;t&&"object"==typeof t&&Object.keys(t).forEach(e=>{n[e]={...n[e]||{},...t[e]}})}),{...e,title:t.data.title,flow_title:t.data.title,flow_slug:t.data.slug,flow_link:t.data.link,status:t.data.status,steps:t.data.steps,flow_settings:t.data.settings_data,emptySteps:t.data.steps.length<1,options:{...e.options,...t.data.options,ob_ab_stats:n},flow_analytics:t.data.flow_analytics,is_flow_instant_checkout:t?.data?.options["instant-layout-style"]||!1};case"SET_FLOW_ANALYTICS":return{...e,flow_analytics:t.flow_analytics.data};case"SET_OPTION":const r=e.options;return r[t.name]=t.value,{...e,options:r};case"SET_FLOW_TITLE":return e.options.post_title=t.title,{...e,title:t.title};case"SET_STEPS":return{...e,steps:t.steps};case"SET_GLOBAL_CHECKOUT":return{...e,global_checkout:t.global_checkout};case"SET_STORE_STEPS":const o=[],a=[];e.steps.map(function(e){return"checkout"===e.type&&o.push(e),"landing"===e.type&&a.push(e),""});let i=[];return i=i.concat(o,a),t.steps.map(function(e){return void 0!==e.type&&i.push(e),""}),i=[...new Map(i.map(e=>[e.id,e])).values()],{...e,steps:i};case"SET_STEP_DATA":return t.data.options.post_title=t.data.title,t.data.options.post_name=t.data.step_post_name,{...e,flow_title:t.data.flow_title,view_url:t.data.view,edit_url:t.data.edit?t.data.edit.replace(/&/g,"&"):"",edit_builder_url:t.data.page_builder_edit?t.data.page_builder_edit.replace(/&/g,"&"):"",step_data:t.data,settings_data:t.data.settings_data,design_settings:t.data.design_settings,page_settings:t.data.page_settings,custom_fields:t.data.custom_fields,billing_fields:t.data.billing_fields,shipping_fields:t.data.shipping_fields,options:{...e.options,...t.data.options},step_title:t.data.title,step_slug:t.data.step_post_name,step_id:t.data.id};case"SET_STEP_TITLE":return e.options.post_title=t.title,{...e,step_title:t.title};case"SET_OB_TITLE":const s=e.options[t.name].findIndex(e=>e.id===t.ob_id);return e.options[t.name][s].title=t.title,{...e};case"SET_OB_STATUS":const l=e.options[t.name].findIndex(e=>e.id===t.ob_id);return e.options[t.name][l].status=t.newStatus,{...e};case"SET_STEP_VIEW_URL":return{...e,view_url:t.step_view_url};case"SET_FIELDS":return"billing"===t.field_type?{...e,billing_fields:t.fields}:{...e,shipping_fields:t.fields};case"SET_OB_OPTION":const c=e.current_ob;return c[t.name]=t.value,{...e,current_ob:c};case"UPDATE_OPTIONS":return{...e,options:t.options};case"ADD_CHECKOUT_PRODUCT":const u=e.options[t.field_name];return u&&(u.push(t.product_data),e.options[t.field_name]=u),{...e};case"ADD_OPTIN_PRODUCT":case"ADD_OFFER_PRODUCT":return e.options[t.field_name]=t.product_data,{...e};case"ADD_OB_PRODUCT":return RH(e,e.current_ob?.id,{product:t.product.product,product_image:t.product.product_image,desc_text:t.product.desc_text});case"REMOVE_OB_PRODUCT":return RH(e,e.current_ob?.id,{product:"",product_image:cartflows_admin.image_placeholder,desc_text:"Lorem Ipsum has been the industry standard dummy text ever since the 1500s when an unknown printer took a galley of type and scrambled it to make a type specimen book."});case"REMOVE_OFFER_PRODUCT":case"REMOVE_OPTIN_PRODUCT":return e.options[t.field_name]&&(e.options[t.field_name]=""),{...e};case"REMOVE_CHECKOUT_PRODUCT":const d=t.unique_id,f=e.options[t.field_name];return d&&f&&(e.options[t.field_name]=f.filter(function(e){return e.unique_id!==d})),{...e};case"UPDATE_CHECKOUT_PRODUCTS":return e.options[t.field_name]=t.products,{...e};case"UPDATE_ORDER_BUMP":return e.options[t.name]=t.order_bumps,{...e,steps:UH(e.steps,e.step_id,t.name,t.order_bumps)};case"REMOVE_ORDER_BUMP":const p=t.ob_id,m=e.options[t.name].filter(function(e){return e.id!==p});return e.options[t.name]=m,{...e,steps:UH(e.steps,e.step_id,t.name,m)};case"SET_CURRENT_OB":const h=e.options["wcf-order-bumps"].findIndex(e=>e.id===t.ob_id);return e.options["wcf-order-bumps"][h]=t.current_ob,{...e,ob_id:t.ob_id,current_ob:t.current_ob};case"ADD_NEW_OB_GROUP":const g=e.current_ob[t.name];return g&&(g.push(t.newGroup),e.current_ob[t.name]=g),{...e};case"ADD_NEW_GROUP":const y=e.options[t.name];return y&&(y.push(t.newGroup),e.options[t.name]=y),{...e};case"ADD_NEW_OB_RULE":const w=e.current_ob[t.name],b=t.group_id;if(w&&b){for(const e of w)if(b===e.group_id){e.rules.push(t.newRule);break}e.current_ob[t.name]=w}return{...e};case"ADD_NEW_RULE":const v=e.options[t.name],x=t.group_id;if(v&&x){for(const e of v)if(x===e.group_id){e.rules.push(t.newRule);break}e.options[t.name]=v}return{...e};case"REMOVE_OB_RULE":const N=e.current_ob[t.name];for(let e=0;e<N.length;e++)if(t.group_id===N[e].group_id){const n=N[e].rules;for(let r=0;r<n.length;r++)if(n[r].rule_id===t.rule_id){N[e].rules.splice(r,1);break}0===N[e].rules.length&&N.splice(e,1)}return e.current_ob[t.name]=N,{...e};case"REMOVE_RULE":const E=e.options[t.name];for(let e=0;e<E.length;e++)if(t.group_id===E[e].group_id){const n=E[e].rules;for(let r=0;r<n.length;r++)if(n[r].rule_id===t.rule_id){E[e].rules.splice(r,1);break}0===E[e].rules.length&&E.splice(e,1)}return e.options[t.name]=E,{...e};case"RESET_OB_RULE_VALUE":const M=e.current_ob[t.name];for(const e of M)if(t.group_id===e.group_id){const n=e.rules;for(const e of n)if(t.rule_id===e.rule_id){e.value="";break}break}return e.current_ob[t.name]=M,{...e};case"RESET_RULE_VALUE":const _=e.options[t.name];for(const e of _)if(t.group_id===e.group_id){const n=e.rules;for(const e of n)if(t.rule_id===e.rule_id){e.value="",e.operator="";break}break}return e.options[t.name]=_,{...e};case"SET_RULES_GROUPS":return e.options[t.fieldName]=t.groups,{...e};case"SET_OB_RULES_GROUPS":return e.current_ob[t.fieldName]=t.groups,{...e};case"SET_OB":return e.options[t.fieldName]=t.obs,{...e};case"SET_SURETRIGGERS_CONFIG":return t.config&&setSureTriggersConfig(t.config),{...e,suretriggers_config:t};default:return e}};function FH({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6a7.5 7.5 0 1 0 7.5 7.5h-7.5V6Z"}),w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5H21A7.5 7.5 0 0 0 13.5 3v7.5Z"}))}const YH=w.forwardRef(FH);function ZH({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5M10 11.25h4M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const QH=w.forwardRef(ZH);function VH({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 18.75h-9m9 0a3 3 0 0 1 3 3h-15a3 3 0 0 1 3-3m9 0v-3.375c0-.621-.503-1.125-1.125-1.125h-.871M7.5 18.75v-3.375c0-.621.504-1.125 1.125-1.125h.872m5.007 0H9.497m5.007 0a7.454 7.454 0 0 1-.982-3.172M9.497 14.25a7.454 7.454 0 0 0 .981-3.172M5.25 4.236c-.982.143-1.954.317-2.916.52A6.003 6.003 0 0 0 7.73 9.728M5.25 4.236V4.5c0 2.108.966 3.99 2.48 5.228M5.25 4.236V2.721C7.456 2.41 9.71 2.25 12 2.25c2.291 0 4.545.16 6.75.47v1.516M7.73 9.728a6.726 6.726 0 0 0 2.748 1.35m8.272-6.842V4.5c0 2.108-.966 3.99-2.48 5.228m2.48-5.492a46.32 46.32 0 0 1 2.916.52 6.003 6.003 0 0 1-5.395 4.972m0 0a6.726 6.726 0 0 1-2.749 1.35m0 0a6.772 6.772 0 0 1-3.044 0"}))}const WH=w.forwardRef(VH);function GH({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 7.5-2.25-1.313M21 7.5v2.25m0-2.25-2.25 1.313M3 7.5l2.25-1.313M3 7.5l2.25 1.313M3 7.5v2.25m9 3 2.25-1.313M12 12.75l-2.25-1.313M12 12.75V15m0 6.75 2.25-1.313M12 21.75V19.5m0 2.25-2.25-1.313m0-16.875L12 2.25l2.25 1.313M21 14.25v2.25l-2.25 1.313m-13.5 0L3 16.5v-2.25"}))}const HH=w.forwardRef(GH);function $H({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15 11.25-3-3m0 0-3 3m3-3v7.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const XH=w.forwardRef($H),qH={abtest:"abtest",clone:"duplicate"},JH=function(e){const{id:t,control_id:n,onClickEvents:r,actions:o,type:i,setUpgradePopupFeature:s=()=>{}}=e,[{license_status:l}]=p();return(0,a.createElement)(nm,{placement:"bottom-end",className:"wcf-step-row__actions-menu"},(0,a.createElement)(nm.Trigger,null,(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"[&>svg]:size-5 text-text-secondary hover:text-text-primary","aria-label":(0,z.__)("More Options","cartflows"),icon:(0,a.createElement)(LU,{className:"w-5 h-5 stroke-1","aria-hidden":"true"})})),(0,a.createElement)(nm.ContentWrapper,{className:"z-20"},(0,a.createElement)(nm.Content,{size:"sm",className:"wcf-step-actions-menu__dropdown_menu"},(0,a.createElement)(nm.List,null,o.map(e=>{var o;const c=e.text;let u=!1,d=!1;if((!wcfCartflowsPro()&&e?.pro||"abtest"===e.slug&&!wcfCartflowsTypePro())&&(u=!0),wcfCartflowsPro()&&e?.pro&&"Activated"!==l&&(d=!0),"automation"===e.slug&&"downsell"!==i&&"upsell"!==i&&"checkout"!==i)return null;const f=u||d,p=f?qH[e.slug]:void 0,m=!!p;return(0,a.createElement)(nm.Item,{key:e?.text,disabled:f&&!m,className:`wcf-step__action-btn hover:!bg-brand-25 hover:!text-brand-600 aria-disabled:!text-text-on-button-disabled aria-disabled:hover:!text-text-on-button-disabled aria-disabled:hover:!bg-transparent ${null!==(o=e.class)&&void 0!==o?o:""} ${m?"!text-text-on-button-disabled hover:!text-text-on-button-disabled hover:!bg-transparent":""}`,onClick:()=>{if(m)s(p);else if(!f)if("#"===e?.link&&r[e.slug]){const o={preventDefault:()=>{},target:{getAttribute:r=>"data-action"===r?e.ajaxcall:"data-id"===r?t:"data-control-id"===r?n:null},currentTarget:{getAttribute:r=>"data-action"===r?e.ajaxcall:"data-id"===r?t:"data-control-id"===r?n:null}};r[e.slug](o)}else e?.link&&"#"!==e?.link&&(window.location.href=e.link)}},(0,a.createElement)("span",{className:"flex items-center gap-2"},function(e){let t="";switch(e){case"clone":t=(0,a.createElement)(iW,{className:"w-4 h-4 stroke-[1.5]"});break;case"delete":t=(0,a.createElement)(UU,{className:"w-4 h-4 stroke-[1.5]"});break;case"abtest":t=(0,a.createElement)(YH,{className:"w-4 h-4 stroke-[1.5]"});break;case"archived":t=(0,a.createElement)(QH,{className:"w-4 h-4 stroke-[1.5]"});break;case"winner":t=(0,a.createElement)(WH,{className:"w-4 h-4 stroke-[1.5]"});break;case"automation":t=(0,a.createElement)(HH,{className:"w-4 h-4 stroke-[1.5]"});break;default:t=(0,a.createElement)(XH,{className:"w-4 h-4 stroke-[1.5]"})}return t}(e.slug),(0,a.createElement)("span",{className:"wcf-step-row__btn-text"},c," ",(u||d)&&(0,a.createElement)("span",{className:"text-brand-600"},(0,z.__)("(Pro)","cartflows")),e?.tag&&(0,a.createElement)("span",{className:"wcf-step-row__btn-text--tag text-brand-brand-600"}," ",e?.tag," "))))})))))},KH="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfNzI3XzIzNzEpIj4KPHJlY3QgeD0iOCIgeT0iOCIgd2lkdGg9IjExMiIgaGVpZ2h0PSIxMTIiIHJ4PSI2IiBmaWxsPSIjRjlGQUZCIi8+CjwvZz4KPGNpcmNsZSBjeD0iMTciIGN5PSIxNiIgcj0iMyIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNMTQgMjkuNEMxNCAyNy4xNTk4IDE0IDI2LjAzOTcgMTQuNDM2IDI1LjE4NEMxNC44MTk1IDI0LjQzMTQgMTUuNDMxNCAyMy44MTk1IDE2LjE4NCAyMy40MzZDMTcuMDM5NyAyMyAxOC4xNTk4IDIzIDIwLjQgMjNIMTA3LjZDMTA5Ljg0IDIzIDExMC45NiAyMyAxMTEuODE2IDIzLjQzNkMxMTIuNTY5IDIzLjgxOTUgMTEzLjE4MSAyNC40MzE0IDExMy41NjQgMjUuMTg0QzExNCAyNi4wMzk3IDExNCAyNy4xNTk4IDExNCAyOS40VjU0LjZDMTE0IDU2Ljg0MDIgMTE0IDU3Ljk2MDMgMTEzLjU2NCA1OC44MTZDMTEzLjE4MSA1OS41Njg2IDExMi41NjkgNjAuMTgwNSAxMTEuODE2IDYwLjU2NEMxMTAuOTYgNjEgMTA5Ljg0IDYxIDEwNy42IDYxSDIwLjRDMTguMTU5OCA2MSAxNy4wMzk3IDYxIDE2LjE4NCA2MC41NjRDMTUuNDMxNCA2MC4xODA1IDE0LjgxOTUgNTkuNTY4NiAxNC40MzYgNTguODE2QzE0IDU3Ljk2MDMgMTQgNTYuODQwMiAxNCA1NC42VjI5LjRaIiBmaWxsPSIjRTVFN0VCIi8+CjxjaXJjbGUgY3g9IjkxIiBjeT0iNDIiIHI9IjE1IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNOTAuMDI5MSAzMC45MzI3QzkwLjI3OTQgMjkuOTE4OSA5MS43MjA2IDI5LjkxODkgOTEuOTcwOSAzMC45MzI3TDkzLjgyNTEgMzguNDQzN0M5My45MTQxIDM4LjgwNDMgOTQuMTk1NyAzOS4wODU5IDk0LjU1NjMgMzkuMTc0OUwxMDIuMDY3IDQxLjAyOTFDMTAzLjA4MSA0MS4yNzk0IDEwMy4wODEgNDIuNzIwNiAxMDIuMDY3IDQyLjk3MDlMOTQuNTU2MyA0NC44MjUxQzk0LjE5NTcgNDQuOTE0MSA5My45MTQxIDQ1LjE5NTcgOTMuODI1MSA0NS41NTYzTDkxLjk3MDkgNTMuMDY3M0M5MS43MjA2IDU0LjA4MTEgOTAuMjc5NCA1NC4wODExIDkwLjAyOTEgNTMuMDY3M0w4OC4xNzQ5IDQ1LjU1NjNDODguMDg1OSA0NS4xOTU3IDg3LjgwNDMgNDQuOTE0MSA4Ny40NDM3IDQ0LjgyNTFMNzkuOTMyNyA0Mi45NzA5Qzc4LjkxODkgNDIuNzIwNiA3OC45MTg5IDQxLjI3OTQgNzkuOTMyNyA0MS4wMjkxTDg3LjQ0MzcgMzkuMTc0OUM4Ny44MDQzIDM5LjA4NTkgODguMDg1OSAzOC44MDQzIDg4LjE3NDkgMzguNDQzN0w5MC4wMjkxIDMwLjkzMjdaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAgMzZDMjAgMzUuNDQ3NyAyMC40NDc3IDM1IDIxIDM1SDUzQzUzLjU1MjMgMzUgNTQgMzUuNDQ3NyA1NCAzNkM1NCAzNi41NTIzIDUzLjU1MjMgMzcgNTMgMzdIMjFDMjAuNDQ3NyAzNyAyMCAzNi41NTIzIDIwIDM2WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTIwIDQxQzIwIDQwLjQ0NzcgMjAuNDQ3NyA0MCAyMSA0MEg0NUM0NS41NTIzIDQwIDQ2IDQwLjQ0NzcgNDYgNDFDNDYgNDEuNTUyMyA0NS41NTIzIDQyIDQ1IDQySDIxQzIwLjQ0NzcgNDIgMjAgNDEuNTUyMyAyMCA0MVoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMCA0OEMyMCA0Ni44OTU0IDIxLjA2NiA0NiAyMi4zODEgNDZIMzQuNjE5QzM1LjkzNCA0NiAzNyA0Ni44OTU0IDM3IDQ4QzM3IDQ5LjEwNDYgMzUuOTM0IDUwIDM0LjYxOSA1MEgyMi4zODFDMjEuMDY2IDUwIDIwIDQ5LjEwNDYgMjAgNDhaIiBmaWxsPSIjOUNBM0FGIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTcgMTZDOTcgMTQuODk1NCA5OC4wNjYgMTQgOTkuMzgxIDE0SDExMS42MTlDMTEyLjkzNCAxNCAxMTQgMTQuODk1NCAxMTQgMTZDMTE0IDE3LjEwNDYgMTEyLjkzNCAxOCAxMTEuNjE5IDE4SDk5LjM4MUM5OC4wNjYgMTggOTcgMTcuMTA0NiA5NyAxNloiIGZpbGw9IiM5Q0EzQUYiLz4KPHBhdGggZD0iTTIyIDc5LjRDMjIgNzcuMTU5OCAyMiA3Ni4wMzk3IDIyLjQzNiA3NS4xODRDMjIuODE5NSA3NC40MzE0IDIzLjQzMTQgNzMuODE5NSAyNC4xODQgNzMuNDM2QzI1LjAzOTcgNzMgMjYuMTU5OCA3MyAyOC40IDczSDU0LjZDNTYuODQwMiA3MyA1Ny45NjAzIDczIDU4LjgxNiA3My40MzZDNTkuNTY4NiA3My44MTk1IDYwLjE4MDUgNzQuNDMxNCA2MC41NjQgNzUuMTg0QzYxIDc2LjAzOTcgNjEgNzcuMTU5OCA2MSA3OS40Vjk3LjZDNjEgOTkuODQwMiA2MSAxMDAuOTYgNjAuNTY0IDEwMS44MTZDNjAuMTgwNSAxMDIuNTY5IDU5LjU2ODYgMTAzLjE4MSA1OC44MTYgMTAzLjU2NEM1Ny45NjAzIDEwNCA1Ni44NDAyIDEwNCA1NC42IDEwNEgyOC40QzI2LjE1OTggMTA0IDI1LjAzOTcgMTA0IDI0LjE4NCAxMDMuNTY0QzIzLjQzMTQgMTAzLjE4MSAyMi44MTk1IDEwMi41NjkgMjIuNDM2IDEwMS44MTZDMjIgMTAwLjk2IDIyIDk5Ljg0MDIgMjIgOTcuNlY3OS40WiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDg4QzcwIDg3LjQ0NzcgNzAuNDQ3NyA4NyA3MSA4N0gxMDNDMTAzLjU1MiA4NyAxMDQgODcuNDQ3NyAxMDQgODhDMTA0IDg4LjU1MjMgMTAzLjU1MiA4OSAxMDMgODlINzFDNzAuNDQ3NyA4OSA3MCA4OC41NTIzIDcwIDg4WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDgzQzcwIDgyLjQ0NzcgNzAuNDQ3NyA4MiA3MSA4MkgxMDNDMTAzLjU1MiA4MiAxMDQgODIuNDQ3NyAxMDQgODNDMTA0IDgzLjU1MjMgMTAzLjU1MiA4NCAxMDMgODRINzFDNzAuNDQ3NyA4NCA3MCA4My41NTIzIDcwIDgzWiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDc3QzcwIDc2LjQ0NzcgNzAuNDQ3NyA3NiA3MSA3Nkg4N0M4Ny41NTIzIDc2IDg4IDc2LjQ0NzcgODggNzdDODggNzcuNTUyMyA4Ny41NTIzIDc4IDg3IDc4SDcxQzcwLjQ0NzcgNzggNzAgNzcuNTUyMyA3MCA3N1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03MCA5M0M3MCA5Mi40NDc3IDcwLjQ0NzcgOTIgNzEgOTJIOTVDOTUuNTUyMyA5MiA5NiA5Mi40NDc3IDk2IDkzQzk2IDkzLjU1MjMgOTUuNTUyMyA5NCA5NSA5NEg3MUM3MC40NDc3IDk0IDcwIDkzLjU1MjMgNzAgOTNaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzAgMTAwQzcwIDk4Ljg5NTQgNzEuMDY2IDk4IDcyLjM4MSA5OEg4NC42MTlDODUuOTM0IDk4IDg3IDk4Ljg5NTQgODcgMTAwQzg3IDEwMS4xMDUgODUuOTM0IDEwMiA4NC42MTkgMTAySDcyLjM4MUM3MS4wNjYgMTAyIDcwIDEwMS4xMDUgNzAgMTAwWiIgZmlsbD0iIzlDQTNBRiIvPgo8ZGVmcz4KPGZpbHRlciBpZD0iZmlsdGVyMF9kXzcyN18yMzcxIiB4PSI2IiB5PSI4IiB3aWR0aD0iMTE2IiBoZWlnaHQ9IjExOCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlTW9ycGhvbG9neSByYWRpdXM9IjQiIG9wZXJhdG9yPSJlcm9kZSIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MSIvPgo8ZmVPZmZzZXQgZHk9IjQiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMTYgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MSIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K",e$="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfNzI3XzIzNzMpIj4KPHJlY3QgeD0iOCIgeT0iOCIgd2lkdGg9IjExMiIgaGVpZ2h0PSIxMTIiIHJ4PSI2IiBmaWxsPSIjRjlGQUZCIi8+CjwvZz4KPHBhdGggZD0iTTggMTcuNkM4IDE0LjIzOTcgOCAxMi41NTk1IDguNjUzOTYgMTEuMjc2MUM5LjIyOTIgMTAuMTQ3MSAxMC4xNDcxIDkuMjI5MiAxMS4yNzYxIDguNjUzOTZDMTIuNTU5NSA4IDE0LjIzOTcgOCAxNy42IDhIMTEwLjRDMTEzLjc2IDggMTE1LjQ0IDggMTE2LjcyNCA4LjY1Mzk2QzExNy44NTMgOS4yMjkyIDExOC43NzEgMTAuMTQ3MSAxMTkuMzQ2IDExLjI3NjFDMTIwIDEyLjU1OTUgMTIwIDE0LjIzOTcgMTIwIDE3LjZWNDBIOFYxNy42WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMCAyNkMyMCAyNC44OTU0IDIxLjA2NiAyNCAyMi4zODEgMjRIMzQuNjE5QzM1LjkzNCAyNCAzNyAyNC44OTU0IDM3IDI2QzM3IDI3LjEwNDYgMzUuOTM0IDI4IDM0LjYxOSAyOEgyMi4zODFDMjEuMDY2IDI4IDIwIDI3LjEwNDYgMjAgMjZaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAgMzNDMjAgMzIuNDQ3NyAyMC40NDc3IDMyIDIxIDMySDUzQzUzLjU1MjMgMzIgNTQgMzIuNDQ3NyA1NCAzM0M1NCAzMy41NTIzIDUzLjU1MjMgMzQgNTMgMzRIMjFDMjAuNDQ3NyAzNCAyMCAzMy41NTIzIDIwIDMzWiIgZmlsbD0iI0U1RTdFQiIvPgo8Y2lyY2xlIGN4PSIxNyIgY3k9IjE2IiByPSIzIiBmaWxsPSIjRDFENURCIi8+CjxjaXJjbGUgY3g9Ijk2IiBjeT0iMzEiIHI9IjMiIGZpbGw9IiNFNUU3RUIiLz4KPGNpcmNsZSBjeD0iODciIGN5PSIzMSIgcj0iMyIgZmlsbD0iI0U1RTdFQiIvPgo8Y2lyY2xlIGN4PSIxMDUiIGN5PSIzMSIgcj0iMyIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDE2LjAwMDJDNzAgMTUuNDQ4IDcwLjQ0NzcgMTUuMDAwMiA3MSAxNS4wMDAySDc5Qzc5LjU1MjMgMTUuMDAwMiA4MCAxNS40NDggODAgMTYuMDAwMkM4MCAxNi41NTI1IDc5LjU1MjMgMTcuMDAwMiA3OSAxNy4wMDAySDcxQzcwLjQ0NzcgMTcuMDAwMiA3MCAxNi41NTI1IDcwIDE2LjAwMDJaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNODQgMTYuMDAwMkM4NCAxNS40NDggODQuNDQ3NyAxNS4wMDAyIDg1IDE1LjAwMDJIOTNDOTMuNTUyMyAxNS4wMDAyIDk0IDE1LjQ0OCA5NCAxNi4wMDAyQzk0IDE2LjU1MjUgOTMuNTUyMyAxNy4wMDAyIDkzIDE3LjAwMDJIODVDODQuNDQ3NyAxNy4wMDAyIDg0IDE2LjU1MjUgODQgMTYuMDAwMloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05OCAxNkM5OCAxNS40NDc3IDk4LjQ0NzcgMTUgOTkgMTVIMTA3QzEwNy41NTIgMTUgMTA4IDE1LjQ0NzcgMTA4IDE2QzEwOCAxNi41NTIzIDEwNy41NTIgMTcgMTA3IDE3SDk5Qzk4LjQ0NzcgMTcgOTggMTYuNTUyMyA5OCAxNloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZD0iTTIwIDU2QzIwIDU0Ljg5NTQgMjAuODk1NCA1NCAyMiA1NEg2M0M2NC4xMDQ2IDU0IDY1IDU0Ljg5NTQgNjUgNTZWNThDNjUgNTkuMTA0NiA2NC4xMDQ2IDYwIDYzIDYwSDIyQzIwLjg5NTQgNjAgMjAgNTkuMTA0NiAyMCA1OFY1NloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZD0iTTIwIDY2QzIwIDY0Ljg5NTQgMjAuODk1NCA2NCAyMiA2NEg2M0M2NC4xMDQ2IDY0IDY1IDY0Ljg5NTQgNjUgNjZWNjhDNjUgNjkuMTA0NiA2NC4xMDQ2IDcwIDYzIDcwSDIyQzIwLjg5NTQgNzAgMjAgNjkuMTA0NiAyMCA2OFY2NloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZD0iTTIwIDg2QzIwIDg0Ljg5NTQgMjAuODk1NCA4NCAyMiA4NEg2M0M2NC4xMDQ2IDg0IDY1IDg0Ljg5NTQgNjUgODZWOThDNjUgOTkuMTA0NiA2NC4xMDQ2IDEwMCA2MyAxMDBIMjJDMjAuODk1NCAxMDAgMjAgOTkuMTA0NiAyMCA5OFY4NloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMCA0OUMyMCA0OC40NDc3IDIwLjQ0NzcgNDggMjEgNDhIMzdDMzcuNTUyMyA0OCAzOCA0OC40NDc3IDM4IDQ5QzM4IDQ5LjU1MjMgMzcuNTUyMyA1MCAzNyA1MEgyMUMyMC40NDc3IDUwIDIwIDQ5LjU1MjMgMjAgNDlaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAgNzlDMjAgNzguNDQ3NyAyMC40NDc3IDc4IDIxIDc4SDM3QzM3LjU1MjMgNzggMzggNzguNDQ3NyAzOCA3OUMzOCA3OS41NTIzIDM3LjU1MjMgODAgMzcgODBIMjFDMjAuNDQ3NyA4MCAyMCA3OS41NTIzIDIwIDc5WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNMjAgMTA2QzIwIDEwNC44OTUgMjAuODk1NCAxMDQgMjIgMTA0SDYzQzY0LjEwNDYgMTA0IDY1IDEwNC44OTUgNjUgMTA2VjEwOEM2NSAxMDkuMTA1IDY0LjEwNDYgMTEwIDYzIDExMEgyMkMyMC44OTU0IDExMCAyMCAxMDkuMTA1IDIwIDEwOFYxMDZaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGQ9Ik03NCA5M0M3NCA5MS44OTU0IDc0Ljg5NTQgOTEgNzYgOTFIOTNDOTQuMTA0NiA5MSA5NSA5MS44OTU0IDk1IDkzVjk1Qzk1IDk2LjEwNDYgOTQuMTA0NiA5NyA5MyA5N0g3NkM3NC44OTU0IDk3IDc0IDk2LjEwNDYgNzQgOTVWOTNaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik05NyA5M0M5NyA5MS44OTU0IDk3Ljg5NTQgOTEgOTkgOTFIMTA2QzEwNy4xMDUgOTEgMTA4IDkxLjg5NTQgMTA4IDkzVjk1QzEwOCA5Ni4xMDQ2IDEwNy4xMDUgOTcgMTA2IDk3SDk5Qzk3Ljg5NTQgOTcgOTcgOTYuMTA0NiA5NyA5NVY5M1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZD0iTTc0IDU2Qzc0IDU0Ljg5NTQgNzQuODk1NCA1NCA3NiA1NEgxMDZDMTA3LjEwNSA1NCAxMDggNTQuODk1NCAxMDggNTZWODRDMTA4IDg1LjEwNDYgMTA3LjEwNSA4NiAxMDYgODZINzZDNzQuODk1NCA4NiA3NCA4NS4xMDQ2IDc0IDg0VjU2WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03NiA1M0gxMDZDMTA3LjY1NyA1MyAxMDkgNTQuMzQzMSAxMDkgNTZWODRDMTA5IDg1LjY1NjkgMTA3LjY1NyA4NyAxMDYgODdINzZDNzQuMzQzMSA4NyA3MyA4NS42NTY5IDczIDg0VjU2QzczIDU0LjM0MzEgNzQuMzQzMSA1MyA3NiA1M1pNNzYgNTRDNzQuODk1NCA1NCA3NCA1NC44OTU0IDc0IDU2Vjg0Qzc0IDg1LjEwNDYgNzQuODk1NCA4NiA3NiA4NkgxMDZDMTA3LjEwNSA4NiAxMDggODUuMTA0NiAxMDggODRWNTZDMTA4IDU0Ljg5NTQgMTA3LjEwNSA1NCAxMDYgNTRINzZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzcgODFDNzcgODAuNDQ3NyA3Ny40NDc3IDgwIDc4IDgwSDgzQzgzLjU1MjMgODAgODQgODAuNDQ3NyA4NCA4MUM4NCA4MS41NTIzIDgzLjU1MjMgODIgODMgODJINzhDNzcuNDQ3NyA4MiA3NyA4MS41NTIzIDc3IDgxWiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTc3IDc2Qzc3IDc1LjQ0NzcgNzcuNDQ3NyA3NSA3OCA3NUg4N0M4Ny41NTIzIDc1IDg4IDc1LjQ0NzcgODggNzZDODggNzYuNTUyMyA4Ny41NTIzIDc3IDg3IDc3SDc4Qzc3LjQ0NzcgNzcgNzcgNzYuNTUyMyA3NyA3NloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04NiA2NkM4NiA2NS40NDc3IDg2LjQ0NzcgNjUgODcgNjVIOTRDOTQuNTUyMyA2NSA5NSA2NS40NDc3IDk1IDY2Qzk1IDY2LjU1MjMgOTQuNTUyMyA2NyA5NCA2N0g4N0M4Ni40NDc3IDY3IDg2IDY2LjU1MjMgODYgNjZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNODYgNjlDODYgNjguNDQ3NyA4Ni40NDc3IDY4IDg3IDY4SDg4Qzg4LjU1MjMgNjggODkgNjguNDQ3NyA4OSA2OUM4OSA2OS41NTIzIDg4LjU1MjMgNzAgODggNzBIODdDODYuNDQ3NyA3MCA4NiA2OS41NTIzIDg2IDY5WiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTc3IDU5Qzc3IDU4LjQ0NzcgNzcuNDQ3NyA1OCA3OCA1OEg4NUM4NS41NTIzIDU4IDg2IDU4LjQ0NzcgODYgNTlDODYgNTkuNTUyMyA4NS41NTIzIDYwIDg1IDYwSDc4Qzc3LjQ0NzcgNjAgNzcgNTkuNTUyMyA3NyA1OVoiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05NyA4MUM5NyA4MC40NDc3IDk3LjQ0NzcgODAgOTggODBIMTA0QzEwNC41NTIgODAgMTA1IDgwLjQ0NzcgMTA1IDgxQzEwNSA4MS41NTIzIDEwNC41NTIgODIgMTA0IDgySDk4Qzk3LjQ0NzcgODIgOTcgODEuNTUyMyA5NyA4MVoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05OSA3NkM5OSA3NS40NDc3IDk5LjQ0NzcgNzUgMTAwIDc1SDEwNEMxMDQuNTUyIDc1IDEwNSA3NS40NDc3IDEwNSA3NkMxMDUgNzYuNTUyMyAxMDQuNTUyIDc3IDEwNCA3N0gxMDBDOTkuNDQ3NyA3NyA5OSA3Ni41NTIzIDk5IDc2WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTk5IDY4Qzk5IDY3LjQ0NzcgOTkuNDQ3NyA2NyAxMDAgNjdIMTA0QzEwNC41NTIgNjcgMTA1IDY3LjQ0NzcgMTA1IDY4QzEwNSA2OC41NTIzIDEwNC41NTIgNjkgMTA0IDY5SDEwMEM5OS40NDc3IDY5IDk5IDY4LjU1MjMgOTkgNjhaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTcgNTlDOTcgNTguNDQ3NyA5Ny40NDc3IDU4IDk4IDU4SDEwNEMxMDQuNTUyIDU4IDEwNSA1OC40NDc3IDEwNSA1OUMxMDUgNTkuNTUyMyAxMDQuNTUyIDYwIDEwNCA2MEg5OEM5Ny40NDc3IDYwIDk3IDU5LjU1MjMgOTcgNTlaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGQ9Ik03NyA2NkM3NyA2NC44OTU0IDc3Ljg5NTQgNjQgNzkgNjRIODJDODMuMTA0NiA2NCA4NCA2NC44OTU0IDg0IDY2VjY5Qzg0IDcwLjEwNDYgODMuMTA0NiA3MSA4MiA3MUg3OUM3Ny44OTU0IDcxIDc3IDcwLjEwNDYgNzcgNjlWNjZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzMgNDlDNzMgNDguNDQ3NyA3My40NDc3IDQ4IDc0IDQ4SDkwQzkwLjU1MjMgNDggOTEgNDguNDQ3NyA5MSA0OUM5MSA0OS41NTIzIDkwLjU1MjMgNTAgOTAgNTBINzRDNzMuNDQ3NyA1MCA3MyA0OS41NTIzIDczIDQ5WiIgZmlsbD0iI0QxRDVEQiIvPgo8ZGVmcz4KPGZpbHRlciBpZD0iZmlsdGVyMF9kXzcyN18yMzczIiB4PSI2IiB5PSI4IiB3aWR0aD0iMTE2IiBoZWlnaHQ9IjExOCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlTW9ycGhvbG9neSByYWRpdXM9IjQiIG9wZXJhdG9yPSJlcm9kZSIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MyIvPgo8ZmVPZmZzZXQgZHk9IjQiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMTYgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MyIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MyIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K",t$="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfMTAzM18xMDEyNSkiPgo8cmVjdCB4PSI4IiB5PSI4IiB3aWR0aD0iMTEyIiBoZWlnaHQ9IjExMiIgcng9IjYiIGZpbGw9IiNGOUZBRkIiLz4KPC9nPgo8Y2lyY2xlIGN4PSIxNyIgY3k9IjE2IiByPSIzIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNODQgMTZDODQgMTUuNDQ3NyA4NC40NDc3IDE1IDg1IDE1SDkzQzkzLjU1MjMgMTUgOTQgMTUuNDQ3NyA5NCAxNkM5NCAxNi41NTIzIDkzLjU1MjMgMTcgOTMgMTdIODVDODQuNDQ3NyAxNyA4NCAxNi41NTIzIDg0IDE2WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDE2QzcwIDE1LjQ0NzcgNzAuNDQ3NyAxNSA3MSAxNUg3OUM3OS41NTIzIDE1IDgwIDE1LjQ0NzcgODAgMTZDODAgMTYuNTUyMyA3OS41NTIzIDE3IDc5IDE3SDcxQzcwLjQ0NzcgMTcgNzAgMTYuNTUyMyA3MCAxNloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05OCAxNkM5OCAxNS40NDc3IDk4LjQ0NzcgMTUgOTkgMTVIMTA3QzEwNy41NTIgMTUgMTA4IDE1LjQ0NzcgMTA4IDE2QzEwOCAxNi41NTIzIDEwNy41NTIgMTcgMTA3IDE3SDk5Qzk4LjQ0NzcgMTcgOTggMTYuNTUyMyA5OCAxNloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZD0iTTI3IDUxQzI3IDQ4Ljc5MDkgMjguNzkwOSA0NyAzMSA0N0g5N0M5OS4yMDkxIDQ3IDEwMSA0OC43OTA5IDEwMSA1MVY3OUMxMDEgODEuMjA5MSA5OS4yMDkxIDgzIDk3IDgzSDMxQzI4Ljc5MDkgODMgMjcgODEuMjA5MSAyNyA3OVY1MVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMzEgNDZIOTdDOTkuNzYxNCA0NiAxMDIgNDguMjM4NiAxMDIgNTFWNzlDMTAyIDgxLjc2MTQgOTkuNzYxNCA4NCA5NyA4NEgzMUMyOC4yMzg2IDg0IDI2IDgxLjc2MTQgMjYgNzlWNTFDMjYgNDguMjM4NiAyOC4yMzg2IDQ2IDMxIDQ2Wk0zMSA0N0MyOC43OTA5IDQ3IDI3IDQ4Ljc5MDkgMjcgNTFWNzlDMjcgODEuMjA5MSAyOC43OTA5IDgzIDMxIDgzSDk3Qzk5LjIwOTEgODMgMTAxIDgxLjIwOTEgMTAxIDc5VjUxQzEwMSA0OC43OTA5IDk5LjIwOTEgNDcgOTcgNDdIMzFaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik0zMCA1My4yQzMwIDUyLjA3OTkgMzAgNTEuNTE5OCAzMC4yMTggNTEuMDkyQzMwLjQwOTcgNTAuNzE1NyAzMC43MTU3IDUwLjQwOTcgMzEuMDkyIDUwLjIxOEMzMS41MTk4IDUwIDMyLjA3OTkgNTAgMzMuMiA1MEg1Ni44QzU3LjkyMDEgNTAgNTguNDgwMiA1MCA1OC45MDggNTAuMjE4QzU5LjI4NDMgNTAuNDA5NyA1OS41OTAzIDUwLjcxNTcgNTkuNzgyIDUxLjA5MkM2MCA1MS41MTk4IDYwIDUyLjA3OTkgNjAgNTMuMlY3Ni44QzYwIDc3LjkyMDEgNjAgNzguNDgwMiA1OS43ODIgNzguOTA4QzU5LjU5MDMgNzkuMjg0MyA1OS4yODQzIDc5LjU5MDMgNTguOTA4IDc5Ljc4MkM1OC40ODAyIDgwIDU3LjkyMDEgODAgNTYuOCA4MEgzMy4yQzMyLjA3OTkgODAgMzEuNTE5OCA4MCAzMS4wOTIgNzkuNzgyQzMwLjcxNTcgNzkuNTkwMyAzMC40MDk3IDc5LjI4NDMgMzAuMjE4IDc4LjkwOEMzMCA3OC40ODAyIDMwIDc3LjkyMDEgMzAgNzYuOFY1My4yWiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYzIDYzQzYzIDYyLjQ0NzcgNjMuNDQ3NyA2MiA2NCA2Mkg4OEM4OC41NTIzIDYyIDg5IDYyLjQ0NzcgODkgNjNDODkgNjMuNTUyMyA4OC41NTIzIDY0IDg4IDY0SDY0QzYzLjQ0NzcgNjQgNjMgNjMuNTUyMyA2MyA2M1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02MyA1OUM2MyA1OC40NDc3IDYzLjQ0NzcgNTggNjQgNThIOTRDOTQuNTUyMyA1OCA5NSA1OC40NDc3IDk1IDU5Qzk1IDU5LjU1MjMgOTQuNTUyMyA2MCA5NCA2MEg2NEM2My40NDc3IDYwIDYzIDU5LjU1MjMgNjMgNTlaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjMgNTRDNjMgNTMuNDQ3NyA2My40NDc3IDUzIDY0IDUzSDc2Qzc2LjU1MjMgNTMgNzcgNTMuNDQ3NyA3NyA1NEM3NyA1NC41NTIzIDc2LjU1MjMgNTUgNzYgNTVINjRDNjMuNDQ3NyA1NSA2MyA1NC41NTIzIDYzIDU0WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTgzIDc1QzgzIDc0LjQ0NzcgODMuMzUxOCA3NCA4My43ODU3IDc0SDkzLjIxNDNDOTMuNjQ4MiA3NCA5NCA3NC40NDc3IDk0IDc1Qzk0IDc1LjU1MjMgOTMuNjQ4MiA3NiA5My4yMTQzIDc2SDgzLjc4NTdDODMuMzUxOCA3NiA4MyA3NS41NTIzIDgzIDc1WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYzIDY4QzYzIDY3LjQ0NzcgNjMuNDQ3NyA2NyA2NCA2N0g2NkM2Ni41NTIzIDY3IDY3IDY3LjQ0NzcgNjcgNjhDNjcgNjguNTUyMyA2Ni41NTIzIDY5IDY2IDY5SDY0QzYzLjQ0NzcgNjkgNjMgNjguNTUyMyA2MyA2OFoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02OSA2OEM2OSA2Ny40NDc3IDY5LjQ0NzcgNjcgNzAgNjdINzNDNzMuNTUyMyA2NyA3NCA2Ny40NDc3IDc0IDY4Qzc0IDY4LjU1MjMgNzMuNTUyMyA2OSA3MyA2OUg3MEM2OS40NDc3IDY5IDY5IDY4LjU1MjMgNjkgNjhaIiBmaWxsPSIjOUNBM0FGIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjMgNzVDNjMgNzMuODk1NCA2NC4wNjYgNzMgNjUuMzgxIDczSDc3LjYxOUM3OC45MzQgNzMgODAgNzMuODk1NCA4MCA3NUM4MCA3Ni4xMDQ2IDc4LjkzNCA3NyA3Ny42MTkgNzdINjUuMzgxQzY0LjA2NiA3NyA2MyA3Ni4xMDQ2IDYzIDc1WiIgZmlsbD0iIzlDQTNBRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4IDM3QzQ4IDM2LjQ0NzcgNDguNDQ3NyAzNiA0OSAzNkg3OUM3OS41NTIzIDM2IDgwIDM2LjQ0NzcgODAgMzdDODAgMzcuNTUyMyA3OS41NTIzIDM4IDc5IDM4SDQ5QzQ4LjQ0NzcgMzggNDggMzcuNTUyMyA0OCAzN1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01NyAzMkM1NyAzMS40NDc3IDU3LjQ0NzcgMzEgNTggMzFINzBDNzAuNTUyMyAzMSA3MSAzMS40NDc3IDcxIDMyQzcxIDMyLjU1MjMgNzAuNTUyMyAzMyA3MCAzM0g1OEM1Ny40NDc3IDMzIDU3IDMyLjU1MjMgNTcgMzJaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGQ9Ik00NC4wMjYxIDU0LjE4MjdDNDQuMjY2MSA1My4xNTE4IDQ1LjczMzkgNTMuMTUxOCA0NS45NzM5IDU0LjE4MjdMNDcuNDQ4NiA2MC41MTZDNDcuNTYxNCA2MS4wMDAxIDQ4LjAxMjYgNjEuMzI4IDQ4LjUwNzkgNjEuMjg1Nkw1NC45ODY5IDYwLjczMUM1Ni4wNDE1IDYwLjY0MDcgNTYuNDk1MSA2Mi4wMzY3IDU1LjU4ODggNjIuNTgzNkw1MC4wMjEyIDY1Ljk0MzJDNDkuNTk1NiA2Ni4yIDQ5LjQyMzMgNjYuNzMwNCA0OS42MTY2IDY3LjE4ODRMNTIuMTQ2MiA3My4xNzg5QzUyLjU1NzkgNzQuMTU0IDUxLjM3MDUgNzUuMDE2OCA1MC41NzAzIDc0LjMyMzhMNDUuNjU0NiA3MC4wNjY5QzQ1LjI3ODkgNjkuNzQxNSA0NC43MjExIDY5Ljc0MTUgNDQuMzQ1NCA3MC4wNjY5TDM5LjQyOTcgNzQuMzIzOEMzOC42Mjk1IDc1LjAxNjggMzcuNDQyMSA3NC4xNTQgMzcuODUzOCA3My4xNzg5TDQwLjM4MzQgNjcuMTg4NEM0MC41NzY3IDY2LjczMDQgNDAuNDA0NCA2Ni4yIDM5Ljk3ODggNjUuOTQzMkwzNC40MTEyIDYyLjU4MzZDMzMuNTA0OSA2Mi4wMzY3IDMzLjk1ODQgNjAuNjQwNyAzNS4wMTMxIDYwLjczMUw0MS40OTIxIDYxLjI4NTZDNDEuOTg3NCA2MS4zMjggNDIuNDM4NiA2MS4wMDAxIDQyLjU1MTQgNjAuNTE2TDQ0LjAyNjEgNTQuMTgyN1oiIGZpbGw9IiNEMUQ1REIiLz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8xMDMzXzEwMTI1IiB4PSI2IiB5PSI4IiB3aWR0aD0iMTE2IiBoZWlnaHQ9IjExOCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlTW9ycGhvbG9neSByYWRpdXM9IjQiIG9wZXJhdG9yPSJlcm9kZSIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xMDMzXzEwMTI1Ii8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIzIi8+CjxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgo8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4xNiAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzEwMzNfMTAxMjUiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMTAzM18xMDEyNSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K",n$="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfMzI1Ml8xMjc0MDIpIj4KPHJlY3QgeD0iOCIgeT0iOCIgd2lkdGg9IjExMiIgaGVpZ2h0PSIxMTIiIHJ4PSI2IiBmaWxsPSIjRjlGQUZCIi8+CjwvZz4KPGNpcmNsZSBjeD0iMTciIGN5PSIxNiIgcj0iMyIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0IDE2Qzg0IDE1LjQ0NzcgODQuNDQ3NyAxNSA4NSAxNUg5M0M5My41NTIzIDE1IDk0IDE1LjQ0NzcgOTQgMTZDOTQgMTYuNTUyMyA5My41NTIzIDE3IDkzIDE3SDg1Qzg0LjQ0NzcgMTcgODQgMTYuNTUyMyA4NCAxNloiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03MCAxNkM3MCAxNS40NDc3IDcwLjQ0NzcgMTUgNzEgMTVINzlDNzkuNTUyMyAxNSA4MCAxNS40NDc3IDgwIDE2QzgwIDE2LjU1MjMgNzkuNTUyMyAxNyA3OSAxN0g3MUM3MC40NDc3IDE3IDcwIDE2LjU1MjMgNzAgMTZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTggMTZDOTggMTUuNDQ3NyA5OC40NDc3IDE1IDk5IDE1SDEwN0MxMDcuNTUyIDE1IDEwOCAxNS40NDc3IDEwOCAxNkMxMDggMTYuNTUyMyAxMDcuNTUyIDE3IDEwNyAxN0g5OUM5OC40NDc3IDE3IDk4IDE2LjU1MjMgOTggMTZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik0yNyA1MUMyNyA0OC43OTA5IDI4Ljc5MDkgNDcgMzEgNDdIOTdDOTkuMjA5MSA0NyAxMDEgNDguNzkwOSAxMDEgNTFWNzlDMTAxIDgxLjIwOTEgOTkuMjA5MSA4MyA5NyA4M0gzMUMyOC43OTA5IDgzIDI3IDgxLjIwOTEgMjcgNzlWNTFaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTMxIDQ2SDk3Qzk5Ljc2MTQgNDYgMTAyIDQ4LjIzODYgMTAyIDUxVjc5QzEwMiA4MS43NjE0IDk5Ljc2MTQgODQgOTcgODRIMzFDMjguMjM4NiA4NCAyNiA4MS43NjE0IDI2IDc5VjUxQzI2IDQ4LjIzODYgMjguMjM4NiA0NiAzMSA0NlpNMzEgNDdDMjguNzkwOSA0NyAyNyA0OC43OTA5IDI3IDUxVjc5QzI3IDgxLjIwOTEgMjguNzkwOSA4MyAzMSA4M0g5N0M5OS4yMDkxIDgzIDEwMSA4MS4yMDkxIDEwMSA3OVY1MUMxMDEgNDguNzkwOSA5OS4yMDkxIDQ3IDk3IDQ3SDMxWiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBkPSJNMzAgNTMuMkMzMCA1Mi4wNzk5IDMwIDUxLjUxOTggMzAuMjE4IDUxLjA5MkMzMC40MDk3IDUwLjcxNTcgMzAuNzE1NyA1MC40MDk3IDMxLjA5MiA1MC4yMThDMzEuNTE5OCA1MCAzMi4wNzk5IDUwIDMzLjIgNTBINTYuOEM1Ny45MjAxIDUwIDU4LjQ4MDIgNTAgNTguOTA4IDUwLjIxOEM1OS4yODQzIDUwLjQwOTcgNTkuNTkwMyA1MC43MTU3IDU5Ljc4MiA1MS4wOTJDNjAgNTEuNTE5OCA2MCA1Mi4wNzk5IDYwIDUzLjJWNzYuOEM2MCA3Ny45MjAxIDYwIDc4LjQ4MDIgNTkuNzgyIDc4LjkwOEM1OS41OTAzIDc5LjI4NDMgNTkuMjg0MyA3OS41OTAzIDU4LjkwOCA3OS43ODJDNTguNDgwMiA4MCA1Ny45MjAxIDgwIDU2LjggODBIMzMuMkMzMi4wNzk5IDgwIDMxLjUxOTggODAgMzEuMDkyIDc5Ljc4MkMzMC43MTU3IDc5LjU5MDMgMzAuNDA5NyA3OS4yODQzIDMwLjIxOCA3OC45MDhDMzAgNzguNDgwMiAzMCA3Ny45MjAxIDMwIDc2LjhWNTMuMloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02MyA2M0M2MyA2Mi40NDc3IDYzLjQ0NzcgNjIgNjQgNjJIODhDODguNTUyMyA2MiA4OSA2Mi40NDc3IDg5IDYzQzg5IDYzLjU1MjMgODguNTUyMyA2NCA4OCA2NEg2NEM2My40NDc3IDY0IDYzIDYzLjU1MjMgNjMgNjNaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjMgNTlDNjMgNTguNDQ3NyA2My40NDc3IDU4IDY0IDU4SDk0Qzk0LjU1MjMgNTggOTUgNTguNDQ3NyA5NSA1OUM5NSA1OS41NTIzIDk0LjU1MjMgNjAgOTQgNjBINjRDNjMuNDQ3NyA2MCA2MyA1OS41NTIzIDYzIDU5WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYzIDU0QzYzIDUzLjQ0NzcgNjMuNDQ3NyA1MyA2NCA1M0g3NkM3Ni41NTIzIDUzIDc3IDUzLjQ0NzcgNzcgNTRDNzcgNTQuNTUyMyA3Ni41NTIzIDU1IDc2IDU1SDY0QzYzLjQ0NzcgNTUgNjMgNTQuNTUyMyA2MyA1NFoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02MyA2OEM2MyA2Ny40NDc3IDYzLjQ0NzcgNjcgNjQgNjdINjZDNjYuNTUyMyA2NyA2NyA2Ny40NDc3IDY3IDY4QzY3IDY4LjU1MjMgNjYuNTUyMyA2OSA2NiA2OUg2NEM2My40NDc3IDY5IDYzIDY4LjU1MjMgNjMgNjhaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjkgNjhDNjkgNjcuNDQ3NyA2OS40NDc3IDY3IDcwIDY3SDczQzczLjU1MjMgNjcgNzQgNjcuNDQ3NyA3NCA2OEM3NCA2OC41NTIzIDczLjU1MjMgNjkgNzMgNjlINzBDNjkuNDQ3NyA2OSA2OSA2OC41NTIzIDY5IDY4WiIgZmlsbD0iIzlDQTNBRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYzIDc1QzYzIDczLjg5NTQgNjQuMDY2IDczIDY1LjM4MSA3M0g4MS42MTlDODIuOTM0IDczIDg0IDczLjg5NTQgODQgNzVDODQgNzYuMTA0NiA4Mi45MzQgNzcgODEuNjE5IDc3SDY1LjM4MUM2NC4wNjYgNzcgNjMgNzYuMTA0NiA2MyA3NVoiIGZpbGw9IiM5Q0EzQUYiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OCAzN0M0OCAzNi40NDc3IDQ4LjQ0NzcgMzYgNDkgMzZINzlDNzkuNTUyMyAzNiA4MCAzNi40NDc3IDgwIDM3QzgwIDM3LjU1MjMgNzkuNTUyMyAzOCA3OSAzOEg0OUM0OC40NDc3IDM4IDQ4IDM3LjU1MjMgNDggMzdaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTcgMzJDNTcgMzEuNDQ3NyA1Ny40NDc3IDMxIDU4IDMxSDcwQzcwLjU1MjMgMzEgNzEgMzEuNDQ3NyA3MSAzMkM3MSAzMi41NTIzIDcwLjU1MjMgMzMgNzAgMzNINThDNTcuNDQ3NyAzMyA1NyAzMi41NTIzIDU3IDMyWiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNNDMuMDY4OCA1Ny4xNzI3QzQzLjYwMDEgNTUuMTk5MyA0Ni4zOTk5IDU1LjE5OTMgNDYuOTMxMiA1Ny4xNzI3TDQ3Ljg4MjYgNjAuNzA2MUM0OC4wNjc5IDYxLjM5NDQgNDguNjA1NiA2MS45MzIxIDQ5LjI5MzkgNjIuMTE3NEw1Mi44MjczIDYzLjA2ODhDNTQuODAwNyA2My42MDAxIDU0LjgwMDcgNjYuMzk5OSA1Mi44MjczIDY2LjkzMTJMNDkuMjkzOSA2Ny44ODI2QzQ4LjYwNTYgNjguMDY3OSA0OC4wNjc5IDY4LjYwNTYgNDcuODgyNiA2OS4yOTM5TDQ2LjkzMTIgNzIuODI3M0M0Ni4zOTk5IDc0LjgwMDcgNDMuNjAwMSA3NC44MDA3IDQzLjA2ODggNzIuODI3M0w0Mi4xMTc0IDY5LjI5MzlDNDEuOTMyMSA2OC42MDU2IDQxLjM5NDQgNjguMDY3OSA0MC43MDYxIDY3Ljg4MjZMMzcuMTcyNyA2Ni45MzEyQzM1LjE5OTMgNjYuMzk5OSAzNS4xOTkzIDYzLjYwMDEgMzcuMTcyNyA2My4wNjg4TDQwLjcwNjEgNjIuMTE3NEM0MS4zOTQ0IDYxLjkzMjEgNDEuOTMyMSA2MS4zOTQ0IDQyLjExNzQgNjAuNzA2MUw0My4wNjg4IDU3LjE3MjdaIiBmaWxsPSIjRDFENURCIi8+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RfMzI1Ml8xMjc0MDIiIHg9IjYiIHk9IjgiIHdpZHRoPSIxMTYiIGhlaWdodD0iMTE4IiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVNb3JwaG9sb2d5IHJhZGl1cz0iNCIgb3BlcmF0b3I9ImVyb2RlIiBpbj0iU291cmNlQWxwaGEiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzMyNTJfMTI3NDAyIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIzIi8+CjxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgo8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4xNiAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzMyNTJfMTI3NDAyIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzMyNTJfMTI3NDAyIiByZXN1bHQ9InNoYXBlIi8+CjwvZmlsdGVyPgo8L2RlZnM+Cjwvc3ZnPgo=",r$="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfMjEzNl8xMjUzNjgpIj4KPHJlY3QgeD0iOCIgeT0iOCIgd2lkdGg9IjExMiIgaGVpZ2h0PSIxMTIiIHJ4PSI2IiBmaWxsPSIjRjlGQUZCIi8+CjwvZz4KPHBhdGggZD0iTTggMTcuNkM4IDE0LjIzOTcgOCAxMi41NTk1IDguNjUzOTYgMTEuMjc2MUM5LjIyOTIgMTAuMTQ3MSAxMC4xNDcxIDkuMjI5MiAxMS4yNzYxIDguNjUzOTZDMTIuNTU5NSA4IDE0LjIzOTcgOCAxNy42IDhINDZWNzAuNEM0NiA3My43NjAzIDQ2IDc1LjQ0MDUgNDUuMzQ2IDc2LjcyMzlDNDQuNzcwOCA3Ny44NTI5IDQzLjg1MjkgNzguNzcwOCA0Mi43MjM5IDc5LjM0NkM0MS40NDA1IDgwIDM5Ljc2MDMgODAgMzYuNCA4MEg4VjE3LjZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik03MCAzNkM3MCAzNC44OTU0IDcwLjg5NTQgMzQgNzIgMzRIMTA4QzEwOS4xMDUgMzQgMTEwIDM0Ljg5NTQgMTEwIDM2VjM4QzExMCAzOS4xMDQ2IDEwOS4xMDUgNDAgMTA4IDQwSDcyQzcwLjg5NTQgNDAgNzAgMzkuMTA0NiA3MCAzOFYzNloiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZD0iTTcwIDQ1QzcwIDQzLjg5NTQgNzAuODk1NCA0MyA3MiA0M0gxMDhDMTA5LjEwNSA0MyAxMTAgNDMuODk1NCAxMTAgNDVWNDdDMTEwIDQ4LjEwNDYgMTA5LjEwNSA0OSAxMDggNDlINzJDNzAuODk1NCA0OSA3MCA0OC4xMDQ2IDcwIDQ3VjQ1WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNNzAgNTRDNzAgNTIuODk1NCA3MC44OTU0IDUyIDcyIDUySDg1Qzg2LjEwNDYgNTIgODcgNTIuODk1NCA4NyA1NFY1NkM4NyA1Ny4xMDQ2IDg2LjEwNDYgNTggODUgNThINzJDNzAuODk1NCA1OCA3MCA1Ny4xMDQ2IDcwIDU2VjU0WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNOTAgNTRDOTAgNTIuODk1NCA5MC44OTU0IDUyIDkyIDUySDEwNUMxMDYuMTA1IDUyIDEwNyA1Mi44OTU0IDEwNyA1NFY1NkMxMDcgNTcuMTA0NiAxMDYuMTA1IDU4IDEwNSA1OEg5MkM5MC44OTU0IDU4IDkwIDU3LjEwNDYgOTAgNTZWNTRaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzAgMjlDNzAgMjguNDQ3NyA3MC40NDc3IDI4IDcxIDI4SDg3Qzg3LjU1MjMgMjggODggMjguNDQ3NyA4OCAyOUM4OCAyOS41NTIzIDg3LjU1MjMgMzAgODcgMzBINzFDNzAuNDQ3NyAzMCA3MCAyOS41NTIzIDcwIDI5WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNNzAgNjRDNzAgNjIuODk1NCA3MC44OTU0IDYyIDcyIDYySDk2Qzk3LjEwNDYgNjIgOTggNjIuODk1NCA5OCA2NFY2NkM5OCA2Ny4xMDQ2IDk3LjEwNDYgNjggOTYgNjhINzJDNzAuODk1NCA2OCA3MCA2Ny4xMDQ2IDcwIDY2VjY0WiIgZmlsbD0iIzlDQTNBRiIvPgo8Y2lyY2xlIGN4PSIxNyIgY3k9IjE2IiByPSIzIiBmaWxsPSIjOUNBM0FGIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTcgMTZDOTcgMTQuODk1NCA5OC4wNjYgMTQgOTkuMzgxIDE0SDExMS42MTlDMTEyLjkzNCAxNCAxMTQgMTQuODk1NCAxMTQgMTZDMTE0IDE3LjEwNDYgMTEyLjkzNCAxOCAxMTEuNjE5IDE4SDk5LjM4MUM5OC4wNjYgMTggOTcgMTcuMTA0NiA5NyAxNloiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZD0iTTMwIDMyLjRDMzAgMzAuMTU5OCAzMCAyOS4wMzk3IDMwLjQzNiAyOC4xODRDMzAuODE5NSAyNy40MzE0IDMxLjQzMTQgMjYuODE5NSAzMi4xODQgMjYuNDM2QzMzLjAzOTcgMjYgMzQuMTU5OCAyNiAzNi40IDI2SDU1LjZDNTcuODQwMiAyNiA1OC45NjAzIDI2IDU5LjgxNiAyNi40MzZDNjAuNTY4NiAyNi44MTk1IDYxLjE4MDUgMjcuNDMxNCA2MS41NjQgMjguMTg0QzYyIDI5LjAzOTcgNjIgMzAuMTU5OCA2MiAzMi40VjY3LjZDNjIgNjkuODQwMiA2MiA3MC45NjAzIDYxLjU2NCA3MS44MTZDNjEuMTgwNSA3Mi41Njg2IDYwLjU2ODYgNzMuMTgwNSA1OS44MTYgNzMuNTY0QzU4Ljk2MDMgNzQgNTcuODQwMiA3NCA1NS42IDc0SDM2LjRDMzQuMTU5OCA3NCAzMy4wMzk3IDc0IDMyLjE4NCA3My41NjRDMzEuNDMxNCA3My4xODA1IDMwLjgxOTUgNzIuNTY4NiAzMC40MzYgNzEuODE2QzMwIDcwLjk2MDMgMzAgNjkuODQwMiAzMCA2Ny42VjMyLjRaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGQ9Ik0yOCAzMC40QzI4IDI4LjE1OTggMjggMjcuMDM5NyAyOC40MzYgMjYuMTg0QzI4LjgxOTUgMjUuNDMxNCAyOS40MzE0IDI0LjgxOTUgMzAuMTg0IDI0LjQzNkMzMS4wMzk3IDI0IDMyLjE1OTggMjQgMzQuNCAyNEg1My42QzU1Ljg0MDIgMjQgNTYuOTYwMyAyNCA1Ny44MTYgMjQuNDM2QzU4LjU2ODYgMjQuODE5NSA1OS4xODA1IDI1LjQzMTQgNTkuNTY0IDI2LjE4NEM2MCAyNy4wMzk3IDYwIDI4LjE1OTggNjAgMzAuNFY2NS42QzYwIDY3Ljg0MDIgNjAgNjguOTYwMyA1OS41NjQgNjkuODE2QzU5LjE4MDUgNzAuNTY4NiA1OC41Njg2IDcxLjE4MDUgNTcuODE2IDcxLjU2NEM1Ni45NjAzIDcyIDU1Ljg0MDIgNzIgNTMuNiA3MkgzNC40QzMyLjE1OTggNzIgMzEuMDM5NyA3MiAzMC4xODQgNzEuNTY0QzI5LjQzMTQgNzEuMTgwNSAyOC44MTk1IDcwLjU2ODYgMjguNDM2IDY5LjgxNkMyOCA2OC45NjAzIDI4IDY3Ljg0MDIgMjggNjUuNlYzMC40WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zMyA1N0MzMyA1Ni40NDc3IDMzLjI4OTcgNTYgMzMuNjQ3MSA1Nkg1NC4zNTI5QzU0LjcxMDMgNTYgNTUgNTYuNDQ3NyA1NSA1N0M1NSA1Ny41NTIzIDU0LjcxMDMgNTggNTQuMzUyOSA1OEgzMy42NDcxQzMzLjI4OTcgNTggMzMgNTcuNTUyMyAzMyA1N1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zNiA2MkMzNiA2MS40NDc3IDM2LjI5MjcgNjEgMzYuNjUzOCA2MUg1Mi4zNDYyQzUyLjcwNzMgNjEgNTMgNjEuNDQ3NyA1MyA2MkM1MyA2Mi41NTIzIDUyLjcwNzMgNjMgNTIuMzQ2MiA2M0gzNi42NTM4QzM2LjI5MjcgNjMgMzYgNjIuNTUyMyAzNiA2MloiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZD0iTTQzLjA2NTMgMzQuNDU4NUM0My4zOTIxIDMzLjU5OSA0NC42MDc5IDMzLjU5OSA0NC45MzQ3IDM0LjQ1ODVMNDcuNjgzOCA0MS42ODg5QzQ3LjcyMTggNDEuNzg5IDQ3Ljc3NTcgNDEuODgyMyA0Ny44NDM0IDQxLjk2NTNMNTIuNzMwNiA0Ny45NjEzQzUzLjMxMTUgNDguNjc0IDUyLjcwMzYgNDkuNzI3IDUxLjc5NTkgNDkuNTgwM0w0NC4xNTk2IDQ4LjM0NThDNDQuMDUzOSA0OC4zMjg3IDQzLjk0NjEgNDguMzI4NyA0My44NDA0IDQ4LjM0NThMMzYuMjA0MSA0OS41ODAzQzM1LjI5NjQgNDkuNzI3IDM0LjY4ODUgNDguNjc0IDM1LjI2OTQgNDcuOTYxM0w0MC4xNTY2IDQxLjk2NTNDNDAuMjI0MyA0MS44ODIzIDQwLjI3ODIgNDEuNzg5IDQwLjMxNjIgNDEuNjg4OUw0My4wNjUzIDM0LjQ1ODVaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzAgOTZDNzAgOTUuNDQ3NyA3MC40NDc3IDk1IDcxIDk1SDk5Qzk5LjU1MjMgOTUgMTAwIDk1LjQ0NzcgMTAwIDk2QzEwMCA5Ni41NTIzIDk5LjU1MjMgOTcgOTkgOTdINzFDNzAuNDQ3NyA5NyA3MCA5Ni41NTIzIDcwIDk2WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDEwMEM3MCA5OS40NDc3IDcwLjQ0NzcgOTkgNzEgOTlIOTJDOTIuNTUyMyA5OSA5MyA5OS40NDc3IDkzIDEwMEM5MyAxMDAuNTUyIDkyLjU1MjMgMTAxIDkyIDEwMUg3MUM3MC40NDc3IDEwMSA3MCAxMDAuNTUyIDcwIDEwMFoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03NiAxMDVDNzYgMTA0LjQ0OCA3Ni40NDc3IDEwNCA3NyAxMDRIODRDODQuNTUyMyAxMDQgODUgMTA0LjQ0OCA4NSAxMDVDODUgMTA1LjU1MiA4NC41NTIzIDEwNiA4NCAxMDZINzdDNzYuNDQ3NyAxMDYgNzYgMTA1LjU1MiA3NiAxMDVaIiBmaWxsPSIjRDFENURCIi8+CjxjaXJjbGUgY3g9IjcyIiBjeT0iMTA1IiByPSIyIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjggOTZDMjggOTUuNDQ3NyAyOC40NDc3IDk1IDI5IDk1SDU3QzU3LjU1MjMgOTUgNTggOTUuNDQ3NyA1OCA5NkM1OCA5Ni41NTIzIDU3LjU1MjMgOTcgNTcgOTdIMjlDMjguNDQ3NyA5NyAyOCA5Ni41NTIzIDI4IDk2WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTI4IDEwMEMyOCA5OS40NDc3IDI4LjQ0NzcgOTkgMjkgOTlINTBDNTAuNTUyMyA5OSA1MSA5OS40NDc3IDUxIDEwMEM1MSAxMDAuNTUyIDUwLjU1MjMgMTAxIDUwIDEwMUgyOUMyOC40NDc3IDEwMSAyOCAxMDAuNTUyIDI4IDEwMFoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0zNCAxMDVDMzQgMTA0LjQ0OCAzNC40NDc3IDEwNCAzNSAxMDRINDJDNDIuNTUyMyAxMDQgNDMgMTA0LjQ0OCA0MyAxMDVDNDMgMTA1LjU1MiA0Mi41NTIzIDEwNiA0MiAxMDZIMzVDMzQuNDQ3NyAxMDYgMzQgMTA1LjU1MiAzNCAxMDVaIiBmaWxsPSIjRDFENURCIi8+CjxjaXJjbGUgY3g9IjMwIiBjeT0iMTA1IiByPSIyIiBmaWxsPSIjRDFENURCIi8+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RfMjEzNl8xMjUzNjgiIHg9IjYiIHk9IjgiIHdpZHRoPSIxMTYiIGhlaWdodD0iMTE4IiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVNb3JwaG9sb2d5IHJhZGl1cz0iNCIgb3BlcmF0b3I9ImVyb2RlIiBpbj0iU291cmNlQWxwaGEiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzIxMzZfMTI1MzY4Ii8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIzIi8+CjxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgo8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4xNiAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzIxMzZfMTI1MzY4Ii8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzIxMzZfMTI1MzY4IiByZXN1bHQ9InNoYXBlIi8+CjwvZmlsdGVyPgo8L2RlZnM+Cjwvc3ZnPgo=",o$="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfMTAzM18xMDE2MikiPgo8cmVjdCB4PSI4IiB5PSI4IiB3aWR0aD0iMTEyIiBoZWlnaHQ9IjExMiIgcng9IjYiIGZpbGw9IiNGOUZBRkIiLz4KPC9nPgo8Y2lyY2xlIGN4PSIxNyIgY3k9IjE2IiByPSIzIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTggMTZDOTggMTUuNDQ3NyA5OC40NDc3IDE1IDk5IDE1SDEwN0MxMDcuNTUyIDE1IDEwOCAxNS40NDc3IDEwOCAxNkMxMDggMTYuNTUyMyAxMDcuNTUyIDE3IDEwNyAxN0g5OUM5OC40NDc3IDE3IDk4IDE2LjU1MjMgOTggMTZaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzAgMTZDNzAgMTUuNDQ3NyA3MC40NDc3IDE1IDcxIDE1SDc5Qzc5LjU1MjMgMTUgODAgMTUuNDQ3NyA4MCAxNkM4MCAxNi41NTIzIDc5LjU1MjMgMTcgNzkgMTdINzFDNzAuNDQ3NyAxNyA3MCAxNi41NTIzIDcwIDE2WiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0IDE2Qzg0IDE1LjQ0NzcgODQuNDQ3NyAxNSA4NSAxNUg5M0M5My41NTIzIDE1IDk0IDE1LjQ0NzcgOTQgMTZDOTQgMTYuNTUyMyA5My41NTIzIDE3IDkzIDE3SDg1Qzg0LjQ0NzcgMTcgODQgMTYuNTUyMyA4NCAxNloiIGZpbGw9IiNFNUU3RUIiLz4KPHJlY3QgeD0iMzcuNSIgeT0iNDMuNSIgd2lkdGg9IjUyIiBoZWlnaHQ9IjU2IiByeD0iMi41IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSIjRjNGNEY2Ii8+CjxwYXRoIGQ9Ik00MSA1NkM0MSA1NC44OTU0IDQxLjg5NTQgNTQgNDMgNTRINTJDNTMuMTA0NiA1NCA1NCA1NC44OTU0IDU0IDU2QzU0IDU3LjEwNDYgNTMuMTA0NiA1OCA1MiA1OEg0M0M0MS44OTU0IDU4IDQxIDU3LjEwNDYgNDEgNTZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik01NyA1NkM1NyA1NC44OTU0IDU3Ljg5NTQgNTQgNTkgNTRINjhDNjkuMTA0NiA1NCA3MCA1NC44OTU0IDcwIDU2QzcwIDU3LjEwNDYgNjkuMTA0NiA1OCA2OCA1OEg1OUM1Ny44OTU0IDU4IDU3IDU3LjEwNDYgNTcgNTZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik03MyA1NkM3MyA1NC44OTU0IDczLjg5NTQgNTQgNzUgNTRIODRDODUuMTA0NiA1NCA4NiA1NC44OTU0IDg2IDU2Qzg2IDU3LjEwNDYgODUuMTA0NiA1OCA4NCA1OEg3NUM3My44OTU0IDU4IDczIDU3LjEwNDYgNzMgNTZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik00MSA3MkM0MSA3MC44OTU0IDQxLjg5NTQgNzAgNDMgNzBINTZDNTcuMTA0NiA3MCA1OCA3MC44OTU0IDU4IDcyQzU4IDczLjEwNDYgNTcuMTA0NiA3NCA1NiA3NEg0M0M0MS44OTU0IDc0IDQxIDczLjEwNDYgNDEgNzJaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik02MiA3MkM2MiA3MC44OTU0IDYyLjg5NTQgNzAgNjQgNzBIODNDODQuMTA0NiA3MCA4NSA3MC44OTU0IDg1IDcyQzg1IDczLjEwNDYgODQuMTA0NiA3NCA4MyA3NEg2NEM2Mi44OTU0IDc0IDYyIDczLjEwNDYgNjIgNzJaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik00MSA3OUM0MSA3Ny44OTU0IDQxLjg5NTQgNzcgNDMgNzdINTZDNTcuMTA0NiA3NyA1OCA3Ny44OTU0IDU4IDc5QzU4IDgwLjEwNDYgNTcuMTA0NiA4MSA1NiA4MUg0M0M0MS44OTU0IDgxIDQxIDgwLjEwNDYgNDEgNzlaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik02MiA3OUM2MiA3Ny44OTU0IDYyLjg5NTQgNzcgNjQgNzdINzdDNzguMTA0NiA3NyA3OSA3Ny44OTU0IDc5IDc5Qzc5IDgwLjEwNDYgNzguMTA0NiA4MSA3NyA4MUg2NEM2Mi44OTU0IDgxIDYyIDgwLjEwNDYgNjIgNzlaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik00MSA4NkM0MSA4NC44OTU0IDQxLjg5NTQgODQgNDMgODRINTZDNTcuMTA0NiA4NCA1OCA4NC44OTU0IDU4IDg2QzU4IDg3LjEwNDYgNTcuMTA0NiA4OCA1NiA4OEg0M0M0MS44OTU0IDg4IDQxIDg3LjEwNDYgNDEgODZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik02MiA4NkM2MiA4NC44OTU0IDYyLjg5NTQgODQgNjQgODRINzhDNzkuMTA0NiA4NCA4MCA4NC44OTU0IDgwIDg2QzgwIDg3LjEwNDYgNzkuMTA0NiA4OCA3OCA4OEg2NEM2Mi44OTU0IDg4IDYyIDg3LjEwNDYgNjIgODZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik00MSA5M0M0MSA5MS44OTU0IDQxLjg5NTQgOTEgNDMgOTFINTZDNTcuMTA0NiA5MSA1OCA5MS44OTU0IDU4IDkzQzU4IDk0LjEwNDYgNTcuMTA0NiA5NSA1NiA5NUg0M0M0MS44OTU0IDk1IDQxIDk0LjEwNDYgNDEgOTNaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik02MiA5M0M2MiA5MS44OTU0IDYyLjg5NTQgOTEgNjQgOTFIODFDODIuMTA0NiA5MSA4MyA5MS44OTU0IDgzIDkzQzgzIDk0LjEwNDYgODIuMTA0NiA5NSA4MSA5NUg2NEM2Mi44OTU0IDk1IDYyIDk0LjEwNDYgNjIgOTNaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDEgNDkuNUM0MSA0OC42NzE2IDQxLjY3MTYgNDggNDIuNSA0OEg2Mi41QzYzLjMyODQgNDggNjQgNDguNjcxNiA2NCA0OS41QzY0IDUwLjMyODQgNjMuMzI4NCA1MSA2Mi41IDUxSDQyLjVDNDEuNjcxNiA1MSA0MSA1MC4zMjg0IDQxIDQ5LjVaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDEgNjUuNUM0MSA2NC42NzE2IDQxLjY3MTYgNjQgNDIuNSA2NEg2Mi41QzYzLjMyODQgNjQgNjQgNjQuNjcxNiA2NCA2NS41QzY0IDY2LjMyODQgNjMuMzI4NCA2NyA2Mi41IDY3SDQyLjVDNDEuNjcxNiA2NyA0MSA2Ni4zMjg0IDQxIDY1LjVaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDQgMzVDNDQgMzQuNDQ3NyA0NC40NDc3IDM0IDQ1IDM0SDgzQzgzLjU1MjMgMzQgODQgMzQuNDQ3NyA4NCAzNUM4NCAzNS41NTIzIDgzLjU1MjMgMzYgODMgMzZINDVDNDQuNDQ3NyAzNiA0NCAzNS41NTIzIDQ0IDM1WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUzIDMwLjVDNTMgMjkuNjcxNiA1My42NzE2IDI5IDU0LjUgMjlINzIuNUM3My4zMjg0IDI5IDc0IDI5LjY3MTYgNzQgMzAuNUM3NCAzMS4zMjg0IDczLjMyODQgMzIgNzIuNSAzMkg1NC41QzUzLjY3MTYgMzIgNTMgMzEuMzI4NCA1MyAzMC41WiIgZmlsbD0iI0QxRDVEQiIvPgo8Y2lyY2xlIGN4PSI2My41IiBjeT0iMTA3LjUiIHI9IjIuNSIgZmlsbD0iI0U1RTdFQiIvPgo8Y2lyY2xlIGN4PSI1NS41IiBjeT0iMTA3LjUiIHI9IjIuNSIgZmlsbD0iI0U1RTdFQiIvPgo8Y2lyY2xlIGN4PSI3MS41IiBjeT0iMTA3LjUiIHI9IjIuNSIgZmlsbD0iI0U1RTdFQiIvPgo8ZGVmcz4KPGZpbHRlciBpZD0iZmlsdGVyMF9kXzEwMzNfMTAxNjIiIHg9IjYiIHk9IjgiIHdpZHRoPSIxMTYiIGhlaWdodD0iMTE4IiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVNb3JwaG9sb2d5IHJhZGl1cz0iNCIgb3BlcmF0b3I9ImVyb2RlIiBpbj0iU291cmNlQWxwaGEiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzEwMzNfMTAxNjIiLz4KPGZlT2Zmc2V0IGR5PSI0Ii8+CjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjMiLz4KPGZlQ29tcG9zaXRlIGluMj0iaGFyZEFscGhhIiBvcGVyYXRvcj0ib3V0Ii8+CjxmZUNvbG9yTWF0cml4IHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwLjE2IDAiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbjI9IkJhY2tncm91bmRJbWFnZUZpeCIgcmVzdWx0PSJlZmZlY3QxX2Ryb3BTaGFkb3dfMTAzM18xMDE2MiIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd18xMDMzXzEwMTYyIiByZXN1bHQ9InNoYXBlIi8+CjwvZmlsdGVyPgo8L2RlZnM+Cjwvc3ZnPgo=";function a$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const i$=w.forwardRef(a$),s$=Fo("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);var l$=o(9296);const c$=function(e){var t;const{is_cf_pro:n,global_checkout:r,flow_id:o,control_id:i,step_id:s,title:l,type:c,actions:u,menu_actions:d,ab_test_ui:f,offer_no_next_step:p,offer_yes_next_step:m,setUpgradePopupFeature:h=()=>{},step_disabled:g}=e,y=s;let{has_product_assigned:w,is_variation:b}=e;const[{flow_type:v,flow_analytics:x,is_flow_instant_checkout:N}]=SU(),[E,M]=(0,a.useState)(!1),_=(0,a.useRef)(),I=x?x.all_steps:"",S=b?e.control_id:s,j=I?I.find(e=>e.id===S):[],k=BV(),D=(0,l$.W6)(),A=(0,P.applyFilters)("cartflows.flowEditor.abActions",null),T=A?A({stepId:y,flowId:o,confirm:k,setLoader:M,toast:Vm}):{},O=e=>{e.preventDefault(),wcfCartflowsPro()&&Vm.error((0,z.__)("Please update CartFlows Pro to the latest version to use A/B testing.","cartflows"))};"landing"!==c&&"thankyou"!==c||(w=!0);const R=(e,t)=>(0,a.createElement)("div",{className:"flex justify-center"},(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:t,placement:"top"},(0,a.createElement)(na,{label:e,size:"sm",type:"pill",variant:"neutral",icon:(0,a.createElement)(s$,{"aria-hidden":"true"}),className:"cursor-pointer"}))),U=lg(c,N);return(0,a.createElement)("div",{className:`wcf-step-wrap--container py-4 px-4 flex items-center gap-2 ${f?"border-0 border-b border-solid border-border-subtle":""} ${g?"invalid-step step-disabled touch-none !bg-background-secondary !text-text-disabled !border-0 rounded-lg":""}`},!f&&(0,a.createElement)("div",{className:"wcf-steps--sortable-toggle flex cursor-move text-text-secondary"},(0,a.createElement)(LU,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}),(0,a.createElement)(LU,{className:"w-5 h-5 stroke-1 -ml-3.5","aria-hidden":"true"})),(0,a.createElement)(Eh,{gap:"lg",direction:{sm:"column",md:"row"},align:{md:"center"},className:vp()("wcf-step w-full justify-between",f?"ml-8":"",E?"step-overlay":"",w||y===r?"":"wcf-step__no-product")},(0,a.createElement)(Eh.Item,{className:"wcf-step--content flex items-center gap-4 w-full sm:w-[50%] min-w-0"},(0,a.createElement)("img",{src:function(){let e="";switch(c){case"landing":e=KH;break;case"checkout":e=e$;break;case"optin":e=r$;break;case"thankyou":e=o$;break;case"upsell":e=t$;break;case"downsell":e=n$}return e}(),alt:c,className:"sm:block lg:block hidden rounded-lg sm:w-[72px] sm:h-[72px] w-[62px] h-[62px]"}),(0,a.createElement)("div",{className:"wcf-steps--title-wrap flex flex-col gap-1"},(0,a.createElement)("div",{className:"wcf-step__col-tags sm:flex items-center gap-2 grid grid-cols-2"},(0,a.createElement)(Ch,{as:"span",size:14,weight:400,color:"secondary",className:"capitalize"},"thankyou"===c?(0,z.__)("Thank You","cartflows"):c),("upsell"!==c&&"downsell"!==c||wcfCartflowsTypePlusPro())&&g?(0,a.createElement)(na,{label:(0,z.__)("Disabled","cartflows"),size:"xs",type:"rounded",variant:"red",icon:(0,a.createElement)(nW,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}):null,function(){let t="";if(f)if(i===s)t=(0,a.createElement)(na,{label:(0,z.__)("Control","cartflows"),size:"xs",type:"pill",variant:"blue"});else{const{var_badge_count:n}=e;t=(0,a.createElement)(na,{label:(0,z.sprintf)(/* translators: %d is replaced with the count */ /* translators: %d is replaced with the count */ |
| 42 |
(0,z.__)("Variation-%d","cartflows"),n),size:"xs",type:"pill",variant:"inverse"})}return t}(),!w&&"storeCheckout"!==v&&(0,a.createElement)(na,{label:(0,z.__)("No Product Assigned","cartflows"),size:"xs",type:"rounded",variant:"red",icon:(0,a.createElement)(nW,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}),!w&&"storeCheckout"===v&&"checkout"!==c&&(0,a.createElement)(na,{label:(0,z.__)("No Product Assigned","cartflows"),size:"xs",type:"rounded",variant:"red",icon:(0,a.createElement)(nW,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}),w&&"storeCheckout"===v&&"checkout"===c&&(0,a.createElement)(na,{label:(0,z.__)("Store Checkout - Remove selected checkout product","cartflows"),size:"xs",type:"rounded",variant:"red",className:"wcf-global-checkout-error-badge",icon:(0,a.createElement)(nW,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}),function(){let e="";return!wcfCartflowsTypePlusPro()||"upsell"!==c&&"downsell"!==c?wcfCartflowsTypePlusPro()||"upsell"!==c&&"downsell"!==c||(e=(0,a.createElement)(Rp,null)):e=m&&p?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:ug(m,35,25),placement:"top"},(0,a.createElement)(na,{label:(0,z.__)("Offer Accepted","cartflows"),size:"xs",type:"rounded",variant:"green",icon:(0,a.createElement)(oW,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})})),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:ug(p,35,25),placement:"top"},(0,a.createElement)(na,{label:(0,z.__)("Offer Rejected","cartflows"),size:"xs",type:"rounded",variant:"yellow",icon:(0,a.createElement)(i$,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}))):(0,a.createElement)(na,{label:(0,z.__)("Invalid Position","cartflows"),size:"xs",type:"rounded",variant:"red",icon:(0,a.createElement)(nW,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}),e}()),(0,a.createElement)("div",{className:"wcf-step__title"},(0,a.createElement)("a",{className:`\n\t\t\t\t\t\t\t\t\tfont-medium text-base sm:text-lg text-text-primary hover:text-brand-brand-600 no-underline\n\t\t\t\t\t\t\t\t\t${U?"disabled pointer-events-none":""}\n\t\t\t\t\t\t\t\t`,href:null!==(t=u[1]?.link)&&void 0!==t?t:"#","aria-disabled":U,tabIndex:U?-1:0},ug(l,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length))))),(0,a.createElement)(Eh.Item,{className:"wcf-step--stats-content w-full sm:w-[30%]"},(0,a.createElement)("div",{className:"wcf-step--stats-content__info flex text-center justify-around items-center gap-4"},(0,a.createElement)("div",{className:"wcf-step--stats-content__stat"},x?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ch,{as:"div",size:14,weight:400,color:"secondary",className:"capitalize"},(0,z.__)("Views","cartflows")),(0,a.createElement)(Ch,{as:"div",size:16,weight:600,color:"primary"},function(){let e=0;return x&&j&&(e=b?j["visits-ab"][s].total_visits:j.visits.total_visits),e}())):R((0,z.__)("Views","cartflows"),(0,z.__)("Upgrade to CartFlows Pro to track views.","cartflows"))),(0,a.createElement)("div",{className:"wcf-step--stats-content__stat"},x?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ch,{as:"div",size:14,weight:400,color:"secondary",className:"capitalize"},(0,z.__)("Conversions","cartflows")),(0,a.createElement)(Ch,{as:"div",size:16,weight:600,color:"primary"},"thankyou"!==c?function(){let e=0;return x&&j&&(e=b?j["visits-ab"][s].conversions:j.visits.conversions),e}():"-")):R((0,z.__)("Conversions","cartflows"),(0,z.__)("Upgrade to CartFlows Pro to track conversions.","cartflows"))),(0,a.createElement)("div",{className:"wcf-step--stats-content__stat"},x?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Ch,{as:"div",size:14,weight:400,color:"secondary",className:"capitalize"},(0,z.__)("Revenue","cartflows")),(0,a.createElement)(Ch,{as:"div",size:16,weight:600,color:"primary"},"thankyou"!==c&&"landing"!==c?function(){let e=0;return x&&j&&(e=b?j["visits-ab"][s].revenue:j.visits.revenue),0!==e?Vh(e):e}():"-")):R((0,z.__)("Revenue","cartflows"),(0,z.__)("Upgrade to CartFlows Pro to track revenue.","cartflows"))))),(0,a.createElement)(Eh.Item,{className:"wcf-step--actions-col w-full sm:w-[15%]"},(0,a.createElement)("div",{className:"wcf-step--actions",ref:_},(0,a.createElement)("div",{className:"wcf-step--action-btns"},(0,a.createElement)("div",{className:"wcf-step--action__basic-btns flex items-center sm:justify-evenly justify-between"},u.map(e=>{var t;if("view"!==e.slug&&"edit"!==e.slug)return null;const n=U&&"edit"===e.slug,r=n?cg():(0,z.sprintf)( |
| 43 |
// translators: %s: step slug |
| 44 |
// translators: %s: step slug |
| 45 |
(0,z.__)("%s Step","cartflows"),e?.slug),o="view"===e.slug?(0,a.createElement)(JV,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}):(0,a.createElement)(eW,{className:"w-5 h-5 stroke-1","aria-hidden":"true"});return(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,a.createElement)("span",{className:"capitalize"},r),placement:"top",key:e?.link},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",tag:"a",href:!n&&"edit"===e.slug||"view"===e.slug?e?.link:"#!",target:"view"===e?.slug?"_blank":void 0,rel:"noreferrer",className:`wcf-step__action-btn [&>svg]:size-5 ${null!==(t=e.class)&&void 0!==t?t:""} ${n?"disabled !text-text-disabled":"text-text-secondary"}`,icon:o}))}),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Open Settings","cartflows"),placement:"top"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",tag:C,to:{pathname:"admin.php",search:"storeCheckout"===v?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${o}&step_id=${s}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${o}&step_id=${s}`},className:"wcf-step__action-btn [&>svg]:size-5 text-text-secondary hover:text-brand-brand-600",icon:(0,a.createElement)(PU,{className:"w-5 h-5 stroke-1","aria-hidden":"true"})})),(0,a.createElement)(JH,{id:y,control_id:i,onClickEvents:{clone:async function(e){if(e.preventDefault(),!wcfCartflowsPro())return null;if(await k({title:(0,z.__)("Duplicate Step","cartflows"),description:(0,z.__)("Do you want to duplicate this step? Are you sure?","cartflows"),actionBtnText:(0,z.__)("Duplicate","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")})){M(!0);const t=e.target.getAttribute("data-action");let n=cartflows_admin.clone_step_nonce;const r=new window.FormData;"cartflows_clone_ab_test_step"===t&&(n=cartflows_admin.wcf_clone_ab_test_step_nonce,r.append("control_id",i)),r.append("action",t),r.append("security",n),r.append("step_id",y),r.append("post_id",o),window.wcfAction="cloneStep",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{Vm.success((0,z.__)("Step cloned successfully!","cartflows")),window.location.reload(),M(!1)}))}},delete:async function(e){if(e.preventDefault(),await k({title:(0,z.__)("Delete Step","cartflows"),description:(0,z.__)("Do you want to delete this step? Are you sure?","cartflows"),actionBtnText:(0,z.__)("Delete","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")})){M(!0);const t=e.target.getAttribute("data-action");let n=cartflows_admin.delete_step_nonce;const r=new window.FormData;"cartflows_delete_ab_test_step"===t&&(n=cartflows_admin.wcf_delete_ab_test_step_nonce,r.append("control_id",i)),r.append("action",t),r.append("security",n),r.append("step_id",y),r.append("post_id",o),window.wcfAction="deleteStep",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{Vm.success((0,z.__)("Step deleted successfully!","cartflows")),window.location.reload(),M(!1)}))}},abtest:T.abtest||O,winner:T.winner||O,archived:T.archived||O,automation:()=>{D.push({pathname:"admin.php",search:"storeCheckout"===v?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${o}&automation=${s}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${o}&automation=${s}`})}},is_cf_pro:n,actions:d,type:c,setUpgradePopupFeature:h})))))))},u$=Fo("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),d$=Fo("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),f$=(e="pro")=>{const[{license_status:t}]=p();return!("plus-pro"===e?wcfCartflowsTypePlusPro():wcfCartflowsPro())||"Activated"!==t},p$=function({stepId:e,flowId:t,flowType:n,initialBumps:r=[]}){const[o,i]=(0,a.useState)(!0),[s,l]=(0,a.useState)(r.length),[c,u]=(0,a.useState)(!1),d=f$("plus-pro"),[{license_status:f}]=p(),m=(0,g.useHistory)(),h=(0,P.applyFilters)("cartflows.flowEditor.orderBumps",null),y=(0,a.useCallback)(e=>{l(e)},[]),w=(0,a.useCallback)(r=>{const o=`?page=cartflows&path=${"storeCheckout"===n?"store-checkout":"flows"}&action=wcf-edit-flow&flow_id=${t}&step_id=${e}&tab=order_bumps&ob_id=${r}`;m?.push&&m.push({pathname:"admin.php",search:o})},[n,t,e,m]);if(d||!h){const e="function"==typeof wcfCartflowsPro&&wcfCartflowsPro()&&"Activated"!==f;return(0,a.createElement)("div",{className:"wcf-order-bump-section px-4 py-4 border-t border-solid border-border-subtle border-0"},(0,a.createElement)("div",{className:"flex items-center gap-1.5"},(0,a.createElement)(u$,{className:"w-4 h-4 text-text-primary stroke-1"}),(0,a.createElement)(Ch,{as:"span",size:14,weight:400,color:"primary"},(0,z.__)("Order Bumps","cartflows"))),(0,a.createElement)("div",{className:"mt-2.5"},(0,a.createElement)(GW,{title:(0,z.__)("Add Extra Revenue to Every Checkout Effortlessly","cartflows"),description:(0,z.__)("Increase the value of every order by offering relevant add-ons customers can buy at checkout in a single click.","cartflows"),onButtonClick:e?void 0:()=>u(!0)})),(0,a.createElement)(zh,{feature:"order-bump",open:c,setOpen:u}))}return(0,a.createElement)("div",{className:"wcf-order-bump-section px-4 py-4 border-t border-solid border-border-subtle border-0"},(0,a.createElement)("div",{className:"flex items-center justify-between"},(0,a.createElement)("div",{className:"flex items-center gap-1.5"},(0,a.createElement)(u$,{className:"w-4 h-4 text-text-primary stroke-1"}),(0,a.createElement)(Ch,{as:"span",size:14,weight:400,color:"primary"},(0,z.__)("Order Bumps","cartflows")," ",(0,a.createElement)("span",{className:"text-text-primary font-normal"},"(",s,")"))),(0,a.createElement)(Wo,{variant:"link",size:"xs",icon:o?(0,a.createElement)(d$,{className:"w-3.5 h-3.5 stroke-2"}):(0,a.createElement)(Gp,{className:"w-3.5 h-3.5 stroke-2"}),iconPosition:"right",onClick:()=>i(!o)},o?(0,z.__)("Hide","cartflows"):(0,z.__)("Show","cartflows"))),o&&(0,a.createElement)("div",{className:"mt-2.5"},(0,a.createElement)(h,{stepId:e,flowId:t,flowType:n,initialBumps:r,onCountChange:y,onEditNavigate:w})))},m$=function(e){const[{is_cf_pro:t,global_checkout:n,flow_id:r,flow_type:o}]=SU(),{id:i,title:s,type:l,actions:c,menu_actions:u,offer_yes_next_step:d,offer_no_next_step:f,invalid:p=!1,step_disabled:m=!1,setUpgradePopupFeature:h=()=>{},order_bumps:g=[]}=e,y=!!p,w=i;"storeCheckout"===o&&(["checkout"].includes(l)&&(delete u.clone,y||delete u.delete),y&&(delete u.clone,delete u.abtest));let b=!1,v=!1,x=[],E=[],M=0;wcfCartflowsTypePro()&&(b=!!e["ab-test-ui"]&&e["ab-test-ui"],v=!!e["ab-test-start"]&&e["ab-test-start"],x=e["ab-test-variations"]?e["ab-test-variations"]:[],E=e["ab-test-archived-variations"]?e["ab-test-archived-variations"]:[],M=x.length,M<2&&(b=!1));let _="";"storeCheckout"===o&&y&&(_+=" invalid-step wcf-store-checkout pointer-events-none touch-none"),b&&(_+=" wcf-ab-test"),wcfCartflowsTypePlusPro()||"upsell"!==l&&"downsell"!==l||(_+=" invalid-step pro-inactive pointer-events-none touch-none !bg-background-secondary !text-text-disabled !border-0"),m&&!b&&(_+=" invalid-step step-disabled touch-none !bg-background-secondary !text-text-disabled !border-0");const I={is_cf_pro:t,global_checkout:n,flow_id:r,ab_test_ui:b,control_id:w,step_id:i,type:l,title:s,actions:Object.values(c),menu_actions:Object.values(u),has_product_assigned:e.is_product_assigned,offer_yes_next_step:d,offer_no_next_step:f,ab_test_archived_variations:E,invalidStep:y,setUpgradePopupFeature:h,step_disabled:m},S=(0,P.applyFilters)("cartflows.flowEditor.abTestHead",null),j=(0,P.applyFilters)("cartflows.flowEditor.abTestArchivedSteps",null);return(0,a.createElement)("div",{className:"wcf-step-wrap box-border bg-background-primary border border-solid border-border-subtle shadow-sm rounded-lg overflow-hidden"+_,id:i},b&&S&&(0,a.createElement)(S,{flow_id:r,control_id:w,step_id:i,abvariations:x,ab_test_start:v}),function(){let e="";if(I.step_id=i,b&&M>1){let t=0;e=x.map(e=>(w!==e.id&&++t,I.is_variation=!0,I.control_id=w,I.step_id=e.id,I.title=e.title,I.actions=Object.values(e.actions),I.menu_actions=Object.values(e.menu_actions),I.has_product_assigned=e.is_product_assigned,I.var_badge_count=t,I.offer_yes_next_step=e.offer_yes_next_step,I.offer_no_next_step=e.offer_no_next_step,I.offer_yes_step_id=e.offer_yes_step_id,I.offer_no_step_id=e.offer_no_step_id,I.step_disabled=e.step_disabled,(0,a.createElement)(c$,(0,N.A)({},I,{key:e.id}))))}else e=(0,a.createElement)(c$,I);return e}(),function(){if(j&&E.length>0){const e={flow_id:r,control_id:w,type:l,archived_variations:E,ab_test_ui:b};return(0,a.createElement)(j,e)}}(),"checkout"===l&&(0,a.createElement)(p$,{stepId:i,flowId:r,flowType:o,initialBumps:Array.isArray(g)?g:[]}))},h$=function(){return(0,a.createElement)("div",{className:"w-full"},Array(3).fill().map((e,t)=>(0,a.createElement)("div",{key:t,className:"wcf-step-wrap bg-background-primary border border-border-subtle shadow-sm rounded-lg mb-4 p-4 flex items-center gap-4"},(0,a.createElement)("div",{className:"flex"},(0,a.createElement)(WO,{className:"w-3 h-10 rounded"})),(0,a.createElement)(WO,{className:"w-[72px] h-[72px] rounded-lg flex-shrink-0"}),(0,a.createElement)("div",{className:"flex flex-col gap-2 w-[40%]"},(0,a.createElement)(WO,{className:"h-3 w-24 rounded-md"}),(0,a.createElement)(WO,{className:"h-4 w-48 rounded-md"})),(0,a.createElement)("div",{className:"flex items-center justify-around w-[35%] gap-4"},[1,2,3].map(e=>(0,a.createElement)("div",{key:e,className:"flex flex-col gap-2 items-center"},(0,a.createElement)(WO,{className:"h-3 w-16 rounded-md"}),(0,a.createElement)(WO,{className:"h-4 w-8 rounded-md"})))),(0,a.createElement)("div",{className:"flex items-center gap-2 ml-auto"},[1,2,3,4].map(e=>(0,a.createElement)(WO,{key:e,variant:"circular",className:"size-8"}))))))};function g$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"}))}const y$=w.forwardRef(g$);function w$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const b$=w.forwardRef(w$);function v$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"}))}const x$=w.forwardRef(v$);function N$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"}))}const E$=w.forwardRef(N$);function M$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.53 16.122a3 3 0 0 0-5.78 1.128 2.25 2.25 0 0 1-2.4 2.245 4.5 4.5 0 0 0 8.4-2.245c0-.399-.078-.78-.22-1.128Zm0 0a15.998 15.998 0 0 0 3.388-1.62m-5.043-.025a15.994 15.994 0 0 1 1.622-3.395m3.42 3.42a15.995 15.995 0 0 0 4.764-4.648l3.876-5.814a1.151 1.151 0 0 0-1.597-1.597L14.146 6.32a15.996 15.996 0 0 0-4.649 4.763m3.42 3.42a6.776 6.776 0 0 0-3.42-3.42"}))}const _$=w.forwardRef(M$),I$=function(){return(0,a.createElement)("div",{className:"wcf-design-page is-placeholder"},(0,a.createElement)("div",{className:"wcf-design-page__content"},(0,a.createElement)("div",{className:"wcf-design-header--title wcf-step__title--editable"},(0,a.createElement)("div",{className:"title wcf-placeholder__width--30"})),(0,a.createElement)("div",{className:"wcf-design-page__customize"},(0,a.createElement)("div",{className:"wcf-design-page__button"}),(0,a.createElement)("div",{className:"wcf-design-page__button"})),(0,a.createElement)("div",{className:"wcf-design-page__text"},(0,a.createElement)("div",{className:"title wcf-placeholder__width--60"})),(0,a.createElement)("div",{className:"wcf-design-page__WPeditor"},(0,a.createElement)("div",{className:"title wcf-placeholder__width--80"}))),(0,a.createElement)("div",{className:"wcf-design-page__settings"},(0,a.createElement)("div",{className:"title"}),(0,a.createElement)("div",{className:"wcf-field wcf-checkbox-field"},(0,a.createElement)("div",{className:"title"})),(0,a.createElement)("div",{className:"wcf-settings"},(0,a.createElement)("form",null,(0,a.createElement)("div",{className:"wcf-vertical-nav"},(0,a.createElement)("div",{className:"wcf-vertical-nav__menu"},Array(5).fill().map(e=>(0,a.createElement)("div",{className:"wcf-settings-nav__tab",key:e},(0,a.createElement)(bG,{height:"45px"})))),(0,a.createElement)("div",{className:"wcf-vertical-nav__content"},(0,a.createElement)(yG,{fontSize:"35px",width:"225px"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"65%"}),(0,a.createElement)(wG,null),(0,a.createElement)(yG,{fontSize:"35px",width:"300px"}),(0,a.createElement)(yG,{width:"60%"}),(0,a.createElement)(yG,{width:"60%"}),(0,a.createElement)(yG,{width:"45%"}),(0,a.createElement)(wG,null),(0,a.createElement)(yG,{fontSize:"35px",width:"300px"}),(0,a.createElement)(yG,{width:"60%"}),(0,a.createElement)(yG,{width:"60%"}),(0,a.createElement)(yG,{width:"45%"})))))))},S$=function({settings:e,displayAs:t="tr"}){const[{options:n}]=SU();return(0,a.createElement)("div",{className:"wcf-list-options"},(0,a.createElement)("div",{className:"wcf-list-options-wrapper"},"tr"===t?(0,a.createElement)("table",{className:"w-full"},(0,a.createElement)("tbody",null,Object.keys(e.fields).map(t=>{const r=e.fields[t],o=n[r.name]?n[r.name]:"",i=dg.isActiveControl(r,n);return(0,a.createElement)(JZ,{key:t,data:r,value:o,isActive:i,field:t})}))):(0,a.createElement)("div",{className:"wcf-list-options-container"},Object.keys(e.fields).map(r=>{const o=e.fields[r],i=n[o.name]?n[o.name]:"",s=dg.isActiveControl(o,n);return(0,a.createElement)(JZ,{key:r,data:o,value:i,isActive:s,field:r,tabName:"list-options",displayAs:t})}))))},j$=function(e){const[t,n]=(0,a.useState)(e.isOpen?"":"collapsed"),r=e.settings.title.replace(/ /g,"_").toLowerCase(),o=e.settings.title.replace(/ /g,"-").toLowerCase();return(0,a.createElement)("div",{className:`wcf-${o} accordion-item bg-background-primary -mx-6 border-b border-border-subtle ${!1===e?.isActive?"hidden":""}`},(0,a.createElement)("h2",{className:"accordion-header mb-0 "+("landing"===e?.settings?.step_type&&"general"===e?.settings?.slug?"hidden":""),id:`wcf_${r}_toggler`.toLowerCase()},(0,a.createElement)("button",{className:`wcf-accordion-button appearance-none bg-transparent border-none cursor-pointer relative flex justify-between items-center w-full py-4 px-6 text-base font-semibold text-text-primary text-left transition focus:outline-none ${t}`,type:"button","data-bs-toggle":"collapse","data-bs-target":`#wcf_collapse_${r}`,"aria-expanded":"false","aria-controls":`wcf_collapse_${r}`,onClick:function(){n("collapsed"===t?"":"collapsed")}},(0,a.createElement)("span",null,e.settings.title),""===t?(0,a.createElement)(d$,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}):(0,a.createElement)(Gp,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}))),(0,a.createElement)("div",{id:`wcf_collapse_${r}`,className:`accordion-collapse px-6 pt-4 pb-8 ${t}`,"aria-labelledby":`wcf_${r}_toggler`},(0,a.createElement)("div",{className:"accordion-body"},(0,a.createElement)(S$,{settings:e.settings,displayAs:e.displayAs?e.displayAs:"tr"}))))},k$=function(){const[{step_id:e,design_settings:t,options:n,flow_type:r,flow_id:o,step_data:i,is_flow_instant_checkout:s}]=SU(),l=t.settings,c=l?Object.values(l).sort(function(e,t){return e.priority-t.priority}):"",[{step_title:u}]=SU(),d=(0,g.useHistory)(),f=BV();return(0,a.useEffect)(()=>{let e=!0;return()=>{e=!1}},[]),""===e?(0,a.createElement)(I$,null):(0,a.createElement)("div",{className:"wcf-design-page"},"storeCheckout"===r&&u&&"yes"!==s&&(0,a.createElement)("div",{className:"mb-3"},(0,a.createElement)("div",{className:"wcf-change-step wcf-button wcf-secondary-button",onClick:async function(){await f({title:(0,z.__)("Update Template","cartflows"),description:(0,z.__)("Changing the template will permanently delete the current design in this step. Would you still like to proceed?","cartflows"),actionBtnText:(0,z.__)("Update","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")})&&d.push(`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&step_id=${e}&flow_id=${o}&tab=update-template`)}},(0,a.createElement)("span",{className:""},(0,z.__)("Change Template","cartflows")))),(0,a.createElement)("div",{className:"wcf-step-notices-wrapper rounded-md bg-alert-background-warning border border-yellow-200 p-4 mb-3"},(0,a.createElement)("div",{className:"flex"},(0,a.createElement)("div",{className:"text-sm text-support-warning"},"yes"===s&&["checkout","upsell","downsell","thankyou"].includes(i?.type)?(0,a.createElement)(a.Fragment,null,(0,z.sprintf)( |
| 46 |
// translators: %s: The current step type. |
| 47 |
// translators: %s: The current step type. |
| 48 |
(0,z.__)("Use this setting to customize the style of the Instant %s Layout.","cartflows"),"thankyou"===i?.type?(0,z.__)("Thank You","cartflows"):i?.type.charAt(0).toUpperCase()+i?.type.slice(1))):(0,a.createElement)(a.Fragment,null,(0,z.__)("If you are using shortcodes, enable this design settings to apply styles.","cartflows"))))),c&&(0,a.createElement)("div",{className:"wcf-design-page__settings"},(0,a.createElement)("div",{className:"mb-4"},(0,a.createElement)(nQ,{id:"wcf-enable-design-settings",name:"wcf-enable-design-settings",value:n["wcf-enable-design-settings"],label:(0,z.__)("Enable Design Settings","cartflows"),fullWidth:!0})),"yes"===n["wcf-enable-design-settings"]&&Object.keys(c).map((e,t)=>(0,a.createElement)(j$,{settings:c[e],key:e,isOpen:0===t,isActive:dg.isActiveControl(c[e],n)}))))},D$=function(e){const t=e.heading?e.heading:"",n=e.subHeading?e.subHeading:"",r=e.description?e.description:"",o=e.btnText||(0,z.__)("Upgrade to CartFlows Pro","cartflows"),i=e.class?e.class:"",s=e.usps?e.usps:"";return(0,a.createElement)("div",{className:`wcf-upgrade-to-pro-cta ${i}`},(0,a.createElement)("div",{className:"bg-brand-25 border border-solid border-brand-200 rounded-xl px-5 py-5 lg:px-6 sm:py-5"},(0,a.createElement)("div",{className:"flex flex-col gap-3"},t&&(0,a.createElement)(_h,{size:"sm",tag:"h2",title:t}),n&&(0,a.createElement)(Ch,{size:14,color:"secondary"},n),(0,a.createElement)("div",{className:"flex items-center"},(0,a.createElement)(WW,{buttonLink:e.buttonLink,ctaText:o}))),r&&(0,a.createElement)(Ch,{size:14,color:"secondary",className:"wcf-upgrade-to-pro-cta--text mt-3"},r),s&&(0,a.createElement)("ul",{className:"wcf-upgrade-to-pro-cta-list list-none p-0 m-0 mt-3"},s.map((e,t)=>(0,a.createElement)("li",{className:"wcf-upgrade-to-pro-cta-list-item flex gap-2 items-center mb-2",key:t},(0,a.createElement)(oW,{className:"w-18 h-18 stroke-2 text-brand-500 shrink-0"}),(0,a.createElement)(Ch,{size:14,color:"secondary"},e))))))},C$=function(){return(0,a.createElement)("div",{className:"wcf-settings-nav"},(0,a.createElement)("div",{className:"wcf-settings-nav__tabs"},Array(5).fill().map(e=>(0,a.createElement)("div",{className:"wcf-settings-nav__tab",key:e},(0,a.createElement)(bG,{height:"45px"})))),(0,a.createElement)("div",{className:"wcf-settings-nav__content"},(0,a.createElement)(yG,{fontSize:"35px",width:"225px"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"65%"}),(0,a.createElement)(wG,null),(0,a.createElement)(yG,{fontSize:"35px",width:"300px"}),(0,a.createElement)(yG,{width:"60%"}),(0,a.createElement)(yG,{width:"60%"}),(0,a.createElement)(yG,{width:"45%"})))};function A$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const T$=w.forwardRef(A$),O$=function(){const[{step_id:e,flow_id:t,step_data:n}]=SU(),[r,o]=(0,a.useState)("collapsed"),i=(0,g.useHistory)(),s=BV();return(0,a.createElement)("div",{className:"wcf-change-step-template accordion-item bg-background-primary -mx-8 border-b border-border-subtle"},(0,a.createElement)("h2",{className:"accordion-header mb-0",id:"wcf_change_step_template_toggler"},(0,a.createElement)("button",{className:`wcf-accordion-button relative flex justify-between items-center w-full py-4 px-8 text-base font-semibold text-text-primary text-left transition focus:outline-none ${r}`,type:"button","data-bs-toggle":"collapse","data-bs-target":"#wcf_collapse_change_step_template","aria-expanded":"false","aria-controls":"wcf_collapse_change_step_template",onClick:function(){o("collapsed"===r?"":"collapsed")}},(0,a.createElement)("span",null,(0,z.__)("Change Template","cartflows")),""===r?(0,a.createElement)(T$,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}):(0,a.createElement)(ym,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}))),(0,a.createElement)("div",{id:"wcf_collapse_change_step_template",className:`accordion-collapse px-8 pt-4 pb-8 ${r}`,"aria-labelledby":"wcf_change_step_template_toggler"},(0,a.createElement)("div",{className:"accordion-body"},(0,a.createElement)("div",{className:"mb-3 flex items-center gap-4"},(0,a.createElement)("img",{src:function(){let e="";switch(n.type){case"landing":e=KH;break;case"checkout":e=e$;break;case"optin":e=r$;break;case"thankyou":e=o$;break;case"upsell":e=t$;break;case"downsell":e=n$}return e}(),alt:n.type,className:"rounded-lg w-[85px] h-[85px]"}),(0,a.createElement)("div",{className:"wcf-template-content"},(0,a.createElement)("div",{className:"wcf-step-template-type mb-3"},(0,a.createElement)("span",{className:"text-sm font-medium"},(0,z.__)("Step Type: ","cartflows")),(0,a.createElement)("span",{className:"text-sm font-normal text-text-secondary capitalize"},n.type)),(0,a.createElement)("div",{className:"wcf-change-step wcf-button wcf-secondary-button",onClick:async function(){await s({title:(0,z.__)("Update Template","cartflows"),description:(0,z.__)("Changing the template will permanently delete the current design in this step. Would you still like to proceed?","cartflows"),actionBtnText:(0,z.__)("Update","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")})&&i.push(`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t}step_id=${e}&tab=update-template`)}},(0,a.createElement)("span",{className:""},(0,z.__)("Update Template","cartflows"))))))))},L$=function(){const[{step_data:e,settings_data:t,page_builder:n,flow_type:r,step_title:o,options:i}]=SU(),[{license_status:s}]=p();let l=!0;if(void 0!==e.id&&(l=!1),l||!t?.settings)return(0,a.createElement)(C$,null);const c=t.settings,u=Object.values(c).sort(function(e,t){return e.priority-t.priority});return["upsell","downsell"].includes(e.type)&&wcfCartflowsPro()&&"Activated"!==s?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-multiple-order-bumps wcf-multiple-order-bumps-cta"},(0,a.createElement)(D$,{heading:(0,z.__)("License is required!","cartflows"),subHeading:(0,z.__)("Activate the license to modify this offer step's settings","cartflows")}))):(0,a.createElement)("div",{className:"wcf-settings-page"},c&&Object.keys(u).map((t,r)=>"other"!==n&&"shortcode"===u[t].slug?null:(u[t].step_type=e?.type||"",(0,a.createElement)(j$,{settings:u[t],key:t,displayAs:"div",isOpen:0===r,isActive:dg.isActiveControl(u[t],i)}))),"storeCheckout"===r&&o&&(0,a.createElement)(O$,null))},z$=function({settings:e},t="tr"){const[{options:n}]=SU(),r=e=>{let t="";const r=e.name;if(r&&r.includes("[")){const o=r.split("["),a=[];for(let e=1;e<o.length;e++)a.push(o[e].split("]")[0]);const i=r.substr(0,r.indexOf("[")),s=n[i],l=n["wcf-offer-product"];if((null==l||""===l||l.length<=0)&&("wcf-offer-product[original_price]"===r||"wcf-offer-product[sell_price]"===r))return(0,z.__)("No product Selected","cartflows");const c=Array.isArray(l)?parseFloat(l[0].original_price):parseFloat(l.original_price);if("wcf-offer-product[sell_price]"===r&&c){const t=n["wcf-offer-discount"],r=parseFloat(n["wcf-offer-discount-value"]);let o=c;return"discount_percent"===t?r>0&&(o=(c-c*r/100).toFixed(2)):"discount_price"===t&&r>0&&(o=(c-r).toFixed(2)),e.class=o<0?"error_field":"",o}t=s[a[0]]}else t=n[e.name]?n[e.name]:"";return t};return(0,a.createElement)("div",{className:"wcf-list-options wcf-offer-list-options"},(0,a.createElement)("div",{className:"wcf-list-options-wrapper"},"tr"===t?(0,a.createElement)("table",{className:"w-full"},(0,a.createElement)("tbody",null,Object.keys(e.fields).map(t=>{const o=e.fields[t],i=r(o),s=dg.isActiveControl(o,n);return(0,a.createElement)(JZ,{key:t,data:o,value:i,isActive:s,field:t})}))):(0,a.createElement)("div",{className:"wcf-list-options-container"},Object.keys(e.fields).map(o=>{const i=e.fields[o],s=r(i),l=dg.isActiveControl(i,n);return(0,a.createElement)(JZ,{key:o,data:i,value:s,isActive:l,field:o,tabName:"list-options",displayAs:t})}))),(0,a.createElement)("table",null,(0,a.createElement)("tbody",null)))},P$=function(){return(0,a.createElement)("div",{className:"wcf-checkout-products is-placeholder"},(0,a.createElement)("div",{className:"wcf-checkout-products--selection wcf-checkout__section"},(0,a.createElement)("div",{className:"wcf-product-selection-wrapper"},(0,a.createElement)("div",{className:"wcf-list-options"},(0,a.createElement)("div",{className:"wcf-list-options__title"},(0,a.createElement)("div",{className:"title wcf-placeholder__width--30"})),(0,a.createElement)("table",null,(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("th",null,(0,a.createElement)("div",{className:"wcf-checkout-product-selection-field"},(0,a.createElement)("div",{className:"wcf-checkout-product-selection-field__add-new"},(0,a.createElement)("div",{className:"wcf-checkout-products__button"}),(0,a.createElement)("div",{className:"wcf-checkout-products__button"})))))))))),(0,a.createElement)("div",{className:"wcf-checkout-products__pro-options"},(0,a.createElement)("div",{className:"wcf-checkout-products--coupon"},(0,a.createElement)("div",{className:"wcf-coupon-selection-wrapper"},(0,a.createElement)("div",{className:"wcf-list-options"},(0,a.createElement)("div",{className:"wcf-list-options__title"},(0,a.createElement)("div",{className:"title"})),(0,a.createElement)("table",null,(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("th",null,(0,a.createElement)("div",null,(0,a.createElement)("div",{className:"wcf-select2-field"},(0,a.createElement)("div",{className:"title"}))))))))))),(0,a.createElement)("div",{className:"wcf-field wcf-submit"},(0,a.createElement)("div",{className:"wcf-checkout-products__button"})))},R$=function(){const[{settings_data:e,page_settings:t,options:n,step_data:r},o]=SU(),[{license_status:i}]=p(),s=n["wcf-offer-product"]?n["wcf-offer-product"]:"",l=[{value:"",label:"No Discount",icon:(0,a.createElement)(kU,{className:"w-5 h-5"})},{value:"discount_percent",label:"Discount Percentage",icon:(0,a.createElement)(CU,{className:"w-5 h-5"})},{value:"discount_price",label:"Discount Price",icon:(0,a.createElement)(TU,{className:"w-5 h-5"})}],[c,u]=(0,a.useState)(),[d,f]=(0,a.useState)(""),m=(0,z.__)("Add","cartflows"),h=void 0===s.discount_type||""===s.discount_type?"disable":"enable",[g,y]=(0,a.useState)(h);(0,a.useEffect)(()=>{y(s?.discount_type?"enable":"disable")},[s]);const[w,b]=(0,a.useState)({isInProcessing:!1,buttonText:m}),{isInProcessing:v,buttonText:x}=w;return void 0===e.settings?(0,a.createElement)(P$,null):["upsell","downsell"].includes(r.type)&&wcfCartflowsPro()&&"Activated"!==i?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-multiple-order-bumps wcf-multiple-order-bumps-cta"},(0,a.createElement)(D$,{heading:(0,z.__)("License is required!","cartflows"),subHeading:(0,z.__)("Activate the license to modify this offer step's settings","cartflows")}))):(0!==s.length&&function(){const e=n["wcf-offer-discount"],t=parseFloat(n["wcf-offer-discount-value"]),r=parseFloat(s.original_price);let o=0;"discount_percent"===e?t>0&&(o=r-r*t/100):"discount_price"===e&&t>0&&(o=r-t),s.sell_price=o.toFixed(2)}(),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-offer-product--wrapper"},(0,a.createElement)("div",{className:"wcf-offer-products--selection wcf-products__section"},0===s.length?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{name:"wcf-offer-product[]",type:"hidden",value:""}),(0,a.createElement)("div",{className:"wcf-offer-no-product--notice border border-border-subtle bg-gray-25 text-center text-sm font-normal rounded-md p-5"},(0,z.__)("Once you select the product, they will be displayed here.","cartflows")),(0,a.createElement)("div",{className:"wcf-offer-product-selection-field__add-new flex justify-between items-end gap-5 mt-5"},(0,a.createElement)(VZ,{name:"",desc:"",field:"product",value:d,allowed_products:"",include_products:"braintree-subscription, braintree-variable-subscription",excluded_products:"grouped",placeholder:(0,z.__)("Search for a Product","cartflows"),onChangeCB:u,sectionClass:"flex-1"}),(0,a.createElement)(Wo,{type:"button",variant:"outline",size:"md",icon:(0,a.createElement)(QU,{className:"w-4 h-4"}),iconPosition:"left",loading:v,disabled:v,onClick:function(){const e=c?.value;f(c),e&&(b({isInProcessing:!0,buttonText:(0,z.__)("Adding…","cartflows")}),L()({path:`/cartflows/v1/admin/product-data/${e}`}).then(t=>{console.log(t),o({type:"ADD_OFFER_PRODUCT",field_name:"wcf-offer-product",product_data:{value:e,quantity:"1",label:c?.label,img_url:t?.img_url,original_price:t?.regular_price}}),f(null),b({isInProcessing:!1,buttonText:m})}),u(null))},className:"wcf-select-product-button shrink-0 h-fit"},x))):(0,a.createElement)("div",{className:"overflow-visible shadow border border-border-subtle rounded-md"},(0,a.createElement)("div",{className:"wcf-offer-product-selection--header border-b border-border-subtle flex gap-4 p-3"},(0,a.createElement)("div",{className:"text-left text-sm font-semibold text-text-primary w-2/5"},(0,z.__)("Items","cartflows")),(0,a.createElement)("div",{className:"flex gap-2"},(0,a.createElement)("div",{className:"text-left text-sm font-semibold text-text-primary w-20"},(0,z.__)("Quantity","cartflows")),(0,a.createElement)("div",{className:"text-left text-sm font-semibold text-text-primary w-44"},(0,z.__)("Discount","cartflows")),(0,a.createElement)("div",{className:"text-left text-sm font-semibold text-text-primary w-24"},(0,z.__)("Shipping Rate","cartflows")),(0,a.createElement)("div",{className:"relative w-[5%]"},(0,a.createElement)("span",{className:"sr-only"},(0,z.__)("Delete","cartflows"))))),(0,a.createElement)("div",{className:"wcf-offer-product-selection--selected-product flex items-center p-3 gap-4"},(0,a.createElement)("div",{className:"wcf-offer-product-selection--product-title whitespace-nowrap text-sm font-medium text-text-primary w-2/5"},(0,a.createElement)("div",{className:"flex gap-3 items-center"},(0,a.createElement)("div",{className:"wcf-offer-product-selection--product-image flex w-24 h-24"},(0,a.createElement)("img",{src:s.img_url?s.img_url:cartflows_admin.image_placeholder,className:"product-image rounded-md w-full h-full aspect-{3/2} object-contain",alt:Vh(s.label)})),(0,a.createElement)("div",{className:"wcf-offer-product-selection--product-title_text"},(0,a.createElement)("div",{className:"wcf-offer-product-repeater-field__title whitespace-normal text-left","data-product_id":s.value},Vh(s.label)),(0,a.createElement)("div",{className:"wcf-offer-product-repeater-field__reg-price mt-1"},(0,a.createElement)("div",{className:"flex gap-2"},(0,a.createElement)("span",{className:"wcf-offer-product--reg-price "+(0<s.sell_price?"line-through text-text-tertiary":"")},cartflows_admin.woo_currency+s.original_price),0<s.sell_price&&(0,a.createElement)("span",{className:"wcf-offer-product--sale-price"},cartflows_admin.woo_currency+s.sell_price)))))),(0,a.createElement)("div",{className:"flex-1 flex gap-2"},(0,a.createElement)("div",{className:"wcf-offer-product-selection--product-qty"},(0,a.createElement)(nB,{id:"",name:"wcf-offer-quantity",class:"input-field !w-20 !text-sm font-normal !m-0",value:n["wcf-offer-quantity"],min:"1"})),(0,a.createElement)("div",{className:"wcf-offer-product-selection--product-discount flex gap-2"},(0,a.createElement)(oQ,{name:"wcf-offer-discount",value:n["wcf-offer-discount"],class:"!w-20 !m-0",options:l,callback:function(e,t,n){y(""===n?"disable":"enable")}}),(0,a.createElement)(nB,{id:"",class:"input-field !w-20 !m-0",name:"wcf-offer-discount-value",value:"disable"===g?"":n["wcf-offer-discount-value"],readonly:"disable"===g?"readonly":"",placeholder:"disable"===g?"":"0",min:"1",step:"any"})),(0,a.createElement)("div",{className:"wcf-offer-product-selection--flat-rate flex"},(0,a.createElement)(nB,{id:"",class:"input-field !w-20 !m-0",name:"wcf-offer-flat-shipping-value",placeholder:"0",value:n["wcf-offer-flat-shipping-value"],min:"0"})),(0,a.createElement)("div",{className:"wcf-offer-product-selection-actions flex gap-2 relative whitespace-nowrap text-right text-sm font-medium w-[5%] justify-center"},(0,a.createElement)("div",{className:"wcf-delete-product-item py-2 text-brand-500 hover:text-brand-700 cursor-pointer text-right flex justify-end",onClick:function(){o({type:"REMOVE_OFFER_PRODUCT",field_name:"wcf-offer-product"})}},(0,a.createElement)(UU,{className:"h-18 w-18"}))),(0,a.createElement)("input",{name:"wcf-offer-product[]",type:"hidden",className:"wcf-checkout-product-id",value:s.value}))))),(0,a.createElement)("div",{className:"wcf-offer-product--common-settings pt-8"},(0,a.createElement)(z$,{settings:t?.settings.product,displayAs:"div"})))))},U$=function(){return(0,a.createElement)("div",{className:"wcf-multiple-order-bumps is-placeholder"},(0,a.createElement)("div",{className:"wcf-multiple-order-bumps__add-new"},(0,a.createElement)("span",{className:"wcf-add-new-order-bump wcf-button--primary"})),(0,a.createElement)("div",{className:"wcf-multiple-order-bumps__header"},(0,a.createElement)("div",{className:"wcf-column wcf-column--title"},"Title"),(0,a.createElement)("div",{className:"wcf-column wcf-column--status"},"Status"),(0,a.createElement)("div",{className:"wcf-column wcf-column--actions"},"Actions")),(0,a.createElement)("div",{className:"wcf-multiple-order-bumps__content"},(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-order-bump"},(0,a.createElement)("div",{className:"wcf-order-bump__content-wrapper"},(0,a.createElement)("div",{className:"wcf-order-bump__data wcf-column--product"},(0,a.createElement)("div",{className:"wcf-order-bump__data-title"},(0,a.createElement)("span",{title:"ob"}))),(0,a.createElement)("div",{className:"wcf_order_bump__status"},(0,a.createElement)("span",{className:"wcf-ob-status"})),(0,a.createElement)("div",{className:"wcf-order-bump__action wcf-column--actions"},(0,a.createElement)("span",{title:"Edit Order Bump"}))))),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-order-bump"},(0,a.createElement)("div",{className:"wcf-order-bump__content-wrapper"},(0,a.createElement)("div",{className:"wcf-order-bump__data wcf-column--product"},(0,a.createElement)("div",{className:"wcf-order-bump__data-title"},(0,a.createElement)("span",{title:"ob"}))),(0,a.createElement)("div",{className:"wcf_order_bump__status"},(0,a.createElement)("span",{className:"wcf-ob-status"})),(0,a.createElement)("div",{className:"wcf-order-bump__action wcf-column--actions"},(0,a.createElement)("span",{title:"Edit Order Bump"})))))))},B$=function(){const[{step_id:e,flow_id:t,options:n,page_settings:r},o]=SU(),i=f$("plus-pro"),[{license_status:s}]=p(),[l,c]=(0,a.useState)(!1),u=(0,P.applyFilters)("cartflows.stepSettings.orderBumps",null);if(i||!u){const e=wcfCartflowsPro()&&"Activated"!==s;return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(GW,{title:(0,z.__)("Add Extra Revenue to Every Checkout Effortlessly","cartflows"),description:(0,z.__)("Increase the value of every order by offering relevant add-ons customers can buy at checkout in a single click.","cartflows"),onButtonClick:e?void 0:()=>c(!0)}),(0,a.createElement)(zh,{feature:"order-bump",open:l,setOpen:c}))}return null!==n&&r?(0,a.createElement)(u,{stepId:e,flowId:t,options:n,pageSettings:r,onDispatch:o}):(0,a.createElement)(U$,null)};function F$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25H12"}))}const Y$=w.forwardRef(F$),Z$=function(){return(0,a.createElement)("div",{className:"flex flex-col gap-5"},(0,a.createElement)("div",{className:"flex items-center justify-between py-1"},(0,a.createElement)(WO,{className:"w-40 h-4"}),(0,a.createElement)(WO,{className:"w-10 h-5 rounded-full"})),(0,a.createElement)(WO,{className:"w-full h-48 rounded-lg"}),(0,a.createElement)("div",{className:"flex gap-2"},(0,a.createElement)(WO,{className:"w-1/3 h-9 rounded-md"}),(0,a.createElement)(WO,{className:"w-1/3 h-9 rounded-md"}),(0,a.createElement)(WO,{className:"w-1/3 h-9 rounded-md"})),["w-32","w-40","w-28","w-36"].map((e,t)=>(0,a.createElement)("div",{key:t,className:"flex flex-col gap-2"},(0,a.createElement)(WO,{className:`${e} h-3.5`}),(0,a.createElement)(WO,{className:"w-full h-10 rounded-md"}))))},Q$=function(e){const[{page_settings:t,options:n}]=SU(),r=e=>{let t="";const r=e.name;if(r&&r.includes("[")){const o=r.split("["),a=[];for(let e=1;e<o.length;e++)a.push(o[e].split("]")[0]);const i=r.substr(0,r.indexOf("[")),s=n[i];if("wcf-pre-checkout-offer-product[original_price]"===r||"wcf-pre-checkout-offer-product[sell_price]"===r){const t=n["wcf-pre-checkout-offer-product"];if(""===t||null==t||t.length<=0)return(0,z.__)("No product Selected","cartflows");const o=Array.isArray(t)?parseFloat(t[0].original_price):parseFloat(t.original_price);if("wcf-pre-checkout-offer-product[original_price]"===r)return isNaN(o)?"":String(o);if("wcf-pre-checkout-offer-product[sell_price]"===r&&!isNaN(o)){const t=n["wcf-pre-checkout-offer-discount"],r=parseFloat(n["wcf-pre-checkout-offer-discount-value"]);let a=o;return"discount_percent"===t?r>0&&(a=(o-o*r/100).toFixed(2)):"discount_price"===t&&r>0&&(a=(o-r).toFixed(2)),e.class=a<0?"error_field":"",isNaN(parseFloat(a))?"":String(a)}}t=s[a[0]]}else t=n[e.name]?n[e.name]:"";return t};let o=[];switch(e.tab){case"product":default:o=t?.settings["checkout-offer-product"];break;case"content":o=t?.settings["checkout-offer-content"];break;case"styles":o=t?.settings["checkout-offer-styles"]}const i=function(t){return Object.keys(t.section_fields).map(o=>{const i=t.section_fields[o],s=r(i),l=dg.isActiveControl(i,n);return(0,a.createElement)(JZ,{key:o,data:i,value:s,isActive:l,field:o,tabName:e.tab?e.tab:"",displayAs:e.displayAs?e.displayAs:""})})};return(0,a.createElement)("div",{className:"wcf-list-options wcf-co-list-options"},(0,a.createElement)("div",{className:"wcf-co-options-wrapper",id:"wcf-co-options-wrapper"},o&&Object.keys(o.fields).map(t=>{const s=o.fields[t];return s.section_fields?(0,a.createElement)("div",{key:t,className:`wcf-${e.tab?e.tab:"setting"}-tab--${s.id}-section p-5 border border-border-subtle rounded-md mb-5`},(0,a.createElement)("div",{className:`wcf-${e.tab?e.tab:"setting"}-tab--heading-section col-span-full`},(0,a.createElement)(SZ,{label:s.title,labelClass:"block text-base font-semibold text-text-primary mb-5"})),e.displayAs&&"tr"===e.displayAs?(0,a.createElement)("table",{className:"w-full"},(0,a.createElement)("tbody",null,i(s))):(0,a.createElement)("div",{className:"wcf-co-list-options-container"},i(s))):(0,a.createElement)("div",{key:t,className:`wcf-${e.tab?e.tab:"setting"}-tab--section mb-5`},e.displayAs&&"tr"===e.displayAs?(0,a.createElement)("table",{className:"wcf-full"},(0,a.createElement)("tbody",null,(0,a.createElement)(JZ,{key:t,data:s,value:r(s),isActive:dg.isActiveControl(s,n),field:s,tabName:e.tab?e.tab:"",displayAs:e.displayAs?e.displayAs:""}))):(0,a.createElement)("div",{className:"wcf-co-list-options-container"},(0,a.createElement)(JZ,{key:t,data:s,value:r(s),isActive:dg.isActiveControl(s,n),field:s,tabName:e.tab?e.tab:"",displayAs:e.displayAs?e.displayAs:""})))})))};function V$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 3.75v4.5m0-4.5h4.5m-4.5 0L9 9M3.75 20.25v-4.5m0 4.5h4.5m-4.5 0L9 15M20.25 3.75h-4.5m4.5 0v4.5m0-4.5L15 9m5.25 11.25h-4.5m4.5 0v-4.5m0 4.5L15 15"}))}const W$=w.forwardRef(V$);function G$({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4.5M9 9H4.5M9 9 3.75 3.75M9 15v4.5M9 15H4.5M9 15l-5.25 5.25M15 9h4.5M15 9V4.5M15 9l5.25-5.25M15 15h4.5M15 15v4.5m0-4.5 5.25 5.25"}))}const H$=w.forwardRef(G$),$$=function(){const[{options:e}]=SU(),[t,n]=(0,a.useState)("");(0,a.useEffect)(()=>{const e=document.getElementById("wcf-checkout-offer-preview-wrapper"),t=e.offsetTop-25,n=window.addEventListener("scroll",()=>{window.pageYOffset>t?e.classList.add("sticky"):e.classList.remove("sticky")});return()=>{window.removeEventListener("scroll",n)}},[]);let r=e["wcf-pre-checkout-offer-product"];null!==r&&Array.isArray(r)&&(r=r[0]);const o=e["wcf-pre-checkout-offer-discount"],i=parseFloat(e["wcf-pre-checkout-offer-discount-value"]);let s="";const l=r?parseFloat(r.original_price).toFixed(2):0;"discount_percent"===o?i>0&&(s=(l-l*i/100).toFixed(2)):"discount_price"===o&&i>0&&(s=(l-i).toFixed(2));const c=r&&r.product_image?r.product_image:cartflows_admin.image_placeholder;return(0,a.createElement)("div",{id:"wcf-checkout-offer-preview-wrapper",className:"fullscreen"===t?"wcf-checkout-offer-preview-wrapper fullscreen":"wcf-checkout-offer-preview-wrapper"},(0,a.createElement)("div",{className:"fullscreen"===t?"p-6":"mt-8 bg-background-secondary p-6 -mx-6"},(0,a.createElement)("div",{className:"wcf-pre-checkout-offer--header flex justify-between items-center mb-5 p-2.5"},(0,a.createElement)(yp,{tag:"span",size:"md",className:"font-semibold text-text-primary"},(0,z.__)("Preview","cartflows")),""===t&&(0,a.createElement)("div",{className:"wcf-co-preview-mode wcf-full-screen-preview-button p-2.5 text-text-tertiary hover:text-text-secondary cursor-pointer",onClick:()=>n("fullscreen")},(0,a.createElement)(W$,{className:"w-5 h-5 stroke-2",title:(0,z.__)("View in Full Screen","cartflows")})),"fullscreen"===t&&(0,a.createElement)("div",{className:"wcf-co-preview-mode wcf-full-screen-preview-exit-button p-2.5 text-text-tertiary hover:text-text-secondary cursor-pointer",onClick:()=>n("")},(0,a.createElement)(H$,{className:"w-5 h-5 stroke-2",title:(0,z.__)("Exit Full Screen","cartflows")}))),(0,a.createElement)("div",{className:"wcf-pre-checkout-offer-wrapper wcf-pre-checkout-full-width"},(0,a.createElement)("div",{id:"wcf-pre-checkout-offer-modal",style:{backgroundColor:e["wcf-pre-checkout-offer-model-bg-color"]},className:"bg-background-primary border border-border-subtle rounded-md"},(0,a.createElement)("div",{className:"wcf-content-main-wrapper"},(0,a.createElement)("div",{className:"wcf-lightbox-content p-6",style:{backgroundColor:e["wcf-pre-checkout-offer-model-bg-color"]}},(0,a.createElement)("div",{className:"wcf-content-modal-progress-bar mb-8"},(0,a.createElement)("div",{className:"wcf-progress-bar-nav",style:{color:e["wcf-pre-checkout-offer-desc-color"]}},(0,a.createElement)("div",{className:"wcf-pre-checkout-progress grid grid-cols-3 text-center text-sm font-normal text-text-secondary max-w-2xl mx-auto"},(0,a.createElement)("div",{className:"wcf-nav-bar-step active"},(0,a.createElement)("div",{className:"wcf-nav-bar-title mb-3",style:{color:e["wcf-pre-checkout-offer-desc-color"]}},(0,z.__)("Order Submitted","cartflows")),(0,a.createElement)("div",{className:"wcf-nav-bar-step-line relative"},(0,a.createElement)("div",{className:"wcf-progress-nav-step",style:{backgroundColor:e["wcf-pre-checkout-offer-navbar-color"]}},(0,a.createElement)("span",{className:"before"})),(0,a.createElement)("span",{className:"order-after",style:{backgroundColor:e["wcf-pre-checkout-offer-navbar-color"]}}))),(0,a.createElement)("div",{className:"wcf-nav-bar-step active inprogress"},(0,a.createElement)("div",{className:"wcf-nav-bar-title mb-3",style:{color:e["wcf-pre-checkout-offer-desc-color"]}},(0,z.__)("Special Offer","cartflows")),(0,a.createElement)("div",{className:"wcf-nav-bar-step-line relative"},(0,a.createElement)("span",{className:"before",style:{backgroundColor:e["wcf-pre-checkout-offer-navbar-color"]}}),(0,a.createElement)("div",{className:"wcf-progress-nav-step",style:{backgroundColor:e["wcf-pre-checkout-offer-navbar-color"]}},(0,a.createElement)("span",{className:"before"})),(0,a.createElement)("span",{className:"after"}))),(0,a.createElement)("div",{className:"wcf-nav-bar-step"},(0,a.createElement)("div",{className:"wcf-nav-bar-title mb-3"},(0,z.__)("Order Receipt","cartflows")),(0,a.createElement)("div",{className:"wcf-nav-bar-step-line relative"},(0,a.createElement)("span",{className:"before"}),(0,a.createElement)("div",{className:"wcf-progress-nav-step"})))))),(0,a.createElement)("div",{className:"wcf-content-main-head text-center mb-8"},(0,a.createElement)("div",{className:"wcf-content-modal-title"},(0,a.createElement)("h1",{style:{color:e["wcf-pre-checkout-offer-title-color"]},className:"text-xl font-semibold text-text-primary mb-2.5"},e["wcf-pre-checkout-offer-popup-title"])),(0,a.createElement)("div",{className:"wcf-content-modal-sub-title"},(0,a.createElement)("span",{style:{color:e["wcf-pre-checkout-offer-subtitle-color"]},className:"text-sm font-normal text-600"},e["wcf-pre-checkout-offer-popup-sub-title"]))),(0,a.createElement)("div",{id:"wcf-pre-checkout-offer-content",className:"woocommerce border-2 border-border-subtle border-dashed rounded items-center",style:{backgroundColor:e["wcf-pre-checkout-offer-model-bg-color"]}},(0,a.createElement)("div",{className:"flex gap-4 p-5 items-center"},(0,a.createElement)("div",{className:"wcf-pre-checkout-info wcf-pre-checkout-img w-2/5"},(0,a.createElement)("img",{src:c,alt:"Checkout Offer Product",className:"border border-border-subtle max-w-full h-auto"})),(0,a.createElement)("div",{className:"wcf-pre-checkout-info wcf-pre-checkout-offer-product-details w-3/5"},(0,a.createElement)("div",{className:"wcf-pre-checkout-offer-product-title"},(0,a.createElement)("h1",{style:{color:e["wcf-pre-checkout-offer-title-color"]}},e["wcf-pre-checkout-offer-product-title"])),(0,a.createElement)("div",{className:"wcf-pre-checkout-offer-price",style:{color:e["wcf-pre-checkout-offer-desc-color"],fontWeight:500}},cartflows_admin.woo_currency,""!==s&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("del",{className:"wcf-regular-price"},isNaN(l)?0:l),(0,a.createElement)("span",{className:"wcf-discount-price"}," ",s)),""===s&&(0,a.createElement)("span",{className:"wcf-regular-price"},isNaN(l)?0:l)),(0,a.createElement)("div",{className:"wcf-pre-checkout-offer-desc"},(0,a.createElement)("span",{style:{color:e["wcf-pre-checkout-offer-desc-color"],lineHeight:"0"}},Vh((e["wcf-pre-checkout-offer-desc"]||"").toString()))),(0,a.createElement)("input",{type:"hidden",value:"add",className:"wcf-pre-checkout-offer-action"}))),(0,a.createElement)("div",{className:"wcf-pre-checkout-offer-actions flex flex-col gap-3 p-5"},(0,a.createElement)("div",{className:"wcf-pre-checkout-offer-btn-action wcf-pre-checkout-add-cart-btn"},(0,a.createElement)("button",{className:"wcf-pre-checkout-offer-btn alt !w-full text-base !bg-brand-500 !rounded !text-text-on-color !font-semibold px-4 py-3 !text-center",style:{backgroundColor:e["wcf-pre-checkout-offer-button-color"],borderColor:e["wcf-pre-checkout-offer-button-color"]}},e["wcf-pre-checkout-offer-popup-btn-text"])),(0,a.createElement)("div",{className:"wcf-pre-checkout-offer-btn-action wcf-pre-checkout-skip-btn text-center"},(0,a.createElement)("a",{className:"wcf-pre-checkout-skip text-text-tertiary",href:"#",style:{color:e["wcf-pre-checkout-offer-desc-color"]}},e["wcf-pre-checkout-offer-popup-skip-btn-text"]))))))))))},X$=function(){const[{settings_data:e,options:t}]=SU(),[n,r]=(0,a.useState)("product"),o=BV();if(!wcfCartflowsPro())return(0,a.createElement)(jZ,{feature:"Checkout Offer",plan_required:"starter"});if(void 0===e.settings)return(0,a.createElement)(Z$,null);const i="yes"===t["wcf-pre-checkout-offer"];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(nQ,{name:"wcf-pre-checkout-offer",value:t["wcf-pre-checkout-offer"],label:(0,z.__)("Enable Checkout Offer","cartflows"),fullWidth:!0}),i&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-co-preview"},(0,a.createElement)($$,null)),(0,a.createElement)("div",{className:"mt-8 mb-8"},(0,a.createElement)(vQ.Group,{variant:"rounded",size:"sm",width:"full",activeItem:n,onChange:({value:e})=>async function(e){e!==n?(await async function(){return!!window.wcfUnsavedChanges&&await o({title:(0,z.__)("Save Changes","cartflows"),description:(0,z.__)("You have made changes. Do you want to save the changes?","cartflows"),actionBtnText:(0,z.__)("Save","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")})}()||r(e),window.wcfUnsavedChanges=!1):r(e)}(e.slug)},(0,a.createElement)(vQ.Tab,{slug:"product",text:(0,z.__)("Product","cartflows"),icon:(0,a.createElement)(y$,{className:"w-4 h-4"})}),(0,a.createElement)(vQ.Tab,{slug:"content",text:(0,z.__)("Content","cartflows"),icon:(0,a.createElement)(Y$,{className:"w-4 h-4"})}),(0,a.createElement)(vQ.Tab,{slug:"styles",text:(0,z.__)("Styles","cartflows"),icon:(0,a.createElement)(_$,{className:"w-4 h-4"})}))),(0,a.createElement)("div",{className:"wcf-checkout-offer-settings wcf-checkout__section"},(0,a.createElement)(Q$,{tab:n,displayAs:"div"}))))},q$=function(){return(0,a.createElement)("div",{className:"wcf-checkout-rules-page"},(0,a.createElement)("div",{className:"wcf-checkout-rules-page--enable_option"},(0,a.createElement)(yG,{width:"65%"})),(0,a.createElement)("div",{className:"wcf-checkout-rules--group_wrapper"},(0,a.createElement)("div",{className:"wcf-checkout-rules--text"},(0,a.createElement)(yG,{width:"10%"}),(0,a.createElement)(bG,{width:"25%",height:"35px"}),(0,a.createElement)(yG,{width:"20%"})),(0,a.createElement)("div",{className:"wcf-checkout-rules"},Array(3).fill().map((e,t)=>(0,a.createElement)("div",{className:"wcf-checkout-rule",key:t},(0,a.createElement)("div",{className:"wcf-checkout-rule--select-box"},(0,a.createElement)(bG,{height:"35px",width:"30%"}),(0,a.createElement)(bG,{height:"35px",width:"30%"}),(0,a.createElement)(bG,{height:"35px",width:"30%"})),2!==t&&(0,a.createElement)("div",{className:"wcf-checkout-rule__and"},(0,a.createElement)(bG,{height:"25px",width:"5%"}))))),(0,a.createElement)(bG,{height:"40px",width:"9%"})),(0,a.createElement)("div",{className:"wcf-checkout-rules--or"},(0,a.createElement)(bG,{height:"35px",width:"5%"}),(0,a.createElement)(bG,{height:"45px",width:"12%"})),(0,a.createElement)("div",{className:"wcf-checkout-rules--default-step"},(0,a.createElement)(yG,{width:"10%"}),(0,a.createElement)(bG,{width:"25%",height:"35px"}),(0,a.createElement)(yG,{width:"20%"})))},J$=function(){return(0,a.createElement)(GW,{title:(0,z.__)("Show Every Customer the Offer They’ll Actually Buy","cartflows"),description:(0,z.__)("Target offers by location, cart value, and more. Upgrade to CartFlows Pro and turn every visit into a personalized sale.","cartflows")})},K$=function(){const[{step_data:e,step_id:t,flow_id:n,options:r,page_settings:o},i]=SU(),[{license_status:s}]=p(),l=(0,P.applyFilters)("cartflows.stepSettings.dynamicOffers",null);return wcfCartflowsPro()&&"Activated"===s&&l?null===r?(0,a.createElement)(q$,null):(0,a.createElement)(l,{stepId:t,flowId:n,options:r,stepData:e,pageSettings:o,onDispatch:i}):(0,a.createElement)(J$,null)},eX=function(e){const{innerField:t,innerFieldData:n}=e,[{options:r}]=SU();return(0,a.createElement)("div",{className:"wcf-field-item--fields-settings__wrapper bg-white hidden p-5 border border-solid border-border-subtle my-5 rounded-md shadow-sm",id:`wcf-field-setting-${t}`},n&&Object.keys(n.field_options).map(e=>{const t=n.field_options[e];let o="";const i=function(e){const t=e.name;let n="";if(t.includes("[")){const e=t.split("["),o=[];for(let t=1;t<e.length;t++)o.push(e[t].split("]")[0]);const a=t.substr(0,t.indexOf("["));switch(o.length){case 2:n=r[a][o[0]][o[1]];break;case 3:n=r[a][o[0]][o[1]][o[2]];break;case 4:n=r[a][o[0]][o[1]][o[2]][o[3]];break;default:n=r[a][o[0]]}}else n=r[e.name]?r[e.name]:e.value;return n}(t);switch(t.type){case"text":o=(0,a.createElement)(CL,{name:t.name,value:i,label:t.label,placeholder:t.placeholder,readonly:t.readonly,tooltip:t.tooltip,displayAlign:"vertical"});break;case"number":o=(0,a.createElement)(nB,{name:t.name,value:i,label:t.label,readonly:t.readonly,tooltip:t.tooltip,displayAlign:"vertical",min:t.min});break;case"checkbox":o=(0,a.createElement)(XO,{class:t.class,name:t.name,value:i,label:t.label,desc:t.desc,child_className:t.child_class});break;case"select":o=(0,a.createElement)(DL,{class:t.class,name:t.name,value:i,label:t.label,options:t.options,tooltip:t.tooltip,displayAlign:"vertical"});break;case"doc":o=(0,a.createElement)(IZ,{content:t.content})}return(0,a.createElement)("div",{key:t.name,className:`wcf-cfe-field-setting__panel wcf-cfe-field-${e} mb-5 ${"enable-field"===e||"required-field"===e?"hidden":""}`},o)}))},tX=function(e){const[{billing_fields:t,shipping_fields:n},r]=SU(),{step:o,type:i,removeCallback:s}=e,[l,c]=(0,a.useState)(""),[u,d]=(0,a.useState)("");let f=[];f="billing"===i?t:n;const p=function(e){const t=e.currentTarget.getAttribute("data-name"),n=document.getElementById(`wcf-field-setting-${t}`);n&&(n.classList.contains("hidden")?(n.classList.remove("hidden"),c(t)):(n.classList.add("hidden"),c("")))},m=function(e){s(e,d)},h=({name:e,value:o,fieldName:a})=>{const s=("billing"===i?t:n).map(t=>t.field_options[a].name===e?{...t,field_options:{...t.field_options,[a]:{...t.field_options[a],value:o}}}:t);r({type:"SET_FIELDS",field_type:i,fields:s})};return(0,a.createElement)("div",{className:"py-5"},(0,a.createElement)("div",{className:`wcf-${i}-fields--header flex items-center p-3 gap-4 bg-background-secondary rounded-md`},(0,a.createElement)("div",{className:"w-3/12 pl-7"},(0,z.__)("Label","cartflows")),(0,a.createElement)("div",{className:"w-3/12"},(0,z.__)("ID","cartflows")),(0,a.createElement)("div",{className:"w-1/5 text-center"},(0,z.__)("Enable","cartflows")),(0,a.createElement)("div",{className:"w-1/5 text-center"},(0,z.__)("Required","cartflows")),(0,a.createElement)("div",{className:"w-1/12 text-center"},(0,z.__)("Edit","cartflows"))),(0,a.createElement)(MU.ReactSortable,{list:[...f],setList:e=>r({type:"SET_FIELDS",field_type:i,fields:e}),direction:"vertical",animation:150,handle:".wcf-field-item-handle",filter:".wcf-field-settings-icon, .wcf-toggle-field"},f&&f.map(e=>{const t=e.key,n=e.field_options["enable-field"],r=e.field_options["required-field"];return(0,a.createElement)("div",{key:t,className:"wcf-field-item-handle "+("yes"!==n.value?"!text-text-tertiary":""),"data-key":t},(0,a.createElement)("div",{className:"wcf-fields-wrapper flex items-center p-3 border-0 border-b border-solid border-border-subtle gap-4"},(0,a.createElement)("div",{className:"wcf-field--label whitespace-nowrap w-3/12 flex items-center mr-auto"},(0,a.createElement)("div",{className:"wcf-cpf--sortable-toggle flex cursor-move text-text-tertiary"},(0,a.createElement)(LU,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}),(0,a.createElement)(LU,{className:"w-5 h-5 stroke-1 -ml-3.5","aria-hidden":"true"})),(0,a.createElement)("span",{className:"w-44 text-ellipsis overflow-hidden cursor-default text-sm text-text-secondary"},e.label?e.label:e.placeholder," "),("billing_email"===t||"shipping_email"===t)&&"checkout"===o&&(0,a.createElement)(ea,{content:(0,z.__)("Your email address can't be edited when using the Modern Checkout Style.","cartflows"),placement:"top"},(0,a.createElement)("span",null,(0,a.createElement)(FU,{className:"w-4 h-4 text-icon-secondary cursor-help ml-1"}))),"billing_company"===t&&"checkout"===o&&(0,a.createElement)(ea,{content:(0,z.__)("The Company field won't be visible if you're using the Instant Layout Style.","cartflows"),placement:"top"},(0,a.createElement)("span",null,(0,a.createElement)(FU,{className:"w-4 h-4 text-icon-secondary cursor-help ml-1"})))),(0,a.createElement)("div",{className:"wcf-field--key whitespace-nowrap w-3/12 text-ellipsis overflow-hidden mr-auto cursor-default"},e.key),(0,a.createElement)("div",{className:"wcf-field--is-enable w-1/5 wcf-toggle-field flex justify-center"},(0,a.createElement)(nL,{value:"yes"===n.value,onChange:e=>h({name:n.name,value:e?"yes":"no",fieldName:"enable-field"})}),(0,a.createElement)("input",{type:"hidden",name:n.name,value:n.value})),(0,a.createElement)("div",{className:"wcf-field--is-required w-1/5 wcf-toggle-field flex justify-center"},(0,a.createElement)(nL,{value:"yes"===n.value&&"yes"===r.value,onChange:e=>h({name:r.name,value:e?"yes":"no",fieldName:"required-field"}),disabled:"yes"!==n.value}),(0,a.createElement)("input",{type:"hidden",name:r.name,value:"yes"!==n.value?"no":r.value})),(0,a.createElement)("div",{className:"wcf-field-settings-icon flex gap-2 w-1/12 justify-center items-center"},(0,a.createElement)("div",{onClick:p,"data-name":t},(0,a.createElement)(PU,{className:"w-4 h-4 cursor-pointer "+(l===t?"text-brand-500":"text-text-tertiary hover:text-brand-500"),"data-name":t})),e.custom&&(0,a.createElement)("div",{"data-key":t,"data-type":i,onClick:m},t===u?(0,a.createElement)(Op,{className:"wcf-delete-cpf--button-processing p-1 h-4 w-4 text-brand-500 pointer-events-none animate-spin","data-key":t,"data-type":i}):(0,a.createElement)(UU,{className:"wcf-delete-cpf--button-delete p-1 h-4 w-4 text-brand-500 cursor-pointer","data-key":t,"data-type":i})))),(0,a.createElement)(eX,{innerField:t,innerFieldData:e,removecustomField:m,type:i}))})))},nX={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},rX=({children:e,className:t,ariaLabel:n})=>{const{open:r,position:o,handleClose:a,transitionDuration:i,getFloatingProps:s,drawerContainerRef:l,scrollLock:c,context:u,className:d,refs:f,titleId:p,descriptionId:m,hasTitleRef:h,hasDescriptionRef:g}=mX();return u&&s?(0,R.jsx)(Wp,{children:r&&(0,R.jsx)(uo,{ref:l,lockScroll:c,className:Le("z-50",d),children:(0,R.jsx)(so,{context:u,modal:!0,...f?.reference&&{returnFocus:f.reference},children:(0,R.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,R.jsx)("div",{className:"relative inset-0 h-full flex items-center",children:(0,R.jsx)("div",{className:Le("flex items-center justify-center h-full w-full",{"justify-start":"left"===o,"justify-end":"right"===o}),children:(0,R.jsx)(op.div,{className:Le("flex flex-col w-120 h-full bg-background-primary shadow-2xl overflow-hidden z-20",t),initial:"exit",animate:"open",exit:"exit",variants:nX[o],transition:i,ref:e=>{setTimeout(()=>{f?.setFloating(e)},1e3*((i?.duration||.3)+.1))},"aria-label":h?.current?void 0:n,"aria-labelledby":h?.current?p:void 0,"aria-describedby":g?.current?m:void 0,role:"dialog","aria-modal":"true",...s?.(),children:"function"==typeof e?e({close:a}):e})})})})})})}):null};rX.displayName="Drawer.Panel";const oX=({children:e,className:t,...n})=>(0,R.jsx)("div",{className:Le("space-y-2 px-5 pt-5 pb-4",t),...n,children:e});oX.displayName="Drawer.Header";const aX=({children:e,as:t="h3",className:n,...r})=>{const{titleId:o,hasTitleRef:a}=mX();return(0,w.useEffect)(()=>(a&&(a.current=!0),()=>{a&&(a.current=!1)}),[a]),(0,R.jsx)(t,{id:o,className:Le("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e})};aX.displayName="Drawer.Title";const iX=({children:e,as:t="p",className:n,...r})=>{const{descriptionId:o,hasDescriptionRef:a}=mX();return(0,w.useEffect)(()=>(a&&(a.current=!0),()=>{a&&(a.current=!1)}),[a]),(0,R.jsx)(t,{id:o,className:Le("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e})};iX.displayName="Drawer.Description";const sX=({children:e,className:t,...n})=>(0,R.jsx)("div",{className:Le("px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...n,children:e});sX.displayName="Drawer.Body";const lX=({children:e,className:t})=>{const{design:n,handleClose:r}=mX();return(0,R.jsx)("div",{className:Le("px-5 py-4 flex justify-end gap-3 mt-auto",{"bg-background-secondary":"footer-divided"===n,"border-t border-b-0 border-x-0 border-solid border-border-subtle":"footer-bordered"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};lX.displayName="Drawer.Footer";const cX=({className:e,...t})=>(0,R.jsx)("button",{className:Le("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-border-strong outline-none shadow-none",e),"aria-label":"Close drawer",...t,children:(0,R.jsx)(ta,{className:"size-4 text-text-primary shrink-0"})}),uX=({children:e,as:t=w.Fragment,...n})=>{const{handleClose:r}=mX();return e?t===w.Fragment?"function"==typeof e?e({close:r}):(0,w.isValidElement)(e)?(0,w.cloneElement)(e,{onClick:r}):(0,R.jsx)(cX,{onClick:r,...n}):(0,R.jsx)(t,{...n,onClick:r,children:e}):(0,R.jsx)(cX,{onClick:r,...n})};uX.displayName="Drawer.CloseButton";const dX={open:{opacity:1},exit:{opacity:0}},fX=({className:e,...t})=>{const{open:n,drawerContainerRef:r,transitionDuration:o}=mX(),[a,i]=(0,w.useState)(null);(0,w.useEffect)(()=>{r?.current&&i(r.current)},[n,r]);const s=(0,R.jsx)(Wp,{mode:"wait",children:n&&(0,w.createElement)(op.div,{className:Le("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:dX,transition:o,key:"backdrop"})});return a?(0,bn.createPortal)(s,a):s};fX.displayName="Drawer.Backdrop";const pX=(0,w.createContext)({}),mX=()=>(0,w.useContext)(pX),hX=({open:e,setOpen:t,children:n,trigger:r,className:o,exitOnClickOutside:a=!1,exitOnEsc:i=!0,design:s="simple",position:l="right",transitionDuration:c=.2,scrollLock:u=!0})=>{const d=void 0!==e&&void 0!==t,[f,p]=(0,w.useState)(!1),m=(0,w.useRef)(null),h=(0,w.useId)(),g=`${h}-title`,y=`${h}-description`,b=(0,w.useRef)(!1),v=(0,w.useRef)(!1),x=(0,w.useMemo)(()=>d?e:f,[e,f,d]),N=(0,w.useMemo)(()=>d?t:p,[t,p,d]),E=()=>{x||N(!0)},{refs:M,context:_}=bo({open:x,onOpenChange:N,transform:!1}),I=wo(_,{enabled:i||a,escapeKey:i,outsidePress:e=>!!a&&!e?.target?.closest("ul.fui-toast-container")}),S=Co(_,{role:"dialog"}),j=mo(_),{getFloatingProps:k}=Eo([I,S,j]),D=(0,w.useCallback)(()=>(0,w.isValidElement)(r)?(0,w.cloneElement)(r,{onClick:ze(E,r.props.onClick),ref:M.setReference,"aria-haspopup":"dialog","aria-expanded":x}):"function"==typeof r?r({onClick:E,"aria-haspopup":"dialog","aria-expanded":x}):null,[r,E,M.setReference]);return(0,R.jsxs)(R.Fragment,{children:[D(),(0,R.jsx)(pX.Provider,{value:{open:x,setOpen:N,handleClose:()=>{x&&N(!1)},design:s,position:l,drawerContainerRef:m,transitionDuration:{duration:c},getFloatingProps:k,scrollLock:u,context:_,className:o,refs:M,titleId:g,descriptionId:y,hasTitleRef:b,hasDescriptionRef:v},children:n})]})};hX.displayName="Drawer",hX.Panel=rX,hX.Header=oX,hX.Title=aX,hX.Description=iX,hX.Body=sX,hX.CloseButton=uX,hX.Footer=lX,hX.Backdrop=fX,hX.Portal=({children:e,...t})=>(0,R.jsx)(Kr,{...t,children:e});const gX=function(e){const{addNewField:t,step_type:n}=e,r=(0,z.__)("Add New Field","cartflows"),o=(0,z.__)("Date & Time","cartflows"),[i,s]=(0,a.useState)(!1),[l,c]=(0,a.useState)(!1),[u,d]=(0,a.useState)(r),[f,p]=(0,a.useState)(),m=function(){s(!1),c(!1),w(!1),d(r)},[h,g]=(0,a.useState)(!1),[y,w]=(0,a.useState)(!1),[b,v]=(0,a.useState)(!0),[x,N]=(0,a.useState)(!1),[E,M]=(0,a.useState)(!1),[_,I]=(0,a.useState)(!1),[S,j]=(0,a.useState)("datetime-local"),[k,D]=(0,a.useState)(o),C=function(){w(!y)},[A,T]=(0,a.useState)(!1),O=function(){const e=document.getElementById("wcf-checkout-custom-fields[0][type]").value;N(!1),M(!1),I(!1),v(!1),T(!1),"text"===e||"textarea"===e?v(!0):"select"===e?I(!0):"checkbox"===e?N(!0):"radio"===e?M(!0):"file"===e&&T(!0),g(e)},L=function(e){let t=e.replace(/[^a-zA-Z\d ]/g," ");t=t.replace(/\s/g,"_").toLowerCase(),p(t)},P=function(e){j(e.target.value),"datetime-local"===e.target.value?D(o):D(e.target.value)},R=function(){let e="";if("datetime"!==h)return e;switch(S){case"date":e="yyyy-mm-dd";break;case"time":e="hh:mm";break;case"datetime-local":e="yyyy-mm-dd hh.mm";break;default:e=""}return e};return(0,a.createElement)("div",{className:"wcf-custom-field-box"},(0,a.createElement)("div",{className:"flex justify-end"},(0,a.createElement)(Wo,{variant:"outline",size:"md",className:"wcf-add-custom-field text-brand-500 bg-brand-50 outline-brand-500",onClick:function(e){e.preventDefault(),p(""),s(!i)},icon:(0,a.createElement)(QU,{className:"h-18 w-18 text-brand-500"}),iconPosition:"left"},(0,z.__)("Add Custom Field","cartflows"))),(0,a.createElement)(hX,{open:i,setOpen:e=>{e||m()},position:"right",exitOnClickOutside:!1,className:"wcf-add-custom-field-drawer z-999999"},(0,a.createElement)(hX.Panel,{className:"pointer-events-auto w-screen max-w-xl flex flex-col h-full"},(0,a.createElement)(hX.Backdrop,null),(0,a.createElement)(hX.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(hX.Title,null,(0,z.__)("Add Custom Field","cartflows")),(0,a.createElement)(hX.CloseButton,{type:"button"})),(0,a.createElement)(hX.Body,{className:"wcf-cfe-content flex-1 overflow-y-auto"},function(){const e=[{value:"billing",label:(0,z.__)("Billing","cartflows")},{value:"shipping",label:(0,z.__)("Shipping","cartflows")}],t=[{value:"text",label:(0,z.__)("Text","cartflows")},{value:"textarea",label:(0,z.__)("TextArea","cartflows")},{value:"number",label:(0,z.__)("Number","cartflows")},{value:"datetime",label:(0,z.__)("Date & Time","cartflows")},{value:"checkbox",label:(0,z.__)("Checkbox","cartflows")},{value:"radio",label:(0,z.__)("Radio","cartflows")},{value:"select",label:(0,z.__)("Select","cartflows")},{value:"hidden",label:(0,z.__)("Hidden","cartflows")},{value:"file",label:(0,z.__)("File","cartflows")}],r=[{value:"33",label:(0,z.__)("33%","cartflows")},{value:"50",label:(0,z.__)("50%","cartflows")},{value:"100",label:(0,z.__)("100%","cartflows")}],o="w-full max-wi-full input-field !text-sm font-normal !rounded-md text-text-tertiary !border-border-subtle focus:ring focus:!ring-brand-100 focus:!border-brand-500 focus:!shadow-none !outline-0 !outline-none !m-0";return(0,a.createElement)("div",{className:"wcf-custom-field-form--wrapper text-left"},"checkout"===n&&(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(DL,{class:"wcf-cpf-add_to",name:"wcf-checkout-custom-fields[0][add_to]",options:e,label:(0,z.__)("Add To","cartflows"),displayAlign:"vertical"})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(DL,{class:"wcf-cpf-type",id:"wcf-checkout-custom-fields[0][type]",name:"wcf-checkout-custom-fields[0][type]",options:t,label:(0,z.__)("Type","cartflows"),onSelect:O,displayAlign:"vertical"})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(CL,{class:`wcf-cpf-label ${o}`,name:"wcf-checkout-custom-fields[0][label]",label:Vh((0,z.sprintf)(/* translators: %$s is replaced with the HTML tag */ /* translators: %$s is replaced with the HTML tag */ |
| 49 |
(0,z.__)("Label %1$s*%2$s","cartflows"),'<span class="text-brand-300">',"</span>")),onChangeCB:L,displayAlign:"vertical",placeholder:(0,z.__)("e.g. Phone Number","cartflows")})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(CL,{class:`wcf-cpf-name ${o}`,name:"wcf-checkout-custom-fields[0][key]",value:f,label:(0,z.__)("Field ID","cartflows"),displayAlign:"vertical",placeholder:(0,z.__)("e.g. phone_number","cartflows")}),(0,a.createElement)(Ch,{as:"span",className:"text-sm font-normal text-text-tertiary mt-2 block"},(0,z.__)('Field value will store in this meta key. Add field id without prefix like "billing_" or "shipping_". Use "_" instead of spaces.',"cartflows"))),"number"===h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(nB,{class:`wcf-cpf-min ${o}`,name:"wcf-checkout-custom-fields[0][min]",label:(0,z.__)("Min Value","cartflows"),displayAlign:"vertical",min:0,placeholder:(0,z.__)("e.g. 0","cartflows")})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(nB,{class:`wcf-cpf-max ${o}`,name:"wcf-checkout-custom-fields[0][max]",label:(0,z.__)("Max Value","cartflows"),displayAlign:"vertical",min:0,placeholder:(0,z.__)("e.g. 100","cartflows")}))),(_||E)&&(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(OL,{class:`wcf-cpf-options ${o}`,name:"wcf-checkout-custom-fields[0][options]",label:(0,z.__)("Options","cartflows"),placeholder:(0,z.__)("Enter your options separated by (|).","cartflows"),displayAlign:"vertical"})),x&&(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(DL,{class:"wcf-cpf-default",name:"wcf-checkout-custom-fields[0][default]",label:(0,z.__)("Default","cartflows"),options:[{value:"1",label:(0,z.__)("Checked","cartflows")},{value:"0",label:(0,z.__)("UnChecked","cartflows")}],displayAlign:"vertical"})),"datetime"===h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(DL,{class:`wcf-cpf-date-input ${o}`,name:"wcf-checkout-custom-fields[0][date_input]",label:(0,z.__)("Field Input Type","cartflows"),options:[{label:(0,z.__)("Date & Time","cartflows"),value:"datetime-local"},{label:(0,z.__)("Date","cartflows"),value:"date"},{label:(0,z.__)("Time","cartflows"),value:"time"}],displayAlign:"vertical",value:S,onSelect:P})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(CL,{class:`wcf-cpf-min-date ${o}`,labelClass:"text-sm font-medium text-left capitalize",textFieldType:S,name:"wcf-checkout-custom-fields[0][default]",label:(0,z.__)("Min ","cartflows")+k,displayAlign:"vertical",placeholder:R()})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(CL,{class:`wcf-cpf-max-date ${o}`,labelClass:"text-sm font-medium text-left capitalize",textFieldType:S,name:"wcf-checkout-custom-fields[0][default]",label:(0,z.__)("Max ","cartflows")+k,displayAlign:"vertical",placeholder:R()}))),!x&&!A&&(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(CL,{class:`wcf-cpf-default ${o}`,textFieldType:"datetime"===h&&S?S:"text",name:"wcf-checkout-custom-fields[0][default]",label:(0,z.__)("Default","cartflows"),displayAlign:"vertical",placeholder:R()||(0,z.__)("e.g. Default value","cartflows")})),b&&!A&&(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(CL,{class:`wcf-cpf-placeholder ${o}`,name:"wcf-checkout-custom-fields[0][placeholder]",label:(0,z.__)("Placeholder","cartflows"),displayAlign:"vertical",placeholder:(0,z.__)("e.g. Enter your phone number","cartflows")})),"file"===h&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(nB,{class:`wcf-cpf-file-size ${o}`,name:"wcf-checkout-custom-fields[0][file_size]",label:(0,z.__)("File Size (MB)","cartflows"),tooltip:(0,z.__)("Enter the maximum allowed file size. Default is 5MB.","cartflows"),displayAlign:"vertical",min:0,placeholder:(0,z.__)("e.g. 5","cartflows")})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(CL,{class:`wcf-cpf-accepted-file-types ${o}`,textFieldType:"text",name:"wcf-checkout-custom-fields[0][accepted_file_types]",label:(0,z.__)("Accepted File Types","cartflows"),tooltip:(0,z.__)("Enter comma-separated file extensions (e.g. jpg, png, gif)","cartflows"),displayAlign:"vertical",placeholder:(0,z.__)("e.g. jpg, png, gif","cartflows")}))),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(DL,{class:"wcf-cpf-width",name:"wcf-checkout-custom-fields[0][width]",options:r,value:"100",label:(0,z.__)("Width","cartflows"),displayAlign:"vertical"})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(XO,{class:"wcf-cpf-show-in-email",name:"wcf-checkout-custom-fields[0][show_in_email]",label:(0,z.__)("Show in Email","cartflows")})),(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(XO,{class:"wcf-cpf-required",name:"wcf-checkout-custom-fields[0][required]",label:(0,z.__)("Required","cartflows"),onClick:C})),!y&&"optin"!==n&&(0,a.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,a.createElement)(XO,{class:"wcf-cpf-optimized",name:"wcf-checkout-custom-fields[0][optimized]",label:(0,z.__)("Collapsible","cartflows")})))}()),(0,a.createElement)(hX.Footer,{className:"flex gap-3 justify-end"},(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:function(e){e.preventDefault(),s(!1)}},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:function(e){e.preventDefault(),d((0,z.__)("Adding…","cartflows")),c(!0),l||t(e,m,d)||c(!1)}},u)))))},yX=function(){return(0,a.createElement)("div",{className:"wcf-custom-field-editor is-placeholder"},(0,a.createElement)("div",{className:"wcf-custom-field-editor__content"},(0,a.createElement)("div",{className:"wcf-custom-field-editor__title"},(0,a.createElement)("div",{className:"title"})),(0,a.createElement)("form",null,(0,a.createElement)("table",null,(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("div",{className:"checkbox-title"})))),(0,a.createElement)("div",{className:"wcf-optin-fields-section-section"},(0,a.createElement)("div",{className:"wcf-custom-field-editor-title-section"},(0,a.createElement)("div",{className:"title"})),(0,a.createElement)("div",{className:"wcf-optin-fields"},(0,a.createElement)("div",{className:"title"}),(0,a.createElement)("div",{className:"title"}),(0,a.createElement)("div",{className:"title"}))),(0,a.createElement)("div",{className:"wcf-field wcf-submit"},(0,a.createElement)("div",{className:"wcf-optin-form-field__button"})))))},wX=function(){const[{custom_fields:e,step_id:t,options:n,billing_fields:r},o]=SU();if(void 0===e)return(0,a.createElement)(yX,null);const i=e.extra_fields,s=(0,P.applyFilters)("cartflows.stepSettings.optinFieldActions",null),l=s?s({stepId:t,dispatch:o,toast:Vm,billingFields:r,options:n}):null,c=l?l.removeField:e=>e.preventDefault();return(0,a.createElement)("div",{className:"wcf-custom-field-editor"},(0,a.createElement)("div",{className:"wcf-custom-field-editor__content"},(0,a.createElement)("h3",{className:"wcf-custom-field-editor__title hidden relative justify-between items-center w-full py-4 px-8 text-base font-semibold text-text-primary text-left transition focus:outline-none"},(0,z.__)("Field Editor","cartflows")),(0,a.createElement)("div",{className:"wcf-optin-fields--enable_option px-8 py-4 -mx-6 pt-0"},i&&Object.keys(i.fields).map(e=>{const t=i.fields[e],r=n[t.name]?n[t.name]:"";return(0,a.createElement)("div",{key:e,className:"w-full"},(0,a.createElement)(nQ,{name:t.name,value:r,label:t.label,desc:t.desc,fullWidth:!0}))})),"yes"===n["wcf-optin-enable-custom-fields"]&&(0,a.createElement)("div",{className:"wcf-optin-fields-section-section"},(0,a.createElement)("div",{id:"wcf-optin-fields",className:"billing-field-sortable wcf-field-row"},(0,a.createElement)(tX,{data:r,step:"optin",type:"billing",removeCallback:c})),(0,a.createElement)("div",{className:"wcf-custom-field-editor-title-section"},l&&(0,a.createElement)("div",{className:"wcf-custom-field-editor-buttons"},(0,a.createElement)(gX,{addNewField:l.addNewField,step_type:"optin"}))))))},bX=function({title:e,children:t,defaultOpen:n=!0,badge:r,className:o=""}){return(0,a.createElement)("div",{className:`-mx-8 border-b border-border-subtle last:border-b-0 ${o}`.trim()},(0,a.createElement)(DW,{type:"simple",defaultValue:n?"section":[],autoClose:!1},(0,a.createElement)(DW.Item,{value:"section"},(0,a.createElement)(DW.Trigger,{iconType:"arrow",className:"px-8 py-4"},(0,a.createElement)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-primary"},e,r&&r)),(0,a.createElement)(DW.Content,{className:"px-8 pb-8 pt-0"},t))))},vX=function(e){const[{license_status:t}]=p(),n=e.btnText||(0,z.__)("Upgrade to CartFlows Pro","cartflows"),r=function(r){return(0,a.createElement)(bX,{title:r.title,badge:(0,a.createElement)(na,{label:(0,z.__)("PRO","cartflows"),size:"xs",variant:"primary"}),defaultOpen:!1},(0,a.createElement)("div",{className:"p-5 border border-border-subtle rounded-lg bg-brand-25"},(0,a.createElement)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between"},(0,a.createElement)("div",null,(0,a.createElement)("p",{className:"text-sm font-medium text-text-primary mb-1"},r.noticeTitle),(0,a.createElement)("p",{className:"text-sm font-normal text-text-secondary"},r.noticeDesc)),(0,a.createElement)("div",{className:"flex items-center gap-4 shrink-0"},function(){const r=cartflows_admin.cf_pro_status;return wcfCartflowsTypePro()||"inactive"!==r||"pro"!==wcfInactivepluginType()?wcfCartflowsTypePlusPro()?"Activated"!==t?(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Jm,{title:(0,z.__)("Activate the License","cartflows")}))):void 0:wcfInactiveProPlus()?(0,a.createElement)(Hm,null):(0,a.createElement)($m,{buttonLink:e.buttonLink,title:n,buttonStyle:"secondary"}):(0,a.createElement)(Hm,null)}()))))};return(0,a.createElement)(a.Fragment,null,r({title:(0,z.__)("Auto Apply Coupon","cartflows"),noticeTitle:(0,z.__)("Apply Discounts Automatically and Convert More Customers","cartflows"),noticeDesc:(0,z.__)("Remove friction at checkout — discounts activate the moment customers arrive. Upgrade to Pro and watch conversions climb immediately.","cartflows")}),r({title:(0,z.__)("Product Options","cartflows"),noticeTitle:(0,z.__)("Let Customers Choose Exactly What They Want","cartflows"),noticeDesc:(0,z.__)("Offer flexible product options right at checkout — quantities, variations, and more. Upgrade to CartFlows Pro and start customizing your offers today.","cartflows")}))},xX=function(){const[{step_data:e,settings_data:t,page_settings:n,options:r}]=SU(),[{license_status:o}]=p(),i=n;if(void 0===t.settings)return(0,a.createElement)(P$,null);const s=r["wcf-checkout-products"];return(0,a.createElement)("div",{className:"wcf-checkout-products"},(0,a.createElement)(bX,{title:i.settings.product.title,defaultOpen:!0},(0,a.createElement)(S$,{settings:i.settings.product})),"checkout"===e.type&&(!wcfCartflowsPro()||"Activated"!==o)&&(0,a.createElement)(vX,null),"checkout"===e.type&&wcfCartflowsPro()&&"Activated"===o&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(bX,{title:i.settings.coupon.title},(0,a.createElement)(S$,{settings:i.settings.coupon})),s&&(0,a.createElement)(bX,{title:i.settings["product-options"].title},(0,a.createElement)(S$,{settings:i.settings["product-options"]}))))},NX=function(){const[{settings_data:e,page_settings:t,options:n},r]=SU(),o=n["wcf-optin-product"]?n["wcf-optin-product"]:[],[i,s]=(0,a.useState)(),[l,c]=(0,a.useState)(""),[u,d]=(0,a.useState)(!1),f=(0,z.__)("Add","cartflows"),[p,m]=(0,a.useState)({isInProcessing:!1,buttonText:f}),{isInProcessing:h,buttonText:g}=p;return void 0===e.settings?(0,a.createElement)(P$,null):(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-optin-product--wrapper"},(0,a.createElement)("h2",{className:"text-base font-semibold text-text-primary py-4"},(0,z.__)("Optin Product","cartflows")),(0,a.createElement)("div",{className:"wcf-optin-products--selection wcf-products__section"},0===o.length||""===o[0]?(0,a.createElement)(a.Fragment,null,(0,a.createElement)("input",{name:"wcf-optin-product[]",type:"hidden",value:""}),(0,a.createElement)("div",{className:"wcf-optin-no-product--notice border border-border-subtle bg-gray-25 text-center text-sm font-normal rounded-md p-5"},(0,z.__)("Select free & virtual product only. Once you select a product, it will be displayed here.","cartflows")),(0,a.createElement)("div",{className:"wcf-optin-product-selection-field__add-new flex justify-between items-end gap-5 mt-5"},(0,a.createElement)(VZ,{name:"",desc:"",field:"product",value:l,allowed_products:"simple",include_products:"braintree-subscription, braintree-variable-subscription",excluded_products:"grouped",placeholder:(0,z.__)("Search for a Free & Virtual Product","cartflows"),onChangeCB:e=>{s(e),d(!1)},sectionClass:"flex-1 "+(u?"border border-border-error":"")}),(0,a.createElement)(Wo,{type:"button",variant:"outline",size:"md",icon:(0,a.createElement)(QU,{className:"w-4 h-4"}),iconPosition:"left",loading:h,disabled:h,onClick:function(){const e=i?.value;c(i),e&&(m({isInProcessing:!0,buttonText:(0,z.__)("Adding…","cartflows")}),L()({path:`/cartflows/v1/admin/product-data/${e}`}).then(t=>{t.regular_price>0||!t.is_virtual?d(!0):(d(!1),r({type:"ADD_OPTIN_PRODUCT",field_name:"wcf-optin-product",product_data:{value:e,label:i?.label,img_url:t?.img_url}})),c(null),m({isInProcessing:!1,buttonText:f})}),s(null))},className:"wcf-select-product-button shrink-0 h-fit"},g)),u&&(0,a.createElement)("span",{className:"text-sm mt-2 text-text-error wcf-field-required-error inline-block"},(0,z.__)("Please select a free & virtual product only.","cartflows")),(0,a.createElement)(VU,null)):(0,a.createElement)("div",{className:"overflow-visible shadow border border-border-subtle rounded-md"},(0,a.createElement)("div",{className:"wcf-optin-product-selection--selected-product flex items-center p-3 gap-4"},(0,a.createElement)("div",{className:"wcf-optin-product-selection--product-title whitespace-nowrap text-sm font-medium text-text-primary w-1/2"},(0,a.createElement)("div",{className:"flex gap-3 items-center"},(0,a.createElement)("div",{className:"wcf-optin-product-selection--product-image flex w-20 h-20"},(0,a.createElement)("img",{src:o.img_url?o.img_url:cartflows_admin.image_placeholder,className:"product-image rounded-md w-full h-full aspect-{3/2} object-contain",alt:Vh(o.label)})),(0,a.createElement)("div",{className:"wcf-optin-product-selection--product-title_text"},(0,a.createElement)("div",{className:"wcf-offer-product-repeater-field__title whitespace-normal text-left","data-product_id":o.value},Vh(o.label)),(0,a.createElement)("div",{className:"wcf-optin-product-repeater-field__reg-price mt-1"},(0,a.createElement)("div",{className:"flex gap-2"},(0,a.createElement)("span",{className:"wcf-offer-product--reg-price"},(0,z.__)("Free","cartflows"))))))),(0,a.createElement)("div",{className:"wcf-optin-product-selection-actions flex gap-2 relative whitespace-nowrap text-right text-sm font-medium w-[5%] justify-center ml-auto"},(0,a.createElement)("div",{className:"wcf-delete-product-item cursor-pointer text-text-secondary hover:text-brand-500 p-1 hover:bg-background-secondary focus:bg-background-secondary rounded relative justify-end",onClick:function(){r({type:"REMOVE_OPTIN_PRODUCT",field_name:"wcf-optin-product"})}},(0,a.createElement)(UU,{className:"h-18 w-18"}))),(0,a.createElement)("input",{name:"wcf-optin-product[]",type:"hidden",className:"wcf-checkout-product-id",value:o.value})))),(0,a.createElement)("div",{className:"wcf-offer-product--common-settings pt-2"},(0,a.createElement)(z$,{settings:t?.settings.product,displayAs:"div"}))))};function EX(e,t){var n;if(!t)return"";const r=Object.values(t).find(t=>t.id===e);return null!==(n=r?.title)&&void 0!==n?n:""}function MX(e,t,n,r){if(!t?.type)return null;switch(e){case"design":default:return(0,a.createElement)(k$,null);case"settings":return(0,a.createElement)(L$,null);case"products":return"checkout"===t.type?"storeCheckout"!==n||cartflows_admin.store_checkout_show_product_tab?(0,a.createElement)(xX,null):(r("order_bumps"),(0,a.createElement)(B$,null)):["upsell","downsell"].includes(t.type)?(0,a.createElement)(R$,null):"optin"===t.type?(0,a.createElement)(NX,null):"landing"===t.type||"thankyou"===t.type?(r("settings"),(0,a.createElement)(L$,null)):(0,a.createElement)(L$,null);case"order_bumps":return(0,a.createElement)(B$,null);case"checkout_offer":return(0,a.createElement)(X$,null);case"optin_form_fields":return(0,a.createElement)(wX,null);case"dynamic-offers":return(0,a.createElement)(K$,null)}}const _X=function({accordionGroups:e,currentTab:t,currentSection:n,onTabChange:r,onSectionChange:o}){const[i,s]=(0,a.useState)(()=>new Set((null!=e?e:[]).filter(e=>e.sections.length>0).map(e=>e.id)));(0,a.useEffect)(()=>{const t=(null!=e?e:[]).filter(e=>e.sections.length>0).map(e=>e.id);s(e=>{let n=!1;const r=new Set(e);return t.forEach(e=>{r.has(e)||(r.add(e),n=!0)}),n?r:e})},[e]);const l=(null!=e?e:[]).find(e=>e.id===t),c=n&&l?.sections.length>0?`${t}|${n}`:t,u={};return(null!=e?e:[]).forEach(e=>{0===e.sections.length?u[e.id]=e.name:e.sections.forEach(e=>{u[`${e.tabId}|${e.id}`]=e.name})}),(0,a.createElement)("div",{className:"wcf-step-setting--sidebar-wrapper w-full lg:w-auto"},(0,a.createElement)("div",{className:"lg:hidden px-6 py-4",onClickCapture:e=>e.preventDefault()},(0,a.createElement)(kL,{value:c,onChange:e=>{if(e.includes("|")){const[t,n]=e.split("|");o(t,n)}else r(e)},size:"md"},(0,a.createElement)(kL.Button,{placeholder:(0,z.__)("Select a Settings Tab","cartflows"),render:e=>{var t;return null!==(t=u[e])&&void 0!==t?t:e}}),(0,a.createElement)(kL.Portal,null,(0,a.createElement)(kL.Options,null,(null!=e?e:[]).map(e=>e.sections.length>0?(0,a.createElement)(kL.OptionGroup,{key:e.id,label:e.name},e.sections.map(e=>(0,a.createElement)(kL.Option,{key:e.id,value:`${e.tabId}|${e.id}`},e.name))):(0,a.createElement)(kL.Option,{key:e.id,value:e.id},e.name)))))),(0,a.createElement)("div",{className:"wcf-step-setting--sidebar hidden lg:flex h-full min-h-screen flex-col w-auto sticky top-0 sidebar after:content-[''] after:fixed after:left-0 after:top-0 after:w-[420px] after:h-screen after:bg-background-primary after:-z-10"},(0,a.createElement)(MW,{borderOn:!0,className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none box-border flex-grow"},(0,a.createElement)(MW.Body,{className:"!p-0 pt-2"},(0,a.createElement)(MW.Item,null,(0,a.createElement)(Xp,{className:"w-full p-0 bg-transparent",size:"md"},(0,a.createElement)("ul",{className:"m-0 p-0 list-none flex flex-col gap-0.5"},(null!=e?e:[]).map(e=>{const l=i.has(e.id),c=t===e.id,u=e.sections.length>0,d=e.icon,f=u&&c;return(0,a.createElement)(a.Fragment,{key:e.id},(0,a.createElement)(Xp.Item,{active:!u&&c,onClick:()=>(e=>{if(0===e.sections.length)r(e.id);else if(i.has(e.id))s(t=>{const n=new Set(t);return n.delete(e.id),n});else{s(t=>new Set([...t,e.id]));const t=e.sections[0];o(t.tabId,t.id)}})(e),className:u?"hover:!bg-transparent":"hover:!bg-brand-25 hover:[&>svg]:!text-brand-600 "+(c?"!bg-brand-25 !text-text-primary [&>svg]:!text-brand-600":"")},(0,a.createElement)(d,{className:f?"!text-icon-interactive":""}),(0,a.createElement)("div",{className:"flex-1"},e.name),u&&(0,a.createElement)(ym,{className:"!size-4 shrink-0 text-icon-secondary transition-transform duration-200 "+(l?"rotate-180":"")})),u&&l&&(0,a.createElement)("div",{className:"border-l border-solid border-r-0 border-t-0 border-b-0 border-border-subtle pl-4 ml-5"},e.sections.map(e=>{const r=t===e.tabId&&n===e.id;return(0,a.createElement)(Xp.Item,{key:e.id,active:r,onClick:()=>o(e.tabId,e.id),className:"p-1 hover:!bg-brand-25 "+(r?"!bg-brand-25 !text-text-primary":"")},(0,a.createElement)("div",null,e.name))})))}))))))))},IX=function({section:e}){const[{options:t,page_builder:n,step_data:r}]=SU();if(!e)return null;if("shortcode"===e.slug&&"other"!==n)return null;const o={...e,step_type:r?.type||""};return!1===dg.isActiveControl(o,t)?null:(0,a.createElement)("div",{className:"wcf-section-content"},(0,a.createElement)(S$,{settings:o,displayAs:"div"}))},SX=Fo("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]),jX=Fo("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]),kX=function(){return(0,a.createElement)("div",{className:"wcf-custom-field-editor wcf-checkout__section is-placeholder"},(0,a.createElement)("div",{className:"wcf-custom-field-editor__content"},(0,a.createElement)("div",{className:"wcf-custom-field-editor__title"},(0,a.createElement)("div",{className:"title"})),(0,a.createElement)("form",null,(0,a.createElement)("table",null,(0,a.createElement)("tbody",null,(0,a.createElement)("tr",null,(0,a.createElement)("td",null,(0,a.createElement)("div",{className:"title"}))),(0,a.createElement)("tr",null,(0,a.createElement)("td",null,(0,a.createElement)("div",{className:"title"}))),(0,a.createElement)("tr",null,(0,a.createElement)("td",null,(0,a.createElement)("div",{className:"title"}))),(0,a.createElement)("tr",null,(0,a.createElement)("td",null,(0,a.createElement)("div",{className:"title"}))),(0,a.createElement)("tr",null,(0,a.createElement)("td",null,(0,a.createElement)("div",{className:"title"}))),(0,a.createElement)("tr",null,(0,a.createElement)("td",null,(0,a.createElement)("div",{className:"title"}))))),(0,a.createElement)("div",{className:"wcf-field wcf-submit"},(0,a.createElement)("div",{className:"wcf-checkout-custom-fields__button"})))),(0,a.createElement)(yG,{fontSize:"35px",width:"400px"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"80%"}),(0,a.createElement)(yG,{width:"65%"}))},DX=function(){const[{options:e},t]=SU(),n="yes"===e["wcf-show-coupon-field"],r="yes"===e["wcf-optimize-coupon-field"],o="yes"===e["wcf-checkout-additional-fields"],i="yes"===e["wcf-optimize-order-note-field"],s="yes"===e["wcf-shipto-diff-addr-fields"],l="yes"===e["wcf-google-autoaddress"],c="yes"===e["wcf-custom-no-shipping-method-message-toggle"],u=e["wcf-no-shipping-method-message"]||"",d=e["wcf-order-review-summary-position"]||"top",f=(e,n)=>{t({type:"SET_OPTION",name:e,value:n})},p=[{value:"top",label:(0,z.__)("Top","cartflows")},{value:"bottom",label:(0,z.__)("Bottom","cartflows")}];return(0,a.createElement)("div",{className:"flex flex-col gap-4"},(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"flex items-center justify-between py-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Enable Coupon Field","cartflows")),(0,a.createElement)(nL,{value:n,onChange:e=>f("wcf-show-coupon-field",e?"yes":"no")})),n&&(0,a.createElement)("div",{className:"flex items-center justify-between py-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Collapsible Coupon Field","cartflows")),(0,a.createElement)(nL,{value:r,onChange:e=>f("wcf-optimize-coupon-field",e?"yes":"no")}))),(0,a.createElement)("input",{type:"hidden",name:"wcf-show-coupon-field",value:n?"yes":"no"}),(0,a.createElement)("input",{type:"hidden",name:"wcf-optimize-coupon-field",value:r?"yes":"no"}),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"flex items-center justify-between py-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Enable Additional Field","cartflows")),(0,a.createElement)(nL,{value:o,onChange:e=>f("wcf-checkout-additional-fields",e?"yes":"no")})),o&&(0,a.createElement)("div",{className:"flex items-center justify-between py-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Collapsible Additional Field","cartflows")),(0,a.createElement)(nL,{value:i,onChange:e=>f("wcf-optimize-order-note-field",e?"yes":"no")}))),(0,a.createElement)("input",{type:"hidden",name:"wcf-checkout-additional-fields",value:o?"yes":"no"}),(0,a.createElement)("input",{type:"hidden",name:"wcf-optimize-order-note-field",value:i?"yes":"no"}),(0,a.createElement)("div",{className:"flex items-center justify-between py-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Enable Ship To Different Address","cartflows")),(0,a.createElement)(nL,{value:s,onChange:e=>f("wcf-shipto-diff-addr-fields",e?"yes":"no")})),(0,a.createElement)("input",{type:"hidden",name:"wcf-shipto-diff-addr-fields",value:s?"yes":"no"}),(0,a.createElement)("div",{className:"flex flex-col py-1"},(0,a.createElement)("div",{className:"flex items-center justify-between"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Enable Google Address Autocomplete","cartflows")),(0,a.createElement)(nL,{value:l,onChange:e=>f("wcf-google-autoaddress",e?"yes":"no")})),(0,a.createElement)("div",{className:"flex items-start gap-1 text-sm font-normal text-text-tertiary mt-2"},(0,a.createElement)(FU,{className:"w-4 h-4 shrink-0 mt-px text-icon-secondary"}),(0,a.createElement)("span",null,(0,z.__)("Before enabling this option, make sure that you have added API key in Google Address Autocomplete Settings.","cartflows")))),(0,a.createElement)("input",{type:"hidden",name:"wcf-google-autoaddress",value:l?"yes":"no"}),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"flex items-center justify-between py-1"},(0,a.createElement)("div",{className:"flex items-center gap-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Enable Custom Shipping Message","cartflows")),(0,a.createElement)(ea,{content:(0,z.__)("Turn this on to show a custom message when no shipping options are available at checkout.","cartflows"),placement:"top"},(0,a.createElement)("span",null,(0,a.createElement)(FU,{className:"w-4 h-4 text-icon-secondary cursor-help"})))),(0,a.createElement)(nL,{value:c,onChange:e=>f("wcf-custom-no-shipping-method-message-toggle",e?"yes":"no")})),(0,a.createElement)("input",{type:"hidden",name:"wcf-custom-no-shipping-method-message-toggle",value:c?"yes":"no"}),c&&(0,a.createElement)("div",{className:"flex flex-col gap-1.5"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Shipping Message","cartflows")),(0,a.createElement)(TL,{value:u,rows:2,size:"md",className:"w-full",placeholder:(0,z.__)("There are no shipping options available. Please ensure that your address has been entered correctly, or contact us if you need any help.","cartflows"),onChange:e=>f("wcf-no-shipping-method-message",e)}))),(0,a.createElement)("input",{type:"hidden",name:"wcf-no-shipping-method-message",value:u}),(0,a.createElement)("div",{className:"flex items-center gap-3"},(0,a.createElement)("div",{className:"flex items-center gap-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Order Summary Position","cartflows")),(0,a.createElement)(ea,{content:(0,z.__)("Choose this option to adjust where the order summary appears on mobile devices.","cartflows"),placement:"top"},(0,a.createElement)("span",null,(0,a.createElement)(FU,{className:"w-4 h-4 text-icon-secondary cursor-help"})))),(0,a.createElement)("div",{className:"w-32"},(0,a.createElement)(kL,{value:d,onChange:e=>f("wcf-order-review-summary-position",e),size:"md"},(0,a.createElement)(kL.Button,{type:"button",render:e=>{const t=p.find(t=>t.value===e);return t?t.label:e}}),(0,a.createElement)(kL.Portal,null,(0,a.createElement)(kL.Options,null,p.map(e=>(0,a.createElement)(kL.Option,{value:e.value,key:e.value},e.label))))))),(0,a.createElement)("input",{type:"hidden",name:"wcf-order-review-summary-position",value:d}))},CX=function({sectionId:e}){const[{custom_fields:t,step_id:n,options:r,billing_fields:o,shipping_fields:i},s]=SU(),[l,c]=(0,a.useState)("billing"),u=BV();if(void 0===t)return(0,a.createElement)(kX,null);if("form-settings"===e)return(0,a.createElement)(DX,null);if("form-headings"===e&&t.checkout_settings)return(0,a.createElement)(IX,{section:{...t.checkout_settings,slug:"checkout_settings"}});if("place-order-button"===e&&t.button_settings)return(0,a.createElement)(IX,{section:{...t.button_settings,slug:"button_settings"}});if("field-editor"===e){const e=(0,P.applyFilters)("cartflows.stepSettings.customFieldActions",null),t=e?e({stepId:n,dispatch:s,confirm:u,billingFields:o,shippingFields:i,options:r}):null,d=t?t.removeField:e=>e.preventDefault();return(0,a.createElement)("div",{className:"wcf-field-editor-section"},(0,a.createElement)("div",{className:"flex items-center justify-between py-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Enable Custom Field Editor","cartflows")),(0,a.createElement)(nL,{value:"yes"===r["wcf-custom-checkout-fields"],onChange:e=>s({type:"SET_OPTION",name:"wcf-custom-checkout-fields",value:e?"yes":"no"})})),(0,a.createElement)("input",{type:"hidden",name:"wcf-custom-checkout-fields",value:r["wcf-custom-checkout-fields"]}),"yes"===r["wcf-custom-checkout-fields"]&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-checkout-fields-tabs mt-4 mb-0"},(0,a.createElement)(vQ.Group,{variant:"rounded",size:"sm",width:"full",activeItem:l,onChange:({value:e})=>c(e.slug)},(0,a.createElement)(vQ.Tab,{slug:"billing",text:(0,z.__)("Billing Fields","cartflows"),icon:(0,a.createElement)(SX,{className:"w-4 h-4"}),type:"button"}),(0,a.createElement)(vQ.Tab,{slug:"shipping",text:(0,z.__)("Shipping Fields","cartflows"),icon:(0,a.createElement)(jX,{className:"w-4 h-4"}),type:"button"}))),"billing"===l&&o&&(0,a.createElement)("div",{id:"wcf-billing-fields",className:"wcf-billing-fields billing-field-sortable wcf-field-row w-full"},(0,a.createElement)(tX,{data:o,step:"checkout",type:"billing",removeCallback:d})),"shipping"===l&&i&&(0,a.createElement)("div",{id:"wcf-shipping-fields",className:"wcf-shipping-fields shipping-field-sortable wcf-field-row w-full"},(0,a.createElement)(tX,{data:i,step:"checkout",type:"shipping",removeCallback:d})),(0,a.createElement)("div",{className:"text-end"},t&&(0,a.createElement)(gX,{addNewField:t.addNewField,step_type:"checkout"}))))}return null},AX=function(){const[{step_id:e,flow_id:t,options:n,page_settings:r},o]=SU(),i=f$(),s=(0,P.applyFilters)("cartflows.stepSettings.productOptions",null);return i||!s?(0,a.createElement)(GW,{title:(0,z.__)("Let Customers Choose Exactly What They Want","cartflows"),description:(0,z.__)("Offer flexible product options right at checkout — quantities, variations, and more. Upgrade to CartFlows Pro and start customizing your offers today.","cartflows")}):(0,a.createElement)(s,{stepId:e,flowId:t,options:n,pageSettings:r,onDispatch:o})},TX={landing:KH,checkout:e$,upsell:t$,downsell:n$,optin:r$,thankyou:o$},OX=function(){var e;const[{step_id:t,flow_id:n,step_data:r}]=SU(),o=(0,g.useHistory)(),i=BV(),s=r?.type||"",l=null!==(e=TX[s])&&void 0!==e?e:null;return(0,a.createElement)("div",{className:"flex flex-col gap-4"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-normal text-text-secondary"},(0,z.__)("Replace this step with a different template. Your current design and content for this step will be permanently removed.","cartflows")),(0,a.createElement)("div",{className:"flex items-center gap-4"},l&&(0,a.createElement)("img",{src:l,alt:s,className:"rounded-lg w-[72px] h-[72px]"}),(0,a.createElement)("div",{className:"flex flex-col gap-1"},(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,z.__)("Step Type","cartflows")),(0,a.createElement)(yp,{tag:"span",size:"sm",className:"font-normal text-text-secondary capitalize"},s))),(0,a.createElement)("div",null,(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:async()=>{await i({title:(0,z.__)("Update Template","cartflows"),description:(0,z.__)("Changing the template will permanently delete the current design in this step. Would you still like to proceed?","cartflows"),actionBtnText:(0,z.__)("Update","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")})&&o.push(`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${n}&step_id=${t}&tab=update-template`)}},(0,z.__)("Update Template","cartflows"))))};function LX({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"}))}const zX=w.forwardRef(LX),PX=function({onEditingChange:e}){const[{step_id:t,flow_id:n},r]=SU();let[{step_title:o}]=SU();(0,a.useEffect)(()=>{let e=!0;return e&&L()({path:`/cartflows/v1/admin/flow-data/${n}`}).then(t=>{e&&r({type:"SET_FLOW_DATA",data:t})}),()=>{e=!1}},[o]);const[i,s]=(0,a.useState)(!1),[l,c]=(0,a.useState)(!1),[u,d]=(0,a.useState)(""),f=(0,a.useRef)(null);(0,a.useEffect)(()=>{i&&f.current?.focus()},[i]);if(!1===o)return null;if(i)return(0,a.createElement)("div",{className:"flex items-center gap-2 flex-1 min-w-0"},(0,a.createElement)(Ym,{ref:f,id:"new-step-title",value:u,onChange:d,size:"md",className:"!py-2",autoComplete:"off"}),(0,a.createElement)(Wo,{variant:"primary",size:"sm",type:"button",loading:l,disabled:l,onClick:n=>{n.preventDefault(),c(!0);const o=new window.FormData;o.append("action","cartflows_update_step_title"),o.append("security",cartflows_admin.update_step_title_nonce),o.append("step_id",t),o.append("new_step_title",u),L()({url:cartflows_admin.ajax_url,method:"POST",body:o}).then(()=>{r({type:"SET_STEP_TITLE",title:u}),c(!1),s(!1),e?.(!1),Vm.success((0,z.__)("Step title updated successfully!","cartflows"))})}},(0,z.__)("Save","cartflows")),(0,a.createElement)(Wo,{variant:"outline",size:"sm",type:"button",disabled:l,onClick:t=>{t.preventDefault(),s(!1),e?.(!1)}},(0,z.__)("Cancel","cartflows")));""===o&&(o=(0,z.__)("(no title)","cartflows"));const p=ug(o,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length);return(0,a.createElement)("div",{className:"wcf-edit-step__title-wrap flex items-center gap-1.5"},(0,a.createElement)("span",{className:"wcf-steps-header__title--text text-xl font-semibold text-text-primary truncate max-w-xs",title:o},p),(0,a.createElement)(Wo,{variant:"ghost",size:"xs",type:"button",icon:(0,a.createElement)(zX,null),onClick:t=>{t.preventDefault(),d(o||""),s(!0),e?.(!0)},"aria-label":(0,z.__)("Edit Step Name","cartflows")}))},RX=Fo("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]),UX={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},BX=(0,w.createContext)({sizes:UX.sm}),FX=({children:e,size:t="sm"})=>{const n=UX[t]||UX.sm;return(0,R.jsx)(BX.Provider,{value:{sizes:n},children:(0,R.jsx)("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:(0,R.jsx)("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};FX.displayName="Breadcrumb";const YX=({children:e})=>(0,R.jsx)(R.Fragment,{children:e});YX.displayName="Breadcrumb.List";const ZX=({children:e})=>(0,R.jsx)("li",{className:"m-0 inline-flex items-center gap-2",children:e});ZX.displayName="Breadcrumb.Item";const QX=({href:e,children:t,className:n,as:r="a",...o})=>{const{sizes:a}=(0,w.useContext)(BX);return(0,R.jsx)(r,{href:e,className:Le(a.text,"px-1 font-medium no-underline text-text-tertiary hover:text-text-primary hover:underline","focus:outline-none focus:ring-1 focus:ring-border-interactive focus:border-border-interactive focus:rounded-sm","transition-all duration-200",n),...o,children:t})};QX.displayName="Breadcrumb.Link";const VX=({type:e})=>{const{sizes:t}=(0,w.useContext)(BX),n={slash:(0,R.jsx)("span",{className:Le("mx-1",t.separator),children:"/"}),arrow:(0,R.jsx)(oB,{size:t.separatorIconSize})};return(0,R.jsx)("li",{role:"separator",className:"flex items-center text-text-tertiary mx-2 p-0 list-none","aria-hidden":"true",children:n[e]||n.arrow})};VX.displayName="Breadcrumb.Separator";const WX=()=>{const{sizes:e}=(0,w.useContext)(BX);return(0,R.jsx)("span",{role:"img","aria-label":"More pages",children:(0,R.jsx)(RX,{"aria-hidden":"true",className:"mt-[2px] text-text-tertiary",size:e.separatorIconSize+4})})};WX.displayName="Breadcrumb.Ellipsis";const GX=({children:e})=>{const{sizes:t}=(0,w.useContext)(BX);return(0,R.jsx)("span",{className:Le(t.text,"font-medium text-text-primary"),children:e})};GX.displayName="Breadcrumb.Page",FX.List=YX,FX.Item=ZX,FX.Link=QX,FX.Separator=VX,FX.Ellipsis=WX,FX.Page=GX;const HX=function({currentTab:e,currentSection:t,sectionObject:n,stepData:r,flowType:o,buttonRef:i,wooStatus:s,setActiveTab:l,backUrl:c}){const[{options:u,is_flow_instant_checkout:d,step_data:f,flow_title:m,step_title:h}]=SU(),[{license_status:g}]=p(),[y,w]=(0,a.useState)(!1),[b,v]=(0,a.useState)((0,z.__)("Activate WooCommerce","cartflows")),x=s||!s&&"landing"===r?.type,N=f$(),E=f$("plus-pro"),M="coupon"===t&&N,_="product-options"===t&&N,I="checkout-link"===t&&N,S="checkout-expiry"===t&&N,j="dynamic-offers"===e&&N,k="order_bumps"===e&&E,D=["upsell","downsell"].includes(f?.type)&&wcfCartflowsPro()&&"Activated"!==g,A=M||_||I||S||j||k||D,T=A||"checkout-link"===t||!s&&["checkout","upsell","downsell","thankyou"].includes(r?.type),O="storeCheckout"===o?"store-checkout":"flows",P="storeCheckout"===o?(0,z.__)("Store Checkout","cartflows"):(0,z.__)("Funnels","cartflows"),R=h&&!1!==h?(0,z.sprintf)(/* translators: %s: step name */ /* translators: %s: step name */ |
| 50 |
(0,z.__)("%s Settings","cartflows"),h):(0,z.__)("Step Settings","cartflows"),U=(e=!0)=>(0,a.createElement)(a.Fragment,null,(0,a.createElement)(FX,{size:"sm"},(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Link,{href:`admin.php?page=cartflows&path=${O}`,className:"font-normal"},P)),(0,a.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,a.createElement)(oB,{className:"w-3 h-3 stroke-2"})),m&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Link,{href:`admin.php${c}`,className:"font-normal"},m)),(0,a.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,a.createElement)(oB,{className:"w-3 h-3 stroke-2"}))),(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Page,null,R))),(0,a.createElement)("div",{className:"flex justify-between items-center h-10"},(0,a.createElement)("div",{className:"flex items-center gap-2.5"+(y?" flex-1 min-w-0":"")},(0,a.createElement)(C,{to:{pathname:"admin.php",search:c},className:"text-icon-secondary hover:text-icon-primary no-underline shrink-0 transition-colors","aria-label":(0,z.__)("Back to funnel","cartflows")},(0,a.createElement)(UW,{className:"w-5 h-5 flex stroke-1"})),(0,a.createElement)(PX,{onEditingChange:w})),e&&!T&&!y&&(0,a.createElement)(RL,{id:"wcf-save-step-meta",ref:i})));if(!x)return(0,a.createElement)("div",{className:"wcf-step-settings--container min-w-0 max-w-4.5xl flex flex-col gap-3 p-4 md:p-8 mx-auto w-full box-border"},U(!1),(0,a.createElement)("div",{className:"bg-brand-25 border border-border-subtle rounded-lg px-5 py-4 lg:px-7 sm:py-6 flex justify-between gap-6"},(0,a.createElement)("div",{className:"max-w-full"},(0,a.createElement)("h2",{className:"text-base font-medium tracking-tight text-text-primary sm:text-base"},(0,z.__)("WooCommerce is Required!","cartflows")),(0,a.createElement)("p",{className:"wcf-upgrade-to-pro-cta--text text-base font-normal text-text-secondary mt-2"},(0,z.sprintf)( |
| 51 |
// translators: %s: step type |
| 52 |
// translators: %s: step type |
| 53 |
(0,z.__)("To modify the %s step options, please install and activate the WooCommerce plugin.","cartflows"),r?.type))),(0,a.createElement)("div",{className:"mt-10 flex items-center gap-x-6 lg:mt-0 lg:flex-shrink-0"},(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:(B=v,()=>{const e=new window.FormData;e.append("action","cartflows_activate_plugin"),e.append("init","woocommerce/woocommerce.php"),e.append("security",cartflows_admin.activate_plugin_nonce),B((0,z.__)("Activating…","cartflows")),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{B((0,z.__)("Activated","cartflows")),window.location.reload()})})},b))));var B;let F;return F="change-template"===t&&"storeCheckout"===o&&"yes"!==d?(0,z.__)("Change Template","cartflows"):"checkout_form_fields"===e&&t?{"form-settings":(0,z.__)("Form Settings","cartflows"),"field-editor":(0,z.__)("Field Editor","cartflows"),"form-headings":(0,z.__)("Form Headings","cartflows"),"place-order-button":(0,z.__)("Place Order Button","cartflows")}[t]||EX(e,r?.tabs):n?.title||EX(e,r?.tabs),(0,a.createElement)(Eh,{containerType:"flex",direction:"column",gap:"sm",className:"wcf-step-settings--container min-w-0 max-w-4.5xl p-4 md:p-8 mx-auto w-full box-border"},U(),(0,a.createElement)(Eh,{containerType:"flex",direction:"column",className:A?"!gap-5 mb-8":"!gap-5 bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm mb-8 p-6"},F&&(0,a.createElement)(_h,{title:F,tag:"h5",size:"xs",className:"text-text-primary"}),D?(0,a.createElement)(D$,{heading:(0,z.__)("License is required!","cartflows"),subHeading:(0,z.__)("Activate the license to modify this offer step's settings","cartflows")}):M?(0,a.createElement)(GW,{title:(0,z.__)("Apply Discounts Automatically and Convert More Customers","cartflows"),description:(0,z.__)("Remove friction at checkout — discounts activate the moment customers arrive. Upgrade to Pro and watch conversions climb immediately.","cartflows")}):I?(0,a.createElement)(GW,{title:(0,z.__)("Share Pre-Filled Checkout Links","cartflows"),description:(0,z.__)("Generate shareable links that add your products to the cart and send customers straight to checkout. Upgrade to Pro to create one-click checkout links.","cartflows")}):S?(0,a.createElement)(GW,{title:(0,z.__)("Add Real Scarcity with Checkout Expiry","cartflows"),description:(0,z.__)("Automatically close a checkout after a set number of orders or a deadline and redirect late visitors. Upgrade to Pro to turn urgency into more conversions.","cartflows")}):"design"===e?(0,a.createElement)("div",{className:"space-y-4"},(0,a.createElement)("div",{className:"wcf-step-notices-wrapper rounded-md bg-brand-25 border border-solid border-border-interactive p-4"},(0,a.createElement)("div",{className:"text-sm text-brand-600"},"yes"===d&&["checkout","upsell","downsell","thankyou"].includes(f?.type)?(0,z.sprintf)( |
| 54 |
// translators: %s: The current step type. |
| 55 |
// translators: %s: The current step type. |
| 56 |
(0,z.__)("Use this to customize how your Instant %s page looks.","cartflows"),"thankyou"===f?.type?(0,z.__)("Thank You","cartflows"):f?.type.charAt(0).toUpperCase()+f?.type.slice(1)):(0,a.createElement)(a.Fragment,null,(0,z.__)("If you are using shortcodes, enable this design settings to apply styles.","cartflows")))),(0,a.createElement)(nQ,{id:"wcf-enable-design-settings",name:"wcf-enable-design-settings",value:u["wcf-enable-design-settings"],label:(0,z.__)("Enable Design Settings","cartflows"),fullWidth:!0}),"yes"===u["wcf-enable-design-settings"]&&n&&(0,a.createElement)(IX,{section:n})):"checkout_form_fields"===e&&t?(0,a.createElement)(CX,{sectionId:t}):"product-options"===t&&n?(0,a.createElement)(AX,null):"change-template"===t&&"storeCheckout"===o&&"yes"!==d?(0,a.createElement)(OX,null):"checkout_offer"===e?(0,a.createElement)("div",{className:"wcf-page-wrapper"},MX(e,r,o,l)):n&&("products"!==e||"storeCheckout"!==o||cartflows_admin.store_checkout_show_product_tab)?(0,a.createElement)(IX,{section:n}):(0,a.createElement)("div",{className:"wcf-page-wrapper"},MX(e,r,o,l))))},$X=function(){return(0,a.createElement)("div",{className:"wcf-step-settings-view flex flex-col lg:flex-row lg:gap-6 items-start w-full"},(0,a.createElement)("div",{className:"wcf-step-setting--sidebar hidden lg:flex h-full min-h-screen flex-col w-auto sticky top-0 after:content-[''] after:fixed after:left-0 after:top-0 after:w-[420px] after:h-screen after:bg-background-primary after:-z-10"},(0,a.createElement)("div",{className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none box-border flex-grow bg-background-primary border-0 border-r border-solid border-border-subtle"},(0,a.createElement)("div",{className:"flex flex-col gap-0.5 pt-2"},[["w-20",!0,["w-24","w-20"]],["w-24",!1,[]],["w-16",!0,["w-28","w-20","w-24"]],["w-20",!1,[]],["w-16",!1,[]]].map(([e,t,n],r)=>(0,a.createElement)("div",{key:r,className:"flex flex-col"},(0,a.createElement)("div",{className:"flex items-center gap-2.5 px-3 py-2"},(0,a.createElement)(WO,{className:"w-5 h-5 rounded"}),(0,a.createElement)(WO,{className:`h-3 ${e} flex-1`}),t&&(0,a.createElement)(WO,{className:"w-4 h-4 rounded"})),n.length>0&&(0,a.createElement)("div",{className:"flex flex-col gap-0.5 ml-10"},n.map((e,t)=>(0,a.createElement)("div",{key:t,className:"px-2 py-1.5"},(0,a.createElement)(WO,{className:`h-3 ${e}`}))))))))),(0,a.createElement)("div",{className:"wcf-step-settings--container min-w-0 max-w-4.5xl p-4 md:p-8 mx-auto w-full flex flex-col gap-3"},(0,a.createElement)("div",{className:"flex items-center gap-2 py-1"},(0,a.createElement)(WO,{className:"w-14 h-2.5"}),(0,a.createElement)(WO,{className:"w-2 h-2.5"}),(0,a.createElement)(WO,{className:"w-20 h-2.5"}),(0,a.createElement)(WO,{className:"w-2 h-2.5"}),(0,a.createElement)(WO,{className:"w-28 h-2.5"})),(0,a.createElement)("div",{className:"flex justify-between items-center h-10"},(0,a.createElement)("div",{className:"flex items-center gap-2.5"},(0,a.createElement)(WO,{className:"w-5 h-5 rounded"}),(0,a.createElement)(WO,{className:"w-40 h-5"})),(0,a.createElement)(WO,{className:"w-28 h-9 rounded-lg"})),(0,a.createElement)("div",{className:"bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm overflow-hidden mb-8 p-6 flex flex-col gap-5"},(0,a.createElement)(WO,{className:"w-32 h-4"}),["w-28","w-36","w-24","w-32"].map((e,t)=>(0,a.createElement)("div",{key:t,className:"flex flex-col gap-2"},(0,a.createElement)(WO,{className:`${e} h-3.5`}),(0,a.createElement)(WO,{className:"w-full h-10 rounded-md"}))))))};function XX(e,t,n,r,o){if("checkout_form_fields"===e)return"form-settings";if(o?.settings){const t=Object.entries(o.settings).filter(([,t])=>t.tab===e&&t.title).sort(([,e],[,t])=>e.priority-t.priority);if(t.length>0){var a;const[e,n]=t[0];return null!==(a=n.slug)&&void 0!==a?a:e}}if("settings"===e&&t?.settings){var i,s;const e=Object.values(t.settings).sort((e,t)=>e.priority-t.priority);return null!==(i=null!==(s=e[0]?.slug)&&void 0!==s?s:e[0]?.id)&&void 0!==i?i:null}if("design"===e&&n?.settings&&"yes"===r?.["wcf-enable-design-settings"]){var l,c;const e=Object.values(n.settings).sort((e,t)=>e.priority-t.priority);return null!==(l=null!==(c=e[0]?.slug)&&void 0!==c?c:e[0]?.id)&&void 0!==l?l:null}return null}const qX=function(e){var t,n,r;const[{flow_id:o,step_data:i,flow_type:s,options:l,page_builder:c,is_flow_instant_checkout:u,settings_data:d,design_settings:f,page_settings:m,current_ob:h},y]=SU(),w=(0,a.useRef)(null),b=BV(),[{},v]=p(),x=(0,g.useHistory)(),N=new URLSearchParams((0,g.useLocation)()?.search),E=null!==(t=N.get("step_id"))&&void 0!==t?t:"",M=null!==(n=N.get("tab"))&&void 0!==n?n:"",_=null!==(r=N.get("section"))&&void 0!==r?r:null,[I,S]=(0,a.useState)(M||"products"),[j,k]=(0,a.useState)(_),D="active"===cartflows_admin.woocommerce_status;let C=!0;0!==Object.keys(i).length&&i.id.toString()===E&&(C=!1);const A=e=>{const t={};return Object.entries(e).forEach(([e,n])=>{const r={...n,step_type:i?.type||""};!1!==dg.isActiveControl(r,l)&&(t[e]=n)}),t},T=(0,a.useMemo)(()=>{if(!f?.settings)return f;const e={};return Object.entries(f.settings).forEach(([t,n])=>{if(["shortcode","shortcodes"].includes(n.slug)&&"other"!==c)return;const r={...n,step_type:i?.type||""};!1!==dg.isActiveControl(r,l)&&(e[t]=n)}),{...f,settings:e}},[f,c,i?.type,l]),O=(0,a.useMemo)(()=>{if(!d?.settings)return d;const e=A(d.settings),t={};return Object.entries(e).forEach(([e,n])=>{["shortcode","shortcodes"].includes(n.slug)&&"other"!==c||(t[e]=n)}),{...d,settings:t}},[d,c,i?.type,l]),R=(0,a.useMemo)(()=>m?.settings?{...m,settings:A(m.settings)}:m,[m,i?.type,l]);(0,a.useEffect)(()=>{let e=!0;return""!==E&&(async()=>{L()({path:`/cartflows/v1/admin/step-data/${E}`}).then(t=>{if(e){if(t.billing_fields){const e=Object.entries(t.billing_fields.fields).map(([e,t])=>({...t,key:e}));t.billing_fields=e}if(t.shipping_fields){const e=Object.entries(t.shipping_fields.fields).map(([e,t])=>({...t,key:e}));t.shipping_fields=e}y({type:"SET_STEP_DATA",data:t})}})})(),()=>{e=!1}},[E]),(0,a.useEffect)(()=>{if(!C&&!_){const e=XX(I,O,T,l,R);k(e)}},[C]);const U=null!=j?j:C?null:XX(I,O,T,l,R);let B=[];if(i?.tabs){const e=i.tabs,t=Object.values(e).sort((e,t)=>e.priority-t.priority);let n=t.map(e=>({name:e.title,id:e.id}));F=n,Y=i,n="other"!==c&&"yes"!==u||["upsell","downsell"].includes(Y?.type)&&"yes"!==Y?.options?.["wcf-enable-instant-layout"]?F.filter(e=>"design"!==e.id):F,B=function(e,t,n,r,o,a,i){return e.map(e=>{const s={id:e.id,name:e.name,icon:(l=e.id,null!==(c={products:y$,order_bumps:nG,checkout_form_fields:b$,"dynamic-offers":x$,checkout_offer:E$,settings:PU,optin_form_fields:E$,design:_$}[l])&&void 0!==c?c:PU),sections:[]};var l,c;return"settings"===e.id&&t?.settings?(s.sections=Object.values(t.settings).sort((e,t)=>e.priority-t.priority).map(e=>{var t;return{id:null!==(t=e.slug)&&void 0!==t?t:e.id,tabId:"settings",name:e.title}}),"storeCheckout"===a&&"yes"!==i&&s.sections.push({id:"change-template",tabId:"settings",name:(0,z.__)("Change Template","cartflows")})):"design"===e.id&&n?.settings&&"yes"===r?.["wcf-enable-design-settings"]?s.sections=Object.values(n.settings).sort((e,t)=>e.priority-t.priority).map(e=>{var t;return{id:null!==(t=e.slug)&&void 0!==t?t:e.id,tabId:"design",name:e.title}}):"checkout_form_fields"===e.id?s.sections=[{id:"form-settings",tabId:"checkout_form_fields",name:(0,z.__)("Form Settings","cartflows")},{id:"field-editor",tabId:"checkout_form_fields",name:(0,z.__)("Field Editor","cartflows")},{id:"form-headings",tabId:"checkout_form_fields",name:(0,z.__)("Form Headings","cartflows")},{id:"place-order-button",tabId:"checkout_form_fields",name:(0,z.__)("Place Order Button","cartflows")}]:o?.settings&&"checkout_offer"!==e.id&&(s.sections=Object.entries(o.settings).filter(([,t])=>t.tab===e.id&&t.title).sort(([,e],[,t])=>e.priority-t.priority).map(([t,n])=>{var r;return{id:null!==(r=n.slug)&&void 0!==r?r:t,tabId:e.id,name:n.title}})),s})}(n,O,T,l,R,s,u)}var F,Y;const Z=function(e,t,n,r,o){if(!t)return null;if(o?.settings){const n=Object.entries(o.settings).find(([n,r])=>{var o;return r.tab===e&&(null!==(o=r.slug)&&void 0!==o?o:n)===t});if(n)return n[1]}var a,i;return"settings"===e&&n?.settings?null!==(a=Object.values(n.settings).find(e=>{var n;return(null!==(n=e.slug)&&void 0!==n?n:e.id)===t}))&&void 0!==a?a:null:"design"===e&&r?.settings&&null!==(i=Object.values(r.settings).find(e=>{var n;return(null!==(n=e.slug)&&void 0!==n?n:e.id)===t}))&&void 0!==i?i:null}(I,U,O,T,R),Q=async function(){return!!window.wcfUnsavedChanges&&await b({title:"Save Changes",description:"You have made changes. Do you want to save the changes?",actionBtnText:"Yes",cancelBtnText:"No"})},V=(e,t)=>{const n=new URLSearchParams(window.location.search);n.set("tab",e),t?n.set("section",t):n.delete("section"),x.push({search:n.toString()})},W="storeCheckout"===s?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${o}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${o}`;return C?(0,a.createElement)($X,null):(0,a.createElement)("form",{className:"wcf-step-settings-view flex flex-col lg:flex-row lg:gap-6 items-start w-full",onSubmit:function(t){t.preventDefault();const n=new window.FormData(t.target);if("yes"===l["wcf-enable-product-options"]&&Object.entries(l["wcf-product-options-data"]).forEach(([e,t])=>{Object.entries(t).forEach(([t,r])=>{const o=`wcf-product-options-data[${e}][${t}]`;n.has(o)||n.append(o,r)})}),"order_bumps"===I){const e=(0,P.applyFilters)("cartflows.stepSettings.orderBumpsSave",null);e?e({flowId:o,stepId:E,currentOb:h,dispatch:y,onStatus:e=>v({status:e})}):(v({status:"UNSAVED"}),Vm.error((0,z.__)("Could not save order bumps. Please update CartFlows Pro to the latest version.","cartflows")))}else{if(n.append("action","cartflows_save_meta_settings"),n.append("security",cartflows_admin.save_meta_settings_nonce),n.append("post_id",o),n.append("step_id",E),"products"===I&&"checkout"===i.type&&"single-selection"===l["wcf-product-options"]){const e=n.get("wcf_default_add_to_cart[]");n.set(`wcf-product-options-data[${e}][add_to_cart]`,"yes")}L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{v({status:"SAVED"}),Vm.success((0,z.__)("Settings saved successfully!","cartflows")),["products"].includes(I)&&e.renderCb()}).catch(()=>{v({status:"UNSAVED"}),Vm.error((0,z.__)("Failed to save settings. Please try again.","cartflows"))})}}},(0,a.createElement)(_X,{accordionGroups:B,currentTab:I,currentSection:U,onTabChange:async function(e){if(e===I)return;await Q()&&w.current?.click();const t=XX(e,O,T,l,R);S(e),k(t),V(e,t),window.wcfUnsavedChanges=!1},onSectionChange:async function(e,t){e===I&&t===j||(await Q()&&w.current?.click(),S(e),k(t),V(e,t),window.wcfUnsavedChanges=!1)}}),(0,a.createElement)(HX,{currentTab:I,currentSection:U,sectionObject:Z,stepData:i,flowType:s,renderCb:e.renderCb,buttonRef:w,wooStatus:D,setActiveTab:S,backUrl:W}))},JX=Fo("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]),KX=Fo("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),eq=Fo("LayoutPanelTop",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}]]),tq=Fo("LayoutPanelLeft",[["rect",{width:"7",height:"18",x:"3",y:"3",rx:"1",key:"2obqm"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}]]),nq=Fo("LockOpen",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]]),rq=Fo("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),oq=Fo("Spline",[["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}],["path",{d:"M5 17A12 12 0 0 1 17 5",key:"1okkup"}]]),aq=Fo("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]),iq=Fo("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]),sq=Fo("Focus",[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]),lq=Fo("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);var cq={value:()=>{}};function uq(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new dq(r)}function dq(e){this._=e}function fq(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function pq(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=cq,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}dq.prototype=uq.prototype={constructor:dq,on:function(e,t){var n,r,o=this._,a=(r=o,(e+"").trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}})),i=-1,s=a.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++i<s;)if(n=(e=a[i]).type)o[n]=pq(o[n],e.name,t);else if(null==t)for(n in o)o[n]=pq(o[n],e.name,null);return this}for(;++i<s;)if((n=(e=a[i]).type)&&(n=fq(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new dq(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),a=0;a<n;++a)o[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=0,n=(r=this._[e]).length;a<n;++a)r[a].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};const mq=uq;function hq(){}function gq(e){return null==e?hq:function(){return this.querySelector(e)}}function yq(){return[]}function wq(e){return null==e?yq:function(){return this.querySelectorAll(e)}}function bq(e){return function(){return this.matches(e)}}function vq(e){return function(t){return t.matches(e)}}var xq=Array.prototype.find;function Nq(){return this.firstElementChild}var Eq=Array.prototype.filter;function Mq(){return Array.from(this.children)}function _q(e){return new Array(e.length)}function Iq(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function Sq(e,t,n,r,o,a){for(var i,s=0,l=t.length,c=a.length;s<c;++s)(i=t[s])?(i.__data__=a[s],r[s]=i):n[s]=new Iq(e,a[s]);for(;s<l;++s)(i=t[s])&&(o[s]=i)}function jq(e,t,n,r,o,a,i){var s,l,c,u=new Map,d=t.length,f=a.length,p=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(p[s]=c=i.call(l,l.__data__,s,t)+"",u.has(c)?o[s]=l:u.set(c,l));for(s=0;s<f;++s)c=i.call(e,a[s],s,a)+"",(l=u.get(c))?(r[s]=l,l.__data__=a[s],u.delete(c)):n[s]=new Iq(e,a[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(p[s])===l&&(o[s]=l)}function kq(e){return e.__data__}function Dq(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Cq(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}Iq.prototype={constructor:Iq,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var Aq="http://www.w3.org/1999/xhtml";const Tq={svg:"http://www.w3.org/2000/svg",xhtml:Aq,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oq(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Tq.hasOwnProperty(t)?{space:Tq[t],local:e}:e}function Lq(e){return function(){this.removeAttribute(e)}}function zq(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Pq(e,t){return function(){this.setAttribute(e,t)}}function Rq(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Uq(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function Bq(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Fq(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Yq(e){return function(){this.style.removeProperty(e)}}function Zq(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Qq(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Vq(e,t){return e.style.getPropertyValue(t)||Fq(e).getComputedStyle(e,null).getPropertyValue(t)}function Wq(e){return function(){delete this[e]}}function Gq(e,t){return function(){this[e]=t}}function Hq(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function $q(e){return e.trim().split(/^|\s+/)}function Xq(e){return e.classList||new qq(e)}function qq(e){this._node=e,this._names=$q(e.getAttribute("class")||"")}function Jq(e,t){for(var n=Xq(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Kq(e,t){for(var n=Xq(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function eJ(e){return function(){Jq(this,e)}}function tJ(e){return function(){Kq(this,e)}}function nJ(e,t){return function(){(t.apply(this,arguments)?Jq:Kq)(this,e)}}function rJ(){this.textContent=""}function oJ(e){return function(){this.textContent=e}}function aJ(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function iJ(){this.innerHTML=""}function sJ(e){return function(){this.innerHTML=e}}function lJ(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function cJ(){this.nextSibling&&this.parentNode.appendChild(this)}function uJ(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function dJ(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Aq&&t.documentElement.namespaceURI===Aq?t.createElement(e):t.createElementNS(n,e)}}function fJ(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function pJ(e){var t=Oq(e);return(t.local?fJ:dJ)(t)}function mJ(){return null}function hJ(){var e=this.parentNode;e&&e.removeChild(this)}function gJ(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function yJ(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wJ(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,a=t.length;r<a;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function bJ(e,t,n){return function(){var r,o=this.__on,a=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var i=0,s=o.length;i<s;++i)if((r=o[i]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=t);this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function vJ(e,t,n){var r=Fq(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function xJ(e,t){return function(){return vJ(this,e,t)}}function NJ(e,t){return function(){return vJ(this,e,t.apply(this,arguments))}}qq.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var EJ=[null];function MJ(e,t){this._groups=e,this._parents=t}function _J(){return new MJ([[document.documentElement]],EJ)}MJ.prototype=_J.prototype={constructor:MJ,select:function(e){"function"!=typeof e&&(e=gq(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i,s=t[o],l=s.length,c=r[o]=new Array(l),u=0;u<l;++u)(a=s[u])&&(i=e.call(a,a.__data__,u,s))&&("__data__"in a&&(i.__data__=a.__data__),c[u]=i);return new MJ(r,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}(e):wq(e);for(var t=this._groups,n=t.length,r=[],o=[],a=0;a<n;++a)for(var i,s=t[a],l=s.length,c=0;c<l;++c)(i=s[c])&&(r.push(e.call(i,i.__data__,c,s)),o.push(i));return new MJ(r,o)},selectChild:function(e){return this.select(null==e?Nq:function(e){return function(){return xq.call(this.children,e)}}("function"==typeof e?e:vq(e)))},selectChildren:function(e){return this.selectAll(null==e?Mq:function(e){return function(){return Eq.call(this.children,e)}}("function"==typeof e?e:vq(e)))},filter:function(e){"function"!=typeof e&&(e=bq(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],s=i.length,l=r[o]=[],c=0;c<s;++c)(a=i[c])&&e.call(a,a.__data__,c,i)&&l.push(a);return new MJ(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,kq);var n=t?jq:Sq,r=this._parents,o=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var a=o.length,i=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=r[c],d=o[c],f=d.length,p=Dq(e.call(u,u&&u.__data__,c,r)),m=p.length,h=s[c]=new Array(m),g=i[c]=new Array(m);n(u,d,h,g,l[c]=new Array(f),p,t);for(var y,w,b=0,v=0;b<m;++b)if(y=h[b]){for(b>=v&&(v=b+1);!(w=g[v])&&++v<m;);y._next=w||null}}return(i=new MJ(i,r))._enter=s,i._exit=l,i},enter:function(){return new MJ(this._enter||this._groups.map(_q),this._parents)},exit:function(){return new MJ(this._exit||this._groups.map(_q),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,a=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?a.remove():n(a),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),s=new Array(o),l=0;l<i;++l)for(var c,u=n[l],d=r[l],f=u.length,p=s[l]=new Array(f),m=0;m<f;++m)(c=u[m]||d[m])&&(p[m]=c);for(;l<o;++l)s[l]=n[l];return new MJ(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],a=o.length-1,i=o[a];--a>=0;)(r=o[a])&&(i&&4^r.compareDocumentPosition(i)&&i.parentNode.insertBefore(r,i),i=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Cq);for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i,s=n[a],l=s.length,c=o[a]=new Array(l),u=0;u<l;++u)(i=s[u])&&(c[u]=i);c.sort(t)}return new MJ(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,a=t[n],i=0,s=a.length;i<s;++i)(o=a[i])&&e.call(o,o.__data__,i,a);return this},attr:function(e,t){var n=Oq(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?zq:Lq:"function"==typeof t?n.local?Bq:Uq:n.local?Rq:Pq)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Yq:"function"==typeof t?Qq:Zq)(e,t,null==n?"":n)):Vq(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Wq:"function"==typeof t?Hq:Gq)(e,t)):this.node()[e]},classed:function(e,t){var n=$q(e+"");if(arguments.length<2){for(var r=Xq(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?nJ:t?eJ:tJ)(n,t))},text:function(e){return arguments.length?this.each(null==e?rJ:("function"==typeof e?aJ:oJ)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?iJ:("function"==typeof e?lJ:sJ)(e)):this.node().innerHTML},raise:function(){return this.each(cJ)},lower:function(){return this.each(uJ)},append:function(e){var t="function"==typeof e?e:pJ(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:pJ(e),r=null==t?mJ:"function"==typeof t?t:gq(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(hJ)},clone:function(e){return this.select(e?yJ:gJ)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,a=function(e){return e.trim().split(/^|\s+/).map(function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}(e+""),i=a.length;if(!(arguments.length<2)){for(s=t?bJ:wJ,r=0;r<i;++r)this.each(s(a[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<i;++r)if((o=a[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?NJ:xJ)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],a=0,i=o.length;a<i;++a)(r=o[a])&&(yield r)}};const IJ=_J;function SJ(e){return"string"==typeof e?new MJ([[document.querySelector(e)]],[document.documentElement]):new MJ([[e]],EJ)}function jJ(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const kJ={passive:!1},DJ={capture:!0,passive:!1};function CJ(e){e.stopImmediatePropagation()}function AJ(e){e.preventDefault(),e.stopImmediatePropagation()}function TJ(e){var t=e.document.documentElement,n=SJ(e).on("dragstart.drag",AJ,DJ);"onselectstart"in t?n.on("selectstart.drag",AJ,DJ):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function OJ(e,t){var n=e.document.documentElement,r=SJ(e).on("dragstart.drag",null);t&&(r.on("click.drag",AJ,DJ),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const LJ=e=>()=>e;function zJ(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:a,x:i,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function PJ(e){return!e.ctrlKey&&!e.button}function RJ(){return this.parentNode}function UJ(e,t){return null==t?{x:e.x,y:e.y}:t}function BJ(){return navigator.maxTouchPoints||"ontouchstart"in this}function FJ(){var e,t,n,r,o=PJ,a=RJ,i=UJ,s=BJ,l={},c=mq("start","drag","end"),u=0,d=0;function f(e){e.on("mousedown.drag",p).filter(s).on("touchstart.drag",g).on("touchmove.drag",y,kJ).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(i,s){if(!r&&o.call(this,i,s)){var l=b(this,a.call(this,i,s),i,s,"mouse");l&&(SJ(i.view).on("mousemove.drag",m,DJ).on("mouseup.drag",h,DJ),TJ(i.view),CJ(i),n=!1,e=i.clientX,t=i.clientY,l("start",i))}}function m(r){if(AJ(r),!n){var o=r.clientX-e,a=r.clientY-t;n=o*o+a*a>d}l.mouse("drag",r)}function h(e){SJ(e.view).on("mousemove.drag mouseup.drag",null),OJ(e.view,n),AJ(e),l.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,i=e.changedTouches,s=a.call(this,e,t),l=i.length;for(n=0;n<l;++n)(r=b(this,s,e,t,i[n].identifier,i[n]))&&(CJ(e),r("start",e,i[n]))}}function y(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=l[r[t].identifier])&&(AJ(e),n("drag",e,r[t]))}function w(e){var t,n,o=e.changedTouches,a=o.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),t=0;t<a;++t)(n=l[o[t].identifier])&&(CJ(e),n("end",e,o[t]))}function b(e,t,n,r,o,a){var s,d,p,m=c.copy(),h=jJ(a||n,t);if(null!=(p=i.call(e,new zJ("beforestart",{sourceEvent:n,target:f,identifier:o,active:u,x:h[0],y:h[1],dx:0,dy:0,dispatch:m}),r)))return s=p.x-h[0]||0,d=p.y-h[1]||0,function n(a,i,c){var g,y=h;switch(a){case"start":l[o]=n,g=u++;break;case"end":delete l[o],--u;case"drag":h=jJ(c||i,t),g=u}m.call(a,e,new zJ(a,{sourceEvent:i,subject:p,target:f,identifier:o,active:g,x:h[0]+s,y:h[1]+d,dx:h[0]-y[0],dy:h[1]-y[1],dispatch:m}),r)}}return f.filter=function(e){return arguments.length?(o="function"==typeof e?e:LJ(!!e),f):o},f.container=function(e){return arguments.length?(a="function"==typeof e?e:LJ(e),f):a},f.subject=function(e){return arguments.length?(i="function"==typeof e?e:LJ(e),f):i},f.touchable=function(e){return arguments.length?(s="function"==typeof e?e:LJ(!!e),f):s},f.on=function(){var e=c.on.apply(c,arguments);return e===c?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}function YJ(e){return((e=Math.exp(e))+1/e)/2}zJ.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};const ZJ=function e(t,n,r){function o(e,o){var a,i,s=e[0],l=e[1],c=e[2],u=o[0],d=o[1],f=o[2],p=u-s,m=d-l,h=p*p+m*m;if(h<1e-12)i=Math.log(f/c)/t,a=function(e){return[s+e*p,l+e*m,c*Math.exp(t*e*i)]};else{var g=Math.sqrt(h),y=(f*f-c*c+r*h)/(2*c*n*g),w=(f*f-c*c-r*h)/(2*f*n*g),b=Math.log(Math.sqrt(y*y+1)-y),v=Math.log(Math.sqrt(w*w+1)-w);i=(v-b)/t,a=function(e){var r=e*i,o=YJ(b),a=c/(n*g)*(o*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(t*r+b)-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[s+a*p,l+a*m,c*o/YJ(t*r+b)]}}return a.duration=1e3*i*t/Math.SQRT2,a}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4);var QJ,VJ,WJ=0,GJ=0,HJ=0,$J=0,XJ=0,qJ=0,JJ="object"==typeof performance&&performance.now?performance:Date,KJ="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function eK(){return XJ||(KJ(tK),XJ=JJ.now()+qJ)}function tK(){XJ=0}function nK(){this._call=this._time=this._next=null}function rK(e,t,n){var r=new nK;return r.restart(e,t,n),r}function oK(){XJ=($J=JJ.now())+qJ,WJ=GJ=0;try{!function(){eK(),++WJ;for(var e,t=QJ;t;)(e=XJ-t._time)>=0&&t._call.call(void 0,e),t=t._next;--WJ}()}finally{WJ=0,function(){for(var e,t,n=QJ,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:QJ=t);VJ=e,iK(r)}(),XJ=0}}function aK(){var e=JJ.now(),t=e-$J;t>1e3&&(qJ-=t,$J=e)}function iK(e){WJ||(GJ&&(GJ=clearTimeout(GJ)),e-XJ>24?(e<1/0&&(GJ=setTimeout(oK,e-JJ.now()-qJ)),HJ&&(HJ=clearInterval(HJ))):(HJ||($J=JJ.now(),HJ=setInterval(aK,1e3)),WJ=1,KJ(oK)))}function sK(e,t,n){var r=new nK;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}nK.prototype=rK.prototype={constructor:nK,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?eK():+n)+(null==t?0:+t),this._next||VJ===this||(VJ?VJ._next=this:QJ=this,VJ=this),this._call=e,this._time=n,iK()},stop:function(){this._call&&(this._call=null,this._time=1/0,iK())}};var lK=mq("start","end","cancel","interrupt"),cK=[];function uK(e,t,n,r,o,a){var i=e.__transition;if(i){if(n in i)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function a(l){var c,u,d,f;if(1!==n.state)return s();for(c in o)if((f=o[c]).name===n.name){if(3===f.state)return sK(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete o[c]):+c<t&&(f.state=6,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete o[c])}if(sK(function(){3===n.state&&(n.state=4,n.timer.restart(i,n.delay,n.time),i(l))}),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(f=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=f);r.length=u+1}}function i(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,i=r.length;++a<i;)r[a].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=rK(function(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)},0,n.time)}(e,n,{name:t,index:r,group:o,on:lK,tween:cK,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function dK(e,t){var n=pK(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function fK(e,t){var n=pK(e,t);if(n.state>3)throw new Error("too late; already running");return n}function pK(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function mK(e,t){var n,r,o,a=e.__transition,i=!0;if(a){for(o in t=null==t?null:t+"",a)(n=a[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete a[o]):i=!1;i&&delete e.__transition}}var hK,gK=180/Math.PI,yK={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wK(e,t,n,r,o,a){var i,s,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*gK,skewX:Math.atan(l)*gK,scaleX:i,scaleY:s}}function bK(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(a,i){var s=[],l=[];return a=e(a),i=e(i),function(e,r,o,a,i,s){if(e!==o||r!==a){var l=i.push("translate(",null,t,null,n);s.push({i:l-4,x:JN(e,o)},{i:l-2,x:JN(r,a)})}else(o||a)&&i.push("translate("+o+t+a+n)}(a.translateX,a.translateY,i.translateX,i.translateY,s,l),function(e,t,n,a){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(o(n)+"rotate(",null,r)-2,x:JN(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(a.rotate,i.rotate,s,l),function(e,t,n,a){e!==t?a.push({i:n.push(o(n)+"skewX(",null,r)-2,x:JN(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(a.skewX,i.skewX,s,l),function(e,t,n,r,a,i){if(e!==n||t!==r){var s=a.push(o(a)+"scale(",null,",",null,")");i.push({i:s-4,x:JN(e,n)},{i:s-2,x:JN(t,r)})}else 1===n&&1===r||a.push(o(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,i.scaleX,i.scaleY,s,l),a=i=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var vK=bK(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?yK:wK(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),xK=bK(function(e){return null==e?yK:(hK||(hK=document.createElementNS("http://www.w3.org/2000/svg","g")),hK.setAttribute("transform",e),(e=hK.transform.baseVal.consolidate())?wK((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):yK)},", ",")",")");function NK(e,t){var n,r;return function(){var o=fK(this,e),a=o.tween;if(a!==n)for(var i=0,s=(r=n=a).length;i<s;++i)if(r[i].name===t){(r=r.slice()).splice(i,1);break}o.tween=r}}function EK(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var a=fK(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}a.tween=o}}function MK(e,t,n){var r=e._id;return e.each(function(){var e=fK(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return pK(e,r).value[t]}}function _K(e,t){var n;return("number"==typeof t?JN:t instanceof kN?HN:(n=kN(t))?(t=n,HN):nE)(e,t)}function IK(e){return function(){this.removeAttribute(e)}}function SK(e){return function(){this.removeAttributeNS(e.space,e.local)}}function jK(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttribute(e);return i===a?null:i===r?o:o=t(r=i,n)}}function kK(e,t,n){var r,o,a=n+"";return function(){var i=this.getAttributeNS(e.space,e.local);return i===a?null:i===r?o:o=t(r=i,n)}}function DK(e,t,n){var r,o,a;return function(){var i,s,l=n(this);if(null!=l)return(i=this.getAttribute(e))===(s=l+"")?null:i===r&&s===o?a:(o=s,a=t(r=i,l));this.removeAttribute(e)}}function CK(e,t,n){var r,o,a;return function(){var i,s,l=n(this);if(null!=l)return(i=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:i===r&&s===o?a:(o=s,a=t(r=i,l));this.removeAttributeNS(e.space,e.local)}}function AK(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function TK(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function OK(e,t){return function(){dK(this,e).delay=+t.apply(this,arguments)}}function LK(e,t){return t=+t,function(){dK(this,e).delay=t}}function zK(e,t){return function(){fK(this,e).duration=+t.apply(this,arguments)}}function PK(e,t){return t=+t,function(){fK(this,e).duration=t}}var RK=IJ.prototype.constructor;function UK(e){return function(){this.style.removeProperty(e)}}var BK=0;function FK(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function YK(){return++BK}var ZK=IJ.prototype;FK.prototype=function(e){return IJ().transition(e)}.prototype={constructor:FK,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=gq(e));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var s,l,c=r[i],u=c.length,d=a[i]=new Array(u),f=0;f<u;++f)(s=c[f])&&(l=e.call(s,s.__data__,f,c))&&("__data__"in s&&(l.__data__=s.__data__),d[f]=l,uK(d[f],t,n,f,d,pK(s,n)));return new FK(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=wq(e));for(var r=this._groups,o=r.length,a=[],i=[],s=0;s<o;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var f,p=e.call(l,l.__data__,d,c),m=pK(l,n),h=0,g=p.length;h<g;++h)(f=p[h])&&uK(f,t,n,h,p,m);a.push(p),i.push(l)}return new FK(a,i,t,n)},selectChild:ZK.selectChild,selectChildren:ZK.selectChildren,filter:function(e){"function"!=typeof e&&(e=bq(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a,i=t[o],s=i.length,l=r[o]=[],c=0;c<s;++c)(a=i[c])&&e.call(a,a.__data__,c,i)&&l.push(a);return new FK(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=new Array(r),s=0;s<a;++s)for(var l,c=t[s],u=n[s],d=c.length,f=i[s]=new Array(d),p=0;p<d;++p)(l=c[p]||u[p])&&(f[p]=l);for(;s<r;++s)i[s]=t[s];return new FK(i,this._parents,this._name,this._id)},selection:function(){return new RK(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=YK(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i,s=r[a],l=s.length,c=0;c<l;++c)if(i=s[c]){var u=pK(i,t);uK(i,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new FK(r,this._parents,e,n)},call:ZK.call,nodes:ZK.nodes,node:ZK.node,size:ZK.size,empty:ZK.empty,each:ZK.each,on:function(e,t){var n=this._id;return arguments.length<2?pK(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,a=function(e){return(e+"").trim().split(/^|\s+/).every(function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e})}(t)?dK:fK;return function(){var i=a(this,e),s=i.on;s!==r&&(o=(r=s).copy()).on(t,n),i.on=o}}(n,e,t))},attr:function(e,t){var n=Oq(e),r="transform"===n?xK:_K;return this.attrTween(e,"function"==typeof t?(n.local?CK:DK)(n,r,MK(this,"attr."+e,t)):null==t?(n.local?SK:IK)(n):(n.local?kK:jK)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=Oq(e);return this.tween(n,(r.local?AK:TK)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?vK:_K;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var a=Vq(this,e),i=(this.style.removeProperty(e),Vq(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}(e,r)).on("end.style."+e,UK(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,a;return function(){var i=Vq(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Vq(this,e)),i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}}(e,r,MK(this,"style."+e,t))).each(function(e,t){var n,r,o,a,i="style."+t,s="end."+i;return function(){var l=fK(this,e),c=l.on,u=null==l.value[i]?a||(a=UK(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(s,o=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,a=n+"";return function(){var i=Vq(this,e);return i===a?null:i===r?o:o=t(r=i,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function a(){var a=t.apply(this,arguments);return a!==o&&(r=(o=a)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,a,n)),r}return a._value=t,a}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(MK(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=pK(this.node(),n).tween,a=0,i=o.length;a<i;++a)if((r=o[a]).name===e)return r.value;return null}return this.each((null==t?NK:EK)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?OK:LK)(t,e)):pK(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?zK:PK)(t,e)):pK(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){fK(this,e).ease=t}}(t,e)):pK(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;fK(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(a,i){var s={value:i},l={value:function(){0===--o&&a()}};n.each(function(){var n=fK(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t}),0===o&&a()})},[Symbol.iterator]:ZK[Symbol.iterator]};var QK={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function VK(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}IJ.prototype.interrupt=function(e){return this.each(function(){mK(this,e)})},IJ.prototype.transition=function(e){var t,n;e instanceof FK?(t=e._id,e=e._name):(t=YK(),(n=QK).time=eK(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i,s=r[a],l=s.length,c=0;c<l;++c)(i=s[c])&&uK(i,e,t,c,s,n||VK(i,t));return new FK(r,this._parents,e,t)};const WK=e=>()=>e;function GK(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function HK(e,t,n){this.k=e,this.x=t,this.y=n}HK.prototype={constructor:HK,scale:function(e){return 1===e?this:new HK(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new HK(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var $K=new HK(1,0,0);function XK(e){for(;!e.__zoom;)if(!(e=e.parentNode))return $K;return e.__zoom}function qK(e){e.stopImmediatePropagation()}function JK(e){e.preventDefault(),e.stopImmediatePropagation()}function KK(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function e0(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function t0(){return this.__zoom||$K}function n0(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function r0(){return navigator.maxTouchPoints||"ontouchstart"in this}function o0(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function a0(){var e,t,n,r=KK,o=e0,a=o0,i=n0,s=r0,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,d=ZJ,f=mq("start","zoom","end"),p=0,m=10;function h(e){e.property("__zoom",t0).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",M).filter(s).on("touchstart.zoom",_).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",S).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new HK(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new HK(e.k,r,o)}function w(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function b(e,t,n,r){e.on("start.zoom",function(){v(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){v(this,arguments).event(r).end()}).tween("zoom",function(){var e=this,a=arguments,i=v(e,a).event(r),s=o.apply(e,a),l=null==n?w(s):"function"==typeof n?n.apply(e,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,f="function"==typeof t?t.apply(e,a):t,p=d(u.invert(l).concat(c/u.k),f.invert(l).concat(c/f.k));return function(e){if(1===e)e=f;else{var t=p(e),n=c/t[2];e=new HK(n,l[0]-t[0]*n,l[1]-t[1]*n)}i.zoom(null,e)}})}function v(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function N(e,...t){if(r.apply(this,arguments)){var n=v(this,t).event(e),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,i.apply(this,arguments)))),u=jJ(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=o.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(o.k===s)return;n.mouse=[u,o.invert(u)],mK(this),n.start()}JK(e),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(y(g(o,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function E(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,i=v(this,t,!0).event(e),s=SJ(e.view).on("mousemove.zoom",function(e){if(JK(e),!i.moved){var t=e.clientX-u,n=e.clientY-d;i.moved=t*t+n*n>p}i.event(e).zoom("mouse",a(y(i.that.__zoom,i.mouse[0]=jJ(e,o),i.mouse[1]),i.extent,c))},!0).on("mouseup.zoom",function(e){s.on("mousemove.zoom mouseup.zoom",null),OJ(e.view,i.moved),JK(e),i.event(e).end()},!0),l=jJ(e,o),u=e.clientX,d=e.clientY;TJ(e.view),qK(e),i.mouse=[l,this.__zoom.invert(l)],mK(this),i.start()}}function M(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,i=jJ(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(i),l=n.k*(e.shiftKey?.5:2),d=a(y(g(n,l),i,s),o.apply(this,t),c);JK(e),u>0?SJ(this).transition().duration(u).call(b,d,i,e):SJ(this).call(h.transform,d,i,e)}}function _(n,...o){if(r.apply(this,arguments)){var a,i,s,l,c=n.touches,u=c.length,d=v(this,o,n.changedTouches.length===u).event(n);for(qK(n),i=0;i<u;++i)l=[l=jJ(s=c[i],this),this.__zoom.invert(l),s.identifier],d.touch0?d.touch1||d.touch0[2]===l[2]||(d.touch1=l,d.taps=0):(d.touch0=l,a=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(d.taps<2&&(t=l[0],e=setTimeout(function(){e=null},500)),mK(this),d.start())}}function I(e,...t){if(this.__zooming){var n,r,o,i,s=v(this,t).event(e),l=e.changedTouches,u=l.length;for(JK(e),n=0;n<u;++n)o=jJ(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=o);if(r=s.that.__zoom,s.touch1){var d=s.touch0[0],f=s.touch0[1],p=s.touch1[0],m=s.touch1[1],h=(h=p[0]-d[0])*h+(h=p[1]-d[1])*h,w=(w=m[0]-f[0])*w+(w=m[1]-f[1])*w;r=g(r,Math.sqrt(h/w)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],i=[(f[0]+m[0])/2,(f[1]+m[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],i=s.touch0[1]}s.zoom("touch",a(y(r,o,i),s.extent,c))}}function S(e,...r){if(this.__zooming){var o,a,i=v(this,r).event(e),s=e.changedTouches,l=s.length;for(qK(e),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),o=0;o<l;++o)a=s[o],i.touch0&&i.touch0[2]===a.identifier?delete i.touch0:i.touch1&&i.touch1[2]===a.identifier&&delete i.touch1;if(i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0)i.touch0[1]=this.__zoom.invert(i.touch0[0]);else if(i.end(),2===i.taps&&(a=jJ(a,this),Math.hypot(t[0]-a[0],t[1]-a[1])<m)){var c=SJ(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return h.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",t0),e!==o?b(e,t,n,r):o.interrupt().each(function(){v(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()})},h.scaleBy=function(e,t,n,r){h.scaleTo(e,function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)},n,r)},h.scaleTo=function(e,t,n,r){h.transform(e,function(){var e=o.apply(this,arguments),r=this.__zoom,i=null==n?w(e):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(i),l="function"==typeof t?t.apply(this,arguments):t;return a(y(g(r,l),i,s),e,c)},n,r)},h.translateBy=function(e,t,n,r){h.transform(e,function(){return a(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)},null,r)},h.translateTo=function(e,t,n,r,i){h.transform(e,function(){var e=o.apply(this,arguments),i=this.__zoom,s=null==r?w(e):"function"==typeof r?r.apply(this,arguments):r;return a($K.translate(s[0],s[1]).scale(i.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)},r,i)},x.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=SJ(this.that).datum();f.call(e,this.that,new GK(e,{sourceEvent:this.sourceEvent,target:h,type:e,transform:this.that.__zoom,dispatch:f}),t)}},h.wheelDelta=function(e){return arguments.length?(i="function"==typeof e?e:WK(+e),h):i},h.filter=function(e){return arguments.length?(r="function"==typeof e?e:WK(!!e),h):r},h.touchable=function(e){return arguments.length?(s="function"==typeof e?e:WK(!!e),h):s},h.extent=function(e){return arguments.length?(o="function"==typeof e?e:WK([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),h):o},h.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],h):[l[0],l[1]]},h.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],h):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},h.constrain=function(e){return arguments.length?(a=e,h):a},h.duration=function(e){return arguments.length?(u=+e,h):u},h.interpolate=function(e){return arguments.length?(d=e,h):d},h.on=function(){var e=f.on.apply(f,arguments);return e===f?h:e},h.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,h):Math.sqrt(p)},h.tapDistance=function(e){return arguments.length?(m=+e,h):m},h}XK.prototype=HK.prototype;const i0=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],s0=["Enter"," ","Escape"],l0={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var c0,u0,d0;!function(e){e.Strict="strict",e.Loose="loose"}(c0||(c0={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(u0||(u0={})),function(e){e.Partial="partial",e.Full="full"}(d0||(d0={}));const f0={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var p0,m0,h0;!function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(p0||(p0={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(m0||(m0={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(h0||(h0={}));const g0={[h0.Left]:h0.Right,[h0.Right]:h0.Left,[h0.Top]:h0.Bottom,[h0.Bottom]:h0.Top};function y0(e){return null===e?null:e?"valid":"invalid"}const w0=e=>"id"in e&&"source"in e&&"target"in e,b0=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),v0=(e,t=[0,0])=>{const{width:n,height:r}=W0(e),o=e.origin??t,a=n*o[0],i=r*o[1];return{x:e.position.x-a,y:e.position.y-i}},x0=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(void 0===t.filter||t.filter(e))&&(n=k0(n,T0(e)),r=!0)}),r?C0(n):{x:0,y:0,width:0,height:0}},N0=(e,t,[n,r,o]=[0,0,1],a=!1,i=!1)=>{const s={...B0(t,[n,r,o]),width:t.width/o,height:t.height/o},l=[];for(const t of e.values()){const{measured:e,selectable:n=!0,hidden:r=!1}=t;if(i&&!n||r)continue;const o=e.width??t.width??t.initialWidth??null,c=e.height??t.height??t.initialHeight??null,u=L0(s,A0(t)),d=(o??0)*(c??0),f=a&&u>0;(!t.internals.handleBounds||f||u>=d||t.dragging)&&l.push(t)}return l};function E0({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:a}){const i=n.get(e),s=i.parentId?n.get(i.parentId):void 0,{x:l,y:c}=s?s.internals.positionAbsolute:{x:0,y:0},u=i.origin??r;let d=i.extent||o;if("parent"!==i.extent||i.expandParent)s&&V0(i.extent)&&(d=[[i.extent[0][0]+l,i.extent[0][1]+c],[i.extent[1][0]+l,i.extent[1][1]+c]]);else if(s){const e=s.measured.width,t=s.measured.height;e&&t&&(d=[[l,c],[l+e,c+t]])}else a?.("005","Only child nodes can use a parent extent.");const f=V0(d)?_0(t,d,i.measured):t;return void 0!==i.measured.width&&void 0!==i.measured.height||a?.("015","It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."),{position:{x:f.x-l+(i.measured.width??0)*u[0],y:f.y-c+(i.measured.height??0)*u[1]},positionAbsolute:f}}const M0=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),_0=(e={x:0,y:0},t,n)=>({x:M0(e.x,t[0][0],t[1][0]-(n?.width??0)),y:M0(e.y,t[0][1],t[1][1]-(n?.height??0))});function I0(e,t,n){const{width:r,height:o}=W0(n),{x:a,y:i}=n.internals.positionAbsolute;return _0(e,[[a,i],[a+r,i+o]],t)}const S0=(e,t,n)=>e<t?M0(Math.abs(e-t),1,t)/t:e>n?-M0(Math.abs(e-n),1,t)/t:0,j0=(e,t,n=15,r=40)=>[S0(e.x,r,t.width-r)*n,S0(e.y,r,t.height-r)*n],k0=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),D0=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),C0=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),A0=(e,t=[0,0])=>{const{x:n,y:r}=b0(e)?e.internals.positionAbsolute:v0(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},T0=(e,t=[0,0])=>{const{x:n,y:r}=b0(e)?e.internals.positionAbsolute:v0(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},O0=(e,t)=>C0(k0(D0(e),D0(t))),L0=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},z0=e=>P0(e.width)&&P0(e.height)&&P0(e.x)&&P0(e.y),P0=e=>!isNaN(e)&&isFinite(e),R0=(e,t)=>{},U0=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),B0=({x:e,y:t},[n,r,o],a=!1,i=[1,1])=>{const s={x:(e-n)/o,y:(t-r)/o};return a?U0(s,i):s},F0=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function Y0(e,t){if("number"==typeof e)return Math.floor(.5*(t-t/(1+e)));if("string"==typeof e&&e.endsWith("px")){const t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if("string"==typeof e&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}const Z0=(e,t,n,r,o,a)=>{const i=function(e,t,n){if("string"==typeof e||"number"==typeof e){const r=Y0(e,n),o=Y0(e,t);return{top:r,right:o,bottom:r,left:o,x:2*o,y:2*r}}if("object"==typeof e){const r=Y0(e.top??e.y??0,n),o=Y0(e.bottom??e.y??0,n),a=Y0(e.left??e.x??0,t),i=Y0(e.right??e.x??0,t);return{top:r,right:i,bottom:o,left:a,x:a+i,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(a,t,n),s=(t-i.x)/e.width,l=(n-i.y)/e.height,c=Math.min(s,l),u=M0(c,r,o),d=t/2-(e.x+e.width/2)*u,f=n/2-(e.y+e.height/2)*u,p=function(e,t,n,r,o,a){const{x:i,y:s}=F0(e,[t,n,r]),{x:l,y:c}=F0({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=o-l,d=a-c;return{left:Math.floor(i),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}(e,d,f,u,t,n),m=Math.min(p.left-i.left,0),h=Math.min(p.top-i.top,0);return{x:d-m+Math.min(p.right-i.right,0),y:f-h+Math.min(p.bottom-i.bottom,0),zoom:u}},Q0=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function V0(e){return null!=e&&"parent"!==e}function W0(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function G0(e){return void 0!==(e.measured?.width??e.width??e.initialWidth)&&void 0!==(e.measured?.height??e.height??e.initialHeight)}function H0(e,t={width:0,height:0},n,r,o){const a={...e},i=r.get(n);if(i){const e=i.origin||o;a.x+=i.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=i.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function $0(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function X0(e){return{...l0,...e||{}}}function q0(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:a,y:i}=r1(e),s=B0({x:a-(o?.left??0),y:i-(o?.top??0)},r),{x:l,y:c}=n?U0(s,t):s;return{xSnapped:l,ySnapped:c,...s}}const J0=e=>({width:e.offsetWidth,height:e.offsetHeight}),K0=e=>e?.getRootNode?.()||window?.document,e1=["INPUT","SELECT","TEXTAREA"];function t1(e){const t=e.composedPath?.()?.[0]||e.target;return 1===t?.nodeType&&(e1.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey"))}const n1=e=>"clientX"in e,r1=(e,t)=>{const n=n1(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},o1=(e,t,n,r,o)=>{const a=t.querySelectorAll(`.${e}`);return a&&a.length?Array.from(a).map(t=>{const a=t.getBoundingClientRect();return{id:t.getAttribute("data-handleid"),type:e,nodeId:o,position:t.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...J0(t)}}):null};function a1({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:a,targetControlX:i,targetControlY:s}){const l=.125*e+.375*o+.375*i+.125*n,c=.125*t+.375*a+.375*s+.125*r;return[l,c,Math.abs(l-e),Math.abs(c-t)]}function i1(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function s1({pos:e,x1:t,y1:n,x2:r,y2:o,c:a}){switch(e){case h0.Left:return[t-i1(t-r,a),n];case h0.Right:return[t+i1(r-t,a),n];case h0.Top:return[t,n-i1(n-o,a)];case h0.Bottom:return[t,n+i1(o-n,a)]}}function l1({sourceX:e,sourceY:t,sourcePosition:n=h0.Bottom,targetX:r,targetY:o,targetPosition:a=h0.Top,curvature:i=.25}){const[s,l]=s1({pos:n,x1:e,y1:t,x2:r,y2:o,c:i}),[c,u]=s1({pos:a,x1:r,y1:o,x2:e,y2:t,c:i}),[d,f,p,m]=a1({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${s},${l} ${c},${u} ${r},${o}`,d,f,p,m]}function c1({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,a=n<e?n+o:n-o,i=Math.abs(r-t)/2;return[a,r<t?r+i:r-i,o,i]}function u1({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const a=k0(T0(e),T0(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const i={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return L0(i,C0(a))>0}const d1=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,f1=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||d1;let o;return o=w0(e)?{...e}:{...e,id:r(e)},((e,t)=>t.some(t=>!(t.source!==e.source||t.target!==e.target||t.sourceHandle!==e.sourceHandle&&(t.sourceHandle||e.sourceHandle)||t.targetHandle!==e.targetHandle&&(t.targetHandle||e.targetHandle))))(o,t)?t:(null===o.sourceHandle&&delete o.sourceHandle,null===o.targetHandle&&delete o.targetHandle,t.concat(o))};function p1({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,a,i,s]=c1({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,a,i,s]}const m1={[h0.Left]:{x:-1,y:0},[h0.Right]:{x:1,y:0},[h0.Top]:{x:0,y:-1},[h0.Bottom]:{x:0,y:1}},h1=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function g1(e,t,n,r){const o=Math.min(h1(e,t)/2,h1(t,n)/2,r),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i)return`L ${a+o*(e.x<n.x?-1:1)},${i}Q ${a},${i} ${a},${i+o*(e.y<n.y?1:-1)}`;const s=e.x<n.x?1:-1;return`L ${a},${i+o*(e.y<n.y?-1:1)}Q ${a},${i} ${a+o*s},${i}`}function y1({sourceX:e,sourceY:t,sourcePosition:n=h0.Bottom,targetX:r,targetY:o,targetPosition:a=h0.Top,borderRadius:i=5,centerX:s,centerY:l,offset:c=20,stepPosition:u=.5}){const[d,f,p,m,h]=function({source:e,sourcePosition:t=h0.Bottom,target:n,targetPosition:r=h0.Top,center:o,offset:a,stepPosition:i}){const s=m1[t],l=m1[r],c={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+l.x*a,y:n.y+l.y*a},d=(({source:e,sourcePosition:t=h0.Bottom,target:n})=>t===h0.Left||t===h0.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1})({source:c,sourcePosition:t,target:u}),f=0!==d.x?"x":"y",p=d[f];let m,h,g=[];const y={x:0,y:0},w={x:0,y:0},[,,b,v]=c1({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*l[f]===-1){"x"===f?(m=o.x??c.x+(u.x-c.x)*i,h=o.y??(c.y+u.y)/2):(m=o.x??(c.x+u.x)/2,h=o.y??c.y+(u.y-c.y)*i);const e=[{x:m,y:c.y},{x:m,y:u.y}],t=[{x:c.x,y:h},{x:u.x,y:h}];g=s[f]===p?"x"===f?e:t:"x"===f?t:e}else{const o=[{x:c.x,y:u.y}],i=[{x:u.x,y:c.y}];if(g="x"===f?s.x===p?i:o:s.y===p?o:i,t===r){const t=Math.abs(e[f]-n[f]);if(t<=a){const r=Math.min(a-1,a-t);s[f]===p?y[f]=(c[f]>e[f]?-1:1)*r:w[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){const e="x"===f?"y":"x",t=s[f]===l[e],n=c[e]>u[e],r=c[e]<u[e];(1===s[f]&&(!t&&n||t&&r)||1!==s[f]&&(!t&&r||t&&n))&&(g="x"===f?o:i)}const d={x:c.x+y.x,y:c.y+y.y},b={x:u.x+w.x,y:u.y+w.y};Math.max(Math.abs(d.x-g[0].x),Math.abs(b.x-g[0].x))>=Math.max(Math.abs(d.y-g[0].y),Math.abs(b.y-g[0].y))?(m=(d.x+b.x)/2,h=g[0].y):(m=g[0].x,h=(d.y+b.y)/2)}const x={x:c.x+y.x,y:c.y+y.y},N={x:u.x+w.x,y:u.y+w.y};return[[e,...x.x!==g[0].x||x.y!==g[0].y?[x]:[],...g,...N.x!==g[g.length-1].x||N.y!==g[g.length-1].y?[N]:[],n],m,h,b,v]}({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:a,center:{x:s,y:l},offset:c,stepPosition:u});let g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=g1(d[e-1],d[e],d[e+1],i);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function w1(e){return e&&!(!e.internals.handleBounds&&!e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function b1(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,"source"===r.type?t.push(r):"target"===r.type&&n.push(r);return{source:t,target:n}}function v1(e,t,n=h0.Left,r=!1){const o=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:i,height:s}=t??W0(e);if(r)return{x:o+i/2,y:a+s/2};switch(t?.position??n){case h0.Top:return{x:o+i/2,y:a};case h0.Right:return{x:o+i,y:a+s/2};case h0.Bottom:return{x:o+i/2,y:a+s};case h0.Left:return{x:o,y:a+s/2}}}function x1(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function N1(e,t){return e?"string"==typeof e?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`:""}const E1={nodeOrigin:[0,0],nodeExtent:i0,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},M1={...E1,checkEquality:!0};function _1(e,t){const n={...e};for(const e in t)void 0!==t[e]&&(n[e]=t[e]);return n}function I1(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;const n=[],r=[];for(const t of e.handles){const o={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};"source"===t.type?n.push(o):"target"===t.type&&r.push(o)}return{source:n,target:r}}function S1(e){return"manual"===e}function j1(e,t,n,r={}){const o=_1(M1,r),a={i:0},i=new Map(t),s=o?.elevateNodesOnSelect&&!S1(o.zIndexMode)?1e3:0;let l=e.length>0,c=!1;t.clear(),n.clear();for(const u of e){let e=i.get(u.id);if(o.checkEquality&&u===e?.internals.userNode)t.set(u.id,e);else{const n=v0(u,o.nodeOrigin),r=V0(u.extent)?u.extent:o.nodeExtent,a=_0(n,r,W0(u));e={...o.defaults,...u,measured:{width:u.measured?.width,height:u.measured?.height},internals:{positionAbsolute:a,handleBounds:I1(u,e),z:D1(u,s,o.zIndexMode),userNode:u}},t.set(u.id,e)}void 0!==e.measured&&void 0!==e.measured.width&&void 0!==e.measured.height||e.hidden||(l=!1),u.parentId&&k1(e,t,n,r,a),c||=u.selected??!1}return{nodesInitialized:l,hasSelectedNodes:c}}function k1(e,t,n,r,o){const{elevateNodesOnSelect:a,nodeOrigin:i,nodeExtent:s,zIndexMode:l}=_1(E1,r),c=e.parentId,u=t.get(c);if(!u)return void console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);!function(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}(e,n),o&&!u.parentId&&void 0===u.internals.rootParentIndex&&"auto"===l&&(u.internals.rootParentIndex=++o.i,u.internals.z=u.internals.z+10*o.i),o&&void 0!==u.internals.rootParentIndex&&(o.i=u.internals.rootParentIndex);const d=a&&!S1(l)?1e3:0,{x:f,y:p,z:m}=function(e,t,n,r,o,a){const{x:i,y:s}=t.internals.positionAbsolute,l=W0(e),c=v0(e,n),u=V0(e.extent)?_0(c,e.extent,l):c;let d=_0({x:i+u.x,y:s+u.y},r,l);"parent"===e.extent&&(d=I0(d,l,t));const f=D1(e,o,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}(e,u,i,s,d,l),{positionAbsolute:h}=e.internals,g=f!==h.x||p!==h.y;(g||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:g?{x:f,y:p}:h,z:m}})}function D1(e,t,n){const r=P0(e.zIndex)?e.zIndex:0;return S1(n)?r:r+(e.selected?t:0)}function C1(e,t,n,r=[0,0]){const o=[],a=new Map;for(const n of e){const e=t.get(n.parentId);if(!e)continue;const r=a.get(n.parentId)?.expandedRect??A0(e),o=O0(r,n.rect);a.set(n.parentId,{expandedRect:o,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},i)=>{const s=a.internals.positionAbsolute,l=W0(a),c=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(l.width,Math.round(t.width)),p=Math.max(l.height,Math.round(t.height)),m=(f-l.width)*c[0],h=(p-l.height)*c[1];(u>0||d>0||m||h)&&(o.push({id:i,type:"position",position:{x:a.position.x-u+m,y:a.position.y-d+h}}),n.get(i)?.forEach(t=>{e.some(e=>e.id===t.id)||o.push({id:t.id,type:"position",position:{x:t.position.x+u,y:t.position.y+d}})})),(l.width<t.width||l.height<t.height||u||d)&&o.push({id:i,type:"dimensions",setAttributes:!0,dimensions:{width:f+(u?c[0]*u-m:0),height:p+(d?c[1]*d-h:0)}})}),o}function A1(e,t,n,r,o,a){let i=o;const s=r.get(i)||new Map;r.set(i,s.set(n,t)),i=`${o}-${e}`;const l=r.get(i)||new Map;if(r.set(i,l.set(n,t)),a){i=`${o}-${e}-${a}`;const s=r.get(i)||new Map;r.set(i,s.set(n,t))}}function T1(e,t,n){e.clear(),t.clear();for(const r of n){const{source:n,target:o,sourceHandle:a=null,targetHandle:i=null}=r,s={edgeId:r.id,source:n,target:o,sourceHandle:a,targetHandle:i},l=`${n}-${a}--${o}-${i}`;A1("source",s,`${o}-${i}--${n}-${a}`,e,n,a),A1("target",s,l,e,o,i),t.set(r.id,r)}}function O1(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return!!n&&(!!n.selected||O1(n,t))}function L1(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function z1({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){const o=[];for(const[e,a]of t){const t=n.get(e)?.internals.userNode;t&&o.push({...t,position:a.position,dragging:r})}if(!e)return[o[0],o];const a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:o[0],o]}function P1(e,t,n,r,o,a=!1){const i=r.get(e);if(!i)return null;const s="strict"===o?i.internals.handleBounds?.[t]:[...i.internals.handleBounds?.source??[],...i.internals.handleBounds?.target??[]],l=(n?s?.find(e=>e.id===n):s?.[0])??null;return l&&a?{...l,...v1(i,l,l.position,!0)}:l}function R1(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}const U1=()=>!0;function B1(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:a,doc:i,lib:s,flowId:l,isValidConnection:c=U1,nodeLookup:u}){const d="target"===a,f=t?i.querySelector(`.${s}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=r1(e),h=i.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,y={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){const e=R1(void 0,g),t=g.getAttribute("data-nodeid"),a=g.getAttribute("data-handleid"),i=g.classList.contains("connectable"),s=g.classList.contains("connectableend");if(!t||!e)return y;const l={source:d?t:r,sourceHandle:d?a:o,target:d?r:t,targetHandle:d?o:a};y.connection=l;const f=i&&s&&(n===c0.Strict?d&&"source"===e||!d&&"target"===e:t!==r||a!==o);y.isValid=f&&c(l),y.toHandle=P1(t,e,a,u,n,!0)}return y}const F1={onPointerDown:function(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:a,isTarget:i,domNode:s,nodeLookup:l,lib:c,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:y=U1,onReconnectEnd:w,updateConnection:b,getTransform:v,getFromHandle:x,autoPanSpeed:N,dragThreshold:E=1,handleDomNode:M}){const _=K0(e.target);let I,S=0;const{x:j,y:k}=r1(e),D=R1(a,M),C=s?.getBoundingClientRect();let A=!1;if(!C||!D)return;const T=P1(o,D,r,l,t);if(!T)return;let O=r1(e,C),L=!1,z=null,P=!1,R=null;function U(){if(!u||!C)return;const[e,t]=j0(O,C,N);f({x:e,y:t}),S=requestAnimationFrame(U)}const B={...T,nodeId:o,type:D,position:T.position},F=l.get(o);let Y={inProgress:!0,isValid:null,from:v1(F,B,h0.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:F,to:O,toHandle:null,toPosition:g0[B.position],toNode:null,pointer:O};function Z(){A=!0,b(Y),m?.(e,{nodeId:o,handleId:r,handleType:D})}function Q(e){if(!A){const{x:t,y:n}=r1(e),r=t-j,o=n-k;if(!(r*r+o*o>E*E))return;Z()}if(!x()||!B)return void V(e);const a=v();O=r1(e,C),I=function(e,t,n,r){let o=[],a=1/0;const i=function(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:2*n,height:2*n};for(const e of t.values())L0(o,A0(e))>0&&r.push(e);return r}(e,n,t+250);for(const n of i){const i=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(const s of i){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;const{x:i,y:l}=v1(n,s,s.position,!0),c=Math.sqrt(Math.pow(i-e.x,2)+Math.pow(l-e.y,2));c>t||(c<a?(o=[{...s,x:i,y:l}],a=c):c===a&&o.push({...s,x:i,y:l}))}}if(!o.length)return null;if(o.length>1){const e="source"===r.type?"target":"source";return o.find(t=>t.type===e)??o[0]}return o[0]}(B0(O,a,!1,[1,1]),n,l,B),L||(U(),L=!0);const s=B1(e,{handle:I,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:i?"target":"source",isValidConnection:y,doc:_,lib:c,flowId:d,nodeLookup:l});R=s.handleDomNode,z=s.connection,P=function(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}(!!I,s.isValid);const u=l.get(o),f=u?v1(u,B,h0.Left,!0):Y.from,p={...Y,from:f,isValid:P,to:s.toHandle&&P?F0({x:s.toHandle.x,y:s.toHandle.y},a):O,toHandle:s.toHandle,toPosition:P&&s.toHandle?s.toHandle.position:g0[B.position],toNode:s.toHandle?l.get(s.toHandle.nodeId):null,pointer:O};b(p),Y=p}function V(e){if(!("touches"in e&&e.touches.length>0)){if(A){(I||R)&&z&&P&&h?.(z);const{inProgress:t,...n}=Y,r={...n,toPosition:Y.toHandle?Y.toPosition:null};g?.(e,r),a&&w?.(e,r)}p(),cancelAnimationFrame(S),L=!1,P=!1,z=null,R=null,_.removeEventListener("mousemove",Q),_.removeEventListener("mouseup",V),_.removeEventListener("touchmove",Q),_.removeEventListener("touchend",V)}}0===E&&Z(),_.addEventListener("mousemove",Q),_.addEventListener("mouseup",V),_.addEventListener("touchmove",Q),_.addEventListener("touchend",V)},isValid:B1},Y1=e=>({x:e.x,y:e.y,zoom:e.k}),Z1=({x:e,y:t,zoom:n})=>$K.translate(e,t).scale(n),Q1=(e,t)=>e.target.closest(`.${t}`),V1=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),W1=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,G1=(e,t=0,n=W1,r=()=>{})=>{const o="number"==typeof t&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},H1=e=>{const t=e.ctrlKey&&Q0()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t};function $1({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:a,onPanZoomStart:i,onPanZoomEnd:s,onDraggingChange:l}){const c={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},u=e.getBoundingClientRect(),d=a0().scaleExtent([t,n]).translateExtent(r),f=SJ(e).call(d);y({x:o.x,y:o.y,zoom:M0(o.zoom,t,n)},[[0,0],[u.width,u.height]],r);const p=f.on("wheel.zoom"),m=f.on("dblclick.zoom");function h(e,t){return f?new Promise(n=>{d?.interpolate("linear"===t?.interpolate?oE:ZJ).transform(G1(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function g(){d.on("zoom",null)}async function y(e,t,n){const r=Z1(e),o=d?.constrain()(r,t,n);return o&&await h(o),new Promise(e=>e(o))}return d.wheelDelta(H1),{update:function({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:o,panOnDrag:u,panOnScrollMode:h,panOnScrollSpeed:y,preventScrolling:w,zoomOnPinch:b,zoomOnScroll:v,zoomOnDoubleClick:x,zoomActivationKeyPressed:N,lib:E,onTransformChange:M,connectionInProgress:_,paneClickDistance:I,selectionOnDrag:S}){r&&!c.isZoomingOrPanning&&g();const j=o&&!N&&!r;d.clickDistance(S?1/0:!P0(I)||I<0?0:I);const k=j?function({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:a,zoomOnPinch:i,onPanZoomStart:s,onPanZoom:l,onPanZoomEnd:c}){return u=>{if(Q1(u,t))return u.ctrlKey&&u.preventDefault(),!1;u.preventDefault(),u.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(u.ctrlKey&&i){const e=jJ(u),t=H1(u),o=d*Math.pow(2,t);return void r.scaleTo(n,o,e,u)}const f=1===u.deltaMode?20:1;let p=o===u0.Vertical?0:u.deltaX*f,m=o===u0.Horizontal?0:u.deltaY*f;!Q0()&&u.shiftKey&&o!==u0.Vertical&&(p=u.deltaY*f,m=0),r.translateBy(n,-p/d*a,-m/d*a,{internal:!0});const h=Y1(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l?.(u,h),e.panScrollTimeout=setTimeout(()=>{c?.(u,h),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(u,h))}}({zoomPanValues:c,noWheelClassName:e,d3Selection:f,d3Zoom:d,panOnScrollMode:h,panOnScrollSpeed:y,zoomOnPinch:b,onPanZoomStart:i,onPanZoom:a,onPanZoomEnd:s}):function({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const a="wheel"===r.type,i=!t&&a&&!r.ctrlKey,s=Q1(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),i||s)return null;r.preventDefault(),n.call(this,r,o)}}({noWheelClassName:e,preventScrolling:w,d3ZoomHandler:p});if(f.on("wheel.zoom",k,{passive:!1}),!r){const e=function({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;const o=Y1(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,"mousedown"===r.sourceEvent?.type&&t(!0),n&&n?.(r.sourceEvent,o)}}({zoomPanValues:c,onDraggingChange:l,onPanZoomStart:i});d.on("start",e);const t=function({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return a=>{e.usedRightMouseButton=!(!n||!V1(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),o&&!a.sourceEvent?.internal&&o?.(a.sourceEvent,Y1(a.transform))}}({zoomPanValues:c,panOnDrag:u,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:M});d.on("zoom",t);const r=function({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:a}){return i=>{if(!i.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,a&&V1(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&a(i.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const t=Y1(i.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(i.sourceEvent,t)},n?150:0)}}}({zoomPanValues:c,panOnDrag:u,panOnScroll:o,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:l});d.on("end",r)}const D=function({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:a,userSelectionActive:i,noWheelClassName:s,noPanClassName:l,lib:c,connectionInProgress:u}){return d=>{const f=e||t,p=n&&d.ctrlKey,m="wheel"===d.type;if(1===d.button&&"mousedown"===d.type&&(Q1(d,`${c}-flow__node`)||Q1(d,`${c}-flow__edge`)))return!0;if(!(r||f||o||a||n))return!1;if(i)return!1;if(u&&!m)return!1;if(Q1(d,s)&&m)return!1;if(Q1(d,l)&&(!m||o&&m&&!e))return!1;if(!n&&d.ctrlKey&&m)return!1;if(!n&&"touchstart"===d.type&&d.touches?.length>1)return d.preventDefault(),!1;if(!f&&!o&&!p&&m)return!1;if(!r&&("mousedown"===d.type||"touchstart"===d.type))return!1;if(Array.isArray(r)&&!r.includes(d.button)&&"mousedown"===d.type)return!1;const h=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||m)&&h}}({zoomActivationKeyPressed:N,panOnDrag:u,zoomOnScroll:v,panOnScroll:o,zoomOnDoubleClick:x,zoomOnPinch:b,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:E,connectionInProgress:_});d.filter(D),x?f.on("dblclick.zoom",m):f.on("dblclick.zoom",null)},destroy:g,setViewport:async function(e,t){const n=Z1(e);return await h(n,t),new Promise(e=>e(n))},setViewportConstrained:y,getViewport:function(){const e=f?XK(f.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}},scaleTo:function(e,t){return f?new Promise(n=>{d?.interpolate("linear"===t?.interpolate?oE:ZJ).scaleTo(G1(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)},scaleBy:function(e,t){return f?new Promise(n=>{d?.interpolate("linear"===t?.interpolate?oE:ZJ).scaleBy(G1(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)},setScaleExtent:function(e){d?.scaleExtent(e)},setTranslateExtent:function(e){d?.translateExtent(e)},syncViewport:function(e){if(f){const t=Z1(e),n=f.property("__zoom");n.k===e.zoom&&n.x===e.x&&n.y===e.y||d?.transform(f,t,null,{sync:!0})}},setClickDistance:function(e){const t=!P0(e)||e<0?0:e;d?.clickDistance(t)}}}var X1;function q1(e){return{isHorizontal:e.includes("right")||e.includes("left"),isVertical:e.includes("bottom")||e.includes("top"),affectsX:e.includes("left"),affectsY:e.includes("top")}}function J1(e,t){return Math.max(0,t-e)}function K1(e,t){return Math.max(0,e-t)}function e2(e,t,n){return Math.max(0,t-e,e-n)}function t2(e,t){return e?!t:t}!function(e){e.Line="line",e.Handle="handle"}(X1||(X1={}));const n2={width:0,height:0,x:0,y:0},r2={...n2,pointerX:0,pointerY:0,aspectRatio:1};function o2(e,t,n){const r=t.position.x+e.position.x,o=t.position.y+e.position.y,a=e.measured.width??0,i=e.measured.height??0,s=n[0]*a,l=n[1]*i;return[[r-s,o-l],[r+a-s,o+i-l]]}function a2(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n,r=0;r<e.length;r++)""!==(n=a2(e[r]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var i2=o(9242);const s2=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach(n=>n(t,e))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},i=t=e(r,o,a);return a},{useDebugValue:l2}=w,{useSyncExternalStoreWithSelector:c2}=i2,u2=e=>e;function d2(e,t=u2,n){const r=c2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return l2(r),r}const f2=(e,t)=>{const n=(e=>e?s2(e):s2)(e),r=(e,r=t)=>d2(n,e,r);return Object.assign(r,n),r};function p2(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const m2=(0,w.createContext)(null),h2=m2.Provider,g2="[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001";function y2(e,t){const n=(0,w.useContext)(m2);if(null===n)throw new Error(g2);return d2(n,e,t)}function w2(){const e=(0,w.useContext)(m2);if(null===e)throw new Error(g2);return(0,w.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const b2={display:"none"},v2={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},x2="react-flow__node-desc",N2="react-flow__edge-desc",E2=e=>e.ariaLiveMessage,M2=e=>e.ariaLabelConfig;function _2({rfId:e}){const t=y2(E2);return(0,R.jsx)("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:v2,children:t})}function I2({rfId:e,disableKeyboardA11y:t}){const n=y2(M2);return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{id:`${x2}-${e}`,style:b2,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,R.jsx)("div",{id:`${N2}-${e}`,style:b2,children:n["edge.a11yDescription.default"]}),!t&&(0,R.jsx)(_2,{rfId:e})]})}const S2=(0,w.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...o},a)=>{const i=`${e}`.split("-");return(0,R.jsx)("div",{className:a2(["react-flow__panel",n,...i]),style:r,ref:a,...o,children:t})});function j2({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,R.jsx)(S2,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,R.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}S2.displayName="Panel";const k2=e=>{const t=[],n=[];for(const[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);for(const[,t]of e.edgeLookup)t.selected&&n.push(t);return{selectedNodes:t,selectedEdges:n}},D2=e=>e.id;function C2(e,t){return p2(e.selectedNodes.map(D2),t.selectedNodes.map(D2))&&p2(e.selectedEdges.map(D2),t.selectedEdges.map(D2))}function A2({onSelectionChange:e}){const t=w2(),{selectedNodes:n,selectedEdges:r}=y2(k2,C2);return(0,w.useEffect)(()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChangeHandlers.forEach(e=>e(o))},[n,r,e]),null}const T2=e=>!!e.onSelectionChangeHandlers;function O2({onSelectionChange:e}){const t=y2(T2);return e||t?(0,R.jsx)(A2,{onSelectionChange:e}):null}const L2="undefined"!=typeof window?w.useLayoutEffect:w.useEffect,z2=[0,0],P2={x:0,y:0,zoom:1},R2=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode","rfId"],U2=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),B2={translateExtent:i0,nodeOrigin:z2,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function F2(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:a,setNodeExtent:i,reset:s,setDefaultNodesAndEdges:l}=y2(U2,p2),c=w2();L2(()=>(l(e.defaultNodes,e.defaultEdges),()=>{u.current=B2,s()}),[]);const u=(0,w.useRef)(B2);return L2(()=>{for(const s of R2){const l=e[s];l!==u.current[s]&&void 0!==e[s]&&("nodes"===s?t(l):"edges"===s?n(l):"minZoom"===s?r(l):"maxZoom"===s?o(l):"translateExtent"===s?a(l):"nodeExtent"===s?i(l):"ariaLabelConfig"===s?c.setState({ariaLabelConfig:X0(l)}):"fitView"===s?c.setState({fitViewQueued:l}):"fitViewOptions"===s?c.setState({fitViewOptions:l}):c.setState({[s]:l}))}u.current=e},R2.map(t=>e[t])),null}function Y2(){return"undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}const Z2="undefined"!=typeof document?document:null;function Q2(e=null,t={target:Z2,actInsideInputWithModifier:!0}){const[n,r]=(0,w.useState)(!1),o=(0,w.useRef)(!1),a=(0,w.useRef)(new Set([])),[i,s]=(0,w.useMemo)(()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter(e=>"string"==typeof e).map(e=>e.replace("+","\n").replace("\n\n","\n+").split("\n")),n=t.reduce((e,t)=>e.concat(...t),[]);return[t,n]}return[[],[]]},[e]);return(0,w.useEffect)(()=>{const n=t?.target??Z2,l=t?.actInsideInputWithModifier??!0;if(null!==e){const e=e=>{if(o.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!o.current||o.current&&!l)&&t1(e))return!1;const n=W2(e.code,s);if(a.current.add(e[n]),V2(i,a.current,!1)){const n=e.composedPath?.()?.[0]||e.target,a="BUTTON"===n?.nodeName||"A"===n?.nodeName;!1===t.preventDefault||!o.current&&a||e.preventDefault(),r(!0)}},c=e=>{const t=W2(e.code,s);V2(i,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),"Meta"===e.key&&a.current.clear(),o.current=!1},u=()=>{a.current.clear(),r(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",c),window.addEventListener("blur",u),window.addEventListener("contextmenu",u),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",c),window.removeEventListener("blur",u),window.removeEventListener("contextmenu",u)}}},[e,r]),n}function V2(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function W2(e,t){return t.includes(e)?"code":"key"}function G2(e,t){const n=[],r=new Map,o=[];for(const t of e)if("add"!==t.type)if("remove"===t.type||"replace"===t.type)r.set(t.id,[t]);else{const e=r.get(t.id);e?e.push(t):r.set(t.id,[t])}else o.push(t);for(const e of t){const t=r.get(e.id);if(!t){n.push(e);continue}if("remove"===t[0].type)continue;if("replace"===t[0].type){n.push({...t[0].item});continue}const o={...e};for(const e of t)H2(e,o);n.push(o)}return o.length&&o.forEach(e=>{void 0!==e.index?n.splice(e.index,0,{...e.item}):n.push({...e.item})}),n}function H2(e,t){switch(e.type){case"select":t.selected=e.selected;break;case"position":void 0!==e.position&&(t.position=e.position),void 0!==e.dragging&&(t.dragging=e.dragging);break;case"dimensions":void 0!==e.dimensions&&(t.measured={...e.dimensions},e.setAttributes&&(!0!==e.setAttributes&&"width"!==e.setAttributes||(t.width=e.dimensions.width),!0!==e.setAttributes&&"height"!==e.setAttributes||(t.height=e.dimensions.height))),"boolean"==typeof e.resizing&&(t.resizing=e.resizing)}}function $2(e,t){return G2(e,t)}function X2(e,t){return G2(e,t)}function q2(e,t){return{id:e,type:"select",selected:t}}function J2(e,t=new Set,n=!1){const r=[];for(const[o,a]of e){const e=t.has(o);void 0===a.selected&&!e||a.selected===e||(n&&(a.selected=e),r.push(q2(a.id,e)))}return r}function K2({items:e=[],lookup:t}){const n=[],r=new Map(e.map(e=>[e.id,e]));for(const[r,o]of e.entries()){const e=t.get(o.id),a=e?.internals?.userNode??e;void 0!==a&&a!==o&&n.push({id:o.id,item:o,type:"replace"}),void 0===a&&n.push({item:o,type:"add",index:r})}for(const[e]of t)void 0===r.get(e)&&n.push({id:e,type:"remove"});return n}function e4(e){return{id:e.id,type:"remove"}}const t4=e=>(e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e))(e);function n4(e){return(0,w.forwardRef)(e)}function r4(e){const[t,n]=(0,w.useState)(BigInt(0)),[r]=(0,w.useState)(()=>function(){let e=[];return{get:()=>e,reset:()=>{e=[]},push:t=>{e.push(t),n(e=>e+BigInt(1))}}}());return L2(()=>{const t=r.get();t.length&&(e(t),r.reset())},[t]),r}const o4=(0,w.createContext)(null);function a4({children:e}){const t=w2(),n=(0,w.useCallback)(e=>{const{nodes:n=[],setNodes:r,hasDefaultNodes:o,onNodesChange:a,nodeLookup:i,fitViewQueued:s,onNodesChangeMiddlewareMap:l}=t.getState();let c=n;for(const t of e)c="function"==typeof t?t(c):t;let u=K2({items:c,lookup:i});for(const e of l.values())u=e(u);o&&r(c),u.length>0?a?.(u):s&&window.requestAnimationFrame(()=>{const{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[]),r=r4(n),o=(0,w.useCallback)(e=>{const{edges:n=[],setEdges:r,hasDefaultEdges:o,onEdgesChange:a,edgeLookup:i}=t.getState();let s=n;for(const t of e)s="function"==typeof t?t(s):t;o?r(s):a&&a(K2({items:s,lookup:i}))},[]),a=r4(o),i=(0,w.useMemo)(()=>({nodeQueue:r,edgeQueue:a}),[]);return(0,R.jsx)(o4.Provider,{value:i,children:e})}const i4=e=>!!e.panZoom;function s4(){const e=(()=>{const e=w2();return(0,w.useMemo)(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:r}=e.getState();return r?r.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,o,a],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:o,minZoom:a,maxZoom:i,panZoom:s}=e.getState(),l=Z0(t,r,o,a,i,n?.padding??.1);return s?(await s.setViewport(l,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:r,snapGrid:o,snapToGrid:a,domNode:i}=e.getState();if(!i)return t;const{x:s,y:l}=i.getBoundingClientRect(),c={x:t.x-s,y:t.y-l},u=n.snapGrid??o,d=n.snapToGrid??a;return B0(c,r,d,u)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:a}=r.getBoundingClientRect(),i=F0(t,n);return{x:i.x+o,y:i.y+a}}}),[])})(),t=w2(),n=function(){const e=(0,w.useContext)(o4);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}(),r=y2(i4),o=(0,w.useMemo)(()=>{const e=e=>t.getState().nodeLookup.get(e),r=e=>{n.nodeQueue.push(e)},o=e=>{n.edgeQueue.push(e)},a=e=>{const{nodeLookup:n,nodeOrigin:r}=t.getState(),o=t4(e)?e:n.get(e.id),a=o.parentId?H0(o.position,o.measured,o.parentId,n,r):o.position,i={...o,position:a,width:o.measured?.width??o.width,height:o.measured?.height??o.height};return A0(i)},i=(e,t,n={replace:!1})=>{r(r=>r.map(r=>{if(r.id===e){const e="function"==typeof t?t(r):t;return n.replace&&t4(e)?e:{...r,...e}}return r}))},s=(e,t,n={replace:!1})=>{o(r=>r.map(r=>{if(r.id===e){const e="function"==typeof t?t(r):t;return n.replace&&w0(e)?e:{...r,...e}}return r}))};return{getNodes:()=>t.getState().nodes.map(e=>({...e})),getNode:t=>e(t)?.internals.userNode,getInternalNode:e,getEdges:()=>{const{edges:e=[]}=t.getState();return e.map(e=>({...e}))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:r,setEdges:o,addNodes:e=>{const t=Array.isArray(e)?e:[e];n.nodeQueue.push(e=>[...e,...t])},addEdges:e=>{const t=Array.isArray(e)?e:[e];n.edgeQueue.push(e=>[...e,...t])},toObject:()=>{const{nodes:e=[],edges:n=[],transform:r}=t.getState(),[o,a,i]=r;return{nodes:e.map(e=>({...e})),edges:n.map(e=>({...e})),viewport:{x:o,y:a,zoom:i}}},deleteElements:async({nodes:e=[],edges:n=[]})=>{const{nodes:r,edges:o,onNodesDelete:a,onEdgesDelete:i,triggerNodeChanges:s,triggerEdgeChanges:l,onDelete:c,onBeforeDelete:u}=t.getState(),{nodes:d,edges:f}=await async function({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const a=new Set(e.map(e=>e.id)),i=[];for(const e of n){if(!1===e.deletable)continue;const t=a.has(e.id),n=!t&&e.parentId&&i.find(t=>t.id===e.parentId);(t||n)&&i.push(e)}const s=new Set(t.map(e=>e.id)),l=r.filter(e=>!1!==e.deletable),c=((e,t)=>{const n=new Set;return e.forEach(e=>{n.add(e.id)}),t.filter(e=>n.has(e.source)||n.has(e.target))})(i,l),u=c;for(const e of l)s.has(e.id)&&!u.find(t=>t.id===e.id)&&u.push(e);if(!o)return{edges:u,nodes:i};const d=await o({nodes:i,edges:u});return"boolean"==typeof d?d?{edges:u,nodes:i}:{edges:[],nodes:[]}:d}({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:o,onBeforeDelete:u}),p=f.length>0,m=d.length>0;if(p){const e=f.map(e4);i?.(f),l(e)}if(m){const e=d.map(e4);a?.(d),s(e)}return(m||p)&&c?.({nodes:d,edges:f}),{deletedNodes:d,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{const o=z0(e),i=o?e:a(e),s=void 0!==r;return i?(r||t.getState().nodes).filter(r=>{const a=t.getState().nodeLookup.get(r.id);if(a&&!o&&(r.id===e.id||!a.internals.positionAbsolute))return!1;const l=A0(s?r:a),c=L0(l,i);return n&&c>0||c>=l.width*l.height||c>=i.width*i.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{const r=z0(e)?e:a(e);if(!r)return!1;const o=L0(r,t);return n&&o>0||o>=t.width*t.height||o>=r.width*r.height},updateNode:i,updateNodeData:(e,t,n={replace:!1})=>{i(e,e=>{const r="function"==typeof t?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},updateEdge:s,updateEdgeData:(e,t,n={replace:!1})=>{s(e,e=>{const r="function"==typeof t?t(e):t;return n.replace?{...e,data:r}:{...e,data:{...e.data,...r}}},n)},getNodesBounds:e=>{const{nodeLookup:n,nodeOrigin:r}=t.getState();return((e,t={nodeOrigin:[0,0]})=>{if(0===e.length)return{x:0,y:0,width:0,height:0};const n=e.reduce((e,n)=>{const r="string"==typeof n;let o=t.nodeLookup||r?void 0:n;t.nodeLookup&&(o=r?t.nodeLookup.get(n):b0(n)?n:t.nodeLookup.get(n.id));const a=o?T0(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return k0(e,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return C0(n)})(e,{nodeLookup:n,nodeOrigin:r})},getHandleConnections:({type:e,id:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}-${e}${n?`-${n}`:""}`)?.values()??[]),getNodeConnections:({type:e,handleId:n,nodeId:r})=>Array.from(t.getState().connectionLookup.get(`${r}${e?n?`-${e}-${n}`:`-${e}`:""}`)?.values()??[]),fitView:async e=>{const r=t.getState().fitViewResolver??function(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}();return t.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:r}),n.nodeQueue.push(e=>[...e]),r.promise}}},[]);return(0,w.useMemo)(()=>({...o,...e,viewportInitialized:r}),[r])}const l4=e=>e.selected,c4="undefined"!=typeof window?window:void 0,u4={position:"absolute",width:"100%",height:"100%",top:0,left:0},d4=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function f4({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:a=u0.Free,zoomOnDoubleClick:i=!0,panOnDrag:s=!0,defaultViewport:l,translateExtent:c,minZoom:u,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:p=!0,children:m,noWheelClassName:h,noPanClassName:g,onViewportChange:y,isControlledViewport:b,paneClickDistance:v,selectionOnDrag:x}){const N=w2(),E=(0,w.useRef)(null),{userSelectionActive:M,lib:_,connectionInProgress:I}=y2(d4,p2),S=Q2(f),j=(0,w.useRef)();!function(e){const t=w2();(0,w.useEffect)(()=>{const n=()=>{if(!e.current||!(e.current.checkVisibility?.()??1))return!1;const n=J0(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004","The React Flow parent container needs a width and a height to render the graph."),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener("resize",n);const t=new ResizeObserver(()=>n());return t.observe(e.current),()=>{window.removeEventListener("resize",n),t&&e.current&&t.unobserve(e.current)}}},[])}(E);const k=(0,w.useCallback)(e=>{y?.({x:e[0],y:e[1],zoom:e[2]}),b||N.setState({transform:e})},[y,b]);return(0,w.useEffect)(()=>{if(E.current){j.current=$1({domNode:E.current,minZoom:u,maxZoom:d,translateExtent:c,viewport:l,onDraggingChange:e=>N.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{const{onViewportChangeStart:n,onMoveStart:r}=N.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{const{onViewportChange:n,onMove:r}=N.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{const{onViewportChangeEnd:n,onMoveEnd:r}=N.getState();r?.(e,t),n?.(t)}});const{x:e,y:t,zoom:n}=j.current.getViewport();return N.setState({panZoom:j.current,transform:[e,t,n],domNode:E.current.closest(".react-flow")}),()=>{j.current?.destroy()}}},[]),(0,w.useEffect)(()=>{j.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:a,zoomOnDoubleClick:i,panOnDrag:s,zoomActivationKeyPressed:S,preventScrolling:p,noPanClassName:g,userSelectionActive:M,noWheelClassName:h,lib:_,onTransformChange:k,connectionInProgress:I,selectionOnDrag:x,paneClickDistance:v})},[e,t,n,r,o,a,i,s,S,p,g,M,h,_,k,I,x,v]),(0,R.jsx)("div",{className:"react-flow__renderer",ref:E,style:u4,children:m})}const p4=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function m4(){const{userSelectionActive:e,userSelectionRect:t}=y2(p4,p2);return e&&t?(0,R.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const h4=(e,t)=>n=>{n.target===t.current&&e?.(n)},g4=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function y4({isSelecting:e,selectionKeyPressed:t,selectionMode:n=d0.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:a,onSelectionStart:i,onSelectionEnd:s,onPaneClick:l,onPaneContextMenu:c,onPaneScroll:u,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:p,children:m}){const h=w2(),{userSelectionActive:g,elementsSelectable:y,dragging:b,connectionInProgress:v}=y2(g4,p2),x=y&&(e||g),N=(0,w.useRef)(null),E=(0,w.useRef)(),M=(0,w.useRef)(new Set),_=(0,w.useRef)(new Set),I=(0,w.useRef)(!1),S=e=>{I.current||v?I.current=!1:(l?.(e),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1}))},j=u?e=>u(e):void 0,k=!0===r||Array.isArray(r)&&r.includes(0);return(0,R.jsxs)("div",{className:a2(["react-flow__pane",{draggable:k,dragging:b,selection:e}]),onClick:x?void 0:h4(S,N),onContextMenu:h4(e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():c?.(e)},N),onWheel:h4(j,N),onPointerEnter:x?void 0:d,onPointerMove:x?e=>{const{userSelectionRect:r,transform:a,nodeLookup:s,edgeLookup:l,connectionLookup:c,triggerNodeChanges:u,triggerEdgeChanges:d,defaultEdgeOptions:f,resetSelectedElements:p}=h.getState();if(!E.current||!r)return;const{x:m,y:g}=r1(e.nativeEvent,E.current),{startX:y,startY:w}=r;if(!I.current){const n=t?0:o;if(Math.hypot(m-y,g-w)<=n)return;p(),i?.(e)}I.current=!0;const b={startX:y,startY:w,x:m<y?m:y,y:g<w?g:w,width:Math.abs(m-y),height:Math.abs(g-w)},v=M.current,x=_.current;M.current=new Set(N0(s,b,a,n===d0.Partial,!0).map(e=>e.id)),_.current=new Set;const N=f?.selectable??!0;for(const e of M.current){const t=c.get(e);if(t)for(const{edgeId:e}of t.values()){const t=l.get(e);t&&(t.selectable??N)&&_.current.add(e)}}$0(v,M.current)||u(J2(s,M.current,!0)),$0(x,_.current)||d(J2(l,_.current)),h.setState({userSelectionRect:b,userSelectionActive:!0,nodesSelectionActive:!1})}:f,onPointerUp:x?e=>{0===e.button&&(e.target?.releasePointerCapture?.(e.pointerId),!g&&e.target===N.current&&h.getState().userSelectionRect&&S?.(e),h.setState({userSelectionActive:!1,userSelectionRect:null}),I.current&&(s?.(e),h.setState({nodesSelectionActive:M.current.size>0})))}:void 0,onPointerDownCapture:x?n=>{const{domNode:r}=h.getState();if(E.current=r?.getBoundingClientRect(),!E.current)return;const o=n.target===N.current;if(!o&&n.target.closest(".nokey")||!e||!(a&&o||t)||0!==n.button||!n.isPrimary)return;n.target?.setPointerCapture?.(n.pointerId),I.current=!1;const{x:i,y:s}=r1(n.nativeEvent,E.current);h.setState({userSelectionRect:{width:0,height:0,startX:i,startY:s,x:i,y:s}}),o||(n.stopPropagation(),n.preventDefault())}:void 0,onClickCapture:x?e=>{I.current&&(e.stopPropagation(),I.current=!1)}:void 0,onPointerLeave:p,ref:N,style:u4,children:[m,(0,R.jsx)(m4,{})]})}function w4({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:a,multiSelectionActive:i,nodeLookup:s,onError:l}=t.getState(),c=s.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&i)&&(a({nodes:[c],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):o([e])):l?.("012",(e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`)(e))}function b4({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:a,nodeClickDistance:i}){const s=w2(),[l,c]=(0,w.useState)(!1),u=(0,w.useRef)();return(0,w.useEffect)(()=>{u.current=function({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let a={x:null,y:null},i=0,s=new Map,l=!1,c={x:0,y:0},u=null,d=!1,f=null,p=!1,m=!1,h=null;return{update:function({noDragClassName:g,handleSelector:y,domNode:w,isSelectable:b,nodeId:v,nodeClickDistance:x=0}){function N({x:e,y:n}){const{nodeLookup:o,nodeExtent:i,snapGrid:l,snapToGrid:c,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let y=!1;const w=s.size>1,b=w&&i?D0(x0(s)):null,x=w&&c?function({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const a={x:n-o.distance.x,y:r-o.distance.y},i=U0(a,t);return{x:i.x-a.x,y:i.y-a.y}}({dragItems:s,snapGrid:l,x:e,y:n}):null;for(const[t,r]of s){if(!o.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};c&&(a=x?{x:Math.round(a.x+x.x),y:Math.round(a.y+x.y)}:U0(a,l));let s=null;if(w&&i&&!r.extent&&b){const{positionAbsolute:e}=r.internals,t=e.x-b.x+i[0][0],n=e.x+r.measured.width-b.x2+i[1][0];s=[[t,e.y-b.y+i[0][1]],[n,e.y+r.measured.height-b.y2+i[1][1]]]}const{position:d,positionAbsolute:f}=E0({nodeId:t,nextPosition:a,nodeLookup:o,nodeExtent:s||i,nodeOrigin:u,onError:p});y=y||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(m=m||y,y&&(g(s,!0),h&&(r||d||!v&&f))){const[e,t]=z1({nodeId:v,dragItems:s,nodeLookup:o});r?.(h,s,e,t),d?.(h,e,t),v||f?.(h,t)}}async function E(){if(!u)return;const{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:o}=t();if(!o)return l=!1,void cancelAnimationFrame(i);const[s,d]=j0(c,u,r);0===s&&0===d||(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-d/e[2],await n({x:s,y:d})&&N(a)),i=requestAnimationFrame(E)}function M(r){const{nodeLookup:o,multiSelectionActive:i,nodesDraggable:l,transform:c,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:y}=t();d=!0,m&&b||i||!v||o.get(v)?.selected||y(),b&&m&&v&&e?.(v);const w=q0(r.sourceEvent,{transform:c,snapGrid:f,snapToGrid:p,containerBounds:u});if(a=w,s=function(e,t,n,r){const o=new Map;for(const[a,i]of e)if((i.selected||i.id===r)&&(!i.parentId||!O1(i,e))&&(i.draggable||t&&void 0===i.draggable)){const t=e.get(a);t&&o.set(a,{id:a,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return o}(o,l,w,v),s.size>0&&(n||h||!v&&g)){const[e,t]=z1({nodeId:v,dragItems:s,nodeLookup:o});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),v||g?.(r.sourceEvent,t)}}f=SJ(w);const _=FJ().clickDistance(x).on("start",e=>{const{domNode:n,nodeDragThreshold:r,transform:o,snapGrid:i,snapToGrid:s}=t();u=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,0===r&&M(e);const l=q0(e.sourceEvent,{transform:o,snapGrid:i,snapToGrid:s,containerBounds:u});a=l,c=r1(e.sourceEvent,u)}).on("drag",e=>{const{autoPanOnNodeDrag:n,transform:r,snapGrid:o,snapToGrid:i,nodeDragThreshold:f,nodeLookup:m}=t(),g=q0(e.sourceEvent,{transform:r,snapGrid:o,snapToGrid:i,containerBounds:u});if(h=e.sourceEvent,("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||v&&!m.has(v))&&(p=!0),!p){if(!l&&n&&d&&(l=!0,E()),!d){const t=r1(e.sourceEvent,u),n=t.x-c.x,r=t.y-c.y;Math.sqrt(n*n+r*r)>f&&M(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&d&&(c=r1(e.sourceEvent,u),N(g))}}).on("end",e=>{if(d&&!p&&(l=!1,d=!1,cancelAnimationFrame(i),s.size>0)){const{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:i}=t();if(m&&(r(s,!1),m=!1),o||a||!v&&i){const[t,r]=z1({nodeId:v,dragItems:s,nodeLookup:n,dragging:!1});o?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),v||i?.(e.sourceEvent,r)}}}).filter(e=>{const t=e.target;return!e.button&&(!g||!L1(t,`.${g}`,w))&&(!y||L1(t,y,w))});f.call(_)},destroy:function(){f?.on(".drag",null)}}}({getStoreItems:()=>s.getState(),onNodeMouseDown:t=>{w4({id:t,store:s,nodeRef:e})},onDragStart:()=>{c(!0)},onDragStop:()=>{c(!1)}})},[]),(0,w.useEffect)(()=>{if(!t&&e.current&&u.current)return u.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:a,nodeId:o,nodeClickDistance:i}),()=>{u.current?.destroy()}},[n,r,t,a,e,o,i]),l}function v4(){const e=w2(),t=(0,w.useCallback)(t=>{const{nodeExtent:n,snapToGrid:r,snapGrid:o,nodesDraggable:a,onError:i,updateNodePositions:s,nodeLookup:l,nodeOrigin:c}=e.getState(),u=new Map,d=(e=>t=>t.selected&&(t.draggable||e&&void 0===t.draggable))(a),f=r?o[0]:5,p=r?o[1]:5,m=t.direction.x*f*t.factor,h=t.direction.y*p*t.factor;for(const[,e]of l){if(!d(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=U0(t,o));const{position:a,positionAbsolute:s}=E0({nodeId:e.id,nextPosition:t,nodeLookup:l,nodeExtent:n,nodeOrigin:c,onError:i});e.position=a,e.internals.positionAbsolute=s,u.set(e.id,e)}s(u)},[]);return t}const x4=(0,w.createContext)(null),N4=x4.Provider;x4.Consumer;const E4=()=>(0,w.useContext)(x4),M4=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),_4=(0,w.memo)(n4(function({type:e="source",position:t=h0.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:a=!0,id:i,onConnect:s,children:l,className:c,onMouseDown:u,onTouchStart:d,...f},p){const m=i||null,h="target"===e,g=w2(),y=E4(),{connectOnClick:w,noPanClassName:b,rfId:v}=y2(M4,p2),{connectingFrom:x,connectingTo:N,clickConnecting:E,isPossibleEndHandle:M,connectionInProcess:_,clickConnectionInProcess:I,valid:S}=y2(((e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:a,connection:i}=r,{fromHandle:s,toHandle:l,isValid:c}=i,u=l?.nodeId===e&&l?.id===t&&l?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:u,clickConnecting:o?.nodeId===e&&o?.id===t&&o?.type===n,isPossibleEndHandle:a===c0.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!o,valid:u&&c}})(y,m,e),p2);y||g.getState().onError?.("010","Handle: No node id found. Make sure to only use a Handle inside a custom Node.");const j=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=g.getState();t(f1(o,e))}n?.(o),s?.(o)},k=e=>{if(!y)return;const t=n1(e.nativeEvent);if(o&&(t&&0===e.button||!t)){const t=g.getState();F1.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:h,handleId:m,nodeId:y,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:j,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?u?.(e):d?.(e)};return(0,R.jsx)("div",{"data-handleid":m,"data-nodeid":y,"data-handlepos":t,"data-id":`${v}-${y}-${m}-${e}`,className:a2(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",b,c,{source:!h,target:h,connectable:r,connectablestart:o,connectableend:a,clickconnecting:E,connectingfrom:x,connectingto:N,valid:S,connectionindicator:r&&(!_||M)&&(_||I?a:o)}]),onMouseDown:k,onTouchStart:k,onClick:w?t=>{const{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:i,connectionMode:s,isValidConnection:l,lib:c,rfId:u,nodeLookup:d,connection:f}=g.getState();if(!y||!i&&!o)return;if(!i)return r?.(t.nativeEvent,{nodeId:y,handleId:m,handleType:e}),void g.setState({connectionClickStartHandle:{nodeId:y,type:e,id:m}});const p=K0(t.target),h=n||l,{connection:w,isValid:b}=F1.isValid(t.nativeEvent,{handle:{nodeId:y,id:m,type:e},connectionMode:s,fromNodeId:i.nodeId,fromHandleId:i.id||null,fromType:i.type,isValidConnection:h,flowId:u,doc:p,lib:c,nodeLookup:d});b&&w&&j(w);const v=structuredClone(f);delete v.inProgress,v.toPosition=v.toHandle?v.toHandle.position:null,a?.(t,v),g.setState({connectionClickStartHandle:null})}:void 0,ref:p,...f,children:l})})),I4={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},S4={input:function({data:e,isConnectable:t,sourcePosition:n=h0.Bottom}){return(0,R.jsxs)(R.Fragment,{children:[e?.label,(0,R.jsx)(_4,{type:"source",position:n,isConnectable:t})]})},default:function({data:e,isConnectable:t,targetPosition:n=h0.Top,sourcePosition:r=h0.Bottom}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(_4,{type:"target",position:n,isConnectable:t}),e?.label,(0,R.jsx)(_4,{type:"source",position:r,isConnectable:t})]})},output:function({data:e,isConnectable:t,targetPosition:n=h0.Top}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(_4,{type:"target",position:n,isConnectable:t}),e?.label]})},group:function(){return null}},j4=e=>{const{width:t,height:n,x:r,y:o}=x0(e.nodeLookup,{filter:e=>!!e.selected});return{width:P0(t)?t:null,height:P0(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function k4({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=w2(),{width:o,height:a,transformString:i,userSelectionActive:s}=y2(j4,p2),l=v4(),c=(0,w.useRef)(null);(0,w.useEffect)(()=>{n||c.current?.focus({preventScroll:!0})},[n]);const u=!s&&null!==o&&null!==a;if(b4({nodeRef:c,disabled:!u}),!u)return null;const d=e?t=>{const n=r.getState().nodes.filter(e=>e.selected);e(t,n)}:void 0;return(0,R.jsx)("div",{className:a2(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:(0,R.jsx)("div",{ref:c,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(I4,e.key)&&(e.preventDefault(),l({direction:I4[e.key],factor:e.shiftKey?4:1}))},style:{width:o,height:a}})})}const D4="undefined"!=typeof window?window:void 0,C4=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function A4({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:i,paneClickDistance:s,deleteKeyCode:l,selectionKeyCode:c,selectionOnDrag:u,selectionMode:d,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:m,panActivationKeyCode:h,zoomActivationKeyCode:g,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:v,panOnScroll:x,panOnScrollSpeed:N,panOnScrollMode:E,zoomOnDoubleClick:M,panOnDrag:_,defaultViewport:I,translateExtent:S,minZoom:j,maxZoom:k,preventScrolling:D,onSelectionContextMenu:C,noWheelClassName:A,noPanClassName:T,disableKeyboardA11y:O,onViewportChange:L,isControlledViewport:z}){const{nodesSelectionActive:P,userSelectionActive:U}=y2(C4,p2),B=Q2(c,{target:D4}),F=Q2(h,{target:D4}),Y=F||_,Z=F||x,Q=u&&!0!==Y,V=B||U||Q;return function({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=w2(),{deleteElements:r}=s4(),o=Q2(e,{actInsideInputWithModifier:!1}),a=Q2(t,{target:c4});(0,w.useEffect)(()=>{if(o){const{edges:e,nodes:t}=n.getState();r({nodes:t.filter(l4),edges:e.filter(l4)}),n.setState({nodesSelectionActive:!1})}},[o]),(0,w.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}({deleteKeyCode:l,multiSelectionKeyCode:m}),(0,R.jsx)(f4,{onPaneContextMenu:a,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:v,panOnScroll:Z,panOnScrollSpeed:N,panOnScrollMode:E,zoomOnDoubleClick:M,panOnDrag:!B&&Y,defaultViewport:I,translateExtent:S,minZoom:j,maxZoom:k,zoomActivationKeyCode:g,preventScrolling:D,noWheelClassName:A,noPanClassName:T,onViewportChange:L,isControlledViewport:z,paneClickDistance:s,selectionOnDrag:Q,children:(0,R.jsxs)(y4,{onSelectionStart:f,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:i,panOnDrag:Y,isSelecting:!!V,selectionMode:d,selectionKeyPressed:B,paneClickDistance:s,selectionOnDrag:Q,children:[e,P&&(0,R.jsx)(k4,{onSelectionContextMenu:C,noPanClassName:T,disableKeyboardA11y:O})]})})}A4.displayName="FlowRenderer";const T4=(0,w.memo)(A4);const O4=e=>e.updateNodeInternals;var L4=(0,w.memo)(function({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:a,onDoubleClick:i,nodesDraggable:s,elementsSelectable:l,nodesConnectable:c,nodesFocusable:u,resizeObserver:d,noDragClassName:f,noPanClassName:p,disableKeyboardA11y:m,rfId:h,nodeTypes:g,nodeClickDistance:y,onError:b}){const{node:v,internals:x,isParent:N}=y2(t=>{const n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},p2);let E=v.type||"default",M=g?.[E]||S4[E];void 0===M&&(b?.("003",(e=>`Node type "${e}" not found. Using fallback type "default".`)(E)),E="default",M=g?.default||S4.default);const _=!!(v.draggable||s&&void 0===v.draggable),I=!!(v.selectable||l&&void 0===v.selectable),S=!!(v.connectable||c&&void 0===v.connectable),j=!!(v.focusable||u&&void 0===v.focusable),k=w2(),D=G0(v),C=function({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=w2(),a=(0,w.useRef)(null),i=(0,w.useRef)(null),s=(0,w.useRef)(e.sourcePosition),l=(0,w.useRef)(e.targetPosition),c=(0,w.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,w.useEffect)(()=>{!a.current||e.hidden||u&&i.current===a.current||(i.current&&r?.unobserve(i.current),r?.observe(a.current),i.current=a.current)},[u,e.hidden]),(0,w.useEffect)(()=>()=>{i.current&&(r?.unobserve(i.current),i.current=null)},[]),(0,w.useEffect)(()=>{if(a.current){const n=c.current!==t,r=s.current!==e.sourcePosition,i=l.current!==e.targetPosition;(n||r||i)&&(c.current=t,s.current=e.sourcePosition,l.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}({node:v,nodeType:E,hasDimensions:D,resizeObserver:d}),A=b4({nodeRef:C,disabled:v.hidden||!_,noDragClassName:f,handleSelector:v.dragHandle,nodeId:e,isSelectable:I,nodeClickDistance:y}),T=v4();if(v.hidden)return null;const O=W0(v),L=function(e){return void 0===e.internals.handleBounds?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}(v),z=I||_||t||n||r||o,P=n?e=>n(e,{...x.userNode}):void 0,U=r?e=>r(e,{...x.userNode}):void 0,B=o?e=>o(e,{...x.userNode}):void 0,F=a?e=>a(e,{...x.userNode}):void 0,Y=i?e=>i(e,{...x.userNode}):void 0;return(0,R.jsx)("div",{className:a2(["react-flow__node",`react-flow__node-${E}`,{[p]:_},v.className,{selected:v.selected,selectable:I,parent:N,draggable:_,dragging:A}]),ref:C,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:z?"all":"none",visibility:D?"visible":"hidden",...v.style,...L},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:P,onMouseMove:U,onMouseLeave:B,onContextMenu:F,onClick:n=>{const{selectNodesOnDrag:r,nodeDragThreshold:o}=k.getState();I&&(!r||!_||o>0)&&w4({id:e,store:k,nodeRef:C}),t&&t(n,{...x.userNode})},onDoubleClick:Y,onKeyDown:j?t=>{if(!t1(t.nativeEvent)&&!m)if(s0.includes(t.key)&&I){const n="Escape"===t.key;w4({id:e,store:k,unselect:n,nodeRef:C})}else if(_&&v.selected&&Object.prototype.hasOwnProperty.call(I4,t.key)){t.preventDefault();const{ariaLabelConfig:e}=k.getState();k.setState({ariaLiveMessage:e["node.a11yDescription.ariaLiveMessage"]({direction:t.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),T({direction:I4[t.key],factor:t.shiftKey?4:1})}}:void 0,tabIndex:j?0:void 0,onFocus:j?()=>{if(m||!C.current?.matches(":focus-visible"))return;const{transform:t,width:n,height:r,autoPanOnNodeFocus:o,setCenter:a}=k.getState();o&&(N0(new Map([[e,v]]),{x:0,y:0,width:n,height:r},t,!0).length>0||a(v.position.x+O.width/2,v.position.y+O.height/2,{zoom:t[2]}))}:void 0,role:v.ariaRole??(j?"group":void 0),"aria-roledescription":"node","aria-describedby":m?void 0:`${x2}-${h}`,"aria-label":v.ariaLabel,...v.domAttributes,children:(0,R.jsx)(N4,{value:e,children:(0,R.jsx)(M,{id:e,data:v.data,type:E,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:v.selected??!1,selectable:I,draggable:_,deletable:v.deletable??!0,isConnectable:S,sourcePosition:v.sourcePosition,targetPosition:v.targetPosition,dragging:A,dragHandle:v.dragHandle,zIndex:x.z,parentId:v.parentId,...O})})})});const z4=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function P4(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:a}=y2(z4,p2),i=function(e){const t=y2((0,w.useCallback)((e=>t=>e?N0(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(t.nodeLookup.keys()))(e),[e]),p2);return t}(e.onlyRenderVisibleElements),s=function(){const e=y2(O4),[t]=(0,w.useState)(()=>"undefined"==typeof ResizeObserver?null:new ResizeObserver(t=>{const n=new Map;t.forEach(e=>{const t=e.target.getAttribute("data-id");n.set(t,{id:t,nodeElement:e.target,force:!0})}),e(n)}));return(0,w.useEffect)(()=>()=>{t?.disconnect()},[t]),t}();return(0,R.jsx)("div",{className:"react-flow__nodes",style:u4,children:i.map(i=>(0,R.jsx)(L4,{id:i,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:a},i))})}P4.displayName="NodeRenderer";const R4=(0,w.memo)(P4),U4={[m0.Arrow]:({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return(0,R.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},[m0.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,R.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})}},B4=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:a="strokeWidth",strokeWidth:i,orient:s="auto-start-reverse"})=>{const l=function(e){const t=w2();return(0,w.useMemo)(()=>Object.prototype.hasOwnProperty.call(U4,e)?U4[e]:(t.getState().onError?.("009",(e=>`Marker type "${e}" doesn't exist.`)(e)),null),[e])}(t);return l?(0,R.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:s,refX:"0",refY:"0",children:(0,R.jsx)(l,{color:n,strokeWidth:i})}):null},F4=({defaultColor:e,rfId:t})=>{const n=y2(e=>e.edges),r=y2(e=>e.defaultEdgeOptions),o=(0,w.useMemo)(()=>{const o=function(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const a=new Set;return e.reduce((e,i)=>([i.markerStart||r,i.markerEnd||o].forEach(r=>{if(r&&"object"==typeof r){const o=N1(r,t);a.has(o)||(e.push({id:o,color:r.color||n,...r}),a.add(o))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd});return o},[n,r,t,e]);return o.length?(0,R.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,R.jsx)("defs",{children:o.map(e=>(0,R.jsx)(B4,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id))})}):null};F4.displayName="MarkerDefinitions";var Y4=(0,w.memo)(F4);function Z4({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:a,labelBgPadding:i=[2,4],labelBgBorderRadius:s=2,children:l,className:c,...u}){const[d,f]=(0,w.useState)({x:1,y:0,width:0,height:0}),p=a2(["react-flow__edge-textwrapper",c]),m=(0,w.useRef)(null);return(0,w.useEffect)(()=>{if(m.current){const e=m.current.getBBox();f({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,R.jsxs)("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:p,visibility:d.width?"visible":"hidden",...u,children:[o&&(0,R.jsx)("rect",{width:d.width+2*i[0],x:-i[0],y:-i[1],height:d.height+2*i[1],className:"react-flow__edge-textbg",style:a,rx:s,ry:s}),(0,R.jsx)("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:m,style:r,children:n}),l]}):null}Z4.displayName="EdgeText";const Q4=(0,w.memo)(Z4);function V4({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:a,labelBgStyle:i,labelBgPadding:s,labelBgBorderRadius:l,interactionWidth:c=20,...u}){return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("path",{...u,d:e,fill:"none",className:a2(["react-flow__edge-path",u.className])}),c?(0,R.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:c,className:"react-flow__edge-interaction"}):null,r&&P0(t)&&P0(n)?(0,R.jsx)(Q4,{x:t,y:n,label:r,labelStyle:o,labelShowBg:a,labelBgStyle:i,labelBgPadding:s,labelBgBorderRadius:l}):null]})}function W4({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===h0.Left||e===h0.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function G4({sourceX:e,sourceY:t,sourcePosition:n=h0.Bottom,targetX:r,targetY:o,targetPosition:a=h0.Top}){const[i,s]=W4({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,c]=W4({pos:a,x1:r,y1:o,x2:e,y2:t}),[u,d,f,p]=a1({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:i,sourceControlY:s,targetControlX:l,targetControlY:c});return[`M${e},${t} C${i},${s} ${l},${c} ${r},${o}`,u,d,f,p]}function H4(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,sourcePosition:i,targetPosition:s,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:y})=>{const[w,b,v]=G4({sourceX:n,sourceY:r,sourcePosition:i,targetX:o,targetY:a,targetPosition:s}),x=e.isInternal?void 0:t;return(0,R.jsx)(V4,{id:x,path:w,labelX:b,labelY:v,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:y})})}const $4=H4({isInternal:!1}),X4=H4({isInternal:!0});function q4(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:f,sourcePosition:p=h0.Bottom,targetPosition:m=h0.Top,markerEnd:h,markerStart:g,pathOptions:y,interactionWidth:w})=>{const[b,v,x]=y1({sourceX:n,sourceY:r,sourcePosition:p,targetX:o,targetY:a,targetPosition:m,borderRadius:y?.borderRadius,offset:y?.offset,stepPosition:y?.stepPosition}),N=e.isInternal?void 0:t;return(0,R.jsx)(V4,{id:N,path:b,labelX:v,labelY:x,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:w})})}$4.displayName="SimpleBezierEdge",X4.displayName="SimpleBezierEdgeInternal";const J4=q4({isInternal:!1}),K4=q4({isInternal:!0});function e5(e){return(0,w.memo)(({id:t,...n})=>{const r=e.isInternal?void 0:t;return(0,R.jsx)(J4,{...n,id:r,pathOptions:(0,w.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}J4.displayName="SmoothStepEdge",K4.displayName="SmoothStepEdgeInternal";const t5=e5({isInternal:!1}),n5=e5({isInternal:!0});function r5(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{const[g,y,w]=p1({sourceX:n,sourceY:r,targetX:o,targetY:a}),b=e.isInternal?void 0:t;return(0,R.jsx)(V4,{id:b,path:g,labelX:y,labelY:w,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:u,labelBgBorderRadius:d,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}t5.displayName="StepEdge",n5.displayName="StepEdgeInternal";const o5=r5({isInternal:!1}),a5=r5({isInternal:!0});function i5(e){return(0,w.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,sourcePosition:i=h0.Bottom,targetPosition:s=h0.Top,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:y,interactionWidth:w})=>{const[b,v,x]=l1({sourceX:n,sourceY:r,sourcePosition:i,targetX:o,targetY:a,targetPosition:s,curvature:y?.curvature}),N=e.isInternal?void 0:t;return(0,R.jsx)(V4,{id:N,path:b,labelX:v,labelY:x,label:l,labelStyle:c,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:w})})}o5.displayName="StraightEdge",a5.displayName="StraightEdgeInternal";const s5=i5({isInternal:!1}),l5=i5({isInternal:!0});s5.displayName="BezierEdge",l5.displayName="BezierEdgeInternal";const c5={default:l5,straight:a5,step:n5,smoothstep:K4,simplebezier:X4},u5={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},d5=(e,t,n)=>n===h0.Left?e-t:n===h0.Right?e+t:e,f5=(e,t,n)=>n===h0.Top?e-t:n===h0.Bottom?e+t:e,p5="react-flow__edgeupdater";function m5({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:a,onMouseOut:i,type:s}){return(0,R.jsx)("circle",{onMouseDown:o,onMouseEnter:a,onMouseOut:i,className:a2([p5,`${p5}-${s}`]),cx:d5(t,r,e),cy:f5(n,r,e),r,stroke:"transparent",fill:"transparent"})}function h5({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:a,targetY:i,sourcePosition:s,targetPosition:l,onReconnect:c,onReconnectStart:u,onReconnectEnd:d,setReconnecting:f,setUpdateHover:p}){const m=w2(),h=(e,t)=>{if(0!==e.button)return;const{autoPanOnConnect:r,domNode:o,connectionMode:a,connectionRadius:i,lib:s,onConnectStart:l,cancelConnection:p,nodeLookup:h,rfId:g,panBy:y,updateConnection:w}=m.getState(),b="target"===t.type;F1.onPointerDown(e.nativeEvent,{autoPanOnConnect:r,connectionMode:a,connectionRadius:i,domNode:o,handleId:t.id,nodeId:t.nodeId,nodeLookup:h,isTarget:b,edgeUpdaterType:t.type,lib:s,flowId:g,cancelConnection:p,panBy:y,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>c?.(n,e),onConnectStart:(r,o)=>{f(!0),u?.(e,n,t.type),l?.(r,o)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),d?.(e,n,t.type,r)},updateConnection:w,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=()=>p(!0),y=()=>p(!1);return(0,R.jsxs)(R.Fragment,{children:[(!0===e||"source"===e)&&(0,R.jsx)(m5,{position:s,centerX:r,centerY:o,radius:t,onMouseDown:e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),onMouseEnter:g,onMouseOut:y,type:"source"}),(!0===e||"target"===e)&&(0,R.jsx)(m5,{position:l,centerX:a,centerY:i,radius:t,onMouseDown:e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),onMouseEnter:g,onMouseOut:y,type:"target"})]})}var g5=(0,w.memo)(function({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:a,onContextMenu:i,onMouseEnter:s,onMouseMove:l,onMouseLeave:c,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,rfId:m,edgeTypes:h,noPanClassName:g,onError:y,disableKeyboardA11y:b}){let v=y2(t=>t.edgeLookup.get(e));const x=y2(e=>e.defaultEdgeOptions);v=x?{...x,...v}:v;let N=v.type||"default",E=h?.[N]||c5[N];void 0===E&&(y?.("011",(e=>`Edge type "${e}" not found. Using fallback type "default".`)(N)),N="default",E=h?.default||c5.default);const M=!!(v.focusable||t&&void 0===v.focusable),_=void 0!==d&&(v.reconnectable||n&&void 0===v.reconnectable),I=!!(v.selectable||r&&void 0===v.selectable),S=(0,w.useRef)(null),[j,k]=(0,w.useState)(!1),[D,C]=(0,w.useState)(!1),A=w2(),{zIndex:T,sourceX:O,sourceY:L,targetX:z,targetY:P,sourcePosition:U,targetPosition:B}=y2((0,w.useCallback)(t=>{const n=t.nodeLookup.get(v.source),r=t.nodeLookup.get(v.target);if(!n||!r)return{zIndex:v.zIndex,...u5};const o=function(e){const{sourceNode:t,targetNode:n}=e;if(!w1(t)||!w1(n))return null;const r=t.internals.handleBounds||b1(t.handles),o=n.internals.handleBounds||b1(n.handles),a=x1(r?.source??[],e.sourceHandle),i=x1(e.connectionMode===c0.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!a||!i)return e.onError?.("008",((e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${"source"===e?n:r}", edge id: ${t}.`)(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=a?.position||h0.Bottom,l=i?.position||h0.Top,c=v1(t,a,s),u=v1(n,i,l);return{sourceX:c.x,sourceY:c.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:l}}({id:e,sourceNode:n,targetNode:r,sourceHandle:v.sourceHandle||null,targetHandle:v.targetHandle||null,connectionMode:t.connectionMode,onError:y}),a=function({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:a="basic"}){return"manual"===a?r:(o&&n?r+1e3:r)+Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0)}({selected:v.selected,zIndex:v.zIndex,sourceNode:n,targetNode:r,elevateOnSelect:t.elevateEdgesOnSelect,zIndexMode:t.zIndexMode});return{zIndex:a,...o||u5}},[v.source,v.target,v.sourceHandle,v.targetHandle,v.selected,v.zIndex]),p2),F=(0,w.useMemo)(()=>v.markerStart?`url('#${N1(v.markerStart,m)}')`:void 0,[v.markerStart,m]),Y=(0,w.useMemo)(()=>v.markerEnd?`url('#${N1(v.markerEnd,m)}')`:void 0,[v.markerEnd,m]);if(v.hidden||null===O||null===L||null===z||null===P)return null;const Z=a?e=>{a(e,{...v})}:void 0,Q=i?e=>{i(e,{...v})}:void 0,V=s?e=>{s(e,{...v})}:void 0,W=l?e=>{l(e,{...v})}:void 0,G=c?e=>{c(e,{...v})}:void 0;return(0,R.jsx)("svg",{style:{zIndex:T},children:(0,R.jsxs)("g",{className:a2(["react-flow__edge",`react-flow__edge-${N}`,v.className,g,{selected:v.selected,animated:v.animated,inactive:!I&&!o,updating:j,selectable:I}]),onClick:t=>{const{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=A.getState();I&&(A.setState({nodesSelectionActive:!1}),v.selected&&a?(r({nodes:[],edges:[v]}),S.current?.blur()):n([e])),o&&o(t,v)},onDoubleClick:Z,onContextMenu:Q,onMouseEnter:V,onMouseMove:W,onMouseLeave:G,onKeyDown:M?t=>{if(!b&&s0.includes(t.key)&&I){const{unselectNodesAndEdges:n,addSelectedEdges:r}=A.getState();"Escape"===t.key?(S.current?.blur(),n({edges:[v]})):r([e])}}:void 0,tabIndex:M?0:void 0,role:v.ariaRole??(M?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":null===v.ariaLabel?void 0:v.ariaLabel||`Edge from ${v.source} to ${v.target}`,"aria-describedby":M?`${N2}-${m}`:void 0,ref:S,...v.domAttributes,children:[!D&&(0,R.jsx)(E,{id:e,source:v.source,target:v.target,type:v.type,selected:v.selected,animated:v.animated,selectable:I,deletable:v.deletable??!0,label:v.label,labelStyle:v.labelStyle,labelShowBg:v.labelShowBg,labelBgStyle:v.labelBgStyle,labelBgPadding:v.labelBgPadding,labelBgBorderRadius:v.labelBgBorderRadius,sourceX:O,sourceY:L,targetX:z,targetY:P,sourcePosition:U,targetPosition:B,data:v.data,style:v.style,sourceHandleId:v.sourceHandle,targetHandleId:v.targetHandle,markerStart:F,markerEnd:Y,pathOptions:"pathOptions"in v?v.pathOptions:void 0,interactionWidth:v.interactionWidth}),_&&(0,R.jsx)(h5,{edge:v,isReconnectable:_,reconnectRadius:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,sourceX:O,sourceY:L,targetX:z,targetY:P,sourcePosition:U,targetPosition:B,setUpdateHover:k,setReconnecting:C})]})})});const y5=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function w5({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:a,onEdgeContextMenu:i,onEdgeMouseEnter:s,onEdgeMouseMove:l,onEdgeMouseLeave:c,onEdgeClick:u,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,disableKeyboardA11y:h}){const{edgesFocusable:g,edgesReconnectable:y,elementsSelectable:b,onError:v}=y2(y5,p2),x=function(e){const t=y2((0,w.useCallback)(t=>{if(!e)return t.edges.map(e=>e.id);const n=[];if(t.width&&t.height)for(const e of t.edges){const r=t.nodeLookup.get(e.source),o=t.nodeLookup.get(e.target);r&&o&&u1({sourceNode:r,targetNode:o,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),p2);return t}(t);return(0,R.jsxs)("div",{className:"react-flow__edges",children:[(0,R.jsx)(Y4,{defaultColor:e,rfId:n}),x.map(e=>(0,R.jsx)(g5,{id:e,edgesFocusable:g,edgesReconnectable:y,elementsSelectable:b,noPanClassName:o,onReconnect:a,onContextMenu:i,onMouseEnter:s,onMouseMove:l,onMouseLeave:c,onClick:u,reconnectRadius:d,onDoubleClick:f,onReconnectStart:p,onReconnectEnd:m,rfId:n,onError:v,edgeTypes:r,disableKeyboardA11y:h},e))]})}w5.displayName="EdgeRenderer";const b5=(0,w.memo)(w5),v5=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function x5({children:e}){const t=y2(v5);return(0,R.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}const N5=e=>e.panZoom?.syncViewport;function E5(e){return e.connection.inProgress?{...e.connection,to:B0(e.connection.to,e.transform)}:{...e.connection}}const M5=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function _5({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:a,height:i,isValid:s,inProgress:l}=y2(M5,p2);return a&&o&&l?(0,R.jsx)("svg",{style:e,width:a,height:i,className:"react-flow__connectionline react-flow__container",children:(0,R.jsx)("g",{className:a2(["react-flow__connection",y0(s)]),children:(0,R.jsx)(I5,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}const I5=({style:e,type:t=p0.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:a,fromNode:i,fromHandle:s,fromPosition:l,to:c,toNode:u,toHandle:d,toPosition:f,pointer:p}=function(e){const t=function(e){if(e){const t=t=>{const n=E5(t);return e(n)};return t}return E5}(e);return y2(t,p2)}();if(!o)return;if(n)return(0,R.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:s,fromX:a.x,fromY:a.y,toX:c.x,toY:c.y,fromPosition:l,toPosition:f,connectionStatus:y0(r),toNode:u,toHandle:d,pointer:p});let m="";const h={sourceX:a.x,sourceY:a.y,sourcePosition:l,targetX:c.x,targetY:c.y,targetPosition:f};switch(t){case p0.Bezier:[m]=l1(h);break;case p0.SimpleBezier:[m]=G4(h);break;case p0.Step:[m]=y1({...h,borderRadius:0});break;case p0.SmoothStep:[m]=y1(h);break;default:[m]=p1(h)}return(0,R.jsx)("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};I5.displayName="ConnectionLine";const S5={};function j5(e=S5){(0,w.useRef)(e),w2(),(0,w.useEffect)(()=>{},[e])}function k5({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:a,onEdgeDoubleClick:i,onNodeMouseEnter:s,onNodeMouseMove:l,onNodeMouseLeave:c,onNodeContextMenu:u,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:p,connectionLineType:m,connectionLineStyle:h,connectionLineComponent:g,connectionLineContainerStyle:y,selectionKeyCode:b,selectionOnDrag:v,selectionMode:x,multiSelectionKeyCode:N,panActivationKeyCode:E,zoomActivationKeyCode:M,deleteKeyCode:_,onlyRenderVisibleElements:I,elementsSelectable:S,defaultViewport:j,translateExtent:k,minZoom:D,maxZoom:C,preventScrolling:A,defaultMarkerColor:T,zoomOnScroll:O,zoomOnPinch:L,panOnScroll:z,panOnScrollSpeed:P,panOnScrollMode:U,zoomOnDoubleClick:B,panOnDrag:F,onPaneClick:Y,onPaneMouseEnter:Z,onPaneMouseMove:Q,onPaneMouseLeave:V,onPaneScroll:W,onPaneContextMenu:G,paneClickDistance:H,nodeClickDistance:$,onEdgeContextMenu:X,onEdgeMouseEnter:q,onEdgeMouseMove:J,onEdgeMouseLeave:K,reconnectRadius:ee,onReconnect:te,onReconnectStart:ne,onReconnectEnd:re,noDragClassName:oe,noWheelClassName:ae,noPanClassName:ie,disableKeyboardA11y:se,nodeExtent:le,rfId:ce,viewport:ue,onViewportChange:de}){return j5(e),j5(t),w2(),(0,w.useRef)(!1),(0,w.useEffect)(()=>{},[]),function(e){const t=s4(),n=(0,w.useRef)(!1);(0,w.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}(n),function(e){const t=y2(N5),n=w2();(0,w.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t])}(ue),(0,R.jsx)(T4,{onPaneClick:Y,onPaneMouseEnter:Z,onPaneMouseMove:Q,onPaneMouseLeave:V,onPaneContextMenu:G,onPaneScroll:W,paneClickDistance:H,deleteKeyCode:_,selectionKeyCode:b,selectionOnDrag:v,selectionMode:x,onSelectionStart:f,onSelectionEnd:p,multiSelectionKeyCode:N,panActivationKeyCode:E,zoomActivationKeyCode:M,elementsSelectable:S,zoomOnScroll:O,zoomOnPinch:L,zoomOnDoubleClick:B,panOnScroll:z,panOnScrollSpeed:P,panOnScrollMode:U,panOnDrag:F,defaultViewport:j,translateExtent:k,minZoom:D,maxZoom:C,onSelectionContextMenu:d,preventScrolling:A,noDragClassName:oe,noWheelClassName:ae,noPanClassName:ie,disableKeyboardA11y:se,onViewportChange:de,isControlledViewport:!!ue,children:(0,R.jsxs)(x5,{children:[(0,R.jsx)(b5,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:i,onReconnect:te,onReconnectStart:ne,onReconnectEnd:re,onlyRenderVisibleElements:I,onEdgeContextMenu:X,onEdgeMouseEnter:q,onEdgeMouseMove:J,onEdgeMouseLeave:K,reconnectRadius:ee,defaultMarkerColor:T,noPanClassName:ie,disableKeyboardA11y:se,rfId:ce}),(0,R.jsx)(_5,{style:h,type:m,component:g,containerStyle:y}),(0,R.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,R.jsx)(R4,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:l,onNodeMouseLeave:c,onNodeContextMenu:u,nodeClickDistance:$,onlyRenderVisibleElements:I,noPanClassName:ie,noDragClassName:oe,disableKeyboardA11y:se,nodeExtent:le,rfId:ce}),(0,R.jsx)("div",{className:"react-flow__viewport-portal"})]})})}k5.displayName="GraphView";const D5=(0,w.memo)(k5),C5=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:i,fitViewOptions:s,minZoom:l=.5,maxZoom:c=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f="basic"}={})=>{const p=new Map,m=new Map,h=new Map,g=new Map,y=r??t??[],w=n??e??[],b=u??[0,0],v=d??i0;T1(h,g,y);const{nodesInitialized:x}=j1(w,p,m,{nodeOrigin:b,nodeExtent:v,zIndexMode:f});let N=[0,0,1];if(i&&o&&a){const e=x0(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),{x:t,y:n,zoom:r}=Z0(e,o,a,l,c,s?.padding??.1);N=[t,n,r]}return{rfId:"1",width:o??0,height:a??0,transform:N,nodes:w,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:y,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==n,hasDefaultEdges:void 0!==r,panZoom:null,minZoom:l,maxZoom:c,translateExtent:i0,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:c0.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:b,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:i??!1,fitViewOptions:s,fitViewResolver:null,connection:{...f0},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:R0,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:l0,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},A5=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:i,fitViewOptions:s,minZoom:l,maxZoom:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f})=>((e,t)=>e?f2(e,t):f2)((p,m)=>{async function h(){const{nodeLookup:e,panZoom:t,fitViewOptions:n,fitViewResolver:r,width:o,height:a,minZoom:i,maxZoom:s}=m();t&&(await async function({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:a},i){if(0===e.size)return Promise.resolve(!0);const s=function(e,t){const n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{!e.measured.width||!e.measured.height||!t?.includeHiddenNodes&&e.hidden||r&&!r.has(e.id)||n.set(e.id,e)}),n}(e,i),l=x0(s),c=Z0(l,t,n,i?.minZoom??o,i?.maxZoom??a,i?.padding??.1);return await r.setViewport(c,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)}({nodes:e,width:o,height:a,panZoom:t,minZoom:i,maxZoom:s},n),r?.resolve(!0),p({fitViewResolver:null}))}return{...C5({nodes:e,edges:t,width:o,height:a,fitView:i,fitViewOptions:s,minZoom:l,maxZoom:c,nodeOrigin:u,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:e=>{const{nodeLookup:t,parentLookup:n,nodeOrigin:r,elevateNodesOnSelect:o,fitViewQueued:a,zIndexMode:i,nodesSelectionActive:s}=m(),{nodesInitialized:l,hasSelectedNodes:c}=j1(e,t,n,{nodeOrigin:r,nodeExtent:d,elevateNodesOnSelect:o,checkEquality:!0,zIndexMode:i}),u=s&&c;a&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:u})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:u})},setEdges:e=>{const{connectionLookup:t,edgeLookup:n}=m();T1(t,n,e),p({edges:e})},setDefaultNodesAndEdges:(e,t)=>{if(e){const{setNodes:t}=m();t(e),p({hasDefaultNodes:!0})}if(t){const{setEdges:e}=m();e(t),p({hasDefaultEdges:!0})}},updateNodeInternals:e=>{const{triggerNodeChanges:t,nodeLookup:n,parentLookup:r,domNode:o,nodeOrigin:a,nodeExtent:i,debug:s,fitViewQueued:l,zIndexMode:c}=m(),{changes:u,updatedInternals:d}=function(e,t,n,r,o,a,i){const s=r?.querySelector(".xyflow__viewport");let l=!1;if(!s)return{changes:[],updatedInternals:l};const c=[],u=window.getComputedStyle(s),{m22:d}=new window.DOMMatrixReadOnly(u.transform),f=[];for(const r of e.values()){const e=t.get(r.id);if(!e)continue;if(e.hidden){t.set(e.id,{...e,internals:{...e.internals,handleBounds:void 0}}),l=!0;continue}const s=J0(r.nodeElement),u=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(u||!e.internals.handleBounds||r.force)){const p=r.nodeElement.getBoundingClientRect(),m=V0(e.extent)?e.extent:a;let{positionAbsolute:h}=e.internals;e.parentId&&"parent"===e.extent?h=I0(h,s,t.get(e.parentId)):m&&(h=_0(h,m,s));const g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:o1("source",r.nodeElement,p,d,e.id),target:o1("target",r.nodeElement,p,d,e.id)}}};t.set(e.id,g),e.parentId&&k1(g,t,n,{nodeOrigin:o,zIndexMode:i}),l=!0,u&&(c.push({id:e.id,type:"dimensions",dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:A0(g,o)}))}}if(f.length>0){const e=C1(f,t,n,o);c.push(...e)}return{changes:c,updatedInternals:l}}(e,n,r,o,a,i,c);d&&(function(e,t,n){const r=_1(E1,n);for(const n of e.values())if(n.parentId)k1(n,e,t,r);else{const e=v0(n,r.nodeOrigin),t=V0(n.extent)?n.extent:r.nodeExtent,o=_0(e,t,W0(n));n.internals.positionAbsolute=o}}(n,r,{nodeOrigin:a,nodeExtent:i,zIndexMode:c}),l?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),u?.length>0&&(s&&console.log("React Flow: trigger node changes",u),t?.(u)))},updateNodePositions:(e,t=!1)=>{const n=[];let r=[];const{nodeLookup:o,triggerNodeChanges:a,connection:i,updateConnection:s,onNodesChangeMiddlewareMap:l}=m();for(const[a,l]of e){const e=o.get(a),c=!!(e?.expandParent&&e?.parentId&&l?.position),u={id:a,type:"position",position:c?{x:Math.max(0,l.position.x),y:Math.max(0,l.position.y)}:l.position,dragging:t};if(e&&i.inProgress&&i.fromNode.id===e.id){const t=v1(e,i.fromHandle,h0.Left,!0);s({...i,from:t})}c&&e.parentId&&n.push({id:a,parentId:e.parentId,rect:{...l.internals.positionAbsolute,width:l.measured.width??0,height:l.measured.height??0}}),r.push(u)}if(n.length>0){const{parentLookup:e,nodeOrigin:t}=m(),a=C1(n,o,e,t);r.push(...a)}for(const e of l.values())r=e(r);a(r)},triggerNodeChanges:e=>{const{onNodesChange:t,setNodes:n,nodes:r,hasDefaultNodes:o,debug:a}=m();e?.length&&(o&&n($2(e,r)),a&&console.log("React Flow: trigger node changes",e),t?.(e))},triggerEdgeChanges:e=>{const{onEdgesChange:t,setEdges:n,edges:r,hasDefaultEdges:o,debug:a}=m();e?.length&&(o&&n(X2(e,r)),a&&console.log("React Flow: trigger edge changes",e),t?.(e))},addSelectedNodes:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:o,triggerEdgeChanges:a}=m();t?o(e.map(e=>q2(e,!0))):(o(J2(r,new Set([...e]),!0)),a(J2(n)))},addSelectedEdges:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:o,triggerEdgeChanges:a}=m();t?a(e.map(e=>q2(e,!0))):(a(J2(n,new Set([...e]))),o(J2(r,new Set,!0)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{const{edges:n,nodes:r,nodeLookup:o,triggerNodeChanges:a,triggerEdgeChanges:i}=m(),s=e||r,l=t||n,c=[];for(const e of s){if(!e.selected)continue;const t=o.get(e.id);t&&(t.selected=!1),c.push(q2(e.id,!1))}const u=[];for(const e of l)e.selected&&u.push(q2(e.id,!1));a(c),i(u)},setMinZoom:e=>{const{panZoom:t,maxZoom:n}=m();t?.setScaleExtent([e,n]),p({minZoom:e})},setMaxZoom:e=>{const{panZoom:t,minZoom:n}=m();t?.setScaleExtent([n,e]),p({maxZoom:e})},setTranslateExtent:e=>{m().panZoom?.setTranslateExtent(e),p({translateExtent:e})},resetSelectedElements:()=>{const{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:r,elementsSelectable:o}=m();if(!o)return;const a=t.reduce((e,t)=>t.selected?[...e,q2(t.id,!1)]:e,[]),i=e.reduce((e,t)=>t.selected?[...e,q2(t.id,!1)]:e,[]);n(a),r(i)},setNodeExtent:e=>{const{nodes:t,nodeLookup:n,parentLookup:r,nodeOrigin:o,elevateNodesOnSelect:a,nodeExtent:i,zIndexMode:s}=m();e[0][0]===i[0][0]&&e[0][1]===i[0][1]&&e[1][0]===i[1][0]&&e[1][1]===i[1][1]||(j1(t,n,r,{nodeOrigin:o,nodeExtent:e,elevateNodesOnSelect:a,checkEquality:!1,zIndexMode:s}),p({nodeExtent:e}))},panBy:e=>{const{transform:t,width:n,height:r,panZoom:o,translateExtent:a}=m();return async function({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,a]],r),s=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(s)}({delta:e,panZoom:o,transform:t,translateExtent:a,width:n,height:r})},setCenter:async(e,t,n)=>{const{width:r,height:o,maxZoom:a,panZoom:i}=m();if(!i)return Promise.resolve(!1);const s=void 0!==n?.zoom?n.zoom:a;return await i.setViewport({x:r/2-e*s,y:o/2-t*s,zoom:s},{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{p({connection:{...f0}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...C5()})}},Object.is);function T5({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:a,initialMinZoom:i,initialMaxZoom:s,initialFitViewOptions:l,fitView:c,nodeOrigin:u,nodeExtent:d,zIndexMode:f,children:p}){const[m]=(0,w.useState)(()=>A5({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:c,minZoom:i,maxZoom:s,fitViewOptions:l,nodeOrigin:u,nodeExtent:d,zIndexMode:f}));return(0,R.jsx)(h2,{value:m,children:(0,R.jsx)(a4,{children:p})})}function O5({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:a,height:i,fitView:s,fitViewOptions:l,minZoom:c,maxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}){return(0,w.useContext)(m2)?(0,R.jsx)(R.Fragment,{children:e}):(0,R.jsx)(T5,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:a,initialHeight:i,fitView:s,initialFitViewOptions:l,initialMinZoom:c,initialMaxZoom:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p,children:e})}const L5={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var z5=n4(function({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:a,edgeTypes:i,onNodeClick:s,onEdgeClick:l,onInit:c,onMove:u,onMoveStart:d,onMoveEnd:f,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:y,onNodeMouseEnter:b,onNodeMouseMove:v,onNodeMouseLeave:x,onNodeContextMenu:N,onNodeDoubleClick:E,onNodeDragStart:M,onNodeDrag:_,onNodeDragStop:I,onNodesDelete:S,onEdgesDelete:j,onDelete:k,onSelectionChange:D,onSelectionDragStart:C,onSelectionDrag:A,onSelectionDragStop:T,onSelectionContextMenu:O,onSelectionStart:L,onSelectionEnd:z,onBeforeDelete:P,connectionMode:U,connectionLineType:B=p0.Bezier,connectionLineStyle:F,connectionLineComponent:Y,connectionLineContainerStyle:Z,deleteKeyCode:Q="Backspace",selectionKeyCode:V="Shift",selectionOnDrag:W=!1,selectionMode:G=d0.Full,panActivationKeyCode:H="Space",multiSelectionKeyCode:$=(Q0()?"Meta":"Control"),zoomActivationKeyCode:X=(Q0()?"Meta":"Control"),snapToGrid:q,snapGrid:J,onlyRenderVisibleElements:K=!1,selectNodesOnDrag:ee,nodesDraggable:te,autoPanOnNodeFocus:ne,nodesConnectable:re,nodesFocusable:oe,nodeOrigin:ae=z2,edgesFocusable:ie,edgesReconnectable:se,elementsSelectable:le=!0,defaultViewport:ce=P2,minZoom:ue=.5,maxZoom:de=2,translateExtent:fe=i0,preventScrolling:pe=!0,nodeExtent:me,defaultMarkerColor:he="#b1b1b7",zoomOnScroll:ge=!0,zoomOnPinch:ye=!0,panOnScroll:we=!1,panOnScrollSpeed:be=.5,panOnScrollMode:ve=u0.Free,zoomOnDoubleClick:xe=!0,panOnDrag:Ne=!0,onPaneClick:Ee,onPaneMouseEnter:Me,onPaneMouseMove:_e,onPaneMouseLeave:Ie,onPaneScroll:Se,onPaneContextMenu:je,paneClickDistance:ke=1,nodeClickDistance:De=0,children:Ce,onReconnect:Ae,onReconnectStart:Te,onReconnectEnd:Oe,onEdgeContextMenu:Le,onEdgeDoubleClick:ze,onEdgeMouseEnter:Pe,onEdgeMouseMove:Re,onEdgeMouseLeave:Ue,reconnectRadius:Be=10,onNodesChange:Fe,onEdgesChange:Ye,noDragClassName:Ze="nodrag",noWheelClassName:Qe="nowheel",noPanClassName:Ve="nopan",fitView:We,fitViewOptions:Ge,connectOnClick:He,attributionPosition:$e,proOptions:Xe,defaultEdgeOptions:qe,elevateNodesOnSelect:Je=!0,elevateEdgesOnSelect:Ke=!1,disableKeyboardA11y:et=!1,autoPanOnConnect:tt,autoPanOnNodeDrag:nt,autoPanSpeed:rt,connectionRadius:ot,isValidConnection:at,onError:it,style:st,id:lt,nodeDragThreshold:ct,connectionDragThreshold:ut,viewport:dt,onViewportChange:ft,width:pt,height:mt,colorMode:ht="light",debug:gt,onScroll:yt,ariaLabelConfig:wt,zIndexMode:bt="basic",...vt},xt){const Nt=lt||"1",Et=function(e){const[t,n]=(0,w.useState)("system"===e?null:e);return(0,w.useEffect)(()=>{if("system"!==e)return void n(e);const t=Y2(),r=()=>n(t?.matches?"dark":"light");return r(),t?.addEventListener("change",r),()=>{t?.removeEventListener("change",r)}},[e]),null!==t?t:Y2()?.matches?"dark":"light"}(ht),Mt=(0,w.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),yt?.(e)},[yt]);return(0,R.jsx)("div",{"data-testid":"rf__wrapper",...vt,onScroll:Mt,style:{...st,...L5},ref:xt,className:a2(["react-flow",o,Et]),id:lt,role:"application",children:(0,R.jsxs)(O5,{nodes:e,edges:t,width:pt,height:mt,fitView:We,fitViewOptions:Ge,minZoom:ue,maxZoom:de,nodeOrigin:ae,nodeExtent:me,zIndexMode:bt,children:[(0,R.jsx)(F2,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:p,onConnectStart:m,onConnectEnd:h,onClickConnectStart:g,onClickConnectEnd:y,nodesDraggable:te,autoPanOnNodeFocus:ne,nodesConnectable:re,nodesFocusable:oe,edgesFocusable:ie,edgesReconnectable:se,elementsSelectable:le,elevateNodesOnSelect:Je,elevateEdgesOnSelect:Ke,minZoom:ue,maxZoom:de,nodeExtent:me,onNodesChange:Fe,onEdgesChange:Ye,snapToGrid:q,snapGrid:J,connectionMode:U,translateExtent:fe,connectOnClick:He,defaultEdgeOptions:qe,fitView:We,fitViewOptions:Ge,onNodesDelete:S,onEdgesDelete:j,onDelete:k,onNodeDragStart:M,onNodeDrag:_,onNodeDragStop:I,onSelectionDrag:A,onSelectionDragStart:C,onSelectionDragStop:T,onMove:u,onMoveStart:d,onMoveEnd:f,noPanClassName:Ve,nodeOrigin:ae,rfId:Nt,autoPanOnConnect:tt,autoPanOnNodeDrag:nt,autoPanSpeed:rt,onError:it,connectionRadius:ot,isValidConnection:at,selectNodesOnDrag:ee,nodeDragThreshold:ct,connectionDragThreshold:ut,onBeforeDelete:P,debug:gt,ariaLabelConfig:wt,zIndexMode:bt}),(0,R.jsx)(D5,{onInit:c,onNodeClick:s,onEdgeClick:l,onNodeMouseEnter:b,onNodeMouseMove:v,onNodeMouseLeave:x,onNodeContextMenu:N,onNodeDoubleClick:E,nodeTypes:a,edgeTypes:i,connectionLineType:B,connectionLineStyle:F,connectionLineComponent:Y,connectionLineContainerStyle:Z,selectionKeyCode:V,selectionOnDrag:W,selectionMode:G,deleteKeyCode:Q,multiSelectionKeyCode:$,panActivationKeyCode:H,zoomActivationKeyCode:X,onlyRenderVisibleElements:K,defaultViewport:ce,translateExtent:fe,minZoom:ue,maxZoom:de,preventScrolling:pe,zoomOnScroll:ge,zoomOnPinch:ye,zoomOnDoubleClick:xe,panOnScroll:we,panOnScrollSpeed:be,panOnScrollMode:ve,panOnDrag:Ne,onPaneClick:Ee,onPaneMouseEnter:Me,onPaneMouseMove:_e,onPaneMouseLeave:Ie,onPaneScroll:Se,onPaneContextMenu:je,paneClickDistance:ke,nodeClickDistance:De,onSelectionContextMenu:O,onSelectionStart:L,onSelectionEnd:z,onReconnect:Ae,onReconnectStart:Te,onReconnectEnd:Oe,onEdgeContextMenu:Le,onEdgeDoubleClick:ze,onEdgeMouseEnter:Pe,onEdgeMouseMove:Re,onEdgeMouseLeave:Ue,reconnectRadius:Be,defaultMarkerColor:he,noDragClassName:Ze,noWheelClassName:Qe,noPanClassName:Ve,rfId:Nt,disableKeyboardA11y:et,nodeExtent:me,viewport:dt,onViewportChange:ft}),(0,R.jsx)(O2,{onSelectionChange:D}),Ce,(0,R.jsx)(j2,{proOptions:Xe,position:$e}),(0,R.jsx)(I2,{rfId:Nt,disableKeyboardA11y:et})]})})});const P5=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function R5({children:e}){const t=y2(P5);return t?(0,bn.createPortal)(e,t):null}const U5=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function B5({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,R.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:a2(["react-flow__background-pattern",n,r])})}function F5({radius:e,className:t}){return(0,R.jsx)("circle",{cx:e,cy:e,r:e,className:a2(["react-flow__background-pattern","dots",t])})}var Y5;!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(Y5||(Y5={}));const Z5={[Y5.Dots]:1,[Y5.Lines]:1,[Y5.Cross]:6},Q5=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function V5({id:e,variant:t=Y5.Dots,gap:n=20,size:r,lineWidth:o=1,offset:a=0,color:i,bgColor:s,style:l,className:c,patternClassName:u}){const d=(0,w.useRef)(null),{transform:f,patternId:p}=y2(Q5,p2),m=r||Z5[t],h=t===Y5.Dots,g=t===Y5.Cross,y=Array.isArray(n)?n:[n,n],b=[y[0]*f[2]||1,y[1]*f[2]||1],v=m*f[2],x=Array.isArray(a)?a:[a,a],N=g?[v,v]:b,E=[x[0]*f[2]||1+N[0]/2,x[1]*f[2]||1+N[1]/2],M=`${p}${e||""}`;return(0,R.jsxs)("svg",{className:a2(["react-flow__background",c]),style:{...l,...u4,"--xy-background-color-props":s,"--xy-background-pattern-color-props":i},ref:d,"data-testid":"rf__background",children:[(0,R.jsx)("pattern",{id:M,x:f[0]%b[0],y:f[1]%b[1],width:b[0],height:b[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`,children:h?(0,R.jsx)(F5,{radius:v/2,className:u}):(0,R.jsx)(B5,{dimensions:N,lineWidth:o,variant:t,className:u})}),(0,R.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${M})`})]})}V5.displayName="Background";const W5=(0,w.memo)(V5);function G5(){return(0,R.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,R.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function H5(){return(0,R.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,R.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function $5(){return(0,R.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,R.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function X5(){return(0,R.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,R.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function q5(){return(0,R.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,R.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function J5({children:e,className:t,...n}){return(0,R.jsx)("button",{type:"button",className:a2(["react-flow__controls-button",t]),...n,children:e})}const K5=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function e3({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:a,onZoomOut:i,onFitView:s,onInteractiveChange:l,className:c,children:u,position:d="bottom-left",orientation:f="vertical","aria-label":p}){const m=w2(),{isInteractive:h,minZoomReached:g,maxZoomReached:y,ariaLabelConfig:w}=y2(K5,p2),{zoomIn:b,zoomOut:v,fitView:x}=s4(),N="horizontal"===f?"horizontal":"vertical";return(0,R.jsxs)(S2,{className:a2(["react-flow__controls",N,c]),position:d,style:e,"data-testid":"rf__controls","aria-label":p??w["controls.ariaLabel"],children:[t&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(J5,{onClick:()=>{b(),a?.()},className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:y,children:(0,R.jsx)(G5,{})}),(0,R.jsx)(J5,{onClick:()=>{v(),i?.()},className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:g,children:(0,R.jsx)(H5,{})})]}),n&&(0,R.jsx)(J5,{className:"react-flow__controls-fitview",onClick:()=>{x(o),s?.()},title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:(0,R.jsx)($5,{})}),r&&(0,R.jsx)(J5,{className:"react-flow__controls-interactive",onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),l?.(!h)},title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:h?(0,R.jsx)(q5,{}):(0,R.jsx)(X5,{})}),u]})}e3.displayName="Controls",(0,w.memo)(e3);const t3=(0,w.memo)(function({id:e,x:t,y:n,width:r,height:o,style:a,color:i,strokeColor:s,strokeWidth:l,className:c,borderRadius:u,shapeRendering:d,selected:f,onClick:p}){const{background:m,backgroundColor:h}=a||{},g=i||m||h;return(0,R.jsx)("rect",{className:a2(["react-flow__minimap-node",{selected:f},c]),x:t,y:n,rx:u,ry:u,width:r,height:o,style:{fill:g,stroke:s,strokeWidth:l},shapeRendering:d,onClick:p?t=>p(t,e):void 0})}),n3=e=>e.nodes.map(e=>e.id),r3=e=>e instanceof Function?e:()=>e,o3=(0,w.memo)(function({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:a,shapeRendering:i,NodeComponent:s,onClick:l}){const{node:c,x:u,y:d,width:f,height:p}=y2(t=>{const n=t.nodeLookup.get(e);if(!n)return{node:void 0,x:0,y:0,width:0,height:0};const r=n.internals.userNode,{x:o,y:a}=n.internals.positionAbsolute,{width:i,height:s}=W0(r);return{node:r,x:o,y:a,width:i,height:s}},p2);return c&&!c.hidden&&G0(c)?(0,R.jsx)(s,{x:u,y:d,width:f,height:p,style:c.style,selected:!!c.selected,className:r(c),color:t(c),borderRadius:o,strokeColor:n(c),strokeWidth:a,shapeRendering:i,onClick:l,id:c.id}):null});var a3=(0,w.memo)(function({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:a=t3,onClick:i}){const s=y2(n3,p2),l=r3(t),c=r3(e),u=r3(n),d="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return(0,R.jsx)(R.Fragment,{children:s.map(e=>(0,R.jsx)(o3,{id:e,nodeColorFunc:l,nodeStrokeColorFunc:c,nodeClassNameFunc:u,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:a,onClick:i,shapeRendering:d},e))})});const i3=e=>!e.hidden,s3=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?O0(x0(e.nodeLookup,{filter:i3}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}};function l3({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:a=5,nodeStrokeWidth:i,nodeComponent:s,bgColor:l,maskColor:c,maskStrokeColor:u,maskStrokeWidth:d,position:f="bottom-right",onClick:p,onNodeClick:m,pannable:h=!1,zoomable:g=!1,ariaLabel:y,inversePan:b,zoomStep:v=1,offsetScale:x=5}){const N=w2(),E=(0,w.useRef)(null),{boundingRect:M,viewBB:_,rfId:I,panZoom:S,translateExtent:j,flowWidth:k,flowHeight:D,ariaLabelConfig:C}=y2(s3,p2),A=e?.width??200,T=e?.height??150,O=M.width/A,L=M.height/T,z=Math.max(O,L),P=z*A,U=z*T,B=x*z,F=M.x-(P-M.width)/2-B,Y=M.y-(U-M.height)/2-B,Z=P+2*B,Q=U+2*B,V=`react-flow__minimap-desc-${I}`,W=(0,w.useRef)(0),G=(0,w.useRef)();W.current=z,(0,w.useEffect)(()=>{if(E.current&&S)return G.current=function({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=SJ(e);return{update:function({translateExtent:e,width:a,height:i,zoomStep:s=1,pannable:l=!0,zoomable:c=!0,inversePan:u=!1}){let d=[0,0];const f=a0().on("start",e=>{"mousedown"!==e.sourceEvent.type&&"touchstart"!==e.sourceEvent.type||(d=[e.sourceEvent.clientX??e.sourceEvent.touches[0].clientX,e.sourceEvent.clientY??e.sourceEvent.touches[0].clientY])}).on("zoom",l?o=>{const s=n();if("mousemove"!==o.sourceEvent.type&&"touchmove"!==o.sourceEvent.type||!t)return;const l=[o.sourceEvent.clientX??o.sourceEvent.touches[0].clientX,o.sourceEvent.clientY??o.sourceEvent.touches[0].clientY],c=[l[0]-d[0],l[1]-d[1]];d=l;const f=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),p={x:s[0]-c[0]*f,y:s[1]-c[1]*f},m=[[0,0],[a,i]];t.setViewportConstrained({x:p.x,y:p.y,zoom:s[2]},m,e)}:null).on("zoom.wheel",c?e=>{if("wheel"!==e.sourceEvent.type||!t)return;const r=n(),o=e.sourceEvent.ctrlKey&&Q0()?10:1,a=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*s,i=r[2]*Math.pow(2,a*o);t.scaleTo(i)}:null);o.call(f,{})},destroy:function(){o.on("zoom",null)},pointer:jJ}}({domNode:E.current,panZoom:S,getTransform:()=>N.getState().transform,getViewScale:()=>W.current}),()=>{G.current?.destroy()}},[S]),(0,w.useEffect)(()=>{G.current?.update({translateExtent:j,width:k,height:D,inversePan:b,pannable:h,zoomStep:v,zoomable:g})},[h,g,b,v,j,k,D]);const H=p?e=>{const[t,n]=G.current?.pointer(e)||[0,0];p(e,{x:t,y:n})}:void 0,$=m?(0,w.useCallback)((e,t)=>{const n=N.getState().nodeLookup.get(t).internals.userNode;m(e,n)},[]):void 0,X=y??C["minimap.ariaLabel"];return(0,R.jsx)(S2,{position:f,style:{...e,"--xy-minimap-background-color-props":"string"==typeof l?l:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof c?c:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof u?u:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof d?d*z:void 0,"--xy-minimap-node-background-color-props":"string"==typeof r?r:void 0,"--xy-minimap-node-stroke-color-props":"string"==typeof n?n:void 0,"--xy-minimap-node-stroke-width-props":"number"==typeof i?i:void 0},className:a2(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,R.jsxs)("svg",{width:A,height:T,viewBox:`${F} ${Y} ${Z} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":V,ref:E,onClick:H,children:[X&&(0,R.jsx)("title",{id:V,children:X}),(0,R.jsx)(a3,{onClick:$,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:o,nodeStrokeWidth:i,nodeComponent:s}),(0,R.jsx)("path",{className:"react-flow__minimap-mask",d:`M${F-B},${Y-B}h${Z+2*B}v${Q+2*B}h${-Z-2*B}z\n M${_.x},${_.y}h${_.width}v${_.height}h${-_.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}l3.displayName="MiniMap";const c3=(0,w.memo)(l3),u3={[X1.Line]:"right",[X1.Handle]:"bottom-right"};(0,w.memo)(function({nodeId:e,position:t,variant:n=X1.Handle,className:r,style:o,children:a,color:i,minWidth:s=10,minHeight:l=10,maxWidth:c=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:p=!0,shouldResize:m,onResizeStart:h,onResize:g,onResizeEnd:y}){const b=E4(),v="string"==typeof e?e:b,x=w2(),N=(0,w.useRef)(null),E=n===X1.Handle,M=y2((0,w.useCallback)((_=E&&p,e=>_?`${Math.max(1/e.transform[2],1)}`:void 0),[E,p]),p2);var _;const I=(0,w.useRef)(null),S=t??u3[n];(0,w.useEffect)(()=>{if(N.current&&v)return I.current||(I.current=function({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const a=SJ(e);let i={controlDirection:q1("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};return{update:function({controlPosition:e,boundaries:s,keepAspectRatio:l,resizeDirection:c,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m,h={...n2},g={...r2};i={boundaries:s,resizeDirection:c,keepAspectRatio:l,controlDirection:q1(e)};let y,w,b,v=null,x=[],N=!1;const E=FJ().on("start",e=>{const{nodeLookup:r,transform:o,snapGrid:a,snapToGrid:i,nodeOrigin:s,paneDomNode:l}=n();if(m=r.get(t),!m)return;v=l?.getBoundingClientRect()??null;const{xSnapped:c,ySnapped:d}=q0(e.sourceEvent,{transform:o,snapGrid:a,snapToGrid:i,containerBounds:v});h={width:m.measured.width??0,height:m.measured.height??0,x:m.position.x??0,y:m.position.y??0},g={...h,pointerX:c,pointerY:d,aspectRatio:h.width/h.height},y=void 0,m.parentId&&("parent"===m.extent||m.expandParent)&&(y=r.get(m.parentId),w=y&&"parent"===m.extent?function(e){return[[0,0],[e.measured.width,e.measured.height]]}(y):void 0),x=[],b=void 0;for(const[e,n]of r)if(n.parentId===t&&(x.push({id:e,position:{...n.position},extent:n.extent}),"parent"===n.extent||n.expandParent)){const e=o2(n,m,n.origin??s);b=b?[[Math.min(e[0][0],b[0][0]),Math.min(e[0][1],b[0][1])],[Math.max(e[1][0],b[1][0]),Math.max(e[1][1],b[1][1])]]:e}u?.(e,{...h})}).on("drag",e=>{const{transform:t,snapGrid:o,snapToGrid:a,nodeOrigin:s}=n(),l=q0(e.sourceEvent,{transform:t,snapGrid:o,snapToGrid:a,containerBounds:v}),c=[];if(!m)return;const{x:u,y:f,width:E,height:M}=h,_={},I=m.origin??s,{width:S,height:j,x:k,y:D}=function(e,t,n,r,o,a,i,s){let{affectsX:l,affectsY:c}=t;const{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:y,maxHeight:w}=r,{x:b,y:v,width:x,height:N,aspectRatio:E}=e;let M=Math.floor(u?p-e.pointerX:0),_=Math.floor(d?m-e.pointerY:0);const I=x+(l?-M:M),S=N+(c?-_:_),j=-a[0]*x,k=-a[1]*N;let D=e2(I,h,g),C=e2(S,y,w);if(i){let e=0,t=0;l&&M<0?e=J1(b+M+j,i[0][0]):!l&&M>0&&(e=K1(b+I+j,i[1][0])),c&&_<0?t=J1(v+_+k,i[0][1]):!c&&_>0&&(t=K1(v+S+k,i[1][1])),D=Math.max(D,e),C=Math.max(C,t)}if(s){let e=0,t=0;l&&M>0?e=K1(b+M,s[0][0]):!l&&M<0&&(e=J1(b+I,s[1][0])),c&&_>0?t=K1(v+_,s[0][1]):!c&&_<0&&(t=J1(v+S,s[1][1])),D=Math.max(D,e),C=Math.max(C,t)}if(o){if(u){const e=e2(I/E,y,w)*E;if(D=Math.max(D,e),i){let e=0;e=!l&&!c||l&&!c&&f?K1(v+k+I/E,i[1][1])*E:J1(v+k+(l?M:-M)/E,i[0][1])*E,D=Math.max(D,e)}if(s){let e=0;e=!l&&!c||l&&!c&&f?J1(v+I/E,s[1][1])*E:K1(v+(l?M:-M)/E,s[0][1])*E,D=Math.max(D,e)}}if(d){const e=e2(S*E,h,g)/E;if(C=Math.max(C,e),i){let e=0;e=!l&&!c||c&&!l&&f?K1(b+S*E+j,i[1][0])/E:J1(b+(c?_:-_)*E+j,i[0][0])/E,C=Math.max(C,e)}if(s){let e=0;e=!l&&!c||c&&!l&&f?J1(b+S*E,s[1][0])/E:K1(b+(c?_:-_)*E,s[0][0])/E,C=Math.max(C,e)}}}_+=_<0?C:-C,M+=M<0?D:-D,o&&(f?I>S*E?_=(t2(l,c)?-M:M)/E:M=(t2(l,c)?-_:_)*E:u?(_=M/E,c=l):(M=_*E,l=c));const A=l?b+M:b,T=c?v+_:v;return{width:x+(l?-M:M),height:N+(c?-_:_),x:a[0]*M*(l?-1:1)+A,y:a[1]*_*(c?-1:1)+T}}(g,i.controlDirection,l,i.boundaries,i.keepAspectRatio,I,w,b),C=S!==E,A=j!==M,T=k!==u&&C,O=D!==f&&A;if(!(T||O||C||A))return;if((T||O||1===I[0]||1===I[1])&&(_.x=T?k:h.x,_.y=O?D:h.y,h.x=_.x,h.y=_.y,x.length>0)){const e=k-u,t=D-f;for(const n of x)n.position={x:n.position.x-e+I[0]*(S-E),y:n.position.y-t+I[1]*(j-M)},c.push(n)}if((C||A)&&(_.width=!C||i.resizeDirection&&"horizontal"!==i.resizeDirection?h.width:S,_.height=!A||i.resizeDirection&&"vertical"!==i.resizeDirection?h.height:j,h.width=_.width,h.height=_.height),y&&m.expandParent){const e=I[0]*(_.width??0);_.x&&_.x<e&&(h.x=e,g.x=g.x-(_.x-e));const t=I[1]*(_.height??0);_.y&&_.y<t&&(h.y=t,g.y=g.y-(_.y-t))}const L=function({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:a}){const i=e-t,s=n-r,l=[i>0?1:i<0?-1:0,s>0?1:s<0?-1:0];return i&&o&&(l[0]=-1*l[0]),s&&a&&(l[1]=-1*l[1]),l}({width:h.width,prevWidth:E,height:h.height,prevHeight:M,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),z={...h,direction:L},P=p?.(e,z);!1!==P&&(N=!0,d?.(e,z),r(_,c))}).on("end",e=>{N&&(f?.(e,{...h}),o?.({...h}),N=!1)});a.call(E)},destroy:function(){a.on(".drag",null)}}}({domNode:N.current,nodeId:v,getStoreItems:()=>{const{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:o,domNode:a}=x.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:o,paneDomNode:a}},onChange:(e,t)=>{const{triggerNodeChanges:n,nodeLookup:r,parentLookup:o,nodeOrigin:a}=x.getState(),i=[],s={x:e.x,y:e.y},l=r.get(v);if(l&&l.expandParent&&l.parentId){const t=l.origin??a,n=e.width??l.measured.width??0,c=e.height??l.measured.height??0,u=C1([{id:l.id,parentId:l.parentId,rect:{width:n,height:c,...H0({x:e.x??l.position.x,y:e.y??l.position.y},{width:n,height:c},l.parentId,r,t)}}],r,o,a);i.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*c,e.y):void 0}if(void 0!==s.x&&void 0!==s.y){const e={id:v,type:"position",position:{...s}};i.push(e)}if(void 0!==e.width&&void 0!==e.height){const t={id:v,type:"dimensions",resizing:!0,setAttributes:!f||("horizontal"===f?"width":"height"),dimensions:{width:e.width,height:e.height}};i.push(t)}for(const e of t){const t={...e,type:"position"};i.push(t)}n(i)},onEnd:({width:e,height:t})=>{const n={id:v,type:"dimensions",resizing:!1,dimensions:{width:e,height:t}};x.getState().triggerNodeChanges([n])}})),I.current.update({controlPosition:S,boundaries:{minWidth:s,minHeight:l,maxWidth:c,maxHeight:u},keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:y,shouldResize:m}),()=>{I.current?.destroy()}},[S,s,l,c,u,d,h,g,y,m]);const j=S.split("-");return(0,R.jsx)("div",{className:a2(["react-flow__resize-control","nodrag",...j,n,r]),ref:N,style:{...o,scale:M,...i&&{[E?"backgroundColor":"borderColor"]:i}},children:a})});const d3=(0,a.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o="start"===e?.position,i="end"===e?.position,{position:s,id:l}="start"==(o?"start":"end")?n?{position:h0.Bottom,id:"bottom"}:r?{position:h0.Right,id:"right"}:{position:h0.Left,id:"left"}:n?{position:h0.Top,id:"top"}:r?{position:h0.Left,id:"left"}:{position:h0.Right,id:"right"};return(0,a.createElement)(a.Fragment,null,i&&(0,a.createElement)(_4,{type:"target",position:s,id:l,style:{background:"#555",border:"2px dotted #555",transition:"all 0.3s ease"},className:`react-flow__handle wcf-handle-${l}`,isConnectable:t}),(0,a.createElement)("div",{className:"wcf-custom-label-node--wrapper bg-primary-50 py-1 px-3 border border-primary-300 rounded-md text-primary-500 text-sm font-medium","aria-label":e.label},e.label),o&&(0,a.createElement)(_4,{type:"source",position:s,id:l,style:{border:"2px dotted #555",transition:"all 0.3s ease"},className:`react-flow__handle wcf-handle-${l}`,isConnectable:t}))});function f3({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z"}))}const p3=w.forwardRef(f3),m3=(0,a.memo)(({data:e,isConnectable:t})=>{const n="LR"===e.direction?"target":"source",r="LR"===e.direction?"source":"target",o=(Array.isArray(e?.conditions)?e.conditions.length:0)+(e?.defaultStep?1:0),i=o?(0,z.sprintf)(/* translators: %d: number of dynamic-offer conditions on this checkout */ /* translators: %d: number of dynamic-offer conditions on this checkout */ |
| 57 |
(0,z._n)("%d condition","%d conditions",o,"cartflows"),o):"";return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:n,position:h0.Left,style:{background:"#555"},isConnectable:t,className:"react-flow__handle wcf-handle-left"}),(0,a.createElement)("div",{className:"wcf-custom-node-wrapper wcf-conditional-node",style:{width:"80px",margin:"auto",height:"80px",display:"flex",alignItems:"center",justifyContent:"center",transform:"rotate(45deg)"}},(0,a.createElement)("div",{className:"wcf-custom-node-design"},(0,a.createElement)(C,{to:{pathname:"admin.php",search:"storeCheckout"===e?.flow_type?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.checkoutId}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.checkoutId}`},title:"Dynamic Offers",rel:"noreferrer",className:"wcf-custom-node-content bg-white border border-gray-200 shadow-md",style:{width:"80px",margin:"auto",height:"80px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"}},(0,a.createElement)(p3,{className:"w-8 h-8 !fill-[none] stroke-2 text-gray-500",style:{transform:"rotate(-45deg)"}})))),(0,a.createElement)("div",{className:"wcf-custom-node-label",style:{fontSize:"11px",fontWeight:"600",marginTop:"8px",textAlign:"center"}},e.label||(0,z.__)("Dynamic Offers","cartflows")),i&&(0,a.createElement)("div",{className:"wcf-conditional-node__summary",style:{fontSize:"10px",color:"#6B7280",marginTop:"2px",textAlign:"center"}},i),(0,a.createElement)(_4,{type:r,position:h0.Right,style:{background:"#555"},isConnectable:t,className:"react-flow__handle wcf-handle-right"}))}),h3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFQUVBRUEiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOEgwVjEwWiIgZmlsbD0iI0U2RUFFRCIvPjxjaXJjbGUgY3g9IjE0IiBjeT0iMTQiIHI9IjQiIGZpbGw9IiNGRjNCMzAiLz48Y2lyY2xlIGN4PSIyNyIgY3k9IjE0IiByPSI0IiBmaWxsPSIjRkMwIi8+PGNpcmNsZSBjeD0iNDAiIGN5PSIxNCIgcj0iNCIgZmlsbD0iIzRDRDk2NCIvPjxyZWN0IHg9IjY0IiB5PSIxMCIgd2lkdGg9IjEwNyIgaGVpZ2h0PSI3IiByeD0iMSIgZmlsbD0iI2ZmZiIvPjxyZWN0IHg9IjIzIiB5PSIyMjAiIHdpZHRoPSIxNTQiIGhlaWdodD0iMjAiIHJ4PSIyIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTY3LjIwNiAyMzMuNWgyLjc5NmMxLjQ3IDAgMi4yNTMtLjc2NyAyLjI1My0xLjgwOSAwLS45NjgtLjY5My0xLjU1My0xLjQzOC0xLjU4OHYtLjA2NGMuNjgtLjE1NCAxLjE4My0uNjM2IDEuMTgzLTEuNDA3IDAtLjk4MS0uNzI5LTEuNjc3LTIuMTc0LTEuNjc3aC0yLjYydjYuNTQ1Wm0xLjM4My0xLjEzMXYtMS43MzloMS4xNmMuNjY1IDAgMS4wNzguMzgzIDEuMDc4LjkyNCAwIC40OTItLjMzNi44MTUtMS4xMS44MTVINjguNTlabTAtMi42NzV2LTEuNjIxaDEuMDUyYy42MTQgMCAuOTYyLjMxNy45NjIuNzkgMCAuNTE3LS40MjIuODMxLS45ODguODMxSDY4LjU5Wm03LjY5IDEuNzE2Yy4wMDIuNjU4LS40NDggMS4wMDMtLjkzNyAxLjAwMy0uNTE1IDAtLjg0Ny0uMzYxLS44NS0uOTM5di0yLjg4M0g3My4xM3YzLjEyNmMuMDAzIDEuMTQ3LjY3NSAxLjg0NyAxLjY2MiAxLjg0Ny43MzkgMCAxLjI2OS0uMzggMS40OS0uOTU2aC4wNXYuODkyaDEuMzA4di00LjkwOWgtMS4zNjJ2Mi44MTlabTMuMjkgMy45MzFjMS4wMTQgMCAxLjU1LS41MTggMS44MjgtMS4zMWwxLjkwOS01LjQzNC0xLjQ0Mi0uMDA2LTEuMDI2IDMuNjA1aC0uMDVsLTEuMDE3LTMuNjA1aC0xLjQzMmwxLjc2MSA1LjA1LS4wOC4yMDdjLS4xNzkuNDYxLS41Mi40ODMtMSAuMzM2bC0uMzA3IDEuMDE2Yy4xOTUuMDgzLjUxMS4xNDEuODU2LjE0MVptMTIuMDE3LTguMzg2aC0xLjM3OHY0LjExNmgtLjA1N2wtMi44MjYtNC4xMTZoLTEuMjE0djYuNTQ1aDEuMzg0di00LjEyaC4wNDhsMi44NDcgNC4xMmgxLjE5NnYtNi41NDVabTMuMzM1IDYuNjQxYzEuNDkgMCAyLjQxNy0xLjAyIDIuNDE3LTIuNTMxIDAtMS41MjItLjkyNy0yLjUzOC0yLjQxNi0yLjUzOC0xLjQ5IDAtMi40MTcgMS4wMTYtMi40MTcgMi41MzggMCAxLjUxMS45MjcgMi41MzEgMi40MTYgMi41MzFabS4wMDctMS4wNTVjLS42ODcgMC0xLjAzOS0uNjI5LTEuMDM5LTEuNDg2IDAtLjg1Ni4zNTItMS40ODkgMS4wMzktMS40ODkuNjc0IDAgMS4wMjYuNjMzIDEuMDI2IDEuNDg5IDAgLjg1Ny0uMzUyIDEuNDg2LTEuMDI2IDEuNDg2Wm00LjE0Ljk1OWgxLjQzOWwuODQzLTMuMDg3aC4wNjFsLjg0NCAzLjA4N2gxLjQ0MWwxLjMzMy00LjkwOWgtMS4zNzRsLS43NDggMy4yNzloLS4wNDJsLS44MDUtMy4yNzloLTEuMzUybC0uNzkzIDMuMjk4aC0uMDQ0bC0uNzYxLTMuMjk4aC0xLjM3OGwxLjMzNiA0LjkwOVptOS4wNzEtMi42MjRjMCAxLjU4OC40MTggMi45MDggMS4yOTEgNC4wNDZoMS4zMDFjLS42NjgtLjg0NC0xLjE3Ni0yLjUzMS0xLjE3Ni00LjA0NiAwLTEuNTEyLjUwOC0zLjE5OSAxLjE3Ni00LjA0M2gtMS4zMDFjLS44NzMgMS4xMzgtMS4yOTEgMi40NTUtMS4yOTEgNC4wNDNabTkuMTgzLTEuNjNjLS4xODMtMS41MTItMS4zMjctMi4zODEtMi44NDItMi4zODEtMS43MjkgMC0zLjA0OSAxLjIyMS0zLjA0OSAzLjM2MiAwIDIuMTM1IDEuMjk4IDMuMzYyIDMuMDQ5IDMuMzYyIDEuNjc4IDAgMi42OTEtMS4xMTUgMi44NDItMi4zMmwtMS40LS4wMDZjLS4xMzEuNy0uNjgxIDEuMTAyLTEuNDE5IDEuMTAyLS45OTQgMC0xLjY2OS0uNzM4LTEuNjY5LTIuMTM4IDAtMS4zNjEuNjY1LTIuMTM4IDEuNjc4LTIuMTM4Ljc1OCAwIDEuMzA0LjQzOCAxLjQxIDEuMTU3aDEuNFptLjc0My0xLjE1aDIuMDA0djUuNDA0aDEuMzY4di01LjQwNGgyLjAwM3YtMS4xNDFoLTUuMzc1djEuMTQxWm02LjU4IDUuNDA0LjQ4Ni0xLjQ5M2gyLjM2MmwuNDg2IDEuNDkzaDEuNDgzbC0yLjI1Ny02LjU0NWgtMS43ODNsLTIuMjYgNi41NDVoMS40ODNabS44MzgtMi41NzMuODA1LTIuNDc3aC4wNTFsLjgwNiAyLjQ3N2gtMS42NjJabTcuMDM2LS43YzAtMS41ODgtLjQxOS0yLjkwOC0xLjI5MS00LjA0NmgtMS4zMDFjLjY2OC44NDQgMS4xNzYgMi41MzEgMS4xNzYgNC4wNDYgMCAxLjUxMi0uNTA4IDMuMTk5LTEuMTc2IDQuMDQzaDEuMzAxYy44NzItMS4xMzggMS4yOTEtMi40NTQgMS4yOTEtNC4wNDNaIiBmaWxsPSIjZmZmIi8+PHJlY3QgeD0iNjUiIHk9IjE2NCIgd2lkdGg9IjcwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iNzUiIHk9IjU3IiB3aWR0aD0iNTAiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSI1MCIgeT0iNDMiIHdpZHRoPSIxMDAiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiMyMjcxQjEiLz48cmVjdCB4PSIyMy43NSIgeT0iNzYuNzUiIHdpZHRoPSIxNTIuNSIgaGVpZ2h0PSI2MS41IiByeD0iMS4yNSIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMjI3MUIxIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Im05NS44NzcgMTEzLjQ4MyAxOS4xMTMtMTkuMzg0IDI4LjM0OSAzMi4xNTFINTguODc2bDI0LjUzLTIzLjM1MSAxMS40MjcgMTAuNjA3LjUzMy40OTUuNTEtLjUxOFoiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzIyNzFCMSIgc3Ryb2tlLXdpZHRoPSIxLjUiLz48cGF0aCBkPSJNMTAxLjI1IDk1YzAgMi45NjItMi4xODcgNS4yNS00Ljc1IDUuMjVzLTQuNzUtMi4yODgtNC43NS01LjI1IDIuMTg3LTUuMjUgNC43NS01LjI1IDQuNzUgMi4yODggNC43NSA1LjI1WiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMjI3MUIxIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Im0xNjYuNzI3IDExMS4wNiAzLjA1My0zLjA2LTMuMDUzLTMuMDYuOTQtLjk0IDQgNC00IDQtLjk0LS45NFpNMzQuMjcyIDExMS4wNiAzMS4yMTkgMTA4bDMuMDUzLTMuMDYtLjk0LS45NC00IDQgNCA0IC45NC0uOTRaIiBmaWxsPSIjMjI3MUIxIi8+PGNpcmNsZSBjeD0iOTEuNSIgY3k9IjE0Ny41IiByPSIxLjUiIGZpbGw9IiMyMjcxQjEiLz48Y2lyY2xlIGN4PSI5OS41IiBjeT0iMTQ3LjUiIHI9IjEuNSIgZmlsbD0iIzIyNzFCMSIvPjxjaXJjbGUgY3g9IjEwNy41IiBjeT0iMTQ3LjUiIHI9IjEuNSIgZmlsbD0iIzIyNzFCMSIvPjxyZWN0IHg9IjIzIiB5PSIxNzgiIHdpZHRoPSIxNTQiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSIyMyIgeT0iMTkyIiB3aWR0aD0iMTU0IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iMjMiIHk9IjIwNiIgd2lkdGg9IjE1NCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0U2RUFFRCIvPjwvc3ZnPg==";function g3({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375M9 15l2.25 2.25L15 12"}))}const y3=w.forwardRef(g3);function w3({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 6 9 12.75l4.286-4.286a11.948 11.948 0 0 1 4.306 6.43l.776 2.898m0 0 3.182-5.511m-3.182 5.51-5.511-3.181"}))}const b3=w.forwardRef(w3);function v3({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.633 10.25c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 0 1 2.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 0 0 .322-1.672V2.75a.75.75 0 0 1 .75-.75 2.25 2.25 0 0 1 2.25 2.25c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282m0 0h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 0 1-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 0 0-1.423-.23H5.904m10.598-9.75H14.25M5.904 18.5c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 0 1-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 9.953 4.167 9.5 5 9.5h1.053c.472 0 .745.556.5.96a8.958 8.958 0 0 0-1.302 4.665c0 1.194.232 2.333.654 3.375Z"}))}const x3=w.forwardRef(v3),N3=Fo("ChartPie",[["path",{d:"M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z",key:"pzmjnu"}],["path",{d:"M21.21 15.89A10 10 0 1 1 8 2.83",key:"k2fpak"}]]),E3=Fo("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]),M3=Fo("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),_3=Fo("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),I3=Fo("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]),S3=Fo("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),j3=Fo("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),k3=Fo("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),D3=e=>{const t=Number(e)||0;return 0===t?"—":Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`},C3=({bump:e,settingsUrl:t})=>{const n=!e.revenue&&!e.conversions;return(0,a.createElement)(C,{to:{pathname:"admin.php",search:t},className:"wcf-bump-row bg-background-secondary border border-solid border-border-subtle rounded-md px-3 py-2 no-underline hover:bg-background-tertiary",title:e.title},(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,a.createElement)("span",{className:"wcf-bump-row__icon bg-primary-25 p-1 rounded border border-solid border-primary-300 inline-flex items-center justify-center shrink-0","aria-label":(0,z.__)("Order bump","cartflows")},(0,a.createElement)(u$,{className:"w-3 h-3 stroke-2 text-primary-500"})),(0,a.createElement)(Ch,{as:"span",size:14,color:n?"tertiary":"primary",className:"wcf-bump-row__title truncate flex-1 text-left"},e.title),(0,a.createElement)(Ch,{as:"span",size:12,color:n?"tertiary":"secondary",className:"tabular-nums w-10 text-right"},(e=>{const t=parseInt(e,10)||0;return 0===t?"—":String(t)})(e.conversions)),(0,a.createElement)(Ch,{as:"span",size:14,weight:n?400:600,color:n?"tertiary":"primary",className:"tabular-nums w-14 text-right"},D3(e.revenue)),(0,a.createElement)(oB,{className:"w-3 h-3 stroke-2 text-text-tertiary shrink-0"})))},A3=({stepId:e,flowId:t,flowType:n,bumps:r=[],compact:o=!1})=>{const[i,s]=(0,a.useState)(!1);if(!Array.isArray(r)||0===r.length)return null;const l=r.reduce((e,t)=>e+(Number(t.revenue)||0),0),c="storeCheckout"===n?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t}&step_id=${e}&tab=order_bumps`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${t}&step_id=${e}&tab=order_bumps`;return o?(0,a.createElement)(C,{to:{pathname:"admin.php",search:c},className:"wcf-bumps-section wcf-bumps-section--compact px-3 py-2 border-0 border-t border-b border-solid border-border-subtle no-underline hover:bg-background-secondary"},(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",justify:"between"},(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,a.createElement)(u$,{className:"w-3.5 h-3.5 stroke-2 text-text-primary"}),(0,a.createElement)(Ch,{as:"span",size:12,weight:500,color:"primary"},(0,z.__)("Order Bumps","cartflows")),(0,a.createElement)(Ch,{as:"span",size:12,color:"secondary",className:"tabular-nums"},"(",r.length,")")),(0,a.createElement)(Ch,{as:"span",size:12,color:"secondary",className:"tabular-nums"},D3(l)))):(0,a.createElement)(Eh,{containerType:"flex",direction:"column",className:"wcf-bumps-section px-4 py-3 border-0 border-t border-b border-solid border-border-subtle "+(i?"":"!gap-0")},(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",justify:"between",className:i?"mb-2":""},(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,a.createElement)(u$,{className:"w-4 h-4 stroke-2 text-text-primary"}),(0,a.createElement)(Ch,{as:"span",size:14,weight:500,color:"primary"},(0,z.__)("Order Bumps","cartflows")),(0,a.createElement)(Ch,{as:"span",size:12,color:"secondary",className:"tabular-nums"},"(",r.length,")")),(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,a.createElement)(Ch,{as:"span",size:12,color:"tertiary"},(0,z.__)("Total","cartflows")),(0,a.createElement)(Ch,{as:"span",size:12,weight:500,color:"primary",className:"tabular-nums"},D3(l)),(0,a.createElement)(Wo,{variant:"ghost",size:"xs",type:"button",onClick:()=>s(e=>!e),"aria-expanded":i,"aria-label":i?(0,z.__)("Collapse order bumps","cartflows"):(0,z.__)("Expand order bumps","cartflows"),icon:(0,a.createElement)(Gp,{className:"stroke-2 transition-transform duration-300 ease-in-out "+(i?"rotate-180":"")}),className:"wcf-bumps-section__toggle !p-0.5 text-text-tertiary hover:text-text-primary"}))),(0,a.createElement)("div",{className:"wcf-bumps-section__body grid transition-[grid-template-rows] duration-300 ease-in-out "+(i?"grid-rows-[1fr]":"grid-rows-[0fr]"),"aria-hidden":!i},(0,a.createElement)("div",{className:"overflow-hidden min-h-0"},(0,a.createElement)(Eh,{containerType:"flex",direction:"column",gap:"xs"},r.map(e=>(0,a.createElement)(C3,{key:e.id,bump:e,settingsUrl:c}))),(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",justify:"end",gap:"sm",className:"pt-1.5 mt-0.5"},(0,a.createElement)(Ch,{as:"span",size:12,color:"tertiary",className:"uppercase tracking-wide w-10 text-right"},(0,z.__)("Sales","cartflows")),(0,a.createElement)(Ch,{as:"span",size:12,color:"tertiary",className:"uppercase tracking-wide w-14 text-right"},(0,z.__)("Revenue","cartflows")),(0,a.createElement)("span",{className:"w-3","aria-hidden":"true"})))))},T3={cloneStepRequest(e){const t=(0,P.applyFilters)("cartflows.canvas.cloneStepRequest",null);return t&&wcfCartflowsPro()?t(e):Promise.resolve(null)},createEventHandlers(e,t,n,r,o={}){const a=(0,P.applyFilters)("cartflows.flowEditor.abActions",null),i=a?a({stepId:e?.step_id,flowId:e?.flow_id,confirm:t,setLoader:r,toast:Vm}):{},s=e=>e.preventDefault();return{clone:async function(n){if(n.preventDefault(),!wcfCartflowsPro())return null;const o=n.currentTarget.getAttribute("data-action");if(await t({title:(0,z.__)("Duplicate Step","cartflows"),description:(0,z.__)("Do you want to duplicate this step? Are you sure?","cartflows"),actionBtnText:(0,z.__)("Yes","cartflows"),cancelBtnText:(0,z.__)("No","cartflows")})){r(!0);let t=cartflows_admin.clone_step_nonce;const n=new window.FormData;"cartflows_clone_ab_test_step"===o&&(t=cartflows_admin.wcf_clone_ab_test_step_nonce,n.append("control_id",e?.control_id)),n.append("action",o),n.append("security",t),n.append("step_id",e?.step_id),n.append("post_id",e?.flow_id),window.wcfAction="cloneStep",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{window.location.reload()}).catch(e=>{console.error("Cloning step failed:",e),r(!1)}))}},delete:o.delete||async function(n){n.preventDefault();const o=n.currentTarget.getAttribute("data-action");if(await t({title:(0,z.__)("Delete Step","cartflows"),description:(0,z.__)("Do you want to delete this step? Are you sure?","cartflows"),actionBtnText:(0,z.__)("Yes","cartflows"),cancelBtnText:(0,z.__)("No","cartflows")})){r(!0);let t=cartflows_admin.delete_step_nonce;const n=new window.FormData;"cartflows_delete_ab_test_step"===o&&(t=cartflows_admin.wcf_delete_ab_test_step_nonce,n.append("control_id",e?.control_id)),n.append("action",o),n.append("security",t),n.append("step_id",e?.step_id),n.append("post_id",e?.flow_id),window.wcfAction="deleteStep",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{window.location.reload()}).catch(e=>{console.error("Delete step failed:",e),r(!1)}))}},abtest:i.abtest||s,winner:i.winner||s,archived:i.archived||s,automation:()=>{n.push({pathname:"admin.php",search:"storeCheckout"===e?.flow_type?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e?.flow_id}&automation=${e?.step_id}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e?.flow_id}&automation=${e?.step_id}`})}}},async performDelete(e,t,n,r={}){n(!0);let a=cartflows_admin.delete_step_nonce;const i=new window.FormData;"cartflows_delete_ab_test_step"===t&&(a=cartflows_admin.wcf_delete_ab_test_step_nonce,i.append("control_id",e?.control_id)),i.append("action",t),i.append("security",a),i.append("step_id",e?.step_id),i.append("post_id",e?.flow_id),Object.keys(r).length>0&&i.append("redirect_updates",JSON.stringify(r)),window.wcfAction="deleteStep";try{const e=(await Promise.resolve().then(o.t.bind(o,1455,23))).default;await e({url:cartflows_admin.ajax_url,method:"POST",body:i}),window.location.reload()}catch(e){console.error("Delete step failed:",e),n(!1)}},nodeHtml(e,t,n,r,o,i,s,l,c,u,d,f,p=[],m=!1,h=[],g="",y=!1,w=!1){const b=lg(e?.step_type,g),v=()=>{let e=0;return c&&c.visits&&(e=c.visits.total_visits||0),e},x=()=>{let e=0;return c&&c.visits&&(e=c.visits.conversions||0),e},N=()=>c&&c?.visits?.revenue?Vh(c.visits.revenue):0,E=e?.step_type||"",M=sg(e?.step_title||"");return(0,a.createElement)("div",{className:`wcf-custom-node-wrapper${m?" wcf-custom-node-wrapper--compact":""}${y?" wcf-custom-node-wrapper--locked pointer-events-none touch-none opacity-60":""}`},(0,a.createElement)("div",{className:"wcf-custom-node-design"},(0,a.createElement)("div",{className:"wcf-node-actions absolute flex bg-white left-11 -top-16 rounded-md py-0.5 px-1.5 sm:hidden lg:hidden"},(0,a.createElement)(ea,{content:(0,z.__)("View Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:n,target:"_blank",rel:"noreferrer","aria-label":(0,z.__)("View Page","cartflows"),className:"wcf-canvas--view-step text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer p-2 block"},(0,a.createElement)(S3,{className:"w-5 h-5"}))),(0,a.createElement)(ea,{content:b?cg():(0,z.__)("Edit Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:b?"#!":r,target:b?void 0:"_blank",rel:"noreferrer","aria-label":(0,z.__)("Edit Page","cartflows"),"aria-disabled":b,tabIndex:b?-1:0,className:"wcf-canvas--edit-step p-2 block "+(b?"disabled text-text-disabled cursor-not-allowed":"text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer")},(0,a.createElement)(j3,{className:"w-5 h-5"}))),(0,a.createElement)(ea,{content:(0,z.__)("Edit Settings","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)(C,{to:{pathname:"admin.php",search:"storeCheckout"===e?.flow_type?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.step_id}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.step_id}`},rel:"noreferrer","aria-label":(0,z.__)("Edit Settings","cartflows"),className:"wcf-canvas--edit-settings relative text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer p-2 block"},(0,a.createElement)(k3,{className:"w-5 h-5"})))),(0,a.createElement)("div",{className:"wcf-custom-node-content bg-white border border-gray-200 rounded-lg shadow-md"+(f?" opacity-50":"")},(0,a.createElement)("div",{className:"wcf-custom-node-content--header flex flex-col gap-3 border-b border-gray-200 py-4 px-5"},(0,a.createElement)("div",{className:"wcf-node-step--info-wrapper flex flex-row items-center gap-4 w-full"},(0,a.createElement)("div",{className:"wcf-node-step--icon bg-primary-25 p-2.5 rounded border border-primary-300"},(e=>{let t="";const n="w-5 h-5 stroke-2 text-primary-500";switch(e){case"landing":t=(0,a.createElement)(zV,{className:n});break;case"optin":t=(0,a.createElement)(y3,{className:n});break;case"checkout":t=(0,a.createElement)(nG,{className:n});break;case"upsell":t=(0,a.createElement)(pm,{className:n});break;case"downsell":t=(0,a.createElement)(b3,{className:n});break;case"thankyou":t=(0,a.createElement)(x3,{className:n});break;default:t=(0,a.createElement)(sV,{className:n})}return t})(E)),(0,a.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,a.createElement)("div",{className:"wcf-node-step--type flex items-center gap-2"},(0,a.createElement)("span",{className:"text-xs font-normal text-gray-400"},(_=E,{landing:(0,z.__)("Landing","cartflows"),optin:(0,z.__)("Optin","cartflows"),checkout:(0,z.__)("Checkout","cartflows"),upsell:(0,z.__)("Upsell","cartflows"),downsell:(0,z.__)("Downsell","cartflows"),thankyou:(0,z.__)("Thank You","cartflows")}[_]||_)),u&&(0,a.createElement)("span",{className:"wcf-flow-badge wcf-badge wcf-badge--error !text-[10px] !px-2 !py-px wcf-invalid-sequence-badge"},(0,a.createElement)(nW,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"}),(0,z.__)("Invalid Position","cartflows"))),(0,a.createElement)("div",{className:"wcf-node-step--title text-left"},(0,a.createElement)("span",{className:"font-semibold text-sm text-gray-800 hover:text-gray-800"},M)))),function(){let e=null;return d||(e=(0,a.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-no-product-badge"},(0,z.__)("No Product Assigned","cartflows"))),e}(),w&&(0,a.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-global-checkout-error-badge"},(0,z.__)("Store Checkout - Remove selected checkout product","cartflows")),f&&(0,a.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-disabled-step-badge"},(0,z.__)("Disabled","cartflows")),p&&p.length>0&&(0,a.createElement)("div",{className:"wcf-node-warnings flex flex-wrap gap-1"},p.slice(0,2).map((e,t)=>(0,a.createElement)("span",{key:t,className:`wcf-badge wcf-badge--${"error"===e.severity?"error":"warning"} wcf-warning-pill !text-[10px] !px-2 !py-px`,title:e.message},e.message)),p.length>2&&(0,a.createElement)("span",{className:"wcf-badge wcf-warning-pill-more !text-[10px] !px-2 !py-px",title:p.slice(2).map(e=>e.message).join(", ")},"+",p.length-2))),(0,a.createElement)("div",{className:"wcf-custom-node-content--stats flex text-center justify-around items-center py-4 px-5"},(0,a.createElement)("div",{className:"wcf-step--stats-content--stat-view"},(0,a.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,z.__)("Views","cartflows")),(0,a.createElement)("div",{className:"font-semibold text-base text-gray-800"},v())),(0,a.createElement)("div",{className:"wcf-step--stats-content--stat-conversation"},(0,a.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,z.__)("Conversions","cartflows")),(0,a.createElement)("div",{className:"font-semibold text-base text-gray-800"},"thankyou"!==E?x():"-")),(0,a.createElement)("div",{className:"wcf-step--stats-content--stat-revenue"},(0,a.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,z.__)("Revenue","cartflows")),(0,a.createElement)("div",{className:"font-semibold text-base text-gray-800"},"thankyou"!==E&&"landing"!==E?N():"-"))),m&&(0,a.createElement)("div",{className:"wcf-custom-node-content--stats-compact flex items-center justify-center gap-2 py-2 px-4 border-t border-gray-200 text-xs text-gray-600"},(0,a.createElement)("span",{className:"tabular-nums"},(0,a.createElement)("span",{className:"font-semibold text-gray-800"},v())," ",(0,a.createElement)("span",{className:"text-gray-400"},(0,z.__)("views","cartflows"))),"thankyou"!==E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"text-gray-300"},"·"),(0,a.createElement)("span",{className:"tabular-nums"},(0,a.createElement)("span",{className:"font-semibold text-gray-800"},x())," ",(0,a.createElement)("span",{className:"text-gray-400"},(0,z.__)("conv.","cartflows")))),"thankyou"!==E&&"landing"!==E&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"text-gray-300"},"·"),(0,a.createElement)("span",{className:"font-semibold text-gray-800 tabular-nums"},N()))),"checkout"===E&&Array.isArray(h)&&h.length>0&&(0,a.createElement)(A3,{stepId:e?.step_id,flowId:e?.flow_id,flowType:e?.flow_type,bumps:h,compact:m}),(0,a.createElement)("div",{className:"wcf-custom-node-content--footer flex text-center justify-around items-center border-t border-gray-200 py-4 px-5"},(0,a.createElement)(ea,{content:(0,z.__)("View Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:n,target:"_blank",rel:"noreferrer","aria-label":(0,z.__)("View Page","cartflows"),className:"wcf-canvas--view-step text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer p-2 inline-flex items-center justify-center rounded-md"},(0,a.createElement)(S3,{className:"w-5 h-5"}))),(0,a.createElement)(ea,{content:b?cg():(0,z.__)("Edit Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:b?"#!":r,target:b?void 0:"_blank",rel:"noreferrer","aria-label":(0,z.__)("Edit Page","cartflows"),"aria-disabled":b,tabIndex:b?-1:0,className:"wcf-canvas--edit-step p-2 inline-flex items-center justify-center rounded-md "+(b?"disabled text-text-disabled cursor-not-allowed":"text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer")},(0,a.createElement)(j3,{className:"w-5 h-5"}))),(0,a.createElement)(ea,{content:(0,z.__)("Edit Settings","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)(C,{to:{pathname:"admin.php",search:"storeCheckout"===e?.flow_type?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.step_id}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.step_id}`},rel:"noreferrer","aria-label":(0,z.__)("Edit Settings","cartflows"),className:"wcf-canvas--edit-settings relative text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer p-2 inline-flex items-center justify-center rounded-md"},(0,a.createElement)(k3,{className:"w-5 h-5"}))),(o?Object.keys(o):[]).map(t=>{const n=o[t],r=n?.class;let i=!1,c=!1;if((!wcfCartflowsPro()&&n?.pro||"abtest"===n?.slug&&!wcfCartflowsTypePro())&&(i=!0),wcfCartflowsPro()&&n?.pro&&"Activated"!==l&&(c=!0),"automation"===n?.slug&&"downsell"!==E&&"upsell"!==E&&"checkout"!==E)return null;const u=i||c,d=u?"disabled text-text-disabled cursor-not-allowed":"text-text-tertiary cursor-pointer "+("delete"===n?.slug?"hover:bg-field-background-error hover:text-button-danger":"hover:bg-badge-hover-gray hover:text-text-primary");let f=n?.text;return i?f=(0,z.sprintf)( |
| 58 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 59 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 60 |
(0,z.__)("Upgrade to CartFlows Pro to use %s.","cartflows"),n?.text):c&&(f=(0,z.sprintf)( |
| 61 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 62 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 63 |
(0,z.__)("Activate your CartFlows license to use %s.","cartflows"),n?.text)),(0,a.createElement)(ea,{key:n?.slug,content:f,placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:n?.link,className:`wcf-step__action-btn relative p-2 inline-flex items-center justify-center rounded-md ${r} ${d}`,"aria-label":n?.text,"data-id":e?.step_id,"data-control-id":e?.step_id,onClick:e=>{i||c?e.preventDefault():"#"===n?.link&&s&&s[n?.slug]&&(e.preventDefault(),s[n?.slug](e))},"data-action":n?.ajaxcall},function(e){let t="";switch(e){case"clone":t=(0,a.createElement)(_G,{className:"h-5 w-5"});break;case"delete":t=(0,a.createElement)(Vo,{className:"h-5 w-5"});break;case"abtest":t=(0,a.createElement)(N3,{className:"h-5 w-5"});break;case"archived":t=(0,a.createElement)(E3,{className:"h-5 w-5"});break;case"winner":t=(0,a.createElement)(M3,{className:"h-5 w-5"});break;case"automation":t=(0,a.createElement)(_3,{className:"h-5 w-5"});break;default:t=(0,a.createElement)(I3,{className:"h-5 w-5"})}return t}(n?.slug),u&&(0,a.createElement)(s$,{className:"absolute -top-1 -right-1 w-4 h-4 text-brand-600 fill-brand-600","aria-label":(0,z.__)("Pro feature","cartflows")})))})))));var _}},O3=T3,L3=(0,a.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o=r?"target":"source",i=r?"source":"target",[,s]=(0,a.useState)(!1),l=BV(),c=(0,l$.W6)(),[{license_status:u}]=p(),d=O3.createEventHandlers(e,l,c,s);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:o,position:h0.Left,id:"left",style:{background:"#555",border:"2px dotted #555",transition:"all 0.3s ease",visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-left",isConnectable:t&&!n}),(0,a.createElement)(_4,{type:"target",position:h0.Top,id:"top",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t&&n}),O3.nodeHtml({step_title:e?.label,step_id:e?.step_id,step_type:e?.step_type,flow_id:e?.flow_id,flow_type:e?.flow_type},h3,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,d,u,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,void 0,void 0,e.is_locked),(0,a.createElement)("div",{className:"wcf-custom-node-label",title:e.label},e?.label),(0,a.createElement)(_4,{type:i,position:h0.Right,id:"right",style:{border:"2px dotted #555",transition:"all 0.3s ease",visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-right",isConnectable:t&&!n}),(0,a.createElement)(_4,{type:"source",position:h0.Bottom,id:"bottom",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-bottom",isConnectable:t&&n}))}),z3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFQUVBRUEiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOEgwVjEwWiIgZmlsbD0iI0U2RUFFRCIvPjxyZWN0IHg9IjY0IiB5PSIxMCIgd2lkdGg9IjEwNyIgaGVpZ2h0PSI3IiByeD0iMSIgZmlsbD0iI2ZmZiIvPjxjaXJjbGUgY3g9IjE0IiBjeT0iMTQiIHI9IjQiIGZpbGw9IiNGRjNCMzAiLz48Y2lyY2xlIGN4PSIyNyIgY3k9IjE0IiByPSI0IiBmaWxsPSIjRkMwIi8+PGNpcmNsZSBjeD0iNDAiIGN5PSIxNCIgcj0iNCIgZmlsbD0iIzRDRDk2NCIvPjxyZWN0IHg9IjIzIiB5PSIyMTkiIHdpZHRoPSIxNTQiIGhlaWdodD0iMjAiIHJ4PSIyIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTgxLjY4NiAyMzIuNWgxLjM4M3YtMi4xMjJoMS4xNjRjMS41MDUgMCAyLjM4LS44OTggMi4zOC0yLjIwNSAwLTEuMzAxLS44NTktMi4yMTgtMi4zNDUtMi4yMThoLTIuNTgydjYuNTQ1Wm0xLjM4My0zLjIzMXYtMi4xODNoLjkzNGMuNzk5IDAgMS4xODUuNDM1IDEuMTg1IDEuMDg3IDAgLjY0OC0uMzg2IDEuMDk2LTEuMTc5IDEuMDk2aC0uOTRabTUuNjg2IDMuMzI0Yy43MjYgMCAxLjE5Ni0uMzE3IDEuNDM1LS43NzRoLjAzOXYuNjgxaDEuMjl2LTMuMzExYzAtMS4xNy0uOTktMS42NjItMi4wODMtMS42NjItMS4xNzYgMC0xLjk1LjU2Mi0yLjEzOCAxLjQ1N2wxLjI1OS4xMDNjLjA5My0uMzI2LjM4NC0uNTY2Ljg3My0uNTY2LjQ2MyAwIC43MjguMjMzLjcyOC42MzZ2LjAxOWMwIC4zMTctLjMzNS4zNTgtMS4xODkuNDQxLS45NzEuMDktMS44NDQuNDE2LTEuODQ0IDEuNTEyIDAgLjk3MS42OTQgMS40NjQgMS42MyAxLjQ2NFptLjM5LS45NGMtLjQxOSAwLS43MTktLjE5NS0uNzE5LS41NjkgMC0uMzgzLjMxNi0uNTcyLjc5Ni0uNjM5LjI5Ny0uMDQyLjc4My0uMTEyLjk0Ni0uMjIxdi41MjFjMCAuNTE1LS40MjUuOTA4LTEuMDIzLjkwOFptNC4wOTYgMi42ODhjMS4wMTMgMCAxLjU1LS41MTggMS44MjgtMS4zMWwxLjkwOC01LjQzNC0xLjQ0MS0uMDA2LTEuMDI2IDMuNjA1aC0uMDUybC0xLjAxNi0zLjYwNUg5Mi4wMWwxLjc2MSA1LjA1LS4wOC4yMDdjLS4xNzguNDYxLS41Mi40ODMtMSAuMzM2bC0uMzA3IDEuMDE2Yy4xOTUuMDgzLjUxMi4xNDEuODU3LjE0MVptMTIuMDE2LTguMzg2aC0xLjM3N3Y0LjExNmgtLjA1OGwtMi44MjUtNC4xMTZoLTEuMjE1djYuNTQ1aDEuMzg0di00LjEyaC4wNDhsMi44NDggNC4xMmgxLjE5NXYtNi41NDVabTMuMzM2IDYuNjQxYzEuNDg5IDAgMi40MTYtMS4wMiAyLjQxNi0yLjUzMSAwLTEuNTIyLS45MjctMi41MzgtMi40MTYtMi41MzgtMS40ODkgMC0yLjQxNiAxLjAxNi0yLjQxNiAyLjUzOCAwIDEuNTExLjkyNyAyLjUzMSAyLjQxNiAyLjUzMVptLjAwNi0xLjA1NWMtLjY4NyAwLTEuMDM4LS42MjktMS4wMzgtMS40ODYgMC0uODU2LjM1MS0xLjQ4OSAxLjAzOC0xLjQ4OS42NzUgMCAxLjAyNi42MzMgMS4wMjYgMS40ODkgMCAuODU3LS4zNTEgMS40ODYtMS4wMjYgMS40ODZabTQuMTQxLjk1OWgxLjQzOGwuODQ0LTMuMDg3aC4wNmwuODQ0IDMuMDg3aDEuNDQybDEuMzMyLTQuOTA5aC0xLjM3NGwtLjc0OCAzLjI3OWgtLjA0MWwtLjgwNi0zLjI3OWgtMS4zNTJsLS43OTIgMy4yOThoLS4wNDVsLS43NjEtMy4yOThoLTEuMzc3bDEuMzM2IDQuOTA5WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0yNC40OTUgMTUxLjMzM2EuNS41IDAgMCAxIC41LS41SDE3NmEuNS41IDAgMCAxIC41LjV2NmEuNS41IDAgMCAxLS41LjVIMjQuOTk1YS41LjUgMCAwIDEtLjUtLjV2LTZaTTI0LjQ5NSAxNjguNjY3YS41LjUgMCAwIDEgLjUtLjVIMTc2YS41LjUgMCAwIDEgLjUuNXY2YS41LjUgMCAwIDEtLjUuNUgyNC45OTVhLjUuNSAwIDAgMS0uNS0uNXYtNlpNMjQuNDk1IDE4NmEuNS41IDAgMCAxIC41LS41SDY4LjI1YS41LjUgMCAwIDEgLjUuNXY2YS41LjUgMCAwIDEtLjUuNUgyNC45OTVhLjUuNSAwIDAgMS0uNS0uNXYtNlpNNzguMzcgMTg2YS41LjUgMCAwIDEgLjUtLjVoNDMuMjU1YS41LjUgMCAwIDEgLjUuNXY2YS41LjUgMCAwIDEtLjUuNUg3OC44N2EuNS41IDAgMCAxLS41LS41di02Wk0xMzIuMjQ1IDE4NmEuNS41IDAgMCAxIC41LS41SDE3NmEuNS41IDAgMCAxIC41LjV2NmEuNS41IDAgMCAxLS41LjVoLTQzLjI1NWEuNS41IDAgMCAxLS41LS41di02WiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjQjdDRkUyIi8+PHJlY3QgeD0iMjMuNSIgeT0iMjAyLjUiIHdpZHRoPSI2IiBoZWlnaHQ9IjYiIHJ4PSIuNSIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjQ0NERUVEIi8+PHJlY3QgeD0iNDMuMzkiIHk9IjIwNCIgd2lkdGg9IjEzMy42MSIgaGVpZ2h0PSIyLjY2NyIgcng9IjEiIGZpbGw9IiNCN0NGRTIiLz48ZyBjbGlwLXBhdGg9InVybCgjYSkiIGZpbGw9IiMyMjcxQjEiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjQiPjxwYXRoIGQ9Im05OS4wMDUgODIuMzY4LjQ5NS40OTYuNDk1LS40OTYgMTIuNDAzLTEyLjQwN2ExLjY0OCAxLjY0OCAwIDAgMSAyLjgxMSAxLjE2NGMwIC40MzctLjE3My44NTYtLjQ4MiAxLjE2NGwtMTQuMDYzIDE0LjA2M2ExLjY0MyAxLjY0MyAwIDAgMS0yLjMyOCAwbC03LjAzMi03LjAzMWExLjY0OSAxLjY0OSAwIDAgMSAwLTIuMzMgMS42NDQgMS42NDQgMCAwIDEgMi4zMyAwbDUuMzcgNS4zNzdaIi8+PHBhdGggZD0ibTcwLjIyNiA1Mi4yMDYtLjEzMi0uNTMxaC01Ljc1YTEuNjQ0IDEuNjQ0IDAgMCAxIDAtMy4yODdINzEuMzc1YTEuNjQzIDEuNjQzIDAgMCAxIDEuNTk0IDEuMjQ1bDEuODk5IDcuNi4xMzIuNTNIMTI5Ljk2OGExLjY0MyAxLjY0MyAwIDAgMSAxLjYxNCAxLjk0NmwtNy4wMzEgMzcuNWExLjY0NSAxLjY0NSAwIDAgMS0xLjYxNCAxLjM0MUg4MC43NTFhMS42NDQgMS42NDQgMCAwIDEtMS42MTUtMS4zNDFsLTcuMDIxLTM3LjQzLS4wMDQtLjAyLS4wMDUtLjAyLTEuODgtNy41MzNabTExLjc4MSA0Mi40ODYuMTA3LjU3aDM5LjQ1OWwuMTA3LS41NyA2LjE1NS0zMi44MTMuMTU1LS44MjlINzUuNjk3bC4xNTYuODI5IDYuMTU0IDMyLjgxM1ptLTIuNzA0IDcuNzk5YTguNjc1IDguNjc1IDAgMSAxIDEyLjI2OSAxMi4yNjcgOC42NzUgOC42NzUgMCAwIDEtMTIuMjY5LTEyLjI2N1ptMzIuODEzIDBhOC42NzQgOC42NzQgMCAxIDEgMTIuMjY4IDEyLjI2NiA4LjY3NCA4LjY3NCAwIDAgMS0xMi4yNjgtMTIuMjY2Wm0tMjIuODY5IDkuOTQ0YTUuMzkgNS4zOSAwIDAgMC0zLjgxLTkuMTk4IDUuMzg5IDUuMzg5IDAgMCAwLTMuODA5IDkuMTk4IDUuMzg4IDUuMzg4IDAgMCAwIDcuNjE5IDBabTMyLjgxMyAwYTUuMzkgNS4zOSAwIDAgMC0zLjgxLTkuMTk4IDUuMzkxIDUuMzkxIDAgMCAwLTUuMzg4IDUuMzg4IDUuMzkgNS4zOSAwIDAgMCA5LjE5OCAzLjgxWiIvPjwvZz48cmVjdCB4PSI1MCIgeT0iMTMzIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjMjI3MUIxIi8+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2MiA0MykiIGQ9Ik0wIDBoNzV2NzVIMHoiLz48L2NsaXBQYXRoPjwvZGVmcz48L3N2Zz4=",P3=(0,a.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o=r?"target":"source",i=r?"source":"target",[,s]=(0,a.useState)(!1),l=BV(),c=(0,l$.W6)(),[{license_status:u}]=p(),[{is_flow_instant_checkout:d}]=SU(),f=O3.createEventHandlers(e,l,c,s);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:o,position:h0.Left,id:"left",style:{background:"#555",visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-left",isConnectable:t&&!n}),(0,a.createElement)(_4,{type:"target",position:h0.Top,id:"top",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t&&n}),O3.nodeHtml({step_title:e?.label,step_id:e?.step_id,step_type:e?.step_type,flow_id:e?.flow_id,flow_type:e?.flow_type},z3,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,f,u,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,e.bumps,d,e.is_locked,e.has_store_checkout_product_warning),(0,a.createElement)("div",{className:"wcf-custom-node-label"},e?.label),(0,a.createElement)(_4,{type:i,position:h0.Right,id:"right",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-right",isConnectable:t&&!n}),(0,a.createElement)(_4,{type:"source",position:h0.Bottom,id:"bottom",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-bottom",isConnectable:t&&n}))}),R3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFRkVGRUYiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOC4xNDdIMFYxMFoiIGZpbGw9IiNFNkVBRUQiLz48ZWxsaXBzZSBjeD0iMTQiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGRjNCMzAiLz48ZWxsaXBzZSBjeD0iMjciIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGQzAiLz48ZWxsaXBzZSBjeD0iNDAiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiM0Q0Q5NjQiLz48cmVjdCB4PSI2NCIgeT0iMTEiIHdpZHRoPSIxMDciIGhlaWdodD0iNyIgcng9IjEiIGZpbGw9IiNmZmYiLz48Y2lyY2xlIGN4PSI5OS44NTIiIGN5PSI5Mi4xMDEiIHI9IjM4LjM1MiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMjI3MUIxIiBzdHJva2UtbWl0ZXJsaW1pdD0iMS44NjIiIHN0cm9rZS1kYXNoYXJyYXk9IjIgMyIvPjxjaXJjbGUgY3g9Ijk5Ljg1MiIgY3k9IjkyLjEwMSIgcj0iMzEuNTQzIiBmaWxsPSIjRjZGQUZGIi8+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBkPSJNMTE0LjUgNjMuMzQ3djEyLjEzYTEuNjUgMS42NSAwIDEgMCAzLjMwMiAwdi0xMi4xM2w0LjA4OCA0LjA4OWExLjY1MiAxLjY1MiAwIDEgMCAyLjMzNy0yLjMzN2wtNi45MDctNi45MDdhMS42NDEgMS42NDEgMCAwIDAtMS4xNjktLjQ4NSAxLjY0NCAxLjY0NCAwIDAgMC0xLjE2OC40ODVoLS4wMDFsLTYuOTA2IDYuOTA3YTEuNjUyIDEuNjUyIDAgMSAwIDIuMzM3IDIuMzM3bDQuMDg3LTQuMDlabTE0LjMyMi04LjU5OWExNy45MiAxNy45MiAwIDEgMS0yNS4zNDMgMjUuMzQxIDE3LjkyIDE3LjkyIDAgMCAxIDI1LjM0My0yNS4zNFoiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzIyNzFCMSIvPjwvZz48ZyBjbGlwLXBhdGg9InVybCgjYikiPjxwYXRoIGQ9Ik02OC42NzUgMTE2LjAyOWEyLjUxIDIuNTEgMCAwIDEgMi41MDgtMi41MDlINzYuMmEyLjUxIDIuNTEgMCAwIDEgMi41MDkgMi41MDl2Ny41MjZhMi41MSAyLjUxIDAgMCAxLTIuNTA5IDIuNTA4aC01LjAxN2EyLjUxIDIuNTEgMCAwIDEtMi41MDgtMi41MDh2LTcuNTI2Wm0xMi41NDMtMTAuMDM0YTIuNTA3IDIuNTA3IDAgMCAxIDIuNTA4LTIuNTA5aDUuMDE3YTIuNTA3IDIuNTA3IDAgMCAxIDIuNTA5IDIuNTA5djE3LjU2YTIuNTEgMi41MSAwIDAgMS0yLjUwOSAyLjUwOGgtNS4wMTdhMi41MSAyLjUxIDAgMCAxLTIuNTA4LTIuNTA4di0xNy41NlpNOTMuNzYgOTMuNDUyYTIuNTA5IDIuNTA5IDAgMCAxIDIuNTA5LTIuNTA5aDUuMDE3YTIuNTEgMi41MSAwIDAgMSAyLjUwOSAyLjUwOXYzMC4xMDNhMi41MTIgMi41MTIgMCAwIDEtMi41MDkgMi41MDhoLTUuMDE3YTIuNTEgMi41MSAwIDAgMS0yLjUwOS0yLjUwOFY5My40NTJaIiBmaWxsPSIjMjI3MUIxIi8+PC9nPjxyZWN0IHg9Ijg4LjQ5NyIgeT0iMTA5Ljc2NSIgd2lkdGg9IjI1LjIzNSIgaGVpZ2h0PSIyNS4yMzUiIHJ4PSIxMi42MTciIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTAxLjExNCAxMTEuODY4YTEwLjUxNyAxMC41MTcgMCAwIDAtOS43MTQgNi40OTEgMTAuNTEzIDEwLjUxMyAwIDEgMCA5LjcxNC02LjQ5MVptMCAxOC45MjZhOC40MTMgOC40MTMgMCAwIDEtNy43NzEtNS4xOTIgOC40MTEgOC40MTEgMCAxIDEgNy43NzEgNS4xOTJaIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTEwMS4xMTQgMTIxLjMzMWMtMi4xMDMgMC0yLjEwMy0uNjYyLTIuMTAzLTEuMDUxIDAtLjM4OS43MzYtMS4wNTIgMi4xMDMtMS4wNTIgMS4zNjcgMCAxLjQ2MS42NzMgMS40NzIgMS4wNTJoMi4xMDNhMy4xNSAzLjE1IDAgMCAwLTIuNTI0LTMuMDI4di0xLjE3OGgtMi4xMDJ2MS4xNDZjLTIuMTAzLjM0Ny0zLjE1NSAxLjcwMy0zLjE1NSAzLjA2IDAgMS4xNzcuNTQ3IDMuMTU0IDQuMjA2IDMuMTU0IDIuMTAzIDAgMi4xMDMuNzE1IDIuMTAzIDEuMDUyIDAgLjMzNi0uNjUyIDEuMDUxLTIuMTAzIDEuMDUxLTEuOTM1IDAtMi4xMDMtLjkwNC0yLjEwMy0xLjA1MWgtMi4xMDNjMCAuOTY3LjY5NCAyLjY4MSAzLjE1NSAzLjA3djEuMTM1aDIuMTAydi0xLjEzNWMyLjEwMy0uMzU4IDMuMTU1LTEuNzE0IDMuMTU1LTMuMDcgMC0xLjE3OC0uNTQ3LTMuMTU1LTQuMjA2LTMuMTU1WiIgZmlsbD0iIzIyNzFCMSIvPjxyZWN0IHg9IjUwIiB5PSIxNTAiIHdpZHRoPSIxMDAiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiMyMjcxQjEiLz48cmVjdCB4PSIyMyIgeT0iMTY0IiB3aWR0aD0iMTU0IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRUFFQUVBIi8+PHJlY3QgeD0iNzAiIHk9IjE3OCIgd2lkdGg9IjYwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRUFFQUVBIi8+PHJlY3QgeD0iMjMiIHk9IjE5NyIgd2lkdGg9IjE1NCIgaGVpZ2h0PSIyMCIgcng9IjIiIGZpbGw9IiMyMjcxQjEiLz48cGF0aCBkPSJtNzMuNCAyMTAuNS40ODYtMS40OTNoMi4zNjJsLjQ4NiAxLjQ5M2gxLjQ4M2wtMi4yNTYtNi41NDVoLTEuNzg0bC0yLjI2IDYuNTQ1aDEuNDg0Wm0uODM4LTIuNTczLjgwNS0yLjQ3N2guMDUybC44MDUgMi40NzdoLTEuNjYyWm02LjczIDIuNjY5YzEuMzA4IDAgMi4xMy0uNzY3IDIuMTkzLTEuODk1aC0xLjI4NGMtLjA4LjUyNC0uNDI1LjgxOC0uODkyLjgxOC0uNjM2IDAtMS4wNDgtLjUzNC0xLjA0OC0xLjQ3NCAwLS45MjYuNDE1LTEuNDU3IDEuMDQ4LTEuNDU3LjQ5OCAwIC44MTguMzI5Ljg5Mi44MThoMS4yODRjLS4wNTctMS4xMzQtLjkxNy0xLjg3OS0yLjE5OC0xLjg3OS0xLjQ5IDAtMi40MSAxLjAzMi0yLjQxIDIuNTM4IDAgMS40OTIuOTA0IDIuNTMxIDIuNDE2IDIuNTMxWm01LjI4MyAwYzEuMzA3IDAgMi4xMjktLjc2NyAyLjE5My0xLjg5NWgtMS4yODVjLS4wOC41MjQtLjQyNS44MTgtLjg5Mi44MTgtLjYzNiAwLTEuMDQ4LS41MzQtMS4wNDgtMS40NzQgMC0uOTI2LjQxNS0xLjQ1NyAxLjA0OC0xLjQ1Ny40OTkgMCAuODE4LjMyOS44OTIuODE4aDEuMjg1Yy0uMDU4LTEuMTM0LS45MTgtMS44NzktMi4yLTEuODc5LTEuNDg5IDAtMi40MSAxLjAzMi0yLjQxIDIuNTM4IDAgMS40OTIuOTA1IDIuNTMxIDIuNDE3IDIuNTMxWm01LjMwMSAwYzEuMjE1IDAgMi4wMzMtLjU5MSAyLjIyNS0xLjUwMmwtMS4yNi0uMDgzYy0uMTM3LjM3NC0uNDg4LjU2OS0uOTQyLjU2OS0uNjggMC0xLjExMi0uNDUxLTEuMTEyLTEuMTgzdi0uMDAzaDMuMzQzdi0uMzc0YzAtMS42NjgtMS4wMS0yLjQ5My0yLjMwOC0yLjQ5My0xLjQ0NCAwLTIuMzggMS4wMjYtMi4zOCAyLjU0MSAwIDEuNTU2LjkyMyAyLjUyOCAyLjQzNCAyLjUyOFptLTEuMDktMy4wNDZhMS4wMzcgMS4wMzcgMCAwIDEgMS4wNTktMS4wMDdjLjU5IDAgMSAuNDIyIDEuMDAzIDEuMDA3aC0yLjA2MVptNC4yMzIgNC43OTFoMS4zNjJ2LTIuNjI3aC4wNDFjLjE4OS40MDkuNjAxLjg2NiAxLjM5NC44NjYgMS4xMTggMCAxLjk5LS44ODUgMS45OS0yLjUyOCAwLTEuNjg4LS45MS0yLjUyNS0xLjk4Ny0yLjUyNS0uODIyIDAtMS4yMTUuNDg5LTEuMzk3Ljg4OGgtLjA2di0uODI0aC0xLjM0M3Y2Ljc1Wm0xLjMzMy00LjI5NmMwLS44NzUuMzctMS40MzUgMS4wMzItMS40MzUuNjc1IDAgMS4wMzMuNTg1IDEuMDMzIDEuNDM1IDAgLjg1Ny0uMzY1IDEuNDUxLTEuMDMzIDEuNDUxLS42NTUgMC0xLjAzMi0uNTc1LTEuMDMyLTEuNDUxWm02Ljk3NC0yLjQ1NGgtLjkyNHYtMS4xNzZoLTEuMzYxdjEuMTc2aC0uNjcydjEuMDIzaC42NzJ2Mi41NTZjLS4wMDcuOTYyLjY0OCAxLjQzOSAxLjYzNiAxLjM5Ny4zNTEtLjAxMy42MDEtLjA4My43MzgtLjEyOGwtLjIxNC0xLjAxM2MtLjA2Ny4wMTMtLjIxMS4wNDUtLjMzOS4wNDUtLjI3MSAwLS40Ni0uMTAyLS40Ni0uNDh2LTIuMzc3aC45MjR2LTEuMDIzWm05LjAxIDEuNjM2YzAtMi4xNDEtMS4zMjktMy4zNjItMy4wNjUtMy4zNjItMS43NDUgMC0zLjA2NSAxLjIyMS0zLjA2NSAzLjM2MiAwIDIuMTMyIDEuMzIgMy4zNjIgMy4wNjUgMy4zNjIgMS43MzYgMCAzLjA2NS0xLjIyIDMuMDY1LTMuMzYyWm0tMS40MDMgMGMwIDEuMzg3LS42NTggMi4xMzgtMS42NjIgMi4xMzgtMS4wMDcgMC0xLjY2Mi0uNzUxLTEuNjYyLTIuMTM4cy42NTUtMi4xMzggMS42NjItMi4xMzhjMS4wMDQgMCAxLjY2Mi43NTEgMS42NjIgMi4xMzhabTUuMDQzLTEuNjM2aC0uOTc1di0uMzI5YzAtLjMzMy4xMzQtLjUyOC41MzMtLjUyOC4xNjMgMCAuMzMuMDM2LjQzOC4wNzFsLjI0LTEuMDIzYTMuNTg5IDMuNTg5IDAgMCAwLS45NjItLjEzNGMtLjkyNCAwLTEuNjExLjUyMS0xLjYxMSAxLjU4OHYuMzU1aC0uNjkzdjEuMDIzaC42OTN2My44ODZoMS4zNjJ2LTMuODg2aC45NzV2LTEuMDIzWm0zLjQ3MSAwaC0uOTc1di0uMzI5YzAtLjMzMy4xMzUtLjUyOC41MzQtLjUyOC4xNjMgMCAuMzI5LjAzNi40MzguMDcxbC4yNC0xLjAyM2EzLjYwMyAzLjYwMyAwIDAgMC0uOTYyLS4xMzRjLS45MjQgMC0xLjYxMS41MjEtMS42MTEgMS41ODh2LjM1NWgtLjY5NHYxLjAyM2guNjk0djMuODg2aDEuMzYxdi0zLjg4NmguOTc1di0xLjAyM1ptMi44OTMgNS4wMDVjMS4yMTUgMCAyLjAzMy0uNTkxIDIuMjI1LTEuNTAybC0xLjI1OS0uMDgzYy0uMTM4LjM3NC0uNDg5LjU2OS0uOTQzLjU2OS0uNjgxIDAtMS4xMTItLjQ1MS0xLjExMi0xLjE4M3YtLjAwM2gzLjM0M3YtLjM3NGMwLTEuNjY4LTEuMDEtMi40OTMtMi4zMDgtMi40OTMtMS40NDUgMC0yLjM4MSAxLjAyNi0yLjM4MSAyLjU0MSAwIDEuNTU2LjkyNCAyLjUyOCAyLjQzNSAyLjUyOFptLTEuMDg5LTMuMDQ2YTEuMDM2IDEuMDM2IDAgMCAxIDEuMDU3LTEuMDA3Yy41OTIgMCAxLjAwMS40MjIgMS4wMDQgMS4wMDdoLTIuMDYxWm00LjIzMSAyLjk1aDEuMzYydi0yLjc3N2MwLS42MDQuNDQxLTEuMDIgMS4wNDItMS4wMi4xODggMCAuNDQ3LjAzMi41NzUuMDc0di0xLjIwOGEyLjAzMyAyLjAzMyAwIDAgMC0uNDI4LS4wNDhjLS41NSAwLTEuMDAxLjMxOS0xLjE4LjkyNmgtLjA1MXYtLjg1NmgtMS4zMnY0LjkwOVoiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNNzkuOTIxIDIzMy41aDEuMDc2di0xLjgwNWguNzg2bC45NjQgMS44MDVoMS4xODlsLTEuMDgyLTEuOTc5Yy41OC0uMjQ4LjktLjc1My45LTEuNDQ5IDAtMS4wMTItLjY2OS0xLjY2My0xLjgyNS0xLjY2M2gtMi4wMDh2NS4wOTFabTEuMDc2LTIuNjd2LTEuNTQxaC43MjZjLjYyMiAwIC45MjIuMjc2LjkyMi43ODMgMCAuNTA1LS4zLjc1OC0uOTE3Ljc1OGgtLjczWm01LjE3NiAyLjc0NWMuOTQ1IDAgMS41ODEtLjQ2IDEuNzMtMS4xNjlsLS45NzktLjA2NGMtLjEwNy4yOS0uMzguNDQyLS43MzMuNDQyLS41MyAwLS44NjUtLjM1LS44NjUtLjkydi0uMDAyaDIuNnYtLjI5MWMwLTEuMjk4LS43ODYtMS45MzktMS43OTUtMS45MzktMS4xMjQgMC0xLjg1Mi43OTgtMS44NTIgMS45NzYgMCAxLjIxMS43MTkgMS45NjcgMS44OTQgMS45NjdabS0uODQ3LTIuMzY5YS44MDYuODA2IDAgMCAxIC44MjMtLjc4M2MuNDYgMCAuNzc4LjMyOC43OC43ODNoLTEuNjAzWm0zLjI5LTEuNTI0djMuOTljMCAuMjg4LS4xMi40MzItLjQ2MS40MzItLjA0NSAwLS4wODUgMC0uMTQtLjAwNXYuODI4Yy4wNzcuMDAyLjE0LjAwNS4yMTQuMDA1LjkgMCAxLjQ0Ny0uMzU4IDEuNDQ3LTEuMjQzdi00LjAwN2gtMS4wNlptLjUyOC0uNDkyYy4zMTYgMCAuNTc0LS4yNDEuNTc0LS41MzcgMC0uMjk0LS4yNTgtLjUzNS0uNTc0LS41MzUtLjMxMyAwLS41NzIuMjQxLS41NzIuNTM1IDAgLjI5Ni4yNTkuNTM3LjU3Mi41MzdabTMuMTIgNC4zODVjLjk0NSAwIDEuNTgxLS40NiAxLjczLTEuMTY5bC0uOTgtLjA2NGMtLjEwNi4yOS0uMzguNDQyLS43MzIuNDQyLS41MyAwLS44NjUtLjM1LS44NjUtLjkydi0uMDAyaDIuNnYtLjI5MWMwLTEuMjk4LS43ODYtMS45MzktMS43OTUtMS45MzktMS4xMjQgMC0xLjg1Mi43OTgtMS44NTIgMS45NzYgMCAxLjIxMS43MTggMS45NjcgMS44OTQgMS45NjdabS0uODQ3LTIuMzY5YS44MDYuODA2IDAgMCAxIC44MjItLjc4M2MuNDYgMCAuNzc4LjMyOC43OC43ODNoLTEuNjAzWm01LjAxNiAyLjM2OWMxLjAxNyAwIDEuNjU1LS41OTcgMS43MDUtMS40NzVoLTFjLS4wNjEuNDA4LS4zMy42MzctLjY5My42MzctLjQ5NCAwLS44MTUtLjQxNS0uODE1LTEuMTQ2IDAtLjcyMS4zMjMtMS4xMzQuODE1LTEuMTM0LjM4OCAwIC42MzcuMjU2LjY5NC42MzdoMWMtLjA0Ni0uODgzLS43MTQtMS40NjItMS43MTEtMS40NjItMS4xNTkgMC0xLjg3NC44MDMtMS44NzQgMS45NzQgMCAxLjE2MS43MDMgMS45NjkgMS44NzkgMS45NjlabTQuNDE0LTMuODkzaC0uNzE4di0uOTE1aC0xLjA2di45MTVoLS41MjF2Ljc5NWguNTIydjEuOTg5Yy0uMDA1Ljc0OC41MDQgMS4xMTkgMS4yNzIgMS4wODYuMjc0LS4wMS40NjgtLjA2NC41NzUtLjA5OWwtLjE2Ny0uNzg4Yy0uMDUyLjAxLS4xNjQuMDM1LS4yNjMuMDM1LS4yMTIgMC0uMzU4LS4wOC0uMzU4LS4zNzN2LTEuODVoLjcxOHYtLjc5NVptNy4wMDggMS4yNzNjMC0xLjY2Ni0xLjAzNC0yLjYxNi0yLjM4NC0yLjYxNi0xLjM1NyAwLTIuMzg0Ljk1LTIuMzg0IDIuNjE2IDAgMS42NTggMS4wMjcgMi42MTUgMi4zODQgMi42MTUgMS4zNSAwIDIuMzg0LS45NSAyLjM4NC0yLjYxNVptLTEuMDkxIDBjMCAxLjA3OC0uNTEyIDEuNjYzLTEuMjkzIDEuNjYzLS43ODMgMC0xLjI5Mi0uNTg1LTEuMjkyLTEuNjYzIDAtMS4wNzkuNTA5LTEuNjYzIDEuMjkyLTEuNjYzLjc4MSAwIDEuMjkzLjU4NCAxLjI5MyAxLjY2M1ptMy45MjItMS4yNzNoLS43NTh2LS4yNTZjMC0uMjU5LjEwNC0uNDEuNDE1LS40MS4xMjcgMCAuMjU2LjAyNy4zNC4wNTRsLjE4Ny0uNzk1YTIuNzc4IDIuNzc4IDAgMCAwLS43NDgtLjEwNWMtLjcxOSAwLTEuMjUzLjQwNi0xLjI1MyAxLjIzNnYuMjc2aC0uNTR2Ljc5NWguNTR2My4wMjNoMS4wNTl2LTMuMDIzaC43NTh2LS43OTVabTIuNyAwaC0uNzU4di0uMjU2YzAtLjI1OS4xMDQtLjQxLjQxNS0uNDEuMTI3IDAgLjI1Ni4wMjcuMzQxLjA1NGwuMTg2LS43OTVhMi43NzggMi43NzggMCAwIDAtLjc0OC0uMTA1Yy0uNzE5IDAtMS4yNTMuNDA2LTEuMjUzIDEuMjM2di4yNzZoLS41NHYuNzk1aC41NHYzLjAyM2gxLjA1OXYtMy4wMjNoLjc1OHYtLjc5NVptMi4yNSAzLjg5M2MuOTQ1IDAgMS41ODEtLjQ2IDEuNzMtMS4xNjlsLS45NzktLjA2NGMtLjEwNy4yOS0uMzguNDQyLS43MzMuNDQyLS41MyAwLS44NjUtLjM1LS44NjUtLjkydi0uMDAyaDIuNnYtLjI5MWMwLTEuMjk4LS43ODYtMS45MzktMS43OTUtMS45MzktMS4xMjQgMC0xLjg1Mi43OTgtMS44NTIgMS45NzYgMCAxLjIxMS43MTggMS45NjcgMS44OTQgMS45NjdabS0uODQ3LTIuMzY5YS44MDYuODA2IDAgMCAxIC44MjItLjc4M2MuNDYgMCAuNzc4LjMyOC43ODEuNzgzaC0xLjYwM1ptMy4yOTEgMi4yOTRoMS4wNTl2LTIuMTZjMC0uNDcuMzQzLS43OTMuODEtLjc5My4xNDcgMCAuMzQ4LjAyNS40NDguMDU3di0uOTRhMS42MjcgMS42MjcgMCAwIDAtLjMzNC0uMDM3Yy0uNDI3IDAtLjc3OC4yNDktLjkxNy43MjFoLS4wNHYtLjY2NmgtMS4wMjZ2My44MThaIiBmaWxsPSIjQTFBMUExIi8+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5Ny43MzMgNDkpIiBkPSJNMCAwaDM2LjgzN3YzNi44MzdIMHoiLz48L2NsaXBQYXRoPjxjbGlwUGF0aCBpZD0iYiI+PHBhdGggZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMzA5IDg5LjU3OCkiIGQ9Ik0wIDBoMzcuODUydjM3Ljg1MkgweiIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==",U3="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFRkVGRUYiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOC4xNDdIMFYxMFoiIGZpbGw9IiNFNkVBRUQiLz48ZWxsaXBzZSBjeD0iMTQiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGRjNCMzAiLz48ZWxsaXBzZSBjeD0iMjciIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGQzAiLz48ZWxsaXBzZSBjeD0iNDAiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiM0Q0Q5NjQiLz48cmVjdCB4PSI2NCIgeT0iMTEiIHdpZHRoPSIxMDciIGhlaWdodD0iNyIgcng9IjEiIGZpbGw9IiNmZmYiLz48cmVjdCB4PSI1MCIgeT0iMTUxIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjMjI3MUIxIi8+PHJlY3QgeD0iMjMiIHk9IjE2NSIgd2lkdGg9IjE1NCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0VBRUFFQSIvPjxyZWN0IHg9IjcwIiB5PSIxNzgiIHdpZHRoPSI2MCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0VBRUFFQSIvPjxyZWN0IHg9IjIzIiB5PSIxOTciIHdpZHRoPSIxNTQiIGhlaWdodD0iMjAiIHJ4PSIyIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0ibTczLjQgMjEwIC40ODYtMS40OTNoMi4zNjJsLjQ4NiAxLjQ5M2gxLjQ4M2wtMi4yNTYtNi41NDVoLTEuNzg0TDcxLjkxNyAyMTBoMS40ODRabS44MzgtMi41NzMuODA1LTIuNDc3aC4wNTJsLjgwNSAyLjQ3N2gtMS42NjJabTYuNzMgMi42NjljMS4zMDggMCAyLjEzLS43NjcgMi4xOTMtMS44OTVoLTEuMjg0Yy0uMDguNTI0LS40MjUuODE4LS44OTIuODE4LS42MzYgMC0xLjA0OC0uNTM0LTEuMDQ4LTEuNDc0IDAtLjkyNi40MTUtMS40NTcgMS4wNDgtMS40NTcuNDk4IDAgLjgxOC4zMjkuODkyLjgxOGgxLjI4NGMtLjA1Ny0xLjEzNC0uOTE3LTEuODc5LTIuMTk4LTEuODc5LTEuNDkgMC0yLjQxIDEuMDMyLTIuNDEgMi41MzggMCAxLjQ5Mi45MDQgMi41MzEgMi40MTYgMi41MzFabTUuMjgzIDBjMS4zMDcgMCAyLjEyOS0uNzY3IDIuMTkzLTEuODk1aC0xLjI4NWMtLjA4LjUyNC0uNDI1LjgxOC0uODkyLjgxOC0uNjM2IDAtMS4wNDgtLjUzNC0xLjA0OC0xLjQ3NCAwLS45MjYuNDE1LTEuNDU3IDEuMDQ4LTEuNDU3LjQ5OSAwIC44MTguMzI5Ljg5Mi44MThoMS4yODVjLS4wNTgtMS4xMzQtLjkxOC0xLjg3OS0yLjItMS44NzktMS40ODkgMC0yLjQxIDEuMDMyLTIuNDEgMi41MzggMCAxLjQ5Mi45MDUgMi41MzEgMi40MTcgMi41MzFabTUuMzAxIDBjMS4yMTUgMCAyLjAzMy0uNTkxIDIuMjI1LTEuNTAybC0xLjI2LS4wODNjLS4xMzcuMzc0LS40ODguNTY5LS45NDIuNTY5LS42OCAwLTEuMTEyLS40NTEtMS4xMTItMS4xODN2LS4wMDNoMy4zNDN2LS4zNzRjMC0xLjY2OC0xLjAxLTIuNDkzLTIuMzA4LTIuNDkzLTEuNDQ0IDAtMi4zOCAxLjAyNi0yLjM4IDIuNTQxIDAgMS41NTYuOTIzIDIuNTI4IDIuNDM0IDIuNTI4Wm0tMS4wOS0zLjA0NmExLjAzNyAxLjAzNyAwIDAgMSAxLjA1OS0xLjAwN2MuNTkgMCAxIC40MjIgMS4wMDMgMS4wMDdoLTIuMDYxWm00LjIzMiA0Ljc5MWgxLjM2MnYtMi42MjdoLjA0MWMuMTg5LjQwOS42MDEuODY2IDEuMzk0Ljg2NiAxLjExOCAwIDEuOTktLjg4NSAxLjk5LTIuNTI4IDAtMS42ODgtLjkxLTIuNTI1LTEuOTg3LTIuNTI1LS44MjIgMC0xLjIxNS40ODktMS4zOTcuODg4aC0uMDZ2LS44MjRoLTEuMzQzdjYuNzVabTEuMzMzLTQuMjk2YzAtLjg3NS4zNy0xLjQzNSAxLjAzMi0xLjQzNS42NzUgMCAxLjAzMy41ODUgMS4wMzMgMS40MzUgMCAuODU3LS4zNjUgMS40NTEtMS4wMzMgMS40NTEtLjY1NSAwLTEuMDMyLS41NzUtMS4wMzItMS40NTFabTYuOTc0LTIuNDU0aC0uOTI0di0xLjE3NmgtMS4zNjF2MS4xNzZoLS42NzJ2MS4wMjNoLjY3MnYyLjU1NmMtLjAwNy45NjIuNjQ4IDEuNDM5IDEuNjM2IDEuMzk3LjM1MS0uMDEzLjYwMS0uMDgzLjczOC0uMTI4bC0uMjE0LTEuMDEzYy0uMDY3LjAxMy0uMjExLjA0NS0uMzM5LjA0NS0uMjcxIDAtLjQ2LS4xMDItLjQ2LS40OHYtMi4zNzdoLjkyNHYtMS4wMjNabTkuMDEgMS42MzZjMC0yLjE0MS0xLjMyOS0zLjM2Mi0zLjA2NS0zLjM2Mi0xLjc0NSAwLTMuMDY1IDEuMjIxLTMuMDY1IDMuMzYyIDAgMi4xMzIgMS4zMiAzLjM2MiAzLjA2NSAzLjM2MiAxLjczNiAwIDMuMDY1LTEuMjIgMy4wNjUtMy4zNjJabS0xLjQwMyAwYzAgMS4zODctLjY1OCAyLjEzOC0xLjY2MiAyLjEzOC0xLjAwNyAwLTEuNjYyLS43NTEtMS42NjItMi4xMzhzLjY1NS0yLjEzOCAxLjY2Mi0yLjEzOGMxLjAwNCAwIDEuNjYyLjc1MSAxLjY2MiAyLjEzOFptNS4wNDMtMS42MzZoLS45NzV2LS4zMjljMC0uMzMzLjEzNC0uNTI4LjUzMy0uNTI4LjE2MyAwIC4zMy4wMzYuNDM4LjA3MWwuMjQtMS4wMjNhMy41ODkgMy41ODkgMCAwIDAtLjk2Mi0uMTM0Yy0uOTI0IDAtMS42MTEuNTIxLTEuNjExIDEuNTg4di4zNTVoLS42OTN2MS4wMjNoLjY5M1YyMTBoMS4zNjJ2LTMuODg2aC45NzV2LTEuMDIzWm0zLjQ3MSAwaC0uOTc1di0uMzI5YzAtLjMzMy4xMzUtLjUyOC41MzQtLjUyOC4xNjMgMCAuMzI5LjAzNi40MzguMDcxbC4yNC0xLjAyM2EzLjYwMyAzLjYwMyAwIDAgMC0uOTYyLS4xMzRjLS45MjQgMC0xLjYxMS41MjEtMS42MTEgMS41ODh2LjM1NWgtLjY5NHYxLjAyM2guNjk0VjIxMGgxLjM2MXYtMy44ODZoLjk3NXYtMS4wMjNabTIuODkzIDUuMDA1YzEuMjE1IDAgMi4wMzMtLjU5MSAyLjIyNS0xLjUwMmwtMS4yNTktLjA4M2MtLjEzOC4zNzQtLjQ4OS41NjktLjk0My41NjktLjY4MSAwLTEuMTEyLS40NTEtMS4xMTItMS4xODN2LS4wMDNoMy4zNDN2LS4zNzRjMC0xLjY2OC0xLjAxLTIuNDkzLTIuMzA4LTIuNDkzLTEuNDQ1IDAtMi4zODEgMS4wMjYtMi4zODEgMi41NDEgMCAxLjU1Ni45MjQgMi41MjggMi40MzUgMi41MjhabS0xLjA4OS0zLjA0NmExLjAzNiAxLjAzNiAwIDAgMSAxLjA1Ny0xLjAwN2MuNTkyIDAgMS4wMDEuNDIyIDEuMDA0IDEuMDA3aC0yLjA2MVptNC4yMzEgMi45NWgxLjM2MnYtMi43NzdjMC0uNjA0LjQ0MS0xLjAyIDEuMDQyLTEuMDIuMTg4IDAgLjQ0Ny4wMzIuNTc1LjA3NHYtMS4yMDhhMi4wMzMgMi4wMzMgMCAwIDAtLjQyOC0uMDQ4Yy0uNTUgMC0xLjAwMS4zMTktMS4xOC45MjZoLS4wNTF2LS44NTZoLTEuMzJWMjEwWiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik03OS45MjEgMjMzLjVoMS4wNzZ2LTEuODA1aC43ODZsLjk2NCAxLjgwNWgxLjE4OWwtMS4wODItMS45NzljLjU4LS4yNDguOS0uNzUzLjktMS40NDkgMC0xLjAxMi0uNjY5LTEuNjYzLTEuODI1LTEuNjYzaC0yLjAwOHY1LjA5MVptMS4wNzYtMi42N3YtMS41NDFoLjcyNmMuNjIyIDAgLjkyMi4yNzYuOTIyLjc4MyAwIC41MDUtLjMuNzU4LS45MTcuNzU4aC0uNzNabTUuMTc2IDIuNzQ1Yy45NDUgMCAxLjU4MS0uNDYgMS43My0xLjE2OWwtLjk3OS0uMDY0Yy0uMTA3LjI5LS4zOC40NDItLjczMy40NDItLjUzIDAtLjg2NS0uMzUtLjg2NS0uOTJ2LS4wMDJoMi42di0uMjkxYzAtMS4yOTgtLjc4Ni0xLjkzOS0xLjc5NS0xLjkzOS0xLjEyNCAwLTEuODUyLjc5OC0xLjg1MiAxLjk3NiAwIDEuMjExLjcxOSAxLjk2NyAxLjg5NCAxLjk2N1ptLS44NDctMi4zNjlhLjgwNi44MDYgMCAwIDEgLjgyMy0uNzgzYy40NiAwIC43NzguMzI4Ljc4Ljc4M2gtMS42MDNabTMuMjktMS41MjR2My45OWMwIC4yODgtLjEyLjQzMi0uNDYxLjQzMi0uMDQ1IDAtLjA4NSAwLS4xNC0uMDA1di44MjhjLjA3Ny4wMDIuMTQuMDA1LjIxNC4wMDUuOSAwIDEuNDQ3LS4zNTggMS40NDctMS4yNDN2LTQuMDA3aC0xLjA2Wm0uNTI4LS40OTJjLjMxNiAwIC41NzQtLjI0MS41NzQtLjUzNyAwLS4yOTQtLjI1OC0uNTM1LS41NzQtLjUzNS0uMzEzIDAtLjU3Mi4yNDEtLjU3Mi41MzUgMCAuMjk2LjI1OS41MzcuNTcyLjUzN1ptMy4xMiA0LjM4NWMuOTQ1IDAgMS41ODEtLjQ2IDEuNzMtMS4xNjlsLS45OC0uMDY0Yy0uMTA2LjI5LS4zOC40NDItLjczMi40NDItLjUzIDAtLjg2NS0uMzUtLjg2NS0uOTJ2LS4wMDJoMi42di0uMjkxYzAtMS4yOTgtLjc4Ni0xLjkzOS0xLjc5NS0xLjkzOS0xLjEyNCAwLTEuODUyLjc5OC0xLjg1MiAxLjk3NiAwIDEuMjExLjcxOCAxLjk2NyAxLjg5NCAxLjk2N1ptLS44NDctMi4zNjlhLjgwNi44MDYgMCAwIDEgLjgyMi0uNzgzYy40NiAwIC43NzguMzI4Ljc4Ljc4M2gtMS42MDNabTUuMDE2IDIuMzY5YzEuMDE3IDAgMS42NTUtLjU5NyAxLjcwNS0xLjQ3NWgtMWMtLjA2MS40MDgtLjMzLjYzNy0uNjkzLjYzNy0uNDk0IDAtLjgxNS0uNDE1LS44MTUtMS4xNDYgMC0uNzIxLjMyMy0xLjEzNC44MTUtMS4xMzQuMzg4IDAgLjYzNy4yNTYuNjk0LjYzN2gxYy0uMDQ2LS44ODMtLjcxNC0xLjQ2Mi0xLjcxMS0xLjQ2Mi0xLjE1OSAwLTEuODc0LjgwMy0xLjg3NCAxLjk3NCAwIDEuMTYxLjcwMyAxLjk2OSAxLjg3OSAxLjk2OVptNC40MTQtMy44OTNoLS43MTh2LS45MTVoLTEuMDZ2LjkxNWgtLjUyMXYuNzk1aC41MjJ2MS45ODljLS4wMDUuNzQ4LjUwNCAxLjExOSAxLjI3MiAxLjA4Ni4yNzQtLjAxLjQ2OC0uMDY0LjU3NS0uMDk5bC0uMTY3LS43ODhjLS4wNTIuMDEtLjE2NC4wMzUtLjI2My4wMzUtLjIxMiAwLS4zNTgtLjA4LS4zNTgtLjM3M3YtMS44NWguNzE4di0uNzk1Wm03LjAwOCAxLjI3M2MwLTEuNjY2LTEuMDM0LTIuNjE2LTIuMzg0LTIuNjE2LTEuMzU3IDAtMi4zODQuOTUtMi4zODQgMi42MTYgMCAxLjY1OCAxLjAyNyAyLjYxNSAyLjM4NCAyLjYxNSAxLjM1IDAgMi4zODQtLjk1IDIuMzg0LTIuNjE1Wm0tMS4wOTEgMGMwIDEuMDc4LS41MTIgMS42NjMtMS4yOTMgMS42NjMtLjc4MyAwLTEuMjkyLS41ODUtMS4yOTItMS42NjMgMC0xLjA3OS41MDktMS42NjMgMS4yOTItMS42NjMuNzgxIDAgMS4yOTMuNTg0IDEuMjkzIDEuNjYzWm0zLjkyMi0xLjI3M2gtLjc1OHYtLjI1NmMwLS4yNTkuMTA0LS40MS40MTUtLjQxLjEyNyAwIC4yNTYuMDI3LjM0LjA1NGwuMTg3LS43OTVhMi43NzggMi43NzggMCAwIDAtLjc0OC0uMTA1Yy0uNzE5IDAtMS4yNTMuNDA2LTEuMjUzIDEuMjM2di4yNzZoLS41NHYuNzk1aC41NHYzLjAyM2gxLjA1OXYtMy4wMjNoLjc1OHYtLjc5NVptMi43IDBoLS43NTh2LS4yNTZjMC0uMjU5LjEwNC0uNDEuNDE1LS40MS4xMjcgMCAuMjU2LjAyNy4zNDEuMDU0bC4xODYtLjc5NWEyLjc3OCAyLjc3OCAwIDAgMC0uNzQ4LS4xMDVjLS43MTkgMC0xLjI1My40MDYtMS4yNTMgMS4yMzZ2LjI3NmgtLjU0di43OTVoLjU0djMuMDIzaDEuMDU5di0zLjAyM2guNzU4di0uNzk1Wm0yLjI1IDMuODkzYy45NDUgMCAxLjU4MS0uNDYgMS43My0xLjE2OWwtLjk3OS0uMDY0Yy0uMTA3LjI5LS4zOC40NDItLjczMy40NDItLjUzIDAtLjg2NS0uMzUtLjg2NS0uOTJ2LS4wMDJoMi42di0uMjkxYzAtMS4yOTgtLjc4Ni0xLjkzOS0xLjc5NS0xLjkzOS0xLjEyNCAwLTEuODUyLjc5OC0xLjg1MiAxLjk3NiAwIDEuMjExLjcxOCAxLjk2NyAxLjg5NCAxLjk2N1ptLS44NDctMi4zNjlhLjgwNi44MDYgMCAwIDEgLjgyMi0uNzgzYy40NiAwIC43NzguMzI4Ljc4MS43ODNoLTEuNjAzWm0zLjI5MSAyLjI5NGgxLjA1OXYtMi4xNmMwLS40Ny4zNDMtLjc5My44MS0uNzkzLjE0NyAwIC4zNDguMDI1LjQ0OC4wNTd2LS45NGExLjYyNyAxLjYyNyAwIDAgMC0uMzM0LS4wMzdjLS40MjcgMC0uNzc4LjI0OS0uOTE3LjcyMWgtLjA0di0uNjY2aC0xLjAyNnYzLjgxOFoiIGZpbGw9IiNBMUExQTEiLz48Y2lyY2xlIGN4PSIxMDQuNTQyIiBjeT0iOTAuNTk1IiByPSIzOC43ODYiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzIyNzFCMSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEuODYyIiBzdHJva2UtZGFzaGFycmF5PSIyIDMiLz48Y2lyY2xlIGN4PSIxMDQuNTQxIiBjeT0iOTAuNTk1IiByPSIzMS45MDUiIGZpbGw9IiNGNkZBRkYiLz48ZyBjbGlwLXBhdGg9InVybCgjYSkiPjxwYXRoIGQ9Im0xMjcuMjU1IDY1LjQ3NC0zLjgwMiAzLjgwNFY1Ny40OGExLjg2MyAxLjg2MyAwIDAgMC0zLjE4Mi0xLjMxOGMtLjM1LjM1LS41NDcuODIzLS41NDcgMS4zMTh2MTEuOGwtMy44MDItMy44MDVhMS44NjUgMS44NjUgMCAxIDAtMi42MzkgMi42MzlsNi45ODYgNi45ODVhMS44NjUgMS44NjUgMCAwIDAgMi42NCAwbDYuOTg1LTYuOTg1YTEuODY2IDEuODY2IDAgMSAwLTIuNjM5LTIuNjM5Wm0xMi4yNjMuMTU1YTE3LjkzIDE3LjkzIDAgMCAxLTM1Ljg1OSAwIDE3LjkyNyAxNy45MjcgMCAwIDEgMTcuOTMtMTcuOTI5IDE3LjkzIDE3LjkzIDAgMCAxIDE3LjkyOSAxNy45M1oiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzIyNzFCMSIgc3Ryb2tlLXdpZHRoPSIxLjQiLz48L2c+PHBhdGggZD0iTTEwNy4xNDUgMTEyLjA2NnYuMDAxYzAgLjk2Ni4zODQgMS44OTMgMS4wNjggMi41NzdsMjAuMjY1IDIwLjI2NWEzLjY0NiAzLjY0NiAwIDAgMCA1LjE1NCAwbDEzLjI3Ny0xMy4yNzdhMy42NDYgMy42NDYgMCAwIDAgMC01LjE1NGwtMjAuMjY1LTIwLjI2NWEzLjY0NyAzLjY0NyAwIDAgMC0yLjU3Ny0xLjA2OEgxMTAuNzlhMy42NDIgMy42NDIgMCAwIDAtMy42NDUgMy42NDV2MTMuMjc2Wm0xNC40NzUtNi4wMzhhMy41OTIgMy41OTIgMCAxIDEtNy4xODUgMCAzLjU5MiAzLjU5MiAwIDAgMSA3LjE4NSAwWiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMjI3MUIxIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxyZWN0IHg9IjU1IiB5PSI4OC41MjciIHdpZHRoPSIzNi4zODkiIGhlaWdodD0iMzYuMzg5IiByeD0iMTguMTk0IiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTczLjE5NCA5MS41NmExNS4xNjIgMTUuMTYyIDAgMSAwIDAgMzAuMzI0IDE1LjE2MiAxNS4xNjIgMCAwIDAgMC0zMC4zMjRabTAgMjcuMjkxYTEyLjEyOCAxMi4xMjggMCAwIDEtOC41NzctMjAuNzA2IDEyLjEzIDEyLjEzIDAgMSAxIDguNTc3IDIwLjcwNloiIGZpbGw9IiMyMjcxQjEiLz48cGF0aCBkPSJNNzMuMTk0IDEwNS4yMDZjLTMuMDMyIDAtMy4wMzItLjk1Ni0zLjAzMi0xLjUxNyAwLS41NjEgMS4wNjEtMS41MTYgMy4wMzItMS41MTZzMi4xMDguOTcxIDIuMTIzIDEuNTE2aDMuMDMzYTQuNTQ1IDQuNTQ1IDAgMCAwLTMuNjQtNC4zNjZ2LTEuNjk4aC0zLjAzMnYxLjY1MmMtMy4wMzIuNS00LjU0OCAyLjQ1Ni00LjU0OCA0LjQxMiAwIDEuNjk4Ljc4OCA0LjU0OSA2LjA2NCA0LjU0OSAzLjAzMyAwIDMuMDMzIDEuMDMxIDMuMDMzIDEuNTE2IDAgLjQ4NS0uOTQgMS41MTYtMy4wMzMgMS41MTYtMi43OSAwLTMuMDMyLTEuMzA0LTMuMDMyLTEuNTE2SDY3LjEzYzAgMS4zOTUgMSAzLjg2NiA0LjU0OCA0LjQyN3YxLjYzOGgzLjAzM3YtMS42MzhjMy4wMzItLjUxNSA0LjU0OC0yLjQ3MSA0LjU0OC00LjQyNyAwLTEuNjk4LS43ODgtNC41NDgtNi4wNjUtNC41NDhaIiBmaWxsPSIjMjI3MUIxIi8+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDIuOTU5IDQ3KSIgZD0iTTAgMGgzNy4yNTl2MzcuMjU5SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+";function B3(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function F3(){let e=[],t={addEventListener:(e,n,r,o)=>(e.addEventListener(n,r,o),t.add(()=>e.removeEventListener(n,r,o))),requestAnimationFrame(...e){let n=requestAnimationFrame(...e);return t.add(()=>cancelAnimationFrame(n))},nextFrame:(...e)=>t.requestAnimationFrame(()=>t.requestAnimationFrame(...e)),setTimeout(...e){let n=setTimeout(...e);return t.add(()=>clearTimeout(n))},microTask(...e){let n={current:!0};return B3(()=>{n.current&&e[0]()}),t.add(()=>{n.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(e){let t=F3();return e(t),this.add(()=>t.dispose())},add:t=>(e.includes(t)||e.push(t),()=>{let n=e.indexOf(t);if(n>=0)for(let t of e.splice(n,1))t()}),dispose(){for(let t of e.splice(0))t()}};return t}function Y3(){let[e]=(0,w.useState)(F3);return(0,w.useEffect)(()=>()=>e.dispose(),[e]),e}var Z3=Object.defineProperty,Q3=(e,t,n)=>(((e,t,n)=>{t in e?Z3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let V3=new class{constructor(){Q3(this,"current",this.detect()),Q3(this,"handoffState","pending"),Q3(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},W3=(e,t)=>{V3.isServer?(0,w.useEffect)(e,t):(0,w.useLayoutEffect)(e,t)};function G3(e){let t=(0,w.useRef)(e);return W3(()=>{t.current=e},[e]),t}let H3=function(e){let t=G3(e);return w.useCallback((...e)=>t.current(...e),[t])};function $3(){let e=(0,w.useRef)(!1);return W3(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function X3(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in b&&(e=>e.useSyncExternalStore)(b)(()=>()=>{},()=>!1,()=>!e)}(),[t,n]=w.useState(V3.isHandoffComplete);return t&&!1===V3.isHandoffComplete&&n(!1),w.useEffect(()=>{!0!==t&&n(!0)},[t]),w.useEffect(()=>V3.handoff(),[]),!e&&t}let q3=Symbol();function J3(...e){let t=(0,w.useRef)(e);(0,w.useEffect)(()=>{t.current=e},[e]);let n=H3(e=>{for(let n of t.current)null!=n&&("function"==typeof n?n(e):n.current=e)});return e.every(e=>null==e||(null==e?void 0:e[q3]))?void 0:n}var K3,e9;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(K3=null==process?void 0:process.env)?void 0:K3.NODE_ENV)&&void 0===(null==(e9=null==Element?void 0:Element.prototype)?void 0:e9.getAnimations)&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join("\n")),[]});var t9=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(t9||{});function n9(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}let r9=(0,w.createContext)(null);r9.displayName="OpenClosedContext";var o9=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(o9||{});function a9(){return(0,w.useContext)(r9)}function i9({value:e,children:t}){return w.createElement(r9.Provider,{value:e},t)}function s9({children:e}){return w.createElement(r9.Provider,{value:null},e)}function l9(...e){return Array.from(new Set(e.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}function c9(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,c9),r}var u9=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(u9||{}),d9=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(d9||{});function f9(){let e=function(){let e=(0,w.useRef)([]),t=(0,w.useCallback)(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]);return(...n)=>{if(!n.every(e=>null==e))return e.current=n,t}}();return(0,w.useCallback)(t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:a=!0,name:i,mergeRefs:s}){s=null!=s?s:m9;let l=h9(t,e);if(a)return p9(l,n,r,i,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return p9(t,n,r,i,s)}if(1&c){let{unmount:e=!0,...t}=l;return c9(e?0:1,{0:()=>null,1:()=>p9({...t,hidden:!0,style:{display:"none"}},n,r,i,s)})}return p9(l,n,r,i,s)}({mergeRefs:e,...t}),[e])}function p9(e,t={},n,r,o){let{as:a=n,children:i,refName:s="ref",...l}=w9(e,["unmount","static"]),c=void 0!==e.ref?{[s]:e.ref}:{},u="function"==typeof i?i(t):i;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`));if(e){d["data-headlessui-state"]=n.join(" ");for(let e of n)d[`data-${e}`]=""}}if(v9(a)&&(Object.keys(y9(l)).length>0||Object.keys(y9(d)).length>0)){if(!(!(0,w.isValidElement)(u)||Array.isArray(u)&&u.length>1||function(e){return v9(e.type)}(u))){let e=u.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>l9(t(...e),l.className):l9(t,l.className),r=n?{className:n}:{},a=h9(u.props,y9(w9(l,["ref"])));for(let e in d)e in a&&delete d[e];return(0,w.cloneElement)(u,Object.assign({},a,d,c,{ref:o(b9(u),c.ref)},r))}if(Object.keys(y9(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(y9(l)).concat(Object.keys(y9(d))).map(e=>` - ${e}`).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>` - ${e}`).join("\n")].join("\n"))}return(0,w.createElement)(a,Object.assign({},w9(l,["ref"]),!v9(a)&&c,!v9(a)&&d),u)}function m9(...e){return e.every(e=>null==e)?void 0:t=>{for(let n of e)null!=n&&("function"==typeof n?n(t):n.current=t)}}function h9(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},n={};for(let r of e)for(let e in r)e.startsWith("on")&&"function"==typeof r[e]?(null!=n[e]||(n[e]=[]),n[e].push(r[e])):t[e]=r[e];if(t.disabled||t["aria-disabled"])for(let e in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(n[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in n)Object.assign(t,{[e](t,...r){let o=n[e];for(let e of o){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...r)}}});return t}function g9(e){var t;return Object.assign((0,w.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function y9(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function w9(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function b9(e){return w.version.split(".")[0]>="19"?e.props.ref:e.ref}function v9(e){return e===w.Fragment||e===Symbol.for("react.fragment")}function x9(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!v9(null!=(t=e.as)?t:S9)||1===w.Children.count(e.children)}let N9=(0,w.createContext)(null);N9.displayName="TransitionContext";var E9=(e=>(e.Visible="visible",e.Hidden="hidden",e))(E9||{});let M9=(0,w.createContext)(null);function _9(e){return"children"in e?_9(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function I9(e,t){let n=G3(e),r=(0,w.useRef)([]),o=$3(),a=Y3(),i=H3((e,t=d9.Hidden)=>{let i=r.current.findIndex(({el:t})=>t===e);-1!==i&&(c9(t,{[d9.Unmount](){r.current.splice(i,1)},[d9.Hidden](){r.current[i].state="hidden"}}),a.microTask(()=>{var e;!_9(r)&&o.current&&(null==(e=n.current)||e.call(n))}))}),s=H3(e=>{let t=r.current.find(({el:t})=>t===e);return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),()=>i(e,d9.Unmount)}),l=(0,w.useRef)([]),c=(0,w.useRef)(Promise.resolve()),u=(0,w.useRef)({enter:[],leave:[]}),d=H3((e,n,r)=>{l.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter(([t])=>t!==e)),null==t||t.chains.current[n].push([e,new Promise(e=>{l.current.push(e)})]),null==t||t.chains.current[n].push([e,new Promise(e=>{Promise.all(u.current[n].map(([e,t])=>t)).then(()=>e())})]),"enter"===n?c.current=c.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),f=H3((e,t,n)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=l.current.shift())||e()}).then(()=>n(t))});return(0,w.useMemo)(()=>({children:r,register:s,unregister:i,onStart:d,onStop:f,wait:c,chains:u}),[s,i,r,d,f,u,c])}M9.displayName="NestingContext";let S9=w.Fragment,j9=u9.RenderStrategy,k9=g9(function(e,t){let{show:n,appear:r=!1,unmount:o=!0,...a}=e,i=(0,w.useRef)(null),s=J3(...x9(e)?[i,t]:null===t?[]:[t]);X3();let l=a9();if(void 0===n&&null!==l&&(n=(l&o9.Open)===o9.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,u]=(0,w.useState)(n?"visible":"hidden"),d=I9(()=>{n||u("hidden")}),[f,p]=(0,w.useState)(!0),m=(0,w.useRef)([n]);W3(()=>{!1!==f&&m.current[m.current.length-1]!==n&&(m.current.push(n),p(!1))},[m,n]);let h=(0,w.useMemo)(()=>({show:n,appear:r,initial:f}),[n,r,f]);W3(()=>{n?u("visible"):!_9(d)&&null!==i.current&&u("hidden")},[n,d]);let g={unmount:o},y=H3(()=>{var t;f&&p(!1),null==(t=e.beforeEnter)||t.call(e)}),b=H3(()=>{var t;f&&p(!1),null==(t=e.beforeLeave)||t.call(e)}),v=f9();return w.createElement(M9.Provider,{value:d},w.createElement(N9.Provider,{value:h},v({ourProps:{...g,as:w.Fragment,children:w.createElement(D9,{ref:s,...g,...a,beforeEnter:y,beforeLeave:b})},theirProps:{},defaultTag:w.Fragment,features:j9,visible:"visible"===c,name:"Transition"})))}),D9=g9(function(e,t){var n,r;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:s,afterLeave:l,enter:c,enterFrom:u,enterTo:d,entered:f,leave:p,leaveFrom:m,leaveTo:h,...g}=e,[y,b]=(0,w.useState)(null),v=(0,w.useRef)(null),x=x9(e),N=J3(...x?[v,t,b]:null===t?[]:[t]),E=null==(n=g.unmount)||n?d9.Unmount:d9.Hidden,{show:M,appear:_,initial:I}=function(){let e=(0,w.useContext)(N9);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[S,j]=(0,w.useState)(M?"visible":"hidden"),k=function(){let e=(0,w.useContext)(M9);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:D,unregister:C}=k;W3(()=>D(v),[D,v]),W3(()=>{if(E===d9.Hidden&&v.current)return M&&"visible"!==S?void j("visible"):c9(S,{hidden:()=>C(v),visible:()=>D(v)})},[S,v,D,C,M,E]);let A=X3();W3(()=>{if(x&&A&&"visible"===S&&null===v.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[v,S,A,x]);let T=I&&!_,O=_&&M&&I,L=(0,w.useRef)(!1),z=I9(()=>{L.current||(j("hidden"),C(v))},k),P=H3(e=>{L.current=!0;let t=e?"enter":"leave";z.onStart(v,t,e=>{"enter"===e?null==a||a():"leave"===e&&(null==s||s())})}),R=H3(e=>{let t=e?"enter":"leave";L.current=!1,z.onStop(v,t,e=>{"enter"===e?null==i||i():"leave"===e&&(null==l||l())}),"leave"===t&&!_9(z)&&(j("hidden"),C(v))});(0,w.useEffect)(()=>{x&&o||(P(M),R(M))},[M,x,o]);let U=!(!o||!x||!A||T),[,B]=function(e,t,n,r){let[o,a]=(0,w.useState)(n),{hasFlag:i,addFlag:s,removeFlag:l}=function(e=0){let[t,n]=(0,w.useState)(e),r=(0,w.useCallback)(e=>n(e),[]),o=(0,w.useCallback)(e=>n(t=>t|e),[]),a=(0,w.useCallback)(e=>(t&e)===e,[t]),i=(0,w.useCallback)(e=>n(t=>t&~e),[]),s=(0,w.useCallback)(e=>n(t=>t^e),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:s}}(e&&o?3:0),c=(0,w.useRef)(!1),u=(0,w.useRef)(!1),d=Y3();return W3(()=>{var o;if(e)return n&&a(!0),t?(null==(o=null==r?void 0:r.start)||o.call(r,n),function(e,{prepare:t,run:n,done:r,inFlight:o}){let a=F3();return function(e,{inFlight:t,prepare:n}){if(null!=t&&t.current)return void n();let r=e.style.transition;e.style.transition="none",n(),e.offsetHeight,e.style.transition=r}(e,{prepare:t,inFlight:o}),a.nextFrame(()=>{n(),a.requestAnimationFrame(()=>{a.add(function(e,t){var n,r;let o=F3();if(!e)return o.dispose;let a=!1;o.add(()=>{a=!0});let i=null!=(r=null==(n=e.getAnimations)?void 0:n.call(e).filter(e=>e instanceof CSSTransition))?r:[];return 0===i.length?(t(),o.dispose):(Promise.allSettled(i.map(e=>e.finished)).then(()=>{a||t()}),o.dispose)}(e,r))})}),a.dispose}(t,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(n?(s(3),l(4)):(s(4),l(2)))},run(){u.current?n?(l(3),s(4)):(l(4),s(3)):n?l(1):s(1)},done(){var e;u.current&&function(e){var t,n;return(null!=(n=null==(t=e.getAnimations)?void 0:t.call(e))?n:[]).some(e=>e instanceof CSSTransition&&"finished"!==e.playState)}(t)||(c.current=!1,l(7),n||a(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})):void(n&&s(3))},[e,n,t,d]),e?[o,{closed:i(1),enter:i(2),leave:i(4),transition:i(2)||i(4)}]:[n,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}(U,y,M,{start:P,end:R}),F=y9({ref:N,className:(null==(r=l9(g.className,O&&c,O&&u,B.enter&&c,B.enter&&B.closed&&u,B.enter&&!B.closed&&d,B.leave&&p,B.leave&&!B.closed&&m,B.leave&&B.closed&&h,!B.transition&&M&&f))?void 0:r.trim())||void 0,...n9(B)}),Y=0;"visible"===S&&(Y|=o9.Open),"hidden"===S&&(Y|=o9.Closed),M&&"hidden"===S&&(Y|=o9.Opening),!M&&"visible"===S&&(Y|=o9.Closing);let Z=f9();return w.createElement(M9.Provider,{value:z},w.createElement(i9,{value:Y},Z({ourProps:F,theirProps:g,defaultTag:S9,features:j9,visible:"visible"===S,name:"Transition.Child"})))}),C9=g9(function(e,t){let n=null!==(0,w.useContext)(N9),r=null!==a9();return w.createElement(w.Fragment,null,!n&&r?w.createElement(k9,{ref:t,...e}):w.createElement(D9,{ref:t,...e}))}),A9=Object.assign(k9,{Child:C9,Root:k9});var T9=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(T9||{});function O9(e,t,n,r){let o=G3(n);(0,w.useEffect)(()=>{function n(e){o.current(e)}return(e=null!=e?e:window).addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)},[e,t,r])}class L9 extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return void 0===t&&(t=this.factory(e),this.set(e,t)),t}}var z9,P9,R9,U9=Object.defineProperty,B9=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},F9=(e,t,n)=>(B9(e,t,"read from private field"),n?n.call(e):t.get(e)),Y9=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Z9=(e,t,n,r)=>(B9(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class Q9{constructor(e){Y9(this,z9,{}),Y9(this,P9,new L9(()=>new Set)),Y9(this,R9,new Set),((e,t,n)=>{((e,t,n)=>{t in e?U9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(this,"disposables",F3()),Z9(this,z9,e),V3.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return F9(this,z9)}subscribe(e,t){if(V3.isServer)return()=>{};let n={selector:e,callback:t,current:e(F9(this,z9))};return F9(this,R9).add(n),this.disposables.add(()=>{F9(this,R9).delete(n)})}on(e,t){return V3.isServer?()=>{}:(F9(this,P9).get(e).add(t),this.disposables.add(()=>{F9(this,P9).get(e).delete(t)}))}send(e){let t=this.reduce(F9(this,z9),e);if(t!==F9(this,z9)){Z9(this,z9,t);for(let e of F9(this,R9)){let t=e.selector(F9(this,z9));V9(e.current,t)||(e.current=t,e.callback(t))}for(let t of F9(this,P9).get(e.type))t(F9(this,z9),e)}}}function V9(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&W9(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&W9(e.entries(),t.entries()):!(!G9(e)||!G9(t))&&W9(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function W9(e,t){for(;;){let n=e.next(),r=t.next();if(n.done&&r.done)return!0;if(n.done||r.done||!Object.is(n.value,r.value))return!1}}function G9(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}z9=new WeakMap,P9=new WeakMap,R9=new WeakMap;var H9=Object.defineProperty,$9=(e,t,n)=>(((e,t,n)=>{t in e?H9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),X9=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(X9||{});let q9={0(e,t){let n=t.id,r=e.stack,o=e.stack.indexOf(n);if(-1!==o){let t=e.stack.slice();return t.splice(o,1),t.push(n),r=t,{...e,stack:r}}return{...e,stack:[...e.stack,n]}},1(e,t){let n=t.id,r=e.stack.indexOf(n);if(-1===r)return e;let o=e.stack.slice();return o.splice(r,1),{...e,stack:o}}};class J9 extends Q9{constructor(){super(...arguments),$9(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),$9(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new J9({stack:[]})}reduce(e,t){return c9(t.type,q9,e,t)}}const K9=new L9(()=>J9.new());var e8=o(8418);function t8(e,t,n=V9){return(0,e8.useSyncExternalStoreWithSelector)(H3(t=>e.subscribe(n8,t)),H3(()=>e.state),H3(()=>e.state),H3(t),n)}function n8(e){return e}function r8(e,t){let n=(0,w.useId)(),r=K9.get(t),[o,a]=t8(r,(0,w.useCallback)(e=>[r.selectors.isTop(e,n),r.selectors.inStack(e,n)],[r,n]));return W3(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),!!e&&(!a||o)}function o8(e){var t;return V3.isServer?null:null==e?document:null!=(t=null==e?void 0:e.ownerDocument)?t:document}function a8(e){var t,n;return V3.isServer?null:null==e?document:null!=(n=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e))?n:document}function i8(e){var t,n;return null!=(n=null==(t=a8(e))?void 0:t.activeElement)?n:null}let s8=new Map,l8=new Map;function c8(e){var t;let n=null!=(t=l8.get(e))?t:0;return l8.set(e,n+1),0!==n||(s8.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0),()=>function(e){var t;let n=null!=(t=l8.get(e))?t:1;if(1===n?l8.delete(e):l8.set(e,n-1),1!==n)return;let r=s8.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,s8.delete(e))}(e)}function u8(e){return function(e){return"object"==typeof e&&null!==e&&"nodeType"in e}(e)&&"tagName"in e}function d8(e){return u8(e)&&"accessKey"in e}function f8(e){return u8(e)&&"tabIndex"in e}let p8=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","details>summary","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),m8=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var h8=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(h8||{}),g8=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(g8||{}),y8=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(y8||{});var w8=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(w8||{});var b8=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(b8||{});function v8(e){null==e||e.focus({preventScroll:!0})}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));let x8=["textarea","input"].join(",");function N8(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let a=Array.isArray(e)?e.length>0?a8(e[0]):document:a8(e),i=Array.isArray(e)?n?function(e,t=e=>e){return e.slice().sort((e,n)=>{let r=t(e),o=t(n);if(null===r||null===o)return 0;let a=r.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}(e):e:64&t?function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(m8)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e):function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(p8)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}(e);o.length>0&&i.length>1&&(i=i.filter(e=>!o.some(t=>null!=t&&"current"in t?(null==t?void 0:t.current)===e:t===e))),r=null!=r?r:null==a?void 0:a.activeElement;let s,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,i.indexOf(r))-1;if(4&t)return Math.max(0,i.indexOf(r))+1;if(8&t)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=32&t?{preventScroll:!0}:{},d=0,f=i.length;do{if(d>=f||d+f<=0)return 0;let e=c+d;if(16&t)e=(e+f)%f;else{if(e<0)return 3;if(e>=f)return 1}s=i[e],null==s||s.focus(u),d+=l}while(s!==i8(s));return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,x8))&&n}(s)&&s.select(),2}function E8(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function M8(){return E8()||/Android/gi.test(window.navigator.userAgent)}function _8(e,t,n,r){let o=G3(n);(0,w.useEffect)(()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){o.current(e)}},[e,t,r])}function I8(e,t,n,r){let o=G3(n);(0,w.useEffect)(()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){o.current(e)}},[e,t,r])}function S8(e,t,n){let r=G3(n),o=(0,w.useCallback)(function(e,n){if(e.defaultPrevented)return;let o=n(e);if(null===o||!o.getRootNode().contains(o)||!o.isConnected)return;let a=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(t);for(let t of a)if(null!==t&&(t.contains(o)||e.composed&&e.composedPath().includes(t)))return;return!function(e,t=0){var n;return e!==(null==(n=o8(e))?void 0:n.body)&&c9(t,{0:()=>e.matches(p8),1(){let t=e;for(;null!==t;){if(t.matches(p8))return!0;t=t.parentElement}return!1}})}(o,w8.Loose)&&-1!==o.tabIndex&&e.preventDefault(),r.current(e,o)},[r,t]),a=(0,w.useRef)(null);_8(e,"pointerdown",e=>{var t,n;M8()||(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),_8(e,"pointerup",e=>{if(M8()||!a.current)return;let t=a.current;return a.current=null,o(e,()=>t)},!0);let i=(0,w.useRef)({x:0,y:0});_8(e,"touchstart",e=>{i.current.x=e.touches[0].clientX,i.current.y=e.touches[0].clientY},!0),_8(e,"touchend",e=>{let t=e.changedTouches[0].clientX,n=e.changedTouches[0].clientY;if(!(Math.abs(t-i.current.x)>=30||Math.abs(n-i.current.y)>=30))return o(e,()=>f8(e.target)?e.target:null)},!0),I8(e,"blur",e=>o(e,()=>function(e){return d8(e)&&"IFRAME"===e.nodeName}(window.document.activeElement)?window.document.activeElement:null),!0)}function j8(...e){return(0,w.useMemo)(()=>o8(...e),[...e])}var k8=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(k8||{});let D8=g9(function(e,t){var n;let{features:r=1,...o}=e,a={ref:t,"aria-hidden":!(2&~r)||(null!=(n=o["aria-hidden"])?n:void 0),hidden:!(4&~r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...!(4&~r)&&!!(2&~r)&&{display:"none"}}};return f9()({ourProps:a,theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})}),C8=(0,w.createContext)(null);function A8({children:e,node:t}){let[n,r]=(0,w.useState)(null),o=T8(null!=t?t:n);return w.createElement(C8.Provider,{value:o},e,null===o&&w.createElement(D8,{features:k8.Hidden,ref:e=>{var t,n;if(e)for(let o of null!=(n=null==(t=o8(e))?void 0:t.querySelectorAll("html > *, body > *"))?n:[])if(o!==document.body&&o!==document.head&&u8(o)&&null!=o&&o.contains(e)){r(o);break}}}))}function T8(e=null){var t;return null!=(t=(0,w.useContext)(C8))?t:e}function O8(){let e;return{before({doc:t}){var n;let r=t.documentElement,o=null!=(n=t.defaultView)?n:window;e=Math.max(0,o.innerWidth-r.clientWidth)},after({doc:t,d:n}){let r=t.documentElement,o=Math.max(0,r.clientWidth-r.offsetWidth),a=Math.max(0,e-o);n.style(r,"paddingRight",`${a}px`)}}}function L8(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let z8=function(e,t){let n=new Map,r=new Set;return{getSnapshot:()=>n,subscribe:e=>(r.add(e),()=>r.delete(e)),dispatch(e,...o){let a=t[e].call(n,...o);a&&(n=a,r.forEach(e=>e()))}}}(0,{PUSH(e,t){var n;let r=null!=(n=this.get(e))?n:{doc:e,count:0,d:F3(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=L8(r.meta),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t),n.computedMeta=L8(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta:()=>e.computedMeta},n=[E8()?{before({doc:e,d:t,meta:n}){function r(e){for(let t of n().containers)for(let n of t())if(n.contains(e))return!0;return!1}t.microTask(()=>{var n;if("auto"!==window.getComputedStyle(e.documentElement).scrollBehavior){let n=F3();n.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>n.dispose()))}let o=null!=(n=window.scrollY)?n:window.pageYOffset,a=null;t.addEventListener(e,"click",t=>{if(f8(t.target))try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),i=e.querySelector(o);f8(i)&&!r(i)&&(a=i)}catch{}},!0),t.group(n=>{t.addEventListener(e,"touchstart",e=>{if(n.dispose(),f8(e.target)&&function(e){return u8(e)&&"style"in e}(e.target))if(r(e.target)){let t=e.target;for(;t.parentElement&&r(t.parentElement);)t=t.parentElement;n.style(t,"overscrollBehavior","contain")}else n.style(e.target,"touchAction","none")})}),t.addEventListener(e,"touchmove",e=>{if(f8(e.target)){if(function(e){return d8(e)&&"INPUT"===e.nodeName}(e.target))return;if(r(e.target)){let t=e.target;for(;t.parentElement&&""!==t.dataset.headlessuiPortal&&!(t.scrollHeight>t.clientHeight||t.scrollWidth>t.clientWidth);)t=t.parentElement;""===t.dataset.headlessuiPortal&&e.preventDefault()}else e.preventDefault()}},{passive:!1}),t.add(()=>{var e;let t=null!=(e=window.scrollY)?e:window.pageYOffset;o!==t&&window.scrollTo(0,o),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{},O8(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];n.forEach(({before:e})=>null==e?void 0:e(t)),n.forEach(({after:e})=>null==e?void 0:e(t))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});function P8(e){return(0,w.useMemo)(()=>e,Object.values(e))}z8.subscribe(()=>{let e=z8.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let e="hidden"===t.get(n.doc),r=0!==n.count;(r&&!e||!r&&e)&&z8.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&z8.dispatch("TEARDOWN",n)}});let R8=(0,w.createContext)(()=>{});function U8({value:e,children:t}){return w.createElement(R8.Provider,{value:e},t)}let B8=(0,w.createContext)(!1);function F8(e){return w.createElement(B8.Provider,{value:e.force},e.children)}let Y8=(0,w.createContext)(void 0),Z8=(0,w.createContext)(null);function Q8(){let e=(0,w.useContext)(Z8);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Q8),e}return e}Z8.displayName="DescriptionContext";let V8=g9(function(e,t){let n=(0,w.useId)(),r=(0,w.useContext)(Y8),{id:o=`headlessui-description-${n}`,...a}=e,i=Q8(),s=J3(t);W3(()=>i.register(o),[o,i.register]);let l=P8({...i.slot,disabled:r||!1}),c={ref:s,...i.props,id:o};return f9()({ourProps:c,theirProps:a,slot:l,defaultTag:"p",name:i.name||"Description"})}),W8=Object.assign(V8,{});function G8(e){let t=H3(e),n=(0,w.useRef)(!1);(0,w.useEffect)(()=>(n.current=!1,()=>{n.current=!0,B3(()=>{n.current&&t()})}),[t])}var H8=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(H8||{});function $8(e,t){let n=(0,w.useRef)([]),r=H3(e);(0,w.useEffect)(()=>{let e=[...n.current];for(let[o,a]of t.entries())if(n.current[o]!==a){let o=r(t,e);return n.current=t,o}},[r,...t])}let X8=[];function q8(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)u8(n.current)&&t.add(n.current);return t}!function(){function e(){"loading"!==document.readyState&&((()=>{function e(e){if(!f8(e.target)||e.target===document.body||X8[0]===e.target)return;let t=e.target;t=t.closest(p8),X8.unshift(null!=t?t:e.target),X8=X8.filter(e=>null!=e&&e.isConnected),X8.splice(10)}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",e))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",e),e())}();var J8=(e=>(e[e.None=0]="None",e[e.InitialFocus=1]="InitialFocus",e[e.TabLock=2]="TabLock",e[e.FocusLock=4]="FocusLock",e[e.RestoreFocus=8]="RestoreFocus",e[e.AutoFocus=16]="AutoFocus",e))(J8||{});let K8=g9(function(e,t){let n=(0,w.useRef)(null),r=J3(n,t),{initialFocus:o,initialFocusFallback:a,containers:i,features:s=15,...l}=e;X3()||(s=0);let c=j8(n.current);!function(e,{ownerDocument:t}){let n=!!(8&e),r=function(e=!0){let t=(0,w.useRef)(X8.slice());return $8(([e],[n])=>{!0===n&&!1===e&&B3(()=>{t.current.splice(0)}),!1===n&&!0===e&&(t.current=X8.slice())},[e,X8,t]),H3(()=>{var e;return null!=(e=t.current.find(e=>null!=e&&e.isConnected))?e:null})}(n);$8(()=>{n||function(e){return i8(e)===e}(null==t?void 0:t.body)&&v8(r())},[n]),G8(()=>{n&&v8(r())})}(s,{ownerDocument:c});let u=function(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let a=(0,w.useRef)(null),i=r8(!!(1&e),"focus-trap#initial-focus"),s=$3();return $8(()=>{if(0===e)return;if(!i)return void(null!=o&&o.current&&v8(o.current));let l=n.current;l&&B3(()=>{if(!s.current)return;let n=null==t?void 0:t.activeElement;if(null!=r&&r.current){if((null==r?void 0:r.current)===n)return void(a.current=n)}else if(l.contains(n))return void(a.current=n);if(null!=r&&r.current)v8(r.current);else{if(16&e){if(N8(l,h8.First|h8.AutoFocus)!==g8.Error)return}else if(N8(l,h8.First)!==g8.Error)return;if(null!=o&&o.current&&(v8(o.current),(null==t?void 0:t.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=null==t?void 0:t.activeElement})},[o,i,e]),a}(s,{ownerDocument:c,container:n,initialFocus:o,initialFocusFallback:a});!function(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let a=$3(),i=!!(4&e);O9(null==t?void 0:t.defaultView,"focus",e=>{if(!i||!a.current)return;let t=q8(r);d8(n.current)&&t.add(n.current);let s=o.current;if(!s)return;let l=e.target;d8(l)?t6(t,l)?(o.current=l,v8(l)):(e.preventDefault(),e.stopPropagation(),v8(s)):v8(o.current)},!0)}(s,{ownerDocument:c,container:n,containers:i,previousActiveElement:u});let d=function(){let e=(0,w.useRef)(0);return I8(!0,"keydown",t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)},!0),e}(),f=H3(e=>{if(!d8(n.current))return;let t=n.current;c9(d.current,{[H8.Forwards]:()=>{N8(t,h8.First,{skipElements:[e.relatedTarget,a]})},[H8.Backwards]:()=>{N8(t,h8.Last,{skipElements:[e.relatedTarget,a]})}})}),p=r8(!!(2&s),"focus-trap#tab-lock"),m=Y3(),h=(0,w.useRef)(!1),g={ref:r,onKeyDown(e){"Tab"==e.key&&(h.current=!0,m.requestAnimationFrame(()=>{h.current=!1}))},onBlur(e){if(!(4&s))return;let t=q8(i);d8(n.current)&&t.add(n.current);let r=e.relatedTarget;f8(r)&&"true"!==r.dataset.headlessuiFocusGuard&&(t6(t,r)||(h.current?N8(n.current,c9(d.current,{[H8.Forwards]:()=>h8.Next,[H8.Backwards]:()=>h8.Previous})|h8.WrapAround,{relativeTo:e.target}):f8(e.target)&&v8(e.target)))}},y=f9();return w.createElement(w.Fragment,null,p&&w.createElement(D8,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:k8.Focusable}),y({ourProps:g,theirProps:l,defaultTag:"div",name:"FocusTrap"}),p&&w.createElement(D8,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:k8.Focusable}))}),e6=Object.assign(K8,{features:J8});function t6(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let n6=w.Fragment,r6=g9(function(e,t){let{ownerDocument:n=null,...r}=e,o=(0,w.useRef)(null),a=J3(function(e,t=!0){return Object.assign(e,{[q3]:t})}(e=>{o.current=e}),t),i=j8(o.current),s=function(e){let t=(0,w.useContext)(B8),n=(0,w.useContext)(a6),[r,o]=(0,w.useState)(()=>{var r;if(!t&&null!==n)return null!=(r=n.current)?r:null;if(V3.isServer)return null;let o=null==e?void 0:e.getElementById("headlessui-portal-root");if(o)return o;if(null===e)return null;let a=e.createElement("div");return a.setAttribute("id","headlessui-portal-root"),e.body.appendChild(a)});return(0,w.useEffect)(()=>{null!==r&&(null!=e&&e.body.contains(r)||null==e||e.body.appendChild(r))},[r,e]),(0,w.useEffect)(()=>{t||null!==n&&o(n.current)},[n,o,t]),r}(null!=n?n:i),l=(0,w.useContext)(i6),c=Y3(),u=f9();return G8(()=>{var e;s&&s.childNodes.length<=0&&(null==(e=s.parentElement)||e.removeChild(s))}),s?(0,bn.createPortal)(w.createElement("div",{"data-headlessui-portal":"",ref:e=>{c.dispose(),l&&e&&c.add(l.register(e))}},u({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:n6,name:"Portal"})),s):null}),o6=w.Fragment,a6=(0,w.createContext)(null),i6=(0,w.createContext)(null),s6=g9(function(e,t){let n=J3(t),{enabled:r=!0,ownerDocument:o,...a}=e,i=f9();return r?w.createElement(r6,{...a,ownerDocument:o,ref:n}):i({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:n6,name:"Portal"})}),l6=g9(function(e,t){let{target:n,...r}=e,o={ref:J3(t)},a=f9();return w.createElement(a6.Provider,{value:n},a({ourProps:o,theirProps:r,defaultTag:o6,name:"Popover.Group"}))}),c6=Object.assign(s6,{Group:l6});var u6=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(u6||{}),d6=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(d6||{});let f6={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},p6=(0,w.createContext)(null);function m6(e){let t=(0,w.useContext)(p6);if(null===t){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,m6),t}return t}function h6(e,t){return c9(t.type,f6,e,t)}p6.displayName="DialogContext";let g6=g9(function(e,t){let n=(0,w.useId)(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:a,initialFocus:i,role:s="dialog",autoFocus:l=!0,__demoMode:c=!1,unmount:u=!1,...d}=e,f=(0,w.useRef)(!1);s="dialog"===s||"alertdialog"===s?s:(f.current||(f.current=!0,console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog");let p=a9();void 0===o&&null!==p&&(o=(p&o9.Open)===o9.Open);let m=(0,w.useRef)(null),h=J3(m,t),g=j8(m.current),y=o?0:1,[b,v]=(0,w.useReducer)(h6,{titleId:null,descriptionId:null,panelRef:(0,w.createRef)()}),x=H3(()=>a(!1)),N=H3(e=>v({type:0,id:e})),E=!!X3()&&0===y,[M,_]=function(){let e=(0,w.useContext)(i6),t=(0,w.useRef)([]),n=H3(n=>(t.current.push(n),e&&e.register(n),()=>r(n))),r=H3(n=>{let r=t.current.indexOf(n);-1!==r&&t.current.splice(r,1),e&&e.unregister(n)}),o=(0,w.useMemo)(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,(0,w.useMemo)(()=>function({children:e}){return w.createElement(i6.Provider,{value:o},e)},[o])]}(),I={get current(){var e;return null!=(e=b.panelRef.current)?e:m.current}},S=T8(),{resolveContainers:j}=function({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=H3(()=>{var r,o;let a=o8(n),i=[];for(let t of e)null!==t&&(u8(t)?i.push(t):"current"in t&&u8(t.current)&&i.push(t.current));if(null!=t&&t.current)for(let e of t.current)i.push(e);for(let e of null!=(r=null==a?void 0:a.querySelectorAll("html > *, body > *"))?r:[])e!==document.body&&e!==document.head&&u8(e)&&"headlessui-portal-root"!==e.id&&(n&&(e.contains(n)||e.contains(null==(o=null==n?void 0:n.getRootNode())?void 0:o.host))||i.some(t=>e.contains(t))||i.push(e));return i});return{resolveContainers:r,contains:H3(e=>r().some(t=>t.contains(e)))}}({mainTreeNode:S,portals:M,defaultContainers:[I]}),k=null!==p&&(p&o9.Closing)===o9.Closing;!function(e,{allowed:t,disallowed:n}={}){let r=r8(e,"inert-others");W3(()=>{var e,o;if(!r)return;let a=F3();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&a.add(c8(t));let i=null!=(o=null==t?void 0:t())?o:[];for(let e of i){if(!e)continue;let t=o8(e);if(!t)continue;let n=e.parentElement;for(;n&&n!==t.body;){for(let e of n.children)i.some(t=>e.contains(t))||a.add(c8(e));n=n.parentElement}}return a.dispose},[r,t,n])}(!c&&!k&&E,{allowed:H3(()=>{var e,t;return[null!=(t=null==(e=m.current)?void 0:e.closest("[data-headlessui-portal]"))?t:null]}),disallowed:H3(()=>{var e;return[null!=(e=null==S?void 0:S.closest("body > *:not(#headlessui-portal-root)"))?e:null]})});let D=K9.get(null);W3(()=>{if(E)return D.actions.push(r),()=>D.actions.pop(r)},[D,r,E]);let C=t8(D,(0,w.useCallback)(e=>D.selectors.isTop(e,r),[D,r]));S8(C,j,e=>{e.preventDefault(),x()}),function(e,t=("undefined"!=typeof document?document.defaultView:null),n){let r=r8(e,"escape");O9(t,"keydown",e=>{r&&(e.defaultPrevented||e.key===T9.Escape&&n(e))})}(C,null==g?void 0:g.defaultView,e=>{e.preventDefault(),e.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur(),x()}),function(e,t,n=()=>[document.body]){!function(e,t,n=()=>({containers:[]})){let r=function(e){return(0,w.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}(z8),o=t?r.get(t):void 0,a=!!o&&o.count>0;W3(()=>{if(t&&e)return z8.dispatch("PUSH",t,n),()=>z8.dispatch("POP",t,n)},[e,t])}(r8(e,"scroll-lock"),t,e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}})}(!c&&!k&&E,g,j),function(e,t,n){let r=G3(e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()});(0,w.useEffect)(()=>{if(!e)return;let n=null===t?null:d8(t)?t:t.current;if(!n)return;let o=F3();if("undefined"!=typeof ResizeObserver){let e=new ResizeObserver(()=>r.current(n));e.observe(n),o.add(()=>e.disconnect())}if("undefined"!=typeof IntersectionObserver){let e=new IntersectionObserver(()=>r.current(n));e.observe(n),o.add(()=>e.disconnect())}return()=>o.dispose()},[t,r,e])}(E,m,x);let[A,T]=function(){let[e,t]=(0,w.useState)([]);return[e.length>0?e.join(" "):void 0,(0,w.useMemo)(()=>function(e){let n=H3(e=>(t(t=>[...t,e]),()=>t(t=>{let n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))),r=(0,w.useMemo)(()=>({register:n,slot:e.slot,name:e.name,props:e.props,value:e.value}),[n,e.slot,e.name,e.props,e.value]);return w.createElement(Z8.Provider,{value:r},e.children)},[t])]}(),O=(0,w.useMemo)(()=>[{dialogState:y,close:x,setTitleId:N,unmount:u},b],[y,x,N,u,b]),L=P8({open:0===y}),z={ref:h,id:r,role:s,tabIndex:-1,"aria-modal":c?void 0:0===y||void 0,"aria-labelledby":b.titleId,"aria-describedby":A,unmount:u},P=!function(){var e;let[t]=(0,w.useState)(()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null),[n,r]=(0,w.useState)(null!=(e=null==t?void 0:t.matches)&&e);return W3(()=>{if(t)return t.addEventListener("change",e),()=>t.removeEventListener("change",e);function e(e){r(e.matches)}},[t]),n}(),R=J8.None;E&&!c&&(R|=J8.RestoreFocus,R|=J8.TabLock,l&&(R|=J8.AutoFocus),P&&(R|=J8.InitialFocus));let U=f9();return w.createElement(s9,null,w.createElement(F8,{force:!0},w.createElement(c6,null,w.createElement(p6.Provider,{value:O},w.createElement(l6,{target:m},w.createElement(F8,{force:!1},w.createElement(T,{slot:L},w.createElement(_,null,w.createElement(e6,{initialFocus:i,initialFocusFallback:m,containers:j,features:R},w.createElement(U8,{value:x},U({ourProps:z,theirProps:d,slot:L,defaultTag:y6,features:w6,visible:0===y,name:"Dialog"})))))))))))}),y6="div",w6=u9.RenderStrategy|u9.Static,b6=g9(function(e,t){let{transition:n=!1,open:r,...o}=e,a=a9(),i=e.hasOwnProperty("open")||null!==a,s=e.hasOwnProperty("onClose");if(!i&&!s)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!i)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!s)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&"boolean"!=typeof e.open)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${e.open}`);if("function"!=typeof e.onClose)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${e.onClose}`);return void 0===r&&!n||o.static?w.createElement(A8,null,w.createElement(g6,{ref:t,open:r,...o})):w.createElement(A8,null,w.createElement(A9,{show:r,transition:n,unmount:o.unmount},w.createElement(g6,{ref:t,...o})))}),v6=g9(function(e,t){let n=(0,w.useId)(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...a}=e,[{dialogState:i,unmount:s},l]=m6("Dialog.Panel"),c=J3(t,l.panelRef),u=P8({open:0===i}),d=H3(e=>{e.stopPropagation()}),f={ref:c,id:r,onClick:d},p=o?C9:w.Fragment,m=o?{unmount:s}:{},h=f9();return w.createElement(p,{...m},h({ourProps:f,theirProps:a,slot:u,defaultTag:"div",name:"Dialog.Panel"}))}),x6=(g9(function(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:a}]=m6("Dialog.Backdrop"),i=P8({open:0===o}),s={ref:t,"aria-hidden":!0},l=n?C9:w.Fragment,c=n?{unmount:a}:{},u=f9();return w.createElement(l,{...c},u({ourProps:s,theirProps:r,slot:i,defaultTag:"div",name:"Dialog.Backdrop"}))}),g9(function(e,t){let n=(0,w.useId)(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:a,setTitleId:i}]=m6("Dialog.Title"),s=J3(t);(0,w.useEffect)(()=>(i(r),()=>i(null)),[r,i]);let l=P8({open:0===a}),c={ref:s,id:r};return f9()({ourProps:c,theirProps:o,slot:l,defaultTag:"h2",name:"Dialog.Title"})})),N6=Object.assign(b6,{Panel:v6,Title:x6,Description:W8});const E6=({sourceStep:e,availableSteps:t,acceptRedirect:n,setAcceptRedirect:r,rejectRedirect:o,setRejectRedirect:i})=>(0,a.createElement)("div",{className:"border border-gray-200 rounded-lg p-4 mb-4"},(0,a.createElement)("div",{className:"font-medium text-gray-800 mb-3"},e.title," (",e.type,")",e.isVariation&&(0,a.createElement)("span",{className:"ml-2 text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded"},(0,z.__)("A/B Variation","cartflows"))),(0,a.createElement)("div",{className:"mb-3"},(0,a.createElement)("label",{className:"block text-sm font-normal text-gray-600 mb-1"},(0,z.__)("Accept (Yes) - redirect to:","cartflows")),(0,a.createElement)("select",{className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-md focus:ring focus:ring-primary-100 focus:border-primary-500 focus:outline-none",value:n,onChange:e=>r(e.target.value)},t.map(e=>(0,a.createElement)("option",{key:`accept-${e.id}`,value:e.id},e.title)))),(0,a.createElement)("div",null,(0,a.createElement)("label",{className:"block text-sm font-normal text-gray-600 mb-1"},(0,z.__)("Reject (No) - redirect to:","cartflows")),(0,a.createElement)("select",{className:"w-full px-3 py-2 text-sm border border-gray-200 rounded-md focus:ring focus:ring-primary-100 focus:border-primary-500 focus:outline-none",value:o,onChange:e=>i(e.target.value)},t.map(e=>(0,a.createElement)("option",{key:`reject-${e.id}`,value:e.id},e.title))))),M6=({isOpen:e,onClose:t,onConfirm:n,stepToDelete:r,flowSteps:o})=>{const i=(0,a.useRef)(null),[s,l]=(0,a.useState)({}),c=(0,a.useMemo)(()=>{if(!o||!r)return[];const e=[],t=parseInt(r.step_id,10);return o.forEach(n=>{if("upsell"===n.type||"downsell"===n.type){const r=parseInt(n.offer_yes_step_id,10)===t,o=parseInt(n.offer_no_step_id,10)===t;(r||o)&&e.push({id:n.id,title:n.title,type:n.type,currentAccept:n.offer_yes_step_id,currentReject:n.offer_no_step_id,acceptPointsToDeleted:r,rejectPointsToDeleted:o,isVariation:!1,controlStepId:n.id});const a=n["ab-test-variations"];Array.isArray(a)&&a.length>0&&a.forEach(r=>{const o=parseInt(r.offer_yes_step_id,10)===t,a=parseInt(r.offer_no_step_id,10)===t;if(o||a){const t=r.title||`${n.title} - Variation`;e.push({id:r.id,title:t,type:n.type,currentAccept:r.offer_yes_step_id,currentReject:r.offer_no_step_id,acceptPointsToDeleted:o,rejectPointsToDeleted:a,isVariation:!0,controlStepId:n.id})}})}}),e},[o,r]),u=(e,t)=>{if(!o||!r)return[];const n=t||e,a=o.findIndex(e=>parseInt(e.id,10)===parseInt(n,10));if(-1===a)return[];const i=parseInt(r.step_id,10);return o.slice(a+1).filter(e=>parseInt(e.id,10)!==i&&"checkout"!==e.type)};(0,a.useEffect)(()=>{if(c.length>0){const e={};c.forEach(t=>{const n=u(t.id,t.controlStepId),r=n.length>0?n[0].id:"";e[t.id]={accept:t.acceptPointsToDeleted?r:t.currentAccept,reject:t.rejectPointsToDeleted?r:t.currentReject}}),l(e)}},[e,o,r]);const d=(e,t,n)=>{l(r=>({...r,[e]:{...r[e],[t]:n}}))};return e?(0,a.createPortal)((0,a.createElement)(A9.Root,{show:e,as:a.Fragment},(0,a.createElement)(N6,{as:"div",className:"relative z-[99999] wcf-confirm-popup",initialFocus:i,onClose:()=>{}},(0,a.createElement)(A9.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},(0,a.createElement)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})),(0,a.createElement)("div",{className:"fixed inset-0 z-10 overflow-y-auto"},(0,a.createElement)("div",{className:"flex min-h-full items-center justify-center p-4 text-center sm:p-0"},(0,a.createElement)(A9.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},(0,a.createElement)(N6.Panel,{className:"wcf-confirm-popup-wrapper relative transform overflow-hidden rounded-lg bg-white text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"},(0,a.createElement)("div",{className:"absolute top-0 right-0 hidden pt-4 pr-4 sm:block"},(0,a.createElement)("button",{type:"button",className:"rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none",onClick:t},(0,a.createElement)("span",{className:"sr-only"},"Close"),(0,a.createElement)(jV,{className:"h-6 w-6","aria-hidden":"true"}))),(0,a.createElement)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},(0,a.createElement)("div",{className:"sm:flex sm:items-start"},(0,a.createElement)("div",{className:"mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"},(0,a.createElement)(tQ,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})),(0,a.createElement)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},(0,a.createElement)(N6.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900 capitalize"},(0,z.__)("Delete Step","cartflows")),(0,a.createElement)("div",{className:"mt-2"},(0,a.createElement)("p",{className:"text-sm text-gray-500"},(0,z.__)("Are you sure you want to delete this step?","cartflows"))))),c.length>0&&(0,a.createElement)("div",{className:"mt-4"},(0,a.createElement)("p",{className:"text-sm font-medium text-gray-700 mb-3"},(0,z.__)("The following steps have edges pointing to this step. Please select where they should redirect after deletion:","cartflows")),c.map(e=>{const t=u(e.id,e.controlStepId),n=s[e.id]||{};return(0,a.createElement)(E6,{key:e.id,sourceStep:e,availableSteps:t,acceptRedirect:n.accept||"",setAcceptRedirect:t=>d(e.id,"accept",t),rejectRedirect:n.reject||"",setRejectRedirect:t=>d(e.id,"reject",t)})}))),(0,a.createElement)("div",{className:"flex bg-gray-50 px-4 py-3 flex-col-reverse sm:flex-row gap-3 sm:justify-end sm:px-6"},(0,a.createElement)("button",{type:"button",className:"wcf-button wcf-secondary-button",onClick:t,ref:i},(0,z.__)("Cancel","cartflows")),(0,a.createElement)("button",{type:"button",className:"wcf-button wcf-primary-button",onClick:()=>{n(s)}},(0,z.__)("Delete","cartflows"))))))))),document.body):null},_6=(0,a.memo)(({data:e,isConnectable:t})=>{const n="upsell"===e.step_type?R3:U3,r="vertical"===e?.axis,o="LR"===e.direction?"target":"source",i="LR"===e.direction?"source":"target",[,s]=(0,a.useState)(!1),[l,c]=(0,a.useState)(!1),[u,d]=(0,a.useState)("cartflows_delete_step"),f=BV(),m=(0,l$.W6)(),[{license_status:h}]=p(),[{steps:g,is_flow_instant_checkout:y}]=SU(),w=O3.createEventHandlers(e,f,m,s,{delete:e=>{e.preventDefault();const t=e.currentTarget.getAttribute("data-action")||"cartflows_delete_step";d(t),c(!0)}});return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:"target",position:h0.Top,id:"top",style:{background:"#555",visibility:r?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t}),"LR"===e.direction&&!r&&(0,a.createElement)(_4,{type:o,position:h0.Left,id:"left",style:{background:"#555"},className:"react-flow__handle wcf-handle-left",isConnectable:t}),"RL"===e.direction&&!r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:o,position:h0.Left,className:"react-flow__handle-right-a wcf-handle-right",id:"a",style:{top:50},isConnectable:t}),(0,a.createElement)(_4,{type:o,position:h0.Left,className:"react-flow__handle-right-b wcf-handle-right",id:"b",style:{bottom:50,top:"auto"},isConnectable:t})),O3.nodeHtml({step_title:e?.label,step_id:e?.step_id,step_type:e?.step_type,flow_id:e?.flow_id,flow_type:e?.flow_type},n,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,w,h,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,[],y,e.is_locked),(0,a.createElement)("div",{className:"wcf-custom-node-label"},e?.label),"LR"===e.direction&&!r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:i,position:h0.Right,className:"react-flow__handle-right-a wcf-handle-right",id:"a",style:{top:50},isConnectable:t}),(0,a.createElement)(_4,{type:i,position:h0.Right,className:"react-flow__handle-right-b wcf-handle-right",id:"b",style:{bottom:50,top:"auto"},isConnectable:t})),"RL"===e.direction&&!r&&(0,a.createElement)(_4,{type:i,position:h0.Right,style:{background:"#555"},className:"react-flow__handle wcf-handle-left",isConnectable:t}),r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:"source",position:h0.Bottom,id:"a",style:{left:80,background:"#16A34A"},className:"react-flow__handle wcf-handle-bottom-accept",isConnectable:t}),(0,a.createElement)(_4,{type:"source",position:h0.Bottom,id:"b",style:{left:"auto",right:80,background:"#DC2626"},className:"react-flow__handle wcf-handle-bottom-reject",isConnectable:t})),(0,a.createElement)(M6,{isOpen:l,onClose:()=>c(!1),onConfirm:async t=>{c(!1),await O3.performDelete(e,u,s,t)},stepToDelete:e,flowSteps:g}))}),I6="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFQUVBRUEiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOC4xNDdIMFYxMFoiIGZpbGw9IiNFNkVBRUQiLz48ZWxsaXBzZSBjeD0iMTQiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGRjNCMzAiLz48ZWxsaXBzZSBjeD0iMjciIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGQzAiLz48ZWxsaXBzZSBjeD0iNDAiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiM0Q0Q5NjQiLz48cmVjdCB4PSI2NCIgeT0iMTEiIHdpZHRoPSIxMDciIGhlaWdodD0iNyIgcng9IjEiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTI2LjU4MyA3OS4wMDhWODEuNWEyNy4wOCAyNy4wOCAwIDAgMS0xOS40MDQgMjUuOTU2IDI3LjA4MyAyNy4wODMgMCAxIDEgMy4zNDQtNTAuNzEiIHN0cm9rZT0iIzIyNzFCMSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMTI2LjU4MyA1OS44MzMgOTkuNSA4Ni45NDNsLTguMTI1LTguMTI0IiBzdHJva2U9IiMyMjcxQjEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHJlY3QgeD0iODMiIHk9IjE0MyIgd2lkdGg9IjM1IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iNzgiIHk9IjEyOSIgd2lkdGg9IjQ1IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjMjI3MUIxIi8+PHJlY3QgeD0iMjMiIHk9IjE1NyIgd2lkdGg9IjE1NCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0U2RUFFRCIvPjxyZWN0IHg9IjIzIiB5PSIxNzEiIHdpZHRoPSIxNTQiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSIyMyIgeT0iMTg1IiB3aWR0aD0iMTU0IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iMjMiIHk9IjE5OSIgd2lkdGg9IjkyLjQiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSI3MiIgeT0iMjIzIiB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIxIiBmaWxsPSIjRUFFQUVBIi8+PHJlY3QgeD0iOTQiIHk9IjIyMyIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiByeD0iMSIgZmlsbD0iI0VBRUFFQSIvPjxyZWN0IHg9IjExNiIgeT0iMjIzIiB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIxIiBmaWxsPSIjRUFFQUVBIi8+PC9zdmc+",S6=(0,a.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o=r?"target":"source",i=r?"source":"target",[,s]=(0,a.useState)(!1),l=BV(),c=(0,l$.W6)(),[{license_status:u}]=p(),[{is_flow_instant_checkout:d}]=SU(),f=O3.createEventHandlers(e,l,c,s);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:"target",position:h0.Top,id:"top",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t}),(0,a.createElement)(_4,{type:o,position:h0.Left,id:"left",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-left",isConnectable:t&&!n}),O3.nodeHtml({step_title:e?.label,step_id:e?.step_id,step_type:e?.step_type,flow_id:e?.flow_id,flow_type:e?.flow_type},I6,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,f,u,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,[],d,e.is_locked),(0,a.createElement)(_4,{type:i,position:h0.Right,id:"right",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-right",isConnectable:t&&!n}),(0,a.createElement)(_4,{type:"source",position:h0.Bottom,id:"bottom",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-bottom",isConnectable:t&&n}),(0,a.createElement)("div",{className:"wcf-custom-node-label"},e?.label))}),j6="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iMSIgd2lkdGg9IjE5OSIgaGVpZ2h0PSIyNTgiIHJ4PSI5LjUiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI0VBRUFFQSIvPjxwYXRoIGQ9Ik0wIDEwLjVDMCA0Ljk3NyA0LjQ3Ny41IDEwIC41aDE4MGM1LjUyMyAwIDEwIDQuNDc3IDEwIDEwdjE4SDB2LTE4WiIgZmlsbD0iI0U2RUFFRCIvPjxjaXJjbGUgY3g9IjE0IiBjeT0iMTQuNSIgcj0iNCIgZmlsbD0iI0ZGM0IzMCIvPjxjaXJjbGUgY3g9IjI3IiBjeT0iMTQuNSIgcj0iNCIgZmlsbD0iI0ZDMCIvPjxjaXJjbGUgY3g9IjQwIiBjeT0iMTQuNSIgcj0iNCIgZmlsbD0iIzRDRDk2NCIvPjxyZWN0IHg9IjY0IiB5PSIxMC41IiB3aWR0aD0iMTA3IiBoZWlnaHQ9IjciIHJ4PSIxIiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbD0iI0Y2RkFGRiIgZD0iTTExMyA0OWg2NHY5MmgtNjR6Ii8+PHJlY3QgeD0iMTI1IiB5PSI2NCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTEyMC41IDc5YS41LjUgMCAwIDEgLjUtLjVoNDhhLjUuNSAwIDAgMSAuNS41djRhLjUuNSAwIDAgMS0uNS41aC00OGEuNS41IDAgMCAxLS41LS41di00Wk0xMjAuNSA5MGEuNS41IDAgMCAxIC41LS41aDQ4YS41LjUgMCAwIDEgLjUuNXY0YS41LjUgMCAwIDEtLjUuNWgtNDhhLjUuNSAwIDAgMS0uNS0uNXYtNFoiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI0I3Q0ZFMiIvPjxyZWN0IHg9IjEyMC41IiB5PSIxMDMuNSIgd2lkdGg9IjQiIGhlaWdodD0iNCIgcng9Ii41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNDQ0RFRUQiLz48cmVjdCB4PSIxMzAiIHk9IjEwNCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjMiIHJ4PSIxIiBmaWxsPSIjQ0NERUVEIi8+PHJlY3QgeD0iMTIwIiB5PSIxMTgiIHdpZHRoPSI1MCIgaGVpZ2h0PSI3IiByeD0iMiIgZmlsbD0iIzIyNzFCMSIvPjxyZWN0IHg9IjIzIiB5PSI2MCIgd2lkdGg9IjgwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHBhdGggZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjRTZFQUVEIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTIzLjc1IDc0Ljc1aDc4LjV2NDMuNWgtNzguNXoiLz48cGF0aCBkPSJNNjMgODguMjVhOC43NSA4Ljc1IDAgMSAwIC4wMDEgMTcuNTAxQTguNzUgOC43NSAwIDAgMCA2MyA4OC4yNVptMCAxNi4wMTZhNy4yNjcgNy4yNjcgMCAwIDEgMC0xNC41MzIgNy4yNjcgNy4yNjcgMCAwIDEgMCAxNC41MzJaIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0ibTY3LjA1IDk2Ljc0OC01Ljc4Mi00LjJhLjMxLjMxIDAgMCAwLS40OTUuMjUzdjguMzk4YzAgLjI1Ni4yOS40MDEuNDk1LjI1Mmw1Ljc4My00LjE5OWEuMzEyLjMxMiAwIDAgMCAuMDk1LS4zOTMuMzEyLjMxMiAwIDAgMC0uMDk1LS4xMTFabS01LjAzIDIuNjE3di00LjczTDY1LjI3NSA5N2wtMy4yNTYgMi4zNjVaIiBmaWxsPSIjMjI3MUIxIi8+PHJlY3QgeD0iNTAiIHk9IjE1NiIgd2lkdGg9IjEwMCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0U2RUFFRCIvPjxjaXJjbGUgY3g9IjI1IiBjeT0iMTc1IiByPSIyIiBmaWxsPSIjMjI3MUIxIi8+PGNpcmNsZSBjeD0iMjUiIGN5PSIxODkiIHI9IjIiIGZpbGw9IiMyMjcxQjEiLz48Y2lyY2xlIGN4PSIyNSIgY3k9IjIwMyIgcj0iMiIgZmlsbD0iIzIyNzFCMSIvPjxyZWN0IHg9IjM1IiB5PSIxNzMiIHdpZHRoPSIxNDIiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSIzNSIgeT0iMTg3IiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iMzUiIHk9IjIwMSIgd2lkdGg9IjEyMCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0U2RUFFRCIvPjxyZWN0IHg9IjIzIiB5PSIyMTkiIHdpZHRoPSIxNTQiIGhlaWdodD0iMjAiIHJ4PSIyIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTk0LjQ0MiAyMjkuMjI3YzAtMi4xNDEtMS4zMy0zLjM2Mi0zLjA2NS0zLjM2Mi0xLjc0NSAwLTMuMDY1IDEuMjIxLTMuMDY1IDMuMzYyIDAgMi4xMzIgMS4zMiAzLjM2MiAzLjA2NSAzLjM2MiAxLjczNSAwIDMuMDY1LTEuMjIgMy4wNjUtMy4zNjJabS0xLjQwMyAwYzAgMS4zODctLjY1OSAyLjEzOC0xLjY2MiAyLjEzOC0xLjAwNyAwLTEuNjYyLS43NTEtMS42NjItMi4xMzhzLjY1NS0yLjEzOCAxLjY2Mi0yLjEzOGMxLjAwMyAwIDEuNjYyLjc1MSAxLjY2MiAyLjEzOFptMi40MDIgNS4xMTRoMS4zNjJ2LTIuNjI3aC4wNDFjLjE4OS40MDkuNjAxLjg2NiAxLjM5NC44NjYgMS4xMTggMCAxLjk5MS0uODg1IDEuOTkxLTIuNTI4IDAtMS42ODgtLjkxMS0yLjUyNS0xLjk4OC0yLjUyNS0uODIxIDAtMS4yMTUuNDg5LTEuMzk3Ljg4OGgtLjA2di0uODI0SDk1LjQ0djYuNzVabTEuMzMzLTQuMjk2YzAtLjg3NS4zNy0xLjQzNSAxLjAzMi0xLjQzNS42NzUgMCAxLjAzMy41ODUgMS4wMzMgMS40MzUgMCAuODU3LS4zNjUgMS40NTEtMS4wMzMgMS40NTEtLjY1NSAwLTEuMDMyLS41NzUtMS4wMzItMS40NTFabTYuOTc0LTIuNDU0aC0uOTI0di0xLjE3NmgtMS4zNjF2MS4xNzZoLS42NzJ2MS4wMjNoLjY3MnYyLjU1NmMtLjAwNy45NjIuNjQ4IDEuNDM5IDEuNjM2IDEuMzk3LjM1Mi0uMDEzLjYwMS0uMDgzLjczOC0uMTI4bC0uMjE0LTEuMDEzYy0uMDY3LjAxMy0uMjExLjA0NS0uMzM5LjA0NS0uMjcxIDAtLjQ2LS4xMDItLjQ2LS40OHYtMi4zNzdoLjkyNHYtMS4wMjNabS44ODcgNC45MDloMS4zNjF2LTQuOTA5aC0xLjM2MXY0LjkwOVptLjY4NC01LjU0MmMuNDA1IDAgLjczOC0uMzEuNzM4LS42OSAwLS4zNzctLjMzMy0uNjg3LS43MzgtLjY4Ny0uNDAzIDAtLjczNi4zMS0uNzM2LjY4NyAwIC4zOC4zMzMuNjkuNzM2LjY5Wm0zLjEyOSAyLjcwNGMuMDAzLS42MzMuMzgxLTEuMDA0LjkzLTEuMDA0LjU0NyAwIC44NzYuMzU4Ljg3My45NTl2Mi44ODNoMS4zNjF2LTMuMTI2YzAtMS4xNDQtLjY3MS0xLjg0Ny0xLjY5NC0xLjg0Ny0uNzI4IDAtMS4yNTYuMzU4LTEuNDc2LjkzaC0uMDU4di0uODY2aC0xLjI5N3Y0LjkwOWgxLjM2MXYtMi44MzhaIiBmaWxsPSIjZmZmIi8+PC9zdmc+",k6=(0,a.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o=r?"target":"source",i=r?"source":"target",[,s]=(0,a.useState)(!1),l=BV(),c=(0,l$.W6)(),[{license_status:u}]=p(),d=O3.createEventHandlers(e,l,c,s);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:"target",position:h0.Top,id:"top",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t}),(0,a.createElement)(_4,{type:o,position:h0.Left,id:"left",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-left",isConnectable:t&&!n}),O3.nodeHtml({step_title:e?.label,step_id:e?.step_id,step_type:e?.step_type,flow_id:e?.flow_id,flow_type:e?.flow_type},j6,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,d,u,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,void 0,void 0,e.is_locked),(0,a.createElement)("div",{className:"wcf-custom-node-label"},e?.label),(0,a.createElement)(_4,{type:i,position:h0.Right,id:"right",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-right",isConnectable:t&&!n}),(0,a.createElement)(_4,{type:"source",position:h0.Bottom,id:"bottom",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-bottom",isConnectable:t&&n}))}),D6={createEventHandlers(e,t,n,r){const o=(0,P.applyFilters)("cartflows.canvas.abNodeActions",null);if(o)return o({data:e,confirm:t,setLoader:r,toast:Vm});const a=e=>e.preventDefault();return{clone:a,delete:a,winner:a,archived:a}},nodeHtml(e,t,n,r,o,i,s,l,c,u,d,f,p,m,h,g,y,w=!1,b=""){const v=lg(e?.step_type,b),x=e?.step_type||"",N=sg(e?.step_title||"");return(0,a.createElement)("div",{className:"wcf-custom-node-wrapper wcf-ab-test-variation"+(w?" wcf-custom-node-wrapper--compact":"")},(0,a.createElement)("div",{className:"wcf-custom-node-design"},(0,a.createElement)("div",{className:"wcf-node-actions absolute flex bg-white left-11 -top-16 rounded-md py-0.5 px-1.5 sm:hidden lg:hidden"},(0,a.createElement)(ea,{content:(0,z.__)("View Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:n,target:"_blank",rel:"noreferrer","aria-label":(0,z.__)("View Page","cartflows"),className:"wcf-canvas--view-step text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer p-2 block"},(0,a.createElement)(S3,{className:"w-5 h-5"}))),(0,a.createElement)(ea,{content:v?cg():(0,z.__)("Edit Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:v?"#!":r,target:v?void 0:"_blank",rel:"noreferrer","aria-label":(0,z.__)("Edit Page","cartflows"),"aria-disabled":v,tabIndex:v?-1:0,className:"wcf-canvas--edit-step p-2 block "+(v?"disabled text-text-disabled cursor-not-allowed":"text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer")},(0,a.createElement)(j3,{className:"w-5 h-5"}))),(0,a.createElement)(ea,{content:(0,z.__)("Edit Settings","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)(C,{to:{pathname:"admin.php",search:"storeCheckout"===e?.flow_type?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.step_id}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.step_id}`},rel:"noreferrer","aria-label":(0,z.__)("Edit Settings","cartflows"),className:"wcf-canvas--edit-settings relative text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer p-2 block"},(0,a.createElement)(k3,{className:"w-5 h-5"})))),(0,a.createElement)("div",{className:"wcf-custom-node-content bg-white border border-gray-200 rounded-lg shadow-md"+(p?" opacity-50":"")},(0,a.createElement)("div",{className:"wcf-custom-node-content--header flex flex-col gap-3 border-b border-gray-200 py-4 px-5"},(0,a.createElement)("div",{className:"wcf-node-step--info-wrapper flex flex-row items-center gap-4 w-full"},(0,a.createElement)("div",{className:"wcf-node-step--icon bg-primary-25 p-2.5 rounded border border-primary-300"},(e=>{let t="";const n="w-5 h-5 stroke-2 text-primary-500";switch(e){case"landing":t=(0,a.createElement)(zV,{className:n});break;case"optin":t=(0,a.createElement)(y3,{className:n});break;case"checkout":t=(0,a.createElement)(nG,{className:n});break;case"upsell":t=(0,a.createElement)(pm,{className:n});break;case"downsell":t=(0,a.createElement)(b3,{className:n});break;case"thankyou":t=(0,a.createElement)(x3,{className:n});break;default:t=(0,a.createElement)(sV,{className:n})}return t})(x)),(0,a.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,a.createElement)("div",{className:"wcf-node-step--type flex items-center gap-2"},(0,a.createElement)("span",{className:"text-xs font-normal text-gray-400 capitalize"},x),function(){let t="";return t=e.control_id===e.step_id?(0,a.createElement)("span",{className:"wcf-step-badge bg-primary-500 text-white text-xs px-2.5 py-1 rounded-full"},(0,z.__)("Control","cartflows")):(0,a.createElement)("span",{className:"wcf-step-badge bg-gray-800 text-white text-xs px-2.5 py-1 rounded-full"},(0,z.sprintf)(/* translators: %d is replaced with the count */ /* translators: %d is replaced with the count */ |
| 64 |
(0,z.__)("Variation-%d","cartflows"),u)),t}(),f&&(0,a.createElement)("span",{className:"wcf-flow-badge wcf-badge wcf-badge--error !text-[10px] !px-2 !py-px wcf-invalid-sequence-badge"},(0,a.createElement)(nW,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"}),(0,z.__)("Invalid Position","cartflows"))),(0,a.createElement)("div",{className:"wcf-node-step--title text-left"},(0,a.createElement)("span",{className:"font-semibold text-sm text-gray-800 hover:text-gray-800"},N)))),function(){let e=null;return d||(e=(0,a.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-no-product-badge"},(0,z.__)("No Product Assigned","cartflows"))),e}(),p&&(0,a.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-disabled-step-badge"},(0,z.__)("Disabled","cartflows"))),(0,a.createElement)("div",{className:"wcf-custom-node-content--stats flex text-center justify-around items-center py-4 px-5"},(0,a.createElement)("div",{className:"wcf-step--stats-content--stat-view"},(0,a.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,z.__)("Views","cartflows")),(0,a.createElement)("div",{className:"font-semibold text-base text-gray-800"},(()=>{let e=0;return l&&l.total_visits&&(e=l.total_visits||0),e})())),(0,a.createElement)("div",{className:"wcf-step--stats-content--stat-conversation"},(0,a.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,z.__)("Conversions","cartflows")),(0,a.createElement)("div",{className:"font-semibold text-base text-gray-800"},"thankyou"!==x?(()=>{let e=0;return l&&l?.conversions&&(e=l.conversions||0),e})():"-")),(0,a.createElement)("div",{className:"wcf-step--stats-content--stat-revenue"},(0,a.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,z.__)("Revenue","cartflows")),(0,a.createElement)("div",{className:"font-semibold text-base text-gray-800"},"thankyou"!==x&&"landing"!==x?l&&l?.visits?.revenue?Vh(l.visits.revenue):0:"-"))),(0,a.createElement)("div",{className:"wcf-custom-node-content--footer flex text-center justify-around items-center border-t border-gray-200 py-4 px-5"},(0,a.createElement)(ea,{content:(0,z.__)("View Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:n,target:"_blank",rel:"noreferrer","aria-label":(0,z.__)("View Page","cartflows"),className:"wcf-canvas--view-step text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer p-2 block"},(0,a.createElement)(S3,{className:"w-5 h-5"}))),(0,a.createElement)(ea,{content:v?cg():(0,z.__)("Edit Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:v?"#!":r,target:v?void 0:"_blank",rel:"noreferrer","aria-label":(0,z.__)("Edit Page","cartflows"),"aria-disabled":v,tabIndex:v?-1:0,className:"wcf-canvas--edit-step p-2 block "+(v?"disabled text-text-disabled cursor-not-allowed":"text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer")},(0,a.createElement)(j3,{className:"w-5 h-5"}))),(0,a.createElement)(ea,{content:(0,z.__)("Edit Settings","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)(C,{to:{pathname:"admin.php",search:"storeCheckout"===e?.flow_type?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.step_id}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e?.flow_id}&step_id=${e?.step_id}`},rel:"noreferrer","aria-label":(0,z.__)("Edit Settings","cartflows"),className:"wcf-canvas--edit-settings relative text-text-tertiary hover:bg-badge-hover-gray hover:text-text-primary cursor-pointer p-2 block"},(0,a.createElement)(k3,{className:"w-5 h-5"}))),(o?Object.keys(o):[]).map(t=>{const n=o[t],r=n?.class;let l=!1,c=!1;!wcfCartflowsPro()&&n?.pro&&(l=!0),wcfCartflowsPro()&&n?.pro&&"Activated"!==s&&(c=!0);let u="";u=l||c?"wcf-pro text-text-disabled cursor-not-allowed":"text-text-tertiary";let d=n?.text;return l?d=(0,z.sprintf)( |
| 65 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 66 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 67 |
(0,z.__)("Upgrade to CartFlows Pro to use %s.","cartflows"),n?.text):c&&(d=(0,z.sprintf)( |
| 68 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 69 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 70 |
(0,z.__)("Activate your CartFlows license to use %s.","cartflows"),n?.text)),(0,a.createElement)(ea,{key:n?.slug,content:d,placement:"top",boundary:"viewport",arrow:!0},(0,a.createElement)("a",{href:n?.link,className:`wcf-step__action-btn relative ${r} ${u} p-2 text-sm flex gap-1.5 ${"delete"===n?.slug?"hover:bg-field-background-error hover:text-button-danger":"hover:bg-badge-hover-gray hover:text-text-primary"}`,"aria-label":n?.text,"data-id":e?.step_id,"data-control-id":e?.control_id,onClick:e=>{l||c?e.preventDefault():"#"===n?.link&&i&&i[n?.slug]&&(e.preventDefault(),i[n?.slug](e))},"data-action":n?.ajaxcall},(0,a.createElement)("div",{className:"flex items-center gap-1.5"},function(e){let t="";switch(e){case"clone":t=(0,a.createElement)(_G,{className:"h-5 w-5"});break;case"delete":t=(0,a.createElement)(Vo,{className:"h-5 w-5"});break;case"archived":t=(0,a.createElement)(E3,{className:"h-5 w-5"});break;case"winner":t=(0,a.createElement)(M3,{className:"h-5 w-5"});break;default:t=(0,a.createElement)(I3,{className:"h-5 w-5"})}return t}(n?.slug),(l||c)&&(0,a.createElement)(s$,{className:"absolute -top-1 -right-1 w-4 h-4 text-brand-600 fill-brand-600","aria-label":(0,z.__)("Pro feature","cartflows")}))))})))))}},C6=D6,A6=(0,a.memo)(({data:e,isConnectable:t})=>{let n=h3;switch(e.step_type){case"landing":default:n=h3;break;case"checkout":n=z3;break;case"upsell":n=R3;break;case"downsell":n=U3;break;case"optin":n=j6;break;case"thankyou":n=I6}const r="upsell"===e.step_type||"downsell"===e.step_type,o="vertical"===e?.axis,i="LR"===e.direction?"target":"source",s="LR"===e.direction?"source":"target",[,l]=(0,a.useState)(!1),c=BV(),u=(0,l$.W6)(),[{license_status:d}]=p(),[{is_flow_instant_checkout:f}]=SU(),m=C6.createEventHandlers(e,c,u,l);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:"target",position:h0.Top,id:"top",style:{visibility:o?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t}),r&&"RL"===e.direction?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:i,position:h0.Left,className:"react-flow__handle-left-a wcf-handle-left",id:"a",style:{top:50},isConnectable:t}),(0,a.createElement)(_4,{type:i,position:h0.Left,className:"react-flow__handle-left-b wcf-handle-left",id:"b",style:{bottom:50,top:"auto"},isConnectable:t})):(0,a.createElement)(_4,{type:i,position:h0.Left,id:"left",style:{background:"#555"},className:"react-flow__handle wcf-handle-left",isConnectable:t}),C6.nodeHtml({step_title:e?.label,step_id:e?.step_id,step_type:e?.step_type,flow_id:e?.flow_id,flow_type:e?.flow_type,control_id:e?.control_id},n,e.viewPageLink,e.editPage,e.menu_actions,m,d,e.analytics,e.traffic,e.var_badge_count,e.is_product_assigned,e.isInvalidPosition,e?.step_disabled,e?.offer_no_next_step,e?.offer_no_step_id,e?.offer_yes_next_step,e?.offer_yes_step_id,e?.compact,f),(0,a.createElement)("div",{className:"wcf-custom-node-label"},e.label),r&&"LR"===e.direction?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(_4,{type:s,position:h0.Right,className:"react-flow__handle-right-a wcf-handle-right",id:"a",style:{top:50},isConnectable:t}),(0,a.createElement)(_4,{type:s,position:h0.Right,className:"react-flow__handle-right-b wcf-handle-right",id:"b",style:{bottom:50,top:"auto"},isConnectable:t})):(0,a.createElement)(_4,{type:s,position:h0.Right,className:"react-flow__handle wcf-handle-right",id:"right",isConnectable:t}))}),T6=Fo("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),O6=(0,w.forwardRef)(({variant:e="primary",size:t="md",border:n="subtle",src:r,alt:o,children:a,className:i,...s},l)=>{const[c,u]=(0,w.useState)(!1),d={white:"text-text-primary bg-background-primary",gray:"text-text-primary bg-background-secondary",primary:"text-text-on-color bg-background-brand","primary-light":"text-text-primary bg-brand-background-50",dark:"text-text-on-color bg-button-secondary"}[e],f={xxs:"size-5 [&>svg]:size-3 text-xs",xs:"size-6 [&>svg]:size-4 text-sm",sm:"size-8 [&>svg]:size-5 text-base",md:"size-10 [&>svg]:size-6 text-lg",lg:"size-12 [&>svg]:size-12 text-lg"}[t],p={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"}[r&&"none"===n?"subtle":n],m=r?"object-cover object-center":"",h=!r||c,g=h?"div":"img";return(0,w.useEffect)(()=>{u(!1)},[r]),(0,R.jsx)(g,{ref:l,className:Le("rounded-full overflow-hidden flex items-center justify-center",h&&d,f,p,m,i),...h?{children:(()=>{if(r&&c){if(o&&"string"==typeof o)return o?.[0]?.toUpperCase();if(a&&"string"==typeof a)return a?.[0]?.toUpperCase();if(!a&&!o)return(0,R.jsx)(T6,{})}return a?"string"==typeof a?a?.[0]?.toUpperCase():a:null})()}:{src:r,alt:o,onError:()=>{u(!0)}},...s})}),L6=Fo("ShoppingCart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]),z6=Fo("CircleArrowDown",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"m8 12 4 4 4-4",key:"k98ssh"}]]),P6=Fo("ThumbsUp",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]),R6=Fo("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),U6=Fo("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),B6=Fo("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),F6=({open:e,setOpen:t,variations:n,type:r,flowId:o,controlId:i})=>{const s=BV(),l=n.filter(e=>"1"!==e.hide),c=l.filter(e=>e.deleted).length;return(0,a.createElement)(Im,{open:e,setOpen:t,design:"footer-divided",exitOnClickOutside:!1,exitOnEsc:!1,className:"!z-[999998]"},(0,a.createElement)(Im.Portal,null,(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Panel,{className:"w-[640px] max-w-[92vw]"},(0,a.createElement)(Im.Header,{className:"flex items-start justify-between"},(0,a.createElement)("div",{className:"space-y-1"},(0,a.createElement)(Im.Title,null,(0,z.__)("Archived Variations","cartflows")),(0,a.createElement)(Im.Description,null,(0,z.__)("Restore a variation back into the test, or delete it permanently.","cartflows"))),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)(Eh,{containerType:"flex",direction:"column",gap:"xs"},l.map(e=>(0,a.createElement)(Eh,{key:e.id,containerType:"flex",direction:"row",align:"center",justify:"between",gap:"md",className:"py-3 border-0 border-t border-solid border-border-subtle first:border-t-0"},(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",gap:"sm"},(0,a.createElement)(O6,{variant:"primary-light",size:"sm",className:"!rounded-md !text-brand-500 ring-1 ring-brand-200 !p-1"},(e=>({landing:(0,a.createElement)(MG,{className:"w-5 h-5"}),checkout:(0,a.createElement)(L6,{className:"w-5 h-5"}),upsell:(0,a.createElement)(I3,{className:"w-5 h-5"}),downsell:(0,a.createElement)(z6,{className:"w-5 h-5"}),thankyou:(0,a.createElement)(P6,{className:"w-5 h-5"}),optin:(0,a.createElement)(R6,{className:"w-5 h-5"})}[e]||(0,a.createElement)(MG,{className:"w-5 h-5"})))(r)),(0,a.createElement)(Eh,{containerType:"flex",direction:"column",className:"!gap-1"},(0,a.createElement)(Eh,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,a.createElement)(Ch,{size:12,weight:400,color:"tertiary",className:"capitalize"},"thankyou"===r?(0,z.__)("Thank You","cartflows"):r),(0,a.createElement)(na,{size:"xs",type:"pill",variant:e.deleted?"red":"inverse",className:"!font-normal text-[0.5rem]",label:(e.deleted?(0,z.__)("Deleted On: ","cartflows"):(0,z.__)("Archived On: ","cartflows"))+e.date})),(0,a.createElement)(Ch,{size:14,weight:400,color:"primary"},e.title))),(0,a.createElement)(Eh,{containerType:"flex",direction:"row",gap:"xs"},Object.values(e.actions||{}).map(t=>{const n="delete"===t.slug||"deleteArch"===t.slug?"text-text-secondary hover:bg-field-background-error hover:text-button-danger":"text-text-secondary hover:bg-badge-hover-gray hover:text-text-primary";return(0,a.createElement)(Wo,{key:t.slug,variant:"ghost",size:"xs",icon:(r=t.slug,{restore:(0,a.createElement)(U6,{className:"w-4 h-4"}),delete:(0,a.createElement)(Vo,{className:"w-4 h-4"}),hide:(0,a.createElement)(B6,{className:"w-4 h-4"}),deleteArch:(0,a.createElement)(Vo,{className:"w-4 h-4"})}[r]),iconPosition:"left",onClick:()=>((e,t)=>{const n=(0,P.applyFilters)("cartflows.canvas.archivedVariationActions",{})[e];n&&n({confirm:s,toast:Vm,stepId:t.id,flowId:o,controlId:i})})(t.slug,e),className:`${n} !rounded-md`},t.text);var r})))))),(0,a.createElement)(Im.Footer,{className:"justify-between items-center border-0 border-t border-solid border-border-subtle"},(0,a.createElement)(Ch,{size:12,color:"tertiary"},l.length," ",(0,z.__)("archived","cartflows"),c>0&&` · ${c} ${(0,z.__)("deleted","cartflows")}`),(0,a.createElement)(Wo,{variant:"outline",size:"sm",onClick:()=>t(!1)},(0,z.__)("Close","cartflows"))))))},Y6=({variations:e=[],type:t,flowId:n,controlId:r})=>{const o=e.filter(e=>"1"!==e.hide).length,[i,s]=(0,a.useState)(!1);return 0===o?null:(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"ghost",size:"xs",icon:(0,a.createElement)(E3,{className:"w-3.5 h-3.5"}),iconPosition:"left",onClick:()=>s(!0),className:"bg-background-primary border border-solid border-border-subtle shadow-sm rounded-full"},(0,a.createElement)("span",{className:"inline-flex items-center gap-1"},(0,z.__)("Archived","cartflows"),(0,a.createElement)(na,{size:"xxs",type:"rounded",variant:"inverse",label:String(o),className:"inline-flex"}))),(0,a.createElement)(F6,{open:i,setOpen:s,variations:e,type:t,flowId:n,controlId:r}))},Z6=(0,a.memo)(({data:e,isConnectable:t})=>{const{step:n,flow_id:r,isDynamicOfferGroup:o,isOfferABTestGroup:i}=e,s=(0,P.applyFilters)("cartflows.flowEditor.abTestHead",null);if(o)return(0,a.createElement)("div",{className:"dynamic-offer-group-container",style:{width:"100%",height:"100%",position:"relative"}});if(i){if(!n)return null;const e=n["ab-test-variations"]||[],t=n["ab-test-start"]||!1;return(0,a.createElement)("div",{className:"offer-ab-test-group-container"},s&&(0,a.createElement)("div",{className:"ab-test-group-header absolute w-3/4 mx-auto top-[-30px] left-0 right-0 z-10"},(0,a.createElement)(s,{flow_id:r,control_id:n.id,step_id:n.id,abvariations:e,ab_test_start:t,compact:!0})))}if(!n)return null;const l=n["ab-test-variations"]||[],c=n["ab-test-start"]||!1;return(0,a.createElement)("div",{className:"ab-test-group-container"},(0,a.createElement)(_4,{type:"target",position:h0.Top,id:"top",style:{background:"#555",width:"10px",height:"10px",top:"-5px",left:"50%"},isConnectable:t}),(0,a.createElement)(_4,{type:"target",position:h0.Left,id:"left",style:{background:"#555",width:"10px",height:"10px",left:"-5px",top:"50%"},isConnectable:t}),s&&(0,a.createElement)("div",{className:"ab-test-group-header absolute w-3/4 mx-auto top-[-30px] left-0 right-0 z-10"},(0,a.createElement)(s,{flow_id:r,control_id:n.id,step_id:n.id,abvariations:l,ab_test_start:c,compact:!0})),(0,a.createElement)("div",{className:"absolute -bottom-[14px] right-3 z-10"},(0,a.createElement)(Y6,{variations:n["ab-test-archived-variations"]||[],type:n.type,flowId:r,controlId:n.id})),(0,a.createElement)(_4,{type:"source",position:h0.Right,id:"right",style:{background:"#555",width:"10px",height:"10px",right:"-5px",top:"50%"},isConnectable:t}),(0,a.createElement)(_4,{type:"source",position:h0.Bottom,id:"bottom",style:{background:"#555",width:"10px",height:"10px",bottom:"-5px",left:"50%"},isConnectable:t}))});Z6.displayName="ABTestGroupNode";const Q6=Z6;var V6=o(6246),W6=o.n(V6);const G6=class{static validateConnection(e,t,n,r){const o=[];if(this.isOfferStep(e.type)&&("landing"!==t.type&&"checkout"!==t.type||o.push({code:"INVALID_OFFER_TARGET",message:`${this.getStepTypeLabel(e.type)} cannot connect to ${this.getStepTypeLabel(t.type)}`,severity:"error"})),e.id===t.id&&o.push({code:"SELF_REFERENCE",message:"Step cannot connect to itself",severity:"error"}),this.isOfferStep(e.type)&&r.steps){const t=r.steps.some(e=>"checkout"===e.type);if(t&&r.stepOrder){const n=this.extractStepId(e.id),a=r.stepOrder.indexOf(n),i=r.stepOrder.findIndex(e=>"checkout"===r.steps.find(t=>t.id===e)?.type);t&&-1!==a&&-1!==i&&a<i&&o.push({code:"OFFER_BEFORE_CHECKOUT",message:"Offer step should come after Checkout",severity:"warning"})}}if("landing"===e.type&&r.stepOrder){const t=this.extractStepId(e.id);0!==r.stepOrder.indexOf(t)&&o.push({code:"LANDING_NOT_FIRST",message:"Landing page should be the first step",severity:"warning"})}const a={isValid:0===o.filter(e=>"error"===e.severity).length,errors:o,warnings:o.filter(e=>"warning"===e.severity)};return console.log("[ValidationHelper] Validation complete:",{isValid:a.isValid,errorCount:o.length,hardErrors:o.filter(e=>"error"===e.severity).length,warnings:o.filter(e=>"warning"===e.severity).length}),a}static validateStepOrder(e,t,n){const r=[];if("storeCheckout"===n){const n=t.find(e=>"checkout"===e.type);n&&0!==e.indexOf(n.id)&&r.push({code:"STORE_CHECKOUT_POSITION",stepId:n.id,message:"Store checkout must be the first step",severity:"error"})}const o=e.findIndex(e=>"checkout"===t.find(t=>t.id===e)?.type);-1!==o&&e.forEach((e,n)=>{const a=t.find(t=>t.id===e);this.isOfferStep(a?.type)&&n<o&&r.push({code:"OFFER_BEFORE_CHECKOUT",stepId:e,message:"Offer step should come after Checkout",severity:"warning"})});const a=e.findIndex(e=>"landing"===t.find(t=>t.id===e)?.type);if(-1!==a&&0!==a){const e=t.find(e=>"landing"===e.type);r.push({code:"LANDING_NOT_FIRST",stepId:e?.id,message:"Landing page should be the first step",severity:"warning"})}const i=e.findIndex(e=>"thankyou"===t.find(t=>t.id===e)?.type);if(-1!==i&&i!==e.length-1){const n=e.slice(i+1).some(e=>{const n=t.find(t=>t.id===e);return n&&!this.isOfferStep(n.type)});if(n){const e=t.find(e=>"thankyou"===e.type);r.push({code:"THANKYOU_NOT_LAST",stepId:e?.id,message:"Thank You page should typically be the last step (or followed only by offers)",severity:"warning"})}}return{isValid:0===r.filter(e=>"error"===e.severity).length,errors:r,warnings:r.filter(e=>"warning"===e.severity)}}static isOfferStep(e){return"upsell"===e||"downsell"===e}static getStepTypeLabel(e){return{landing:"Landing Page",checkout:"Checkout",upsell:"Upsell",downsell:"Downsell",thankyou:"Thank You",optin:"Opt-in"}[e]||e}static extractStepId(e){if(!e)return null;if("wcf_start_node"===e||"wcf_end_node"===e)return null;const t=e.match(/wcf_node_edge_(\d+)/);return t?parseInt(t[1],10):e}static validateStepPosition(e,t,n,r,o){const a=this.validateStepOrder(n,r,o).errors.filter(t=>t.stepId===e.id);return a.length>0?{isValid:0===a.filter(e=>"error"===e.severity).length,errors:a,warnings:a.filter(e=>"warning"===e.severity)}:{isValid:!0,errors:[],warnings:[]}}},H6=class{static hasValidRuleValue(e){return!(!e||!e.value||Array.isArray(e.value)&&(0===e.value.length||e.value.every(e=>""===e||"string"==typeof e&&""===e.trim()))||"string"==typeof e.value&&""===e.value.trim())}static hasValidRules(e){return!!(e&&e.rules&&Array.isArray(e.rules))&&e.rules.some(e=>this.hasValidRuleValue(e))}static hasDynamicOffers(e){return!(!e||"checkout"!==e.type&&"store-checkout"!==e.type)&&(!(!e.conditions||!Array.isArray(e.conditions)||0===e.conditions.length)&&this.getValidTargetSteps(e.conditions,e.default_step).length>0)}static getValidTargetSteps(e,t){const n=[];if(e&&Array.isArray(e)&&e.forEach(e=>{if(e.step_id&&this.hasValidRules(e)){const t=parseInt(e.step_id,10);isNaN(t)||n.push(t)}}),t){const e=parseInt(t,10);isNaN(e)||n.push(e)}return n}static getUniqueTargetSteps(e,t){const n=new Set;if(e&&Array.isArray(e)&&e.forEach(e=>{if(e.step_id){const t=parseInt(e.step_id,10);isNaN(t)||n.add(t)}}),t){const e=parseInt(t,10);isNaN(e)||n.add(e)}return Array.from(n)}static removeConditionsForStep(e,t){return e&&Array.isArray(e)?e.filter(e=>parseInt(e.step_id,10)!==t):[]}static updateDefaultStep(e,t,n){return parseInt(e,10)!==parseInt(t,10)?e:n.length>0&&void 0!==n[0].step_id&&null!==n[0].step_id?n[0].step_id:""}static buildRulesFormData(e,t,n,r){const o=new window.FormData;return o.append("action","cartflows_save_meta_settings"),o.append("security",cartflows_admin.save_meta_settings_nonce),o.append("post_id",t),o.append("step_id",e),o.append("wcf-checkout-rules-option","yes"),n.forEach((e,t)=>{o.append(`wcf-checkout-rules[${t}][group_id]`,e.group_id),o.append(`wcf-checkout-rules[${t}][step_id]`,e.step_id),e?.rules&&Array.isArray(e?.rules)&&e.rules.forEach((e,n)=>{var r,a,i,s;o.append(`wcf-checkout-rules[${t}][rules][${n}][rule_id]`,null!==(r=e?.rule_id)&&void 0!==r?r:""),o.append(`wcf-checkout-rules[${t}][rules][${n}][condition]`,null!==(a=e?.condition)&&void 0!==a?a:""),o.append(`wcf-checkout-rules[${t}][rules][${n}][operator]`,null!==(i=e?.operator)&&void 0!==i?i:""),Array.isArray(e.value)?e.value.forEach(e=>{o.append(`wcf-checkout-rules[${t}][rules][${n}][value][]`,null!=e?e:"")}):o.append(`wcf-checkout-rules[${t}][rules][${n}][value]`,null!==(s=e.value)&&void 0!==s?s:"")})}),o.append("wcf-checkout-rules-default-step",r||""),o}static isConditionalEdge(e){return e&&e.source&&e.source.startsWith("conditional-")}static extractCheckoutId(e){if(!e||!e.startsWith("conditional-"))return null;const t=parseInt(e.replace("conditional-",""),10);return isNaN(t)?null:t}static extractStepId(e,t=null){if(!e)return null;if(e.includes("ab-group-")){const t=e.match(/(?:offer-)?ab-group-(\d+)/);if(t){const e=parseInt(t[1],10);return isNaN(e)?null:e}return null}if(e.includes("wcf_node_edge_")){const n=parseInt(e.replace("wcf_node_edge_",""),10);if(isNaN(n))return null;if(t&&Array.isArray(t))for(const e of t)if(e["ab-test-variations"]&&Array.isArray(e["ab-test-variations"])&&e["ab-test-variations"].some(e=>e.id===n))return e.id;return n}return null}},$6=["upsell","downsell"],X6=(e,t=[])=>{const n=[];if(!e||!e.type)return n;if($6.includes(e.type)){const r=new Set(t.map(e=>parseInt(e.id,10))),o=parseInt(e.offer_yes_step_id,10)||0,a=parseInt(e.offer_no_step_id,10)||0;o&&!r.has(o)&&n.push({kind:"broken-redirect",severity:"error",message:(0,z.__)("Accept target step is missing","cartflows")}),a&&!r.has(a)&&n.push({kind:"broken-redirect",severity:"error",message:(0,z.__)("Reject target step is missing","cartflows")})}return n},q6=550,J6=350,K6=-200,e7=300,t7=-50,n7=class{constructor(e,t,n="horizontal"){this.steps=e,this.flowType=t,this.axis=n,this.offerSteps=["upsell","downsell"],this.positions=new Map,this.incomingAcceptEdges=new Map,this.incomingRejectEdges=new Map,this.conditionalTargets=new Map,this.dynamicOfferTargetSteps=new Set,this.stepIndexMap=new Map,this.steps.forEach((e,t)=>{this.stepIndexMap.set(e.id,t)})}calculate(){return this.identifyDynamicOfferTargets(),this.buildIncomingEdgesMap(),this.calculatePositions(),this.positions}identifyDynamicOfferTargets(){this.steps.forEach(e=>{if(H6.hasDynamicOffers(e)){const t=H6.getUniqueTargetSteps(e.conditions,e.default_step),n=this.calculateConditionalFan(t);t.forEach((t,r)=>{this.dynamicOfferTargetSteps.add(t),this.conditionalTargets.set(t,{yOffset:n[r],sourceCheckoutId:e.id})})}})}buildIncomingEdgesMap(){this.steps.forEach(e=>{this.incomingAcceptEdges.set(e.id,[]),this.incomingRejectEdges.set(e.id,[])}),this.steps.forEach((e,t)=>{if(!this.offerSteps.includes(e.type))return;const n=this.hasABTestVariations(e),r=n?e["ab-test-variations"].length:1;if(n){const n=new Set;e["ab-test-variations"].forEach((o,a)=>{const i=o.offer_yes_step_id,s=o.offer_no_step_id;if(i){const n=this.incomingAcceptEdges.get(i);n&&n.push({offerId:e.id,offerIndex:t,hasABTest:!0,variationCount:r,variationIndex:a})}if(s&&!n.has(s)){n.add(s);const o=this.incomingRejectEdges.get(s);o&&o.push({offerId:e.id,offerIndex:t,hasABTest:!0,variationCount:r})}})}else{const n=e.offer_yes_step_id,r=e.offer_no_step_id;if(n){const r=this.incomingAcceptEdges.get(n);r&&r.push({offerId:e.id,offerIndex:t,hasABTest:!1,variationCount:1})}if(r){const n=this.incomingRejectEdges.get(r);n&&n.push({offerId:e.id,offerIndex:t,hasABTest:!1,variationCount:1})}}})}calculatePositions(){this.steps.forEach((e,t)=>{const n=this.calculateYPosition(e,t),r=this.calculateXPositionForStep(e,t),o=H6.hasDynamicOffers(e),a="upsell"===e.type||"downsell"===e.type,i="checkout"===e.type&&Array.isArray(e.bumps)?e.bumps.length:0;this.positions.set(e.id,{x:r,y:n,hasDynamicOffers:o,hasABTest:this.hasABTestVariations(e),isOfferStep:a,bumpCount:i})}),this.adjustXPositionsForIncomingEdges()}bumpStride(e,t){return e&&t?150+50*(t-1):0}calculateXPositionForStep(e,t){if(0===t)return 250;const n="vertical"===this.axis,r=n?380:q6,o=[...this.incomingAcceptEdges.get(e.id)||[],...this.incomingRejectEdges.get(e.id)||[]];if(o.length>0){let e=0,t=!1;if(o.forEach(n=>{const r=this.positions.get(n.offerId);r&&r.x>e&&(e=r.x,t=r.hasDynamicOffers)}),e>0)return e+(t?r+J6:r)}const a=this.steps[t-1],i=this.positions.get(a.id);if(i){let e=r;return i.hasDynamicOffers&&(e+=J6),i.hasABTest&&!i.isOfferStep&&(n?e=700:e+=150),e+=this.bumpStride(n,i.bumpCount),i.x+e}return 250+t*r}adjustXPositionsForIncomingEdges(){let e=!0,t=0;for(;e&&t<10;)e=!1,t++,this.steps.forEach(t=>{const n=this.positions.get(t.id);if(!n)return;const r=[...this.incomingAcceptEdges.get(t.id)||[],...this.incomingRejectEdges.get(t.id)||[]];if(0===r.length)return;let o=0,a=!1;r.forEach(e=>{const t=this.positions.get(e.offerId);t&&t.x>o&&(o=t.x,a=t.hasDynamicOffers)});const i="vertical"===this.axis?380:q6,s=o+(a?i+J6:i);s>n.x&&(n.x=s,this.positions.set(t.id,n),e=!0)})}calculateYPosition(e,t){if(0===t)return 0;if(this.dynamicOfferTargetSteps.has(e.id)){const e=this.steps[t-1],n=this.positions.get(e.id);return(n?n.y:0)+200}const n=this.incomingAcceptEdges.get(e.id)||[],r=this.incomingRejectEdges.get(e.id)||[];if(n.length>0&&r.length>0){const t=new Set(r.map(e=>e.offerId)),o=new Set(n.map(e=>e.offerId));if([...t].some(e=>!o.has(e))){const e=r.filter(e=>!o.has(e.offerId)),t=this.findEarliestSource(e);return this.calculateRejectYPosition(t)}const a=this.findEarliestSource(n),i=this.positions.get(a.offerId);let s=i?i.y:0;return s=this.applyABTestAcceptOffset(e,s),s}if(n.length>0){const t=this.findEarliestSource(n);let r=this.calculateAcceptYPosition(t);return r=this.applyABTestAcceptOffset(e,r),r}if(r.length>0){const e=this.findEarliestSource(r);return this.calculateRejectYPosition(e)}const o=this.steps[t-1],a=this.positions.get(o.id);return a?a.y:0}calculateRejectYPosition(e){const t=this.positions.get(e.offerId);if(!t)return 200;if(e.hasABTest&&e.variationCount>1){const n=this.calculateABGroupHeight(e.variationCount);return t.y+t7+n}return t.y+200}calculateAcceptYPosition(e){const t=this.positions.get(e.offerId);return t?e.hasABTest&&e.variationCount>1&&void 0!==e.variationIndex?t.y+t7+50-e.variationIndex*e7+150:t.y+K6:K6}applyABTestAcceptOffset(e,t){if(this.hasABTestVariations(e)){const n=this.calculateABGroupHeight(e["ab-test-variations"].length);return t+K6-n/3}return t}calculateABGroupHeight(e){return e*e7+50}findEarliestSource(e){return 0===e.length?null:e.reduce((e,t)=>t.offerIndex<e.offerIndex||t.offerIndex===e.offerIndex&&void 0!==t.variationIndex&&void 0!==e.variationIndex&&t.variationIndex<e.variationIndex?t:e,e[0])}calculateConditionalFan(e){const t=e.length;if(0===t)return[];if(1===t)return[0];const n=0-250*(t-1)/2;return e.map((e,t)=>n+250*t)}hasABTestVariations(e){return e["ab-test-variations"]&&Array.isArray(e["ab-test-variations"])&&e["ab-test-variations"].length>1}getMaxX(){let e=0;return this.positions.forEach(t=>{t.x>e&&(e=t.x)}),e}getPosition(e){return this.positions.get(e)||null}isConditionalTarget(e){return this.conditionalTargets.has(e)}isDynamicOfferTarget(e){return this.dynamicOfferTargetSteps.has(e)}static calculateABGroupDimensions(e){return{width:450,height:e*e7+50}}static calculateABVariationPosition(e){return{x:25,y:50+e*e7}}static getABGroupYOffset(){return t7}},r7={getInvalidStepIds(e){const t=new Set;if(!Array.isArray(e))return t;const n="undefined"!=typeof cartflows_admin&&cartflows_admin.old_global_checkout?parseInt(cartflows_admin.old_global_checkout,10):null;let r=!1;return e.forEach(e=>{e&&"object"==typeof e&&("landing"!==e.type?"checkout"===e.type&&(n?parseInt(e.id,10)!==n&&t.add(e.id):r?t.add(e.id):r=!0):t.add(e.id))}),t},filterMenuActions(e,t,n){if(!e||"object"!=typeof e)return e;const r={...e};return"checkout"===t?.type&&(delete r.clone,n||delete r.delete),n&&(delete r.clone,delete r.abtest),r}},o7=class{constructor(e,t,n,r,o="LR",a="horizontal",i=!1){this.steps=e,this.flowType=t,this.flowId=n,this.flowAnalytics=r,this.direction=o,this.axis=a,this.compact=i,this.offerSteps=["upsell","downsell"],this.nonOfferSteps=["landing","checkout","thankyou","optin"],this.storeCheckoutInvalidIds="storeCheckout"===t?r7.getInvalidStepIds(e):new Set,this.positionCalculator=new n7(e,t,a),this.calculatedPositions=null}initializePositions(){this.calculatedPositions=this.positionCalculator.calculate()}getStepPosition(e,t=0,n=0){if(this.calculatedPositions&&this.calculatedPositions.has(e)){const t=this.calculatedPositions.get(e);return{x:t.x,y:t.y}}return{x:t,y:n}}generateNodeId(e){return`wcf_node_edge_${e}`}getStepAnalytics(e){return this.flowAnalytics&&this.flowAnalytics.all_steps&&this.flowAnalytics.all_steps.find(t=>t.id===e)||null}isInvalidPosition(e){if(this.storeCheckoutInvalidIds.has(e.id))return!0;if(!this.offerSteps.includes(e.type))return!1;if(!e.offer_yes_step_id||!e.offer_no_step_id)return!0;const t=this.steps.map(e=>e.id),n=t.indexOf(e.id);return!G6.validateStepPosition(e,n,t,this.steps,this.flowType).isValid}createStartNode(){return{id:"wcf_start_node",type:"label",data:{position:"start",label:(0,z.__)("Start","cartflows"),direction:this.direction,axis:this.axis,compact:this.compact},position:{x:50,y:103}}}createEndNode(e){return{id:"wcf_end_node",type:"label",data:{position:"end",label:(0,z.__)("End","cartflows"),direction:this.direction,axis:this.axis,compact:this.compact},position:{x:e,y:103}}}hasABTestVariations(e){return e["ab-test-variations"]&&Array.isArray(e["ab-test-variations"])&&e["ab-test-variations"].length>1}createRegularStepNode(e,t,n,r){const o=this.offerSteps.includes(e.type)?"offer":e.type,a=this.getStepAnalytics(e.id),i=this.isInvalidPosition(e),s="storeCheckout"===this.flowType&&this.storeCheckoutInvalidIds.has(e.id),l="storeCheckout"===this.flowType&&"checkout"===e.type&&!0===e.is_product_assigned;let c=e.is_product_assigned;(["landing","thankyou"].includes(e.type)||"storeCheckout"===this.flowType&&"checkout"===e.type)&&(c=!0);const u=e.actions?.view?.link||"",d=e.page_builder_edit?e.page_builder_edit.replace(/&/g,"&"):"",f=e.actions?.edit?.link||"",p="storeCheckout"===this.flowType?r7.filterMenuActions(e.menu_actions,e,this.storeCheckoutInvalidIds.has(e.id)):e.menu_actions;return{id:this.generateNodeId(e.id),type:o,data:{flow_id:this.flowId,flow_type:this.flowType,label:e.title,step_id:e.id,step_type:e.type,control_id:e.id,editPage:d,editSettings:f,viewPageLink:u,index:t,direction:this.direction,axis:this.axis,compact:this.compact,menu_actions:p,ab_test_variations:e["ab-test-variations"],analytics:a,is_product_assigned:c,isInvalidPosition:i,is_locked:s,has_store_checkout_product_warning:l,warnings:X6(e,this.steps),step_disabled:e.step_disabled||!1,bumps:"checkout"===e.type&&e.bumps||[]},position:{x:n,y:r}}}createOfferABTestVariationNode(e,t,n,r){const o=this.getStepAnalytics(t.id),a=t.actions?.edit?.link||"";let i=e.is_product_assigned;(["landing","thankyou"].includes(t.type)||"storeCheckout"===this.flowType&&"checkout"===t.type)&&(i=!0);const s={id:t.id,type:t.type,offer_yes_step_id:e.offer_yes_step_id,offer_no_step_id:e.offer_no_step_id},l=this.isInvalidPosition(s),c=n7.calculateABVariationPosition(r);return{id:this.generateNodeId(e.id),type:"abtest",data:{flow_id:this.flowId,flow_type:this.flowType,label:e.title,step_id:e.id,step_type:t.type,control_id:t.id,editPage:e.actions?.edit?.link?e.actions.edit.link.replace(/&/g,"&"):"",editSettings:a,viewPageLink:e.actions?.view?.link||"",index:n,direction:this.direction,axis:this.axis,compact:this.compact,menu_actions:e.menu_actions,analytics:o?o["visits-ab"][e.id]:null,traffic:e.traffic,var_badge_count:r,offer_yes_next_step:e.offer_yes_next_step,offer_no_next_step:e.offer_no_next_step,offer_yes_step_id:e.offer_yes_step_id,offer_no_step_id:e.offer_no_step_id,is_product_assigned:i,isInvalidPosition:l,isABTestVariation:!0,isGrouped:!0,step_disabled:e.step_disabled||!1},parentId:`offer-ab-group-${t.id}`,extent:"parent",connectable:!0,draggable:!1,position:c}}createABTestGroupNode(e,t,n){const r=e["ab-test-variations"],{width:o,height:a}=n7.calculateABGroupDimensions(r.length),i="vertical"===this.axis?-25:t7,s=this.flowId;return{id:`ab-group-${e.id}`,type:"group",data:{step:e,flow_id:s,label:e.title},position:{x:t,y:n+i},style:{width:o,height:a,backgroundColor:"transparent",border:"2px dashed #000000",borderRadius:"8px"}}}createOfferABTestGroupNode(e,t,n){const r=e["ab-test-variations"],{width:o,height:a}=n7.calculateABGroupDimensions(r.length),i=this.flowId;return{id:`offer-ab-group-${e.id}`,type:"group",data:{step:e,flow_id:i,label:e.title,isOfferABTestGroup:!0},position:{x:t,y:n+t7},style:{width:o,height:a,backgroundColor:"transparent",border:"2px dashed #000000",borderRadius:"8px"}}}createGroupedABTestVariationNode(e,t,n,r,o,a){const i=this.getStepAnalytics(t.id),s=t.actions?.edit?.link||"";let l=e.is_product_assigned;(["landing","thankyou"].includes(t.type)||"storeCheckout"===this.flowType&&"checkout"===t.type)&&(l=!0),t.type;const c=n7.calculateABVariationPosition(r);return{id:this.generateNodeId(e.id),type:"abtest",data:{flow_id:this.flowId,flow_type:this.flowType,label:e.title,step_id:e.id,step_type:t.type,control_id:t.id,editPage:e.actions?.edit?.link?e.actions.edit.link.replace(/&/g,"&"):"",editSettings:s,viewPageLink:e.actions?.view?.link||"",index:n,direction:this.direction,axis:this.axis,compact:this.compact,menu_actions:e.menu_actions,analytics:i?i["visits-ab"][e.id]:null,traffic:e.traffic,var_badge_count:r,is_product_assigned:l,isInvalidPosition:!1,isABTestVariation:!0,isGrouped:!0,step_disabled:e.step_disabled||!1},parentId:`ab-group-${t.id}`,extent:"parent",connectable:!1,draggable:!1,position:c}}createConditionalNode(e,t,n){return{id:`conditional-${e.id}`,type:"conditional",position:{x:t,y:n},data:{checkoutId:e.id,conditions:e.conditions,defaultStep:e.default_step,editSettings:e.actions?.edit?.link||"",direction:this.direction,axis:this.axis,compact:this.compact,flow_type:this.flowType,flow_id:this.flowId,label:"Dynamic Offers"},style:{visibility:"visible"}}}buildNodes(){const e=[];this.initializePositions();let t=250;e.push(this.createStartNode()),this.steps.forEach((n,r)=>{if(!wcfCartflowsTypePlusPro()&&this.offerSteps.includes(n.type))return;const o=this.getStepPosition(n.id,t,0),a=o.x,i=o.y;if(H6.hasDynamicOffers(n)){if(this.hasABTestVariations(n)){const t=n["ab-test-variations"],o=this.createABTestGroupNode(n,a,i);e.push(o),t.forEach((t,o)=>{const s=this.createGroupedABTestVariationNode(t,n,r,o,a,i);e.push(s)})}else{const t=this.createRegularStepNode(n,r,a,i);e.push(t)}const o=a+q6,s=this.createConditionalNode(n,o,i);return e.push(s),void(t=o+J6)}if(this.hasABTestVariations(n)){const t=n["ab-test-variations"];if(this.offerSteps.includes(n.type)){const o=this.createOfferABTestGroupNode(n,a,i);e.push(o),t.forEach((t,o)=>{n7.calculateABVariationPosition(o);const a=this.createOfferABTestVariationNode(t,n,r,o);e.push(a)})}else{const o=this.createABTestGroupNode(n,a,i);e.push(o),t.forEach((t,o)=>{const s=this.createGroupedABTestVariationNode(t,n,r,o,a,i);e.push(s)})}}else{const t=this.createRegularStepNode(n,r,a,i);e.push(t)}t=a+q6});const n=this.positionCalculator.getMaxX(),r=Math.max(n+q6,t);return e.push(this.createEndNode(r)),e}},a7=class{constructor(e,t,n=!1,r="custom",o="horizontal"){this.steps=e,this.flowType=t,this.isAnimated=n,this.edgeType=r,this.axis=o,this.offerSteps=["upsell","downsell"]}targetHandleId(e="incoming"){return"vertical"===this.axis?"conditional"===e?"left":"top":"conditional"===e?"top":"left"}sourceHandleId(){return"vertical"===this.axis?"bottom":"right"}generateNodeId(e){return`wcf_node_edge_${e}`}hasABTestVariations(e){return e&&e["ab-test-variations"]&&Array.isArray(e["ab-test-variations"])&&e["ab-test-variations"].length>1}getAllVariationIds(e){return this.hasABTestVariations(e)?e["ab-test-variations"].map(e=>e.id):[e.id]}isOfferStep(e){return e&&this.offerSteps.includes(e.type)}getTargetNodeIds(e){if(!this.hasABTestVariations(e))return[`wcf_node_edge_${e.id}`];if(this.isOfferStep(e)){return e["ab-test-variations"].map(e=>`wcf_node_edge_${e.id}`)}return[`ab-group-${e.id}`]}findStep(e){return this.steps.find(t=>t.id===e)}createStartEdges(){const e=[];if(0===this.steps.length)return e;const t=this.steps[0];return this.getTargetNodeIds(t).forEach(t=>{e.push({id:`wcf_start_node-${t}-edge`,type:this.edgeType,animated:this.isAnimated,source:"wcf_start_node",sourceHandle:this.sourceHandleId(),target:t,targetHandle:this.targetHandleId(),deletable:!0,focusable:!0,selectable:!0})}),e}createEndEdges(){const e=[];if(0===this.steps.length)return e;const t=this.steps[this.steps.length-1];return this.getTargetNodeIds(t).forEach(t=>{e.push({id:`${t}-wcf_end_node-edge`,animated:this.isAnimated,source:t,sourceHandle:this.sourceHandleId(),target:"wcf_end_node",targetHandle:this.targetHandleId(),type:this.edgeType,deletable:!0,focusable:!0,selectable:!0})}),e}createOfferEdges(e,t,n,r=null){const o=[],a=(r?"a"===n?r.offer_yes_step_id:r.offer_no_step_id:null)||t;if(!a)return o;const i=this.findStep(a);if(!i)return o;const s=this.getTargetNodeIds(i),l="a"===n,c=l?"accept":"reject",u={label:l?(0,z.__)("Accept","cartflows"):(0,z.__)("Reject","cartflows"),labelBgStyle:{fill:l?"#F0FDF4":"#FEF2F2",border:l?"#BBF7D0":"#FECACA"},labelStyle:{fill:l?"#16A34A":"#DC2626",fontWeight:400,fontSize:"12px"},labelBgPadding:[8,4]};return s.forEach(t=>{o.push({id:`${e}-${t}-edge-${n}`,type:this.edgeType,animated:this.isAnimated,source:this.generateNodeId(e),sourceHandle:n,target:t,targetHandle:this.targetHandleId(),...u,data:{kind:c},deletable:!0,focusable:!0,selectable:!0})}),o}createCheckoutToConditionalEdge(e,t){const n=this.hasABTestVariations(e)?`ab-group-${e.id}`:`wcf_node_edge_${e.id}`;return{id:`${n}-${t}-edge`,type:this.edgeType,animated:this.isAnimated,source:n,sourceHandle:this.sourceHandleId(),target:t,deletable:!1,focusable:!0,selectable:!0}}getConditionalEdgeLabel(e,t){if(t.default_step&&parseInt(t.default_step,10)===parseInt(e,10))return{label:(0,z.__)("Default","cartflows"),kind:"default"};if(t.conditions&&Array.isArray(t.conditions))for(let n=0;n<t.conditions.length;n++){const r=t.conditions[n];if(r.step_id&&parseInt(r.step_id,10)===parseInt(e,10))return{label:(0,z.sprintf)(/* translators: %d is replaced with the condition number */ /* translators: %d is replaced with the condition number */ |
| 71 |
(0,z.__)("Condition %d","cartflows"),n+1),kind:"condition"}}return{label:(0,z.__)("Condition","cartflows"),kind:"condition"}}createConditionalEdges(e,t){const n=[];return H6.getUniqueTargetSteps(e.conditions,e.default_step).forEach((r,o)=>{const a=this.findStep(r);if(!a)return void console.warn(`[EdgeBuilder] Target step ${r} not found`);const{label:i,kind:s}=this.getConditionalEdgeLabel(r,e),l={label:i,labelBgStyle:{fill:"#FDE68A",border:"1px solid #d1d5db"},labelStyle:{fill:"#D97706",fontWeight:400,fontSize:"12px"},labelBgPadding:[8,4]},c=this.hasABTestVariations(a);this.offerSteps.includes(a.type)&&c?a["ab-test-variations"].forEach(e=>{const r=`wcf_node_edge_${e.id}`,o={id:`${t}-${r}-edge`,type:this.edgeType,animated:this.isAnimated,source:t,target:r,targetHandle:this.targetHandleId("conditional"),...l,deletable:!0,focusable:!0,selectable:!0,data:{kind:s,offerControlId:a.id}};n.push(o)}):this.getTargetNodeIds(a).forEach(e=>{const r={id:`${t}-${e}-edge`,type:this.edgeType,animated:this.isAnimated,source:t,target:e,targetHandle:this.targetHandleId("conditional"),...l,deletable:!0,focusable:!0,selectable:!0,data:{kind:s,controlId:a.id}};n.push(r)})}),n}createRegularEdges(e,t){const n=[],r=this.findStep(t);return r?(this.getTargetNodeIds(r).forEach(t=>{n.push({id:`${e}-${t}-edge`,type:this.edgeType,animated:this.isAnimated,source:this.generateNodeId(e),sourceHandle:this.sourceHandleId(),target:t,targetHandle:this.targetHandleId(),deletable:!0,focusable:!0,selectable:!0})}),n):n}createRegularEdgesFromGroup(e,t){const n=[],r=this.findStep(t);if(!r)return n;const o=this.getTargetNodeIds(r),a=`ab-group-${e}`;return o.forEach(t=>{n.push({id:`${e}-${t}-edge-group`,type:this.edgeType,animated:this.isAnimated,source:a,sourceHandle:this.sourceHandleId(),target:t,targetHandle:this.targetHandleId(),deletable:!0,focusable:!0,selectable:!0})}),n}createSequentialEdges(e,t,n){const r=[];if(!t)return r;if(H6.hasDynamicOffers(e))return r;const o=this.hasABTestVariations(e),a=this.offerSteps.includes(e.type);return o&&!a?(r.push(...this.createRegularEdgesFromGroup(e.id,t.id)),r):(this.getAllVariationIds(e).forEach(n=>{const i=o?e["ab-test-variations"].find(e=>e.id===n):null;if(a){const t=i?i.offer_yes_step_id:e.offer_yes_step_id,o=i?i.offer_no_step_id:e.offer_no_step_id;t&&r.push(...this.createOfferEdges(n,t,"a",i)),o&&r.push(...this.createOfferEdges(n,o,"b",i))}else r.push(...this.createRegularEdges(n,t.id))}),r)}buildEdges(){const e=[],t=new Set;this.steps.forEach(e=>{H6.hasDynamicOffers(e)&&H6.getUniqueTargetSteps(e.conditions,e.default_step).forEach(e=>t.add(e))});const n=this.createStartEdges();e.push(...n),this.steps.forEach((n,r)=>{if(!wcfCartflowsTypePlusPro()&&this.offerSteps.includes(n.type))return;if(t.has(n.id)){if(this.offerSteps.includes(n.type))if(this.hasABTestVariations(n))this.getAllVariationIds(n).forEach(t=>{const r=n["ab-test-variations"].find(e=>e.id===t);if(r){const n=r.offer_yes_step_id,o=r.offer_no_step_id;if(n){const o=this.createOfferEdges(t,n,"a",r);e.push(...o)}if(o){const n=this.createOfferEdges(t,o,"b",r);e.push(...n)}}});else{const t=n.offer_yes_step_id,r=n.offer_no_step_id;if(t){const r=this.createOfferEdges(n.id,t,"a",null);e.push(...r)}if(r){const t=this.createOfferEdges(n.id,r,"b",null);e.push(...t)}}return}const o=this.steps[r+1]||null,a=this.createSequentialEdges(n,o,r);e.push(...a)}),this.steps.forEach(t=>{if(!H6.hasDynamicOffers(t))return;const n=`conditional-${t.id}`,r=this.createCheckoutToConditionalEdge(t,n);e.push(r);const o=this.createConditionalEdges(t,n);e.push(...o)});const r=this.createEndEdges();return e.push(...r),e}},i7=class{constructor(e,t,n,r,o="LR",a="horizontal",i=!1){this.steps=e,this.direction=o,this.axis=a,this.compact=i,this.nodeBuilder=new o7(e,t,n,r,o,a,i),this.edgeBuilder=new a7(e,t,!1,"custom",a)}build(){const e=this.nodeBuilder.buildNodes(),t=this.edgeBuilder.buildEdges();return"vertical"===this.axis?{nodes:this.transpose(e),edges:t}:{nodes:e,edges:t}}transpose(e){return e.map(e=>e.parentId?e:{...e,position:{x:e.position.y,y:e.position.x}})}tidy(e,t){const n="vertical"===this.axis,r=new(W6().graphlib.Graph);let o="LR";n?o="TB":"RL"===this.direction&&(o="RL"),r.setGraph({rankdir:o,ranksep:150,nodesep:120,marginx:50,marginy:50}),r.setDefaultEdgeLabel(()=>({}));const a=new Set(e.filter(e=>e.parentId).map(e=>e.id)),i=this.compact?250:400,s=e=>"group"===e.type?e.style?.width||e.measured?.width||i:e.width||e.measured?.width||("label"===e.type?50:i),l=n?230:300,c=e=>{if("group"===e.type)return e.style?.height||e.measured?.height||300;const t=Array.isArray(e.data?.bumps)?e.data.bumps.length:0,r=n&&t?150+50*(t-1):0;return e.height||e.measured?.height||("label"===e.type?30:l+r)};return e.forEach(e=>{a.has(e.id)||r.setNode(e.id,{width:s(e),height:c(e)})}),t.forEach(e=>{a.has(e.source)||a.has(e.target)||r.setEdge(e.source,e.target)}),W6().layout(r),e.map(e=>{if(a.has(e.id))return e;const t=r.node(e.id);return t?{...e,position:n?{x:e.position.x,y:t.y-t.height/2}:{x:t.x-t.width/2,y:e.position.y}}:e})}static structuralKey(e,t,n="horizontal",r=!1){return e.map(e=>`${e.id}:${e.type}:${e.title}`).join("|")+`:${t}:${n}:${r?"c":"d"}`}},s7=class{constructor(e,t,n,r,o,a,i,s,l,c){this.steps=e,this.flowType=t,this.flowId=n,this.nodes=r,this.edges=o,this.setEdges=a,this.setReorderError=i,this.dispatch=s,this.renderCb=c,this.setSettingsStatus=l,this.offerSteps=["upsell","downsell"],this.edgeType="custom"}extractStepId(e){if(!e)return null;if("wcf_start_node"===e)return"START";if("wcf_end_node"===e)return"END";const t=e.match(/ab-group-(\d+)/);if(t)return parseInt(t[1],10);const n=e.match(/wcf_node_edge_(\d+)/);return n?parseInt(n[1],10):null}generateNodeId(e){return`wcf_node_edge_${e}`}findStep(e){return this.steps.find(t=>t.id===e)}getControlId(e){if("wcf_start_node"===e||"wcf_end_node"===e)return this.extractStepId(e);const t=this.nodes.find(t=>t.id===e);return t?"group"===t.type?this.extractStepId(e):t.data&&t.data.control_id?t.data.control_id:this.extractStepId(e):this.extractStepId(e)}hasABTestVariations(e){return e&&e["ab-test-variations"]&&Array.isArray(e["ab-test-variations"])&&e["ab-test-variations"].length>1}isOfferStep(e){return e&&this.offerSteps.includes(e.type)}getTargetNodeId(e){return this.hasABTestVariations(e)?this.isOfferStep(e)?null:`ab-group-${e.id}`:`wcf_node_edge_${e.id}`}getAllTargetNodeIds(e){return this.hasABTestVariations(e)?this.isOfferStep(e)?e["ab-test-variations"].map(e=>`wcf_node_edge_${e.id}`):[`ab-group-${e.id}`]:[`wcf_node_edge_${e.id}`]}updateOfferRedirection(e,t,n){const r=new window.FormData;return r.append("action","cartflows_save_meta_settings"),r.append("security",cartflows_admin.save_meta_settings_nonce),r.append("post_id",this.flowId),r.append("step_id",e),"a"===t?r.append("wcf-yes-next-step",n):"b"===t&&r.append("wcf-no-next-step",n),L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(e=>(e&&e.status&&(this.setSettingsStatus({status:"SAVED"}),this.renderCb()),e)).catch(e=>{throw console.error("[ConnectionHandler] AJAX error:",e),e})}updateStepConnection(e,t){const n=new window.FormData;return n.append("action","cartflows_save_meta_settings"),n.append("security",cartflows_admin.save_meta_settings_nonce),n.append("post_id",this.flowId),n.append("step_id",e),n.append("wcf-next-step-id","END"===t?"":t),L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(e=>(e&&e.status&&(this.setSettingsStatus({status:"SAVED"}),this.renderCb()),e)).catch(e=>{throw console.error("[ConnectionHandler] Non-offer connection AJAX error:",e),e})}validateConnection(e,t,n){const r=[],o=this.getControlId(e.id),a=this.getControlId(t.id);if("START"===o||"END"===a)return{isValid:!0,errors:[],warnings:[]};const i=this.findStep(o),s=this.findStep(a);if(!i||!s)return r.push((0,z.__)("Invalid step connection.","cartflows")),{isValid:!1,errors:r};if(o===a)return r.push((0,z.__)("Step cannot connect to itself.","cartflows")),{isValid:!1,errors:r};if(this.offerSteps.includes(i.type)){if(["landing","checkout"].includes(s.type))return r.push((0,z.__)("Offer steps can only connect to other Offer steps, Optin, or Thank You page.","cartflows")),{isValid:!1,errors:r};if(!["upsell","downsell","optin","thankyou"].includes(s.type))return r.push((0,z.__)("Offer steps can only connect to other Offer steps, Optin, or Thank You page.","cartflows")),{isValid:!1,errors:r}}const l=this.steps.map(e=>e.id);return G6.validateConnection({...e,type:i.type,id:`wcf_node_edge_${o}`},{...t,type:s.type,id:`wcf_node_edge_${a}`},n,{steps:this.steps,stepOrder:l})}createEdgeData(e,t,n){let r={...e,animated:!1,type:this.edgeType,deletable:!0,focusable:!0,selectable:!0};return n&&e.sourceHandle&&("a"===e.sourceHandle?r={...r,label:(0,z.__)("Accept","cartflows"),labelBgStyle:{fill:"#BBF7D0",border:"1px solid #d1d5db"},labelStyle:{fill:"#16A34A",fontWeight:400,fontSize:"12px"},labelBgPadding:[8,4]}:"b"===e.sourceHandle&&(r={...r,label:(0,z.__)("Reject","cartflows"),labelBgStyle:{fill:"#FEF2F2",border:"1px solid #d1d5db"},labelStyle:{fill:"#DC2626",fontWeight:400,fontSize:"12px"},labelBgPadding:[8,4]})),r}handleConnect(e){const t=this.nodes.find(t=>t.id===e.source),n=this.nodes.find(t=>t.id===e.target);if(!t||!n)return void console.error("[ConnectionHandler] Source or target node not found");const r=this.getControlId(e.source),o=this.getControlId(e.target),a="START"===r,i="END"===o,s=a?null:this.findStep(r),l=i?null:this.findStep(o);if(!(a||i||s&&l))return console.error("[ConnectionHandler] Source or target step not found"),void console.error("[ConnectionHandler] Available steps:",this.steps.map(e=>e.id));const c=this.validateConnection(t,n,e.sourceHandle);if(!c.isValid)return console.error("[ConnectionHandler] Connection validation failed:",c.errors),this.setReorderError(c.errors[0]),void setTimeout(()=>{this.setReorderError(null)},4e3);const u=s&&this.offerSteps.includes(s.type),d=e.sourceHandle,f=this.createEdgeData(e,s,u),p=i?[e.target]:this.getAllTargetNodeIds(l),m=this.extractStepId(e.source);if(p.length>1){const e=[];p.forEach((t,n)=>{const r={...f,id:`${m}-${t}-edge${d?"-"+d:""}-${n}`,target:t};e.push(r)}),this.setEdges(t=>[...t,...e])}else{f.target=p[0];const e=f1(f,this.edges);this.setEdges(e)}u&&d?(0,WV.$h)(this.updateOfferRedirection(m,d,o)):!a&&s&&(0,WV.$h)(this.updateStepConnection(m,o))}},l7=class{constructor(e,t,n,r,o){this.steps=e,this.dispatch=t,this.flowId=n,this.setSettingsStatus=r,this.renderCb=o}async handleDeletion(e){if(!H6.isConditionalEdge(e))return!1;const t=H6.extractCheckoutId(e.source),n=H6.extractStepId(e.target,this.steps);if(!t||!n)return!1;const r=this.steps.find(e=>e.id===t);if(!r||!r.conditions)return console.warn("[ConditionalEdgeHandler] Checkout step or conditions not found"),!1;const o=H6.removeConditionsForStep(r.conditions,n),a=H6.updateDefaultStep(r.default_step,n,o);return await this.saveRules(t,o,a),!0}async saveRules(e,t,n){const r=H6.buildRulesFormData(e,this.flowId,t,n);try{const e=await(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:r}));e&&e.status&&(this.setSettingsStatus({status:"SAVED"}),this.renderCb())}catch(e){console.error("[ConditionalEdgeHandler] Failed to save rules:",e)}}hasConditionalRules(e){const t=this.steps.find(t=>t.id===e);return H6.hasDynamicOffers(t)}},c7=class{constructor(e,t,n,r,o,a,i,s){this.edges=e,this.setEdges=t,this.onEdgesChangeInternal=n,this.steps=r,this.dispatch=o,this.flowId=a,this.setSettingsStatus=i,this.renderCb=s,this.conditionalHandler=new l7(r,o,a,i,s)}findRelatedEdges(e){const t=this.edges.find(t=>t.id===e);if(!t)return[];if(t.source&&t.source.startsWith("conditional-")&&t.target){const n=H6.extractStepId(t.target,this.steps);if(n){const r=this.steps.find(e=>e.id===n);if(r&&r["ab-test-variations"]&&Array.isArray(r["ab-test-variations"])&&r["ab-test-variations"].length>1){const r=this.edges.filter(r=>!(r.id===e||r.source!==t.source||!r.target)&&H6.extractStepId(r.target,this.steps)===n);return r}}}return t.data&&t.data.offerControlId?this.edges.filter(n=>n.id!==e&&n.data&&n.data.offerControlId===t.data.offerControlId):t.sourceHandle?this.edges.filter(n=>n.id!==e&&n.source===t.source&&n.sourceHandle===t.sourceHandle):[]}async handleEdgeChanges(e){const t=e.filter(e=>"remove"===e.type);if(t.length>0){const n=[];for(const e of t){const t=this.edges.find(t=>t.id===e.id);if(!t)continue;if(await this.conditionalHandler.handleDeletion(t))return;const r=this.findRelatedEdges(e.id);for(const e of r)n.push({type:"remove",id:e.id})}n.length>0&&(e=[...e,...n])}this.onEdgesChangeInternal(e)}},u7=()=>{const e=(0,g.useHistory)(),[{flow_type:t,flow_id:n}]=SU(),r="storeCheckout"===t,[o,i]=(0,a.useState)(null),s=async({key:e,flowName:t,instantLayout:n})=>{if(!o){i(e);try{const e=await(({flowName:e,instantLayout:t})=>{const n=new window.FormData;return n.append("action","cartflows_create_flow"),n.append("security",cartflows_admin.create_flow_nonce),n.append("flow_name",e),n.append("creation_method","scratch"),n.append("instant_layout",t?"true":"false"),L()({url:cartflows_admin.ajax_url,method:"POST",body:n})})({flowName:t,instantLayout:n});if(!e?.success)return Vm.error((0,z.__)("Failed to create funnel.","cartflows")),void i(null);Vm.success((0,z.__)("Funnel created.","cartflows")),window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e.data.flow_id}`}catch(e){Vm.error((0,z.__)("Failed to create funnel.","cartflows")),i(null)}}},l=[{key:"template",icon:iW,title:(0,z.__)("Use a template","cartflows"),description:(0,z.__)("Start with a proven layout from our template library.","cartflows"),cta:(0,z.__)("Browse templates","cartflows"),onClick:()=>{e.push({pathname:"admin.php",search:"?page=cartflows&path=library"})}},{key:"quick-checkout",icon:nG,title:(0,z.__)("Quick checkout","cartflows"),description:(0,z.__)("Spin up a checkout funnel with Instant Layout enabled.","cartflows"),cta:(0,z.__)("Create checkout funnel","cartflows"),onClick:()=>s({key:"quick-checkout",flowName:(0,z.__)("Quick Checkout Funnel","cartflows"),instantLayout:!0})},{key:"scratch",icon:QU,title:(0,z.__)("Build from scratch","cartflows"),description:(0,z.__)("Start with an empty funnel and add steps yourself.","cartflows"),cta:(0,z.__)("Create blank funnel","cartflows"),onClick:()=>s({key:"scratch",flowName:(0,z.__)("New Funnel","cartflows"),instantLayout:!1})}],c=[{key:"store-template",icon:iW,title:(0,z.__)("Use a Store Checkout template","cartflows"),description:(0,z.__)("Start from a ready-made Store Checkout layout.","cartflows"),cta:(0,z.__)("Browse templates","cartflows"),onClick:()=>{e.push({pathname:"admin.php",search:"?page=cartflows&path=store-checkout-library"})}},{key:"store-add-step",icon:QU,title:(0,z.__)("Add a step","cartflows"),description:(0,z.__)("Pick a step type to add to this Store Checkout.","cartflows"),cta:(0,z.__)("Add step","cartflows"),onClick:()=>{e.push({pathname:"admin.php",search:`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${n}&tab=library`})}}],u=r?c:l,d=r?(0,z.__)("Start building your Store Checkout","cartflows"):(0,z.__)("Create your first funnel","cartflows"),f=r?(0,z.__)("Pick a starting point for this Store Checkout — you can always change things later.","cartflows"):(0,z.__)("Pick how you’d like to begin — you can always change things later.","cartflows"),p=`grid grid-cols-1 ${2===u.length?"md:grid-cols-2":"md:grid-cols-3"} gap-4`;return(0,a.createElement)(Eh,{align:"center",justify:"center",className:"wcf-canvas-empty-state w-full h-full bg-background-secondary"},(0,a.createElement)(Eh,{direction:"column",gap:"lg",className:"wcf-canvas-empty-state__panel max-w-4xl w-full mx-auto px-6 py-10"},(0,a.createElement)(Eh,{direction:"column",align:"center",gap:"xs",className:"text-center"},(0,a.createElement)(_h,{tag:"h2",size:"md",title:d}),(0,a.createElement)(Ch,{size:16,color:"secondary"},f)),(0,a.createElement)("div",{className:p},u.map(e=>{const t=e.icon,n=o===e.key;return(0,a.createElement)(Eh,{key:e.key,direction:"column",align:"start",gap:"sm",className:"wcf-canvas-empty-state__card p-5 bg-background-primary rounded-lg border-0.5 border-solid border-border-subtle shadow-sm"},(0,a.createElement)(Eh,{align:"center",justify:"center",className:"wcf-canvas-empty-state__icon w-10 h-10 rounded-md bg-primary-50 text-primary-500"},(0,a.createElement)(t,{className:"w-5 h-5 stroke-2"})),(0,a.createElement)(_h,{tag:"h3",size:"sm",title:e.title}),(0,a.createElement)(Ch,{size:14,color:"secondary",className:"flex-1"},e.description),(0,a.createElement)(Wo,{variant:"secondary",size:"sm",loading:n,disabled:!!o&&!n,onClick:e.onClick},e.cta))}))))},d7=[{label:(0,z.__)("Open shortcuts panel","cartflows"),keys:["mod","/"]},{label:(0,z.__)("Open shortcuts panel (alt)","cartflows"),keys:["?"]},{label:(0,z.__)("Exit fullscreen","cartflows"),keys:["Esc"]},{label:(0,z.__)("Fit canvas to view","cartflows"),keys:["F"]},{label:(0,z.__)("Tidy layout","cartflows"),keys:["T"]},{label:(0,z.__)("Toggle vertical / horizontal layout","cartflows"),keys:["V"]},{label:(0,z.__)("Toggle minimap","cartflows"),keys:["M"]},{label:(0,z.__)("Toggle compact / detailed cards","cartflows"),keys:["C"]},{label:(0,z.__)("Zoom in","cartflows"),keys:["+"]},{label:(0,z.__)("Zoom out","cartflows"),keys:["−"]},{label:(0,z.__)("Duplicate selected step","cartflows"),keys:["mod","D"]},{label:(0,z.__)("Delete selected node","cartflows"),keys:["Backspace"]}],f7=({children:e})=>(0,a.createElement)("kbd",{className:"inline-flex items-center justify-center min-w-[1.75rem] h-7 px-2 text-xs font-medium text-text-primary bg-background-secondary border border-solid border-border-subtle rounded shadow-sm"},e),p7=({open:e,onClose:t})=>{const n="undefined"!=typeof navigator&&/mac|iphone|ipad|ipod/i.test(navigator.platform||"")?"⌘":"Ctrl";return(0,a.createElement)(Im,{open:!!e,setOpen:e=>{e||t?.()},exitOnEsc:!0,exitOnClickOutside:!0,scrollLock:!0},(0,a.createElement)(Im.Portal,null,(0,a.createElement)(Im.Panel,{className:"max-w-xl gap-0"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between px-6 pt-5 pb-0"},(0,a.createElement)(Im.Title,null,(0,z.__)("Keyboard shortcuts","cartflows")),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,{className:"px-6 py-4"},(0,a.createElement)(Eh,{direction:"column",gap:"sm",className:"m-0 p-0"},d7.map((e,t)=>(0,a.createElement)(Eh,{key:t,align:"center",justify:"between",gap:"md"},(0,a.createElement)(Ch,{size:14,color:"primary"},e.label),(0,a.createElement)(Eh,{align:"center",gap:"xs"},e.keys.map((e,t)=>(0,a.createElement)(a.Fragment,{key:t},t>0&&(0,a.createElement)(Ch,{size:12,color:"tertiary"},"+"),(0,a.createElement)(f7,null,"mod"===e?n:e)))))))))))},m7="wcf_canvas_axis",h7="wcf_canvas_minimap",g7="wcf_canvas_compact",y7=()=>"vertical"===window.localStorage.getItem(m7)?"vertical":"horizontal",w7=()=>{const e=window.localStorage.getItem(h7);return null===e||"true"===e},b7=()=>{const e=window.localStorage.getItem(g7);return null===e?null:"true"===e},v7={custom:function(e){const{id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,style:c={},label:u,labelStyle:d,labelBgStyle:f,data:p,markerEnd:m}=e,h=p?.edgeStyle||"smoothstep",[y,w,b]="bezier"===h?l1({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}):y1({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),v=!!u,x=p?.kind;let N=24;"accept"===x||"reject"===x?N=80:("condition"===x||"default"===x)&&(N=110);const[{flow_id:E,flow_type:M}]=SU(),_=(0,g.useHistory)(),I=e=>{if(!e)return null;if("wcf_start_node"===e||"start"===e||"wcf_end_node"===e||"end"===e)return e;if(e.includes("wcf_node_edge_")){const t=parseInt(e.replace("wcf_node_edge_",""),10);return isNaN(t)?null:t}if(e.startsWith("conditional-")){const t=parseInt(e.replace("conditional-",""),10);return isNaN(t)?null:t}if(e.startsWith("ab-group-")){const t=parseInt(e.replace("ab-group-",""),10);return isNaN(t)?null:t}return null},S=!("wcf_end_node"===e.target||"end"===e.target||e.target&&e.target.startsWith("conditional-"));return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(V4,{id:t,path:y,style:c,markerEnd:m,interactionWidth:20}),(0,a.createElement)(R5,null,(0,a.createElement)("div",{className:"nodrag nopan wcf-edge-add-button flex items-center justify-center gap-1",style:{position:"absolute",transform:`translate(-50%, -50%) translate(${w}px, ${b}px)`,pointerEvents:"all",width:N,height:v?32:24,backgroundColor:f?.fill,borderRadius:"14px",border:f?.border,padding:v?"4px 6px":"0",boxShadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1)"}},v&&(0,a.createElement)("span",{style:{color:d?.fill,fontWeight:d?.fontWeight,fontSize:d?.fontSize,lineHeight:1,paddingLeft:"4px"}},u),S&&(0,a.createElement)("button",{onClick:t=>{t.stopPropagation();const n=I(e.source),r=I(e.target),o=e.sourceHandle?e.sourceHandle:"accept"===x?"a":"reject"===x?"b":null;if(null!==n&&null!==r){const e={sourceStepId:n,targetStepId:r,sourceHandle:o};window.sessionStorage.setItem("wcf_edge_insertion_context",JSON.stringify(e))}const a="storeCheckout"===M?"admin.php?page=cartflows&path=store-checkout":"admin.php?page=cartflows&path=flows",i=`&action=wcf-edit-flow&flow_id=${E}&tab=library`;_.push({pathname:a,search:i})},className:"flex items-center justify-center hover:opacity-80 transition-opacity cursor-pointer",style:{width:v?"20px":"24px",height:v?"20px":"24px",backgroundColor:v?"white":"#f3f4f6",borderRadius:"50%",border:v?"none":"1px solid #4b5563",padding:0},title:"Add new step"},(0,a.createElement)(QU,{className:"text-primary-600",style:{width:v?"14px":"16px",height:v?"14px":"16px"}})))))}},x7={label:d3,conditional:m3,landing:L3,checkout:P3,offer:_6,thankyou:S6,optin:k6,abtest:A6,group:Q6},N7={x:0,y:150,zoom:.75},E7=[10,10],M7={padding:.2,duration:400,minZoom:.3},_7=({x:e,y:t,width:n,height:r,color:o,strokeColor:i,strokeWidth:s,borderRadius:l})=>{const c=e+n/2,u=t+r/2;return(0,a.createElement)("rect",{x:c-160,y:u-120,width:320,height:240,fill:o,stroke:i,strokeWidth:s,rx:l,ry:l})};function I7({renderCb:e}){const[{steps:t,flow_type:n,flow_id:r,flow_analytics:o,emptySteps:i},s]=SU(),[{},l]=p(),c=(0,a.useMemo)(()=>wcfCartflowsPro()?t:t.filter(e=>"upsell"!==e.type&&"downsell"!==e.type),[t]),[u,d]=(0,a.useState)(""),[f,m]=(0,a.useState)(!1),[h,g]=(0,a.useState)(null),[y,b]=(0,a.useState)("smoothstep"),[v,x]=(0,a.useState)(!0),N=(0,a.useMemo)(()=>({deletable:!0,focusable:!0,selectable:!0,style:{stroke:"#4B5563",strokeWidth:1},markerEnd:{type:m0.ArrowClosed,width:40,height:40,color:"#f06434"},data:{edgeStyle:y}}),[y]),E=""!==u?"wcf-fullscreen":"",M=cartflows_admin.is_rtl?"RL":"LR",_={direction:"initial"},[I,S,j]=function(){const[e,t]=(0,w.useState)([]),n=(0,w.useCallback)(e=>t(t=>$2(e,t)),[]);return[e,t,n]}(),[k,D,C]=function(){const[e,t]=(0,w.useState)([]),n=(0,w.useCallback)(e=>t(t=>X2(e,t)),[]);return[e,t,n]}(),{axis:A,setAxis:T,toggleAxis:O,showMinimap:L,setShowMinimap:P,compact:R,toggleCompact:U}=(({autoCompact:e=!1}={})=>{const[t,n]=(0,a.useState)(y7),[r,o]=(0,a.useState)(w7),[i,s]=(0,a.useState)(b7),l=(0,a.useCallback)(e=>{const t="vertical"===e?"vertical":"horizontal";window.localStorage.setItem(m7,t),n(t)},[]),c=(0,a.useCallback)(()=>{l("horizontal"===y7()?"vertical":"horizontal")},[l]),u=(0,a.useCallback)(e=>{const t=!!e;window.localStorage.setItem(h7,String(t)),o(t)},[]),d=(0,a.useCallback)(e=>{const t=!!e;window.localStorage.setItem(g7,String(t)),s(t)},[]),f=(0,a.useCallback)(()=>{d(!(null===i?e:i))},[i,e,d]);return{axis:t,setAxis:l,toggleAxis:c,showMinimap:r,setShowMinimap:u,compact:null===i?e:i,setCompact:d,toggleCompact:f}})({autoCompact:c.length>12}),[B,F]=(0,a.useState)(0),Y=(0,a.useRef)(A),Z=(0,a.useRef)(R),{fitView:Q,zoomIn:V,zoomOut:W,setCenter:G,getViewport:H}=s4(),{zoom:$}=y2(U5,p2),X=Q2("Escape"),[q,J]=(0,a.useState)(!1),[K,ee]=(0,a.useState)(0),te=()=>{l({status:"SAVED"}),F(e=>e+1),e(),setTimeout(()=>Q(M7),50)};(0,a.useEffect)(()=>{const e=new i7(c,n,r,o,M,A,R),t=e.build(),a=B>0?e.tidy(t.nodes,t.edges):t.nodes,i=t.edges.map(e=>({...e,data:{...e.data,edgeStyle:y}})),s=Y.current!==A;Y.current=A;const l=Z.current!==R;Z.current=R;const u=B>0||s||l;S(e=>{if(u)return a;const t=new Map(e.map(e=>[e.id,e.position]));return a.map(e=>e.id.startsWith("wcf_node_edge_")&&t.has(e.id)?{...e,position:t.get(e.id)}:e)}),D(i)},[c,n,r,o,M,A,R,B,S,D]);const ne=(0,a.useCallback)(t=>{new s7(c,n,r,I,k,D,g,s,l,e).handleConnect(t)},[c,n,r,I,k,D,s,l,e]),re=(0,a.useCallback)(t=>{new c7(k,D,C,c,s,r,l,e).handleEdgeChanges(t)},[k,D,C,c,s,r,l,e]);(0,a.useEffect)(()=>{D(e=>e.map(e=>({...e,data:{...e.data,edgeStyle:y}})))},[y,D]),(0,a.useEffect)(()=>(document.body.classList.add("wcf-flow-overview-screen"),()=>document.body.classList.remove("wcf-flow-overview-screen")),[]),(0,a.useEffect)(()=>{X&&"fullscreen"===u&&(d(""),Q(M7))},[X,u,Q]),(0,a.useEffect)(()=>{const e=e=>{const t=e.key,n=e.target?.tagName;if("INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n&&!e.target?.isContentEditable){if(e.metaKey||e.ctrlKey)return"d"===t.toLowerCase()?(e.preventDefault(),void ee(e=>e+1)):"/"===t?(e.preventDefault(),void J(e=>!e)):void 0;if(e.altKey||e.shiftKey)"?"===t&&(e.preventDefault(),J(e=>!e));else switch(t.toLowerCase()){case"f":e.preventDefault(),Q(M7);break;case"t":e.preventDefault(),te();break;case"v":e.preventDefault(),O(),setTimeout(()=>Q(M7),50);break;case"m":e.preventDefault(),P(!L);break;case"c":e.preventDefault(),U(),setTimeout(()=>Q(M7),50);break;case"+":case"=":e.preventDefault(),V({duration:200});break;case"-":e.preventDefault(),W({duration:200})}}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[Q,V,W,O,U,L,P]),(0,a.useEffect)(()=>{if(!K)return;const e=I.find(e=>e.selected&&e.id?.startsWith("wcf_node_edge_"));if(!e)return;const t=e.data?.step_id;if(!t)return;const n=!!e.data?.isABTestVariation;O3.cloneStepRequest({stepId:t,flowId:e.data?.flow_id||r,action:n?"cartflows_clone_ab_test_step":"cartflows_clone_step",controlId:e.data?.control_id}).then(e=>{!1!==e?.success&&window.location.reload()})},[K,I,r]);const oe=()=>{d("fullscreen"),m(!0),setTimeout(()=>{m(!1)},3e3),Q(M7)},ae=()=>{d(""),Q(M7)};return c.length<=0?(0,a.createElement)("div",{className:`wcf-steps-chart wcf-steps-chart--empty flex w-full h-screen items-center justify-center ${E}`,style:_},i?(0,a.createElement)(u7,null):(0,a.createElement)(vL,{variant:"primary",size:"lg"})):(0,a.createElement)("div",{className:`wcf-steps-chart flex justify-center mx-auto h-screen w-full ${E}`,style:_},I.length>0&&(0,a.createElement)(z5,{minZoom:.3,maxZoom:1,nodes:I,edges:k,edgeTypes:v7,colorMode:"light",onNodesChange:j,onEdgesChange:re,onConnect:ne,nodeTypes:x7,snapToGrid:!0,snapGrid:E7,defaultViewport:N7,onInit:e=>{e.fitView(M7)},zoomOnScroll:!1,panOnScroll:!0,panOnScrollMode:"free",elementsSelectable:v,preventScrolling:!1,nodesDraggable:v,nodesConnectable:v,edgesFocusable:!0,reconnectRadius:20,elevateEdgesOnSelect:!0,edgesUpdatable:!1,deleteKeyCode:"Backspace",defaultEdgeOptions:N},(0,a.createElement)(W5,{variant:"dots",gap:16,size:1,color:"#d1d5db"}),L&&(0,a.createElement)(c3,{pannable:!0,zoomable:!0,position:cartflows_admin.is_rtl?"bottom-left":"bottom-right",bgColor:"#ffffff",nodeColor:"#ffedd5",nodeStrokeColor:"#fdba74",nodeStrokeWidth:1,nodeBorderRadius:3,nodeComponent:_7,maskColor:"rgba(240, 100, 52, 0.04)",maskStrokeColor:"#fdba74",maskStrokeWidth:.5,onClick:(e,t)=>{G(t.x,t.y,{zoom:H().zoom,duration:400})},style:{width:160,height:100,border:"1px solid #ffedd5",borderRadius:"6px",boxShadow:"0 2px 8px rgba(240, 100, 52, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04)"}}),(0,a.createElement)(S2,{position:"top-right",className:"flex flex-col items-end gap-2"},(0,a.createElement)("div",{className:"inline-flex items-center gap-0.5 bg-background-primary border border-solid border-border-subtle rounded-md p-1 shadow-sm"},(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Vertical Layout","cartflows"),placement:"left"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,a.createElement)(eq,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,z.__)("Vertical Layout","cartflows"),onClick:()=>{"vertical"!==A&&(T("vertical"),setTimeout(()=>Q(M7),50))}})),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Horizontal Layout","cartflows"),placement:"left"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,a.createElement)(tq,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,z.__)("Horizontal Layout","cartflows"),onClick:()=>{"horizontal"!==A&&(T("horizontal"),setTimeout(()=>Q(M7),50))}}))),(0,a.createElement)("div",{className:"inline-flex flex-col items-center gap-0.5 bg-background-primary border border-solid border-border-subtle rounded-md p-1 shadow-sm"},(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:v?(0,z.__)("Lock Interaction","cartflows"):(0,z.__)("Unlock Interaction","cartflows"),placement:"left"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hidden hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:v?(0,a.createElement)(nq,{className:"!fill-[none] stroke-[1.5]"}):(0,a.createElement)(rq,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":v?(0,z.__)("Lock Interaction","cartflows"):(0,z.__)("Unlock Interaction","cartflows"),onClick:()=>x(!v)})),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:"smoothstep"===y?(0,z.__)("Switch to Wavy Edges","cartflows"):(0,z.__)("Switch to Smooth Edges","cartflows"),placement:"left"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:"smoothstep"===y?(0,a.createElement)(oq,{className:"!fill-[none] stroke-[1.5]"}):(0,a.createElement)(aq,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,z.__)("Edge Style","cartflows"),onClick:()=>{b(e=>"smoothstep"===e?"bezier":"smoothstep")}})),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Tidy Layout","cartflows"),placement:"left"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,a.createElement)(iq,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,z.__)("Tidy Layout","cartflows"),onClick:te})),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Fit View","cartflows"),placement:"left"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hidden hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,a.createElement)(sq,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,z.__)("Fit View","cartflows"),onClick:()=>Q(M7)})),(()=>{const e="fullscreen"===u;return(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:e?(0,z.__)("Exit Full Screen","cartflows"):(0,z.__)("Full Screen","cartflows"),placement:"left"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:e?(0,a.createElement)(JX,{className:"!fill-[none] stroke-[1.5]"}):(0,a.createElement)(KX,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":e?(0,z.__)("Exit Full Screen","cartflows"):(0,z.__)("Full Screen","cartflows"),onClick:e?ae:oe}))})(),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Keyboard Shortcuts (?)","cartflows"),placement:"left"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,a.createElement)(lq,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,z.__)("Keyboard Shortcuts","cartflows"),onClick:()=>J(!0)})))),(0,a.createElement)(S2,{position:"bottom-left"},(0,a.createElement)("div",{className:"inline-flex items-center gap-0.5 bg-background-primary border border-solid border-border-subtle rounded-md p-1 shadow-sm"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",onClick:()=>Q(M7)},(0,z.__)("Fit","cartflows")),(0,a.createElement)("div",{className:"w-px h-4 bg-border-subtle","aria-hidden":"true"}),(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,a.createElement)(HO,{className:"stroke-[1.5]"}),"aria-label":(0,z.__)("Zoom Out","cartflows"),onClick:()=>W({duration:200})}),(0,a.createElement)(Ch,{size:12,weight:600,className:"tabular-nums min-w-[44px] text-center"},Math.round(100*$),"%"),(0,a.createElement)(Wo,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,a.createElement)(zL,{className:"stroke-[1.5]"}),"aria-label":(0,z.__)("Zoom In","cartflows"),onClick:()=>V({duration:200})}))),f&&(0,a.createElement)(S2,{position:"top-center",className:"wcf-steps-chart__exit-screen-msg"},(0,z.__)("Press ESC to exit full screen.","cartflows")),h&&(0,a.createElement)(S2,{position:"top-center",className:"wcf-steps-chart__error-msg"},h)),(0,a.createElement)(p7,{open:q,onClose:()=>J(!1)}))}const S7=function(e){return(0,a.createElement)(T5,null,(0,a.createElement)(I7,e))},j7=function({renderCb:e}){return(0,a.createElement)("div",{className:"wcf-steps-page-wrapper border-t border-border-subtle -mt-px"},(0,a.createElement)(S7,{renderCb:e}))};function k7({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M16.28 11.47a.75.75 0 0 1 0 1.06l-7.5 7.5a.75.75 0 0 1-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 0 1 1.06-1.06l7.5 7.5Z",clipRule:"evenodd"}))}const D7=w.forwardRef(k7),C7=e=>{var t;const{steps:n}=e,[r,o]=(0,a.useState)(""),[i,s]=(0,a.useState)(""),[{flow_id:l,flow_title:c,flow_type:u},d]=SU(),f=(0,g.useHistory)(),p=null!==(t=new URLSearchParams((0,g.useLocation)()?.search).get("automation"))&&void 0!==t?t:"";(0,a.useEffect)(()=>{const e=n.find(e=>e.id===parseInt(p));e&&(o(e.title),s(e.type))},[p,n]);return(0,a.useEffect)(()=>{r&&(()=>{const e=new window.FormData;e.append("action","cartflows_get_suretriggers_data"),e.append("security",cartflows_admin.get_suretriggers_data_nonce),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e&&e?.success&&e?.data?.connected&&(e=>{if(e&&c){let t=[];switch(i){case"upsell":t=["cartflows_upsell_offer_accepted","cartflows_upsell_offer_rejected","cartflows_upsell_offer_skipped"];break;case"checkout":t=["wcf_order_bump_item_added","wcf_order_bump_item_removed","wcf_pre_checkout_offer_item_added","wcf_order_bump_item_replaced"];break;case"downsell":t=["cartflows_downsell_offer_accepted","cartflows_downsell_offer_rejected","cartflows_downsell_offer_skipped"]}e.embedded_identifier=p,t&&t.length>0&&(e.allowed_events={CartFlows:{triggers:t}}),e.selected_options={funnel_id:{value:l,label:c},funnel_step_id:{value:p,label:r}},d({type:"SET_SURETRIGGERS_CONFIG",config:e})}})(e?.data?.data)})})()},[r]),(0,a.createElement)(hX,{open:""!==p,setOpen:e=>{e||f.push("storeCheckout"===u?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${l}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${l}`)},position:"right",exitOnClickOutside:!0,exitOnEsc:!1,className:"wcf-funnel-step-setting--slide-out"},(0,a.createElement)(hX.Panel,{className:"pointer-events-auto w-screen max-w-4.5xl relative top-1"},(0,a.createElement)(hX.Backdrop,null),(0,a.createElement)("div",{className:"wcf-slide-out-panel--close bg-background-primary absolute -left-10"},(0,a.createElement)(C,{key:"close",to:{pathname:"admin.php",search:"storeCheckout"===u?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${l}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${l}`},className:"flex justify-center items-center p-2.5 text-text-tertiary hover:text-text-secondary outline-none focus:outline-none shadow-none focus:shadow-none"},(0,a.createElement)("button",{type:"button",onClick:()=>{o("")}},(0,a.createElement)(jV,{className:"w-5 h-5","aria-hidden":"true"})))),(0,a.createElement)(hX.Body,{className:"wcf-slide-out-panel--content-body flex h-full flex-col overflow-y-scroll bg-background-primary shadow-xl !p-0"},!1,(0,a.createElement)("form",null,(0,a.createElement)(hX.Header,{className:"wcf-slide-out-panel--header flex justify-between px-6 py-5 !space-y-0"},(0,a.createElement)("div",{className:"wcf-slide-out-panel--step-title"},(0,a.createElement)(hX.Title,{className:"text-lg font-medium text-text-primary"},(0,z.__)("Automation for","cartflows"),":"," ",r))),(0,a.createElement)("div",{className:"wcf-slide-out-panel--settings flex-1 p-8 border-t border-border-subtle px-6"},(0,a.createElement)("div",{id:"suretriggers-iframe-wrapper",style:{width:"100%",height:"80vh"}}))))))},A7=function({flowId:e,flowType:t,showConnectorLines:n=!0,tooltipPlacement:r="right"}){const o="storeCheckout"===t?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e}&tab=library`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e}&tab=library`;return(0,a.createElement)("div",{className:"wcf-add-step-connector flex flex-col items-center"},n&&(0,a.createElement)("div",{className:"w-px h-4 bg-background-secondary"}),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Add New Step","cartflows"),placement:r},(0,a.createElement)(C,{to:{pathname:"admin.php",search:o},className:"wcf-add--new-step-connector inline-flex items-center justify-center w-7 h-7 rounded-full border border-solid border-border-subtle bg-background-primary hover:shadow-md hover:bg-background-secondary no-underline"},(0,a.createElement)(QU,{className:"w-3.5 h-3.5 stroke-2 text-text-secondary","aria-hidden":"true"}))),n&&(0,a.createElement)("div",{className:"w-px h-4 bg-background-secondary"}))},T7=Fo("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),O7=function({fromDate:e,toDate:t,onBack:n,onDateChange:r,showDateFilter:o=!0}){return(0,a.createElement)(Eh,{containerType:"flex",justify:"between",align:"center",gap:"none",className:"mt-0 mb-6 cursor-pointer"},(0,a.createElement)(Eh,{containerType:"flex",align:"center",gap:"sm"},(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Back to Steps","cartflows"),placement:"top"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",onClick:n,className:"text-text-secondary hover:text-text-primary"},(0,a.createElement)(T7,{className:"w-5 h-5 !cursor-pointer",strokeWidth:2}))),(0,a.createElement)(_h,{tag:"h3",size:"sm",title:(0,z.__)("Analytics","cartflows")})),o&&(0,a.createElement)(vZ,{value:{startDate:e,endDate:t},onChangeCB:r,fieldParentWrapperClass:""}))},L7=Fo("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),z7=Fo("CircleDollarSign",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]),P7=Fo("Banknote",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]]),R7=Fo("Gift",[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]]),U7=Fo("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]),B7=function({label:e,tooltip:t,value:n,icon:r}){return(0,a.createElement)("div",{className:"bg-[rgba(254, 248, 245, 0.35)] border border-solid border-brand-100 rounded-lg p-5 flex flex-col justify-between gap-3"},(0,a.createElement)("div",{className:"flex items-center justify-between"},(0,a.createElement)("div",{className:"flex items-center gap-1"},(0,a.createElement)(Ch,{as:"span",size:14,weight:400,color:"primary"},e),t&&(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:t,placement:"top"},(0,a.createElement)(Yo,{className:"w-3.5 h-3.5 text-text-tertiary cursor-help flex-shrink-0",strokeWidth:2}))),(0,a.createElement)("div",{className:"flex items-center p-2 rounded-lg bg-brand-25 border border-solid border-brand-100"},r)),(0,a.createElement)(Ch,{as:"div",size:24,weight:600,color:"primary"},null!=n?n:0))},F7={className:"w-5 h-5 text-brand-500",strokeWidth:1.5},Y7=e=>e?Vh(e.toString()):0,Z7=function({revenue:e,totalVisitors:t,loading:n}){var r;const o=[[(0,z.__)("Total Visitors","cartflows"),(0,z.__)("Sum of all step views in this funnel.","cartflows"),t,L7],[(0,z.__)("Total Orders","cartflows"),(0,z.__)("Total number of orders.","cartflows"),null!==(r=e?.order_count)&&void 0!==r?r:0,L6],[(0,z.__)("Total Revenue","cartflows"),(0,z.__)("Grand total of all orders.","cartflows"),Y7(e?.gross_sale),z7],[(0,z.__)("Average Order Value","cartflows"),(0,z.__)("Average total of every order.","cartflows"),Y7(e?.avg_order_value),P7],[(0,z.__)("Bump Offer Revenue","cartflows"),(0,z.__)("Grand total of all order bumps.","cartflows"),Y7(e?.bump_offer),R7],[(0,z.__)("Offers Revenue","cartflows"),(0,z.__)("Total upsell/downsell revenue.","cartflows"),Y7(e?.upsell_revenue),L6],[(0,z.__)("Revenue Per Visit","cartflows"),(0,z.__)("Revenue per visit.","cartflows"),Y7(e?.revenue_per_visit),Lh],[(0,z.__)("RPUV","cartflows"),(0,z.__)("Revenue per unique visitor.","cartflows"),Y7(e?.revenue_per_unique_visits),U7]];return(0,a.createElement)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 mb-6"+(n?" opacity-50 pointer-events-none":"")},o.map(([e,t,n,r])=>(0,a.createElement)(B7,{key:e,label:e,tooltip:t,value:n,icon:(0,a.createElement)(r,F7)})))},Q7=["thankyou","optin","landing"],V7=(e,t,n)=>{var r;if(!e||Q7.includes(t))return"-";const o=null!==(r=e.revenue)&&void 0!==r?r:0;return n?`${window?.cartflows_admin?.woo_currency||""}${o}`:Vh(String(o))},W7=(e,t,n=!1)=>{var r,o,a,i;if(!e)return["-","-","-","-","-"];const s="thankyou"===t;return[null!==(r=e.total_visits)&&void 0!==r?r:0,null!==(o=e.unique_visits)&&void 0!==o?o:0,s?"-":null!==(a=e.conversions)&&void 0!==a?a:0,s?"-":`${null!==(i=e.conversion_rate)&&void 0!==i?i:0} %`,V7(e,t,n)]},G7=[(0,z.__)("Step","cartflows"),(0,z.__)("Total Visits","cartflows"),(0,z.__)("Unique Visits","cartflows"),(0,z.__)("Conversions","cartflows"),(0,z.__)("Conversion rate","cartflows"),(0,z.__)("Revenue","cartflows")],H7=({children:e})=>(0,a.createElement)(Ch,{as:"span",size:14,weight:500,color:"primary"},e),$7=({cells:e,rowKey:t})=>e.map((e,n)=>(0,a.createElement)(SQ.Cell,{key:`${t}-c-${n}`},e)),X7=({rowKey:e,label:t,cells:n,rowClass:r=""})=>(0,a.createElement)(SQ.Row,{className:r},(0,a.createElement)(SQ.Cell,null,t),(0,a.createElement)($7,{cells:n,rowKey:e})),q7=({rowKey:e,data:t})=>{var n;return(0,a.createElement)(X7,{rowKey:e,label:(0,a.createElement)(H7,null,null!==(n=t.visits?.title)&&void 0!==n?n:""),cells:W7(t.visits,t.type)})},J7=({rowKey:e,data:t,isExpanded:n,onToggle:r})=>{var o;const i=n?Gp:oB;return(0,a.createElement)(X7,{rowKey:e,label:(0,a.createElement)("button",{type:"button",className:"flex items-center gap-2 bg-transparent border-0 p-0 cursor-pointer",onClick:r,"aria-expanded":n,"aria-label":n?(0,z.__)("Collapse variations","cartflows"):(0,z.__)("Expand variations","cartflows")},(0,a.createElement)(i,{className:"w-4 h-4 text-text-tertiary",strokeWidth:2}),(0,a.createElement)(H7,null,null!==(o=t.visits?.title)&&void 0!==o?o:"")),cells:W7(t.visits,t.type)})},K7=({rowKey:e,data:t,stepId:n,variation:r,vIdx:o})=>{const i=((e,t,n)=>{const r=String(e)===String(t);return{isControl:r,label:r?(0,z.__)("Control","cartflows"):(0,z.sprintf)(/* translators: %d: variation index */ /* translators: %d: variation index */ |
| 72 |
(0,z.__)("Variation-%d","cartflows"),n),variant:r?"red":"neutral"}})(n,t.id,o);return(0,a.createElement)(X7,{rowKey:e,rowClass:"bg-background-secondary",label:(0,a.createElement)("div",{className:"flex items-center gap-2 pl-6"},(0,a.createElement)(H7,null,r?.title||"-"),(0,a.createElement)(na,{label:i.label,size:"xs",variant:i.variant,type:"rounded",disableHover:!0})),cells:W7(r,t.type,!0)})},eee=({rowKey:e,data:t,variation:n})=>(0,a.createElement)(X7,{rowKey:e,rowClass:"bg-background-secondary",label:(0,a.createElement)("div",{className:"flex items-center gap-2 pl-6"},(0,a.createElement)(H7,null,n?.title||"-"),n?.archived_date&&(0,a.createElement)(na,{label:n.archived_date,size:"xs",variant:"inverse",type:"rounded",disableHover:!0})),cells:W7(n,t.type,!0)}),tee=()=>(0,a.createElement)(SQ.Row,null,(0,a.createElement)(SQ.Cell,null,(0,a.createElement)(Ch,{as:"span",size:14,color:"secondary"},(0,z.__)("No analytics data available yet.","cartflows"))),Array(G7.length-1).fill("-").map((e,t)=>(0,a.createElement)(SQ.Cell,{key:t},e))),nee=function({allSteps:e}){const[t,n]=function(){const[e,t]=(0,a.useState)(()=>new Set),n=(0,a.useCallback)(e=>{t(t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return[e,n]}(),r=e?.length?e.flatMap((e,r)=>((e,t,n,r)=>{const o=e.id||`step-${t}`,{variations:i,archived:s,isAbStep:l}=(e=>{const t=e?.["visits-ab"]?Object.entries(e["visits-ab"]):[],n=e?.["visits-ab-archived"]?Object.entries(e["visits-ab-archived"]):[];return{variations:t,archived:n,isAbStep:t.length>0||n.length>0}})(e);if(!l)return[(0,a.createElement)(q7,{key:o,rowKey:o,data:e})];const c=n.has(o),u=[(0,a.createElement)(J7,{key:o,rowKey:o,data:e,isExpanded:c,onToggle:()=>r(o)})];return c?(i.forEach(([t,n],r)=>{const i=`${o}-ab-${t}`;u.push((0,a.createElement)(K7,{key:i,rowKey:i,data:e,stepId:t,variation:n,vIdx:r}))}),s.forEach(([t,n])=>{const r=`${o}-arc-${t}`;u.push((0,a.createElement)(eee,{key:r,rowKey:r,data:e,variation:n}))}),u):u})(e,r,t,n)):(0,a.createElement)(tee,null);return(0,a.createElement)("div",{className:"bg-background-primary border border-border-subtle rounded-lg overflow-hidden mb-6"},(0,a.createElement)(SQ,null,(0,a.createElement)(SQ.Head,null,G7.map(e=>(0,a.createElement)(SQ.HeadCell,{key:e},e))),(0,a.createElement)(SQ.Body,null,r)))},ree=()=>"undefined"!=typeof cartflows_admin&&cartflows_admin?.woo_currency||"$",oee=()=>{const e=ree();return{order_count:"1,284",gross_sale:`${e}48,240`,avg_order_value:`${e}37.56`,bump_offer:`${e}6,820`,upsell_revenue:`${e}9,410`,revenue_per_visit:`${e}3.86`,revenue_per_unique_visits:`${e}6.12`}},aee=()=>{const e=ree();return[{id:"dummy-landing",type:"landing",visits:{title:(0,z.__)("Landing Page","cartflows"),total_visits:"4,120",unique_visits:"3,540",conversions:"2,180",conversion_rate:"52.9",revenue:"-"}},{id:"dummy-checkout",type:"checkout",visits:{title:(0,z.__)("Checkout","cartflows"),total_visits:"2,180",unique_visits:"1,960",conversions:"1,284",conversion_rate:"58.9",revenue:`${e}48,240`}},{id:"dummy-thankyou",type:"thankyou",visits:{title:(0,z.__)("Thank You","cartflows"),total_visits:"1,284",unique_visits:"1,190",conversions:"-",conversion_rate:"-",revenue:"-"}}]},iee=function(){return(0,a.createElement)("div",{className:"relative overflow-hidden rounded-lg"},(0,a.createElement)("div",{className:"blur-[3px] pointer-events-none select-none","aria-hidden":"true"},(0,a.createElement)(Z7,{revenue:oee(),totalVisitors:"12,485",loading:!1}),(0,a.createElement)(nee,{allSteps:aee()})),(0,a.createElement)("div",{className:"absolute inset-0 z-10 bg-background-primary/40 pointer-events-none flex items-center justify-center px-4"},(0,a.createElement)(ZO,{title:(0,z.__)("Track Every Step's Performance","cartflows"),description:(0,z.__)("Know exactly which steps convert and which lose customers. Upgrade to CartFlows Pro for views, conversions, and revenue per step.","cartflows"),containerClass:"pointer-events-auto",innerContainerClass:"border border-border-subtle shadow-lg p-8 rounded-lg max-w-md w-full text-center bg-background-primary"})))},see=function({onBack:e}){const[{flow_analytics:t,flow_id:n},r]=SU(),o=(0,P.applyFilters)("cartflows.flowEditor.stepsAnalytics",null);return(0,a.createElement)("div",{className:"wcf-steps-analytics relative bg-background-primary p-6 shadow-sm border border-border-subtle border-solid rounded-lg"},o?(0,a.createElement)(o,{onBack:e,flowId:n,flowAnalytics:t,onAnalyticsChange:e=>r({type:"SET_FLOW_ANALYTICS",flow_analytics:e})}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(O7,{onBack:e,showDateFilter:!1}),(0,a.createElement)(iee,null)))},lee=Fo("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]),cee=function(){const[{flow_analytics:e}]=SU(),[{license_status:t}]=p(),[n,r]=(0,a.useState)(!1);if(e)return null;const o="function"==typeof wcfCartflowsPro&&wcfCartflowsPro()&&"Activated"!==t;let i,s,l,c;return o?(i=(0,z.__)("Activate your license to unlock analytics","cartflows"),s=(0,z.__)("Your CartFlows Pro license isn't active yet. Activate it to see views, conversions, and revenue per step.","cartflows"),l=(0,z.__)("Activate License","cartflows"),c=cartflows_admin?.license_popup_url):(i=(0,z.__)("See Every Step's Performance:","cartflows"),s=(0,z.__)("Know exactly which steps win and which lose. Upgrade to Pro and track views, conversions, and revenue per step.","cartflows"),l=(0,z.__)("Upgrade to Pro","cartflows"),c=getUpgradeToProUrl()),(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-pro-nudge--notice flex justify-center mb-5"},(0,a.createElement)("div",{className:"wcf-pro-nudge--notice-columns flex items-center justify-between w-full border border-brand-200 border-solid p-3 rounded-lg bg-brand-25 gap-3"},(0,a.createElement)("div",{className:"wcf-pro-nudge--notice-column-left flex items-center gap-3 min-w-0"},(0,a.createElement)("div",{className:"flex p-1 border border-solid border-brand-200 rounded-md"},(0,a.createElement)(lee,{className:"text-brand-500 h-4 w-4"})),(0,a.createElement)("div",{className:"flex min-w-0"},(0,a.createElement)("span",{className:"text-text-primary text-sm font-semibold mr-0.5"},i),(0,a.createElement)(Ch,{as:"span",size:14,color:"secondary",className:"truncate"},s),o?(0,a.createElement)(Wo,{tag:"a",href:c,target:"_blank",rel:"noreferrer",variant:"link",size:"sm",icon:(0,a.createElement)(zp,null),iconPosition:"right",className:"no-underline !text-sm focus:outline-none focus:ring-0"},l):(0,a.createElement)(Wo,{variant:"link",size:"sm",icon:(0,a.createElement)(zp,null),iconPosition:"right",className:"no-underline !text-sm focus:outline-none focus:ring-0",onClick:()=>r(!0)},l))))),(0,a.createElement)(zh,{feature:"analytics",open:n,setOpen:r}))},uee=function(e){const{type:t}=e,[{flow_id:n,title:r,steps:o,global_checkout:i,status:s},l]=SU(),[c,u]=(0,a.useState)(!1),d=(0,z.__)("Save","cartflows"),[f,p]=(0,a.useState)({saveBtnString:d,saveBtnProcess:!1}),{saveBtnString:m,saveBtnProcess:h}=f,g=!!Number.isInteger(i),y=Number.isInteger(i)?"disable":"enable",[w,b]=((0,z.__)("Disable Store Checkout","cartflows"),(0,z.__)("Enable Store Checkout","cartflows"),(0,a.useState)(s||"draft")),[v,x]=(0,a.useState)(g),[N,E]=(0,a.useState)(!1),[M,_]=(0,a.useState)(y),I=(0,a.createRef)(),S=BV();let j="";if("storeCheckout"===t)for(let e=0;e<o.length;e++)if("checkout"===o[e].type){j=o[e].id;break}(0,a.useEffect)(()=>{b(s||"draft")},[s]),(0,a.useEffect)(()=>{c&&I.current?.focus()},[c]);const k=function(e){e.preventDefault(),u(!0)},D=function(e){e.preventDefault(),p({saveBtnString:(0,z.__)("Saving…","cartflows"),saveBtnProcess:"processing"});const t=I.current.value,r=new window.FormData;r.append("action","cartflows_update_flow_title"),r.append("security",cartflows_admin.update_flow_title_nonce),r.append("flow_id",n),r.append("new_flow_title",t),L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{l({type:"SET_FLOW_TITLE",title:t}),p({saveBtnString:(0,z.__)("Saved","cartflows"),saveBtnProcess:"saved"}),Vm.success((0,z.__)("Funnel title updated successfully!","cartflows")),setTimeout(()=>{p({saveBtnString:d,saveBtnProcess:!1}),u(!1)},3e3)})},C=function(e){e.preventDefault(),u(!1)};if(!1===r)return(0,a.createElement)("div",{className:"wcf-edit-flow__title-wrap animate-pulse"},(0,a.createElement)("div",{className:"wcf-flows-header--title wcf-step__title--editable flex gap-2.5 items-center"},(0,a.createElement)("span",{className:"h-3 w-full bg-background-secondary rounded-md px-10 block"})));const A=[{value:"draft",label:(0,z.__)("Draft","cartflows")},{value:"publish",label:(0,z.__)("Publish","cartflows")}];return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-edit-flow__title-wrap w-full"},(0,a.createElement)("div",{className:"wcf-flows-header--title wcf-step__title--editable flex gap-2.5 items-center"},function(){let e=r;""===r&&(e=(0,z.__)("(no title)","cartflows"));let t=ug(e,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length),n=(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Edit Title","cartflows"),placement:"top"},(0,a.createElement)(Wo,{variant:"ghost",size:"md",className:"wcf-flows-header__title--edit",onClick:k,icon:(0,a.createElement)(zX,{className:"w-5.5 h-5.5 stroke-1","aria-hidden":"true"})}));if(c){t=(0,a.createElement)(Ym,{ref:I,id:"new-flow-title",defaultValue:r,autoComplete:"off",size:"sm",className:"wcf-flow-title-input [&>input]:!py-1.5"});let e=null;"processing"===h?e=(0,a.createElement)(vL,{variant:"primary",size:"sm"}):"saved"===h&&(e=(0,a.createElement)(zW,{className:"w-4 h-4 stroke-2"})),n=(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"primary",size:"sm",className:"!py-1.5",onClick:D,disabled:"processing"===h,icon:e,iconPosition:"left"},m),(0,a.createElement)(Wo,{variant:"outline",size:"sm",className:"!py-1.5",onClick:C},(0,z.__)("Cancel","cartflows")))}return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"wcf-flows-header__title--text text-text-primary text-lg sm:text-2xl font-semibold",title:e},t),(0,a.createElement)("span",{className:"wcf-flows-header__title--buttons flex gap-3"},n))}(),"flows"===t&&!c&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"divider h-5 w-px bg-background-secondary"}),(0,a.createElement)("div",{className:"wcf-status-toggle inline-flex items-center border border-solid border-border-subtle p-1 rounded-3xl"},A.map(e=>(0,a.createElement)("button",{key:`status-${e.value}`,type:"button",className:"wcf-status-toggle__btn inline-flex items-center gap-1 px-3 py-1 text-sm cursor-pointer border-0 "+(e.value===w?"font-medium text-text-primary bg-background-primary rounded-3xl shadow-sm":"font-normal text-text-secondary bg-transparent hover:text-text-primary"),onClick:t=>{e.value!==w&&async function(e){e.preventDefault();let t=!1,r="";switch(w){case"draft":case"private":t=await S({title:"Publish Funnel",description:(0,z.__)("Do you really want to publish this funnel?","cartflows"),actionBtnText:(0,z.__)("Publish","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")}),r="publish",window.wcfAction="restoreFlow";break;case"publish":t=await S({title:(0,z.__)("Draft Funnel","cartflows"),description:(0,z.__)("Do you really want to draft this funnel?","cartflows"),actionBtnText:(0,z.__)("Switch to Draft","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")}),r="draft",window.wcfAction="draftFlow"}if(!t)return;const o=new window.FormData;o.append("action","cartflows_update_status"),o.append("security",cartflows_admin.update_status_nonce),o.append("flow_id",n),o.append("new_status",r),(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:o}).then(e=>{e.success&&(b(r),Vm.success("publish"===r?(0,z.__)("Funnel published!","cartflows"):(0,z.__)("Funnel moved to draft!","cartflows")))}))}(t)}},e.value===w&&(0,a.createElement)(zW,{className:"w-4 h-4 stroke-2"}),e.label)))),"storeCheckout"===t&&!c&&(0,a.createElement)("div",{className:"wcf-store-checkout_status--container flex items-center gap-4"},(0,a.createElement)("span",{className:"divider w-px h-5 bg-background-secondary"}),(0,a.createElement)(nL,{value:v,onChange:()=>(()=>{const e=new window.FormData;E(!0),e.append("action","cartflows_update_store_checkout_status"),e.append("security",cartflows_admin.update_store_checkout_status_nonce),e.append("checkout_id",j),e.append("enable_store_checkout",!v),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.success&&(x(!v),E(!1),l({type:"SET_GLOBAL_CHECKOUT",global_checkout:e.data.checkout_id}),"enable"===M?(_("disable"),Vm.success((0,z.__)("Store Checkout enabled!","cartflows"))):(_("enable"),Vm.success((0,z.__)("Store Checkout disabled!","cartflows"))))})})(),size:"sm",label:{heading:(0,z.__)("Enable Store Checkout","cartflows")}}),N&&(0,a.createElement)(vL,{variant:"primary",size:"sm"})))))};function dee({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.098 19.902a3.75 3.75 0 0 0 5.304 0l6.401-6.402M6.75 21A3.75 3.75 0 0 1 3 17.25V4.125C3 3.504 3.504 3 4.125 3h5.25c.621 0 1.125.504 1.125 1.125v4.072M6.75 21a3.75 3.75 0 0 0 3.75-3.75V8.197M6.75 21h13.125c.621 0 1.125-.504 1.125-1.125v-5.25c0-.621-.504-1.125-1.125-1.125h-4.072M10.5 8.197l2.88-2.88c.438-.439 1.15-.439 1.59 0l3.712 3.713c.44.44.44 1.152 0 1.59l-2.879 2.88M6.75 17.25h.008v.008H6.75v-.008Z"}))}const fee=w.forwardRef(dee);function pee({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.42 15.17 17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z"}))}const mee=w.forwardRef(pee),hee=function(){return(0,a.createElement)("div",{className:"wcf-flow-settings-view flex gap-6 items-start w-full"},(0,a.createElement)("div",{className:"wcf-flow-settings--sidebar h-full min-h-screen flex flex-col w-auto sticky top-0 lg:top-4 sidebar after:content-[''] after:fixed after:left-0 after:top-0 after:w-16 lg:after:w-[254px] after:h-screen after:bg-background-primary after:-z-10"},(0,a.createElement)("div",{className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none box-border flex-grow bg-background-primary border-0 border-r border-solid border-border-subtle"},(0,a.createElement)("div",{className:"flex flex-col gap-0.5 pt-2"},["w-28","w-24","w-20"].map((e,t)=>(0,a.createElement)("div",{key:t,className:"flex items-center gap-2.5 px-3 py-2 lg:justify-start justify-center"},(0,a.createElement)(WO,{className:"w-5 h-5 rounded"}),(0,a.createElement)(WO,{className:`h-3 ${e} lg:block hidden`})))))),(0,a.createElement)("div",{className:"min-w-0 max-w-3xl p-8 mx-auto w-full flex flex-col gap-3"},(0,a.createElement)("div",{className:"flex items-center gap-2 py-1"},(0,a.createElement)(WO,{className:"w-14 h-2.5"}),(0,a.createElement)(WO,{className:"w-2 h-2.5"}),(0,a.createElement)(WO,{className:"w-20 h-2.5"}),(0,a.createElement)(WO,{className:"w-2 h-2.5"}),(0,a.createElement)(WO,{className:"w-28 h-2.5"})),(0,a.createElement)("div",{className:"flex justify-between items-center h-10"},(0,a.createElement)("div",{className:"flex items-center gap-2.5"},(0,a.createElement)(WO,{className:"w-5 h-5 rounded"}),(0,a.createElement)(WO,{className:"w-40 h-5"})),(0,a.createElement)(WO,{className:"w-28 h-9 rounded-lg"})),(0,a.createElement)("div",{className:"bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm overflow-hidden mb-8 p-6 flex flex-col gap-5"},(0,a.createElement)(WO,{className:"w-32 h-4"}),["w-28","w-36","w-24","w-32"].map((e,t)=>(0,a.createElement)("div",{key:t,className:"flex flex-col gap-2"},(0,a.createElement)(WO,{className:`${e} h-3.5`}),(0,a.createElement)(WO,{className:"w-full h-10 rounded-md"}))))))},gee=function({menuItems:e,currentTab:t,onTabChange:n}){return(0,a.createElement)("div",{className:"wcf-flow-settings--sidebar h-full min-h-screen flex flex-col w-auto sticky top-0 lg:top-4 sidebar after:content-[''] after:fixed after:left-0 after:top-0 after:w-16 lg:after:w-[254px] after:h-screen after:bg-background-primary after:-z-10"},(0,a.createElement)(MW,{borderOn:!0,className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none box-border flex-grow"},(0,a.createElement)(MW.Body,{className:"!p-0"},(0,a.createElement)(MW.Item,null,(0,a.createElement)(Xp,{className:"w-full p-0 bg-transparent",size:"md"},(0,a.createElement)("ul",{className:"m-0 p-0 list-none flex flex-col"},e.map(e=>{const r=e.icon;return(0,a.createElement)(Xp.Item,{key:e.slug,active:t===e.slug,onClick:()=>n(e.slug),className:"lg:justify-start justify-center hover:!bg-brand-25 hover:[&>svg]:!text-brand-600 "+(t===e.slug?"!bg-brand-25 !text-text-primary [&>svg]:!text-brand-600":"")},(0,a.createElement)(r,{className:"w-5 h-5"}),(0,a.createElement)("span",{className:"flex-1 lg:block hidden"},e.name))})))))))},yee=function(){const[{license_status:e}]=p(),[t,n]=(0,a.useState)(!1);return wcfCartflowsTypePro()&&"Activated"===e?(0,a.createElement)(GW,{title:(0,z.__)("Update CartFlows Pro to use Instant Checkout","cartflows"),description:(0,z.__)("Instant Checkout is included in your plan. Update CartFlows Pro to the latest version to turn it on.","cartflows")}):wcfCartflowsTypePro()&&"Activated"!==e||"inactive"===cartflows_admin.cf_pro_status&&"pro"===wcfInactivepluginType()?(0,a.createElement)(GW,{title:(0,z.__)("Activate CartFlows Pro to use Instant Checkout","cartflows"),description:(0,z.__)("Your settings are saved. Activate CartFlows Pro and its license to bring the Buy Now popup back to your product pages.","cartflows")}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(GW,{title:(0,z.__)("Let Shoppers Buy in One Click from the Product Page","cartflows"),description:(0,z.__)("Instant Checkout adds a Buy Now button that opens your funnel checkout in a popup. Available on CartFlows Pro.","cartflows"),buttonText:(0,z.__)("Upgrade to Pro","cartflows"),onButtonClick:()=>n(!0)}),(0,a.createElement)(zh,{feature:"instant-checkout",open:t,setOpen:n}))},wee=function({sectionObject:e,flowType:t,buttonRef:n,backUrl:r}){const[{title:o}]=SU(),i=!!e?.is_locked,s="?page=cartflows&path="+("storeCheckout"===t?"store-checkout":"flows");return(0,a.createElement)(Eh,{containerType:"flex",direction:"column",gap:"sm",className:"wcf-flow-settings--content min-w-0 max-w-3xl p-8 mx-auto w-full"},(0,a.createElement)(FX,{size:"sm"},(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Link,{href:`${cartflows_admin.admin_base_url}admin.php${s}`,className:"font-normal"},(0,z.__)("Funnels","cartflows"))),(0,a.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,a.createElement)(D7,{className:"w-3 h-3 stroke-2"})),(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Link,{as:C,to:{pathname:"admin.php",search:r},className:"font-normal"},o||(0,z.__)("(no title)","cartflows"))),(0,a.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,a.createElement)(D7,{className:"w-3 h-3 stroke-2"})),(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Page,null,(0,z.__)("Funnel Settings","cartflows")))),(0,a.createElement)("div",{className:"flex justify-between items-center h-10"},(0,a.createElement)("div",{className:"flex items-center gap-2.5"},(0,a.createElement)(C,{to:{pathname:"admin.php",search:r},className:"text-icon-secondary hover:text-icon-primary no-underline shrink-0 transition-colors","aria-label":(0,z.__)("Back to funnel","cartflows")},(0,a.createElement)(UW,{className:"w-5 h-5 flex stroke-1"})),(0,a.createElement)(uee,null)),!i&&(0,a.createElement)(RL,{id:"wcf-save-flow-settings",ref:n})),(0,a.createElement)(Eh,{containerType:"flex",direction:"column",className:"!gap-5 bg-background-primary border border-solid border-border-subtle rounded-xl shadow-sm mb-8 p-6"},e?.title&&(0,a.createElement)(_h,{title:e.title,tag:"h5",size:"xs",className:"text-text-primary"}),i?(0,a.createElement)(yee,null):(0,a.createElement)(IX,{section:e})))},bee={instant_layout:gG,instant_checkout:lG,funnel_advanced_options:fee,general:mee},vee=function(e){var t;const[{flow_id:n,flow_settings:r,flow_type:o}]=SU(),[,i]=p(),s=(0,a.useRef)(null),l=BV(),[c,u]=(0,a.useState)(null),d=!r||void 0===r.settings,f=(0,a.useMemo)(()=>r?.settings?Object.entries(r.settings).sort(([,e],[,t])=>e.priority-t.priority).map(([e,t])=>({id:e,name:t.title,slug:t.slug,icon:bee[t.slug]||mee})):[],[r]),m=null!==(t=null!=c?c:f[0]?.slug)&&void 0!==t?t:"",h=r?.settings?Object.entries(r.settings).find(([,e])=>e.slug===m):null,g=h?h[1]:null,y="storeCheckout"===o?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${n}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${n}`;return d?(0,a.createElement)(hee,null):(0,a.createElement)("form",{className:"wcf-flow-settings-view flex gap-6 items-start w-full",onSubmit:t=>{t.preventDefault();const r=new window.FormData(t.target);r.append("action","cartflows_save_flow_meta_settings"),r.append("security",cartflows_admin.save_flow_meta_settings_nonce),r.append("flow_id",n),L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{i({status:"SAVED"}),e.renderCb()})}},(0,a.createElement)(gee,{menuItems:f,currentTab:m,onTabChange:async e=>{e!==m&&(await(async()=>!!window.wcfUnsavedChanges&&await l({title:"Save Changes",description:"You have made changes. Do you want to save the changes?",actionBtnText:"Yes",cancelBtnText:"No"}))()&&s.current?.click(),u(e),window.wcfUnsavedChanges=!1)}}),(0,a.createElement)(wee,{currentTab:m,sectionObject:g,flowType:o,buttonRef:s,backUrl:y}))},xee=function(){var e;const[{flow_id:t,steps:n,emptySteps:r,flow_type:o,is_flow_instant_checkout:i,flow_link:s,options:l,title:c},u]=SU(),d=new URLSearchParams((0,g.useLocation)()?.search),f=null!==(e=d.get("step_id"))&&void 0!==e?e:"",m="true"===d.get("flow_settings"),h=BV(),[{canvasMode:y},w]=p(),[b,v]=(0,a.useState)(!1),[x,E]=(0,a.useState)(!1),[M,_]=(0,a.useState)("no"),[I,S]=(0,a.useState)(!1),[j,k]=(0,a.useState)(null),D=(0,a.useRef)(n);(0,a.useEffect)(()=>{D.current=n},[n]);const[A,T]=(0,a.useState)("yes"!==cartflows_admin?.instant_checkout_notice_status);let O=!0;n.length>0&&(O=!1);const P=function(){v(!b)};(0,a.useEffect)(()=>{let e=!0;return(async()=>{L()({path:`/cartflows/v1/admin/flow-data/${t}`}).then(t=>{e&&u({type:"SET_FLOW_DATA",data:t})})})(),()=>{e=!1}},[b]);const R=()=>{const e=t,n=[];D.current.map(e=>(n.push(e.id),""));const r=new window.FormData;r.append("action","cartflows_reorder_flow_steps"),r.append("security",cartflows_admin.reorder_flow_steps_nonce),r.append("step_ids",n),r.append("post_id",e),L()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(e=>{u({type:"SET_STEPS",steps:e.steps}),Vm.success((0,z.__)("Steps reordered successfully!","cartflows"))})};(0,a.useEffect)(()=>{_(l&&l["wcf-testing"]?l["wcf-testing"]:"no")},[l]),(0,a.useEffect)(()=>{"yes"===i&&T(!1)},[i]);let U=!1,B=!1;const F=[],Y=[];if(f)return(0,a.createElement)(Eh,{align:"start",className:"wcf-step-settings-view--wrapper -m-8",containerType:"flex"},(0,a.createElement)(qX,{renderCb:P}));if(m)return(0,a.createElement)(Eh,{align:"start",className:"wcf-flow-settings-view--wrapper -m-8",containerType:"flex"},(0,a.createElement)(vee,{renderCb:P}));const Z="storeCheckout"===o,Q=Z?"?page=cartflows&path=store-checkout":"?page=cartflows&path=flows",V=Z?(0,z.__)("Store Checkout","cartflows"):(0,z.__)("Funnels","cartflows");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-steps-page-wrapper border-t border-border-subtle -mt-px"},(0,a.createElement)("div",{className:"wcf-page-header mb-4"},(0,a.createElement)(FX,{size:"sm"},(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Link,{href:`${cartflows_admin.admin_base_url}admin.php${Q}`,className:"font-normal"},V)),(0,a.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,a.createElement)(D7,{className:"w-3 h-3 stroke-2"})),x?(0,a.createElement)(a.Fragment,null,(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Link,{as:"button",type:"button",onClick:()=>E(!1),className:"font-normal cursor-pointer bg-transparent border-0 p-0"},c||(0,z.__)("(no title)","cartflows"))),(0,a.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,a.createElement)(D7,{className:"w-3 h-3 stroke-2"})),(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Page,null,(0,z.__)("Analytics","cartflows")))):(0,a.createElement)(FX.Item,null,(0,a.createElement)(FX.Page,null,c||(0,z.__)("(no title)","cartflows")))),(0,a.createElement)("div",{className:"wcf-flow-header flex gap-3 xl:gap-0 justify-between flex-col xl:flex-row w-full mt-4"},(0,a.createElement)(uee,{type:o}),(0,a.createElement)("div",{className:"wcf-flow-header--actions w-full flex gap-3 items-center xl:justify-end"},(0,a.createElement)("div",{className:"wcf-flow-header--action-canvas-mode flex items-center gap-2"},(0,a.createElement)("span",{className:"text-sm font-medium text-text-secondary"},(0,z.__)("Canvas Mode","cartflows")),(0,a.createElement)(nL,{name:"wcf-enable-canvas-mode",size:"sm",value:y,onChange:e=>{e&&x&&E(!1),w({status:"UPDATE_CANVAS_MODE",canvasMode:e}),e?localStorage.setItem("wcf_canvas_mode_enabled","true"):localStorage.removeItem("wcf_canvas_mode_enabled")}})),(0,a.createElement)("div",{className:"wcf-flow-header--action-mode-select flex items-center gap-2 w-44"},I&&(0,a.createElement)(Op,{className:"w-4 h-4 stroke-2 animate-spin text-brand-500"}),(0,a.createElement)(kL,{size:"md",value:M,onChange:e=>(e=>{S(!0);const n=new window.FormData;n.append("action","cartflows_save_flow_meta_settings"),n.append("security",cartflows_admin.save_flow_meta_settings_nonce),n.append("flow_id",t),n.append("wcf-testing",e),L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{u({type:"UPDATE_OPTIONS",options:{...l,"wcf-testing":e}}),S(!1),window.onbeforeunload=null,Vm.success("yes"===e?(0,z.__)("Sandbox mode enabled!","cartflows"):(0,z.__)("Sandbox mode disabled!","cartflows"))}).catch(()=>{S(!1),Vm.error((0,z.__)("Failed to update sandbox mode.","cartflows"))})})(e)},(0,a.createElement)(kL.Button,{placeholder:(0,z.__)("Select Mode","cartflows"),className:"gap-1",render:()=>"yes"===M?(0,a.createElement)("span",{className:"flex items-center gap-2"},(0,a.createElement)(FU,{className:"h-4 w-4 text-amber-500"}),(0,z.__)("Sandbox Mode","cartflows")):(0,a.createElement)("span",{className:"flex items-center gap-2"},(0,a.createElement)(oW,{className:"h-4 w-4 text-support-success"}),(0,z.__)("Live Mode","cartflows"))}),(0,a.createElement)(kL.Options,null,(0,a.createElement)(kL.Option,{value:"no"},(0,a.createElement)("span",{className:"flex items-center gap-2"},(0,a.createElement)(oW,{className:"h-4 w-4 text-support-success"}),(0,z.__)("Live Mode","cartflows"))),(0,a.createElement)(kL.Option,{value:"yes"},(0,a.createElement)("span",{className:"flex items-center gap-2"},(0,a.createElement)(FU,{className:"h-4 w-4 text-amber-500"}),(0,z.__)("Sandbox Mode","cartflows")))))),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Funnel Settings","cartflows"),placement:"top"},(0,a.createElement)(Wo,{variant:"outline",size:"sm",className:"p-2.5",tag:C,to:{pathname:"admin.php",search:`?page=cartflows&path=${"storeCheckout"===o?"store-checkout":"flows"}&action=wcf-edit-flow&flow_id=${t}&flow_settings=true`},icon:(0,a.createElement)(PU,null)})),(0,a.createElement)(ea,{arrow:!0,variant:"dark",content:(0,z.__)("Export Funnel","cartflows"),placement:"top"},(0,a.createElement)(Wo,{variant:"outline",size:"sm",className:"p-2.5",onClick:e=>{e.preventDefault();const n=new window.FormData;n.append("action","cartflows_export_flow"),n.append("security",cartflows_admin.export_flow_nonce),n.append("flow_id",t),window.wcfAction="exportFlow",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(e=>{if(e.success){const n=e.data.flow_name||`flow-${t}.json`,r=JSON.stringify(e.data.flows),o=new Blob([r],{type:"application/json"});if(document.documentMode)window.navigator.msSaveOrOpenBlob(o,n);else{const e=document.createElement("a");e.href=URL.createObjectURL(o),e.download=n,e.click()}Vm.success((0,z.__)("Funnel exported successfully!","cartflows"))}else Vm.error((0,z.__)("Failed to export funnel.","cartflows"))}).catch(()=>{Vm.error((0,z.__)("Failed to export funnel.","cartflows"))}))},icon:(0,a.createElement)(dW,null)})),"storeCheckout"===o&&(0,a.createElement)(ea,{arrow:!0,content:(0,z.__)("Delete Store Checkout","cartflows"),placement:"top"},(0,a.createElement)(Wo,{variant:"outline",size:"sm",className:"p-2.5",onClick:async e=>{if(e.preventDefault(),!await h({title:(0,z.__)("Delete Store Checkout","cartflows"),description:(0,z.sprintf)(/* translators: %s new line break */ /* translators: %s new line break */ |
| 73 |
(0,z.__)("Do you really want to delete store checkout?%1$1sNOTE: This action cannot be reversed.","cartflows"),"\r\n"),actionBtnText:(0,z.__)("Delete","cartflows"),cancelBtnText:(0,z.__)("Cancel","cartflows")}))return;const n=new window.FormData;n.append("action","cartflows_delete_flow"),n.append("security",cartflows_admin.delete_flow_nonce),n.append("flow_id",t),window.wcfAction="deleteFlow",(0,WV.$h)(L()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{Vm.success((0,z.__)("Store checkout deleted successfully!","cartflows")),u({type:"SET_FLOWS",flows:null}),window.location.replace(cartflows_admin.admin_base_url+"admin.php?page=cartflows&path=store-checkout")}))},icon:(0,a.createElement)(UU,null)}))))),x?(0,a.createElement)(see,{onBack:()=>E(!1)}):(0,a.createElement)(a.Fragment,null,A&&(0,a.createElement)("div",{className:"wcf-instant-checkout--notice flex justify-center mb-5"},(0,a.createElement)("div",{className:"wcf-instant-checkout--notice-columns flex items-center justify-between w-full border border-brand-200 p-3 rounded-lg bg-background-primary"},(0,a.createElement)("div",{className:"wcf-instant-checkout--notice-column-left flex items-center gap-3"},(0,a.createElement)(nG,{className:"h-5 w-5 text-brand-500 hover:text-brand-600","aria-hidden":"true"}),(0,a.createElement)("span",{className:"text-text-primary text-sm font-medium"},(0,z.__)("Create a distraction free, high-converting checkout experience without needing a page builder.","cartflows"))),(0,a.createElement)("div",{className:"wcf-instant-checkout--notice-column-right flex items-center gap-4"},(0,a.createElement)(C,{to:{pathname:"admin.php",search:"storeCheckout"===o?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t}&flow_settings=true`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${t}&flow_settings=true`},className:"text-brand-600 text-xs font-medium cursor-pointer no-underline"},(0,z.__)("Enable Instant Layout","cartflows")),(0,a.createElement)(jV,{className:"h-5 w-5 hover:text-brand-600 cursor-pointer","aria-hidden":"true",onClick:e=>{e.preventDefault(),(()=>{const e=new window.FormData;e.append("action","cartflows_hide_instant_checkout_notice"),e.append("security",cartflows_admin.hide_instant_checkout_notice_nonce),e.append("flow_id",t),T(!1),L()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e?.status&&T(!1)})})()}})))),(0,a.createElement)("div",{className:"wcf-steps-header flex justify-center mb-5 "+(y?"hidden":"")},(0,a.createElement)("div",{className:"flex justify-between items-center w-full gap-2"},(0,a.createElement)(_h,{tag:"h3",size:"sm",title:(0,z.__)("Funnel Steps","cartflows")}),(0,a.createElement)("div",{className:"wcf-steps-header--actions flex items-center gap-3"},(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:()=>E(!0),icon:(0,a.createElement)(XQ,{className:"!w-4 !h-4 stroke-1"}),className:"text-sm font-normal",iconPosition:"left"},(0,z.__)("View Analytics","cartflows")),(0,a.createElement)(Wo,{variant:"outline",size:"md",tag:"a",href:s,target:"_blank",rel:"noreferrer",icon:(0,a.createElement)(JV,{className:"!w-4 !h-4 stroke-1"}),className:"text-sm font-normal no-underline",iconPosition:"left"},(0,z.__)("View Funnel","cartflows")),(0,a.createElement)(Wo,{variant:"primary",size:"md",tag:C,to:{pathname:"admin.php",search:"storeCheckout"===o?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t}&tab=library`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${t}&tab=library`},className:"text-sm font-normal no-underline",icon:(0,a.createElement)(QU,{className:"!w-4 !h-4 stroke-2"}),iconPosition:"left"},(0,z.__)("Add New Step","cartflows"))))),y?(0,a.createElement)(j7,{renderCb:P}):(0,a.createElement)(a.Fragment,null,(0,a.createElement)(cee,null),(0,a.createElement)("div",{className:"wcf-list-steps flex justify-center mb-4"},r&&function(){if(0===n.length)return(0,a.createElement)("div",{className:"wcf-analytics-no-step-notice text-center mb-8 bg-background-primary p-20 rounded-xl w-full"},(0,a.createElement)("svg",{className:"mx-auto h-12 w-12 text-text-secondary",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},(0,a.createElement)("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})),(0,a.createElement)("h3",{className:"mt-2 text-sm font-semibold text-text-primary"},(0,z.__)("No Steps Added.","cartflows")),(0,a.createElement)("p",{className:"mt-1 text-sm text-text-secondary"},(0,z.__)("Seems like there are no steps created or added in this flow","cartflows")),(0,a.createElement)("div",{className:"mt-6"},(0,a.createElement)(Wo,{variant:"primary",size:"sm",tag:C,to:{pathname:"admin.php",search:"storeCheckout"===o?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t}&tab=library`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${t}&tab=library`},icon:(0,a.createElement)(QU,{className:"w-4 h-4 stroke-2"}),iconPosition:"left"},(0,z.__)("Add New Step","cartflows"))))}(),!r&&O&&(0,a.createElement)(h$,null),!O&&(0,a.createElement)("div",{className:"w-full"},"storeCheckout"===o?(n.length>0&&n.map((e,t)=>{if("checkout"===e.type){if(!cartflows_admin.old_global_checkout)return U=t,"";if(e.id===parseInt(cartflows_admin.old_global_checkout))return U=t,"";F.push(e)}else"landing"===e.type?F.push(e):Y.push(e);return""}),Y.length>0&&(B=!0),(0,a.createElement)(a.Fragment,null,!r&&!O&&(0,a.createElement)(a.Fragment,null,F.map(e=>(0,a.createElement)(m$,(0,N.A)({},e,{key:e.id,invalid:!0,setUpgradePopupFeature:k}))),(0,a.createElement)(m$,(0,N.A)({},n[U],{key:n[U].id,setUpgradePopupFeature:k})),B&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(A7,{flowId:t,flowType:o}),(0,a.createElement)(MU.ReactSortable,{list:Y,setList:e=>{const t=D.current.filter(e=>"checkout"===e.type||"landing"===e.type);D.current=[...t,...e],u({type:"SET_STORE_STEPS",steps:e})},onEnd:R,swapThreshold:.8,direction:"vertical",animation:150,handle:".wcf-step-wrap",filter:".wcf-step__col-actions, .wcf-step__title-text, .wcf-ab-test-popup-content, .wcf-steps-action-buttons, .wcf-archived-wrapper, .wcf-add-step-connector",preventOnFilter:!1},Y.map((e,n)=>"checkout"!==e.type?(0,a.createElement)("div",{key:e.id},(0,a.createElement)(m$,(0,N.A)({},e,{setUpgradePopupFeature:k})),n<Y.length-1&&(0,a.createElement)(A7,{flowId:t,flowType:o})):(0,a.createElement)(a.Fragment,null))))))):(0,a.createElement)(a.Fragment,null,!r&&!O&&(0,a.createElement)(MU.ReactSortable,{list:n,setList:e=>{D.current=e,u({type:"SET_STEPS",steps:e})},onEnd:R,swapThreshold:.8,direction:"vertical",animation:150,handle:".wcf-step-wrap",filter:".wcf-step__col-actions, .wcf-step__title-text, .wcf-ab-test-popup-content, .wcf-add-step-connector",preventOnFilter:!1},n.map((e,r)=>(0,a.createElement)("div",{key:e.id},(0,a.createElement)(m$,(0,N.A)({},e,{setUpgradePopupFeature:k})),r<n.length-1&&(0,a.createElement)(A7,{flowId:t,flowType:o}))))))),(0,a.createElement)("div",{className:"wcf-step-footer flex justify-center pt-2 pb-4"},(0,a.createElement)(A7,{flowId:t,flowType:o,showConnectorLines:!1,tooltipPlacement:"top"}))))),(0,a.createElement)(C7,{renderCb:P,steps:n}),(0,a.createElement)(zh,{feature:j,open:!!j,setOpen:e=>{e||k(null)}}))},Nee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getstepTypes:t}=e("wcf/importer");return{stepTypes:t()}}),(0,Um.withDispatch)(e=>{const{setSelectedStep:t}=e("wcf/importer");return{setSelectedStep(e){t(e)}}}))(({stepTypes:e,setSelectedStep:t})=>(0,a.createElement)("div",{className:"wcf-create-step__dropdown-list wcf-select-option w-full text-left"},(0,a.createElement)(kL,{onChange:e=>{t(e)},size:"md"},(0,a.createElement)(kL.Button,{placeholder:(0,z.__)("Select Step Type","cartflows"),render:t=>t?e[t]||t:""}),(0,a.createElement)(kL.Options,null,Object.keys(e).map(t=>(0,a.createElement)(kL.Option,{value:t,key:t},e[t])))))),Eee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getcurrentFlowId:n,getselectedStep:r,getstepTypes:o,getcurrentFlowSteps:a,getCFProStatus:i,getWooCommerceStatus:s,getselectedStepTitle:l,getLicenseStatus:c}=e("wcf/importer");return{flowsCount:t(),currentFlowId:n(),selectedStep:r(),stepTypes:o(),currentFlowSteps:a(),cf_pro_status:i(),woocommerce_status:s(),selectedStepTitle:l(),license_status:c()}}))(({currentStep:e,stepName:t,currentFlowId:n,currentFlowSteps:r,cf_pro_status:o,woocommerce_status:i,stepTypes:s,license_status:l,setInputFieldVisibility:c,setErrorDesc:u,offerYesStepId:d="",offerNoStepId:f=""})=>{const p=e.type||"",m=e.title||s[p]||"",[h,g]=(0,a.useState)((0,z.__)("Import Step","cartflows")),[y,w]=(0,a.useState)(!1);if(""===e.type)return(0,a.createElement)(Wo,{variant:"primary",size:"md",disabled:!0},h);if(1<=(r?r.filter(e=>p===e.type):[]).length&&!wcfCartflowsPro())return c("hidden"),u((0,z.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")),"not-installed"===o?(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Higher Plan","cartflows"),desc:(0,z.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")}):(u((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 74 |
(0,z.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,{description:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 75 |
(0,z.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)}));if("upsell"===p||"downsell"===p){if(c("hidden"),!wcfCartflowsTypePlusPro())return wcfInactiveProPlus()?(u((0,z.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 76 |
(0,z.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),p,cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,{description:(0,z.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 77 |
(0,z.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),p,cartflows_admin.cf_pro_type_inactive)})):(u((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 78 |
(0,z.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),p)),(0,a.createElement)($m,{desc:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 79 |
(0,z.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),p),title:"Get CartFlows Higher Plan"}));if("Activated"!==l)return u((0,z.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 80 |
(0,z.__)("Add %1$s step to your flow by activating CartFlows license.","cartflows"),p)),c("hidden"),(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Jm,{title:"Activate License"})))}if("pro"===e.template_type){if(!wcfCartflowsTypePro())return"inactive"===o&&"pro"===wcfInactivepluginType()?(c("hidden"),u((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 81 |
(0,z.__)("Access all of our pro templates by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,{description:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 82 |
(0,z.__)("Access all of our pro templates by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)})):(c("hidden"),u((0,z.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")),(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Pro","cartflows"),desc:(0,z.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")}));if(wcfCartflowsTypePro()&&"Activated"!==l)return c("hidden"),u((0,z.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 83 |
(0,z.__)("Add %1$s step to your flows by activating license.","cartflows"),p)),(0,a.createElement)(Jm,{title:"Activate License"})}return"landing"!==p&&"active"!==i?(c("hidden"),u((0,z.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")),"inactive"===i?(0,a.createElement)(Wm,{title:`Activate WooCommerce to Import ${m}`,description:(0,z.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")}):(0,a.createElement)(Gm,null)):(c(""),(0,a.createElement)(Wo,{variant:"primary",size:"md",loading:y,disabled:y,icon:(0,a.createElement)(AV,{className:"h-4 w-4 stroke-2"}),iconPosition:"left",onClick:()=>{((e,t,n,r,o,a,i,s="",l="")=>{if(console.log(e,t,n),a)return;n("Importing Step.."),o(!0);const c=new window.FormData;c.append("action","cartflows_import_step"),c.append("security",cartflows_admin.import_step_nonce),c.append("remote_flow_id",e.template_ID),c.append("flow_id",t),c.append("step",JSON.stringify(e)),c.append("step_name",r),s&&c.append("offer_yes_step_id",s),l&&c.append("offer_no_step_id",l);const u=window.sessionStorage.getItem("wcf_edge_insertion_context");if(u)try{const e=JSON.parse(u);e.sourceStepId&&e.targetStepId&&("wcf_start_node"===e.sourceStepId||"start"===e.sourceStepId?c.append("is_start_edge","true"):c.append("edge_source_step_id",e.sourceStepId),c.append("edge_target_step_id",e.targetStepId),e.sourceHandle&&c.append("edge_source_handle",e.sourceHandle))}catch(e){console.error("[CartFlows] Error parsing edge context:",e),window.sessionStorage.removeItem("wcf_edge_insertion_context")}L()({url:cartflows_admin.ajax_url,method:"POST",body:c}).then(e=>{if(e.success)n((0,z.__)("Imported! Redirecting…","cartflows")),o(!1),Vm.success((0,z.__)("Step imported successfully!","cartflows")),setTimeout(()=>{window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${t}`},3e3);else{let t=e.data.message;e.data.error_code&&404===e.data.error_code&&(t+=(0,z.__)(" Please sync the library and try importing the template again.","cartflows")),i(Vh(t)),n((0,z.__)("Import Failed! Try again.","cartflows")),Vm.error((0,z.__)("Failed to import step.","cartflows")),setTimeout(()=>{n((0,z.__)("Import Step","cartflows"))},3e3),o(!1)}}).finally(()=>{window.sessionStorage.removeItem("wcf_edge_insertion_context")})})(e,n,g,t,w,y,u,d,f)}},h))}),Mee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getcurrentFlowId:t,getselectedStep:n,getselectedStepTitle:r}=e("wcf/importer");return{currentFlowId:t(),selectedStep:n(),selectedStepTitle:r()}}))(({currentFlowId:e,selectedStep:t,selectedStepTitle:n,stepName:r,offerYesStepId:o="",offerNoStepId:i=""})=>{const[s,l]=(0,a.useState)({isProcessing:!1,buttonText:(0,z.__)("Create Step","cartflows")}),{isProcessing:c,buttonText:u}=s;return(0,a.createElement)(Wo,{variant:"primary",size:"md",loading:c,disabled:c,onClick:a=>{a.preventDefault(),c||(l({isProcessing:!0,buttonText:(0,z.__)("Creating Step..","cartflows")}),((e,t,n,r,o,a="",i="")=>{console.log(e,t,n);const s=new window.FormData;s.append("action","cartflows_create_step"),s.append("flow_id",e),s.append("step_type",t),s.append("step_title",n),s.append("security",cartflows_admin.create_step_nonce),s.append("step_name",o),a&&s.append("offer_yes_step_id",a),i&&s.append("offer_no_step_id",i);const l=window.sessionStorage.getItem("wcf_edge_insertion_context");if(l)try{const e=JSON.parse(l);e.sourceStepId&&e.targetStepId&&("wcf_start_node"===e.sourceStepId||"start"===e.sourceStepId?s.append("is_start_edge","true"):s.append("edge_source_step_id",e.sourceStepId),s.append("edge_target_step_id",e.targetStepId),e.sourceHandle&&s.append("edge_source_handle",e.sourceHandle))}catch(e){console.error("[CartFlows] Error parsing edge context:",e),window.sessionStorage.removeItem("wcf_edge_insertion_context")}L()({url:cartflows_admin.ajax_url,method:"POST",body:s}).then(t=>{console.log(t),window.sessionStorage.removeItem("wcf_edge_insertion_context"),t.success?(r({isProcessing:!1,buttonText:(0,z.__)("Step Created! Redirecting…","cartflows")}),Vm.success((0,z.__)("Step created successfully!","cartflows")),setTimeout(()=>{window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${e}`},3e3)):(r({isProcessing:!1,buttonText:(0,z.__)("Failed to Create Step!","cartflows")}),Vm.error((0,z.__)("Failed to create step.","cartflows")))})})(e,t,n,l,r,o,i))}},u)}),_ee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getselectedStep:n,getstepTypes:r,getcurrentFlowSteps:o,getCFProStatus:a,getWooCommerceStatus:i,getLicenseStatus:s}=e("wcf/importer");return{flowsCount:t(),selectedStep:n(),stepTypes:r(),currentFlowSteps:o(),cf_pro_status:a(),woocommerce_status:i(),license_status:s()}}))(({selectedStep:e,currentFlowSteps:t,cf_pro_status:n,woocommerce_status:r,license_status:o,stepName:i,setInputFieldVisibility:s,setErrorDesc:l,offerYesStepId:c="",offerNoStepId:u=""})=>{if(""===e)return(0,a.createElement)("button",{className:"wcf-button wcf-primary-button",disabled:!0},(0,z.__)("Create Step","cartflows"));if(1<=(t?t.filter(t=>e===t.type):[]).length&&!wcfCartflowsPro())return s("hidden"),l((0,z.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")),"not-installed"===n?(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Higher Plan","cartflows")}):(l((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 84 |
(0,z.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,{description:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 85 |
(0,z.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)}));if("upsell"===e||"downsell"===e){if(!wcfCartflowsTypePlusPro())return wcfInactiveProPlus()?(s("hidden"),l((0,z.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 86 |
(0,z.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),e,cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,null)):(s("hidden"),l((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 87 |
(0,z.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),e)),(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Higher Plan","cartflows")}));if(wcfCartflowsTypePlusPro()&&"Activated"!==o)return s("hidden"),l((0,z.__)("Activate license for adding more steps and other features.","cartflows")),(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Jm,{title:(0,z.__)("Activate License","cartflows")})))}return"landing"!==e&&"active"!==r?(s("hidden"),l((0,z.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")),"inactive"===r?(0,a.createElement)(Wm,null):(0,a.createElement)(Gm,null)):(s(""),l(""),(0,a.createElement)(Mee,{stepName:i,offerYesStepId:c,offerNoStepId:u}))}),Iee=({stepName:e,setInputFieldVisibility:t,setErrorDesc:n,offerYesStepId:r="",offerNoStepId:o=""})=>(0,a.createElement)("div",{className:"wcf-create-step__button-wrap"},(0,a.createElement)(_ee,{stepName:e,setInputFieldVisibility:t,setErrorDesc:n,offerYesStepId:r,offerNoStepId:o})),See=e=>{if(!e||!Array.isArray(e))return[];const t=window.sessionStorage.getItem("wcf_edge_insertion_context");let n=-1;if(t)try{const r=JSON.parse(t).sourceStepId;if("wcf_start_node"===r||"start"===r)return e.filter(e=>"checkout"!==e.type);r&&(n=e.findIndex(e=>e.id===r||e.id===parseInt(r,10)))}catch(e){window.sessionStorage.removeItem("wcf_edge_insertion_context")}return-1===n?e.filter(e=>"checkout"!==e.type):e.slice(n+1).filter(e=>"checkout"!==e.type)},jee=({offerYesStepId:e,setOfferYesStepId:t,offerNoStepId:n,setOfferNoStepId:r,availableSteps:o=null})=>{const{currentFlowSteps:i}=(0,Um.useSelect)(e=>({currentFlowSteps:e("wcf/importer").getcurrentFlowSteps()})),s=null!==o?o:See(i);return 0===s.length?null:(0,a.createElement)("div",{className:"mt-5 space-y-4"},(0,a.createElement)("div",{className:"text-sm font-medium text-gray-700 mb-2"},(0,z.__)("Conditional Redirect Settings","cartflows")),(0,a.createElement)("div",null,(0,a.createElement)("label",{className:"block text-sm font-normal text-gray-600 mb-1"},(0,z.__)("On Accept (Yes), go to:","cartflows")),(0,a.createElement)("select",{className:"w-full input-field !px-3 !py-2 text-sm font-normal !rounded-md text-gray-600 !border-gray-200 focus:ring focus:!ring-primary-100 focus:!border-primary-500 focus:!shadow-none !outline-0 !outline-none",value:e,onChange:e=>t(e.target.value)},(0,a.createElement)("option",{value:""},(0,z.__)("Default (Auto)","cartflows")),s.map(e=>(0,a.createElement)("option",{key:e.id,value:e.id},e.title)))),(0,a.createElement)("div",null,(0,a.createElement)("label",{className:"block text-sm font-normal text-gray-600 mb-1"},(0,z.__)("On Reject (No), go to:","cartflows")),(0,a.createElement)("select",{className:"w-full input-field !px-3 !py-2 text-sm font-normal !rounded-md text-gray-600 !border-gray-200 focus:ring focus:!ring-primary-100 focus:!border-primary-500 focus:!shadow-none !outline-0 !outline-none",value:n,onChange:e=>r(e.target.value)},(0,a.createElement)("option",{value:""},(0,z.__)("Default (Auto)","cartflows")),s.map(e=>(0,a.createElement)("option",{key:e.id,value:e.id},e.title)))))},kee=({visibility:e,setVisibility:t,item:n,type:r,stepName:o,setStepName:i})=>{const s="show"===e,[l,c]=(0,a.useState)(""),[u,d]=(0,a.useState)(""),[f,p]=(0,a.useState)(0),[m,h]=(0,a.useState)(""),[g,y]=(0,a.useState)(""),{currentFlowSteps:w,selectedStep:b}=(0,Um.useSelect)(e=>({currentFlowSteps:e("wcf/importer").getcurrentFlowSteps(),selectedStep:e("wcf/importer").getselectedStep()})),v="ready-templates"===r?n&&("upsell"===n.type||"downsell"===n.type):"upsell"===b||"downsell"===b,x=See(w);return(0,a.createElement)(Im,{open:s,setOpen:e=>{e||t("hide")},exitOnClickOutside:!1},(0,a.createElement)(Im.Panel,{className:"sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,null,"hidden"===l?(0,z.__)("Upgrade Required","cartflows"):(0,z.__)("Name Your Step","cartflows")),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)("div",{className:`${l}`},(0,a.createElement)("div",{className:"flex justify-between py-2"},(0,a.createElement)("label",{className:"flex gap-1 text-sm font-normal text-text-primary"},(0,z.__)("Step Name","cartflows")),(0,a.createElement)("span",{className:"text-xs font-normal "+(40===f?"text-brand-500":"text-field-placeholder")},f,"/40")),(0,a.createElement)(Ym,{type:"text",value:o,onChange:e=>{e.length<=40&&(p(e.length),i(e))},placeholder:(0,z.__)("Enter Step Name","cartflows"),size:"md"})),"hidden"!==l&&v&&x.length>0&&(0,a.createElement)(jee,{offerYesStepId:m,setOfferYesStepId:h,offerNoStepId:g,setOfferNoStepId:y,availableSteps:x}),""!==u&&(0,a.createElement)("p",{className:"text-sm font-regular text-text-secondary mt-3 m-0"},u)),(0,a.createElement)(Im.Footer,{className:"flex gap-3 justify-end"},"ready-templates"===r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:()=>t("hide")},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(Eee,{currentStep:n,stepName:o,setInputFieldVisibility:c,setErrorDesc:d,offerYesStepId:m,offerNoStepId:g})),"create-your-own"===r&&(0,a.createElement)(Iee,{stepName:o,setInputFieldVisibility:c,setErrorDesc:d,offerYesStepId:m,offerNoStepId:g}))))},Dee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getselectedStep:t}=e("wcf/importer");return{selectedStep:t()}}))(({selectedStep:e})=>{const[t,n]=(0,a.useState)("hide"),[r,o]=(0,a.useState)("");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kee,{visibility:t,setVisibility:n,type:"create-your-own",stepName:r,setStepName:o}),(0,a.createElement)("div",{className:"wcf-step-library--item wcf-step-library--item__start-scratch h-full bg-background-primary rounded-lg shadow-md relative p-5 box-border"},(0,a.createElement)("div",{className:"wcf-step-library--item--scratch-select text-center w-full h-full min-h-[340px] flex flex-col gap-4 items-center justify-center"},(0,a.createElement)("h3",{className:"text-base text-text-primary text-center font-medium m-0"},(0,z.__)("Select Step Type","cartflows")),(0,a.createElement)(Nee,null),(0,a.createElement)(Wo,{variant:"primary",size:"md",disabled:""===e,icon:(0,a.createElement)(QU,{className:"h-18 w-18 stroke-2"}),iconPosition:"left",onClick:()=>{n("hide"===t?"show":"hide")}},(0,z.__)("Create Step","cartflows")),(0,a.createElement)("div",{className:"wcf-learn-how"},(0,a.createElement)("a",{href:getKbDocUrl(`${cartflows_admin.cf_domain_url}docs/cartflows-step-types/`),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-sm text-text-tertiary hover:text-brand-500"},(0,a.createElement)(qm,{className:"w-18 h-18 stroke-1"}),(0,z.__)("Learn How","cartflows")))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle absolute bottom-0 left-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Create from Scratch","cartflows")))))}),Cee=function({item:e}){const[t,n]=(0,a.useState)("hide"),[r,o]=(0,a.useState)("");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kee,{visibility:t,setVisibility:n,type:"ready-templates",stepName:r,setStepName:o,item:e}),(0,a.createElement)("div",{key:e.id,className:"wcf-template-item self-start group relative cursor-pointer transition ease-in-out delay-150 rounded-lg shadow-md"},"pro"===e.template_type?(0,a.createElement)("div",{className:"z-10 absolute top-5 right-5"},(0,a.createElement)(Rp,null)):"",(0,a.createElement)("div",{className:"wcf-item__inner bg-background-primary border border-border-subtle"},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap relative"},(0,a.createElement)("div",{className:"wcf-item__thumbnail overflow-hidden "+("upsell"===e.type||"downsell"===e.type?"max-h-[345px] min-h-[345px]":"min-h-[400px] max-h-[400px]")},(0,a.createElement)("img",{className:"wcf-item__thumbnail-image w-full",src:e.featured_image_url,alt:(0,z.__)("Step thumbnail image","cartflows")})),(0,a.createElement)("div",{className:"wcf-item__view invisible group-hover:visible absolute backdrop-brightness-50 top-0 w-full h-full transition ease-in-out delay-150"},(0,a.createElement)("div",{className:"mx-auto my-0 text-center flex flex-col gap-4 relative top-[35%]"},(0,a.createElement)("span",{className:"wcf-step-preview-wrap"},(0,a.createElement)(Wo,{tag:"a",variant:"outline",size:"sm",href:e.link,target:"_blank",rel:"noreferrer",className:"mx-auto !w-fit no-underline !bg-background-primary/10 !border-white/30 !text-text-on-color hover:!bg-background-primary/20",icon:(0,a.createElement)(qm,{className:"w-4 h-4 stroke-2"})},(0,z.__)("Preview","cartflows"))),(0,a.createElement)("span",{className:"wcf-item__btn",onClick:()=>{n("hide"===t?"show":"hide")}},(0,a.createElement)(Wo,{variant:"primary",size:"sm",className:"mx-auto !w-fit",icon:(0,a.createElement)(yH,{className:"w-4 h-4 stroke-2"})},(0,z.__)("Import","cartflows")))))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},e.title)))))},Aee=()=>(0,a.createElement)("div",{className:"wcf-step-library-importer wcf-step-library--other"},(0,a.createElement)("div",{className:"wcf-step-library-importer__list bg-background-primary px-10 py-14 border border-solid border-border-subtle rounded-md shadow-sm"},(0,a.createElement)("div",{className:"wcf-item flex gap-6 items-center justify-center"},(0,a.createElement)("div",{className:"wcf-start-from-scratch w-80"},(0,a.createElement)(Dee,null)),(0,a.createElement)("div",{className:"wcf_item__info flex flex-col gap-3 justify-center max-w-sm"},(0,a.createElement)("h3",{className:"wcf_item__info--title text-xl text-text-primary font-semibold m-0"},(0,z.__)("No Results Found.","cartflows")),(0,a.createElement)("span",{className:"wcf_item__info--desc text-base text-text-secondary font-normal"},(0,z.__)("Don't see a step that you would like to import?","cartflows")),(0,a.createElement)("a",{className:"wcf_item__info--doc text-sm text-text-secondary font-normal hover:text-brand-300 flex gap-1",href:getUtmUrl("https://cartflows.com/funnel-suggestions/",{utm_campaign:"suggestions"}),target:"_blank",rel:"noreferrer"},(0,z.__)("Please suggest us ","cartflows"),(0,a.createElement)(qm,{className:"w-5 h-5 stroke-1 text-text-tertiary hover:text-brand-300"})))))),Tee=function(e){const{templates:t,currentStep:n,setcurrentStepCB:r,allowedStepTypes:o}=e,i=t,{step_types:s}=(0,Um.useSelect)(e=>({step_types:e("wcf/importer").getstepTypes()})),l=Object.entries(s),c=e=>!o||o.hasOwnProperty(e);return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-remote-steps-filters flex gap-4 items-center p-8 mb-8 -m-8 bg-background-primary"},(0,a.createElement)("div",{className:"wcf-categories w-full"},(0,a.createElement)("div",{className:"wcf-step-type-filter--links sm:block lg:block hidden"},(0,a.createElement)(vQ.Group,{activeItem:n,variant:"rounded",size:"sm",width:"auto",className:"!bg-transparent !p-0 !ring-0 !gap-4",onChange:({value:e})=>{c(e.slug)&&r(e.slug)}},l.map(([e,t])=>{const r=e===n;return(0,a.createElement)(vQ.Tab,{key:e,slug:e,text:t,disabled:!c(e),className:"step-type-filter-item !px-1 !py-1 !font-medium "+(r?"!bg-transparent !shadow-none !text-brand-500":"")})}))),(0,a.createElement)("div",{className:"sm:hidden lg:hidden block"},(0,a.createElement)(kL,{value:n,onChange:e=>{c(e)&&r(e)},size:"sm"},(0,a.createElement)(kL.Button,null),(0,a.createElement)(kL.Options,null,l.map(e=>{const t=e[0],n=e[1],r=c(t);return(0,a.createElement)(kL.Option,{key:t,value:t,disabled:!r},n,r?"":" (Not allowed)")})))))),0===i.length?(0,a.createElement)(Aee,null):(0,a.createElement)("div",{className:"wcf-step-importer__list wcf-items-list wcf-row wcf-step-row grid grid-cols-1 sm:grid-cols-4 gap-6 p-6 bg-background-primary shadow-sm rounded-md"},(0,a.createElement)("div",{className:"wcf-start-from-scratch"},(0,a.createElement)(Dee,null)),i.map(e=>(0,a.createElement)(Cee,{item:e,key:e.id}))))},Oee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getselectedStep:t}=e("wcf/importer");return{selectedStep:t()}}))(({selectedStep:e})=>{const[t,n]=(0,a.useState)("hide"),[r,o]=(0,a.useState)(""),[{page_builder:i}]=SU();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(kee,{visibility:t,setVisibility:n,type:"create-your-own",stepName:r,setStepName:o}),(0,a.createElement)("div",{className:"wcf-step-library--item__start-scratch flex gap-6 mx-auto max-w-4xl px-10 py-14"},(0,a.createElement)("div",{className:"wcf-step-library--item__card relative bg-gray-25 p-5 flex flex-col gap-4 border border-border-subtle rounded-md items-center justify-center h-72 w-2/3"},(0,a.createElement)(_h,{title:(0,z.__)("Create from Scratch","cartflows"),description:(0,z.__)("Select a step type to get started.","cartflows"),tag:"h3",size:"xs",className:"text-center text-base [&>p]:text-text-secondary"}),(0,a.createElement)("div",{className:"w-full"},(0,a.createElement)(Nee,null)),(0,a.createElement)(Wo,{variant:"primary",size:"md",disabled:""===e,icon:(0,a.createElement)(QU,{className:"h-5 w-5 stroke-2"}),iconPosition:"left",onClick:()=>{n("hide"===t?"show":"hide")}},(0,z.__)("Create Step","cartflows"))),(0,a.createElement)("div",{className:"wcf-step-library--item__info flex flex-col gap-6 justify-center w-3/4"},(0,a.createElement)("h3",{className:"text-xl text-text-primary font-semibold m-0"},"bricks-builder"===i&&(0,z.__)("It seems that you are using the Bricks Builder.","cartflows"),"other"===i&&(0,z.__)("It seems that you are using the page builder other than Elementor, Beaver Builder, Block Builder.","cartflows")),(0,a.createElement)("span",{className:"text-base text-text-secondary font-normal mt-2"},"bricks-builder"===i&&(0,z.__)("Are you using Bricks Builder? No worries. CartFlows works well with Bricks Builder. Right now we do not have ready templates for Bricks Builder but we are planning to add it very soon.","cartflows"),"other"===i&&(0,z.__)("Are you using any other page builder? No worries. CartFlows works well with every other page builder. Right now we do not have ready templates for every page builder but we are planning to add it very soon.","cartflows")),(0,a.createElement)("span",{className:"mt-2"},(0,a.createElement)("a",{className:"text-text-secondary hover:text-brand-500 flex items-center gap-2 text-sm",href:getKbDocUrl("https://cartflows.com/docs/how-to-use-cartflows-with-your-own-template/"),target:"_blank",rel:"noreferrer"},(0,z.__)("Learn How","cartflows"),(0,a.createElement)(qm,{className:"w-4 h-4 stroke-1"}))))))}),Lee=class{constructor(){this.offerSteps=["upsell","downsell"],this.allStepTypes=["landing","optin","checkout","upsell","downsell","thankyou"]}isOfferStep(e){return this.offerSteps.includes(e)}isStartNode(e){return"wcf_start_node"===e||"start"===e}isEndNode(e){return"wcf_end_node"===e||"end"===e}extractStepIdFromNodeId(e){if(!e||this.isStartNode(e)||this.isEndNode(e))return e;if("string"==typeof e&&e.includes("wcf_node_edge_")){const t=parseInt(e.replace("wcf_node_edge_",""),10);return isNaN(t)?null:t}if("string"==typeof e&&e.startsWith("conditional-")){const t=parseInt(e.replace("conditional-",""),10);return isNaN(t)?null:t}if("string"==typeof e&&e.startsWith("ab-group-")){const t=parseInt(e.replace("ab-group-",""),10);return isNaN(t)?null:t}return"number"==typeof e?e:null}findStepById(e,t){if(!t||!Array.isArray(t))return null;const n=this.extractStepIdFromNodeId(e);if(!n||this.isStartNode(n)||this.isEndNode(n))return null;const r=t.find(e=>e.id===n);if(r)return r;for(const e of t)if(e["ab-test-variations"]&&Array.isArray(e["ab-test-variations"])){if(e["ab-test-variations"].find(e=>e.id===n))return{...e,_variationId:n,_isVariation:!0}}return null}getStepType(e,t){if(this.isStartNode(e))return"start";if(this.isEndNode(e))return"end";const n=this.findStepById(e,t);return n?n.type:null}hasOptinBeforeCheckout(e){if(!e||!Array.isArray(e))return!1;let t=!1;for(let n=e.length-1;n>=0;n--){const r=e[n];if("checkout"===r.type&&(t=!0),t&&"optin"===r.type)return!0}return!1}hasCheckoutBefore(e,t){if(!t||!Array.isArray(t))return!1;for(let n=0;n<e;n++)if("checkout"===t[n].type)return!0;return!1}getStepIndex(e,t){if(!t||!Array.isArray(t))return-1;const n=this.extractStepIdFromNodeId(e);return!n||this.isStartNode(n)||this.isEndNode(n)?-1:t.findIndex(e=>e.id===n)}getAllowedStepTypes(e,t,n){const r=this.getStepType(e,n),o=this.getStepType(t,n);return"start"===r?"optin"===o?["landing","checkout"]:"checkout"===o||"landing"===o?this.hasOptinBeforeCheckout(n)?["landing"]:["landing","optin"]:["landing","optin","checkout"]:"end"===o?["thankyou"]:"checkout"===o?"checkout"===r?[]:this.hasOptinBeforeCheckout(n)?["landing"]:["landing","optin"]:"checkout"===r?"checkout"===o?[]:["upsell","downsell"]:this.isOfferStep(r)?this.isOfferStep(o)?["upsell","downsell"]:["upsell","downsell","optin"]:"landing"===r?"checkout"===o?this.hasOptinBeforeCheckout(n)?["landing","checkout"]:["landing","optin","checkout"]:"optin"===o?["landing"]:this.hasOptinBeforeCheckout(n)?["landing","checkout"]:["landing","optin","checkout"]:"optin"===r?"checkout"===o?["landing","checkout"]:"landing"===o?["landing"]:["landing","checkout"]:"thankyou"===r?[]:this.hasOptinBeforeCheckout(n)?["landing","checkout"]:["landing","optin","checkout"]}getAllowedStepTypesObject(e,t,n,r){const o=this.getAllowedStepTypes(e,t,n),a={};return o.forEach(e=>{r&&r[e]&&(a[e]=r[e])}),a}},zee=function(){const e=(0,g.useHistory)(),[{page_builder:t,flow_id:n,flow_type:r}]=SU(),[o,i]=(0,a.useState)("landing"),[s,l]=(0,a.useState)(""),[c,u]=(0,a.useState)(null),{all_step_templates:d,stepTypes:f,currentFlowSteps:p}=(0,Um.useSelect)(e=>({all_step_templates:e("wcf/importer").getAllStepTemplates(),stepTypes:e("wcf/importer").getstepTypes(),currentFlowSteps:e("wcf/importer").getcurrentFlowSteps()})),m=[];d.forEach(e=>{o===e.type&&m.push(e)});const[h,y]=(0,a.useState)(m);return(0,a.useEffect)(()=>{if("flows"!==r)return void u(null);const e=window.sessionStorage.getItem("wcf_edge_insertion_context");if(e)try{const t=JSON.parse(e);if(t.sourceStepId&&t.targetStepId){const e=(new Lee).getAllowedStepTypesObject(t.sourceStepId,t.targetStepId,p,f);u(e);const n=Object.keys(e);n.length>0&&!e.hasOwnProperty(o)&&i(n[0])}}catch(e){console.error("[Library] Error parsing edge context:",e),window.sessionStorage.removeItem("wcf_edge_insertion_context")}else u(null)},[r,p,f]),(0,a.useEffect)(()=>()=>{window.sessionStorage.getItem("wcf_edge_insertion_context")&&window.sessionStorage.removeItem("wcf_edge_insertion_context")},[]),(0,a.useEffect)(()=>{y(m)},[o]),(0,a.createElement)("div",{className:`wcf-step-library wcf-step-library-${t}`},(0,a.createElement)("div",{className:"wcf-step-library__header bg-background-primary px-8 py-6 flex justify-between items-center sm:items-center -m-8 sm:flex-row flex-col gap-3"},(0,a.createElement)("h3",{className:"text-xl font-semibold text-text-primary m-0 flex items-center gap-2"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs","aria-label":(0,z.__)("Back to Flow","cartflows"),icon:(0,a.createElement)(UW,{className:"w-6 h-6 stroke-1 text-text-primary"}),onClick:()=>{n?e.push(`admin.php?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${n}`):e.push("admin.php?page=cartflows&path=flows")}}),(0,z.__)("Steps Library","cartflows")),"other"!==t&&"bricks-builder"!==t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"gap-4 flex justify-between items-center"},(0,a.createElement)("div",{className:"wcf-search-steps--form w-56"},(0,a.createElement)(Ym,{type:"text",value:s,onChange:function(e){if(l(e),e&&e.length>=3){const t=e.toLowerCase(),n=m.filter(function(e){return(e.title&&e.title.toLowerCase()||"").includes(t)});y(n)}else y(m)},placeholder:(0,z.__)("Search Steps","cartflows"),size:"md",prefix:(0,a.createElement)(DV,{className:"size-4 text-field-placeholder"}),suffix:s.length>=3?(0,a.createElement)(jV,{className:"size-4 cursor-pointer text-field-placeholder pointer-events-auto",onClick:()=>{l(""),y(m)}}):null})),(0,a.createElement)("span",{className:"divider w-px bg-background-secondary h-7"}),(0,a.createElement)(MH,null)))),(0,a.createElement)("div",{className:"wcf-step-library__body"},(0,a.createElement)("div",{className:"wcf-remote-content"},"other"!==t&&"bricks-builder"!==t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-ready-templates"},(0,a.createElement)(Tee,{templates:h,currentStep:o,setcurrentStepCB:i,allowedStepTypes:c}))),("other"===t||"bricks-builder"===t)&&(0,a.createElement)("div",{className:"wcf-start-from-scratch current flex items-center justify-center min-h-[500px]"},(0,a.createElement)(Oee,null)))))},Pee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getDefaultPageBuilder:t}=e("wcf/importer");return{default_page_builder:t()}}))(({default_page_builder:e})=>{const[{flow_id:t}]=SU();return"library"===new URLSearchParams((0,g.useLocation)().search).get("tab")?(0,a.createElement)(zee,null):(0,a.createElement)("div",{className:"wcf-flow-library wcf-flex"},"bricks-builder"!==e&&"other"!==e?(0,a.createElement)(C,{key:"importer",to:{pathname:"admin.php",search:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${t}&tab=library&sub=library`},className:"wcf-flow-library__item wcf-flow-library__item--readymade"},"Import from Library"):"",(0,a.createElement)(Dee,{page_builder:e}))}),Ree=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getStoreStepTypes:t}=e("wcf/importer");return{stepTypes:t()}}),(0,Um.withDispatch)(e=>{const{setSelectedStep:t}=e("wcf/importer");return{setSelectedStep(e){t(e)}}}))(({stepTypes:e,setSelectedStep:t})=>(0,a.createElement)("div",{className:"wcf-create-step__dropdown-list wcf-select-option w-full text-left"},(0,a.createElement)(kL,{onChange:e=>{t(e)},size:"md"},(0,a.createElement)(kL.Button,{placeholder:(0,z.__)("Select Step Type","cartflows"),render:t=>t?e[t]||t:""}),(0,a.createElement)(kL.Options,null,Object.keys(e).map(t=>(0,a.createElement)(kL.Option,{value:t,key:t},e[t])))))),Uee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getcurrentFlowId:n,getselectedStep:r,getstepTypes:o,getcurrentFlowSteps:a,getCFProStatus:i,getWooCommerceStatus:s,getselectedStepTitle:l,getLicenseStatus:c}=e("wcf/importer");return{flowsCount:t(),currentFlowId:n(),selectedStep:r(),stepTypes:o(),currentFlowSteps:a(),cf_pro_status:i(),woocommerce_status:s(),selectedStepTitle:l(),license_status:c()}}))(({currentStep:e,stepName:t,currentFlowId:n,currentFlowSteps:r,cf_pro_status:o,woocommerce_status:i,stepTypes:s,license_status:l,setInputFieldVisibility:c,setErrorDesc:u})=>{const d=e.type||"",f=e.title||s[d]||"",[p,m]=(0,a.useState)("Import Step"),[h,g]=(0,a.useState)(!1),[y,w]=(0,a.useState)({cta:"",error_msg:""}),{cta:b}=y;if(b)return(0,a.createElement)(a.Fragment,null,(0,a.createElement)("span",{className:"wcf-message wcf-message--error",dangerouslySetInnerHTML:{__html:b}}));if(""===e.type)return(0,a.createElement)(Wo,{variant:"primary",size:"md",disabled:!0},p);const v=r?r.filter(e=>d===e.type):[];if(console.log("selectedExistSteps.length",v.length),1<=v.length&&!wcfCartflowsPro())return c("hidden"),u((0,z.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")),"not-installed"===o?(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Higher plan","cartflows")}):(u((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 88 |
(0,z.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,null));if("upsell"===d||"downsell"===d){if(c("hidden"),!wcfCartflowsTypePlusPro())return wcfInactiveProPlus()?(u((0,z.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 89 |
(0,z.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),d,cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,null)):(u((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 90 |
(0,z.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),d)),(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Higher Plan","cartflows")}));if("Activated"!==l)return c("hidden"),u((0,z.__)("Activate license for adding more flows and other features.","cartflows")),(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Jm,{title:`Activate License and ${p}`})))}return"pro"!==e.template_type||wcfCartflowsTypePro()?"landing"!==d&&"active"!==i?(c("hidden"),"inactive"===i?(u((0,z.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")),(0,a.createElement)(Wm,{title:`Activate WooCommerce to Import ${f}`})):(0,a.createElement)(Gm,null)):(c(""),(0,a.createElement)(Wo,{variant:"primary",size:"md",loading:h,disabled:h,icon:(0,a.createElement)(AV,{className:"h-4 w-4 stroke-2"}),iconPosition:"left",onClick:()=>{((e,t,n,r,o,a,i,s)=>{if(console.log(e,t,n),a)return;n((0,z.__)("Importing Step..","cartflows")),o(!0);const l=new window.FormData;l.append("action","cartflows_import_step"),l.append("security",cartflows_admin.import_step_nonce),l.append("remote_flow_id",e.template_ID),l.append("flow_id",t),l.append("step",JSON.stringify(e)),l.append("step_name",r);const c=window.sessionStorage.getItem("wcf_edge_insertion_context");if(c)try{const e=JSON.parse(c);e.sourceStepId&&e.targetStepId&&(l.append("edge_source_step_id",e.sourceStepId),l.append("edge_target_step_id",e.targetStepId))}catch(e){window.sessionStorage.removeItem("wcf_edge_insertion_context")}L()({url:cartflows_admin.ajax_url,method:"POST",body:l}).then(e=>{if(e.success)o(!1),n((0,z.__)("Imported! Redirecting…","cartflows")),Vm.success((0,z.__)("Step imported successfully!","cartflows")),setTimeout(()=>{window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t}`},3e3);else if("call_to_action"in e.data)i({cta:e.data.call_to_action}),s(e.data.message);else{let t=e.data.message;e.data.error_code&&404===e.data.error_code&&(t+=(0,z.__)(" Please sync the library and try importing the template again.","cartflows")),s(Vh(t)),n((0,z.__)("Import Failed! Try again.","cartflows")),Vm.error((0,z.__)("Failed to import step.","cartflows")),setTimeout(()=>{n((0,z.__)("Import Step","cartflows"))},3e3),o(!1)}}).finally(()=>{window.sessionStorage.removeItem("wcf_edge_insertion_context")})})(e,n,m,t,g,h,w,u)}},p)):(c("hidden"),"inactive"===o&&"pro"===wcfInactivepluginType()?(c("hidden"),u((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 91 |
(0,z.__)("Access all of our pro templates by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,null)):(c("hidden"),u((0,z.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")),(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Pro","cartflows")})))}),Bee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getcurrentFlowId:t,getselectedStep:n,getselectedStepTitle:r}=e("wcf/importer");return{currentFlowId:t(),selectedStep:n(),selectedStepTitle:r()}}))(({currentFlowId:e,selectedStep:t,selectedStepTitle:n,stepName:r,offerYesStepId:o="",offerNoStepId:i=""})=>{const[s,l]=(0,a.useState)({isProcessing:!1,buttonText:"Create Step"}),{isProcessing:c,buttonText:u}=s;return(0,a.createElement)(Wo,{variant:"primary",size:"md",loading:c,disabled:c,onClick:a=>{a.preventDefault(),c||(l({isProcessing:!0,buttonText:(0,z.__)("Creating Step..","cartflows")}),((e,t,n,r,o,a="",i="")=>{console.log(e,t,n);const s=new window.FormData;s.append("action","cartflows_create_step"),s.append("flow_id",e),s.append("step_type",t),s.append("step_title",n),s.append("security",cartflows_admin.create_step_nonce),s.append("step_name",o),a&&s.append("offer_yes_step_id",a),i&&s.append("offer_no_step_id",i);const l=window.sessionStorage.getItem("wcf_edge_insertion_context");if(l)try{const e=JSON.parse(l);e.sourceStepId&&e.targetStepId&&("wcf_start_node"===e.sourceStepId||"start"===e.sourceStepId?s.append("is_start_edge","true"):s.append("edge_source_step_id",e.sourceStepId),s.append("edge_target_step_id",e.targetStepId),e.sourceHandle&&s.append("edge_source_handle",e.sourceHandle))}catch(e){console.error("[CartFlows] Error parsing edge context:",e),window.sessionStorage.removeItem("wcf_edge_insertion_context")}L()({url:cartflows_admin.ajax_url,method:"POST",body:s}).then(t=>{console.log(t),window.sessionStorage.removeItem("wcf_edge_insertion_context"),t.success?(r({isProcessing:!1,buttonText:(0,z.__)("Step Created! Redirecting…","cartflows")}),Vm.success((0,z.__)("Step created successfully!","cartflows")),setTimeout(()=>{window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${e}`},3e3)):(r({isProcessing:!1,buttonText:(0,z.__)("Failed to Create Step!","cartflows")}),Vm.error((0,z.__)("Failed to create step.","cartflows")))})})(e,t,n,l,r,o,i))}},u)}),Fee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getselectedStep:n,getstepTypes:r,getcurrentFlowSteps:o,getCFProStatus:a,getWooCommerceStatus:i,getLicenseStatus:s}=e("wcf/importer");return{flowsCount:t(),selectedStep:n(),stepTypes:r(),currentFlowSteps:o(),cf_pro_status:a(),woocommerce_status:i(),license_status:s()}}))(({selectedStep:e,currentFlowSteps:t,cf_pro_status:n,woocommerce_status:r,license_status:o,stepName:i,setInputFieldVisibility:s,setErrorDesc:l,offerYesStepId:c="",offerNoStepId:u=""})=>{if(""===e)return(0,a.createElement)("button",{className:"wcf-button wcf-primary-button",disabled:!0},(0,z.__)("Create Step","cartflows"));if(1<=(t?t.filter(t=>e===t.type):[]).length&&!wcfCartflowsPro())return s("hidden"),l((0,z.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")),"not-installed"===n?(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Higher Plan","cartflows")}):(l((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 92 |
(0,z.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,{description:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 93 |
(0,z.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)}));if("upsell"===e||"downsell"===e){if(!wcfCartflowsTypePlusPro())return wcfInactiveProPlus()?(s("hidden"),l((0,z.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 94 |
(0,z.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),e,cartflows_admin.cf_pro_type_inactive)),(0,a.createElement)(Hm,null)):(s("hidden"),l((0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 95 |
(0,z.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),e)),(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Higher Plan","cartflows")}));if(wcfCartflowsTypePlusPro()&&"Activated"!==o)return s("hidden"),l((0,z.__)("Activate license for adding more steps and other features.","cartflows")),(0,a.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,a.createElement)("div",{className:"wcf-flow-import__button"},(0,a.createElement)(Jm,{title:(0,z.__)("Activate License","cartflows")})))}return"landing"!==e&&"active"!==r?(s("hidden"),"inactive"===r?(l((0,z.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")),(0,a.createElement)(Wm,null)):(0,a.createElement)(Gm,null)):(s(""),l(""),(0,a.createElement)(Bee,{stepName:i,offerYesStepId:c,offerNoStepId:u}))}),Yee=({stepName:e,setInputFieldVisibility:t,setErrorDesc:n,offerYesStepId:r="",offerNoStepId:o=""})=>(0,a.createElement)("div",{className:"wcf-create-step__button-wrap"},(0,a.createElement)(Fee,{stepName:e,setInputFieldVisibility:t,setErrorDesc:n,offerYesStepId:r,offerNoStepId:o})),Zee=({visibility:e,setVisibility:t,item:n,type:r,stepName:o,setStepName:i})=>{const s="show"===e,[l,c]=(0,a.useState)(""),[u,d]=(0,a.useState)(""),[f,p]=(0,a.useState)(0),[m,h]=(0,a.useState)(""),[g,y]=(0,a.useState)(""),{currentFlowSteps:w,selectedStep:b}=(0,Um.useSelect)(e=>({currentFlowSteps:e("wcf/importer").getcurrentFlowSteps(),selectedStep:e("wcf/importer").getselectedStep()})),v="ready-templates"===r?n&&("upsell"===n.type||"downsell"===n.type):"upsell"===b||"downsell"===b,x=See(w);return(0,a.createElement)(Im,{open:s,setOpen:e=>{e||t("hide")},exitOnClickOutside:!1},(0,a.createElement)(Im.Panel,{className:"sm:max-w-lg w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,null,"hidden"===l?(0,z.__)("Upgrade Required","cartflows"):(0,z.__)("Name Your Step","cartflows")),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)("div",{className:`${l}`},(0,a.createElement)("div",{className:"flex justify-between py-2"},(0,a.createElement)("label",{className:"flex gap-1 text-sm font-normal text-text-primary"},(0,z.__)("Step Name","cartflows")),(0,a.createElement)("span",{className:"text-xs font-normal "+(40===f?"text-brand-500":"text-field-placeholder")},f,"/40")),(0,a.createElement)(Ym,{type:"text",value:o,onChange:e=>{e.length<=40&&(p(e.length),i(e))},placeholder:(0,z.__)("Enter Step Name","cartflows"),size:"md"})),"hidden"!==l&&v&&x.length>0&&(0,a.createElement)(jee,{offerYesStepId:m,setOfferYesStepId:h,offerNoStepId:g,setOfferNoStepId:y,availableSteps:x}),""!==u&&(0,a.createElement)("p",{className:"text-sm font-regular text-text-secondary mt-3 m-0"},u)),(0,a.createElement)(Im.Footer,{className:"flex gap-3 justify-end"},"ready-templates"===r&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:()=>t("hide")},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(Uee,{currentStep:n,stepName:o,setInputFieldVisibility:c,setErrorDesc:d,offerYesStepId:m,offerNoStepId:g})),"create-your-own"===r&&(0,a.createElement)(Yee,{stepName:o,setInputFieldVisibility:c,setErrorDesc:d,offerYesStepId:m,offerNoStepId:g}))))},Qee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getselectedStep:t}=e("wcf/importer");return{selectedStep:t()}}))(({selectedStep:e})=>{const[t,n]=(0,a.useState)("hide"),[r,o]=(0,a.useState)("");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Zee,{visibility:t,setVisibility:n,type:"create-your-own",stepName:r,setStepName:o}),(0,a.createElement)("div",{className:"wcf-step-library--item wcf-step-library--item__start-scratch h-full bg-background-primary rounded-lg shadow-md relative p-5 box-border"},(0,a.createElement)("div",{className:"wcf-step-library--item--scratch-select text-center w-full h-full min-h-[340px] flex flex-col gap-4 items-center justify-center"},(0,a.createElement)("h3",{className:"text-base text-text-primary text-center font-medium m-0"},(0,z.__)("Select Step Type","cartflows")),(0,a.createElement)(Ree,null),(0,a.createElement)(Wo,{variant:"primary",size:"md",disabled:""===e,icon:(0,a.createElement)(QU,{className:"h-18 w-18 stroke-2"}),iconPosition:"left",onClick:()=>{n("hide"===t?"show":"hide")}},(0,z.__)("Create Step","cartflows")),(0,a.createElement)("div",{className:"wcf-learn-how"},(0,a.createElement)("a",{href:getKbDocUrl(`${cartflows_admin.cf_domain_url}docs/cartflows-step-types/`),target:"_blank",rel:"noreferrer",className:"flex items-center gap-2 text-sm text-text-tertiary hover:text-brand-500"},(0,a.createElement)(qm,{className:"w-18 h-18 stroke-1"}),(0,z.__)("Learn More","cartflows")))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle absolute bottom-0 left-0 w-full"},(0,a.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,z.__)("Create from Scratch","cartflows")))))}),Vee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getFlowsCount:t,getcurrentFlowId:n,getselectedStep:r,getstepTypes:o,getcurrentFlowSteps:a,getCFProStatus:i,getWooCommerceStatus:s,getselectedStepTitle:l,getLicenseStatus:c}=e("wcf/importer");return{flowsCount:t(),currentFlowId:n(),selectedStep:r(),stepTypes:o(),currentFlowSteps:a(),cf_pro_status:i(),woocommerce_status:s(),selectedStepTitle:l(),license_status:c()}}))(({currentStep:e,stepName:t,currentFlowId:n,currentFlowSteps:r,cf_pro_status:o,woocommerce_status:i,stepTypes:s,license_status:l,setInputFieldVisibility:c,step_id:u})=>{const d=e.type||"",f=e.title||s[d]||"",[p,m]=(0,a.useState)("Choose"),[h,g]=(0,a.useState)(!1),[y,w]=(0,a.useState)("hide"),[b,v]=(0,a.useState)("");if(""===e.type)return(0,a.createElement)(Wo,{variant:"primary",size:"md",disabled:!0},p);const x=r?r.filter(e=>d===e.type):[];if(console.log("selectedExistSteps.length",x.length),("upsell"===d||"downsell"===d)&&!wcfCartflowsPro()){if(c("hidden"),!wcfCartflowsTypePlusPro())return"not-installed"!==o||"pro"===cartflows_admin.cf_pro_type&&"plus"===cartflows_admin.cf_pro_type?(0,a.createElement)(Hm,{description:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 96 |
(0,z.__)("Add unlimited income boosting one-click upsells to your flows by activating %s","cartflows"),cartflows_admin.cf_pro_type_inactive)}):(0,a.createElement)($m,{desc:(0,z.__)("Add unlimited income boosting one-click upsells to your flows when you upgrade to our CartFlows Plus or Pro plan today.","cartflows"),title:"Get CartFlows Higher plan"});if("Activated"!==l)return c("hidden"),(0,a.createElement)(Jm,{title:`Activate License and ${p}`})}return"pro"!==e.template_type||wcfCartflowsTypePro()?"landing"!==d&&"active"!==i?(c("hidden"),"inactive"===i?(0,a.createElement)(Wm,{title:`Activate WooCommerce to Import ${f}`,description:(0,z.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")}):(0,a.createElement)(Gm,null)):(c(""),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Wo,{variant:"primary",size:"md",loading:h,disabled:h,onClick:()=>{((e,t,n,r,o,a,i,s,l)=>{if(a)return;n("Changing Template.."),o(!0);const c=new window.FormData;c.append("action","cartflows_update_step"),c.append("security",cartflows_admin.update_step_nonce),c.append("remote_flow_id",e.template_ID),c.append("flow_id",t),c.append("step_id",i),c.append("step",JSON.stringify(e)),c.append("step_name",r),L()({url:cartflows_admin.ajax_url,method:"POST",body:c}).then(e=>{console.log(e),e.success?(o(!1),n("Changed! Redirecting..."),Vm.success((0,z.__)("Template changed successfully!","cartflows")),setTimeout(()=>{window.location=`${cartflows_admin.admin_base_url}admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t}`},3e3)):"call_to_action"in e.data&&(n("Choose"),l(e.data.call_to_action),s("show"))})})(e,n,m,t,g,h,u,w,v)}},p),(0,a.createElement)(OG,{visibility:y,setVisibility:w,errorMessage:b}))):(c("hidden"),"not-installed"===o||"pro"!==cartflows_admin.cf_pro_type?(c("hidden"),(0,a.createElement)($m,{title:(0,z.__)("Get CartFlows Pro","cartflows"),desc:(0,z.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")})):(c("hidden"),(0,a.createElement)(Hm,{description:(0,z.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 97 |
(0,z.__)("Access all of our pro templates by activating %s","cartflows"),cartflows_admin.cf_pro_type_inactive)})))}),Wee=function({item:e,mode:t,step_id:n}){void 0===t&&(t="");const[r,o]=(0,a.useState)("hide"),[i,s]=(0,a.useState)("");return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Zee,{visibility:r,setVisibility:o,type:"ready-templates",stepName:i,setStepName:s,item:e}),(0,a.createElement)("div",{key:e.id,className:"wcf-template-item self-start group cursor-pointer relative transition ease-in-out delay-150 rounded-lg shadow-md"},"pro"===e.template_type?(0,a.createElement)("div",{className:"z-10 absolute top-5 right-5"},(0,a.createElement)(Rp,null)):"",(0,a.createElement)("div",{className:"wcf-item__inner bg-background-primary border border-border-subtle"},(0,a.createElement)("div",{className:"wcf-item__thumbnail-wrap relative"},(0,a.createElement)("div",{className:"wcf-item__thumbnail overflow-hidden "+("upsell"===e.type||"downsell"===e.type?"max-h-[345px] min-h-[345px]":"min-h-[400px] max-h-[400px]")},(0,a.createElement)("img",{className:"wcf-item__thumbnail-image w-full",src:e.featured_image_url,alt:(0,z.__)("Step thumbnail image","cartflows")})),(0,a.createElement)("div",{className:"wcf-item__view invisible group-hover:visible absolute backdrop-brightness-50 top-0 w-full h-full transition ease-in-out delay-150"},"default"===t&&(0,a.createElement)("div",{className:"mx-auto my-0 text-center flex flex-col gap-4 relative top-[35%]"},(0,a.createElement)("span",{className:"wcf-step-preview-wrap"},(0,a.createElement)(Wo,{tag:"a",variant:"outline",size:"sm",href:e.link,target:"_blank",rel:"noreferrer",className:"mx-auto !w-fit no-underline !bg-background-primary/10 !border-white/30 !text-text-on-color hover:!bg-background-primary/20",icon:(0,a.createElement)(qm,{className:"w-4 h-4 stroke-2"})},(0,z.__)("Preview","cartflows"))),(0,a.createElement)("span",{className:"wcf-item__btn",onClick:()=>{o("hide"===r?"show":"hide")}},(0,a.createElement)(Wo,{variant:"primary",size:"sm",className:"mx-auto !w-fit",icon:(0,a.createElement)(yH,{className:"w-4 h-4 stroke-2"})},(0,z.__)("Import","cartflows")))),"dynamic"===t&&(0,a.createElement)("div",{className:"mx-auto my-0 text-center relative top-1/2"},(0,a.createElement)(Vee,{currentStep:e,stepName:"StepName",setInputFieldVisibility:o,step_id:n})))),(0,a.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle"},(0,a.createElement)("span",{className:"wcf-item__heading block text-base text-text-primary font-medium p-4 text-center"},e.title)))))},Gee=()=>(0,a.createElement)("div",{className:"wcf-step-library-importer wcf-step-library--other"},(0,a.createElement)("div",{className:"wcf-step-library-importer__list bg-background-primary px-10 py-14 border border-solid border-border-subtle rounded-md shadow-sm"},(0,a.createElement)("div",{className:"wcf-item flex gap-6 items-center justify-center"},(0,a.createElement)("div",{className:"wcf-start-from-scratch w-80"},(0,a.createElement)(Qee,null)),(0,a.createElement)("div",{className:"wcf_item__info flex flex-col gap-3 justify-center max-w-sm"},(0,a.createElement)("h3",{className:"wcf_item__info--title text-xl text-text-primary font-semibold m-0"},(0,z.__)("No Results Found.","cartflows")),(0,a.createElement)("span",{className:"wcf_item__info--desc text-base text-text-secondary font-normal"},(0,z.__)("Don't see a step that you would like to import?","cartflows")),(0,a.createElement)("a",{className:"wcf_item__info--doc text-sm text-text-secondary font-normal hover:text-brand-300 flex gap-1",href:getUtmUrl("https://cartflows.com/funnel-suggestions/",{utm_campaign:"suggestions"}),target:"_blank",rel:"noreferrer"},(0,z.__)("Please suggest us ","cartflows"),(0,a.createElement)(qm,{className:"w-5 h-5 stroke-1 text-text-tertiary hover:text-brand-300"})))))),Hee=function(e){const{templates:t,currentStep:n,required_step_type:r,currentStepId:o,setcurrentStepCB:i}=e,s=t,{step_types:l}=(0,Um.useSelect)(e=>({step_types:e("wcf/importer").getStoreStepTypes()})),c=void 0===r?"default":"dynamic",u=void 0===r?l:r;let d=0;void 0!==o&&(d=o);const f=Object.entries(u);return(0,a.createElement)(a.Fragment,null,"default"===c&&(0,a.createElement)("div",{className:"wcf-remote-steps-filters flex gap-4 items-center p-8 mb-8 -m-8 bg-background-primary"},(0,a.createElement)("div",{className:"wcf-categories w-full"},(0,a.createElement)("div",{className:"wcf-step-type-filter--links sm:block lg:block hidden"},(0,a.createElement)(vQ.Group,{activeItem:n,variant:"rounded",size:"sm",width:"auto",className:"!bg-transparent !p-0 !ring-0 !gap-4",onChange:({value:e})=>{i(e.slug)}},f.map(([e,t])=>{const r=e===n;return(0,a.createElement)(vQ.Tab,{key:e,slug:e,text:t,className:"step-type-filter-item !px-1 !py-1 !font-medium "+(r?"!bg-transparent !shadow-none !text-brand-500":"")})}))),(0,a.createElement)("div",{className:"sm:hidden lg:hidden block"},(0,a.createElement)(kL,{value:n,onChange:e=>{i(e)},size:"sm"},(0,a.createElement)(kL.Button,null),(0,a.createElement)(kL.Options,null,f.map(e=>(0,a.createElement)(kL.Option,{key:e[0],value:e[0]},e[1]))))))),0===s.length?(0,a.createElement)(Gee,null):(0,a.createElement)("div",{className:"wcf-step-importer__list wcf-items-list wcf-row wcf-step-row grid grid-cols-1 sm:grid-cols-4 gap-6 p-6 bg-background-primary shadow-sm rounded-md"},(0,a.createElement)("div",{className:"wcf-start-from-scratch"},(0,a.createElement)(Qee,null)),s.map(e=>(0,a.createElement)(Wee,{item:e,key:e.id,mode:c,step_id:d}))))},$ee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getselectedStep:t}=e("wcf/importer");return{selectedStep:t()}}))(({selectedStep:e})=>{const[t,n]=(0,a.useState)("hide"),[r,o]=(0,a.useState)(""),[{page_builder:i}]=SU();return(0,a.createElement)(a.Fragment,null,(0,a.createElement)(Zee,{visibility:t,setVisibility:n,type:"create-your-own",stepName:r,setStepName:o}),(0,a.createElement)("div",{className:"wcf-step-library--item__start-scratch flex gap-6 mx-auto max-w-4xl px-10 py-14"},(0,a.createElement)("div",{className:"wcf-step-library--item__card relative bg-gray-25 p-5 flex flex-col gap-4 border border-border-subtle rounded-md items-center justify-center h-72 w-2/3"},(0,a.createElement)(_h,{title:(0,z.__)("Create from Scratch","cartflows"),description:(0,z.__)("Select a step type to get started.","cartflows"),tag:"h3",size:"xs",className:"text-center text-base [&>p]:text-text-secondary"}),(0,a.createElement)("div",{className:"w-full"},(0,a.createElement)(Ree,null)),(0,a.createElement)(Wo,{variant:"primary",size:"md",disabled:""===e,icon:(0,a.createElement)(QU,{className:"h-5 w-5 stroke-2"}),iconPosition:"left",onClick:()=>{n("hide"===t?"show":"hide")}},(0,z.__)("Create Step","cartflows"))),(0,a.createElement)("div",{className:"wcf-step-library--item__info flex flex-col gap-6 justify-center w-3/4"},(0,a.createElement)("h3",{className:"text-xl text-text-primary font-semibold m-0"},"bricks-builder"===i&&(0,z.__)("It seems that you are using the Bricks Builder.","cartflows"),"other"===i&&(0,z.__)("It seems that you are using the page builder other than Elementor, Beaver Builder, Block Builder.","cartflows")),(0,a.createElement)("span",{className:"text-base text-text-secondary font-normal mt-2"},"bricks-builder"===i&&(0,z.__)("Are you using Bricks Builder? No worries. CartFlows works well with Bricks Builder. Right now we do not have ready templates for Bricks Builder but we are planning to add it very soon.","cartflows"),"other"===i&&(0,z.__)("Are you using any other page builder? No worries. CartFlows works well with every other page builder. Right now we do not have ready templates for every page builder but we are planning to add it very soon.","cartflows")),(0,a.createElement)("span",{className:"mt-2"},(0,a.createElement)("a",{className:"text-text-secondary hover:text-brand-500 flex items-center gap-2 text-sm",href:getKbDocUrl("https://cartflows.com/docs/how-to-use-cartflows-with-your-own-template/"),target:"_blank",rel:"noreferrer"},(0,z.__)("Learn How","cartflows"),(0,a.createElement)(qm,{className:"w-4 h-4 stroke-1"}))))))}),Xee=function(){const e=(0,g.useHistory)(),[{page_builder:t,flow_id:n}]=SU(),[r,o]=(0,a.useState)("upsell"),[i,s]=(0,a.useState)(""),{all_step_templates:l}=(0,Um.useSelect)(e=>({all_step_templates:e("wcf/importer").getAllStepTemplates()})),c=[];l.forEach(e=>{r===e.type&&c.push(e)});const[u,d]=(0,a.useState)(c);return(0,a.useEffect)(()=>{d(c)},[r]),(0,a.createElement)("div",{className:`wcf-step-library wcf-step-library-${t}`},(0,a.createElement)("div",{className:"wcf-step-library__header bg-background-primary px-8 py-6 flex justify-between items-center sm:items-center -m-8 sm:flex-row flex-col gap-3"},(0,a.createElement)("h3",{className:"text-xl font-semibold text-text-primary m-0 flex items-center gap-2"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs","aria-label":(0,z.__)("Back to Store Checkout","cartflows"),icon:(0,a.createElement)(UW,{className:"w-6 h-6 stroke-1 text-text-primary"}),onClick:()=>{n?e.push(`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${n}`):e.push("admin.php?page=cartflows&path=store-checkout")}}),(0,z.__)("Steps Library","cartflows")),"other"!==t&&"bricks-builder"!==t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"gap-4 flex justify-between items-center"},(0,a.createElement)("div",{className:"wcf-search-steps--form w-56"},(0,a.createElement)(Ym,{type:"text",value:i,onChange:function(e){if(s(e),e&&e.length>=3){const t=e.toLowerCase(),n=c.filter(function(e){return(e.title&&e.title.toLowerCase()||"").includes(t)});d(n)}else d(c)},placeholder:(0,z.__)("Search Steps","cartflows"),size:"md",prefix:(0,a.createElement)(DV,{className:"size-4 text-field-placeholder"}),suffix:i.length>=3?(0,a.createElement)(jV,{className:"size-4 cursor-pointer text-field-placeholder pointer-events-auto",onClick:()=>{s(""),d(c)}}):null})),(0,a.createElement)("span",{className:"divider w-px bg-background-secondary h-7"}),(0,a.createElement)(MH,{template:"store-checkout"})))),(0,a.createElement)("div",{className:"wcf-step-library__body"},(0,a.createElement)("div",{className:"wcf-remote-content"},"other"!==t&&"bricks-builder"!==t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-ready-templates"},(0,a.createElement)(Hee,{templates:u,currentStep:r,setcurrentStepCB:o}))),("other"===t||"bricks-builder"===t)&&(0,a.createElement)("div",{className:"wcf-start-from-scratch current flex items-center justify-center min-h-[500px]"},(0,a.createElement)($ee,null)))))},qee=(0,Rm.compose)((0,Um.withSelect)(e=>{const{getDefaultPageBuilder:t}=e("wcf/importer");return{default_page_builder:t()}}))(({default_page_builder:e})=>{const[{flow_id:t}]=SU();return"library"===new URLSearchParams((0,g.useLocation)().search).get("tab")?(0,a.createElement)(Xee,null):(0,a.createElement)("div",{className:"wcf-flow-library wcf-flex"},"other"!==e?(0,a.createElement)(C,{key:"importer",to:{pathname:"admin.php",search:`?page=cartflows&action=wcf-edit-flow&flow_id=${t}&tab=library&sub=library`},className:"wcf-flow-library__item wcf-flow-library__item--readymade"},"Import from Library"):"",(0,a.createElement)(Qee,null))}),Jee=function(){const[{step_data:e,page_builder:t,flow_id:n,step_id:r}]=SU(),o=(0,g.useHistory)(),i={[e.type]:""},[s,l]=(0,a.useState)(e.type),{all_step_templates:c}=(0,Um.useSelect)(e=>({all_step_templates:e("wcf/importer").getAllStepTemplates()})),u=[];c.forEach(t=>{e.type===t.type&&u.push(t)});const d=async function(){r?o.push(`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${n}&step_id=${r}`):o.push(`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${n}`)};return 0===Object.keys(e).length&&d(),(0,a.createElement)("div",{className:`wcf-step-library wcf-step-library-${t}`},(0,a.createElement)("div",{className:"wcf-step-library__header bg-background-primary px-8 py-6 flex justify-between items-center sm:items-center -m-8 sm:flex-row flex-col gap-3"},"other"!==t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("h3",{className:"flex items-center gap-2 text-2xl font-semibold text-text-primary m-0"},(0,a.createElement)(Wo,{variant:"ghost",size:"xs",icon:(0,a.createElement)(UW,{className:"w-6 h-6 stroke-1"}),onClick:d}),(0,z.sprintf)(/* translators: %s is replaced with the step title */ /* translators: %s is replaced with the step title */ |
| 98 |
(0,z.__)("Templates for %s","cartflows"),e.title)),(0,a.createElement)("div",{className:"wcf-step-library__step-actions"},(0,a.createElement)("div",{className:"wcf-tab-wrapper"},(0,a.createElement)("div",{className:"wcf-get-started-steps"}))))),(0,a.createElement)("div",{className:"wcf-step-library__body"},(0,a.createElement)("div",{className:"wcf-remote-content"},"other"!==t&&e&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-ready-templates current"},(0,a.createElement)(Hee,{templates:u,currentStep:s,required_step_type:i,currentStepId:e.id,setcurrentStepCB:l}))),"other"===t&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"wcf-start-from-scratch current"},(0,a.createElement)(Qee,null))))))};function Kee({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const ete=w.forwardRef(Kee);function tte({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M11.78 5.22a.75.75 0 0 1 0 1.06L8.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z",clipRule:"evenodd"}))}const nte=w.forwardRef(tte);function rte({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{fillRule:"evenodd",d:"M8.22 5.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L11.94 10 8.22 6.28a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const ote=w.forwardRef(rte),ate=({slides:e})=>{const[t,n]=(0,a.useState)(0),[r,o]=(0,a.useState)(!1);return(0,a.createElement)("div",{className:"slider-container mb-2"},(0,a.createElement)("div",{className:"slide-wrapper gap-2 border border-solid border-yellow-400 rounded-lg bg-alert-background-warning p-3"},(0,a.createElement)("div",{className:"slide flex items-center gap-2 "+(r?"fade-out":"fade-in")},(0,a.createElement)("div",{className:"wcf-payment-gateway-notice--icon flex"},(0,a.createElement)(ete,{className:"h-5 w-5 text-support-warning","aria-hidden":"true"})),(0,a.createElement)("div",{dangerouslySetInnerHTML:{__html:e[t]}})),e.length>1&&(0,a.createElement)("div",{className:"slider-dots"},(0,a.createElement)("button",{onClick:()=>{r||(o(!0),setTimeout(()=>{n(0===t?e.length-1:t-1),o(!1)},400))},className:"slider-button "+(0===t?"disabled":""),disabled:0===t},(0,a.createElement)(nte,{className:"h-8 w-8","aria-hidden":"true"})),(0,a.createElement)("button",{onClick:()=>{r||(o(!0),setTimeout(()=>{n(t===e.length-1?0:t+1),o(!1)},400))},className:"slider-button "+(t===e.length-1?"disabled":""),disabled:t===e.length-1},(0,a.createElement)(ote,{className:"h-8 w-8","aria-hidden":"true"})))))},ite=function(){const e=new URLSearchParams((0,g.useLocation)().search),[{flow_type:t}]=SU(),n=e.get("tab"),r=!!e.get("step_id"),o="true"===e.get("flow_settings"),i=cartflows_admin.cartflows_admin_notices,s=i.length>0&&!r&&!o;return(0,a.createElement)(a.Fragment,null,s&&(0,a.createElement)("div",{className:"wcf-notices-wrapper"},(0,a.createElement)(ate,{slides:i})),function(){let e="";switch(n){case"library":e="flows"===t?(0,a.createElement)(Pee,null):(0,a.createElement)(qee,null);break;case"update-template":e=(0,a.createElement)(Jee,null);break;default:e=(0,a.createElement)(xee,null)}return e}())},ste=function(){const[e]=SU();return function(){const[{options:e},t]=SU(),n=function(n){const{name:r,value:o}=n.detail;if(r&&r.includes("[")){const n=r.split("["),a=[];for(let e=1;e<n.length;e++)a.push(n[e].split("]")[0]);const i=r.substr(0,r.indexOf("["));if("wcf-checkout-custom-fields"===i)return"";const s=e[i];if(!s||"object"!=typeof s)return;switch(a.length){case 2:s[a[0]][a[1]]=o;break;case 4:s[a[0]][a[1]][a[2]][a[3]]=o}t({type:"SET_OPTION",name:i,value:s})}void 0!==e[r]&&(window.wcfUnsavedChanges=!0,t({type:"SET_OPTION",name:r,value:o})),"wcf-pre-checkout-offer-product"===r&&(t({type:"SET_OPTION",name:"wcf-pre-checkout-offer-desc",value:o?.product_desc||""}),t({type:"SET_OPTION",name:"wcf-pre-checkout-offer-product-title",value:o?.product_name||""}))},r=[{type:"select"},{type:"select2"},{type:"checkbox"},{type:"text"},{type:"datetime"},{type:"textarea"},{type:"code"},{type:"number"},{type:"radio"},{type:"color"},{type:"font"},{type:"product"},{type:"coupon"},{type:"image-selector"},{type:"toggle"},{type:"selectioncard"},{type:"select-with-logo"}];(0,a.useEffect)(()=>(e&&r.map(function(e){return document.addEventListener(`wcf:${e.type}:change`,n),""}),()=>{r.map(function(e){return document.removeEventListener(`wcf:${e.type}:change`,n),""})}),[e])}(),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(ite,null))},lte=function(e){const t=new URLSearchParams((0,g.useLocation)()?.search).get("flow_id");return"flows"===e.flowType?(PH.flow_id=t,PH.flow_type="flows"):(PH.flow_id=cartflows_admin.global_checkout_id,PH.flow_type="storeCheckout"),(0,a.createElement)(a.Fragment,null,(0,a.createElement)(IU,{reducer:BH,initialState:PH},(0,a.createElement)(ste,{type:e.flowType})))},cte=function(){const e=(0,g.useHistory)(),[t,n]=(0,a.useState)(1);(0,a.useEffect)(()=>{if(wcfCartflowsTypePro()){const t=new URLSearchParams(window.location.search);if(t.has("path")&&"free-vs-pro"===t.get("path")){t.delete("path");const n=`${window.location.pathname}${t.toString()?"?"+t.toString():""}`;e.push(n)}}},[]);const r=[{title:(0,z.__)("Checkout Features","cartflows"),features:[{feature:(0,z.__)("Modern Checkout Styles","cartflows"),description:(0,z.__)("Optimized replacement for the standard WooCommerce checkout page designed for higher conversion","cartflows"),free:!0,pro:!0},{feature:(0,z.__)("Custom Checkout Fields","cartflows"),description:(0,z.__)("Have complete control over the field editor to manage the fields as required","cartflows"),free:!0,pro:!0}]},{title:(0,z.__)("One-Click Upsells / Downsells","cartflows"),features:[{feature:(0,z.__)("Dynamic One-Click Upsells","cartflows"),description:(0,z.__)("Use cart contents or customer data to display relevant upsells for maximum conversion","cartflows"),free:!1,pro:!0},{feature:(0,z.__)("Dynamic Upsell Templates","cartflows"),description:(0,z.__)("Professional templates to help you sell more even if you’re not a designer","cartflows"),free:!1,pro:!0}]},{title:(0,z.__)("Order Bump Features","cartflows"),features:[{feature:(0,z.__)("Dynamic Order Bumps","cartflows"),description:(0,z.__)("Smart order bumps using customer data to display most relevant products or offers","cartflows"),free:!1,pro:!0}]},{title:(0,z.__)("Advanced Funnel Features","cartflows"),features:[{feature:(0,z.__)("A / B Split Testing","cartflows"),description:(0,z.__)("Increase conversions and sales with CartFlows A/B Testing by running simple tests","cartflows"),free:!1,pro:!0},{feature:(0,z.__)("Analytics","cartflows"),description:(0,z.__)("Analyze transactions and user behavior to refine conversions and make more profit","cartflows"),free:!1,pro:!0}]},{title:(0,z.__)("Bonus ($200 Value)","cartflows"),features:[{feature:(0,z.__)("Access to OttoKit Pro Plan","cartflows"),description:(0,z.__)("Cloud-based automation tools that intelligently links your websites, stores, plugins and apps","cartflows"),free:!1,pro:!0},{feature:(0,z.__)("SkillJet Academy Access","cartflows"),description:(0,z.__)("CartFlows offers full training to help you make more profit with SkillJet academy","cartflows"),free:!1,pro:!0}]},{title:(0,z.__)("Others Benefits","cartflows"),features:[{feature:(0,z.__)("Premium Support","cartflows"),description:(0,z.__)("Professional Support, Professional Support Team or Dedicated Support Team","cartflows"),free:!1,pro:!0},{feature:(0,z.__)("Amazing User Community","cartflows"),description:(0,z.__)("Amazing User Community is already a great message unless you’re looking for a different meaning","cartflows"),free:!0,pro:!0},{feature:(0,z.__)("Great Documentation & Video Tutorials","cartflows"),description:(0,z.__)("Comprehensive Documentation and Video Tutorials or Comprehensive Documentation and Video Guides","cartflows"),free:!0,pro:!0}]},{title:(0,z.__)("Free Plugins","cartflows"),features:[{feature:(0,z.__)("Variation Swatches","cartflows"),description:(0,z.__)("Give customers choice by including relevant product variations including size, color and more","cartflows"),free:!0,pro:!0},{feature:(0,z.__)("Stripe Payment Gateway","cartflows"),description:(0,z.__)("Accepting multiple payment methods gives customers choice and can significantly increase conversion","cartflows"),free:!0,pro:!0}]}],o=[{value:"starter-annual",label:(0,z.__)("Starter - Annual","cartflows"),price:99,term:(0,z.__)("/ year","cartflows")},{value:"plus-annual",label:(0,z.__)("Plus - Annual","cartflows"),price:199,term:(0,z.__)("/ year","cartflows")},{value:"pro-annual",label:(0,z.__)("Pro - Annual","cartflows"),price:299,term:(0,z.__)("/ year","cartflows")},{value:"plus-lifetime",label:(0,z.__)("Plus - Lifetime (One Time Pay)","cartflows"),price:699,term:(0,z.__)("for Lifetime","cartflows")},{value:"plus-lifetime-11-splitpay",label:(0,z.__)("Plus - Lifetime (11 x Split Pay)","cartflows"),price:69,term:(0,z.__)("x 11 Months","cartflows")},{value:"pro-lifetime",label:(0,z.__)("Pro - Lifetime (One Time Pay)","cartflows"),price:999,term:(0,z.__)("for Lifetime","cartflows")},{value:"pro-lifetime-11-splitpay",label:(0,z.__)("Pro - Lifetime (11 x Split Pay)","cartflows"),price:99,term:(0,z.__)("x 11 Months","cartflows")}],i=e=>"boolean"==typeof e?e?(0,a.createElement)(VQ,{className:"w-6 h-6 stroke-2 text-support-success"}):(0,a.createElement)(jV,{className:"w-6 h-6 stroke-2 text-brand-500"}):e;return(0,a.createElement)(Eh,{containerType:"grid",cols:12,gap:"lg",className:"wcf-freevspro-page-wrapper w-full"},(0,a.createElement)(Eh.Item,{colSpan:8,className:"wcf-free-vs-pro-table flex flex-col gap-8 lg:col-span-8 md:col-span-12 col-span-12"},(0,a.createElement)("div",{className:"w-full"},(0,a.createElement)("div",{className:"bg-background-primary shadow-sm rounded-md border border-border-muted"},(0,a.createElement)(Eh,{direction:"row",justify:"between",align:"center",className:"w-full py-6 px-5 pr-6 box-border"},(0,a.createElement)("div",null,(0,a.createElement)(_h,{tag:"h2",title:(0,z.__)("Free vs Pro","cartflows"),size:"md"}),(0,a.createElement)(Ch,{size:"sm",className:"m-0 pt-1",color:"text-text-secondary"},(0,z.__)("Explore the key differences between Plus and Pro to find the perfect fit for your needs.","cartflows"))),(()=>{const e=cartflows_admin?.cf_pro_status;return wcfCartflowsTypePro()?(0,a.createElement)(Wo,{tag:"a",href:getUpgradeToProUrl(),target:"blank",variant:"primary",size:"sm"},(0,z.__)("Upgrade to Pro","cartflows")):"inactive"===e?(0,a.createElement)(Hm,null):void 0})()),(0,a.createElement)(SQ,{className:"border-none"},(0,a.createElement)(SQ.Body,null,r.map((e,t)=>(0,a.createElement)(a.Fragment,{key:`cat-${t}`},(0,a.createElement)(SQ.Row,null,(0,a.createElement)(SQ.Cell,{className:"text-sm text-text-primary font-medium bg-background-secondary py-4 px-5"},e.title),(0,a.createElement)(SQ.Cell,{className:"text-sm text-text-primary font-medium bg-background-secondary py-4 px-5 text-center"},(0,z.__)("Free","cartflows")),(0,a.createElement)(SQ.Cell,{className:"text-sm text-text-primary font-medium bg-background-secondary py-4 px-5 text-center"},(0,z.__)("PRO","cartflows"))),e.features.map((e,n)=>(0,a.createElement)(SQ.Row,{key:`${t}-${n}`},(0,a.createElement)(SQ.Cell,{className:"text-sm font-normal text-text-secondary text-left py-4 px-5"},(0,a.createElement)(Eh,{direction:"row",align:"center",gap:"xs"},(0,a.createElement)(Ch,{as:"span",size:"sm",color:"text-text-secondary"},e.feature),(0,a.createElement)(ea,{content:e.description,arrow:!0,placement:"bottom"},(0,a.createElement)(FU,{className:"w-[18px] h-[18px] stroke-1.5 text-brand-500 cursor-help"})))),(0,a.createElement)(SQ.Cell,{className:"text-sm font-normal text-text-secondary text-center py-4 px-5"},(0,a.createElement)("div",{className:"flex justify-center"},i(e.free))),(0,a.createElement)(SQ.Cell,{className:"text-sm font-normal text-text-secondary text-center py-4 px-5"},(0,a.createElement)("div",{className:"flex justify-center"},i(e.pro))))))))),(0,a.createElement)("div",{className:"border-t border-border-subtle text-base text-brand-500"},(0,a.createElement)("a",{href:getUtmUrl("https://cartflows.com/features/",{utm_campaign:"features"}),className:"flex items-center justify-center py-4 px-5 text-brand-500 hover:text-brand-500 no-underline",target:"blank"},(0,z.__)("See all CartFlows Pro features","cartflows"),(0,a.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-5 h-5 ml-2"},(0,a.createElement)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-10.5 6L21 3m0 0h-5.25M21 3v5.25"}))))))),(0,a.createElement)(Eh.Item,{colSpan:4,className:"wcf-pricing-plans--wrapper lg:col-span-4 md:col-span-12 col-span-12 flex flex-col gap-6"},(0,a.createElement)("div",{className:"unlock-pro-features bg-background-primary p-6 shadow-sm rounded-lg border border-solid border-border-subtle flex items-center gap-6 md:flex-col flex-col-reverse"},(0,a.createElement)("div",{className:"flex flex-1"},(0,a.createElement)("img",{className:"md:w-72 w-full",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzEzIiBoZWlnaHQ9IjI2NCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBjbGlwLXBhdGg9InVybCgjYSkiPjxtYXNrIGlkPSJiIiBzdHlsZT0ibWFzay10eXBlOmx1bWluYW5jZSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjMxMyIgaGVpZ2h0PSIyNjQiPjxwYXRoIGQ9Ik0zMTIuNDgzIDBILjUydjI2NGgzMTEuOTYzVjBaIiBmaWxsPSIjZmZmIi8+PC9tYXNrPjxnIG1hc2s9InVybCgjYikiPjxwYXRoIGQ9Ik0yNTAuNjg1IDEyMy40OTdjMzQuMTM0IDAgNjEuODAyLTI3LjY0NiA2MS44MDItNjEuNzQ5QzMxMi40ODcgMjcuNjQ2IDI4NC44MTkgMCAyNTAuNjg1IDBzLTYxLjgwNiAyNy42NDYtNjEuODA2IDYxLjc0OGMwIDM0LjEwMyAyNy42NzIgNjEuNzQ5IDYxLjgwNiA2MS43NDlaIiBmaWxsPSIjRjlDMUFFIi8+PHBhdGggZD0iTTI1Ni4xOCA0Ni4wMjNIMzEuMDc4djE2MS41NTVIMjU2LjE4VjQ2LjAyM1oiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMjU2LjE3OSAyMDguNTkySDMxLjA3N2ExLjAxNyAxLjAxNyAwIDAgMS0xLjAxNS0xLjAxNFY0Ni4wMjJjMC0uNTU3LjQ1Ni0xLjAxNCAxLjAxNS0xLjAxNEgyNTYuMThjLjU1OSAwIDEuMDE1LjQ1NiAxLjAxNSAxLjAxNHYxNjEuNTU2YzAgLjU1OC0uNDU2IDEuMDE0LTEuMDE1IDEuMDE0Wm0tMjI0LjA4Ny0yLjAyOWgyMjMuMDcyVjQ3LjAzN0gzMi4wOTJ2MTU5LjUyNloiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJNNDkuMzA0IDYzLjQxYTUuODYyIDUuODYyIDAgMCAxLTUuODYzLTUuODYgNS44NjIgNS44NjIgMCAwIDEgNS44NjMtNS44NTkgNS44NjIgNS44NjIgMCAwIDEgNS44NjMgNS44NiA1Ljg2MiA1Ljg2MiAwIDAgMS01Ljg2MyA1Ljg1OVptMC05LjY3N2EzLjgyNSAzLjgyNSAwIDAgMC0zLjgyMSAzLjgzIDMuODI1IDMuODI1IDAgMCAwIDMuODIxIDMuODMgMy44MjUgMy44MjUgMCAwIDAgMy44MjEtMy44MyAzLjgyNSAzLjgyNSAwIDAgMC0zLjgyLTMuODNaTTY2LjUwNCA2Mi40MDhhNC44NDUgNC44NDUgMCAxIDAgMC05LjY5IDQuODQ3IDQuODQ3IDAgMCAwLTQuODQ4IDQuODQ1IDQuODQ3IDQuODQ3IDAgMCAwIDQuODQ4IDQuODQ1WiIgZmlsbD0iIzFBMzE0MiIvPjxwYXRoIGQ9Ik03OC44NjcgNTcuNTYzYTQuODQ1IDQuODQ1IDAgMCAwIDQuODQ4IDQuODQ1IDQuODQ1IDQuODQ1IDAgMSAwIDAtOS42OSA0Ljg0NSA0Ljg0NSAwIDAgMC00Ljg0OCA0Ljg0NVoiIGZpbGw9IiNGOUMxQUUiLz48cGF0aCBkPSJNMjIyLjg3NCA3MS45NDdINDAuMTUyYTEuMDE3IDEuMDE3IDAgMCAxLTEuMDE1LTEuMDE1YzAtLjU1Ny40NTYtMS4wMTQgMS4wMTQtMS4wMTRoMTgyLjcyM2ExLjAyIDEuMDIgMCAwIDEgMS4wMTUgMS4wMTQgMS4wMiAxLjAyIDAgMCAxLTEuMDE1IDEuMDE1WiIgZmlsbD0iIzFBMzE0MiIvPjxwYXRoIGQ9Im02Ni40NzIgNzYuNjUyLTE3LjY2MyAzNC43NDkgMTY5LjM1MiA4NS45MTMgMTcuNjYtMzQuNzQ5TDY2LjQ3MiA3Ni42NTJaIiBmaWxsPSIjRkY3QzQ4Ii8+PHBhdGggZD0iTTg2LjU1NSAxMDguNjk5Yy0yLjgzIDUuNTY4LTkuNjMzIDcuNzg3LTE1LjIwNiA0Ljk1OS01LjU3My0yLjgyOS03Ljc5My05LjYyNi00Ljk2My0xNS4xOTMgMi44My01LjU2OCA5LjYzNi03Ljc4NyAxNS4yMDYtNC45NTkgNS41NzMgMi44MjggNy43OTMgOS42MjYgNC45NjMgMTUuMTkzWiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0yMTEuMjY5IDE3Mi45ODNhLjk5Ljk5IDAgMCAxLS40Ni0uMTE0TDc2LjAwNyAxMDQuNDg4YTEuMDIzIDEuMDIzIDAgMCAxLS40NDQtMS4zNyAxLjAxNSAxLjAxNSAwIDAgMSAxLjM3MS0uNDQ0bDEzNC44MDMgNjguMzgxYy40OTUuMjU0LjY5Ny44NjMuNDQ0IDEuMzdhMS4wMDUgMS4wMDUgMCAwIDEtLjkuNTU4aC0uMDEyWk0xMDQuMzMgMTQzLjIxNmMtMS4xNTctMTEuODcxLTEuNjg5LTE4LjAyMS02LjAwNS0xNy44NDQtMy4zMTQuMTQtMy41NCA2LjM1NC0zLjQwMSA5Ljg1NC4wNC45NjQtMS4wMjcgMS41ODUtMS44NCAxLjA1My04LjI3Ni0xNS45OTItOS4yMjgtMTguNjkzLTEzLjA3Ny0xNy4yMS0yLjQ5Ny45NjQtMy4yODYgMy4yMjEtMS41NjIgOC4yNDMgMCAwLS44NDgtMS4zODItMS4yNTYtMi4wNTQtMi42ODgtNC4zNzUtOC4zMTMtLjgyNC01Ljg2MyAzLjI3MiAyLjkwNiA0Ljg0NSAxMC4wNCAxNC4xOTEgMTAuMDQgMTQuMTkxbC01LjM0MyAxMi40MDMgMjEuOTczIDYuNDU1czYuNTQ4LTE2LjE4MiA2LjMzNC0xOC4zNjNaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTk3Ljk5OSAxNjIuNTk2Yy0uMDkyIDAtLjE5LS4wMTMtLjI5NC0uMDM4bC0yMS45NzItNi40NTVhMS4wMDggMS4wMDggMCAwIDEtLjYzNC0uNTQ1IDEuMDE0IDEuMDE0IDAgMCAxLS4wMTItLjgzOGw1LjEwMS0xMS44NTdjLTEuNDk4LTEuOTc4LTcuMTgyLTkuNTM3LTkuNzQ3LTEzLjgxMS0xLjU2Mi0yLjU5OS0uNTItNS4wNzIgMS4zMDgtNi4xODlhNC4yOTggNC4yOTggMCAwIDEgNC43MzMuMTc4Yy0uMDUxLTIuMDY3LjY3NC0zLjk2OSAzLjEzNi00LjkyMSA0LjM4LTEuNjg2IDUuNzUxIDEuMDAyIDEyLjM3NSAxMy44ODdsMS43MjggMy4zNDhjLjA3Ni0uMDM4LjE2My0uMDg5LjE2My0uMDg5LS4yNjYtNy4wMTMgMS4yNDUtMTAuNzc5IDQuMzgtMTAuOTA2IDUuMjU2LS4yMTYgNS44NTEgNi4zNDEgNy4wMDggMTguMjQ5bC4wNDguNTA3Yy4yMTggMi4yNTgtNC44NDggMTQuOTktNi40MSAxOC44NDZhMSAxIDAgMCAxLS45NC42MzRIOThabS0yMC41OS04LjExNyAxOS45OTEgNS44NzJjMy4wMzYtNy41NzEgNi4wMTctMTUuODE0IDUuOTMtMTcuMDQ0bC0uMDUxLS41MDdjLTEuMTA2LTExLjMzOC0xLjcyOS0xNi40MjMtNC43ODUtMTYuNDIzaC0uMTE1Yy0yLjA0NS4wODgtMi42MDQgNC42MDMtMi40MzggOC44MDFhMi4xNzQgMi4xNzQgMCAwIDEtMS4xMTggMi4wMDMgMi4yIDIuMiAwIDAgMS0yLjI5NS0uMDYzIDEuMDk0IDEuMDk0IDAgMCAxLS4zNTctLjM4bC0xLjk2Ni0zLjgwNWMtNi40NzctMTIuNTY4LTcuMjczLTEzLjkxMi05LjgzOC0xMi45MjMtMS4wNDMuNDA2LTIuOTcgMS4xNDEtLjk4IDYuOTYyYTEuMDE0IDEuMDE0IDAgMCAxLTEuODI3Ljg1bC0xLjI1Ni0yLjA1NGMtMS4wMjctMS42NjItMi41MDItMS43ODktMy41MDQtMS4xOC0uOTc1LjU5Ni0xLjU0NiAxLjg3Ny0uNjIzIDMuNDEyIDIuODU4IDQuNzQzIDkuOTE0IDE0IDkuOTc4IDE0LjA4OS4yMy4yOTIuMjcuNjg1LjEyNiAxLjAxNWwtNC44ODMgMTEuMzUuMDEyLjAyNVoiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJNODMuMjExIDE0MS4xMjhjLS40MDQgMC0uOC0uMjU0LS45NTEtLjY2bC00Ljc2MS0xMi43OTZhMS4wMjggMS4wMjggMCAwIDEgLjU5OS0xLjMwNiAxLjAyOCAxLjAyOCAwIDAgMSAxLjMwOC41OTZsNC43NTYgMTIuNzk2Yy4xOS41Mi0uMDc1IDEuMTA0LS41OTQgMS4zMDZhMS4xNDcgMS4xNDcgMCAwIDEtLjM1Ny4wNjRaIiBmaWxsPSIjMUEzMTQyIi8+PHBhdGggZD0iTTcwLjc0MyAxNTEuNDg0Yy04LjU0NyAxNy44MDYtMTUuMDQ0IDMxLjAyLTE1LjA0NCAzMS4wMmwxNC4yNzggNDguMzgyYzkuODE1LTMuNzU0IDEzLjg2Mi04LjkxNSAzNC4wODMtNjkuMzk1bC0zMy4zMTctMTAuMDA3WiIgZmlsbD0iI0Y5QzFBRSIvPjxwYXRoIGQ9Ik02OS45NzggMjMxLjkwM2MtLjE1IDAtLjMwMS0uMDM4LS40NDQtLjEwMWExLjAwOSAxLjAwOSAwIDAgMS0uNTItLjYyMWwtMTQuMjc3LTQ4LjM4MmEuOTY4Ljk2OCAwIDAgMSAuMDYzLS43MzVjLjA2My0uMTI3IDYuNTg4LTEzLjQzMSAxNS4wNC0zMS4wMmExLjAxNiAxLjAxNiAwIDAgMSAxLjIwNC0uNTMzbDMzLjMyMSAxMC4wMDZjLjI2Ni4wNzYuNDg0LjI2Ni42MTEuNTA3cy4xNS41MzMuMDYzLjc4NmMtMTkuODkxIDU5LjQ1My0yNC4wNTMgNjUuOTM0LTM0LjY5MiA3MC4wMTdhLjkwMy45MDMgMCAwIDEtLjM3LjA2NHYuMDEyWk01Ni43OSAxODIuNjA5bDEzLjg1IDQ2LjkzNmM4LjM3Ni0zLjQ2MiAxMi43MDQtOS4zOTggMzIuMTI4LTY3LjM2N2wtMzEuNDk0LTkuNDZjLTcuNSAxNS42MjMtMTMuNDE4IDI3LjcxLTE0LjQ5NiAyOS44OTFoLjAxMloiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJNMTM1LjczMiAxODIuMjExYTEuODYzIDEuODYzIDAgMCAwIDEuNjczIDIuMDQxIDEuODY3IDEuODY3IDAgMSAwIC4zNjktMy43MTUgMS44NjQgMS44NjQgMCAwIDAtMi4wNDIgMS42NzRaIiBmaWxsPSIjRkNGRkZGIi8+PHBhdGggZD0iTTQzLjYyNSAxNjEuNzk2Yy0yLjAzIDAtMy45OTYtLjMxNy00LjExLS4zM2ExLjAwNyAxLjAwNyAwIDAgMS0uODM3LTEuMTY2IDEuMDA4IDEuMDA4IDAgMCAxIDEuMTY1LS44MzhjLjA0IDAgMy4yMTEuNTA4IDUuMzgzLjIxNmExLjAyIDEuMDIgMCAwIDEgMS4xNDIuODYzIDEuMDE1IDEuMDE1IDAgMCAxLS44NjQgMS4xNDFjLS41OTUuMDc2LTEuMjI5LjExNC0xLjg2My4xMTRoLS4wMTZaTTEyMS4wMDQgMzEuNzA1Yy0zLjg1NyAwLTYuOTkyLTMuMTMyLTYuOTkyLTYuOTc1IDAtMy44NDMgMy4xMzUtNi45ODggNi45OTItNi45ODggMy44NjEgMCA2Ljk5NyAzLjEzMyA2Ljk5NyA2Ljk4OCAwIDMuODU1LTMuMTM2IDYuOTc1LTYuOTk3IDYuOTc1Wm0wLTExLjkzNGMtMi43MjcgMC00Ljk2MyAyLjIyLTQuOTYzIDQuOTU5IDAgMi43NCAyLjIyNCA0Ljk0NiA0Ljk2MyA0Ljk0NmE0Ljk0NiA0Ljk0NiAwIDAgMCA0Ljk1MS00Ljk0NmMwLTIuNzI3LTIuMjItNC45NTktNC45NTEtNC45NTlaIiBmaWxsPSIjMUEzMTQyIi8+PHBhdGggZD0iTTE3Ny4zMTQgMjQyLjgxMmMtNi4yNDcgMC05LjMzMS00LjEwOS0xMi4zLTguMDc5LTIuNzk1LTMuNzI4LTUuNDQ3LTcuMjY2LTEwLjY3NS03LjI2NmExLjAxOCAxLjAxOCAwIDAgMS0xLjAxNS0xLjAxNWMwLS41NTguNDU2LTEuMDE0IDEuMDE1LTEuMDE0IDYuMjU5IDAgOS4zMjcgNC4xMDkgMTIuMyA4LjA3OCAyLjc5MSAzLjcyOSA1LjQ0MyA3LjI2NyAxMC42NzUgNy4yNjcgNS4yMjkgMCA3Ljg4LTMuNTI2IDEwLjY3NS03LjI2NyAyLjk2OS0zLjk2OSA2LjA1My04LjA3OCAxMi4zLTguMDc4IDYuMjQzIDAgOS4zMjcgNC4xMDkgMTIuMyA4LjA3OCAyLjcyOCAzLjY0IDUuMzA0IDcuMDg5IDEwLjI3OSA3LjI1NC41NTkuMDEzIDEuMDAzLjQ5NC45NzkgMS4wNTMtLjAxMi41NTgtLjQ3Mi45ODktMS4wNTQuOTc2LTUuOTU0LS4yMDMtOC45MzUtNC4xOTgtMTEuODQxLTguMDY2LTIuNzk0LTMuNzI4LTUuNDQ2LTcuMjY2LTEwLjY3NS03LjI2Ni01LjIzMiAwLTcuODg0IDMuNTI1LTEwLjY3OSA3LjI2Ni0yLjk2OSAzLjk3LTYuMDUzIDguMDc5LTEyLjI5NiA4LjA3OWguMDEyWiIgZmlsbD0iI0ZGN0M0OCIvPjxwYXRoIGQ9Ik0xNTguODU5IDE1My4xOTVjLTEuNDIzLTIuOTQyLTUuNDk4LTEuNjIzLTYuMzg2LTEuNDU4IDAgMCA1LjUzNC0yLjkxNyAzLjIxMS02LjE4OS0xLjUxLTIuMTMxLTUuNDgyLS44NS05LjIyOCAxLjA1MiAzLjI1LTIuMzgzIDQuODEyLTUuODk3IDIuNTc3LTcuNzIzLTIuMjQ0LTEuODM5LTYuMDkzLTIuMTgxLTIxLjgwNiA5LjM0Ny0yLjYwMSAxLjkxNS04LjExLTEuMjgxLTguMTEtMS4yODFsLTguODg4LTQuNjU0cy0uNzg1IDcuOTY0IDMuMjUxIDE1LjgxNGwtMy45NzIgMTYuMjA4IDIzLjU1OCA4LjgwMSAzLjY5NC0xMy42MzNjMi41NDktMS4yMTggMTguNDA1LTUuOTM1IDE5LjUzNC04LjA5MS41MzItMS4wMTUuMzY5LTIuMjU4LS4yMTQtMy4yNzIgMy4yNDctMi4yODMgMy40MDItMy42NzggMi43OTEtNC45NDZsLS4wMTIuMDI1WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0xMzMuMDUyIDE4NC4xNThhMS4xOCAxLjE4IDAgMCAxLS4zNTctLjA2NGwtMjMuNTU4LTguODAxYTEuMDI1IDEuMDI1IDAgMCAxLS42MzQtMS4xOTJsMy44ODUtMTUuODUzYy0zLjkzNi03LjkxMy0zLjIxMS0xNS43MTMtMy4xNzUtMTYuMDQyLjAzOS0uMzMuMjMtLjYzNC41MzUtLjc4N2EuOTc1Ljk3NSAwIDAgMSAuOTUxIDBsOC44ODcgNC42NTRjMS4zMi43NjEgNS4zNjggMi42IDcuMDQ0IDEuMzcgMTUuMTY3LTExLjEzNCAxOS45MzktMTEuODQ1IDIzLjA1MS05LjMwOC45NjMuNzg2IDEuNDQ3IDEuODUxIDEuNDIzIDMuMTA3LS4wMjguODc1LS4zMjEgMS44MDEtLjg0IDIuNzI3IDMuMDItLjkwMSA1LjEyOS0uNTU5IDYuMjQ3IDEuMDI3LjY4Ni45NjQuOTExIDIuMDQxLjY0NiAzLjExOS0uMjAyLjgzNy0uNjc0IDEuNTk4LTEuMjMzIDIuMjMyIDEuNDc1LjExNSAyLjk5Ny42OTggMy44MzMgMi40NDguOTI4IDEuOTQuMjA2IDMuNjc4LTIuNDQ5IDUuNzA3LjQyIDEuMTY3LjM4IDIuMzk3LS4xNTEgMy40MTEtLjgyNSAxLjU4Ni01LjQ1OCAzLjQxMi0xNC45MDEgNi42ODQtMS45OTQuNjg1LTMuNzQ2IDEuMjkzLTQuNjczIDEuNjc0bC0zLjU2OCAxMy4xNjRhLjk5Ny45OTcgMCAwIDEtLjUxOS42MzQuOTg3Ljk4NyAwIDAgMS0uNDY4LjExNGwuMDI0LS4wMjVabS0yMi4zNTMtMTAuNDUxIDIxLjY2NyA4LjEwNCAzLjQwMS0xMi41NTVjLjA4LS4yOTEuMjgyLS41Mi41NDctLjY0Ny44MjUtLjM5MyAyLjgwNy0xLjA3NyA1LjMwNC0xLjk0IDQuMjAyLTEuNDU4IDEyLjk1LTQuNDc3IDEzLjc3NS01LjcwNy4zMTctLjYyMS4yNDItMS40OTYtLjIwMi0yLjI4MmEuOTk3Ljk5NyAwIDAgMSAuMjg5LTEuMzMyYzMuMTYzLTIuMjMyIDIuNzE5LTMuMTcxIDIuNDYyLTMuNjc4LS44MDktMS42OTktMy4wNDUtMS40Mi00Ljg4NC0uOTc2bC0uMzguMDg4Yy0uNTA4LjEwMi0uOTc5LS4xOS0xLjE1OC0uNjU5LS4xNjItLjQ3LjA0LTEuMDAyLjQ4NC0xLjIzLjc3My0uNDA2IDIuODQyLTEuNzg4IDMuMTk5LTMuMjQ3LjExNS0uNTA3LjAxMi0uOTc2LS4zMjktMS40NzEtLjg5Mi0xLjI0My0zLjc3LS43NDgtNy45MzYgMS4zN2ExLjAyOCAxLjAyOCAwIDAgMS0xLjMzMi0uMzY4IDEgMSAwIDAgMSAuMjY1LTEuMzQ0YzEuOTE5LTEuNDA4IDMuMTc2LTMuMjIyIDMuMjExLTQuNjQyLjAxNi0uNjA5LS4yMDItMS4wOS0uNjctMS40ODQtMS44MjctMS40ODMtNS43LTEuNTM0LTIwLjU2NSA5LjM3Mi0zLjA2IDIuMjQ1LTguNjA1LS44NjItOS4yMjgtMS4yM2wtNy40MjQtMy44OGMwIDIuNjM3LjM2OCA4LjIzIDMuMTg3IDEzLjcwOS4xMTEuMjE1LjEzOC40NjkuMDg3LjcxbC0zLjc1OCAxNS4zMzItLjAxMi0uMDEzWiIgZmlsbD0iIzFBMzE0MiIvPjxwYXRoIGQ9Ik0xNDEuNjQ2IDE1OS4wMmEuOTk2Ljk5NiAwIDAgMS0uODc2LS41MDcgMS4wMTEgMS4wMTEgMCAwIDEgLjM2OC0xLjM4M2wxMC44MjYtNi4yNTJhMS4wMTQgMS4wMTQgMCAwIDEgMS4zODMuMzY4IDEuMDEgMS4wMSAwIDAgMS0uMzY4IDEuMzgybC0xMC44MjYgNi4yNTJjLS4xNjYuMDg5LS4zMjkuMTQtLjUwNy4xNFpNMTM2Ljg5NyAxNTMuMjg4Yy0uMzQxIDAtLjY4Ni0uMTc3LS44NzYtLjQ5NGExLjAyOCAxLjAyOCAwIDAgMSAuMzU3LTEuMzk1bDkuOTAyLTUuODM0YTEuMDI4IDEuMDI4IDAgMCAxIDEuMzk1LjM1NSAxLjAyNyAxLjAyNyAwIDAgMS0uMzU3IDEuMzk1bC05LjkwMiA1LjgyMWEuOTY0Ljk2NCAwIDAgMS0uNTE5LjE0di4wMTJaTTE0NC4zNzUgMTYzLjYzNWMtLjQwNSAwLS43ODUtLjI1NC0uOTUyLS42NDdhMS4wMDkgMS4wMDkgMCAwIDEgLjU4My0xLjMwNmwxMS42OTQtNC40NzdhMS4wMSAxLjAxIDAgMCAxIDEuMzA0LjU4MyAxLjAwNyAxLjAwNyAwIDAgMS0uNTgzIDEuMzA3bC0xMS42OSA0LjQ3NmEuODk2Ljg5NiAwIDAgMS0uMzY4LjA2NGguMDEyWk01My4yNzMgMTM0LjEzNWMuMjU0IDEzLjU5NS04LjU1NCAyOC42NjItMjEuNTQgMjguOTAzLTEyLjk5OC4yNC0yMy43MzYtMTAuNTc4LTIzLjk5LTI0LjE3Mi0uMjU0LTEzLjU5NiAxMC4wNzYtMjQuODA2IDIzLjA3NC0yNS4wNDcgMTIuOTk4LS4yNDEgMjIuMjAyIDYuNzIxIDIyLjQ1NiAyMC4zMTZaIiBmaWxsPSIjMUEzMTQyIi8+PHBhdGggZD0ibTIyLjY2IDE3Mi41NDktLjAzOS0xMS4wODRzMTEuOTMyLS41OTYgMTQuNjExLTE2LjI0NmMwIDAgMy4xNDgtMi4xMy45ODctMTMuOTVhMS4zOTYgMS4zOTYgMCAwIDEgMS4yNzMtMS42MzZjMy4zMzctLjIyOCAxMC44MjUtMS4xMDMgMTAuNzYyLTQuMzc1bDMuMzY1IDExLjQxNCA0Ljk5OS44MTFjLjQ3Mi4wNzYuOC40OTUuNzY1Ljk3N2wtLjU1OSA3LjAxM2MxLjA3OCA1LjU4IDIuNjI0IDEzLjQzLTEzLjQ4MSAxNS4yMDZsLjgyNCAxMi4zNTItMjMuNTIyLS40ODJoLjAxNloiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNNDYuMTc4IDE3NC4wNDZjLS41MzEgMC0uOTc1LS40MDYtMS4wMTUtLjk1MWwtLjgyNC0xMi4zNTJhMS4wMDggMS4wMDggMCAwIDEgLjktMS4wNzhjNi4wMTctLjY2IDEwLTIuMjcgMTEuODQ0LTQuNzY4IDIuMDA2LTIuNzE1IDEuMzMyLTYuMTY0Ljc0OS05LjIwOGEyLjEyMiAyLjEyMiAwIDAgMS0uMDI4LS4zMTdsLjU2LTcuMDEzLTQuOTEyLS42OTdhMS4wMzkgMS4wMzkgMCAwIDEtLjgxMy0uNzExbC0zLjM2NS0xMS40MTNhMS4wMSAxLjAxIDAgMCAxIC42ODYtMS4yNTYgMS4wMDYgMS4wMDYgMCAwIDEgMS4yNTYuNjg1bDMuMTg3IDEwLjgwNSA0LjM2OC43MWExLjk0NyAxLjk0NyAwIDAgMSAxLjYxIDIuMDU0bC0uNTQzIDYuODc0Yy42MzQgMy4yOTggMS4zNjcgNy4zMTgtMS4xMyAxMC43MDQtMi4xMiAyLjg2Ni02LjE0NCA0LjY1NC0xMi4zIDUuNDY2bC43NjEgMTEuMzg4Yy4wMzYuNTU4LS4zOCAxLjA0LS45NCAxLjA3OGgtLjA3NS4wMjRaTTIyLjY1NiAxNzMuNTYzYTEuMDIgMS4wMiAwIDAgMS0xLjAxOS0xLjAxNWwtLjAzNS0xMi40NzljMC0uNTU4LjQ1NS0xLjAxNCAxLjAxNC0xLjAxNC42MzUuMDEyIDEuMDE1LjQ0NCAxLjAxNSAxLjAxNGwuMDQgMTIuNDc5YTEuMDIgMS4wMiAwIDAgMS0xLjAxNSAxLjAxNVoiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJNNDUuNzIxIDEzNC43NzNjLS4xMzggMC0uMjkzLS4wMzgtLjQzMi0uMTAxYTEuMDA1IDEuMDA1IDAgMCAxLS40ODMtMS4zNDVjLjA0LS4wNzYuOTA0LTEuODc3IDIuOTMzLTIuNTExIDEuNTUtLjQ4MiAzLjI4Ni0uMTY0IDUuMTc3LjkyNi40ODQuMjc5LjY1LjkwMS4zNjkgMS4zODMtLjI5LjQ4MS0uOTEyLjY0Ni0xLjM4NC4zNjctMS4zNzEtLjc5OS0yLjU2NS0xLjA1Mi0zLjU0LS43NDgtMS4xOC4zNTUtMS43MjggMS40NDYtMS43MjggMS40NDZhMS4wMjEgMS4wMjEgMCAwIDEtLjkxMi41NzF2LjAxMlpNNDguNDM2IDEzNy40MzJhNS40NSA1LjQ1IDAgMCAxLS4xNC0uOTg5YzAtLjE1MiAwLS4zMDQuMDY0LS40NDMuMjE0LS40MzIuOTY0LS40OTUgMS4xNjYtLjA3Ny4xMjcuMjY3LjIwNi41NTguMjQxLjgzNy4wNzYuNDQ0LjI2Ni44NjMuMDEyIDEuMzA3YS42NTYuNjU2IDAgMCAxLS40NDQuMzI5Yy0uNDU1LjA4OS0uNzEtLjMwNC0uODEyLS42MjFhMy45NTMgMy45NTMgMCAwIDEtLjEtLjM1NWwuMDEzLjAxMloiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJNNDIuOTY4IDE0NC44NzRjLTEuNDg2IDIuNjg5LTUuMTMgMy41MzktOC4xMjYgMS44NzctMi45OTMtMS42NjEtNC4yMjYtNS4xODYtMi43MjctNy44NzUgMS40ODYtMi42ODkgNS4xMy0zLjUzOCA4LjEyMi0xLjg3NyAyLjk5NyAxLjY2MSA0LjIzIDUuMTg3IDIuNzMxIDcuODc1WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0zOC4wMTkgMTQ1LjM1N2MtLjM0MSAwLS42ODYtLjE3Ny0uODc3LS40OTRhMS4wMTcgMS4wMTcgMCAwIDEgLjM1Ny0xLjM5NWwxLjExOC0uNjYtMi43OTQtMi42MzhhMS4wMDUgMS4wMDUgMCAwIDEtLjAzNi0xLjQzMyAxLjAwNCAxLjAwNCAwIDAgMSAxLjQzLS4wMzhsMy43ODYgMy41NjRjLjIyNi4yMTUuMzUzLjUzMi4zMTguODUtLjA0LjMxNy0uMjE4LjU5Ni0uNDk2Ljc2bC0yLjI3MSAxLjM0NWEuOTg5Ljk4OSAwIDAgMS0uNTI0LjEzOWgtLjAxMVpNNTkuMjU1IDE0OC43ODNINTQuNTNhMS4wMTggMS4wMTggMCAwIDEtMS4wMTQtMS4wMTVjMC0uNTU4LjQ1Ni0xLjAxNCAxLjAxNC0xLjAxNGg0LjcyNWExLjAyIDEuMDIgMCAwIDEgMS4wMTUgMS4wMTQgMS4wMiAxLjAyIDAgMCAxLTEuMDE1IDEuMDE1WiIgZmlsbD0iIzFBMzE0MiIvPjxwYXRoIGQ9Ik0yNDQuODU5IDMxLjM4NnMtNDMuOTIxLTIuODE1LTU4LjU0NC0yLjAyOWMtOS42NDQuNTA3LTI1LjI4MiAzLjU5LTM1LjU5MiAxNS4wMjgtMTAuMjkxIDExLjQ0LTIwLjQyMyAyMy4wOTQtOS43MiAzMC45MTkgMi4xNjggMS41ODUgNC4zMTMgMi4xMyA2LjQyMiAxLjk3OC4zOTIgMi4zNzIgMS43NjQgNC41NzkgNC40NDMgNi41MzIgMTAuNjk5IDcuODI0IDIwLjk5My05LjY1MSAyNi4zODgtMTEuMjUgMS4yOTctLjM4IDMuMDcyLS43OTggNS4wMzktMS4yMTcuNTU5IDMuNzQyIDMuMjEgNy42NiAxMC40NDkgMTAuNDI1IDAgMC0xMy42MjEgOC43NzUtMTcuOTg5IDE0LjI5Mi00LjM2NCA1LjUzLTcuMTcxIDE3Ljg4MiAxLjE2OSAyMS43NSA4LjM0MSAzLjg2OCAyNi44MzMtMTEuMyAzMC44ODQtMTIuOTM2IDQuMDM1LTEuNjM2IDM3LjM0NC0xLjg3NyA0OC4zODQtMTQuNzYybC0xMS4zMjEtNTguNzNoLS4wMTJaIiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTE4MC4wOTUgMTE5LjQ2NGMtMS4zMDkgMC0yLjUyNi0uMjI5LTMuNjA0LS43MjMtMi44ODItMS4zMzItNC44MTItMy43NTQtNS41ODUtNi45NzUtMS4zMzYtNS42MDUgMS4wOS0xMi41OTMgNC4wMzUtMTYuMzM1IDMuNTY4LTQuNTE0IDEyLjg3MS0xMC45NDQgMTYuNjQxLTEzLjQ2OC01LjA2Ni0yLjMwOC04LjExLTUuNDY1LTkuMDg5LTkuNDIyLTEuNjQ5LjM2OC0yLjk4MS42OTctMy45NDguOTg5LTEuNDE5LjQxOC0zLjU0IDIuMzk3LTUuNzc2IDQuNTAyLTUuNjQ4IDUuMjg4LTEzLjM5IDEyLjUxNy0yMS41IDYuNTk0LTIuNDYyLTEuOC00LjAzNi0zLjkxOC00LjY1OC02LjMxNS0yLjE3Mi0uMDM4LTQuMjUzLS43NzQtNi4yMDgtMi4xOTQtMi45NTctMi4xNjktNC42MjItNC43ODEtNC45MjctNy43NzQtLjc5Ny03LjY0NyA3LjMyNi0xNi42NzcgMTQuNDk2LTI0LjY0IDExLjQ2NC0xMi43MzQgMjkuMTk1LTE0Ljk5MSAzNi4yOTEtMTUuMzcyIDE0LjUyMy0uNzczIDU4LjIyNiAyLjAwNCA1OC42NyAyLjAzLjQ1Ni4wMjUuODQ4LjM2Ny45NC44MjRsMTEuMzIxIDU4LjczYS45ODcuOTg3IDAgMCAxLS4yMjYuODVjLTguNjQ2IDEwLjA4Mi0zMC4xODYgMTIuNjA1LTQxLjc2NSAxMy45NzUtMy4zMDkuMzkzLTYuMTY4LjcyMy03LjAxNiAxLjA2NS0uOTE2LjM2OC0yLjg1OCAxLjYzNi01LjEwNSAzLjEyLTYuNjI0IDQuMzM3LTE2LjA5NCAxMC41MjYtMjIuOTc2IDEwLjUyNmwtLjAxMS4wMTNabTMuMTk5LTQ5LjE0M2MuMjAyIDAgLjQwOC4wNjQuNTgyLjE3OC4yMy4xNjUuMzgxLjQwNi40Mi42ODUuNjExIDQuMTM0IDMuOTA5IDcuMzggOS43OTkgOS42MjUuMzU3LjE0LjYxMS40NTcuNjQ2LjgzNy4wNC4zOC0uMTM4Ljc0OS0uNDU1Ljk2NC0uMTM5LjA4OS0xMy41MjkgOC43MzgtMTcuNzQ3IDE0LjA3Ny0yLjY1MiAzLjM2MS00Ljg0OCA5LjYyNi0zLjY1NSAxNC41OTcuNjIyIDIuNjM4IDIuMTMzIDQuNTE1IDQuNDU2IDUuNjA2IDUuNzc1IDIuNjc1IDE3LjU2OC01LjA0OCAyNC42MjQtOS42NjQgMi41MjktMS42NjIgNC4zNjgtMi44NTMgNS40NTgtMy4yOTcgMS4xMDYtLjQ0NCAzLjY3MS0uNzQ5IDcuNTQtMS4yMDUgMTEuMTQ2LTEuMzA3IDMxLjc4Ny0zLjcyOSA0MC4xMzktMTIuOTFsLTExLjA4NC01Ny40NzVjLTUuOTc3LS4zNjgtNDQuMzI1LTIuNjg5LTU3LjY0LTEuOTkxLTYuODQxLjM2OC0yMy45MjYgMi41MjQtMzQuODk0IDE0LjY5OC02Ljg3OCA3LjY0OC0xNC42ODcgMTYuMzIyLTEzLjk4NSAyMy4wNjkuMjU0IDIuNDM1IDEuNTk3IDQuNTE0IDQuMTEgNi4zNCAxLjg0IDEuMzQ1IDMuNzM1IDEuOTI4IDUuNzUyIDEuNzg5LjUxOS0uMDM4Ljk4Ny4zMyAxLjA3OC44NS4zNjkgMi4yMzEgMS42ODkgNC4xNiA0LjA0OCA1Ljg3MSA2Ljc1NCA0LjkzNCAxMy40OTMtMS4zNyAxOC45MTYtNi40MyAyLjUyNS0yLjM3MSA0LjcwOS00LjQxMyA2LjU4OC00Ljk3MSAxLjIxNy0uMzU1IDIuOTI5LS43NzMgNS4xMTMtMS4yNDMuMDc2LS4wMTIuMTM5LS4wMjUuMjE0LS4wMjVsLS4wMjMuMDI1WiIgZmlsbD0iIzFBMzE0MiIvPjxwYXRoIGQ9Ik0xNDcuNDI1IDc4LjI5NmMtLjM4MSAwLS43NDktLjIxNi0uOTE2LS41N2ExLjAyNCAxLjAyNCAwIDAgMSAuNDcyLTEuMzU4Yy4wNDctLjAyNSA1LjY2LTIuNzY0IDExLjU2My05LjQxIDYuMzk4LTcuMTkgMjMuMjY0LTYuMjAxIDIzLjk3OC02LjE1LjU0My4wMzguOTUxLjQ4MS45NTEgMS4wMjYgMCAuMDY0LS4wNzUgNi40My43ODUgOS4yMDhhMS4wMTggMS4wMTggMCAwIDEtLjY3IDEuMjY4IDEuMDIzIDEuMDIzIDAgMCAxLTEuMjcyLS42NzJjLS43NDYtMi40MS0uODYxLTYuODYxLS44NzItOC44NTItMy42MzEtLjEwMi0xNi40NTUtLjAyNi0yMS4zNzggNS41MTYtNi4yMDggNi45NzUtMTEuOTcxIDkuNzc4LTEyLjIwOSA5Ljg5MmExLjA4OCAxLjA4OCAwIDAgMS0uNDMyLjEwMloiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJNMTkzLjczOSA4Mi43ODdhMS4wMiAxLjAyIDAgMCAxLS43MzQtMS43MjVjLjA3Ni0uMDc2IDcuNDQ5LTcuNzYxIDQuMzQxLTEzLjEtMy4xOTktNS40NzktMTQuNzM4LTUuMTM2LTE0Ljg1My01LjEzNmExLjAxNCAxLjAxNCAwIDAgMS0xLjA1NS0uOTc3IDEuMDIyIDEuMDIyIDAgMCAxIC45OC0xLjA1MmMuNTA3LS4wMTMgMTIuODcxLS4zODEgMTYuNjggNi4xMzggMy44ODUgNi42NTgtNC4yOTMgMTUuMTY3LTQuNjQ2IDE1LjUzNWExLjA0MSAxLjA0MSAwIDAgMS0uNzI1LjMwNGwuMDEyLjAxM1oiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJNMTkwLjAzMyA3My4zMTRjLS4zOTYgMC0uNzc3LS4yNC0uOTM5LS42MzRhMSAxIDAgMCAxIC41NTktMS4zMTlsOC43NDQtMy41ODlhMS4wMDUgMS4wMDUgMCAwIDEgMS4zMi41NTggMS4wMDUgMS4wMDUgMCAwIDEtLjU1OSAxLjMybC04Ljc0NCAzLjU4OGMtLjEyNy4wNS0uMjU0LjA3Ni0uMzgxLjA3NlpNMTYyLjc5NSA2NC44MzZsLTI3Ljc2OCAyMy4yMjMgMjMuMjQxIDI3Ljc0NSAyNy43NzItMjMuMjIzLTIzLjI0NS0yNy43NDVaIiBmaWxsPSIjMUEzMTQyIi8+PHBhdGggZD0iTTE2Ni41IDk3LjQ2Yy0zLjk0OCAzLjI5OC05LjgyNiAyLjc3OC0xMy4xMjQtMS4xNjYtMy4zMDItMy45NDQtMi43ODMtOS44MTYgMS4xNjUtMTMuMTEzIDMuOTQ4LTMuMjk4IDkuODI3LTIuNzc4IDEzLjEyNSAxLjE2NiAzLjMwMiAzLjk0NSAyLjc3OSA5LjgxNi0xLjE2NiAxMy4xMTRaIiBmaWxsPSIjRkY3QzQ4Ii8+PHBhdGggZD0ibTI2Mi42NTIgMjEuNzM4LTIyLjIyNiA0LjU5OSAxNC45MTIgNzEuOTQgMjIuMjIyLTQuNTk5LTE0LjkwOC03MS45NFoiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJtMTguOTMgMTcxLjc3Ny4wNC03Ljk1MiAyOC41NzItLjc4NiAxMS4xNyAxMC4wNjktMzkuNzgyLTEuMzMxWiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Im01OC43MTEgMTc0LjEyMS0zOS44MTgtMS4zMTlhMS4wMDMgMS4wMDMgMCAwIDEtLjk3OS0xLjAxNGwuMDUyLTcuOTUyYzAtLjU0NS40NDQtLjk4OS45OS0xLjAxNGwyOC41NzMtLjc4N2MuMjMgMCAuNTA3LjA4OS43MS4yNjdsMTEuMTcgMTAuMDY5Yy4zMTcuMjc5LjQyLjczNi4yNjYgMS4xMjktLjE1MS4zOC0uNTMxLjYzNC0uOTQuNjM0bC0uMDI0LS4wMTNabS0zOC43NjMtMy4zMjIgMzYuMDA4IDEuMTkyLTguNzk2LTcuOTM5LTI3LjE3Ni43NDgtLjAzNiA1Ljk4NnYuMDEzWiIgZmlsbD0iIzFBMzE0MiIvPjxwYXRoIGQ9Ik0xMDguMzE5IDE2Ny4wMDhhNDkzMy42NTQgNDkzMy42NTQgMCAwIDEtMTIuNTkgMzIuMDk4Yy0yMS42MDctMjQuNzkzLTI2LjQ3OS0yOC4zNy00OC42MDYtMzAuNzI4LS42MDYtLjA2NC0xNS4zOTYtLjE1Mi0yNC43NzUuNTU4LTE3LjUwNCAxLjMxOS0yNy4yMTYgMjEuNTg0LTE1Ljk3IDczLjc5NnYyMC4yNjZIODEuN3MtLjc3My0yMS4zNDQtLjgzNi0yMi4zNzFjMTAuNTgzIDkuNiAyNS42MjcgOS4wNDIgMzIuODQ5IDUuNjE4IDkuNDgyLTQuNTAyIDEzLjEyNS05Ljk1NSAyOC42MTItNzEuODE4bC0zNC4wMDctNy40MDZ2LS4wMTNaIiBmaWxsPSIjRjlDMUFFIi8+PHBhdGggZD0iTTgxLjY5OCAyNjMuOTk5Yy0uNTQ2IDAtLjk5LS40MzEtMS4wMTQtLjk3NiAwLS4yMTYtLjc5LTIxLjM0NC0uODQtMjIuMzU4YTEuMDAxIDEuMDAxIDAgMCAxIC41ODYtLjk2NCAxLjAxIDEuMDEgMCAwIDEgMS4xMTguMTY1YzEwLjI0MyA5LjI4MyAyNC43MjMgOC43NzUgMzEuNzMxIDUuNDUzIDguNzk2LTQuMTczIDEyLjM0LTguNDU5IDI3LjgxMi03MC4xMzFsLTMyLjEyOC03LjAwMWE1MTYwLjAzOCA1MTYwLjAzOCAwIDAgMS0xMi4yNzMgMzEuMjg3Ljk4Mi45ODIgMCAwIDEtLjc3Ny42MjEgMS4wMjIgMS4wMjIgMCAwIDEtLjk0LS4zM2MtMjEuMjM0LTI0LjM2Mi0yNS43NTMtMjguMDI3LTQ3Ljk0LTMwLjM4Ni0uNjg1LS4wNTEtMTUuMTMtLjE2NC0yNC41ODguNTU4LTUuNTczLjQxOS0xMC4wNTIgMi44NDEtMTMuMzE1IDcuMjA0LTguMDQ3IDEwLjc0MS04LjY1NyAzMy4zNC0xLjc1MiA2NS4zNjMuMDEyLjA3Ni4wMjguMTM5LjAyOC4yMTV2MjAuMjY2YTEuMDIgMS4wMiAwIDAgMS0xLjAxOSAxLjAxNCAxLjAyIDEuMDIgMCAwIDEtMS4wMTUtMS4wMTRWMjQyLjgyYy03LjA5NS0zMy4wMjMtNi4zODItNTUuNTIxIDIuMTIxLTY2LjkwOSAzLjYzMS00Ljg0NSA4LjYwNi03LjU0NiAxNC43OS04LjAwMyA5LjI2NC0uNjk3IDI0LjE4LS42MzQgMjQuOTUzLS41NDUgMjIuMzkyIDIuMzg0IDI3LjcwOCA2LjQwNCA0OC4xNyAyOS44MTVhNDMyNi4yMzMgNDMyNi4yMzMgMCAwIDAgMTEuOTcxLTMwLjUzOCAxLjAwNCAxLjAwNCAwIDAgMSAxLjE2OS0uNjIxbDM0LjAwMyA3LjQwNmMuMjcuMDYzLjQ5Ni4yMjguNjUuNDU2LjEzOS4yMjkuMTkxLjUyMS4xMjcuNzg3LTE1LjIzMyA2MC44MDktMTguODc2IDY3LjU5NS0yOS4xNzEgNzIuNDktNy4xMDcgMy4zNzMtMjEuMzkgNC4wNzEtMzIuMTc5LTQuMjg3LjIxOCA1LjYwNS43MjUgMTkuMzc4Ljc1IDIwLjA4OGExLjAxNSAxLjAxNSAwIDAgMS0uOTc2IDEuMDUzaC0uMDRsLS4wMTEtLjAxM1oiIGZpbGw9IiMxQTMxNDIiLz48cGF0aCBkPSJNOTAuMjc5IDIxMy43NjhjLS4xMjcgMC0uMjU0LS4wMjYtLjM4LS4wNzdhMS4wMiAxLjAyIDAgMCAxLS41NzYtMS4zMTlsNS40NTktMTMuNjQ1Yy4yMDYtLjUyLjgtLjc3NCAxLjMyLS41NzEuNTIzLjIwMy43NzcuNzk5LjU3IDEuMzE5bC01LjQ1NCAxMy42NDZhMS4wMiAxLjAyIDAgMCAxLS45NC42MzR2LjAxM1pNODAuODU2IDI0MS42MjhhLjk3My45NzMgMCAwIDEtLjYxOC0uMjE2bC0yNS4xNi0xOS40MjhhMS4wMTIgMS4wMTIgMCAxIDEgMS4yNDUtMS41OThsMjUuMTU2IDE5LjQyOGMuNDQ0LjM0My41MjMuOTc3LjE3OCAxLjQyYTEuMDIyIDEuMDIyIDAgMCAxLS44LjM5NFpNNDMuNCAxNjEuODIzYTE2LjUzIDE2LjUzIDAgMCAxLTIuNjUyLS4yMDJjLS41NDctLjEwMi0uOTI4LS42MjItLjgyNS0xLjE2N2EuOTk4Ljk5OCAwIDAgMSAxLjE2Ni0uODI0Yy4wMTEgMCAyLjAxNy4zNDIgNC4xMzguMDVhMS4wMiAxLjAyIDAgMCAxIDEuMTQyLjg2MyAxLjAxMiAxLjAxMiAwIDAgMS0uODYgMS4xNDFjLS43MzguMTAxLTEuNDYzLjEzOS0yLjExLjEzOVpNMTQwLjkgNjYuNjk2Yy0uNDA5IDAtLjc4OS0uMjU0LS45NTItLjY2YTEuMDEgMS4wMSAwIDAgMSAuNTgzLTEuMzA2Yy4wNTItLjAxMyA0LjgzNi0xLjkxNSA4LjIwMi04LjQyIDEuNTczLTMuMDU3LTIuMDU4LTcuNTQ2LTIuMDk3LTcuNTg1YTEuMDI3IDEuMDI3IDAgMCAxIC4xMzgtMS40MzJjLjQzMi0uMzU2IDEuMDgzLS4yOTIgMS40MjMuMTQuMTkxLjIyNyA0LjUzMSA1LjU2NiAyLjMzNSA5LjgxNS0zLjc0MiA3LjIyOS05LjA2MSA5LjI5NS05LjI3NSA5LjM4NGExLjE3NSAxLjE3NSAwIDAgMS0uMzU3LjA2NFpNMTk0LjQxMyAxMTQuMTc3Yy0uNTQzIDAtLjk4Ny0uNDE5LTEuMDE1LS45NjQtLjExNS0yLjYtMy4xMDgtNi45NjMtNi40MjEtNy4yMjktMi44NDMtLjIyOC03Ljg3MyAzLjU3Ny05LjU1OCA1LjA2LS40Mi4zNjgtMS4wNjYuMzMtMS40MzUtLjA4OGExLjAxOCAxLjAxOCAwIDAgMSAuMDg4LTEuNDMzYy42ODUtLjYwOSA2Ljg4MS01Ljg4NSAxMS4wNjctNS41NTUgNC41ODIuMzY3IDguMTM4IDUuNzE5IDguMjg5IDkuMTU2YTEuMDE3IDEuMDE3IDAgMCAxLS45NjQgMS4wNjVoLS4wNTF2LS4wMTJaIiBmaWxsPSIjMUEzMTQyIi8+PC9nPjwvZz48ZGVmcz48Y2xpcFBhdGggaWQ9ImEiPjxwYXRoIGZpbGw9IiNmZmYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC41MikiIGQ9Ik0wIDBoMzExLjk2NHYyNjRIMHoiLz48L2NsaXBQYXRoPjwvZGVmcz48L3N2Zz4=",alt:(0,z.__)("CartFlows Free vs Pro Image","cartflows"),title:(0,z.__)("CartFlows Free vs Pro Image","cartflows")})),(0,a.createElement)("div",{className:"flex flex-1 flex-col gap-2"},(0,a.createElement)(Eh,{direction:"row",align:"center",gap:"xs",className:"text-brand-600"},(0,a.createElement)(lG,{className:"w-4 h-4 stroke-2 text-brand-600"}),(0,a.createElement)(Ch,{as:"span",weight:"semibold",size:"xs",color:"text-brand-600"},(0,z.__)("Unlock Pro Features","cartflows"))),(0,a.createElement)("div",null,(0,a.createElement)(_h,{tag:"h3",title:(0,z.__)("Generate More Sales With CartFlows Pro!","cartflows"),size:"sm",className:"p-0 m-0"}),(0,a.createElement)(Ch,{size:"sm",color:"text-text-secondary",className:"mt-1"},(0,z.__)("Build a sales funnel with everything you need to generate leads and grow sales.","cartflows"))),(0,a.createElement)("div",{className:"grid grid-cols-2 gap-3"},(0,a.createElement)("ul",{className:"list-none pl-0"},(0,a.createElement)("li",{className:"flex items-center space-x-2 text-field-label text-sm"},(0,a.createElement)(VQ,{className:"w-4 h-4 stroke-2 text-brand-500 mt-0.5"}),(0,a.createElement)(Ch,{as:"span",size:"sm"},(0,z.__)("One Click Upsells","cartflows"))),(0,a.createElement)("li",{className:"flex items-center space-x-2 text-field-label text-sm"},(0,a.createElement)(VQ,{className:"w-4 h-4 stroke-2 text-brand-500 mt-0.5"}),(0,a.createElement)(Ch,{as:"span",size:"sm"},(0,z.__)("Order Bumps","cartflows"))),(0,a.createElement)("li",{className:"flex items-center space-x-2 text-field-label text-sm"},(0,a.createElement)(VQ,{className:"w-4 h-4 stroke-2 text-brand-500 mt-0.5"}),(0,a.createElement)(Ch,{as:"span",size:"sm"},(0,z.__)("A/B Split Testing","cartflows"))),(0,a.createElement)("li",{className:"flex items-center space-x-2 text-field-label text-sm"},(0,a.createElement)(VQ,{className:"w-4 h-4 stroke-2 text-brand-500 mt-0.5"}),(0,a.createElement)(Ch,{as:"span",size:"sm"},(0,z.__)("Conversion Templates","cartflows")))),(0,a.createElement)("ul",{className:"list-none pl-0"},(0,a.createElement)("li",{className:"flex items-center space-x-2 text-field-label text-sm"},(0,a.createElement)(VQ,{className:"w-4 h-4 stroke-2 text-brand-500 mt-0.5"}),(0,a.createElement)(Ch,{as:"span",size:"sm"},(0,z.__)("Checkout Editor","cartflows"))),(0,a.createElement)("li",{className:"flex items-center space-x-2 text-field-label text-sm"},(0,a.createElement)(VQ,{className:"w-4 h-4 stroke-2 text-brand-500 mt-0.5"}),(0,a.createElement)(Ch,{as:"span",size:"sm"},(0,z.__)("Dynamic Offers","cartflows"))),(0,a.createElement)("li",{className:"flex items-center space-x-2 text-field-label text-sm"},(0,a.createElement)(VQ,{className:"w-4 h-4 stroke-2 text-brand-500 mt-0.5"}),(0,a.createElement)(Ch,{as:"span",size:"sm"},(0,z.__)("Cart Abandonment Recovery","cartflows"))),(0,a.createElement)("li",{className:"flex items-center space-x-2 text-field-label text-sm"},(0,a.createElement)(VQ,{className:"w-4 h-4 stroke-2 text-brand-500 mt-0.5"}),(0,a.createElement)(Ch,{as:"span",size:"sm"},(0,z.__)("And More…","cartflows"))))),(0,a.createElement)("div",{className:"grid grid-cols-6 gap-3 items-center unlock-pro-features-dropdown-container mt-3"},(0,a.createElement)("div",{className:"dropdown-container col-span-3"},(0,a.createElement)(kL,{value:o[t],onChange:e=>{var t;t=e.value,n(o.findIndex(e=>e.value===t))},by:"value",size:"sm"},(0,a.createElement)(kL.Button,{placeholder:(0,z.__)("Pro - Annual","cartflows"),render:e=>e?.label}),(0,a.createElement)(kL.Options,null,o.map(e=>(0,a.createElement)(kL.Option,{key:e.value,value:e},e.label))))),(0,a.createElement)("div",{className:"flex items-center justify-center gap-3 col-span-3"},(0,a.createElement)("div",{className:"wcf-plan--pricing text-sm"},(0,a.createElement)(Ch,{as:"span",weight:"semibold",size:"base",color:"text-text-primary"},"$"+o[t]?.price)," ",(0,a.createElement)(Ch,{as:"span",size:"sm",color:"text-text-tertiary"},o[t]?.term)))),(0,a.createElement)("div",{className:"flex gap-2 flex-col mt-2"},(0,a.createElement)(Wo,{tag:"a",href:getUtmUrl("https://my.cartflows.com/checkout-cartflows-"+o[t]?.value,{utm_campaign:"go-pro"}),target:"blank",variant:"primary",className:"font-semibold no-underline text-center"},(0,z.__)("Buy Now","cartflows")),(0,a.createElement)(Wo,{tag:"a",href:getUpgradeToProUrl(),target:"_blank",rel:"noreferrer",variant:"ghost",className:"text-brand-500 hover:text-brand-600 flex justify-center no-underline text-center"},(0,z.__)("View plans","cartflows"))))),(0,a.createElement)(ZQ,null),(0,a.createElement)(dV,null)))},ute=({progress:e=0,speed:t=200,className:n=""})=>{let r=e;e<0&&(r=0),e>100&&(r=100);const o=`translateX(-${100-r}%)`,a=`h-2 rounded-full bg-background-brand absolute left-0 top-0 w-full bottom-0 origin-left transition-transform duration-${t} ease-linear`;return(0,R.jsx)("div",{className:Le("h-2 rounded-full bg-misc-progress-background overflow-hidden relative",n),role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Progress Bar",children:(0,R.jsx)("div",{className:a,style:{transform:o}})})},dte=Fo("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),fte=(...e)=>Ce(Oe(e)),pte=Fo("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),mte=function(e,t={}){const n=cartflows_admin?.track_learn_event_nonce||"",r=cartflows_admin?.ajax_url||"";if(!n||!r)return;const o=new URLSearchParams;o.set("action","cartflows_track_learn_event"),o.set("nonce",n),o.set("event",e),Object.entries(t).forEach(([e,t])=>{o.set(e,String(t))}),window.fetch(r,{method:"POST",body:o,keepalive:!0}).catch(()=>{})},hte="p-0 bg-transparent border-0 cursor-pointer no-underline text-[13px] font-semibold text-gray-500 hover:text-gray-800 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on rounded-sm",gte=function({module:e,isLast:t=!1,isComplete:n,onToggle:r,onRefresh:o}){const[i,s]=(0,a.useState)(!1),l="active"===cartflows_admin?.cf_pro_status,c=e?.is_pro&&!l,u="not-installed"===cartflows_admin?.cf_pro_status?(0,a.createElement)($m,{size:"sm"}):(0,a.createElement)(Hm,{size:"sm"}),d=e?.plugin_status||"",f="active"===d,p=t=>{mte("learn_module_action",{module_id:e?.id,action_type:t,is_pro:e?.is_pro?"yes":"no"})},m=t=>{mte("learn_action_failed",{module_id:e?.id,reason:t,plugin_slug:e?.action_data?.plugin_slug||""})},h=()=>i?(0,z.__)("Processing…","cartflows"):"install"===d?(0,z.sprintf)((0,z.__)("Install %s","cartflows"),e?.cta):"activate"===d?(0,z.sprintf)((0,z.__)("Activate %s","cartflows"),e?.cta):e?.cta,g=t=>{const n=new window.FormData;n.append("action","cartflows_activate_plugin"),n.append("init",t),n.append("security",cartflows_admin?.activate_plugin_nonce),L()({url:cartflows_admin?.ajax_url,method:"POST",body:n}).then(e=>{if(!e?.success)throw new Error("activate_failed");s(!1),"function"==typeof o?o():window.location.reload()}).catch(()=>{s(!1),m("activate_failed"),Vm.error((0,z.sprintf)( |
| 99 |
// translators: %s is the plugin name. |
| 100 |
// translators: %s is the plugin name. |
| 101 |
(0,z.__)("Could not activate %s.","cartflows"),e?.cta),{description:(0,z.__)("Please try again or activate it from the Plugins screen.","cartflows")})})};return(0,a.createElement)("div",{className:fte("flex flex-wrap items-center gap-3.5 border-0 border-solid border-gray-200",t?"pt-4 pb-2":"py-3.5 border-b")},c?(0,a.createElement)(ea,{content:(0,z.__)("Available with CartFlows Pro","cartflows"),placement:"top",arrow:!0},(0,a.createElement)("span",{className:"flex w-[22px] h-[22px] shrink-0 items-center justify-center rounded-full border-2 border-solid border-border-subtle bg-background-secondary text-icon-secondary box-border"},(0,a.createElement)(rq,{className:"size-3","aria-hidden":"true"}))):(0,a.createElement)("button",{type:"button",onClick:r,"aria-label":n?(0,z.sprintf)( |
| 102 |
// translators: %s is the module title |
| 103 |
// translators: %s is the module title |
| 104 |
(0,z.__)("Mark %s as not completed","cartflows"),e?.title):(0,z.sprintf)( |
| 105 |
// translators: %s is the module title |
| 106 |
// translators: %s is the module title |
| 107 |
(0,z.__)("Mark %s as completed","cartflows"),e?.title),className:"group self-center -m-2 p-2 bg-transparent border-0 cursor-pointer rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on"},(0,a.createElement)("span",{className:fte("flex items-center justify-center w-[22px] h-[22px] rounded-full box-border transition-colors",n?"bg-support-success border-0":"border-2 border-solid border-brand-500 bg-background-primary group-hover:bg-brand-50")},n&&(0,a.createElement)(Zo,{className:"size-3 text-white",strokeWidth:3.5,"aria-hidden":"true"}))),(0,a.createElement)("span",{className:"flex-1 min-w-0"},(0,a.createElement)("span",{className:"flex items-center gap-2 flex-wrap"},(0,a.createElement)("span",{className:fte("text-[15px] font-semibold",n?"text-gray-500":"text-gray-800")},e?.title),e?.is_pro&&(0,a.createElement)(na,{label:(0,z.__)("PRO","cartflows"),variant:"blue",size:"xxs",type:"rounded",className:"uppercase"})),e?.description&&(0,a.createElement)("span",{className:fte("block text-[13px]",n?"text-gray-400":"text-gray-500")},e?.description)),(0,a.createElement)("span",{className:"flex shrink-0 items-center gap-4 basis-full sm:basis-auto pl-9 sm:pl-0"},c?(0,a.createElement)("span",{onClickCapture:()=>p("not-installed"===cartflows_admin?.cf_pro_status?"upgrade":"activate_pro")},u):(0,a.createElement)(a.Fragment,null,e?.learn_how&&(0,a.createElement)("a",{href:e?.learn_how,target:"_blank",rel:"noreferrer",onClick:()=>p("learn_how"),className:fte(hte,"inline-flex items-center gap-1"),"aria-label":(0,z.sprintf)( |
| 108 |
// translators: %s is the module or section title |
| 109 |
// translators: %s is the module or section title |
| 110 |
(0,z.__)("Learn how: %s","cartflows"),e?.title)},(0,z.__)("Learn How","cartflows"),(0,a.createElement)(pte,{className:"size-3.5","aria-hidden":"true"})),e?.cta&&"redirect"===e?.action_type&&(n?(0,a.createElement)("a",{href:e?.action_data?.url,onClick:()=>p("redirect"),className:hte,"aria-label":(0,z.sprintf)( |
| 111 |
// translators: %1$s is the CTA or action text, %2$s is the module title |
| 112 |
// translators: %1$s is the CTA or action text, %2$s is the module title |
| 113 |
(0,z.__)("%1$s for %2$s","cartflows"),e?.cta,e?.title)},e?.cta):(0,a.createElement)(Wo,{variant:"primary",size:"sm",tag:"a",href:e?.action_data?.url,onClick:()=>p("redirect"),className:"no-underline","aria-label":(0,z.sprintf)( |
| 114 |
// translators: %1$s is the CTA or action text, %2$s is the module title |
| 115 |
// translators: %1$s is the CTA or action text, %2$s is the module title |
| 116 |
(0,z.__)("%1$s for %2$s","cartflows"),e?.cta,e?.title)},e?.cta)),e?.cta&&"install_plugin"===e?.action_type&&!f&&(0,a.createElement)(Wo,{variant:"primary",size:"sm",onClick:()=>{const t=e?.action_data?.plugin_init||"",n=e?.action_data?.plugin_slug||"";t&&n&&(f||(s(!0),p("install_plugin"),"install"===d?(wp.updates.queue.push({action:"install-plugin",data:{slug:n,success(){g(t)},error(){s(!1),m("install_failed"),Vm.error((0,z.sprintf)( |
| 117 |
// translators: %s is the plugin name. |
| 118 |
// translators: %s is the plugin name. |
| 119 |
(0,z.__)("Could not install %s.","cartflows"),e?.cta),{description:(0,z.__)("Please try again or install it from the Plugins screen.","cartflows")})}}}),wp.updates.queueChecker()):"activate"===d?g(t):s(!1)))},disabled:i,loading:i,"aria-label":(0,z.sprintf)( |
| 120 |
// translators: %1$s is the CTA or action text, %2$s is the module title |
| 121 |
// translators: %1$s is the CTA or action text, %2$s is the module title |
| 122 |
(0,z.__)("%1$s for %2$s","cartflows"),h(),e?.title)},h()))))};function yte({done:e,total:t,emphasized:n}){return(0,a.createElement)("span",{className:"flex items-center gap-2.5 shrink-0"},e>0&&(0,a.createElement)("span",{className:"hidden sm:block w-[70px] h-[5px] rounded-full bg-misc-progress-background overflow-hidden"},(0,a.createElement)("span",{className:"block h-full bg-brand-500",style:{width:e/t*100+"%"}})),(0,a.createElement)("span",{className:fte("text-[13px] font-semibold transition-colors",n?"text-gray-800":"text-gray-500")},(0,z.sprintf)( |
| 123 |
// translators: %1$d is the completed count, %2$d is the total count. |
| 124 |
// translators: %1$d is the completed count, %2$d is the total count. |
| 125 |
(0,z.__)("%1$d of %2$d","cartflows"),e,t)))}function wte({section:e,isOpen:t,onToggleOpen:n,onToggle:r,onRefresh:o}){const i=e.modules||[],s=i.length,l=i.filter(e=>!!e.completed).length;return(0,a.createElement)("div",{className:fte("border border-solid border-border-subtle rounded-[10px] bg-background-primary overflow-hidden transition-[box-shadow,border-color]",t?"shadow-[0_1px_3px_rgba(31,41,55,0.05)]":"hover:border-gray-300")},(0,a.createElement)("button",{type:"button",onClick:n,"aria-expanded":t,"aria-label":(0,z.sprintf)( |
| 126 |
// translators: %1$s is the section title, %2$d is completed count, %3$d is total count |
| 127 |
// translators: %1$s is the section title, %2$d is completed count, %3$d is total count |
| 128 |
(0,z.__)("%1$s - %2$d of %3$d steps completed","cartflows"),e.title,l,s),className:"w-full flex items-center gap-3.5 px-5 py-[18px] text-left bg-transparent border-0 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-toggle-on"},(0,a.createElement)("span",{className:"flex-1 min-w-0"},(0,a.createElement)("span",{className:"block text-base font-semibold text-gray-800"},e.title),e.description&&(0,a.createElement)("span",{className:"block text-[13px] text-gray-500 mt-0.5"},e.description)),(0,a.createElement)(yte,{done:l,total:s,emphasized:t}),(0,a.createElement)(Gp,{className:fte("size-[18px] shrink-0 transition-transform",t?"rotate-180 text-gray-500":"text-gray-300"),"aria-hidden":"true"})),(0,a.createElement)("div",{className:fte("grid transition-[grid-template-rows] duration-300 ease-out",t?"grid-rows-[1fr]":"grid-rows-[0fr]"),inert:t?void 0:""},(0,a.createElement)("div",{className:"min-h-0 overflow-hidden"},(0,a.createElement)("div",{className:"border-0 border-t border-solid border-gray-100 bg-background-secondary px-5 pt-1.5 pb-3"},i.map((e,t)=>(0,a.createElement)(gte,{key:e.id,module:e,isLast:t===i.length-1,isComplete:!!e.completed,onToggle:()=>r(e.id),onRefresh:o}))))))}const bte=function({sections:e,onToggle:t,onRefresh:n}){const r=e=>{const t=e.modules||[];return t.length>0&&t.every(e=>!!e.completed)},o=e.filter(e=>!r(e)),i=e.filter(r),s=o[0]?.id,[l,c]=(0,a.useState)(()=>s?[s]:[]),[u,d]=(0,a.useState)(!1);if(!e.length)return(0,a.createElement)("p",{className:"m-0 px-5 sm:px-8 py-5 text-center text-sm text-gray-500"},(0,z.__)("No learning content is available right now. Please check back soon.","cartflows"));const f=e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},p=o.length>0&&o.every(e=>l.includes(e.id)),m=i.reduce((e,t)=>e+(t.modules||[]).length,0);return(0,a.createElement)(a.Fragment,null,o.length>0&&(0,a.createElement)(a.Fragment,null,(0,a.createElement)("div",{className:"px-5 sm:px-8 pt-5 pb-2 flex items-center justify-between gap-3"},(0,a.createElement)("span",{className:"text-[11px] font-bold tracking-[0.16em] uppercase text-gray-400"},(0,z.sprintf)( |
| 129 |
// translators: %d is the number of unfinished sections. |
| 130 |
// translators: %d is the number of unfinished sections. |
| 131 |
(0,z._n)("Still to do — %d section","Still to do — %d sections",o.length,"cartflows"),o.length)),(0,a.createElement)("button",{type:"button",onClick:()=>{c(p?[]:o.map(e=>e.id))},className:"p-0 bg-transparent border-0 cursor-pointer text-[13px] font-semibold text-gray-500 hover:text-brand-500 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on rounded-sm"},p?(0,z.__)("Collapse all","cartflows"):(0,z.__)("Expand all","cartflows"))),(0,a.createElement)("div",{className:"px-5 pt-2 pb-5 flex flex-col gap-2.5"},o.map(e=>(0,a.createElement)(wte,{key:e.id,section:e,isOpen:l.includes(e.id),onToggleOpen:()=>f(e.id),onToggle:t,onRefresh:n})))),i.length>0&&(0,a.createElement)("div",{className:"border-0 border-t border-solid border-border-subtle bg-background-secondary"},(0,a.createElement)("button",{type:"button",onClick:()=>d(!u),"aria-expanded":u,className:"w-full flex items-center gap-3 px-5 sm:px-8 py-4 text-left bg-transparent border-0 cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-toggle-on"},(0,a.createElement)("span",{className:"w-6 h-6 rounded-full bg-green-50 flex items-center justify-center shrink-0"},(0,a.createElement)(Zo,{className:"size-[13px] text-support-success",strokeWidth:3,"aria-hidden":"true"})),(0,a.createElement)("span",{className:"flex-1 min-w-0 text-sm font-semibold text-gray-800"},(0,z.sprintf)( |
| 132 |
// translators: %1$d is the finished section count, %2$d is the finished step count. |
| 133 |
// translators: %1$d is the finished section count, %2$d is the finished step count. |
| 134 |
(0,z.__)("Completed — %1$d sections, %2$d steps","cartflows"),i.length,m)),(0,a.createElement)("span",{className:"hidden md:inline text-[13px] text-gray-500 shrink-0 truncate max-w-[45%]"},i.map(e=>e.title).join(" · ")),(0,a.createElement)(Gp,{className:fte("size-[18px] shrink-0 text-gray-400 transition-transform",u&&"rotate-180"),"aria-hidden":"true"})),(0,a.createElement)("div",{className:fte("grid transition-[grid-template-rows] duration-300 ease-out",u?"grid-rows-[1fr]":"grid-rows-[0fr]"),inert:u?void 0:""},(0,a.createElement)("div",{className:"min-h-0 overflow-hidden"},(0,a.createElement)("div",{className:"px-5 pb-5 flex flex-col gap-2.5"},i.map(e=>(0,a.createElement)(wte,{key:e.id,section:e,isOpen:l.includes(e.id),onToggleOpen:()=>f(e.id),onToggle:t,onRefresh:n})))))))},vte=function(){return(0,a.createElement)("div",{className:"box-border bg-background-primary border border-solid border-border-subtle rounded-lg overflow-hidden"},(0,a.createElement)("div",{className:"px-5 sm:px-8 py-5 sm:py-[26px] border-0 border-b border-solid border-border-subtle flex flex-col sm:flex-row sm:items-center gap-5 sm:gap-6"},(0,a.createElement)("div",{className:"flex-1 min-w-0 space-y-2"},(0,a.createElement)(WO,{variant:"rectangular",className:"h-6 w-48 rounded"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3.5 w-80 max-w-full rounded"})),(0,a.createElement)("div",{className:"w-full sm:w-[260px] shrink-0 space-y-2.5"},(0,a.createElement)("div",{className:"flex items-center justify-between"},(0,a.createElement)(WO,{variant:"rectangular",className:"h-3.5 w-28 rounded"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-8 rounded"})),(0,a.createElement)(WO,{variant:"rectangular",className:"h-2 w-full rounded-full"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3.5 w-44 rounded"}))),(0,a.createElement)("div",{className:"px-5 sm:px-8 pt-5 pb-2 flex items-center justify-between"},(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-44 rounded"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-16 rounded"})),(0,a.createElement)("div",{className:"px-5 pt-2 pb-5 flex flex-col gap-2.5"},(0,a.createElement)("div",{className:"border border-solid border-border-subtle rounded-[10px] overflow-hidden"},(0,a.createElement)("div",{className:"flex items-center gap-3.5 px-5 py-[18px]"},(0,a.createElement)("div",{className:"flex-1 min-w-0 space-y-1.5"},(0,a.createElement)(WO,{variant:"rectangular",className:"h-4 w-40 rounded"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-72 max-w-full rounded"})),(0,a.createElement)(WO,{variant:"rectangular",className:"h-[5px] w-[70px] rounded-full"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-10 rounded"}),(0,a.createElement)(WO,{variant:"circular",className:"size-[18px] shrink-0"})),(0,a.createElement)("div",{className:"border-0 border-t border-solid border-gray-100 bg-background-secondary px-5 py-3"},[["w-36","w-64"],["w-44","w-72"]].map(([e,t],n)=>(0,a.createElement)("div",{key:n,className:fte("flex items-center gap-3.5 py-3.5 border-0 border-solid border-gray-200",0===n&&"border-b")},(0,a.createElement)(WO,{variant:"circular",className:"size-[22px] shrink-0"}),(0,a.createElement)("div",{className:"flex-1 min-w-0 space-y-1.5"},(0,a.createElement)(WO,{variant:"rectangular",className:fte("h-3.5 rounded",e)}),(0,a.createElement)(WO,{variant:"rectangular",className:fte("h-3 rounded",t)})),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-20 rounded"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-8 w-28 rounded-md"}))))),["w-40","w-56","w-44"].map((e,t)=>(0,a.createElement)("div",{key:t,className:"border border-solid border-border-subtle rounded-[10px] flex items-center gap-3.5 px-5 py-[18px]"},(0,a.createElement)("div",{className:"flex-1 min-w-0 space-y-1.5"},(0,a.createElement)(WO,{variant:"rectangular",className:fte("h-4 rounded",e)}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-64 max-w-full rounded"})),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-10 rounded"}),(0,a.createElement)(WO,{variant:"circular",className:"size-[18px] shrink-0"})))),(0,a.createElement)("div",{className:"border-0 border-t border-solid border-border-subtle bg-background-secondary px-5 sm:px-8 py-4 flex items-center gap-3"},(0,a.createElement)(WO,{variant:"circular",className:"size-6 shrink-0"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3.5 w-56 rounded"}),(0,a.createElement)("div",{className:"flex-1"}),(0,a.createElement)(WO,{variant:"rectangular",className:"h-3 w-64 max-w-[40%] rounded"}),(0,a.createElement)(WO,{variant:"circular",className:"size-[18px] shrink-0"})))},xte=function({open:e,title:t,videoUrl:n,onClose:r}){return(0,a.createElement)(Im,{open:e,setOpen:e=>{e||r()},exitOnClickOutside:!0,exitOnEsc:!0},(0,a.createElement)(Im.Panel,{className:"sm:max-w-4xl w-full rounded-lg overflow-hidden relative border-0 shadow-none bg-transparent"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Title,{className:"sr-only"},t),(0,a.createElement)("div",{className:"absolute top-2 right-2 z-10"},(0,a.createElement)(Im.CloseButton,{className:"bg-white/80 hover:bg-white rounded-full p-1 shadow-sm","aria-label":(0,z.__)("Close video","cartflows")})),e&&n&&(0,a.createElement)("iframe",{className:"block rounded-lg w-full aspect-video",src:n,title:t,frameBorder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})))},Nte=function(){const[e,t]=(0,a.useState)([]),[n,r]=(0,a.useState)(!0),[o,i]=(0,a.useState)(!1),[s,l]=(0,a.useState)(!1),c="active"===cartflows_admin?.cf_pro_status,u=(0,a.useRef)(!1),d=(0,a.useCallback)(()=>{r(!0),i(!1),L()({path:"/cartflows/v1/admin/learn/",method:"GET"}).then(e=>{t(Array.isArray(e)?e:[]),r(!1),u.current||(u.current=!0,mte("learn_page_viewed"))}).catch(()=>{i(!0),r(!1)})},[]),f=(0,a.useCallback)(e=>{t(n=>{const r=n.flatMap(e=>e.modules||[]).find(t=>t.id===e);if(r?.is_pro&&!c)return n;const o=n.map(t=>({...t,modules:t.modules.map(t=>t.id===e?{...t,completed:!t.completed}:t)}));return function(e){const t=new URLSearchParams;return t.set("action","cartflows_save_learn_completed"),t.set("module_ids",JSON.stringify(e)),t.set("nonce",cartflows_admin?.save_learn_completed_nonce||""),window.fetch(ajaxurl,{method:"POST",body:t}).then(e=>e.json()).then(e=>{if(!e?.success)throw new Error("save_failed");return e})}(o.flatMap(e=>e.modules).filter(e=>e.completed).map(e=>e.id)).catch(()=>{t(n),mte("learn_action_failed",{module_id:e,reason:"progress_save_failed"}),Vm.error((0,z.__)("Could not save your progress.","cartflows"),{description:(0,z.__)("Check your connection and try again.","cartflows")})}),o})},[c]);if((0,a.useEffect)(()=>{d()},[d]),n)return(0,a.createElement)(vte,null);const p=e.flatMap(e=>e.modules||[]),m=p.filter(e=>!!e.completed).length,h=p.length,g=h>0?Math.round(m/h*100):0;return(0,a.createElement)("section",{className:"relative"},(0,a.createElement)("div",{className:"box-border bg-background-primary border border-solid border-border-subtle rounded-lg overflow-hidden"},(0,a.createElement)("div",{className:"px-5 sm:px-8 py-5 sm:py-[26px] border-0 border-b border-solid border-border-subtle flex flex-col sm:flex-row sm:items-center gap-5 sm:gap-6"},(0,a.createElement)("div",{className:"flex-1 min-w-0"},(0,a.createElement)("h2",{className:"m-0 mb-1 text-2xl leading-[30px] font-semibold text-gray-800"},(0,z.__)("Learn CartFlows","cartflows")),(0,a.createElement)("p",{className:"m-0 text-sm leading-[22px] text-gray-500 max-w-[520px]"},(0,z.__)("Set up high-converting funnels in CartFlows with step-by-step guidance and launch with confidence.","cartflows"))),(0,a.createElement)("div",{className:"w-full sm:w-[260px] shrink-0 flex flex-col gap-[9px]"},(0,a.createElement)("span",{className:"flex items-baseline justify-between"},(0,a.createElement)("span",{className:"text-sm font-semibold text-gray-800"},(0,z.sprintf)( |
| 135 |
// translators: %1$d is the completed count, %2$d is the total count. |
| 136 |
// translators: %1$d is the completed count, %2$d is the total count. |
| 137 |
(0,z.__)("%1$d of %2$d completed","cartflows"),m,h)),(0,a.createElement)("span",{className:"text-[13px] text-gray-500"},(0,z.sprintf)( |
| 138 |
// translators: %1$d is the completion percentage. |
| 139 |
// translators: %1$d is the completion percentage. |
| 140 |
(0,z.__)("%1$d%%","cartflows"),g))),(0,a.createElement)(ute,{progress:g}),(0,a.createElement)("button",{type:"button",onClick:()=>{l(!0),mte("learn_video_opened")},className:"inline-flex items-center gap-[7px] self-start p-0 bg-transparent border-0 cursor-pointer text-[13px] font-semibold text-gray-500 hover:text-brand-500 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on rounded-sm"},(0,a.createElement)(dte,{className:"size-3.5","aria-hidden":"true"}),(0,z.__)("Watch the getting started video","cartflows")))),o?(0,a.createElement)("div",{className:"p-5 sm:p-8"},(0,a.createElement)(sQ,{variant:"error",design:"stack",title:(0,z.__)("Unable to load learning content","cartflows"),content:(0,z.__)("Something went wrong while fetching the chapters. Check your connection and try again.","cartflows"),action:{label:(0,z.__)("Retry","cartflows"),onClick:d,type:"button"}})):(0,a.createElement)(bte,{sections:e,onToggle:f,onRefresh:d})),(0,a.createElement)(xte,{open:s,title:(0,z.__)("Getting Started with CartFlows","cartflows"),videoUrl:"https://www.youtube-nocookie.com/embed/tCm60PWOd0M?autoplay=1&rel=0",onClose:()=>l(!1)}))},Ete=function(){return(0,a.createElement)("main",{className:"min-h-[calc(100vh_-_8rem)]"},(0,a.createElement)("h1",{className:"sr-only"},(0,z.__)("Learn","cartflows")),(0,a.createElement)(Eh,{containerType:"grid",cols:12,gap:"lg",className:"md:p-8 sm:p-6 p-[0.7rem]"},(0,a.createElement)(Eh.Item,{className:"lg:col-span-8 md:col-span-10 col-span-12 lg:col-start-3 md:col-start-2 flex flex-col gap-8"},(0,a.createElement)(Nte,null))))},Mte=function(){const e=new URLSearchParams((0,g.useLocation)().search),t=e.get("page"),n=e.get("path");let r=(0,a.createElement)("p",null,"Default route fallback");if(cartflows_admin.home_slug===t){switch(n){case"flows":r=(0,a.createElement)(hW,null);break;case"store-checkout":r="inactive"===cartflows_admin.woocommerce_status||"not-installed"===cartflows_admin.woocommerce_status?(0,a.createElement)(TG,null):""===cartflows_admin.global_checkout_id?(0,a.createElement)(YG,null):(0,a.createElement)(lte,{flowType:"storeCheckout"});break;case"store-checkout-library":r=(0,a.createElement)(zH,null);break;case"analytics":r=(0,a.createElement)(rH,null);break;case"addons":r=(0,a.createElement)(AG,{initialTab:"addons"});break;case"automations":r=(0,a.createElement)(EG,null);break;case"library":r=(0,a.createElement)(kH,null);break;case"wcf-log":r=(0,a.createElement)(AG,{initialTab:"log"});break;case"free-vs-pro":r=(0,a.createElement)(cte,null);break;case"learn":r=(0,a.createElement)(Ete,null);break;case"settings":r=(0,a.createElement)(AG,{initialTab:e.get("tab")||void 0});break;default:r=(0,a.createElement)(fV,null)}wcfWpNavMenuChange(n)}return(0,a.createElement)(a.Fragment,null,r)};function _te({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12c0 1.268-.63 2.39-1.593 3.068a3.745 3.745 0 0 1-1.043 3.296 3.745 3.745 0 0 1-3.296 1.043A3.745 3.745 0 0 1 12 21c-1.268 0-2.39-.63-3.068-1.593a3.746 3.746 0 0 1-3.296-1.043 3.745 3.745 0 0 1-1.043-3.296A3.745 3.745 0 0 1 3 12c0-1.268.63-2.39 1.593-3.068a3.745 3.745 0 0 1 1.043-3.296 3.746 3.746 0 0 1 3.296-1.043A3.746 3.746 0 0 1 12 3c1.268 0 2.39.63 3.068 1.593a3.746 3.746 0 0 1 3.296 1.043 3.746 3.746 0 0 1 1.043 3.296A3.745 3.745 0 0 1 21 12Z"}))}const Ite=w.forwardRef(_te);function Ste({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m.75 12 3 3m0 0 3-3m-3 3v-6m-1.5-9H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"}))}const jte=w.forwardRef(Ste);function kte({title:e,titleId:t,...n},r){return w.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),e?w.createElement("title",{id:t},e):null,w.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0-3-3m3 3 3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const Dte=w.forwardRef(kte),Cte={"top-left":"top-0 bottom-0 start-0 justify-start items-start","top-right":"top-0 bottom-0 end-0 justify-start items-end","bottom-left":"top-0 bottom-0 start-0 justify-end items-start","bottom-right":"top-0 bottom-0 end-0 justify-end items-end"},Ate={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},Tte="bg-background-inverse border-background-inverse",Ote={light:"text-icon-secondary",dark:"text-icon-inverse"};let Lte=!1;const zte=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:o=5e3,theme:a="light",design:i="stack",icon:s,variant:l="neutral",removeToast:c})=>{const u=(0,w.useRef)(0),d=(0,w.useRef)(0),f=(0,w.useRef)(),p=(e,t=o)=>{if(r&&!(o<0))return u.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof c&&c(e.id)},t)};(0,w.useEffect)(()=>{const t=o;return f.current=p(e,t),()=>{clearTimeout(f.current)}},[]),(0,w.useEffect)(()=>{!e?.dismiss||"function"!=typeof c||c(e.id)},[e]);const m=()=>{"function"==typeof c&&e?.action?.onClick?.(()=>c(e.id))};let h=null;return"stack"===i&&(h=(0,R.jsx)("div",{className:Le("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?Tte:Ate?.[l],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(f.current),d.current=(new Date).getTime()},onMouseLeave:()=>{f.current=p(e,o-(d.current-u.current))},children:"custom"!==e.type?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:$o({variant:l,icon:s,theme:a})}),(0,R.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 me-6",children:[qo({title:t,theme:a}),Jo({content:n,theme:a}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,R.jsx)("div",{className:"mt-2.5",children:Xo({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:m,theme:a})})]}),(0,R.jsx)("div",{className:"absolute end-4 top-4 [&_svg]:size-5",children:(0,R.jsx)("button",{className:Le("inline-flex bg-transparent m-0 p-0 border-none focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-none cursor-pointer rounded",Ote[a]??Ote.light),"aria-label":"Dismiss notification",onClick:t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof c&&c(e.id)},children:(0,R.jsx)(ta,{"aria-hidden":"true"})})})]}):e?.jsx?.({close:()=>c(e.id),action:e?.action?{...e?.action,onClick:m}:null})})),"inline"===i&&(h=(0,R.jsxs)("div",{className:Le("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?Tte:Ate?.[l],"lg:w-[47.5rem] w-full"),children:[(0,R.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:$o({variant:l,icon:s,theme:a})}),(0,R.jsxs)("div",{className:"flex items-start justify-start gap-1 me-10 [&>span:first-child]:shrink-0",children:[qo({title:t,theme:a}),Jo({content:n,theme:a})]}),(0,R.jsx)("div",{className:"absolute end-3 top-3 [&_svg]:size-5",children:(0,R.jsx)("button",{className:Le("bg-transparent m-0 p-0 border-none focus:outline-none focus-visible:ring-2 focus-visible:ring-toggle-on focus-visible:ring-offset-2 active:outline-none cursor-pointer rounded",Ote[a]??Ote.light),"aria-label":"Dismiss notification",onClick:()=>c(e.id),children:(0,R.jsx)(ta,{"aria-hidden":"true"})})})]})),h},Pte=(e=>(0,w.memo)(t=>{const n=t.singleTon;return Lte&&n?null:(Lte=!0,(0,R.jsx)(e,{...t}))}))(({position:e="top-right",design:t="stack",theme:n="light",className:r="",autoDismiss:o=!0,dismissAfter:a=5e3})=>{const[i,s]=(0,w.useState)([]);(0,w.useEffect)(()=>{Qm.subscribe(e=>{e?.dismiss?s(t=>t.map(t=>t.id===e.id?{...t,dismiss:!0}:t)):setTimeout(()=>{(0,bn.flushSync)(()=>s(t=>-1!==t.findIndex(t=>t.id===e.id)?t.map(t=>t.id===e.id?{...t,...e}:t):[...t,e]))})})},[]);const l=e=>{s(t=>t.filter(t=>t.id!==e))};return(0,R.jsx)("ul",{"aria-live":"polite","aria-label":"Notifications",className:Le("fui-toast-container fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",Cte[e]??Cte["top-right"],r),children:(0,R.jsx)(Wp,{initial:!1,children:i.map(e=>(0,R.jsx)(op.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,R.jsx)(zte,{toastItem:e,title:e.title,content:e?.description,icon:e?.icon??void 0,design:e?.design??t,autoDismiss:e?.autoDismiss??o,dismissAfter:e?.dismissAfter??a,removeToast:l,variant:e.type,theme:e?.theme??n})},e.id))})})});class Rte extends a.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){}render(){return this.state.hasError?this.props.fallback?this.props.fallback:(0,a.createElement)("div",{className:"wcf-error-boundary flex items-center justify-center min-h-[60vh]"},(0,a.createElement)("div",{className:"w-full max-w-md rounded-xl border border-border-subtle bg-background-primary shadow-md text-center overflow-hidden"},(0,a.createElement)("div",{className:"h-1 bg-gradient-to-r from-orange-400 via-red-400 to-orange-400"}),(0,a.createElement)("div",{className:"px-8 pt-8 pb-8"},(0,a.createElement)("div",{className:"mx-auto mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-alert-background-danger ring-8 ring-alert-background-danger/50"},(0,a.createElement)(tQ,{className:"h-7 w-7 text-support-error"})),(0,a.createElement)(_h,{size:"md",tag:"h2",className:"mb-2"},(0,z.__)("Something went wrong","cartflows")),(0,a.createElement)(Ch,{size:"sm",color:"tertiary",className:"mb-6 max-w-xs mx-auto"},(0,z.__)("An unexpected error occurred while loading this section. Refreshing the page should fix the issue.","cartflows")),(0,a.createElement)("div",{className:"flex items-center justify-center gap-3"},(0,a.createElement)(Wo,{variant:"outline",size:"sm",onClick:()=>window.history.back()},(0,z.__)("Go Back","cartflows")),(0,a.createElement)(Wo,{variant:"primary",size:"sm",icon:(0,a.createElement)(Op,{className:"h-4 w-4"}),onClick:()=>window.location.reload()},(0,z.__)("Refresh Page","cartflows")))))):this.props.children}}const Ute=Rte,Bte="/cartflows/v1/ai/auth",Fte=!(!window.cartflows_admin||!cartflows_admin.ai_connected),Yte=Fo("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),Zte=({open:e,setOpen:t,connect:n})=>{const[r,o]=(0,a.useState)(!1);return(0,a.createElement)(Im,{open:e,setOpen:t,exitOnClickOutside:!0},(0,a.createElement)(Im.Panel,{className:"sm:max-w-md w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Header,{className:"flex items-center justify-between !space-y-0"},(0,a.createElement)(Im.Title,{className:"flex items-center gap-2"},(0,a.createElement)(Yte,{className:"size-5 text-brand-600"}),(0,z.__)("Connect to CartFlows AI","cartflows")),(0,a.createElement)(Im.CloseButton,null)),(0,a.createElement)(Im.Body,null,(0,a.createElement)(Ch,{as:"p",size:14,weight:400,color:"secondary"},(0,z.__)("Connect your site to CartFlows AI to unlock AI-powered content generation and suggestions.","cartflows"))),(0,a.createElement)(Im.Footer,{className:"flex gap-3 justify-end"},(0,a.createElement)(Wo,{variant:"outline",size:"md",onClick:()=>t(!1)},(0,z.__)("Cancel","cartflows")),(0,a.createElement)(Wo,{variant:"primary",size:"md",onClick:async()=>{r||(o(!0),await n(),o(!1))},loading:r,disabled:r},(0,z.__)("Connect","cartflows")))))},Qte=!(!window.cartflows_admin||!cartflows_admin.can_manage_ai_auth),Vte=(0,a.createContext)({isConnected:!1,isLoading:!1,connect:()=>{},ensureConnected:()=>!1});window.cartflows=window.cartflows||{},window.cartflows.aiContext=Vte;(0,a.createRoot)(document.getElementById("wcf-settings-app")).render((0,a.createElement)(a.StrictMode,null,(0,a.createElement)(s,{initialState:u,reducer:d},(0,a.createElement)(({reducer:e,initialState:t,children:n})=>(window.cartflows.settingsContext=f,(0,a.createElement)(f.Provider,{value:(0,a.useReducer)(e,t)},n)),{initialState:h,reducer:(e,t)=>{switch(t.status){case"SAVED":return window.wcfUnsavedChanges=!1,{...e,settingsProcess:"saved"};case"PROCESSING":return{...e,settingsProcess:"processing"};case"RESET":return{...e,settingsProcess:!1};case"UNSAVED_CHANGES":return"change"===t.trigger?{...e,unsavedChanges:!0}:{...e,unsavedChanges:!1};case"UPDATE_LICENSE_STATUS":return{...e,license_status:t.license_status};case"UPDATE_CANVAS_MODE":return{...e,canvasMode:t.canvasMode};default:return e}}},(0,a.createElement)(function({children:e}){const[t,n]=(0,a.useState)({isOpen:!1}),[r,o]=(0,a.useState)(!1),i=(0,a.useRef)(),s=(0,a.useRef)(),l=(0,a.useCallback)(e=>new Promise(t=>{n({...e,isOpen:!0}),s.current=e.onConfirm,i.current=r=>{t(r),n({...e,isOpen:!1})}}),[n]);return(0,a.createElement)(UV.Provider,{value:l},e,(0,a.createElement)(RV,(0,N.A)({isOpen:t.isOpen,isLoading:r},t,{onClose:()=>i.current(!1),onConfirm:()=>(async()=>{try{o(!0),s.current&&await s.current(),i.current&&i.current(!0)}catch(e){i.current&&i.current(!1)}finally{o(!1)}})()})))},null,(0,a.createElement)(Ute,null,(0,a.createElement)(({children:e})=>{window.cartflows.aiContext=Vte;const{isConnected:t,isLoading:n,connect:r}=(()=>{const[e,t]=(0,a.useState)(Fte),[n,r]=(0,a.useState)(!1),o=(0,a.useCallback)(async()=>{const e=new URLSearchParams(window.location.search),n=e.get("access_key");if(n){r(!0);try{const e=await L()({path:Bte,method:"POST",data:{accessKey:n}});e?.success?(t(!0),Vm.success(e?.data?.message||(0,z.__)("Connected to CartFlows AI.","cartflows"))):Vm.error(e?.data?.message||(0,z.__)("Could not connect to CartFlows AI. Please try again.","cartflows"))}catch(e){Vm.error(e?.message||(0,z.__)("Could not connect to CartFlows AI. Please try again.","cartflows"))}finally{e.delete("access_key");const t=e.toString(),n=window.location.pathname+(t?`?${t}`:"")+window.location.hash;window.history.replaceState(null,"",n),r(!1)}}},[]);(0,a.useEffect)(()=>{o()},[o]);const i=(0,a.useCallback)(async()=>{const e=window.location.href;try{const n=await L()({path:`${Bte}?redirect_back=${encodeURIComponent(e)}`}),r=n?.data?.auth_url;if(r)return void(window.location.href=r);if(n?.success)return void t(!0);Vm.error(n?.data?.message||(0,z.__)("Could not start the connection. Please try again.","cartflows"))}catch(e){Vm.error(e?.message||(0,z.__)("Could not start the connection. Please try again.","cartflows"))}},[]);return{isConnected:e,isLoading:n,connect:i}})(),[o,i]=(0,a.useState)(!1),s=(0,a.useCallback)(()=>!(n||!t&&(Qte?(i(!0),1):(Vm.error((0,z.__)("Ask a site administrator to connect CartFlows AI.","cartflows")),1))),[t,n]),l=(0,a.useMemo)(()=>({isConnected:t,isLoading:n,connect:r,ensureConnected:s}),[t,n,r,s]);return(0,a.createElement)(Vte.Provider,{value:l},e,(0,a.createElement)(Zte,{open:o,setOpen:i,connect:r}))},null,(0,a.createElement)(function(){const[{globaldata:e},t]=l();return JW(),(0,a.useEffect)(()=>{let n=!0;if(e.length<1){(async()=>{L()({path:"/cartflows/v1/admin/commonsettings/"}).then(e=>{n&&(t({type:"SET_SETTINGS",commondata:e}),t({type:"SET_PAGE_BUILDER",pagebuilder:e.options["_cartflows_common[default_page_builder]"]}))})})()}return()=>{n=!1}},[]),(0,a.createElement)(_,null,(0,a.createElement)(xm,null),(0,a.createElement)("div",{className:"wcf-app-content-wrapper wcf-app-wrapper--settings-app p-6 md:p-8"},(0,a.createElement)(g.Switch,null,(0,a.createElement)(g.Route,{path:"/"},(0,a.createElement)(Mte,null)))))},null))),(0,a.createElement)(function(){const{promiseInProgress:e}=(0,WV.H8)();let t=(0,z.__)("Please wait…","cartflows"),n="";if(e)switch(window.wcfAction){case"cloneFlow":t=(0,z.__)("Please wait. Duplicating funnel…","cartflows"),n=(0,a.createElement)(iW,{className:"w-18 h-18 text-brand-500"});break;case"draftFlow":t=(0,z.__)("Please wait. Drafting funnel…","cartflows"),n=(0,a.createElement)(hm,{className:"w-18 h-18 text-brand-500"});break;case"deleteFlow":t=(0,z.__)("Please wait. Deleting funnel…","cartflows"),n=(0,a.createElement)(UU,{className:"w-18 h-18 text-brand-500"});break;case"restoreFlow":t=(0,z.__)("Please wait. Restoring funnel…","cartflows"),n=(0,a.createElement)(Ite,{className:"w-18 h-18 text-brand-500"});break;case"exportFlow":t=(0,z.__)("Please wait. Exporting…","cartflows"),n=(0,a.createElement)(jte,{className:"w-18 h-18 text-brand-500"});break;case"cloneStep":t=(0,z.__)("Please wait. Duplicating step…","cartflows"),n=(0,a.createElement)(iW,{className:"w-18 h-18 text-brand-500"});break;case"deleteStep":t=(0,z.__)("Please wait. Deleting step…","cartflows"),n=(0,a.createElement)(UU,{className:"w-18 h-18 text-brand-500"});break;case"abtestStep":t=(0,z.__)("Please wait. Creating variation…","cartflows"),n=(0,a.createElement)(iW,{className:"w-18 h-18 text-brand-500"});break;case"archiveStep":t=(0,z.__)("Please wait. Archiving variation…","cartflows"),n=(0,a.createElement)(Dte,{className:"w-18 h-18 text-brand-500"});break;case"winnerStep":t=(0,z.__)("Please wait. Declaring winner…","cartflows"),n=(0,a.createElement)(Ite,{className:"w-18 h-18 text-brand-500"});break;default:t=(0,z.__)("Please wait…","cartflows"),n=""}return(0,a.createElement)(Im,{open:!!e,setOpen:()=>{},exitOnClickOutside:!1,exitOnEsc:!1},(0,a.createElement)(Im.Panel,{className:"sm:max-w-sm w-full"},(0,a.createElement)(Im.Backdrop,null),(0,a.createElement)(Im.Body,{className:"flex flex-col items-center py-6"},(0,a.createElement)("div",{className:"relative"},(0,a.createElement)("div",{className:"w-16 h-16 border-brand-200 border-2 rounded-full"}),(0,a.createElement)("div",{className:"w-16 h-16 border-brand-500 border-t-2 animate-spin rounded-full absolute left-0 top-0"}),(0,a.createElement)("div",{className:"w-16 h-16 absolute left-0 top-0 flex justify-center items-center"},n)),(0,a.createElement)("p",{className:"mt-5 text-sm font-normal text-text-secondary text-center m-0"},t))))},null),(0,a.createElement)(Pte,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:3e3,className:"z-999999"}))))))})()})(); |