| 1 |
(()=>{var e,t,n,r={8553(e,t,n){"use strict";var r={};n.r(r),n.d(r,{Button:()=>n_,CaptionLabel:()=>r_,Chevron:()=>o_,Day:()=>a_,DayButton:()=>i_,Dropdown:()=>s_,DropdownNav:()=>l_,Footer:()=>c_,Month:()=>d_,MonthCaption:()=>u_,MonthGrid:()=>f_,Months:()=>p_,MonthsDropdown:()=>m_,Nav:()=>h_,NextMonthButton:()=>g_,Option:()=>w_,PreviousMonthButton:()=>y_,Root:()=>b_,Select:()=>v_,Week:()=>x_,WeekNumber:()=>M_,WeekNumberHeader:()=>I_,Weekday:()=>N_,Weekdays:()=>E_,Weeks:()=>S_,YearsDropdown:()=>k_});var o={};n.r(o),n.d(o,{formatCaption:()=>C_,formatDay:()=>A_,formatMonthCaption:()=>j_,formatMonthDropdown:()=>T_,formatWeekNumber:()=>O_,formatWeekNumberHeader:()=>z_,formatWeekdayName:()=>L_,formatYearCaption:()=>R_,formatYearDropdown:()=>P_});var a={};n.r(a),n.d(a,{labelCaption:()=>Q_,labelDay:()=>B_,labelDayButton:()=>U_,labelGrid:()=>F_,labelGridcell:()=>V_,labelMonthDropdown:()=>Y_,labelNav:()=>Z_,labelNext:()=>W_,labelPrevious:()=>G_,labelWeekNumber:()=>$_,labelWeekNumberHeader:()=>X_,labelWeekday:()=>H_,labelYearDropdown:()=>q_});const i=window.wp.element;var s=n(1609),l=n.t(s,2),c=n.n(s);const d=(0,s.createContext)(),u=()=>(0,s.useContext)(d);var f;const p={settingsProcess:!1,unsavedChanges:!1,page_builder:cartflows_admin?.page_builder?cartflows_admin.page_builder:"other",license_status:null!==(f=cartflows_admin?.license_status)&&void 0!==f?f:"",canvasMode:(()=>{try{return"true"===localStorage.getItem("wcf_canvas_mode_enabled")}catch(e){return!1}})()};n(5146);var m=n(6347),h=n(7387),g=n(4499),w=n(8168),y=n(8587),b=n(1561),v=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,g.createBrowserHistory)(t.props),t}return(0,h.A)(t,e),t.prototype.render=function(){return c().createElement(m.Router,{history:this.history,children:this.props.children})},t}(c().Component);c().Component;var x=function(e,t){return"function"==typeof e?e(t):e},N=function(e,t){return"string"==typeof e?(0,g.createLocation)(e,null,null,t):e},_=function(e){return e},E=c().forwardRef;void 0===E&&(E=_);var M=E(function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,a=(0,y.A)(e,["innerRef","navigate","onClick"]),i=a.target,s=(0,w.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=_!==E&&t||n,c().createElement("a",s)}),I=E(function(e,t){var n=e.component,r=void 0===n?M:n,o=e.replace,a=e.to,i=e.innerRef,s=(0,y.A)(e,["component","replace","to","innerRef"]);return c().createElement(m.__RouterContext.Consumer,null,function(e){e||(0,b.A)(!1);var n=e.history,l=N(x(a,e.location),e.location),d=l?n.createHref(l):"",u=(0,w.A)({},s,{href:d,navigate:function(){var t=x(a,e.location),r=(0,g.createPath)(e.location)===(0,g.createPath)(N(t));(o||r?n.replace:n.push)(t)}});return _!==E?u.ref=t||i:u.innerRef=i,c().createElement(r,u)})}),S=function(e){return e},k=c().forwardRef;void 0===k&&(k=S),k(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,d=e.isActive,u=e.location,f=e.sensitive,p=e.strict,h=e.style,g=e.to,v=e.innerRef,_=(0,y.A)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return c().createElement(m.__RouterContext.Consumer,null,function(e){e||(0,b.A)(!1);var n=u||e.location,o=N(x(g,n),n),y=o.pathname,E=y&&y.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),M=E?(0,m.matchPath)(n.pathname,{path:E,exact:l,sensitive:f,strict:p}):null,D=!!(d?d(M,n):M),C="function"==typeof s?s(D):s,j="function"==typeof h?h(D):h;D&&(C=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(" ")}(C,a),j=(0,w.A)({},j,i));var A=(0,w.A)({"aria-current":D&&r||null,className:C,style:j,to:o},_);return S!==k?A.ref=t||v:A.innerRef=v,c().createElement(I,A)})});const D=window.wp.i18n;var C=n(4848);const j=e=>{const t=O(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),A(n,t)||L(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},A=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?A(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},T=/^\[(.+)\]$/,L=e=>{if(T.test(e)){const t=T.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},O=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return U(Object.entries(e.classGroups),n).forEach(([e,n])=>{z(n,r,e,t)}),r},z=(e,t,n,r)=>{e.forEach(e=>{if("string"!=typeof e)return"function"==typeof e?R(e)?void z(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n}):void Object.entries(e).forEach(([e,o])=>{z(o,P(t,e),n,r)});(""===e?t:P(t,e)).classGroupId=n})},P=(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},R=e=>e.isThemeGetter,U=(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,B=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)}}},F=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 d=e[c];if(0===s){if(d===o&&(r||e.slice(c,c+a)===t)){n.push(e.slice(l,c)),l=c+a;continue}if("/"===d){i=c;continue}}"["===d?s++:"]"===d&&s--}const c=0===n.length?e:e.substring(l),d=c.startsWith("!");return{modifiers:n,hasImportantModifier:d,baseClassName:d?c.substring(1):c,maybePostfixModifierPosition:i&&i>l?i-l:void 0}};return n?e=>n({className:e,parseClassName:i}):i},Q=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},V=/\s+/;function Y(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=Z(e))&&(r&&(r+=" "),r+=t);return r}const Z=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Z(e[r]))&&(n&&(n+=" "),n+=t);return n};function W(e,...t){let n,r,o,a=function(s){const l=t.reduce((e,t)=>t(e),e());return n=(e=>({cache:B(e.cacheSize),parseClassName:F(e),...j(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(V);let s="";for(let e=i.length-1;e>=0;e-=1){const t=i[e],{modifiers:l,hasImportantModifier:c,baseClassName:d,maybePostfixModifierPosition:u}=n(t);let f=Boolean(u),p=r(f?d.substring(0,u):d);if(!p){if(!f){s=t+(s.length>0?" "+s:s);continue}if(p=r(d),!p){s=t+(s.length>0?" "+s:s);continue}f=!1}const m=Q(l).join(":"),h=c?m+"!":m,g=h+p;if(a.includes(g))continue;a.push(g);const w=o(p,f);for(let e=0;e<w.length;++e){const t=w[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(Y.apply(null,arguments))}}const G=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},H=/^\[(?:([a-z-]+):)?(.+)\]$/i,$=/^\d+\/\d+$/,X=new Set(["px","full","screen"]),q=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,J=/\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$/,K=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ee=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,te=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ne=e=>oe(e)||X.has(e)||$.test(e),re=e=>we(e,"length",ye),oe=e=>Boolean(e)&&!Number.isNaN(Number(e)),ae=e=>we(e,"number",oe),ie=e=>Boolean(e)&&Number.isInteger(Number(e)),se=e=>e.endsWith("%")&&oe(e.slice(0,-1)),le=e=>H.test(e),ce=e=>q.test(e),de=new Set(["length","size","percentage"]),ue=e=>we(e,de,be),fe=e=>we(e,"position",be),pe=new Set(["image","url"]),me=e=>we(e,pe,xe),he=e=>we(e,"",ve),ge=()=>!0,we=(e,t,n)=>{const r=H.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},ye=e=>J.test(e)&&!K.test(e),be=()=>!1,ve=e=>ee.test(e),xe=e=>te.test(e),Ne=(Symbol.toStringTag,()=>{const e=G("colors"),t=G("spacing"),n=G("blur"),r=G("brightness"),o=G("borderColor"),a=G("borderRadius"),i=G("borderSpacing"),s=G("borderWidth"),l=G("contrast"),c=G("grayscale"),d=G("hueRotate"),u=G("invert"),f=G("gap"),p=G("gradientColorStops"),m=G("gradientColorStopPositions"),h=G("inset"),g=G("margin"),w=G("opacity"),y=G("padding"),b=G("saturate"),v=G("scale"),x=G("sepia"),N=G("skew"),_=G("space"),E=G("translate"),M=()=>["auto",le,t],I=()=>[le,t],S=()=>["",ne,re],k=()=>["auto",oe,le],D=()=>["","0",le],C=()=>[oe,le];return{cacheSize:500,separator:":",theme:{colors:[ge],spacing:[ne,re],blur:["none","",ce,le],brightness:C(),borderColor:[e],borderRadius:["none","","full",ce,le],borderSpacing:I(),borderWidth:S(),contrast:C(),grayscale:D(),hueRotate:C(),invert:D(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[se,re],inset:M(),margin:M(),opacity:C(),padding:I(),saturate:C(),scale:C(),sepia:D(),skew:C(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[ce]}],"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",le]}],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",ie,le]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",ie,le]}],"grid-cols":[{"grid-cols":[ge]}],"col-start-end":[{col:["auto",{span:["full",ie,le]},le]}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":[ge]}],"row-start-end":[{row:["auto",{span:[ie,le]},le]}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],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:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],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":[_]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[_]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,t]}],"min-w":[{"min-w":[le,t,"min","max","fit"]}],"max-w":[{"max-w":[le,t,"none","full","min","max","fit","prose",{screen:[ce]},ce]}],h:[{h:[le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ce,re]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ae]}],"font-family":[{font:[ge]}],"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",le]}],"line-clamp":[{"line-clamp":["none",oe,ae]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ne,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"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",ne,re]}],"underline-offset":[{"underline-offset":["auto",ne,le]}],"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",le]}],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",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",fe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},me]}],"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":[w]}],"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":[w]}],"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":[ne,le]}],"outline-w":[{outline:[ne,re]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:S()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[ne,re]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ce,he]}],"shadow-color":[{shadow:[ge]}],opacity:[{opacity:[w]}],"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",ce,le]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],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":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"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",le]}],duration:[{duration:C()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:C()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[v]}],"scale-x":[{"scale-x":[v]}],"scale-y":[{"scale-y":[v]}],rotate:[{rotate:[ie,le]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"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",le]}],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",le]}],"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",le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ne,re,ae]}],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"]}}}),_e=W(Ne);function Ee(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=Ee(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Me(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ee(e))&&(r&&(r+=" "),r+=t);return r}const Ie=(...e)=>_e(Me(...e)),Se=(...e)=>(...t)=>e.filter(Boolean).forEach(e=>e?.(...t)),ke=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},De={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"},Ce=()=>{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},je=(e,t)=>{if(!(typeof window>"u"))try{localStorage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}},Ae=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}},Te=({children:e,gap:t="lg",className:n,...r})=>(0,C.jsx)("div",{className:Ie("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",ke(t),n),...r,children:e});Te.displayName="Topbar";const Le=({gap:e="sm",children:t,className:n})=>(0,C.jsx)("div",{className:Ie("flex items-center",ke(e),n),children:t});Le.displayName="Topbar.Left";const Oe=({gap:e="md",children:t,align:n="center",className:r})=>{const o={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,C.jsx)("div",{className:Ie("flex items-center grow",ke(e),o,r),children:t})};Oe.displayName="Topbar.Middle";const ze=({gap:e="sm",children:t,className:n})=>(0,C.jsx)("div",{className:Ie("flex items-center",ke(e),n),children:t});ze.displayName="Topbar.Right";const Pe=({children:e,className:t})=>(0,C.jsx)("div",{className:Ie("flex items-center [&>svg]:block h-full",t),children:e});function Re(){return"undefined"!=typeof window}function Ue(e){return Qe(e)?(e.nodeName||"").toLowerCase():"#document"}function Be(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Fe(e){var t;return null==(t=(Qe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Qe(e){return!!Re()&&(e instanceof Node||e instanceof Be(e).Node)}function Ve(e){return!!Re()&&(e instanceof Element||e instanceof Be(e).Element)}function Ye(e){return!!Re()&&(e instanceof HTMLElement||e instanceof Be(e).HTMLElement)}function Ze(e){return!(!Re()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Be(e).ShadowRoot)}function We(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function Ge(e){return/^(table|td|th)$/.test(Ue(e))}function He(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}Pe.displayName="Topbar.Item",Te.Left=Le,Te.Middle=Oe,Te.Right=ze,Te.Item=Pe;const $e=/transform|translate|scale|rotate|perspective|filter/,Xe=/paint|layout|strict|content/,qe=e=>!!e&&"none"!==e;let Je;function Ke(e){const t=Ve(e)?nt(e):e;return qe(t.transform)||qe(t.translate)||qe(t.scale)||qe(t.rotate)||qe(t.perspective)||!et()&&(qe(t.backdropFilter)||qe(t.filter))||$e.test(t.willChange||"")||Xe.test(t.contain||"")}function et(){return null==Je&&(Je="undefined"!=typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Je}function tt(e){return/^(html|body|#document)$/.test(Ue(e))}function nt(e){return Be(e).getComputedStyle(e)}function rt(e){return Ve(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ot(e){if("html"===Ue(e))return e;const t=e.assignedSlot||e.parentNode||Ze(e)&&e.host||Fe(e);return Ze(t)?t.host:t}function at(e){const t=ot(e);return tt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ye(t)&&We(t)?t:at(t)}function it(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=at(e),a=o===(null==(r=e.ownerDocument)?void 0:r.body),i=Be(o);if(a){const e=st(i);return t.concat(i,i.visualViewport||[],We(o)?o:[],e&&n?it(e):[])}return t.concat(o,it(o,[],n))}function st(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lt(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 ct(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Ze(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function dt(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function ut(){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 ft(e){return!(0!==e.mozInputSource||!e.isTrusted)||(ht()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function pt(e){return!ut().includes("jsdom/")&&(!ht()&&0===e.width&&0===e.height||ht()&&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 ht(){const e=/android/i;return e.test(dt())||e.test(ut())}function gt(){return dt().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function wt(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function yt(e){return(null==e?void 0:e.ownerDocument)||document}function bt(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 vt(e){return"composedPath"in e?e.composedPath()[0]:e.target}function xt(e){return Ye(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Nt(e){e.preventDefault(),e.stopPropagation()}function _t(e){return!!e&&"combobox"===e.getAttribute("role")&&xt(e)}const Et=Math.min,Mt=Math.max,It=Math.round,St=Math.floor,kt=e=>({x:e,y:e}),Dt={left:"right",right:"left",bottom:"top",top:"bottom"};function Ct(e,t,n){return Mt(e,Et(t,n))}function jt(e,t){return"function"==typeof e?e(t):e}function At(e){return e.split("-")[0]}function Tt(e){return e.split("-")[1]}function Lt(e){return"x"===e?"y":"x"}function Ot(e){return"y"===e?"height":"width"}function zt(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Pt(e){return Lt(zt(e))}function Rt(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Ut=["left","right"],Bt=["right","left"],Ft=["top","bottom"],Qt=["bottom","top"];function Vt(e){const t=At(e);return Dt[t]+e.slice(t.length)}function Yt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Zt(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 Wt=["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(","),Gt="undefined"==typeof Element,Ht=Gt?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,$t=!Gt&&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},Xt=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]"):Xt(e.parentNode))},qt=function(e,t,n){for(var r=[],o=Array.from(e);o.length;){var a=o.shift();if(!Xt(a,!1))if("SLOT"===a.tagName){var i=a.assignedElements(),s=i.length?i:a.children,l=qt(s,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:a,candidates:l})}else{Ht.call(a,Wt)&&n.filter(a)&&(t||!e.includes(a))&&r.push(a);var c=a.shadowRoot||"function"==typeof n.getShadowRoot&&n.getShadowRoot(a),d=!Xt(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(c&&d){var u=qt(!0===c?a.children:c.children,!0,n);n.flatten?r.push.apply(r,u):r.push({scopeParent:a,candidates:u})}else o.unshift.apply(o,a.children)}}return r},Jt=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Kt=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))&&!Jt(e)?0:e.tabIndex},en=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},tn=function(e){return"INPUT"===e.tagName},nn=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},rn=function(e,t){return!(t.disabled||function(e){return tn(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=Ht.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Ht.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return nn(e)}else{if("function"==typeof r){for(var a=e;e;){var i=e.parentElement,s=$t(e);if(i&&!i.shadowRoot&&!0===r(i))return nn(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&&$t(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,d;s=!(null===(c=i=null===(l=a=$t(i))||void 0===l?void 0:l.host)||void 0===c||null===(d=c.ownerDocument)||void 0===d||!d.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!!Ht.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},on=function(e,t){return!(function(e){return function(e){return tn(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||$t(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)||Kt(t)<0||!rn(e,t))},an=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},sn=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=Kt(e);return n<0&&t&&!Jt(e)?0:n}(a,o),s=o?sn(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(en).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(t)},ln=function(e,t){var n;return n=(t=t||{}).getShadowRoot?qt([e],t.includeContainer,{filter:on.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:an}):function(e,t,n){if(Xt(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Wt));return t&&Ht.call(e,Wt)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,on.bind(null,t)),sn(n)};const cn=window.ReactDOM;function dn(e,t,n){let{reference:r,floating:o}=e;const a=zt(t),i=Pt(t),s=Ot(i),l=At(t),c="y"===a,d=r.x+r.width/2-o.width/2,u=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:d,y:r.y-o.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:u};break;case"left":p={x:r.x-o.width,y:u};break;default:p={x:r.x,y:r.y}}switch(Tt(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function un(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:d="viewport",elementContext:u="floating",altBoundary:f=!1,padding:p=0}=jt(t,e),m=Yt(p),h=s[f?"floating"===u?"reference":"floating":u],g=Zt(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:d,strategy:l})),w="floating"===u?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,y=await(null==a.getOffsetParent?void 0:a.getOffsetParent(s.floating)),b=await(null==a.isElement?void 0:a.isElement(y))&&await(null==a.getScale?void 0:a.getScale(y))||{x:1,y:1},v=Zt(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:y,strategy:l}):w);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 fn=new Set(["left","top"]);function pn(e){const t=nt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ye(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=It(n)!==a||It(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function mn(e){return Ve(e)?e:e.contextElement}function hn(e){const t=mn(e);if(!Ye(t))return kt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=pn(t);let i=(a?It(n.width):n.width)/r,s=(a?It(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),s&&Number.isFinite(s)||(s=1),{x:i,y:s}}const gn=kt(0);function wn(e){const t=Be(e);return et()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:gn}function yn(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),a=mn(e);let i=kt(1);t&&(r?Ve(r)&&(i=hn(r)):i=hn(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Be(e))&&t}(a,n,r)?wn(a):kt(0);let l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,d=o.width/i.x,u=o.height/i.y;if(a){const e=Be(a),t=r&&Ve(r)?Be(r):r;let n=e,o=st(n);for(;o&&r&&t!==n;){const e=hn(o),t=o.getBoundingClientRect(),r=nt(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,d*=e.x,u*=e.y,l+=a,c+=i,n=Be(o),o=st(n)}}return Zt({width:d,height:u,x:l,y:c})}function bn(e,t){const n=rt(e).scrollLeft;return t?t.left+n:yn(Fe(e)).left+n}function vn(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-bn(e,n),y:n.top+t.scrollTop}}function xn(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Be(e),r=Fe(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const e=et();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}const c=bn(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(a-=i)}else c<=25&&(a+=c);return{width:a,height:i,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=Fe(e),n=rt(e),r=e.ownerDocument.body,o=Mt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Mt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+bn(e);const s=-n.scrollTop;return"rtl"===nt(r).direction&&(i+=Mt(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}(Fe(e));else if(Ve(t))r=function(e,t){const n=yn(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ye(e)?hn(e):kt(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:o*a.x,y:r*a.y}}(t,n);else{const n=wn(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Zt(r)}function Nn(e,t){const n=ot(e);return!(n===t||!Ve(n)||tt(n))&&("fixed"===nt(n).position||Nn(n,t))}function En(e,t,n){const r=Ye(t),o=Fe(t),a="fixed"===n,i=yn(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=kt(0);function c(){l.x=bn(o)}if(r||!r&&!a)if(("body"!==Ue(t)||We(o))&&(s=rt(t)),r){const e=yn(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();a&&!r&&o&&c();const d=!o||r||a?kt(0):vn(o,s);return{x:i.left+s.scrollLeft-l.x-d.x,y:i.top+s.scrollTop-l.y-d.y,width:i.width,height:i.height}}function Mn(e){return"static"===nt(e).position}function In(e,t){if(!Ye(e)||"fixed"===nt(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Fe(e)===n&&(n=n.ownerDocument.body),n}function Sn(e,t){const n=Be(e);if(He(e))return n;if(!Ye(e)){let t=ot(e);for(;t&&!tt(t);){if(Ve(t)&&!Mn(t))return t;t=ot(t)}return n}let r=In(e,t);for(;r&&Ge(r)&&Mn(r);)r=In(r,t);return r&&tt(r)&&Mn(r)&&!Ke(r)?n:r||function(e){let t=ot(e);for(;Ye(t)&&!tt(t);){if(Ke(t))return t;if(He(t))return null;t=ot(t)}return null}(e)||n}const kn={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a="fixed"===o,i=Fe(r),s=!!t&&He(t.floating);if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=kt(1);const d=kt(0),u=Ye(r);if((u||!u&&!a)&&(("body"!==Ue(r)||We(i))&&(l=rt(r)),u)){const e=yn(r);c=hn(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const f=!i||u||a?kt(0):vn(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+f.x,y:n.y*c.y-l.scrollTop*c.y+d.y+f.y}},getDocumentElement:Fe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[..."clippingAncestors"===n?He(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=it(e,[],!1).filter(e=>Ve(e)&&"body"!==Ue(e)),o=null;const a="fixed"===nt(e).position;let i=a?ot(e):e;for(;Ve(i)&&!tt(i);){const t=nt(i),n=Ke(i);n||"fixed"!==t.position||(o=null),(a?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||We(i)&&!n&&Nn(e,i))?r=r.filter(e=>e!==i):o=t,i=ot(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],i=xn(t,a[0],o);let s=i.top,l=i.right,c=i.bottom,d=i.left;for(let e=1;e<a.length;e++){const n=xn(t,a[e],o);s=Mt(n.top,s),l=Et(n.right,l),c=Et(n.bottom,c),d=Mt(n.left,d)}return{width:l-d,height:c-s,x:d,y:s}},getOffsetParent:Sn,getElementRects:async function(e){const t=this.getOffsetParent||Sn,n=this.getDimensions,r=await n(e.floating);return{reference:En(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=pn(e);return{width:t,height:n}},getScale:hn,isElement:Ve,isRTL:function(e){return"rtl"===nt(e).direction}};function Dn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cn(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),d=o||a?[...c?it(c):[],...t?it(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),a&&e.addEventListener("resize",n)});const u=c&&s?function(e,t){let n,r=null;const o=Fe(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:u,width:f,height:p}=c;if(s||t(),!f||!p)return;const m={rootMargin:-St(u)+"px "+-St(o.clientWidth-(d+f))+"px "+-St(o.clientHeight-(u+p))+"px "+-St(d)+"px",threshold:Mt(0,Et(1,l))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||Dn(c,e.getBoundingClientRect())||i(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),a}(c,n):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?yn(e):null;return l&&function t(){const r=yn(e);h&&!Dn(h,r)&&n(),h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),a&&e.removeEventListener("resize",n)}),null==u||u(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(f)}}const jn=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:d=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=jt(e,t);if(null!=(n=a.arrow)&&n.alignmentOffset)return{};const w=At(o),y=zt(s),b=At(s)===s,v=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(b||!h?[Vt(s)]:function(e){const t=Vt(e);return[Rt(e),t,Rt(t)]}(s)),N="none"!==m;!f&&N&&x.push(...function(e,t,n,r){const o=Tt(e);let a=function(e,t,n){switch(e){case"top":case"bottom":return n?t?Bt:Ut:t?Ut:Bt;case"left":case"right":return t?Ft:Qt;default:return[]}}(At(e),"start"===n,r);return o&&(a=a.map(e=>e+"-"+o),t&&(a=a.concat(a.map(Rt)))),a}(s,h,m,v));const _=[s,...x],E=await l.detectOverflow(t,g),M=[];let I=(null==(r=a.flip)?void 0:r.overflows)||[];if(d&&M.push(E[w]),u){const e=function(e,t,n){void 0===n&&(n=!1);const r=Tt(e),o=Pt(e),a=Ot(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Vt(i)),[i,Vt(i)]}(o,i,v);M.push(E[e[0]],E[e[1]])}if(I=[...I,{placement:o,overflows:M}],!M.every(e=>e<=0)){var S,k;const e=((null==(S=a.flip)?void 0:S.index)||0)+1,t=_[e];if(t&&("alignment"!==u||y===zt(t)||I.every(e=>zt(e.placement)!==y||e.overflows[0]>0)))return{data:{index:e,overflows:I},reset:{placement:t}};let n=null==(k=I.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=I.filter(e=>{if(N){const t=zt(e.placement);return t===y||"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:D[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},An=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:d=0}=jt(e,t)||{};if(null==c)return{};const u=Yt(d),f={x:n,y:r},p=Pt(o),m=Ot(p),h=await i.getDimensions(c),g="y"===p,w=g?"top":"left",y=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 _=N?N[b]:0;_&&await(null==i.isElement?void 0:i.isElement(N))||(_=s.floating[b]||a.floating[m]);const E=v/2-x/2,M=_/2-h[m]/2-1,I=Et(u[w],M),S=Et(u[y],M),k=I,D=_-h[m]-S,C=_/2-h[m]/2+E,j=Ct(k,C,D),A=!l.arrow&&null!=Tt(o)&&C!==j&&a.reference[m]/2-(C<k?I:S)-h[m]/2<0,T=A?C<k?C-k:C-D:0;return{[p]:f[p]+T,data:{[p]:j,centerOffset:C-j-T,...A&&{alignmentOffset:T}},reset:A}}}),Tn=(e,t,n)=>{const r=new Map,o={platform:kn,...n},a={...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:un},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:u}=dn(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:w}=h,{x:y,y:b,data:v,reset:x}=await w({x:d,y:u,initialPlacement:r,placement:f,strategy:o,middlewareData:m,rects:c,platform:s,elements:{reference:e,floating:t}});d=null!=y?y:d,u=null!=b?b:u,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:d,y:u}=dn(c,f,l))),n=-1)}return{x:d,y:u,placement:f,strategy:o,middlewareData:m}})(e,t,{...o,platform:a})};var Ln="undefined"!=typeof document?s.useLayoutEffect:function(){};function On(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(!On(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||On(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function zn(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pn(e,t){const n=zn(e);return Math.round(t*n)/n}function Rn(e){const t=s.useRef(e);return Ln(()=>{t.current=e}),t}const Un=(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=At(n),s=Tt(n),l="y"===zt(n),c=fn.has(i)?-1:1,d=a&&l?-1:1,u=jt(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof u?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),l?{x:p*d,y:f*c}:{x:f*c,y:p*d}}(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]}},Bn=(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}=jt(e,t),d={x:n,y:r},u=await a.detectOverflow(t,c),f=zt(At(o)),p=Lt(f);let m=d[p],h=d[f];if(i){const e="y"===p?"bottom":"right";m=Ct(m+u["y"===p?"top":"left"],m,m-u[e])}if(s){const e="y"===f?"bottom":"right";h=Ct(h+u["y"===f?"top":"left"],h,h-u[e])}const g=l.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[f]:s}}}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fn=(e,t)=>{const n=jn(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){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=jt(e,t),d=await i.detectOverflow(t,c),u=At(o),f=Tt(o),p="y"===zt(o),{width:m,height:h}=a.floating;let g,w;"top"===u||"bottom"===u?(g=u,w=f===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(w=u,g="end"===f?"top":"bottom");const y=h-d.top-d.bottom,b=m-d.left-d.right,v=Et(h-d[g],y),x=Et(m-d[w],b),N=!t.middlewareData.shift;let _=v,E=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(_=y),N&&!f){const e=Mt(d.left,0),t=Mt(d.right,0),n=Mt(d.top,0),r=Mt(d.bottom,0);p?E=m-2*(0!==e||0!==t?e+t:Mt(d.left,d.right)):_=h-2*(0!==n||0!==r?n+r:Mt(d.top,d.bottom))}await l({...t,availableWidth:E,availableHeight:_});const M=await i.getDimensions(s.floating);return m!==M.width||h!==M.height?{reset:{rects:!0}}:{}}}}(e);return{name:n.name,fn:n.fn,options:[e,t]}},Vn=(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?An({element:n.current,padding:r}).fn(t):{}:n?An({element:n,padding:r}).fn(t):{}}}))(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yn={...l},Zn=Yn.useInsertionEffect||(e=>e());function Wn(e){const t=s.useRef(()=>{});return Zn(()=>{t.current=e}),s.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 Gn="ArrowUp",Hn="ArrowDown",$n="ArrowLeft",Xn="ArrowRight";function qn(e,t,n){return Math.floor(e/t)!==n}function Jn(e,t){return t<0||t>=e.current.length}function Kn(e,t){return tr(e,{disabledIndices:t})}function er(e,t){return tr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function tr(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&&or(i,s,o));return s}function nr(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 rr(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function or(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 ar="undefined"!=typeof document?s.useLayoutEffect:s.useEffect;function ir(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 sr=s.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function lr(e){const{children:t,elementsRef:n,labelsRef:r}=e,[o,a]=s.useState(()=>new Map),i=s.useCallback(e=>{a(t=>new Map(t).set(e,null))},[]),l=s.useCallback(e=>{a(t=>{const n=new Map(t);return n.delete(e),n})},[]);return ar(()=>{const e=new Map(o);Array.from(e.keys()).sort(ir).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]),s.createElement(sr.Provider,{value:s.useMemo(()=>({register:i,unregister:l,map:o,elementsRef:n,labelsRef:r}),[i,l,o,n,r])},t)}function cr(){return cr=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},cr.apply(this,arguments)}let dr=!1,ur=0;const fr=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+ur++,pr=Yn.useId||function(){const[e,t]=s.useState(()=>dr?fr():void 0);return ar(()=>{null==e&&t(fr())},[]),s.useEffect(()=>{dr=!0},[]),e},mr=s.forwardRef(function(e,t){const{context:{placement:n,elements:{floating:r},middlewareData:{arrow:o,shift:a}},width:i=14,height:l=7,tipRadius:c=0,strokeWidth:d=0,staticOffset:u,stroke:f,d:p,style:{transform:m,...h}={},...g}=e,w=pr(),[y,b]=s.useState(!1);if(ar(()=>{r&&"rtl"===nt(r).direction&&b(!0)},[r]),!r)return null;const[v,x]=n.split("-"),N="top"===v||"bottom"===v;let _=u;(N&&null!=a&&a.x||!N&&null!=a&&a.y)&&(_=null);const E=2*d,M=E/2,I=i/2*(c/-8+1),S=l/2*c/4,k=!!p,D=_&&"end"===x?"bottom":"top";let C=_&&"end"===x?"right":"left";_&&y&&(C="end"===x?"left":"right");const j=null!=(null==o?void 0:o.x)?_||o.x:"",A=null!=(null==o?void 0:o.y)?_||o.y:"",T=p||"M0,0 H"+i+" L"+(i-I)+","+(l-S)+" Q"+i/2+","+l+" "+I+","+(l-S)+" Z",L={top:k?"rotate(180deg)":"",left:k?"rotate(90deg)":"rotate(-90deg)",bottom:k?"":"rotate(180deg)",right:k?"rotate(-90deg)":"rotate(90deg)"}[v];return s.createElement("svg",cr({},g,{"aria-hidden":!0,ref:t,width:k?i:i+E,height:i,viewBox:"0 0 "+i+" "+(l>i?l:i),style:{position:"absolute",pointerEvents:"none",[C]:j,[D]:A,[v]:N||k?"100%":"calc(100% - "+E/2+"px)",transform:[L,m].filter(e=>!!e).join(" "),...h}}),E>0&&s.createElement("path",{clipPath:"url(#"+w+")",fill:"none",stroke:f,strokeWidth:E+(p?0:1),d:T}),s.createElement("path",{stroke:E&&!p?g.fill:"none",d:T}),s.createElement("clipPath",{id:w},s.createElement("rect",{x:-M,y:M*(k?-1:1),width:i+E,height:i})))});const hr=s.createContext(null),gr=s.createContext(null),wr=()=>{var e;return(null==(e=s.useContext(hr))?void 0:e.id)||null},yr=()=>s.useContext(gr);function br(e){return"data-floating-ui-"+e}function vr(e){const t=(0,s.useRef)(e);return ar(()=>{t.current=e}),t}const xr=br("safe-polygon");function Nr(e,t,n){return n&&!wt(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}let _r=0;function Er(e,t){void 0===t&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(_r);const a=()=>null==e?void 0:e.focus({preventScroll:n});o?a():_r=requestAnimationFrame(a)}function Mr(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 Ir=new WeakMap,Sr=new WeakSet,kr={},Dr=0;const Cr=e=>e&&(e.host||Cr(e.parentNode));function jr(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);const r=yt(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=Cr(e);return s.contains(t)?t:null}).filter(e=>null!=e));var s;const l=new Set,c=new Set(i),d=[];kr[o]||(kr[o]=new WeakMap);const u=kr[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"!==Ue(t))if(l.has(t))e(t);else{const e=a?t.getAttribute(a):null,n=null!==e&&"false"!==e,r=(Ir.get(t)||0)+1,i=(u.get(t)||0)+1;Ir.set(t,r),u.set(t,i),d.push(t),1===r&&n&&Sr.add(t),1===i&&t.setAttribute(o,""),!n&&a&&t.setAttribute(a,"true")}})}(t),l.clear(),Dr++,()=>{d.forEach(e=>{const t=(Ir.get(e)||0)-1,n=(u.get(e)||0)-1;Ir.set(e,t),u.set(e,n),t||(!Sr.has(e)&&a&&e.removeAttribute(a),Sr.delete(e)),n||e.removeAttribute(o)}),Dr--,Dr||(Ir=new WeakMap,Ir=new WeakMap,Sr=new WeakSet,kr={})}}(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const Ar=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Tr(e,t){const n=ln(e,Ar());"prev"===t&&n.reverse();const r=n.indexOf(lt(yt(e)));return n.slice(r+1)[0]}function Lr(){return Tr(document.body,"next")}function Or(){return Tr(document.body,"prev")}function zr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ct(n,r)}function Pr(e){ln(e,Ar()).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}function Rr(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 Ur={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 Br(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Fr=s.forwardRef(function(e,t){const[n,r]=s.useState();ar(()=>(mt()&&r("button"),document.addEventListener("keydown",Br),()=>{document.removeEventListener("keydown",Br)}),[]);const o={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[br("focus-guard")]:"",style:Ur};return s.createElement("span",cr({},e,o))}),Qr=s.createContext(null),Vr=br("portal");function Yr(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=pr(),o=Zr(),[a,i]=s.useState(null),l=s.useRef(null);return ar(()=>()=>{null==a||a.remove(),queueMicrotask(()=>{l.current=null})},[a]),ar(()=>{if(!r)return;if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=r,n.setAttribute(Vr,""),e.appendChild(n),l.current=n,i(n)},[t,r]),ar(()=>{if(null===n)return;if(!r)return;if(l.current)return;let e=n||(null==o?void 0:o.portalNode);e&&!Ve(e)&&(e=e.current),e=e||document.body;let a=null;t&&(a=document.createElement("div"),a.id=t,e.appendChild(a));const s=document.createElement("div");s.id=r,s.setAttribute(Vr,""),e=a||e,e.appendChild(s),l.current=s,i(s)},[t,n,r,o]),a}({id:n,root:r}),[i,l]=s.useState(null),c=s.useRef(null),d=s.useRef(null),u=s.useRef(null),f=s.useRef(null),p=null==i?void 0:i.modal,m=null==i?void 0:i.open,h=!!i&&!i.modal&&i.open&&o&&!(!r&&!a);return s.useEffect(()=>{if(a&&o&&!p)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&&zr(e)&&("focusin"===e.type?Rr:Pr)(a)}},[a,o,p]),s.useEffect(()=>{a&&(m||Rr(a))},[m,a]),s.createElement(Qr.Provider,{value:s.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:d,beforeInsideRef:u,afterInsideRef:f,portalNode:a,setFocusManagerState:l}),[o,a])},h&&a&&s.createElement(Fr,{"data-type":"outside",ref:c,onFocus:e=>{if(zr(e,a)){var t;null==(t=u.current)||t.focus()}else{const e=Or()||(null==i?void 0:i.refs.domReference.current);null==e||e.focus()}}}),h&&a&&s.createElement("span",{"aria-owns":a.id,style:Ur}),a&&cn.createPortal(t,a),h&&a&&s.createElement(Fr,{"data-type":"outside",ref:d,onFocus:e=>{if(zr(e,a)){var t;null==(t=f.current)||t.focus()}else{const t=Lr()||(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 Zr=()=>s.useContext(Qr),Wr="data-floating-ui-focusable";function Gr(e){return e?e.hasAttribute(Wr)?e:e.querySelector("["+Wr+"]")||e:null}let Hr=[];function $r(e){Hr=Hr.filter(e=>e.isConnected);let t=e;if(t&&"body"!==Ue(t)){if(!function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==Ht.call(e,Wt)&&on(t,e)}(t,Ar())){const e=ln(t,Ar())[0];e&&(t=e)}Hr.push(t),Hr.length>20&&(Hr=Hr.slice(-20))}}function Xr(){return Hr.slice().reverse().find(e=>e.isConnected)}const qr=s.forwardRef(function(e,t){return s.createElement("button",cr({},e,{type:"button",ref:t,tabIndex:-1,style:Ur}))});function Jr(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:a=!0,initialFocus:i=0,returnFocus:l=!0,restoreFocus:c=!1,modal:d=!0,visuallyHiddenDismiss:u=!1,closeOnFocusOut:f=!0}=e,{open:p,refs:m,nodeId:h,onOpenChange:g,events:w,dataRef:y,floatingId:b,elements:{domReference:v,floating:x}}=t,N="number"==typeof i&&i<0,_=_t(v)&&N,E="undefined"==typeof HTMLElement||!("inert"in HTMLElement.prototype)||a,M=vr(o),I=vr(i),S=vr(l),k=yr(),D=Zr(),C=s.useRef(null),j=s.useRef(null),A=s.useRef(!1),T=s.useRef(!1),L=s.useRef(-1),O=null!=D,z=Gr(x),P=Wn(function(e){return void 0===e&&(e=z),e?ln(e,Ar()):[]}),R=Wn(e=>{const t=P(e);return M.current.map(e=>v&&"reference"===e?v:z&&"floating"===e?z:t).filter(Boolean).flat()});function U(e){return!r&&u&&d?s.createElement(qr,{ref:"start"===e?C:j,onClick:e=>g(!1,e.nativeEvent)},"string"==typeof u?u:"Dismiss"):null}s.useEffect(()=>{if(r)return;if(!d)return;function e(e){if("Tab"===e.key){ct(z,lt(yt(z)))&&0===P().length&&!_&&Nt(e);const t=R(),n=vt(e);"reference"===M.current[0]&&n===v&&(Nt(e),e.shiftKey?Er(t[t.length-1]):Er(t[1])),"floating"===M.current[1]&&n===z&&e.shiftKey&&(Nt(e),Er(t[0]))}}const t=yt(z);return t.addEventListener("keydown",e),()=>{t.removeEventListener("keydown",e)}},[r,v,z,d,M,_,P,R]),s.useEffect(()=>{if(!r&&x)return x.addEventListener("focusin",e),()=>{x.removeEventListener("focusin",e)};function e(e){const t=vt(e),n=P().indexOf(t);-1!==n&&(L.current=n)}},[r,x,P]),s.useEffect(()=>{if(!r&&f)return x&&Ye(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=!(ct(v,t)||ct(x,t)||ct(t,x)||ct(null==D?void 0:D.portalNode,t)||null!=t&&t.hasAttribute(br("focus-guard"))||k&&(Mr(k.nodesRef.current,h).find(e=>{var n,r;return ct(null==(n=e.context)?void 0:n.elements.floating,t)||ct(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}(k.nodesRef.current,h).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(c&&n&<(yt(z))===yt(z).body){Ye(z)&&z.focus();const e=L.current,t=P(),n=t[e]||t[t.length-1]||z;Ye(n)&&n.focus()}!_&&d||!t||!n||T.current||t===Xr()||(A.current=!0,g(!1,e,"focus-out"))})}},[r,v,x,z,d,h,k,D,g,f,c,P,_]),s.useEffect(()=>{var e;if(r)return;const t=Array.from((null==D||null==(e=D.portalNode)?void 0:e.querySelectorAll("["+br("portal")+"]"))||[]);if(x){const e=[x,...t,C.current,j.current,M.current.includes("reference")||_?v:null].filter(e=>null!=e),n=d||_?jr(e,E,!E):jr(e);return()=>{n()}}},[r,v,x,d,M,D,_,E]),ar(()=>{if(r||!Ye(z))return;const e=lt(yt(z));queueMicrotask(()=>{const t=R(z),n=I.current,r=("number"==typeof n?t[n]:n.current)||z,o=ct(z,e);N||o||!p||Er(r,{preventScroll:r===z})})},[r,p,z,N,R,I]),ar(()=>{if(r||!z)return;let e=!1;const t=yt(z),n=lt(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&&m.domReference.current&&$r(m.domReference.current),"hover"===r&&"mouseleave"===a.type&&(A.current=!0),"outside-press"===r&&(i?(A.current=!1,e=!0):A.current=!(ft(a)||pt(a)))}$r(n),w.on("openchange",a);const i=t.createElement("span");return i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),Object.assign(i.style,Ur),O&&v&&v.insertAdjacentElement("afterend",i),()=>{w.off("openchange",a);const n=lt(t),r=ct(x,n)||k&&Mr(k.nodesRef.current,h).some(e=>{var t;return ct(null==(t=e.context)?void 0:t.elements.floating,n)});(r||o&&["click","mousedown"].includes(o.type))&&m.domReference.current&&$r(m.domReference.current);const s="boolean"==typeof S.current?Xr()||i:S.current.current||i;queueMicrotask(()=>{S.current&&!A.current&&Ye(s)&&(s===n||n===t.body||r)&&s.focus({preventScroll:e}),i.remove()})}},[r,x,z,S,y,m,w,k,h,O,v]),s.useEffect(()=>{queueMicrotask(()=>{A.current=!1})},[r]),ar(()=>{if(!r&&D)return D.setFocusManagerState({modal:d,closeOnFocusOut:f,open:p,onOpenChange:g,refs:m}),()=>{D.setFocusManagerState(null)}},[r,D,d,p,g,m,f]),ar(()=>{if(r)return;if(!z)return;if("function"!=typeof MutationObserver)return;if(N)return;const e=()=>{const e=z.getAttribute("tabindex"),t=P(),n=lt(yt(x)),r=t.indexOf(n);-1!==r&&(L.current=r),M.current.includes("floating")||n!==m.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,m,M,P,N]);const B=!r&&E&&(!d||!_)&&(O||d);return s.createElement(s.Fragment,null,B&&s.createElement(Fr,{"data-type":"inside",ref:null==D?void 0:D.beforeInsideRef,onFocus:e=>{if(d){const e=R();Er("reference"===o[0]?e[0]:e[e.length-1])}else if(null!=D&&D.preserveTabOrder&&D.portalNode)if(A.current=!1,zr(e,D.portalNode)){const e=Lr()||v;null==e||e.focus()}else{var t;null==(t=D.beforeOutsideRef.current)||t.focus()}}}),!_&&U("start"),n,U("end"),B&&s.createElement(Fr,{"data-type":"inside",ref:null==D?void 0:D.afterInsideRef,onFocus:e=>{if(d)Er(R()[0]);else if(null!=D&&D.preserveTabOrder&&D.portalNode)if(f&&(A.current=!0),zr(e,D.portalNode)){const e=Or()||v;null==e||e.focus()}else{var t;null==(t=D.afterOutsideRef.current)||t.focus()}}}))}let Kr=0,eo=()=>{};const to=s.forwardRef(function(e,t){const{lockScroll:n=!1,...r}=e;return ar(()=>{if(n)return Kr++,1===Kr&&(eo=function(){const e=/iP(hone|ad|od)|iOS/.test(dt()),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))}}()),()=>{Kr--,0===Kr&&eo()}},[n]),s.createElement("div",cr({ref:t},r,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...r.style}}))});function no(e){return Ye(e.target)&&"BUTTON"===e.target.tagName}function ro(e){return xt(e)}function oo(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:a}}=e,{enabled:i=!0,event:l="click",toggle:c=!0,ignoreMouse:d=!1,keyboardHandlers:u=!0,stickIfOpen:f=!0}=t,p=s.useRef(),m=s.useRef(!1),h=s.useMemo(()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==l&&(wt(t,!0)&&d||(!n||!c||o.current.openEvent&&f&&"mousedown"!==o.current.openEvent.type?(e.preventDefault(),r(!0,e.nativeEvent,"click")):r(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===l&&p.current?p.current=void 0:wt(t,!0)&&d||(!n||!c||o.current.openEvent&&f&&"click"!==o.current.openEvent.type?r(!0,e.nativeEvent,"click"):r(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!u||no(e)||(" "!==e.key||ro(a)||(e.preventDefault(),m.current=!0),"Enter"===e.key&&r(!n||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!u||no(e)||ro(a)||" "===e.key&&m.current&&(m.current=!1,r(!n||!c,e.nativeEvent,"click"))}}),[o,a,l,d,u,r,n,f,c]);return s.useMemo(()=>i?{reference:h}:{},[i,h])}const ao={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},io={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},so=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 lo(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,elements:o,dataRef:a}=e,{enabled:i=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:d="pointerdown",referencePress:u=!1,referencePressEvent:f="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:h}=t,g=yr(),w=Wn("function"==typeof c?c:()=>!1),y="function"==typeof c?w:c,b=s.useRef(!1),v=s.useRef(!1),{escapeKey:x,outsidePress:N}=so(m),{escapeKey:_,outsidePress:E}=so(h),M=s.useRef(!1),I=Wn(e=>{var t;if(!n||!i||!l||"Escape"!==e.key)return;if(M.current)return;const o=null==(t=a.current.floatingContext)?void 0:t.nodeId,s=g?Mr(g.nodesRef.current,o):[];if(!x&&(e.stopPropagation(),s.length>0)){let e=!0;if(s.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=Wn(e=>{var t;const n=()=>{var t;I(e),null==(t=vt(e))||t.removeEventListener("keydown",n)};null==(t=vt(e))||t.addEventListener("keydown",n)}),k=Wn(e=>{var t;const n=b.current;b.current=!1;const i=v.current;if(v.current=!1,"click"===d&&i)return;if(n)return;if("function"==typeof y&&!y(e))return;const s=vt(e),l="["+br("inert")+"]",c=yt(o.floating).querySelectorAll(l);let u=Ve(s)?s:null;for(;u&&!tt(u);){const e=ot(u);if(tt(e)||!Ve(e))break;u=e}if(c.length&&Ve(s)&&!s.matches("html,body")&&!ct(s,o.floating)&&Array.from(c).every(e=>!ct(u,e)))return;if(Ye(s)&&j){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"===nt(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=g&&Mr(g.nodesRef.current,f).some(t=>{var n;return bt(e,null==(n=t.context)?void 0:n.elements.floating)});if(bt(e,o.floating)||bt(e,o.domReference)||p)return;const m=g?Mr(g.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")}),D=Wn(e=>{var t;const n=()=>{var t;k(e),null==(t=vt(e))||t.removeEventListener(d,n)};null==(t=vt(e))||t.addEventListener(d,n)});s.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 s(){window.clearTimeout(e),M.current=!0}function c(){e=window.setTimeout(()=>{M.current=!1},et()?5:0)}const u=yt(o.floating);l&&(u.addEventListener("keydown",_?S:I,_),u.addEventListener("compositionstart",s),u.addEventListener("compositionend",c)),y&&u.addEventListener(d,E?D:k,E);let f=[];return p&&(Ve(o.domReference)&&(f=it(o.domReference)),Ve(o.floating)&&(f=f.concat(it(o.floating))),!Ve(o.reference)&&o.reference&&o.reference.contextElement&&(f=f.concat(it(o.reference.contextElement)))),f=f.filter(e=>{var t;return e!==(null==(t=u.defaultView)?void 0:t.visualViewport)}),f.forEach(e=>{e.addEventListener("scroll",t,{passive:!0})}),()=>{l&&(u.removeEventListener("keydown",_?S:I,_),u.removeEventListener("compositionstart",s),u.removeEventListener("compositionend",c)),y&&u.removeEventListener(d,E?D:k,E),f.forEach(e=>{e.removeEventListener("scroll",t)}),window.clearTimeout(e)}},[a,o,l,y,d,n,r,p,i,x,N,I,_,S,k,E,D]),s.useEffect(()=>{b.current=!1},[y,d]);const C=s.useMemo(()=>({onKeyDown:I,[ao[f]]:e=>{u&&r(!1,e.nativeEvent,"reference-press")}}),[I,r,u,f]),j=s.useMemo(()=>({onKeyDown:I,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[io[d]]:()=>{b.current=!0}}),[I,d]);return s.useMemo(()=>i?{reference:C,floating:j}:{},[i,C,j])}function co(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:r}=e,o=pr(),a=s.useRef({}),[i]=s.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))||[])}}}()),l=null!=wr(),[c,d]=s.useState(r.reference),u=Wn((e,t,r)=>{a.current.openEvent=e?t:void 0,i.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)}),f=s.useMemo(()=>({setPositionReference:d}),[]),p=s.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return s.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:p,events:i,floatingId:o,refs:f}),[t,u,p,i,o,f])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,o=r.elements,[a,i]=s.useState(null),[l,c]=s.useState(null),d=(null==o?void 0:o.domReference)||a,u=s.useRef(null),f=yr();ar(()=>{d&&(u.current=d)},[d]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:c,open:d}=e,[u,f]=s.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=s.useState(r);On(p,r)||m(r);const[h,g]=s.useState(null),[w,y]=s.useState(null),b=s.useCallback(e=>{e!==_.current&&(_.current=e,g(e))},[]),v=s.useCallback(e=>{e!==E.current&&(E.current=e,y(e))},[]),x=a||h,N=i||w,_=s.useRef(null),E=s.useRef(null),M=s.useRef(u),I=null!=c,S=Rn(c),k=Rn(o),D=Rn(d),C=s.useCallback(()=>{if(!_.current||!E.current)return;const e={placement:t,strategy:n,middleware:p};k.current&&(e.platform=k.current),Tn(_.current,E.current,e).then(e=>{const t={...e,isPositioned:!1!==D.current};j.current&&!On(M.current,t)&&(M.current=t,cn.flushSync(()=>{f(t)}))})},[p,t,n,k,D]);Ln(()=>{!1===d&&M.current.isPositioned&&(M.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[d]);const j=s.useRef(!1);Ln(()=>(j.current=!0,()=>{j.current=!1}),[]),Ln(()=>{if(x&&(_.current=x),N&&(E.current=N),x&&N){if(S.current)return S.current(x,N,C);C()}},[x,N,C,S,I]);const A=s.useMemo(()=>({reference:_,floating:E,setReference:b,setFloating:v}),[b,v]),T=s.useMemo(()=>({reference:x,floating:N}),[x,N]),L=s.useMemo(()=>{const e={position:n,left:0,top:0};if(!T.floating)return e;const t=Pn(T.floating,u.x),r=Pn(T.floating,u.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...zn(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,T.floating,u.x,u.y]);return s.useMemo(()=>({...u,update:C,refs:A,elements:T,floatingStyles:L}),[u,C,A,T,L])}({...e,elements:{...o,...l&&{reference:l}}}),m=s.useCallback(e=>{const t=Ve(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),p.refs.setReference(t)},[p.refs]),h=s.useCallback(e=>{(Ve(e)||null===e)&&(u.current=e,i(e)),(Ve(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!Ve(e))&&p.refs.setReference(e)},[p.refs]),g=s.useMemo(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:u}),[p.refs,h,m]),w=s.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),y=s.useMemo(()=>({...p,...r,refs:g,elements:w,nodeId:t}),[p,g,w,t,r]);return ar(()=>{r.dataRef.current.floatingContext=y;const e=null==f?void 0:f.nodesRef.current.find(e=>e.id===t);e&&(e.context=y)}),s.useMemo(()=>({...p,context:y,refs:g,elements:w}),[p,g,w,y])}const uo="active",fo="selected";function po(e,t,n){const r=new Map,o="item"===n;let a=e;if(o&&e){const{[uo]:t,[fo]:__,...n}=e;a=n}return{..."floating"===n&&{tabIndex:-1,[Wr]:""},...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&&[uo,fo].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 mo(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=s.useCallback(t=>po(t,e,"reference"),t),a=s.useCallback(t=>po(t,e,"floating"),n),i=s.useCallback(t=>po(t,e,"item"),r);return s.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:i}),[o,a,i])}let ho=!1;function go(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function wo(e,t){return go(t,e===Gn||e===Hn,e===$n||e===Xn)}function yo(e,t,n){return go(t,e===Hn,n?e===$n:e===Xn)||"Enter"===e||" "===e||""===e}function bo(e,t,n){return go(t,n?e===Xn:e===$n,e===Gn)}function vo(e,t){const{open:n,onOpenChange:r,elements:o}=e,{listRef:a,activeIndex:i,onNavigate:l=()=>{},enabled:c=!0,selectedIndex:d=null,allowEscape:u=!1,loop:f=!1,nested:p=!1,rtl:m=!1,virtual:h=!1,focusItemOnOpen:g="auto",focusItemOnHover:w=!0,openOnArrowKeyDown:y=!0,disabledIndices:b,orientation:v="vertical",cols:x=1,scrollItemIntoView:N=!0,virtualItemRef:_,itemSizes:E,dense:M=!1}=t,I=vr(Gr(o.floating)),S=wr(),k=yr(),D=Wn(l),C=_t(o.domReference),j=s.useRef(g),A=s.useRef(null!=d?d:-1),T=s.useRef(null),L=s.useRef(!0),O=s.useRef(D),z=s.useRef(!!o.floating),P=s.useRef(n),R=s.useRef(!1),U=s.useRef(!1),B=vr(b),F=vr(n),Q=vr(N),V=vr(d),[Y,Z]=s.useState(),[W,G]=s.useState(),H=Wn(function(e,t,n){function r(e){h?(Z(e.id),null==k||k.events.emit("virtualfocus",e),_&&(_.current=e)):Er(e,{preventScroll:!0,sync:!(!gt()||!mt())&&(ho||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=Q.current;i&&X&&(n||!L.current)&&(null==a.scrollIntoView||a.scrollIntoView("boolean"==typeof i?{block:"nearest",inline:"nearest"}:i))})});ar(()=>{document.createElement("div").focus({get preventScroll(){return ho=!0,!1}})},[]),ar(()=>{c&&(n&&o.floating?j.current&&null!=d&&(U.current=!0,A.current=d,D(d)):z.current&&(A.current=-1,O.current(null)))},[c,n,o.floating,d,D]),ar(()=>{if(c&&n&&o.floating)if(null==i){if(R.current=!1,null!=V.current)return;if(z.current&&(A.current=-1,H(a,A)),(!P.current||!z.current)&&j.current&&(null!=T.current||!0===j.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||yo(T.current,v,m)||p?Kn(a,B.current):er(a,B.current),T.current=null,D(A.current))};t()}}else Jn(a,i)||(A.current=i,H(a,A,U.current),U.current=!1)},[c,n,o.floating,i,V,p,a,v,m,D,H,B]),ar(()=>{var e;if(!c||o.floating||!k||h||!z.current)return;const t=k.nodesRef.current,n=null==(e=t.find(e=>e.id===S))||null==(e=e.context)?void 0:e.elements.floating,r=lt(yt(o.floating)),a=t.some(e=>e.context&&ct(e.context.elements.floating,r));n&&!a&&L.current&&n.focus({preventScroll:!0})},[c,o.floating,k,S,h]),ar(()=>{if(c&&k&&h&&!S)return k.events.on("virtualfocus",e),()=>{k.events.off("virtualfocus",e)};function e(e){G(e.id),_&&(_.current=e)}},[c,k,h,S,_]),ar(()=>{O.current=D,z.current=!!o.floating}),ar(()=>{n||(T.current=null)},[n]),ar(()=>{P.current=n},[n]);const $=null!=i,X=s.useMemo(()=>{function e(e){if(!n)return;const t=a.current.indexOf(e);-1!==t&&D(t)}const t={onFocus(t){let{currentTarget:n}=t;e(n)},onClick:e=>{let{currentTarget:t}=e;return t.focus({preventScroll:!0})},...w&&{onMouseMove(t){let{currentTarget:n}=t;e(n)},onPointerLeave(e){let{pointerType:t}=e;L.current&&"touch"!==t&&(A.current=-1,H(a,A),D(null),h||Er(I.current,{preventScroll:!0}))}}};return t},[n,I,H,w,a,D,h]),q=Wn(e=>{if(L.current=!1,R.current=!0,229===e.which)return;if(!F.current&&e.currentTarget===I.current)return;if(p&&bo(e.key,v,m))return Nt(e),r(!1,e.nativeEvent,"list-navigation"),void(Ye(o.domReference)&&(h?null==k||k.events.emit("virtualfocus",o.domReference):o.domReference.focus()));const t=A.current,i=Kn(a,b),s=er(a,b);if(C||("Home"===e.key&&(Nt(e),A.current=i,D(A.current)),"End"===e.key&&(Nt(e),A.current=s,D(A.current))),x>1){const t=E||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,M),r=n.findIndex(e=>null!=e&&!or(a.current,e,b)),o=n.reduce((e,t,n)=>null==t||or(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:d,stopEvent:u=!1}=t,f=d;if(n.key===Gn){if(u&&Nt(n),-1===d)f=c;else if(f=tr(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:s}),o&&(d-i<l||f<0)){const e=d%i,t=c%i,n=c-(t-e);f=t===e?c:t>e?n:n-i}Jn(e,f)&&(f=d)}if(n.key===Hn&&(u&&Nt(n),-1===d?f=l:(f=tr(e,{startingIndex:d,amount:i,disabledIndices:s}),o&&d+i>c&&(f=tr(e,{startingIndex:d%i-i,amount:i,disabledIndices:s}))),Jn(e,f)&&(f=d)),"both"===r){const t=St(d/i);n.key===(a?$n:Xn)&&(u&&Nt(n),d%i!==i-1?(f=tr(e,{startingIndex:d,disabledIndices:s}),o&&qn(f,i,t)&&(f=tr(e,{startingIndex:d-d%i-1,disabledIndices:s}))):o&&(f=tr(e,{startingIndex:d-d%i-1,disabledIndices:s})),qn(f,i,t)&&(f=d)),n.key===(a?Xn:$n)&&(u&&Nt(n),d%i!==0?(f=tr(e,{startingIndex:d,decrement:!0,disabledIndices:s}),o&&qn(f,i,t)&&(f=tr(e,{startingIndex:d+(i-d%i),decrement:!0,disabledIndices:s}))):o&&(f=tr(e,{startingIndex:d+(i-d%i),decrement:!0,disabledIndices:s})),qn(f,i,t)&&(f=d));const r=St(c/i)===t;Jn(e,f)&&(f=o&&r?n.key===(a?Xn:$n)?c:tr(e,{startingIndex:d-d%i-1,disabledIndices:s}):d)}return f}({current:n.map(e=>null!=e?a.current[e]:null)},{event:e,orientation:v,loop:f,rtl:m,cols:x,disabledIndices:rr([...b||a.current.map((e,t)=>or(a.current,t)?t:void 0),void 0],n),minIndex:r,maxIndex:o,prevIndex:nr(A.current>s?i:A.current,t,n,x,e.key===Hn?"bl":e.key===(m?$n:Xn)?"tr":"tl"),stopEvent:!0})];if(null!=l&&(A.current=l,D(A.current)),"both"===v)return}if(wo(e.key,v)){if(Nt(e),n&&!h&<(e.currentTarget.ownerDocument)===e.currentTarget)return A.current=yo(e.key,v,m)?i:s,void D(A.current);yo(e.key,v,m)?A.current=f?t>=s?u&&t!==a.current.length?-1:i:tr(a,{startingIndex:t,disabledIndices:b}):Math.min(s,tr(a,{startingIndex:t,disabledIndices:b})):A.current=f?t<=i?u&&-1!==t?a.current.length:s:tr(a,{startingIndex:t,decrement:!0,disabledIndices:b}):Math.max(i,tr(a,{startingIndex:t,decrement:!0,disabledIndices:b})),Jn(a,A.current)?D(null):D(A.current)}}),J=s.useMemo(()=>h&&n&&$&&{"aria-activedescendant":W||Y},[h,n,$,W,Y]),K=s.useMemo(()=>({"aria-orientation":"both"===v?void 0:v,...!_t(o.domReference)&&J,onKeyDown:q,onPointerMove(){L.current=!0}}),[J,q,o.domReference,v]),ee=s.useMemo(()=>{function e(e){"auto"===g&&ft(e.nativeEvent)&&(j.current=!0)}return{...J,onKeyDown(e){L.current=!1;const t=e.key.startsWith("Arrow"),o=["Home","End"].includes(e.key),i=t||o,s=function(e,t,n){return go(t,n?e===$n:e===Xn,e===Hn)}(e.key,v,m),l=bo(e.key,v,m),c=wo(e.key,v),u=(p?s:c)||"Enter"===e.key||""===e.key.trim();if(h&&n){const t=null==k?void 0:k.nodesRef.current.find(e=>null==e.parentId),n=k&&t?function(e,t){let n,r=-1;return function t(o,a){a>r&&(n=o,r=a),Mr(e,o).forEach(e=>{t(e.id,a+1)})}(t,0),e.find(e=>e.id===n)}(k.nodesRef.current,t.id):null;if(i&&n&&_){const t=new KeyboardEvent("keydown",{key:e.key,bubbles:!0});if(s||l){var f,g;const r=(null==(f=n.context)?void 0:f.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)===Y):null;o&&(Nt(e),o.dispatchEvent(t),G(void 0))}var w;if((c||o)&&n.context&&n.context.open&&n.parentId&&e.currentTarget!==n.context.elements.domReference)return Nt(e),void(null==(w=n.context.elements.domReference)||w.dispatchEvent(t))}return q(e)}(n||y||!t)&&(u&&(T.current=p&&c?null:e.key),p?s&&(Nt(e),n?(A.current=Kn(a,B.current),D(A.current)):r(!0,e.nativeEvent,"list-navigation")):c&&(null!=d&&(A.current=d),Nt(e),!n&&y?r(!0,e.nativeEvent,"list-navigation"):q(e),n&&D(A.current)))},onFocus(){n&&!h&&D(null)},onPointerDown:function(e){j.current=g,"auto"===g&&pt(e.nativeEvent)&&(j.current=!0)},onMouseDown:e,onClick:e}},[Y,J,q,B,g,a,p,D,r,n,y,v,m,d,k,h,_]);return s.useMemo(()=>c?{reference:ee,floating:K,item:X}:{},[c,ee,K,X])}const xo=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function No(e,t){var n;void 0===t&&(t={});const{open:r,floatingId:o}=e,{enabled:a=!0,role:i="dialog"}=t,l=null!=(n=xo.get(i))?n:i,c=pr(),d=null!=wr(),u=s.useMemo(()=>"tooltip"===l||"label"===i?{["aria-"+("label"===i?"labelledby":"describedby")]:r?o:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":r?o:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&d&&{role:"menuitem"},..."select"===i&&{"aria-autocomplete":"none"},..."combobox"===i&&{"aria-autocomplete":"list"}},[l,o,d,r,c,i]),f=s.useMemo(()=>{const e={id:o,...l&&{role:l}};return"tooltip"===l||"label"===i?e:{...e,..."menu"===l&&{"aria-labelledby":c}}},[l,o,c,i]),p=s.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 s.useMemo(()=>a?{reference:u,floating:f,item:p}:{},[a,u,f,p])}const _o=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?"-":"")+e.toLowerCase());function Eo(e,t){return"function"==typeof e?e(t):e}function Mo(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:r,close:o,common:a,duration:i=250}=t,l=e.placement,c=l.split("-")[0],d=s.useMemo(()=>({side:c,placement:l}),[c,l]),u="number"==typeof i,f=(u?i:i.open)||0,p=(u?i:i.close)||0,[m,h]=s.useState(()=>({...Eo(a,d),...Eo(n,d)})),{isMounted:g,status:w}=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,l]=s.useState("unmounted"),c=function(e,t){const[n,r]=s.useState(e);return e&&!n&&r(!0),s.useEffect(()=>{if(!e&&n){const e=setTimeout(()=>r(!1),t);return()=>clearTimeout(e)}},[e,n,t]),n}(n,a);return c||"close"!==i||l("unmounted"),ar(()=>{if(r){if(n){l("initial");const e=requestAnimationFrame(()=>{l("open")});return()=>{cancelAnimationFrame(e)}}l("close")}},[n,r]),{isMounted:c,status:i}}(e,{duration:i}),y=vr(n),b=vr(r),v=vr(o),x=vr(a);return ar(()=>{const e=Eo(y.current,d),t=Eo(v.current,d),n=Eo(x.current,d),r=Eo(b.current,d)||Object.keys(e).reduce((e,t)=>(e[t]="",e),{});if("initial"===w&&h(t=>({transitionProperty:t.transitionProperty,...n,...e})),"open"===w&&h({transitionProperty:Object.keys(r).map(_o).join(","),transitionDuration:f+"ms",...n,...r}),"close"===w){const r=t||e;h({transitionProperty:Object.keys(r).map(_o).join(","),transitionDuration:p+"ms",...n,...r})}},[p,v,y,b,x,f,w,d]),{isMounted:g,styles:m}}function Io(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 So(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:d,elements:u,onClose:f,nodeId:p,tree:m}=e;return function(e){function h(){clearTimeout(o),f()}if(clearTimeout(o),!u.domReference||!u.floating||null==d||null==n||null==c)return;const{clientX:g,clientY:w}=e,y=[g,w],b=vt(e),v="mouseleave"===e.type,x=ct(u.floating,b),N=ct(u.domReference,b),_=u.domReference.getBoundingClientRect(),E=u.floating.getBoundingClientRect(),M=d.split("-")[0],I=n>E.right-E.width/2,S=c>E.bottom-E.height/2,k=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(y,_),D=E.width>_.width,C=E.height>_.height,j=(D?_:E).left,A=(D?_:E).right,T=(C?_:E).top,L=(C?_:E).bottom;if(x&&(a=!0,!v))return;if(N&&(a=!1),N&&!v)return void(a=!0);if(v&&Ve(e.relatedTarget)&&ct(u.floating,e.relatedTarget))return;if(m&&Mr(m.nodesRef.current,p).some(e=>{let{context:t}=e;return null==t?void 0:t.open}))return;if("top"===M&&c>=_.bottom-1||"bottom"===M&&c<=_.top+1||"left"===M&&n>=_.right-1||"right"===M&&n<=_.left+1)return h();let O=[];switch(M){case"top":O=[[j,_.top+1],[j,E.bottom-1],[A,E.bottom-1],[A,_.top+1]];break;case"bottom":O=[[j,E.top+1],[j,_.bottom-1],[A,_.bottom-1],[A,E.top+1]];break;case"left":O=[[E.right-1,L],[E.right-1,T],[_.left+1,T],[_.left+1,L]];break;case"right":O=[[_.right-1,L],[_.right-1,T],[E.left+1,T],[E.left+1,L]]}if(!Io([g,w],O)){if(a&&!k)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()}Io([g,w],function(e){let[n,r]=e;switch(M){case"top":return[[D?n+t/2:I?n+4*t:n-4*t,r+t+1],[D?n-t/2:I?n+4*t:n-4*t,r+t+1],[E.left,I||D?E.bottom-t:E.top],[E.right,I?D?E.bottom-t:E.top:E.bottom-t]];case"bottom":return[[D?n+t/2:I?n+4*t:n-4*t,r-t],[D?n-t/2:I?n+4*t:n-4*t,r-t],[E.left,I||D?E.top+t:E.bottom],[E.right,I?D?E.top+t:E.bottom:E.top+t]];case"left":{const e=[n+t+1,C?r+t/2:S?r+4*t:r-4*t],o=[n+t+1,C?r-t/2:S?r+4*t:r-4*t];return[[S||C?E.right-t:E.left,E.top],[S?C?E.right-t:E.left:E.right-t,E.bottom],e,o]}case"right":return[[n-t,C?r+t/2:S?r+4*t:r-4*t],[n-t,C?r-t/2:S?r+4*t:r-4*t],[S||C?E.left+t:E.right,E.top],[S?C?E.left+t:E.right:E.left+t,E.bottom]]}}([n,c]))?!a&&r&&(o=window.setTimeout(h,40)):h()}}};return c.__options={blockPointerEvents:n},c}const ko=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Do=(...e)=>e.filter((e,t,n)=>Boolean(e)&&n.indexOf(e)===t).join(" ");var Co={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 jo=(0,s.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...l},c)=>(0,s.createElement)("svg",{ref:c,...Co,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:Do("lucide",o),...l},[...i.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(a)?a:[a]])),Ao=(e,t)=>{const n=(0,s.forwardRef)(({className:n,...r},o)=>(0,s.createElement)(jo,{ref:o,iconNode:t,className:Do(`lucide-${ko(e)}`,n),...r}));return n.displayName=`${e}`,n},To=Ao("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Lo=Ao("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Oo=Ao("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"}]]),zo=Ao("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"}]]),Po=(0,s.forwardRef)((e,t)=>{const{variant:n="primary",size:r="md",type:o="button",tag:a="button",className:i,children:l,disabled:c=!1,destructive:d=!1,icon:u=null,iconPosition:f="left",loading:p=!1,...m}=e,h=d&&"focus:ring-focus-error",g=p?"opacity-50 disabled:cursor-not-allowed":"",w={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=d&&!c?{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"===f?v=u:x=u),(0,C.jsxs)(a,{ref:t,type:o,className:Ie(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,w,y,h,g,{"cursor-default":c},i),disabled:c,"aria-disabled":c,...m,children:[(0,C.jsx)(s.Fragment,{children:v},"left-icon"),l?(0,C.jsx)("span",{className:"px-1",children:l}):null,(0,C.jsx)(s.Fragment,{children:x},"right-icon")]})});Po.displayName="Button";const Ro="light",Uo="neutral",Bo=({icon:e,theme:t=Ro,variant:n=Uo})=>{const r="[&>svg]:h-5 [&>svg]:w-5",o=(({theme:e=Ro,variant:t=Uo})=>{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,s.isValidElement)(e))return(0,s.cloneElement)(e,{className:Ie(r,o,e?.props?.className??"")});const a={neutral:(0,C.jsx)(To,{className:Ie(r,o)}),info:(0,C.jsx)(To,{className:Ie(r,o)}),success:(0,C.jsx)(Lo,{className:Ie(r,o)}),warning:(0,C.jsx)(Oo,{className:Ie(r,o)}),error:(0,C.jsx)(zo,{className:Ie(r,o)})};return a[n]||a.neutral},Fo=({actionType:e="button",onAction:t=()=>{},actionLabel:n="",theme:r=Ro})=>{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,C.jsx)(Po,{variant:"outline",size:"xs",onClick:t,className:Ie("rounded",o,a,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,C.jsx)(Po,{variant:"link",size:"xs",onClick:t,className:Ie(o,a),children:n});default:return null}},Qo=({theme:e=Ro,title:t="",inline:n=!1})=>t?(0,C.jsx)("span",{className:Ie("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,Vo=({theme:e=Ro,content:t="",inline:n=!1})=>t?(0,C.jsx)("span",{className:Ie({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,Yo=(...e)=>t=>{e.forEach(e=>{"function"==typeof e?e(t):e&&(e.current=t)})},Zo=({variant:e="dark",placement:t="bottom",title:n="",content:r,arrow:o=!1,open:a,setOpen:i,children:l,className:c,tooltipPortalRoot:d,tooltipPortalId:u,boundary:f="clippingAncestors",strategy:p="fixed",offset:m=8,triggers:h=["hover","focus"],interactive:g=!1})=>{const w=(0,s.useMemo)(()=>"boolean"==typeof a&&"function"==typeof i,[a,i]),[y,b]=(0,s.useState)(!1),v=(0,s.useRef)(null),{refs:x,floatingStyles:N,context:_}=co({open:w?a:y,onOpenChange:w?i:b,placement:t,strategy:p,middleware:[Un(m),Fn({boundary:f}),Bn({boundary:f}),Vn({element:v})],whileElementsMounted:Cn}),E=oo(_,{enabled:!w&&h.includes("click")}),M=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,dataRef:o,events:a,elements:i}=e,{enabled:l=!0,delay:c=0,handleClose:d=null,mouseOnly:u=!1,restMs:f=0,move:p=!0}=t,m=yr(),h=wr(),g=vr(d),w=vr(c),y=vr(n),b=s.useRef(),v=s.useRef(-1),x=s.useRef(),N=s.useRef(-1),_=s.useRef(!0),E=s.useRef(!1),M=s.useRef(()=>{}),I=s.useRef(!1),S=s.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]);s.useEffect(()=>{if(l)return a.on("openchange",e),()=>{a.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(v.current),clearTimeout(N.current),_.current=!0,I.current=!1)}},[l,a]),s.useEffect(()=>{if(!l)return;if(!g.current)return;if(!n)return;function e(e){S()&&r(!1,e,"hover")}const t=yt(i.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}},[i.floating,n,r,l,g,S]);const k=s.useCallback(function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const o=Nr(w.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))},[w,r]),D=Wn(()=>{M.current(),x.current=void 0}),C=Wn(()=>{if(E.current){const e=yt(i.floating).body;e.style.pointerEvents="",e.removeAttribute(xr),E.current=!1}}),j=Wn(()=>!!o.current.openEvent&&["click","mousedown"].includes(o.current.openEvent.type));s.useEffect(()=>{if(l&&Ve(i.domReference)){var e;const r=i.domReference;return n&&r.addEventListener("mouseleave",s),null==(e=i.floating)||e.addEventListener("mouseleave",s),p&&r.addEventListener("mousemove",t,{once:!0}),r.addEventListener("mouseenter",t),r.addEventListener("mouseleave",a),()=>{var e;n&&r.removeEventListener("mouseleave",s),null==(e=i.floating)||e.removeEventListener("mouseleave",s),p&&r.removeEventListener("mousemove",t),r.removeEventListener("mouseenter",t),r.removeEventListener("mouseleave",a)}}function t(e){if(clearTimeout(v.current),_.current=!1,u&&!wt(b.current)||f>0&&!Nr(w.current,"open"))return;const t=Nr(w.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(j())return;M.current();const t=yt(i.floating);if(clearTimeout(N.current),I.current=!1,g.current&&o.current.floatingContext){n||clearTimeout(v.current),x.current=g.current({...o.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){C(),D(),j()||k(e,!0,"safe-polygon")}});const r=x.current;return t.addEventListener("mousemove",r),void(M.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!ct(i.floating,e.relatedTarget))&&k(e)}function s(e){j()||o.current.floatingContext&&(null==g.current||g.current({...o.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){C(),D(),j()||k(e)}})(e))}},[i,l,e,u,f,p,k,D,C,r,n,y,m,w,g,o,j]),ar(()=>{var e;if(l&&n&&null!=(e=g.current)&&e.__options.blockPointerEvents&&S()){E.current=!0;const e=i.floating;if(Ve(i.domReference)&&e){var t;const n=yt(i.floating).body;n.setAttribute(xr,"");const r=i.domReference,o=null==m||null==(t=m.nodesRef.current.find(e=>e.id===h))||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=""}}}},[l,n,h,i,m,g,S]),ar(()=>{n||(b.current=void 0,I.current=!1,D(),C())},[n,D,C]),s.useEffect(()=>()=>{D(),clearTimeout(v.current),clearTimeout(N.current),C()},[l,i.domReference,D,C]);const A=s.useMemo(()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function o(){_.current||y.current||r(!0,t,"hover")}u&&!wt(b.current)||n||0===f||I.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(N.current),"touch"===b.current?o():(I.current=!0,N.current=window.setTimeout(o,f)))}}},[u,r,n,y,f]),T=s.useMemo(()=>({onMouseEnter(){clearTimeout(v.current)},onMouseLeave(e){j()||k(e.nativeEvent,!1)}}),[k,j]);return s.useMemo(()=>l?{reference:A,floating:T}:{},[l,A,T])}(_,{move:!1,enabled:!w&&h.includes("hover"),...g&&{handleClose:So()}}),I=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:r,events:o,dataRef:a,elements:i}=e,{enabled:l=!0,visibleOnly:c=!0}=t,d=s.useRef(!1),u=s.useRef(),f=s.useRef(!0);s.useEffect(()=>{if(!l)return;const e=Be(i.domReference);function t(){!n&&Ye(i.domReference)&&i.domReference===lt(yt(i.domReference))&&(d.current=!0)}function r(){f.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}},[i.domReference,n,l]),s.useEffect(()=>{if(l)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(d.current=!0)}},[o,l]),s.useEffect(()=>()=>{clearTimeout(u.current)},[]);const p=s.useMemo(()=>({onPointerDown(e){pt(e.nativeEvent)||(f.current=!1)},onMouseLeave(){d.current=!1},onFocus(e){if(d.current)return;const t=vt(e.nativeEvent);if(c&&Ve(t))try{if(mt()&>())throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!f.current&&!xt(t))return}r(!0,e.nativeEvent,"focus")},onBlur(e){d.current=!1;const t=e.relatedTarget,n=e.nativeEvent,o=Ve(t)&&t.hasAttribute(br("focus-guard"))&&"outside"===t.getAttribute("data-type");u.current=window.setTimeout(()=>{var e;const s=lt(i.domReference?i.domReference.ownerDocument:document);(t||s!==i.domReference)&&(ct(null==(e=a.current.floatingContext)?void 0:e.refs.floating.current,s)||ct(i.domReference,s)||o||r(!1,n,"focus"))})}}),[a,i.domReference,r,c]);return s.useMemo(()=>l?{reference:p}:{},[l,p])}(_,{enabled:!w&&h.includes("focus")}),S=lo(_),k=No(_,{role:"tooltip"}),{getReferenceProps:D,getFloatingProps:j}=mo([E,M,I,S,k]),{isMounted:A,styles:T}=Mo(_,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),L={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,C.jsxs)(s.Fragment,{children:[(0,s.isValidElement)(l)&&(0,C.jsx)(s.Fragment,{children:(0,s.cloneElement)(l,{ref:Yo(l.ref,x.setReference),className:Ie(l.props.className),...D()})},"tooltip-reference"),(0,C.jsx)(Yr,{id:u,root:d,children:A&&(0,C.jsxs)("div",{className:Ie("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",L,"max-w-80 w-fit",c),ref:x.setFloating,style:{...N,...T},...j(),children:[(0,C.jsxs)("div",{children:[!!n&&(0,C.jsx)("span",{className:"font-semibold",children:n},"tooltip-title"),!!r&&(0,C.jsx)("div",{className:"font-normal",children:r},"tooltip-content")]}),o&&(0,C.jsx)(mr,{ref:v,context:_,className:Ie("fill-current",O)})]})})]})};function Wo(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Go(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}Zo.displayName="Tooltip";const Ho=e=>Array.isArray(e);function $o(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}function Xo(e){return"string"==typeof e||Array.isArray(e)}function qo(e){const t=[{},{}];return null==e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Jo(e,t,n,r){if("function"==typeof t){const[o,a]=qo(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]=qo(r);t=t(void 0!==n?n:e.custom,o,a)}return t}function Ko(e,t,n){const r=e.getProps();return Jo(r,t,void 0!==n?n:r.custom,e)}const ea=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ta=["initial",...ea];function na(e){let t;return()=>(void 0===t&&(t=e()),t)}const ra=na(()=>void 0!==window.ScrollTimeline);class oa{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>"finished"in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map(n=>ra()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0);return()=>{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class aa extends oa{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function ia(e,t){return e?e[t]||e.default||e:void 0}const sa=2e4;function la(e){let t=0,n=e.next(t);for(;!n.done&&t<sa;)t+=50,n=e.next(t);return t>=sa?1/0:t}function ca(e){return"function"==typeof e}function da(e,t){e.timeline=t,e.onfinish=null}const ua=e=>Array.isArray(e)&&"number"==typeof e[0],fa={linearEasing:void 0};function pa(e,t){const n=na(e);return()=>{var e;return null!==(e=fa[t])&&void 0!==e?e:n()}}const ma=pa(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),ha=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},ga=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(ha(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function wa(e){return Boolean("function"==typeof e&&ma()||!e||"string"==typeof e&&(e in ba||ma())||ua(e)||Array.isArray(e)&&e.every(wa))}const ya=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ba={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ya([0,.65,.55,1]),circOut:ya([.55,0,1,.45]),backIn:ya([.31,.01,.66,-.59]),backOut:ya([.33,1.53,.69,.99])};function va(e,t){return e?"function"==typeof e&&ma()?ga(e,t):ua(e)?ya(e):Array.isArray(e)?e.map(e=>va(e,t)||ba.easeOut):ba[e]:void 0}const xa={x:!1,y:!1};function Na(){return xa.x||xa.y}function _a(e,t){const n=function(e){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Ea(e){return t=>{"touch"===t.pointerType||Na()||e(t)}}const Ma=(e,t)=>!!t&&(e===t||Ma(e,t.parentElement)),Ia=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,Sa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),ka=new WeakSet;function Da(e){return t=>{"Enter"===t.key&&e(t)}}function Ca(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function ja(e){return Ia(e)&&!Na()}const Aa=e=>1e3*e,Ta=e=>e/1e3,La=e=>e,Oa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],za=new Set(Oa),Pa=new Set(["width","height","top","left","right","bottom",...Oa]),Ra=e=>Ho(e)?e[e.length-1]||0:e,Ua=["read","resolveKeyframes","update","preRender","render","postRender"];function Ba(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,i=Ua.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.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{i=e,r?o=!0:(r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,o&&(o=!1,l.process(e)))}};return l}(a),e),{}),{read:s,resolveKeyframes:l,update:c,preRender:d,render:u,postRender:f}=i,p=()=>{const a=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(a-o.timestamp,40),1),o.timestamp=a,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),d.process(o),u.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:Ua.reduce((t,a)=>{const s=i[a];return t[a]=(t,a=!1,i=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(p)),s.schedule(t,a,i)),t},{}),cancel:e=>{for(let t=0;t<Ua.length;t++)i[Ua[t]].cancel(e)},state:o,steps:i}}const{schedule:Fa,cancel:Qa,state:Va,steps:Ya}=Ba("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:La,!0);let Za;function Wa(){Za=void 0}const Ga={now:()=>(void 0===Za&&Ga.set(Va.isProcessing?Va.timestamp:performance.now()),Za),set:e=>{Za=e,queueMicrotask(Wa)}};function Ha(e,t){-1===e.indexOf(t)&&e.push(t)}function $a(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Xa{constructor(){this.subscriptions=[]}add(e){return Ha(this.subscriptions,e),()=>$a(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 qa(e,t){return t?e*(1e3/t):0}const Ja={current:void 0};class Ka{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Ga.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=Ga.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 Xa);const n=this.events[e].add(t);return"change"===e?()=>{n(),Fa.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,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}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()}get(){return Ja.current&&Ja.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Ga.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return qa(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.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ei(e,t){return new Ka(e,t)}function ti(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ei(n))}const ni=e=>Boolean(e&&e.getVelocity);function ri(e,t){const n=e.getValue("willChange");if(function(e){return Boolean(ni(e)&&e.add)}(n))return n.add(t)}const oi=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ai="data-"+oi("framerAppearId");function ii(e){return e.props[ai]}const si=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function li(e,t,n,r){if(e===t&&n===r)return La;return o=>0===o||1===o?o:si(function(e,t,n,r,o){let a,i,s=0;do{i=t+(n-t)/2,a=si(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 ci=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,di=e=>t=>1-e(1-t),ui=li(.33,1.53,.69,.99),fi=di(ui),pi=ci(fi),mi=e=>(e*=2)<1?.5*fi(e):.5*(2-Math.pow(2,-10*(e-1))),hi=e=>1-Math.sin(Math.acos(e)),gi=di(hi),wi=ci(hi),yi=e=>/^0[^.\s]+$/u.test(e);function bi(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||yi(e)}const vi=(e,t,n)=>n>t?t:n<e?e:n,xi={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Ni={...xi,transform:e=>vi(0,1,e)},_i={...xi,default:1},Ei=e=>Math.round(1e5*e)/1e5,Mi=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,Ii=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Si=(e,t)=>n=>Boolean("string"==typeof n&&Ii.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),ki=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,a,i,s]=r.match(Mi);return{[e]:parseFloat(o),[t]:parseFloat(a),[n]:parseFloat(i),alpha:void 0!==s?parseFloat(s):1}},Di={...xi,transform:e=>Math.round((e=>vi(0,255,e))(e))},Ci={test:Si("rgb","red"),parse:ki("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Di.transform(e)+", "+Di.transform(t)+", "+Di.transform(n)+", "+Ei(Ni.transform(r))+")"},ji={test:Si("#"),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:Ci.transform},Ai=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Ti=Ai("deg"),Li=Ai("%"),Oi=Ai("px"),zi=Ai("vh"),Pi=Ai("vw"),Ri={...Li,parse:e=>Li.parse(e)/100,transform:e=>Li.transform(100*e)},Ui={test:Si("hsl","hue"),parse:ki("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Li.transform(Ei(t))+", "+Li.transform(Ei(n))+", "+Ei(Ni.transform(r))+")"},Bi={test:e=>Ci.test(e)||ji.test(e)||Ui.test(e),parse:e=>Ci.test(e)?Ci.parse(e):Ui.test(e)?Ui.parse(e):ji.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Ci.transform(e):Ui.transform(e)},Fi=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Qi="number",Vi="color",Yi=/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 Zi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let a=0;const i=t.replace(Yi,e=>(Bi.test(e)?(r.color.push(a),o.push(Vi),n.push(Bi.parse(e))):e.startsWith("var(")?(r.var.push(a),o.push("var"),n.push(e)):(r.number.push(a),o.push(Qi),n.push(parseFloat(e))),++a,"${}")).split("${}");return{values:n,split:i,indexes:r,types:o}}function Wi(e){return Zi(e).values}function Gi(e){const{split:t,types:n}=Zi(e),r=t.length;return e=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],void 0!==e[a]){const t=n[a];o+=t===Qi?Ei(e[a]):t===Vi?Bi.transform(e[a]):e[a]}return o}}const Hi=e=>"number"==typeof e?0:e,$i={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Mi))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Fi))||void 0===n?void 0:n.length)||0)>0},parse:Wi,createTransformer:Gi,getAnimatableNone:function(e){const t=Wi(e);return Gi(e)(t.map(Hi))}},Xi=new Set(["brightness","contrast","saturate","opacity"]);function qi(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Mi)||[];if(!r)return e;const o=n.replace(r,"");let a=Xi.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+o+")"}const Ji=/\b([a-z-]*)\(.*?\)/gu,Ki={...$i,getAnimatableNone:e=>{const t=e.match(Ji);return t?t.map(qi).join(" "):e}},es={borderWidth:Oi,borderTopWidth:Oi,borderRightWidth:Oi,borderBottomWidth:Oi,borderLeftWidth:Oi,borderRadius:Oi,radius:Oi,borderTopLeftRadius:Oi,borderTopRightRadius:Oi,borderBottomRightRadius:Oi,borderBottomLeftRadius:Oi,width:Oi,maxWidth:Oi,height:Oi,maxHeight:Oi,top:Oi,right:Oi,bottom:Oi,left:Oi,padding:Oi,paddingTop:Oi,paddingRight:Oi,paddingBottom:Oi,paddingLeft:Oi,margin:Oi,marginTop:Oi,marginRight:Oi,marginBottom:Oi,marginLeft:Oi,backgroundPositionX:Oi,backgroundPositionY:Oi},ts={rotate:Ti,rotateX:Ti,rotateY:Ti,rotateZ:Ti,scale:_i,scaleX:_i,scaleY:_i,scaleZ:_i,skew:Ti,skewX:Ti,skewY:Ti,distance:Oi,translateX:Oi,translateY:Oi,translateZ:Oi,x:Oi,y:Oi,z:Oi,perspective:Oi,transformPerspective:Oi,opacity:Ni,originX:Ri,originY:Ri,originZ:Oi},ns={...xi,transform:Math.round},rs={...es,...ts,zIndex:ns,size:Oi,fillOpacity:Ni,strokeOpacity:Ni,numOctaves:ns},os={...rs,color:Bi,backgroundColor:Bi,outlineColor:Bi,fill:Bi,stroke:Bi,borderColor:Bi,borderTopColor:Bi,borderRightColor:Bi,borderBottomColor:Bi,borderLeftColor:Bi,filter:Ki,WebkitFilter:Ki},as=e=>os[e];function is(e,t){let n=as(e);return n!==Ki&&(n=$i),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const ss=new Set(["auto","none","0"]),ls=e=>e===xi||e===Oi,cs=(e,t)=>parseFloat(e.split(", ")[t]),ds=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return cs(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?cs(t[1],e):0}},us=new Set(["x","y","z"]),fs=Oa.filter(e=>!us.has(e)),ps={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-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:ds(4,13),y:ds(5,14)};ps.translateX=ps.x,ps.translateY=ps.y;const ms=new Set;let hs=!1,gs=!1;function ws(){if(gs){const e=Array.from(ms).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 fs.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])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}gs=!1,hs=!1,ms.forEach(e=>e.complete()),ms.clear()}function ys(){ms.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(gs=!0)})}class bs{constructor(e,t,n,r,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ms.add(this),hs||(hs=!0,Fa.read(ys),Fa.resolveKeyframes(ws))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0: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])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ms.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ms.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let vs=La,xs=La;const Ns=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_s=e=>t=>"string"==typeof t&&t.startsWith(e),Es=_s("--"),Ms=_s("var(--"),Is=e=>!!Ms(e)&&Ss.test(e.split("/*")[0].trim()),Ss=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,ks=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ds(e,t,n=1){xs(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=ks.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const e=a.trim();return Ns(e)?parseFloat(e):e}return Is(o)?Ds(o,t,n+1):o}const Cs=e=>t=>t.test(e),js=[xi,Oi,Li,Ti,Pi,zi,{test:e=>"auto"===e,parse:e=>e}],As=e=>js.find(Cs(e));class Ts extends bs{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(),Is(r))){const o=Ds(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Pa.has(n)||2!==e.length)return;const[r,o]=e,a=As(r),i=As(o);if(a!==i)if(ls(a)&&ls(i))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)bi(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&&!ss.has(t)&&Zi(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=is(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=ps[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(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const a=r.length-1,i=r[a];r[a]=ps[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==i&&void 0===this.finalKeyframe&&(this.finalKeyframe=i),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach(([e,n])=>{t.getValue(e).set(n)}),this.resolveNoneKeyframes()}}const Ls=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!$i.test(e)&&"0"!==e||e.startsWith("url(")));function Os(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=Ls(o,t),s=Ls(a,t);return vs(i===s,`You are trying to animate ${t} from "${o}" to "${a}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${a} via the \`style\` property.`),!(!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||ca(n))&&r)}const zs=e=>null!==e;function Ps(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(zs),a=t&&"loop"!==n&&t%2==1?0:o.length-1;return a&&void 0!==r?r:o[a]}class Rs{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:a="loop",...i}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Ga.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:a,...i},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(ys(),ws()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Ga.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:a,onComplete:i,onUpdate:s,isGenerator:l}=this.options;if(!l&&!Os(e,n,r,o)){if(!a)return s&&s(Ps(e,this.options,t)),i&&i(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}}const Us=(e,t,n)=>e+(t-e)*n;function Bs(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 Fs(e,t){return n=>n>0?t:e}const Qs=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Vs=[ji,Ci,Ui];function Ys(e){const t=(n=e,Vs.find(e=>e.test(n)));var n;if(vs(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Ui&&(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=Bs(s,r,e+1/3),a=Bs(s,r,e),i=Bs(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 Zs=(e,t)=>{const n=Ys(e),r=Ys(t);if(!n||!r)return Fs(e,t);const o={...n};return e=>(o.red=Qs(n.red,r.red,e),o.green=Qs(n.green,r.green,e),o.blue=Qs(n.blue,r.blue,e),o.alpha=Us(n.alpha,r.alpha,e),Ci.transform(o))},Ws=(e,t)=>n=>t(e(n)),Gs=(...e)=>e.reduce(Ws),Hs=new Set(["none","hidden"]);function $s(e,t){return n=>Us(e,t,n)}function Xs(e){return"number"==typeof e?$s:"string"==typeof e?Is(e)?Fs:Bi.test(e)?Zs:Ks:Array.isArray(e)?qs:"object"==typeof e?Bi.test(e)?Zs:Js:Fs}function qs(e,t){const n=[...e],r=n.length,o=e.map((e,n)=>Xs(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function Js(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=Xs(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const Ks=(e,t)=>{const n=$i.createTransformer(t),r=Zi(e),o=Zi(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?Hs.has(e)&&!o.values.length||Hs.has(t)&&!r.values.length?function(e,t){return Hs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):Gs(qs(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){const i=t.types[a],s=e.indexes[i][o[i]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[a]=l,o[i]++}return r}(r,o),o.values),n):(vs(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Fs(e,t))};function el(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Us(e,t,n):Xs(e)(e,t)}function tl(e,t,n){const r=Math.max(t-5,0);return qa(n-e(r),t-r)}const nl=.01,rl=2,ol=.005,al=.5;function il(e,t){return e*Math.sqrt(1-t*t)}const sl=["duration","bounce"],ll=["stiffness","damping","mass"];function cl(e,t){return t.some(t=>void 0!==e[t])}function dl(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:d,duration:u,velocity:f,isResolvedFromDuration:p}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!cl(e,ll)&&cl(e,sl))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,a=2*vi(.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;vs(e<=Aa(10),"Spring duration must be 10 seconds or less");let i=1-t;i=vi(.05,1,i),e=vi(.01,10,Ta(e)),i<1?(o=t=>{const r=t*i,o=r*e;return.001-(r-n)/il(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=il(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=Aa(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);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}({...n,velocity:-Ta(n.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(l*d)),g=i-a,w=Ta(Math.sqrt(l/d)),y=Math.abs(g)<5;let b;if(r||(r=y?nl:rl),o||(o=y?ol:al),h<1){const e=il(w,h);b=t=>{const n=Math.exp(-h*w*t);return i-n*((m+h*w*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===h)b=e=>i-Math.exp(-w*e)*(g+(m+w*g)*e);else{const e=w*Math.sqrt(h*h-1);b=t=>{const n=Math.exp(-h*w*t),r=Math.min(e*t,300);return i-n*((m+h*w*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const v={calculatedDuration:p&&u||null,next:e=>{const t=b(e);if(p)s.done=e>=u;else{let n=0;h<1&&(n=0===e?Aa(m):tl(b,e,t));const a=Math.abs(n)<=r,l=Math.abs(i-t)<=o;s.done=a&&l}return s.value=s.done?i:t,s},toString:()=>{const e=Math.min(la(v),sa),t=ga(t=>v.next(e*t).value,e,30);return e+"ms "+t}};return v}function ul({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:d}){const u=e[0],f={done:!1,value:u},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=u+m,g=void 0===i?h:i(h);g!==h&&(m=g-u);const w=e=>-m*Math.exp(-e/r),y=e=>g+w(e),b=e=>{const t=w(e),n=y(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=dl({keyframes:[f.value,p(f.value)],velocity:tl(y,e,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:d}))};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)}}}const fl=li(.42,0,1,1),pl=li(0,0,.58,1),ml=li(.42,0,.58,1),hl={linear:La,easeIn:fl,easeInOut:ml,easeOut:pl,circIn:hi,circInOut:wi,circOut:gi,backIn:fi,backInOut:pi,backOut:ui,anticipate:mi},gl=e=>{if(ua(e)){xs(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return li(t,n,r,o)}return"string"==typeof e?(xs(void 0!==hl[e],`Invalid easing type '${e}'`),hl[e]):e};function wl({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(gl):gl(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=ha(0,t,r);e.push(Us(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(xs(a===t.length,"Both input and output ranges must be the same 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||el,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]||La:t;a=Gs(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=ha(e[r],e[r+1],n);return s[r](o)};return n?t=>c(vi(e[0],e[a-1],t)):c}(i,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map(()=>c||ml).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(a.value=s(t),a.done=t>=e,a)}}const yl=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Fa.update(t,!0),stop:()=>Qa(t),now:()=>Va.isProcessing?Va.timestamp:Ga.now()}},bl={decay:ul,inertia:ul,tween:wl,keyframes:wl,spring:dl},vl=e=>e/100;class xl extends Rs{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,a=(null==r?void 0:r.KeyframeResolver)||bs;this.resolver=new a(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:a=0}=this.options,i=ca(t)?t:bl[t]||wl;let s,l;i!==wl&&"number"!=typeof e[0]&&(s=Gs(vl,el(e[0],e[1])),e=[0,100]);const c=i({...this.options,keyframes:e});"mirror"===o&&(l=i({...this.options,keyframes:[...e].reverse(),velocity:-a})),null===c.calculatedDuration&&(c.calculatedDuration=la(c));const{calculatedDuration:d}=c,u=d+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:s,calculatedDuration:d,resolvedDuration:u,totalDuration:u*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:a,mapPercentToKeyframes:i,keyframes:s,calculatedDuration:l,totalDuration:c,resolvedDuration:d}=n;if(null===this.startTime)return o.next(0);const{delay:u,repeat:f,repeatType:p,repeatDelay:m,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-u*(this.speed>=0?1:-1),w=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,b=o;if(f){const e=Math.min(this.currentTime,c)/d;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,f+1),Boolean(t%2)&&("reverse"===p?(n=1-n,m&&(n-=m/d)):"mirror"===p&&(b=a)),y=vi(0,1,n)*d}const v=w?{done:!1,value:s[0]}:b.next(y);i&&(v.value=i(v.value));let{done:x}=v;w||null===l||(x=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const N=null===this.holdTime&&("finished"===this.state||"running"===this.state&&x);return N&&void 0!==r&&(v.value=Ps(s,this.options,r)),h&&h(v.value),N&&this.finish(),v}get duration(){const{resolved:e}=this;return e?Ta(e.calculatedDuration):0}get time(){return Ta(this.currentTime)}set time(e){e=Aa(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=Ta(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=yl,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}}const Nl=new Set(["opacity","clipPath","filter","transform"]),_l=na(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),El={anticipate:mi,backInOut:pi,circInOut:wi};class Ml extends Rs{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Ts(o,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:a,motionValue:i,name:s,startTime:l}=this.options;if(!i.owner||!i.owner.current)return!1;if("string"==typeof o&&ma()&&o in El&&(o=El[o]),function(e){return ca(e.type)||"spring"===e.type||!wa(e.ease)}(this.options)){const{onComplete:t,onUpdate:i,motionValue:s,element:l,...c}=this.options,d=function(e,t){const n=new xl({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let a=0;for(;!r.done&&a<2e4;)r=n.sample(a),o.push(r.value),a+=10;return{times:void 0,keyframes:o,duration:a-10,ease:"linear"}}(e,c);1===(e=d.keyframes).length&&(e[1]=e[0]),n=d.duration,r=d.times,o=d.ease,a="keyframes"}const c=function(e,t,n,{delay:r=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=va(s,o);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:"reverse"===i?"alternate":"normal"})}(i.owner.current,s,e,{...this.options,duration:n,times:r,ease:o});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(da(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;i.set(Ps(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:r,type:a,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return Ta(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return Ta(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Aa(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return La;const{animation:n}=t;da(n,e)}else this.pendingTimeline=e;return La}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:a,times:i}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:s,element:l,...c}=this.options,d=new xl({...c,keyframes:n,duration:r,type:o,ease:a,times:i,isGenerator:!0}),u=Aa(this.time);e.setWithVelocity(d.sample(u-10).value,d.sample(u).value,10)}const{onStop:s}=this.options;s&&s(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:a,type:i}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:s,transformTemplate:l}=t.owner.getProps();return _l()&&n&&Nl.has(n)&&!s&&!l&&!r&&"mirror"!==o&&0!==a&&"inertia"!==i}}const Il={type:"spring",stiffness:500,damping:25,restSpeed:10},Sl={type:"keyframes",duration:.8},kl={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Dl=(e,{keyframes:t})=>t.length>2?Sl:za.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Il:kl,Cl=(e,t,n,r={},o,a)=>i=>{const s=ia(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c-=Aa(l);let d={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({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:c,...d}){return!!Object.keys(d).length})(s)||(d={...d,...Dl(e,d)}),d.duration&&(d.duration=Aa(d.duration)),d.repeatDelay&&(d.repeatDelay=Aa(d.repeatDelay)),void 0!==d.from&&(d.keyframes[0]=d.from);let u=!1;if((!1===d.type||0===d.duration&&!d.repeatDelay)&&(d.duration=0,0===d.delay&&(u=!0)),u&&!a&&void 0!==t.get()){const e=Ps(d.keyframes,s);if(void 0!==e)return Fa.update(()=>{d.onUpdate(e),d.onComplete()}),new aa([])}return!a&&Ml.supports(d)?new Ml(d):new xl(d)};function jl({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Al(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var a;let{transition:i=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(i=r);const c=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(a=e.latestValues[t])&&void 0!==a?a:null),o=l[t];if(void 0===o||d&&jl(d,t))continue;const s={delay:n,...ia(i||{},t)};let u=!1;if(window.MotionHandoffAnimation){const n=ii(e);if(n){const e=window.MotionHandoffAnimation(n,t,Fa);null!==e&&(s.startTime=e,u=!0)}}ri(e,t),r.start(Cl(t,r,o,e.shouldReduceMotion&&Pa.has(t)?{type:!1}:s,e,u));const f=r.animation;f&&c.push(f)}return s&&Promise.all(c).then(()=>{Fa.update(()=>{s&&function(e,t){const n=Ko(e,t);let{transitionEnd:r={},transition:o={},...a}=n||{};a={...a,...r};for(const t in a)ti(e,t,Ra(a[t]))}(e,s)})}),c}function Tl(e,t,n={}){var r;const o=Ko(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(a=n.transitionOverride);const i=o?()=>Promise.all(Al(e,o,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:s}=a;return function(e,t,n=0,r=0,o=1,a){const i=[],s=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(Ll).forEach((e,r)=>{e.notify("AnimationStart",t),i.push(Tl(e,t,{...a,delay:n+l(r)}).then(()=>e.notify("AnimationComplete",t)))}),Promise.all(i)}(e,t,o+r,i,s,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[e,t]="beforeChildren"===l?[i,s]:[s,i];return e().then(()=>t())}return Promise.all([i(),s(n.delay)])}function Ll(e,t){return e.sortNodePosition(t)}const Ol=ta.length;function zl(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&zl(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Ol;n++){const r=ta[n],o=e.props[r];(Xo(o)||!1===o)&&(t[r]=o)}return t}const Pl=[...ea].reverse(),Rl=ea.length;function Ul(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=>Tl(e,t,n));r=Promise.all(o)}else if("string"==typeof t)r=Tl(e,t,n);else{const o="function"==typeof t?Ko(e,t,n.custom):t;r=Promise.all(Al(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}(e,t,n)))}(e),n=Ql(),r=!0;const o=t=>(n,r)=>{var o;const a=Ko(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(a){const{transition:e,transitionEnd:t,...r}=a;n={...n,...r,...t}}return n};function a(a){const{props:i}=e,s=zl(e.parent)||{},l=[],c=new Set;let d={},u=1/0;for(let t=0;t<Rl;t++){const f=Pl[t],p=n[f],m=void 0!==i[f]?i[f]:s[f],h=Xo(m),g=f===a?p.isActive:null;!1===g&&(u=t);let w=m===s[f]&&m!==i[f]&&h;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),p.protectedKeys={...d},!p.isActive&&null===g||!m&&!p.prevProp||Go(m)||"boolean"==typeof m)continue;const y=Bl(p.prevProp,m);let b=y||f===a&&p.isActive&&!w&&h||t>u&&h,v=!1;const x=Array.isArray(m)?m:[m];let N=x.reduce(o(f),{});!1===g&&(N={});const{prevResolvedValues:_={}}=p,E={..._,...N},M=t=>{b=!0,c.has(t)&&(v=!0,c.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in E){const t=N[e],n=_[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Ho(t)&&Ho(n)?!$o(t,n):t!==n,r?null!=t?M(e):c.add(e):void 0!==t&&c.has(e)?M(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=N,p.isActive&&(d={...d,...N}),r&&e.blockInitialAnimation&&(b=!1),b&&(!w||!y||v)&&l.push(...x.map(e=>({animation:e,options:{type:f}})))}if(c.size){const t={};c.forEach(n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null}),l.push({animation:t})}let f=Boolean(l.length);return!r||!1!==i.initial&&i.initial!==i.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(l):Promise.resolve()}return{animateChanges:a,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;const i=a(t);for(const e in n)n[e].protectedKeys={};return i},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Ql(),r=!0}}}function Bl(e,t){return"string"==typeof t?t!==e:!!Array.isArray(t)&&!$o(t,e)}function Fl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ql(){return{animate:Fl(!0),whileInView:Fl(),whileHover:Fl(),whileTap:Fl(),whileDrag:Fl(),whileFocus:Fl(),exit:Fl()}}class Vl{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Yl=0;const Zl={animation:{Feature:class extends Vl{constructor(e){super(e),e.animationState||(e.animationState=Ul(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Go(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(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Vl{constructor(){super(...arguments),this.id=Yl++}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;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function Wl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Gl(e){return{point:{x:e.pageX,y:e.pageY}}}function Hl(e,t,n,r){return Wl(e,t,(e=>t=>Ia(t)&&e(t,Gl(t)))(n),r)}const $l=(e,t)=>Math.abs(e-t);class Xl{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Kl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=$l(e.x,t.x),r=$l(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Va;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.lastMoveEventInfo=ql(t,this.transformPagePoint),Fa.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const a=Kl("pointercancel"===e.type?this.lastMoveEventInfo:ql(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Ia(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const a=ql(Gl(e),this.transformPagePoint),{point:i}=a,{timestamp:s}=Va;this.history=[{...i,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,Kl(a,this.history)),this.removeListeners=Gs(Hl(this.contextWindow,"pointermove",this.handlePointerMove),Hl(this.contextWindow,"pointerup",this.handlePointerUp),Hl(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Qa(this.updatePoint)}}function ql(e,t){return t?{point:t(e.point)}:e}function Jl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Kl({point:e},t){return{point:e,delta:Jl(e,tc(t)),offset:Jl(e,ec(t)),velocity:nc(t,.1)}}function ec(e){return e[0]}function tc(e){return e[e.length-1]}function nc(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=tc(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Aa(t)));)n--;if(!r)return{x:0,y:0};const a=Ta(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 rc(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function oc(e){return e.max-e.min}function ac(e,t,n,r=.5){e.origin=r,e.originPoint=Us(t.min,t.max,e.origin),e.scale=oc(n)/oc(t),e.translate=Us(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 ic(e,t,n,r){ac(e.x,t.x,n.x,r?r.originX:void 0),ac(e.y,t.y,n.y,r?r.originY:void 0)}function sc(e,t,n){e.min=n.min+t.min,e.max=e.min+oc(t)}function lc(e,t,n){e.min=t.min-n.min,e.max=e.min+oc(t)}function cc(e,t,n){lc(e.x,t.x,n.x),lc(e.y,t.y,n.y)}function dc(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 uc(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 fc=.35;function pc(e,t,n){return{min:mc(e,t),max:mc(e,n)}}function mc(e,t){return"number"==typeof e?e:e[t]||0}const hc=()=>({x:{min:0,max:0},y:{min:0,max:0}});function gc(e){return[e("x"),e("y")]}function wc({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function yc(e){return void 0===e||1===e}function bc({scale:e,scaleX:t,scaleY:n}){return!yc(e)||!yc(t)||!yc(n)}function vc(e){return bc(e)||xc(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function xc(e){return Nc(e.x)||Nc(e.y)}function Nc(e){return e&&"0%"!==e}function _c(e,t,n){return n+t*(e-n)}function Ec(e,t,n,r,o){return void 0!==o&&(e=_c(e,o,r)),_c(e,n,r)+t}function Mc(e,t=0,n=1,r,o){e.min=Ec(e.min,t,n,r,o),e.max=Ec(e.max,t,n,r,o)}function Ic(e,{x:t,y:n}){Mc(e.x,t.translate,t.scale,t.originPoint),Mc(e.y,n.translate,n.scale,n.originPoint)}const Sc=.999999999999,kc=1.0000000000001;function Dc(e,t){e.min=e.min+t,e.max=e.max+t}function Cc(e,t,n,r,o=.5){Mc(e,t,n,Us(e.min,e.max,o),r)}function jc(e,t){Cc(e.x,t.x,t.scaleX,t.scale,t.originX),Cc(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ac(e,t){return wc(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))}const Tc=({current:e})=>e?e.ownerDocument.defaultView:null,Lc=new WeakMap;class Oc{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.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new Xl(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Gl(e).point)},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?xa[a]?null:(xa[a]=!0,()=>{xa[a]=!1}):xa.x||xa.y?null:(xa.x=xa.y=!0,()=>{xa.x=xa.y=!1}),!this.openDragLock))return;var a;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),gc(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Li.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=oc(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),o&&Fa.postRender(()=>o(e,t)),ri(this.visualElement,"transform");const{animationState:i}=this.visualElement;i&&i.setActive("whileDrag",!0)},onMove:(e,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&&a(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>gc(e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Tc(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Fa.postRender(()=>o(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!zc(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?Us(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Us(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),o.set(a)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&rc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:dc(e.x,n,o),y:dc(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=fc){return!1===e?e=0:!0===e&&(e=fc),{x:pc(e,"left","right"),y:pc(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&gc(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}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!rc(e))return!1;const n=e.current;xs(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Ac(e,n),{scroll:o}=t;return o&&(Dc(r.x,o.offset.x),Dc(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:uc(e.x,t.x),y:uc(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=wc(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:i}=this.getProps(),s=this.constraints||{},l=gc(i=>{if(!zc(i,t,this.currentDirection))return;let l=s&&s[i]||{};a&&(l={min:0,max:0});const c=r?200:1e6,d=r?40:1e7,u={type:"inertia",velocity:n?e[i]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(i,u)});return Promise.all(l).then(i)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return ri(this.visualElement,e),n.start(Cl(e,n,0,t,this.visualElement,!1))}stopAnimation(){gc(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){gc(e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()})}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){gc(t=>{const{drag:n}=this.getProps();if(!zc(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];o.set(e[t]-Us(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!rc(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};gc(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=oc(e),o=oc(t);return o>r?n=ha(t.min,t.max-r,e.min):r>o&&(n=ha(e.min,e.max-o,t.min)),vi(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.resolveConstraints(),gc(t=>{if(!zc(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:a}=this.constraints[t];n.set(Us(o,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;Lc.set(this.visualElement,this);const e=Hl(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();rc(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Fa.read(t);const o=Wl(window,"resize",()=>this.scalePositionWithinConstraints()),a=n.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(gc(t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())});return()=>{o(),e(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:a=fc,dragMomentum:i=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:a,dragMomentum:i}}}function zc(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Pc=e=>(t,n)=>{e&&Fa.postRender(()=>e(t,n))},Rc=(0,s.createContext)(null);function Uc(e=!0){const t=(0,s.useContext)(Rc);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,a=(0,s.useId)();(0,s.useEffect)(()=>{e&&o(a)},[e]);const i=(0,s.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,i]:[!0]}const Bc=(0,s.createContext)({}),Fc=(0,s.createContext)({}),Qc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Vc(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Yc={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Oi.test(e))return e;e=parseFloat(e)}return`${Vc(e,t.target.x)}% ${Vc(e,t.target.y)}%`}},Zc={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=$i.parse(e);if(o.length>5)return r;const a=$i.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=Us(s,l,.5);return"number"==typeof o[2+i]&&(o[2+i]/=c),"number"==typeof o[3+i]&&(o[3+i]/=c),a(o)}},Wc={},{schedule:Gc,cancel:Hc}=Ba(queueMicrotask,!1);class $c extends s.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var a;a=qc,Object.assign(Wc,a),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Qc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,a=n.projection;return a?(a.isPresent=o,r||e.layoutDependency!==t||void 0===t?a.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?a.promote():a.relegate()||Fa.postRender(()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Gc.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;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 Xc(e){const[t,n]=Uc(),r=(0,s.useContext)(Bc);return(0,C.jsx)($c,{...e,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(Fc),isPresent:t,safeToRemove:n})}const qc={borderRadius:{...Yc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Yc,borderTopRightRadius:Yc,borderBottomLeftRadius:Yc,borderBottomRightRadius:Yc,boxShadow:Zc},Jc=(e,t)=>e.depth-t.depth;class Kc{constructor(){this.children=[],this.isDirty=!1}add(e){Ha(this.children,e),this.isDirty=!0}remove(e){$a(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Jc),this.isDirty=!1,this.children.forEach(e)}}function ed(e){const t=ni(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const td=["TopLeft","TopRight","BottomLeft","BottomRight"],nd=td.length,rd=e=>"string"==typeof e?parseFloat(e):e,od=e=>"number"==typeof e||Oi.test(e);function ad(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const id=ld(0,.5,gi),sd=ld(.5,.95,La);function ld(e,t,n){return r=>r<e?0:r>t?1:n(ha(e,t,r))}function cd(e,t){e.min=t.min,e.max=t.max}function dd(e,t){cd(e.x,t.x),cd(e.y,t.y)}function ud(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function fd(e,t,n,r,o){return e=_c(e-=t,1/n,r),void 0!==o&&(e=_c(e,1/o,r)),e}function pd(e,t,[n,r,o],a,i){!function(e,t=0,n=1,r=.5,o,a=e,i=e){if(Li.test(t)&&(t=parseFloat(t),t=Us(i.min,i.max,t/100)-i.min),"number"!=typeof t)return;let s=Us(a.min,a.max,r);e===a&&(s-=t),e.min=fd(e.min,t,n,s,o),e.max=fd(e.max,t,n,s,o)}(e,t[n],t[r],t[o],t.scale,a,i)}const md=["x","scaleX","originX"],hd=["y","scaleY","originY"];function gd(e,t,n,r){pd(e.x,t,md,n?n.x:void 0,r?r.x:void 0),pd(e.y,t,hd,n?n.y:void 0,r?r.y:void 0)}function wd(e){return 0===e.translate&&1===e.scale}function yd(e){return wd(e.x)&&wd(e.y)}function bd(e,t){return e.min===t.min&&e.max===t.max}function vd(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function xd(e,t){return vd(e.x,t.x)&&vd(e.y,t.y)}function Nd(e){return oc(e.x)/oc(e.y)}function _d(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Ed{constructor(){this.members=[]}add(e){Ha(this.members,e),e.scheduleRender()}remove(e){if($a(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){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Md={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Id="undefined"!=typeof window&&void 0!==window.MotionDebug,Sd=["","X","Y","Z"],kd={visibility:"hidden"};let Dd=0;function Cd(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function jd(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=ii(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Fa,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&jd(r)}function Ad({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=Dd++,this.animationId=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.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Id&&(Md.totalNodes=Md.resolvedTargetDeltas=Md.recalculatedProjection=0),this.nodes.forEach(Od),this.nodes.forEach(Qd),this.nodes.forEach(Vd),this.nodes.forEach(zd),Id&&window.MotionDebug.record(Md)},this.resolvedRelativeTargetAt=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 Kc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Xa),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,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:a,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(a||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Ga.now(),r=({timestamp:o})=>{const a=o-n;a>=t&&(Qa(r),e(a-t))};return Fa.read(r,!0),()=>Qa(r)}(r,250),Qc.hasAnimatedSinceResize&&(Qc.hasAnimatedSinceResize=!1,this.nodes.forEach(Fd))})}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&i&&(o||a)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||$d,{onLayoutAnimationStart:a,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!xd(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...ia(o,"layout"),onPlay:a,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Fd(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,Qa(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(Yd),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&&jd(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,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())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Rd);this.isUpdating||this.nodes.forEach(Ud),this.isUpdating=!1,this.nodes.forEach(Bd),this.nodes.forEach(Td),this.nodes.forEach(Ld),this.clearAllSnapshots();const e=Ga.now();Va.delta=vi(0,1e3/60,e-Va.timestamp),Va.timestamp=e,Va.isProcessing=!0,Ya.update.process(Va),Ya.preRender.process(Va),Ya.render.process(Va),Va.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Pd),this.sharedNodes.forEach(Zd)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Fa.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Fa.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}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.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){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&&!yd(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||vc(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)),Jd((r=n).x),Jd(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(eu)){const{scroll:e}=this.root;e&&(Dc(n.x,e.offset.x),Dc(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(dd(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:a}=r;r!==this.root&&o&&a.layoutScroll&&(o.wasRoot&&dd(n,e),Dc(n.x,o.offset.x),Dc(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};dd(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&jc(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),vc(r.latestValues)&&jc(n,r.latestValues)}return vc(this.latestValues)&&jc(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};dd(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!vc(n.latestValues))continue;bc(n.latestValues)&&n.updateSnapshot();const r=hc();dd(r,n.measurePageBox()),gd(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return vc(this.latestValues)&&gd(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!==Va.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:a}=this.options;if(this.layout&&(o||a)){if(this.resolvedRelativeTargetAt=Va.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,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}},cc(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),dd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var i,s,l;if(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,sc(i.x,s.x,l.x),sc(i.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):dd(this.target,this.layout.layoutBox),Ic(this.target,this.targetDelta)):dd(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,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}},cc(this.relativeTargetOrigin,this.target,e.target),dd(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Id&&Md.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!bc(this.parent.latestValues)&&!xc(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Va.timestamp&&(r=!1),r)return;const{layout:o,layoutId:a}=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||!o&&!a)return;dd(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,s=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&&jc(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Ic(e,i)),r&&vc(a.latestValues)&&jc(e,a.latestValues))}t.x<kc&&t.x>Sc&&(t.x=1),t.y<kc&&t.y>Sc&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(ud(this.prevProjectionDelta.x,this.projectionDelta.x),ud(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ic(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===i&&this.treeScale.y===s&&_d(this.projectionDelta.x,this.prevProjectionDelta.x)&&_d(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Id&&Md.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.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){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},a={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 i={x:{min:0,max:0},y:{min:0,max:0}},s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,d=Boolean(s&&!c&&!0===this.options.crossfade&&!this.path.some(Hd));let u;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;Wd(a.x,e.x,n),Wd(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cc(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){Gd(e.x,t.x,n.x,r),Gd(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,i,n),u&&function(e,t){return bd(e.x,t.x)&&bd(e.y,t.y)}(this.relativeTarget,u)&&(this.isProjectionDirty=!1),u||(u={x:{min:0,max:0},y:{min:0,max:0}}),dd(u,this.relativeTarget)),s&&(this.animationValues=o,function(e,t,n,r,o,a){o?(e.opacity=Us(0,void 0!==n.opacity?n.opacity:1,id(r)),e.opacityExit=Us(void 0!==t.opacity?t.opacity:1,0,sd(r))):a&&(e.opacity=Us(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<nd;o++){const a=`border${td[o]}Radius`;let i=ad(t,a),s=ad(n,a);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||od(i)===od(s)?(e[a]=Math.max(Us(rd(i),rd(s),r),0),(Li.test(s)||Li.test(i))&&(e[a]+="%")):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Us(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,d,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Qa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Fa.update(()=>{Qc.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=ni(0)?0:ei(0);return r.start(Cl("",r,1e3,n)),r.animation}(0,0,{...e,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&&Kd(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=oc(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=oc(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}dd(t,n),jc(t,o),ic(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Ed),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(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.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&&Cd("z",e,r,this.animationValues);for(let t=0;t<Sd.length;t++)Cd(`rotate${Sd[t]}`,e,r,this.animationValues),Cd(`skew${Sd[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()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return kd;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=ed(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=ed(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!vc(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const i=a.animationValues||a.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,a=e.y.translate/t.y,i=(null==n?void 0: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,rotateX:o,rotateY:a,skewX:i,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),a&&(r+=`rotateY(${a}deg) `),i&&(r+=`skewX(${i}deg) `),s&&(r+=`skewY(${s}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,i),o&&(r.transform=o(i,r.transform));const{x:s,y:l}=this.projectionDelta;r.transformOrigin=`${100*s.origin}% ${100*l.origin}% 0`,a.animationValues?r.opacity=a===this?null!==(n=null!==(t=i.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r.opacity=a===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const e in Wc){if(void 0===i[e])continue;const{correct:t,applyTo:n}=Wc[e],o="none"===r.transform?i[e]:t(i[e],a);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=a===this?ed(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(Rd),this.root.sharedNodes.clear()}}}function Td(e){e.updateLayout()}function Ld(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;"size"===o?gc(e=>{const r=a?n.measuredBox[e]:n.layoutBox[e],o=oc(r);r.min=t[e].min,r.max=r.min+o}):Kd(o,n.layoutBox,t)&&gc(r=>{const o=a?n.measuredBox[r]:n.layoutBox[r],i=oc(t[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}};ic(i,t,n.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?ic(s,e.applyTransform(r,!0),n.measuredBox):ic(s,t,n.layoutBox);const l=!yd(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={x:{min:0,max:0},y:{min:0,max:0}};cc(i,n.layoutBox,o.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};cc(s,t,a.layoutBox),xd(i,s)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=i,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Od(e){Id&&Md.totalNodes++,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 zd(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Pd(e){e.clearSnapshot()}function Rd(e){e.clearMeasurements()}function Ud(e){e.isLayoutDirty=!1}function Bd(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Fd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Qd(e){e.resolveTargetDelta()}function Vd(e){e.calcProjection()}function Yd(e){e.resetSkewAndRotation()}function Zd(e){e.removeLeadSnapshot()}function Wd(e,t,n){e.translate=Us(t.translate,0,n),e.scale=Us(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gd(e,t,n,r){e.min=Us(t.min,n.min,r),e.max=Us(t.max,n.max,r)}function Hd(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const $d={duration:.45,ease:[.4,0,.1,1]},Xd=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),qd=Xd("applewebkit/")&&!Xd("chrome/")?Math.round:La;function Jd(e){e.min=qd(e.min),e.max=qd(e.max)}function Kd(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t){return Math.abs(e-t)<=.2}(Nd(t),Nd(n))}function eu(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const tu=Ad({attachResizeListener:(e,t)=>Wl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),nu={current:void 0},ru=Ad({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nu.current){const e=new tu({});e.mount(window),e.setOptions({layoutScroll:!0}),nu.current=e}return nu.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),ou={pan:{Feature:class extends Vl{constructor(){super(...arguments),this.removePointerDownListener=La}onPointerDown(e){this.session=new Xl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Tc(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Pc(e),onStart:Pc(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Fa.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Hl(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 Vl{constructor(e){super(e),this.removeGroupControls=La,this.removeListeners=La,this.controls=new Oc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||La}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ru,MeasureLayout:Xc}};function au(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&Fa.postRender(()=>o(t,Gl(t)))}function iu(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&Fa.postRender(()=>o(t,Gl(t)))}const su=new WeakMap,lu=new WeakMap,cu=e=>{const t=su.get(e.target);t&&t(e)},du=e=>{e.forEach(cu)};const uu={some:0,all:1},fu={inView:{Feature:class extends Vl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();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:uu[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;lu.has(n)||lu.set(n,{});const r=lu.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(du,{root:e,...t})),r[o]}(t);return su.set(e,n),r.observe(e),()=>{su.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(){}}},tap:{Feature:class extends Vl{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,a]=_a(e,n),i=e=>{const r=e.currentTarget;if(!ja(e)||ka.has(r))return;ka.add(r);const a=t(e),i=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),ja(e)&&ka.has(r)&&(ka.delete(r),"function"==typeof a&&a(e,{success:t}))},s=e=>{i(e,n.useGlobalTarget||Ma(r,e.target))},l=e=>{i(e,!1)};window.addEventListener("pointerup",s,o),window.addEventListener("pointercancel",l,o)};return r.forEach(e=>{(function(e){return Sa.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",i,o),e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Da(()=>{if(ka.has(n))return;Ca(n,"down");const e=Da(()=>{Ca(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Ca(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,o),o)}),a}(e,e=>(iu(this.node,e,"Start"),(e,{success:t})=>iu(this.node,e,t?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Vl{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=Gs(Wl(this.node.current,"focus",()=>this.onFocus()),Wl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Vl{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,a]=_a(e,n),i=Ea(e=>{const{target:n}=e,r=t(e);if("function"!=typeof r||!n)return;const a=Ea(e=>{r(e),n.removeEventListener("pointerleave",a)});n.addEventListener("pointerleave",a,o)});return r.forEach(e=>{e.addEventListener("pointerenter",i,o)}),a}(e,e=>(au(this.node,e,"Start"),e=>au(this.node,e,"End"))))}unmount(){}}}},pu={layout:{ProjectionNode:ru,MeasureLayout:Xc}},mu=(0,s.createContext)({strict:!1}),hu=(0,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),gu=(0,s.createContext)({});function wu(e){return Go(e.animate)||ta.some(t=>Xo(e[t]))}function yu(e){return Boolean(wu(e)||e.variants)}function bu(e){return Array.isArray(e)?e.join(" "):e}const vu="undefined"!=typeof window,xu={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"]},Nu={};for(const e in xu)Nu[e]={isEnabled:t=>xu[e].some(e=>!!t[e])};const _u=Symbol.for("motionComponentSymbol");function Eu(e,t,n){return(0,s.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):rc(n)&&(n.current=r))},[t])}const Mu=vu?s.useLayoutEffect:s.useEffect;function Iu(e,t,n,r,o){var a,i;const{visualElement:l}=(0,s.useContext)(gu),c=(0,s.useContext)(mu),d=(0,s.useContext)(Rc),u=(0,s.useContext)(hu).reducedMotion,f=(0,s.useRef)(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:l,props:n,presenceContext:d,blockInitialAnimation:!!d&&!1===d.initial,reducedMotionConfig:u}));const p=f.current,m=(0,s.useContext)(Fc);!p||p.projection||!o||"html"!==p.type&&"svg"!==p.type||function(e,t,n,r){const{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Su(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:Boolean(i)||s&&rc(s),visualElement:e,animationType:"string"==typeof a?a:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(f.current,n,o,m);const h=(0,s.useRef)(!1);(0,s.useInsertionEffect)(()=>{p&&h.current&&p.update(n,d)});const g=n[ai],w=(0,s.useRef)(Boolean(g)&&!(null===(a=window.MotionHandoffIsComplete)||void 0===a?void 0:a.call(window,g))&&(null===(i=window.MotionHasOptimisedAnimation)||void 0===i?void 0:i.call(window,g)));return Mu(()=>{p&&(h.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Gc.render(p.render),w.current&&p.animationState&&p.animationState.animateChanges())}),(0,s.useEffect)(()=>{p&&(!w.current&&p.animationState&&p.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)}),w.current=!1))}),p}function Su(e){if(e)return!1!==e.options.allowProjection?e.projection:Su(e.parent)}function ku({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var a,i;function l(e,a){let i;const l={...(0,s.useContext)(hu),...e,layoutId:Du(e)},{isStatic:c}=l,d=function(e){const{initial:t,animate:n}=function(e,t){if(wu(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Xo(t)?t:void 0,animate:Xo(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,s.useContext)(gu));return(0,s.useMemo)(()=>({initial:t,animate:n}),[bu(t),bu(n)])}(e),u=r(e,c);if(!c&&vu){(0,s.useContext)(mu).strict;const e=function(e){const{drag:t,layout:n}=Nu;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);i=e.MeasureLayout,d.visualElement=Iu(o,u,l,t,e.ProjectionNode)}return(0,C.jsxs)(gu.Provider,{value:d,children:[i&&d.visualElement?(0,C.jsx)(i,{visualElement:d.visualElement,...l}):null,n(o,e,Eu(u,d.visualElement,a),u,c,d.visualElement)]})}e&&function(e){for(const t in e)Nu[t]={...Nu[t],...e[t]}}(e),l.displayName=`motion.${"string"==typeof o?o:`create(${null!==(i=null!==(a=o.displayName)&&void 0!==a?a:o.name)&&void 0!==i?i:""})`}`;const c=(0,s.forwardRef)(l);return c[_u]=o,c}function Du({layoutId:e}){const t=(0,s.useContext)(Bc).id;return t&&void 0!==e?t+"-"+e:e}const Cu=["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 ju(e){return"string"==typeof e&&!e.includes("-")&&!!(Cu.indexOf(e)>-1||/[A-Z]/u.test(e))}function Au(e){const t=(0,s.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Tu=e=>(t,n)=>{const r=(0,s.useContext)(gu),o=(0,s.useContext)(Rc),a=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,a){const i={latestValues:Lu(r,o,a,e),renderState:t()};return n&&(i.onMount=e=>n({props:r,current:e,...i}),i.onUpdate=e=>n(e)),i}(e,t,r,o);return n?a():Au(a)};function Lu(e,t,n,r){const o={},a=r(e,{});for(const e in a)o[e]=ed(a[e]);let{initial:i,animate:s}=e;const l=wu(e),c=yu(e);t&&c&&!l&&!1!==e.inherit&&(void 0===i&&(i=t.initial),void 0===s&&(s=t.animate));let d=!!n&&!1===n.initial;d=d||!1===i;const u=d?s:i;if(u&&"boolean"!=typeof u&&!Go(u)){const t=Array.isArray(u)?u:[u];for(let n=0;n<t.length;n++){const r=Jo(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[d?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const Ou=(e,t)=>t&&"number"==typeof e?t.transform(e):e,zu={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Pu=Oa.length;function Ru(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(za.has(e))i=!0;else if(Es(e))o[e]=n;else{const t=Ou(n,rs[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<Pu;a++){const i=Oa[a],s=e[i];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(i.startsWith("scale")?1:0):0===parseFloat(s),!l||n){const e=Ou(s,rs[i]);l||(o=!1,r+=`${zu[i]||i}(${e}) `),n&&(t[i]=e)}}return 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 Uu={offset:"stroke-dashoffset",array:"stroke-dasharray"},Bu={offset:"strokeDashoffset",array:"strokeDasharray"};function Fu(e,t,n){return"string"==typeof e?e:Oi.transform(t+n*e)}function Qu(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:a,pathLength:i,pathSpacing:s=1,pathOffset:l=0,...c},d,u){if(Ru(e,c,u),d)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(void 0!==o||void 0!==a||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Fu(t,e.x,e.width)} ${Fu(n,e.y,e.height)}`}(m,void 0!==o?o:.5,void 0!==a?a:.5)),void 0!==t&&(f.x=t),void 0!==n&&(f.y=n),void 0!==r&&(f.scale=r),void 0!==i&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const a=o?Uu:Bu;e[a.offset]=Oi.transform(-r);const i=Oi.transform(t),s=Oi.transform(n);e[a.array]=`${i} ${s}`}(f,i,s,l,!1)}const Vu=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Yu(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Zu=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"]);function Wu(e,t,n,r){Yu(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Zu.has(n)?n:oi(n),t.attrs[n])}function Gu(e,{layout:t,layoutId:n}){return za.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!Wc[e]||"opacity"===e)}function Hu(e,t,n){var r;const{style:o}=e,a={};for(const i in o)(ni(o[i])||t.style&&ni(t.style[i])||Gu(i,e)||void 0!==(null===(r=null==n?void 0:n.getValue(i))||void 0===r?void 0:r.liveStyle))&&(a[i]=o[i]);return a}function $u(e,t,n){const r=Hu(e,t,n);for(const n in e)(ni(e[n])||ni(t[n]))&&(r[-1!==Oa.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const Xu=["x","y","width","height","cx","cy","r"],qu={useVisualState:Tu({scrapeMotionValuesFromProps:$u,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let a=!!e.drag;if(!a)for(const e in o)if(za.has(e)){a=!0;break}if(!a)return;let i=!t;if(t)for(let n=0;n<Xu.length;n++){const r=Xu[n];e[r]!==t[r]&&(i=!0)}i&&Fa.read(()=>{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,r),Fa.render(()=>{Qu(r,o,Vu(n.tagName),e.transformTemplate),Wu(n,r)})})}})},Ju={useVisualState:Tu({scrapeMotionValuesFromProps:Hu,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Ku(e,t,n){for(const r in t)ni(t[r])||Gu(r,n)||(e[r]=t[r])}function ef(e,t){const n={},r=function(e,t){const n={};return Ku(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,s.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{}};return Ru(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}const tf=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","ignoreStrict","viewport"]);function nf(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||tf.has(e)}let rf=e=>!nf(e);try{(of=require("@emotion/is-prop-valid").default)&&(rf=e=>e.startsWith("on")?!nf(e):of(e))}catch(e){}var of;function af(e,t,n,r){const o=(0,s.useMemo)(()=>{const n={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Qu(n,t,Vu(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){const t={};Ku(t,e.style,e),o.style={...t,...o.style}}return o}function sf(e=!1){return(t,n,r,{latestValues:o},a)=>{const i=(ju(t)?af:ef)(n,o,a,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(rf(o)||!0===n&&nf(o)||!t&&!nf(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c=t!==s.Fragment?{...l,...i,ref:r}:{},{children:d}=n,u=(0,s.useMemo)(()=>ni(d)?d.get():d,[d]);return(0,s.createElement)(t,{...c,children:u})}}function lf(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return ku({...ju(n)?qu:Ju,preloadedFeatures:e,useRender:sf(r),createVisualElement:t,Component:n})}}const cf={current:null},df={current:!1},uf=[...js,Bi,$i],ff=new WeakMap,pf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class mf{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:a},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=bs,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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=Ga.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Fa.render(this.render,!1,!0))};const{latestValues:s,renderState:l,onUpdate:c}=a;this.onUpdate=c,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=i,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=wu(t),this.isVariantNode=yu(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:d,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in u){const t=u[e];void 0!==s[e]&&ni(t)&&t.set(s[e],!1)}}mount(e){this.current=e,ff.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)),df.current||function(){if(df.current=!0,vu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cf.current=e.matches;e.addListener(t),t()}else cf.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||cf.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){ff.delete(this.current),this.projection&&this.projection.unmount(),Qa(this.notifyUpdate),Qa(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(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}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=za.has(e),r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&Fa.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=t.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),o(),a&&a(),t.owner&&t.stop()})}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 Nu){const t=Nu[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<pf.length;t++){const n=pf[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(ni(o))e.addValue(r,o);else if(ni(a))e.addValue(r,ei(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,ei(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(),this.onUpdate&&this.onUpdate(this)}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=ei(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(Ns(r)||yi(r))?r=parseFloat(r):(o=r,!uf.find(Cs(o))&&$i.test(t)&&(r=is(e,t))),this.setBaseTarget(e,ni(r)?r.get():r)),ni(r)?r.get():r;var o}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=Jo(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||ni(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new Xa),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class hf extends mf{constructor(){super(...arguments),this.KeyframeResolver=Ts}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[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;ni(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}class gf extends hf{constructor(){super(...arguments),this.type="html",this.renderInstance=Yu}readValueFromInstance(e,t){if(za.has(t)){const e=as(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Es(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ac(e,t)}build(e,t,n){Ru(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Hu(e,t,n)}}class wf extends hf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=hc}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(za.has(t)){const e=as(t);return e&&e.default||0}return t=Zu.has(t)?t:oi(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return $u(e,t,n)}build(e,t,n){Qu(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){Wu(e,t,0,r)}mount(e){this.isSVGTag=Vu(e.tagName),super.mount(e)}}const yf=(e,t)=>ju(e)?new wf(t):new gf(t,{allowProjection:e!==s.Fragment}),bf=Wo(lf({...Zl,...fu,...ou,...pu},yf)),vf=(0,s.createContext)({}),xf=vf.Provider,Nf=()=>(0,s.useContext)(vf),_f=(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}}}}},Ef=e=>(0,C.jsx)(bf.path,{className:"stroke-icon-primary",fill:"transparent",strokeWidth:"3",strokeLinecap:"round",...e}),Mf=({className:e})=>{const{toggleOpen:t,setTriggerRef:n}=Nf();return(0,C.jsx)(Po,{ref:n,className:Ie("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",icon:(0,C.jsxs)(bf.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,C.jsx)(Ef,{variants:{closed:{d:"M 2 2.5 L 20 2.5"},open:{d:"M 3 16.5 L 17 2.5"}}}),(0,C.jsx)(Ef,{d:"M 2 9.423 L 20 9.423",variants:{closed:{opacity:1},open:{opacity:0}},transition:{duration:.1}}),(0,C.jsx)(Ef,{variants:{closed:{d:"M 2 16.346 L 20 16.346"},open:{d:"M 3 2.5 L 17 16.346"}}})]})})},If={open:{transition:{staggerChildren:.07,delayChildren:.2}},closed:{transition:{staggerChildren:.05,staggerDirection:-1}}},Sf=({tag:e="a",active:t,icon:n,iconPosition:r="left",className:o,children:a,...i})=>{let l=null,c=null;const d=n&&(0,s.isValidElement)(n)?(0,s.cloneElement)(n,{key:"left-icon",className:Ie("size-5",t?"text-brand-800":"text-icon-secondary",n.props?.className??"")}):null;switch(r){case"left":l=d;break;case"right":c=d;break;default:l=null,c=null}return(0,C.jsx)(Df,{children:(0,C.jsxs)(e,{className:Ie("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:[!!l&&l,(0,C.jsx)("span",{className:"contents",children:a}),!!c&&c]})})},kf={open:{y:0,opacity:1,transition:{y:{stiffness:1e3,velocity:-100}}},closed:{y:50,opacity:0,transition:{y:{stiffness:1e3}}}},Df=({children:e})=>(0,C.jsx)(bf.li,{className:"m-0 p-0 flex items-center justify-start w-full",variants:kf,whileHover:{scale:1.05},whileTap:{scale:.95},children:e}),Cf=({children:e,className:t})=>{const{triggerRef:n,triggerOnRight:r,triggerOnLeft:o}=Nf(),[a,i]=(0,s.useState)(null);return n?(0,C.jsxs)(bf.div,{ref:i,className:Ie("absolute top-0 bottom-0 w-80 h-screen",r?"right-0":"left-0",t),children:[a&&(0,C.jsx)(bf.div,{className:Ie("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:_f(n,a,o??!1)}),(0,C.jsx)(bf.ul,{variants:If,className:Ie("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},jf=({className:e,children:t})=>{const[n,r]=function(...e){const t=(0,s.useRef)(0),[n,r]=(0,s.useState)(e[t.current]),o=(0,s.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,s.useState)(null),i=(0,s.useRef)(null),{height:l}=(e=>{const t=(0,s.useRef)({width:0,height:0});return(0,s.useEffect)(()=>{e.current&&(t.current.width=e.current.offsetWidth,t.current.height=e.current.offsetHeight)},[]),t.current})(i),{isRight:c=!1,isLeft:d=!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,C.jsx)(xf,{value:{isOpen:n,toggleOpen:r,setTriggerRef:e=>{(0,s.startTransition)(()=>{a(e)})},triggerRef:o,triggerOnRight:c,triggerOnLeft:d},children:(0,C.jsx)("div",{className:Ie("size-6 z-[1]",e),children:(0,C.jsx)(bf.nav,{className:"h-full",initial:!1,animate:n?"open":"closed",custom:l,variants:{open:{pointerEvents:"auto"},closed:{pointerEvents:"none"}},ref:i,children:t})})})};jf.displayName="HamburgerMenu",Mf.displayName="HamburgerMenu.Toggle",Cf.displayName="HamburgerMenu.Options",Sf.displayName="HamburgerMenu.Option",jf.Options=Cf,jf.Option=Sf,jf.Toggle=Mf;const Af=Ao("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Tf=(0,s.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:d=!1},u)=>{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,C.jsxs)("span",{className:Ie("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,!d&&{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:u,children:[a?(0,C.jsx)("span",{className:Ie("justify-center flex items-center",h[t]),children:a}):null,(0,C.jsx)("span",{className:"px-1 truncate inline-block",children:e}),l&&(0,C.jsxs)("span",{className:Ie(m,h[t]),onMouseDown:c,role:"button",tabIndex:0,...!i&&{onClick:s},children:[(0,C.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,C.jsx)(Af,{}),(0,C.jsx)("span",{className:"absolute -inset-1"})]})]}):null});Tf.displayName="Badge";const Lf=(0,s.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,C.jsx)(t,{ref:s,className:Ie("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})});function Of({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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"}))}Lf.displayName="Label";const zf=s.forwardRef(Of);var Pf=n(6942),Rf=n.n(Pf);const Uf=n.p+"images/cartflows-symbol.4a28363b.png";var Bf=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 Ff={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 Qf{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(),Vf.setInstanceID(this.getID()),this.RSS_Fetch_Instance=new Yf(this),this.RSS_View_Instance=new Zf(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({},Ff),e),{viewAll:Object.assign(Object.assign({},Ff.viewAll),null==e?void 0:e.viewAll),triggerButton:Object.assign(Object.assign({},Ff.triggerButton),null==e?void 0:e.triggerButton),flyout:Object.assign(Object.assign(Object.assign({},Ff.flyout),null==e?void 0:e.flyout),{innerContent:Object.assign(Object.assign({},Ff.flyout.innerContent),null===(t=null==e?void 0:e.flyout)||void 0===t?void 0:t.innerContent),excerpt:Object.assign(Object.assign({},Ff.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 Bf(this,void 0,void 0,function*(){yield Promise.all(this.getRSSFeedURLs().map(e=>Bf(this,[e],void 0,function*({key:e}){let t=0;t="function"==typeof this.getArgs().notification.getLastPostUnixTime?yield this.getArgs().notification.getLastPostUnixTime(e,this):Vf.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):Vf.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):Vf.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 Vf{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))}}Vf.keys={SESSION_DATA_EXPIRY:"whats-new-cache-expiry",LAST_LATEST_POST:"whats-new-last-unixtime",SESSION:"whats-new-cache"};class Yf{constructor(e){this.data={},this.RSS=e,this.RSS.getRSSFeedURLs().forEach(e=>{const t=JSON.parse(Vf.getSessionData(e.key));t&&t.length&&(this.data[e.key]=t)})}fetchData(){return Bf(this,void 0,void 0,function*(){if(Object.keys(this.data).length)return this.data;const e=this.RSS.getRSSFeedURLs().map(e=>Bf(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)||"{}")})}),Vf.setSessionData(JSON.stringify(this.data[e.key]),e.key)}));return yield Promise.all(e),this.data})}}class Zf{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 Wf=function(){const e=cartflows_admin?.whats_new_rss_feed;return function({selector:e,...t}){const n=(0,s.useRef)(null);(0,s.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 Qf(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,D.__)("What's New?","cartflows"),formatDate:e=>`${e.toLocaleDateString("en-US",{weekday:"long"})} ${e.toLocaleDateString("en-US",{month:"long"})} ${e.getDate()}, ${e.getFullYear()}`}}),(0,i.createElement)("div",{id:"wcf-whats-new-content",className:"[&>a]:p-0.5 [&>a]:pl-0"})},Gf=Ao("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),Hf=Ao("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"}]]);var $f=n(1455),Xf=n.n($f);const qf=(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),Xf()({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 Jf({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const Kf=s.forwardRef(Jf),ep=function(){const e=cartflows_admin?.cf_pro_status,t=(0,D.__)("upgrading to PRO","cartflows"),n=!wcfCartflowsPro()&&"inactive"===e,[r,o]=(0,s.useState)(!1),a=getUpgradeToProUrl();let l="";return n?l=(0,D.__)("activating CartFlows Pro","cartflows"):wcfCartflowsPro()||(l=t),(0,i.createElement)("div",{className:"bg-primary-50 p-3 z-20 relative"},(0,i.createElement)("p",{className:"wcf-main-upgrade-pro-notice text-sm flex justify-center m-0"},(0,D.__)("You're on","cartflows")," ",(0,i.createElement)("span",{className:"font-semibold"},(0,D.__)("CartFlows Free.","cartflows")," "),(0,D.__)("Unlock upsells, order bumps & more revenue by","cartflows")," ",n?(0,i.createElement)("span",{className:"text-brand-600 hover:text-brand-800 font-semibold flex items-center gap-1 cursor-pointer",onClick:()=>{o(!0),qf({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,i.createElement)(zf,{className:`w-4 h-4 stroke-2 ${r?"wcf-processing animate-spin":""} `}),r?(0,D.__)("Activating","cartflows"):l):(0,i.createElement)("a",{href:a,target:"_blank",className:"text-brand-600 hover:text-brand-800 font-semibold flex items-center gap-1",rel:"noreferrer"},l,(0,i.createElement)(Kf,{className:"w-4 h-[18px] stroke-2 text-brand-500"}))))};class tp extends s.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function np({children:e,isPresent:t}){const n=(0,s.useId)(),r=(0,s.useRef)(null),o=(0,s.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,s.useContext)(hu);return(0,s.useInsertionEffect)(()=>{const{width:e,height:i,top:s,left:l}=o.current;if(t||!r.current||!e||!i)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${i}px !important;\n top: ${s}px !important;\n left: ${l}px !important;\n }\n `),()=>{document.head.removeChild(c)}},[t]),(0,C.jsx)(tp,{isPresent:t,childRef:r,sizeRef:o,children:s.cloneElement(e,{ref:r})})}const rp=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:a,mode:i})=>{const l=Au(op),c=(0,s.useId)(),d=(0,s.useCallback)(e=>{l.set(e,!0);for(const e of l.values())if(!e)return;r&&r()},[l,r]),u=(0,s.useMemo)(()=>({id:c,initial:t,isPresent:n,custom:o,onExitComplete:d,register:e=>(l.set(e,!1),()=>l.delete(e))}),a?[Math.random(),d]:[n,d]);return(0,s.useMemo)(()=>{l.forEach((e,t)=>l.set(t,!1))},[n]),s.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),"popLayout"===i&&(e=(0,C.jsx)(np,{isPresent:n,children:e})),(0,C.jsx)(Rc.Provider,{value:u,children:e})};function op(){return new Map}const ap=e=>e.key||"";function ip(e){const t=[];return s.Children.forEach(e,e=>{(0,s.isValidElement)(e)&&t.push(e)}),t}const sp=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1})=>{const[l,c]=Uc(i),d=(0,s.useMemo)(()=>ip(e),[e]),u=i&&!l?[]:d.map(ap),f=(0,s.useRef)(!0),p=(0,s.useRef)(d),m=Au(()=>new Map),[h,g]=(0,s.useState)(d),[w,y]=(0,s.useState)(d);Mu(()=>{f.current=!1,p.current=d;for(let e=0;e<w.length;e++){const t=ap(w[e]);u.includes(t)?m.delete(t):!0!==m.get(t)&&m.set(t,!1)}},[w,u.length,u.join("-")]);const b=[];if(d!==h){let e=[...d];for(let t=0;t<w.length;t++){const n=w[t],r=ap(n);u.includes(r)||(e.splice(t,0,n),b.push(n))}return"wait"===a&&b.length&&(e=b),y(ip(e)),void g(d)}const{forceRender:v}=(0,s.useContext)(Bc);return(0,C.jsx)(C.Fragment,{children:w.map(e=>{const s=ap(e),h=!(i&&!l)&&(d===w||u.includes(s));return(0,C.jsx)(rp,{isPresent:h,initial:!(f.current&&!n)&&void 0,custom:h?void 0:t,presenceAffectsLayout:o,mode:a,onExitComplete:h?void 0:()=>{if(!m.has(s))return;m.set(s,!0);let e=!0;m.forEach(t=>{t||(e=!1)}),e&&(null==v||v(),y(p.current),i&&(null==c||c()),r&&r())},children:e},s)})})},lp=Ao("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),cp=(0,s.createContext)({}),dp=()=>(0,s.useContext)(cp),up=({size:e="md",children:t,className:n})=>(0,C.jsx)(cp.Provider,{value:{size:e},children:(0,C.jsx)("div",{className:Ie("flex flex-col bg-background-primary p-2",n),children:t})});up.displayName="Menu";const fp=({heading:e,arrow:t=!1,showArrowOnHover:n=!1,open:r=!0,onClick:o,children:a,className:i})=>{const[l,c]=(0,s.useState)(r),[d,u]=(0,s.useState)(!1),{size:f}=dp(),p={sm:"text-xs",md:"text-sm"}[f??"md"],m={sm:"size-4",md:"size-5"}[f??"md"],h=()=>{c(!l),o&&o(!l)};return(0,C.jsxs)("div",{children:[!!e&&(0,C.jsxs)("div",{role:"button",tabIndex:0,onClick:h,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&h()},onMouseEnter:()=>n&&u(!0),onMouseLeave:()=>n&&u(!1),className:Ie("text-text-primary bg-transparent cursor-pointer flex justify-between items-center gap-1",p,e?"p-1":"p-0",i),"aria-expanded":l,children:[(0,C.jsx)("span",{className:"text-text-tertiary",children:e}),t&&(0,C.jsx)(bf.span,{className:"flex items-center text-border-strong",initial:"hidden",animate:n?l||d?"visible":"hidden":"visible",exit:"hidden",variants:{visible:{opacity:1},hidden:{opacity:0}},transition:{duration:.15},children:(0,C.jsx)(bf.span,{className:"inline-flex p-1",variants:{open:{rotate:180},closed:{rotate:0}},animate:l?"open":"closed",transition:{duration:.15},children:(0,C.jsx)(lp,{className:Ie("shrink-0",m)})})})]}),(0,C.jsx)(sp,{initial:!1,children:l&&(0,C.jsx)(bf.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})})]})};fp.displayName="Menu.List";const pp=({disabled:e=!1,active:t,onClick:n,children:r,className:o,...a})=>{const{size:i}=dp(),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,C.jsx)("li",{role:"menuitem",tabIndex:e?-1:0,onClick:e?void 0:n,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&n?.()},className:Ie("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})};pp.displayName="Menu.Item";const mp=({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,C.jsx)("li",{className:"m-0 p-0 list-none",role:"separator","aria-hidden":"true",children:(0,C.jsx)("hr",{className:Ie("w-full border-0 border-t border-border-subtle",n,t)})})};mp.displayName="Menu.Separator",up.List=fp,up.Item=pp,up.Separator=mp;const hp=(0,s.createContext)({}),gp=()=>(0,s.useContext)(hp),yp=({placement:e="bottom",offset:t=10,boundary:n="clippingAncestors",children:r,className:o})=>{const[a,i]=(0,s.useState)(!1),{refs:l,floatingStyles:c,context:d}=co({open:a,onOpenChange:i,placement:e,strategy:"fixed",middleware:[Un(t),Fn({boundary:n}),Bn({boundary:n})],whileElementsMounted:Cn}),u=oo(d),f=lo(d),p=No(d,{role:"menu"}),{getReferenceProps:m,getFloatingProps:h}=mo([u,f,p]),{isMounted:g,styles:w}=Mo(d,{duration:150,initial:{opacity:0,scale:.95},open:{opacity:1,scale:1},close:{opacity:0,scale:.95}}),y=()=>i(e=>!e);return(0,C.jsx)(hp.Provider,{value:{refs:l,handleClose:()=>i(!1),isMounted:g,styles:w,floatingStyles:c,getFloatingProps:h},children:(0,C.jsxs)("div",{className:Ie("relative inline-block",o),children:[s.Children.map(r,e=>s.isValidElement(e)&&"DropdownMenu.Trigger"===e?.type?.displayName?(0,s.cloneElement)(e,{ref:l.setReference,onClick:y,...m()}):null),s.Children.toArray(r).filter(e=>s.isValidElement(e)&&["DropdownMenu.Portal","DropdownMenu.ContentWrapper"].includes(e.type.displayName||"")).map(e=>e)]})})};yp.displayName="DropdownMenu";const bp=({children:e,className:t})=>{const{refs:n,floatingStyles:r,getFloatingProps:o,isMounted:a,styles:i}=gp();return a&&(0,C.jsx)("div",{ref:n.setFloating,className:t,style:{...r,...i},...o(),children:s.Children.map(e,e=>"DropdownMenu.Content"===e?.type?.displayName?e:null)})};bp.displayName="DropdownMenu.ContentWrapper";const vp=({children:e,root:t,id:n})=>(0,C.jsx)(Yr,{id:n,root:t,children:e});vp.displayName="DropdownMenu.Portal";const xp=s.forwardRef(({children:e,className:t,...n},r)=>(0,s.isValidElement)(e)?s.cloneElement(e,{className:Ie(t,e.props.className),ref:r,...n}):(0,C.jsx)("div",{ref:r,className:Ie("cursor-pointer",t),role:"button",tabIndex:0,...n,children:e}));xp.displayName="DropdownMenu.Trigger";const Np=({children:e,className:t,...n})=>(0,C.jsx)("div",{className:Ie("border border-solid border-border-subtle rounded-md shadow-lg overflow-hidden",t),children:(0,C.jsx)(up,{...n,children:e})});Np.displayName="DropdownMenu.Content";const _p=e=>(0,C.jsx)(up.List,{...e});_p.displayName="DropdownMenu.List";const Ep=({children:e,as:t=up.Item,...n})=>{const{handleClose:r}=gp();return e?t===s.Fragment&&(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{onClick:Se(e.props?.onClick,r)}):(0,C.jsx)(t,{...n,className:Ie("px-2",n.className),onClick:Se(n.onClick,r),children:e}):null};Ep.displayName="DropdownMenu.Item";const Mp=e=>(0,C.jsx)(up.Separator,{...e});function Ip({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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"}))}Mp.displayName="DropdownMenu.Separator",yp.Trigger=xp,yp.Content=Np,yp.List=_p,yp.Item=Ep,yp.Separator=Mp,yp.Portal=vp,yp.ContentWrapper=bp;const Sp=s.forwardRef(Ip);function kp({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 Dp=s.forwardRef(kp);function Cp({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 jp=s.forwardRef(Cp);function Ap({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Tp=s.forwardRef(Ap),Lp=[{label:(0,D.__)("Funnels","cartflows"),type:"flows",icon:Sp},{label:(0,D.__)("Conversions","cartflows"),type:"conversion",icon:Dp},{label:(0,D.__)("Opt-in","cartflows"),type:"optin",icon:jp}],Op=function({menu:e,isEditorApp:t,activePage:n,activePath:r}){const o=n===e.slug&&r===e.path,a=(0,m.useHistory)(),s=Rf()("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,i.createElement)(yp,{placement:"bottom-start",className:"h-full ss-007"},(0,i.createElement)(yp.Trigger,null,(0,i.createElement)("button",{className:s},(0,i.createElement)("span",{className:"relative h-full inline-flex items-center gap-1"},e.name,(0,i.createElement)(Tp,{className:"w-4 h-4","aria-hidden":"true"})))),(0,i.createElement)(yp.ContentWrapper,null,(0,i.createElement)(yp.Content,{size:"sm"},(0,i.createElement)(yp.List,null,Lp.map(n=>(0,i.createElement)(yp.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:a.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,i.createElement)("span",{className:"flex items-center gap-2"},(0,i.createElement)(n.icon,{className:"w-4 h-4 stroke-[1.5]","aria-hidden":"true"}),n.label)))))))},zp=({label:e="PRO"})=>(0,i.createElement)(Tf,{label:e,size:"xs",type:"pill",className:"!bg-brand-25 !text-brand-600 !border-brand-500/20",disableHover:!0}),Pp=({title:e,children:t,onClick:n,icon:r})=>(0,i.createElement)(Te.Item,{className:"p-1 gap-2"},(0,i.createElement)(Zo,{content:e,placement:"bottom",variant:"dark"},t||(0,i.createElement)(Po,{size:"xs",variant:"ghost",className:"p-0 focus:[box-shadow:none] [box-shadow:none] text-text-primary",onClick:n,icon:r}))),Rp=function(){const[{license_status:e,canvasMode:t}]=u(),n=cartflows_admin?.current_user_can_manage_cartflows,[r,o]=(0,s.useState)({isProcessing:!1,buttonText:""}),{isProcessing:a,buttonText:l}=r,c=[{name:(0,D.__)("Dashboard","cartflows"),slug:cartflows_admin.home_slug,path:"",url:"",visible:!0},{name:(0,D.__)("Funnels","cartflows"),slug:cartflows_admin.home_slug,path:"flows",url:"",visible:!0},{name:(0,D.__)("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,D.__)("Analytics","cartflows"),slug:cartflows_admin.home_slug,path:"analytics",url:"",visible:n},{name:(0,D.__)("Settings","cartflows"),slug:cartflows_admin.home_slug,path:"settings",url:"",visible:n},{name:(0,D.__)("Learn","cartflows"),slug:cartflows_admin.home_slug,path:"learn",url:"",visible:!0},{name:(0,D.__)("Free vs Pro","cartflows"),slug:cartflows_admin.home_slug,path:"free-vs-pro",url:"",visible:!wcfCartflowsPro()}].filter(e=>e.visible),d=(0,m.useHistory)(),f=new URLSearchParams((0,m.useLocation)()?.search),p=f.get("page")?f.get("page"):cartflows_admin.home_slug;let h=f.get("path")?f.get("path"):"";"store-checkout-library"===h&&(h="store-checkout");const g=["wcf-edit-flow","wcf-edit-step"].includes(f.get("action"));let w="",y="",b="";const v=cartflows_admin?.cf_pro_status;wcfCartflowsPro()||"inactive"!==v?wcfCartflowsPro()?wcfCartflowsPro()&&"Activated"!==e?(w=(0,D.__)("Unlicensed","cartflows"),y=cartflows_admin.cf_pro_type):(w=(0,D.__)("Licensed","cartflows"),y=cartflows_admin.cf_pro_type):w=(0,D.__)("Upgrade to Pro","cartflows"):(w=(0,D.__)("Activate CartFlows Pro","cartflows"),b="activate");const x=function(e){if(e.preventDefault(),"activate"===b){const e="cartflows-pro",t="cartflows-pro/cartflows-pro.php",n="cartflows-pro";o({isProcessing:!0,buttonText:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 2 |
(0,D.__)("Activating %s","cartflows"),cartflows_admin.cf_pro_type_inactive)}),qf({slug:e,init:t,name:n}).then(()=>{o({isProcessing:!0,buttonText:(0,D.__)("Successfully Activated","cartflows")}),setTimeout(()=>{o({isProcessing:!1,buttonText:(0,D.__)("Activated","cartflows")})},3e3)}).catch(()=>{o({isProcessing:!1,buttonText:(0,D.__)("Activation Failed","cartflows")})})}b||d.push({pathname:"admin.php",search:`?page=${cartflows_admin.home_slug}&path=settings&tab=license`})},N=e=>`admin.php?page=${e.slug}${""!==e.path?"&path="+e.path:""}${e.url}`,_=e=>Rf()("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,i.createElement)(i.Fragment,null,!wcfCartflowsPro()&&!t&&(0,i.createElement)(ep,null),(0,i.createElement)("div",{className:"wcf-main--nav-menu sticky top-0 sm:top-8 z-20"},(0,i.createElement)(Te,{className:"py-0 px-4 min-h-0 h-14 gap-4 shadow-sm bg-background-primary backdrop-blur-[5px]"},(0,i.createElement)(Te.Left,{className:"gap-3"},(0,i.createElement)(Te.Item,{className:"w-auto h-auto lg:hidden"},(0,i.createElement)(jf,null,(0,i.createElement)(jf.Toggle,{className:"size-6"}),(0,i.createElement)(jf.Options,null,c.map(e=>(0,i.createElement)(jf.Option,{key:e.name,active:p===e.slug&&h===e.path,href:N(e),iconPosition:"left",rel:"noopener noreferrer",tag:"a",target:"_self"},e.name)),!wcfCartflowsPro()&&(0,i.createElement)(jf.Option,{href:getUpgradeToProUrl(),iconPosition:"left",rel:"noopener noreferrer",tag:"a",target:"_blank",className:"text-link-primary gap-1"},(0,D.__)("Upgrade to Pro","cartflows")," ",(0,i.createElement)(Gf,{className:"!size-5"}))))),(0,i.createElement)(Te.Item,null,(0,i.createElement)("img",{className:"block h-8 w-auto",src:Uf,alt:"CartFlows"}))),(0,i.createElement)(Te.Middle,{align:"left",className:"h-full hidden lg:flex"},(0,i.createElement)(Te.Item,null,(0,i.createElement)("nav",{className:"flex items-center gap-4 h-full"},c.map(e=>"analytics"===e.path?(0,i.createElement)(Op,{key:e.name,menu:e,isEditorApp:g,activePage:p,activePath:h}):(e=>{const t=p===e.slug&&h===e.path;return g?(0,i.createElement)("a",{key:e.name,href:N(e),className:_(t)},e.name):(0,i.createElement)(I,{key:e.name,to:{pathname:"admin.php",search:`?page=${e.slug}${""!==e.path?"&path="+e.path:""}${e.url}`},className:_(t)},e.name)})(e)))),!wcfCartflowsPro()&&(0,i.createElement)(Te.Item,null,"inactive"===v?(0,i.createElement)(Po,{icon:a?(0,i.createElement)(zf,{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:x},a?l:w):(0,i.createElement)(Po,{icon:(0,i.createElement)(Gf,{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")},w))),(0,i.createElement)(Te.Right,null,wcfCartflowsPro()&&(0,i.createElement)(Te.Item,null,(0,i.createElement)(Po,{variant:"ghost",className:"p-0 hover:bg-transparent focus:[box-shadow:none] [box-shadow:none]",onClick:t=>{"Activated"!==e&&x(t)},icon:(0,i.createElement)(Tf,{label:w,size:"xs",variant:"Activated"===e?"green":"red"})})),(0,i.createElement)(Te.Item,{className:"flex gap-3 items-center"},(0,i.createElement)(Lf,{size:"xs",variant:"neutral",className:"text-text-tertiary"},`v${cartflows_admin?.cartflows_current_version}`),wcfCartflowsPro()?(0,i.createElement)(zp,{label:y.toUpperCase()}):(0,i.createElement)(Tf,{label:(0,D.__)("Free","cartflows"),className:"text-text-tertiary uppercase",size:"xs",variant:"neutral",type:"pill"})),(0,i.createElement)(Pp,{title:(0,D.__)("Documentation","cartflows"),icon:(0,i.createElement)(Hf,{className:"size-4"}),onClick:()=>window.open(getKbDocUrl("https://cartflows.com/docs/"),"_blank","noopener noreferrer")}),0<cartflows_admin?.whats_new_rss_feed?.length&&(0,i.createElement)(Pp,{title:(0,D.__)("What's New","cartflows")},(0,i.createElement)(Wf,null))))))},Up={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:[]},Bp=(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}},Fp=(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},Qp=(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 d=e.options[t.field_name];return d&&(d.push(t.product_data),e.options[t.field_name]=d),{...e};case"ADD_OPTIN_PRODUCT":case"ADD_OFFER_PRODUCT":return e.options[t.field_name]=t.product_data,{...e};case"ADD_OB_PRODUCT":return Bp(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 Bp(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 u=t.unique_id,f=e.options[t.field_name];return u&&f&&(e.options[t.field_name]=f.filter(function(e){return e.unique_id!==u})),{...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:Fp(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:Fp(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 w=e.options[t.name];return w&&(w.push(t.newGroup),e.options[t.name]=w),{...e};case"ADD_NEW_OB_RULE":const y=e.current_ob[t.name],b=t.group_id;if(y&&b){for(const e of y)if(b===e.group_id){e.rules.push(t.newRule);break}e.current_ob[t.name]=y}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.options[t.name];for(let e=0;e<_.length;e++)if(t.group_id===_[e].group_id){const n=_[e].rules;for(let r=0;r<n.length;r++)if(n[r].rule_id===t.rule_id){_[e].rules.splice(r,1);break}0===_[e].rules.length&&_.splice(e,1)}return e.options[t.name]=_,{...e};case"RESET_OB_RULE_VALUE":const E=e.current_ob[t.name];for(const e of E)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]=E,{...e};case"RESET_RULE_VALUE":const M=e.options[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.options[t.name]=M,{...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}},Vp=(0,s.createContext)(),Yp=({reducer:e,initialState:t,children:n})=>(0,i.createElement)(Vp.Provider,{value:(0,s.useReducer)(e,t)},n),Zp=()=>(0,s.useContext)(Vp);var Wp=n(5901),Gp=function(){return Gp=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},Gp.apply(this,arguments)};function Hp(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],d=s[l+1],u="&"+c+";";n[u]=d,a&&(n["&"+c]=d),r[d]=u}a=!0}return t?{entities:Gp(Gp({},n),t.entities),characters:Gp(Gp({},r),t.characters)}:{entities:n,characters:r}}var $p={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},Xp={};Xp.xml=Hp("lt~<~gt~>~quot~\"~apos~'~amp~&"),Xp.html4=Hp("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~>"),Xp.html5=Hp('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~®',Xp.html4);var qp={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},Jp=String.fromCodePoint||function(e){return String.fromCharCode(Math.floor((e-65536)/1024)+55296,(e-65536)%1024+56320)},Kp=(String.prototype.codePointAt,function(){return Kp=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},Kp.apply(this,arguments)}),em=Kp(Kp({},Xp),{all:Xp.html5}),tm={scope:"body",level:"all"},nm=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+);/g,rm=/&(?:#\d+|#[xX][\da-fA-F]+|[0-9a-zA-Z]+)[;=]?/g,om={xml:{strict:nm,attribute:rm,body:$p.xml},html4:{strict:nm,attribute:rm,body:$p.html4},html5:{strict:nm,attribute:rm,body:$p.html5}},am=Kp(Kp({},om),{all:om.html5}),im=String.fromCharCode,sm=im(65533);function lm(e,t){var n=void 0===t?tm: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=am[o][i],l=em[o].entities,c="attribute"===i,d="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?sm:l>65535?Jp(l):im(qp[l]||l)}}return o}(e,l,c,d)})}function cm(e,t){return"yes"===t&&["checkout","thankyou","upsell","downsell"].includes(e)}function dm(){return(0,i.createElement)("div",null,(0,i.createElement)("span",{className:"wcf-tooltip-heading text-xs font-semibold mb-1 block"},(0,D.__)("Step Editing is Disabled","cartflows")),(0,i.createElement)("div",{className:"wcf-tooltip-desc text-xs font-normal normal-case"},(0,D.__)("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 um(e,t,n){return lm(e.length>t?e.substring(0,n)+"...":e)}cartflows_admin.admin_base_slug,cartflows_admin.admin_base_url;const fm=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 pm(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}let mm=1;const hm=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:mm++;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})}},gm=Object.seal(Object.assign((e,t)=>hm.default(e,t),{success:hm.success.bind(hm),error:hm.error.bind(hm),warning:hm.warning.bind(hm),info:hm.info.bind(hm),custom:hm.custom.bind(hm),dismiss:hm.dismiss.bind(hm),update:hm.update.bind(hm)},{getHistory:hm.history.bind(hm)})),wm={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"}},ym={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"}},bm={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"}},vm={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"}},xm={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"}},Nm={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"}},_m={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"}},Em={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"}},Mm={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"}},Im={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"}},Sm={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"}},km={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"}},Dm={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"}},Cm={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"}},jm={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"}},Am={sm:{0:"grow-0",1:"grow"},md:{0:"md:grow-0",1:"md:grow"},lg:{0:"lg:grow-0",1:"lg:grow"}},Tm={sm:{0:"shrink-0",1:"shrink"},md:{0:"md:shrink-0",1:"md:shrink"},lg:{0:"lg:shrink-0",1:"lg:shrink"}},Lm=(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(" ")},Om=({className:e,cols:t,gap:n,gapX:r,gapY:o,align:a,justify:i,gridFlow:s,colsSubGrid:l=!1,rowsSubGrid:c=!1,autoRows:d=!1,autoCols:u=!1,children:f,...p})=>{const m=Lm(t,wm,1),h=Lm(n,ym,"sm"),g=Lm(r,bm,""),w=Lm(o,vm,""),y=Lm(a,Mm,""),b=Lm(i,Em,""),v=Lm(s,_m,"");return(0,C.jsx)("div",{className:Ie("grid",{"grid-cols-subgrid":l,"grid-rows-subgrid":c,"auto-cols-auto":u,"auto-rows-auto":d},m,h,g,w,y,b,v,e),...p,children:f})};Om.Item=({className:e,children:t,colSpan:n,colStart:r,alignSelf:o,justifySelf:a,...i})=>{const s=Lm(n,xm,0),l=Lm(r,Nm,0),c=Lm(o,Im,""),d=Lm(a,Sm,"");return(0,C.jsx)("div",{className:Ie(s,l,c,d,e),...i,children:t})};const zm=(0,s.createContext)({}),Pm=({containerType:e="flex",gap:t="sm",gapX:n,gapY:r,direction:o,justify:a,align:i,wrap:s,cols:l,className:c,children:d,...u})=>{if("grid"===e)return(0,C.jsx)(zm.Provider,{value:{containerType:e},children:(0,C.jsx)(Om,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:d,align:i,justify:a,...u})});const f=Lm(s,Dm,""),p=Lm(t,ym,"sm"),m=Lm(n,bm,""),h=Lm(r,vm,""),g=Lm(o,km,""),w=Lm(a,Em,""),y=Lm(i,Mm,""),b=Ie("flex",f,p,m,h,g,w,y,c);return(0,C.jsx)(zm.Provider,{value:{containerType:e,cols:l},children:"flex"===e?(0,C.jsx)("div",{className:b,children:d}):(0,C.jsx)(Om,{className:c,gap:t,gapX:n,gapY:r,cols:l,children:d,align:i,justify:a,...u})})},Rm=({grow:e,shrink:t,order:n,alignSelf:r,justifySelf:o,className:a,children:i,...l})=>{const{containerType:c,cols:d}=(0,s.useContext)(zm);if("grid"===c)return(0,C.jsx)(Om.Item,{className:a,alignSelf:r,justifySelf:o,children:i,...l});const u=Lm(r,Im,""),f=Lm(o,Sm,""),p=Lm(e,Am,0),m=Lm(t,Tm,0),h=Lm(n,jm,0),g=Lm(d,Cm,1);return(0,C.jsx)("div",{className:Ie("box-border",p,m,h,u,f,g,a),children:i})};Pm.Item=Rm,Pm.displayName="Container",Rm.displayName="Container.Item";const Um={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},Bm={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},Fm={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"},Qm={2:"tracking-2"},Vm={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"},Ym=(0,s.forwardRef)(function({as:e,children:t,weight:n,size:r,lineHeight:o,letterSpacing:a,color:i="primary",className:s,...l},c){return(0,C.jsx)(e||"p",{ref:c,className:Ie("m-0 p-0",n?Um[n]:"",r?Bm[r]:"",o?Fm[o]:"",a?Qm[a]:"",i?Vm[i]:"",s),...l,children:t})});var Zm=n(442);const Wm=Zm.default||Zm;function Gm({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 Hm=s.forwardRef(Gm);function $m({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 Xm=s.forwardRef($m);function qm({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 6a7.5 7.5 0 1 0 7.5 7.5h-7.5V6Z"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 10.5H21A7.5 7.5 0 0 0 13.5 3v7.5Z"}))}const Jm=s.forwardRef(qm);function Km({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 eh=s.forwardRef(Km);function th({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 nh=s.forwardRef(th);function rh({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 oh=s.forwardRef(rh);function ah({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 ih=s.forwardRef(ah);function sh({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 lh=s.forwardRef(sh),ch=function(e){const{id:t,control_id:n,onClickEvents:r,actions:o,type:a,setShowAbtestUpgradePopup:s=()=>{}}=e,[{license_status:l}]=u();return(0,i.createElement)(yp,{placement:"bottom-end",className:"wcf-step-row__actions-menu"},(0,i.createElement)(yp.Trigger,null,(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"text-text-secondary hover:text-text-primary","aria-label":(0,D.__)("More Options","cartflows")},(0,i.createElement)(lh,{className:"h-5 w-5","aria-hidden":"true"}))),(0,i.createElement)(yp.ContentWrapper,{className:"z-20"},(0,i.createElement)(yp.Content,{size:"sm",className:"wcf-step-actions-menu__dropdown_menu"},(0,i.createElement)(yp.List,null,o.map(e=>{var o;const c=e.text;let d=!1,u=!1;if((!wcfCartflowsPro()&&e?.pro||"abtest"===e.slug&&!wcfCartflowsTypePro())&&(d=!0),wcfCartflowsPro()&&e?.pro&&"Activated"!==l&&(u=!0),"automation"===e.slug&&"downsell"!==a&&"upsell"!==a&&"checkout"!==a)return null;const f=d||u,p=f&&"abtest"===e.slug;return(0,i.createElement)(yp.Item,{key:e?.text,disabled:f&&!p,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:""} ${p?"!cursor-not-allowed !text-text-on-button-disabled hover:!text-text-on-button-disabled hover:!bg-transparent":""}`,onClick:()=>{if(p)s("show");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,i.createElement)("span",{className:"flex items-center gap-2"},function(e){let t="";switch(e){case"clone":t=(0,i.createElement)(Hm,{className:"w-4 h-4 stroke-[1.5]"});break;case"delete":t=(0,i.createElement)(Xm,{className:"w-4 h-4 stroke-[1.5]"});break;case"abtest":t=(0,i.createElement)(Jm,{className:"w-4 h-4 stroke-[1.5]"});break;case"archived":t=(0,i.createElement)(eh,{className:"w-4 h-4 stroke-[1.5]"});break;case"winner":t=(0,i.createElement)(nh,{className:"w-4 h-4 stroke-[1.5]"});break;case"automation":t=(0,i.createElement)(oh,{className:"w-4 h-4 stroke-[1.5]"});break;default:t=(0,i.createElement)(ih,{className:"w-4 h-4 stroke-[1.5]"})}return t}(e.slug),(0,i.createElement)("span",{className:"wcf-step-row__btn-text"},c," ",(d||u)&&(0,i.createElement)("span",{className:"text-brand-600"},(0,D.__)("(Pro)","cartflows")),e?.tag&&(0,i.createElement)("span",{className:"wcf-step-row__btn-text--tag text-brand-brand-600"}," ",e?.tag," "))))})))))},dh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfNzI3XzIzNzEpIj4KPHJlY3QgeD0iOCIgeT0iOCIgd2lkdGg9IjExMiIgaGVpZ2h0PSIxMTIiIHJ4PSI2IiBmaWxsPSIjRjlGQUZCIi8+CjwvZz4KPGNpcmNsZSBjeD0iMTciIGN5PSIxNiIgcj0iMyIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNMTQgMjkuNEMxNCAyNy4xNTk4IDE0IDI2LjAzOTcgMTQuNDM2IDI1LjE4NEMxNC44MTk1IDI0LjQzMTQgMTUuNDMxNCAyMy44MTk1IDE2LjE4NCAyMy40MzZDMTcuMDM5NyAyMyAxOC4xNTk4IDIzIDIwLjQgMjNIMTA3LjZDMTA5Ljg0IDIzIDExMC45NiAyMyAxMTEuODE2IDIzLjQzNkMxMTIuNTY5IDIzLjgxOTUgMTEzLjE4MSAyNC40MzE0IDExMy41NjQgMjUuMTg0QzExNCAyNi4wMzk3IDExNCAyNy4xNTk4IDExNCAyOS40VjU0LjZDMTE0IDU2Ljg0MDIgMTE0IDU3Ljk2MDMgMTEzLjU2NCA1OC44MTZDMTEzLjE4MSA1OS41Njg2IDExMi41NjkgNjAuMTgwNSAxMTEuODE2IDYwLjU2NEMxMTAuOTYgNjEgMTA5Ljg0IDYxIDEwNy42IDYxSDIwLjRDMTguMTU5OCA2MSAxNy4wMzk3IDYxIDE2LjE4NCA2MC41NjRDMTUuNDMxNCA2MC4xODA1IDE0LjgxOTUgNTkuNTY4NiAxNC40MzYgNTguODE2QzE0IDU3Ljk2MDMgMTQgNTYuODQwMiAxNCA1NC42VjI5LjRaIiBmaWxsPSIjRTVFN0VCIi8+CjxjaXJjbGUgY3g9IjkxIiBjeT0iNDIiIHI9IjE1IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNOTAuMDI5MSAzMC45MzI3QzkwLjI3OTQgMjkuOTE4OSA5MS43MjA2IDI5LjkxODkgOTEuOTcwOSAzMC45MzI3TDkzLjgyNTEgMzguNDQzN0M5My45MTQxIDM4LjgwNDMgOTQuMTk1NyAzOS4wODU5IDk0LjU1NjMgMzkuMTc0OUwxMDIuMDY3IDQxLjAyOTFDMTAzLjA4MSA0MS4yNzk0IDEwMy4wODEgNDIuNzIwNiAxMDIuMDY3IDQyLjk3MDlMOTQuNTU2MyA0NC44MjUxQzk0LjE5NTcgNDQuOTE0MSA5My45MTQxIDQ1LjE5NTcgOTMuODI1MSA0NS41NTYzTDkxLjk3MDkgNTMuMDY3M0M5MS43MjA2IDU0LjA4MTEgOTAuMjc5NCA1NC4wODExIDkwLjAyOTEgNTMuMDY3M0w4OC4xNzQ5IDQ1LjU1NjNDODguMDg1OSA0NS4xOTU3IDg3LjgwNDMgNDQuOTE0MSA4Ny40NDM3IDQ0LjgyNTFMNzkuOTMyNyA0Mi45NzA5Qzc4LjkxODkgNDIuNzIwNiA3OC45MTg5IDQxLjI3OTQgNzkuOTMyNyA0MS4wMjkxTDg3LjQ0MzcgMzkuMTc0OUM4Ny44MDQzIDM5LjA4NTkgODguMDg1OSAzOC44MDQzIDg4LjE3NDkgMzguNDQzN0w5MC4wMjkxIDMwLjkzMjdaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAgMzZDMjAgMzUuNDQ3NyAyMC40NDc3IDM1IDIxIDM1SDUzQzUzLjU1MjMgMzUgNTQgMzUuNDQ3NyA1NCAzNkM1NCAzNi41NTIzIDUzLjU1MjMgMzcgNTMgMzdIMjFDMjAuNDQ3NyAzNyAyMCAzNi41NTIzIDIwIDM2WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTIwIDQxQzIwIDQwLjQ0NzcgMjAuNDQ3NyA0MCAyMSA0MEg0NUM0NS41NTIzIDQwIDQ2IDQwLjQ0NzcgNDYgNDFDNDYgNDEuNTUyMyA0NS41NTIzIDQyIDQ1IDQySDIxQzIwLjQ0NzcgNDIgMjAgNDEuNTUyMyAyMCA0MVoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMCA0OEMyMCA0Ni44OTU0IDIxLjA2NiA0NiAyMi4zODEgNDZIMzQuNjE5QzM1LjkzNCA0NiAzNyA0Ni44OTU0IDM3IDQ4QzM3IDQ5LjEwNDYgMzUuOTM0IDUwIDM0LjYxOSA1MEgyMi4zODFDMjEuMDY2IDUwIDIwIDQ5LjEwNDYgMjAgNDhaIiBmaWxsPSIjOUNBM0FGIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTcgMTZDOTcgMTQuODk1NCA5OC4wNjYgMTQgOTkuMzgxIDE0SDExMS42MTlDMTEyLjkzNCAxNCAxMTQgMTQuODk1NCAxMTQgMTZDMTE0IDE3LjEwNDYgMTEyLjkzNCAxOCAxMTEuNjE5IDE4SDk5LjM4MUM5OC4wNjYgMTggOTcgMTcuMTA0NiA5NyAxNloiIGZpbGw9IiM5Q0EzQUYiLz4KPHBhdGggZD0iTTIyIDc5LjRDMjIgNzcuMTU5OCAyMiA3Ni4wMzk3IDIyLjQzNiA3NS4xODRDMjIuODE5NSA3NC40MzE0IDIzLjQzMTQgNzMuODE5NSAyNC4xODQgNzMuNDM2QzI1LjAzOTcgNzMgMjYuMTU5OCA3MyAyOC40IDczSDU0LjZDNTYuODQwMiA3MyA1Ny45NjAzIDczIDU4LjgxNiA3My40MzZDNTkuNTY4NiA3My44MTk1IDYwLjE4MDUgNzQuNDMxNCA2MC41NjQgNzUuMTg0QzYxIDc2LjAzOTcgNjEgNzcuMTU5OCA2MSA3OS40Vjk3LjZDNjEgOTkuODQwMiA2MSAxMDAuOTYgNjAuNTY0IDEwMS44MTZDNjAuMTgwNSAxMDIuNTY5IDU5LjU2ODYgMTAzLjE4MSA1OC44MTYgMTAzLjU2NEM1Ny45NjAzIDEwNCA1Ni44NDAyIDEwNCA1NC42IDEwNEgyOC40QzI2LjE1OTggMTA0IDI1LjAzOTcgMTA0IDI0LjE4NCAxMDMuNTY0QzIzLjQzMTQgMTAzLjE4MSAyMi44MTk1IDEwMi41NjkgMjIuNDM2IDEwMS44MTZDMjIgMTAwLjk2IDIyIDk5Ljg0MDIgMjIgOTcuNlY3OS40WiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDg4QzcwIDg3LjQ0NzcgNzAuNDQ3NyA4NyA3MSA4N0gxMDNDMTAzLjU1MiA4NyAxMDQgODcuNDQ3NyAxMDQgODhDMTA0IDg4LjU1MjMgMTAzLjU1MiA4OSAxMDMgODlINzFDNzAuNDQ3NyA4OSA3MCA4OC41NTIzIDcwIDg4WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDgzQzcwIDgyLjQ0NzcgNzAuNDQ3NyA4MiA3MSA4MkgxMDNDMTAzLjU1MiA4MiAxMDQgODIuNDQ3NyAxMDQgODNDMTA0IDgzLjU1MjMgMTAzLjU1MiA4NCAxMDMgODRINzFDNzAuNDQ3NyA4NCA3MCA4My41NTIzIDcwIDgzWiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDc3QzcwIDc2LjQ0NzcgNzAuNDQ3NyA3NiA3MSA3Nkg4N0M4Ny41NTIzIDc2IDg4IDc2LjQ0NzcgODggNzdDODggNzcuNTUyMyA4Ny41NTIzIDc4IDg3IDc4SDcxQzcwLjQ0NzcgNzggNzAgNzcuNTUyMyA3MCA3N1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03MCA5M0M3MCA5Mi40NDc3IDcwLjQ0NzcgOTIgNzEgOTJIOTVDOTUuNTUyMyA5MiA5NiA5Mi40NDc3IDk2IDkzQzk2IDkzLjU1MjMgOTUuNTUyMyA5NCA5NSA5NEg3MUM3MC40NDc3IDk0IDcwIDkzLjU1MjMgNzAgOTNaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzAgMTAwQzcwIDk4Ljg5NTQgNzEuMDY2IDk4IDcyLjM4MSA5OEg4NC42MTlDODUuOTM0IDk4IDg3IDk4Ljg5NTQgODcgMTAwQzg3IDEwMS4xMDUgODUuOTM0IDEwMiA4NC42MTkgMTAySDcyLjM4MUM3MS4wNjYgMTAyIDcwIDEwMS4xMDUgNzAgMTAwWiIgZmlsbD0iIzlDQTNBRiIvPgo8ZGVmcz4KPGZpbHRlciBpZD0iZmlsdGVyMF9kXzcyN18yMzcxIiB4PSI2IiB5PSI4IiB3aWR0aD0iMTE2IiBoZWlnaHQ9IjExOCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlTW9ycGhvbG9neSByYWRpdXM9IjQiIG9wZXJhdG9yPSJlcm9kZSIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MSIvPgo8ZmVPZmZzZXQgZHk9IjQiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMTYgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MSIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K",uh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfNzI3XzIzNzMpIj4KPHJlY3QgeD0iOCIgeT0iOCIgd2lkdGg9IjExMiIgaGVpZ2h0PSIxMTIiIHJ4PSI2IiBmaWxsPSIjRjlGQUZCIi8+CjwvZz4KPHBhdGggZD0iTTggMTcuNkM4IDE0LjIzOTcgOCAxMi41NTk1IDguNjUzOTYgMTEuMjc2MUM5LjIyOTIgMTAuMTQ3MSAxMC4xNDcxIDkuMjI5MiAxMS4yNzYxIDguNjUzOTZDMTIuNTU5NSA4IDE0LjIzOTcgOCAxNy42IDhIMTEwLjRDMTEzLjc2IDggMTE1LjQ0IDggMTE2LjcyNCA4LjY1Mzk2QzExNy44NTMgOS4yMjkyIDExOC43NzEgMTAuMTQ3MSAxMTkuMzQ2IDExLjI3NjFDMTIwIDEyLjU1OTUgMTIwIDE0LjIzOTcgMTIwIDE3LjZWNDBIOFYxNy42WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMCAyNkMyMCAyNC44OTU0IDIxLjA2NiAyNCAyMi4zODEgMjRIMzQuNjE5QzM1LjkzNCAyNCAzNyAyNC44OTU0IDM3IDI2QzM3IDI3LjEwNDYgMzUuOTM0IDI4IDM0LjYxOSAyOEgyMi4zODFDMjEuMDY2IDI4IDIwIDI3LjEwNDYgMjAgMjZaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAgMzNDMjAgMzIuNDQ3NyAyMC40NDc3IDMyIDIxIDMySDUzQzUzLjU1MjMgMzIgNTQgMzIuNDQ3NyA1NCAzM0M1NCAzMy41NTIzIDUzLjU1MjMgMzQgNTMgMzRIMjFDMjAuNDQ3NyAzNCAyMCAzMy41NTIzIDIwIDMzWiIgZmlsbD0iI0U1RTdFQiIvPgo8Y2lyY2xlIGN4PSIxNyIgY3k9IjE2IiByPSIzIiBmaWxsPSIjRDFENURCIi8+CjxjaXJjbGUgY3g9Ijk2IiBjeT0iMzEiIHI9IjMiIGZpbGw9IiNFNUU3RUIiLz4KPGNpcmNsZSBjeD0iODciIGN5PSIzMSIgcj0iMyIgZmlsbD0iI0U1RTdFQiIvPgo8Y2lyY2xlIGN4PSIxMDUiIGN5PSIzMSIgcj0iMyIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDE2LjAwMDJDNzAgMTUuNDQ4IDcwLjQ0NzcgMTUuMDAwMiA3MSAxNS4wMDAySDc5Qzc5LjU1MjMgMTUuMDAwMiA4MCAxNS40NDggODAgMTYuMDAwMkM4MCAxNi41NTI1IDc5LjU1MjMgMTcuMDAwMiA3OSAxNy4wMDAySDcxQzcwLjQ0NzcgMTcuMDAwMiA3MCAxNi41NTI1IDcwIDE2LjAwMDJaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNODQgMTYuMDAwMkM4NCAxNS40NDggODQuNDQ3NyAxNS4wMDAyIDg1IDE1LjAwMDJIOTNDOTMuNTUyMyAxNS4wMDAyIDk0IDE1LjQ0OCA5NCAxNi4wMDAyQzk0IDE2LjU1MjUgOTMuNTUyMyAxNy4wMDAyIDkzIDE3LjAwMDJIODVDODQuNDQ3NyAxNy4wMDAyIDg0IDE2LjU1MjUgODQgMTYuMDAwMloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05OCAxNkM5OCAxNS40NDc3IDk4LjQ0NzcgMTUgOTkgMTVIMTA3QzEwNy41NTIgMTUgMTA4IDE1LjQ0NzcgMTA4IDE2QzEwOCAxNi41NTIzIDEwNy41NTIgMTcgMTA3IDE3SDk5Qzk4LjQ0NzcgMTcgOTggMTYuNTUyMyA5OCAxNloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZD0iTTIwIDU2QzIwIDU0Ljg5NTQgMjAuODk1NCA1NCAyMiA1NEg2M0M2NC4xMDQ2IDU0IDY1IDU0Ljg5NTQgNjUgNTZWNThDNjUgNTkuMTA0NiA2NC4xMDQ2IDYwIDYzIDYwSDIyQzIwLjg5NTQgNjAgMjAgNTkuMTA0NiAyMCA1OFY1NloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZD0iTTIwIDY2QzIwIDY0Ljg5NTQgMjAuODk1NCA2NCAyMiA2NEg2M0M2NC4xMDQ2IDY0IDY1IDY0Ljg5NTQgNjUgNjZWNjhDNjUgNjkuMTA0NiA2NC4xMDQ2IDcwIDYzIDcwSDIyQzIwLjg5NTQgNzAgMjAgNjkuMTA0NiAyMCA2OFY2NloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZD0iTTIwIDg2QzIwIDg0Ljg5NTQgMjAuODk1NCA4NCAyMiA4NEg2M0M2NC4xMDQ2IDg0IDY1IDg0Ljg5NTQgNjUgODZWOThDNjUgOTkuMTA0NiA2NC4xMDQ2IDEwMCA2MyAxMDBIMjJDMjAuODk1NCAxMDAgMjAgOTkuMTA0NiAyMCA5OFY4NloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0yMCA0OUMyMCA0OC40NDc3IDIwLjQ0NzcgNDggMjEgNDhIMzdDMzcuNTUyMyA0OCAzOCA0OC40NDc3IDM4IDQ5QzM4IDQ5LjU1MjMgMzcuNTUyMyA1MCAzNyA1MEgyMUMyMC40NDc3IDUwIDIwIDQ5LjU1MjMgMjAgNDlaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMjAgNzlDMjAgNzguNDQ3NyAyMC40NDc3IDc4IDIxIDc4SDM3QzM3LjU1MjMgNzggMzggNzguNDQ3NyAzOCA3OUMzOCA3OS41NTIzIDM3LjU1MjMgODAgMzcgODBIMjFDMjAuNDQ3NyA4MCAyMCA3OS41NTIzIDIwIDc5WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNMjAgMTA2QzIwIDEwNC44OTUgMjAuODk1NCAxMDQgMjIgMTA0SDYzQzY0LjEwNDYgMTA0IDY1IDEwNC44OTUgNjUgMTA2VjEwOEM2NSAxMDkuMTA1IDY0LjEwNDYgMTEwIDYzIDExMEgyMkMyMC44OTU0IDExMCAyMCAxMDkuMTA1IDIwIDEwOFYxMDZaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGQ9Ik03NCA5M0M3NCA5MS44OTU0IDc0Ljg5NTQgOTEgNzYgOTFIOTNDOTQuMTA0NiA5MSA5NSA5MS44OTU0IDk1IDkzVjk1Qzk1IDk2LjEwNDYgOTQuMTA0NiA5NyA5MyA5N0g3NkM3NC44OTU0IDk3IDc0IDk2LjEwNDYgNzQgOTVWOTNaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik05NyA5M0M5NyA5MS44OTU0IDk3Ljg5NTQgOTEgOTkgOTFIMTA2QzEwNy4xMDUgOTEgMTA4IDkxLjg5NTQgMTA4IDkzVjk1QzEwOCA5Ni4xMDQ2IDEwNy4xMDUgOTcgMTA2IDk3SDk5Qzk3Ljg5NTQgOTcgOTcgOTYuMTA0NiA5NyA5NVY5M1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZD0iTTc0IDU2Qzc0IDU0Ljg5NTQgNzQuODk1NCA1NCA3NiA1NEgxMDZDMTA3LjEwNSA1NCAxMDggNTQuODk1NCAxMDggNTZWODRDMTA4IDg1LjEwNDYgMTA3LjEwNSA4NiAxMDYgODZINzZDNzQuODk1NCA4NiA3NCA4NS4xMDQ2IDc0IDg0VjU2WiIgZmlsbD0id2hpdGUiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03NiA1M0gxMDZDMTA3LjY1NyA1MyAxMDkgNTQuMzQzMSAxMDkgNTZWODRDMTA5IDg1LjY1NjkgMTA3LjY1NyA4NyAxMDYgODdINzZDNzQuMzQzMSA4NyA3MyA4NS42NTY5IDczIDg0VjU2QzczIDU0LjM0MzEgNzQuMzQzMSA1MyA3NiA1M1pNNzYgNTRDNzQuODk1NCA1NCA3NCA1NC44OTU0IDc0IDU2Vjg0Qzc0IDg1LjEwNDYgNzQuODk1NCA4NiA3NiA4NkgxMDZDMTA3LjEwNSA4NiAxMDggODUuMTA0NiAxMDggODRWNTZDMTA4IDU0Ljg5NTQgMTA3LjEwNSA1NCAxMDYgNTRINzZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzcgODFDNzcgODAuNDQ3NyA3Ny40NDc3IDgwIDc4IDgwSDgzQzgzLjU1MjMgODAgODQgODAuNDQ3NyA4NCA4MUM4NCA4MS41NTIzIDgzLjU1MjMgODIgODMgODJINzhDNzcuNDQ3NyA4MiA3NyA4MS41NTIzIDc3IDgxWiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTc3IDc2Qzc3IDc1LjQ0NzcgNzcuNDQ3NyA3NSA3OCA3NUg4N0M4Ny41NTIzIDc1IDg4IDc1LjQ0NzcgODggNzZDODggNzYuNTUyMyA4Ny41NTIzIDc3IDg3IDc3SDc4Qzc3LjQ0NzcgNzcgNzcgNzYuNTUyMyA3NyA3NloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik04NiA2NkM4NiA2NS40NDc3IDg2LjQ0NzcgNjUgODcgNjVIOTRDOTQuNTUyMyA2NSA5NSA2NS40NDc3IDk1IDY2Qzk1IDY2LjU1MjMgOTQuNTUyMyA2NyA5NCA2N0g4N0M4Ni40NDc3IDY3IDg2IDY2LjU1MjMgODYgNjZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNODYgNjlDODYgNjguNDQ3NyA4Ni40NDc3IDY4IDg3IDY4SDg4Qzg4LjU1MjMgNjggODkgNjguNDQ3NyA4OSA2OUM4OSA2OS41NTIzIDg4LjU1MjMgNzAgODggNzBIODdDODYuNDQ3NyA3MCA4NiA2OS41NTIzIDg2IDY5WiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTc3IDU5Qzc3IDU4LjQ0NzcgNzcuNDQ3NyA1OCA3OCA1OEg4NUM4NS41NTIzIDU4IDg2IDU4LjQ0NzcgODYgNTlDODYgNTkuNTUyMyA4NS41NTIzIDYwIDg1IDYwSDc4Qzc3LjQ0NzcgNjAgNzcgNTkuNTUyMyA3NyA1OVoiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05NyA4MUM5NyA4MC40NDc3IDk3LjQ0NzcgODAgOTggODBIMTA0QzEwNC41NTIgODAgMTA1IDgwLjQ0NzcgMTA1IDgxQzEwNSA4MS41NTIzIDEwNC41NTIgODIgMTA0IDgySDk4Qzk3LjQ0NzcgODIgOTcgODEuNTUyMyA5NyA4MVoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05OSA3NkM5OSA3NS40NDc3IDk5LjQ0NzcgNzUgMTAwIDc1SDEwNEMxMDQuNTUyIDc1IDEwNSA3NS40NDc3IDEwNSA3NkMxMDUgNzYuNTUyMyAxMDQuNTUyIDc3IDEwNCA3N0gxMDBDOTkuNDQ3NyA3NyA5OSA3Ni41NTIzIDk5IDc2WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTk5IDY4Qzk5IDY3LjQ0NzcgOTkuNDQ3NyA2NyAxMDAgNjdIMTA0QzEwNC41NTIgNjcgMTA1IDY3LjQ0NzcgMTA1IDY4QzEwNSA2OC41NTIzIDEwNC41NTIgNjkgMTA0IDY5SDEwMEM5OS40NDc3IDY5IDk5IDY4LjU1MjMgOTkgNjhaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTcgNTlDOTcgNTguNDQ3NyA5Ny40NDc3IDU4IDk4IDU4SDEwNEMxMDQuNTUyIDU4IDEwNSA1OC40NDc3IDEwNSA1OUMxMDUgNTkuNTUyMyAxMDQuNTUyIDYwIDEwNCA2MEg5OEM5Ny40NDc3IDYwIDk3IDU5LjU1MjMgOTcgNTlaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGQ9Ik03NyA2NkM3NyA2NC44OTU0IDc3Ljg5NTQgNjQgNzkgNjRIODJDODMuMTA0NiA2NCA4NCA2NC44OTU0IDg0IDY2VjY5Qzg0IDcwLjEwNDYgODMuMTA0NiA3MSA4MiA3MUg3OUM3Ny44OTU0IDcxIDc3IDcwLjEwNDYgNzcgNjlWNjZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNzMgNDlDNzMgNDguNDQ3NyA3My40NDc3IDQ4IDc0IDQ4SDkwQzkwLjU1MjMgNDggOTEgNDguNDQ3NyA5MSA0OUM5MSA0OS41NTIzIDkwLjU1MjMgNTAgOTAgNTBINzRDNzMuNDQ3NyA1MCA3MyA0OS41NTIzIDczIDQ5WiIgZmlsbD0iI0QxRDVEQiIvPgo8ZGVmcz4KPGZpbHRlciBpZD0iZmlsdGVyMF9kXzcyN18yMzczIiB4PSI2IiB5PSI4IiB3aWR0aD0iMTE2IiBoZWlnaHQ9IjExOCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlTW9ycGhvbG9neSByYWRpdXM9IjQiIG9wZXJhdG9yPSJlcm9kZSIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MyIvPgo8ZmVPZmZzZXQgZHk9IjQiLz4KPGZlR2F1c3NpYW5CbHVyIHN0ZERldmlhdGlvbj0iMyIvPgo8ZmVDb21wb3NpdGUgaW4yPSJoYXJkQWxwaGEiIG9wZXJhdG9yPSJvdXQiLz4KPGZlQ29sb3JNYXRyaXggdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAuMTYgMCIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluMj0iQmFja2dyb3VuZEltYWdlRml4IiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MyIvPgo8ZmVCbGVuZCBtb2RlPSJub3JtYWwiIGluPSJTb3VyY2VHcmFwaGljIiBpbjI9ImVmZmVjdDFfZHJvcFNoYWRvd183MjdfMjM3MyIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K",fh="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfMTAzM18xMDEyNSkiPgo8cmVjdCB4PSI4IiB5PSI4IiB3aWR0aD0iMTEyIiBoZWlnaHQ9IjExMiIgcng9IjYiIGZpbGw9IiNGOUZBRkIiLz4KPC9nPgo8Y2lyY2xlIGN4PSIxNyIgY3k9IjE2IiByPSIzIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNODQgMTZDODQgMTUuNDQ3NyA4NC40NDc3IDE1IDg1IDE1SDkzQzkzLjU1MjMgMTUgOTQgMTUuNDQ3NyA5NCAxNkM5NCAxNi41NTIzIDkzLjU1MjMgMTcgOTMgMTdIODVDODQuNDQ3NyAxNyA4NCAxNi41NTIzIDg0IDE2WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcwIDE2QzcwIDE1LjQ0NzcgNzAuNDQ3NyAxNSA3MSAxNUg3OUM3OS41NTIzIDE1IDgwIDE1LjQ0NzcgODAgMTZDODAgMTYuNTUyMyA3OS41NTIzIDE3IDc5IDE3SDcxQzcwLjQ0NzcgMTcgNzAgMTYuNTUyMyA3MCAxNloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik05OCAxNkM5OCAxNS40NDc3IDk4LjQ0NzcgMTUgOTkgMTVIMTA3QzEwNy41NTIgMTUgMTA4IDE1LjQ0NzcgMTA4IDE2QzEwOCAxNi41NTIzIDEwNy41NTIgMTcgMTA3IDE3SDk5Qzk4LjQ0NzcgMTcgOTggMTYuNTUyMyA5OCAxNloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZD0iTTI3IDUxQzI3IDQ4Ljc5MDkgMjguNzkwOSA0NyAzMSA0N0g5N0M5OS4yMDkxIDQ3IDEwMSA0OC43OTA5IDEwMSA1MVY3OUMxMDEgODEuMjA5MSA5OS4yMDkxIDgzIDk3IDgzSDMxQzI4Ljc5MDkgODMgMjcgODEuMjA5MSAyNyA3OVY1MVoiIGZpbGw9IndoaXRlIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMzEgNDZIOTdDOTkuNzYxNCA0NiAxMDIgNDguMjM4NiAxMDIgNTFWNzlDMTAyIDgxLjc2MTQgOTkuNzYxNCA4NCA5NyA4NEgzMUMyOC4yMzg2IDg0IDI2IDgxLjc2MTQgMjYgNzlWNTFDMjYgNDguMjM4NiAyOC4yMzg2IDQ2IDMxIDQ2Wk0zMSA0N0MyOC43OTA5IDQ3IDI3IDQ4Ljc5MDkgMjcgNTFWNzlDMjcgODEuMjA5MSAyOC43OTA5IDgzIDMxIDgzSDk3Qzk5LjIwOTEgODMgMTAxIDgxLjIwOTEgMTAxIDc5VjUxQzEwMSA0OC43OTA5IDk5LjIwOTEgNDcgOTcgNDdIMzFaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik0zMCA1My4yQzMwIDUyLjA3OTkgMzAgNTEuNTE5OCAzMC4yMTggNTEuMDkyQzMwLjQwOTcgNTAuNzE1NyAzMC43MTU3IDUwLjQwOTcgMzEuMDkyIDUwLjIxOEMzMS41MTk4IDUwIDMyLjA3OTkgNTAgMzMuMiA1MEg1Ni44QzU3LjkyMDEgNTAgNTguNDgwMiA1MCA1OC45MDggNTAuMjE4QzU5LjI4NDMgNTAuNDA5NyA1OS41OTAzIDUwLjcxNTcgNTkuNzgyIDUxLjA5MkM2MCA1MS41MTk4IDYwIDUyLjA3OTkgNjAgNTMuMlY3Ni44QzYwIDc3LjkyMDEgNjAgNzguNDgwMiA1OS43ODIgNzguOTA4QzU5LjU5MDMgNzkuMjg0MyA1OS4yODQzIDc5LjU5MDMgNTguOTA4IDc5Ljc4MkM1OC40ODAyIDgwIDU3LjkyMDEgODAgNTYuOCA4MEgzMy4yQzMyLjA3OTkgODAgMzEuNTE5OCA4MCAzMS4wOTIgNzkuNzgyQzMwLjcxNTcgNzkuNTkwMyAzMC40MDk3IDc5LjI4NDMgMzAuMjE4IDc4LjkwOEMzMCA3OC40ODAyIDMwIDc3LjkyMDEgMzAgNzYuOFY1My4yWiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYzIDYzQzYzIDYyLjQ0NzcgNjMuNDQ3NyA2MiA2NCA2Mkg4OEM4OC41NTIzIDYyIDg5IDYyLjQ0NzcgODkgNjNDODkgNjMuNTUyMyA4OC41NTIzIDY0IDg4IDY0SDY0QzYzLjQ0NzcgNjQgNjMgNjMuNTUyMyA2MyA2M1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02MyA1OUM2MyA1OC40NDc3IDYzLjQ0NzcgNTggNjQgNThIOTRDOTQuNTUyMyA1OCA5NSA1OC40NDc3IDk1IDU5Qzk1IDU5LjU1MjMgOTQuNTUyMyA2MCA5NCA2MEg2NEM2My40NDc3IDYwIDYzIDU5LjU1MjMgNjMgNTlaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjMgNTRDNjMgNTMuNDQ3NyA2My40NDc3IDUzIDY0IDUzSDc2Qzc2LjU1MjMgNTMgNzcgNTMuNDQ3NyA3NyA1NEM3NyA1NC41NTIzIDc2LjU1MjMgNTUgNzYgNTVINjRDNjMuNDQ3NyA1NSA2MyA1NC41NTIzIDYzIDU0WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTgzIDc1QzgzIDc0LjQ0NzcgODMuMzUxOCA3NCA4My43ODU3IDc0SDkzLjIxNDNDOTMuNjQ4MiA3NCA5NCA3NC40NDc3IDk0IDc1Qzk0IDc1LjU1MjMgOTMuNjQ4MiA3NiA5My4yMTQzIDc2SDgzLjc4NTdDODMuMzUxOCA3NiA4MyA3NS41NTIzIDgzIDc1WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYzIDY4QzYzIDY3LjQ0NzcgNjMuNDQ3NyA2NyA2NCA2N0g2NkM2Ni41NTIzIDY3IDY3IDY3LjQ0NzcgNjcgNjhDNjcgNjguNTUyMyA2Ni41NTIzIDY5IDY2IDY5SDY0QzYzLjQ0NzcgNjkgNjMgNjguNTUyMyA2MyA2OFoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02OSA2OEM2OSA2Ny40NDc3IDY5LjQ0NzcgNjcgNzAgNjdINzNDNzMuNTUyMyA2NyA3NCA2Ny40NDc3IDc0IDY4Qzc0IDY4LjU1MjMgNzMuNTUyMyA2OSA3MyA2OUg3MEM2OS40NDc3IDY5IDY5IDY4LjU1MjMgNjkgNjhaIiBmaWxsPSIjOUNBM0FGIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjMgNzVDNjMgNzMuODk1NCA2NC4wNjYgNzMgNjUuMzgxIDczSDc3LjYxOUM3OC45MzQgNzMgODAgNzMuODk1NCA4MCA3NUM4MCA3Ni4xMDQ2IDc4LjkzNCA3NyA3Ny42MTkgNzdINjUuMzgxQzY0LjA2NiA3NyA2MyA3Ni4xMDQ2IDYzIDc1WiIgZmlsbD0iIzlDQTNBRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4IDM3QzQ4IDM2LjQ0NzcgNDguNDQ3NyAzNiA0OSAzNkg3OUM3OS41NTIzIDM2IDgwIDM2LjQ0NzcgODAgMzdDODAgMzcuNTUyMyA3OS41NTIzIDM4IDc5IDM4SDQ5QzQ4LjQ0NzcgMzggNDggMzcuNTUyMyA0OCAzN1oiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01NyAzMkM1NyAzMS40NDc3IDU3LjQ0NzcgMzEgNTggMzFINzBDNzAuNTUyMyAzMSA3MSAzMS40NDc3IDcxIDMyQzcxIDMyLjU1MjMgNzAuNTUyMyAzMyA3MCAzM0g1OEM1Ny40NDc3IDMzIDU3IDMyLjU1MjMgNTcgMzJaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGQ9Ik00NC4wMjYxIDU0LjE4MjdDNDQuMjY2MSA1My4xNTE4IDQ1LjczMzkgNTMuMTUxOCA0NS45NzM5IDU0LjE4MjdMNDcuNDQ4NiA2MC41MTZDNDcuNTYxNCA2MS4wMDAxIDQ4LjAxMjYgNjEuMzI4IDQ4LjUwNzkgNjEuMjg1Nkw1NC45ODY5IDYwLjczMUM1Ni4wNDE1IDYwLjY0MDcgNTYuNDk1MSA2Mi4wMzY3IDU1LjU4ODggNjIuNTgzNkw1MC4wMjEyIDY1Ljk0MzJDNDkuNTk1NiA2Ni4yIDQ5LjQyMzMgNjYuNzMwNCA0OS42MTY2IDY3LjE4ODRMNTIuMTQ2MiA3My4xNzg5QzUyLjU1NzkgNzQuMTU0IDUxLjM3MDUgNzUuMDE2OCA1MC41NzAzIDc0LjMyMzhMNDUuNjU0NiA3MC4wNjY5QzQ1LjI3ODkgNjkuNzQxNSA0NC43MjExIDY5Ljc0MTUgNDQuMzQ1NCA3MC4wNjY5TDM5LjQyOTcgNzQuMzIzOEMzOC42Mjk1IDc1LjAxNjggMzcuNDQyMSA3NC4xNTQgMzcuODUzOCA3My4xNzg5TDQwLjM4MzQgNjcuMTg4NEM0MC41NzY3IDY2LjczMDQgNDAuNDA0NCA2Ni4yIDM5Ljk3ODggNjUuOTQzMkwzNC40MTEyIDYyLjU4MzZDMzMuNTA0OSA2Mi4wMzY3IDMzLjk1ODQgNjAuNjQwNyAzNS4wMTMxIDYwLjczMUw0MS40OTIxIDYxLjI4NTZDNDEuOTg3NCA2MS4zMjggNDIuNDM4NiA2MS4wMDAxIDQyLjU1MTQgNjAuNTE2TDQ0LjAyNjEgNTQuMTgyN1oiIGZpbGw9IiNEMUQ1REIiLz4KPGRlZnM+CjxmaWx0ZXIgaWQ9ImZpbHRlcjBfZF8xMDMzXzEwMTI1IiB4PSI2IiB5PSI4IiB3aWR0aD0iMTE2IiBoZWlnaHQ9IjExOCIgZmlsdGVyVW5pdHM9InVzZXJTcGFjZU9uVXNlIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPgo8ZmVGbG9vZCBmbG9vZC1vcGFjaXR5PSIwIiByZXN1bHQ9IkJhY2tncm91bmRJbWFnZUZpeCIvPgo8ZmVDb2xvck1hdHJpeCBpbj0iU291cmNlQWxwaGEiIHR5cGU9Im1hdHJpeCIgdmFsdWVzPSIwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAxMjcgMCIgcmVzdWx0PSJoYXJkQWxwaGEiLz4KPGZlTW9ycGhvbG9neSByYWRpdXM9IjQiIG9wZXJhdG9yPSJlcm9kZSIgaW49IlNvdXJjZUFscGhhIiByZXN1bHQ9ImVmZmVjdDFfZHJvcFNoYWRvd18xMDMzXzEwMTI1Ii8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIzIi8+CjxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgo8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4xNiAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzEwMzNfMTAxMjUiLz4KPGZlQmxlbmQgbW9kZT0ibm9ybWFsIiBpbj0iU291cmNlR3JhcGhpYyIgaW4yPSJlZmZlY3QxX2Ryb3BTaGFkb3dfMTAzM18xMDEyNSIgcmVzdWx0PSJzaGFwZSIvPgo8L2ZpbHRlcj4KPC9kZWZzPgo8L3N2Zz4K",ph="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTI4IiBoZWlnaHQ9IjEyOCIgdmlld0JveD0iMCAwIDEyOCAxMjgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMjgiIGhlaWdodD0iMTI4IiBmaWxsPSIjRDFENURCIi8+CjxnIGZpbHRlcj0idXJsKCNmaWx0ZXIwX2RfMzI1Ml8xMjc0MDIpIj4KPHJlY3QgeD0iOCIgeT0iOCIgd2lkdGg9IjExMiIgaGVpZ2h0PSIxMTIiIHJ4PSI2IiBmaWxsPSIjRjlGQUZCIi8+CjwvZz4KPGNpcmNsZSBjeD0iMTciIGN5PSIxNiIgcj0iMyIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTg0IDE2Qzg0IDE1LjQ0NzcgODQuNDQ3NyAxNSA4NSAxNUg5M0M5My41NTIzIDE1IDk0IDE1LjQ0NzcgOTQgMTZDOTQgMTYuNTUyMyA5My41NTIzIDE3IDkzIDE3SDg1Qzg0LjQ0NzcgMTcgODQgMTYuNTUyMyA4NCAxNloiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik03MCAxNkM3MCAxNS40NDc3IDcwLjQ0NzcgMTUgNzEgMTVINzlDNzkuNTUyMyAxNSA4MCAxNS40NDc3IDgwIDE2QzgwIDE2LjU1MjMgNzkuNTUyMyAxNyA3OSAxN0g3MUM3MC40NDc3IDE3IDcwIDE2LjU1MjMgNzAgMTZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNOTggMTZDOTggMTUuNDQ3NyA5OC40NDc3IDE1IDk5IDE1SDEwN0MxMDcuNTUyIDE1IDEwOCAxNS40NDc3IDEwOCAxNkMxMDggMTYuNTUyMyAxMDcuNTUyIDE3IDEwNyAxN0g5OUM5OC40NDc3IDE3IDk4IDE2LjU1MjMgOTggMTZaIiBmaWxsPSIjRTVFN0VCIi8+CjxwYXRoIGQ9Ik0yNyA1MUMyNyA0OC43OTA5IDI4Ljc5MDkgNDcgMzEgNDdIOTdDOTkuMjA5MSA0NyAxMDEgNDguNzkwOSAxMDEgNTFWNzlDMTAxIDgxLjIwOTEgOTkuMjA5MSA4MyA5NyA4M0gzMUMyOC43OTA5IDgzIDI3IDgxLjIwOTEgMjcgNzlWNTFaIiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTMxIDQ2SDk3Qzk5Ljc2MTQgNDYgMTAyIDQ4LjIzODYgMTAyIDUxVjc5QzEwMiA4MS43NjE0IDk5Ljc2MTQgODQgOTcgODRIMzFDMjguMjM4NiA4NCAyNiA4MS43NjE0IDI2IDc5VjUxQzI2IDQ4LjIzODYgMjguMjM4NiA0NiAzMSA0NlpNMzEgNDdDMjguNzkwOSA0NyAyNyA0OC43OTA5IDI3IDUxVjc5QzI3IDgxLjIwOTEgMjguNzkwOSA4MyAzMSA4M0g5N0M5OS4yMDkxIDgzIDEwMSA4MS4yMDkxIDEwMSA3OVY1MUMxMDEgNDguNzkwOSA5OS4yMDkxIDQ3IDk3IDQ3SDMxWiIgZmlsbD0iI0U1RTdFQiIvPgo8cGF0aCBkPSJNMzAgNTMuMkMzMCA1Mi4wNzk5IDMwIDUxLjUxOTggMzAuMjE4IDUxLjA5MkMzMC40MDk3IDUwLjcxNTcgMzAuNzE1NyA1MC40MDk3IDMxLjA5MiA1MC4yMThDMzEuNTE5OCA1MCAzMi4wNzk5IDUwIDMzLjIgNTBINTYuOEM1Ny45MjAxIDUwIDU4LjQ4MDIgNTAgNTguOTA4IDUwLjIxOEM1OS4yODQzIDUwLjQwOTcgNTkuNTkwMyA1MC43MTU3IDU5Ljc4MiA1MS4wOTJDNjAgNTEuNTE5OCA2MCA1Mi4wNzk5IDYwIDUzLjJWNzYuOEM2MCA3Ny45MjAxIDYwIDc4LjQ4MDIgNTkuNzgyIDc4LjkwOEM1OS41OTAzIDc5LjI4NDMgNTkuMjg0MyA3OS41OTAzIDU4LjkwOCA3OS43ODJDNTguNDgwMiA4MCA1Ny45MjAxIDgwIDU2LjggODBIMzMuMkMzMi4wNzk5IDgwIDMxLjUxOTggODAgMzEuMDkyIDc5Ljc4MkMzMC43MTU3IDc5LjU5MDMgMzAuNDA5NyA3OS4yODQzIDMwLjIxOCA3OC45MDhDMzAgNzguNDgwMiAzMCA3Ny45MjAxIDMwIDc2LjhWNTMuMloiIGZpbGw9IiNFNUU3RUIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02MyA2M0M2MyA2Mi40NDc3IDYzLjQ0NzcgNjIgNjQgNjJIODhDODguNTUyMyA2MiA4OSA2Mi40NDc3IDg5IDYzQzg5IDYzLjU1MjMgODguNTUyMyA2NCA4OCA2NEg2NEM2My40NDc3IDY0IDYzIDYzLjU1MjMgNjMgNjNaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjMgNTlDNjMgNTguNDQ3NyA2My40NDc3IDU4IDY0IDU4SDk0Qzk0LjU1MjMgNTggOTUgNTguNDQ3NyA5NSA1OUM5NSA1OS41NTIzIDk0LjU1MjMgNjAgOTQgNjBINjRDNjMuNDQ3NyA2MCA2MyA1OS41NTIzIDYzIDU5WiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYzIDU0QzYzIDUzLjQ0NzcgNjMuNDQ3NyA1MyA2NCA1M0g3NkM3Ni41NTIzIDUzIDc3IDUzLjQ0NzcgNzcgNTRDNzcgNTQuNTUyMyA3Ni41NTIzIDU1IDc2IDU1SDY0QzYzLjQ0NzcgNTUgNjMgNTQuNTUyMyA2MyA1NFoiIGZpbGw9IiNEMUQ1REIiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik02MyA2OEM2MyA2Ny40NDc3IDYzLjQ0NzcgNjcgNjQgNjdINjZDNjYuNTUyMyA2NyA2NyA2Ny40NDc3IDY3IDY4QzY3IDY4LjU1MjMgNjYuNTUyMyA2OSA2NiA2OUg2NEM2My40NDc3IDY5IDYzIDY4LjU1MjMgNjMgNjhaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNjkgNjhDNjkgNjcuNDQ3NyA2OS40NDc3IDY3IDcwIDY3SDczQzczLjU1MjMgNjcgNzQgNjcuNDQ3NyA3NCA2OEM3NCA2OC41NTIzIDczLjU1MjMgNjkgNzMgNjlINzBDNjkuNDQ3NyA2OSA2OSA2OC41NTIzIDY5IDY4WiIgZmlsbD0iIzlDQTNBRiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTYzIDc1QzYzIDczLjg5NTQgNjQuMDY2IDczIDY1LjM4MSA3M0g4MS42MTlDODIuOTM0IDczIDg0IDczLjg5NTQgODQgNzVDODQgNzYuMTA0NiA4Mi45MzQgNzcgODEuNjE5IDc3SDY1LjM4MUM2NC4wNjYgNzcgNjMgNzYuMTA0NiA2MyA3NVoiIGZpbGw9IiM5Q0EzQUYiLz4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00OCAzN0M0OCAzNi40NDc3IDQ4LjQ0NzcgMzYgNDkgMzZINzlDNzkuNTUyMyAzNiA4MCAzNi40NDc3IDgwIDM3QzgwIDM3LjU1MjMgNzkuNTUyMyAzOCA3OSAzOEg0OUM0OC40NDc3IDM4IDQ4IDM3LjU1MjMgNDggMzdaIiBmaWxsPSIjRDFENURCIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTcgMzJDNTcgMzEuNDQ3NyA1Ny40NDc3IDMxIDU4IDMxSDcwQzcwLjU1MjMgMzEgNzEgMzEuNDQ3NyA3MSAzMkM3MSAzMi41NTIzIDcwLjU1MjMgMzMgNzAgMzNINThDNTcuNDQ3NyAzMyA1NyAzMi41NTIzIDU3IDMyWiIgZmlsbD0iI0QxRDVEQiIvPgo8cGF0aCBkPSJNNDMuMDY4OCA1Ny4xNzI3QzQzLjYwMDEgNTUuMTk5MyA0Ni4zOTk5IDU1LjE5OTMgNDYuOTMxMiA1Ny4xNzI3TDQ3Ljg4MjYgNjAuNzA2MUM0OC4wNjc5IDYxLjM5NDQgNDguNjA1NiA2MS45MzIxIDQ5LjI5MzkgNjIuMTE3NEw1Mi44MjczIDYzLjA2ODhDNTQuODAwNyA2My42MDAxIDU0LjgwMDcgNjYuMzk5OSA1Mi44MjczIDY2LjkzMTJMNDkuMjkzOSA2Ny44ODI2QzQ4LjYwNTYgNjguMDY3OSA0OC4wNjc5IDY4LjYwNTYgNDcuODgyNiA2OS4yOTM5TDQ2LjkzMTIgNzIuODI3M0M0Ni4zOTk5IDc0LjgwMDcgNDMuNjAwMSA3NC44MDA3IDQzLjA2ODggNzIuODI3M0w0Mi4xMTc0IDY5LjI5MzlDNDEuOTMyMSA2OC42MDU2IDQxLjM5NDQgNjguMDY3OSA0MC43MDYxIDY3Ljg4MjZMMzcuMTcyNyA2Ni45MzEyQzM1LjE5OTMgNjYuMzk5OSAzNS4xOTkzIDYzLjYwMDEgMzcuMTcyNyA2My4wNjg4TDQwLjcwNjEgNjIuMTE3NEM0MS4zOTQ0IDYxLjkzMjEgNDEuOTMyMSA2MS4zOTQ0IDQyLjExNzQgNjAuNzA2MUw0My4wNjg4IDU3LjE3MjdaIiBmaWxsPSIjRDFENURCIi8+CjxkZWZzPgo8ZmlsdGVyIGlkPSJmaWx0ZXIwX2RfMzI1Ml8xMjc0MDIiIHg9IjYiIHk9IjgiIHdpZHRoPSIxMTYiIGhlaWdodD0iMTE4IiBmaWx0ZXJVbml0cz0idXNlclNwYWNlT25Vc2UiIGNvbG9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiI+CjxmZUZsb29kIGZsb29kLW9wYWNpdHk9IjAiIHJlc3VsdD0iQmFja2dyb3VuZEltYWdlRml4Ii8+CjxmZUNvbG9yTWF0cml4IGluPSJTb3VyY2VBbHBoYSIgdHlwZT0ibWF0cml4IiB2YWx1ZXM9IjAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDEyNyAwIiByZXN1bHQ9ImhhcmRBbHBoYSIvPgo8ZmVNb3JwaG9sb2d5IHJhZGl1cz0iNCIgb3BlcmF0b3I9ImVyb2RlIiBpbj0iU291cmNlQWxwaGEiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzMyNTJfMTI3NDAyIi8+CjxmZU9mZnNldCBkeT0iNCIvPgo8ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSIzIi8+CjxmZUNvbXBvc2l0ZSBpbjI9ImhhcmRBbHBoYSIgb3BlcmF0b3I9Im91dCIvPgo8ZmVDb2xvck1hdHJpeCB0eXBlPSJtYXRyaXgiIHZhbHVlcz0iMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMCAwIDAgMC4xNiAwIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW4yPSJCYWNrZ3JvdW5kSW1hZ2VGaXgiIHJlc3VsdD0iZWZmZWN0MV9kcm9wU2hhZG93XzMyNTJfMTI3NDAyIi8+CjxmZUJsZW5kIG1vZGU9Im5vcm1hbCIgaW49IlNvdXJjZUdyYXBoaWMiIGluMj0iZWZmZWN0MV9kcm9wU2hhZG93XzMyNTJfMTI3NDAyIiByZXN1bHQ9InNoYXBlIi8+CjwvZmlsdGVyPgo8L2RlZnM+Cjwvc3ZnPgo=",mh="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=",hh="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=",gh=(0,s.createContext)({}),wh=()=>(0,s.useContext)(gh),yh={open:{opacity:1},exit:{opacity:0}},bh={duration:.2},vh=({open:e,setOpen:t,children:n,trigger:r=null,className:o,exitOnClickOutside:a=!1,exitOnEsc:i=!0,design:l="simple",scrollLock:c=!0})=>{const d=void 0!==e&&void 0!==t,[u,f]=(0,s.useState)(!1),p=(0,s.useRef)(null),m=(0,s.useRef)(null),h=(0,s.useMemo)(()=>d?e:u,[e,u]),g=(0,s.useMemo)(()=>d?t:f,[f,t]),{refs:w,context:y}=co({open:h,onOpenChange:g}),b=oo(y),v=lo(y,{enabled:a||i,escapeKey:i,outsidePress:e=>!!a&&!e?.target?.closest("ul.fui-toast-container")}),x=No(y,{role:"dialog"}),{getFloatingProps:N}=mo([b,v,x]),_=()=>{h||g(!0)},E=(0,s.useCallback)(()=>(0,s.isValidElement)(r)?(0,s.cloneElement)(r,{onClick:Se(_,r?.props?.onClick),ref:w.setReference,"aria-haspopup":"dialog","aria-expanded":h}):"function"==typeof r?r({onClick:_}):null,[r,_,w.setReference,h]);return(0,C.jsxs)(C.Fragment,{children:[E(),(0,C.jsx)(gh.Provider,{value:{open:h,setOpen:g,handleClose:()=>{h&&g(!1)},design:l,context:y,getFloatingProps:N,refs:w,dialogContainerRef:m,dialogRef:p,scrollLock:c,className:o},children:n})]})};vh.displayName="Dialog";const xh=({children:e,className:t})=>{const{open:n,handleClose:r,context:o,getFloatingProps:a,dialogRef:i,scrollLock:s,dialogContainerRef:l,className:c,refs:d}=wh();return(0,C.jsx)(sp,{children:n&&(0,C.jsx)(to,{ref:l,lockScroll:s,className:Ie("z-999999",c),"aria-modal":"true",children:(0,C.jsx)(Jr,{context:o,...d?.reference&&{returnFocus:d.reference},children:(0,C.jsx)(bf.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:yh,role:"dialog","aria-modal":"true",transition:bh,children:(0,C.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,C.jsx)("div",{ref:e=>{e&&(i.current=e,o&&o.refs.setFloating(e))},...a?.(),className:Ie("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:r}):e})})})})})})};xh.displayName="Dialog.Panel";const Nh=({children:e,...t})=>(0,C.jsx)(Yr,{...t,children:e});Nh.displayName="Dialog.Portal";const _h=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=wh();return r?.current?(0,C.jsx)(C.Fragment,{children:(0,cn.createPortal)((0,C.jsx)(sp,{children:n&&(0,C.jsx)(bf.div,{className:Ie("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:yh,transition:bh})}),r.current)}):null};_h.displayName="Dialog.Backdrop";const Eh=({children:e,className:t,...n})=>(0,C.jsx)("div",{className:Ie("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});Eh.displayName="Dialog.Header";const Mh=({children:e,as:t="h3",className:n,...r})=>(0,C.jsx)(t,{className:Ie("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});Mh.displayName="Dialog.Title";const Ih=({children:e,as:t="p",className:n,...r})=>(0,C.jsx)(t,{className:Ie("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});Ih.displayName="Dialog.Description";const Sh=({className:e,...t})=>(0,C.jsx)("button",{className:Ie("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,C.jsx)(Af,{className:"size-4 text-text-primary shrink-0"})}),kh=({children:e,as:t=s.Fragment,...n})=>{const{handleClose:r}=wh();return e?t===s.Fragment?"function"==typeof e?e({close:r}):(0,s.cloneElement)(e,{onClick:r}):(0,C.jsx)(t,{...n,onClick:r,"aria-label":"Close dialog",children:e}):(0,C.jsx)(Sh,{onClick:r,...n})};kh.displayName="Dialog.CloseButton";const Dh=({children:e,className:t,...n})=>(0,C.jsx)("div",{className:Ie("px-5",t),...n,children:e});Dh.displayName="Dialog.Body";const Ch=({children:e,className:t})=>{const{design:n,handleClose:r}=wh();return(0,C.jsx)("div",{className:Ie("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};function jh({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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"}))}Ch.displayName="Dialog.Footer",vh.Panel=xh,vh.Portal=Nh,vh.Title=Mh,vh.Description=Ih,vh.CloseButton=kh,vh.Header=Eh,vh.Body=Dh,vh.Footer=Ch,vh.Backdrop=_h;const Ah=s.forwardRef(jh),Th=e=>(0,i.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:""}`});function Lh(e){if(e)return(0,i.createElement)(vh,{open:e.isOpen,setOpen:t=>{t||e.onClose()},exitOnClickOutside:!1,exitOnEsc:!1,className:"wcf-confirm-popup"},(0,i.createElement)(vh.Panel,{className:"wcf-confirm-popup-wrapper !p-3 !gap-4"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)("div",{className:"flex gap-2.5 p-2"},(0,i.createElement)(Ah,{className:"w-6 h-6 text-support-warning shrink-0 mt-0.5","aria-hidden":"true"}),(0,i.createElement)("div",{className:"flex flex-col gap-1.5 flex-1 min-w-0"},(0,i.createElement)("div",{className:"flex items-center justify-between"},(0,i.createElement)(vh.Title,{className:"!text-lg"},e.title),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)("p",{className:"text-sm text-text-secondary m-0"},e.description))),(0,i.createElement)(vh.Footer,{className:"!p-2 flex gap-3 justify-end"},(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:e.onClose},e.cancelBtnText),(0,i.createElement)(Po,{variant:"primary",size:"md",onClick:e.onConfirm,disabled:e.isLoading},e.isLoading?(0,i.createElement)(Th,{className:"border-white border-r-transparent"}):e.actionBtnText))))}const Oh=(0,s.createContext)();function zh(){return(0,s.useContext)(Oh)}function Ph({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 Rh=s.forwardRef(Ph);function Uh({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 Bh=s.forwardRef(Uh);function Fh({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 Qh=s.forwardRef(Fh);function Vh({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Yh=s.forwardRef(Vh);function Zh({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 Wh=s.forwardRef(Zh);function Gh({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const Hh=s.forwardRef(Gh),$h=Ao("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 Xh=n(4601),qh=n(9296);const Jh=function(e){var t;const{is_cf_pro:n,global_checkout:r,flow_id:o,control_id:a,step_id:l,title:c,type:d,actions:u,menu_actions:f,ab_test_ui:p,offer_no_next_step:m,offer_yes_next_step:h,setShowAbtestUpgradePopup:g=()=>{},step_disabled:w}=e,y=l;let{has_product_assigned:b,is_variation:v}=e;const[{flow_type:x,flow_analytics:N,is_flow_instant_checkout:_}]=Zp(),[E,M]=(0,s.useState)(!1),S=(0,s.useRef)(),k=N?N.all_steps:"",C=v?e.control_id:l,j=k?k.find(e=>e.id===C):[],A=zh(),T=(0,qh.W6)();"landing"!==d&&"thankyou"!==d||(b=!0);const L=(e,t)=>(0,i.createElement)("div",{className:"flex justify-center"},(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:t,placement:"top"},(0,i.createElement)(Tf,{label:e,size:"sm",type:"pill",variant:"neutral",icon:(0,i.createElement)($h,{"aria-hidden":"true"}),className:"cursor-pointer"}))),O=cm(d,_);return(0,i.createElement)("div",{className:`wcf-step-wrap--container py-4 px-4 flex items-center gap-2 ${p?"border-0 border-b border-solid border-border-subtle":""} ${w?"invalid-step step-disabled touch-none !bg-background-secondary !text-text-disabled !border-0 rounded-lg":""}`},!p&&(0,i.createElement)("div",{className:"wcf-steps--sortable-toggle flex cursor-move text-text-secondary"},(0,i.createElement)(lh,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}),(0,i.createElement)(lh,{className:"w-5 h-5 stroke-1 -ml-3.5","aria-hidden":"true"})),(0,i.createElement)(Pm,{gap:"lg",direction:{sm:"column",md:"row"},align:{md:"center"},className:Rf()("wcf-step w-full justify-between",p?"ml-8":"",E?"step-overlay":"",b||y===r?"":"wcf-step__no-product")},(0,i.createElement)(Pm.Item,{className:"wcf-step--content flex items-center gap-4 w-full sm:w-[50%] min-w-0"},(0,i.createElement)("img",{src:function(){let e="";switch(d){case"landing":e=dh;break;case"checkout":e=uh;break;case"optin":e=mh;break;case"thankyou":e=hh;break;case"upsell":e=fh;break;case"downsell":e=ph}return e}(),alt:d,className:"sm:block lg:block hidden rounded-lg sm:w-[72px] sm:h-[72px] w-[62px] h-[62px]"}),(0,i.createElement)("div",{className:"wcf-steps--title-wrap flex flex-col gap-1"},(0,i.createElement)("div",{className:"wcf-step__col-tags sm:flex items-center gap-2 grid grid-cols-2"},(0,i.createElement)(Ym,{as:"span",size:14,weight:400,color:"secondary",className:"capitalize"},"thankyou"===d?(0,D.__)("Thank You","cartflows"):d),("upsell"!==d&&"downsell"!==d||wcfCartflowsTypePlusPro())&&w?(0,i.createElement)(Tf,{label:(0,D.__)("Disabled","cartflows"),size:"xs",type:"rounded",variant:"red",icon:(0,i.createElement)(Rh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}):null,function(){let t="";if(p)if(a===l)t=(0,i.createElement)(Tf,{label:(0,D.__)("Control","cartflows"),size:"xs",type:"pill",variant:"blue"});else{const{var_badge_count:n}=e;t=(0,i.createElement)(Tf,{label:(0,D.sprintf)(/* translators: %d is replaced with the count */ /* translators: %d is replaced with the count */ |
| 3 |
(0,D.__)("Variation-%d","cartflows"),n),size:"xs",type:"pill",variant:"inverse"})}return t}(),!b&&"storeCheckout"!==x&&(0,i.createElement)(Tf,{label:(0,D.__)("No Product Assigned","cartflows"),size:"xs",type:"rounded",variant:"red",icon:(0,i.createElement)(Rh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}),!b&&"storeCheckout"===x&&"checkout"!==d&&(0,i.createElement)(Tf,{label:(0,D.__)("No Product Assigned","cartflows"),size:"xs",type:"rounded",variant:"red",icon:(0,i.createElement)(Rh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}),b&&"storeCheckout"===x&&"checkout"===d&&(0,i.createElement)(Tf,{label:(0,D.__)("Store Checkout - Remove selected checkout product","cartflows"),size:"xs",type:"rounded",variant:"red",className:"wcf-global-checkout-error-badge",icon:(0,i.createElement)(Rh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}),function(){let e="";return!wcfCartflowsTypePlusPro()||"upsell"!==d&&"downsell"!==d?wcfCartflowsTypePlusPro()||"upsell"!==d&&"downsell"!==d||(e=(0,i.createElement)(zp,null)):e=h&&m?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:um(h,35,25),placement:"top"},(0,i.createElement)(Tf,{label:(0,D.__)("Offer Accepted","cartflows"),size:"xs",type:"rounded",variant:"green",icon:(0,i.createElement)(Bh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})})),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:um(m,35,25),placement:"top"},(0,i.createElement)(Tf,{label:(0,D.__)("Offer Rejected","cartflows"),size:"xs",type:"rounded",variant:"yellow",icon:(0,i.createElement)(Qh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}))):(0,i.createElement)(Tf,{label:(0,D.__)("Invalid Position","cartflows"),size:"xs",type:"rounded",variant:"red",icon:(0,i.createElement)(Rh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"})}),e}()),(0,i.createElement)("div",{className:"wcf-step__title"},(0,i.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${O?"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":O,tabIndex:O?-1:0},um(c,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length))))),(0,i.createElement)(Pm.Item,{className:"wcf-step--stats-content w-full sm:w-[30%]"},(0,i.createElement)("div",{className:"wcf-step--stats-content__info flex text-center justify-around items-center gap-4"},(0,i.createElement)("div",{className:"wcf-step--stats-content__stat"},N?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Ym,{as:"div",size:14,weight:400,color:"secondary",className:"capitalize"},(0,D.__)("Views","cartflows")),(0,i.createElement)(Ym,{as:"div",size:16,weight:600,color:"primary"},function(){let e=0;return N&&j&&(e=v?j["visits-ab"][l].total_visits:j.visits.total_visits),e}())):L((0,D.__)("Views","cartflows"),(0,D.__)("Upgrade to CartFlows Pro to track views.","cartflows"))),(0,i.createElement)("div",{className:"wcf-step--stats-content__stat"},N?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Ym,{as:"div",size:14,weight:400,color:"secondary",className:"capitalize"},(0,D.__)("Conversions","cartflows")),(0,i.createElement)(Ym,{as:"div",size:16,weight:600,color:"primary"},"thankyou"!==d?function(){let e=0;return N&&j&&(e=v?j["visits-ab"][l].conversions:j.visits.conversions),e}():"-")):L((0,D.__)("Conversions","cartflows"),(0,D.__)("Upgrade to CartFlows Pro to track conversions.","cartflows"))),(0,i.createElement)("div",{className:"wcf-step--stats-content__stat"},N?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Ym,{as:"div",size:14,weight:400,color:"secondary",className:"capitalize"},(0,D.__)("Revenue","cartflows")),(0,i.createElement)(Ym,{as:"div",size:16,weight:600,color:"primary"},"thankyou"!==d&&"landing"!==d?function(){let e=0;return N&&j&&(e=v?j["visits-ab"][l].revenue:j.visits.revenue),0!==e?Wm(e):e}():"-")):L((0,D.__)("Revenue","cartflows"),(0,D.__)("Upgrade to CartFlows Pro to track revenue.","cartflows"))))),(0,i.createElement)(Pm.Item,{className:"wcf-step--actions-col w-full sm:w-[15%]"},(0,i.createElement)("div",{className:"wcf-step--actions",ref:S},(0,i.createElement)("div",{className:"wcf-step--action-btns"},(0,i.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=O&&"edit"===e.slug,r=n?dm():(0,D.sprintf)( |
| 4 |
// translators: %s: step slug |
| 5 |
// translators: %s: step slug |
| 6 |
(0,D.__)("%s Step","cartflows"),e?.slug),o="view"===e.slug?(0,i.createElement)(Yh,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}):(0,i.createElement)(Wh,{className:"w-5 h-5 stroke-1","aria-hidden":"true"});return(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,i.createElement)("span",{className:"capitalize"},r),placement:"top",key:e?.link},(0,i.createElement)(Po,{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 ${null!==(t=e.class)&&void 0!==t?t:""} ${n?"disabled !text-text-disabled":"text-text-secondary"}`},o))}),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Open Settings","cartflows"),placement:"top"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",tag:I,to:{pathname:"admin.php",search:"storeCheckout"===x?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${o}&step_id=${l}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${o}&step_id=${l}`},className:"wcf-step__action-btn text-text-secondary hover:text-brand-brand-600"},(0,i.createElement)(Hh,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}))),(0,i.createElement)(ch,{id:y,control_id:a,onClickEvents:{clone:async function(e){if(e.preventDefault(),!wcfCartflowsPro())return null;if(await A({title:(0,D.__)("Duplicate Step","cartflows"),description:(0,D.__)("Do you want to duplicate this step? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Duplicate","cartflows"),cancelBtnText:(0,D.__)("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",a)),r.append("action",t),r.append("security",n),r.append("step_id",y),r.append("post_id",o),window.wcfAction="cloneStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{gm.success((0,D.__)("Step cloned successfully!","cartflows")),window.location.reload(),M(!1)}))}},delete:async function(e){if(e.preventDefault(),await A({title:(0,D.__)("Delete Step","cartflows"),description:(0,D.__)("Do you want to delete this step? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Delete","cartflows"),cancelBtnText:(0,D.__)("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",a)),r.append("action",t),r.append("security",n),r.append("step_id",y),r.append("post_id",o),window.wcfAction="deleteStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{gm.success((0,D.__)("Step deleted successfully!","cartflows")),window.location.reload(),M(!1)}))}},abtest:function(e){if(e.preventDefault(),!wcfCartflowsTypePro())return null;M(!0);const t=new window.FormData;t.append("action","cartflows_create_ab_test_variation"),t.append("security",cartflows_admin.wcf_create_ab_test_variation_nonce),t.append("step_id",y),t.append("flow_id",o),window.wcfAction="abtestStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{gm.success((0,D.__)("A/B test variation created!","cartflows")),window.location.reload(),M(!1)}))},winner:async function(e){if(e.preventDefault(),await A({title:(0,D.__)("Declare Winner","cartflows"),description:(0,D.__)("Do you want to declare this step as winner? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Declare Winner","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})){M(!0);const e=new window.FormData;e.append("action","cartflows_declare_ab_test_winner"),e.append("security",cartflows_admin.wcf_declare_ab_test_winner_nonce),e.append("step_id",y),e.append("flow_id",o),window.wcfAction="winnerStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{gm.success((0,D.__)("Winner declared successfully!","cartflows")),window.location.reload(),M(!1)}).catch(e=>{console.error("Declare A/B test winner failed:",e),gm.error((0,D.__)("Failed to declare winner. Please try again.","cartflows")),M(!1)}))}},archived:async function(e){if(e.preventDefault(),await A({title:(0,D.__)("Archive Step","cartflows"),description:(0,D.__)("Do you want to archive this step? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Archive","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})){M(!0);const e=new window.FormData;e.append("action","cartflows_archive_ab_test_step"),e.append("security",cartflows_admin.wcf_archive_ab_test_step_nonce),e.append("step_id",y),e.append("post_id",o),window.wcfAction="archiveStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{gm.success((0,D.__)("Step archived successfully!","cartflows")),window.location.reload(),M(!1)}))}},automation:()=>{T.push({pathname:"admin.php",search:"storeCheckout"===x?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${o}&automation=${l}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${o}&automation=${l}`})}},is_cf_pro:n,actions:f,type:d,setShowAbtestUpgradePopup:g})))))))};let Kh=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};const eg=Ao("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"}]]),tg=(0,s.forwardRef)(({id:e,type:t="text",defaultValue:n="",value:r,size:o="sm",className:a="",disabled:i=!1,onChange:l=()=>{},error:c=!1,onError:d=()=>{},prefix:u=null,suffix:f=null,label:p="",...m},h)=>{const g=(0,s.useRef)(null),w=(0,s.useMemo)(()=>e||`input-${t}-${Kh()}`,[e]),y=(0,s.useMemo)(()=>typeof r<"u",[r]),[b,v]=(0,s.useState)(n),[x,N]=(0,s.useState)(null),_=(0,s.useCallback)(()=>y?r:b,[y,r,b]),E=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 l&&l(n)},M=()=>{N(null),g.current&&(g.current.value=""),l(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"},k={xs:"text-xs font-medium",sm:"text-sm font-medium",md:"text-sm font-medium",lg:"text-base font-medium"},D={xs:"text-xs",sm:"text-xs",md:"text-sm",lg:"text-base"},j={sm:u?"pl-8":"",md:u?"pl-9":"",lg:u?"pl-10":""},A={sm:f?"pr-8":"",md:f?"pr-9":"",lg:f?"pr-10":""},T=i?"hover:outline-border-disabled":"hover:outline-border-strong",L="focus:outline-focus-border focus:ring-2 focus:ring-toggle-on focus:ring-offset-2",O=c?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",z=c?"focus:outline-focus-error-border focus:ring-field-color-error outline-focus-error-border":"",P=i?"outline-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",R=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"},Q=(0,s.useMemo)(()=>p?(0,C.jsx)(Lf,{className:Ie(k[o]),htmlFor:w,...m?.required&&{required:!0},children:p}):null,[p,o,w]),V=x?"file:border-0 file:bg-transparent pr-10":"text-text-tertiary file:border-0 file:bg-transparent pr-10";return"file"===t?(0,C.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[Q,(0,C.jsxs)("div",{className:Ie("w-full relative flex focus-within:z-10",a),children:[(0,C.jsx)("input",{ref:Yo(g,h),id:w,type:"file",className:Ie(I,R,S[o],D[o],L,T,z,V),disabled:i,onChange:E,onInvalid:d,...m}),(0,C.jsx)("div",{className:Ie(B,"right-0 pr-3",F[o]),children:(0,C.jsx)(eg,{})})]})]}):(0,C.jsxs)("div",{className:"flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[Q,(0,C.jsxs)("div",{className:Ie("w-full relative flex focus-within:z-10",a),children:[u?(0,C.jsx)("div",{className:Ie(U,"left-0 pl-3",D[o]),children:u}):null,(0,C.jsx)("input",{ref:Yo(g,h),id:w,type:t,className:Ie(I,P,S[o],D[o],j[o],A[o],L,T,O),disabled:i,onChange:E,onInvalid:d,value:_(),...m}),"file"===t?x?(0,C.jsx)("div",{className:Ie(B,"right-0 pr-3 cursor-pointer z-20 pointer-events-auto",F[o]),onClick:M,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&M()},children:(0,C.jsx)(Af,{})}):(0,C.jsx)("div",{className:Ie(B,"right-0 pr-3",F[o]),children:(0,C.jsx)(eg,{})}):f?(0,C.jsx)("div",{className:Ie(U,"right-0 pr-3",D[o]),children:f}):null]})]})});tg.displayName="Input";const ng=function(e){const{abVariations:t}=e,n={};t.map(e=>(n[e.id]=parseInt(e.traffic),""));const[r,o]=(0,s.useState)(n),a=function(e,n){e=parseInt(e),n=parseInt(n);let a=r[e]-n;const i={};t.map(t=>{const o=parseInt(t.id);if(e===o)i[o]=n;else{let e=r[o]+a;e<0?(a=e,e=0):e>100?(a=e-100,e=100):a=0,i[o]=e}return""}),o(i)};return(0,i.createElement)(i.Fragment,null,t&&t.map(e=>{const t=e.id,n=e.title;return(0,i.createElement)("div",{className:"wcf-traffic-field pb-5","data-id":e.id,key:e.id},(0,i.createElement)(Lf,{className:"wcf-step-name w-40 mr-4",tag:"span",size:"sm",title:n},um(n,20,15)),(0,i.createElement)("div",{className:"wcf-traffic-slider-wrap flex items-center gap-3 flex-1","data-variation-id":e.id},(0,i.createElement)("div",{className:`wcf-traffic-range wcf-traffic-range-${e.id} flex-1`},(0,i.createElement)("input",{type:"range",value:r[t],onChange:e=>{a(t,e.target.value)}})),(0,i.createElement)("div",{className:`wcf-traffic-value wcf-traffic-value-${e.id} shrink-0`},(0,i.createElement)(tg,{type:"number",name:`wcf_ab_settings[traffic][${e.id}][value]`,value:String(r[t]),size:"sm",suffix:"%",className:"w-20",onChange:e=>{a(t,e)}}))))}))},rg=function(e){const{flow_id:t,step_id:n,abvariations:r,closeCallback:o}=e,[a,l]=(0,s.useState)(!1),[d,u]=(0,s.useState)((0,D.__)("Save Settings","cartflows")),f=c().useRef(null);return(0,i.createElement)(vh,{open:!0,setOpen:e=>{e||o()},design:"footer-divided",exitOnClickOutside:!0,exitOnEsc:!0},(0,i.createElement)(vh.Portal,null,(0,i.createElement)(vh.Panel,{className:"max-w-xl gap-0"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Header,{className:"flex items-center justify-between px-6 pt-5 pb-0"},(0,i.createElement)(vh.Title,null,(0,D.__)("Split Test Testing","cartflows")),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,{className:"px-6 py-4"},(0,i.createElement)("form",{ref:f,id:"wcf-ab-settings-form",onSubmit:function(e){e.preventDefault(),l(!0),u((0,D.__)("Saving..","cartflows"));const r=new window.FormData(e.target),o={};r.forEach(function(e,t){o[t]=e});const a=JSON.stringify(o);r.append("formdata",a),r.append("action","cartflows_save_ab_test_setting"),r.append("security",cartflows_admin.save_ab_test_setting_nonce),r.append("step_id",n),r.append("flow_id",t),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{gm.success((0,D.__)("Split test settings saved!","cartflows")),u((0,D.__)("Reloading..","cartflows")),window.location.reload()}).catch(()=>{l(!1),u((0,D.__)("Save Settings","cartflows")),gm.error((0,D.__)("Failed to save split test settings.","cartflows"))})}},(0,i.createElement)("div",{className:"text-sm font-medium text-field-label mb-3"},(0,D.__)("Traffic","cartflows")),(0,i.createElement)("div",{className:"rounded-md border border-border-subtle bg-background-primary text-sm font-medium text-text-primary"},(0,i.createElement)(ng,{abVariations:r})))),(0,i.createElement)(vh.Footer,{className:"px-6 py-4"},(0,i.createElement)(Po,{variant:"outline",size:"sm",onClick:o},(0,D.__)("Cancel","cartflows")),(0,i.createElement)(Po,{variant:"primary",size:"sm",type:"submit",form:"wcf-ab-settings-form",loading:a,disabled:a},d)))))},og=function(e){const{flow_id:t,control_id:n,step_id:r,abvariations:o,ab_test_start:a,compact:l=!1}=e,[c,d]=(0,s.useState)(!1),[u,f]=(0,s.useState)(a?(0,D.__)("Stop Split Test","cartflows"):(0,D.__)("Start Split Test","cartflows")),[p,m]=(0,s.useState)(a?"wcf-stop-split-test text-brand-500 hover:text-brand-700 cursor-pointer":"wcf-start-split-test text-support-success hover:text-support-success"),[h,g]=(0,s.useState)(!1);return(0,i.createElement)("div",{className:"wcf-ab-test-head w-full p-4 bg-background-primary flex justify-between items-center border-0 border-b border-solid border-border-subtle rounded-t-lg box-border"},(0,i.createElement)("div",{className:"wcf-step-left-content flex items-center gap-3"},(0,i.createElement)("div",{className:"wcf-steps--sortable-toggle flex cursor-move text-text-tertiary"},(0,i.createElement)(lh,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}),(0,i.createElement)(lh,{className:"w-5 h-5 stroke-1 -ml-3.5","aria-hidden":"true"})),(0,i.createElement)("span",{className:"wcf-ab-test-title "+(l?"font-semibold text-sm":"font-bold text-base")},(0,D.__)("Split Test","cartflows"))),(0,i.createElement)("div",{className:"wcf-steps-action-buttons flex gap-3 items-center"},(0,i.createElement)("a",{href:"#",className:`wcf-action-button font-semibold ${l?"text-sm ":""}no-underline ${p}`,title:u,"data-id":n,onClick:function(e){if(e.preventDefault(),h)return void console.log("One process of A/B split test is ongoing.");a?(m("wcf-start-split-test"),f((0,D.__)("Stopping…","cartflows"))):(m("wcf-stop-split-test"),f((0,D.__)("Starting…","cartflows"))),g(!0);const n=new window.FormData;n.append("action","cartflows_start_ab_test"),n.append("security",cartflows_admin.wcf_start_ab_test_nonce),n.append("step_id",r),n.append("flow_id",t),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{g(!1),gm.success(a?(0,D.__)("Split test stopped!","cartflows"):(0,D.__)("Split test started!","cartflows")),f((0,D.__)("Reloading…","cartflows")),window.location.reload()})}},(0,i.createElement)("span",null,u)),(0,i.createElement)("a",{href:"#",className:"wcf-settings-split-test wcf-action-button text-text-tertiary hover:text-brand-500",title:`${(0,D.__)("Split Test Settings","cartflows")}`,onClick:function(e){e.preventDefault(),d(!c)}},(0,i.createElement)(Hh,{className:"w-5 h-5 stroke-1 "+(h?"animate-spin text-brand-500":""),"aria-hidden":"true"}))),c&&(0,i.createElement)(rg,{abvariations:o,flow_id:t,step_id:r,control_id:n,closeCallback:function(){d(!1)}}))};function ag({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m15 15 6-6m0 0-6-6m6 6H9a6 6 0 0 0 0 12h3"}))}const ig=s.forwardRef(ag);function sg({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88"}))}const lg=s.forwardRef(sg),cg=function(e){const{step_id:t,flow_id:n,control_id:r,title:o,deleted:a,hide:l,date:c,actions:d,type:u}=e,[f,p]=(0,s.useState)(!1),m=zh(),h=async function(e){if(e.preventDefault(),await m({title:(0,D.__)("Restore Archived Variation","cartflows"),description:(0,D.__)("Do you want to restore this archived variation? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Restore","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})){p(!0);const e=new window.FormData;e.append("action","cartflows_restore_archive_ab_test_variation"),e.append("security",cartflows_admin.wcf_restore_archive_ab_test_variation_nonce),e.append("step_id",t),e.append("flow_id",n),e.append("control_id",r),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{window.location.reload(),p(!1)})}},g=async function(e){if(e.preventDefault(),await m({title:(0,D.__)("Trash Archived Variation","cartflows"),description:(0,D.sprintf)(/* translators: %1$s is replaced with the HTML tag */ /* translators: %1$s is replaced with the HTML tag */ |
| 7 |
(0,D.__)("This action will trash this archived variation and its analytics data permanently. %1$s Do you want to delete this archived variation?","cartflows"),"\n"),actionBtnText:(0,D.__)("Trash","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})){p(!0);const e=new window.FormData;e.append("action","cartflows_delete_archive_ab_test_variation"),e.append("security",cartflows_admin.wcf_delete_archive_ab_test_variation_nonce),e.append("step_id",t),e.append("flow_id",n),e.append("control_id",r),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{window.location.reload(),p(!1)})}},w=async function(e){if(e.preventDefault(),await m({title:(0,D.__)("Hide Archived Variation","cartflows"),description:(0,D.sprintf)(/* translators: %1$s is replaced with the HTML tag */ /* translators: %1$s is replaced with the HTML tag */ |
| 8 |
(0,D.__)("This action will hide this archived variation from the list of steps, but its analytics will be visible. %1$s Do you want to hide this archived variation?","cartflows"),"\n"),actionBtnText:(0,D.__)("Hide","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})){p(!0);const e=new window.FormData;e.append("action","cartflows_hide_archive_ab_test_variation"),e.append("security",cartflows_admin.hide_archive_ab_test_variation_nonce),e.append("step_id",t),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{window.location.reload(),p(!1)})}},y=async function(e){if(e.preventDefault(),await m({title:(0,D.__)("Trash Archived Variation","cartflows"),description:(0,D.sprintf)(/* translators: %1$s is replaced with the HTML tag */ /* translators: %1$s is replaced with the HTML tag */ |
| 9 |
(0,D.__)("This action will delete this archived variation and its analytics data permanently. %1$s Do you want to delete this archived variation?","cartflows"),"\n"),actionBtnText:(0,D.__)("Delete","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})){p(!0);const e=new window.FormData;e.append("action","cartflows_permanent_delete_archive_ab_test_variation"),e.append("security",cartflows_admin.permanent_delete_archive_ab_test_variation_nonce),e.append("step_id",t),e.append("flow_id",n),e.append("control_id",r),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{window.location.reload(),p(!1)})}};return"1"===l?null:(0,i.createElement)("div",{className:"wcf-archived-step flex items-center gap-2 py-4 border-0 border-solid border-border-subtle","data-id":t},(0,i.createElement)("div",{className:"wcf-archive-step--sortable-toggle flex text-text-disabled disabled pointer-events-none"},(0,i.createElement)(lh,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}),(0,i.createElement)(lh,{className:"w-5 h-5 stroke-1 -ml-3.5","aria-hidden":"true"})),(0,i.createElement)("div",{className:"wcf-step flex justify-between items-center w-full "+(f?"step-overlay":"")},(0,i.createElement)("div",{className:"wcf-archive-step--content flex items-center gap-4 w-[55%]"},(0,i.createElement)("img",{src:function(){let e="";switch(u){case"landing":e=dh;break;case"checkout":e=uh;break;case"optin":e=mh;break;case"thankyou":e=hh;break;case"upsell":e=fh;break;case"downsell":e=ph}return e}(),alt:u,className:"rounded-lg w-[72px] h-[72px]"}),(0,i.createElement)("div",{className:"wcf-archive-step--title-wrap flex flex-col gap-1"},(0,i.createElement)("div",{className:"wcf-archive-step--col-tags flex items-center gap-2"},(0,i.createElement)("span",{className:"text-base font-normal text-text-tertiary capitalize mr-2"},"thankyou"===u?(0,D.__)("Thank You","cartflows"):u),function(){let e="",t="";return a?(e=(0,D.__)("Deleted On: ","cartflows"),t="bg-support-error"):(e=(0,D.__)("Archived On: ","cartflows"),t="bg-background-inverse"),(0,i.createElement)("span",{className:`wcf-step-badge text-text-on-color text-xs px-2.5 py-1 rounded-full ${t}`},e+c)}()),(0,i.createElement)("div",{className:"wcf-archive-step--title"},(0,i.createElement)("span",{className:"font-semibold text-lg text-text-primary cursor-default"},um(o,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length))))),(0,i.createElement)("div",{className:"wcf-archive-step--col"},(0,i.createElement)("div",{className:"wcf-archive-step--actions"},(0,i.createElement)("div",{className:"wcf-archive-step--action__btns-wrapper"},(0,i.createElement)("div",{className:"wcf-archive-step--basic-action__btns flex items-center gap-3"},d.map(e=>{let t,n;switch(e.slug){case"restore":t=h,n=(0,i.createElement)(ig,{className:"w-18 h-18 stroke-2"});break;case"delete":t=g,n=(0,i.createElement)(Xm,{className:"w-18 h-18 stroke-2"});break;case"hide":t=w,n=(0,i.createElement)(lg,{className:"w-18 h-18 stroke-2"});break;case"deleteArch":t=y,n=(0,i.createElement)(Xm,{className:"w-18 h-18 stroke-2"})}return(0,i.createElement)(i.Fragment,null,e?.before_text&&(0,i.createElement)("span",{className:"wcf-step__action-before-text"},e?.before_text),(0,i.createElement)("a",{href:e?.link,className:`wcf-step__action-btn text-text-tertiary hover:text-brand-500 no-underline p-1 flex gap-2 ${e?.class}`,title:e?.text,onClick:t},n,e?.text))})))))))};function dg({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"}))}const ug=s.forwardRef(dg),fg=function(e){const{flow_id:t,control_id:n,archived_variations:r,type:o,ab_test_ui:a=!1}=e,[l,c]=(0,s.useState)(!1);return(0,i.createElement)("div",{className:"wcf-archived-wrapper box-border p-4 bg-background-primary w-full rounded-b-lg "+(a?"":"border-0 border-t border-solid border-border-subtle")},(0,i.createElement)("span",{id:"wcf-archived-button",onClick:function(){c(!l)},className:`text-text-primary text-sm flex items-center gap-1 cursor-pointer p-1 ${l?"is-active":""} `},(0,D.__)("Archived Steps","cartflows"),l?(0,i.createElement)(Tp,{className:"w-4 h-4 stroke-1 mt-0.5","aria-hidden":"true"}):(0,i.createElement)(ug,{className:"w-4 h-4 stroke-1 mt-0.5","aria-hidden":"true"})),l&&(0,i.createElement)("div",{className:"wcf-archived-steps divide-y divide-border-subtle"},r.map(e=>{const r={step_id:e.id,flow_id:t,control_id:n,title:e.title,note:e.note,deleted:e.deleted,hide:e.hide,date:e.date,type:o,actions:Object.values(e.actions)};return(0,i.createElement)(cg,(0,w.A)({},r,{key:e.id}))})))};function pg({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 mg=s.forwardRef(pg);function hg({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}const gg=s.forwardRef(hg);function wg({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const yg=s.forwardRef(wg);function bg({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 vg=s.forwardRef(bg),xg=function(){return(0,i.createElement)("div",{className:"wcf-order-bump-product-tab p-6 is-placeholder"},(0,i.createElement)("div",{role:"status",className:"space-y-8 animate-pulse md:space-y-0 md:space-x-8 md:flex md:items-center"},(0,i.createElement)("div",{className:"flex items-center justify-center w-full h-48 bg-background-secondary rounded sm:w-96"},(0,i.createElement)("svg",{className:"w-12 h-12 text-text-disabled",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",fill:"currentColor",viewBox:"0 0 640 512"},(0,i.createElement)("path",{d:"M480 80C480 35.82 515.8 0 560 0C604.2 0 640 35.82 640 80C640 124.2 604.2 160 560 160C515.8 160 480 124.2 480 80zM0 456.1C0 445.6 2.964 435.3 8.551 426.4L225.3 81.01C231.9 70.42 243.5 64 256 64C268.5 64 280.1 70.42 286.8 81.01L412.7 281.7L460.9 202.7C464.1 196.1 472.2 192 480 192C487.8 192 495 196.1 499.1 202.7L631.1 419.1C636.9 428.6 640 439.7 640 450.9C640 484.6 612.6 512 578.9 512H55.91C25.03 512 .0006 486.1 .0006 456.1L0 456.1z"}))),(0,i.createElement)("div",{className:"w-full"},(0,i.createElement)("div",{className:"wcf-accordion-loader mb-3.5"},(0,i.createElement)("span",{className:"block h-4 w-28 bg-background-secondary rounded-md mb-4"}),(0,i.createElement)("span",{className:"block h-4 bg-background-secondary rounded-md mb-4 w-10/12"}),(0,i.createElement)("span",{className:"block h-4 bg-background-secondary rounded-md mb-4 w-8/12"}),(0,i.createElement)("span",{className:"block h-4 bg-background-secondary rounded-md w-1/2 mb-4"})))),(0,i.createElement)("div",{className:"flex gap-4 mt-6"},(0,i.createElement)("span",{className:"w-20 h-4 bg-background-secondary rounded-md"}),(0,i.createElement)("span",{className:"w-20 h-4 bg-background-secondary rounded-md"}),(0,i.createElement)("span",{className:"w-20 h-4 bg-background-secondary rounded-md"}),(0,i.createElement)("span",{className:"w-20 h-4 bg-background-secondary rounded-md"})),(0,i.createElement)("div",{className:"w-full"},(0,i.createElement)("div",{className:"mt-6 mb-3.5"},(0,i.createElement)("span",{className:"block h-4 w-28 bg-background-secondary rounded-md mb-4"}),(0,i.createElement)("span",{className:"block h-4 bg-background-secondary rounded-md mb-4 w-10/12"}),(0,i.createElement)("span",{className:"block h-4 bg-background-secondary rounded-md mb-4 w-8/12"}),(0,i.createElement)("span",{className:"block h-4 bg-background-secondary rounded-md w-1/2 mb-4"}))))},Ng=function(){return(0,i.createElement)("div",{className:"wcf-order-bump-design-tab is-placeholder"},(0,i.createElement)("div",{className:"wcf-order-bump-design-tab__settings"},(0,i.createElement)("table",null,(0,i.createElement)("tbody",null,(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",{className:"wcf-field wcf-section-heading-field"},(0,i.createElement)("div",{className:"wcf-field__data--label"},(0,i.createElement)("label",null))))),(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",null,(0,i.createElement)("div",{className:"wcf-select2-field wcf-product-field"},(0,i.createElement)("div",{className:"wcf-selection-field"},(0,i.createElement)("label",null)))))),(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",null,(0,i.createElement)("div",{className:"wcf-select2-field wcf-product-field"},(0,i.createElement)("div",{className:"wcf-selection-field"},(0,i.createElement)("label",null)))))))),(0,i.createElement)("div",{className:"wcf-order-bump-save-settings"},(0,i.createElement)("span",null))),(0,i.createElement)("div",{className:"wcf-order-bump-design-tab__preview"},(0,i.createElement)("div",{className:"wcf-order-bump-design-tab__preview--title"},(0,i.createElement)("label",null)),(0,i.createElement)("div",{className:"wcf-bump-order-wrap wcf-bump-order-style-1 wcf-after-order"},(0,i.createElement)("div",{className:"wcf-bump-order-content"},(0,i.createElement)("div",{className:"wcf-bump-order-field-wrap"},(0,i.createElement)("span",null)),(0,i.createElement)("div",{className:"wcf-content-container"},(0,i.createElement)("div",{className:"wcf-bump-order-offer-content-right"},(0,i.createElement)("div",{className:"wcf-bump-order-offer"},(0,i.createElement)("span",{className:"wcf-bump-order-bump-highlight"})),(0,i.createElement)("div",{className:"wcf-bump-order-desc"})))))))},_g=function(){return(0,i.createElement)("div",{className:"wcf-order-bump-setting-tab is-placeholder"},(0,i.createElement)("table",null,(0,i.createElement)("tbody",null,(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",{className:"wcf-field wcf-section-heading-field"},(0,i.createElement)("div",{className:"wcf-field__data--label"},(0,i.createElement)("label",null))))),(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",{className:"wcf-field__data--label"},(0,i.createElement)("label",{className:"wcf-field-one"})))),(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",{className:"wcf-field__data--label"},(0,i.createElement)("label",{className:"wcf-field-two"})))),(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",{className:"wcf-field wcf-section-heading-field"},(0,i.createElement)("div",{className:"wcf-field__data--label"},(0,i.createElement)("label",null))))),(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",{className:"wcf-field__data--label"},(0,i.createElement)("label",{className:"wcf-field-one"})))),(0,i.createElement)("tr",null,(0,i.createElement)("th",{scope:"row"},(0,i.createElement)("div",{className:"wcf-field__data--label"},(0,i.createElement)("label",{className:"wcf-field-two"})))))),(0,i.createElement)("div",{className:"wcf-order-bump-save-settings"},(0,i.createElement)("span",null)))},Eg=function(e){const{fontSize:t,width:n,style:r}=e;return(0,i.createElement)("div",{className:"wcf-skeleton bg-background-secondary block leading-5 wcf-skeleton--text wcf-skeleton--wave",style:{fontSize:t,width:n,...r}})},Mg=function(e){const{height:t,style:n}=e;return(0,i.createElement)("div",{className:"wcf-skeleton-base wcf-skeleton--spacer h-6",style:{height:t,...n}})},Ig=function(e){const{width:t,height:n,style:r}=e;return(0,i.createElement)("div",{className:"wcf-skeleton block leading-5 wcf-skeleton--rect bg-background-secondary rounded-md animate-pulse",style:{width:t,height:n,...r}})},Sg=function(){return(0,i.createElement)("div",{className:"wcf-order-bumps-rules-page"},(0,i.createElement)("div",{className:"wcf-order-bumps-rules-page--enable_option"},(0,i.createElement)(Eg,{width:"65%"})),(0,i.createElement)("div",{className:"wcf-order-bumps-rules--group"},Array(3).fill().map((e,t)=>(0,i.createElement)("div",{className:"wcf-order-bumps-rule",key:e},(0,i.createElement)("div",{className:"wcf-order-bumps-rule--select-box"},(0,i.createElement)(Ig,{height:"35px",width:"30%"}),(0,i.createElement)(Ig,{height:"35px",width:"30%"}),(0,i.createElement)(Ig,{height:"35px",width:"30%"})),2!==t&&(0,i.createElement)("div",{className:"wcf-order-bumps-rule__and"},(0,i.createElement)(Ig,{height:"25px",width:"5%"}))))),(0,i.createElement)("div",{className:"wcf-order-bumps-rules--or"},(0,i.createElement)(Ig,{height:"35px",width:"5%"}),(0,i.createElement)(Ig,{height:"45px",width:"12%"})),(0,i.createElement)("div",{className:"wcf-order-bumps-rules-save-settings"},(0,i.createElement)(Ig,{height:"45px",width:"12%"})))},kg=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 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))}},Dg=Ao("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Cg=(0,s.forwardRef)(({id:e,label:t,defaultChecked:n=!1,checked:r,onChange:o,indeterminate:a,disabled:i,size:l="md",className:c,...d},u)=>{const f=(0,s.useMemo)(()=>e||`checkbox-${Kh()}`,[e]),p=(0,s.useMemo)(()=>typeof r<"u",[r]),[m,h]=(0,s.useState)(n||!1),g="primary",w={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"}},y={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"}},b=(0,s.useCallback)(()=>p?r:m,[p,r,m]),v=(0,s.useCallback)(()=>(0,s.isValidElement)(t)?t:t?.heading||t?.description?(0,C.jsxs)("div",{className:w[l].gap,children:[t?.heading&&(0,C.jsx)(Lf,{className:Ie("text-text-primary font-medium leading-4 m-0",w[l].text,w[l].gap,i&&"text-text-disabled"),htmlFor:f,children:t?.heading}),t?.description&&(0,C.jsx)(Lf,{tag:"p",className:Ie("font-normal leading-5 m-0",w[l].description,i&&"text-text-disabled"),variant:"help",children:t?.description})]}):null,[t,l,i]);return(0,C.jsxs)("div",{className:Ie("inline-flex items-center justify-center gap-2",!!t&&"items-start",i&&"cursor-not-allowed"),children:[(0,C.jsxs)("label",{className:Ie("relative flex items-center justify-center rounded-full p-0.5",!i&&"cursor-pointer"),htmlFor:f,children:[(0,C.jsx)("input",{ref:u,id:f,type:"checkbox",className:Ie("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",y[g].checkbox,w[l].checkbox,i&&"cursor-not-allowed disabled:bg-white checked:disabled:bg-white disabled:border-border-disabled checked:disabled:border-border-disabled",c),checked:b(),onChange:e=>{if(i)return;const t=e.target.checked;p||h(t),"function"==typeof o&&o(t)},disabled:i,...d}),(0,C.jsx)("span",{className:Ie("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",y[g].icon,i&&"cursor-not-allowed peer-disabled:text-border-disabled"),children:a?(0,C.jsx)(Dg,{className:Ie(w[l]?.icon)}):(0,C.jsx)(Lo,{className:Ie(w[l]?.icon)})})]}),!!t&&v()]})});Cg.displayName="Checkbox";const jg=function(e){const{name:t,id:n,label:r,value:o,desc:a,backComp:l=!1,tooltip:c,onClick:d,notice:u,child_class:f="",isDisabled:p=!1,isPro:m=!1}=e,[h,g]=(0,s.useState)(o);(0,s.useEffect)(()=>{g(o)},[o]);const w=l?"enable":"yes",y=l?"disable":"no";return(0,i.createElement)("div",{className:"wcf-field wcf-checkbox-field text-left"},(0,i.createElement)("div",{className:"wcf-field__data flex items-center gap-2.5"},(0,i.createElement)("div",{className:`wcf-field__data--content ${f}`},(0,i.createElement)("input",{type:"hidden",name:t,value:h}),(0,i.createElement)(Cg,{id:n||t,checked:w===h,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;g(w),r=w}else g(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),d&&d(o)},disabled:p,className:e.class||e.className})),r&&(0,i.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,i.createElement)("label",{htmlFor:n||t,className:"mr-3"},r,c&&(0,i.createElement)(uM,{text:c}),!wcfCartflowsPro()&&m&&(0,i.createElement)("span",{className:"ml-2 inline-flex align-middle"},(0,i.createElement)(zp,null))))),a&&(0,i.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Wm(a)))},Ag={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"}},Tg={sm:"text-sm leading-5",md:"text-base leading-6"},Lg={sm:{checkbox:"size-4",icon:"size-1.5",info:"size-4"},md:{checkbox:"size-5",icon:"size-2",info:"size-5"}},Og={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"},zg=({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"},l={xs:"space-y-0.5",sm:"space-y-0.5",md:"space-y-1"};if((0,s.isValidElement)(e))return(0,C.jsxs)("div",{className:Ie("inline-flex items-center gap-3","items-start"),children:[r,e]});const c=!e?.heading&&!e?.description,d=e?.heading&&e?.description?"items-start":"items-center";return c?r:(0,C.jsxs)("div",{className:Ie("inline-flex",d,"gap-3"),children:[r,(()=>{const{heading:r="",description:s=""}=e||{};return(0,C.jsxs)("div",{className:Ie("space-y-0.5",l[o]),children:[r&&(0,C.jsx)(Lf,{htmlFor:t,className:Ie("m-0",a[o]),...n&&{variant:"disabled"},children:r}),s&&(0,C.jsx)(Lf,{tag:"p",variant:"help",className:Ie("text-sm font-normal leading-5 m-0",i[o]),...n&&{variant:"disabled"},children:s})]})})()]})},Pg=(0,s.forwardRef)(({id:e,onChange:t,value:n,defaultValue:r=!1,size:o="sm",disabled:a=!1,label:i={heading:"",description:""},name:l,className:c,...d},u)=>{const f="lg"===o?"md":o,p=(0,s.useMemo)(()=>typeof n<"u",[n]),m=(0,s.useMemo)(()=>e||`switch-${Kh()}`,[]),[h,g]=(0,s.useState)(r),w="primary",y=(0,s.useCallback)(()=>p?n:h,[p,n,h]),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,C.jsx)(zg,{label:i,switchId:m,disabled:a,size:f,children:(0,C.jsxs)("div",{className:Ie("relative group/switch inline-block cursor-pointer rounded-full shrink-0",v[f].container,c),children:[(0,C.jsx)("input",{ref:u,id:m,type:"checkbox",className:Ie("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[w].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"}}[w].input),checked:y(),onChange:e=>{if(a)return;const n=e.target.checked;p||g(n),"function"==typeof t&&t(n)},disabled:a,name:l,...d}),(0,C.jsx)("label",{htmlFor:m,className:Ie("peer/toggle-dial 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[f].toggleDial,b[w].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"}[f])})]})})});Pg.displayName="Switch";const Rg=(0,s.createContext)({}),Ug=()=>(0,s.useContext)(Rg),Bg=({children:e,name:t,style:n="simple",size:r="md",value:o,defaultValue:a,by:i="id",as:l="div",onChange:c,className:d,disableGroup:u=!1,vertical:f=!1,columns:p=4,multiSelection:m=!1,gapClassName:h="gap-2"})=>{const g=(0,s.useMemo)(()=>typeof o<"u",[o]),w=(0,s.useMemo)(()=>t||`radio-button-group-${Kh()}`,[t]);let y;y=g?o:m?a??[]:a;const[b,v]=(0,s.useState)(y),x=(0,s.useCallback)(e=>{if(m)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 c&&c(n),n});else{if(g||v(e),"function"!=typeof c)return;c(e)}},[c]);d=Ie("grid grid-cols-4",De[p],h,"tile"===n&&"gap-0",f&&"grid-cols-1",d);const N=Ie("tile"===n?"border border-border-subtle border-solid rounded-md shadow-sm":"gap-6",d),_=()=>(0,C.jsx)(Rg.Provider,{value:{name:w,value:g?o:b,by:i,onChange:x,isControlled:g,disableAll:u,style:n,columns:p,multiSelection:m,size:r},children:s.Children.map(e,e=>(0,s.isValidElement)(e)?e:null)});return(0,C.jsx)(C.Fragment,{children:"tile"===n?(0,C.jsx)("div",{className:N,children:_()}):(0,C.jsx)(l,{...l===s.Fragment?{}:{className:d},children:_()})})};Bg.displayName="RadioButton.Group";const Fg=(0,s.forwardRef)(({id:e,label:t,value:n,children:r,disabled:o,icon:a=null,inlineIcon:i=!1,hideSelection:l=!1,reversePosition:c=!1,borderOn:d=!1,borderOnActive:u=!0,badgeItem:f=null,useSwitch:p=!1,info:m,minWidth:h=!0,...g},w)=>{const{buttonWrapperClasses:y,...b}=g,v=Ug(),{name:x,value:N,by:_,onChange:E,disableAll:M,checked:I,multiSelection:S,size:k="md"}=v,D="primary",j=(0,s.useMemo)(()=>e||`radio-button-${Kh()}`,[e]),A=(0,s.useMemo)(()=>M||o,[M,o]),T=(0,s.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[_]===n[_]),[N,n,I]),L=(0,s.useCallback)(()=>(0,s.isValidElement)(t)?t:t?.heading?(0,C.jsxs)("div",{className:Ie(!i&&{"space-y-3":"sm"===k,"space-y-4":"md"===k},c&&(p?"ml-10":"ml-4"),i&&"flex gap-2",i&&!t.description&&"items-center"),children:[a&&(0,C.jsx)(C.Fragment,{children:a}),(0,C.jsxs)("div",{className:Ie(!a||!p||a&&f?{"space-y-0.5":"sm"===k,"space-y-1":"md"===k}:"space-y-0.5"),children:[(0,C.jsx)("p",{className:Ie("text-text-primary font-medium m-0",Tg[k],o&&"text-text-disabled cursor-not-allowed"),children:t.heading}),t.description&&(0,C.jsx)("p",{className:"text-text-tertiary text-sm font-normal leading-5 m-0",children:t.description})]})]}):null,[t]);if("tile"===v.style)return(0,C.jsx)(Qg,{id:e,label:t,value:n,disabled:o,size:k,children:r});const O=()=>{A||(S?p&&E(n,!T):E(n))};return(0,C.jsxs)("label",{className:Ie("inline-flex items-center relative cursor-pointer transition-all duration-300",!!t&&"items-start justify-between",h&&"min-w-[180px]",d&&"outline outline-field-border outline-1 rounded-md shadow-sm hover:outline-border-interactive",u&&d&&T&&"outline-border-interactive",{"pl-3.5 pr-2.5 py-2.5":"sm"===k&&!(a&&p),"p-3":"sm"===k&&(a&&p||a&&f),"pl-4 pr-3 py-3":"md"===k&&!(a&&p),"p-4":"md"===k&&(a&&p||a&&f)},"pr-12",A&&"cursor-not-allowed opacity-40",y),htmlFor:j,onClick:O,children:[!!t&&(0,C.jsx)("label",{className:Ie("cursor-pointer",A&&"cursor-not-allowed"),htmlFor:j,children:L()}),!!m&&(0,C.jsx)("div",{className:"absolute mr-0.5 bottom-1.5 right-3",children:(0,C.jsx)(Zo,{title:m?.heading,content:m?.description,children:(0,C.jsx)(To,{className:Ie("text-text-primary",Lg[k]?.info)})})}),(0,C.jsxs)("label",{className:Ie("absolute mr-0.5 right-3 flex items-center cursor-pointer rounded-full gap-2",c&&"left-0",A&&"cursor-not-allowed",i&&"mr-3"),onClick:O,children:[!!f&&f,!l&&(p?(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Pg,{defaultValue:!1,size:k,onChange:()=>{S?E(n,!T):E(n)},checked:T,...b,"aria-label":t?.heading??"Switch"})}):(0,C.jsxs)("span",{className:"relative p-0.5",children:[(0,C.jsx)("input",{ref:w,id:j,type:S?"checkbox":"radio",className:Ie("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",!S&&"rounded-full",Ag[D].checkbox,Lg[k].checkbox,A&&"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=>E(e.target.value),checked:T,disabled:A,...b}),(0,C.jsx)("span",{className:Ie("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",Ag[D].icon,A&&"peer-disabled:text-border-disabled cursor-not-allowed"),children:S?(0,C.jsx)(Lo,{className:"sm"===k?"size-3":"size-4"}):(0,C.jsx)("div",{className:Ie("rounded-full bg-current",Lg[k]?.icon)})})]}))]})]})});Fg.displayName="RadioButton.Button";const Qg=({id:e,children:t,value:n,disabled:r,size:o="md",...a})=>{const i=Ug(),{name:l,value:c,by:d,onChange:u,disableAll:f,checked:p}=i||{},m=(0,s.useMemo)(()=>e||`radio-button-${Kh()}`,[e]),h=(0,s.useMemo)(()=>f||r,[f,r]),g=(0,s.useMemo)(()=>typeof p<"u"?p:typeof c==typeof n&&("string"==typeof c?c===n:Array.isArray(c)?c.includes(n):!(!c||!d)&&c[d]===n[d]),[c,n,p,d]),w=Ie("bg-background-primary text-primary cursor-pointer flex items-center justify-center","hover:bg-button-tertiary-hover","focus:outline-none",h?"text-text-disabled cursor-not-allowed":"",Og[o],"border-0 border-r border-border-subtle border-solid");return(0,C.jsx)(C.Fragment,{children:(0,C.jsxs)("button",{type:"button",id:m,"aria-label":"Radio Button",className:Ie(w,"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",g&&"bg-button-disabled"),onClick:()=>{u&&u(n)},disabled:h,...a,children:[(0,C.jsx)("input",{type:"hidden",value:n,name:l,checked:g,onChange:e=>u?.(e.target.value)}),t]})})},Vg=Object.assign(Fg,{Group:Bg,Button:Fg}),Yg=function(e){const{name:t,label:n,value:r,options:o,desc:a,child_class:l="",child_className:c="",onClick:d=""}=e,[u,f]=(0,s.useState)(r);return(0,s.useEffect)(()=>{f(r)},[r]),(0,i.createElement)("div",{className:"wcf-field wcf-radio-field"},(0,i.createElement)("div",{className:"wcf-field__data block"},n&&(0,i.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-left w-full md:w-80 lg:w-80 mb-2"},(0,i.createElement)("label",{className:"text-text-primary text-base font-medium"},n)),(0,i.createElement)("div",{className:"wcf-field__data--content"},o&&(0,i.createElement)(Vg.Group,{name:t,value:u,onChange:function(t){f(t);const n=new CustomEvent("wcf:radio:change",{bubbles:!0,detail:{e:{target:{value:t}},name:e.name,value:t}});document.dispatchEvent(n),d&&d(t)},vertical:!0,gapClassName:"gap-0"},o.map(e=>(0,i.createElement)(Vg.Button,(0,w.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":""} ${c||l}`},(e.label||e.desc)&&{label:{heading:e.label||"",...e.desc&&{description:e.desc}}})))))),a&&(0,i.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Wm(a)))},Zg=Ao("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]),Wg=Ao("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Gg={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"}},Hg="group-disabled:text-field-color-disabled",$g={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]"},Xg={sm:"py-1.5 px-2 text-xs font-normal",md:"p-2 text-sm font-normal",lg:"p-2 text-base font-normal"},qg=e=>null===e||"boolean"==typeof e?"":"string"==typeof e||"number"==typeof e?e.toString():Array.isArray(e)?e.map(qg).join(" ").trim():(0,s.isValidElement)(e)?e.props&&e.props.children?qg(e.props.children):"":"object"==typeof e&&"textContent"in e?e.textContent?.toString().toLowerCase()||"":"object"==typeof e&&"children"in e?qg(e.children):"",Jg=Ao("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Kg=({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,C.jsx)("span",{className:Ie("flex",a,o,r),children:n||(0,C.jsx)(Jg,{className:"animate-spin shrink-0"})})},ew=(0,s.createContext)({}),tw=()=>(0,s.useContext)(ew),nw=(0,s.forwardRef)(({children:e,icon:t=null,placeholder:n="Select an option",optionIcon:r=null,render:o,label:a,className:i,...l},c)=>{const{sizeValue:d,getReferenceProps:u,getValues:f,selectId:p,refs:m,isOpen:h,multiple:g,combobox:w,setSelected:y,onChange:b,isControlled:v,disabled:x,by:N}=tw(),_={sm:"xs",md:"sm",lg:"md"}[d],E=(0,s.useCallback)(()=>{if(t)return t;const e="text-field-placeholder group-disabled:text-icon-disabled";return w?(0,C.jsx)(Zg,{className:e}):(0,C.jsx)(lp,{className:e})},[t]),M=(0,s.useCallback)(()=>{const t=f();if(!t)return null;if(g)return t.map((e,t)=>(0,C.jsx)(Tf,{className:"cursor-default",icon:r,type:"rounded",size:_,onMouseDown:I(e),label:"function"==typeof o?o(e):e.toString(),closable:!0,disabled:x},t));let n="string"==typeof t?t:"";if("function"==typeof o&&(n=o(t)),"function"==typeof e&&"function"!=typeof o){const r={value:t,...g?{onClose:I(t)}:{}};n=e(r)}return((0,s.isValidElement)(e)||"string"==typeof e)&&"function"!=typeof o&&(n=e),(0,C.jsx)("span",{className:Ie("truncate",Gg[d].displaySelected,Hg),children:n})},[f,x]),I=e=>t=>{t?.preventDefault(),t?.stopPropagation();const n=[...f()??[]],r=n.findIndex(t=>null!==t&&null!==e&&"object"==typeof t?t[N]===e[N]:t===e);-1!==r&&(n.splice(r,1),v||y(n),"function"==typeof b&&b(n))};return(0,C.jsxs)("div",{className:"w-full flex flex-col items-start gap-1.5 [&_*]:box-border box-border",children:[!!a&&(0,C.jsx)("label",{className:Ie(Gg[d]?.label,"text-field-label"),htmlFor:p,children:a}),(0,C.jsxs)("button",{id:p,ref:Yo(m.setReference,c),className:Ie("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",!h&&"focus:ring-2 focus:ring-offset-2 focus:outline-focus-border focus:ring-focus [&:hover:not(:focus):not(:disabled)]:outline-border-strong",Gg[d].selectButton,g&&Gg[d].multiSelect,"group disabled:outline-field-border-disabled [&:hover:has(:disabled)]:outline-field-border-disabled disabled:cursor-default",i),tabIndex:0,disabled:x,...l,...u(),children:[(0,C.jsxs)("div",{className:Ie("flex-1 grid items-center justify-start gap-1.5 overflow-hidden",f()&&"flex flex-wrap"),children:[M(),(g?!f()?.length:!f())&&(0,C.jsx)("div",{className:Ie("[grid-area:1/1/2/3] text-field-input px-1",Gg[d].displaySelected,Hg),children:n})]}),(0,C.jsx)("div",{className:Ie("flex items-center [&>svg]:shrink-0",Gg[d].icon),children:E()})]})]})});function rw({label:e,children:t,className:n,...r}){const{index:o,totalGroups:a}=r,{sizeValue:i}=tw();return(0,C.jsxs)(s.Fragment,{children:[(0,C.jsxs)("div",{className:"flex flex-col",role:"group","aria-label":e,children:[(0,C.jsx)("div",{className:Ie("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,C.jsx)("div",{className:"flex flex-col",role:"presentation","aria-labelledby":`group-${e?.toLowerCase().replace(/\s+/g,"-")}`,children:t})]}),o<a&&!!(t&&s.Children.count(t)>0)&&(0,C.jsx)("hr",{className:Ie("h-px my-2 w-full border-border-subtle border-b border-t-0 border-solid",$g[i])})]})}function ow({children:e,className:t}){const{isOpen:n,context:r,refs:o,combobox:a,floatingStyles:i,getFloatingProps:l,sizeValue:c,setSearchKeyword:d,setActiveIndex:u,setSelectedIndex:f,value:p,selected:m,getValues:h,searchKeyword:g,listContentRef:w,by:y,searchPlaceholder:b,activeIndex:v,searchFn:x,debounceDelay:N}=tw(),_=(0,s.useMemo)(()=>{const t=h();let n=-1;if(t){let r=s.Children.toArray(e);r.length>0&&(0,s.isValidElement)(r[0])&&r[0].type===rw&&(r=s.Children.toArray(e).map(e=>(0,s.isValidElement)(e)?s.Children.toArray(e.props.children):[]).flat()),n=r.findIndex(e=>{if(!(0,s.isValidElement)(e))return!1;const n=e.props.value;return"object"==typeof n&&"object"==typeof t?n[y]===t[y]:n===t})}return n},[p,m,e,y]);(0,s.useLayoutEffect)(()=>{n||(u(_),f(_))},[_,n]),(0,s.useLayoutEffect)(()=>{n&&(a&&[-1,null].includes(v)||u(-1))},[g,n]);const E=(0,s.useMemo)(()=>{let t=0,n=0;s.Children.forEach(e,e=>{if((0,s.isValidElement)(e)&&e.type===rw){let n=!1;if(g&&!x){const t=g.toLowerCase(),r=(e.props.label?.toLowerCase()||"").includes(t),o=s.Children.toArray(e.props.children).some(e=>!!(0,s.isValidElement)(e)&&(qg(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 s.Children.map(e,e=>{if(!(0,s.isValidElement)(e))return null;if(e.type===rw){let t=!1;if(g&&!x){const n=g.toLowerCase();t=(e.props.label?.toLowerCase()||"").includes(n)}const a=s.Children.map(e.props.children,e=>{if(!(0,s.isValidElement)(e))return null;if(t){const t={...e.props,index:r++};return(0,s.cloneElement)(e,t)}if(g&&!x){const t=qg(e.props.children)?.toLowerCase(),n=g.toLowerCase();if(!t?.includes(n))return null}const n={...e.props,index:r++};return(0,s.cloneElement)(e,n)});if(!a?.some(e=>null!==e))return null;const i={...e.props,children:a,index:o,totalGroups:n};return o++,(0,s.cloneElement)(e,i)}if(g&&!x){const t=qg(e.props?.children)?.toLowerCase(),n=g.toLowerCase();if(!t?.includes(n))return null}return(0,s.cloneElement)(e,{...e.props,index:r++})})},[g,p,m,e,x]),M=s.Children.count(E);(0,s.useEffect)(()=>{w.current=[];let t=s.Children.toArray(e);t&&(0,s.isValidElement)(t[0])&&t[0].type===rw&&(t=s.Children.toArray(t).map(e=>(0,s.isValidElement)(e)?e.props.children:null).filter(Boolean)),s.Children.forEach(t,e=>{if(!(0,s.isValidElement)(e))return;const t=qg(e.props?.children)?.toLowerCase();if(g&&!x){const e=g.toLowerCase();if(!t?.includes(e))return}w.current.push(t)})},[g,x]);const[I,S]=(0,s.useState)(!1),k=(0,s.useCallback)(async()=>{if(x&&"function"==typeof x&&!I){S(!0);try{await x(g)}catch(e){console.error(e)}finally{S(!1)}}},[g]),D=((e,t=500)=>{const n=(0,s.useRef)(null);return(0,s.useCallback)((...r)=>{n.current&&clearTimeout(n.current),n.current=setTimeout(()=>e(...r),t)},[e,t])})(k,N);return(0,s.useEffect)(()=>{"function"==typeof x&&D()},[D]),(0,C.jsx)(C.Fragment,{children:n&&(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Jr,{context:r,modal:!1,visuallyHiddenDismiss:!0,children:(0,C.jsxs)("div",{ref:o.setFloating,className:Ie("box-border [&_*]:box-border w-full bg-white outline-none shadow-lg outline outline-1 outline-border-subtle",a&&"grid grid-cols-1 grid-rows-[auto_1fr] divide-y divide-x-0 divide-solid divide-border-subtle",Gg[c].dropdown,!a&&"h-auto",a?"overflow-hidden":"overflow-y-auto overflow-x-hidden",t),style:{...i,zIndex:1},...l(),children:[a&&(0,C.jsxs)("div",{className:Ie(Gg[c].searchbarWrapper),children:[I?(0,C.jsx)(Kg,{className:Gg[c].searchbarIcon}):(0,C.jsx)(Wg,{className:Ie("text-icon-secondary shrink-0",Gg[c].searchbarIcon)}),(0,C.jsx)("input",{className:Ie("px-1 w-full placeholder:text-field-placeholder border-0 focus:outline-none focus:shadow-none",Gg[c].searchbar),type:"search",name:"keyword",placeholder:b,onChange:e=>d(e.target.value),value:g,autoComplete:"off"})]}),(0,C.jsxs)("div",{className:Ie("overflow-y-auto overflow-x-hidden",!a&&"w-full h-full",Gg[c].dropdownItemsWrapper),children:[!!M&&E,!M&&(0,C.jsx)("div",{className:Ie("p-2 text-center font-medium text-field-placeholder",Xg[c]),children:"No items found"})]})]})})})})}function aw({children:e,root:t,id:n}){return(0,C.jsx)(Yr,{id:n,root:t,children:e})}function iw({value:e,selected:t,children:n,className:r,...o}){const{sizeValue:a,getItemProps:i,onKeyDownItem:l,onClickItem:c,activeIndex:d,selectedIndex:u,updateListRef:f,getValues:p,by:m,multiple:h}=tw(),{index:g}=o,w=(0,s.useRef)(g),y=(0,s.useMemo)(()=>{if(!h)return!1;const t=p();return!!t&&t.some(t=>null!==t&&null!==e&&"object"==typeof t?t[m]===e[m]:t===e)},[e,p]),b=(0,s.useMemo)(()=>"boolean"==typeof t?t:h?y:g===u,[y,u,t]);return(0,C.jsxs)("div",{className:Ie("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",Xg[a],g===d&&"bg-button-tertiary-hover",r),ref:e=>{f(g,e)},role:"option",tabIndex:g===d?0:-1,"aria-selected":b&&g===d,...i({onClick(){c(w.current,e)},onKeyDown(t){l(t,w.current,e)}}),children:[(0,C.jsx)("span",{className:"w-full truncate",children:n}),b&&(0,C.jsx)(Lo,{className:Ie("text-icon-on-color-disabled",{sm:"size-4",md:"size-4",lg:"size-5"}[a])})]})}const sw=({id:e,size:t="md",value:n,defaultValue:r,onChange:o,by:a="id",children:i,multiple:l=!1,combobox:c=!1,disabled:d=!1,searchPlaceholder:u="Search...",searchFn:f,debounceDelay:p=500})=>{const m=(0,s.useMemo)(()=>e||`select-${Kh()}`,[e]),h=(0,s.useMemo)(()=>typeof n<"u",[n]),[g,w]=(0,s.useState)(r),[y,b]=(0,s.useState)(""),v=(0,s.useCallback)(()=>h?n:g,[h,n,g]),[x,N]=(0,s.useState)(!1),[_,E]=(0,s.useState)(null),[M,I]=(0,s.useState)(null),S={sm:c?256:172,md:c?256:216,lg:c?256:216},{refs:k,floatingStyles:D,context:j}=co({strategy:"fixed",placement:"bottom-start",open:x,onOpenChange:N,whileElementsMounted:Cn,middleware:[Un(5),Fn({padding:10}),Qn({apply({rects:e,elements:n,availableHeight:r}){Object.assign(n.floating.style,{maxHeight:`min(${r}px, ${S[t]}px)`,maxWidth:`${e.reference.width}px`})},padding:10})]}),A=(0,s.useRef)([]),T=(0,s.useRef)([]),L=(0,s.useRef)(!1),O=oo(j,{event:"mousedown"}),z=lo(j),P=No(j,{role:"listbox"}),R=vo(j,{listRef:A,activeIndex:_,selectedIndex:M,onNavigate:E,loop:!0}),U=function(e,t){var n;const{open:r,dataRef:o}=e,{listRef:a,activeIndex:i,onMatch:l,onTypingChange:c,enabled:d=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:m=null}=t,h=s.useRef(),g=s.useRef(""),w=s.useRef(null!=(n=null!=m?m:i)?n:-1),y=s.useRef(null),b=Wn(l),v=Wn(c),x=vr(u),N=vr(p);ar(()=>{r&&(clearTimeout(h.current),y.current=null,g.current="")},[r]),ar(()=>{var e;r&&""===g.current&&(w.current=null!=(e=null!=m?m:i)?e:-1)},[r,m,i]);const _=Wn(e=>{e?o.current.typing||(o.current.typing=e,v(e)):o.current.typing&&(o.current.typing=e,v(e))}),E=Wn(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(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?_(!1):" "===e.key&&Nt(e)),null==n||N.current.includes(e.key)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&(Nt(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())})&&g.current===e.key&&(g.current="",w.current=y.current),g.current+=e.key,clearTimeout(h.current),h.current=setTimeout(()=>{g.current="",w.current=y.current,_(!1)},f);const o=w.current,i=t(n,[...n.slice((o||0)+1),...n.slice(0,(o||0)+1)],g.current);-1!==i?(b(i),y.current=i):" "!==e.key&&(g.current="",_(!1))}),M=s.useMemo(()=>({onKeyDown:E}),[E]),I=s.useMemo(()=>({onKeyDown:E,onKeyUp(e){" "===e.key&&_(!1)}}),[E,_]);return s.useMemo(()=>d?{reference:M,floating:I}:{},[d,M,I])}(j,{listRef:T,activeIndex:_,selectedIndex:M,onMatch:x?E:I,onTypingChange(e){L.current=e}}),{getReferenceProps:B,getFloatingProps:F,getItemProps:Q}=mo([z,P,R,O,...c?[]:[U]]),V=(e,t)=>{if(l)return((e,t)=>{const n=[...v()??[]];-1===n.findIndex(e=>null!==e&&null!==t&&"object"==typeof e?e[a]===t[a]:e===t)&&(n.push(t),h||w(n),I(e),k.reference.current.focus(),N(!1),b(""),"function"==typeof o&&o(n))})(e,t);I(e),h||w(t),k.reference.current.focus(),N(!1),b(""),"function"==typeof o&&o(t)},Y=(0,s.useCallback)((e,t)=>{A.current[e]=t},[]);return(0,C.jsx)(ew.Provider,{value:{selectedIndex:M,setSelectedIndex:I,activeIndex:_,setActiveIndex:E,selected:g,setSelected:w,handleSelect:V,combobox:c,sizeValue:t,multiple:l,onChange:o,isTypingRef:L,getItemProps:Q,onClickItem:(e,t)=>{V(e,t)},onKeyDownItem:(e,t,n)=>{"Enter"===e.key&&(e.preventDefault(),V(t,n))," "===e.key&&!L.current&&(e.preventDefault(),V(t,n))},getValues:v,selectId:m,getReferenceProps:B,isOpen:x,value:n,updateListRef:Y,refs:k,listContentRef:T,by:a,getFloatingProps:F,floatingStyles:D,context:j,searchKeyword:y,setSearchKeyword:b,disabled:d,isControlled:h,searchPlaceholder:u,searchFn:f,debounceDelay:p},children:i})};sw.displayName="Select";const lw=Object.assign(sw,{Portal:aw,Button:nw,Options:ow,Option:iw,OptionGroup:rw});aw.displayName="Select.Portal",nw.displayName="Select.Button",ow.displayName="Select.Options",iw.displayName="Select.Option",rw.displayName="Select.OptionGroup";const cw=function(e){const{name:t,id:n,label:r,desc:o,tooltip:a,options:l,onSelect:c,prodata:d,after:u,sectionClass:f="",wrapperClass:p="",contentClass:m="",labelClass:h="",descClass:g="",displayAlign:w="horizontal",isDisabled:y=!1}=e,[b,v]=(0,s.useState)(e.value),x=(0,s.useRef)(null),N=f||"text-left",_=h||"text-sm font-medium text-text-primary mb-2",E=g||"text-sm font-normal text-text-tertiary mt-2";let M=p||"flex items-center gap-2.5",I=m||"";return"horizontal_inline"===w?(M="flex items-center justify-between gap-2.5",I="w-[300px]"):"horizontal"!==w&&(M="block w-full text-left"),(0,s.useEffect)(()=>{v(e.value),x.current&&(x.current.value=e.value)},[e.value]),(0,i.createElement)("div",{className:`wcf-field wcf-select-option ${N}`},(0,i.createElement)("div",{className:`wcf-field__data ${M}`},r&&(0,i.createElement)("div",{className:`wcf-field__data--label ${_}`},(0,i.createElement)("label",null,r,a&&(0,i.createElement)(uM,{text:a}))),(0,i.createElement)("div",{className:`wcf-field__data--content ${I}`},(0,i.createElement)("input",{type:"hidden",ref:x,id:n,name:t,defaultValue:b,className:e.class?e.class:""}),(0,i.createElement)(lw,{value:b,onChange:function(n){if(d&&n in d)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),c&&c(r)},disabled:y},(0,i.createElement)(lw.Button,{type:"button",className:e.class?e.class:"",render:function(e){if(!e)return null;for(const t of l||[])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 d&&e in d?d[e]:t.label;return e}}),(0,i.createElement)(lw.Options,null,l&&l.map(e=>{if(e.isopt)return(0,i.createElement)(lw.OptionGroup,{label:e.title,key:e.title},e.options.map(e=>(0,i.createElement)(lw.Option,{value:e.value,key:e.value},e.label)));let t=e.label,n=!1;return d&&e.value in d&&(t=d[e.value],n=!0),(0,i.createElement)(lw.Option,{value:e.value,key:e.value,className:n?"opacity-50 pointer-events-none":""},t)})))),u&&(0,i.createElement)("div",{className:`wcf-field__data--content__after ${E}`},u)),o&&(0,i.createElement)("div",{className:`wcf-field__desc ${E}`},Wm(o)))},dw=function(e){const{name:t,id:n,label:r,value:o,placeholder:a,tooltip:l,desc:c,readonly:d,icon:u,textFieldType:f="text",onChangeCB:p,sectionClass:m=!1,wrapperClass:h=!1,contentClass:g,labelClass:w="",descClass:y="text-sm font-normal text-text-tertiary mt-2",displayAlign:b="horizontal",attr:v}=e,[x,N]=(0,s.useState)(o),_=(0,s.useRef)(null),E=m||"text-left",M=`${e.class?e.class:""} ${d?"bg-background-secondary":""} w-full`;let I=h||"flex items-center justify-between gap-2.5",S=w||"text-sm font-medium text-text-primary text-left";const k=null!=g?g:r&&"horizontal"===b?"w-1/2":"w-full";return"horizontal"!==b&&(I="block w-full text-left",S+=" mb-2"),(0,s.useEffect)(()=>{N(o),_.current&&(_.current.value=null!=o?o:"")},[o]),(0,i.createElement)("div",{className:`wcf-field wcf-text-field ${E} `},(0,i.createElement)("div",{className:`wcf-field__data ${I}`},r&&(0,i.createElement)("div",{className:`wcf-field__data--label ${S}`},(0,i.createElement)("label",{className:"whitespace-nowrap"},r,l&&(0,i.createElement)(uM,{text:l}))),(0,i.createElement)("div",{className:`wcf-field__data--content ${k}`},(0,i.createElement)("input",{type:"hidden",ref:_,className:e.class?e.class:"",defaultValue:null!=x?x:""}),(0,i.createElement)(tg,{ref:v?.ref,type:f,value:lm(x),id:n,name:t,onChange:function(e){N(e),_.current&&(_.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),p&&p(e)},placeholder:a,readOnly:d,size:"md",className:M}))),u&&(0,i.createElement)("div",{className:"wcf-text-field__icon"},(0,i.createElement)("span",{className:u})),c&&(0,i.createElement)("div",{className:`wcf-field__desc ${y}`},Wm(c)))},uw=(0,s.forwardRef)(({id:e,defaultValue:t="",value:n,size:r="sm",className:o="",disabled:a=!1,onChange:i=()=>{},error:l=!1,onError:c=()=>{},...d},u)=>{const f=(0,s.useMemo)(()=>e||`input-textarea-${Kh()}`,[e]),p=(0,s.useMemo)(()=>typeof n<"u",[n]),[m,h]=(0,s.useState)(t),g=(0,s.useCallback)(()=>p?n:m,[p,n,m]),w=a?"hover:border-border-disabled":"hover:border-border-strong",y=l?"focus:border-focus-error-border focus:ring-field-color-error border-focus-error-border":"";return(0,C.jsx)("textarea",{ref:u,id:f,className:Ie("py-2 rounded border border-solid border-border-subtle bg-field-secondary-background font-normal placeholder-text-tertiary text-text-primary focus:outline-none transition ease-in-out duration-200",a?"border-border-disabled bg-field-background-disabled cursor-not-allowed text-text-disabled":"",{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",w,y,o),disabled:a,onChange:e=>{if(a)return;const t=e.target.value;p||h(t),"function"==typeof i&&i(t)},onInvalid:c,value:g(),...d})});uw.displayName="TextArea";const fw=function(e){const{name:t,value:n,label:r,desc:o,id:a,placeholder:l,tooltip:c,rows:d,cols:u,sectionClass:f=!1,wrapperClass:p=!1,labelClass:m="",descClass:h="text-sm font-normal text-text-tertiary mt-2",displayAlign:g="horizontal"}=e,w=f||"text-left",y=`${e.class?e.class:""} !w-full !max-w-full input-field !px-3 !py-2.5 !text-sm font-normal`;let b=p||"flex flex-col gap-2.5",v=m||"text-sm font-medium text-text-primary text-left mb-2";"horizontal"!==g&&(b="block w-full text-left",v+=" mb-2");const[x,N]=(0,s.useState)(n);return(0,s.useEffect)(()=>{N(n)},[n]),(0,i.createElement)("div",{className:`wcf-field wcf-textarea-field ${w} `},(0,i.createElement)("div",{className:`wcf-field__data ${b}`},r&&(0,i.createElement)("div",{className:`wcf-field__data--label ${v}`},(0,i.createElement)("label",null,r,c&&(0,i.createElement)(uM,{text:c}))),(0,i.createElement)("div",{className:"wcf-field__data--content w-full"},(0,i.createElement)(uw,{id:a,name:t,value:lm(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:l,rows:d||"10",cols:u||"60",className:y}))),o&&(0,i.createElement)("div",{className:`wcf-field__desc ${h}`},Wm(o)))},pw=function(e){const{name:t,value:n,label:r,id:o,tooltip:a,displayAlign:l="horizontal",language:c="javascript",sectionClass:d=!1,wrapperClass:u=!1,labelClass:f=""}=e,p=function(e){if(!e)return e;const t=document.createElement("textarea");return t.innerHTML=e,t.value}(n),m=(0,s.useRef)(null),h=(0,s.useRef)(null),g=(0,s.useRef)(null);(0,s.useEffect)(()=>{if(!m.current||!window.wp?.codeEditor||h.current)return;const e=wp.codeEditor.defaultSettings?JSON.parse(JSON.stringify(wp.codeEditor.defaultSettings)):{};let n;e.codemirror={...e.codemirror,mode:"css"===c?"css":"javascript",lineNumbers:!0,indentUnit:4,tabSize:4};try{n=wp.codeEditor.initialize(m.current,e),h.current=n.codemirror}catch(e){return}h.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&&h.current&&h.current.refresh()})},{threshold:.1});return g.current&&r.observe(g.current),()=>{h.current&&(h.current.toTextArea(),h.current=null),r.disconnect()}},[]);const w=d||"text-left",y=f||"text-sm font-medium text-text-primary text-left mb-2";let b=u||"flex items-center gap-2.5";return"horizontal"!==l&&(b="block w-full text-left"),(0,i.createElement)("div",{ref:g,className:`wcf-field wcf-code-field ${w}`},(0,i.createElement)("div",{className:`wcf-field__data ${b}`},r&&(0,i.createElement)("div",{className:`wcf-field__data--label ${y}`},(0,i.createElement)("label",{htmlFor:o},r,a&&(0,i.createElement)(uM,{text:a}))),(0,i.createElement)("div",{className:"wcf-field__data--content"},(0,i.createElement)("textarea",{ref:m,id:o,name:t,defaultValue:p}))))};function mw({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const hw=s.forwardRef(mw);function gw({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const ww=s.forwardRef(gw),yw=(0,s.forwardRef)((e,t)=>{const[{settingsProcess:n},r]=u();"saved"===n&&setTimeout(()=>{document.getElementsByClassName("wcf-button--save-global-settings")[0].blur(),r({status:"RESET"})},2e3);const o=e.icon?e.icon:"",a=e.iconClass?e.iconClass:"",s=e.className||e.class||"",l="processing"===n?"wcf-disabled":"";return(0,i.createElement)("div",{className:"wcf-field wcf-submit wcf-submit-field"},(0,i.createElement)(Po,{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,i.createElement)(Th,{className:a});switch(o){case"plus":return(0,i.createElement)(yg,{className:`w-4 h-4 stroke-2 ${a}`});case"loader":return(0,i.createElement)(zf,{className:`w-4 h-4 stroke-2 ${a}`});case"close":return(0,i.createElement)(ww,{className:`w-4 h-4 stroke-2 ${a}`});case"check":return(0,i.createElement)(hw,{className:`w-4 h-4 stroke-2 ${a}`});default:return null}}()},"saved"===n&&(0,i.createElement)("span",{className:"wcf-success-notice"},(0,i.createElement)(hw,{className:"w-4 h-4 stroke-2 inline-block mr-1"}),(0,i.createElement)("span",{className:"wcf-success-message"},(0,D.__)("Settings Saved","cartflows"))),"processing"===n&&(0,D.__)("Saving…","cartflows"),!n&&(0,D.__)("Save Settings","cartflows")))}),bw=yw;function vw(e){return vw="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},vw(e)}function xw(e){var t=function(e){if("object"!=vw(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=vw(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==vw(t)?t:t+""}function Nw(e,t,n){return(t=xw(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _w(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 Ew(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_w(Object(n),!0).forEach(function(t){Nw(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_w(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Mw(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,xw(r.key),r)}}var Iw=n(3662);function Sw(e){return Sw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sw(e)}function kw(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(kw=function(){return!!e})()}function Dw(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 Cw(e,t){if(e){if("string"==typeof e)return Dw(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)?Dw(e,t):void 0}}function jw(e){return function(e){if(Array.isArray(e))return Dw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Cw(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 Aw=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}(),Tw=Math.abs,Lw=String.fromCharCode,Ow=Object.assign;function zw(e){return e.trim()}function Pw(e,t,n){return e.replace(t,n)}function Rw(e,t){return e.indexOf(t)}function Uw(e,t){return 0|e.charCodeAt(t)}function Bw(e,t,n){return e.slice(t,n)}function Fw(e){return e.length}function Qw(e){return e.length}function Vw(e,t){return t.push(e),e}var Yw=1,Zw=1,Ww=0,Gw=0,Hw=0,$w="";function Xw(e,t,n,r,o,a,i){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Yw,column:Zw,length:i,return:""}}function qw(e,t){return Ow(Xw("",null,null,"",null,null,0),e,{length:-e.length},t)}function Jw(){return Hw=Gw>0?Uw($w,--Gw):0,Zw--,10===Hw&&(Zw=1,Yw--),Hw}function Kw(){return Hw=Gw<Ww?Uw($w,Gw++):0,Zw++,10===Hw&&(Zw=1,Yw++),Hw}function ey(){return Uw($w,Gw)}function ty(){return Gw}function ny(e,t){return Bw($w,e,t)}function ry(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 oy(e){return Yw=Zw=1,Ww=Fw($w=e),Gw=0,[]}function ay(e){return $w="",e}function iy(e){return zw(ny(Gw-1,cy(91===e?e+2:40===e?e+1:e)))}function sy(e){for(;(Hw=ey())&&Hw<33;)Kw();return ry(e)>2||ry(Hw)>3?"":" "}function ly(e,t){for(;--t&&Kw()&&!(Hw<48||Hw>102||Hw>57&&Hw<65||Hw>70&&Hw<97););return ny(e,ty()+(t<6&&32==ey()&&32==Kw()))}function cy(e){for(;Kw();)switch(Hw){case e:return Gw;case 34:case 39:34!==e&&39!==e&&cy(Hw);break;case 40:41===e&&cy(e);break;case 92:Kw()}return Gw}function dy(e,t){for(;Kw()&&e+Hw!==57&&(e+Hw!==84||47!==ey()););return"/*"+ny(t,Gw-1)+"*"+Lw(47===e?e:Kw())}function uy(e){for(;!ry(ey());)Kw();return ny(e,Gw)}var fy="-ms-",py="-moz-",my="-webkit-",hy="comm",gy="rule",wy="decl",yy="@keyframes";function by(e,t){for(var n="",r=Qw(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function vy(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case wy:return e.return=e.return||e.value;case hy:return"";case yy:return e.return=e.value+"{"+by(e.children,r)+"}";case gy:e.value=e.props.join(",")}return Fw(n=by(e.children,r))?e.return=e.value+"{"+n+"}":""}function xy(e){return ay(Ny("",null,null,null,[""],e=oy(e),0,[0],e))}function Ny(e,t,n,r,o,a,i,s,l){for(var c=0,d=0,u=i,f=0,p=0,m=0,h=1,g=1,w=1,y=0,b="",v=o,x=a,N=r,_=b;g;)switch(m=y,y=Kw()){case 40:if(108!=m&&58==Uw(_,u-1)){-1!=Rw(_+=Pw(iy(y),"&","&\f"),"&\f")&&(w=-1);break}case 34:case 39:case 91:_+=iy(y);break;case 9:case 10:case 13:case 32:_+=sy(m);break;case 92:_+=ly(ty()-1,7);continue;case 47:switch(ey()){case 42:case 47:Vw(Ey(dy(Kw(),ty()),t,n),l);break;default:_+="/"}break;case 123*h:s[c++]=Fw(_)*w;case 125*h:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+d:-1==w&&(_=Pw(_,/\f/g,"")),p>0&&Fw(_)-u&&Vw(p>32?My(_+";",r,n,u-1):My(Pw(_," ","")+";",r,n,u-2),l);break;case 59:_+=";";default:if(Vw(N=_y(_,t,n,c,d,o,s,b,v=[],x=[],u),a),123===y)if(0===d)Ny(_,t,N,N,v,a,u,s,x);else switch(99===f&&110===Uw(_,3)?100:f){case 100:case 108:case 109:case 115:Ny(e,N,N,r&&Vw(_y(e,N,N,0,0,o,s,b,o,v=[],u),x),o,x,u,s,r?v:x);break;default:Ny(_,N,N,N,[""],x,0,s,x)}}c=d=p=0,h=w=1,b=_="",u=i;break;case 58:u=1+Fw(_),p=m;default:if(h<1)if(123==y)--h;else if(125==y&&0==h++&&125==Jw())continue;switch(_+=Lw(y),y*h){case 38:w=d>0?1:(_+="\f",-1);break;case 44:s[c++]=(Fw(_)-1)*w,w=1;break;case 64:45===ey()&&(_+=iy(Kw())),f=ey(),d=u=Fw(b=_+=uy(ty())),y++;break;case 45:45===m&&2==Fw(_)&&(h=0)}}return a}function _y(e,t,n,r,o,a,i,s,l,c,d){for(var u=o-1,f=0===o?a:[""],p=Qw(f),m=0,h=0,g=0;m<r;++m)for(var w=0,y=Bw(e,u+1,u=Tw(h=i[m])),b=e;w<p;++w)(b=zw(h>0?f[w]+" "+y:Pw(y,/&\f/g,f[w])))&&(l[g++]=b);return Xw(e,t,n,0===o?gy:s,l,c,d)}function Ey(e,t,n){return Xw(e,t,n,hy,Lw(Hw),Bw(e,2,-2),0)}function My(e,t,n,r){return Xw(e,t,n,wy,Bw(e,0,r),Bw(e,r+1,-1),r)}var Iy=function(e,t,n){for(var r=0,o=0;r=o,o=ey(),38===r&&12===o&&(t[n]=1),!ry(o);)Kw();return ny(e,Gw)},Sy=new WeakMap,ky=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)||Sy.get(n))&&!r){Sy.set(e,!0);for(var o=[],a=function(e,t){return ay(function(e,t){var n=-1,r=44;do{switch(ry(r)){case 0:38===r&&12===ey()&&(t[n]=1),e[n]+=Iy(Gw-1,t,n);break;case 2:e[n]+=iy(r);break;case 4:if(44===r){e[++n]=58===ey()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Lw(r)}}while(r=Kw());return e}(oy(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]}}},Dy=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Cy(e,t){switch(function(e,t){return 45^Uw(e,0)?(((t<<2^Uw(e,0))<<2^Uw(e,1))<<2^Uw(e,2))<<2^Uw(e,3):0}(e,t)){case 5103:return my+"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 my+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return my+e+py+e+fy+e+e;case 6828:case 4268:return my+e+fy+e+e;case 6165:return my+e+fy+"flex-"+e+e;case 5187:return my+e+Pw(e,/(\w+).+(:[^]+)/,my+"box-$1$2"+fy+"flex-$1$2")+e;case 5443:return my+e+fy+"flex-item-"+Pw(e,/flex-|-self/,"")+e;case 4675:return my+e+fy+"flex-line-pack"+Pw(e,/align-content|flex-|-self/,"")+e;case 5548:return my+e+fy+Pw(e,"shrink","negative")+e;case 5292:return my+e+fy+Pw(e,"basis","preferred-size")+e;case 6060:return my+"box-"+Pw(e,"-grow","")+my+e+fy+Pw(e,"grow","positive")+e;case 4554:return my+Pw(e,/([^-])(transform)/g,"$1"+my+"$2")+e;case 6187:return Pw(Pw(Pw(e,/(zoom-|grab)/,my+"$1"),/(image-set)/,my+"$1"),e,"")+e;case 5495:case 3959:return Pw(e,/(image-set\([^]*)/,my+"$1$`$1");case 4968:return Pw(Pw(e,/(.+:)(flex-)?(.*)/,my+"box-pack:$3"+fy+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+my+e+e;case 4095:case 3583:case 4068:case 2532:return Pw(e,/(.+)-inline(.+)/,my+"$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(Fw(e)-1-t>6)switch(Uw(e,t+1)){case 109:if(45!==Uw(e,t+4))break;case 102:return Pw(e,/(.+:)(.+)-([^]+)/,"$1"+my+"$2-$3$1"+py+(108==Uw(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Rw(e,"stretch")?Cy(Pw(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Uw(e,t+1))break;case 6444:switch(Uw(e,Fw(e)-3-(~Rw(e,"!important")&&10))){case 107:return Pw(e,":",":"+my)+e;case 101:return Pw(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+my+(45===Uw(e,14)?"inline-":"")+"box$3$1"+my+"$2$3$1"+fy+"$2box$3")+e}break;case 5936:switch(Uw(e,t+11)){case 114:return my+e+fy+Pw(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return my+e+fy+Pw(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return my+e+fy+Pw(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return my+e+fy+e+e}return e}var jy=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case wy:e.return=Cy(e.value,e.length);break;case yy:return by([qw(e,{value:Pw(e.value,"@","@"+my)})],r);case gy: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 by([qw(e,{props:[Pw(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return by([qw(e,{props:[Pw(t,/:(plac\w+)/,":"+my+"input-$1")]}),qw(e,{props:[Pw(t,/:(plac\w+)/,":-moz-$1")]}),qw(e,{props:[Pw(t,/:(plac\w+)/,fy+"input-$1")]})],r)}return""})}}],Ay=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||jy,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,d,u,f=[vy,(u=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&u(e)})],p=(c=[ky,Dy].concat(a,f),d=Qw(c),function(e,t,n,r){for(var o="",a=0;a<d;a++)o+=c[a](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,by(xy(e?e+"{"+t.styles+"}":t.styles),p),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new Aw({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},Ty=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},Ly={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 Oy(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var zy=/[A-Z]|^ms/g,Py=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Ry=function(e){return 45===e.charCodeAt(1)},Uy=function(e){return null!=e&&"boolean"!=typeof e},By=Oy(function(e){return Ry(e)?e:e.replace(zy,"-$&").toLowerCase()}),Fy=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Py,function(e,t,n){return Vy={name:t,styles:n,next:Vy},t})}return 1===Ly[e]||Ry(e)||"number"!=typeof t||0===t?t:t+"px"};function Qy(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 Vy={name:o.name,styles:o.styles,next:Vy},o.name;var a=n;if(void 0!==a.styles){var i=a.next;if(void 0!==i)for(;void 0!==i;)Vy={name:i.name,styles:i.styles,next:Vy},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+=Qy(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]+"}":Uy(s)&&(r+=By(a)+":"+Fy(a,s)+";")}else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var l=Qy(e,t,i);switch(a){case"animation":case"animationName":r+=By(a)+":"+l+";";break;default:r+=a+"{"+l+"}"}}else for(var c=0;c<i.length;c++)Uy(i[c])&&(r+=By(a)+":"+Fy(a,i[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=Vy,l=n(e);return Vy=s,Qy(e,t,l)}}var c=n;if(null==t)return c;var d=t[c];return void 0!==d?d:c}var Vy,Yy=/label:\s*([^\s;{]+)\s*(;|$)/g;function Zy(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="";Vy=void 0;var a=e[0];null==a||void 0===a.raw?(r=!1,o+=Qy(n,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=Qy(n,t,e[i]),r&&(o+=a[i]);Yy.lastIndex=0;for(var s,l="";null!==(s=Yy.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:Vy}}var Wy,Gy,Hy=!!s.useInsertionEffect&&s.useInsertionEffect,$y=Hy||function(e){return e()},Xy=(Hy||s.useLayoutEffect,s.createContext("undefined"!=typeof HTMLElement?Ay({key:"css"}):null)),qy=(Xy.Provider,function(e){return(0,s.forwardRef)(function(t,n){var r=(0,s.useContext)(Xy);return e(t,r,n)})}),Jy=s.createContext({}),Ky={}.hasOwnProperty,eb="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",tb=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return Ty(t,n,r),$y(function(){return function(e,t,n){Ty(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},nb=qy(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[eb],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 l=Zy(a,void 0,s.useContext(Jy));i+=t.key+"-"+l.name;var c={};for(var d in e)Ky.call(e,d)&&"css"!==d&&d!==eb&&(c[d]=e[d]);return c.className=i,n&&(c.ref=n),s.createElement(s.Fragment,null,s.createElement(tb,{cache:t,serialized:l,isStringTag:"string"==typeof o}),s.createElement(o,c))}),rb=nb,ob=(n(4146),function(e,t){var n=arguments;if(null==t||!Ky.call(t,"css"))return s.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=rb,o[1]=function(e,t){var n={};for(var r in t)Ky.call(t,r)&&(n[r]=t[r]);return n[eb]=e,n}(e,t);for(var a=2;a<r;a++)o[a]=n[a];return s.createElement.apply(null,o)});function ab(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zy(t)}function ib(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)||Cw(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 sb(e,t){if(null==e)return{};var n,r,o=(0,y.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}Wy=ob||(ob={}),Gy||(Gy=Wy.JSX||(Wy.JSX={}));var lb=s.useLayoutEffect,cb=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],db=function(){};function ub(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function fb(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(ub(e,i)));return a.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var pb=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===vw(e)&&null!==e?[e]:[];var t},mb=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,Ew({},sb(e,cb))},hb=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 gb(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function wb(e){return gb(e)?window.pageYOffset:e.scrollTop}function yb(e,t){gb(e)?window.scrollTo(0,t):e.scrollTop=t}function bb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:db,o=wb(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);yb(e,s),i<n?window.requestAnimationFrame(t):r(e)}()}function vb(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?yb(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&yb(e,Math.max(t.offsetTop-o,0))}function xb(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Nb=!1,_b={get passive(){return Nb=!0}},Eb="undefined"!=typeof window?window:{};Eb.addEventListener&&Eb.removeEventListener&&(Eb.addEventListener("p",db,_b),Eb.removeEventListener("p",db,!1));var Mb=Nb;function Ib(e){return null!=e}function Sb(e,t,n){return e?t:n}var kb=["children","innerProps"],Db=["children","innerProps"];var Cb,jb=function(e){return"auto"===e?"bottom":e},Ab=(0,s.createContext)(null),Tb=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,a=e.menuPosition,i=e.menuShouldScrollIntoView,l=e.theme,c=((0,s.useContext)(Ab)||{}).setPortalPlacement,d=(0,s.useRef)(null),u=ib((0,s.useState)(r),2),f=u[0],p=u[1],m=ib((0,s.useState)(null),2),h=m[0],g=m[1],w=l.spacing.controlHeight;return lb(function(){var e=d.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 d,u=l.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,m=f.height,h=f.top,g=n.offsetParent.getBoundingClientRect().top,w=i||gb(d=l)?window.innerHeight:d.clientHeight,y=wb(l),b=parseInt(getComputedStyle(n).marginBottom,10),v=parseInt(getComputedStyle(n).marginTop,10),x=g-v,N=w-h,_=x+y,E=u-y-h,M=p-w+y+b,I=y+h-v,S=160;switch(o){case"auto":case"bottom":if(N>=m)return{placement:"bottom",maxHeight:t};if(E>=m&&!i)return a&&bb(l,M,S),{placement:"bottom",maxHeight:t};if(!i&&E>=r||i&&N>=r)return a&&bb(l,M,S),{placement:"bottom",maxHeight:i?N-b:E-b};if("auto"===o||i){var k=t,D=i?x:_;return D>=r&&(k=Math.min(D-b-s,t)),{placement:"top",maxHeight:k}}if("bottom"===o)return a&&yb(l,M),{placement:"bottom",maxHeight:t};break;case"top":if(x>=m)return{placement:"top",maxHeight:t};if(_>=m&&!i)return a&&bb(l,I,S),{placement:"top",maxHeight:t};if(!i&&_>=r||i&&x>=r){var C=t;return(!i&&_>=r||i&&x>=r)&&(C=i?x-v:_-v),a&&bb(l,I,S),{placement:"top",maxHeight:C}}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:w});p(s.maxHeight),g(s.placement),null==c||c(s.placement)}},[r,o,a,i,n,c,w]),t({ref:d,placerProps:Ew(Ew({},e),{},{placement:h||jb(o),maxHeight:f})})},Lb=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return Ew({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Ob=Lb,zb=Lb,Pb=["size"],Rb=["innerProps","isRtl","size"],Ub={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Bb=function(e){var t=e.size,n=sb(e,Pb);return ob("svg",(0,w.A)({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:Ub},n))},Fb=function(e){return ob(Bb,(0,w.A)({size:20},e),ob("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"}))},Qb=function(e){return ob(Bb,(0,w.A)({size:20},e),ob("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"}))},Vb=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,a=r.colors;return Ew({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?a.neutral60:a.neutral20,padding:2*o,":hover":{color:n?a.neutral80:a.neutral40}})},Yb=Vb,Zb=Vb,Wb=function(){var e=ab.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_"}}}(Cb||(Cb=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"]))),Gb=function(e){var t=e.delay,n=e.offset;return ob("span",{css:ab({animation:"".concat(Wb," 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"},"","")})},Hb=["data"],$b=["innerRef","isDisabled","isHidden","inputClassName"],Xb={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},qb={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Ew({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Xb)},Jb=function(e){return Ew({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},Xb)},Kb=function(e){var t=e.children,n=e.innerProps;return ob("div",n,t)},ev={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return ob("div",(0,w.A)({},hb(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||ob(Fb,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,a=e.innerProps,i=e.menuIsOpen;return ob("div",(0,w.A)({ref:o},hb(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 ob("div",(0,w.A)({},hb(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||ob(Qb,null))},DownChevron:Qb,CrossIcon:Fb,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,d=e.selectProps;return ob("div",(0,w.A)({},hb(e,"group",{group:!0}),s),ob(a,(0,w.A)({},i,{selectProps:d,theme:c,getStyles:r,getClassNames:o,cx:n}),l),ob("div",null,t))},GroupHeading:function(e){var t=mb(e);t.data;var n=sb(t,Hb);return ob("div",(0,w.A)({},hb(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return ob("div",(0,w.A)({},hb(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return ob("span",(0,w.A)({},t,hb(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=mb(e),o=r.innerRef,a=r.isDisabled,i=r.isHidden,s=r.inputClassName,l=sb(r,$b);return ob("div",(0,w.A)({},hb(e,"input",{"input-container":!0}),{"data-value":n||""}),ob("input",(0,w.A)({className:t({input:!0},s),ref:o,style:Jb(i),disabled:a},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,a=sb(e,Rb);return ob("div",(0,w.A)({},hb(Ew(Ew({},a),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),ob(Gb,{delay:0,offset:n}),ob(Gb,{delay:160,offset:!0}),ob(Gb,{delay:320,offset:!n}))},Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return ob("div",(0,w.A)({},hb(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 ob("div",(0,w.A)({},hb(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,l=(0,s.useRef)(null),c=(0,s.useRef)(null),d=ib((0,s.useState)(jb(a)),2),u=d[0],f=d[1],p=(0,s.useMemo)(function(){return{setPortalPlacement:f}},[]),m=ib((0,s.useState)(null),2),h=m[0],g=m[1],y=(0,s.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==h?void 0:h.offset)&&e.left===(null==h?void 0:h.rect.left)&&e.width===(null==h?void 0:h.rect.width)||g({offset:n,rect:e})}},[r,i,u,null==h?void 0:h.offset,null==h?void 0:h.rect.left,null==h?void 0:h.rect.width]);lb(function(){y()},[y]);var b=(0,s.useCallback)(function(){"function"==typeof c.current&&(c.current(),c.current=null),r&&l.current&&(c.current=Cn(r,l.current,y,{elementResize:"ResizeObserver"in window}))},[r,y]);lb(function(){b()},[b]);var v=(0,s.useCallback)(function(e){l.current=e,b()},[b]);if(!t&&"fixed"!==i||!h)return null;var x=ob("div",(0,w.A)({ref:v},hb(Ew(Ew({},e),{},{offset:h.offset,position:i,rect:h.rect}),"menuPortal",{"menu-portal":!0}),o),n);return ob(Ab.Provider,{value:p},t?(0,cn.createPortal)(x,t):x)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=sb(e,Db);return ob("div",(0,w.A)({},hb(Ew(Ew({},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=sb(e,kb);return ob("div",(0,w.A)({},hb(Ew(Ew({},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,d=n.Remove;return ob(l,{data:r,innerProps:Ew(Ew({},hb(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:s},ob(c,{data:r,innerProps:Ew({},hb(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),ob(d,{data:r,innerProps:Ew(Ew({},hb(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},i),selectProps:s}))},MultiValueContainer:Kb,MultiValueLabel:Kb,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return ob("div",(0,w.A)({role:"button"},n),t||ob(Fb,{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 ob("div",(0,w.A)({},hb(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 ob("div",(0,w.A)({},hb(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return ob("div",(0,w.A)({},hb(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return ob("div",(0,w.A)({},hb(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 ob("div",(0,w.A)({},hb(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},tv=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function nv(e,t){return e===t||!(!tv(e)||!tv(t))}function rv(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!nv(e[n],t[n]))return!1;return!0}for(var ov={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"},av=function(e){return ob("span",(0,w.A)({css:ov},e))},iv={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,d=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(d(i,n),".");if("menu"===t&&c){var u=s?" disabled":"",f="".concat(l?" selected":"").concat(u);return"".concat(a).concat(f,", ").concat(d(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},sv=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,a=e.isFocused,i=e.selectValue,l=e.selectProps,c=e.id,d=e.isAppleDevice,u=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,m=l.isMulti,h=l.isOptionDisabled,g=l.isSearchable,w=l.menuIsOpen,y=l.options,b=l.screenReaderStatus,v=l.tabSelectsValue,x=l.isLoading,N=l["aria-label"],_=l["aria-live"],E=(0,s.useMemo)(function(){return Ew(Ew({},iv),u||{})},[u]),M=(0,s.useMemo)(function(){var e,n="";if(t&&E.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),d=c?f(c):"",u=o||s||void 0,p=u?u.map(f):[],m=Ew({isDisabled:c&&h(c,i),label:d,labels:p},t);n=E.onChange(m)}return n},[t,E,h,i,f]),I=(0,s.useMemo)(function(){var e="",t=n||r,a=!!(n&&i&&i.includes(n));if(t&&E.onFocus){var s={focused:t,label:f(t),isDisabled:h(t,i),isSelected:a,options:o,context:t===n?"menu":"value",selectValue:i,isAppleDevice:d};e=E.onFocus(s)}return e},[n,r,f,h,E,o,i,d]),S=(0,s.useMemo)(function(){var e="";if(w&&y.length&&!x&&E.onFilter){var t=b({count:o.length});e=E.onFilter({inputValue:p,resultsMessage:t})}return e},[o,p,w,E,y,b,x]),k="initial-input-focus"===(null==t?void 0:t.action),D=(0,s.useMemo)(function(){var e="";if(E.guidance){var t=r?"value":w?"menu":"input";e=E.guidance({"aria-label":N,context:t,isDisabled:n&&h(n,i),isMulti:m,isSearchable:g,tabSelectsValue:v,isInitialFocus:k})}return e},[N,n,r,m,h,g,w,E,i,v,k]),C=ob(s.Fragment,null,ob("span",{id:"aria-selection"},M),ob("span",{id:"aria-focused"},I),ob("span",{id:"aria-results"},S),ob("span",{id:"aria-guidance"},D));return ob(s.Fragment,null,ob(av,{id:c},k&&C),ob(av,{"aria-live":_,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},a&&!k&&C))},lv=[{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źẑżžẓẕƶȥɀⱬꝣ"}],cv=new RegExp("["+lv.map(function(e){return e.letters}).join("")+"]","g"),dv={},uv=0;uv<lv.length;uv++)for(var fv=lv[uv],pv=0;pv<fv.letters.length;pv++)dv[fv.letters[pv]]=fv.base;var mv=function(e){return e.replace(cv,function(e){return dv[e]})},hv=function(e,t){void 0===t&&(t=rv);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}(mv),gv=function(e){return e.replace(/^\s+|\s+$/g,"")},wv=function(e){return"".concat(e.label," ").concat(e.value)},yv=["innerRef"];function bv(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=ib(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=ib(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(sb(e,yv),"onExited","in","enter","exit","appear");return ob("input",(0,w.A)({ref:t},n,{css:ab({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 vv=["boxSizing","height","overflow","paddingRight","position"],xv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Nv(e){e.cancelable&&e.preventDefault()}function _v(e){e.stopPropagation()}function Ev(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Mv(){return"ontouchstart"in window||navigator.maxTouchPoints}var Iv=!("undefined"==typeof window||!window.document||!window.document.createElement),Sv=0,kv={capture:!1,passive:!1},Dv=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Cv={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function jv(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,s.useRef)(!1),l=(0,s.useRef)(!1),c=(0,s.useRef)(0),d=(0,s.useRef)(null),u=(0,s.useCallback)(function(e,t){if(null!==d.current){var s=d.current,c=s.scrollTop,u=s.scrollHeight,f=s.clientHeight,p=d.current,m=t>0,h=u-f-c,g=!1;h>t&&i.current&&(r&&r(e),i.current=!1),m&&l.current&&(a&&a(e),l.current=!1),m&&t>h?(n&&!i.current&&n(e),p.scrollTop=u,g=!0,i.current=!0):!m&&-t>c&&(o&&!l.current&&o(e),p.scrollTop=0,g=!0,l.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,r,o,a]),f=(0,s.useCallback)(function(e){u(e,e.deltaY)},[u]),p=(0,s.useCallback)(function(e){c.current=e.changedTouches[0].clientY},[]),m=(0,s.useCallback)(function(e){var t=c.current-e.changedTouches[0].clientY;u(e,t)},[u]),h=(0,s.useCallback)(function(e){if(e){var t=!!Mb&&{passive:!1};e.addEventListener("wheel",f,t),e.addEventListener("touchstart",p,t),e.addEventListener("touchmove",m,t)}},[m,p,f]),g=(0,s.useCallback)(function(e){e&&(e.removeEventListener("wheel",f,!1),e.removeEventListener("touchstart",p,!1),e.removeEventListener("touchmove",m,!1))},[m,p,f]);return(0,s.useEffect)(function(){if(t){var e=d.current;return h(e),function(){g(e)}}},[t,h,g]),function(e){d.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,s.useRef)({}),a=(0,s.useRef)(null),i=(0,s.useCallback)(function(e){if(Iv){var t=document.body,n=t&&t.style;if(r&&vv.forEach(function(e){var t=n&&n[e];o.current[e]=t}),r&&Sv<1){var a=parseInt(o.current.paddingRight,10)||0,i=document.body?document.body.clientWidth:0,s=window.innerWidth-i+a||0;Object.keys(xv).forEach(function(e){var t=xv[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&Mv()&&(t.addEventListener("touchmove",Nv,kv),e&&(e.addEventListener("touchstart",Ev,kv),e.addEventListener("touchmove",_v,kv))),Sv+=1}},[r]),l=(0,s.useCallback)(function(e){if(Iv){var t=document.body,n=t&&t.style;Sv=Math.max(Sv-1,0),r&&Sv<1&&vv.forEach(function(e){var t=o.current[e];n&&(n[e]=t)}),t&&Mv()&&(t.removeEventListener("touchmove",Nv,kv),e&&(e.removeEventListener("touchstart",Ev,kv),e.removeEventListener("touchmove",_v,kv)))}},[r]);return(0,s.useEffect)(function(){if(t){var e=a.current;return i(e),function(){l(e)}}},[t,i,l]),function(e){a.current=e}}({isEnabled:n});return ob(s.Fragment,null,n&&ob("div",{onClick:Dv,css:Cv}),t(function(e){o(e),a(e)}))}var Av={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Tv=function(e){var t=e.name,n=e.onFocus;return ob("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Av,value:"",onChange:function(){}})};function Lv(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 Ov(){return Lv(/^Mac/i)}var zv={clearIndicator:Zb,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 Ew({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:Yb,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 Ew({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 Ew({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 Ew(Ew({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},qb),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 Ew({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:zb,menu:function(e,t){var n,r=e.placement,o=e.theme,a=o.borderRadius,i=o.spacing,s=o.colors;return Ew((Nw(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),Nw(n,"position","absolute"),Nw(n,"width","100%"),Nw(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 Ew({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 Ew({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 Ew({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 Ew({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:Ob,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,a=e.theme,i=a.spacing,s=a.colors;return Ew({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 Ew({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 Ew({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 Ew({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")})}},Pv={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}},Rv={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:xb(),captureMenuScroll:!xb(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=Ew({ignoreCase:!0,ignoreAccents:!0,stringify:wv,trim:!0,matchFrom:"any"},void 0),r=n.ignoreCase,o=n.ignoreAccents,a=n.stringify,i=n.trim,s=n.matchFrom,l=i?gv(t):t,c=i?gv(a(e)):a(e);return r&&(l=l.toLowerCase(),c=c.toLowerCase()),o&&(l=hv(l),c=mv(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 Uv(e,t,n,r){return{type:"option",data:t,isDisabled:Gv(e,t,n),isSelected:Hv(e,t,n),label:Zv(e,t),value:Wv(e,t),index:r}}function Bv(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return Uv(e,n,t,r)}).filter(function(t){return Vv(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var a=Uv(e,n,t,r);return Vv(e,a)?a:void 0}).filter(Ib)}function Fv(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,jw(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function Qv(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,jw(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 Vv(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,a=t.isSelected,i=t.label,s=t.value;return(!Xv(e)||!a)&&$v(e,{label:i,value:s,data:o},r)}var Yv=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},Zv=function(e,t){return e.getOptionLabel(t)},Wv=function(e,t){return e.getOptionValue(t)};function Gv(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Hv(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Wv(e,t);return n.some(function(t){return Wv(e,t)===r})}function $v(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Xv=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},qv=1,Jv=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,Iw.A)(e,t)}(n,e);var t=function(e){var t=kw();return function(){var n,r=Sw(e);if(t){var o=Sw(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==vw(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(jw(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=Sb(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(Sb(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=Sb(e,o,o[0]||null);n&&r.onChange(a,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return Yv(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return Qv(Bv(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 fb.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return Zv(r.props,e)},r.getOptionValue=function(e){return Wv(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=zv[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,Ew(Ew({},ev),e.components);var e},r.buildCategorizedOptions=function(){return Bv(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return Fv(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:Ew({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&&gb(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 Xv(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,d=t.onKeyDown,u=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,m=p.focusedOption,h=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof d&&(d(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||!u||!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||++qv),r.state.selectValue=pb(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=Yv(o,a[i])}return r}return function(e,t,n){t&&Mw(e.prototype,t),n&&Mw(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&&vb(this.menuListRef,this.focusedOptionRef),(Ov()||Lv(/^iPhone/i)||Lv(/^iPad/i)||Ov()&&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&&(vb(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(Pv):Ew(Ew({},Pv),this.props.theme):Pv}},{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,d=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:d,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 Gv(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Hv(this.props,e,t)}},{key:"filterOption",value:function(e,t){return $v(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,l=e.menuIsOpen,c=e.required,d=this.getComponents().Input,u=this.state,f=u.inputIsHidden,p=u.ariaSelection,m=this.commonProps,h=r||this.getElementId("input"),g=Ew(Ew(Ew({"aria-autocomplete":"list","aria-expanded":l,"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":c,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?s.createElement(d,(0,w.A)({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:t,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:i,type:"text",value:o},g)):s.createElement(bv,(0,w.A)({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:db,onFocus:this.onInputFocus,disabled:t,tabIndex:a,inputMode:"none",form:i,value:""},g))}},{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,l=t.Placeholder,c=this.commonProps,d=this.props,u=d.controlShouldRenderValue,f=d.isDisabled,p=d.isMulti,m=d.inputValue,h=d.placeholder,g=this.state,y=g.selectValue,b=g.focusedValue,v=g.isFocused;if(!this.hasValue()||!u)return m?null:s.createElement(l,(0,w.A)({},c,{key:"placeholder",isDisabled:f,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),h);if(p)return y.map(function(t,i){var l=t===b,d="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return s.createElement(n,(0,w.A)({},c,{components:{Container:r,Label:o,Remove:a},isFocused:l,isDisabled:f,key:d,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(m)return null;var x=y[0];return s.createElement(i,(0,w.A)({},c,{data:x,isDisabled:f}),this.formatOptionLabel(x,"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 s.createElement(e,(0,w.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?s.createElement(e,(0,w.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 s.createElement(n,(0,w.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 s.createElement(e,(0,w.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,l=t.LoadingMessage,c=t.NoOptionsMessage,d=t.Option,u=this.commonProps,f=this.state.focusedOption,p=this.props,m=p.captureMenuScroll,h=p.inputValue,g=p.isLoading,y=p.loadingMessage,b=p.minMenuHeight,v=p.maxMenuHeight,x=p.menuIsOpen,N=p.menuPlacement,_=p.menuPosition,E=p.menuPortalTarget,M=p.menuShouldBlockScroll,I=p.menuShouldScrollIntoView,S=p.noOptionsMessage,k=p.onMenuScrollToTop,D=p.onMenuScrollToBottom;if(!x)return null;var C,j=function(t,n){var r=t.type,o=t.data,a=t.isDisabled,i=t.isSelected,l=t.label,c=t.value,p=f===o,m=a?void 0:function(){return e.onOptionHover(o)},h=a?void 0:function(){return e.selectOption(o)},g="".concat(e.getElementId("option"),"-").concat(n),y={id:g,onClick:h,onMouseMove:m,onMouseOver:m,tabIndex:-1,role:"option","aria-selected":e.state.isAppleDevice?void 0:i};return s.createElement(d,(0,w.A)({},u,{innerProps:y,data:o,isDisabled:a,isSelected:i,key:g,label:l,type:r,value:c,isFocused:p,innerRef:p?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())C=this.getCategorizedOptions().map(function(t){if("group"===t.type){var o=t.data,a=t.options,i=t.index,l="".concat(e.getElementId("group"),"-").concat(i),c="".concat(l,"-heading");return s.createElement(n,(0,w.A)({},u,{key:l,data:o,options:a,Heading:r,headingProps:{id:c,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return j(e,"".concat(i,"-").concat(e.index))}))}if("option"===t.type)return j(t,"".concat(t.index))});else if(g){var A=y({inputValue:h});if(null===A)return null;C=s.createElement(l,u,A)}else{var T=S({inputValue:h});if(null===T)return null;C=s.createElement(c,u,T)}var L={minMenuHeight:b,maxMenuHeight:v,menuPlacement:N,menuPosition:_,menuShouldScrollIntoView:I},O=s.createElement(Tb,(0,w.A)({},u,L),function(t){var n=t.ref,r=t.placerProps,i=r.placement,l=r.maxHeight;return s.createElement(o,(0,w.A)({},u,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:g,placement:i}),s.createElement(jv,{captureEnabled:m,onTopArrive:k,onBottomArrive:D,lockEnabled:M},function(t){return s.createElement(a,(0,w.A)({},u,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":u.isMulti,id:e.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:f}),C)}))});return E||"fixed"===_?s.createElement(i,(0,w.A)({},u,{appendTo:E,controlElement:this.controlRef,menuPlacement:N,menuPosition:_}),O):O}},{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,l=this.state.selectValue;if(i&&!this.hasValue()&&!r)return s.createElement(Tv,{name:a,onFocus:this.onValueInputFocus});if(a&&!r){if(o){if(n){var c=l.map(function(t){return e.getOptionValue(t)}).join(n);return s.createElement("input",{name:a,type:"hidden",value:c})}var d=l.length>0?l.map(function(t,n){return s.createElement("input",{key:"i-".concat(n),name:a,type:"hidden",value:e.getOptionValue(t)})}):s.createElement("input",{name:a,type:"hidden",value:""});return s.createElement("div",null,d)}var u=l[0]?this.getOptionValue(l[0]):"";return s.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,l=this.getFocusableOptions();return s.createElement(sv,(0,w.A)({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:a,selectValue:i,focusableOptions:l,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,l=a.id,c=a.isDisabled,d=a.menuIsOpen,u=this.state.isFocused,f=this.commonProps=this.getCommonProps();return s.createElement(r,(0,w.A)({},f,{className:i,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:u}),this.renderLiveRegion(),s.createElement(t,(0,w.A)({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:u,menuIsOpen:d}),s.createElement(o,(0,w.A)({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),s.createElement(n,(0,w.A)({},f,{isDisabled:c}),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,d=e.value,u=e.menuIsOpen,f=e.inputValue,p=e.isMulti,m=pb(d),h={};if(n&&(d!==n.value||c!==n.options||u!==n.menuIsOpen||f!==n.inputValue)){var g=u?function(e,t){return Fv(Bv(e,t))}(e,m):[],w=u?Qv(Bv(e,m),"".concat(l,"-option")):[],y=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:Yv(w,b),focusableOptionsWithIds:w,focusedValue:y,clearFocusValueOnUpdate:!1}}var v=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=a,N=i&&s;return i&&!N&&(x={value:Sb(p,m,m[0]||null),options:m,action:"initial-input-focus"},N=!s),"initial-input-focus"===(null==a?void 0:a.action)&&(x=null),Ew(Ew(Ew({},h),v),{},{prevProps:e,ariaSelection:x,prevWasFocused:N})}}]),n}(s.Component);Jv.defaultProps=Rv;var Kv=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"],ex=["defaultOptions","cacheOptions","loadOptions","options","isLoading","onInputChange","filterOption"],tx=(0,s.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,l=void 0!==i&&i,c=e.onInputChange,d=e.filterOption,u=void 0===d?null:d,f=sb(e,ex),p=f.inputValue,m=(0,s.useRef)(void 0),h=(0,s.useRef)(!1),g=ib((0,s.useState)(Array.isArray(n)?n:void 0),2),w=g[0],y=g[1],b=ib((0,s.useState)(void 0!==p?p:""),2),v=b[0],x=b[1],N=ib((0,s.useState)(!0===n),2),_=N[0],E=N[1],M=ib((0,s.useState)(void 0),2),I=M[0],S=M[1],k=ib((0,s.useState)([]),2),D=k[0],C=k[1],j=ib((0,s.useState)(!1),2),A=j[0],T=j[1],L=ib((0,s.useState)({}),2),O=L[0],z=L[1],P=ib((0,s.useState)(void 0),2),R=P[0],U=P[1],B=ib((0,s.useState)(void 0),2),F=B[0],Q=B[1];o!==F&&(z({}),Q(o)),n!==R&&(y(Array.isArray(n)?n:void 0),U(n)),(0,s.useEffect)(function(){return h.current=!0,function(){h.current=!1}},[]);var V=(0,s.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,s.useEffect)(function(){!0===n&&V(v,function(e){h.current&&(y(e||[]),E(!!m.current))})},[]);var Y=(0,s.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,c);if(!n)return m.current=void 0,x(""),S(""),C([]),E(!1),void T(!1);if(o&&O[n])x(n),S(n),C(O[n]),E(!1),T(!1);else{var r=m.current={};x(n),E(!0),T(!I),V(n,function(e){h&&r===m.current&&(m.current=void 0,E(!1),S(n),C(e||[]),T(!1),z(e?Ew(Ew({},O),{},Nw({},n,e)):O))})}},[o,V,I,O,c]),Z=A?[]:v&&I?D:w||[];return Ew(Ew({},f),{},{options:Z,isLoading:_||l,onInputChange:Y,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,l=e.inputValue,c=e.menuIsOpen,d=e.onChange,u=e.onInputChange,f=e.onMenuClose,p=e.onMenuOpen,m=e.value,h=sb(e,Kv),g=ib((0,s.useState)(void 0!==l?l:n),2),w=g[0],y=g[1],b=ib((0,s.useState)(void 0!==c?c:o),2),v=b[0],x=b[1],N=ib((0,s.useState)(void 0!==m?m:i),2),_=N[0],E=N[1],M=(0,s.useCallback)(function(e,t){"function"==typeof d&&d(e,t),E(e)},[d]),I=(0,s.useCallback)(function(e,t){var n;"function"==typeof u&&(n=u(e,t)),y(void 0!==n?n:e)},[u]),S=(0,s.useCallback)(function(){"function"==typeof p&&p(),x(!0)},[p]),k=(0,s.useCallback)(function(){"function"==typeof f&&f(),x(!1)},[f]),D=void 0!==l?l:w,C=void 0!==c?c:v,j=void 0!==m?m:_;return Ew(Ew({},h),{},{inputValue:D,menuIsOpen:C,onChange:M,onInputChange:I,onMenuClose:k,onMenuOpen:S,value:j})}(n);return s.createElement(Jv,(0,w.A)({ref:t},r))}),nx=tx;const rx=e=>e.isSelected?"#F3F4F6":e.isFocused?"#F9FAFB":"transparent",ox=function(e){const{label:t,name:n,desc:r,value:o,tooltip:a,placeholder:l,onChangeCB:c,options:d,isMulti:u=!1,isSearchable:f=!0,attr:p}=e,[m,h]=(0,s.useState)(o);(0,s.useEffect)(()=>{h(o)},[o]);const g={control:e=>({...e,borderColor:"#E5E7EB",boxShadow:"","&:hover":{borderColor:"none"}}),option:(e,t)=>({...e,backgroundColor:rx(t),color:"#111827",cursor:"pointer","&:active":{backgroundColor:"#F3F4F6"}})};return(0,i.createElement)("div",{className:"wcf-select2-field"},(0,i.createElement)("div",{className:"wcf-selection-field"},t&&(0,i.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-text-primary mb-2"},(0,i.createElement)("label",null,t,a&&(0,i.createElement)(uM,{text:a}))),(0,i.createElement)(nx,(0,w.A)({className:"wcf-select2-input",classNamePrefix:"wcf",name:n,isClearable:!0,value:m,getOptionLabel:e=>e.label,getOptionValue:e=>e.value,loadOptions:e=>new Promise(t=>{setTimeout(()=>{t((e=>d.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())))(e))},1e3)}),onChange:t=>{h(t);const n=new CustomEvent("wcf:select2:change",{bubbles:!0,detail:{e:{},name:e.name,value:t}});document.dispatchEvent(n),c&&c(t)},placeholder:l,defaultOptions:d,cacheOptions:!0,isMulti:u,delimiter:u?",":void 0,styles:g,isSearchable:f},p))),r&&(0,i.createElement)("div",{className:"wcf-field__desc text-sm font-regular"},Wm(r)))};function ax({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 ix=s.forwardRef(ax);function sx({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 lx=s.forwardRef(sx);function cx({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 dx=s.forwardRef(cx),ux=function(e){const[{options:t},n]=Zp(),{index:r,field_name:o,product_data:a,productOptdata:l}=e,c=""===a.discount_type?"disable":"enable",[d,u]=(0,s.useState)(c),[f,p]=(0,s.useState)(a.discount_type),[m,h]=(0,s.useState)(a.discount_value||""),[g,w]=(0,s.useState)(!1),[y,b]=(0,s.useState)(l.product_name||""),[v,x]=(0,s.useState)(l.product_subtext||""),[N,_]=(0,s.useState)(l.highlight_text||""),[E,M]=(0,s.useState)("yes"===l.enable_highlight),I=t["wcf-checkout-products"],S=t["wcf-product-options"],k=t["wcf-enable-product-options"],C=r===I.length-1;(0,s.useEffect)(()=>{p(a.discount_type),h(a.discount_value||"")},[a.discount_type,a.discount_value]),(0,s.useEffect)(()=>{b(l.product_name||""),x(l.product_subtext||""),_(l.highlight_text||""),M("yes"===l.enable_highlight)},[l.product_name,l.product_subtext,l.highlight_text,l.enable_highlight]);const j=[{value:"",label:(0,D.__)("Original","cartflows"),icon:(0,i.createElement)(ix,{className:"w-4 h-4"})},{value:"discount_percent",label:(0,D.__)("Percentage","cartflows"),icon:(0,i.createElement)(lx,{className:"w-4 h-4"})},{value:"discount_price",label:(0,D.__)("Price","cartflows"),icon:(0,i.createElement)(dx,{className:"w-4 h-4"})}],A=j.find(e=>e.value===f)||j[0];return function(){const e=a.discount_type,t=parseFloat(a.discount_value),n=parseFloat(a.regular_price);let r=0;"discount_percent"===e?t>0&&(r=n-n*t/100):"discount_price"===e&&t>0&&(r=n-t),a.sell_price=r.toFixed(2)}(),(0,i.createElement)("div",{key:a.unique_id},(0,i.createElement)("div",{className:`wcf-product-selection--selected-product flex items-center p-3 gap-3 ${function(){let e="";return"yes"===l.add_to_cart?e+=g?"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+=g?"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+=C&&!g?" rounded-b-md":"",e}()}`},(0,i.createElement)("div",{className:"wcf-product-selection--product-title whitespace-nowrap text-sm font-medium text-text-primary w-1/2"},(0,i.createElement)("div",{className:"flex gap-3 items-center"},(0,i.createElement)("div",{className:"wcf-product-selection--sortable-toggle flex cursor-move text-text-tertiary"},(0,i.createElement)(lh,{className:"w-6 h-6 stroke-1","aria-hidden":"true"}),(0,i.createElement)(lh,{className:"w-6 h-6 stroke-1 -ml-4","aria-hidden":"true"})),(0,i.createElement)("div",{className:"wcf-product-selection--product-image w-20 h-20"},(0,i.createElement)("img",{src:a&&a.img_url?a.img_url:cartflows_admin.image_placeholder,className:"product-image rounded-md w-full h-full aspect-{3/2} object-contain",alt:Wm(a.name)})),(0,i.createElement)("div",{className:"wcf-product-selection--product-title_text cursor-default"},(0,i.createElement)("div",{className:"wcf-product-repeater-field__title whitespace-normal text-left","data-product_id":a.product},Wm(a.name)),(0,i.createElement)("div",{className:"wcf-product-repeater-field__reg-price mt-1"},(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("span",{className:"wcf-product--reg-price "+("enable"===c&&0<a.discount_value?"line-through text-text-tertiary":""),title:(0,D.__)("Regular Price of the product","cartflows")},cartflows_admin.woo_currency+a.regular_price),"enable"===c&&0<a.discount_value&&(0,i.createElement)("span",{className:"wcf-product--sale-price",title:(0,D.__)("Price after discount.","cartflows")},cartflows_admin.woo_currency+a.sell_price)))))),(0,i.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"===k?"force-all"===S?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Pg,{size:"sm",value:!0,disabled:!0,name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`}),(0,i.createElement)("input",{type:"hidden",name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`,value:"yes"})):"single-selection"===S?(("yes"===e.add_to_cart||e.chosen)&&(o=e.unique_id),(0,i.createElement)(Vg.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,i.createElement)(Vg.Button,{value:e.unique_id,hideSelection:!1,minWidth:!1,buttonWrapperClasses:"p-0 flex items-center justify-center"}))):"multiple-selection"===S?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Pg,{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,i.createElement)("input",{type:"hidden",name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`,value:e.add_to_cart})):void 0:(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Pg,{size:"sm",value:!0,disabled:!0,name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`}),(0,i.createElement)("input",{type:"hidden",name:`wcf-product-options-data[${e.unique_id}][add_to_cart]`,value:"yes"}))}(l)),(0,i.createElement)("div",{className:"wcf-product-selection--product-qty whitespace-nowrap text-sm text-text-secondary w-[10%]"},(0,i.createElement)("div",{className:"w-16 shrink-0"},(0,i.createElement)(tg,{type:"number",size:"md",name:`wcf-checkout-products[${r}][quantity]`,value:a.quantity,min:1,onChange:e=>{const t=[...I];t[r]={...t[r],quantity:parseInt(e,10)||1},n({type:"UPDATE_CHECKOUT_PRODUCTS",field_name:o,products:t})}}))),(0,i.createElement)("div",{className:"wcf-product-selection--product-discount flex items-center gap-2 whitespace-nowrap text-sm text-text-secondary w-2/3"},(0,i.createElement)("input",{type:"hidden",name:`wcf-checkout-products[${r}][discount_type]`,value:f}),(0,i.createElement)("div",{className:"w-16 shrink-0"},(0,i.createElement)(tg,{type:"number",size:"md",name:`wcf-checkout-products[${r}][discount_value]`,value:"disable"===d?"":m,disabled:"disable"===d,placeholder:"disable"===d?"":"0",min:1,step:"any",onChange:e=>h(e)})),(0,i.createElement)(yp,{placement:"bottom-start"},(0,i.createElement)(yp.Trigger,null,(0,i.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,i.createElement)("span",{className:"flex items-center gap-1"},(0,i.createElement)("span",{className:"size-4 shrink-0 flex items-center"},A.icon),(0,i.createElement)("span",{className:"text-sm font-normal text-text-primary"},A.label)),(0,i.createElement)(lp,{className:"size-3.5 shrink-0 text-icon-secondary"}))),(0,i.createElement)(yp.ContentWrapper,{className:"z-50"},(0,i.createElement)(yp.Content,null,(0,i.createElement)(yp.List,null,j.map(e=>(0,i.createElement)(yp.Item,{key:e.value,active:f===e.value,onClick:()=>{p(e.value),function(e,t,n){u(""===n?"disable":"enable")}(0,0,e.value)}},(0,i.createElement)("span",{className:"flex items-center gap-2 text-sm"},e.icon,e.label)))))))),(0,i.createElement)("div",{className:"wcf-product-selection-actions flex gap-2 relative whitespace-nowrap text-right text-sm font-medium w-[10%] justify-center"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(Hh,{className:"w-4 h-4"}),onClick:()=>w(!g),className:`${"yes"===k?"visible":"invisible"} ${g?"bg-brand-50 text-brand-500":""}`,type:"button"}),(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(Xm,{className:"w-4 h-4"}),onClick:function(){const e=a.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,i.createElement)("input",{name:`wcf-checkout-products[${r}][product]`,type:"hidden",className:"wcf-checkout-product-id",value:a.product}),(0,i.createElement)("input",{name:`wcf-checkout-products[${r}][unique_id]`,type:"hidden",className:"wcf-checkout-product-unique",value:a.unique_id})),g&&(0,i.createElement)("div",{className:"wcf-product-field-item-settings flex flex-col gap-5 p-6 bg-background-primary "+(g&&"yes"===l.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":a.product_id},(0,i.createElement)("div",{className:"flex flex-col gap-1.5"},(0,i.createElement)(tg,{name:`wcf-product-options-data[${l.unique_id}][product_name]`,label:(0,D.__)("Product Name","cartflows"),value:y,size:"md",onChange:e=>b(e)}),(0,i.createElement)(Lf,{variant:"help",size:"sm",tag:"p"},(0,i.createElement)(vg,null),(0,D.__)("Use {{product_name}} and {{quantity}} to dynamically fetch respective product details.","cartflows"))),(0,i.createElement)("div",{className:"flex flex-col gap-1.5"},(0,i.createElement)(tg,{name:`wcf-product-options-data[${l.unique_id}][product_subtext]`,label:(0,D.__)("Subtext","cartflows"),value:v,size:"md",onChange:e=>x(e)}),(0,i.createElement)(Lf,{variant:"help",size:"sm",tag:"p"},(0,i.createElement)(vg,null),(0,D.__)("Use {{quantity}}, {{discount_value}}, {{discount_percent}} to dynamically fetch respective product details.","cartflows"))),(0,i.createElement)("div",{className:"flex"},(0,i.createElement)(Cg,{id:`wcf-product-options-data-enable-highlight-${l.unique_id}`,checked:E,label:{heading:(0,D.__)("Enable Highlight","cartflows")},size:"sm",onChange:e=>M(e)})),(0,i.createElement)("input",{type:"hidden",name:`wcf-product-options-data[${l.unique_id}][enable_highlight]`,value:E?"yes":"no"}),(0,i.createElement)("div",{className:E?"":"hidden"},(0,i.createElement)(tg,{name:`wcf-product-options-data[${l.unique_id}][highlight_text]`,label:(0,D.__)("Highlight Text","cartflows"),value:N,size:"md",onChange:e=>_(e)})),(0,i.createElement)("input",{name:`wcf-product-options-data[${l.unique_id}][unique_id]`,type:"hidden",className:"wcf-product-options-unique-id",value:l.unique_id})))},fx=function(){return(0,i.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,i.createElement)(yg,{className:"w-4 h-4 stroke-2","aria-hidden":"true"}),(0,D.__)("Create New Product","cartflows"))},px=function(e){const[{options:t},n]=Zp(),{name:r,value:o}=e,a=t[r],[l,c]=(0,s.useState)(),[d,u]=(0,s.useState)(""),[f,p]=(0,s.useState)(!1),m=(0,D.__)("Add","cartflows"),[h,g]=(0,s.useState)({isInProcessing:!1,buttonText:m}),{isInProcessing:w,buttonText:y}=h,b=t["wcf-product-options"],v=t["wcf-product-options-data"];(0,s.useEffect)(()=>(n({type:"UPDATE_CHECKOUT_PRODUCTS",field_name:r,products:o}),()=>{}),[]);let x=0;const N=wcfCartflowsPro()?function(){const e={};v&&Object.keys(v).map(t=>{const n=v[t];return e[t]={...n},""});const t=[],n={enable_highlight:"no",highlight_text:"",product_name:"",product_subtext:"",add_to_cart:"yes"};return x=0,a.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"!==b&&(o.add_to_cart=o.add_to_cart?o.add_to_cart:"yes"),"single-selection"===b&&(o.add_to_cart&&"no"!==o.add_to_cart&&x++,e[a]||(o.add_to_cart="no")),t.push(o)}return"single-selection"===b&&0===x&&(t[0].add_to_cart="yes"),""}),t}():[];return(0,i.createElement)("div",{className:"wcf-checkout-product-selection-field"},a&&0===a.length&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("input",{name:"wcf-checkout-products",type:"hidden",value:""}),(0,i.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,i.createElement)(Ym,{size:"sm",className:"text-text-tertiary text-center"},(0,D.__)("No products added yet. Search and add products below.","cartflows")))),a&&a.length>0&&(0,i.createElement)("div",{className:"border border-solid border-border-subtle rounded-lg"},(0,i.createElement)("div",{className:"wcf-product-selection--header bg-background-secondary border-b border-border-subtle flex items-center gap-3 p-3"},(0,i.createElement)(Ym,{size:"xs",weight:"medium",className:"text-text-secondary w-2/5"},(0,D.__)("Product","cartflows")),(0,i.createElement)(Ym,{size:"xs",weight:"medium",className:"text-text-secondary w-[10%] text-center"},(0,D.__)("Default","cartflows")),(0,i.createElement)(Ym,{size:"xs",weight:"medium",className:"text-text-secondary w-[10%] text-center"},(0,D.__)("Qty","cartflows")),(0,i.createElement)(Ym,{size:"xs",weight:"medium",className:"text-text-secondary w-2/3"},(0,D.__)("Discount","cartflows")),(0,i.createElement)("div",{className:"w-[10%]"})),(0,i.createElement)(Wp.ReactSortable,{list:a,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"},a.map((e,t)=>("yes"===e.add_to_cart&&x++,(0,i.createElement)(ux,{key:e.unique_id,index:t,field_name:r,product_data:e,productOptdata:N.length>0?N[t]:[]}))))),(0,i.createElement)("div",{className:"wcf-checkout-product-selection-field__add-new flex items-end gap-3 mt-8"},(0,i.createElement)("div",{className:"flex-1"},(0,i.createElement)(sM,{name:"",desc:"",class:f?"border border-brand-600":"",field:"product",value:d,allowed_products:"",include_products:"braintree-subscription, braintree-variable-subscription",excluded_products:"grouped",excluded_product_ids:cartflows_admin?.restrict_duplicate_checkout_products?(a||[]).map(e=>Number(e.product)):[],placeholder:(0,D.__)("Search for a Product","cartflows"),onChangeCB:c})),(0,i.createElement)(Po,{type:"button",variant:"outline",size:"md",icon:(0,i.createElement)(yg,{className:"w-4 h-4"}),iconPosition:"left",loading:w,disabled:w,onClick:function(e){const o=l?.value;o?(e.target.blur(),g({isInProcessing:!0,buttonText:(0,D.__)("Adding…","cartflows")}),Xf()({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:l?.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})}g({isInProcessing:!1,buttonText:m})}),c(null)):(p(!0),e.target.blur(),setTimeout(()=>{p(!1)},3e3))},className:"shrink-0"},y)),f&&(0,i.createElement)(Ym,{size:"sm",className:"text-support-error mt-1"},(0,D.__)("Please search and select at-least one product to add.","cartflows")),(0,i.createElement)(fx,null))},mx=window.wp.components,hx=function(e){const{name:t,label:n,value:r,isActive:o=!0,tooltip:a,sectionClass:l="",wrapperClass:c="",labelClass:d="",displayAlign:u="horizontal",withBg:f=!1,showOverlay:p=!1}=e,[m,h]=(0,s.useState)(!1),[g,w]=(0,s.useState)(r),[y,b]=(0,s.useState)(!1),v=(0,s.useRef)(null);(0,s.useEffect)(()=>{w(r)},[r]);const x=`wcf-colorpicker-${String(t).replace(/[\[\]]/g,"-")}`,N=l||"text-left",_="horizontal"!==u?"block w-full text-left":c||"flex justify-between items-center gap-2.5",E="horizontal"!==u?`${d||"text-sm font-medium text-text-primary"} mb-2`:`${d||"text-sm font-medium text-text-primary"}`,M=e=>{e.stopPropagation(),document.dispatchEvent(new CustomEvent("closeAllColorPickers",{detail:{name:t}})),h(!m)},I=t=>{const n=t||"";w(n);const r=new CustomEvent("wcf:color:change",{bubbles:!0,detail:{e:"color",name:e.name,value:n}});document.dispatchEvent(r)};return(0,s.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,s.useEffect)(()=>{if(!m)return;const e=e=>{"Escape"===e.key&&h(!1)};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[m]),(0,i.createElement)("div",{className:`wcf-field wcf-color-field ${N} ${o?"":"wcf-hide"}`},(0,i.createElement)("div",{className:`wcf-field__data ${_}`},n&&(0,i.createElement)("div",{className:`wcf-field__data--label ${E}`},(0,i.createElement)("label",null,n),a&&(0,i.createElement)(uM,{text:a})),(0,i.createElement)("div",{className:"wcf-field__data--content "+(f?"bg-background-primary px-2 py-2 !text-sm font-normal !rounded-md text-text-tertiary border border-solid !border-border-subtle w-fit":"")},(0,i.createElement)("div",{className:"wcf-colorpicker-selector flex items-center gap-2 sm:justify-end"},(0,i.createElement)("div",{className:"wcf-colorpicker-swatch-wrap inline-flex items-center bg-background-primary border border-solid border-border-subtle rounded-sm cursor-pointer text-text-tertiary focus-visible:ring-1 focus-visible:ring-border-interactive focus-visible:outline-none overflow-hidden",onClick:M,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),M(e))},role:"button",tabIndex:"0","aria-haspopup":"true","aria-expanded":m,"aria-controls":x,id:`${x}-trigger`},(0,i.createElement)("span",{className:"wcf-colorpicker-swatch inline-flex items-center justify-center border-0 border-r border-solid border-border-subtle",style:{width:"36px",height:"30px",background:g||"#fafafa",boxShadow:g?"inset 0 0 0 3px #fff":"none"},"aria-hidden":"true"},!g&&(0,i.createElement)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxjaXJjbGUgY3g9IjEwIiBjeT0iMTAiIHI9IjEwIiBmaWxsPSJ1cmwoI2EpIi8+PGNpcmNsZSBjeD0iMTAiIGN5PSIxMCIgcj0iOS41IiBzdHJva2U9IiMxRDI5MzkiIHN0cm9rZS1vcGFjaXR5PSIuMTYiLz48ZGVmcz48cGF0dGVybiBpZD0iYSIgcGF0dGVybkNvbnRlbnRVbml0cz0ib2JqZWN0Qm91bmRpbmdCb3giIHdpZHRoPSIxIiBoZWlnaHQ9IjEiPjx1c2UgeGxpbms6aHJlZj0iI2IiIHRyYW5zZm9ybT0ibWF0cml4KC4wMDk0OCAwIDAgLjAwOTQ4IC0uNjM3IC0uNjQ0KSIvPjwvcGF0dGVybj48aW1hZ2UgaWQ9ImIiIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiB4bGluazpocmVmPSJkYXRhOmltYWdlL3BuZztiYXNlNjQsaVZCT1J3MEtHZ29BQUFBTlNVaEVVZ0FBQVFBQUFBRUFDQVlBQUFCY2NxaG1BQUFBQVhOU1IwSUFyczRjNlFBQUNzVkpSRUZVZUY3dDNiRnRKbHNPUk9GL25yTXhLTUpOUTFrSU1nVkZJRStwcmZPd09WUVpSRTEvNHdzWHpTRVBEMiszcUQ4Zlh6L3ZyK0xmUC8vODU3UDQ4ZGUvLy83dnY4M1BPMS84bS94NWV2NzlBUUFBYWdvSWdMY0JEQUFNaElFVkJGd0hJQUFBQUFBQVFCNkJkUUkrZlFiMC9NOGVBUmtBQTJBQWVmOTdyVGRBQUFBQUFBQ0FQQUxyQktUQXoxYmdwLy8vTXdBR3dBRHkvbWNFWUFEYjc0R2YzZ0dmL3Z3TWdBRXdBQWFRUjRBQk1JQThlMTQrQlQ5dVFBemcrRC9nNlFycStXOHZZUUVBQUl3QWhjS3NHekFBQUFBQUFFQWVnWFVDVXRCYkJSWC8yL2ovK2Z6K2ZjdkwzeVdPQkw1TllQSHY0ZzhBRnBwWTZGSjB3SFVBQVFBQUFBQUE1QkZZSjZBN0ROOHg1Tm0vUHdJekFBYkFBQW9DckRkQUFBQUFBQUNBUEFMckJEUUNHQUh5N0RjQytKYmJoMFErSkNvSWN0MkFqQUJHQUNOQVVjRHJCZ3dBQUFBQUFKQkhZSjJBMXdybWZIY1FlZlgxZHhBTWdBRXdnS0lDMXhzZ0FBQUFBQUJBSG9GMUFsSndDcDVuZjYvZzEvbkhBQmdBQXlnSXNONEFBUUFBQU9ESkFQRG53YnZmcDc1V09PY2JZUXArdmF3RTh5V2ZML21LQ2xvSE1BQUFBQUFBUUI2QmRRS3VYK0tJdnhFZ3I5NlhFUUFBM0lFMEJiUU9ZQ09BRWNBSVVCQUFBTHhHOHhxdEtDQUdkbXRnRElBQk1JQUNZQXlBQVRDQW9vQVlBQVBRZ1lvQ1d1OUFBQUFBQUFBQWNRUUFzSHNONmc3QUhRQUF4L2g1dmRZQkJBQUFBQUFBa0VkZ25ZQm0wTnNaVlB4djQ4OEFHQUFEeVB1ZkVZQUJkSmN3T3VCdEIzeDYvQzBFOFIyRDd4Z0tBMWdIQ0FBQUFBQUFRQjZCZFFJYVlZd3dlZlpiQ3VwdkE3cEVkSWxZRU9TNkFSa0JqQUJHZ0tLQTF3MFlBQUFBQUFBZ2o4QTZBYThWelBudUlQTHE2KzhnR0FBRFlBQkZCYTQzUUFBQUFBQUFnRHdDNndTazRCUTh6LzVld2Evemp3RXdBQVpRRUdDOUFRSUFBQUFBQU9RUldDZmd0WUk1M3dpU1YxOC9nakFBQnNBQWlncGNiNEFBQUFBQUFBQjVCTllKU01FcGVKNzl2WUpmNTUrTlFINlp4eS96RkFTNEx1RDJmQUFBQUFBQWdEd0NMWUdNRUZaaTVkbTN2NWI3T3Y4WkFBTmdBQVdCMWhzZ0FBQUFBQUJBSG9GMUFsNHJtUE9OUUhuMTlTTVFBMkFBREtDb3dQVUdDQUFBQUFBQWtFZGduWUFVbklMbjJkOHIrSFgrTVFBR3dBQUtBcXczUUFBQUFBQUFnRHdDNndTOFZqRG5HMEh5NnV0SEVBYkFBQmhBVVlIckRSQUFBQUFBQUNDUHdEb0JLVGdGejdPL1YvRHIvR01BRElBQkZBUlliNEEyQXRrSVpDTlFBWURyRHQ2ZUR3QUFBQUFBa0VlZ0pkQzZRbmwrZHdoNTlkemZJVEFBQnNBQWlncGVid0FBQUFBQUFBQjVCTllKYUFTeEZUalAvcjlnSy9EbjkrL2Jrd01BQUFEdzVQdzNBaGdCakFBRkFkWU5HQUFBQUFBQUlJL0FPZ0dOQUVhQVBQdmRBYndBd0h2d3BvQUErQmJBUmdBamdCR2dJTmg2QXdRQUFBQUFBTWdqc0U1QUNucXJvT0ovRzM4R3dBQVlRTjcvNXUvQUFBQUFBT0RKQVBqNCtua3ZudjlGNFc0VlR2ekZ2NmxmRzRGc0JMSVJxS2lnZFFBREFBQUFBQURrRVZnbm9MY1lQbVRLcy85K29VZGJmd3lBQVRDQWdnQnRBVjQzSUFBQUFBQUFnRHdDNndTOEpyRHpqU0I1OWZVakNBTmdBQXlncU1EMUJnZ0FBQUFBQUpCSFlKMkFGSnlDNTluZksvaDEvakVBQnNBQUNnS3NOMEFBQUFBQUFJQThBdXNFdkZZdzV4dEI4dXJyUnhBR3dBQVlRRkdCNncwUUFBQUFBQUFnajhBNkFTazRCYyt6djFmdzYveXpFTVJDRUF0QkNnSmNGM0I3UGdBQUFBQUFRQjZCbGtCR0NCdHQ4dXpiLzhNYzEvblBBQmdBQXlnSXRONEFBUUFBQUFBQThnaXNFL0Jhd1p4dkJNcXJyeCtCR0FBRFlBQkZCYTQzUUFBQUFBQUFnRHdDNndTazRCUTh6LzVld2Evemp3RXdBQVpRRUdDOUFRSUFBQUFBQU9RUldDZmd0WUk1M3dpU1YxOC9nakFBQnNBQWlncGNiNEFBQUFBQUFBQjVCTllKU01FcGVKNzl2WUpmNXg4RFlBQU1vQ0RBZWdPMEVjaEdJQnVCQ2dCY2QvRDJmQUFBQUFBQWdEd0NMWUhXRmNyenUwUElxK2YrRG9FQk1BQUdVRlR3ZWdNQUFBQUFBQURJSTdCT1FDT0lyY0I1OXY4Rlc0RS92bjdlbnh3QUFBQ0FKK2UvRWNBSVlBUW9DTEJ1d0FBQUFBQUFBSGtFMWdsb0JEQUM1Tm52RHVBRkFONkROd1VFd0xjQU5nSVlBWXdBQmNIV0d5QUFBQUFBQUVBZWdYVUNVdEJiQlJYLzIvZ3pBQWJBQVBMK04zOEhCZ0FBQUFCUEJzRG45KzliOGZ3dkNuZXJjT0l2L2szOTJnaGtJNUNOUUVVRnJRTVlBQUFBQUFBZ2o4QTZBYjNGOENGVG52MzNDejNhK21NQURJQUJGQVJvQy9DNkFRRUFBQUFBQU9RUldDZmdOWUdkYndUSnE2OGZRUmdBQTJBQVJRV3VOMEFBQUFBQUFJQThBdXNFcE9BVVBNLytYc0d2ODQ4Qk1BQUdVQkJndlFFQ0FBQUFBQURrRVZnbjRMV0NPZDhJa2xkZlA0SXdBQWJBQUlvS1hHK0FBQUFBQUFBQWVRVFdDVWpCS1hpZS9iMkNYK2VmaFNBV2dsZ0lVaERndW9EYjh3RUFBQUFBQVBJSXRBUXlRdGhvazJmZi9oL211TTUvQnNBQUdFQkJvUFVHQ0FBQUFBQUFrRWRnbllEWEN1WjhJMUJlZmYwSXhBQVlBQU1vS25DOUFRSUFBQUFBQU9RUldDY2dCYWZnZWZiM0NuNmRmd3lBQVRDQWdnRHJEUkFBQUFBQUFDQ1B3RG9CcnhYTStVYVF2UHI2RVlRQk1BQUdVRlRnZWdNRUFBQUFBQURJSTdCT1FBcE93ZlBzN3hYOE92OFlBQU5nQUFVQjFodWdqVUEyQXRrSVZBRGd1b08zNXdNQUFBQUFBT1FSYUFtMHJsQ2UzeDFDWGozM2R3Z01nQUV3Z0tLQzF4c0FBQUFBQUFCQUhvRjFBaHBCYkFYT3MvOHYyQXI4K2YzNzl1UUFBQUFBUERuL2pRQkdBQ05BUVlCMUF3WUFBQUFBQU1nanNFNUFJNEFSSU05K2R3QXZBUEFldkNrZ0FMNEZzQkhBQ0dBRUtBaTIzZ0FCQUFBQUFBRHlDS3dUa0lMZUtxajQzOGFmQVRBQUJwRDN2L2s3TUFBQUFBQjRNZ0Erdm43ZWkrZC9VYmhiaFJOLzhXL3ExMFlnRzRGc0JDb3FhQjNBQUFBQUFBQUFlUVRXQ2VndGhnK1o4dXkvWCtqUjFoOERZQUFNb0NCQVc0RFhEUWdBQUFBQUFDQ1B3RG9Ccnduc2ZDTklYbjM5Q01JQUdBQURLQ3B3dlFFQ0FBQUFBQURrRVZnbklBV240SG4yOXdwK25YOE1nQUV3Z0lJQTZ3MFFBQUFBQUFBZ2o4QTZBYThWelBsR2tMejYraEdFQVRBQUJsQlU0SG9EQkFBQUFBQUF5Q093VGtBS1RzSHo3TzhWL0RyL0xBU3hFTVJDa0lJQTF3WGNuZzhBQUFBQUFKQkhvQ1dRRWNKR216ejc5djh3eDNYK013QUd3QUFLQXEwM1FBQUFBQUFBZ0R3QzZ3UzhWakRuRzRIeTZ1dEhJQWJBQUJoQVVZSHJEUkFBQUFBQUFDQ1B3RG9CS1RnRno3Ty9WL0RyL0dNQURJQUJGQVJZYjRBQUFBQUFBQUI1Qk5ZSmVLMWd6amVDNU5YWGp5QU1nQUV3Z0tJQzF4c2dBQUFBQUFCQUhvRjFBbEp3Q3A1bmY2L2cxL25IQUJnQUF5Z0lzTjRBYlFTeUVjaEdvQUlBMXgyOFBSOEFBQUFBQUNDUFFFdWdkWVh5L080UTh1cTV2ME5nQUF5QUFSUVZ2TjRBQUFBQUFBQUE4Z2lzRTlBSVlpdHdudjEvd1ZiZ2o2K2Y5eWNIQUFBQTRNbjVid1F3QWhnQkNnS3NHekFBQUFBQUFFQWVnWFVDR2dHTUFIbjJ1d040QVlEMzRFMEJBZkF0Z0kwQVJnQWpRRUd3OVFZSUFBQUFBQUNRUjJDZGdCVDBWa0hGL3piK0RJQUJNSUM4LzgzZmdRRUFBQURBa3dIdytmMzdWanovaThMZEtwejRpMzlUdnpZQzJRaGtJMUJSUWVzQUJnQUFBQUFBeUNPd1RrQnZNWHpJbEdmLy9VS1B0djRZQUFOZ0FBVUIyZ0s4YmtBQUFBQUFBQUI1Qk5ZSmVFMWc1eHRCOHVyclJ4QUd3QUFZUUZHQjZ3MFFBQUFBQUFBZ2o4QTZBU2s0QmMrenYxZnc2L3hqQUF5QUFSUUVXRytBQUFBQUFBQUFlUVRXQ1hpdFlNNDNndVRWMTQ4Z0RJQUJNSUNpQXRjYklBQUFBQUFBUUI2QmRRSlNjQXFlWjMrdjROZjU5MysraWozaGFMdmRwUUFBQUFCSlJVNUVya0pnZ2c9PSIvPjwvZGVmcz48L3N2Zz4=",alt:"",className:"!w-5 !h-5 opacity-40"})),(0,i.createElement)("span",{className:"wcf-colorpicker-label text-xs font-normal text-text-secondary px-[7px] py-[5px] whitespace-nowrap"},(0,D.__)("Select Color","cartflows")),(0,i.createElement)("input",{type:"hidden",name:t,value:g})),(0,i.createElement)(uM,{text:(0,D.__)("Reset","cartflows"),classes:"!ml-0",icon:(0,i.createElement)("button",{type:"button",onClick:()=>{g&&(b(!0),setTimeout(()=>b(!1),500),I(""))},disabled:!g,"aria-label":(0,D.__)("Reset color","cartflows"),className:"wcf-colorpicker-reset bg-transparent border-0 p-1.5 cursor-pointer text-text-tertiary hover:text-text-secondary disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:text-text-tertiary focus-visible:ring-1 focus-visible:ring-border-interactive focus-visible:outline-none rounded-sm"},(0,i.createElement)(zf,{className:`w-4 h-4 stroke-2 transform ${y?"rotate-180":""} transition-transform duration-500`,"aria-hidden":"true"}))})),(0,i.createElement)("div",{className:"wcf-color-picker relative",ref:v},m?(0,i.createElement)("div",{className:"wcf-color-picker-popover absolute z-10 right-0 top-3",id:x},p&&(0,i.createElement)("div",{className:"wcf-color-picker-cover fixed inset-0",onClick:()=>{h(!1)}}),(0,i.createElement)("div",{className:"bg-background-primary shadow-lg relative rounded-md overflow-hidden"},(0,i.createElement)(mx.ColorPicker,{color:g,onChange:I,enableAlpha:!1}))):null))))},gx=e=>e.isSelected?"#F3F4F6":e.isFocused?"#F9FAFB":"transparent",wx=function(e){const{name:t,label:n,value:r,desc:o,tooltip:a,font_weight_name:l="",font_weight_value:c="",sectionClass:d=!1,wrapperClass:u=!1,labelClass:f="",displayAlign:p="horizontal"}=e,m=d||"text-left";let h=u||"flex items-center gap-2.5",g=f||"text-sm font-medium text-text-primary";"horizontal"!==p&&(h="block w-full text-left",g+=" mb-2");const w=cartflows_admin.cf_font_family,y=r||"Default",[b,v]=(0,s.useState)({value:r,label:r&&r.match(/'([^']+)'/)?r.match(/'([^']+)'/)[1]:y}),[x,N]=(0,s.useState)(c),_=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=_(b);const M={control:(e,t)=>({...e,borderColor:"#E5E7EB",boxShadow:t.isFocused?"none":"",borderRadius:"6px","&:hover":{borderColor:"none"}}),option:(e,t)=>({...e,backgroundColor:gx(t),color:"#111827",cursor:"pointer","&:active":{backgroundColor:"#F3F4F6"}})};return(0,i.createElement)("div",{className:`wcf-field wcf-font-family-field ${m} `},(0,i.createElement)("div",{className:`wcf-field__data ${h}`},n&&(0,i.createElement)("div",{className:`wcf-field__data--label ${g}`},(0,i.createElement)("label",null,n,a&&(0,i.createElement)(uM,{text:a}))),(0,i.createElement)("div",{className:"wcf-selection-field"},(0,i.createElement)(nx,{name:t,className:"wcf-select2-input",classNamePrefix:"wcf",cacheOptions:!0,defaultOptions:w,value:b,loadOptions:e=>new Promise(t=>{setTimeout(()=>{t((e=>{const t=w[1].options,n=w[2].options,r=w[0];return t.concat(n,r).filter(t=>t.label.toLowerCase().includes(e.toLowerCase()))})(e))},1e3)}),onChange:t=>{v(t);const 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,i.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Wm(o)),""!==l&&(0,i.createElement)("div",{className:"wcf-font-weight-field mt-5"},(0,i.createElement)(cw,{name:l,className:"wcf-select-input",value:x,onChange:function(e){N(e)},options:E,label:"Font Weight",displayAlign:p})))};function yx({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 bx=s.forwardRef(yx),{__}=wp.i18n,vx=function(e){const{name:t,tooltip:n,value:r,label:o,objName:a,objValue:l,singleButton:c=!1,sectionClass:d="",wrapperClass:u="",labelClass:f,desc:p,descClass:m,displayAlign:h="horizontal"}=e,[g,w]=(0,s.useState)(r),[y,b]=(0,s.useState)(l),[v,x]=(0,s.useState)(!r),N=(0,s.useRef)(null),_=d||"text-left",E=m||"text-sm font-normal text-text-tertiary mt-2";let M=u||"flex items-center gap-2.5",I=f||"text-sm font-medium text-text-primary mb-2";"horizontal"!==h&&(M="block w-full text-left",I+=" mb-2");const S=e=>{e.preventDefault(),N.current||(N.current=wp.media({multiple:!1}),N.current.on("select",function(){const n=N.current.state().get("selection").first().toJSON(),r=n.sizes?.medium?.url||n.url;w(r),b(n),x(!r),k(e,t,r),k(e,a,n)})),N.current.open()},k=(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,i.createElement)("div",{className:`wcf-field wcf-image-selector-field ${_}`},(0,i.createElement)("div",{className:`wcf-field__data ${M}`},o&&(0,i.createElement)("div",{className:`wcf-field__data--label ${I}`},(0,i.createElement)("label",null,o,n&&(0,i.createElement)(uM,{text:n}))),(0,i.createElement)("div",{className:"wcf-field__data--content"},(0,i.createElement)("div",{className:"wcf-image-selector-field__input p-0"},g&&!v&&(0,i.createElement)("div",{className:"text-center border-solid border-border-muted mb-3 leading-4"},(0,i.createElement)("img",{src:g,className:"saved-image",name:t,width:"150",alt:__("Image Preview","cartflows")})),(0,i.createElement)("input",{type:"hidden",id:t,className:"wcf-image",name:t,value:g}),(0,i.createElement)("input",{type:"hidden",className:"wcf-image-obj",name:a,value:JSON.stringify(y)}),!c&&v&&(0,i.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:S},(0,i.createElement)(bx,{className:"h-5 w-5 text-text-tertiary","aria-hidden":"true"}),(0,i.createElement)(Pm,{direction:"column",align:"center",gap:"xs",className:"text-center"},(0,i.createElement)(Ym,{as:"p",size:14,weight:500,color:"primary",className:"m-0"},__("Drag and drop or browse files","cartflows")),(0,i.createElement)(Ym,{as:"p",size:12,color:"secondary",className:"m-0"},__("PNG, JPG, GIF up to 10MB","cartflows")))),(0,i.createElement)(Pm,{gap:"sm",className:"wcf-image-selector-field-buttons m-0 p-0"},c&&(0,i.createElement)(Po,{variant:"outline",size:"sm",className:"wcf-select-image",onClick:S},__(g?"Change Image":"Select Image","cartflows")),g&&(0,i.createElement)(Po,{variant:"outline",size:"sm",className:"wcf-remove-image",onClick:e=>{e.preventDefault(),w(""),x(!0),b(""),k(e,t,""),k(e,a,"")}},__("Remove Image","cartflows")))))),p&&(0,i.createElement)(Pm,{align:"center",gap:"xs",className:`wcf-field__desc ${E}`},(0,i.createElement)(vg,{className:"w-3 h-3 text-text-secondary shrink-0"}),Wm(p)))},xx=function(e){const{name:t,id:n,label:r,desc:o,value:a,tooltip:l,placeholder:c,min:d,max:u,width:f,afterfield:p,readonly:m,wrapperClass:h=!1,labelClass:g,sectionClass:w,descClass:y,displayAlign:b="horizontal",step:v="1"}=e,[x,N]=(0,s.useState)(a),_=(0,s.useRef)(null),E=w||"text-left",M=g||"text-sm font-medium text-text-primary mb-2",I=y||"text-sm font-normal text-text-tertiary mt-2";let S=h||"flex items-center gap-2.5";return"horizontal"!==b&&(S="block w-full text-left"),(0,s.useEffect)(()=>{N(a),_.current&&(_.current.value=null!=a?a:"")},[a]),(0,i.createElement)("div",{className:`wcf-field wcf-number-field ${E}`},(0,i.createElement)("div",{className:`wcf-field__data ${S}`},r&&(0,i.createElement)("div",{className:`wcf-field__data--label ${M}`},(0,i.createElement)("label",null,r,l&&(0,i.createElement)(uM,{text:l}))),(0,i.createElement)("div",{className:"wcf-field__data--content flex items-center"},(0,i.createElement)("input",{type:"hidden",ref:_,className:e.class?e.class:"",defaultValue:null!=x?x:""}),(0,i.createElement)(tg,{type:"number",name:t,value:x,id:n,onChange:function(e){let n=e;if("any"===v&&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),_.current&&(_.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:c,min:d,max:u,readOnly:m,disabled:m,inputMode:"numeric",step:v,style:{width:f},size:"md",className:`${e.class?e.class:"!w-full"}`}),p&&(0,i.createElement)("span",{className:"wcf-field__data--after-field ml-1 font-medium"},p))),o&&(0,i.createElement)("div",{className:`wcf-field__desc ${I}`},Wm(o)))},Nx=Ao("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Ex=Ao("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Mx=(0,s.createContext)(void 0);function Ix(){const e=(0,s.useContext)(Mx);if(void 0===e)throw new Error("useDayPicker() must be used within a custom component.");return e}const Sx={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 kx(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Dx={date:kx({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:kx({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:kx({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Cx={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function jx(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 Ax={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:jx({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:jx({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:jx({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:jx({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:jx({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 Tx(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 Lx={ordinalNumber:(Ox={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,t={})=>{const n=e.match(Ox.matchPattern);if(!n)return null;const r=n[0],o=e.match(Ox.parsePattern);if(!o)return null;let a=Ox.valueCallback?Ox.valueCallback(o[0]):o[0];return a=t.valueCallback?t.valueCallback(a):a,{value:a,rest:e.slice(r.length)}}),era:Tx({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:Tx({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:Tx({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:Tx({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:Tx({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 Ox;const zx={code:"en-US",formatDistance:(e,t,n)=>{let r;const o=Sx[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:Dx,formatRelative:(e,t,n,r)=>Cx[e],localize:Ax,match:Lx,options:{weekStartsOn:0,firstWeekContainsDate:1}};let Px={};function Rx(){return Px}Math.pow(10,8);const Ux=6048e5,Bx=Symbol.for("constructDateFrom");function Fx(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&Bx in e?e[Bx](t):e instanceof Date?new e.constructor(t):new Date(t)}function Qx(e,t){return Fx(t||e,e)}function Vx(e){const t=Qx(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 Yx(e,...t){const n=Fx.bind(null,e||t.find(e=>"object"==typeof e));return t.map(n)}function Zx(e,t){const n=Qx(e,t?.in);return n.setHours(0,0,0,0),n}function Wx(e,t,n){const[r,o]=Yx(n?.in,e,t),a=Zx(r),i=Zx(o),s=+a-Vx(a),l=+i-Vx(i);return Math.round((s-l)/864e5)}function Gx(e,t){const n=Qx(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Hx(e,t){const n=Rx(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Qx(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 $x(e,t){return Hx(e,{...t,weekStartsOn:1})}function Xx(e,t){const n=Qx(e,t?.in),r=n.getFullYear(),o=Fx(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=$x(o),i=Fx(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=$x(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function qx(e,t){const n=Qx(e,t?.in),r=+$x(n)-+function(e,t){const n=Xx(e,t),r=Fx(t?.in||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),$x(r)}(n);return Math.round(r/Ux)+1}function Jx(e,t){const n=Qx(e,t?.in),r=n.getFullYear(),o=Rx(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=Fx(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Hx(i,t),l=Fx(t?.in||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const c=Hx(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function Kx(e,t){const n=Qx(e,t?.in),r=+Hx(n,t)-+function(e,t){const n=Rx(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=Jx(e,t),a=Fx(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Hx(a,t)}(n,t);return Math.round(r/Ux)+1}function eN(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const tN={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return eN("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):eN(n+1,2)},d:(e,t)=>eN(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)=>eN(e.getHours()%12||12,t.length),H:(e,t)=>eN(e.getHours(),t.length),m:(e,t)=>eN(e.getMinutes(),t.length),s:(e,t)=>eN(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return eN(Math.trunc(r*Math.pow(10,n-3)),t.length)}},nN={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 tN.y(e,t)},Y:function(e,t,n,r){const o=Jx(e,r),a=o>0?o:1-o;return"YY"===t?eN(a%100,2):"Yo"===t?n.ordinalNumber(a,{unit:"year"}):eN(a,t.length)},R:function(e,t){return eN(Xx(e),t.length)},u:function(e,t){return eN(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 eN(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 eN(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 tN.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 eN(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=Kx(e,r);return"wo"===t?n.ordinalNumber(o,{unit:"week"}):eN(o,t.length)},I:function(e,t,n){const r=qx(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):eN(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):tN.d(e,t)},D:function(e,t,n){const r=function(e,t){const n=Qx(e,t?.in);return Wx(n,Gx(n))+1}(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):eN(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 eN(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 eN(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 eN(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 tN.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):tN.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):eN(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):eN(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):tN.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):tN.s(e,t)},S:function(e,t){return tN.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return oN(r);case"XXXX":case"XX":return aN(r);default:return aN(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return oN(r);case"xxxx":case"xx":return aN(r);default:return aN(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+rN(r,":");default:return"GMT"+aN(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+rN(r,":");default:return"GMT"+aN(r,":")}},t:function(e,t,n){return eN(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return eN(+e,t.length)}};function rN(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+eN(a,2)}function oN(e,t){return e%60==0?(e>0?"-":"+")+eN(Math.abs(e)/60,2):aN(e,t)}function aN(e,t=""){const n=e>0?"-":"+",r=Math.abs(e);return n+eN(Math.trunc(r/60),2)+t+eN(r%60,2)}const iN=(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"})}},sN=(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"})}},lN={p:sN,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return iN(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}}",iN(r,t)).replace("{{time}}",sN(o,t))}},cN=/^D+$/,dN=/^Y+$/,uN=["D","DD","YY","YYYY"];function fN(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}const pN=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mN=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,hN=/^'([^]*?)'?$/,gN=/''/g,wN=/[a-zA-Z]/;function yN(e,t,n){const r=Rx(),o=n?.locale??r.locale??zx,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=Qx(e,n?.in);if(!function(e){return!(!fN(e)&&"number"!=typeof e||isNaN(+Qx(e)))}(s))throw new RangeError("Invalid time value");let l=t.match(mN).map(e=>{const t=e[0];return"p"===t||"P"===t?(0,lN[t])(e,o.formatLong):e}).join("").match(pN).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:bN(e)};if(nN[t])return{isToken:!0,value:e};if(t.match(wN))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 dN.test(e)}(a)||!n?.useAdditionalDayOfYearTokens&&function(e){return cN.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),uN.includes(e))throw new RangeError(r)}(a,t,String(e)),(0,nN[a[0]])(s,a,o.localize,c)}).join("")}function bN(e){const t=e.match(hN);return t?t[1].replace(gN,"'"):e}const vN={...zx,labels:{labelDayButton:(e,t,n,r)=>{let o;o=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>yN(e,t,{locale:zx,...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)=>yN(e,n,{locale:zx,...t}),r(e,"LLLL yyyy")},labelGridcell:(e,t,n,r)=>{let o;o=r&&"function"==typeof r.format?r.format.bind(r):(e,t)=>yN(e,t,{locale:zx,...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)=>yN(e,n,{locale:zx,...t}),r(e,"cccc")}}};Symbol.for("constructDateFrom");const xN={},NN={};function _N(e,t){try{const n=(xN[e]||=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format)(t).split("GMT")[1];return n in NN?NN[n]:MN(n,n.split(":"))}catch{if(e in NN)return NN[e];const t=e?.match(EN);return t?MN(e,t.slice(1)):NaN}}const EN=/([+-]\d\d):?(\d\d)?/;function MN(e,t){const n=+(t[0]||0),r=+(t[1]||0),o=+(t[2]||0)/60;return NN[e]=60*n+r>0?60*n+r+o:60*n-r-o}class IN extends Date{constructor(...e){super(),e.length>1&&"string"==typeof e[e.length-1]&&(this.timeZone=e.pop()),this.internal=new Date,isNaN(_N(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)),DN(this),kN(this)):this.setTime(Date.now())}static tz(e,...t){return t.length?new IN(...t,e):new IN(Date.now(),e)}withTimeZone(e){return new IN(+this,e)}getTimezoneOffset(){const e=-_N(this.timeZone,this);return e>0?Math.floor(e):Math.ceil(e)}setTime(e){return Date.prototype.setTime.apply(this,arguments),kN(this),+this}[Symbol.for("constructDateFrom")](e){return new IN(+new Date(e),this.timeZone)}}const SN=/^(get|set)(?!UTC)/;function kN(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(60*-_N(e.timeZone,e)))}function DN(e){const t=_N(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,d=Math.round(-60*_N(e.timeZone,e))%60;(d||c)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+d),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+d+c));const u=_N(e.timeZone,e),f=u>0?Math.floor(u):Math.ceil(u),p=-new Date(+e).getTimezoneOffset()-f-s;if(f!==n&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const t=_N(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(!SN.test(e))return;const t=e.replace(SN,"$1UTC");IN.prototype[t]&&(e.startsWith("get")?IN.prototype[e]=function(){return this.internal[t]()}:(IN.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()),DN(e)}(this),+this},IN.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),kN(this),+this}))});class CN extends IN{static tz(e,...t){return t.length?new CN(...t,e):new CN(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 CN(+this,e)}[Symbol.for("constructDateFrom")](e){return new CN(+new Date(e),this.timeZone)}}function jN(e,t,n){const r=Qx(e,n?.in);return isNaN(t)?Fx(n?.in||e,NaN):t?(r.setDate(r.getDate()+t),r):r}function AN(e,t,n){const r=Qx(e,n?.in);if(isNaN(t))return Fx(n?.in||e,NaN);if(!t)return r;const o=r.getDate(),a=Fx(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 TN(e,t,n){const[r,o]=Yx(n?.in,e,t);return 12*(r.getFullYear()-o.getFullYear())+(r.getMonth()-o.getMonth())}function LN(e,t){const[n,r]=Yx(e,t.start,t.end);return{start:n,end:r}}function ON(e,t){const n=Rx(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=Qx(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 zN(e,t){const n=Qx(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function PN(e,t){return+Qx(e)>+Qx(t)}function RN(e,t){return+Qx(e)<+Qx(t)}function UN(e,t,n){const r=Qx(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=Fx(n?.in||e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=function(e,t){const n=Qx(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=Fx(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 BN(e,t){const n=Qx(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function FN(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 QN{constructor(e,t){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?CN.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 CN(e,t,n,this.options.timeZone):new Date(e,t,n),this.addDays=(e,t)=>this.overrides?.addDays?this.overrides.addDays(e,t):jN(e,t),this.addMonths=(e,t)=>this.overrides?.addMonths?this.overrides.addMonths(e,t):AN(e,t),this.addWeeks=(e,t)=>this.overrides?.addWeeks?this.overrides.addWeeks(e,t):function(e,t,n){return jN(e,7*t,n)}(e,t),this.addYears=(e,t)=>this.overrides?.addYears?this.overrides.addYears(e,t):function(e,t,n){return AN(e,12*t,n)}(e,t),this.differenceInCalendarDays=(e,t)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(e,t):Wx(e,t),this.differenceInCalendarMonths=(e,t)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(e,t):TN(e,t),this.eachMonthOfInterval=e=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(e):function(e,t){const{start:n,end:r}=LN(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(Fx(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}=LN(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(Fx(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=FN(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 ON(e,{...t,weekStartsOn:1})}(e),this.endOfMonth=e=>this.overrides?.endOfMonth?this.overrides.endOfMonth(e):zN(e),this.endOfWeek=(e,t)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(e,t):ON(e,this.options),this.endOfYear=e=>this.overrides?.endOfYear?this.overrides.endOfYear(e):function(e,t){const n=Qx(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):yN(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):qx(e),this.getMonth=(e,t)=>this.overrides?.getMonth?this.overrides.getMonth(e,this.options):function(e,t){return Qx(e,t?.in).getMonth()}(e,this.options),this.getYear=(e,t)=>this.overrides?.getYear?this.overrides.getYear(e,this.options):function(e,t){return Qx(e,t?.in).getFullYear()}(e,this.options),this.getWeek=(e,t)=>this.overrides?.getWeek?this.overrides.getWeek(e,this.options):Kx(e,this.options),this.isAfter=(e,t)=>this.overrides?.isAfter?this.overrides.isAfter(e,t):PN(e,t),this.isBefore=(e,t)=>this.overrides?.isBefore?this.overrides.isBefore(e,t):RN(e,t),this.isDate=e=>this.overrides?.isDate?this.overrides.isDate(e):fN(e),this.isSameDay=(e,t)=>this.overrides?.isSameDay?this.overrides.isSameDay(e,t):function(e,t,n){const[r,o]=Yx(n?.in,e,t);return+Zx(r)===+Zx(o)}(e,t),this.isSameMonth=(e,t)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(e,t):function(e,t,n){const[r,o]=Yx(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]=Yx(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=Fx.bind(null,e));const t=Qx(e,r);(!n||n<t||isNaN(+t))&&(n=t)}),Fx(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=Fx.bind(null,e));const t=Qx(e,r);(!n||n>t||isNaN(+t))&&(n=t)}),Fx(r,n||NaN)}(e),this.setMonth=(e,t)=>this.overrides?.setMonth?this.overrides.setMonth(e,t):UN(e,t),this.setYear=(e,t)=>this.overrides?.setYear?this.overrides.setYear(e,t):function(e,t,n){const r=Qx(e,n?.in);return isNaN(+r)?Fx(n?.in||e,NaN):(r.setFullYear(t),r)}(e,t),this.startOfBroadcastWeek=(e,t)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(e,this):FN(e,this),this.startOfDay=e=>this.overrides?.startOfDay?this.overrides.startOfDay(e):Zx(e),this.startOfISOWeek=e=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(e):$x(e),this.startOfMonth=e=>this.overrides?.startOfMonth?this.overrides.startOfMonth(e):BN(e),this.startOfWeek=(e,t)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(e,this.options):Hx(e,this.options),this.startOfYear=e=>this.overrides?.startOfYear?this.overrides.startOfYear(e):Gx(e),this.options={locale:vN,...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&&QN.yearFirstLocales.has(e)?"year-first":"month-first"}formatMonthYear(e){const{locale:t,timeZone:n,numerals:r}=this.options,o=t?.code;if(o&&QN.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)}}QN.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 VN=new QN;var YN,ZN,WN,GN;function HN(e,t,n=!1,r=VN){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 $N(e){return Boolean(e&&"object"==typeof e&&"before"in e&&"after"in e)}function XN(e){return Boolean(e&&"object"==typeof e&&"from"in e)}function qN(e){return Boolean(e&&"object"==typeof e&&"after"in e)}function JN(e){return Boolean(e&&"object"==typeof e&&"before"in e)}function KN(e){return Boolean(e&&"object"==typeof e&&"dayOfWeek"in e)}function e_(e,t){return Array.isArray(e)&&e.every(t.isDate)}function t_(e,t,n=VN){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(e_(t,n))return t.some(t=>o(e,t));if(XN(t))return HN(t,e,!1,n);if(KN(t))return Array.isArray(t.dayOfWeek)?t.dayOfWeek.includes(e.getDay()):t.dayOfWeek===e.getDay();if($N(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 qN(t)?a(e,t.after)>0:JN(t)?a(t.before,e)>0:"function"==typeof t&&t(e)})}function n_(e){return s.createElement("button",{...e})}function r_(e){return s.createElement("span",{...e})}function o_(e){const{size:t=24,orientation:n="left",className:r}=e;return s.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},"up"===n&&s.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),"down"===n&&s.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),"left"===n&&s.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),"right"===n&&s.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function a_(e){const{day:t,modifiers:n,...r}=e;return s.createElement("td",{...r})}function i_(e){const{day:t,modifiers:n,...r}=e,o=s.useRef(null);return s.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),s.createElement("button",{ref:o,...r})}function s_(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[YN.Dropdown],n].join(" "),l=t?.find(({value:e})=>e===a.value);return s.createElement("span",{"data-disabled":a.disabled,className:o[YN.DropdownRoot]},s.createElement(r.Select,{className:i,...a},t?.map(({value:e,label:t,disabled:n})=>s.createElement(r.Option,{key:e,value:e,disabled:n},t))),s.createElement("span",{className:o[YN.CaptionLabel],"aria-hidden":!0},l?.label,s.createElement(r.Chevron,{orientation:"down",size:18,className:o[YN.Chevron]})))}function l_(e){return s.createElement("div",{...e})}function c_(e){return s.createElement("div",{...e})}function d_(e){const{calendarMonth:t,displayIndex:n,...r}=e;return s.createElement("div",{...r},e.children)}function u_(e){const{calendarMonth:t,displayIndex:n,...r}=e;return s.createElement("div",{...r})}function f_(e){return s.createElement("table",{...e})}function p_(e){return s.createElement("div",{...e})}function m_(e){const{components:t}=Ix();return s.createElement(t.Dropdown,{...e})}function h_(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:l,labels:{labelPrevious:c,labelNext:d}}=Ix(),u=(0,s.useCallback)(e=>{o&&n?.(e)},[o,n]),f=(0,s.useCallback)(e=>{r&&t?.(e)},[r,t]);return s.createElement("nav",{...a},s.createElement(i.PreviousMonthButton,{type:"button",className:l[YN.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":!r||void 0,"aria-label":c(r),onClick:f},s.createElement(i.Chevron,{disabled:!r||void 0,className:l[YN.Chevron],orientation:"left"})),s.createElement(i.NextMonthButton,{type:"button",className:l[YN.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":!o||void 0,"aria-label":d(o),onClick:u},s.createElement(i.Chevron,{disabled:!o||void 0,orientation:"right",className:l[YN.Chevron]})))}function g_(e){const{components:t}=Ix();return s.createElement(t.Button,{...e})}function w_(e){return s.createElement("option",{...e})}function y_(e){const{components:t}=Ix();return s.createElement(t.Button,{...e})}function b_(e){const{rootRef:t,...n}=e;return s.createElement("div",{...n,ref:t})}function v_(e){return s.createElement("select",{...e})}function x_(e){const{week:t,...n}=e;return s.createElement("tr",{...n})}function N_(e){return s.createElement("th",{...e})}function E_(e){return s.createElement("thead",{"aria-hidden":!0},s.createElement("tr",{...e}))}function M_(e){const{week:t,...n}=e;return s.createElement("th",{...n})}function I_(e){return s.createElement("th",{...e})}function S_(e){return s.createElement("tbody",{...e})}function k_(e){const{components:t}=Ix();return s.createElement(t.Dropdown,{...e})}function D_(){const e={};for(const t in YN)e[YN[t]]=`rdp-${YN[t]}`;for(const t in ZN)e[ZN[t]]=`rdp-${ZN[t]}`;for(const t in WN)e[WN[t]]=`rdp-${WN[t]}`;for(const t in GN)e[GN[t]]=`rdp-${GN[t]}`;return e}function C_(e,t,n){return(n??new QN(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"}(YN||(YN={})),function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"}(ZN||(ZN={})),function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"}(WN||(WN={})),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"}(GN||(GN={}));const j_=C_;function A_(e,t,n){return(n??new QN(t)).format(e,"d")}function T_(e,t=VN){return t.format(e,"LLLL")}function L_(e,t,n){return(n??new QN(t)).format(e,"cccccc")}function O_(e,t=VN){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function z_(){return""}function P_(e,t=VN){return t.format(e,"yyyy")}const R_=P_;function U_(e,t,n,r){let o=(r??new QN(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const B_=U_;function F_(e,t,n){return(n??new QN(t)).formatMonthYear(e)}const Q_=F_;function V_(e,t,n,r){let o=(r??new QN(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Y_(e){return"Choose the Month"}function Z_(){return""}function W_(e,t){return"Go to the Next Month"}function G_(e){return"Go to the Previous Month"}function H_(e,t,n){return(n??new QN(t)).format(e,"cccc")}function $_(e,t){return`Week ${e}`}function X_(e){return"Week Number"}function q_(e){return"Choose the Year"}const J_=(e,t,n)=>t||(n?"function"==typeof n?n:(...e)=>n:e);function K_(e,t){const n=t.locale?.labels??{};return{...a,...e??{},labelDayButton:J_(U_,e?.labelDayButton,n.labelDayButton),labelMonthDropdown:J_(Y_,e?.labelMonthDropdown,n.labelMonthDropdown),labelNext:J_(W_,e?.labelNext,n.labelNext),labelPrevious:J_(G_,e?.labelPrevious,n.labelPrevious),labelWeekNumber:J_($_,e?.labelWeekNumber,n.labelWeekNumber),labelYearDropdown:J_(q_,e?.labelYearDropdown,n.labelYearDropdown),labelGrid:J_(F_,e?.labelGrid,n.labelGrid),labelGridcell:J_(V_,e?.labelGridcell,n.labelGridcell),labelNav:J_(Z_,e?.labelNav,n.labelNav),labelWeekNumberHeader:J_(X_,e?.labelWeekNumberHeader,n.labelWeekNumberHeader),labelWeekday:J_(H_,e?.labelWeekday,n.labelWeekday)}}function eE(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 tE(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 nE=e=>e instanceof HTMLElement?e:null,rE=e=>[...e.querySelectorAll("[data-animated-month]")??[]],oE=e=>nE(e.querySelector("[data-animated-caption]")),aE=e=>nE(e.querySelector("[data-animated-weeks]"));function iE(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:d,startOfMonth:u}=r;return n&&c(n,l)<s-1&&(l=d(n,-1*(s-1))),t&&c(l,t)<0&&(l=t),u(l)}class sE{constructor(e,t,n=VN){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 lE{constructor(e,t){this.days=t,this.weekNumber=e}}class cE{constructor(e,t){this.date=e,this.weeks=t}}function dE(e,t){const[n,r]=(0,s.useState)(e);return[void 0===t?n:t,r]}var uE;function fE(e){return!e[ZN.disabled]&&!e[ZN.hidden]&&!e[ZN.outside]}function pE(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:d,addWeeks:u,addYears:f,endOfBroadcastWeek:p,endOfISOWeek:m,endOfWeek:h,max:g,min:w,startOfBroadcastWeek:y,startOfISOWeek:b,startOfWeek:v}=i,x={day:c,week:u,month:d,year:f,startOfWeek:e=>l?y(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=w([o,N])),N}(e,t,n.date,r,o,a,i),c=Boolean(a.disabled&&t_(l,a.disabled,i)),d=Boolean(a.hidden&&t_(l,a.hidden,i)),u=new sE(l,l,i);return c||d?pE(e,t,u,r,o,a,i,s+1):u}function mE(e,t,n,r,o){const{autoFocus:a}=e,[i,l]=(0,s.useState)(),c=function(e,t,n,r){let o,a=-1;for(const i of e){const e=t(i);fE(e)&&(e[ZN.focused]&&a<uE.FocusedModifier?(o=i,a=uE.FocusedModifier):r?.isEqualTo(i)&&a<uE.LastFocused?(o=i,a=uE.LastFocused):n(i.date)&&a<uE.Selected?(o=i,a=uE.Selected):e[ZN.today]&&a<uE.Today&&(o=i,a=uE.Today))}return o||(o=e.find(e=>fE(t(e)))),o}(t.days,n,r||(()=>!1),i),[d,u]=(0,s.useState)(a?c:void 0);return{isFocusTarget:e=>Boolean(c?.isEqualTo(e)),setFocused:u,focused:d,blur:()=>{l(d),u(void 0)},moveFocus:(n,r)=>{if(!d)return;const a=pE(n,r,d,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 hE(e,t,n=VN){return HN(e,t.from,!1,n)||HN(e,t.to,!1,n)||HN(t,e.from,!1,n)||HN(t,e.to,!1,n)}function gE(e,t){const{disabled:n,excludeDisabled:r,resetOnSelect:o,selected:a,required:i,onSelect:s}=e,[l,c]=dE(a,s?a:void 0),d=s?a:l;return{selected:d,select:(a,l,u)=>{const{min:f,max:p}=e;let m;if(a){const e=d?.from,n=d?.to,r=!!e&&!!n,s=!!e&&!!n&&t.isSameDay(e,n)&&t.isSameDay(a,e);m=!o||!r&&d?.from?function(e,t,n=0,r=0,o=!1,a=VN){const{from:i,to:s}=t||{},{isSameDay:l,isAfter:c,isBefore:d}=a;let u;if(i||s){if(i&&!s)u=l(i,e)?0===n?{from:i,to:e}:o?{from:i,to:void 0}:void 0:d(e,i)?{from:e,to:i}:{from:i,to:e};else if(i&&s)if(l(i,e)&&l(s,e))u=o?{from:i,to:s}:void 0;else if(l(i,e))u={from:i,to:n>0?void 0:e};else if(l(s,e))u={from:e,to:n>0?void 0:e};else if(d(e,i))u={from:e,to:s};else if(c(e,i))u={from:i,to:e};else{if(!c(e,s))throw new Error("Invalid range");u={from:i,to:e}}}else u={from:e,to:n>0?void 0:e};if(u?.from&&u?.to){const t=a.differenceInCalendarDays(u.to,u.from);(r>0&&t>r||n>1&&t<n)&&(u={from:e,to:void 0})}return u}(a,d,f,p,i,t):!i&&s?void 0:{from:a,to:void 0}}return r&&n&&m?.from&&m.to&&function(e,t,n=VN){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)?HN(e,t,!1,n):e_(t,n)?t.some(t=>HN(e,t,!1,n)):XN(t)?!(!t.from||!t.to)&&hE(e,{from:t.from,to:t.to},n):KN(t)?function(e,t,n=VN){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):$N(t)?n.isAfter(t.before,t.after)?hE(e,{from:n.addDays(t.after,1),to:n.addDays(t.before,-1)},n):t_(e.from,t,n)||t_(e.to,t,n):!(!qN(t)&&!JN(t))&&(t_(e.from,t,n)||t_(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,u),m},isSelected:e=>d&&HN(d,e,!1,t)}}function wE(e,t){return e instanceof CN&&e.timeZone===t?e:new CN(e,t)}function yE(e,t,n){if(!n)return wE(e,t);const r=wE(e,t),o=new CN(r.getFullYear(),r.getMonth(),r.getDate(),12,0,0,t);return new Date(o.getTime())}function bE(e,t,n){return"boolean"==typeof e||"function"==typeof e?e:e instanceof Date?yE(e,t,n):Array.isArray(e)?e.map(e=>e instanceof Date?yE(e,t,n):e):XN(e)?{...e,from:e.from?wE(e.from,t):e.from,to:e.to?wE(e.to,t):e.to}:$N(e)?{before:yE(e.before,t,n),after:yE(e.after,t,n)}:qN(e)?{after:yE(e.after,t,n)}:JN(e)?{before:yE(e.before,t,n)}:e}function vE(e,t,n){return e?Array.isArray(e)?e.map(e=>bE(e,t,n)):bE(e,t,n):e}function xE(e){let t=e;const n=t.timeZone;if(n&&(t={...e,timeZone:n},t.today&&(t.today=wE(t.today,n)),t.month&&(t.month=wE(t.month,n)),t.defaultMonth&&(t.defaultMonth=wE(t.defaultMonth,n)),t.startMonth&&(t.startMonth=wE(t.startMonth,n)),t.endMonth&&(t.endMonth=wE(t.endMonth,n)),"single"===t.mode&&t.selected?t.selected=wE(t.selected,n):"multiple"===t.mode&&t.selected?t.selected=t.selected?.map(e=>wE(e,n)):"range"===t.mode&&t.selected&&(t.selected={from:t.selected.from?wE(t.selected.from,n):t.selected.from,to:t.selected.to?wE(t.selected.to,n):t.selected.to}),void 0!==t.disabled&&(t.disabled=vE(t.disabled,n)),void 0!==t.hidden&&(t.hidden=vE(t.hidden,n)),t.modifiers)){const e={};Object.keys(t.modifiers).forEach(r=>{e[r]=vE(t.modifiers?.[r],n)}),t.modifiers=e}const{components:a,formatters:i,labels:l,dateLib:c,locale:d,classNames:u}=(0,s.useMemo)(()=>{const e={...vN,...t.locale},n=t.broadcastCalendar?1:t.weekStartsOn,a=t.noonSafe&&t.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 CN(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(CN.tz(e)),newDate:(t,n,r)=>new CN(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 CN(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 CN(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 CN(n.getFullYear(),0,1,12,0,0,e);for(;i.getFullYear()<=r.getFullYear();)o.push(new CN(i,e)),i.setFullYear(i.getFullYear()+1,0,1);return o},getWeek:(e,t)=>Kx(i(e),{weekStartsOn:t?.weekStartsOn??o,firstWeekContainsDate:t?.firstWeekContainsDate??r?.options?.firstWeekContainsDate??1}),getISOWeek:e=>qx(i(e)),differenceInCalendarDays:(e,t)=>Wx(i(e),i(t)),differenceInCalendarMonths:(e,t)=>TN(i(e),i(t))}}(t.timeZone,{weekStartsOn:n,locale:e}):void 0,i=t.dateLib&&a?{...a,...t.dateLib}:t.dateLib??a,s=new QN({locale:e,weekStartsOn:n,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},i);return{dateLib:s,components:(c=t.components,{...r,...c}),formatters:(l=t.formatters,l?.formatMonthCaption&&!l.formatCaption&&(l.formatCaption=l.formatMonthCaption),l?.formatYearCaption&&!l.formatYearDropdown&&(l.formatYearDropdown=l.formatYearCaption),{...o,...l}),labels:K_(t.labels,s.options),locale:e,classNames:{...D_(),...t.classNames}};var l,c},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.noonSafe,t.components,t.formatters,t.labels,t.classNames]);t.today||(t={...t,today:c.today()});const{captionLayout:f,mode:p,navLayout:m,numberOfMonths:h=1,onDayBlur:g,onDayClick:w,onDayFocus:y,onDayKeyDown:b,onDayMouseEnter:v,onDayMouseLeave:x,onNextClick:N,onPrevClick:_,showWeekNumber:E,styles:M}=t,{formatCaption:I,formatDay:S,formatMonthDropdown:k,formatWeekNumber:D,formatWeekNumberHeader:C,formatWeekdayName:j,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:d,today:u}=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=d(p,11,31));const g="dropdown"===e.captionLayout||"dropdown-years"===e.captionLayout;return n?n=i(n):f?n=d(f,0,1):!n&&g&&(n=o(l(e.today??u(),-100))),r?r=s(r):p?r=d(p,11,31):!r&&g&&(r=c(e.today??u())),[n?a(n):n,r?a(r):r]}(e,t),{startOfMonth:o,endOfMonth:a}=t,i=iE(e,n,r,t),[l,c]=dE(i,e.month?i:void 0);(0,s.useEffect)(()=>{const o=iE(e,n,r,t);c(o)},[e.timeZone]);const{months:d,weeks:u,days:f,previousMonth:p,nextMonth:m}=(0,s.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}(l,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:d,differenceInCalendarMonths:u,endOfBroadcastWeek:f,endOfISOWeek:p,endOfMonth:m,endOfWeek:h,isAfter:g,startOfBroadcastWeek:w,startOfISOWeek:y,startOfWeek:b}=r,v=l?w(o,r):i?y(o):b(o),x=l?f(a):i?p(m(a)):h(m(a)),N=t&&(l?f(t):i?p(t):h(t)),_=d(N&&g(x,N)?N:x,v),E=u(a,o)+1,M=[];for(let e=0;e<=_;e++){const t=c(v,e);M.push(t)}const I=(l?35:42)*E;if(s&&M.length<I){const e=I-M.length;for(let t=0;t<e;t++){const e=c(M[M.length-1],1);M.push(e)}}return M}(o,e.endMonth?a(e.endMonth):void 0,{ISOWeek:e.ISOWeek,fixedWeeks:e.fixedWeeks,broadcastCalendar:e.broadcastCalendar},t),s=function(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:l,getISOWeek:c,getWeek:d,startOfBroadcastWeek:u,startOfISOWeek:f,startOfWeek:p}=r,m=e.reduce((e,m)=>{const h=n.broadcastCalendar?u(m,r):n.ISOWeek?f(m):p(m),g=n.broadcastCalendar?a(m):n.ISOWeek?i(s(m)):l(s(m)),w=t.filter(e=>e>=h&&e<=g),y=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<y){const e=t.filter(e=>{const t=y-w.length;return e>g&&e<=o(g,t)});w.push(...e)}const b=w.reduce((e,t)=>{const o=n.ISOWeek?c(t):d(t),a=e.find(e=>e.weekNumber===o),i=new sE(t,m,r);return a?a.days.push(i):e.push(new lE(o,[i])),e},[]),v=new cE(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())}(s),d=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())}(s),u=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,d=i(e);return t&&l(d,t)<=0?void 0:s(d,-c)}(l,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,d=i(e);return t&&l(t,e)<a?void 0:s(d,c)}(l,r,e,t);return{months:s,weeks:c,days:d,previousMonth:u,nextMonth:f}},[t,l.getTime(),r?.getTime(),n?.getTime(),e.disableNavigation,e.broadcastCalendar,e.endMonth?.getTime(),e.fixedWeeks,e.ISOWeek,e.numberOfMonths,e.pagedNavigation,e.reverseMonths]),{disableNavigation:h,onMonthChange:g}=e,w=e=>{if(h)return;let t=o(e);n&&t<o(n)&&(t=o(n)),r&&t>o(r)&&(t=o(r)),c(t),g?.(t)},y={months:d,weeks:u,days:f,navStart:n,navEnd:r,previousMonth:p,nextMonth:m,goToMonth:w,goToDay:e=>{(e=>u.some(t=>t.days.some(t=>t.isEqualTo(e))))(e)||w(e.date)}};return y}(t,c),{days:L,months:O,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:d=o.today()}=t,{isSameDay:u,isSameMonth:f,startOfMonth:p,isBefore:m,endOfMonth:h,isAfter:g}=o,w=n&&p(n),y=r&&h(r),b={[ZN.focused]:[],[ZN.outside]:[],[ZN.disabled]:[],[ZN.hidden]:[],[ZN.today]:[]},v={};for(const t of e){const{date:e,displayMonth:n}=t,r=Boolean(n&&!f(e,n)),p=Boolean(w&&m(e,w)),h=Boolean(y&&g(e,y)),x=Boolean(a&&t_(e,a,o)),N=Boolean(i&&t_(e,i,o))||p||h||!c&&!l&&r||c&&!1===l&&r,_=u(e,d);r&&b.outside.push(t),x&&b.disabled.push(t),N&&b.hidden.push(t),_&&b.today.push(t),s&&Object.keys(s).forEach(n=>{const r=s?.[n];r&&t_(e,r,o)&&(v[n]?v[n].push(t):v[n]=[t])})}return e=>{const t={[ZN.focused]:!1,[ZN.disabled]:!1,[ZN.hidden]:!1,[ZN.outside]:!1,[ZN.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}}}(L,t,z,P,c),{isSelected:Q,select:V,selected:Y}=function(e,t){const n=function(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=dE(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]=dE(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t,c=e=>s?.some(t=>l(t,e))??!1,{min:d,max:u}=e;return{selected:s,select:(e,t,n)=>{let a=[...s??[]];if(c(e)){if(s?.length===d)return;if(r&&1===s?.length)return;a=s?.filter(t=>!l(t,e))}else a=s?.length===u?[e]:[...a,e];return o||i(a),o?.(a,e,t,n),a},isSelected:c}}(e,t),o=gE(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}(t,c)??{},{blur:Z,focused:W,isFocusTarget:G,moveFocus:H,setFocused:$}=mE(t,T,F,Q??(()=>!1),c),{labelDayButton:X,labelGridcell:q,labelGrid:J,labelMonthDropdown:K,labelNav:ee,labelPrevious:te,labelNext:ne,labelWeekday:re,labelWeekNumber:oe,labelWeekNumberHeader:ae,labelYearDropdown:ie}=l,se=(0,s.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}(c,t.ISOWeek,t.broadcastCalendar,t.today),[c,t.ISOWeek,t.broadcastCalendar,t.today]),le=void 0!==p||void 0!==w,ce=(0,s.useCallback)(()=>{R&&(B(R),_?.(R))},[R,B,_]),de=(0,s.useCallback)(()=>{U&&(B(U),N?.(U))},[B,U,N]),ue=(0,s.useCallback)((e,t)=>n=>{n.preventDefault(),n.stopPropagation(),$(e),t.disabled||(V?.(e.date,t,n),w?.(e.date,t,n))},[V,w,$]),fe=(0,s.useCallback)((e,t)=>n=>{$(e),y?.(e.date,t,n)},[y,$]),pe=(0,s.useCallback)((e,t)=>n=>{Z(),g?.(e.date,t,n)},[Z,g]),me=(0,s.useCallback)((e,n)=>r=>{const o={ArrowLeft:[r.shiftKey?"month":"day","rtl"===t.dir?"after":"before"],ArrowRight:[r.shiftKey?"month":"day","rtl"===t.dir?"before":"after"],ArrowDown:[r.shiftKey?"year":"week","after"],ArrowUp:[r.shiftKey?"year":"week","before"],PageUp:[r.shiftKey?"year":"month","before"],PageDown:[r.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(o[r.key]){r.preventDefault(),r.stopPropagation();const[e,t]=o[r.key];H(e,t)}b?.(e.date,n,r)},[H,b,t.dir]),he=(0,s.useCallback)((e,t)=>n=>{v?.(e.date,t,n)},[v]),ge=(0,s.useCallback)((e,t)=>n=>{x?.(e.date,t,n)},[x]),we=(0,s.useCallback)(e=>t=>{const n=Number(t.target.value),r=c.setMonth(c.startOfMonth(e),n);B(r)},[c,B]),ye=(0,s.useCallback)(e=>t=>{const n=Number(t.target.value),r=c.setYear(c.startOfMonth(e),n);B(r)},[c,B]),{className:be,style:ve}=(0,s.useMemo)(()=>({className:[u[YN.Root],t.className].filter(Boolean).join(" "),style:{...M?.[YN.Root],...t.style}}),[u,t.className,t.style,M]),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}(t),Ne=(0,s.useRef)(null);!function(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=(0,s.useRef)(null),l=(0,s.useRef)(r),c=(0,s.useRef)(!1);(0,s.useLayoutEffect)(()=>{const s=l.current;if(l.current=r,!(t&&e.current&&e.current instanceof HTMLElement&&0!==r.length&&0!==s.length&&r.length===s.length))return;const d=a.isSameMonth(r[0].date,s[0].date),u=a.isAfter(r[0].date,s[0].date),f=u?n[GN.caption_after_enter]:n[GN.caption_before_enter],p=u?n[GN.weeks_after_enter]:n[GN.weeks_before_enter],m=i.current,h=e.current.cloneNode(!0);if(h instanceof HTMLElement?(rE(h).forEach(e=>{if(!(e instanceof HTMLElement))return;const t=nE(e.querySelector("[data-animated-month]"));t&&e.contains(t)&&e.removeChild(t);const n=oE(e);n&&n.classList.remove(f);const r=aE(e);r&&r.classList.remove(p)}),i.current=h):i.current=null,c.current||d||o)return;const g=m instanceof HTMLElement?rE(m):[],w=rE(e.current);if(w?.every(e=>e instanceof HTMLElement)&&g&&g.every(e=>e instanceof HTMLElement)){c.current=!0;const t=[];e.current.style.isolation="isolate";const r=(y=e.current,nE(y.querySelector("[data-animated-nav]")));r&&(r.style.zIndex="1"),w.forEach((o,a)=>{const i=g[a];if(!i)return;o.style.position="relative",o.style.overflow="hidden";const s=oE(o);s&&s.classList.add(f);const l=aE(o);l&&l.classList.add(p);const d=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),r&&(r.style.zIndex=""),s&&s.classList.remove(f),l&&l.classList.remove(p),o.style.position="",o.style.overflow="",o.contains(i)&&o.removeChild(i)};t.push(d),i.style.pointerEvents="none",i.style.position="absolute",i.style.overflow="hidden",i.setAttribute("aria-hidden","true");const m=(e=>nE(e.querySelector("[data-animated-weekdays]")))(i);m&&(m.style.opacity="0");const h=oE(i);h&&(h.classList.add(u?n[GN.caption_before_exit]:n[GN.caption_after_exit]),h.addEventListener("animationend",d));const w=aE(i);w&&w.classList.add(u?n[GN.weeks_before_exit]:n[GN.weeks_after_exit]),o.insertBefore(i,o.firstChild)})}var y})}(Ne,Boolean(t.animate),{classNames:u,months:O,focused:W,dateLib:c});const _e={dayPickerProps:t,selected:Y,select:V,isSelected:Q,months:O,nextMonth:U,previousMonth:R,goToMonth:B,getModifiers:F,components:a,classNames:u,styles:M,labels:l,formatters:i};return s.createElement(Mx.Provider,{value:_e},s.createElement(a.Root,{rootRef:t.animate?Ne:void 0,className:be,style:ve,dir:t.dir,id:t.id,lang:t.lang??d.code,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],"aria-labelledby":t["aria-labelledby"],...xe},s.createElement(a.Months,{className:u[YN.Months],style:M?.[YN.Months]},!t.hideNavigation&&!m&&s.createElement(a.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[YN.Nav],style:M?.[YN.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:de,previousMonth:R,nextMonth:U}),O.map((e,n)=>s.createElement(a.Month,{"data-animated-month":t.animate?"true":void 0,className:u[YN.Month],style:M?.[YN.Month],key:n,displayIndex:n,calendarMonth:e},"around"===m&&!t.hideNavigation&&0===n&&s.createElement(a.PreviousMonthButton,{type:"button",className:u[YN.PreviousMonthButton],tabIndex:R?void 0:-1,"aria-disabled":!R||void 0,"aria-label":te(R),onClick:ce,"data-animated-button":t.animate?"true":void 0},s.createElement(a.Chevron,{disabled:!R||void 0,className:u[YN.Chevron],orientation:"rtl"===t.dir?"right":"left"})),s.createElement(a.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:u[YN.MonthCaption],style:M?.[YN.MonthCaption],calendarMonth:e,displayIndex:n},f?.startsWith("dropdown")?s.createElement(a.DropdownNav,{className:u[YN.Dropdowns],style:M?.[YN.Dropdowns]},(()=>{const n="dropdown"===f||"dropdown-months"===f?s.createElement(a.MonthsDropdown,{key:"month",className:u[YN.MonthsDropdown],"aria-label":K(),classNames:u,components:a,disabled:Boolean(t.disableNavigation),onChange:we(e.date),options:eE(e.date,z,P,i,c),style:M?.[YN.Dropdown],value:c.getMonth(e.date)}):s.createElement("span",{key:"month"},k(e.date,c)),r="dropdown"===f||"dropdown-years"===f?s.createElement(a.YearsDropdown,{key:"year",className:u[YN.YearsDropdown],"aria-label":ie(c.options),classNames:u,components:a,disabled:Boolean(t.disableNavigation),onChange:ye(e.date),options:tE(z,P,i,c,Boolean(t.reverseYears)),style:M?.[YN.Dropdown],value:c.getYear(e.date)}):s.createElement("span",{key:"year"},A(e.date,c));return"year-first"===c.getMonthYearOrder()?[r,n]:[n,r]})(),s.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,c.options,c))):s.createElement(a.CaptionLabel,{className:u[YN.CaptionLabel],role:"status","aria-live":"polite"},I(e.date,c.options,c))),"around"===m&&!t.hideNavigation&&n===h-1&&s.createElement(a.NextMonthButton,{type:"button",className:u[YN.NextMonthButton],tabIndex:U?void 0:-1,"aria-disabled":!U||void 0,"aria-label":ne(U),onClick:de,"data-animated-button":t.animate?"true":void 0},s.createElement(a.Chevron,{disabled:!U||void 0,className:u[YN.Chevron],orientation:"rtl"===t.dir?"left":"right"})),n===h-1&&"after"===m&&!t.hideNavigation&&s.createElement(a.Nav,{"data-animated-nav":t.animate?"true":void 0,className:u[YN.Nav],style:M?.[YN.Nav],"aria-label":ee(),onPreviousClick:ce,onNextClick:de,previousMonth:R,nextMonth:U}),s.createElement(a.MonthGrid,{role:"grid","aria-multiselectable":"multiple"===p||"range"===p,"aria-label":J(e.date,c.options,c)||void 0,className:u[YN.MonthGrid],style:M?.[YN.MonthGrid]},!t.hideWeekdays&&s.createElement(a.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:u[YN.Weekdays],style:M?.[YN.Weekdays]},E&&s.createElement(a.WeekNumberHeader,{"aria-label":ae(c.options),className:u[YN.WeekNumberHeader],style:M?.[YN.WeekNumberHeader],scope:"col"},C()),se.map(e=>s.createElement(a.Weekday,{"aria-label":re(e,c.options,c),className:u[YN.Weekday],key:String(e),style:M?.[YN.Weekday],scope:"col"},j(e,c.options,c)))),s.createElement(a.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:u[YN.Weeks],style:M?.[YN.Weeks]},e.weeks.map(e=>s.createElement(a.Week,{className:u[YN.Week],key:e.weekNumber,style:M?.[YN.Week],week:e},E&&s.createElement(a.WeekNumber,{week:e,style:M?.[YN.WeekNumber],"aria-label":oe(e.weekNumber,{locale:d}),className:u[YN.WeekNumber],scope:"row",role:"rowheader"},D(e.weekNumber,c)),e.days.map(e=>{const{date:n}=e,r=F(e);if(r[ZN.focused]=!r.hidden&&Boolean(W?.isEqualTo(e)),r[WN.selected]=Q?.(n)||r.selected,XN(Y)){const{from:e,to:t}=Y;r[WN.range_start]=Boolean(e&&t&&c.isSameDay(n,e)),r[WN.range_end]=Boolean(e&&t&&c.isSameDay(n,t)),r[WN.range_middle]=HN(Y,n,!0,c)}const o=function(e,t={},n={}){let r={...t?.[YN.Day]};return Object.entries(e).filter(([,e])=>!0===e).forEach(([e])=>{r={...r,...n?.[e]}}),r}(r,M,t.modifiersStyles),i=function(e,t,n={}){return Object.entries(e).filter(([,e])=>!0===e).reduce((e,[r])=>(n[r]?e.push(n[r]):t[ZN[r]]?e.push(t[ZN[r]]):t[WN[r]]&&e.push(t[WN[r]]),e),[t[YN.Day]])}(r,u,t.modifiersClassNames),l=le||r.hidden?void 0:q(n,r,c.options,c);return s.createElement(a.Day,{key:`${e.isoDate}_${e.displayMonthId}`,day:e,modifiers:r,className:i.join(" "),style:o,role:"gridcell","aria-selected":r.selected||void 0,"aria-label":l,"data-day":e.isoDate,"data-month":e.outside?e.dateMonthId:void 0,"data-selected":r.selected||void 0,"data-disabled":r.disabled||void 0,"data-hidden":r.hidden||void 0,"data-outside":e.outside||void 0,"data-focused":r.focused||void 0,"data-today":r.today||void 0},!r.hidden&&le?s.createElement(a.DayButton,{className:u[YN.DayButton],style:M?.[YN.DayButton],type:"button",day:e,modifiers:r,disabled:!r.focused&&r.disabled||void 0,"aria-disabled":r.focused&&r.disabled||void 0,tabIndex:G(e)?0:-1,"aria-label":X(n,r,c.options,c),onClick:ue(e,r),onBlur:pe(e,r),onFocus:fe(e,r),onKeyDown:me(e,r),onMouseEnter:he(e,r),onMouseLeave:ge(e,r)},S(n,c.options,c)):!r.hidden&&S(e.date,c.options,c))})))))))),t.footer&&s.createElement(a.Footer,{className:u[YN.Footer],style:M?.[YN.Footer],role:"status","aria-live":"polite"},t.footer)))}function NE(e,t){return+Qx(e)===+Qx(t)}!function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"}(uE||(uE={}));const _E=()=>(0,C.jsx)("span",{className:"bg-icon-interactive h-1 w-1 absolute rounded-full inline-block bottom-0 left-1/2 right-1/2"}),EE=e=>yN(e,"E").slice(0,1),ME=(e,t=24)=>Array.from({length:t},(t,n)=>e+n),IE=e=>"multiple"===e?[]:"range"===e?{from:void 0,to:void 0}:void 0,SE=({width:e,className:t,classNames:n,selectedDates:r,setSelectedDates:o,showOutsideDays:a=!0,mode:i="single",variant:l="normal",alignment:c="horizontal",numberOfMonths:d,disabled:u,...f})=>{const p=s.isValidElement(f.footer)||"function"==typeof f.footer,[m,h]=(0,s.useState)(!1),[g,w]=(0,s.useState)(!1),[y,b]=(0,s.useState)((new Date).getFullYear()),[v,x]=(0,s.useState)(y-y%24);void 0===r&&(r="multiple"===i?[]:"range"===i?{from:void 0,to:void 0}:void 0);const N=({weekdays:e})=>(0,C.jsx)("div",{className:"flex justify-between",children:e.map((e,t)=>(0,C.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,C.jsx)("div",{className:"flex flex-col bsf-force-ui-month-weeks",children:e.children[1].props.children.map((e,t)=>(0,C.jsx)("div",{className:"flex flex-row justify-between",children:e},t))}),E=Ie("relative bg-background-primary shadow-datepicker-wrapper",e,"vertical"===c?"flex flex-col":"flex flex-row gap-3","normal"===l?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"","presets"===l?"rounded-tr-md border border-solid border-border-subtle":"","dualdate"===l?"rounded-tr-md rounded-tl-md border border-solid border-border-subtle":"",p?"rounded-b-none":"rounded-bl-md rounded-br-md");return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(xE,{mode:i,selected:r,onSelect:(e,t)=>{if("range"===i){const n=r;if(!n?.from&&!n?.to||n?.from&&n?.to)return n.from&&NE(t,n?.from)||n.to&&NE(t,n?.to)?void o({from:void 0,to:void 0}):void o({from:t,to:void 0});if(n?.from&&!n?.to)return t<n.from?void o({from:t,to:n.from}):void o({from:n.from,to:t});o(e)}else"multiple"===i?r.some(e=>yN(e,"yyyy-MM-dd")===yN(t,"yyyy-MM-dd"))?o(r.filter(e=>yN(e,"yyyy-MM-dd")!==yN(t,"yyyy-MM-dd"))):o([...r,t]):"single"===i&&o(e)},hideNavigation:!0,captionLayout:"label",className:Ie(t),formatters:{formatWeekdayName:EE},classNames:{months:E,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:d,showOutsideDays:!0,components:{MonthCaption:function(e){const{goToMonth:t,nextMonth:n,previousMonth:r}=Ix(),o=yN(e.calendarMonth.date,"yyyy"),a=yN(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),EE(n)});let l;return l=g?`${v} - ${v+23}`:m?o:`${a} ${o}`,(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("div",{className:"flex justify-between",children:[(0,C.jsx)(Po,{variant:"ghost",onClick:()=>{if(g)x(v-24);else if(m){const n=new Date(y-1,e.calendarMonth.date.getMonth());b(n.getFullYear()),t(n)}else t(r)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Previous Button",icon:(0,C.jsx)(Nx,{className:"h-4 w-4 text-button-tertiary-color"})}),(0,C.jsx)(Po,{variant:"ghost",onClick:()=>{d>1||(m?(w(!0),h(!1)):g?w(!1):h(!m))},children:l}),(0,C.jsx)(Po,{variant:"ghost",onClick:()=>{if(g)x(v+24);else if(m){const n=new Date(y+1,e.calendarMonth.date.getMonth());b(n.getFullYear()),t(n)}else t(n)},className:"bg-background-primary border-none cursor-pointer","aria-label":"Next Button",icon:(0,C.jsx)(Ex,{className:"h-4 w-4 text-button-tertiary-color"})})]}),g&&(0,C.jsx)("div",{className:"grid grid-cols-4 w-full",children:ME(v).map(n=>(0,C.jsxs)(Po,{variant:"ghost",onClick:()=>(n=>{b(n),w(!1),h(!0),t(new Date(n,e.calendarMonth.date.getMonth()))})(n),className:Ie("h-10 w-full text-center font-normal relative",n===y&&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()&&_E()]},n))}),m&&!g&&(0,C.jsx)("div",{className:"grid grid-cols-4 gap-2 my-12",children:Array.from({length:12},(n,r)=>(0,C.jsxs)(Po,{variant:"ghost",onClick:()=>{h(!1),t(new Date(y,r))},className:Ie("px-1.5 py-2 h-10 w-[4.375rem] text-center font-normal relative",r===e.calendarMonth.date.getMonth()&&r!==(new Date).getMonth()&&y===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()===y&&"font-semibold"),children:[yN(new Date(0,r),"MMM"),(new Date).getMonth()===r&&(new Date).getFullYear()===y&&_E()]},r))}),!m&&!g&&(0,C.jsx)(N,{weekdays:s})]})},DayButton:({day:e,modifiers:t,...n})=>{const{selected:o,today:i,disabled:s,outside:l,range_middle:c,range_start:d,range_end:u}=t,f=d||u||c,p=new Date,m=r?.to,h=yN(e.displayMonth,"yyyy-MM")===yN(p,"yyyy-MM"),g=m&&yN(m,"yyyy-MM")===yN(e.date,"yyyy-MM"),w=function(e,t,n){return AN(e,-t,n)}(p,1),y=yN(e.date,"yyyy-MM")===yN(w,"yyyy-MM"),b=h||g||f,v=!a&&l,x=Ie("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&&!y||l?"bg-transparent opacity-50 text-text-disabled cursor-auto":"");return(0,C.jsxs)("button",{className:Ie(x,i&&"font-semibold",v&&"opacity-0",d&&"fui-range-start",u&&"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":yN(e.date,"EEEE, MMMM do, yyyy"),"data-selected":o,"data-day":yN(e.date,"yyyy-MM-dd"),children:[n.children,i&&b&&(0,C.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,C.jsx)("div",{...t,className:Ie(e.className,"inline-flex"),children:e.children})},Weekdays:()=>(0,C.jsx)(C.Fragment,{}),Week:e=>(0,C.jsx)("div",{className:Ie("bsf-force-ui-month-week flex flex-row",e.className),children:e.children}),Months:e=>(0,C.jsx)(C.Fragment,{children:(0,C.jsx)("div",{className:Ie("bsf-force-ui-date-picker-month",E),children:e?.children?.map((e,t)=>e?(0,C.jsx)(s.Fragment,{children:e.map((e,t)=>(0,C.jsxs)(s.Fragment,{children:[t>0&&(0,C.jsx)("div",{className:"border border-solid border-border-subtle border-l-0"}),e]},t))},t):null)})}),MonthGrid:e=>m||g?(0,C.jsx)(C.Fragment,{}):(0,C.jsx)(_,{...e})},..."range"===i?{required:!1}:{},...f,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,s=new Date(a.dataset.day),c=RN(s,o.from),d=PN(s,o.to);let u;switch(l){case"dualdate":case"presets":u=a.closest(".bsf-force-ui-date-picker-month");break;default:u=a.closest(".bsf-force-ui-month-weeks")}const f=Array.from(u.querySelectorAll("button"));d&&f.sort((e,t)=>PN(new Date(e.dataset.day),new Date(t.dataset.day))?-1:1),c&&f.sort((e,t)=>RN(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),w=Math.max(p,m);for(let e=g;e<=w;e++)f[e]?.disabled||h.push(f[e]);f.forEach(e=>{e.setAttribute("data-hover",h.includes(e)?"true":"false")})},disabled:u})})};function kE(e){return Zx(Date.now(),e)}function DE(e){return Fx(e,Date.now())}function CE(e){const t=DE(e?.in),n=t.getFullYear(),r=t.getMonth(),o=t.getDate(),a=DE(e?.in);return a.setFullYear(n,r,o-1),a.setHours(0,0,0,0),a}function jE(e,t,n){return jN(e,-t,n)}const AE=({selectionType:e="single",variant:t="normal",presets:n=[],onCancel:r,onApply:o,onDateSelect:a,applyButtonText:i="Apply",cancelButtonText:l="Cancel",showOutsideDays:c=!0,isFooter:d=!0,selected:u,disabled:f,...p})=>{const[m,h]=(0,s.useState)(()=>{if(!u)return IE(e);const t="multiple"===e&&Array.isArray(u),n="single"===e&&u instanceof Date;return t||"range"===e&&"from"in u&&"to"in u||n?u:IE(e)}),g=e=>{h(e),a&&a(e)},w=[{label:"Today",range:{from:kE(),to:kE()}},{label:"Yesterday",range:{from:CE(),to:CE()}},{label:"This Week",range:{from:Hx(new Date,{weekStartsOn:1}),to:ON(new Date,{weekStartsOn:1})}},{label:"Last 7 Days",range:{from:Zx(jE(new Date,6)),to:Zx(new Date)}},{label:"This Month",range:{from:BN(new Date),to:zN(new Date)}},{label:"Last 30 Days",range:{from:Zx(jE(new Date,29)),to:Zx(new Date)}}],y=n.length>0?n:w,b=()=>{h("multiple"===e?[]:{from:void 0,to:void 0}),r&&r()},v=()=>{o&&o(m)};return"normal"===t?(0,C.jsx)(SE,{...p,mode:e,variant:t,width:"w-[18.5rem]",selectedDates:m,showOutsideDays:c,setSelectedDates:g,footer:d&&(0,C.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,C.jsx)(Po,{variant:"outline",onClick:b,children:l}),(0,C.jsx)(Po,{onClick:v,children:i})]}),disabled:f}):"dualdate"===t?(0,C.jsx)(SE,{mode:e,numberOfMonths:2,alignment:"horizontal",selectedDates:m,setSelectedDates:g,showOutsideDays:c,variant:t,width:"w-auto",footer:(0,C.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,C.jsx)(Po,{variant:"outline",onClick:b,children:l}),(0,C.jsx)(Po,{onClick:v,children:i})]}),disabled:f,...p}):"presets"===t?(0,C.jsxs)("div",{className:"flex flex-row shadow-datepicker-wrapper",children:[(0,C.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:y.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,C.jsx)(Po,{onClick:()=>(e=>{h(e)})(e.range),variant:"ghost",className:Ie("text-left font-medium text-sm text-nowrap w-full",n&&"bg-brand-background-50"),children:e.label},t)})}),(0,C.jsx)(SE,{...p,mode:e,selectedDates:m,setSelectedDates:g,variant:t,showOutsideDays:c,width:"w-auto",numberOfMonths:2,footer:(0,C.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,C.jsx)(Po,{variant:"outline",onClick:b,children:l}),(0,C.jsx)(Po,{onClick:v,children:i})]}),disabled:f})]}):void 0};function TE({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"}))}const LE=s.forwardRef(TE),OE=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)},zE=e=>e?e.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"mmm dd, yyyy",PE=()=>{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),d=new Date(e),u=new Date(e.getFullYear(),e.getMonth()-1,1),f=new Date(e.getFullYear(),e.getMonth(),0);return[{label:(0,D.__)("Today","cartflows"),range:{from:t,to:t}},{label:(0,D.__)("Yesterday","cartflows"),range:{from:n,to:n}},{label:(0,D.__)("This Week","cartflows"),range:{from:r,to:i}},{label:(0,D.__)("Last Week","cartflows"),range:{from:s,to:l}},{label:(0,D.__)("This Month","cartflows"),range:{from:c,to:d}},{label:(0,D.__)("Last Month","cartflows"),range:{from:u,to:f}}]},RE=function(e){const{label:t,value:n,tooltip:r,desc:o,onChangeCB:a,sectionClass:l="",wrapperClass:c="",fieldParentWrapperClass:d="w-full",placeholder:u=(0,D.__)("Select Date Range","cartflows")}=e,[f,p]=(0,s.useState)(!1),m=(0,s.useRef)(null),h=(0,s.useRef)(null),[g,w]=(0,s.useState)({from:OE(n?.startDate),to:OE(n?.endDate)});return(0,s.useEffect)(()=>{w({from:OE(n?.startDate),to:OE(n?.endDate)})},[n?.startDate,n?.endDate]),(0,s.useEffect)(()=>{const e=e=>{h.current&&!h.current.contains(e.target)&&m.current&&!m.current.contains(e.target)&&p(!1)};return f&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[f]),(0,i.createElement)("div",{className:`wcf-field wcf-date-field ${l}`},(0,i.createElement)("div",{className:`wcf-field__data flex items-center gap-2.5 ${c}`},t&&(0,i.createElement)("div",{className:"wcf-field__data--label text-sm font-medium"},(0,i.createElement)("label",null,t,r&&(0,i.createElement)(uM,{text:r}))),(0,i.createElement)("div",{className:`wcf-field__data--content relative ${d}`},(0,i.createElement)(Po,{ref:m,icon:(0,i.createElement)(LE,{className:"h-4 w-4 text-text-secondary","aria-hidden":"true"}),iconPosition:"right",size:"sm",tag:"button",type:"button",variant:"outline",className:"whitespace-nowrap text-text-secondary font-normal",onClick:()=>p(e=>!e)},g?.from&&g?.to?`${zE(g.from)} - ${zE(g.to)}`:u),f&&(0,i.createElement)("div",{ref:h,className:"absolute z-[9999] rounded-lg shadow-lg top-full right-0 mt-1 overflow-x-auto"},(0,i.createElement)(AE,{key:"range",applyButtonText:(0,D.__)("Apply","cartflows"),cancelButtonText:(0,D.__)("Cancel","cartflows"),onApply:e=>{w(e),p(!1),a&&a({startDate:e.from,endDate:e.to})},onCancel:()=>{p(!1)},presets:PE(),selected:g,selectionType:"range",showOutsideDays:!0,variant:"presets"})))),o&&(0,i.createElement)("div",{className:"wcf-field__desc text-sm font-regular"},Wm(o)))},UE=Ao("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"}]]),BE=Ao("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),FE=function(e){var t,n;const{content:r,custom_class:o="",icon:a=""}=e,s=function(e){switch(e){case"info":return{icon:To,color:"text-text-secondary"};case"error":return{icon:UE,color:"text-support-error"};case"success":return{icon:BE,color:"text-support-success"};case"warning":return{icon:Oo,color:"text-support-warning"};default:return null}}(a),l=null!==(t=s?.icon)&&void 0!==t?t:null,c=null!==(n=s?.color)&&void 0!==n?n:"";return(0,i.createElement)("div",{className:`wcf-field wcf-doc-field ${o}`},r&&(0,i.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,i.createElement)(l,{size:16,className:c}),Wm(r)))},QE=function(e){const{label:t,desc:n,sectionClass:r,descClass:o,labelClass:a=""}=e,s=r&&""!==r?r:"text-left",l=""!==a?a:"block text-base font-medium text-text-primary mb-5",c=""!==o?o:"text-sm font-normal text-text-secondary mt-2";return(0,i.createElement)("div",{className:`wcf-field wcf-section-heading-field ${s}`},t&&(0,i.createElement)("div",{className:"wcf-field__data--label"},(0,i.createElement)("label",{className:l},t)),n&&(0,i.createElement)("div",{className:`wcf-field__desc ${c}`},Wm(n)))},VE=function(e){const{notice:t="",feature:n="this",plan_required:r="pro"}=e;return""!==t?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-pro-notice"},(0,i.createElement)("p",{className:"wcf-pro-update-notice"},Wm(t)))):wcfCartflowsTypePlusPro()||"pro"===r?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-pro-notice"},(0,i.createElement)("p",{className:"wcf-pro-update-notice"},Wm((0,D.sprintf)( |
| 10 |
// translators: %1$s: anchor tag start, %2$s: anchor tag end, %3$s: feature name. |
| 11 |
// translators: %1$s: anchor tag start, %2$s: anchor tag end, %3$s: feature name. |
| 12 |
(0,D.__)("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,i.createElement)(i.Fragment,null,(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-pro-notice"},(0,i.createElement)("p",{className:"wcf-pro-update-notice"},Wm((0,D.sprintf)( |
| 13 |
// translators: %1$s: anchor tag start, %2$s: anchor tag end, %3$s: feature name. |
| 14 |
// translators: %1$s: anchor tag start, %2$s: anchor tag end, %3$s: feature name. |
| 15 |
(0,D.__)("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))))))},YE=window.lodash,ZE={sm:"text-xs [&>svg]:size-4 rounded",md:"text-sm [&>svg]:size-5 rounded-md",lg:"text-base [&>svg]:size-6 rounded-md"},WE={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"},slashIcon:{sm:"px-2 py-0.5",md:"px-3 py-1",lg:"px-3.5 py-1"}},GE={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"},HE={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"},$E=(0,s.createContext)({}),XE=()=>(0,s.useContext)($E),qE=(0,s.forwardRef)(({className:e,size:t="sm",open:n=!1,setOpen:r,onOpenChange:o,loading:a=!1,clearAfterSelect:i=!0,closeAfterSelect:l=!0,variant:c="primary",filter:d=!0,...u},f)=>{const[p,m]=(0,s.useState)(""),[h,g]=(0,s.useState)(a??!1),[w,y]=(0,s.useState)(null),b=s.useRef([]),v=(0,s.useMemo)(()=>"function"==typeof r?r:o,[r,o]),{refs:x,floatingStyles:N,context:_}=co({open:n,onOpenChange:v,placement:"bottom-start",whileElementsMounted:Cn,middleware:[Un(2),Fn({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}})]}),E=vo(_,{listRef:b,activeIndex:w,onNavigate:y,loop:!0,openOnArrowKeyDown:!1}),M=lo(_),{getReferenceProps:I,getFloatingProps:S,getItemProps:k}=mo([M,E]);return(0,s.useEffect)(()=>{const e=Ce(),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,s.useEffect)(()=>{n||y(null)},[n]),(0,C.jsx)($E.Provider,{value:{size:t,open:n,onOpenChange:v,refs:x,floatingStyles:N,context:_,getReferenceProps:I,getFloatingProps:S,getItemProps:k,activeIndex:w,setActiveIndex:y,listRef:b,searchTerm:p,setSearchTerm:m,isLoading:h,setIsLoading:g,clearAfterSelect:i,closeAfterSelect:l,variant:c,filter:d},children:(0,C.jsx)("div",{className:Ie("searchbox-wrapper box-border relative w-full",e),...u,ref:f})})});qE.displayName="SearchBox";const JE=(0,s.forwardRef)(({className:e,type:t="text",placeholder:n="Search...",disabled:r=!1,onChange:o=()=>{},...a},i)=>{const{size:s,refs:l,getReferenceProps:c,searchTerm:d,setSearchTerm:u,open:f,setActiveIndex:p,listRef:m,onOpenChange:h,variant:g}=XE(),w="lg"===s?"sm":"xs";return(0,C.jsxs)("div",{ref:l.setReference,className:Ie("w-full group relative flex justify-center items-center gap-1.5 focus-within:z-10 transition-all ease-in-out duration-200",GE[g],WE.input[s],r?HE[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,C.jsx)("span",{className:Ie(ZE[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,C.jsx)(Wg,{})}),(0,C.jsx)("input",{type:t,ref:i,className:Ie(ZE[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:d,onChange:e=>{const t=e.target.value;u(t),o(t),"function"==typeof h&&(t.trim()?h(!0):h(!1))},onFocus:()=>{r||"function"!=typeof h||d?.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,...(0,YE.omit)(a,["size","open","onOpenChange","loading"])}),(0,C.jsx)(Tf,{label:"Mac OS"===Ce()?"⌘/":"Ctrl /",size:w,type:"rounded",variant:"neutral",className:"bg-background-primary"})]})});JE.displayName="SearchBox.Input";const KE=({className:e,children:t,...n})=>{const{size:r,open:o,refs:a,floatingStyles:i,getFloatingProps:s,context:l}=XE();return o?(0,C.jsx)(Jr,{context:l,initialFocus:-1,returnFocus:!0,children:(0,C.jsx)("div",{ref:a.setFloating,style:{...i},className:Ie("bg-background-primary rounded-md border border-solid border-border-subtle shadow-soft-shadow-lg overflow-y-auto text-wrap focus:outline-none",WE.dialog[r],e),...s(),...n,children:t})}):null};KE.displayName="SearchBox.Content";const eM=({children:e,id:t,root:n})=>(0,C.jsx)(Yr,{id:t,root:n,children:e});eM.displayName="SearchBox.Portal";const tM=({children:e,className:t})=>{const{searchTerm:n,isLoading:r,listRef:o,filter:a=!0}=XE();if(!a)return(0,C.jsx)(lr,{elementsRef:o,children:(0,C.jsx)("div",{className:t,children:e})});const i=s.Children.toArray(e).map(e=>{if(s.isValidElement(e)&&e.type===rM){const t=s.Children.toArray(e.props.children).filter(e=>s.isValidElement(e)&&"string"==typeof e.props.children&&e.props.children.toLowerCase().includes(n.toLowerCase()));return t.length>0?(0,s.cloneElement)(e,{children:t}):null}return e}).filter(Boolean);return r?(0,C.jsx)(aM,{}):(0,C.jsx)(lr,{elementsRef:o,children:(0,C.jsx)("div",{className:t,children:i.some(e=>s.isValidElement(e)&&e.type!==iM)?i:(0,C.jsx)(nM,{})})})};tM.displayName="SearchBox.List";const nM=({children:e="No results found.",className:t})=>{const{size:n}=XE();return(0,C.jsx)("div",{className:Ie("flex justify-center items-center",WE.item[n],"text-text-tertiary p-4",t),children:e})};nM.displayName="SearchBox.Empty";const rM=({heading:e,children:t})=>{const{size:n}=XE();return(0,C.jsxs)("div",{className:Ie(WE.content[n],WE.item[n]),children:[e&&(0,C.jsx)("div",{className:Ie(WE.title[n],"text-text-tertiary"),children:e}),t]})};rM.displayName="SearchBox.Group";const oM=(0,s.forwardRef)(({className:e,icon:t,children:n,onClick:r,...o},a)=>{const{size:i,setSearchTerm:l,clearAfterSelect:c,getItemProps:d,activeIndex:u,onOpenChange:f,closeAfterSelect:p}=XE(),{ref:m,index:h}=function(e){void 0===e&&(e={});const{label:t}=e,{register:n,unregister:r,map:o,elementsRef:a,labelsRef:i}=s.useContext(sr),[l,c]=s.useState(null),d=s.useRef(null),u=s.useCallback(e=>{if(d.current=e,null!==l&&(a.current[l]=e,i)){var n;const r=void 0!==t;i.current[l]=r?t:null!=(n=null==e?void 0:e.textContent)?n:null}},[l,a,i,t]);return ar(()=>{const e=d.current;if(e)return n(e),()=>{r(e)}},[n,r]),ar(()=>{const e=d.current?o.get(d.current):null;null!=e&&c(e)},[o]),s.useMemo(()=>({ref:u,index:null==l?-1:l}),[l,u])}(),g=u===h;return(0,C.jsxs)("button",{type:"button",ref:e=>{"function"==typeof a?a(e):a&&(a.current=e),m(e)},className:Ie("flex w-full items-center justify-start gap-1 p-1 cursor-pointer border-none bg-transparent text-left focus:outline-none",g&&"bg-background-secondary",!g&&"hover:bg-background-secondary focus:bg-background-secondary",WE.item[i],e),...d?.({role:"option","aria-selected":g,onClick:()=>{"function"==typeof r&&r(),c&&l(""),p&&f(!1)},...o}),children:[t&&(0,C.jsx)("span",{className:Ie(WE.icon[i],"flex items-center justify-center"),children:t}),(0,C.jsx)("span",{className:Ie("flex-grow py-0.5 px-1 font-normal",WE.item[i]),children:n})]})});oM.displayName="SearchBox.Item";const aM=({loadingIcon:e=(0,C.jsx)(Kg,{})})=>{const{size:t}=XE(),n=s.isValidElement(e)?(0,s.cloneElement)(e,{size:t}):e;return(0,C.jsx)("div",{className:Ie("flex justify-center p-4",ZE[t],WE.item[t]),children:n})};aM.displayName="SearchBox.Loading";const iM=(0,s.forwardRef)(({className:e,...t},n)=>(0,C.jsx)("hr",{ref:n,className:Ie("border-0 border-t border-border-subtle border-solid m-0",e),...t}));iM.displayName="SearchBox.Separator",qE.Input=JE,qE.Loading=aM,qE.Separator=iM,qE.Content=KE,qE.List=tM,qE.Empty=nM,qE.Group=rM,qE.Item=oM,qE.Portal=eM;const sM=function(e){const{label:t,name:n,desc:r,value:o,allowed_products:a=[],include_products:l=[],excluded_products:c=[],excluded_product_ids:d=[],tooltip:u,placeholder:f,onChangeCB:p,nameComp:m,attr:h,isMulti:g=!1,showLabelOnly:y=!1,sectionClass:b="",wrapperClass:v="",labelClass:x="",descClass:N=""}=e,[_,E]=(0,s.useState)(o),[M,I]=(0,s.useState)([]),[S,k]=(0,s.useState)(!1),[C,j]=(0,s.useState)(!1),[A,T]=(0,s.useState)(!1),L=(0,s.useRef)(null),O=(0,s.useRef)("");(0,s.useEffect)(()=>{E(o)},[o]);const z=e=>e?.label?y||!e.value?e.label:`${e.label} (#${e.value})`:"";return(0,i.createElement)("div",{className:`wcf-select2-field wcf-product-field ${b}`},(0,i.createElement)("div",{className:`wcf-selection-field ${v}`},t&&(0,i.createElement)("label",{className:`block text-sm font-medium text-left mb-2 ${x}`},t,u&&(0,i.createElement)(uM,{text:u})),g?(_||[]).map(e=>(0,i.createElement)("input",{key:e.value,type:"hidden",name:`${n}[]`,value:e.value})):(0,i.createElement)("input",{type:"hidden",name:m?n:`${n}[]`,value:_?.value||""}),g&&(_||[]).length>0&&(0,i.createElement)("div",{className:"mb-2 flex flex-wrap gap-1.5"},(_||[]).map(t=>(0,i.createElement)(Tf,{key:t.value,label:z(t),size:"sm",type:"pill",variant:"neutral",closable:!0,onClose:()=>(t=>{const n=(_||[]).filter(e=>e.value!==t.value);E(n);const r=new CustomEvent("wcf:product:change",{bubbles:!0,detail:{e:{},name:e.name,value:n}});document.dispatchEvent(r),p&&p(n)})(t)}))),!g&&_?.label&&(0,i.createElement)("div",{className:"mb-2 flex"},(0,i.createElement)(Tf,{label:z(_),size:"sm",type:"pill",variant:"neutral",closable:!0,onClose:()=>{E(null);const t=new CustomEvent("wcf:product:change",{bubbles:!0,detail:{e:{},name:e.name,value:null}});document.dispatchEvent(t),p&&p(null)}})),(0,i.createElement)(qE,(0,w.A)({open:S,setOpen:e=>{e&&O.current.length<3||k(e)},filter:!1,size:"md",variant:"secondary",clearAfterSelect:!0,closeAfterSelect:!0},h),(0,i.createElement)(qE.Input,{ref:L,placeholder:f||(0,D.__)("Search for a Product","cartflows"),onChange:async e=>{if(O.current=e,e.length>=3){j(!0);const t=new window.FormData;t.append("allowed_products",a),t.append("include_products",l),t.append("exclude_products",c),t.append("action","cartflows_json_search_products"),t.append("security",cartflows_admin.json_search_products_nonce),t.append("term",e);const n=await Xf()({url:cartflows_admin.ajax_url,method:"POST",body:t})||[],r=Array.isArray(d)&&d.length>0?n.filter(e=>!d.includes(Number(e.value))):n;I(r),T(n.length>0&&0===r.length),j(!1)}else I([]),T(!1),j(!1)},className:"[&>span:last-of-type]:hidden !w-auto"}),(0,i.createElement)(qE.Portal,null,(0,i.createElement)(qE.Content,null,(0,i.createElement)(qE.List,null,C&&(0,i.createElement)(qE.Loading,null),!C&&M.length>0&&(0,i.createElement)(qE.Group,null,M.map(t=>(0,i.createElement)(qE.Item,{key:t.value,onClick:()=>(t=>{const n=g?[..._||[],t]:t;E(n);const r=new CustomEvent("wcf:product:change",{bubbles:!0,detail:{e:{},name:e.name,value:n}});document.dispatchEvent(r),p&&p(n)})(t)},(0,i.createElement)("div",{className:"wcf-select-option--row flex w-full items-center justify-between cursor-pointer"},(0,i.createElement)("div",{className:"wcf-select-option--row-option flex items-center gap-3"},(0,i.createElement)("span",null,t?.label||""," ",t.value?"(#"+t?.value+")":""),t?.stock_status&&(0,i.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,i.createElement)("div",null,(0,i.createElement)("span",{className:"text-xs leading-3 font-normal cursor-pointer"},t?.price_range)))))),!C&&0===M.length&&S&&(0,i.createElement)(qE.Empty,null,A?(0,D.__)("All matching products are already added.","cartflows"):(0,D.__)("No products found.","cartflows"))))))),r&&(0,i.createElement)("div",{className:`wcf-field-desc text-sm font-normal text-text-tertiary mt-3 ${N}`},Wm(r)))},lM=function(e){const{label:t,name:n,desc:r,value:o,tooltip:a,placeholder:l,onChangeCB:c,nameComp:d,isMulti:u=!1,sectionClass:f="",wrapperClass:p="",descClass:m="",fieldClass:h="",attr:g}=e,y=e=>!u&&Array.isArray(e)?e[0]||null:e,[b,v]=(0,s.useState)(()=>y(o)),[x,N]=(0,s.useState)([]),[_,E]=(0,s.useState)(!1),[M,I]=(0,s.useState)(!1),S=(0,s.useRef)(null),k=(0,s.useRef)("");return(0,s.useEffect)(()=>{v(y(o))},[o]),(0,i.createElement)("div",{className:`wcf-select2-field wcf-coupon-field ${f}`},(0,i.createElement)("div",{className:`wcf-coupon-field-wrapper ${p}`},t&&(0,i.createElement)("label",{className:`block text-sm font-medium text-left mb-2 ${h}`},t,a&&(0,i.createElement)(uM,{text:a})),u?(b||[]).map(e=>(0,i.createElement)("input",{key:e.value,type:"hidden",name:`${n}[]`,value:e.value})):(0,i.createElement)("input",{type:"hidden",name:d?n:`${n}[]`,value:b?.value||""}),u&&(b||[]).length>0&&(0,i.createElement)("div",{className:"mb-2 flex flex-wrap gap-1.5"},(b||[]).map(t=>(0,i.createElement)(Tf,{key:t.value,label:t.label,size:"sm",type:"pill",variant:"neutral",closable:!0,onClose:()=>(t=>{const n=(b||[]).filter(e=>e.value!==t.value);v(n);const r=new CustomEvent("wcf:coupon:change",{bubbles:!0,detail:{e:{},name:e.name,value:n}});document.dispatchEvent(r),c&&c(n)})(t)}))),!u&&b?.label&&(0,i.createElement)("div",{className:"mb-2 flex"},(0,i.createElement)(Tf,{label:b.label,size:"sm",type:"pill",variant:"neutral",closable:!0,onClose:()=>{v(null);const t=new CustomEvent("wcf:coupon:change",{bubbles:!0,detail:{e:{},name:e.name,value:null}});document.dispatchEvent(t),c&&c(null)}})),(0,i.createElement)(qE,(0,w.A)({open:_,setOpen:e=>{e&&k.current.length<3||E(e)},filter:!1,size:"md",variant:"secondary",clearAfterSelect:!0,closeAfterSelect:!0},g),(0,i.createElement)(qE.Input,{ref:S,placeholder:l||(0,D.__)("Search for a coupon","cartflows"),onChange:async e=>{if(k.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 Xf()({url:cartflows_admin.ajax_url,method:"POST",body:t});N(n||[]),I(!1)}else N([]),I(!1)},className:"[&>span:last-of-type]:hidden [&>span:last-of-type]:absolute !w-auto"}),(0,i.createElement)(qE.Portal,null,(0,i.createElement)(qE.Content,null,(0,i.createElement)(qE.List,null,M&&(0,i.createElement)(qE.Loading,null),!M&&x.length>0&&(0,i.createElement)(qE.Group,null,x.map(t=>(0,i.createElement)(qE.Item,{key:t.value,onClick:()=>(t=>{const n=u?[...b||[],t]:t;v(n);const r=new CustomEvent("wcf:coupon:change",{bubbles:!0,detail:{e:{},name:e.name,value:n}});document.dispatchEvent(r),c&&c(n)})(t)},(0,i.createElement)("span",null,t?.label||"")))),!M&&0===x.length&&_&&(0,i.createElement)(qE.Empty,null,(0,D.__)("No coupons found.","cartflows"))))))),r&&(0,i.createElement)("div",{className:`wcf-field-desc flex items-start gap-1 text-sm font-normal text-text-tertiary mt-3 text-left ${m}`},(0,i.createElement)(vg,{className:"w-4 h-4 shrink-0 mt-px"}),(0,i.createElement)("span",null,Wm(r))))};function cM({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 dM=s.forwardRef(cM),uM=function(e){const{text:t,position:n="default",classes:r="text-text-tertiary",icon:o="",portalId:a="wcf-settings-app",triggers:s=["hover","focus"],arrow:l=!0,interactive:c=!1}=e,d="default"===n?"bottom":n;return(0,i.createElement)(Zo,{content:"string"==typeof t?Wm(t):t,placement:d,arrow:l,interactive:c,tooltipPortalId:a,triggers:s,className:"z-[999999]"},(0,i.createElement)("div",{className:Rf()(r,"wcf-tooltip-icon cursor-pointer ml-1")},""===o?(0,i.createElement)(dM,{className:"w-3.5 h-3.5 stroke-2"}):o))},fM=function(e){const{subClass:t="",label:n,desc:r}=e;return(0,i.createElement)("div",{className:"wcf-field wcf-sub-heading-field"},n&&(0,i.createElement)("div",{className:`wcf-field__data--label ${t}`},(0,i.createElement)("label",null,n)),r&&(0,i.createElement)("div",{className:"wcf-field__desc text-sm font-regular"},Wm(r)))},pM=function(e){const{name:t,id:n,label:r,value:o,placeholder:a,tooltip:l,desc:c,type:d,min:u,max:f,readonly:p,icon:m,onChangeCB:h,iconOnClick:g,afterClickIcon:y,attr:b}=e,[v,x]=(0,s.useState)(o),[N,_]=(0,s.useState)(d||"password"),[E,M]=(0,s.useState)(m||"");return(0,s.useEffect)(()=>{x(o),_(d),M(m)},[o]),(0,i.createElement)("div",{className:"wcf-field wcf-password-field text-left"},(0,i.createElement)("div",{className:"wcf-field__data flex items-center justify-between gap-2.5"},r&&(0,i.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-text-primary text-left"},(0,i.createElement)("label",{className:"whitespace-nowrap"},r,l&&(0,i.createElement)(uM,{text:l}))),(0,i.createElement)("div",{className:"wcf-field__data--content w-1/2"},(0,i.createElement)(tg,(0,w.A)({type:N,name:t,value:v,id:n,onChange:function(n){x(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),h&&h(n)},placeholder:a,min:u,max:f,readOnly:p,size:"md",className:`${e.class?e.class:""} w-full`,suffix:E?(0,i.createElement)("span",{className:`${E} pointer-events-auto cursor-pointer`,onClick:function(){g&&"show_field_value"===g&&("text"===N?(_("password"),M(m)):(_("text"),M(y)))},role:"button",tabIndex:0}):null},b)))),c&&(0,i.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Wm(c)))},mM=function(){return(0,i.createElement)("div",{className:"wcf-field wcf-separator-field border-x-0 border-t-0 border-b border-solid border-border-subtle"})},hM=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,i.createElement)(dw,{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});break;case"number":o=(0,i.createElement)(xx,{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});break;case"checkbox":o=(0,i.createElement)(jg,{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,i.createElement)(yM,{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,i.createElement)(Yg,{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,i.createElement)(fw,{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});break;case"code":o=(0,i.createElement)(pw,{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,i.createElement)(cw,{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});break;case"select_card":o=(0,i.createElement)(bM,{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,i.createElement)(ox,{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,i.createElement)("div",null,(0,i.createElement)(sM,{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,i.createElement)("div",null,(0,i.createElement)(lM,{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,i.createElement)(px,{id:t.name,name:t.name,value:n,label:t.label,products:t.products});break;case"font-family":o=(0,i.createElement)(wx,{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,i.createElement)(mM,null);break;case"sub-heading":o=(0,i.createElement)(fM,{subclassName:t.subClass,label:t.label,desc:t.desc});break;case"color-picker":o=(0,i.createElement)(hx,{id:t.name,name:t.name,label:t.label,value:n,desc:t.desc,tooltip:t.tooltip,displayAlign:t.display_align,withBg:t.withBg});break;case"password":o=(0,i.createElement)(pM,{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",a=e?.options&&e?.options[r]?e?.options[r]:t?.value;o=(0,i.createElement)(vx,{id:t.name,name:t.name,label:t.label,value:n,desc:t.desc,tooltip:t.tooltip,isNameArray:t.isNameArray,objName:r,objValue:a,singleButton:t?.singleButton,sectionClass:t?.sectionClass,wrapperClass:t?.wrapperClass,labelClass:t?.labelClass,descClass:t?.descClass,displayAlign:t?.display_align});break;case"doc":o=(0,i.createElement)(FE,{content:t?.content,icon:t?.icon||""});break;case"pro-notice":o=(0,i.createElement)("p",{className:"wcf-pro-update-notice"},(0,D.sprintf)(/* translators: %s is replaced with feature name */ /* translators: %s is replaced with feature name */ |
| 16 |
(0,D.__)("Please upgrade to the CartFlows Higher Plan to use the %s feature.","cartflows"),t.feature));break;case"heading":o=(0,i.createElement)(QE,{label:t.label,desc:t.desc,sectionClass:t?.sectionClass,labelClass:t?.labelClass,descClass:t?.descClass});break;case"checkout-link-generator":o=(0,i.createElement)(MM,{stepId:t.step_id});break;case"wp-editor":o=(0,i.createElement)(gM,{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,i.createElement)("tr",{className:`wcf-field-row-${e.field} ${e.class?e.class:""} ${e.isActive?"":"wcf-hide"}`,key:t.name},(0,i.createElement)("th",{scope:"row",className:"py-2"},(0,i.createElement)(i.Fragment,null,o))):(0,i.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)},gM=function(e){const{name:t,value:n,label:r,desc:o,id:a,tooltip:l,rows:c,cols:d,sectionClass:u=!1,wrapperClass:f=!1,labelClass:p,descClass:m,displayAlign:h="horizontal"}=e,[g,w]=(0,s.useState)(n),y=u||"text-left",b=m||"text-sm font-normal text-text-tertiary mt-2";let v=f||"flex items-center gap-2.5",x=p||"text-sm font-medium text-text-primary text-left mb-2";function N(t,n){w(n);const r=new CustomEvent("wcf:wpeditor:change",{bubbles:!0,detail:{e:t,name:e.name,value:n}});document.dispatchEvent(r)}return"horizontal"!==h&&(v="block w-full text-left",x+=" mb-2"),(0,s.useEffect)(()=>{let e=!0;return e&&(wp.editor.initialize(a,{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(){N(e,n.getContent())}),n.on("keyup",function(){N(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,i.createElement)("div",{className:`wcf-field wcf-wp-editor-field ${y}`},(0,i.createElement)("div",{className:`wcf-field__data ${v}`},r&&(0,i.createElement)("div",{className:`wcf-field__data--label ${x}`},(0,i.createElement)("label",null,r,l&&(0,i.createElement)(uM,{text:l}))),(0,i.createElement)("div",{className:"wcf-field__data--content"},(0,i.createElement)("textarea",{className:e.class,name:t,value:g,id:a,rows:c||"10",cols:d||"60",onChange:function(t){w(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,i.createElement)("div",{className:`wcf-field__desc ${b}`},Wm(o)))},wM=function(e){const{name:t,value:n,fields:r}=e,[o,a]=c().useState(n);function s(e){a(e.target.value)}return(0,i.createElement)(i.Fragment,null,r.map((e,n)=>(0,i.createElement)(dw,{key:n,name:t+`[${e.name}]`,label:e.label,placeholder:e.placeholder,value:lm(o[e.name]),onChange:s,tooltip:e.tooltip})))},yM=function({onChange:e,...t}){const{name:n,id:r,label:o,value:a,desc:l,backComp:c=!1,onClick:d,notice:u,isDisabled:f=!1,tooltip:p,sectionClass:m="",wrapperClass:h="",labelClass:g="",descClass:w="",displayAlign:y="horizontal",fullWidth:b=!0}=t,[v,x]=(0,s.useState)(a),[N,_]=(0,s.useState)(!1),[E,M]=(0,s.useState)(""),I=m||"text-left",S=g||"text-sm font-medium text-text-primary",k=w||"text-sm font-normal text-text-secondary mt-2";let C=h||"flex items-center py-1 "+(b?"justify-between":"");"horizontal"!==y&&(C="block w-full text-left"),(0,s.useEffect)(()=>{x(a)},[a]);const j=c?"enable":"yes",A=c?"disable":"no",T=(0,s.useCallback)(t=>{const r=t?j:A;x(r);const o=new CustomEvent("wcf:toggle:change",{bubbles:!0,detail:{name:n,value:r}});document.dispatchEvent(o),e&&e({name:n,value:r}),d&&d()},[j,A,n,e,d]);function L(){"prompt"===u.type&&E!==u.check.toUpperCase()||(_(!1),M(""),"alert"!==u.type&&T(!0))}function O(){_(!1),M("")}return(0,i.createElement)("div",{className:`wcf-field wcf-toggle-field ${I} `},(0,i.createElement)("div",{className:`wcf-field__data ${C}`},o&&(0,i.createElement)("div",{className:"wcf-field__data--content-left flex-1 min-w-0"},(0,i.createElement)("div",{className:`wcf-field__data--label ${S}`},(0,i.createElement)("label",null,o,p&&(0,i.createElement)(uM,{text:p}))),l&&(0,i.createElement)("div",{className:`wcf-field__desc ${k}`},Wm(l))),(0,i.createElement)("div",{className:"wcf-field__data--content-right ml-2"},(0,i.createElement)("div",{className:"flex justify-center"},(0,i.createElement)("input",{type:"hidden",name:n,value:v}),(0,i.createElement)(Pg,{id:r||n,value:j===v,onChange:function(e){if(e&&u)return"alert"===u.type?void _(!0):"confirm"===u.type||"prompt"===u.type?(M(""),void _(!0)):void 0;T(e)},disabled:f})))),!o&&l&&(0,i.createElement)("div",{className:`wcf-field__desc ${k}`},Wm(l)),function(){if(!u)return null;const e="prompt"===u.type,t="alert"===u.type,n=!e||E===u.check.toUpperCase();return(0,i.createElement)(vh,{open:N,setOpen:e=>{e||O()},exitOnClickOutside:!1,exitOnEsc:!0,className:"wcf-toggle-notice-popup"},(0,i.createElement)(vh.Panel,{className:"sm:max-w-lg w-full"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Header,{className:"flex items-center justify-between !space-y-0"},(0,i.createElement)("div",{className:"flex items-center gap-2"},(0,i.createElement)(Ah,{className:"w-8 h-8 text-support-warning","aria-hidden":"true"}),(0,i.createElement)(vh.Title,null,t?(0,D.__)("Notice","cartflows"):(0,D.__)("Confirmation Required","cartflows"))),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,null,(0,i.createElement)("p",{className:"text-sm text-text-secondary m-0"},u.message),e&&(0,i.createElement)("div",{className:"mt-4"},(0,i.createElement)(tg,{value:E,onChange:e=>M(e),placeholder:u.check.toUpperCase(),size:"md"}))),(0,i.createElement)(vh.Footer,{className:"flex gap-3 justify-end"},t?(0,i.createElement)(Po,{variant:"primary",size:"md",onClick:O},(0,D.__)("OK","cartflows")):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:O},(0,D.__)("Cancel","cartflows")),(0,i.createElement)(Po,{variant:"primary",size:"md",destructive:!0,onClick:L,disabled:!n},(0,D.__)("Confirm","cartflows"))))))}())},bM=function(e){const{name:t,label:n,desc:r,tooltip:o,options:a,layout:l="horizontal",value:c,showRadio:d=!0,after:u}=e;(0,s.useEffect)(()=>{void 0===c&&p("")},[]);const[f,p]=(0,s.useState)(c);function m(t){p(t);const n=new CustomEvent("wcf:selectioncard:change",{bubbles:!0,detail:{e:{},name:e.name,newValue:t}});document.dispatchEvent(n)}function h(e){return e.tooltip?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(uM,{text:e.tooltip}),e.label):e.desc?{heading:e.label,description:e.desc}:e.label}return(0,i.createElement)("div",{className:"wcf-field wcf-select-option--card"},(0,i.createElement)("div",{className:"wcf-field__data flex flex-col gap-6"},n&&r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-field__data--content-left"},n&&(0,i.createElement)("div",{className:"wcf-field__data--label text-sm font-medium text-text-primary text-left"},(0,i.createElement)("label",null,n,o&&(0,i.createElement)(uM,{text:o})))),(0,i.createElement)("div",{className:"wcf-field__desc text-sm text-left font-normal text-text-tertiary"},Wm(r))),(0,i.createElement)("div",{className:"wcf-field__data--content-right w-full"},"horizontal"===l?(0,i.createElement)("div",{className:"grid gap-[13px]",style:{gridTemplateColumns:`repeat(${a.length}, minmax(0, 1fr))`}},a.map(e=>{const n=f===e.value;return(0,i.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,i.createElement)("input",{type:"radio",name:t,value:e.value,checked:n,onChange:()=>m(e.value),className:"sr-only"}),d&&(0,i.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,i.createElement)("span",{className:"size-1.5 rounded-full bg-background-primary"})),e.image&&(0,i.createElement)("img",{src:e.image,alt:e.label,className:"wcf-selection-card--image size-11"}),(0,i.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,i.createElement)(uM,{text:e.tooltip,classes:n?"text-brand-500":"hover:text-brand-500"}),e.label))})):(0,i.createElement)(Vg.Group,{name:t,value:f,onChange:m,style:"simple",vertical:!0,columns:1,gapClassName:"gap-0"},a.map((e,t)=>(0,i.createElement)(Vg.Button,(0,w.A)({key:t,value:e.value,label:h(e)},e.image&&{icon:(0,i.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,i.createElement)("div",{className:"wcf-field__data--content__after"},u)),!n&&r&&(0,i.createElement)("div",{className:"wcf-field__desc text-sm font-normal text-text-tertiary mt-2"},Wm(r)))},vM=function(e){const{name:t,id:n,label:r,desc:o,tooltip:a,options:l,onSelect:c,after:d,isSearchable:u=!1}=e,[f,p]=(0,s.useState)(()=>l.find(t=>t.value===e.value)||null),m=(0,s.useRef)(null);return(0,i.createElement)("div",{className:"wcf-field wcf-select-with-icons-option"},(0,i.createElement)("div",{className:"wcf-field__data"},r&&(0,i.createElement)("div",{className:"wcf-field__data--label text-sm font-normal text-left"},(0,i.createElement)("label",null,r,a&&(0,i.createElement)(uM,{text:a}))),(0,i.createElement)("div",{className:"wcf-field__data--content"},(0,i.createElement)("input",{type:"hidden",ref:m,name:t,defaultValue:f?.value||""}),(0,i.createElement)(lw,{id:n,value:f,onChange:function(t){p(t),m.current&&(m.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),c&&c()},by:"value",combobox:u,size:"sm"},(0,i.createElement)(lw.Button,{placeholder:"",render:e=>(0,i.createElement)(uM,{text:e?.label||"",icon:e?.icon||(0,i.createElement)(ix,{className:"w-5 h-5"}),classes:"!ml-0"}),type:"button",className:e.class}),(0,i.createElement)(lw.Options,null,l.map(e=>(0,i.createElement)(lw.Option,{key:e.value,value:e},(0,i.createElement)(uM,{text:e.label,icon:e.icon,classes:"group-hover:text-text-on-color !ml-0"})))))),d&&(0,i.createElement)("div",{className:"wcf-field__data--content__after"},d)),o&&(0,i.createElement)("div",{className:"wcf-field__desc text-sm font-regular"},Wm(o)))};function xM({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.666 3.888A2.25 2.25 0 0 0 13.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 0 1-.75.75H9a.75.75 0 0 1-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 0 1-2.25 2.25H6.75A2.25 2.25 0 0 1 4.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 0 1 1.927-.184"}))}const NM=s.forwardRef(xM),_M={billing:["billing_country","billing_address_2","billing_address_1","billing_city","billing_state","billing_postcode"],shipping:["shipping_country","shipping_address_2","shipping_address_1","shipping_city","shipping_state","shipping_postcode"]},EM=function({preSelectedStepId:e=null,isStoreCheckout:t=!1}){const[n,r]=(0,s.useState)([]),[o,a]=(0,s.useState)(e||""),[l,c]=(0,s.useState)(""),[d,u]=(0,s.useState)([]),[f,p]=(0,s.useState)({}),[m,h]=(0,s.useState)([]),[g,w]=(0,s.useState)(null),[y,b]=(0,s.useState)([]),[v,x]=(0,s.useState)([]),[N,_]=(0,s.useState)([]),[E,M]=(0,s.useState)(!0),[I,S]=(0,s.useState)(!1),[k,C]=(0,s.useState)(!1);(0,s.useEffect)(()=>{Xf()({path:"/cartflows-pro/v1/admin/checkout-link-data/steps"}).then(t=>{if(r(t),M(!1),e){const n=t.find(t=>t.id===parseInt(e,10));n&&c(n.permalink)}}).catch(()=>M(!1))},[]),(0,s.useEffect)(()=>{Xf()({path:"/cartflows-pro/v1/admin/checkout-link-data/coupons"}).then(e=>b(e)).catch(()=>{})},[]),(0,s.useEffect)(()=>{t&&Xf()({path:"/cartflows-pro/v1/admin/checkout-link-data/products"}).then(e=>x(e)).catch(()=>{})},[t]),(0,s.useEffect)(()=>{if(!o)return u([]),p({}),h([]),void c("");S(!0);const e=n.find(e=>e.id===parseInt(o,10));e&&c(e.permalink),Xf()({path:`/cartflows-pro/v1/admin/checkout-link-data/fields/${o}`}).then(e=>{u(e);const t={};e.forEach(e=>{t[e.id]=""}),p(t),h([]),S(!1)}).catch(()=>S(!1))},[o]);const j=(0,s.useMemo)(()=>{const e=d.find(e=>"country"===e.type);return e?.states||{}},[d]),A=(0,s.useMemo)(()=>{const e=(e,t)=>{const n=d.some(t=>t.section===e&&"address"===t.group),r=d.filter(t=>t.section===e&&"address"!==t.group).map(t=>({label:t.label,value:t.id,section:e}));return{label:t,options:[...n?[{label:t+" "+(0,D.__)("Address","cartflows"),value:`__${e}_address__`,type:"address_group",section:e}]:[],...r]}};return[e("billing",(0,D.__)("Billing","cartflows")),e("shipping",(0,D.__)("Shipping","cartflows"))].filter(e=>e.options.length>0)},[d]),T=(0,s.useCallback)(()=>{if(!l||!o)return"";const e=[];if(m.filter(e=>"address_group"!==e.type).forEach(t=>{const n=f[t.value];n&&""!==n.trim()&&e.push(`${encodeURIComponent(t.value)}=${encodeURIComponent(n)}`)}),m.filter(e=>"address_group"===e.type).forEach(t=>{(_M[t.section]||[]).forEach(t=>{const n=f[t];n&&""!==n.trim()&&e.push(`${encodeURIComponent(t)}=${encodeURIComponent(n)}`)})}),g?.value&&e.push(`coupon=${encodeURIComponent(g.value)}`),N.length>0){const t=N.map(e=>e.value).join(",");e.push(`wcf-add-to-cart=${encodeURIComponent(t)}`)}if(0===e.length)return l;const t=l.includes("?")?"&":"?";return`${l}${t}${e.join("&")}`},[l,o,m,f,g,N]),L=(e,t)=>{p(n=>({...n,[e]:t}))};return(0,i.createElement)("div",{className:"wcf-checkout-link-generator"},!e&&(0,i.createElement)("div",{className:"wcf-field__data flex items-start gap-6 mb-6"},(0,i.createElement)("div",{className:"wcf-field__data--content-left flex-[0_0_35%]"},(0,i.createElement)("label",{className:"text-sm font-medium text-text-primary"},(0,D.__)("Checkout Step","cartflows")),(0,i.createElement)("p",{className:"text-sm text-text-secondary mt-1"},(0,D.__)("Choose the checkout page to build a link for.","cartflows"))),(0,i.createElement)("div",{className:"wcf-field__data--content-right flex-1"},E?(0,i.createElement)("div",{className:"animate-pulse h-9 bg-background-secondary rounded-md w-full"}):(0,i.createElement)("select",{className:"input-field !pl-3 !pr-6 !py-2 !text-sm font-normal !rounded-md text-text-primary !border-border-subtle w-full",value:o,onChange:e=>a(e.target.value)},(0,i.createElement)("option",{value:""},(0,D.__)("— Select a Step —","cartflows")),n.map(e=>(0,i.createElement)("option",{key:e.id,value:e.id},e.title))))),o&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("hr",{className:"border-border-subtle mb-6"}),I?(0,i.createElement)("div",{className:"space-y-3"},[1,2,3].map(e=>(0,i.createElement)("div",{key:e,className:"animate-pulse h-10 bg-background-secondary rounded-md"}))):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-field__data flex items-start gap-6 mb-2"},(0,i.createElement)("div",{className:"wcf-field__data--content-left flex-[0_0_35%]"},(0,i.createElement)("label",{className:"text-sm font-medium text-text-primary"},(0,D.__)("Select Fields","cartflows")),(0,i.createElement)("p",{className:"text-xs text-text-secondary mt-1"},(0,D.__)("Select the checkout fields to include in the URL.","cartflows"))),(0,i.createElement)("div",{className:"wcf-field__data--content-right flex-1"},(0,i.createElement)(ox,{name:"wcf_clg_fields",isMulti:!0,isSearchable:!0,options:A,value:m,placeholder:(0,D.__)("Select fields…","cartflows"),onChangeCB:e=>{const t=e||[],n=m.filter(e=>"address_group"===e.type&&!t.find(t=>t.value===e.value));if(n.length>0){const e={};n.forEach(t=>{(_M[t.section]||[]).forEach(t=>{e[t]=""})}),p(t=>({...t,...e}))}h(t)},className:"!m-0"}))),m.length>0&&(0,i.createElement)("div",{className:"mb-4 border-t border-border-subtle pb-4"},m.filter(e=>"address_group"!==e.type).map(t=>((t,n,r)=>{const o=d.find(e=>e.id===t),a="country"===o?.type&&o?.options&&Object.keys(o.options).length>0;return(0,i.createElement)("div",{key:t,className:"wcf-field__data flex items-center gap-6 py-3 border-0"},(0,i.createElement)("div",{className:"wcf-field__data--content-left flex-[0_0_35%]"},(0,i.createElement)("label",{htmlFor:`wcf_clg_${t}`,className:"text-sm font-medium text-text-primary"},n),r&&(0,i.createElement)("span",{className:"block text-xs text-text-secondary mt-0.5"},"billing"===r?(0,D.__)("Billing","cartflows"):(0,D.__)("Shipping","cartflows"))),(0,i.createElement)("div",{className:"wcf-field__data--content-right flex-1 "+(e?"":"!ml-5")},a?(0,i.createElement)("select",{id:`wcf_clg_${t}`,name:`wcf_clg_${t}`,className:"input-field !pl-3.5 !pr-6 !py-2.5 !text-sm font-normal !rounded-md text-text-primary !border-border-subtle w-full",value:f[t]||"",onChange:e=>L(t,e.target.value)},(0,i.createElement)("option",{value:""},(0,D.__)("Select Country","cartflows")),Object.entries(o.options).map(([e,t])=>(0,i.createElement)("option",{key:e,value:e},t))):(0,i.createElement)(dw,{name:`wcf_clg_${t}`,id:`wcf_clg_${t}`,value:f[t]||"",placeholder:(0,D.__)("Enter value","cartflows"),onChangeCB:e=>L(t,e),sectionClass:"!p-0",wrapperClass:"block w-full"})))})(t.value,t.label,t.section)),m.filter(e=>"address_group"===e.type).map(e=>(e=>{const t=`${e}_state`,n=f[`${e}_country`]||"",r=n&&j[n]||{},o="billing"===e?(0,D.__)("Billing Address","cartflows"):(0,D.__)("Shipping Address","cartflows"),a=(_M[e]||[]).map(e=>d.find(t=>t.id===e)).filter(Boolean),s="block w-full rounded-md border border-border-subtle bg-white px-3.5 py-2.5 text-sm text-text-primary focus:outline-none focus:ring-1 focus:ring-border-strong",l=s;return(0,i.createElement)("div",{key:e,className:"mt-4 rounded-lg border border-border-subtle overflow-hidden"},(0,i.createElement)("div",{className:"px-4 py-3 bg-background-secondary border-b border-border-subtle"},(0,i.createElement)("span",{className:"text-sm font-semibold text-text-primary"},o)),(0,i.createElement)("div",{className:"divide-y divide-border-subtle"},a.map(e=>{const o=e.id,a="country"===e.type,c=o===t;return(0,i.createElement)("div",{key:o,className:"flex items-center gap-4 px-4 py-3"},(0,i.createElement)("label",{htmlFor:`wcf_clg_${o}`,className:"w-36 shrink-0 text-sm text-text-secondary"},e.label),(0,i.createElement)("div",{className:"flex-1 min-w-0"},a&&(0,i.createElement)("select",{id:`wcf_clg_${o}`,className:l,value:f[o]||"",onChange:e=>{L(o,e.target.value),L(t,"")}},(0,i.createElement)("option",{value:""},(0,D.__)("Select Country","cartflows")),Object.entries(e.options).map(([e,t])=>(0,i.createElement)("option",{key:e,value:e},t))),c&&(0,i.createElement)("select",{id:`wcf_clg_${o}`,className:`${l} disabled:opacity-50 disabled:cursor-not-allowed`,value:f[o]||"",disabled:!n,onChange:e=>L(o,e.target.value)},(0,i.createElement)("option",{value:""},n?(0,D.__)("Select State","cartflows"):(0,D.__)("Select a country first","cartflows")),Object.entries(r).map(([e,t])=>(0,i.createElement)("option",{key:e,value:e},t))),!a&&!c&&(0,i.createElement)("input",{type:"text",id:`wcf_clg_${o}`,name:`wcf_clg_${o}`,className:s,value:f[o]||"",placeholder:(0,D.__)("Enter value","cartflows"),onChange:e=>L(o,e.target.value)})))})))})(e.section))),(0,i.createElement)("hr",{className:"border-border-subtle mb-4"}),(0,i.createElement)("div",{className:"wcf-field__data flex items-start gap-6 mb-6"},(0,i.createElement)("div",{className:"wcf-field__data--content-left flex-[0_0_35%]"},(0,i.createElement)("label",{className:"text-sm font-medium text-text-primary"},(0,D.__)("Coupon","cartflows")),(0,i.createElement)("p",{className:"text-xs text-text-secondary mt-1"},(0,D.__)("Select a coupon to apply at checkout.","cartflows"))),(0,i.createElement)("div",{className:"wcf-field__data--content-right flex-1"},(0,i.createElement)(ox,{name:"wcf_clg_coupon",isMulti:!1,isSearchable:!0,isClearable:!0,options:y,value:g,placeholder:(0,D.__)("Select Coupon","cartflows"),onChangeCB:e=>w(e||null),className:"!m-0"}),g&&(()=>{const e=y.find(e=>e.value===g.value);return e?(0,i.createElement)("div",{className:"mt-3 rounded-md border border-border-subtle overflow-hidden"},(0,i.createElement)("div",{className:"px-4 py-2.5 bg-background-secondary border-b border-border-subtle"},(0,i.createElement)("span",{className:"text-xs font-semibold text-text-primary"},(0,D.__)("Coupon Details","cartflows"))),(0,i.createElement)("div",{className:"px-4 py-3 text-xs text-text-secondary space-y-2"},(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("span",{className:"font-medium text-text-primary"},(0,D.__)("Type:","cartflows")),(0,i.createElement)("span",null,e.discount_type)),(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("span",{className:"font-medium text-text-primary"},(0,D.__)("Amount:","cartflows")),(0,i.createElement)("span",null,e.amount)),e.expiry_date&&(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("span",{className:"font-medium text-text-primary"},(0,D.__)("Expires:","cartflows")),(0,i.createElement)("span",null,e.expiry_date)),e.description&&(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("span",{className:"font-medium text-text-primary"},(0,D.__)("Description:","cartflows")),(0,i.createElement)("span",null,e.description)))):null})())),t&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("hr",{className:"border-border-subtle mb-4"}),(0,i.createElement)("div",{className:"wcf-field__data flex items-start gap-6 mb-6"},(0,i.createElement)("div",{className:"wcf-field__data--content-left flex-[0_0_35%]"},(0,i.createElement)("label",{className:"text-sm font-medium text-text-primary"},(0,D.__)("Select Products","cartflows")),(0,i.createElement)("p",{className:"text-xs text-text-secondary mt-1"},(0,D.__)("Choose products to add to the cart when this checkout link is visited. Selected products will be added to the cart automatically when the link is opened.","cartflows"))),(0,i.createElement)("div",{className:"wcf-field__data--content-right flex-1"},(0,i.createElement)(ox,{name:"wcf_clg_products",isMulti:!0,isSearchable:!0,isClearable:!0,options:v,value:N,placeholder:(0,D.__)("Select products…","cartflows"),onChangeCB:e=>_(e||[]),className:"!m-0"})))),(0,i.createElement)("hr",{className:"border-border-subtle mb-6"}),(0,i.createElement)("div",{className:"wcf-field__data flex items-start gap-6 mb-4"},(0,i.createElement)("div",{className:"wcf-field__data--content-left flex-[0_0_35%]"},(0,i.createElement)("label",{className:"text-sm font-medium text-text-primary"},(0,D.__)("Checkout URL","cartflows"))),(0,i.createElement)("div",{className:"wcf-field__data--content-right flex-1"},(0,i.createElement)("textarea",{className:"w-full input-field font-mono !text-xs !text-text-secondary !py-3 !px-3 !border-border-subtle !rounded-md bg-background-secondary",rows:4,readOnly:!0,value:T()}))),(0,i.createElement)("div",{className:"flex justify-end"},(0,i.createElement)(Po,{variant:"primary",size:"sm",type:"button",icon:k?(0,i.createElement)(hw,{className:"w-4 h-4"}):(0,i.createElement)(NM,{className:"w-4 h-4"}),onClick:()=>{const e=T();if(e)if(navigator.clipboard)navigator.clipboard.writeText(e).then(()=>{C(!0),setTimeout(()=>C(!1),2e3)});else{const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),C(!0),setTimeout(()=>C(!1),2e3)}}},k?(0,D.__)("Copied!","cartflows"):(0,D.__)("Copy URL","cartflows"))))))},MM=function(){const[{step_data:e,flow_type:t}]=Zp(),n=e?.id||null,r="storeCheckout"===t;return(0,i.createElement)("div",{className:"wcf-field wcf-checkout-link-generator-field"},(0,i.createElement)(EM,{preSelectedStepId:n,isStoreCheckout:r}))},IM=function(){const[{page_settings:e,current_ob:t}]=Zp();if(null===e||"undefined"===e)return(0,i.createElement)(Ng,null);const n=e?.settings["multiple-order-bump-design"];return(0,i.createElement)("div",{className:"wcf-order-bump-design-tab"},(0,i.createElement)("div",{className:"wcf-order-bump-design-tab__settings"},n&&Object.keys(n.fields).map(e=>{const r=n.fields[e];let o="";return"borders"===r.id&&(o="grid grid-cols-4 gap-x-2"),"shadow"===r.id&&(o="grid grid-cols-4 gap-x-2"),r.section_fields?(0,i.createElement)("div",{key:e,className:`wcf-order-bump-design-tab--${r.id}-section ${o} border border-border-subtle rounded-md mb-5`},(0,i.createElement)("div",{className:"wcf-order-bump-deign-tab--heading-section col-span-full"},(0,i.createElement)(QE,{label:r.title,labelClass:"block text-base font-semibold text-text-primary mb-5"})),Object.keys(r.section_fields).map(e=>{const n=r.section_fields[e],o=t[n.name],a=kg.isActiveControl(n,t);return(0,i.createElement)(hM,{key:e,data:n,value:o,isActive:a,field:e,displayAs:"div",tabName:"ob-design"})})):(0,i.createElement)("div",{key:e,className:"wcf-order-bump-design-tab--section mb-5"},(0,i.createElement)(hM,{key:r.name,data:r,value:t[r.name],isActive:kg.isActiveControl(r,t),field:r.name,displayAs:"div",tabName:"ob-design"}))})))};function SM({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 6v.75m0 3v.75m0 3v.75m0 3V18m-9-5.25h5.25M7.5 15h3M3.375 5.25c-.621 0-1.125.504-1.125 1.125v3.026a2.999 2.999 0 0 1 0 5.198v3.026c0 .621.504 1.125 1.125 1.125h17.25c.621 0 1.125-.504 1.125-1.125v-3.026a2.999 2.999 0 0 1 0-5.198V6.375c0-.621-.504-1.125-1.125-1.125H3.375Z"}))}const kM=s.forwardRef(SM),DM=function(){const[{page_settings:e,current_ob:t},n]=Zp(),[r,o]=(0,s.useState)(t?.product[0]?t?.product[0]:""),[a,l]=(0,s.useState)(!1),[c,d]=(0,s.useState)(),u=(0,D.__)("Add","cartflows"),[f,p]=(0,s.useState)({isInProcessing:!1,buttonText:u}),{isInProcessing:m,buttonText:h}=f,g=e?.settings["multiple-order-bump-product"],w=[{value:"",label:"Original",icon:(0,i.createElement)(ix,{className:"w-5 h-5"})},{value:"discount_percent",label:"Percentage",icon:(0,i.createElement)(lx,{className:"w-5 h-5"})},{value:"discount_price",label:"Price",icon:(0,i.createElement)(dx,{className:"w-5 h-5"})},{value:"coupon",label:"Coupon",icon:(0,i.createElement)(kM,{className:"w-5 h-5"})}];return""!==r&&function(){const e=t.discount_type,n=parseFloat(t.discount_value),o=parseFloat(r.original_price);let a=0;"discount_percent"===e?n>0&&(a=o-o*n/100):"discount_price"===e&&n>0&&(a=o-n),r.sell_price=a.toFixed(2)}(),(0,s.useEffect)(()=>{const e=t?.product?.[0];o(e||""),l(!(e&&!e?.is_deleted))},[t]),null===e||"undefined"===e?(0,i.createElement)(xg,null):(0,i.createElement)("div",{className:"wcf-order-bump-product-tab"},""===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"border border-solid border-border-subtle bg-gray-25 text-center text-sm font-normal rounded-md p-5"},(0,D.__)("Once you have add product, it will be displayed here.","cartflows")),(0,i.createElement)("input",{type:"hidden",name:"product"}),(0,i.createElement)("div",{className:"wcf-ob-product-selection-field__add-new flex justify-between items-end gap-5 mt-5"},(0,i.createElement)(sM,{name:"",desc:"",field:"product",value:"",allowed_products:"",include_products:"braintree-subscription, braintree-variable-subscription",excluded_products:"grouped",placeholder:(0,D.__)("Search for a Product","cartflows"),onChangeCB:d,sectionClass:"w-full"}),(0,i.createElement)(Po,{type:"button",variant:"outline",size:"md",icon:(0,i.createElement)(yg,{className:"w-4 h-4"}),iconPosition:"left",loading:m,disabled:m,onClick:function(e){e.preventDefault();const t=c?.value;"active"===cartflows_admin.woocommerce_status&&t&&(p({isInProcessing:!0,buttonText:(0,D.__)("Adding…","cartflows")}),Xf()({path:`/cartflows-pro/v1/admin/ob-product-data/${t}`}).then(e=>{n({type:"ADD_OB_PRODUCT",product:e}),p({isInProcessing:!1,buttonText:u})}),d())},className:"wcf-select-product-button shrink-0"},h))),""!==r&&(0,i.createElement)(i.Fragment,null,a&&(0,i.createElement)("div",{className:"border border-brand-500 bg-brand-25 text-center text-brand-500 text-xs font-normal rounded-md p-5 mb-5"},(0,D.__)("The product previously added as an Order Bump has been deleted. Please add a new product.","cartflows")),(0,i.createElement)("div",{className:"wcf-ob-product-selection--selected-product flex items-center gap-3 p-3 border border-border-subtle rounded-md"},(0,i.createElement)("div",{className:"wcf-ob-product-selection--product-title whitespace-nowrap text-sm font-medium text-text-primary w-2/5"},(0,i.createElement)("div",{className:"flex gap-3 items-center"},(0,i.createElement)("div",{className:"wcf-ob-product-selection--product-image w-20 h-20"},(0,i.createElement)("img",{src:r.product_image?r.product_image:cartflows_admin.image_placeholder,className:"wcf-ob-product-image rounded-md w-full h-full aspect-{3/2} object-contain",alt:r.label})),(0,i.createElement)("div",{className:"wcf-ob-product-selection--product-title_text"},(0,i.createElement)("div",{className:"wcf-ob-product-repeater-field__title whitespace-normal text-left","data-product_id":r.value},Wm(String(r?.label))),(0,i.createElement)("input",{type:"hidden",name:"product",value:r.value?r.value:""}),(0,i.createElement)("div",{className:"wcf-ob-product-repeater-field__reg-price mt-1 "},(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("span",{className:`wcf-ob-product--reg-price ${0<t.discount_value?"line-through text-text-tertiary":""} `},cartflows_admin.woo_currency+r.original_price),0<t.discount_value&&(0,i.createElement)("span",{className:"wcf-ob-product--sale-price"},cartflows_admin.woo_currency+r.sell_price))),"coupon"===t.discount_type&&(0,i.createElement)("span",{className:"coupon-message text-xs mt-0.5 text-text-secondary"},(0,D.__)("Coupon will apply on checkout page","cartflows"))))),(0,i.createElement)("div",{className:"wcf-ob-product-selection--product-discount__wrapper flex items-end gap-3 justify-start w-[55%]"},(0,i.createElement)("div",{className:"wcf-ob-product-selection--product-qty whitespace-nowrap text-sm text-text-secondary"},(0,i.createElement)(xx,{id:"",name:"quantity",class:"input-field !w-16 !m-0 "+("no"===t.display_quantity_field?"disabled":""),value:t.quantity,min:"1",readonly:"no"===t.display_quantity_field})),(0,i.createElement)("div",{className:"wcf-ob-product-selection--product-discount flex items-end whitespace-nowrap text-sm text-text-secondary gap-3"},(0,i.createElement)(vM,{name:"discount_type",value:t.discount_type,class:"!m-0",options:w}),"coupon"!==t.discount_type?(0,i.createElement)(xx,{id:"",class:"input-field !w-16 !m-0",name:"discount_value",value:""===t.discount_type?"":t.discount_value,readonly:""===t.discount_type?"readonly":"",placeholder:""===t.discount_type?"":"0",min:"1",step:"any"}):(0,i.createElement)(lM,{wrapperClass:"w-56",fieldClass:"!border-l-0 !rounded-r-md !rounded-l-none",name:"discount_coupon",placeholder:(0,D.__)("Search for a coupon","cartflows"),multiple:!1,allow_clear:!0,value:""===t.discount_type?"":t.discount_coupon}))),(0,i.createElement)("div",{className:"wcf-product-selection-actions whitespace-nowrap text-right text-sm font-medium w-[5%]"},(0,i.createElement)("div",{className:"wcf-delete-product-item p-2 text-text-tertiary hover:text-brand-500 cursor-pointer flex justify-center items-center",onClick:function(){n({type:"REMOVE_OB_PRODUCT",product:""}),o("")}},(0,i.createElement)(Xm,{className:"h-18 w-18"})))),(0,i.createElement)("div",{className:"flex mt-5"},(0,i.createElement)("table",{className:"w-full"},(0,i.createElement)("tbody",null,g&&g.fields&&Object.keys(g.fields).map(e=>{const n=g.fields[e],r=n.name,o=t[r],a=kg.isActiveControl(n,t);return(0,i.createElement)(hM,{key:e,data:n,value:o,isActive:a,field:e})}))))))},CM=function(){const[{page_settings:e,current_ob:t}]=Zp();if(null===e||"undefined"===e)return(0,i.createElement)(Ng,null);const n=e?.settings["multiple-order-bump-content"];return(0,i.createElement)("div",{className:"wcf-order-bump-content-tab"},(0,i.createElement)("div",{className:"wcf-order-bump-content-tab__settings"},Object.keys(n.fields).map(e=>{const r=n.fields[e],o=t[r.name],a=kg.isActiveControl(r,t);return(0,i.createElement)(hM,{key:e,data:r,value:o,isActive:a,field:e,options:t,displayAs:"div",tabName:"order-bump-content"})})))},jM=function({rules:e,group_id:t,g_index:n,groups_length:r}){const[{page_settings:o},a]=Zp(),s=o?.settings["multiple-order-bump-rules"],l=s.conditions;return(0,i.createElement)(i.Fragment,null,e.map((o,c)=>{const d=o?.rule_id,u=e[c],f=s.field_data[u.condition],p=f?.operator||[],m=u.operator||p[0]?.value||"";return(0,i.createElement)(i.Fragment,null,0!==c&&(0,i.createElement)("div",{className:"wcf-order-bumps-rules--group_rules__condition-label"},(0,i.createElement)("div",{className:"wcf--condition-label__and_group relative"},(0,i.createElement)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true"},(0,i.createElement)("div",{className:"w-full border-t border-border-subtle border-dashed"})),(0,i.createElement)("div",{className:"relative flex justify-center"},(0,i.createElement)(Tf,{variant:"neutral",type:"rounded",size:"xs",label:(0,D.__)("AND","cartflows"),className:"wcf--condition-label__and_group__text"})))),(0,i.createElement)("div",{className:"wcf-order-bumps-rules--group_rules flex gap-3 items-center","data-rule-id":d,key:d},(0,i.createElement)("input",{type:"hidden",name:`rules[${n}][rules][${c}][rule_id]`,value:d}),(0,i.createElement)("div",{className:"wcf-order-bumps-rules--rule_fields grid gap-3 items-end w-full \n\t\t\t\t\t\t\t\t\t"+(f?.fields?.some(e=>"product"===e.type)?"grid-cols-2":"grid-cols-3")},(0,i.createElement)(cw,{name:`rules[${n}][rules][${c}][condition]`,wrapperClass:"block",options:l,onSelect:()=>{a({type:"RESET_OB_RULE_VALUE",name:"rules",group_id:t,rule_id:d})},value:u.condition}),(0,i.createElement)(cw,{name:`rules[${n}][rules][${c}][operator]`,wrapperClass:"block",options:f.operator,value:Wm(String(m))}),function(e,t,r){const o=r.value;let a="";const s=`rules[${n}][rules][${t}][value]`;return e.map(e=>{switch(e.type){case"select2":a=(0,i.createElement)(ox,{name:`${s}[]`,value:o,placeholder:e.placeholder,tooltip:e.tooltip,options:e.options,isMulti:e.isMulti,isSearchable:e?.enable_search});break;case"number":a=(0,i.createElement)(xx,{name:s,value:o,min:0,placeholder:e.placeholder,tooltip:e.tooltip});break;case"coupon":a="exist"===r.operator||"not_exist"===r.operator?(0,i.createElement)(cw,{name:s,options:[{label:"in parent order",value:"parent_order"}]}):(0,i.createElement)(lM,{name:s,placeholder:e.placeholder,tooltip:e.tooltip,value:o,isMulti:e.isMulti});break;case"product":a=(0,i.createElement)(sM,{name:s,placeholder:e.placeholder,tooltip:e.tooltip,value:o,isMulti:e.isMulti,sectionClass:"col-span-full",showLabelOnly:!0})}return a})}(f.fields,c,u)),(0,i.createElement)("div",{className:"wcf-order-bumps-rules--rule_actions"},function(e,n){return 1===e&&1===r?"":(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(Xm,{className:"w-4 h-4 stroke-2 text-text-tertiary"}),className:"!p-1 hover:!bg-background-secondary [&_svg]:hover:text-brand-700",onClick:e=>{e.currentTarget.setAttribute("rule_id",n),(e=>{const n=e.target.getAttribute("rule_id");t&&n&&a({type:"REMOVE_OB_RULE",name:"rules",rule_id:n,group_id:t})})({target:e.currentTarget})},rule_id:n})}(e.length,d))))}))},AM=e=>(0,i.createElement)("svg",(0,w.A)({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),(0,i.createElement)("circle",{cx:"7",cy:"5",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"7",cy:"10",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"7",cy:"15",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"13",cy:"5",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"13",cy:"10",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"13",cy:"15",r:"1.25",fill:"currentColor"})),TM=function(){const[{options:e,current_ob:t},n]=Zp(),[r,o]=(0,s.useState)({ruleGroupId:"",isOpen:!1}),{ruleGroupId:a,isOpen:l}=r;if(null===e||"undefined"===t)return(0,i.createElement)(Sg,null);const c=t.rules;if(void 0===c)return(0,i.createElement)(FE,{content:(0,D.__)("Please Update the CartFlows Pro to the latest version to use the conditional order bump feature.","cartflows")});const d=()=>{const e={group_id:Math.random().toString(36).substring(2,5),rules:[{rule_id:Math.random().toString(36).substring(2,5),condition:"cart_item",operator:"",value:""}]};n({type:"ADD_NEW_OB_GROUP",name:"rules",newGroup:e})},u=function(e){const t=e.target.getAttribute("data-group_id");o({ruleGroupId:t,isOpen:a!==t||!l})};return(0,i.createElement)("div",{className:"wcf-order-bumps-rules-page"},(0,i.createElement)("div",{className:"wcf-order-bumps-rules-page--enable_option"},(0,i.createElement)(yM,{name:"is_rule",value:t.is_rule,label:(0,D.__)("Enable conditional order bump ","cartflows"),tooltip:(0,D.__)("By enabling this option, you can create the conditions to display the order bump.","cartflows")})),"yes"===t.is_rule&&c&&(0,i.createElement)("div",{className:"mt-8"},(0,i.createElement)(Wp.ReactSortable,{id:"wcf-order-bump-sortable-wrapper",className:"wcf-order-bump--sortable-wrapper flex flex-col gap-4",list:c,setList:e=>n({type:"SET_OB_RULES_GROUPS",groups:e,fieldName:"rules"}),swapThreshold:.8,direction:"vertical",animation:150,handle:".wcf-order-bumps-rules-page--group_wrapper",filter:".wcf-order-bumps-rules--rule_fields, .wcf-order-bumps-rules--rule_actions, .wcf-field wcf-select-option, .wcf-order-bumps-rules--add-rule__repeater .wcf-button.wcf-button--secondary, .wcf-field__data--content, .wcf-order-bumps-rules-page--group_wrapper__footer, .wcf-checkout-rules--group_header__right",preventOnFilter:!1,onStart:function(){document.getElementsByClassName("wcf-order-bumps-rules--or_group__button")[0].setAttribute("style","display:none")},onEnd:function(){document.getElementsByClassName("wcf-order-bumps-rules--or_group__button")[0].setAttribute("style","display:inline-block")}},c.map((e,t)=>{const r=e.group_id,o=e.rules;return(0,i.createElement)("div",{className:"wcf-order-bumps-rules-page--group_wrapper",key:r},(0,i.createElement)("div",{className:"wcf-order-bumps-rules--group border border-solid border-cartflows-border rounded-md shadow-sm bg-background-primary overflow-hidden","data-group-id":r},(0,i.createElement)("input",{type:"hidden",name:`rules[${t}][group_id]`,value:r}),(0,i.createElement)("div",{className:"wcf-order-bumps-rules--group-header bg-background-primary p-4 flex items-center justify-between gap-4"},(0,i.createElement)("div",{className:"wcf-order-bumps-rules--group_header__left flex gap-4 items-center"},(0,i.createElement)("div",{className:"wcf-order-bumps-rule--sortable-toggle flex cursor-move text-text-tertiary hover:text-text-secondary"},(0,i.createElement)(AM,null)),(0,i.createElement)("span",{className:"wcf-group-header--text font-sm font-normal text-text-tertiary"},(0,D.__)("Show this order bump if following conditions are true","cartflows"))),(0,i.createElement)("div",{className:"wcf-order-bumps-rules--group_header__right flex gap-2 items-center"},a===r&&l?(0,i.createElement)(gg,{className:"w-4 h-4 stroke-1 text-text-tertiary hover:text-text-secondary cursor-pointer","aria-hidden":"true",onClick:u,"data-group_id":r}):(0,i.createElement)(Tp,{className:"w-4 h-4 stroke-1 text-text-tertiary hover:text-text-secondary cursor-pointer","aria-hidden":"true",onClick:u,"data-group_id":r}))),(0,i.createElement)("div",{id:`wcf-order-bumps-rules--group-${r}`,className:"p-4 bg-background-secondary border-t border-solid border-border-subtle border-0 "+(a===r&&l?"visible":"hidden")},(0,i.createElement)("div",{className:"wcf-order-bumps-rules--group_rules--wrapper flex flex-col gap-4"},0!==o.length&&(0,i.createElement)(jM,{rules:o,group_id:r,g_index:t,groups_length:c.length})),(0,i.createElement)("div",{className:"wcf-order-bumps-rules--add-rule__repeater flex mt-4"},(0,i.createElement)(Po,{variant:"link",size:"sm",icon:(0,i.createElement)(yg,{className:"w-4 h-4 stroke-2"}),iconPosition:"left",className:"wcf-order-bumps-rules--add-rule__button hover:!no-underline",onClick:()=>(e=>{const t={rule_id:Math.random().toString(36).substring(2,5),condition:"cart_item",operator:"",value:""};n({type:"ADD_NEW_OB_RULE",name:"rules",newRule:t,group_id:e})})(r)},(0,D.__)("Add Condition","cartflows"))))),(0,i.createElement)("div",{className:"wcf-order-bumps-rules-page--group_wrapper__footer"},(0,i.createElement)("div",{className:"wcf-order-bumps-rules--or_group relative my-4"},(0,i.createElement)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true"},(0,i.createElement)("div",{className:"w-full border-t border-border-subtle border-dashed"})),(0,i.createElement)("div",{className:"relative flex justify-center"},(0,i.createElement)(Tf,{variant:"neutral",type:"rounded",size:"xs",label:(0,D.__)("OR","cartflows"),className:"wcf-order-bumps-rules--or_group__text"}))),parseInt(t)+1===c.length&&(0,i.createElement)("div",{className:"wcf-order-bumps-rules--or_group__button mt-4"},(0,i.createElement)(Po,{variant:"outline",size:"md",icon:(0,i.createElement)(yg,{className:"w-4 h-4 stroke-2"}),iconPosition:"left",className:"wcf-order-bumps-rules--or_group_button !bg-brand-25 !text-brand-600 !outline-brand-300 hover:!bg-brand-50 hover:!outline-brand-300",onClick:d},(0,D.__)("Add Conditions Group","cartflows")))))}))))},LM=(0,s.createContext)(null);const OM=e=>!e.isLayoutDirty&&e.willUpdate(!1);function zM(){const e=new Set,t=new WeakMap,n=()=>e.forEach(OM);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 PM=e=>!0===e,RM=({children:e,id:t,inherit:n=!0})=>{const r=(0,s.useContext)(Bc),o=(0,s.useContext)(LM),[a,i]=function(){const e=function(){const e=(0,s.useRef)(!1);return Mu(()=>(e.current=!0,()=>{e.current=!1}),[]),e}(),[t,n]=(0,s.useState)(0),r=(0,s.useCallback)(()=>{e.current&&n(t+1)},[t]);return[(0,s.useCallback)(()=>Fa.postRender(r),[r]),t]}(),l=(0,s.useRef)(null),c=r.id||o;null===l.current&&((e=>PM(!0===e)||"id"===e)(n)&&c&&(t=t?c+"-"+t:c),l.current={id:t,group:PM(n)&&r.group||zM()});const d=(0,s.useMemo)(()=>({...l.current,forceRender:a}),[i]);return(0,C.jsx)(Bc.Provider,{value:d,children:e})},UM=(0,s.createContext)({}),BM=()=>(0,s.useContext)(UM),FM=(0,s.createContext)(null),QM=({children:e,activeItem:t=null,onChange:n,className:r,size:o="sm",orientation:a="horizontal",variant:i="pill",iconPosition:l="left",width:c="full"})=>{const d=Kh(),u=BM()?.activeItem||t,f=(0,s.useCallback)((e,t)=>{n&&n({event:e,value:t})},[n]);let p,m="rounded-full",h="p-1",g="ring-1 ring-tab-border";"vertical"===a?p="gap-0.5":("rounded"===i||"pill"===i)&&("xs"===o||"sm"===o?p="gap-0.5":("md"===o||"lg"===o)&&(p="gap-1")),"rounded"===i||"vertical"===a?m="rounded-md":"underline"===i&&(m="rounded-none",h="p-0",g="border-t-0 border-r-0 border-l-0 border-b border-solid border-tab-border","xs"===o?p="gap-0":"sm"===o?p="gap-2.5":("md"===o||"lg"===o)&&(p="gap-3"));const w=Ie(`box-border [&>*]:box-border flex items-center ${"full"===c?"w-full":""} ${"vertical"===a?"flex-col":""}`,m,h,p,g,"underline"!==i?"bg-tab-background":"",r);return(0,C.jsx)("div",{className:w,children:(0,C.jsx)(FM.Provider,{value:{activeItem:u,onChange:f,size:o,variant:i,orientation:a,iconPosition:l,width:c},children:(0,C.jsx)(RM,{id:d,children:s.Children.map(e,e=>(0,s.isValidElement)(e)?s.cloneElement(e):null)})})})};QM.displayName="Tabs.Group";const VM=(0,s.forwardRef)(({slug:e,text:t,icon:n,className:r,disabled:o=!1,badge:a=null,...i},l)=>{const c=(0,s.useContext)(FM);if(!c)throw new Error("Tab should be used inside Tabs Group");const{activeItem:d,onChange:u,size:f,variant:p,orientation:m,iconPosition:h,width:g}=c,w={xs:"px-1.5 py-0.5 text-xs [&_svg]:size-3",sm:"underline"===p?"py-1.5 text-sm [&_svg]:size-4":"px-3 py-1.5 text-sm [&_svg]:size-4",md:"underline"===p?"py-2 text-base [&_svg]:size-5":"px-3.5 py-1.5 text-base [&_svg]:size-5",lg:"underline"===p?"p-2.5 text-lg [&_svg]:size-6":"px-3.5 py-1.5 text-lg [&_svg]:size-6"}[f],y=Ie("relative border-none bg-transparent text-text-secondary cursor-pointer flex items-center justify-center transition-[box-shadow,color,background-color] duration-200","full"===g?"flex-1":"","vertical"===m?"w-full justify-between":"");let b="rounded-full";"rounded"===p?b="rounded-md":"underline"===p&&(b="rounded-none");const v=Ie(y,"border-none",b,"hover:text-text-primary","focus:outline-none",w,d===e?"bg-background-primary text-text-primary shadow-sm":"",o?"text-text-disabled cursor-not-allowed hover:text-text-disabled":"",r),x=Ie("flex items-center gap-1");return(0,C.jsxs)(bf.button,{ref:l,className:v,disabled:o,onClick:n=>{u(n,{slug:e,text:t})},...i,layoutRoot:!0,children:[d===e&&"underline"===p&&(0,C.jsx)(bf.span,{layoutId:"underline",layoutDependency:d,className:"absolute right-0 left-0 -bottom-px h-px bg-border-interactive"}),(0,C.jsxs)("span",{className:x,children:["left"===h&&n&&(0,C.jsx)("span",{className:"mr-1 contents center-center transition duration-150",children:n}),t,"right"===h&&n&&(0,C.jsx)("span",{className:"ml-1 contents center-center transition duration-150",children:n})]}),a&&(0,s.isValidElement)(a)&&a]})});VM.displayName="Tabs.Tab";const YM=({activeItem:e,children:t})=>(0,C.jsx)(UM.Provider,{value:{activeItem:e},children:t}),ZM=({slug:e,children:t})=>{const n=BM();if(!n)throw new Error("TabPanel should be used inside Tabs");return e===n.activeItem?(0,C.jsx)(C.Fragment,{children:t}):null};ZM.displayName="Tabs.Panel",YM.Group=QM,YM.Tab=VM,YM.Panel=ZM;const WM=function(){const[{current_ob:e}]=Zp(),[t,n]=(0,s.useState)(!1),r=()=>{n(!0)},o=()=>{n(!1)},a=e,l=e=>{let t=a?.product;return e&&t&&(Array.isArray(t)&&(t=a?.product[0]),e=(e=(e=(e=e.replace("{{product_name}}",t?.product_name)).replace("{{product_price}}",t?.display_price?t?.display_price:t?.original_price)).replace("{{product_desc}}",t?.product_desc)).replace("{{quantity}}",a?.quantity)),e},c=()=>(()=>{let e=a?.product;return Array.isArray(e)&&(e=a?.product[0]),"variable"===e?.type||!0===e?.is_variable})()?(0,i.createElement)("div",{className:"wcf-order-bump-choose-variation-preview"},(0,D.__)("Choose a variation","cartflows")):null,d=a?.position,u=Wm(l(a?.checkbox_label)||""),f=Wm(l(a?.hl_text)||""),p=Wm(l(a?.desc_text)||""),m=a?.show_arrow,h=a?.style,g=Wm(l(a?.title_text)||""),w=a?.action_element,y=a?.show_animation,b=a?.enable_show_image,v=a?.display_quantity_field,x="yes"===y?"wcf-blink":"",N=(0,i.createElement)("svg",{version:"1.1",className:`wcf-pointing-arrow ${x}`,id:"Capa_1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"20px",height:"15px",fill:"red",viewBox:"310 253 90 70",enableBackground:"new 310 253 90 70"},(0,i.createElement)("g",null,(0,i.createElement)("g",null,(0,i.createElement)("path",{d:"M364.348,253.174c-0.623,0.26-1.029,0.867-1.029,1.54v18.257h-51.653c-0.919,0-1.666,0.747-1.666,1.666v26.658c0,0.92,0.747,1.666,1.666,1.666h51.653v18.327c0,0.673,0.406,1.28,1.026,1.54c0.623,0.257,1.34,0.116,1.816-0.36l33.349-33.238 c0.313-0.313,0.49-0.737,0.49-1.18c0-0.443-0.177-0.866-0.487-1.179l-33.349-33.335 C365.688,253.058,364.971,252.915,364.348,253.174z"})))),_=a?.bg_color,E=a?.border_style,M=a?.border_color,I=a?.box_border_width,S=a?.box_border_radius,k=a?.box_shadow_color,C=""!==a?.box_shadow_horizontal?a?.box_shadow_horizontal:0,j=""!==a?.box_shadow_vertical?a?.box_shadow_vertical:0,A=""!==a?.box_shadow_blur?a?.box_shadow_blur:0,T=""!==a?.box_shadow_spread?a?.box_shadow_spread:0,L=a?.label_color?a?.label_color:"#7a7a7a",O=a?.label_bg_color,z=a?.desc_text_color,P=a?.hl_text_color,R=a?.button_text_color,U=a?.button_text_hover_color,B=a?.button_color,F=a?.button_border_width,Q=a?.button_border_style,V=a?.button_border_color,Y=a?.button_border_radius,Z=a?.button_hover_color,W=a?.title_text_color,G=a?.label_border_style,H=a?.label_border_width,$=a?.label_border_radius,X=a?.label_border_color,q={background:_,borderStyle:E,borderColor:M,borderRadius:""!==S?S+"px":"4px",borderWidth:""!==I?I+"px":"1px",boxShadow:C+"px "+j+"px "+A+"px "+T+"px "+k};let J={},K={},ee={};"style-1"===h?(J={borderColor:M,borderBottomStyle:"inherit"!==E?E:"solid",background:O,borderWidth:I+"px"},q.borderStyle="inherit"!==E?E:"solid"):"style-2"===h?(J={borderColor:M,borderTopStyle:"inherit"!==E?E:"solid",background:O,borderWidth:I+"px"},q.borderStyle="inherit"!==E?E:"solid"):"style-3"===h?q.borderStyle="inherit"!==E?E:"solid":"style-4"===h?(q.borderStyle="inherit"!==E?E:"solid",ee={color:t?U:R,background:t?Z:B,borderWidth:""!==F?F+"px":"1px",borderStyle:"inherit"!==Q?Q:"none",borderColor:V,borderRadius:""!==Y?Y+"px":"3px"}):"style-5"===h&&(q.borderStyle="inherit"!==E?E:"",K={borderStyle:"inherit"!==G?G:"",borderWidth:H+"px",borderRadius:$+"px",borderColor:X,background:O,padding:O?"5px 10px":"5px 0"},ee={color:t?U:R,background:t?Z:B,borderWidth:""!==F?F+"px":"1px",borderStyle:"inherit"!==Q?Q:"solid",borderColor:V,borderRadius:""!==Y?Y+"px":"3px"});let te="",ne="left",re="auto";"yes"===b&&(te=a?.product_image,ne=a?.ob_image_position,re=""!==a?.ob_image_width?a?.ob_image_width+"px":"auto"),(0,s.useEffect)(()=>{const e=document.getElementById("wcf-order-bump-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)}},[]);const oe=function(){let e="";return"yes"===v&&(e=(0,i.createElement)("div",{className:"wcf-ob-qty-selection-wrap"},(0,i.createElement)("span",{className:"wcf-ob-qty-selection-btn wcf-ob-qty-decrement wcf-ob-qty-change-icon"},"-"),(0,i.createElement)("input",{type:"number",className:"wcf-order-bump-quantity-updater",name:"wcf_order_bump_quantity",placeholder:"1",defaultValue:a?.quantity,min:"1"}),(0,i.createElement)("span",{className:"wcf-ob-qty-selection-btn wcf-ob-qty-increment wcf-ob-qty-change-icon"},"+"))),e};return(0,i.createElement)("div",{id:"wcf-order-bump-preview-wrapper",className:"wcf-order-bump-preview-wrapper"},(0,i.createElement)("div",{className:`wcf-bump-order-wrap wcf-bump-order-${h} wcf-${d} box-border`,style:q},function(){let e="";return"style-1"===h?e=(0,i.createElement)("div",{className:`wcf-bump-order-content wcf-bump-order-image-${ne} `},(0,i.createElement)("div",{className:"wcf-bump-order-field-wrap",style:J},"right"!==ne&&(0,i.createElement)("label",{style:{color:L}},"yes"===m&&N,(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}),(0,i.createElement)("span",{className:"wcf-bump-order-label"},u)),"right"===ne&&(0,i.createElement)("label",{style:{color:L}},(0,i.createElement)("span",{className:"wcf-bump-order-label"},u),(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}),"yes"===m&&N)),(0,i.createElement)("div",{className:"wcf-content-container"},""!==te&&"right"!==ne&&(0,i.createElement)("div",{className:"wcf-bump-order-offer-content-left",style:{width:"auto"!==re?re:""}},(0,i.createElement)("img",{src:te,className:"wcf-image",alt:(0,D.__)("Order Bump Product Image","cartflows")})),(0,i.createElement)("div",{className:"wcf-bump-order-offer-content-right"},(0,i.createElement)("div",{className:"wcf-bump-order-offer"},(0,i.createElement)("span",{className:"wcf-bump-order-bump-highlight",style:{color:P}},f)),(0,i.createElement)("div",{className:"wcf-bump-order-desc",style:{color:z}},p),c(),oe()),""!==te&&"right"===ne&&(0,i.createElement)("div",{className:"wcf-bump-order-offer-content-left",style:{width:"auto"!==re?re:""}},(0,i.createElement)("img",{src:te,className:"wcf-image",alt:(0,D.__)("Order Bump Product Image","cartflows")})))):"style-2"===h?e=(0,i.createElement)("div",{className:`wcf-bump-order-content wcf-bump-order-image-${ne} `},(0,i.createElement)("div",{className:"wcf-bump-order-offer"},(0,i.createElement)("span",{className:"wcf-bump-order-bump-highlight",style:{color:P}},f)),(0,i.createElement)("div",{className:"wcf-content-container"},""!==te&&"right"!==ne&&(0,i.createElement)("div",{className:"wcf-bump-order-offer-content-left",style:{width:"auto"===re?"":re}},(0,i.createElement)("img",{src:te,className:"wcf-image",alt:(0,D.__)("Order Bump Product Image","cartflows")})),(0,i.createElement)("div",{className:"wcf-bump-order-offer-content-right"},(0,i.createElement)("div",{className:"wcf-bump-order-desc",style:{color:z}},p),c(),oe()),""!==te&&"right"===ne&&(0,i.createElement)("div",{className:"wcf-bump-order-offer-content-left",style:{width:"auto"===re?"":re}},(0,i.createElement)("img",{src:te,className:"wcf-image",alt:(0,D.__)("Order Bump Product Image","cartflows")}))),(0,i.createElement)("div",{className:"wcf-bump-order-field-wrap",style:J},"right"!==ne&&(0,i.createElement)("label",{style:{color:L}},"yes"===m&&N,(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}),(0,i.createElement)("span",{className:"wcf-bump-order-label"},u)),"right"===ne&&(0,i.createElement)("label",{style:{color:L}},(0,i.createElement)("span",{className:"wcf-bump-order-label"},u),(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}),"yes"===m&&N))):"style-3"===h?e=(0,i.createElement)("div",{className:`wcf-bump-order-content wcf-bump-order-image-${ne} `},"right"!==ne&&(0,i.createElement)("div",{className:"wcf-bump-order-field-wrap"},""!==te&&"top"!==ne&&(0,i.createElement)("div",{className:"wcf-bump-order-action"},"yes"===m&&N,(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""})),""!==te&&(0,i.createElement)("div",{className:"wcf-bump-order-image",style:{maxWidth:"auto"!==re?re:""}},(0,i.createElement)("img",{src:te,className:"wcf-image",alt:(0,D.__)("Order Bump Product Image","cartflows")})),(0,i.createElement)("div",{className:"wcf-bump-order-text"},(0,i.createElement)("div",{className:"wcf-bump-order-label"},""===te&&(0,i.createElement)(i.Fragment,null,"yes"===m&&N,(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""})),""!==te&&"top"===ne&&(0,i.createElement)(i.Fragment,null,"yes"===m&&N,(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""})),(0,i.createElement)("label",{style:{color:W}},g)),(0,i.createElement)("div",{className:"wcf-bump-order-desc",style:{color:z}},p),c(),oe())),"right"===ne&&(0,i.createElement)("div",{className:"wcf-bump-order-field-wrap"},(0,i.createElement)("div",{className:"wcf-bump-order-text"},(0,i.createElement)("div",{className:"wcf-bump-order-label"},(0,i.createElement)("label",{style:{color:W}},g),""===te&&(0,i.createElement)(i.Fragment,null,"yes"===m&&N,(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}))),(0,i.createElement)("div",{className:"wcf-bump-order-desc",style:{color:z}},p),c(),oe()),""!==te&&(0,i.createElement)("div",{className:"wcf-bump-order-image",style:{maxWidth:"auto"!==re?re:""}},(0,i.createElement)("img",{src:te,className:"wcf-image",alt:(0,D.__)("Order Bump Product Image","cartflows")})),""!==te&&(0,i.createElement)("div",{className:"wcf-bump-order-action"},(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}),"yes"===m&&N))):"style-4"===h?e=(0,i.createElement)("div",{className:`wcf-bump-order-content wcf-bump-order-image-${ne} `},(0,i.createElement)("div",{className:"wcf-bump-order-field-wrap"},""!==te&&"right"!==ne&&(0,i.createElement)("div",{className:"wcf-bump-order-image"},(0,i.createElement)("img",{src:te,className:"wcf-image",style:{width:"auto"===re?"100px":re},alt:(0,D.__)("Order Bump Product Image","cartflows")})),"right"!==ne&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-bump-order-text"},(0,i.createElement)("div",{className:"wcf-bump-order-info"},(0,i.createElement)("div",{className:"wcf-bump-order-label"},(0,i.createElement)("label",{style:{color:W}},g)),(0,i.createElement)("div",{className:"wcf-bump-order-desc",style:{color:z}},p),c(),oe())),(0,i.createElement)("div",{className:"wcf-bump-order-action"},(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}),(0,i.createElement)("a",{className:"wcf-bump-order-cb-button wcf-bump-add-to-cart",style:ee,onMouseEnter:r,onMouseLeave:o},(0,D.__)("Add","cartflows")))),"right"===ne&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-bump-order-action"},(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}),(0,i.createElement)("a",{className:"wcf-bump-order-cb-button wcf-bump-add-to-cart",style:ee,onMouseEnter:r,onMouseLeave:o},(0,D.__)("Add","cartflows"))),(0,i.createElement)("div",{className:"wcf-bump-order-text"},(0,i.createElement)("div",{className:"wcf-bump-order-info"},(0,i.createElement)("div",{className:"wcf-bump-order-label"},(0,i.createElement)("label",{style:{color:W}},g)),(0,i.createElement)("div",{className:"wcf-bump-order-desc",style:{color:z}},p),c(),oe()))),""!==te&&"right"===ne&&(0,i.createElement)("div",{className:"wcf-bump-order-image"},(0,i.createElement)("img",{src:te,className:"wcf-image",style:{width:"auto"===re?"100px":re},alt:(0,D.__)("Order Bump Product Image","cartflows")})))):"style-5"===h&&(e=(0,i.createElement)("div",{className:"wcf-bump-order-content"},(0,i.createElement)("div",{className:"wcf-bump-order-field-wrap"},(0,i.createElement)("div",{className:`wcf-bump-order-info wcf-bump-order-image-${ne} `},""!==te&&"right"!==ne&&(0,i.createElement)("div",{className:"wcf-bump-order-image"},(0,i.createElement)("img",{src:te,className:"wcf-image",style:{width:re},alt:(0,D.__)("Order Bump Product Image","cartflows")})),(0,i.createElement)("div",{className:"wcf-bump-order-text"},""!==g&&(0,i.createElement)("div",{className:"wcf-bump-order-label",style:{color:W}},(0,i.createElement)("span",null,g)),""!==p&&(0,i.createElement)("div",{className:"wcf-bump-order-desc",style:{color:z}},p),c(),oe(),"checkbox"===w&&(0,i.createElement)("div",{className:"wcf-bump-order-action",style:K},"yes"===m&&N,(0,i.createElement)("input",{type:"checkbox",id:"wcf-bump-order-cb",className:"wcf-bump-order-cb",name:"wcf-bump-order-cb",value:""}),(0,i.createElement)("label",{style:{color:L}},u)),"button"===w&&(0,i.createElement)("div",{className:"wcf-bump-order-action wcf-ob-action-button"},(0,i.createElement)("a",{className:"wcf-bump-order-cb-button wcf-bump-add-to-cart",style:ee,onMouseEnter:r,onMouseLeave:o},(0,D.__)("Add","cartflows")))),""!==te&&"right"===ne&&(0,i.createElement)("div",{className:"wcf-bump-order-image"},(0,i.createElement)("img",{src:te,className:"wcf-image",style:{width:re},alt:(0,D.__)("Order Bump Product Image","cartflows")})))))),e}()))};function GM({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 HM=s.forwardRef(GM);function $M({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25H12"}))}const XM=s.forwardRef($M);function qM({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 JM=s.forwardRef(qM);function KM({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z"}),s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const eI=s.forwardRef(KM),tI=()=>{const[{flow_id:e,step_id:t,current_ob:n},r]=Zp(),[,o]=u();return{saveOrderBump:(0,s.useCallback)(()=>{o({status:"PROCESSING"});const a=document.querySelector(".wcf-slide-out-panel--form, .wcf-step-settings-view");if(!a)return o({status:"RESET"}),Promise.resolve(!1);if(null===n)return o({status:"SAVED"}),Promise.resolve(!0);if("undefined"!=typeof tinymce){const e=tinymce.get("wcf-order-bump-desc-editor");e&&e.save()}const i=new window.FormData(a),s=n.id;return i.append("action","cartflows_pro_save_order_bump_settings"),i.append("security",cartflows_admin.save_order_bump_settings_nonce),i.append("post_id",e),i.append("step_id",t),i.append("ob_id",s),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:i}).then(e=>{if(e.data&&e.data.success){const e=new window.FormData;return e.append("action","cartflows_pro_get_current_order_bump"),e.append("security",cartflows_admin.get_current_order_bump_nonce),e.append("ob_id",s),e.append("step_id",t),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>(e.data&&e.data.success&&e.data.current_ob&&r({type:"SET_CURRENT_OB",current_ob:e.data.current_ob,ob_id:s}),o({status:"SAVED"}),window.wcfUnsavedChanges=!1,!0))}return o({status:"RESET"}),!1}).catch(e=>(console.error(e),o({status:"RESET"}),!1))},[e,t,n,r,o])}},nI=function(e){const[{step_id:t,options:n,current_ob:r},o]=Zp(),[a,l]=(0,s.useState)("product"),c=new URLSearchParams((0,m.useLocation)().search),d=e.ob_id,u=c.get("obtab"),f=zh(),{saveOrderBump:p}=tI();!function(){const[{current_ob:e},t]=Zp(),n=function(n){const{name:r,value:o}=n.detail;if(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("[")),s=e[i];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_OB_OPTION",name:i,value:s})}void 0!==e&&(window.wcfUnsavedChanges=!0,t({type:"SET_OB_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:"image-selector"},{type:"wpeditor"},{type:"toggle"},{type:"selectioncard"}];(0,s.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])}();const h=[{name:(0,D.__)("Product","cartflows"),slug:"product",icon:(0,i.createElement)(HM,{className:"w-18 h-18 stroke-2"})},{name:(0,D.__)("Content","cartflows"),slug:"content",icon:(0,i.createElement)(XM,{className:"w-18 h-18 stroke-2"})},{name:(0,D.__)("Styles","cartflows"),slug:"styles",icon:(0,i.createElement)(JM,{className:"w-18 h-18 stroke-2"})},{name:(0,D.__)("Conditions","cartflows"),slug:"conditions",icon:(0,i.createElement)(eI,{className:"w-18 h-18 stroke-2"})}];if((0,s.useEffect)(()=>((async()=>{!function(){const e=new window.FormData;e.append("action","cartflows_pro_get_current_order_bump"),e.append("security",cartflows_admin.get_current_order_bump_nonce),e.append("ob_id",d),e.append("step_id",t),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.data.success&&o({type:"SET_CURRENT_OB",current_ob:e.data.current_ob,ob_id:d})})}(),null!==n&&"undefined"!==n||Xf()({path:`/cartflows/v1/admin/step-data/${t}`}).then(e=>{if(e.billing_fields){const t=Object.entries(e.billing_fields.fields).map(([e,t])=>({...t,key:e}));e.billing_fields=t}if(e.shipping_fields){const t=Object.entries(e.shipping_fields.fields).map(([e,t])=>({...t,key:e}));e.shipping_fields=t}o({type:"SET_STEP_DATA",data:e})})})(),()=>{}),[]),null===r||"undefined"===r||r&&d!==r.id){let e="";switch(u){case"design":case"content":e=(0,i.createElement)(Ng,null);break;case"product":default:e=(0,i.createElement)(xg,null);break;case"settings":e=(0,i.createElement)(_g,null);break;case"conditions":e=(0,i.createElement)(Sg,null)}return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Pm,{containerType:"flex",direction:"column",className:"wcf-page-wrapper wcf-order-bump-page-wrapper"},e))}return(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"md",className:"wcf-order-bump-page-wrapper p-6 bg-background-secondary rounded-b-lg"},(0,i.createElement)("div",{className:"wcf-order-bump-content-tab__preview"},(0,i.createElement)(WM,null)),(0,i.createElement)(YM.Group,{variant:"pill",size:"sm",width:"full",activeItem:a,onChange:({value:e})=>async function(e){e!==a?(await async function(){return!!window.wcfUnsavedChanges&&await f({title:(0,D.__)("Save Changes","cartflows"),description:(0,D.__)("You have made changes. Do you want to save the changes?","cartflows"),actionBtnText:(0,D.__)("Save","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows"),onConfirm:p})}()||l(e),window.wcfUnsavedChanges=!1):l(e)}(e.slug),className:"wcf-order-bump--tabs-wrapper mt-8 mb-4"},h.map(e=>(0,i.createElement)(YM.Tab,{key:e.slug,slug:e.slug,text:e.name,icon:e.icon}))),function(){let e=(0,i.createElement)("h1",null,"404 Not Found");switch(a){case"styles":e=(0,i.createElement)(IM,null);break;case"product":default:e=(0,i.createElement)(DM,null);break;case"content":e=(0,i.createElement)(CM,null);break;case"conditions":e=(0,i.createElement)(TM,null)}return(0,i.createElement)(i.Fragment,null,e)}())};function rI({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"}))}const oI=s.forwardRef(rI),aI=({role:e="plain",onStartAb:t,onDeclareWinner:n,onArchive:r})=>{const o="plain"===e,a="control"===e||"variant"===e,s="variant"===e;return o||a||s?(0,i.createElement)(yp,{placement:"bottom-end",className:"wcf-ob-ab-action-menu"},(0,i.createElement)(yp.Trigger,null,(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"text-text-secondary hover:text-text-primary","aria-label":(0,D.__)("More Options","cartflows")},(0,i.createElement)(lh,{className:"h-5 w-5","aria-hidden":"true"}))),(0,i.createElement)(yp.ContentWrapper,{className:"z-20"},(0,i.createElement)(yp.Content,{size:"sm",className:"wcf-ob-ab-action-menu__dropdown"},(0,i.createElement)(yp.List,null,o&&(0,i.createElement)(yp.Item,{onClick:t,className:"wcf-ob-ab-action-menu__start hover:!bg-brand-25 hover:!text-brand-600"},(0,i.createElement)(oI,{className:"w-4 h-4"}),(0,D.__)("Start A/B Test","cartflows")),a&&(0,i.createElement)(yp.Item,{onClick:n,className:"wcf-ob-ab-action-menu__winner hover:!bg-brand-25 hover:!text-brand-600"},(0,i.createElement)(nh,{className:"w-4 h-4"}),(0,D.__)("Declare as Winner","cartflows")),s&&(0,i.createElement)(yp.Item,{onClick:r,className:"wcf-ob-ab-action-menu__archive hover:!bg-brand-25 hover:!text-brand-600"},(0,i.createElement)(eh,{className:"w-4 h-4"}),(0,D.__)("Archive Variation","cartflows")))))):null},iI=Ao("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"}]]),sI=({impressions:e=0,initiated:t=0,conversions:n=0,isWinner:r=!1})=>{const o=((e,t)=>!e||e<=0?"—":`${(t/e*100).toFixed(1)}%`)(e,n);let a="green";!r&&e>0&&(e>0?n/e*100:0)<5&&(a="yellow");const s=r?"ring-1 ring-support-success":"",l=r?(0,D.sprintf)(/* translators: %s: conversion rate percentage */ /* translators: %s: conversion rate percentage */ |
| 17 |
(0,D.__)("Conversion Rate %s · winner","cartflows"),o):(0,D.sprintf)(/* translators: %s: conversion rate percentage */ /* translators: %s: conversion rate percentage */ |
| 18 |
(0,D.__)("Conversion Rate %s","cartflows"),o);return(0,i.createElement)(Pm,{containerType:"flex",align:"center",className:"wcf-ob-funnel-ribbon flex items-center gap-5 py-2 pl-7 pr-4 border-0 border-t border-solid border-border-subtle bg-background-secondary"},(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"xs"},(0,i.createElement)(Zo,{content:(0,D.__)("Visitors who saw this bump.","cartflows"),placement:"top",arrow:!0},(0,i.createElement)(iI,{className:"w-3.5 h-3.5 text-text-tertiary cursor-pointer"})),(0,i.createElement)(Ym,{size:12,weight:600,className:"tracking-wider text-text-tertiary"},(0,D.__)("Impressions","cartflows")),(0,i.createElement)(Ym,{size:14,weight:600,className:"text-text-primary"},e)),(0,i.createElement)(Ym,{size:14,className:"text-text-tertiary"},"›"),(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"xs"},(0,i.createElement)(Zo,{content:(0,D.__)("Visitors who added this bump to their cart.","cartflows"),placement:"top",arrow:!0},(0,i.createElement)(iI,{className:"w-3.5 h-3.5 text-text-tertiary cursor-pointer"})),(0,i.createElement)(Ym,{size:12,weight:600,className:"tracking-wider text-text-tertiary"},(0,D.__)("Initiated","cartflows")),(0,i.createElement)(Ym,{size:14,weight:600,className:"text-text-primary"},t)),(0,i.createElement)(Ym,{size:14,className:"text-text-tertiary"},"›"),(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"xs"},(0,i.createElement)(Zo,{content:(0,D.__)("Orders placed that include this bump.","cartflows"),placement:"top",arrow:!0},(0,i.createElement)(iI,{className:"w-3.5 h-3.5 text-text-tertiary cursor-pointer"})),(0,i.createElement)(Ym,{size:12,weight:600,className:"tracking-wider text-text-tertiary"},(0,D.__)("Conversions","cartflows")),(0,i.createElement)(Ym,{size:14,weight:600,className:"text-text-primary"},n)),(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"xs",className:"ml-auto"},(0,i.createElement)(Zo,{content:(0,D.__)("Percentage of impressions that became orders.","cartflows"),placement:"top",arrow:!0},(0,i.createElement)(iI,{className:"w-3.5 h-3.5 text-text-tertiary cursor-pointer"})),(0,i.createElement)(Tf,{label:l,variant:a,type:"pill",size:"xs",className:s,disableHover:!0})))},lI={impressions:0,initiated:0,conversions:0},cI=()=>{const[e]=Zp(),t=e?.options?.ob_ab_stats;return t&&"object"==typeof t?t:{}},dI=(e,t={})=>{if(!e||!e.id)return{...lI};const n=e["wcf-control-ob"]?e["wcf-control-ob"]:e.id,r=t[n]?.[e.id];return r&&"object"==typeof r?{impressions:parseInt(r.impressions||0,10),initiated:parseInt(r.initiated||0,10),conversions:parseInt(r.conversions||0,10)}:{...lI}},uI=e=>e&&e.impressions?e.conversions/e.impressions*100:null;(0,s.createContext)();const fI=(e,t,n={})=>{const r=new window.FormData;return r.append("action",e),r.append("security",cartflows_admin[t]),Object.entries(n).forEach(([e,t])=>{r.append(e,t)}),r},pI=e=>Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}),mI=()=>({createVariation:(0,s.useCallback)(({stepId:e,ob_id:t})=>pI(fI("cartflows_pro_create_order_bump_variation","create_order_bump_variation_nonce",{step_id:e,ob_id:t})),[]),cloneVariation:(0,s.useCallback)(({stepId:e,control_ob_id:t,source_ob_id:n})=>pI(fI("cartflows_pro_clone_order_bump_variation","clone_order_bump_variation_nonce",{step_id:e,control_ob_id:t,source_ob_id:n})),[]),startAbTest:(0,s.useCallback)(({stepId:e,control_ob_id:t})=>pI(fI("cartflows_pro_start_order_bump_ab_test","start_order_bump_ab_test_nonce",{step_id:e,control_ob_id:t})),[]),pauseAbTest:(0,s.useCallback)(({stepId:e,control_ob_id:t})=>pI(fI("cartflows_pro_pause_order_bump_ab_test","pause_order_bump_ab_test_nonce",{step_id:e,control_ob_id:t})),[]),saveTraffic:(0,s.useCallback)(({stepId:e,control_ob_id:t,variations:n})=>pI(fI("cartflows_pro_save_order_bump_ab_traffic","save_order_bump_ab_traffic_nonce",{step_id:e,control_ob_id:t,variations:JSON.stringify(n)})),[]),archiveVariation:(0,s.useCallback)(({stepId:e,control_ob_id:t,ob_id:n})=>pI(fI("cartflows_pro_archive_order_bump_variation","archive_order_bump_variation_nonce",{step_id:e,control_ob_id:t,ob_id:n})),[]),deleteVariation:(0,s.useCallback)(({stepId:e,control_ob_id:t,ob_id:n})=>pI(fI("cartflows_pro_delete_order_bump_variation","delete_order_bump_variation_nonce",{step_id:e,control_ob_id:t,ob_id:n})),[]),declareWinner:(0,s.useCallback)(({stepId:e,control_ob_id:t,winner_ob_id:n})=>pI(fI("cartflows_pro_declare_order_bump_ab_winner","declare_order_bump_ab_winner_nonce",{step_id:e,control_ob_id:t,winner_ob_id:n})),[]),restoreArchived:(0,s.useCallback)(({stepId:e,control_ob_id:t,ob_id:n})=>pI(fI("cartflows_pro_restore_archive_order_bump_variation","restore_archive_order_bump_variation_nonce",{step_id:e,control_ob_id:t,ob_id:n})),[]),deleteArchived:(0,s.useCallback)(({stepId:e,control_ob_id:t,ob_id:n})=>pI(fI("cartflows_pro_delete_archive_order_bump_variation","delete_archive_order_bump_variation_nonce",{step_id:e,control_ob_id:t,ob_id:n})),[]),toggleBumpStatus:(0,s.useCallback)(({stepId:e,flowId:t,ob_id:n,currentStatus:r})=>pI(fI("cartflows_pro_update_order_bump_status","update_order_bump_status_nonce",{step_id:e,post_id:t,ob_id:n,ob_status:!r})),[]),cloneBump:(0,s.useCallback)(({stepId:e,ob_id:t})=>pI(fI("cartflows_pro_clone_order_bump","clone_order_bump_nonce",{step_id:e,ob_id:t})),[]),deleteBump:(0,s.useCallback)(({stepId:e,flowId:t,ob_id:n})=>pI(fI("cartflows_pro_delete_order_bump","delete_order_bump_nonce",{step_id:e,post_id:t,ob_id:n})),[])}),hI=e=>{const t=parseInt(e,10);return Number.isNaN(t)?0:Math.max(0,Math.min(100,t))},gI=e=>{const t={};return(e||[]).forEach(e=>{t[e.id]=hI(e.traffic)}),t},wI=function(e){const{flow_id:t,step_id:n,data:r,callback:o,dispatch:a,onEditClick:l,openObSettingsId:c="",toggleObSettings:d}=e,[{},u]=Zp(),f=a||u,p=cI(),m=dI(r,p),[h,g]=(0,s.useState)(r.status),[w,y]=(0,s.useState)(!1),[b,v]=(0,s.useState)(""),[x,N]=(0,s.useState)(!1),[_,E]=(0,s.useState)(!1),M=(0,s.createRef)(),I=c===r.id,S=zh(),k=mI();(0,s.useEffect)(()=>{g(h)},[h,I]);let C=r.title;const j=function(e){e.preventDefault(),N(!0)},A=function(e){e.preventDefault(),N(!1)};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-order-bump border-0 border-t border-border-subtle border-solid first:border-t-0",onDragEnd:o},(0,i.createElement)(Pm,{containerType:"flex",align:"center",className:"wcf-order-bump__content-wrapper relative p-6 text-sm gap-2"},(0,i.createElement)("div",{className:"wcf-order-bump__data wcf-column--product w-[70%]"},(0,i.createElement)("div",{className:"wcf-order-bump__data-title flex items-center gap-2 min-h-8"},(0,i.createElement)("span",{className:"text-sm font-medium text-text-primary flex gap-2 justify-center items-center min-h-8"},function(){""===C&&(C=(0,D.__)("(no title)","cartflows"));let e=um(C,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length),t=(0,i.createElement)(Zo,{content:(0,D.__)("Edit Order Bump Name","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(Wh,{className:"w-4 h-4 stroke-1"}),onClick:j,className:"wcf-ob-header__title--edit"}));return x&&(e=(0,i.createElement)(tg,{size:"sm",ref:M,defaultValue:C,className:"new-step-title focus:!ring-0 focus:!ring-offset-0 !h-8 [&>input]:!h-8 [&>input]:!min-h-8 [&>input]:!py-1"}),t=(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Po,{variant:"primary",size:"xs",loading:_,onClick:()=>function(e){E(!0);const t=M.current.value,r=new window.FormData;r.append("action","cartflows_pro_update_order_bump_title"),r.append("security",cartflows_admin.update_order_bump_title_nonce),r.append("step_id",n),r.append("new_title",t),r.append("ob_id",e),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{f({type:"SET_OB_TITLE",title:t,name:"wcf-order-bumps",ob_id:e}),E(!1),N(!1),gm.success((0,D.__)("Order bump title updated!","cartflows"))})}(r.id)},(0,D.__)("Save","cartflows")),(0,i.createElement)(Po,{variant:"secondary",size:"xs",onClick:A},(0,D.__)("Cancel","cartflows")))),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"wcf-ob-header__title--text"},e),(0,i.createElement)("span",{className:"wcf-ob-header__title--buttons flex gap-2"},t))}()),""===r.product&&(0,i.createElement)(Tf,{label:(0,D.__)("No product","cartflows"),variant:"warning",icon:(0,i.createElement)(Rh,{className:"w-4 h-4"}),size:"xs"}))),(0,i.createElement)(Pm,{containerType:"flex",gap:"xs",className:"wcf_order_bump__status w-[12%]"},(0,i.createElement)(Pg,{value:h,size:"md",onChange:()=>function(e){y(!0);const r=new window.FormData;r.append("action","cartflows_pro_update_order_bump_status"),r.append("security",cartflows_admin.update_order_bump_status_nonce),r.append("ob_id",e),r.append("post_id",t),r.append("step_id",n),r.append("ob_status",!h),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{f({type:"SET_OB_STATUS",name:"wcf-order-bumps",newStatus:!h,ob_id:e}),g(!h),y(!1),gm.success(h?(0,D.__)("Order bump disabled!","cartflows"):(0,D.__)("Order bump enabled!","cartflows"))})}(r.id),disabled:w}),w&&(0,i.createElement)(Kg,{size:"sm",variant:"primary"})),(0,i.createElement)(Pm,{containerType:"flex",justify:"end",align:"center",gap:"sm",className:"wcf-order-bump__action wcf-column--actions shrink-0 ml-auto"},(0,i.createElement)(Zo,{content:(0,D.__)("Duplicate Order Bump","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:"clone"===b?(0,i.createElement)(Kg,{size:"sm"}):(0,i.createElement)(Hm,{className:"w-4 h-4 stroke-1"}),onClick:()=>(e=>{const t=new window.FormData;v("clone"),t.append("action","cartflows_pro_clone_order_bump"),t.append("security",cartflows_admin.clone_order_bump_nonce),t.append("ob_id",e),t.append("step_id",n),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(e=>{e.success&&(f({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:e.data.order_bumps}),v(""),gm.success((0,D.__)("Order bump cloned!","cartflows")))})})(r.id),className:"wcf-clone-bump-button"})),(0,i.createElement)(Zo,{content:(0,D.__)("Edit Order Bump","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(eI,{className:"w-4 h-4 stroke-1"}),onClick:()=>{return e=r.id,void("function"!=typeof l?d?.(e):l(e));var e},className:"wcf-setting-bump-button "+(I?"!bg-brand-50 !text-brand-500":"")})),(0,i.createElement)(Zo,{content:(0,D.__)("Delete Order Bump","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:"delete"===b?(0,i.createElement)(Kg,{size:"sm"}):(0,i.createElement)(Xm,{className:"w-4 h-4 stroke-1"}),onClick:()=>async function(e){if(!await S({title:(0,D.__)("Delete Order Bump","cartflows"),description:(0,D.__)("Do you really want to delete this order bump permanently?","cartflows"),actionBtnText:(0,D.__)("Delete","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")}))return;v("delete");const r=new window.FormData;r.append("action","cartflows_pro_delete_order_bump"),r.append("security",cartflows_admin.delete_order_bump_nonce),r.append("ob_id",e),r.append("post_id",t),r.append("step_id",n),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(t=>{t.success&&(f({type:"REMOVE_ORDER_BUMP",name:"wcf-order-bumps",ob_id:e}),v(""),gm.success((0,D.__)("Order bump deleted!","cartflows")))})}(r.id),className:"wcf-remove-order-bump-button"})),(0,i.createElement)(aI,{role:"plain",onStartAb:async()=>{const e=await k.createVariation({stepId:n,ob_id:r.id});e?.success&&(f({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:e.data.order_bumps}),gm.success((0,D.__)("A/B test variation created!","cartflows")))}}))),(0,i.createElement)(sI,{impressions:m.impressions,initiated:m.initiated,conversions:m.conversions})),I&&(0,i.createElement)(nI,{ob_id:r.id}))},yI=Ao("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),bI=({abTestStart:e,onToggle:t,onOpenSettings:n})=>{const[r,o]=(0,s.useState)(!1),a=e?(0,D.__)("Stopping…","cartflows"):(0,D.__)("Starting…","cartflows"),l=e?(0,D.__)("Stop Split Test","cartflows"):(0,D.__)("Start Split Test","cartflows"),c=r?a:l;return(0,i.createElement)("div",{className:"wcf-ob-ab-head w-full block bg-background-secondary border-0 border-b border-solid border-border-subtle"},(0,i.createElement)(Pm,{containerType:"flex",align:"center",justify:"between",className:"px-6 py-3"},(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"xs"},(0,i.createElement)("span",{className:"text-sm font-medium text-text-primary"},(0,D.__)("Split Test","cartflows")),(0,i.createElement)(Tf,{label:e?(0,D.__)("RUNNING","cartflows"):(0,D.__)("PAUSED","cartflows"),variant:e?"green":"neutral",type:"pill",size:"xs"})),(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"sm"},(0,i.createElement)(Po,{variant:"link",size:"sm",loading:r,onClick:async()=>{if(!r){o(!0);try{await(t?.())}finally{o(!1)}}},disabled:r,className:e?"wcf-ob-ab-head__stop !text-brand-500 hover:!text-brand-600":"wcf-ob-ab-head__start !text-support-success hover:!text-support-success-hover"},c),(0,i.createElement)(Zo,{content:(0,D.__)("Split Test Settings","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(eI,{className:"w-4 h-4 stroke-1"}),onClick:n,className:"wcf-ob-ab-head__settings","aria-label":(0,D.__)("Split Test Settings","cartflows")})))))},vI=()=>(0,i.createElement)(Tf,{label:(0,D.__)("Control","cartflows"),variant:"blue",type:"pill",size:"xs"}),xI=({number:e})=>(0,i.createElement)(Tf,{label:(0,D.sprintf)((0,D.__)("Variation-%d","cartflows"),e),variant:"inverse",type:"pill",size:"xs"}),NI=()=>(0,i.createElement)(Tf,{label:(0,D.__)("Winner","cartflows"),variant:"green",type:"pill",size:"xs",icon:(0,i.createElement)(nh,{className:"w-3 h-3"})}),_I=({bump:e,role:t="plain",variantNumber:n=1,traffic:r,stepId:o,dispatch:a,onDuplicateClick:l,onSettingsClick:c,isSettingsOpen:d=!1,onDeleteClick:u,onMenuStartAb:f,onMenuDeclareWinner:p,onMenuArchive:m,onStatusToggle:h,statusProcess:g,actionProcess:w,readOnly:y=!1,isWinner:b=!1})=>{const v=cI(),x=dI(e,v),[N,_]=(0,s.useState)(!1),[E,M]=(0,s.useState)(!1),I=(0,s.createRef)(),S="control"===t?(0,i.createElement)(vI,null):"variant"===t?(0,i.createElement)(xI,{number:n}):"winner"===t?(0,i.createElement)(NI,null):null,k=""===e.title?(0,D.__)("(no title)","cartflows"):e.title,C=um(k,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length);return(0,i.createElement)("div",{className:`wcf-order-bump wcf-order-bump--ab wcf-order-bump--${t} border-b border-border-subtle border-solid border-0 last:border-0`},(0,i.createElement)(Pm,{containerType:"flex",align:"center",className:"wcf-order-bump__content-wrapper relative p-6 text-sm gap-2"},(0,i.createElement)("div",{className:"wcf-order-bump__data wcf-column--product w-[70%]"},(0,i.createElement)("div",{className:"wcf-order-bump__data-title flex items-center gap-2 min-h-8"},(0,i.createElement)("span",{className:"text-sm font-medium text-text-primary flex gap-2 justify-center items-center min-h-8"},!N&&(0,i.createElement)("span",{className:"wcf-ob-header__title--text"},C),N&&(0,i.createElement)(tg,{size:"sm",ref:I,defaultValue:k,className:"new-step-title focus:!ring-0 focus:!ring-offset-0 !h-8 [&>input]:!h-8 [&>input]:!min-h-8 [&>input]:!py-1"}),!N&&S,!N&&""===e.product&&(0,i.createElement)(Tf,{label:(0,D.__)("No product","cartflows"),variant:"warning",icon:(0,i.createElement)(Rh,{className:"w-4 h-4"}),size:"xs"}),(0,i.createElement)("span",{className:"wcf-ob-header__title--buttons flex gap-2"},!N&&!y&&(0,i.createElement)(Zo,{content:(0,D.__)("Edit Order Bump Name","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(Wh,{className:"w-4 h-4 stroke-1"}),onClick:e=>{e.preventDefault(),_(!0)},className:"wcf-ob-header__title--edit"})),N&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Po,{variant:"primary",size:"xs",loading:E,onClick:()=>{if(E)return;const t=I.current?.value||"",n=new window.FormData;n.append("action","cartflows_pro_update_order_bump_title"),n.append("security",cartflows_admin.update_order_bump_title_nonce),n.append("step_id",o),n.append("new_title",t),n.append("ob_id",e.id),M(!0),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{a?.({type:"SET_OB_TITLE",name:"wcf-order-bumps",title:t,ob_id:e.id}),M(!1),_(!1),gm.success((0,D.__)("Order bump title updated!","cartflows"))})}},(0,D.__)("Save","cartflows")),(0,i.createElement)(Po,{variant:"secondary",size:"xs",onClick:e=>{e.preventDefault(),_(!1)}},(0,D.__)("Cancel","cartflows")))),!N&&void 0!==r&&(0,i.createElement)("span",{className:"text-xs text-text-tertiary ml-2"},(0,D.__)("Traffic:","cartflows")," ",(0,i.createElement)("b",{className:"text-text-primary"},r,"%"))))),(0,i.createElement)(Pm,{containerType:"flex",gap:"xs",className:"wcf_order_bump__status w-[13%]"},(0,i.createElement)(Pg,{value:!!e.status,size:"md",onChange:()=>h?.(e.id),disabled:!!g||y}),g&&(0,i.createElement)(Kg,{size:"sm",variant:"primary"})),(0,i.createElement)(Pm,{containerType:"flex",justify:"end",align:"center",gap:"sm",className:"wcf-order-bump__action wcf-column--actions shrink-0 ml-auto"},!y&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Zo,{content:(0,D.__)("Duplicate Order Bump","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:"clone"===w?(0,i.createElement)(Kg,{size:"sm"}):(0,i.createElement)(Hm,{className:"w-4 h-4 stroke-1"}),onClick:()=>l?.(e.id),className:"wcf-clone-bump-button"})),(0,i.createElement)(Zo,{content:(0,D.__)("Edit Order Bump","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(eI,{className:"w-4 h-4 stroke-1"}),onClick:()=>c?.(e.id),className:"wcf-setting-bump-button "+(d?"!bg-brand-50 !text-brand-500":"")})),(0,i.createElement)(Zo,{content:(0,D.__)("Delete Variation","cartflows"),placement:"bottom"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:"delete"===w?(0,i.createElement)(Kg,{size:"sm"}):(0,i.createElement)(Xm,{className:"w-4 h-4 stroke-1"}),onClick:()=>u?.(e.id),className:"wcf-remove-order-bump-button"})),(0,i.createElement)(aI,{role:t,onStartAb:f,onDeclareWinner:p,onArchive:m})))),(0,i.createElement)(sI,{impressions:x.impressions,initiated:x.initiated,conversions:x.conversions,isWinner:b}))},EI=e=>"number"==typeof e&&e>=0?String(e):"—",MI=({item:e,onRestore:t,onDelete:n})=>{const{id:r,title:o,note:a,deleted:s,date:l,stats:c}=e||{},d=c&&"object"==typeof c?(0,D.sprintf)(/* translators: 1: impressions, 2: initiated, 3: conversions, 4: conversion rate */ /* translators: 1: impressions, 2: initiated, 3: conversions, 4: conversion rate */ |
| 19 |
(0,D.__)("Impressions %1$s · Initiated %2$s · Conversions %3$s · Conversion Rate %4$s","cartflows"),EI(c.impressions),EI(c.initiated),EI(c.conversions),(e=>e&&e.impressions?`${(e.conversions/e.impressions*100).toFixed(1)}%`:"—")(c)):"";return(0,i.createElement)(Pm,{containerType:"flex",align:"center",justify:"between",gap:"sm",className:"wcf-ob-ab-archived-item py-2"},(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"xs",className:"min-w-0 flex-1"},(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"xs"},(0,i.createElement)(Ym,{as:"span",size:"sm",weight:500,className:"text-text-primary truncate"},o||(0,D.__)("(no title)","cartflows")),s&&(0,i.createElement)(Tf,{label:(0,D.__)("Deleted","cartflows"),variant:"red",type:"pill",size:"xxs"})),(a||l)&&(0,i.createElement)(Ym,{as:"span",size:"xs",className:"text-text-tertiary"},a?`${a} · `:"",l||""),d&&(0,i.createElement)(Ym,{as:"span",size:"xs",className:"text-text-secondary wcf-ob-ab-archived-item__stats"},d)),(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"xs"},!s&&(0,i.createElement)(Po,{variant:"outline",size:"xs",onClick:()=>t?.(r),className:"wcf-ob-ab-archived-item__restore"},(0,D.__)("Restore","cartflows")),(0,i.createElement)(Po,{variant:"outline",size:"xs",onClick:()=>n?.(r),className:"wcf-ob-ab-archived-item__delete"},(0,D.__)("Delete","cartflows"))))},II=({items:e=[],onRestore:t,onDelete:n,trailing:r=null})=>{const[o,a]=(0,s.useState)(!1),l=Array.isArray(e)?e.length:0,c=l>0;return c||r?(0,i.createElement)("div",{className:"wcf-ob-ab-archived border-0 border-t border-solid border-border-subtle"},(0,i.createElement)("div",{className:"flex items-center justify-between px-6 py-3"},c?(0,i.createElement)("button",{type:"button",onClick:()=>a(e=>!e),"aria-expanded":o,className:"wcf-ob-ab-archived__trigger inline-flex items-center gap-1.5 text-xs font-medium text-text-secondary hover:text-text-primary bg-transparent border-0 p-0 cursor-pointer"},(0,i.createElement)("span",null,(0,D.sprintf)(/* translators: %d is the number of archived variations. */ /* translators: %d is the number of archived variations. */ |
| 20 |
(0,D.__)("Archived Variations (%d)","cartflows"),l)),(0,i.createElement)(lp,{className:"w-4 h-4 transition-transform "+(o?"rotate-180":"")})):(0,i.createElement)("span",{className:"wcf-ob-ab-archived__placeholder"}),r),c&&o&&(0,i.createElement)("div",{className:"wcf-ob-ab-archived__content px-6 pb-3"},(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"xs"},e.map(e=>(0,i.createElement)(MI,{key:e.id,item:e,onRestore:t,onDelete:n}))))):null},SI=({open:e,setOpen:t,variations:n=[],titlesById:r={},onSave:o})=>{const[a,l]=(0,s.useState)(!1),{values:c,handleChange:d,total:u,reset:f}=(e=>{const[t,n]=(0,s.useState)(()=>gI(e)),r=(0,s.useCallback)(e=>{n(gI(e))},[]),o=(0,s.useCallback)((e,t)=>{const r=hI(t);n(t=>{const n=Object.keys(t).filter(t=>t!==e);if(0===n.length)return{...t,[e]:r};const o=100-r,a=n.reduce((e,n)=>{var r;return e+(null!==(r=t[n])&&void 0!==r?r:0)},0),i=n.map(e=>{var r;return a>0?Math.floor((null!==(r=t[e])&&void 0!==r?r:0)*o/a):Math.floor(o/n.length)}),s=o-i.reduce((e,t)=>e+t,0),l={...t,[e]:r};return n.forEach((e,t)=>{l[e]=i[t]+(t<s?1:0)}),l})},[]),a=(0,s.useMemo)(()=>Object.values(t).reduce((e,t)=>e+(t||0),0),[t]);return{values:t,handleChange:o,reset:r,total:a}})(n);(0,s.useEffect)(()=>{e&&f(n)},[e,n,f]);const p=(0,s.useMemo)(()=>n.map((e,t)=>{var n,o;return{id:e.id,traffic:null!==(n=null!==(o=c[e.id])&&void 0!==o?o:e.traffic)&&void 0!==n?n:0,title:r[e.id]||(0,D.__)("(no title)","cartflows"),role:0===t?"control":"variant",variantNumber:t}}),[n,c,r]);return(0,i.createElement)(vh,{open:e,setOpen:t,exitOnClickOutside:!0,exitOnEsc:!0},(0,i.createElement)(vh.Panel,{className:"!p-3 !gap-4"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)("div",{className:"flex flex-col gap-3 p-2 min-w-0"},(0,i.createElement)("div",{className:"flex items-center justify-between"},(0,i.createElement)(vh.Title,{className:"!text-lg"},(0,D.__)("Split Test Settings","cartflows")),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(Ym,{as:"span",size:"xs",className:"text-text-tertiary uppercase tracking-wide"},(0,D.__)("Traffic Distribution","cartflows")),(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"xs",className:"wcf-ob-ab-traffic-list"},p.map(e=>(0,i.createElement)(Pm,{key:e.id,containerType:"flex",align:"center",justify:"between",gap:"sm",className:"wcf-ob-ab-traffic-row py-2"},(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"xs",className:"min-w-0"},(0,i.createElement)(Ym,{as:"span",size:"sm",weight:500,className:"text-text-primary truncate"},e.title),"control"===e.role&&(0,i.createElement)(vI,null),"variant"===e.role&&(0,i.createElement)(xI,{number:e.variantNumber})),(0,i.createElement)(tg,{type:"number",size:"sm",min:0,max:100,value:String(e.traffic),suffix:"%",onChange:t=>d(e.id,t),className:"wcf-ob-ab-traffic-input w-[120px]"})))),(0,i.createElement)(Ym,{as:"span",size:"xs",className:"text-text-tertiary"},(0,D.sprintf)( |
| 21 |
// translators: %d is the current total of all traffic % fields. |
| 22 |
// translators: %d is the current total of all traffic % fields. |
| 23 |
(0,D.__)("Current total: %1$d%% (must equal 100%%)","cartflows"),u))),(0,i.createElement)(vh.Footer,{className:"!p-2 flex gap-3 justify-end"},(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:()=>{t(!1)},disabled:a},(0,D.__)("Cancel","cartflows")),(0,i.createElement)(Po,{variant:"primary",size:"md",onClick:async()=>{if(a)return;if(100!==u)return void gm.error((0,D.__)("Traffic must sum to 100%.","cartflows"));l(!0);const e=n.map(e=>{var t,n;return{id:e.id,traffic:null!==(t=null!==(n=c[e.id])&&void 0!==n?n:e.traffic)&&void 0!==t?t:0}});try{!1!==await(o?.(e))&&t(!1)}finally{l(!1)}},loading:a,disabled:a||100!==u},a?(0,D.__)("Saving…","cartflows"):(0,D.__)("Save Settings","cartflows")))))},kI=e=>null===e?"—":`${e.toFixed(1)}%`,DI=({bump:e,role:t,isWinner:n,isPendingWinner:r,statsBlob:o})=>{const a=dI(e,o),s=uI(a),l=r?"wcf-ob-cmp-card p-4 rounded-md border border-solid border-support-success bg-support-success-bg":"wcf-ob-cmp-card p-4 rounded-md border border-solid border-border-subtle bg-background-secondary";let c="",d="neutral";return r?(c=(0,D.__)("★ Winner","cartflows"),d="green"):"control"===t?(c=(0,D.__)("Control","cartflows"),d="blue"):(c=t,d="inverse"),(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"sm",className:l},(0,i.createElement)(Pm,{containerType:"flex",align:"center",justify:"between",gap:"xs"},(0,i.createElement)(Ym,{as:"span",size:14,weight:600,className:"text-text-primary truncate"},e?.title||(0,D.__)("(no title)","cartflows")),(0,i.createElement)(Tf,{label:c,variant:d,type:"pill",size:"xs",disableHover:!0})),(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"xxs"},(0,i.createElement)(CI,{labelText:(0,D.__)("Impressions","cartflows"),value:a.impressions}),(0,i.createElement)(CI,{labelText:(0,D.__)("Initiated","cartflows"),value:a.initiated}),(0,i.createElement)(CI,{labelText:(0,D.__)("Conversions","cartflows"),value:a.conversions}),(0,i.createElement)(CI,{labelText:(0,D.__)("Conversion Rate","cartflows"),value:kI(s),emphasis:r?"success":"default"})),n&&!r&&(0,i.createElement)(Ym,{size:12,className:"text-support-success"},(0,D.__)("Currently leading","cartflows")))},CI=({labelText:e,value:t,emphasis:n="default"})=>{const r="success"===n?"text-support-success":"text-text-primary";return(0,i.createElement)(Pm,{containerType:"flex",align:"center",justify:"between",gap:"xs"},(0,i.createElement)(Ym,{as:"span",size:12,className:"text-text-tertiary"},e),(0,i.createElement)(Ym,{as:"span",size:12,weight:600,className:r},t))},jI=({open:e,setOpen:t,winningTitle:n="",onConfirm:r,controlId:o,variations:a=[],bumpsById:l={},pendingWinnerId:c=null,statsBlob:d={}})=>{const[u,f]=(0,s.useState)(!1),p=l?.[o],m=p?uI(dI(p,d)):null;let h=null;if(c&&c!==o){const e=l?.[c];e&&(h=((e,t)=>null===e||null===t||t<=0?null:(e-t)/t*100)(uI(dI(e,d)),m))}let g=0;a.forEach(e=>{const t=l?.[e?.id];t&&(g+=dI(t,d).impressions)});let w=null,y=-1;return a.forEach(e=>{const t=l?.[e?.id];if(!t)return;const n=dI(t,d);if(n.impressions<30)return;const r=uI(n)||0;r>y&&(y=r,w=e.id)}),(0,i.createElement)(vh,{open:e,setOpen:t,exitOnClickOutside:!1},(0,i.createElement)(vh.Panel,{className:"!p-3 !gap-4 !w-[640px] !max-w-[90vw]"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)("div",{className:"flex gap-2.5 p-2"},(0,i.createElement)(nh,{className:"w-6 h-6 text-support-success shrink-0 mt-0.5","aria-hidden":"true"}),(0,i.createElement)("div",{className:"flex flex-col gap-1.5 flex-1 min-w-0"},(0,i.createElement)("div",{className:"flex items-center justify-between"},(0,i.createElement)(vh.Title,{className:"!text-lg"},(0,D.__)("Declare Winner","cartflows")),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(Ym,{as:"span",size:14,className:"text-text-secondary"},(0,D.sprintf)(/* translators: %s is the winning variation's title. */ /* translators: %s is the winning variation's title. */ |
| 24 |
(0,D.__)("Do you want to declare “%s” as the winner? The other variations will be moved to Archived Variations and the test will end.","cartflows"),n)),(0,i.createElement)(Ym,{as:"span",size:12,className:"text-text-tertiary"},(0,D.sprintf)(/* translators: 1: total impressions across the test, 2: system-recommended variant name or "—". */ /* translators: 1: total impressions across the test, 2: system-recommended variant name or "—". */ |
| 25 |
(0,D.__)("Total visitors: %1$s · System recommendation: %2$s","cartflows"),g,w?l?.[w]?.title||w:(0,D.__)("not enough data yet","cartflows"))))),(0,i.createElement)(Pm,{containerType:"grid",gap:"sm",className:"grid-cols-1 sm:grid-cols-2 p-2"},a.map((e,t)=>{const n=l?.[e?.id];if(!n)return null;const r=0===t?"control":(0,D.sprintf)(/* translators: %d is the variant index (1-based) */ /* translators: %d is the variant index (1-based) */ |
| 26 |
(0,D.__)("Variation-%d","cartflows"),t);return(0,i.createElement)(DI,{key:e.id,bump:n,role:r,isWinner:w===e.id,isPendingWinner:c===e.id,statsBlob:d})})),null!==h&&(0,i.createElement)(Ym,{size:12,className:"text-text-tertiary px-2"},(0,D.sprintf)(/* translators: %s is the % lift over control (e.g. "+35.8%"). */ /* translators: %s is the % lift over control (e.g. "+35.8%"). */ |
| 27 |
(0,D.__)("Lift over control: %s","cartflows"),`${h>0?"+":""}${h.toFixed(1)}%`)),(0,i.createElement)(vh.Footer,{className:"!p-2 flex gap-3 justify-end"},(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:()=>t(!1),disabled:u},(0,D.__)("Cancel","cartflows")),(0,i.createElement)(Po,{variant:"primary",size:"md",onClick:async()=>{if(!u){f(!0);try{!1!==await(r?.())&&t(!1)}finally{f(!1)}}},loading:u,disabled:u},u?(0,D.__)("Declaring…","cartflows"):(0,D.sprintf)(/* translators: %s is the winning variation's title. */ /* translators: %s is the winning variation's title. */ |
| 28 |
(0,D.__)("Declare %s as Winner","cartflows"),n)))))},AI=({controlBump:e,allBumps:t=[],stepId:n,flowId:r,dispatch:o,onEditClick:a,openObSettingsId:l="",toggleObSettings:c})=>{const[d,u]=(0,s.useState)(!1),[f,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)(null),[g,w]=(0,s.useState)({}),[y,b]=(0,s.useState)({}),[,v]=Zp(),x=cI(),N=o||v,_=mI(),E=(0,s.useMemo)(()=>({splitStarted:()=>(0,D.__)("Split test started!","cartflows"),splitStopped:()=>(0,D.__)("Split test stopped!","cartflows"),variationAdded:()=>(0,D.__)("A/B test variation created!","cartflows"),variationCloned:()=>(0,D.__)("Variation cloned!","cartflows"),variationArchived:()=>(0,D.__)("Variation archived!","cartflows"),variationDeleted:()=>(0,D.__)("Variation deleted!","cartflows"),winnerDeclared:()=>(0,D.__)("Winner declared successfully!","cartflows"),trafficSaved:()=>(0,D.__)("Split test traffic saved!","cartflows"),archiveRestored:()=>(0,D.__)("Archived variation restored!","cartflows"),archiveDeleted:()=>(0,D.__)("Archived variation deleted permanently!","cartflows"),statusUpdated:e=>e?(0,D.__)("Order bump enabled!","cartflows"):(0,D.__)("Order bump disabled!","cartflows"),bumpCloned:()=>(0,D.__)("Order bump cloned!","cartflows"),bumpDeleted:()=>(0,D.__)("Order bump deleted!","cartflows")}),[]),M=zh(),I=(0,s.useMemo)(()=>Array.isArray(e?.["ab-test-variations"])?e["ab-test-variations"]:[],[e]),S=(0,s.useMemo)(()=>Array.isArray(e?.["ab-test-archived-variations"])?e["ab-test-archived-variations"]:[],[e]),k=(0,s.useMemo)(()=>{const e={};return(t||[]).forEach(t=>{e[t.id]=t}),e},[t]),C=(0,s.useMemo)(()=>{const e={};return I.forEach(t=>{e[t.id]=k[t.id]?.title||""}),e},[I,k]),j=!!e?.["ab-test-start"],A=(e,t,n)=>{("status"===e?w:b)(e=>({...e,[t]:n}))},T=e=>{A("status",e,!0),_.toggleBumpStatus({stepId:n,flowId:r,ob_id:e,currentStatus:!!k[e]?.status}).then(t=>{t?.success&&(N({type:"SET_OB_STATUS",name:"wcf-order-bumps",newStatus:!k[e]?.status,ob_id:e}),gm.success(E.statusUpdated(!k[e]?.status)))}).finally(()=>A("status",e,!1))},L=async t=>{if(!await M({title:(0,D.__)("Delete Variation","cartflows"),description:(0,D.__)("Do you really want to delete this variation permanently?","cartflows"),actionBtnText:(0,D.__)("Delete","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")}))return;A("action",t,"delete");const r=await _.deleteVariation({stepId:n,control_ob_id:e.id,ob_id:t});r?.success&&(N({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:r.data.order_bumps}),gm.success(E.variationDeleted())),A("action",t,!1)},O=t=>{A("action",t,"clone"),_.cloneVariation({stepId:n,control_ob_id:e.id,source_ob_id:t}).then(e=>{e?.success&&(N({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:e.data.order_bumps}),gm.success(E.variationCloned()))}).finally(()=>A("action",t,!1))},z=e=>{"function"!=typeof a?c?.(e):a(e)},P=m&&k[m]?.title||"";return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-ob-ab-group block rounded-lg overflow-hidden border border-solid border-border-subtle border-l-4 !border-l-brand-500 bg-background-primary shadow-sm m-4"},(0,i.createElement)(bI,{abTestStart:j,onToggle:async()=>{const t=j?await _.pauseAbTest({stepId:n,control_ob_id:e.id}):await _.startAbTest({stepId:n,control_ob_id:e.id});t?.success&&(N({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:t.data.order_bumps}),gm.success(j?E.splitStopped():E.splitStarted()))},onOpenSettings:()=>{u(!0)}}),(()=>{const t=((e,t,n={},r=30)=>{if(!Array.isArray(t)||!t.length)return null;let o=null,a=-1;for(const i of t){if(!i||!i.id)continue;const t=n[e]?.[i.id];if(!t)continue;const s=parseInt(t.impressions||0,10),l=parseInt(t.conversions||0,10);if(s<r)continue;const c=l/s*100;c>a&&(a=c,o=i.id)}return o})(e?.id,I,x);return I.map((r,o)=>{const a=k[r.id];if(!a)return null;const s=0===o;return(0,i.createElement)(_I,{key:r.id,bump:a,role:s?"control":"variant",variantNumber:o,traffic:r.traffic,stepId:n,dispatch:N,statusProcess:!!g[r.id],actionProcess:y[r.id]||"",onStatusToggle:T,onDuplicateClick:O,onSettingsClick:z,isSettingsOpen:l===r.id,onDeleteClick:L,onMenuDeclareWinner:()=>{return e=r.id,h(e),void p(!0);var e},onMenuArchive:()=>(async t=>{if(!await M({title:(0,D.__)("Archive Variation","cartflows"),description:(0,D.__)("Do you want to archive this variation? You can restore it later.","cartflows"),actionBtnText:(0,D.__)("Archive","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")}))return;const r=await _.archiveVariation({stepId:n,control_ob_id:e.id,ob_id:t});r?.success&&(N({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:r.data.order_bumps}),gm.success(E.variationArchived()))})(r.id),isWinner:t===r.id})})})(),(0,i.createElement)(II,{items:S,onRestore:async t=>{const r=await _.restoreArchived({stepId:n,control_ob_id:e.id,ob_id:t});r?.success&&(N({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:r.data.order_bumps}),gm.success(E.archiveRestored()))},onDelete:async t=>{if(!await M({title:(0,D.__)("Delete Archived Variation","cartflows"),description:(0,D.__)("Do you want to delete this archived variation permanently?","cartflows"),actionBtnText:(0,D.__)("Delete","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")}))return;const r=await _.deleteArchived({stepId:n,control_ob_id:e.id,ob_id:t});r?.success&&(N({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:r.data.order_bumps}),gm.success(E.archiveDeleted()))},trailing:(0,i.createElement)("button",{type:"button",onClick:()=>O(e.id),disabled:"clone"===y[e.id],className:"wcf-ob-ab-add-variation inline-flex items-center gap-1 text-xs font-medium text-brand-500 hover:text-brand-600 bg-transparent border-0 px-2 py-1 rounded cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed hover:bg-brand-25"},(0,i.createElement)(yI,{className:"w-4 h-4"}),(0,D.__)("Add Variation","cartflows"))}),(0,i.createElement)(SI,{open:d,setOpen:u,variations:I,titlesById:C,onSave:async t=>{const r=await _.saveTraffic({stepId:n,control_ob_id:e.id,variations:t});return!!r?.success&&(N({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:r.data.order_bumps}),gm.success(E.trafficSaved()),!0)}}),(0,i.createElement)(jI,{open:f,setOpen:p,winningTitle:P,onConfirm:async()=>{if(!m)return!1;const t=await _.declareWinner({stepId:n,control_ob_id:e.id,winner_ob_id:m});return!!t?.success&&(N({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:t.data.order_bumps}),gm.success(E.winnerDeclared()),h(null),!0)},controlId:e?.id,variations:I,bumpsById:k,pendingWinnerId:m,statsBlob:x})),l&&I.some(e=>e.id===l)&&(0,i.createElement)(nI,{key:l,ob_id:l}))},TI=function(){return(0,i.createElement)("div",{className:"wcf-multiple-order-bumps is-placeholder"},(0,i.createElement)("div",{className:"wcf-multiple-order-bumps__add-new"},(0,i.createElement)("span",{className:"wcf-add-new-order-bump wcf-button--primary"})),(0,i.createElement)("div",{className:"wcf-multiple-order-bumps__header"},(0,i.createElement)("div",{className:"wcf-column wcf-column--title"},"Title"),(0,i.createElement)("div",{className:"wcf-column wcf-column--status"},"Status"),(0,i.createElement)("div",{className:"wcf-column wcf-column--actions"},"Actions")),(0,i.createElement)("div",{className:"wcf-multiple-order-bumps__content"},(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-order-bump"},(0,i.createElement)("div",{className:"wcf-order-bump__content-wrapper"},(0,i.createElement)("div",{className:"wcf-order-bump__data wcf-column--product"},(0,i.createElement)("div",{className:"wcf-order-bump__data-title"},(0,i.createElement)("span",{title:"ob"}))),(0,i.createElement)("div",{className:"wcf_order_bump__status"},(0,i.createElement)("span",{className:"wcf-ob-status"})),(0,i.createElement)("div",{className:"wcf-order-bump__action wcf-column--actions"},(0,i.createElement)("span",{title:"Edit Order Bump"}))))),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-order-bump"},(0,i.createElement)("div",{className:"wcf-order-bump__content-wrapper"},(0,i.createElement)("div",{className:"wcf-order-bump__data wcf-column--product"},(0,i.createElement)("div",{className:"wcf-order-bump__data-title"},(0,i.createElement)("span",{title:"ob"}))),(0,i.createElement)("div",{className:"wcf_order_bump__status"},(0,i.createElement)("span",{className:"wcf-ob-status"})),(0,i.createElement)("div",{className:"wcf-order-bump__action wcf-column--actions"},(0,i.createElement)("span",{title:"Edit Order Bump"})))))))},LI=window.wp.compose,OI=window.wp.data,zI=(0,LI.compose)((0,OI.withDispatch)(e=>{const{updateCFProStatus:t}=e("wcf/importer");return{updateCFProStatus(e){t(e)}}}))(({title:e,updateCFProStatus:t})=>{const n=e||(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 29 |
(0,D.__)("Activate %s","cartflows"),cartflows_admin.cf_pro_type_inactive),[r,o]=(0,s.useState)({isProcessing:!1,buttonText:n}),{isProcessing:a,buttonText:l}=r;return(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(Po,{variant:"primary",size:"md",loading:a,disabled:a,onClick:e=>{e.preventDefault(),o({isProcessing:!0,buttonText:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 30 |
(0,D.__)("Activating %s","cartflows"),cartflows_admin.cf_pro_type_inactive)}),qf({slug:"cartflows-pro",init:"cartflows-pro/cartflows-pro.php",name:"cartflows-pro"}).then(e=>{console.log(e),o({isProcessing:!1,buttonText:(0,D.__)("Successfully Activated!","cartflows")}),setTimeout(()=>{t("active")},3e3)}).catch(e=>{console.log(e),o({isProcessing:!1,buttonText:(0,D.__)("Failed! Activation!","cartflows")})})}},l)))}),PI=({buttonLink:e,title:t,buttonStyle:n="primary"})=>{const r=t||(0,D.__)("Upgrade to Cartflows Pro","cartflows"),o=e?.buttonLink||getUpgradeToProUrl();return(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(Po,{tag:"a",href:o,target:"_blank",rel:"noreferrer",variant:n,size:"md",className:"no-underline"},r)))};function RI({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 UI=s.forwardRef(RI),BI=({title:e})=>{const t=e||"Activate Cartflows Pro License";return(0,i.createElement)(Po,{tag:"a",href:cartflows_admin?.license_popup_url,rel:"noreferrer",variant:"primary",size:"md",icon:(0,i.createElement)(UI,null),iconPosition:"right",className:"no-underline"},t)},FI=({buttonLink:e,ctaText:t}={})=>{const[{license_status:n}]=u(),r=t||(0,D.__)("Upgrade to CartFlows Pro","cartflows"),o=new URLSearchParams((0,m.useLocation)().search).get("tab"),a=cartflows_admin.cf_pro_status;return wcfCartflowsTypePro()||"inactive"!==a||"pro"!==wcfInactivepluginType()?wcfCartflowsTypePlusPro()?"Activated"!==n?"analytics"===o?(0,i.createElement)(PI,{buttonLink:e,title:r}):(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(BI,{title:(0,D.__)("Activate the License","cartflows")}))):null:wcfInactiveProPlus()?(0,i.createElement)(zI,null):(0,i.createElement)(PI,{buttonLink:e,title:r}):(0,i.createElement)(zI,null)},QI=({title:e,description:t,buttonLink:n,className:r=""})=>(0,i.createElement)("div",{className:r},(0,i.createElement)(Pm,{direction:"row",align:"stretch",gap:"xs",className:"bg-brand-25 border border-solid border-brand-200 rounded-lg p-3 shadow-sm"},(0,i.createElement)(Pm,{direction:"row",align:"center",gap:"xs",className:"flex-1"},(0,i.createElement)(Pm,{direction:"column",gap:"xs",className:"flex-1"},(0,i.createElement)(Ym,{size:14,weight:600,color:"primary",lineHeight:20},e),(0,i.createElement)(Ym,{size:14,weight:400,color:"secondary",lineHeight:20},t)),(0,i.createElement)(Pm,{align:"center",gap:"xs",className:"shrink-0"},(0,i.createElement)(FI,{buttonLink:n}))))),VI=(e="pro")=>{const[{license_status:t}]=u();return!("plus-pro"===e?wcfCartflowsTypePlusPro():wcfCartflowsPro())||"Activated"!==t},YI=function({orderBumps:e,stepId:t,flowId:n,pageSettings:r,onChange:o,onEditClick:a,hideDocLink:l=!1,hideAddControl:c=!1}={}){const[d,u]=Zp(),f=Array.isArray(e),p=f?null:d?.options,h=f?t:d?.step_id,g=f?n:d?.flow_id,w=f?r:d?.page_settings,y=f?e=>o?.(e):u,b=VI("plus-pro"),[v,x]=(0,s.useState)(),[N,_]=(0,s.useState)(""),E=(0,D.__)("Add","cartflows"),M=(0,m.useHistory)(),I=(0,m.useLocation)(),[S,k]=(0,s.useState)(new URLSearchParams(window.location.search).get("ob_id")||""),C=e=>{k(t=>{const n=t===e?"":e,r=new URLSearchParams(I?.search||"");return n===(r.get("ob_id")||"")||(n?r.set("ob_id",n):r.delete("ob_id"),M?.replace?.({pathname:I?.pathname,search:r.toString()})),n})},[j,A]=(0,s.useState)({button_text:E,is_processing:!1}),{button_text:T,is_processing:L}=j;if(b)return(0,i.createElement)(QI,{title:(0,D.__)("Add Extra Revenue to Every Checkout Effortlessly","cartflows"),description:(0,D.__)("Show a perfectly timed add-on offer at checkout. Customers buy more in one click — zero extra steps, zero coding needed.","cartflows")});if(!f&&(null===p||"undefined"===w))return(0,i.createElement)(TI,null);const O=w,z=f?e:p["wcf-order-bumps"],P=Array.isArray(z)?z.filter(e=>!e?.["wcf-control-ob"]):z,R=z?Object.keys(z).length:0,U=w?.settings?.["multiple-order-bump-design"],B=()=>{const t=f?e:p["wcf-order-bumps"];if(!t)return;const n=[];Object.keys(t).map(e=>(n.push(t[e].id),""));const r=new window.FormData;r.append("action","cartflows_pro_reorder_order_bumps"),r.append("security",cartflows_admin.reorder_order_bumps_nonce),r.append("step_id",h),r.append("sorted_obs",n),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{})};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"sm",className:"wcf-multiple-order-bumps--wrapper"},R>0&&(0,i.createElement)("div",{className:"wcf-multiple-order-bumps border border-solid border-border-subtle sm:mx-0 sm:rounded-lg"},(0,i.createElement)(Pm,{containerType:"flex",direction:"row",className:"wcf-multiple-order-bumps__header border-b border-solid border-border-subtle border-0 bg-background-secondary px-6 py-4 gap-2 text-left sm:rounded-t-lg"},(0,i.createElement)(Ym,{as:"span",size:"sm",weight:500,className:"wcf-column wcf-column--title w-[70%]"},(0,D.__)("Title","cartflows")),(0,i.createElement)(Ym,{as:"span",size:"sm",weight:500,className:"wcf-column wcf-column--status w-[13%]"},(0,D.__)("Status","cartflows")),(0,i.createElement)(Ym,{as:"span",size:"sm",weight:500,className:"wcf-column wcf-column--actions w-[12%] sr-only"},(0,D.__)("Actions","cartflows"))),(0,i.createElement)("div",{className:"wcf-multiple-order-bumps__content"},z&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Wp.ReactSortable,{list:P,setList:e=>{const t=[];e.forEach(e=>{t.push(e),e?.["ab-test"]&&Array.isArray(e["ab-test-variations"])&&e["ab-test-variations"].forEach(n=>{const r=z.find(t=>t.id===n.id&&t["wcf-control-ob"]===e.id);r&&t.push(r)})}),y({type:"SET_OB",obs:t,fieldName:"wcf-order-bumps",step_id:h,flow_id:g})},swapThreshold:.8,direction:"vertical",animation:150,handle:".wcf-order-bump",filter:".wcf-order-bump__action, .wcf_order_bump__status, .wcf-order-bump__data-title a",preventOnFilter:!1},P.map(e=>{const t=e["ab-test-variations"];return e["ab-test"]&&Array.isArray(t)&&t.length>0?(0,i.createElement)(AI,{key:e.id,controlBump:e,allBumps:z,stepId:h,flowId:g,dispatch:f?y:void 0,onEditClick:a,openObSettingsId:S,toggleObSettings:C}):(0,i.createElement)(wI,{key:e.id,flow_id:g,step_id:h,data:e,title:e.title,settings:O?.settings?.["multiple-order-bump"],design_settings:U,callback:B,dispatch:f?y:void 0,onEditClick:a,openObSettingsId:S,toggleObSettings:C})}))))),0===R&&(0,i.createElement)("div",{className:"border border-border-subtle border-solid bg-gray-25 rounded-md px-5 py-5 text-sm text-text-secondary text-center"},(0,D.__)("Create an order bump.","cartflows")),!c&&(0,i.createElement)(Pm,{containerType:"flex",gap:"sm",className:"wcf-multiple-order-bumps__add-new mt-5"},(0,i.createElement)("div",{className:"flex-1 flex flex-col gap-1"},(0,i.createElement)(tg,{size:"md",value:v||"",onChange:x,placeholder:(0,D.__)("Enter order bump name","cartflows"),error:!!N,className:"focus:!ring-0 focus:!ring-offset-0"}),N&&(0,i.createElement)("span",{className:"text-sm font-normal text-brand-500"},N)),(0,i.createElement)(Po,{variant:"outline",icon:(0,i.createElement)(yg,{className:"w-4 h-4 stroke-1"}),iconPosition:"left",loading:L,disabled:L,onClick:function(e){if(e.preventDefault(),void 0!==v){_(""),A({button_text:(0,D.__)("Adding…","cartflows"),is_processing:!0});const t={title:v,id:Math.random().toString(36).substring(2,5)},n=new window.FormData;n.append("action","cartflows_pro_add_order_bump"),n.append("security",cartflows_admin.add_order_bump_nonce),n.append("ob_id",t.id),n.append("post_id",g),n.append("step_id",h),n.append("title",v),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(t=>{t.success&&(y({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:t.data.order_bumps}),x(""),A({button_text:E,is_processing:!1}),gm.success((0,D.__)("Order bump added!","cartflows"))),e.target.blur()})}else _((0,D.__)("Please enter the order bump title","cartflows")),e.target.blur()},className:"wcf-add-new-order-bump font-normal h-fit"},T))),!l&&(0,i.createElement)(FE,{content:(0,D.sprintf)( |
| 31 |
// translators: %1$s: link html start, %2$s: link html end |
| 32 |
// translators: %1$s: link html start, %2$s: link html end |
| 33 |
(0,D.__)("For more information about order bump settings please %1$sClick here.%2$s","cartflows"),'<a href="https://cartflows.com/docs/how-to-add-order-bumps-to-woocommerce-sales-funnel" class="text-brand-500 hover:text-brand-600 no-underline" target="_blank">',"</a>")}))},ZI=function({stepId:e,flowId:t,flowType:n,initialBumps:r,onCountChange:o}){const[a,l]=(0,s.useState)(Array.isArray(r)?r:[]),[c,d]=(0,s.useState)(!1),[u,f]=(0,s.useState)(""),[p,h]=(0,s.useState)(""),[g,w]=(0,s.useState)(!1),y=(0,m.useHistory)(),b=VI("plus-pro");(0,s.useEffect)(()=>{Array.isArray(r)&&l(r)},[r]),(0,s.useEffect)(()=>{o?.(a.length)},[a.length]);const v=(0,s.useCallback)(e=>{if(e&&"object"==typeof e)switch(e.type){case"UPDATE_ORDER_BUMP":Array.isArray(e.order_bumps)&&l(e.order_bumps);break;case"SET_OB":Array.isArray(e.obs)&&l(e.obs);break;case"SET_OB_STATUS":l(t=>t.map(t=>t.id===e.ob_id?{...t,status:e.newStatus}:t));break;case"SET_OB_TITLE":l(t=>t.map(t=>t.id===e.ob_id?{...t,title:e.title}:t));break;case"REMOVE_ORDER_BUMP":l(t=>t.filter(t=>t.id!==e.ob_id));break;case"SET_OB_PRODUCT":l(t=>t.map(t=>t.id===e.ob_id?{...t,product:e.product}:t))}},[]),x=(0,s.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}`;y?.push&&y.push({pathname:"admin.php",search:o})},[n,t,e,y]),N=()=>{g||(d(!1),f(""),h(""))},_=()=>{const n=(u||"").trim();if(""===n)return void h((0,D.__)("Please enter the order bump title","cartflows"));h(""),w(!0);const r=new window.FormData;r.append("action","cartflows_pro_add_order_bump"),r.append("security",cartflows_admin.add_order_bump_nonce);const o=window.crypto&&"function"==typeof window.crypto.randomUUID?window.crypto.randomUUID():Math.random().toString(36).slice(2,12)+Math.random().toString(36).slice(2,12);r.append("ob_id",o),r.append("post_id",t),r.append("step_id",e),r.append("title",n),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(e=>{e?.success?(v({type:"UPDATE_ORDER_BUMP",name:"wcf-order-bumps",order_bumps:e.data.order_bumps}),gm.success((0,D.__)("Order bump added!","cartflows")),d(!1),f("")):h((0,D.__)("Failed to add order bump.","cartflows"))}).catch(()=>{h((0,D.__)("Failed to add order bump.","cartflows"))}).finally(()=>{w(!1)})};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(YI,{orderBumps:a,stepId:e,flowId:t,pageSettings:null,onChange:v,onEditClick:x,hideDocLink:!0,hideAddControl:!0}),!b&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("button",{type:"button",onClick:()=>d(!0),className:"wcf-add-order-bump-trigger w-full mt-2.5 py-2.5 flex items-center justify-center gap-1 border border-solid border-border-subtle rounded-lg bg-transparent text-sm font-medium text-text-secondary hover:text-text-primary hover:border-border-strong cursor-pointer"},(0,i.createElement)(yg,{className:"w-4 h-4 stroke-2"}),(0,D.__)("Add Order Bump","cartflows")),(0,i.createElement)(vh,{open:c,setOpen:e=>{e||N()},exitOnClickOutside:!1},(0,i.createElement)(vh.Panel,{className:"sm:max-w-lg w-full"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Header,{className:"flex items-center justify-between !space-y-0"},(0,i.createElement)(vh.Title,null,(0,D.__)("Order Bump","cartflows")),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,null,(0,i.createElement)("label",{htmlFor:"wcf-add-order-bump-title",className:"block text-sm font-medium text-text-primary mb-2"},(0,D.__)("Order Bump Name","cartflows")),(0,i.createElement)(tg,{id:"wcf-add-order-bump-title",type:"text",size:"md",value:u,onChange:e=>{f(e),p&&h("")},placeholder:(0,D.__)("Enter Order Bump name","cartflows"),error:!!p,onKeyDown:e=>{"Enter"!==e.key||g||(e.preventDefault(),_())}}),(0,i.createElement)("p",{className:"flex items-center gap-1 text-xs font-normal text-text-tertiary mt-2 m-0"},(0,i.createElement)(vg,{className:"w-3.5 h-3.5 stroke-2"}),(0,D.__)("Configure product and settings after creation.","cartflows")),p&&(0,i.createElement)("p",{className:"text-sm font-normal text-brand-500 mt-2 m-0"},p)),(0,i.createElement)(vh.Footer,{className:"flex gap-3 justify-end"},(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:N,disabled:g},(0,D.__)("Cancel","cartflows")),(0,i.createElement)(Po,{variant:"primary",size:"md",onClick:_,loading:g,disabled:g},(0,D.__)("Add Order Bump","cartflows")))))))},WI=function({stepId:e,flowId:t,flowType:n,initialBumps:r=[]}){const[o,a]=(0,s.useState)(!0),[l,c]=(0,s.useState)(r.length),d=(0,s.useCallback)(e=>{c(e)},[]);return(0,i.createElement)("div",{className:"wcf-order-bump-section px-4 py-4 border-t border-solid border-border-subtle border-0"},(0,i.createElement)("div",{className:"flex items-center justify-between"},(0,i.createElement)("div",{className:"flex items-center gap-1.5"},(0,i.createElement)(mg,{className:"w-4 h-4 text-text-primary stroke-1"}),(0,i.createElement)(Ym,{as:"span",size:14,weight:400,color:"primary"},(0,D.__)("Order Bumps","cartflows")," ",(0,i.createElement)("span",{className:"text-text-primary font-normal"},"(",l,")"))),(0,i.createElement)(Po,{variant:"link",size:"xs",icon:o?(0,i.createElement)(gg,{className:"w-3.5 h-3.5 stroke-2"}):(0,i.createElement)(Tp,{className:"w-3.5 h-3.5 stroke-2"}),iconPosition:"right",onClick:()=>a(!o)},o?(0,D.__)("Hide","cartflows"):(0,D.__)("Show","cartflows"))),o&&(0,i.createElement)("div",{className:"mt-2.5"},(0,i.createElement)(ZI,{stepId:e,flowId:t,flowType:n,initialBumps:r,onCountChange:d})))},GI=function(e){const[{is_cf_pro:t,global_checkout:n,flow_id:r,flow_type:o}]=Zp(),{id:a,title:s,type:l,actions:c,menu_actions:d,offer_yes_next_step:u,offer_no_next_step:f,invalid:p=!1,step_disabled:m=!1,setShowAbtestUpgradePopup:h=()=>{},order_bumps:g=[]}=e,y=!!p,b=a;"storeCheckout"===o&&(["checkout"].includes(l)&&(delete d.clone,y||delete d.delete),y&&(delete d.clone,delete d.abtest));let v=!1,x=!1,N=[],_=[],E=0;wcfCartflowsTypePro()&&(v=!!e["ab-test-ui"]&&e["ab-test-ui"],x=!!e["ab-test-start"]&&e["ab-test-start"],N=e["ab-test-variations"]?e["ab-test-variations"]:[],_=e["ab-test-archived-variations"]?e["ab-test-archived-variations"]:[],E=N.length,E<2&&(v=!1));let M="";"storeCheckout"===o&&y&&(M+=" invalid-step wcf-store-checkout pointer-events-none touch-none"),v&&(M+=" wcf-ab-test"),wcfCartflowsTypePlusPro()||"upsell"!==l&&"downsell"!==l||(M+=" invalid-step pro-inactive pointer-events-none touch-none !bg-background-secondary !text-text-disabled !border-0"),m&&!v&&(M+=" 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:v,control_id:b,step_id:a,type:l,title:s,actions:Object.values(c),menu_actions:Object.values(d),has_product_assigned:e.is_product_assigned,offer_yes_next_step:u,offer_no_next_step:f,ab_test_archived_variations:_,invalidStep:y,setShowAbtestUpgradePopup:h,step_disabled:m};return(0,i.createElement)("div",{className:"wcf-step-wrap box-border bg-background-primary border border-solid border-border-subtle shadow-sm rounded-lg overflow-hidden"+M,id:a},v&&(0,i.createElement)(og,{flow_id:r,control_id:b,step_id:a,abvariations:N,ab_test_start:x}),function(){let e="";if(I.step_id=a,v&&E>1){let t=0;e=N.map(e=>(b!==e.id&&++t,I.is_variation=!0,I.control_id=b,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,i.createElement)(Jh,(0,w.A)({},I,{key:e.id}))))}else e=(0,i.createElement)(Jh,I);return e}(),function(){if(_.length>0){const e={flow_id:r,control_id:b,type:l,archived_variations:_,ab_test_ui:v};return(0,i.createElement)(fg,e)}}(),"checkout"===l&&wcfCartflowsPro()&&(0,i.createElement)(WI,{stepId:a,flowId:r,flowType:o,initialBumps:Array.isArray(g)?g:[]}))},HI=({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,C.jsx)("div",{className:Ie(r,"animate-pulse",o,t),...n})},$I=function(){return(0,i.createElement)("div",{className:"w-full"},Array(3).fill().map((e,t)=>(0,i.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,i.createElement)("div",{className:"flex"},(0,i.createElement)(HI,{className:"w-3 h-10 rounded"})),(0,i.createElement)(HI,{className:"w-[72px] h-[72px] rounded-lg flex-shrink-0"}),(0,i.createElement)("div",{className:"flex flex-col gap-2 w-[40%]"},(0,i.createElement)(HI,{className:"h-3 w-24 rounded-md"}),(0,i.createElement)(HI,{className:"h-4 w-48 rounded-md"})),(0,i.createElement)("div",{className:"flex items-center justify-around w-[35%] gap-4"},[1,2,3].map(e=>(0,i.createElement)("div",{key:e,className:"flex flex-col gap-2 items-center"},(0,i.createElement)(HI,{className:"h-3 w-16 rounded-md"}),(0,i.createElement)(HI,{className:"h-4 w-8 rounded-md"})))),(0,i.createElement)("div",{className:"flex items-center gap-2 ml-auto"},[1,2,3,4].map(e=>(0,i.createElement)(HI,{key:e,variant:"circular",className:"size-8"}))))))};function XI({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 qI=s.forwardRef(XI);function JI({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"}))}const KI=s.forwardRef(JI);function eS({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 tS=s.forwardRef(eS),nS=function(){return(0,i.createElement)("div",{className:"wcf-design-page is-placeholder"},(0,i.createElement)("div",{className:"wcf-design-page__content"},(0,i.createElement)("div",{className:"wcf-design-header--title wcf-step__title--editable"},(0,i.createElement)("div",{className:"title wcf-placeholder__width--30"})),(0,i.createElement)("div",{className:"wcf-design-page__customize"},(0,i.createElement)("div",{className:"wcf-design-page__button"}),(0,i.createElement)("div",{className:"wcf-design-page__button"})),(0,i.createElement)("div",{className:"wcf-design-page__text"},(0,i.createElement)("div",{className:"title wcf-placeholder__width--60"})),(0,i.createElement)("div",{className:"wcf-design-page__WPeditor"},(0,i.createElement)("div",{className:"title wcf-placeholder__width--80"}))),(0,i.createElement)("div",{className:"wcf-design-page__settings"},(0,i.createElement)("div",{className:"title"}),(0,i.createElement)("div",{className:"wcf-field wcf-checkbox-field"},(0,i.createElement)("div",{className:"title"})),(0,i.createElement)("div",{className:"wcf-settings"},(0,i.createElement)("form",null,(0,i.createElement)("div",{className:"wcf-vertical-nav"},(0,i.createElement)("div",{className:"wcf-vertical-nav__menu"},Array(5).fill().map(e=>(0,i.createElement)("div",{className:"wcf-settings-nav__tab",key:e},(0,i.createElement)(Ig,{height:"45px"})))),(0,i.createElement)("div",{className:"wcf-vertical-nav__content"},(0,i.createElement)(Eg,{fontSize:"35px",width:"225px"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"65%"}),(0,i.createElement)(Mg,null),(0,i.createElement)(Eg,{fontSize:"35px",width:"300px"}),(0,i.createElement)(Eg,{width:"60%"}),(0,i.createElement)(Eg,{width:"60%"}),(0,i.createElement)(Eg,{width:"45%"}),(0,i.createElement)(Mg,null),(0,i.createElement)(Eg,{fontSize:"35px",width:"300px"}),(0,i.createElement)(Eg,{width:"60%"}),(0,i.createElement)(Eg,{width:"60%"}),(0,i.createElement)(Eg,{width:"45%"})))))))},rS=function({settings:e,displayAs:t="tr"}){const[{options:n}]=Zp();return(0,i.createElement)("div",{className:"wcf-list-options"},(0,i.createElement)("div",{className:"wcf-list-options-wrapper"},"tr"===t?(0,i.createElement)("table",{className:"w-full"},(0,i.createElement)("tbody",null,Object.keys(e.fields).map(t=>{const r=e.fields[t],o=n[r.name]?n[r.name]:"",a=fm.isActiveControl(r,n);return(0,i.createElement)(hM,{key:t,data:r,value:o,isActive:a,field:t})}))):(0,i.createElement)("div",{className:"wcf-list-options-container"},Object.keys(e.fields).map(r=>{const o=e.fields[r],a=n[o.name]?n[o.name]:"",s=fm.isActiveControl(o,n);return(0,i.createElement)(hM,{key:r,data:o,value:a,isActive:s,field:r,tabName:"list-options",displayAs:t})}))))},oS=function(e){const[t,n]=(0,s.useState)(e.isOpen?"":"collapsed"),r=e.settings.title.replace(/ /g,"_").toLowerCase(),o=e.settings.title.replace(/ /g,"-").toLowerCase();return(0,i.createElement)("div",{className:`wcf-${o} accordion-item bg-background-primary -mx-8 border-b border-border-subtle ${!1===e?.isActive?"hidden":""}`},(0,i.createElement)("h2",{className:"accordion-header mb-0 "+("landing"===e?.settings?.step_type&&"general"===e?.settings?.slug?"hidden":""),id:`wcf_${r}_toggler`.toLowerCase()},(0,i.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 ${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,i.createElement)("span",null,e.settings.title),""===t?(0,i.createElement)(gg,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}):(0,i.createElement)(Tp,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}))),(0,i.createElement)("div",{id:`wcf_collapse_${r}`,className:`accordion-collapse px-8 pt-4 pb-8 ${t}`,"aria-labelledby":`wcf_${r}_toggler`},(0,i.createElement)("div",{className:"accordion-body"},(0,i.createElement)(rS,{settings:e.settings,displayAs:e.displayAs?e.displayAs:"tr"}))))},aS=function(){const[{step_id:e,design_settings:t,options:n,flow_type:r,flow_id:o,step_data:a,is_flow_instant_checkout:l}]=Zp(),c=t.settings,d=c?Object.values(c).sort(function(e,t){return e.priority-t.priority}):"",[{step_title:u}]=Zp(),f=(0,m.useHistory)(),p=zh();return(0,s.useEffect)(()=>{let e=!0;return()=>{e=!1}},[]),""===e?(0,i.createElement)(nS,null):(0,i.createElement)("div",{className:"wcf-design-page"},"storeCheckout"===r&&u&&"yes"!==l&&(0,i.createElement)("div",{className:"mb-3"},(0,i.createElement)("div",{className:"wcf-change-step wcf-button wcf-secondary-button",onClick:async function(){await p({title:(0,D.__)("Update Template","cartflows"),description:(0,D.__)("Changing the template will permanently delete the current design in this step. Would you still like to proceed?","cartflows"),actionBtnText:(0,D.__)("Update","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})&&f.push(`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&step_id=${e}&flow_id=${o}&tab=update-template`)}},(0,i.createElement)("span",{className:""},(0,D.__)("Change Template","cartflows")))),(0,i.createElement)("div",{className:"wcf-step-notices-wrapper rounded-md bg-alert-background-warning border border-yellow-200 p-4 mb-3"},(0,i.createElement)("div",{className:"flex"},(0,i.createElement)("div",{className:"text-sm text-support-warning"},"yes"===l&&["checkout","upsell","downsell","thankyou"].includes(a?.type)?(0,i.createElement)(i.Fragment,null,(0,D.sprintf)( |
| 34 |
// translators: %s: The current step type. |
| 35 |
// translators: %s: The current step type. |
| 36 |
(0,D.__)("Use this setting to customize the style of the Instant %s Layout.","cartflows"),"thankyou"===a?.type?(0,D.__)("Thank You","cartflows"):a?.type.charAt(0).toUpperCase()+a?.type.slice(1))):(0,i.createElement)(i.Fragment,null,(0,D.__)("If you are using shortcodes, enable this design settings to apply styles.","cartflows"))))),d&&(0,i.createElement)("div",{className:"wcf-design-page__settings"},(0,i.createElement)("div",{className:"mb-4"},(0,i.createElement)(yM,{id:"wcf-enable-design-settings",name:"wcf-enable-design-settings",value:n["wcf-enable-design-settings"],label:(0,D.__)("Enable Design Settings","cartflows"),fullWidth:!0})),"yes"===n["wcf-enable-design-settings"]&&Object.keys(d).map((e,t)=>(0,i.createElement)(oS,{settings:d[e],key:e,isOpen:0===t,isActive:fm.isActiveControl(d[e],n)}))))},iS=({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,C.jsx)(o,{className:Ie("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,C.jsxs)("div",{className:i,children:[(0,C.jsxs)("div",{children:[n&&"left"===r&&(0,C.jsxs)("div",{className:Ie("flex items-center",s[a]),children:[n,l()]}),n&&"right"===r&&(0,C.jsxs)("div",{className:Ie("flex items-center",s[a]),children:[l(),n]}),!n&&l()]}),(0,C.jsx)("p",{className:Ie("text-text-secondary font-normal my-0",{xs:"text-sm",sm:"text-sm",md:"text-base",lg:"text-base"}[a]),children:t})]}):(0,C.jsxs)("div",{className:i,children:[n&&"left"===r&&(0,C.jsxs)("div",{className:Ie("flex items-center",s[a]),children:[n,l()]}),n&&"right"===r&&(0,C.jsxs)("div",{className:Ie("flex items-center",s[a]),children:[l(),n]}),!n&&l()]})},sS=function(e){const t=e.heading?e.heading:"",n=e.subHeading?e.subHeading:"",r=e.description?e.description:"",o=e.btnText||(0,D.__)("Upgrade to CartFlows Pro","cartflows"),a=e.class?e.class:"",s=e.usps?e.usps:"";return(0,i.createElement)("div",{className:`wcf-upgrade-to-pro-cta ${a}`},(0,i.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,i.createElement)("div",{className:"flex flex-col gap-3"},t&&(0,i.createElement)(iS,{size:"sm",tag:"h2",title:t}),n&&(0,i.createElement)(Ym,{size:14,color:"secondary"},n),(0,i.createElement)("div",{className:"flex items-center"},(0,i.createElement)(FI,{buttonLink:e.buttonLink,ctaText:o}))),r&&(0,i.createElement)(Ym,{size:14,color:"secondary",className:"wcf-upgrade-to-pro-cta--text mt-3"},r),s&&(0,i.createElement)("ul",{className:"wcf-upgrade-to-pro-cta-list list-none p-0 m-0 mt-3"},s.map((e,t)=>(0,i.createElement)("li",{className:"wcf-upgrade-to-pro-cta-list-item flex gap-2 items-center mb-2",key:t},(0,i.createElement)(Bh,{className:"w-18 h-18 stroke-2 text-brand-500 shrink-0"}),(0,i.createElement)(Ym,{size:14,color:"secondary"},e))))))},lS=function(){return(0,i.createElement)("div",{className:"wcf-settings-nav"},(0,i.createElement)("div",{className:"wcf-settings-nav__tabs"},Array(5).fill().map(e=>(0,i.createElement)("div",{className:"wcf-settings-nav__tab",key:e},(0,i.createElement)(Ig,{height:"45px"})))),(0,i.createElement)("div",{className:"wcf-settings-nav__content"},(0,i.createElement)(Eg,{fontSize:"35px",width:"225px"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"65%"}),(0,i.createElement)(Mg,null),(0,i.createElement)(Eg,{fontSize:"35px",width:"300px"}),(0,i.createElement)(Eg,{width:"60%"}),(0,i.createElement)(Eg,{width:"60%"}),(0,i.createElement)(Eg,{width:"45%"})))},cS=function(){const[{step_id:e,flow_id:t,step_data:n}]=Zp(),[r,o]=(0,s.useState)("collapsed"),a=(0,m.useHistory)(),l=zh();return(0,i.createElement)("div",{className:"wcf-change-step-template accordion-item bg-background-primary -mx-8 border-b border-border-subtle"},(0,i.createElement)("h2",{className:"accordion-header mb-0",id:"wcf_change_step_template_toggler"},(0,i.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,i.createElement)("span",null,(0,D.__)("Change Template","cartflows")),""===r?(0,i.createElement)(gg,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}):(0,i.createElement)(Tp,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}))),(0,i.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,i.createElement)("div",{className:"accordion-body"},(0,i.createElement)("div",{className:"mb-3 flex items-center gap-4"},(0,i.createElement)("img",{src:function(){let e="";switch(n.type){case"landing":e=dh;break;case"checkout":e=uh;break;case"optin":e=mh;break;case"thankyou":e=hh;break;case"upsell":e=fh;break;case"downsell":e=ph}return e}(),alt:n.type,className:"rounded-lg w-[85px] h-[85px]"}),(0,i.createElement)("div",{className:"wcf-template-content"},(0,i.createElement)("div",{className:"wcf-step-template-type mb-3"},(0,i.createElement)("span",{className:"text-sm font-medium"},(0,D.__)("Step Type: ","cartflows")),(0,i.createElement)("span",{className:"text-sm font-normal text-text-secondary capitalize"},n.type)),(0,i.createElement)("div",{className:"wcf-change-step wcf-button wcf-secondary-button",onClick:async function(){await l({title:(0,D.__)("Update Template","cartflows"),description:(0,D.__)("Changing the template will permanently delete the current design in this step. Would you still like to proceed?","cartflows"),actionBtnText:(0,D.__)("Update","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})&&a.push(`admin.php?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${t}step_id=${e}&tab=update-template`)}},(0,i.createElement)("span",{className:""},(0,D.__)("Update Template","cartflows"))))))))},dS=function(){const[{step_data:e,settings_data:t,page_builder:n,flow_type:r,step_title:o,options:a}]=Zp(),[{license_status:s}]=u();let l=!0;if(void 0!==e.id&&(l=!1),l||!t?.settings)return(0,i.createElement)(lS,null);const c=t.settings,d=Object.values(c).sort(function(e,t){return e.priority-t.priority});return["upsell","downsell"].includes(e.type)&&wcfCartflowsPro()&&"Activated"!==s?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-multiple-order-bumps wcf-multiple-order-bumps-cta"},(0,i.createElement)(sS,{heading:(0,D.__)("License is required!","cartflows"),subHeading:(0,D.__)("Activate the license to modify this offer step's settings","cartflows")}))):(0,i.createElement)("div",{className:"wcf-settings-page"},c&&Object.keys(d).map((t,r)=>"other"!==n&&"shortcode"===d[t].slug?null:(d[t].step_type=e?.type||"",(0,i.createElement)(oS,{settings:d[t],key:t,displayAs:"div",isOpen:0===r,isActive:fm.isActiveControl(d[t],a)}))),"storeCheckout"===r&&o&&(0,i.createElement)(cS,null))},uS=function({settings:e},t="tr"){const[{options:n}]=Zp(),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,D.__)("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,i.createElement)("div",{className:"wcf-list-options wcf-offer-list-options"},(0,i.createElement)("div",{className:"wcf-list-options-wrapper"},"tr"===t?(0,i.createElement)("table",{className:"w-full"},(0,i.createElement)("tbody",null,Object.keys(e.fields).map(t=>{const o=e.fields[t],a=r(o),s=fm.isActiveControl(o,n);return(0,i.createElement)(hM,{key:t,data:o,value:a,isActive:s,field:t})}))):(0,i.createElement)("div",{className:"wcf-list-options-container"},Object.keys(e.fields).map(o=>{const a=e.fields[o],s=r(a),l=fm.isActiveControl(a,n);return(0,i.createElement)(hM,{key:o,data:a,value:s,isActive:l,field:o,tabName:"list-options",displayAs:t})}))),(0,i.createElement)("table",null,(0,i.createElement)("tbody",null)))},fS=function(){return(0,i.createElement)("div",{className:"wcf-checkout-products is-placeholder"},(0,i.createElement)("div",{className:"wcf-checkout-products--selection wcf-checkout__section"},(0,i.createElement)("div",{className:"wcf-product-selection-wrapper"},(0,i.createElement)("div",{className:"wcf-list-options"},(0,i.createElement)("div",{className:"wcf-list-options__title"},(0,i.createElement)("div",{className:"title wcf-placeholder__width--30"})),(0,i.createElement)("table",null,(0,i.createElement)("tbody",null,(0,i.createElement)("tr",null,(0,i.createElement)("th",null,(0,i.createElement)("div",{className:"wcf-checkout-product-selection-field"},(0,i.createElement)("div",{className:"wcf-checkout-product-selection-field__add-new"},(0,i.createElement)("div",{className:"wcf-checkout-products__button"}),(0,i.createElement)("div",{className:"wcf-checkout-products__button"})))))))))),(0,i.createElement)("div",{className:"wcf-checkout-products__pro-options"},(0,i.createElement)("div",{className:"wcf-checkout-products--coupon"},(0,i.createElement)("div",{className:"wcf-coupon-selection-wrapper"},(0,i.createElement)("div",{className:"wcf-list-options"},(0,i.createElement)("div",{className:"wcf-list-options__title"},(0,i.createElement)("div",{className:"title"})),(0,i.createElement)("table",null,(0,i.createElement)("tbody",null,(0,i.createElement)("tr",null,(0,i.createElement)("th",null,(0,i.createElement)("div",null,(0,i.createElement)("div",{className:"wcf-select2-field"},(0,i.createElement)("div",{className:"title"}))))))))))),(0,i.createElement)("div",{className:"wcf-field wcf-submit"},(0,i.createElement)("div",{className:"wcf-checkout-products__button"})))},pS=function(){const[{settings_data:e,page_settings:t,options:n,step_data:r},o]=Zp(),[{license_status:a}]=u(),l=n["wcf-offer-product"]?n["wcf-offer-product"]:"",c=[{value:"",label:"No Discount",icon:(0,i.createElement)(ix,{className:"w-5 h-5"})},{value:"discount_percent",label:"Discount Percentage",icon:(0,i.createElement)(lx,{className:"w-5 h-5"})},{value:"discount_price",label:"Discount Price",icon:(0,i.createElement)(dx,{className:"w-5 h-5"})}],[d,f]=(0,s.useState)(),[p,m]=(0,s.useState)(""),h=(0,D.__)("Add","cartflows"),g=void 0===l.discount_type||""===l.discount_type?"disable":"enable",[w,y]=(0,s.useState)(g);(0,s.useEffect)(()=>{y(l?.discount_type?"enable":"disable")},[l]);const[b,v]=(0,s.useState)({isInProcessing:!1,buttonText:h}),{isInProcessing:x,buttonText:N}=b;return void 0===e.settings?(0,i.createElement)(fS,null):["upsell","downsell"].includes(r.type)&&wcfCartflowsPro()&&"Activated"!==a?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-multiple-order-bumps wcf-multiple-order-bumps-cta"},(0,i.createElement)(sS,{heading:(0,D.__)("License is required!","cartflows"),subHeading:(0,D.__)("Activate the license to modify this offer step's settings","cartflows")}))):(0!==l.length&&function(){const e=n["wcf-offer-discount"],t=parseFloat(n["wcf-offer-discount-value"]),r=parseFloat(l.original_price);let o=0;"discount_percent"===e?t>0&&(o=r-r*t/100):"discount_price"===e&&t>0&&(o=r-t),l.sell_price=o.toFixed(2)}(),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-offer-product--wrapper"},(0,i.createElement)("div",{className:"wcf-offer-products--selection wcf-products__section"},0===l.length?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("input",{name:"wcf-offer-product[]",type:"hidden",value:""}),(0,i.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,D.__)("Once you select the product, they will be displayed here.","cartflows")),(0,i.createElement)("div",{className:"wcf-offer-product-selection-field__add-new flex justify-between items-end gap-5 mt-5"},(0,i.createElement)(sM,{name:"",desc:"",field:"product",value:p,allowed_products:"",include_products:"braintree-subscription, braintree-variable-subscription",excluded_products:"grouped",placeholder:(0,D.__)("Search for a Product","cartflows"),onChangeCB:f,sectionClass:"flex-1"}),(0,i.createElement)(Po,{type:"button",variant:"outline",size:"md",icon:(0,i.createElement)(yg,{className:"w-4 h-4"}),iconPosition:"left",loading:x,disabled:x,onClick:function(){const e=d?.value;m(d),e&&(v({isInProcessing:!0,buttonText:(0,D.__)("Adding…","cartflows")}),Xf()({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:d?.label,img_url:t?.img_url,original_price:t?.regular_price}}),m(null),v({isInProcessing:!1,buttonText:h})}),f(null))},className:"wcf-select-product-button shrink-0 h-fit"},N))):(0,i.createElement)("div",{className:"overflow-visible shadow border border-border-subtle rounded-md"},(0,i.createElement)("div",{className:"wcf-offer-product-selection--header border-b border-border-subtle flex gap-4 p-3"},(0,i.createElement)("div",{className:"text-left text-sm font-semibold text-text-primary w-2/5"},(0,D.__)("Items","cartflows")),(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("div",{className:"text-left text-sm font-semibold text-text-primary w-20"},(0,D.__)("Quantity","cartflows")),(0,i.createElement)("div",{className:"text-left text-sm font-semibold text-text-primary w-44"},(0,D.__)("Discount","cartflows")),(0,i.createElement)("div",{className:"text-left text-sm font-semibold text-text-primary w-24"},(0,D.__)("Shipping Rate","cartflows")),(0,i.createElement)("div",{className:"relative w-[5%]"},(0,i.createElement)("span",{className:"sr-only"},(0,D.__)("Delete","cartflows"))))),(0,i.createElement)("div",{className:"wcf-offer-product-selection--selected-product flex items-center p-3 gap-4"},(0,i.createElement)("div",{className:"wcf-offer-product-selection--product-title whitespace-nowrap text-sm font-medium text-text-primary w-2/5"},(0,i.createElement)("div",{className:"flex gap-3 items-center"},(0,i.createElement)("div",{className:"wcf-offer-product-selection--product-image flex w-24 h-24"},(0,i.createElement)("img",{src:l.img_url?l.img_url:cartflows_admin.image_placeholder,className:"product-image rounded-md w-full h-full aspect-{3/2} object-contain",alt:Wm(l.label)})),(0,i.createElement)("div",{className:"wcf-offer-product-selection--product-title_text"},(0,i.createElement)("div",{className:"wcf-offer-product-repeater-field__title whitespace-normal text-left","data-product_id":l.value},Wm(l.label)),(0,i.createElement)("div",{className:"wcf-offer-product-repeater-field__reg-price mt-1"},(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("span",{className:"wcf-offer-product--reg-price "+(0<l.sell_price?"line-through text-text-tertiary":"")},cartflows_admin.woo_currency+l.original_price),0<l.sell_price&&(0,i.createElement)("span",{className:"wcf-offer-product--sale-price"},cartflows_admin.woo_currency+l.sell_price)))))),(0,i.createElement)("div",{className:"flex-1 flex gap-2"},(0,i.createElement)("div",{className:"wcf-offer-product-selection--product-qty"},(0,i.createElement)(xx,{id:"",name:"wcf-offer-quantity",class:"input-field !w-20 !text-sm font-normal !m-0",value:n["wcf-offer-quantity"],min:"1"})),(0,i.createElement)("div",{className:"wcf-offer-product-selection--product-discount flex gap-2"},(0,i.createElement)(vM,{name:"wcf-offer-discount",value:n["wcf-offer-discount"],class:"!w-20 !m-0",options:c,callback:function(e,t,n){y(""===n?"disable":"enable")}}),(0,i.createElement)(xx,{id:"",class:"input-field !w-20 !m-0",name:"wcf-offer-discount-value",value:"disable"===w?"":n["wcf-offer-discount-value"],readonly:"disable"===w?"readonly":"",placeholder:"disable"===w?"":"0",min:"1",step:"any"})),(0,i.createElement)("div",{className:"wcf-offer-product-selection--flat-rate flex"},(0,i.createElement)(xx,{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,i.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,i.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,i.createElement)(Xm,{className:"h-18 w-18"}))),(0,i.createElement)("input",{name:"wcf-offer-product[]",type:"hidden",className:"wcf-checkout-product-id",value:l.value}))))),(0,i.createElement)("div",{className:"wcf-offer-product--common-settings pt-8"},(0,i.createElement)(uS,{settings:t?.settings.product,displayAs:"div"})))))},mS=function(){return(0,i.createElement)("div",{className:"flex flex-col gap-5"},(0,i.createElement)("div",{className:"flex items-center justify-between py-1"},(0,i.createElement)(HI,{className:"w-40 h-4"}),(0,i.createElement)(HI,{className:"w-10 h-5 rounded-full"})),(0,i.createElement)(HI,{className:"w-full h-48 rounded-lg"}),(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)(HI,{className:"w-1/3 h-9 rounded-md"}),(0,i.createElement)(HI,{className:"w-1/3 h-9 rounded-md"}),(0,i.createElement)(HI,{className:"w-1/3 h-9 rounded-md"})),["w-32","w-40","w-28","w-36"].map((e,t)=>(0,i.createElement)("div",{key:t,className:"flex flex-col gap-2"},(0,i.createElement)(HI,{className:`${e} h-3.5`}),(0,i.createElement)(HI,{className:"w-full h-10 rounded-md"}))))},hS=function(e){const[{page_settings:t,options:n}]=Zp(),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,D.__)("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 a=function(t){return Object.keys(t.section_fields).map(o=>{const a=t.section_fields[o],s=r(a),l=fm.isActiveControl(a,n);return(0,i.createElement)(hM,{key:o,data:a,value:s,isActive:l,field:o,tabName:e.tab?e.tab:"",displayAs:e.displayAs?e.displayAs:""})})};return(0,i.createElement)("div",{className:"wcf-list-options wcf-co-list-options"},(0,i.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,i.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,i.createElement)("div",{className:`wcf-${e.tab?e.tab:"setting"}-tab--heading-section col-span-full`},(0,i.createElement)(QE,{label:s.title,labelClass:"block text-base font-semibold text-text-primary mb-5"})),e.displayAs&&"tr"===e.displayAs?(0,i.createElement)("table",{className:"w-full"},(0,i.createElement)("tbody",null,a(s))):(0,i.createElement)("div",{className:"wcf-co-list-options-container"},a(s))):(0,i.createElement)("div",{key:t,className:`wcf-${e.tab?e.tab:"setting"}-tab--section mb-5`},e.displayAs&&"tr"===e.displayAs?(0,i.createElement)("table",{className:"wcf-full"},(0,i.createElement)("tbody",null,(0,i.createElement)(hM,{key:t,data:s,value:r(s),isActive:fm.isActiveControl(s,n),field:s,tabName:e.tab?e.tab:"",displayAs:e.displayAs?e.displayAs:""}))):(0,i.createElement)("div",{className:"wcf-co-list-options-container"},(0,i.createElement)(hM,{key:t,data:s,value:r(s),isActive:fm.isActiveControl(s,n),field:s,tabName:e.tab?e.tab:"",displayAs:e.displayAs?e.displayAs:""})))})))};function gS({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 wS=s.forwardRef(gS);function yS({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 bS=s.forwardRef(yS),vS=function(){const[{options:e}]=Zp(),[t,n]=(0,s.useState)("");(0,s.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"],a=parseFloat(e["wcf-pre-checkout-offer-discount-value"]);let l="";const c=r?parseFloat(r.original_price).toFixed(2):0;"discount_percent"===o?a>0&&(l=(c-c*a/100).toFixed(2)):"discount_price"===o&&a>0&&(l=(c-a).toFixed(2));const d=r&&r.product_image?r.product_image:cartflows_admin.image_placeholder;return(0,i.createElement)("div",{id:"wcf-checkout-offer-preview-wrapper",className:"fullscreen"===t?"wcf-checkout-offer-preview-wrapper fullscreen":"wcf-checkout-offer-preview-wrapper"},(0,i.createElement)("div",{className:"fullscreen"===t?"p-6":"mt-8 bg-background-secondary p-6 -mx-6"},(0,i.createElement)("div",{className:"wcf-pre-checkout-offer--header flex justify-between items-center mb-5 p-2.5"},(0,i.createElement)(Lf,{tag:"span",size:"md",className:"font-semibold text-text-primary"},(0,D.__)("Preview","cartflows")),""===t&&(0,i.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,i.createElement)(wS,{className:"w-5 h-5 stroke-2",title:(0,D.__)("View in Full Screen","cartflows")})),"fullscreen"===t&&(0,i.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,i.createElement)(bS,{className:"w-5 h-5 stroke-2",title:(0,D.__)("Exit Full Screen","cartflows")}))),(0,i.createElement)("div",{className:"wcf-pre-checkout-offer-wrapper wcf-pre-checkout-full-width"},(0,i.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,i.createElement)("div",{className:"wcf-content-main-wrapper"},(0,i.createElement)("div",{className:"wcf-lightbox-content p-6",style:{backgroundColor:e["wcf-pre-checkout-offer-model-bg-color"]}},(0,i.createElement)("div",{className:"wcf-content-modal-progress-bar mb-8"},(0,i.createElement)("div",{className:"wcf-progress-bar-nav",style:{color:e["wcf-pre-checkout-offer-desc-color"]}},(0,i.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,i.createElement)("div",{className:"wcf-nav-bar-step active"},(0,i.createElement)("div",{className:"wcf-nav-bar-title mb-3",style:{color:e["wcf-pre-checkout-offer-desc-color"]}},(0,D.__)("Order Submitted","cartflows")),(0,i.createElement)("div",{className:"wcf-nav-bar-step-line relative"},(0,i.createElement)("div",{className:"wcf-progress-nav-step",style:{backgroundColor:e["wcf-pre-checkout-offer-navbar-color"]}},(0,i.createElement)("span",{className:"before"})),(0,i.createElement)("span",{className:"order-after",style:{backgroundColor:e["wcf-pre-checkout-offer-navbar-color"]}}))),(0,i.createElement)("div",{className:"wcf-nav-bar-step active inprogress"},(0,i.createElement)("div",{className:"wcf-nav-bar-title mb-3",style:{color:e["wcf-pre-checkout-offer-desc-color"]}},(0,D.__)("Special Offer","cartflows")),(0,i.createElement)("div",{className:"wcf-nav-bar-step-line relative"},(0,i.createElement)("span",{className:"before",style:{backgroundColor:e["wcf-pre-checkout-offer-navbar-color"]}}),(0,i.createElement)("div",{className:"wcf-progress-nav-step",style:{backgroundColor:e["wcf-pre-checkout-offer-navbar-color"]}},(0,i.createElement)("span",{className:"before"})),(0,i.createElement)("span",{className:"after"}))),(0,i.createElement)("div",{className:"wcf-nav-bar-step"},(0,i.createElement)("div",{className:"wcf-nav-bar-title mb-3"},(0,D.__)("Order Receipt","cartflows")),(0,i.createElement)("div",{className:"wcf-nav-bar-step-line relative"},(0,i.createElement)("span",{className:"before"}),(0,i.createElement)("div",{className:"wcf-progress-nav-step"})))))),(0,i.createElement)("div",{className:"wcf-content-main-head text-center mb-8"},(0,i.createElement)("div",{className:"wcf-content-modal-title"},(0,i.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,i.createElement)("div",{className:"wcf-content-modal-sub-title"},(0,i.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,i.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,i.createElement)("div",{className:"flex gap-4 p-5 items-center"},(0,i.createElement)("div",{className:"wcf-pre-checkout-info wcf-pre-checkout-img w-2/5"},(0,i.createElement)("img",{src:d,alt:"Checkout Offer Product",className:"border border-border-subtle"})),(0,i.createElement)("div",{className:"wcf-pre-checkout-info wcf-pre-checkout-offer-product-details w-3/5"},(0,i.createElement)("div",{className:"wcf-pre-checkout-offer-product-title"},(0,i.createElement)("h1",{style:{color:e["wcf-pre-checkout-offer-title-color"]}},e["wcf-pre-checkout-offer-product-title"])),(0,i.createElement)("div",{className:"wcf-pre-checkout-offer-price",style:{color:e["wcf-pre-checkout-offer-desc-color"],fontWeight:500}},cartflows_admin.woo_currency,""!==l&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("del",{className:"wcf-regular-price"},isNaN(c)?0:c),(0,i.createElement)("span",{className:"wcf-discount-price"}," ",l)),""===l&&(0,i.createElement)("span",{className:"wcf-regular-price"},isNaN(c)?0:c)),(0,i.createElement)("div",{className:"wcf-pre-checkout-offer-desc"},(0,i.createElement)("span",{style:{color:e["wcf-pre-checkout-offer-desc-color"],lineHeight:"0"}},Wm((e["wcf-pre-checkout-offer-desc"]||"").toString()))),(0,i.createElement)("input",{type:"hidden",value:"add",className:"wcf-pre-checkout-offer-action"}))),(0,i.createElement)("div",{className:"wcf-pre-checkout-offer-actions flex flex-col gap-3 p-5"},(0,i.createElement)("div",{className:"wcf-pre-checkout-offer-btn-action wcf-pre-checkout-add-cart-btn"},(0,i.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,i.createElement)("div",{className:"wcf-pre-checkout-offer-btn-action wcf-pre-checkout-skip-btn text-center"},(0,i.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"]))))))))))},xS=function(){const[{settings_data:e,options:t}]=Zp(),[n,r]=(0,s.useState)("product"),o=zh();if(!wcfCartflowsPro())return(0,i.createElement)(VE,{feature:"Checkout Offer",plan_required:"starter"});if(void 0===e.settings)return(0,i.createElement)(mS,null);const a="yes"===t["wcf-pre-checkout-offer"];return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(yM,{name:"wcf-pre-checkout-offer",value:t["wcf-pre-checkout-offer"],label:(0,D.__)("Enable Checkout Offer","cartflows"),fullWidth:!0}),a&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-co-preview"},(0,i.createElement)(vS,null)),(0,i.createElement)("div",{className:"mt-8 mb-8"},(0,i.createElement)(YM.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,D.__)("Save Changes","cartflows"),description:(0,D.__)("You have made changes. Do you want to save the changes?","cartflows"),actionBtnText:(0,D.__)("Save","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})}()||r(e),window.wcfUnsavedChanges=!1):r(e)}(e.slug)},(0,i.createElement)(YM.Tab,{slug:"product",text:(0,D.__)("Product","cartflows"),icon:(0,i.createElement)(HM,{className:"w-4 h-4"})}),(0,i.createElement)(YM.Tab,{slug:"content",text:(0,D.__)("Content","cartflows"),icon:(0,i.createElement)(XM,{className:"w-4 h-4"})}),(0,i.createElement)(YM.Tab,{slug:"styles",text:(0,D.__)("Styles","cartflows"),icon:(0,i.createElement)(JM,{className:"w-4 h-4"})}))),(0,i.createElement)("div",{className:"wcf-checkout-offer-settings wcf-checkout__section"},(0,i.createElement)(hS,{tab:n,displayAs:"div"}))))},NS=function(){return(0,i.createElement)("div",{className:"wcf-checkout-rules-page"},(0,i.createElement)("div",{className:"wcf-checkout-rules-page--enable_option"},(0,i.createElement)(Eg,{width:"65%"})),(0,i.createElement)("div",{className:"wcf-checkout-rules--group_wrapper"},(0,i.createElement)("div",{className:"wcf-checkout-rules--text"},(0,i.createElement)(Eg,{width:"10%"}),(0,i.createElement)(Ig,{width:"25%",height:"35px"}),(0,i.createElement)(Eg,{width:"20%"})),(0,i.createElement)("div",{className:"wcf-checkout-rules"},Array(3).fill().map((e,t)=>(0,i.createElement)("div",{className:"wcf-checkout-rule",key:t},(0,i.createElement)("div",{className:"wcf-checkout-rule--select-box"},(0,i.createElement)(Ig,{height:"35px",width:"30%"}),(0,i.createElement)(Ig,{height:"35px",width:"30%"}),(0,i.createElement)(Ig,{height:"35px",width:"30%"})),2!==t&&(0,i.createElement)("div",{className:"wcf-checkout-rule__and"},(0,i.createElement)(Ig,{height:"25px",width:"5%"}))))),(0,i.createElement)(Ig,{height:"40px",width:"9%"})),(0,i.createElement)("div",{className:"wcf-checkout-rules--or"},(0,i.createElement)(Ig,{height:"35px",width:"5%"}),(0,i.createElement)(Ig,{height:"45px",width:"12%"})),(0,i.createElement)("div",{className:"wcf-checkout-rules--default-step"},(0,i.createElement)(Eg,{width:"10%"}),(0,i.createElement)(Ig,{width:"25%",height:"35px"}),(0,i.createElement)(Eg,{width:"20%"})))},_S=function(){return(0,i.createElement)(QI,{title:(0,D.__)("Show Every Customer the Offer They’ll Actually Buy","cartflows"),description:(0,D.__)("Target offers by location, cart value, and more. Upgrade to CartFlows Pro and turn every visit into a personalized sale.","cartflows")})},ES=function({rules:e,group_id:t,g_index:n,groups_length:r}){const[{page_settings:o},a]=Zp(),s=o?.settings.rules,l=s?.conditions;return(0,i.createElement)(i.Fragment,null,e.map((o,c)=>{const d=o?.rule_id,u=e[c],f=s?.field_data[u.condition],p=f?.operator||[],m=u.operator||p[0]?.value||"",h=String(m).replace(/</g,"<").replace(/>/g,">"),g=((e=[])=>"wcf-checkout-rules--rule_fields flex flex-col justify-center items-end sm:grid gap-3 w-full "+(e.some(e=>"product"===e.type)?"sm:grid-cols-2":"sm:grid-cols-3"))(f?.fields);return(0,i.createElement)(i.Fragment,null,0!==c&&(0,i.createElement)("div",{className:"wcf-checkout-rules--group_rules__condition-label"},(0,i.createElement)("div",{className:"wcf--condition-label__and_group relative"},(0,i.createElement)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true"},(0,i.createElement)("div",{className:"w-full border-t border-border-subtle border-dashed"})),(0,i.createElement)("div",{className:"relative flex justify-center"},(0,i.createElement)(Tf,{variant:"neutral",type:"rounded",size:"xs",label:(0,D.__)("AND","cartflows"),className:"wcf--condition-label__and_group__text"})))),(0,i.createElement)("div",{className:"wcf-checkout-rules--group_rules flex gap-3 items-center","data-rule-id":d,key:d},(0,i.createElement)("input",{type:"hidden",name:`wcf-checkout-rules[${n}][rules][${c}][rule_id]`,value:d}),(0,i.createElement)("div",{className:g},(0,i.createElement)(cw,{name:`wcf-checkout-rules[${n}][rules][${c}][condition]`,wrapperClass:"block",options:l,onSelect:()=>{a({type:"RESET_RULE_VALUE",name:"wcf-checkout-rules",group_id:t,rule_id:d})},value:u.condition,sectionClass:"w-full sm:!w-auto"}),(0,i.createElement)(cw,{name:`wcf-checkout-rules[${n}][rules][${c}][operator]`,wrapperClass:"block",options:f?.operator,value:Wm(h),sectionClass:"w-full sm:!w-auto"}),function(e,t,r){const o=r.value;let a="";const s=`wcf-checkout-rules[${n}][rules][${t}][value]`;return e&&e?.map(e=>{switch(e.type){case"multitext":a=(0,i.createElement)(wM,{name:`${s}`,value:o,fields:e.fields});break;case"text":a=(0,i.createElement)(dw,{name:`${s}`,value:o,placeholder:e.placeholder,tooltip:e.tooltip,contentClass:"w-full"});break;case"select2":a=(0,i.createElement)(ox,{name:`${s}[]`,value:o,placeholder:e.placeholder,tooltip:e.tooltip,options:e.options,isMulti:e.isMulti,isSearchable:e?.enable_search});break;case"number":a=(0,i.createElement)(xx,{name:s,value:o,min:0,placeholder:e.placeholder,tooltip:e.tooltip});break;case"coupon":a="exist"===r.operator||"not_exist"===r.operator?(0,i.createElement)(cw,{name:s,options:[{label:"in parent order",value:"parent_order"}]}):(0,i.createElement)(lM,{name:s,placeholder:e.placeholder,tooltip:e.tooltip,value:o,isMulti:e.isMulti});break;case"product":a=(0,i.createElement)(sM,{name:s,placeholder:e.placeholder,tooltip:e.tooltip,value:o,isMulti:e.isMulti,sectionClass:"col-span-full",showLabelOnly:!0})}return a})}(f?.fields,c,u)),(0,i.createElement)("div",{className:"wcf-checkout-rules--rule_actions"},function(e,n){return 1===e&&1===r?"":(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(Xm,{className:"w-4 h-4 stroke-2 text-text-tertiary"}),className:"!p-1 hover:!bg-background-secondary [&_svg]:hover:text-brand-700",onClick:e=>{e.currentTarget.setAttribute("rule_id",n),(e=>{const n=e.target.getAttribute("rule_id");t&&n&&a({type:"REMOVE_RULE",name:"wcf-checkout-rules",rule_id:n,group_id:t})})({target:e.currentTarget})},rule_id:n})}(e.length,d))))}))},MS=e=>(0,i.createElement)("svg",(0,w.A)({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e),(0,i.createElement)("circle",{cx:"7",cy:"5",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"7",cy:"10",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"7",cy:"15",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"13",cy:"5",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"13",cy:"10",r:"1.25",fill:"currentColor"}),(0,i.createElement)("circle",{cx:"13",cy:"15",r:"1.25",fill:"currentColor"})),IS=function(){const[{step_data:e,step_id:t,options:n},r]=Zp(),[o,a]=(0,s.useState)({ruleGroupId:"",isOpen:!1}),[{license_status:l}]=u(),{ruleGroupId:c,isOpen:d}=o;if(!wcfCartflowsPro()||"Activated"!==l)return(0,i.createElement)(_S,null);if(null===n)return(0,i.createElement)(NS,null);const f=n["wcf-checkout-rules"];if(void 0===f)return(0,i.createElement)(FE,{content:(0,D.__)("Please Update the CartFlows Pro to the latest version to use the dynamic offers feature.","cartflows")});const p=()=>{const e={group_id:Math.random().toString(36).substring(2,5),rules:[{rule_id:Math.random().toString(36).substring(2,5),condition:"cart_item",operator:"",value:""}]};r({type:"ADD_NEW_GROUP",name:"wcf-checkout-rules",newGroup:e})},m=function(e){const t=e.target.getAttribute("data-group_id");a({ruleGroupId:t,isOpen:c!==t||!d})};return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-checkout-rules-page"},(0,i.createElement)("div",{className:"wcf-checkout-rules-page--enable_option"},(0,i.createElement)(yM,{name:"wcf-checkout-rules-option",value:n["wcf-checkout-rules-option"],label:(0,D.__)("Enable Dynamic Offers","cartflows"),tooltip:(0,D.__)("Turn this on to set up rules that decide when visitors should be redirected to a special offer or the next step.","cartflows"),fullWidth:!0})),"yes"===n["wcf-checkout-rules-option"]&&f&&(0,i.createElement)("div",{className:"mt-8"},(0,i.createElement)(Wp.ReactSortable,{id:"wcf-checkout-rules-sortable-wrapper",className:"wcf-checkout-rules--sortable-wrapper flex flex-col gap-4",list:f,setList:e=>r({type:"SET_RULES_GROUPS",groups:e,fieldName:"wcf-checkout-rules",step_id:t}),swapThreshold:.8,direction:"vertical",animation:150,handle:".wcf-checkout-rules--group",filter:".wcf-checkout-rules--rule_fields, .wcf-checkout-rules--rule_actions, .wcf-field.wcf-select-option, .wcf-checkout-rules--add-rule__repeater .wcf-button.wcf-button--secondary, .wcf-field__data--content, .wcf-checkout-rules-page--group_wrapper__footer, .wcf-checkout-rules--group_header",preventOnFilter:!1,onStart:function(){document.getElementsByClassName("wcf-checkout-rules--or_group__button")[0].setAttribute("style","display:none")},onEnd:function(){document.getElementsByClassName("wcf-checkout-rules--or_group__button")[0].setAttribute("style","display:inline-block")}},f.map((t,n)=>{const o=t.group_id,a=t.rules;return(0,i.createElement)("div",{className:"wcf-checkout-rules-page--group_wrapper",key:o},(0,i.createElement)("div",{className:"wcf-checkout-rules--group border border-solid border-cartflows-border rounded-md shadow-sm bg-background-primary overflow-hidden","data-group-id":o},(0,i.createElement)("input",{type:"hidden",name:`wcf-checkout-rules[${n}][group_id]`,value:o}),(0,i.createElement)("div",{className:"wcf-checkout-rules--group-header wcf-redirection-step bg-background-primary p-4 flex items-center justify-between flex-wrap gap-4"},(0,i.createElement)("div",{className:"wcf-checkout-rules--group-header__left flex gap-4 items-center"},(0,i.createElement)("div",{className:"wcf-checkout-rule--sortable-toggle flex cursor-move text-text-tertiary hover:text-text-secondary"},(0,i.createElement)(MS,null)),(0,i.createElement)("div",{className:"border border-solid border-cartflows-border rounded-md shadow-sm flex items-center gap-4 px-3 py-1 h-10 bg-background-primary"},(0,i.createElement)("div",{className:"text-sm font-normal text-text-tertiary whitespace-nowrap"},(0,D.__)("Redirect to:","cartflows")),(0,i.createElement)(cw,{name:`wcf-checkout-rules[${n}][step_id]`,class:"w-full !max-w-full h-auto input-field !text-sm !font-medium !rounded-none !text-text-primary !border-none focus:ring-0 focus:!border-none focus:!shadow-none !outline-0 !outline-none !m-0 !p-0 !placeholder-text-tertiary",value:t.step_id,placeholder:(0,D.__)("Search for step…","cartflows"),options:e.step_lists,overrideCss:!0})),(0,i.createElement)("div",{className:"text-sm font-normal text-text-tertiary"},(0,D.__)("If the following conditions are true","cartflows"))),(0,i.createElement)("div",{className:"wcf-checkout-rules--group-header__right flex gap-2 items-center"},c===o&&d?(0,i.createElement)(gg,{className:"w-4 h-4 stroke-1 text-text-tertiary hover:text-text-secondary cursor-pointer","aria-hidden":"true",onClick:m,"data-group_id":o}):(0,i.createElement)(Tp,{className:"w-4 h-4 stroke-1 text-text-tertiary hover:text-text-secondary cursor-pointer","aria-hidden":"true",onClick:m,"data-group_id":o}))),(0,i.createElement)("div",{id:`wcf-checkout-rules--group-${o}`,className:"p-4 bg-background-secondary border-t border-solid border-border-subtle border-0 "+(c===o&&d?"visible":"hidden")},(0,i.createElement)("div",{className:"wcf-checkout-rules--group-rules__wrapper flex flex-col gap-4"},0!==a.length&&(0,i.createElement)(ES,{rules:a,group_id:o,g_index:n,groups_length:f.length})),(0,i.createElement)("div",{className:"wcf-checkout-rules--add-rule__repeater flex mt-4"},(0,i.createElement)(Po,{variant:"link",size:"sm",icon:(0,i.createElement)(yg,{className:"w-4 h-4 stroke-2"}),iconPosition:"left",className:"wcf-checkout-rules--add-rule__button hover:!no-underline",onClick:()=>(e=>{const t={rule_id:Math.random().toString(36).substring(2,5),condition:"cart_item",operator:"",value:""};r({type:"ADD_NEW_RULE",name:"wcf-checkout-rules",newRule:t,group_id:e})})(o)},(0,D.__)("Add Condition","cartflows"))))),(0,i.createElement)("div",{className:"wcf-checkout-rules-page--group_wrapper__footer"},(0,i.createElement)("div",{className:"wcf-checkout-rules--or-group relative my-4"},(0,i.createElement)("div",{className:"absolute inset-0 flex items-center","aria-hidden":"true"},(0,i.createElement)("div",{className:"w-full border-t border-border-subtle border-dashed"})),(0,i.createElement)("div",{className:"relative flex justify-center"},(0,i.createElement)(Tf,{variant:"neutral",type:"rounded",size:"xs",label:(0,D.__)("OR","cartflows"),className:"wcf-checkout-rules--or_group__text"}))),parseInt(n)+1===f.length&&(0,i.createElement)("div",{className:"wcf-checkout-rules--or_group__button mt-4"},(0,i.createElement)(Po,{variant:"outline",size:"md",icon:(0,i.createElement)(yg,{className:"w-4 h-4 stroke-2"}),iconPosition:"left",className:"wcf-checkout-rules--or_group_button !bg-brand-25 !text-brand-600 !outline-brand-300 hover:!bg-brand-50 hover:!outline-brand-300",onClick:p},(0,D.__)("Add Dynamic Offer","cartflows")))))}))),"yes"===n["wcf-checkout-rules-option"]&&(0,i.createElement)("div",{className:"wcf-checkout-rules--default-step border border-solid border-cartflows-border rounded-md shadow-sm bg-background-primary p-4 flex items-center justify-between gap-4 mt-8"},(0,i.createElement)("div",{className:"wcf-checkout-rules--default-step__left border border-solid border-cartflows-border rounded-md shadow-sm flex items-center gap-4 px-3 h-10 bg-background-primary"},(0,i.createElement)("div",{className:"text-sm font-normal text-text-tertiary whitespace-nowrap"},(0,D.__)("Redirect to:","cartflows")),(0,i.createElement)(cw,{name:"wcf-checkout-rules-default-step",class:"w-full !max-w-full h-auto input-field !text-sm !font-medium !rounded-none !text-text-primary !border-none focus:ring-0 focus:!border-none focus:!shadow-none !outline-0 !outline-none !m-0 !p-0 !placeholder-text-tertiary",value:n["wcf-checkout-rules-default-step"],placeholder:(0,D.__)("Search for default step…","cartflows"),options:e.step_lists,overrideCss:!0})),(0,i.createElement)("div",{className:"text-sm font-normal text-text-tertiary"},(0,D.__)("If all of the above conditions failed.","cartflows")))))};function SS({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 12a2.25 2.25 0 0 0-2.25-2.25H15a3 3 0 1 1-6 0H5.25A2.25 2.25 0 0 0 3 12m18 0v6a2.25 2.25 0 0 1-2.25 2.25H5.25A2.25 2.25 0 0 1 3 18v-6m18 0V9M3 12V9m18 0a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 9m18 0V6a2.25 2.25 0 0 0-2.25-2.25H5.25A2.25 2.25 0 0 0 3 6v3"}))}const kS=s.forwardRef(SS),DS=function(e){const{innerField:t,innerFieldData:n}=e,[{options:r}]=Zp();return(0,i.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 a=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,i.createElement)(dw,{name:t.name,value:a,label:t.label,placeholder:t.placeholder,readonly:t.readonly,tooltip:t.tooltip,displayAlign:"vertical"});break;case"number":o=(0,i.createElement)(xx,{name:t.name,value:a,label:t.label,readonly:t.readonly,tooltip:t.tooltip,displayAlign:"vertical",min:t.min});break;case"checkbox":o=(0,i.createElement)(jg,{class:t.class,name:t.name,value:a,label:t.label,desc:t.desc,child_className:t.child_class});break;case"select":o=(0,i.createElement)(cw,{class:t.class,name:t.name,value:a,label:t.label,options:t.options,tooltip:t.tooltip,displayAlign:"vertical"});break;case"doc":o=(0,i.createElement)(FE,{content:t.content})}return(0,i.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)}))},CS=function(e){const[{billing_fields:t,shipping_fields:n},r]=Zp(),{step:o,type:a,removeCallback:l}=e,[c,d]=(0,s.useState)(""),[u,f]=(0,s.useState)("");let p=[];p="billing"===a?t:n;const m=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"),d(t)):(n.classList.add("hidden"),d("")))},h=function(e){l(e,f)},g=({name:e,value:o,fieldName:i})=>{const s=("billing"===a?t:n).map(t=>t.field_options[i].name===e?{...t,field_options:{...t.field_options,[i]:{...t.field_options[i],value:o}}}:t);r({type:"SET_FIELDS",field_type:a,fields:s})};return(0,i.createElement)("div",{className:"py-5"},(0,i.createElement)("div",{className:`wcf-${a}-fields--header flex items-center p-3 gap-4 bg-background-secondary rounded-md`},(0,i.createElement)("div",{className:"w-3/12 pl-7"},(0,D.__)("Label","cartflows")),(0,i.createElement)("div",{className:"w-3/12"},(0,D.__)("ID","cartflows")),(0,i.createElement)("div",{className:"w-1/5 text-center"},(0,D.__)("Enable","cartflows")),(0,i.createElement)("div",{className:"w-1/5 text-center"},(0,D.__)("Required","cartflows")),(0,i.createElement)("div",{className:"w-1/12 text-center"},(0,D.__)("Edit","cartflows"))),(0,i.createElement)(Wp.ReactSortable,{list:[...p],setList:e=>r({type:"SET_FIELDS",field_type:a,fields:e}),direction:"vertical",animation:150,handle:".wcf-field-item-handle",filter:".wcf-field-settings-icon, .wcf-toggle-field"},p&&p.map(e=>{const t=e.key,n=e.field_options["enable-field"],r=e.field_options["required-field"];return(0,i.createElement)("div",{key:t,className:"wcf-field-item-handle "+("yes"!==n.value?"!text-text-tertiary":""),"data-key":t},(0,i.createElement)("div",{className:"wcf-fields-wrapper flex items-center p-3 border-0 border-b border-solid border-border-subtle gap-4"},(0,i.createElement)("div",{className:"wcf-field--label whitespace-nowrap w-3/12 flex items-center mr-auto"},(0,i.createElement)("div",{className:"wcf-cpf--sortable-toggle flex cursor-move text-text-tertiary"},(0,i.createElement)(lh,{className:"w-5 h-5 stroke-1","aria-hidden":"true"}),(0,i.createElement)(lh,{className:"w-5 h-5 stroke-1 -ml-3.5","aria-hidden":"true"})),(0,i.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,i.createElement)(Zo,{content:(0,D.__)("Your email address can't be edited when using the Modern Checkout Style.","cartflows"),placement:"top"},(0,i.createElement)("span",null,(0,i.createElement)(vg,{className:"w-4 h-4 text-icon-secondary cursor-help ml-1"}))),"billing_company"===t&&"checkout"===o&&(0,i.createElement)(Zo,{content:(0,D.__)("The Company field won't be visible if you're using the Instant Layout Style.","cartflows"),placement:"top"},(0,i.createElement)("span",null,(0,i.createElement)(vg,{className:"w-4 h-4 text-icon-secondary cursor-help ml-1"})))),(0,i.createElement)("div",{className:"wcf-field--key whitespace-nowrap w-3/12 text-ellipsis overflow-hidden mr-auto cursor-default"},e.key),(0,i.createElement)("div",{className:"wcf-field--is-enable w-1/5 wcf-toggle-field flex justify-center"},(0,i.createElement)(Pg,{value:"yes"===n.value,onChange:e=>g({name:n.name,value:e?"yes":"no",fieldName:"enable-field"})}),(0,i.createElement)("input",{type:"hidden",name:n.name,value:n.value})),(0,i.createElement)("div",{className:"wcf-field--is-required w-1/5 wcf-toggle-field flex justify-center"},(0,i.createElement)(Pg,{value:"yes"===n.value&&"yes"===r.value,onChange:e=>g({name:r.name,value:e?"yes":"no",fieldName:"required-field"}),disabled:"yes"!==n.value}),(0,i.createElement)("input",{type:"hidden",name:r.name,value:"yes"!==n.value?"no":r.value})),(0,i.createElement)("div",{className:"wcf-field-settings-icon flex gap-2 w-1/12 justify-center items-center"},(0,i.createElement)("div",{onClick:m,"data-name":t},(0,i.createElement)(Hh,{className:"w-4 h-4 cursor-pointer "+(c===t?"text-brand-500":"text-text-tertiary hover:text-brand-500"),"data-name":t})),e.custom&&(0,i.createElement)("div",{"data-key":t,"data-type":a,onClick:h},t===u?(0,i.createElement)(zf,{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":a}):(0,i.createElement)(Xm,{className:"wcf-delete-cpf--button-delete p-1 h-4 w-4 text-brand-500 cursor-pointer","data-key":t,"data-type":a})))),(0,i.createElement)(DS,{innerField:t,innerFieldData:e,removecustomField:h,type:a}))})))},jS={left:{open:{x:0},exit:{x:"-100%"}},right:{open:{x:0},exit:{x:"100%"}}},AS=({children:e,className:t})=>{const{open:n,position:r,handleClose:o,transitionDuration:a,getFloatingProps:i,drawerContainerRef:s,scrollLock:l,context:c,className:d,refs:u}=VS();return c&&i?(0,C.jsx)(sp,{children:n&&(0,C.jsx)(to,{ref:s,lockScroll:l,className:Ie("z-50",d),children:(0,C.jsx)(Jr,{context:c,modal:!0,...u?.reference&&{returnFocus:u.reference},children:(0,C.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,C.jsx)("div",{className:"relative inset-0 h-full flex items-center",children:(0,C.jsx)("div",{className:Ie("flex items-center justify-center h-full w-full",{"justify-start":"left"===r,"justify-end":"right"===r}),children:(0,C.jsx)(bf.div,{className:Ie("flex flex-col w-120 h-full bg-background-primary shadow-2xl overflow-hidden z-20",t),initial:"exit",animate:"open",exit:"exit",variants:jS[r],transition:a,ref:e=>{setTimeout(()=>{u?.setFloating(e)},1e3*((a?.duration||.3)+.1))},"aria-label":"drawer",role:"dialog","aria-modal":"true",...i?.(),children:"function"==typeof e?e({close:o}):e})})})})})})}):null};AS.displayName="Drawer.Panel";const TS=({children:e,className:t,...n})=>(0,C.jsx)("div",{className:Ie("space-y-2 px-5 pt-5 pb-4",t),...n,children:e});TS.displayName="Drawer.Header";const LS=({children:e,as:t="h3",className:n,...r})=>(0,C.jsx)(t,{className:Ie("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});LS.displayName="Drawer.Title";const OS=({children:e,as:t="p",className:n,...r})=>(0,C.jsx)(t,{className:Ie("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});OS.displayName="Drawer.Description";const zS=({children:e,className:t,...n})=>(0,C.jsx)("div",{className:Ie("px-5 pb-4 pt-2 flex flex-col flex-1 overflow-y-auto overflow-x-hidden",t),...n,children:e});zS.displayName="Drawer.Body";const PS=({children:e,className:t})=>{const{design:n,handleClose:r}=VS();return(0,C.jsx)("div",{className:Ie("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})};PS.displayName="Drawer.Footer";const RS=({className:e,...t})=>(0,C.jsx)("button",{className:Ie("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close drawer",...t,children:(0,C.jsx)(Af,{className:"size-4 text-text-primary shrink-0"})}),US=({children:e,as:t=s.Fragment,...n})=>{const{handleClose:r}=VS();return e?t===s.Fragment?"function"==typeof e?e({close:r}):(0,s.isValidElement)(e)?(0,s.cloneElement)(e,{onClick:r}):(0,C.jsx)(RS,{onClick:r,...n}):(0,C.jsx)(t,{...n,onClick:r,children:e}):(0,C.jsx)(RS,{onClick:r,...n})};US.displayName="Drawer.CloseButton";const BS={open:{opacity:1},exit:{opacity:0}},FS=({className:e,...t})=>{const{open:n,drawerContainerRef:r,transitionDuration:o}=VS(),[a,i]=(0,s.useState)(null);(0,s.useEffect)(()=>{r?.current&&i(r.current)},[n,r]);const l=(0,C.jsx)(sp,{mode:"wait",children:n&&(0,s.createElement)(bf.div,{className:Ie("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:BS,transition:o,key:"backdrop"})});return a?(0,cn.createPortal)(l,a):l};FS.displayName="Drawer.Backdrop";const QS=(0,s.createContext)({}),VS=()=>(0,s.useContext)(QS),YS=({open:e,setOpen:t,children:n,trigger:r,className:o,exitOnClickOutside:a=!1,exitOnEsc:i=!0,design:l="simple",position:c="right",transitionDuration:d=.2,scrollLock:u=!0})=>{const f=void 0!==e&&void 0!==t,[p,m]=(0,s.useState)(!1),h=(0,s.useRef)(null),g=(0,s.useMemo)(()=>f?e:p,[e,p,f]),w=(0,s.useMemo)(()=>f?t:m,[t,m,f]),y=()=>{g||w(!0)},{refs:b,context:v}=co({open:g,onOpenChange:w,transform:!1}),x=lo(v,{enabled:i||a,escapeKey:i,outsidePress:e=>!!a&&!e?.target?.closest("ul.fui-toast-container")}),N=No(v,{role:"dialog"}),_=oo(v),{getFloatingProps:E}=mo([x,N,_]),M=(0,s.useCallback)(()=>(0,s.isValidElement)(r)?(0,s.cloneElement)(r,{onClick:Se(y,r.props.onClick),ref:b.setReference,"aria-haspopup":"dialog","aria-expanded":g}):"function"==typeof r?r({onClick:y}):null,[r,y,b.setReference]);return(0,C.jsxs)(C.Fragment,{children:[M(),(0,C.jsx)(QS.Provider,{value:{open:g,setOpen:w,handleClose:()=>{g&&w(!1)},design:l,position:c,drawerContainerRef:h,transitionDuration:{duration:d},getFloatingProps:E,scrollLock:u,context:v,className:o,refs:b},children:n})]})};YS.displayName="Drawer",YS.Panel=AS,YS.Header=TS,YS.Title=LS,YS.Description=OS,YS.Body=zS,YS.CloseButton=US,YS.Footer=PS,YS.Backdrop=FS,YS.Portal=({children:e,...t})=>(0,C.jsx)(Yr,{...t,children:e});const ZS=function(e){const{addNewField:t,step_type:n}=e,r=(0,D.__)("Add New Field","cartflows"),o=(0,D.__)("Date & Time","cartflows"),[a,l]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),[u,f]=(0,s.useState)(r),[p,m]=(0,s.useState)(),h=function(){l(!1),d(!1),b(!1),f(r)},[g,w]=(0,s.useState)(!1),[y,b]=(0,s.useState)(!1),[v,x]=(0,s.useState)(!0),[N,_]=(0,s.useState)(!1),[E,M]=(0,s.useState)(!1),[I,S]=(0,s.useState)(!1),[k,C]=(0,s.useState)("datetime-local"),[j,A]=(0,s.useState)(o),T=function(){b(!y)},[L,O]=(0,s.useState)(!1),z=function(){const e=document.getElementById("wcf-checkout-custom-fields[0][type]").value;_(!1),M(!1),S(!1),x(!1),O(!1),"text"===e||"textarea"===e?x(!0):"select"===e?S(!0):"checkbox"===e?_(!0):"radio"===e?M(!0):"file"===e&&O(!0),w(e)},P=function(e){let t=e.replace(/[^a-zA-Z\d ]/g," ");t=t.replace(/\s/g,"_").toLowerCase(),m(t)},R=function(e){C(e.target.value),"datetime-local"===e.target.value?A(o):A(e.target.value)},U=function(){let e="";if("datetime"!==g)return e;switch(k){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,i.createElement)("div",{className:"wcf-custom-field-box"},(0,i.createElement)("div",{className:"flex justify-end"},(0,i.createElement)(Po,{variant:"outline",size:"md",className:"wcf-add-custom-field text-brand-500 bg-brand-50 outline-brand-500",onClick:function(e){e.preventDefault(),m(""),l(!a)},icon:(0,i.createElement)(yg,{className:"h-18 w-18 text-brand-500"}),iconPosition:"left"},(0,D.__)("Add Custom Field","cartflows"))),(0,i.createElement)(YS,{open:a,setOpen:e=>{e||h()},position:"right",exitOnClickOutside:!1,className:"wcf-add-custom-field-drawer z-999999"},(0,i.createElement)(YS.Panel,{className:"pointer-events-auto w-screen max-w-xl flex flex-col h-full"},(0,i.createElement)(YS.Backdrop,null),(0,i.createElement)(YS.Header,{className:"flex items-center justify-between !space-y-0"},(0,i.createElement)(YS.Title,null,(0,D.__)("Add Custom Field","cartflows")),(0,i.createElement)(YS.CloseButton,{type:"button"})),(0,i.createElement)(YS.Body,{className:"wcf-cfe-content flex-1 overflow-y-auto"},function(){const e=[{value:"billing",label:(0,D.__)("Billing","cartflows")},{value:"shipping",label:(0,D.__)("Shipping","cartflows")}],t=[{value:"text",label:(0,D.__)("Text","cartflows")},{value:"textarea",label:(0,D.__)("TextArea","cartflows")},{value:"number",label:(0,D.__)("Number","cartflows")},{value:"datetime",label:(0,D.__)("Date & Time","cartflows")},{value:"checkbox",label:(0,D.__)("Checkbox","cartflows")},{value:"radio",label:(0,D.__)("Radio","cartflows")},{value:"select",label:(0,D.__)("Select","cartflows")},{value:"hidden",label:(0,D.__)("Hidden","cartflows")},{value:"file",label:(0,D.__)("File","cartflows")}],r=[{value:"33",label:(0,D.__)("33%","cartflows")},{value:"50",label:(0,D.__)("50%","cartflows")},{value:"100",label:(0,D.__)("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,i.createElement)("div",{className:"wcf-custom-field-form--wrapper text-left"},"checkout"===n&&(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(cw,{class:"wcf-cpf-add_to",name:"wcf-checkout-custom-fields[0][add_to]",options:e,label:(0,D.__)("Add To","cartflows"),displayAlign:"vertical"})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(cw,{class:"wcf-cpf-type",id:"wcf-checkout-custom-fields[0][type]",name:"wcf-checkout-custom-fields[0][type]",options:t,label:(0,D.__)("Type","cartflows"),onSelect:z,displayAlign:"vertical"})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(dw,{class:`wcf-cpf-label ${o}`,name:"wcf-checkout-custom-fields[0][label]",label:Wm((0,D.sprintf)(/* translators: %$s is replaced with the HTML tag */ /* translators: %$s is replaced with the HTML tag */ |
| 37 |
(0,D.__)("Label %1$s*%2$s","cartflows"),'<span class="text-brand-300">',"</span>")),onChangeCB:P,displayAlign:"vertical",placeholder:(0,D.__)("e.g. Phone Number","cartflows")})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(dw,{class:`wcf-cpf-name ${o}`,name:"wcf-checkout-custom-fields[0][key]",value:p,label:(0,D.__)("Field ID","cartflows"),displayAlign:"vertical",placeholder:(0,D.__)("e.g. phone_number","cartflows")}),(0,i.createElement)(Ym,{as:"span",className:"text-sm font-normal text-text-tertiary mt-2 block"},(0,D.__)('Field value will store in this meta key. Add field id without prefix like "billing_" or "shipping_". Use "_" instead of spaces.',"cartflows"))),"number"===g&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(xx,{class:`wcf-cpf-min ${o}`,name:"wcf-checkout-custom-fields[0][min]",label:(0,D.__)("Min Value","cartflows"),displayAlign:"vertical",min:0,placeholder:(0,D.__)("e.g. 0","cartflows")})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(xx,{class:`wcf-cpf-max ${o}`,name:"wcf-checkout-custom-fields[0][max]",label:(0,D.__)("Max Value","cartflows"),displayAlign:"vertical",min:0,placeholder:(0,D.__)("e.g. 100","cartflows")}))),(I||E)&&(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(fw,{class:`wcf-cpf-options ${o}`,name:"wcf-checkout-custom-fields[0][options]",label:(0,D.__)("Options","cartflows"),placeholder:(0,D.__)("Enter your options separated by (|).","cartflows"),displayAlign:"vertical"})),N&&(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(cw,{class:"wcf-cpf-default",name:"wcf-checkout-custom-fields[0][default]",label:(0,D.__)("Default","cartflows"),options:[{value:"1",label:(0,D.__)("Checked","cartflows")},{value:"0",label:(0,D.__)("UnChecked","cartflows")}],displayAlign:"vertical"})),"datetime"===g&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(cw,{class:`wcf-cpf-date-input ${o}`,name:"wcf-checkout-custom-fields[0][date_input]",label:(0,D.__)("Field Input Type","cartflows"),options:[{label:(0,D.__)("Date & Time","cartflows"),value:"datetime-local"},{label:(0,D.__)("Date","cartflows"),value:"date"},{label:(0,D.__)("Time","cartflows"),value:"time"}],displayAlign:"vertical",value:k,onSelect:R})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(dw,{class:`wcf-cpf-min-date ${o}`,labelClass:"text-sm font-medium text-left capitalize",textFieldType:k,name:"wcf-checkout-custom-fields[0][default]",label:(0,D.__)("Min ","cartflows")+j,displayAlign:"vertical",placeholder:U()})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(dw,{class:`wcf-cpf-max-date ${o}`,labelClass:"text-sm font-medium text-left capitalize",textFieldType:k,name:"wcf-checkout-custom-fields[0][default]",label:(0,D.__)("Max ","cartflows")+j,displayAlign:"vertical",placeholder:U()}))),!N&&!L&&(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(dw,{class:`wcf-cpf-default ${o}`,textFieldType:"datetime"===g&&k?k:"text",name:"wcf-checkout-custom-fields[0][default]",label:(0,D.__)("Default","cartflows"),displayAlign:"vertical",placeholder:U()||(0,D.__)("e.g. Default value","cartflows")})),v&&!L&&(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(dw,{class:`wcf-cpf-placeholder ${o}`,name:"wcf-checkout-custom-fields[0][placeholder]",label:(0,D.__)("Placeholder","cartflows"),displayAlign:"vertical",placeholder:(0,D.__)("e.g. Enter your phone number","cartflows")})),"file"===g&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(xx,{class:`wcf-cpf-file-size ${o}`,name:"wcf-checkout-custom-fields[0][file_size]",label:(0,D.__)("File Size (MB)","cartflows"),tooltip:(0,D.__)("Enter the maximum allowed file size. Default is 5MB.","cartflows"),displayAlign:"vertical",min:0,placeholder:(0,D.__)("e.g. 5","cartflows")})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(dw,{class:`wcf-cpf-accepted-file-types ${o}`,textFieldType:"text",name:"wcf-checkout-custom-fields[0][accepted_file_types]",label:(0,D.__)("Accepted File Types","cartflows"),tooltip:(0,D.__)("Enter comma-separated file extensions (e.g. jpg, png, gif)","cartflows"),displayAlign:"vertical",placeholder:(0,D.__)("e.g. jpg, png, gif","cartflows")}))),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(cw,{class:"wcf-cpf-width",name:"wcf-checkout-custom-fields[0][width]",options:r,value:"100",label:(0,D.__)("Width","cartflows"),displayAlign:"vertical"})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(jg,{class:"wcf-cpf-show-in-email",name:"wcf-checkout-custom-fields[0][show_in_email]",label:(0,D.__)("Show in Email","cartflows")})),(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(jg,{class:"wcf-cpf-required",name:"wcf-checkout-custom-fields[0][required]",label:(0,D.__)("Required","cartflows"),onClick:T})),!y&&"optin"!==n&&(0,i.createElement)("div",{className:"wcf-custom-field-form--field-row pb-5"},(0,i.createElement)(jg,{class:"wcf-cpf-optimized",name:"wcf-checkout-custom-fields[0][optimized]",label:(0,D.__)("Collapsible","cartflows")})))}()),(0,i.createElement)(YS.Footer,{className:"flex gap-3 justify-end"},(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:function(e){e.preventDefault(),l(!1)}},(0,D.__)("Cancel","cartflows")),(0,i.createElement)(Po,{variant:"primary",size:"md",onClick:function(e){e.preventDefault(),f((0,D.__)("Adding…","cartflows")),d(!0),c||t(e,h,f)||d(!1)}},u)))))},WS=function(){return(0,i.createElement)("div",{className:"wcf-custom-field-editor wcf-checkout__section is-placeholder"},(0,i.createElement)("div",{className:"wcf-custom-field-editor__content"},(0,i.createElement)("div",{className:"wcf-custom-field-editor__title"},(0,i.createElement)("div",{className:"title"})),(0,i.createElement)("form",null,(0,i.createElement)("table",null,(0,i.createElement)("tbody",null,(0,i.createElement)("tr",null,(0,i.createElement)("td",null,(0,i.createElement)("div",{className:"title"}))),(0,i.createElement)("tr",null,(0,i.createElement)("td",null,(0,i.createElement)("div",{className:"title"}))),(0,i.createElement)("tr",null,(0,i.createElement)("td",null,(0,i.createElement)("div",{className:"title"}))),(0,i.createElement)("tr",null,(0,i.createElement)("td",null,(0,i.createElement)("div",{className:"title"}))),(0,i.createElement)("tr",null,(0,i.createElement)("td",null,(0,i.createElement)("div",{className:"title"}))),(0,i.createElement)("tr",null,(0,i.createElement)("td",null,(0,i.createElement)("div",{className:"title"}))))),(0,i.createElement)("div",{className:"wcf-field wcf-submit"},(0,i.createElement)("div",{className:"wcf-checkout-custom-fields__button"})))),(0,i.createElement)(Eg,{fontSize:"35px",width:"400px"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"80%"}),(0,i.createElement)(Eg,{width:"65%"}))},GS=function(){const[{custom_fields:e,step_id:t,options:n,billing_fields:r,shipping_fields:o},a]=Zp(),[l,c]=(0,s.useState)("collapsed"),[d,u]=(0,s.useState)("billing"),f=zh();if(void 0===e)return(0,i.createElement)(WS,null);const p=[{name:(0,D.__)("Billing Fields","cartflows"),slug:"billing",icon:(0,i.createElement)(kS,{className:"w-5 h-5","aria-hidden":"true"})},{name:(0,D.__)("Shipping Fields","cartflows"),slug:"shipping",icon:(0,i.createElement)(mg,{className:"w-5 h-5","aria-hidden":"true"})}],m=async function(e,n){if(e.preventDefault(),!await f({title:(0,D.__)("Delete Field","cartflows"),description:(0,D.__)("Are you really want to delete field?","cartflows"),actionBtnText:(0,D.__)("Delete","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")}))return;const i=new FormData,s=e.target.getAttribute("data-key"),l=e.target.getAttribute("data-type");n(s),i.append("action","cartflows_pro_delete_custom_field"),i.append("security",cartflows_admin.delete_custom_field_nonce),i.append("post_id",t),i.append("key",s),i.append("type",l),i.append("step","checkout"),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:i}).then(e=>{if(e.status){const e=r.filter(function(e){return e.key!==s});a({type:"SET_FIELDS",field_type:"billing",fields:e});const t=o.filter(function(e){return e.key!==s});a({type:"SET_FIELDS",field_type:"shipping",fields:t}),n(""),gm.success((0,D.__)("Custom field deleted!","cartflows"))}})};return(0,i.createElement)("div",{className:"wcf-custom-field-editor wcf-checkout__section"},(0,i.createElement)("div",{className:"wcf-custom-field-editor__content"},(0,i.createElement)(oS,{settings:e.extra_fields,isOpen:!0}),(0,i.createElement)("div",{className:"wcf-field-editor accordion-item bg-background-primary -mx-8 border-b border-border-subtle"},(0,i.createElement)("h2",{className:"accordion-header mb-0",id:"wcf_field_editor_toggler"},(0,i.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 ${l}`,type:"button","data-bs-toggle":"collapse","data-bs-target":"#wcf_collapse_field_editor_toggler","aria-expanded":"false","aria-controls":"wcf_collapse_field_editor_toggler",onClick:function(){c("collapsed"===l?"":"collapsed")}},(0,i.createElement)("span",null,(0,D.__)("Field Editor","cartflows")),""===l?(0,i.createElement)(gg,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}):(0,i.createElement)(Tp,{className:"w-5 h-5 text-text-tertiary","aria-hidden":"true"}))),(0,i.createElement)("div",{id:"wcf_collapse_field_editor_toggler",className:`accordion-collapse px-8 pt-4 pb-8 ${l}`,"aria-labelledby":"wcf_field_editor_toggler"},(0,i.createElement)("div",{className:"accordion-body"},(0,i.createElement)(yM,{name:"wcf-custom-checkout-fields",value:n["wcf-custom-checkout-fields"],label:(0,D.__)("Enable Custom Field Editor","cartflows"),classes:"wcf-enable-custom-field-editor",fullWidth:!0}),"yes"===n["wcf-custom-checkout-fields"]&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-checkout-fields-tabs isolate inline-flex h-11 rounded-md shadow-sm w-full mt-4 mb-0"},p.map(e=>{const t=e.slug===d,n=t?"z-10 bg-brand-25 border-primary-300 hover:bg-brand-25 outline-none text-primary-600":"bg-background-primary border-border-subtle hover:bg-brand-25 hover:border-primary-600";return(0,i.createElement)("button",{type:"button",className:Rf()("relative text-center w-3/6 items-center border px-4 py-2 text-sm font-medium text-text-primary hover:text-primary-600",n),onClick:()=>u(e.slug),key:e.slug},(0,i.createElement)("span",{className:(t?"text-primary-600":"")+" text-sm font-medium text-center flex justify-center items-center gap-1"},e.icon,e.name))})),"billing"===d&&(0,i.createElement)("div",{id:"wcf-billing-fields",className:"wcf-billing-fields billing-field-sortable wcf-field-row w-full"},r&&(0,i.createElement)(CS,{data:r,step:"checkout",type:"billing",removeCallback:m})),"shipping"===d&&(0,i.createElement)("div",{id:"wcf-shipping-fields",className:"wcf-shipping-fields shipping-field-sortable wcf-field-row w-full"},o&&(0,i.createElement)(CS,{data:o,step:"checkout",type:"shipping",removeCallback:m})),(0,i.createElement)("div",{className:"text-end"},wcfCartflowsPro()&&(0,i.createElement)("div",{className:""},(0,i.createElement)(ZS,{addNewField:function(e,i,s){e.preventDefault();const l=document.getElementsByClassName("wcf-cpf-add_to")[0],c=document.getElementsByClassName("wcf-cpf-type")[0],d=document.getElementsByClassName("wcf-cpf-label")[0],u=document.getElementsByClassName("wcf-cpf-name")[0],f=document.getElementsByClassName("wcf-cpf-min")[0],p=document.getElementsByClassName("wcf-cpf-max")[0],m=document.getElementsByClassName("wcf-cpf-default")[0],h=document.getElementsByClassName("wcf-cpf-placeholder")[0],g=document.getElementsByClassName("wcf-cpf-options")[0],w=document.getElementsByClassName("wcf-cpf-min-date")[0],y=document.getElementsByClassName("wcf-cpf-max-date")[0],b=document.getElementsByClassName("wcf-cpf-width")[0],v=document.getElementsByClassName("wcf-cpf-show-in-email")[0],x=document.getElementsByClassName("wcf-cpf-required")[0],N=document.getElementsByClassName("wcf-cpf-optimized")[0],_=document.getElementsByClassName("wcf-cpf-date-input")[0],E=_?_.value:"",M=document.getElementsByClassName("wcf-cpf-file-size")[0],I=document.getElementsByClassName("wcf-cpf-accepted-file-types")[0];if(""===d.value){const e=document.createElement("span");return e.className="text-xs text-brand-500",e.textContent=(0,D.__)("Label is required field","cartflows"),document.querySelector(".wcf-cpf-label").insertAdjacentElement("afterend",e),d.focus(),s((0,D.__)("Add New Field","cartflows")),""}const S=["jpg","jpeg","png","gif","webp","ico","pdf","mp3","m4a","ogg","wav","mp4","m4v","mov","wmv","avi","mpg","ogv","3gp","3g2"];if(I&&I.value.trim()){const e=I.value.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e).filter(e=>!S.includes(e));if(e.length){const t=document.querySelector(".wcf-cpf-accepted-file-types + .wcf-cpf-error");t&&t.remove();const n=document.createElement("span");return n.className="wcf-cpf-error text-xs text-brand-500",n.textContent=(0,D.sprintf)(/* translators: %s: invalid extensions */ /* translators: %s: invalid extensions */ |
| 38 |
(0,D.__)("Invalid file type(s): %s","cartflows"),e.join(", ")),I.insertAdjacentElement("afterend",n),I.focus(),s((0,D.__)("Add New Field","cartflows")),""}}const k=new FormData;k.append("add_to",l?l.value:""),k.append("type",c?c.value:""),k.append("label",d?d.value:""),k.append("name",u?u.value:""),k.append("default",m?m.value:""),k.append("min",f?f.value:""),k.append("max",p?p.value:""),k.append("placeholder",h?h.value:""),k.append("min_date",w?w.value:""),k.append("max_date",y?y.value:""),k.append("options",g?g.value:""),k.append("date_input",E||"datetime-local"),k.append("width",b?b.value:""),k.append("required",x?x.value:""),k.append("show_in_email",v?v.value:""),k.append("optimized",N?N.value:""),k.append("file_size",M?M.value:"5"),k.append("accepted_file_types",I?I.value:""),k.append("action","cartflows_pro_prepare_custom_field"),k.append("security",cartflows_admin.prepare_custom_field_nonce),k.append("post_id",t),k.append("save_field_name","wcf_field_order_"),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:k}).then(e=>{if(e.success){const t=e.data,i=t.field_data;if("billing"===t.add_to){r.push(i);const e=n.wcf_field_order_billing;e[t.new_field.key]=t.new_field,a({type:"SET_OPTION",name:"wcf_field_order_billing",value:e}),a({type:"SET_FIELDS",field_type:"billing",fields:r})}if("shipping"===t.add_to){o.push(i);const e=n.wcf_field_order_shipping;e[t.new_field.key]=t.new_field,a({type:"SET_OPTION",name:"wcf_field_order_shipping",value:e}),a({type:"SET_FIELDS",field_type:"shipping",fields:o})}gm.success((0,D.__)("Custom field added!","cartflows"))}i()})},step_type:"checkout"}))))))),(0,i.createElement)(oS,{settings:e.checkout_settings}),(0,i.createElement)(oS,{settings:e.button_settings})))},HS=function(){return(0,i.createElement)("div",{className:"wcf-custom-field-editor is-placeholder"},(0,i.createElement)("div",{className:"wcf-custom-field-editor__content"},(0,i.createElement)("div",{className:"wcf-custom-field-editor__title"},(0,i.createElement)("div",{className:"title"})),(0,i.createElement)("form",null,(0,i.createElement)("table",null,(0,i.createElement)("tbody",null,(0,i.createElement)("tr",null,(0,i.createElement)("div",{className:"checkbox-title"})))),(0,i.createElement)("div",{className:"wcf-optin-fields-section-section"},(0,i.createElement)("div",{className:"wcf-custom-field-editor-title-section"},(0,i.createElement)("div",{className:"title"})),(0,i.createElement)("div",{className:"wcf-optin-fields"},(0,i.createElement)("div",{className:"title"}),(0,i.createElement)("div",{className:"title"}),(0,i.createElement)("div",{className:"title"}))),(0,i.createElement)("div",{className:"wcf-field wcf-submit"},(0,i.createElement)("div",{className:"wcf-optin-form-field__button"})))))},$S=function(){const[{custom_fields:e,step_id:t,options:n,billing_fields:r},o]=Zp();if(void 0===e)return(0,i.createElement)(HS,null);const a=e.extra_fields;return(0,i.createElement)("div",{className:"wcf-custom-field-editor"},(0,i.createElement)("div",{className:"wcf-custom-field-editor__content"},(0,i.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,D.__)("Field Editor","cartflows")),(0,i.createElement)("div",{className:"wcf-optin-fields--enable_option px-8 py-4 -mx-6 pt-0"},a&&Object.keys(a.fields).map(e=>{const t=a.fields[e],r=n[t.name]?n[t.name]:"";return(0,i.createElement)("div",{key:e,className:"w-full"},(0,i.createElement)(yM,{name:t.name,value:r,label:t.label,desc:t.desc,fullWidth:!0}))})),"yes"===n["wcf-optin-enable-custom-fields"]&&(0,i.createElement)("div",{className:"wcf-optin-fields-section-section"},(0,i.createElement)("div",{id:"wcf-optin-fields",className:"billing-field-sortable wcf-field-row"},(0,i.createElement)(CS,{data:r,step:"optin",type:"billing",removeCallback:function(e){e.preventDefault();const n=new FormData,a=e.target.getAttribute("data-key"),i=e.target.getAttribute("data-type");n.append("action","cartflows_pro_delete_custom_field"),n.append("security",cartflows_admin.delete_custom_field_nonce),n.append("post_id",t),n.append("key",a),n.append("type",i),n.append("step","optin"),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(e=>{if(e.status){const e=r.filter(function(e){return e.key!==a});o({type:"SET_FIELDS",field_type:"billing",fields:e}),gm.success((0,D.__)("Custom field deleted!","cartflows"))}})}})),(0,i.createElement)("div",{className:"wcf-custom-field-editor-title-section"},wcfCartflowsPro()&&(0,i.createElement)("div",{className:"wcf-custom-field-editor-buttons"},(0,i.createElement)(ZS,{addNewField:function(e,a,i){e.preventDefault();const s=document.getElementsByClassName("wcf-cpf-type")[0],l=document.getElementsByClassName("wcf-cpf-label")[0],c=document.getElementsByClassName("wcf-cpf-name")[0],d=document.getElementsByClassName("wcf-cpf-default")[0],u=document.getElementsByClassName("wcf-cpf-placeholder")[0],f=document.getElementsByClassName("wcf-cpf-min")[0],p=document.getElementsByClassName("wcf-cpf-max")[0],m=document.getElementsByClassName("wcf-cpf-options")[0],h=document.getElementsByClassName("wcf-cpf-min-date")[0],g=document.getElementsByClassName("wcf-cpf-max-date")[0],w=document.getElementsByClassName("wcf-cpf-width")[0],y=document.getElementsByClassName("wcf-cpf-show-in-email")[1],b=document.getElementsByClassName("wcf-cpf-required")[1],v=document.getElementsByClassName("wcf-cpf-date-input")[0],x=v?v.value:"";if(""===l.value){const e=document.createElement("span");return e.className="text-xs text-brand-500",e.textContent=(0,D.__)("Label is required field","cartflows"),document.querySelector(".wcf-cpf-label").insertAdjacentElement("afterend",e),l.focus(),i((0,D.__)("Add New Field","cartflows")),!1}const N=new FormData;N.append("add_to","billing"),N.append("type",s?s.value:""),N.append("label",l?l.value:""),N.append("name",c?c.value:""),N.append("default",d?d.value:""),N.append("placeholder",u?u.value:""),N.append("options",m?m.value:""),N.append("min",f?f.value:""),N.append("max",p?p.value:""),N.append("width",w?w.value:""),N.append("min_date",h?h.value:""),N.append("max_date",g?g.value:""),N.append("show_in_email",y?y.value:""),N.append("date_input",x||"datetime-local"),N.append("required",b?b.value:""),N.append("action","cartflows_pro_prepare_custom_field"),N.append("security",cartflows_admin.prepare_custom_field_nonce),N.append("post_id",t),N.append("save_field_name","wcf-optin-fields-"),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:N}).then(e=>{if(e.success){const t=e.data,a=t.field_data;if("billing"===t.add_to){r.push(a);const e=n["wcf-optin-fields-billing"];e[t.new_field.key]=t.new_field,o({type:"SET_OPTION",name:"wcf-optin-fields-billing",value:e}),o({type:"SET_FIELDS",field_type:"billing",fields:r})}gm.success((0,D.__)("Custom field added!","cartflows"))}a()})},step_type:"optin"}))))))},XS=({type:e="simple",defaultValue:t=[],autoClose:n=!1,disabled:r=!1,children:o,className:a})=>{const[i,l]=(0,s.useState)(Array.isArray(t)?t:[t]);return(0,C.jsx)("div",{className:Ie("boxed"===e?"space-y-3":"",a),children:s.Children.map(o,t=>{if(s.isValidElement(t)&&"value"in t.props){const o=!1!==t.props.collapsible,a=!o||i.includes(t.props.value);return s.cloneElement(t,{isOpen:a,onToggle:o?()=>(e=>{l(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})})};XS.displayName="Accordion";const qS=({isOpen:e,onToggle:t,type:n="simple",disabled:r=!1,children:o,className:a})=>{const i={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,C.jsx)("div",{className:Ie(i,a),children:s.Children.map(o,o=>s.isValidElement(o)?s.cloneElement(o,{isOpen:e,onToggle:t,type:n,disabled:r}):o)})};qS.displayName="Accordion.Item";const JS=({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,...d})=>{const u={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[s];return(0,C.jsx)(i,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:(0,C.jsxs)("button",{className:Ie("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",u,a&&"cursor-not-allowed opacity-40",c),onClick:Se(e,!a&&o?t:void 0),"aria-expanded":n,"aria-disabled":a,disabled:a,...d,children:[(0,C.jsx)("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:l}),o?"arrow"===r?(0,C.jsx)(lp,{className:Ie("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,C.jsx)(bf.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,C.jsx)(Dg,{}):(0,C.jsx)(yI,{})},n?"minus":"plus"):null:null]})})};JS.displayName="Accordion.Trigger";const KS=({isOpen:e,disabled:t=!1,type:n="simple",children:r,className:o})=>{const a={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[n];return(0,C.jsx)(sp,{initial:!1,children:e&&(0,C.jsx)(bf.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"},className:Ie("text-text-secondary w-full text-sm transition-[height, opacity, transform] ease-in box-border",t&&"opacity-40",o),"aria-hidden":!e,role:"region",children:(0,C.jsx)("div",{className:Ie(a),children:r})},"content")})};KS.displayName="Accordion.Content";const ek=Object.assign(XS,{Item:qS,Trigger:JS,Content:KS}),tk=function({title:e,children:t,defaultOpen:n=!0,badge:r,className:o=""}){return(0,i.createElement)("div",{className:`-mx-8 border-b border-border-subtle last:border-b-0 ${o}`.trim()},(0,i.createElement)(ek,{type:"simple",defaultValue:n?"section":[],autoClose:!1},(0,i.createElement)(ek.Item,{value:"section"},(0,i.createElement)(ek.Trigger,{iconType:"arrow",className:"px-8 py-4"},(0,i.createElement)("span",{className:"flex items-center gap-2 text-sm font-semibold text-text-primary"},e,r&&r)),(0,i.createElement)(ek.Content,{className:"px-8 pb-8 pt-0"},t))))},nk=function(e){const[{license_status:t}]=u(),n=e.btnText||(0,D.__)("Upgrade to CartFlows Pro","cartflows"),r=function(r){return(0,i.createElement)(tk,{title:r.title,badge:(0,i.createElement)(Tf,{label:(0,D.__)("PRO","cartflows"),size:"xs",variant:"primary"}),defaultOpen:!1},(0,i.createElement)("div",{className:"p-5 border border-border-subtle rounded-lg bg-brand-25"},(0,i.createElement)("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between"},(0,i.createElement)("div",null,(0,i.createElement)("p",{className:"text-sm font-medium text-text-primary mb-1"},r.noticeTitle),(0,i.createElement)("p",{className:"text-sm font-normal text-text-secondary"},r.noticeDesc)),(0,i.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,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(BI,{title:(0,D.__)("Activate the License","cartflows")}))):void 0:wcfInactiveProPlus()?(0,i.createElement)(zI,null):(0,i.createElement)(PI,{buttonLink:e.buttonLink,title:n,buttonStyle:"secondary"}):(0,i.createElement)(zI,null)}()))))};return(0,i.createElement)(i.Fragment,null,r({title:(0,D.__)("Auto Apply Coupon","cartflows"),noticeTitle:(0,D.__)("Apply Discounts Automatically and Convert More Customers","cartflows"),noticeDesc:(0,D.__)("Remove friction at checkout — discounts activate the moment customers arrive. Upgrade to Pro and watch conversions climb immediately.","cartflows")}),r({title:(0,D.__)("Product Options","cartflows"),noticeTitle:(0,D.__)("Let Customers Choose Exactly What They Want","cartflows"),noticeDesc:(0,D.__)("Offer flexible product options right at checkout — quantities, variations, and more. Upgrade to CartFlows Pro and start customizing your offers today.","cartflows")}))},rk=function(){const[{step_data:e,settings_data:t,page_settings:n,options:r}]=Zp(),[{license_status:o}]=u(),a=n;if(void 0===t.settings)return(0,i.createElement)(fS,null);const s=r["wcf-checkout-products"];return(0,i.createElement)("div",{className:"wcf-checkout-products"},(0,i.createElement)(tk,{title:a.settings.product.title,defaultOpen:!0},(0,i.createElement)(rS,{settings:a.settings.product})),"checkout"===e.type&&(!wcfCartflowsPro()||"Activated"!==o)&&(0,i.createElement)(nk,null),"checkout"===e.type&&wcfCartflowsPro()&&"Activated"===o&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(tk,{title:a.settings.coupon.title},(0,i.createElement)(rS,{settings:a.settings.coupon})),s&&(0,i.createElement)(tk,{title:a.settings["product-options"].title},(0,i.createElement)(rS,{settings:a.settings["product-options"]}))))},ok=function(){const[{settings_data:e,page_settings:t,options:n},r]=Zp(),o=n["wcf-optin-product"]?n["wcf-optin-product"]:[],[a,l]=(0,s.useState)(),[c,d]=(0,s.useState)(""),[u,f]=(0,s.useState)(!1),p=(0,D.__)("Add","cartflows"),[m,h]=(0,s.useState)({isInProcessing:!1,buttonText:p}),{isInProcessing:g,buttonText:w}=m;return void 0===e.settings?(0,i.createElement)(fS,null):(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-optin-product--wrapper"},(0,i.createElement)("h2",{className:"text-base font-semibold text-text-primary py-4"},(0,D.__)("Optin Product","cartflows")),(0,i.createElement)("div",{className:"wcf-optin-products--selection wcf-products__section"},0===o.length||""===o[0]?(0,i.createElement)(i.Fragment,null,(0,i.createElement)("input",{name:"wcf-optin-product[]",type:"hidden",value:""}),(0,i.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,D.__)("Select free & virtual product only. Once you select a product, it will be displayed here.","cartflows")),(0,i.createElement)("div",{className:"wcf-optin-product-selection-field__add-new flex justify-between items-end gap-5 mt-5"},(0,i.createElement)(sM,{name:"",desc:"",field:"product",value:c,allowed_products:"simple",include_products:"braintree-subscription, braintree-variable-subscription",excluded_products:"grouped",placeholder:(0,D.__)("Search for a Free & Virtual Product","cartflows"),onChangeCB:e=>{l(e),f(!1)},sectionClass:"flex-1 "+(u?"border border-border-error":"")}),(0,i.createElement)(Po,{type:"button",variant:"outline",size:"md",icon:(0,i.createElement)(yg,{className:"w-4 h-4"}),iconPosition:"left",loading:g,disabled:g,onClick:function(){const e=a?.value;d(a),e&&(h({isInProcessing:!0,buttonText:(0,D.__)("Adding…","cartflows")}),Xf()({path:`/cartflows/v1/admin/product-data/${e}`}).then(t=>{t.regular_price>0||!t.is_virtual?f(!0):(f(!1),r({type:"ADD_OPTIN_PRODUCT",field_name:"wcf-optin-product",product_data:{value:e,label:a?.label,img_url:t?.img_url}})),d(null),h({isInProcessing:!1,buttonText:p})}),l(null))},className:"wcf-select-product-button shrink-0 h-fit"},w)),u&&(0,i.createElement)("span",{className:"text-sm mt-2 text-text-error wcf-field-required-error inline-block"},(0,D.__)("Please select a free & virtual product only.","cartflows")),(0,i.createElement)(fx,null)):(0,i.createElement)("div",{className:"overflow-visible shadow border border-border-subtle rounded-md"},(0,i.createElement)("div",{className:"wcf-optin-product-selection--selected-product flex items-center p-3 gap-4"},(0,i.createElement)("div",{className:"wcf-optin-product-selection--product-title whitespace-nowrap text-sm font-medium text-text-primary w-1/2"},(0,i.createElement)("div",{className:"flex gap-3 items-center"},(0,i.createElement)("div",{className:"wcf-optin-product-selection--product-image flex w-20 h-20"},(0,i.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:Wm(o.label)})),(0,i.createElement)("div",{className:"wcf-optin-product-selection--product-title_text"},(0,i.createElement)("div",{className:"wcf-offer-product-repeater-field__title whitespace-normal text-left","data-product_id":o.value},Wm(o.label)),(0,i.createElement)("div",{className:"wcf-optin-product-repeater-field__reg-price mt-1"},(0,i.createElement)("div",{className:"flex gap-2"},(0,i.createElement)("span",{className:"wcf-offer-product--reg-price"},(0,D.__)("Free","cartflows"))))))),(0,i.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,i.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,i.createElement)(Xm,{className:"h-18 w-18"}))),(0,i.createElement)("input",{name:"wcf-optin-product[]",type:"hidden",className:"wcf-checkout-product-id",value:o.value})))),(0,i.createElement)("div",{className:"wcf-offer-product--common-settings pt-2"},(0,i.createElement)(uS,{settings:t?.settings.product,displayAs:"div"}))))};function ak(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 ik(e,t,n,r){if(!t?.type)return null;switch(e){case"design":default:return(0,i.createElement)(aS,null);case"settings":return(0,i.createElement)(dS,null);case"products":return"checkout"===t.type?"storeCheckout"!==n||cartflows_admin.store_checkout_show_product_tab?(0,i.createElement)(rk,null):(r("order_bumps"),(0,i.createElement)(YI,null)):["upsell","downsell"].includes(t.type)?(0,i.createElement)(pS,null):"optin"===t.type?(0,i.createElement)(ok,null):"landing"===t.type||"thankyou"===t.type?(r("settings"),(0,i.createElement)(dS,null)):(0,i.createElement)(dS,null);case"checkout_form_fields":return(0,i.createElement)(GS,null);case"order_bumps":return(0,i.createElement)(YI,null);case"checkout_offer":return(0,i.createElement)(xS,null);case"optin_form_fields":return(0,i.createElement)($S,null);case"dynamic-offers":return(0,i.createElement)(IS,null)}}const sk=Ao("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"}]]),lk=Ao("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"}]]),ck=(0,s.createContext)({isCollapsed:!1,setIsCollapsed:()=>{},collapsible:!0}),dk=({children:e,className:t,onCollapseChange:n,collapsible:r=!0,borderOn:o=!0,collapsed:a=!1,...i})=>{const l=(0,s.useRef)(null),[c,d]=(0,s.useState)(()=>!r&&a?a:Ae("sidebar-collapsed")||window.innerWidth<1280);return(0,s.useEffect)(()=>{"function"==typeof n&&n(c)},[c,n]),(0,s.useEffect)(()=>{if(!r&&a)return;const e=()=>{const e=window.innerWidth<1280;if(r)if(e)d(!0),je("sidebar-collapsed",!0);else{const e=Ae("sidebar-collapsed");d(e||!1)}else d(!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,C.jsx)(ck.Provider,{value:{isCollapsed:c,setIsCollapsed:d,collapsible:r},children:(0,C.jsx)("div",{ref:l,className:Ie("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",c&&"w-16 px-2",t),...i,children:e})})};dk.displayName="Sidebar";const uk=({children:e})=>(0,C.jsx)("div",{className:"space-y-2",children:e});uk.displayName="Sidebar.Header";const fk=({children:e})=>(0,C.jsx)("div",{className:Ie("space-y-4 grow items-start"),children:e});fk.displayName="Sidebar.Body";const pk=({children:e})=>{const{isCollapsed:t,setIsCollapsed:n,collapsible:r}=(0,s.useContext)(ck);return(0,C.jsxs)("div",{className:"space-y-4",children:[e,r&&(0,C.jsx)("button",{className:Ie("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),je("sidebar-collapsed",!t)},"aria-label":t?"Expand sidebar":"Collapse sidebar",children:t?(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Zo,{title:"Expand",children:(0,C.jsx)(sk,{className:"size-5"})})}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(lk,{className:"size-5"})," Collapse"]})})]})};pk.displayName="Sidebar.Footer";const mk=({children:e,className:t})=>(0,C.jsx)("div",{className:Ie("w-full",t),children:e});mk.displayName="Sidebar.Item";const hk=Object.assign(dk,{Header:uk,Body:fk,Footer:pk,Item:mk}),gk=function({accordionGroups:e,currentTab:t,currentSection:n,onTabChange:r,onSectionChange:o}){const[a,l]=(0,s.useState)(()=>new Set((null!=e?e:[]).filter(e=>e.sections.length>0).map(e=>e.id)));(0,s.useEffect)(()=>{const t=(null!=e?e:[]).filter(e=>e.sections.length>0).map(e=>e.id);l(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 c=(null!=e?e:[]).find(e=>e.id===t),d=n&&c?.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,i.createElement)("div",{className:"wcf-step-setting--sidebar-wrapper w-full lg:w-auto"},(0,i.createElement)("div",{className:"lg:hidden px-6 py-4",onClickCapture:e=>e.preventDefault()},(0,i.createElement)(lw,{value:d,onChange:e=>{if(e.includes("|")){const[t,n]=e.split("|");o(t,n)}else r(e)},size:"md"},(0,i.createElement)(lw.Button,{placeholder:(0,D.__)("Select a Settings Tab","cartflows"),render:e=>{var t;return null!==(t=u[e])&&void 0!==t?t:e}}),(0,i.createElement)(lw.Portal,null,(0,i.createElement)(lw.Options,null,(null!=e?e:[]).map(e=>e.sections.length>0?(0,i.createElement)(lw.OptionGroup,{key:e.id,label:e.name},e.sections.map(e=>(0,i.createElement)(lw.Option,{key:e.id,value:`${e.tabId}|${e.id}`},e.name))):(0,i.createElement)(lw.Option,{key:e.id,value:e.id},e.name)))))),(0,i.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,i.createElement)(hk,{borderOn:!0,className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none box-border flex-grow"},(0,i.createElement)(hk.Body,{className:"!p-0 pt-2"},(0,i.createElement)(hk.Item,null,(0,i.createElement)(up,{className:"w-full p-0 bg-transparent",size:"md"},(0,i.createElement)("ul",{className:"m-0 p-0 list-none flex flex-col gap-0.5"},(null!=e?e:[]).map(e=>{const c=a.has(e.id),d=t===e.id,u=e.sections.length>0,f=e.icon,p=u&&d;return(0,i.createElement)(s.Fragment,{key:e.id},(0,i.createElement)(up.Item,{active:!u&&d,onClick:()=>(e=>{if(0===e.sections.length)r(e.id);else if(a.has(e.id))l(t=>{const n=new Set(t);return n.delete(e.id),n});else{l(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 "+(d?"!bg-brand-25 !text-text-primary [&>svg]:!text-brand-600":"")},(0,i.createElement)(f,{className:p?"!text-icon-interactive":""}),(0,i.createElement)("div",{className:"flex-1"},e.name),u&&(0,i.createElement)(Tp,{className:"!size-4 shrink-0 text-icon-secondary transition-transform duration-200 "+(c?"rotate-180":"")})),u&&c&&(0,i.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,i.createElement)(up.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,i.createElement)("div",null,e.name))})))}))))))))};function wk({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const yk=s.forwardRef(wk),bk=function({section:e}){const[{options:t,page_builder:n,step_data:r}]=Zp();if(!e)return null;if("shortcode"===e.slug&&"other"!==n)return null;const o={...e,step_type:r?.type||""};return!1===fm.isActiveControl(o,t)?null:(0,i.createElement)("div",{className:"wcf-section-content"},(0,i.createElement)(rS,{settings:o,displayAs:"div"}))};function vk({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"}))}const xk=s.forwardRef(vk);function Nk({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 18.75a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h6m-9 0H3.375a1.125 1.125 0 0 1-1.125-1.125V14.25m17.25 4.5a1.5 1.5 0 0 1-3 0m3 0a1.5 1.5 0 0 0-3 0m3 0h1.125c.621 0 1.129-.504 1.09-1.124a17.902 17.902 0 0 0-3.213-9.193 2.056 2.056 0 0 0-1.58-.86H14.25M16.5 18.75h-2.25m0-11.177v-.958c0-.568-.422-1.048-.987-1.106a48.554 48.554 0 0 0-10.026 0 1.106 1.106 0 0 0-.987 1.106v7.635m12-6.677v6.677m0 4.5v-4.5m0 0h-12"}))}const _k=s.forwardRef(Nk),Ek=function(){const[{options:e},t]=Zp(),n="yes"===e["wcf-show-coupon-field"],r="yes"===e["wcf-optimize-coupon-field"],o="yes"===e["wcf-checkout-additional-fields"],a="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"],d=e["wcf-no-shipping-method-message"]||"",u=e["wcf-order-review-summary-position"]||"top",f=(e,n)=>{t({type:"SET_OPTION",name:e,value:n})},p=[{value:"top",label:(0,D.__)("Top","cartflows")},{value:"bottom",label:(0,D.__)("Bottom","cartflows")}];return(0,i.createElement)("div",{className:"flex flex-col gap-4"},(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"flex items-center justify-between py-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Coupon Field","cartflows")),(0,i.createElement)(Pg,{value:n,onChange:e=>f("wcf-show-coupon-field",e?"yes":"no")})),n&&(0,i.createElement)("div",{className:"flex items-center justify-between py-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Collapsible Coupon Field","cartflows")),(0,i.createElement)(Pg,{value:r,onChange:e=>f("wcf-optimize-coupon-field",e?"yes":"no")}))),(0,i.createElement)("input",{type:"hidden",name:"wcf-show-coupon-field",value:n?"yes":"no"}),(0,i.createElement)("input",{type:"hidden",name:"wcf-optimize-coupon-field",value:r?"yes":"no"}),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"flex items-center justify-between py-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Additional Field","cartflows")),(0,i.createElement)(Pg,{value:o,onChange:e=>f("wcf-checkout-additional-fields",e?"yes":"no")})),o&&(0,i.createElement)("div",{className:"flex items-center justify-between py-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Collapsible Additional Field","cartflows")),(0,i.createElement)(Pg,{value:a,onChange:e=>f("wcf-optimize-order-note-field",e?"yes":"no")}))),(0,i.createElement)("input",{type:"hidden",name:"wcf-checkout-additional-fields",value:o?"yes":"no"}),(0,i.createElement)("input",{type:"hidden",name:"wcf-optimize-order-note-field",value:a?"yes":"no"}),(0,i.createElement)("div",{className:"flex items-center justify-between py-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Ship To Different Address","cartflows")),(0,i.createElement)(Pg,{value:s,onChange:e=>f("wcf-shipto-diff-addr-fields",e?"yes":"no")})),(0,i.createElement)("input",{type:"hidden",name:"wcf-shipto-diff-addr-fields",value:s?"yes":"no"}),(0,i.createElement)("div",{className:"flex flex-col py-1"},(0,i.createElement)("div",{className:"flex items-center justify-between"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Google Address Autocomplete","cartflows")),(0,i.createElement)(Pg,{value:l,onChange:e=>f("wcf-google-autoaddress",e?"yes":"no")})),(0,i.createElement)("div",{className:"flex items-start gap-1 text-sm font-normal text-text-tertiary mt-2"},(0,i.createElement)(vg,{className:"w-4 h-4 shrink-0 mt-px text-icon-secondary"}),(0,i.createElement)("span",null,(0,D.__)("Before enabling this option, make sure that you have added API key in Google Address Autocomplete Settings.","cartflows")))),(0,i.createElement)("input",{type:"hidden",name:"wcf-google-autoaddress",value:l?"yes":"no"}),(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"flex items-center justify-between py-1"},(0,i.createElement)("div",{className:"flex items-center gap-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Custom Shipping Message","cartflows")),(0,i.createElement)(Zo,{content:(0,D.__)("Turn this on to show a custom message when no shipping options are available at checkout.","cartflows"),placement:"top"},(0,i.createElement)("span",null,(0,i.createElement)(vg,{className:"w-4 h-4 text-icon-secondary cursor-help"})))),(0,i.createElement)(Pg,{value:c,onChange:e=>f("wcf-custom-no-shipping-method-message-toggle",e?"yes":"no")})),(0,i.createElement)("input",{type:"hidden",name:"wcf-custom-no-shipping-method-message-toggle",value:c?"yes":"no"}),c&&(0,i.createElement)("div",{className:"flex flex-col gap-1.5"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Shipping Message","cartflows")),(0,i.createElement)(uw,{value:d,rows:2,size:"md",className:"w-full",placeholder:(0,D.__)("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,i.createElement)("input",{type:"hidden",name:"wcf-no-shipping-method-message",value:d}),(0,i.createElement)("div",{className:"flex items-center gap-3"},(0,i.createElement)("div",{className:"flex items-center gap-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Order Summary Position","cartflows")),(0,i.createElement)(Zo,{content:(0,D.__)("Choose this option to adjust where the order summary appears on mobile devices.","cartflows"),placement:"top"},(0,i.createElement)("span",null,(0,i.createElement)(vg,{className:"w-4 h-4 text-icon-secondary cursor-help"})))),(0,i.createElement)("div",{className:"w-32"},(0,i.createElement)(lw,{value:u,onChange:e=>f("wcf-order-review-summary-position",e),size:"md"},(0,i.createElement)(lw.Button,{type:"button",render:e=>{const t=p.find(t=>t.value===e);return t?t.label:e}}),(0,i.createElement)(lw.Portal,null,(0,i.createElement)(lw.Options,null,p.map(e=>(0,i.createElement)(lw.Option,{value:e.value,key:e.value},e.label))))))),(0,i.createElement)("input",{type:"hidden",name:"wcf-order-review-summary-position",value:u}))},Mk=function({sectionId:e}){const[{custom_fields:t,step_id:n,options:r,billing_fields:o,shipping_fields:a},l]=Zp(),[c,d]=(0,s.useState)("billing"),u=zh();if(void 0===t)return(0,i.createElement)(WS,null);if("form-settings"===e)return(0,i.createElement)(Ek,null);if("form-headings"===e&&t.checkout_settings)return(0,i.createElement)(bk,{section:{...t.checkout_settings,slug:"checkout_settings"}});if("place-order-button"===e&&t.button_settings)return(0,i.createElement)(bk,{section:{...t.button_settings,slug:"button_settings"}});if("field-editor"===e){const e=async function(e,t){if(e.preventDefault(),!await u({title:(0,D.__)("Delete Field","cartflows"),description:(0,D.__)("Are you really want to delete field?","cartflows"),actionBtnText:(0,D.__)("Delete","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")}))return;const r=new FormData,i=e.target.getAttribute("data-key"),s=e.target.getAttribute("data-type");t(i),r.append("action","cartflows_pro_delete_custom_field"),r.append("security",cartflows_admin.delete_custom_field_nonce),r.append("post_id",n),r.append("key",i),r.append("type",s),r.append("step","checkout"),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(e=>{e.status&&(l({type:"SET_FIELDS",field_type:"billing",fields:o.filter(e=>e.key!==i)}),l({type:"SET_FIELDS",field_type:"shipping",fields:a.filter(e=>e.key!==i)}),t(""))})},t=function(e,t,i){e.preventDefault();const s=document.getElementsByClassName("wcf-cpf-add_to")[0],c=document.getElementsByClassName("wcf-cpf-type")[0],d=document.getElementsByClassName("wcf-cpf-label")[0],u=document.getElementsByClassName("wcf-cpf-name")[0],f=document.getElementsByClassName("wcf-cpf-min")[0],p=document.getElementsByClassName("wcf-cpf-max")[0],m=document.getElementsByClassName("wcf-cpf-default")[0],h=document.getElementsByClassName("wcf-cpf-placeholder")[0],g=document.getElementsByClassName("wcf-cpf-options")[0],w=document.getElementsByClassName("wcf-cpf-min-date")[0],y=document.getElementsByClassName("wcf-cpf-max-date")[0],b=document.getElementsByClassName("wcf-cpf-width")[0],v=document.getElementsByClassName("wcf-cpf-show-in-email")[0],x=document.getElementsByClassName("wcf-cpf-required")[0],N=document.getElementsByClassName("wcf-cpf-optimized")[0],_=document.getElementsByClassName("wcf-cpf-date-input")[0],E=_?_.value:"",M=document.getElementsByClassName("wcf-cpf-file-size")[0],I=document.getElementsByClassName("wcf-cpf-accepted-file-types")[0];if(""===d.value){const e=document.createElement("span");return e.className="text-xs text-brand-500",e.textContent=(0,D.__)("Label is required field","cartflows"),document.querySelector(".wcf-cpf-label").insertAdjacentElement("afterend",e),d.focus(),i((0,D.__)("Add New Field","cartflows")),""}const S=["jpg","jpeg","png","gif","webp","ico","pdf","mp3","m4a","ogg","wav","mp4","m4v","mov","wmv","avi","mpg","ogv","3gp","3g2"];if(I&&I.value.trim()){const e=I.value.split(",").map(e=>e.trim().toLowerCase()).filter(e=>e).filter(e=>!S.includes(e));if(e.length){const t=document.querySelector(".wcf-cpf-accepted-file-types + .wcf-cpf-error");t&&t.remove();const n=document.createElement("span");return n.className="wcf-cpf-error text-xs text-brand-500",n.textContent=(0,D.sprintf)(/* translators: %s: invalid extensions */ /* translators: %s: invalid extensions */ |
| 39 |
(0,D.__)("Invalid file type(s): %s","cartflows"),e.join(", ")),I.insertAdjacentElement("afterend",n),I.focus(),i((0,D.__)("Add New Field","cartflows")),""}}const k=new FormData;k.append("add_to",s?s.value:""),k.append("type",c?c.value:""),k.append("label",d?d.value:""),k.append("name",u?u.value:""),k.append("default",m?m.value:""),k.append("min",f?f.value:""),k.append("max",p?p.value:""),k.append("placeholder",h?h.value:""),k.append("min_date",w?w.value:""),k.append("max_date",y?y.value:""),k.append("options",g?g.value:""),k.append("date_input",E||"datetime-local"),k.append("width",b?b.value:""),k.append("required",x?x.value:""),k.append("show_in_email",v?v.value:""),k.append("optimized",N?N.value:""),k.append("file_size",M?M.value:"5"),k.append("accepted_file_types",I?I.value:""),k.append("action","cartflows_pro_prepare_custom_field"),k.append("security",cartflows_admin.prepare_custom_field_nonce),k.append("post_id",n),k.append("save_field_name","wcf_field_order_"),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:k}).then(e=>{if(e.success){const t=e.data,n=t.field_data;if("billing"===t.add_to){o.push(n);const e=r.wcf_field_order_billing;e[t.new_field.key]=t.new_field,l({type:"SET_OPTION",name:"wcf_field_order_billing",value:e}),l({type:"SET_FIELDS",field_type:"billing",fields:o})}if("shipping"===t.add_to){a.push(n);const e=r.wcf_field_order_shipping;e[t.new_field.key]=t.new_field,l({type:"SET_OPTION",name:"wcf_field_order_shipping",value:e}),l({type:"SET_FIELDS",field_type:"shipping",fields:a})}}t()})};return(0,i.createElement)("div",{className:"wcf-field-editor-section"},(0,i.createElement)("div",{className:"flex items-center justify-between py-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Custom Field Editor","cartflows")),(0,i.createElement)(Pg,{value:"yes"===r["wcf-custom-checkout-fields"],onChange:e=>l({type:"SET_OPTION",name:"wcf-custom-checkout-fields",value:e?"yes":"no"})})),(0,i.createElement)("input",{type:"hidden",name:"wcf-custom-checkout-fields",value:r["wcf-custom-checkout-fields"]}),"yes"===r["wcf-custom-checkout-fields"]&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-checkout-fields-tabs mt-4 mb-0"},(0,i.createElement)(YM.Group,{variant:"rounded",size:"sm",width:"full",activeItem:c,onChange:({value:e})=>d(e.slug)},(0,i.createElement)(YM.Tab,{slug:"billing",text:(0,D.__)("Billing Fields","cartflows"),icon:(0,i.createElement)(xk,{className:"w-4 h-4"}),type:"button"}),(0,i.createElement)(YM.Tab,{slug:"shipping",text:(0,D.__)("Shipping Fields","cartflows"),icon:(0,i.createElement)(_k,{className:"w-4 h-4"}),type:"button"}))),"billing"===c&&o&&(0,i.createElement)("div",{id:"wcf-billing-fields",className:"wcf-billing-fields billing-field-sortable wcf-field-row w-full"},(0,i.createElement)(CS,{data:o,step:"checkout",type:"billing",removeCallback:e})),"shipping"===c&&a&&(0,i.createElement)("div",{id:"wcf-shipping-fields",className:"wcf-shipping-fields shipping-field-sortable wcf-field-row w-full"},(0,i.createElement)(CS,{data:a,step:"checkout",type:"shipping",removeCallback:e})),(0,i.createElement)("div",{className:"text-end"},wcfCartflowsPro()&&(0,i.createElement)(ZS,{addNewField:t,step_type:"checkout"}))))}return null},Ik=function(){const[{options:e,page_settings:t},n]=Zp();if(VI())return(0,i.createElement)(QI,{title:(0,D.__)("Let Customers Choose Exactly What They Want","cartflows"),description:(0,D.__)("Offer flexible product options right at checkout — quantities, variations, and more. Upgrade to CartFlows Pro and start customizing your offers today.","cartflows")});const r="yes"===e["wcf-enable-product-options"],o=e["wcf-product-options"]||"force-all",a="yes"===e["wcf-enable-product-variation"],s=e["wcf-product-variation-options"]||"inline",l="yes"===e["wcf-enable-product-quantity"],c=t?.settings?.["product-options"]?.desc||null,d=(e,t)=>{n({type:"SET_OPTION",name:e,value:t})};return(0,i.createElement)("div",{className:"flex flex-col"},(0,i.createElement)("div",{className:"flex items-center justify-between py-4"},(0,i.createElement)(Lf,{htmlFor:"wcf-enable-product-options-switch",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Product Options","cartflows")),(0,i.createElement)(Pg,{id:"wcf-enable-product-options-switch",value:r,onChange:e=>d("wcf-enable-product-options",e?"yes":"no")})),(0,i.createElement)("input",{type:"hidden",name:"wcf-enable-product-options",value:r?"yes":"no"}),r&&(0,i.createElement)("div",{className:"flex flex-col gap-2 pb-4 border-b border-border-subtle border-solid border-0"},(0,i.createElement)(Lf,{tag:"p",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Conditions","cartflows")),(0,i.createElement)(Vg.Group,{gapClassName:"gap-1.5",value:o,onChange:e=>d("wcf-product-options",e),style:"simple",size:"sm",vertical:!0,className:"w-full"},(0,i.createElement)(Vg.Button,{value:"force-all",reversePosition:!0,minWidth:!1,buttonWrapperClasses:"w-full !pr-2.5 !py-0",label:{heading:(0,D.__)("Restrict user to purchase all products","cartflows")}}),(0,i.createElement)(Vg.Button,{value:"single-selection",reversePosition:!0,minWidth:!1,buttonWrapperClasses:"w-full !pr-2.5 !py-0",label:{heading:(0,D.__)("Let user select one product from all options","cartflows")}}),(0,i.createElement)(Vg.Button,{value:"multiple-selection",reversePosition:!0,minWidth:!1,buttonWrapperClasses:"w-full !pr-2.5 !py-0",label:{heading:(0,D.__)("Let user select multiple products from all options","cartflows")}}))),(0,i.createElement)("input",{type:"hidden",name:"wcf-product-options",value:o}),(0,i.createElement)("div",{className:"flex items-center justify-between py-4"},(0,i.createElement)(Lf,{htmlFor:"wcf-enable-product-variation-switch",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Variations","cartflows")),(0,i.createElement)(Pg,{id:"wcf-enable-product-variation-switch",value:a,onChange:e=>d("wcf-enable-product-variation",e?"yes":"no")})),(0,i.createElement)("input",{type:"hidden",name:"wcf-enable-product-variation",value:a?"yes":"no"}),a&&(0,i.createElement)("div",{className:"flex flex-col gap-2 pb-4 border-b border-border-subtle border-solid border-0"},(0,i.createElement)(Vg.Group,{gapClassName:"gap-1.5",value:s,onChange:e=>d("wcf-product-variation-options",e),style:"simple",size:"sm",vertical:!0,className:"w-full"},(0,i.createElement)(Vg.Button,{value:"inline",reversePosition:!0,minWidth:!1,buttonWrapperClasses:"w-full !pr-2.5 !py-0",label:{heading:(0,D.__)("Show variations inline","cartflows")}}),(0,i.createElement)(Vg.Button,{value:"popup",reversePosition:!0,minWidth:!1,buttonWrapperClasses:"w-full !pr-2.5 !py-0",label:{heading:(0,D.__)("Show variations in popup","cartflows")}}))),(0,i.createElement)("input",{type:"hidden",name:"wcf-product-variation-options",value:s}),(0,i.createElement)("div",{className:"flex items-center justify-between py-4 !pb-0"},(0,i.createElement)(Lf,{htmlFor:"wcf-enable-product-quantity-switch",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Enable Quantity","cartflows")),(0,i.createElement)(Pg,{id:"wcf-enable-product-quantity-switch",value:l,onChange:e=>d("wcf-enable-product-quantity",e?"yes":"no")})),(0,i.createElement)("input",{type:"hidden",name:"wcf-enable-product-quantity",value:l?"yes":"no"}),c&&(0,i.createElement)("div",{className:"flex items-start gap-1 text-sm font-normal text-text-tertiary mt-2"},(0,i.createElement)(vg,{className:"w-4 h-4 shrink-0 mt-px text-icon-secondary"}),(0,i.createElement)("span",null,Wm(c))))},Sk={landing:dh,checkout:uh,upsell:fh,downsell:ph,optin:mh,thankyou:hh},kk=function(){var e;const[{step_id:t,flow_id:n,step_data:r}]=Zp(),o=(0,m.useHistory)(),a=zh(),s=r?.type||"",l=null!==(e=Sk[s])&&void 0!==e?e:null;return(0,i.createElement)("div",{className:"flex flex-col gap-4"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-normal text-text-secondary"},(0,D.__)("Replace this step with a different template. Your current design and content for this step will be permanently removed.","cartflows")),(0,i.createElement)("div",{className:"flex items-center gap-4"},l&&(0,i.createElement)("img",{src:l,alt:s,className:"rounded-lg w-[72px] h-[72px]"}),(0,i.createElement)("div",{className:"flex flex-col gap-1"},(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-medium text-text-primary"},(0,D.__)("Step Type","cartflows")),(0,i.createElement)(Lf,{tag:"span",size:"sm",className:"font-normal text-text-secondary capitalize"},s))),(0,i.createElement)("div",null,(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:async()=>{await a({title:(0,D.__)("Update Template","cartflows"),description:(0,D.__)("Changing the template will permanently delete the current design in this step. Would you still like to proceed?","cartflows"),actionBtnText:(0,D.__)("Update","cartflows"),cancelBtnText:(0,D.__)("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,D.__)("Update Template","cartflows"))))};function Dk({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 Ck=s.forwardRef(Dk),jk=function({onEditingChange:e}){const[{step_id:t,flow_id:n},r]=Zp();let[{step_title:o}]=Zp();(0,s.useEffect)(()=>{let e=!0;return e&&Xf()({path:`/cartflows/v1/admin/flow-data/${n}`}).then(t=>{e&&r({type:"SET_FLOW_DATA",data:t})}),()=>{e=!1}},[o]);const[a,l]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),[u,f]=(0,s.useState)("");if(!1===o)return null;if(a)return(0,i.createElement)("div",{className:"flex items-center gap-2 flex-1 min-w-0"},(0,i.createElement)(tg,{id:"new-step-title",value:u,onChange:f,size:"md",className:"!py-2",autoComplete:"off"}),(0,i.createElement)(Po,{variant:"primary",size:"sm",type:"button",loading:c,disabled:c,onClick:n=>{n.preventDefault(),d(!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),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:o}).then(()=>{r({type:"SET_STEP_TITLE",title:u}),d(!1),l(!1),e?.(!1),gm.success((0,D.__)("Step title updated successfully!","cartflows"))})}},(0,D.__)("Save","cartflows")),(0,i.createElement)(Po,{variant:"outline",size:"sm",type:"button",disabled:c,onClick:t=>{t.preventDefault(),l(!1),e?.(!1)}},(0,D.__)("Cancel","cartflows")));""===o&&(o=(0,D.__)("(no title)","cartflows"));const p=um(o,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length);return(0,i.createElement)("div",{className:"wcf-edit-step__title-wrap flex items-center gap-1.5"},(0,i.createElement)("span",{className:"wcf-steps-header__title--text text-xl font-semibold text-text-primary truncate max-w-xs",title:o},p),(0,i.createElement)(Po,{variant:"ghost",size:"xs",type:"button",icon:(0,i.createElement)(Ck,null),onClick:t=>{t.preventDefault(),f(o||""),l(!0),e?.(!0)},"aria-label":(0,D.__)("Edit Step Name","cartflows")}))},Ak=function({currentTab:e,currentSection:t,sectionObject:n,stepData:r,flowType:o,buttonRef:a,wooStatus:l,setActiveTab:c,backUrl:d}){const[{options:f,is_flow_instant_checkout:p,step_data:m,flow_title:h,step_title:g}]=Zp(),[{license_status:w}]=u(),[y,b]=(0,s.useState)(!1),[v,x]=(0,s.useState)((0,D.__)("Activate WooCommerce","cartflows")),N=l||!l&&"landing"===r?.type,_=VI(),E=VI("plus-pro"),M="coupon"===t&&_,S="product-options"===t&&_,k="dynamic-offers"===e&&_,C="order_bumps"===e&&E,j=["upsell","downsell"].includes(m?.type)&&wcfCartflowsPro()&&"Activated"!==w,A=M||S||k||C||j,T=A||!l&&["checkout","upsell","downsell","thankyou"].includes(r?.type),L="storeCheckout"===o?"store-checkout":"flows",O="storeCheckout"===o?(0,D.__)("Store Checkout","cartflows"):(0,D.__)("Funnels","cartflows"),z=g&&!1!==g?(0,D.sprintf)(/* translators: %s: step name */ /* translators: %s: step name */ |
| 40 |
(0,D.__)("%s Settings","cartflows"),g):(0,D.__)("Step Settings","cartflows"),P=(e=!0)=>(0,i.createElement)(i.Fragment,null,(0,i.createElement)("nav",{"aria-label":(0,D.__)("Breadcrumb","cartflows"),className:"flex items-center gap-1 py-1 text-xs text-text-tertiary flex-wrap"},(0,i.createElement)("a",{href:`admin.php?page=cartflows&path=${L}`,className:"text-text-secondary hover:text-text-primary no-underline transition-colors"},O),h&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{"aria-hidden":"true",className:"mx-0.5"},">"),(0,i.createElement)("a",{href:`admin.php${d}`,className:"text-text-secondary hover:text-text-primary no-underline transition-colors"},h)),(0,i.createElement)("span",{"aria-hidden":"true",className:"mx-0.5"},">"),(0,i.createElement)("span",{"aria-current":"page",className:"text-text-primary font-medium"},z)),(0,i.createElement)("div",{className:"flex justify-between items-center h-10"},(0,i.createElement)("div",{className:"flex items-center gap-2.5"+(y?" flex-1 min-w-0":"")},(0,i.createElement)(I,{to:{pathname:"admin.php",search:d},className:"text-icon-secondary hover:text-icon-primary no-underline shrink-0 transition-colors","aria-label":(0,D.__)("Back to funnel","cartflows")},(0,i.createElement)(yk,{className:"w-5 h-5 flex stroke-1"})),(0,i.createElement)(jk,{onEditingChange:b})),e&&!T&&!y&&(0,i.createElement)(bw,{id:"wcf-save-step-meta",ref:a})));if(!N)return(0,i.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"},P(!1),(0,i.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,i.createElement)("div",{className:"max-w-full"},(0,i.createElement)("h2",{className:"text-base font-medium tracking-tight text-text-primary sm:text-base"},(0,D.__)("WooCommerce is Required!","cartflows")),(0,i.createElement)("p",{className:"wcf-upgrade-to-pro-cta--text text-base font-normal text-text-secondary mt-2"},(0,D.sprintf)( |
| 41 |
// translators: %s: step type |
| 42 |
// translators: %s: step type |
| 43 |
(0,D.__)("To modify the %s step options, please install and activate the WooCommerce plugin.","cartflows"),r?.type))),(0,i.createElement)("div",{className:"mt-10 flex items-center gap-x-6 lg:mt-0 lg:flex-shrink-0"},(0,i.createElement)(Po,{variant:"primary",size:"md",onClick:(R=x,()=>{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),R((0,D.__)("Activating…","cartflows")),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{R((0,D.__)("Activated","cartflows")),window.location.reload()})})},v))));var R;let U;return U="change-template"===t&&"storeCheckout"===o&&"yes"!==p?(0,D.__)("Change Template","cartflows"):"checkout_form_fields"===e&&t?{"form-settings":(0,D.__)("Form Settings","cartflows"),"field-editor":(0,D.__)("Field Editor","cartflows"),"form-headings":(0,D.__)("Form Headings","cartflows"),"place-order-button":(0,D.__)("Place Order Button","cartflows")}[t]||ak(e,r?.tabs):n?.title||ak(e,r?.tabs),(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"sm",className:"wcf-step-settings--container min-w-0 max-w-3.5xl p-4 md:p-8 mx-auto w-full box-border"},P(),(0,i.createElement)(Pm,{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"},U&&(0,i.createElement)(iS,{title:U,tag:"h5",size:"xs",className:"text-text-primary"}),j?(0,i.createElement)(sS,{heading:(0,D.__)("License is required!","cartflows"),subHeading:(0,D.__)("Activate the license to modify this offer step's settings","cartflows")}):M?(0,i.createElement)(QI,{title:(0,D.__)("Apply Discounts Automatically and Convert More Customers","cartflows"),description:(0,D.__)("Remove friction at checkout — discounts activate the moment customers arrive. Upgrade to Pro and watch conversions climb immediately.","cartflows")}):"design"===e?(0,i.createElement)("div",{className:"space-y-4"},(0,i.createElement)("div",{className:"wcf-step-notices-wrapper rounded-md bg-brand-25 border border-solid border-border-interactive p-4"},(0,i.createElement)("div",{className:"text-sm text-brand-600"},"yes"===p&&["checkout","upsell","downsell","thankyou"].includes(m?.type)?(0,D.sprintf)( |
| 44 |
// translators: %s: The current step type. |
| 45 |
// translators: %s: The current step type. |
| 46 |
(0,D.__)("Use this to customize how your Instant %s page looks.","cartflows"),"thankyou"===m?.type?(0,D.__)("Thank You","cartflows"):m?.type.charAt(0).toUpperCase()+m?.type.slice(1)):(0,i.createElement)(i.Fragment,null,(0,D.__)("If you are using shortcodes, enable this design settings to apply styles.","cartflows")))),(0,i.createElement)(yM,{id:"wcf-enable-design-settings",name:"wcf-enable-design-settings",value:f["wcf-enable-design-settings"],label:(0,D.__)("Enable Design Settings","cartflows"),fullWidth:!0}),"yes"===f["wcf-enable-design-settings"]&&n&&(0,i.createElement)(bk,{section:n})):"checkout_form_fields"===e&&t?(0,i.createElement)(Mk,{sectionId:t}):"product-options"===t&&n?(0,i.createElement)(Ik,null):"change-template"===t&&"storeCheckout"===o&&"yes"!==p?(0,i.createElement)(kk,null):"checkout_offer"===e?(0,i.createElement)("div",{className:"wcf-page-wrapper"},ik(e,r,o,c)):n&&("products"!==e||"storeCheckout"!==o||cartflows_admin.store_checkout_show_product_tab)?(0,i.createElement)(bk,{section:n}):(0,i.createElement)("div",{className:"wcf-page-wrapper"},ik(e,r,o,c))))},Tk=function(){return(0,i.createElement)("div",{className:"wcf-step-settings-view flex flex-col lg:flex-row lg:gap-6 items-start w-full"},(0,i.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,i.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,i.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,i.createElement)("div",{key:r,className:"flex flex-col"},(0,i.createElement)("div",{className:"flex items-center gap-2.5 px-3 py-2"},(0,i.createElement)(HI,{className:"w-5 h-5 rounded"}),(0,i.createElement)(HI,{className:`h-3 ${e} flex-1`}),t&&(0,i.createElement)(HI,{className:"w-4 h-4 rounded"})),n.length>0&&(0,i.createElement)("div",{className:"flex flex-col gap-0.5 ml-10"},n.map((e,t)=>(0,i.createElement)("div",{key:t,className:"px-2 py-1.5"},(0,i.createElement)(HI,{className:`h-3 ${e}`}))))))))),(0,i.createElement)("div",{className:"wcf-step-settings--container min-w-0 max-w-3.5xl p-4 md:p-8 mx-auto w-full flex flex-col gap-3"},(0,i.createElement)("div",{className:"flex items-center gap-2 py-1"},(0,i.createElement)(HI,{className:"w-14 h-2.5"}),(0,i.createElement)(HI,{className:"w-2 h-2.5"}),(0,i.createElement)(HI,{className:"w-20 h-2.5"}),(0,i.createElement)(HI,{className:"w-2 h-2.5"}),(0,i.createElement)(HI,{className:"w-28 h-2.5"})),(0,i.createElement)("div",{className:"flex justify-between items-center h-10"},(0,i.createElement)("div",{className:"flex items-center gap-2.5"},(0,i.createElement)(HI,{className:"w-5 h-5 rounded"}),(0,i.createElement)(HI,{className:"w-40 h-5"})),(0,i.createElement)(HI,{className:"w-28 h-9 rounded-lg"})),(0,i.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,i.createElement)(HI,{className:"w-32 h-4"}),["w-28","w-36","w-24","w-32"].map((e,t)=>(0,i.createElement)("div",{key:t,className:"flex flex-col gap-2"},(0,i.createElement)(HI,{className:`${e} h-3.5`}),(0,i.createElement)(HI,{className:"w-full h-10 rounded-md"}))))))};function Lk(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 Ok=function(e){var t,n,r;const[{flow_id:o,step_data:a,flow_type:l,options:c,page_builder:d,is_flow_instant_checkout:f,settings_data:p,design_settings:h,page_settings:g},w]=Zp(),y=(0,s.useRef)(null),b=zh(),[{},v]=u(),x=(0,m.useHistory)(),N=new URLSearchParams((0,m.useLocation)()?.search),_=null!==(t=N.get("step_id"))&&void 0!==t?t:"",E=null!==(n=N.get("tab"))&&void 0!==n?n:"",M=null!==(r=N.get("section"))&&void 0!==r?r:null,{saveOrderBump:I}=tI(),[S,k]=(0,s.useState)(E||"products"),[C,j]=(0,s.useState)(M),A="active"===cartflows_admin.woocommerce_status;let T=!0;0!==Object.keys(a).length&&a.id.toString()===_&&(T=!1);const L=e=>{const t={};return Object.entries(e).forEach(([e,n])=>{const r={...n,step_type:a?.type||""};!1!==fm.isActiveControl(r,c)&&(t[e]=n)}),t},O=(0,s.useMemo)(()=>{if(!h?.settings)return h;const e={};return Object.entries(h.settings).forEach(([t,n])=>{if(["shortcode","shortcodes"].includes(n.slug)&&"other"!==d)return;const r={...n,step_type:a?.type||""};!1!==fm.isActiveControl(r,c)&&(e[t]=n)}),{...h,settings:e}},[h,d,a?.type,c]),z=(0,s.useMemo)(()=>{if(!p?.settings)return p;const e=L(p.settings),t={};return Object.entries(e).forEach(([e,n])=>{["shortcode","shortcodes"].includes(n.slug)&&"other"!==d||(t[e]=n)}),{...p,settings:t}},[p,d,a?.type,c]),P=(0,s.useMemo)(()=>g?.settings?{...g,settings:L(g.settings)}:g,[g,a?.type,c]);(0,s.useEffect)(()=>{let e=!0;return""!==_&&(async()=>{Xf()({path:`/cartflows/v1/admin/step-data/${_}`}).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}w({type:"SET_STEP_DATA",data:t})}})})(),()=>{e=!1}},[_]),(0,s.useEffect)(()=>{if(!T&&!M){const e=Lk(S,z,O,c,P);j(e)}},[T]);const R=null!=C?C:T?null:Lk(S,z,O,c,P);let U=[];if(a?.tabs){const e=a.tabs,t=Object.values(e).sort((e,t)=>e.priority-t.priority);let n=t.map(e=>({name:e.title,id:e.id}));B=n,F=a,n="other"!==d&&"yes"!==f||["upsell","downsell"].includes(F?.type)&&"yes"!==F?.options?.["wcf-enable-instant-layout"]?B.filter(e=>"design"!==e.id):B,U=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:HM,order_bumps:qI,checkout_form_fields:KI,"dynamic-offers":tS,checkout_offer:mg,settings:Hh,optin_form_fields:mg,design:JM}[l])&&void 0!==c?c:Hh),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,D.__)("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,D.__)("Form Settings","cartflows")},{id:"field-editor",tabId:"checkout_form_fields",name:(0,D.__)("Field Editor","cartflows")},{id:"form-headings",tabId:"checkout_form_fields",name:(0,D.__)("Form Headings","cartflows")},{id:"place-order-button",tabId:"checkout_form_fields",name:(0,D.__)("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,z,O,c,P,l,f)}var B,F;const Q=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}(S,R,z,O,P),V=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"})},Y=(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()})},Z="storeCheckout"===l?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${o}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${o}`;return T?(0,i.createElement)(Tk,null):(0,i.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"===c["wcf-enable-product-options"]&&Object.entries(c["wcf-product-options-data"]).forEach(([e,t])=>{Object.entries(t).forEach(([t,r])=>{n.append(`wcf-product-options-data[${e}][${t}]`,r)})}),"order_bumps"===S)I();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",_),"products"===S&&"checkout"===a.type&&"single-selection"===c["wcf-product-options"]){const e=n.get("wcf_default_add_to_cart[]");n.set(`wcf-product-options-data[${e}][add_to_cart]`,"yes")}Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{v({status:"SAVED"}),gm.success((0,D.__)("Settings saved successfully!","cartflows")),["products"].includes(S)&&e.renderCb()}).catch(()=>{v({status:"UNSAVED"}),gm.error((0,D.__)("Failed to save settings. Please try again.","cartflows"))})}}},(0,i.createElement)(gk,{accordionGroups:U,currentTab:S,currentSection:R,onTabChange:async function(e){if(e===S)return;await V()&&y.current?.click();const t=Lk(e,z,O,c,P);k(e),j(t),Y(e,t),window.wcfUnsavedChanges=!1},onSectionChange:async function(e,t){e===S&&t===C||(await V()&&y.current?.click(),k(e),j(t),Y(e,t),window.wcfUnsavedChanges=!1)}}),(0,i.createElement)(Ak,{currentTab:S,currentSection:R,sectionObject:Q,stepData:a,flowType:l,renderCb:e.renderCb,buttonRef:y,wooStatus:A,setActiveTab:k,backUrl:Z}))},zk=Ao("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"}]]),Pk=Ao("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"}]]),Rk=Ao("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"}]]),Uk=Ao("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"}]]),Bk=Ao("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"}]]),Fk=Ao("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"}]]),Qk=Ao("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"}]]),Vk=Ao("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"}]]),Yk=Ao("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"}]]),Zk=Ao("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"}]]),Wk=Ao("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 Gk={value:()=>{}};function Hk(){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 $k(r)}function $k(e){this._=e}function Xk(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function qk(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Gk,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}$k.prototype=Hk.prototype={constructor:$k,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]=qk(o[n],e.name,t);else if(null==t)for(n in o)o[n]=qk(o[n],e.name,null);return this}for(;++i<s;)if((n=(e=a[i]).type)&&(n=Xk(o[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new $k(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 Jk=Hk;function Kk(){}function eD(e){return null==e?Kk:function(){return this.querySelector(e)}}function tD(){return[]}function nD(e){return null==e?tD:function(){return this.querySelectorAll(e)}}function rD(e){return function(){return this.matches(e)}}function oD(e){return function(t){return t.matches(e)}}var aD=Array.prototype.find;function iD(){return this.firstElementChild}var sD=Array.prototype.filter;function lD(){return Array.from(this.children)}function cD(e){return new Array(e.length)}function dD(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function uD(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 dD(e,a[s]);for(;s<l;++s)(i=t[s])&&(o[s]=i)}function fD(e,t,n,r,o,a,i){var s,l,c,d=new Map,u=t.length,f=a.length,p=new Array(u);for(s=0;s<u;++s)(l=t[s])&&(p[s]=c=i.call(l,l.__data__,s,t)+"",d.has(c)?o[s]=l:d.set(c,l));for(s=0;s<f;++s)c=i.call(e,a[s],s,a)+"",(l=d.get(c))?(r[s]=l,l.__data__=a[s],d.delete(c)):n[s]=new dD(e,a[s]);for(s=0;s<u;++s)(l=t[s])&&d.get(p[s])===l&&(o[s]=l)}function pD(e){return e.__data__}function mD(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function hD(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}dD.prototype={constructor:dD,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 gD="http://www.w3.org/1999/xhtml";const wD={svg:"http://www.w3.org/2000/svg",xhtml:gD,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function yD(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),wD.hasOwnProperty(t)?{space:wD[t],local:e}:e}function bD(e){return function(){this.removeAttribute(e)}}function vD(e){return function(){this.removeAttributeNS(e.space,e.local)}}function xD(e,t){return function(){this.setAttribute(e,t)}}function ND(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function _D(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function ED(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 MD(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ID(e){return function(){this.style.removeProperty(e)}}function SD(e,t,n){return function(){this.style.setProperty(e,t,n)}}function kD(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function DD(e,t){return e.style.getPropertyValue(t)||MD(e).getComputedStyle(e,null).getPropertyValue(t)}function CD(e){return function(){delete this[e]}}function jD(e,t){return function(){this[e]=t}}function AD(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function TD(e){return e.trim().split(/^|\s+/)}function LD(e){return e.classList||new OD(e)}function OD(e){this._node=e,this._names=TD(e.getAttribute("class")||"")}function zD(e,t){for(var n=LD(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function PD(e,t){for(var n=LD(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function RD(e){return function(){zD(this,e)}}function UD(e){return function(){PD(this,e)}}function BD(e,t){return function(){(t.apply(this,arguments)?zD:PD)(this,e)}}function FD(){this.textContent=""}function QD(e){return function(){this.textContent=e}}function VD(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function YD(){this.innerHTML=""}function ZD(e){return function(){this.innerHTML=e}}function WD(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function GD(){this.nextSibling&&this.parentNode.appendChild(this)}function HD(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $D(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===gD&&t.documentElement.namespaceURI===gD?t.createElement(e):t.createElementNS(n,e)}}function XD(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function qD(e){var t=yD(e);return(t.local?XD:$D)(t)}function JD(){return null}function KD(){var e=this.parentNode;e&&e.removeChild(this)}function eC(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tC(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nC(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 rC(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 oC(e,t,n){var r=MD(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 aC(e,t){return function(){return oC(this,e,t)}}function iC(e,t){return function(){return oC(this,e,t.apply(this,arguments))}}OD.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 sC=[null];function lC(e,t){this._groups=e,this._parents=t}function cC(){return new lC([[document.documentElement]],sC)}lC.prototype=cC.prototype={constructor:lC,select:function(e){"function"!=typeof e&&(e=eD(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),d=0;d<l;++d)(a=s[d])&&(i=e.call(a,a.__data__,d,s))&&("__data__"in a&&(i.__data__=a.__data__),c[d]=i);return new lC(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):nD(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 lC(r,o)},selectChild:function(e){return this.select(null==e?iD:function(e){return function(){return aD.call(this.children,e)}}("function"==typeof e?e:oD(e)))},selectChildren:function(e){return this.selectAll(null==e?lD:function(e){return function(){return sD.call(this.children,e)}}("function"==typeof e?e:oD(e)))},filter:function(e){"function"!=typeof e&&(e=rD(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 lC(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,pD);var n=t?fD:uD,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 d=r[c],u=o[c],f=u.length,p=mD(e.call(d,d&&d.__data__,c,r)),m=p.length,h=s[c]=new Array(m),g=i[c]=new Array(m);n(d,u,h,g,l[c]=new Array(f),p,t);for(var w,y,b=0,v=0;b<m;++b)if(w=h[b]){for(b>=v&&(v=b+1);!(y=g[v])&&++v<m;);w._next=y||null}}return(i=new lC(i,r))._enter=s,i._exit=l,i},enter:function(){return new lC(this._enter||this._groups.map(cD),this._parents)},exit:function(){return new lC(this._exit||this._groups.map(cD),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,d=n[l],u=r[l],f=d.length,p=s[l]=new Array(f),m=0;m<f;++m)(c=d[m]||u[m])&&(p[m]=c);for(;l<o;++l)s[l]=n[l];return new lC(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=hD);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),d=0;d<l;++d)(i=s[d])&&(c[d]=i);c.sort(t)}return new lC(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=yD(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?vD:bD:"function"==typeof t?n.local?ED:_D:n.local?ND:xD)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?ID:"function"==typeof t?kD:SD)(e,t,null==n?"":n)):DD(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?CD:"function"==typeof t?AD:jD)(e,t)):this.node()[e]},classed:function(e,t){var n=TD(e+"");if(arguments.length<2){for(var r=LD(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?BD:t?RD:UD)(n,t))},text:function(e){return arguments.length?this.each(null==e?FD:("function"==typeof e?VD:QD)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?YD:("function"==typeof e?WD:ZD)(e)):this.node().innerHTML},raise:function(){return this.each(GD)},lower:function(){return this.each(HD)},append:function(e){var t="function"==typeof e?e:qD(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(e,t){var n="function"==typeof e?e:qD(e),r=null==t?JD:"function"==typeof t?t:eD(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(KD)},clone:function(e){return this.select(e?tC:eC)},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?rC:nC,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,d=s.length;c<d;++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?iC:aC)(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 dC=cC;function uC(e){return"string"==typeof e?new lC([[document.querySelector(e)]],[document.documentElement]):new lC([[e]],sC)}function fC(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 pC={passive:!1},mC={capture:!0,passive:!1};function hC(e){e.stopImmediatePropagation()}function gC(e){e.preventDefault(),e.stopImmediatePropagation()}function wC(e){var t=e.document.documentElement,n=uC(e).on("dragstart.drag",gC,mC);"onselectstart"in t?n.on("selectstart.drag",gC,mC):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function yC(e,t){var n=e.document.documentElement,r=uC(e).on("dragstart.drag",null);t&&(r.on("click.drag",gC,mC),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 bC=e=>()=>e;function vC(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:a,x:i,y:s,dx:l,dy:c,dispatch:d}){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:d}})}function xC(e){return!e.ctrlKey&&!e.button}function NC(){return this.parentNode}function _C(e,t){return null==t?{x:e.x,y:e.y}:t}function EC(){return navigator.maxTouchPoints||"ontouchstart"in this}function MC(){var e,t,n,r,o=xC,a=NC,i=_C,s=EC,l={},c=Jk("start","drag","end"),d=0,u=0;function f(e){e.on("mousedown.drag",p).filter(s).on("touchstart.drag",g).on("touchmove.drag",w,pC).on("touchend.drag touchcancel.drag",y).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&&(uC(i.view).on("mousemove.drag",m,mC).on("mouseup.drag",h,mC),wC(i.view),hC(i),n=!1,e=i.clientX,t=i.clientY,l("start",i))}}function m(r){if(gC(r),!n){var o=r.clientX-e,a=r.clientY-t;n=o*o+a*a>u}l.mouse("drag",r)}function h(e){uC(e.view).on("mousemove.drag mouseup.drag",null),yC(e.view,n),gC(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]))&&(hC(e),r("start",e,i[n]))}}function w(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=l[r[t].identifier])&&(gC(e),n("drag",e,r[t]))}function y(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])&&(hC(e),n("end",e,o[t]))}function b(e,t,n,r,o,a){var s,u,p,m=c.copy(),h=fC(a||n,t);if(null!=(p=i.call(e,new vC("beforestart",{sourceEvent:n,target:f,identifier:o,active:d,x:h[0],y:h[1],dx:0,dy:0,dispatch:m}),r)))return s=p.x-h[0]||0,u=p.y-h[1]||0,function n(a,i,c){var g,w=h;switch(a){case"start":l[o]=n,g=d++;break;case"end":delete l[o],--d;case"drag":h=fC(c||i,t),g=d}m.call(a,e,new vC(a,{sourceEvent:i,subject:p,target:f,identifier:o,active:g,x:h[0]+s,y:h[1]+u,dx:h[0]-w[0],dy:h[1]-w[1],dispatch:m}),r)}}return f.filter=function(e){return arguments.length?(o="function"==typeof e?e:bC(!!e),f):o},f.container=function(e){return arguments.length?(a="function"==typeof e?e:bC(e),f):a},f.subject=function(e){return arguments.length?(i="function"==typeof e?e:bC(e),f):i},f.touchable=function(e){return arguments.length?(s="function"==typeof e?e:bC(!!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?(u=(e=+e)*e,f):Math.sqrt(u)},f}function IC(e){return((e=Math.exp(e))+1/e)/2}vC.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};const SC=function e(t,n,r){function o(e,o){var a,i,s=e[0],l=e[1],c=e[2],d=o[0],u=o[1],f=o[2],p=d-s,m=u-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),w=(f*f-c*c+r*h)/(2*c*n*g),y=(f*f-c*c-r*h)/(2*f*n*g),b=Math.log(Math.sqrt(w*w+1)-w),v=Math.log(Math.sqrt(y*y+1)-y);i=(v-b)/t,a=function(e){var r=e*i,o=IC(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/IC(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 kC,DC,CC=0,jC=0,AC=0,TC=0,LC=0,OC=0,zC="object"==typeof performance&&performance.now?performance:Date,PC="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function RC(){return LC||(PC(UC),LC=zC.now()+OC)}function UC(){LC=0}function BC(){this._call=this._time=this._next=null}function FC(e,t,n){var r=new BC;return r.restart(e,t,n),r}function QC(){LC=(TC=zC.now())+OC,CC=jC=0;try{!function(){RC(),++CC;for(var e,t=kC;t;)(e=LC-t._time)>=0&&t._call.call(void 0,e),t=t._next;--CC}()}finally{CC=0,function(){for(var e,t,n=kC,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:kC=t);DC=e,YC(r)}(),LC=0}}function VC(){var e=zC.now(),t=e-TC;t>1e3&&(OC-=t,TC=e)}function YC(e){CC||(jC&&(jC=clearTimeout(jC)),e-LC>24?(e<1/0&&(jC=setTimeout(QC,e-zC.now()-OC)),AC&&(AC=clearInterval(AC))):(AC||(TC=zC.now(),AC=setInterval(VC,1e3)),CC=1,PC(QC)))}function ZC(e,t,n){var r=new BC;return t=null==t?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}BC.prototype=FC.prototype={constructor:BC,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?RC():+n)+(null==t?0:+t),this._next||DC===this||(DC?DC._next=this:kC=this,DC=this),this._call=e,this._time=n,YC()},stop:function(){this._call&&(this._call=null,this._time=1/0,YC())}};var WC=Jk("start","end","cancel","interrupt"),GC=[];function HC(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,d,u,f;if(1!==n.state)return s();for(c in o)if((f=o[c]).name===n.name){if(3===f.state)return ZC(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(ZC(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(u=n.tween.length),c=0,d=-1;c<u;++c)(f=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++d]=f);r.length=d+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=FC(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:WC,tween:GC,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function $C(e,t){var n=qC(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function XC(e,t){var n=qC(e,t);if(n.state>3)throw new Error("too late; already running");return n}function qC(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function JC(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}}function KC(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var ej,tj=180/Math.PI,nj={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function rj(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)*tj,skewX:Math.atan(l)*tj,scaleX:i,scaleY:s}}function oj(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:KC(e,o)},{i:l-2,x:KC(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:KC(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:KC(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:KC(e,n)},{i:s-2,x:KC(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 aj=oj(function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?nj:rj(t.a,t.b,t.c,t.d,t.e,t.f)},"px, ","px)","deg)"),ij=oj(function(e){return null==e?nj:(ej||(ej=document.createElementNS("http://www.w3.org/2000/svg","g")),ej.setAttribute("transform",e),(e=ej.transform.baseVal.consolidate())?rj((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):nj)},", ",")",")");function sj(e,t){var n,r;return function(){var o=XC(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 lj(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var a=XC(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 cj(e,t,n){var r=e._id;return e.each(function(){var e=XC(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)}),function(e){return qC(e,r).value[t]}}function dj(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function uj(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function fj(){}var pj=.7,mj=1/pj,hj="\\s*([+-]?\\d+)\\s*",gj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yj=/^#([0-9a-f]{3,8})$/,bj=new RegExp(`^rgb\\(${hj},${hj},${hj}\\)$`),vj=new RegExp(`^rgb\\(${wj},${wj},${wj}\\)$`),xj=new RegExp(`^rgba\\(${hj},${hj},${hj},${gj}\\)$`),Nj=new RegExp(`^rgba\\(${wj},${wj},${wj},${gj}\\)$`),_j=new RegExp(`^hsl\\(${gj},${wj},${wj}\\)$`),Ej=new RegExp(`^hsla\\(${gj},${wj},${wj},${gj}\\)$`),Mj={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 Ij(){return this.rgb().formatHex()}function Sj(){return this.rgb().formatRgb()}function kj(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=yj.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Dj(t):3===n?new Aj(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Cj(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Cj(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=bj.exec(e))?new Aj(t[1],t[2],t[3],1):(t=vj.exec(e))?new Aj(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=xj.exec(e))?Cj(t[1],t[2],t[3],t[4]):(t=Nj.exec(e))?Cj(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=_j.exec(e))?Rj(t[1],t[2]/100,t[3]/100,1):(t=Ej.exec(e))?Rj(t[1],t[2]/100,t[3]/100,t[4]):Mj.hasOwnProperty(e)?Dj(Mj[e]):"transparent"===e?new Aj(NaN,NaN,NaN,0):null}function Dj(e){return new Aj(e>>16&255,e>>8&255,255&e,1)}function Cj(e,t,n,r){return r<=0&&(e=t=n=NaN),new Aj(e,t,n,r)}function jj(e,t,n,r){return 1===arguments.length?function(e){return e instanceof fj||(e=kj(e)),e?new Aj((e=e.rgb()).r,e.g,e.b,e.opacity):new Aj}(e):new Aj(e,t,n,null==r?1:r)}function Aj(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Tj(){return`#${Pj(this.r)}${Pj(this.g)}${Pj(this.b)}`}function Lj(){const e=Oj(this.opacity);return`${1===e?"rgb(":"rgba("}${zj(this.r)}, ${zj(this.g)}, ${zj(this.b)}${1===e?")":`, ${e})`}`}function Oj(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function zj(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pj(e){return((e=zj(e))<16?"0":"")+e.toString(16)}function Rj(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Bj(e,t,n,r)}function Uj(e){if(e instanceof Bj)return new Bj(e.h,e.s,e.l,e.opacity);if(e instanceof fj||(e=kj(e)),!e)return new Bj;if(e instanceof Bj)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 Bj(i,s,l,e.opacity)}function Bj(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Fj(e){return(e=(e||0)%360)<0?e+360:e}function Qj(e){return Math.max(0,Math.min(1,e||0))}function Vj(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 Yj(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}dj(fj,kj,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Ij,formatHex:Ij,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Uj(this).formatHsl()},formatRgb:Sj,toString:Sj}),dj(Aj,jj,uj(fj,{brighter(e){return e=null==e?mj:Math.pow(mj,e),new Aj(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?pj:Math.pow(pj,e),new Aj(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Aj(zj(this.r),zj(this.g),zj(this.b),Oj(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:Tj,formatHex:Tj,formatHex8:function(){return`#${Pj(this.r)}${Pj(this.g)}${Pj(this.b)}${Pj(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Lj,toString:Lj})),dj(Bj,function(e,t,n,r){return 1===arguments.length?Uj(e):new Bj(e,t,n,null==r?1:r)},uj(fj,{brighter(e){return e=null==e?mj:Math.pow(mj,e),new Bj(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?pj:Math.pow(pj,e),new Bj(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 Aj(Vj(e>=240?e-240:e+120,o,r),Vj(e,o,r),Vj(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Bj(Fj(this.h),Qj(this.s),Qj(this.l),Oj(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=Oj(this.opacity);return`${1===e?"hsl(":"hsla("}${Fj(this.h)}, ${100*Qj(this.s)}%, ${100*Qj(this.l)}%${1===e?")":`, ${e})`}`}}));const Zj=e=>()=>e;function Wj(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Zj(isNaN(e)?t:e)}const Gj=function e(t){var n=function(e){return 1===(e=+e)?Wj: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):Zj(isNaN(t)?n:t)}}(t);function r(e,t){var r=n((e=jj(e)).r,(t=jj(t)).r),o=n(e.g,t.g),a=n(e.b,t.b),i=Wj(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 Hj(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=jj(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+""}}}Hj(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 Yj((n-r/t)*t,i,o,a,s)}}),Hj(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 Yj((n-r/t)*t,o,a,i,s)}});var $j=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xj=new RegExp($j.source,"g");function qj(e,t){var n,r,o,a=$j.lastIndex=Xj.lastIndex=0,i=-1,s=[],l=[];for(e+="",t+="";(n=$j.exec(e))&&(r=Xj.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:KC(n,r)})),a=Xj.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 Jj(e,t){var n;return("number"==typeof t?KC:t instanceof kj?Gj:(n=kj(t))?(t=n,Gj):qj)(e,t)}function Kj(e){return function(){this.removeAttribute(e)}}function eA(e){return function(){this.removeAttributeNS(e.space,e.local)}}function tA(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 nA(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 rA(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 oA(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 aA(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 iA(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 sA(e,t){return function(){$C(this,e).delay=+t.apply(this,arguments)}}function lA(e,t){return t=+t,function(){$C(this,e).delay=t}}function cA(e,t){return function(){XC(this,e).duration=+t.apply(this,arguments)}}function dA(e,t){return t=+t,function(){XC(this,e).duration=t}}var uA=dC.prototype.constructor;function fA(e){return function(){this.style.removeProperty(e)}}var pA=0;function mA(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function hA(){return++pA}var gA=dC.prototype;mA.prototype=function(e){return dC().transition(e)}.prototype={constructor:mA,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=eD(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],d=c.length,u=a[i]=new Array(d),f=0;f<d;++f)(s=c[f])&&(l=e.call(s,s.__data__,f,c))&&("__data__"in s&&(l.__data__=s.__data__),u[f]=l,HC(u[f],t,n,f,u,qC(s,n)));return new mA(a,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=nD(e));for(var r=this._groups,o=r.length,a=[],i=[],s=0;s<o;++s)for(var l,c=r[s],d=c.length,u=0;u<d;++u)if(l=c[u]){for(var f,p=e.call(l,l.__data__,u,c),m=qC(l,n),h=0,g=p.length;h<g;++h)(f=p[h])&&HC(f,t,n,h,p,m);a.push(p),i.push(l)}return new mA(a,i,t,n)},selectChild:gA.selectChild,selectChildren:gA.selectChildren,filter:function(e){"function"!=typeof e&&(e=rD(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 mA(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],d=n[s],u=c.length,f=i[s]=new Array(u),p=0;p<u;++p)(l=c[p]||d[p])&&(f[p]=l);for(;s<r;++s)i[s]=t[s];return new mA(i,this._parents,this._name,this._id)},selection:function(){return new uA(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=hA(),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 d=qC(i,t);HC(i,e,n,c,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new mA(r,this._parents,e,n)},call:gA.call,nodes:gA.nodes,node:gA.node,size:gA.size,empty:gA.empty,each:gA.each,on:function(e,t){var n=this._id;return arguments.length<2?qC(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)?$C:XC;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=yD(e),r="transform"===n?ij:Jj;return this.attrTween(e,"function"==typeof t?(n.local?oA:rA)(n,r,cj(this,"attr."+e,t)):null==t?(n.local?eA:Kj)(n):(n.local?nA:tA)(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=yD(e);return this.tween(n,(r.local?aA:iA)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?aj:Jj;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var a=DD(this,e),i=(this.style.removeProperty(e),DD(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}(e,r)).on("end.style."+e,fA(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,a;return function(){var i=DD(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=DD(this,e)),i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}}(e,r,cj(this,"style."+e,t))).each(function(e,t){var n,r,o,a,i="style."+t,s="end."+i;return function(){var l=XC(this,e),c=l.on,d=null==l.value[i]?a||(a=fA(t)):void 0;c===n&&o===d||(r=(n=c).copy()).on(s,o=d),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,a=n+"";return function(){var i=DD(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}}(cj(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=qC(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?sj:lj)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?sA:lA)(t,e)):qC(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?cA:dA)(t,e)):qC(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(){XC(this,e).ease=t}}(t,e)):qC(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;XC(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=XC(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]:gA[Symbol.iterator]};var wA={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function yA(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}dC.prototype.interrupt=function(e){return this.each(function(){JC(this,e)})},dC.prototype.transition=function(e){var t,n;e instanceof mA?(t=e._id,e=e._name):(t=hA(),(n=wA).time=RC(),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])&&HC(i,e,t,c,s,n||yA(i,t));return new mA(r,this._parents,e,t)};const bA=e=>()=>e;function vA(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 xA(e,t,n){this.k=e,this.x=t,this.y=n}xA.prototype={constructor:xA,scale:function(e){return 1===e?this:new xA(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new xA(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 NA=new xA(1,0,0);function _A(e){for(;!e.__zoom;)if(!(e=e.parentNode))return NA;return e.__zoom}function EA(e){e.stopImmediatePropagation()}function MA(e){e.preventDefault(),e.stopImmediatePropagation()}function IA(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function SA(){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 kA(){return this.__zoom||NA}function DA(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function CA(){return navigator.maxTouchPoints||"ontouchstart"in this}function jA(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 AA(){var e,t,n,r=IA,o=SA,a=jA,i=DA,s=CA,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,u=SC,f=Jk("start","zoom","end"),p=0,m=10;function h(e){e.property("__zoom",kA).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",E).filter(s).on("touchstart.zoom",M).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 xA(t,e.x,e.y)}function w(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 xA(e.k,r,o)}function y(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?y(s):"function"==typeof n?n.apply(e,a):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),d=e.__zoom,f="function"==typeof t?t.apply(e,a):t,p=u(d.invert(l).concat(c/d.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 xA(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)))),d=fC(e);if(n.wheel)n.mouse[0][0]===d[0]&&n.mouse[0][1]===d[1]||(n.mouse[1]=o.invert(n.mouse[0]=d)),clearTimeout(n.wheel);else{if(o.k===s)return;n.mouse=[d,o.invert(d)],JC(this),n.start()}MA(e),n.wheel=setTimeout(function(){n.wheel=null,n.end()},150),n.zoom("mouse",a(w(g(o,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function _(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,i=v(this,t,!0).event(e),s=uC(e.view).on("mousemove.zoom",function(e){if(MA(e),!i.moved){var t=e.clientX-d,n=e.clientY-u;i.moved=t*t+n*n>p}i.event(e).zoom("mouse",a(w(i.that.__zoom,i.mouse[0]=fC(e,o),i.mouse[1]),i.extent,c))},!0).on("mouseup.zoom",function(e){s.on("mousemove.zoom mouseup.zoom",null),yC(e.view,i.moved),MA(e),i.event(e).end()},!0),l=fC(e,o),d=e.clientX,u=e.clientY;wC(e.view),EA(e),i.mouse=[l,this.__zoom.invert(l)],JC(this),i.start()}}function E(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,i=fC(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(i),l=n.k*(e.shiftKey?.5:2),u=a(w(g(n,l),i,s),o.apply(this,t),c);MA(e),d>0?uC(this).transition().duration(d).call(b,u,i,e):uC(this).call(h.transform,u,i,e)}}function M(n,...o){if(r.apply(this,arguments)){var a,i,s,l,c=n.touches,d=c.length,u=v(this,o,n.changedTouches.length===d).event(n);for(EA(n),i=0;i<d;++i)l=[l=fC(s=c[i],this),this.__zoom.invert(l),s.identifier],u.touch0?u.touch1||u.touch0[2]===l[2]||(u.touch1=l,u.taps=0):(u.touch0=l,a=!0,u.taps=1+!!e);e&&(e=clearTimeout(e)),a&&(u.taps<2&&(t=l[0],e=setTimeout(function(){e=null},500)),JC(this),u.start())}}function I(e,...t){if(this.__zooming){var n,r,o,i,s=v(this,t).event(e),l=e.changedTouches,d=l.length;for(MA(e),n=0;n<d;++n)o=fC(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 u=s.touch0[0],f=s.touch0[1],p=s.touch1[0],m=s.touch1[1],h=(h=p[0]-u[0])*h+(h=p[1]-u[1])*h,y=(y=m[0]-f[0])*y+(y=m[1]-f[1])*y;r=g(r,Math.sqrt(h/y)),o=[(u[0]+p[0])/2,(u[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(w(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(EA(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=fC(a,this),Math.hypot(t[0]-a[0],t[1]-a[1])<m)){var c=uC(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",kA),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?y(e):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(i),l="function"==typeof t?t.apply(this,arguments):t;return a(w(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?y(e):"function"==typeof r?r.apply(this,arguments):r;return a(NA.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=uC(this.that).datum();f.call(e,this.that,new vA(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:bA(+e),h):i},h.filter=function(e){return arguments.length?(r="function"==typeof e?e:bA(!!e),h):r},h.touchable=function(e){return arguments.length?(s="function"==typeof e?e:bA(!!e),h):s},h.extent=function(e){return arguments.length?(o="function"==typeof e?e:bA([[+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?(d=+e,h):d},h.interpolate=function(e){return arguments.length?(u=e,h):u},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}function TA(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]=PA(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 LA(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function OA(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]=PA(e[n],t[n]):o[n]=t[n];return function(e){for(n in r)o[n]=r[n](e);return o}}function zA(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 PA(e,t){var n,r=typeof t;return null==t||"boolean"===r?Zj(t):("number"===r?KC:"string"===r?(n=kj(t))?(t=n,Gj):qj:t instanceof kj?Gj:t instanceof Date?LA:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}(t)?zA:Array.isArray(t)?TA:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?OA:KC)(e,t)}_A.prototype=xA.prototype;const RA=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],UA=["Enter"," ","Escape"],BA={"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 FA,QA,VA;!function(e){e.Strict="strict",e.Loose="loose"}(FA||(FA={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(QA||(QA={})),function(e){e.Partial="partial",e.Full="full"}(VA||(VA={}));const YA={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ZA,WA,GA;!function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(ZA||(ZA={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(WA||(WA={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(GA||(GA={}));const HA={[GA.Left]:GA.Right,[GA.Right]:GA.Left,[GA.Top]:GA.Bottom,[GA.Bottom]:GA.Top};function $A(e){return null===e?null:e?"valid":"invalid"}const XA=e=>"id"in e&&"source"in e&&"target"in e,qA=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),JA=(e,t=[0,0])=>{const{width:n,height:r}=ET(e),o=e.origin??t,a=n*o[0],i=r*o[1];return{x:e.position.x-a,y:e.position.y-i}},KA=(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=sT(n,uT(e)),r=!0)}),r?cT(n):{x:0,y:0,width:0,height:0}},eT=(e,t,[n,r,o]=[0,0,1],a=!1,i=!1)=>{const s={...yT(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,d=pT(s,dT(t)),u=(o??0)*(c??0),f=a&&d>0;(!t.internals.handleBounds||f||d>=u||t.dragging)&&l.push(t)}return l};function tT({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},d=i.origin??r;let u=i.extent||o;if("parent"!==i.extent||i.expandParent)s&&_T(i.extent)&&(u=[[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&&(u=[[l,c],[l+e,c+t]])}else a?.("005","Only child nodes can use a parent extent.");const f=_T(u)?rT(t,u,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)*d[0],y:f.y-c+(i.measured.height??0)*d[1]},positionAbsolute:f}}const nT=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),rT=(e={x:0,y:0},t,n)=>({x:nT(e.x,t[0][0],t[1][0]-(n?.width??0)),y:nT(e.y,t[0][1],t[1][1]-(n?.height??0))});function oT(e,t,n){const{width:r,height:o}=ET(n),{x:a,y:i}=n.internals.positionAbsolute;return rT(e,[[a,i],[a+r,i+o]],t)}const aT=(e,t,n)=>e<t?nT(Math.abs(e-t),1,t)/t:e>n?-nT(Math.abs(e-n),1,t)/t:0,iT=(e,t,n=15,r=40)=>[aT(e.x,r,t.width-r)*n,aT(e.y,r,t.height-r)*n],sT=(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)}),lT=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),cT=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),dT=(e,t=[0,0])=>{const{x:n,y:r}=qA(e)?e.internals.positionAbsolute:JA(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}},uT=(e,t=[0,0])=>{const{x:n,y:r}=qA(e)?e.internals.positionAbsolute:JA(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)}},fT=(e,t)=>cT(sT(lT(e),lT(t))),pT=(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)},mT=e=>hT(e.width)&&hT(e.height)&&hT(e.x)&&hT(e.y),hT=e=>!isNaN(e)&&isFinite(e),gT=(e,t)=>{},wT=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),yT=({x:e,y:t},[n,r,o],a=!1,i=[1,1])=>{const s={x:(e-n)/o,y:(t-r)/o};return a?wT(s,i):s},bT=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function vT(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 xT=(e,t,n,r,o,a)=>{const i=function(e,t,n){if("string"==typeof e||"number"==typeof e){const r=vT(e,n),o=vT(e,t);return{top:r,right:o,bottom:r,left:o,x:2*o,y:2*r}}if("object"==typeof e){const r=vT(e.top??e.y??0,n),o=vT(e.bottom??e.y??0,n),a=vT(e.left??e.x??0,t),i=vT(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),d=nT(c,r,o),u=t/2-(e.x+e.width/2)*d,f=n/2-(e.y+e.height/2)*d,p=function(e,t,n,r,o,a){const{x:i,y:s}=bT(e,[t,n,r]),{x:l,y:c}=bT({x:e.x+e.width,y:e.y+e.height},[t,n,r]),d=o-l,u=a-c;return{left:Math.floor(i),top:Math.floor(s),right:Math.floor(d),bottom:Math.floor(u)}}(e,u,f,d,t,n),m=Math.min(p.left-i.left,0),h=Math.min(p.top-i.top,0);return{x:u-m+Math.min(p.right-i.right,0),y:f-h+Math.min(p.bottom-i.bottom,0),zoom:d}},NT=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function _T(e){return null!=e&&"parent"!==e}function ET(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function MT(e){return void 0!==(e.measured?.width??e.width??e.initialWidth)&&void 0!==(e.measured?.height??e.height??e.initialHeight)}function IT(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 ST(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function kT(e){return{...BA,...e||{}}}function DT(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:a,y:i}=OT(e),s=yT({x:a-(o?.left??0),y:i-(o?.top??0)},r),{x:l,y:c}=n?wT(s,t):s;return{xSnapped:l,ySnapped:c,...s}}const CT=e=>({width:e.offsetWidth,height:e.offsetHeight}),jT=e=>e?.getRootNode?.()||window?.document,AT=["INPUT","SELECT","TEXTAREA"];function TT(e){const t=e.composedPath?.()?.[0]||e.target;return 1===t?.nodeType&&(AT.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey"))}const LT=e=>"clientX"in e,OT=(e,t)=>{const n=LT(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)}},zT=(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,...CT(t)}}):null};function PT({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 RT(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function UT({pos:e,x1:t,y1:n,x2:r,y2:o,c:a}){switch(e){case GA.Left:return[t-RT(t-r,a),n];case GA.Right:return[t+RT(r-t,a),n];case GA.Top:return[t,n-RT(n-o,a)];case GA.Bottom:return[t,n+RT(o-n,a)]}}function BT({sourceX:e,sourceY:t,sourcePosition:n=GA.Bottom,targetX:r,targetY:o,targetPosition:a=GA.Top,curvature:i=.25}){const[s,l]=UT({pos:n,x1:e,y1:t,x2:r,y2:o,c:i}),[c,d]=UT({pos:a,x1:r,y1:o,x2:e,y2:t,c:i}),[u,f,p,m]=PT({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:d});return[`M${e},${t} C${s},${l} ${c},${d} ${r},${o}`,u,f,p,m]}function FT({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 QT({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const a=sT(uT(e),uT(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 pT(i,cT(a))>0}const VT=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,YT=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||VT;let o;return o=XA(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 ZT({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,a,i,s]=FT({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,a,i,s]}const WT={[GA.Left]:{x:-1,y:0},[GA.Right]:{x:1,y:0},[GA.Top]:{x:0,y:-1},[GA.Bottom]:{x:0,y:1}},GT=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function HT(e,t,n,r){const o=Math.min(GT(e,t)/2,GT(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 $T({sourceX:e,sourceY:t,sourcePosition:n=GA.Bottom,targetX:r,targetY:o,targetPosition:a=GA.Top,borderRadius:i=5,centerX:s,centerY:l,offset:c=20,stepPosition:d=.5}){const[u,f,p,m,h]=function({source:e,sourcePosition:t=GA.Bottom,target:n,targetPosition:r=GA.Top,center:o,offset:a,stepPosition:i}){const s=WT[t],l=WT[r],c={x:e.x+s.x*a,y:e.y+s.y*a},d={x:n.x+l.x*a,y:n.y+l.y*a},u=(({source:e,sourcePosition:t=GA.Bottom,target:n})=>t===GA.Left||t===GA.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:d}),f=0!==u.x?"x":"y",p=u[f];let m,h,g=[];const w={x:0,y:0},y={x:0,y:0},[,,b,v]=FT({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+(d.x-c.x)*i,h=o.y??(c.y+d.y)/2):(m=o.x??(c.x+d.x)/2,h=o.y??c.y+(d.y-c.y)*i);const e=[{x:m,y:c.y},{x:m,y:d.y}],t=[{x:c.x,y:h},{x:d.x,y:h}];g=s[f]===p?"x"===f?e:t:"x"===f?t:e}else{const o=[{x:c.x,y:d.y}],i=[{x:d.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?w[f]=(c[f]>e[f]?-1:1)*r:y[f]=(d[f]>n[f]?-1:1)*r}}if(t!==r){const e="x"===f?"y":"x",t=s[f]===l[e],n=c[e]>d[e],r=c[e]<d[e];(1===s[f]&&(!t&&n||t&&r)||1!==s[f]&&(!t&&r||t&&n))&&(g="x"===f?o:i)}const u={x:c.x+w.x,y:c.y+w.y},b={x:d.x+y.x,y:d.y+y.y};Math.max(Math.abs(u.x-g[0].x),Math.abs(b.x-g[0].x))>=Math.max(Math.abs(u.y-g[0].y),Math.abs(b.y-g[0].y))?(m=(u.x+b.x)/2,h=g[0].y):(m=g[0].x,h=(u.y+b.y)/2)}const x={x:c.x+w.x,y:c.y+w.y},N={x:d.x+y.x,y:d.y+y.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:d});let g=`M${u[0].x} ${u[0].y}`;for(let e=1;e<u.length-1;e++)g+=HT(u[e-1],u[e],u[e+1],i);return g+=`L${u[u.length-1].x} ${u[u.length-1].y}`,[g,f,p,m,h]}function XT(e){return e&&!(!e.internals.handleBounds&&!e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function qT(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 JT(e,t,n=GA.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??ET(e);if(r)return{x:o+i/2,y:a+s/2};switch(t?.position??n){case GA.Top:return{x:o+i/2,y:a};case GA.Right:return{x:o+i,y:a+s/2};case GA.Bottom:return{x:o+i/2,y:a+s};case GA.Left:return{x:o,y:a+s/2}}}function KT(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function eL(e,t){return e?"string"==typeof e?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&")}`:""}const tL={nodeOrigin:[0,0],nodeExtent:RA,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},nL={...tL,checkEquality:!0};function rL(e,t){const n={...e};for(const e in t)void 0!==t[e]&&(n[e]=t[e]);return n}function oL(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 aL(e){return"manual"===e}function iL(e,t,n,r={}){const o=rL(nL,r),a={i:0},i=new Map(t),s=o?.elevateNodesOnSelect&&!aL(o.zIndexMode)?1e3:0;let l=e.length>0,c=!1;t.clear(),n.clear();for(const d of e){let e=i.get(d.id);if(o.checkEquality&&d===e?.internals.userNode)t.set(d.id,e);else{const n=JA(d,o.nodeOrigin),r=_T(d.extent)?d.extent:o.nodeExtent,a=rT(n,r,ET(d));e={...o.defaults,...d,measured:{width:d.measured?.width,height:d.measured?.height},internals:{positionAbsolute:a,handleBounds:oL(d,e),z:lL(d,s,o.zIndexMode),userNode:d}},t.set(d.id,e)}void 0!==e.measured&&void 0!==e.measured.width&&void 0!==e.measured.height||e.hidden||(l=!1),d.parentId&&sL(e,t,n,r,a),c||=d.selected??!1}return{nodesInitialized:l,hasSelectedNodes:c}}function sL(e,t,n,r,o){const{elevateNodesOnSelect:a,nodeOrigin:i,nodeExtent:s,zIndexMode:l}=rL(tL,r),c=e.parentId,d=t.get(c);if(!d)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&&!d.parentId&&void 0===d.internals.rootParentIndex&&"auto"===l&&(d.internals.rootParentIndex=++o.i,d.internals.z=d.internals.z+10*o.i),o&&void 0!==d.internals.rootParentIndex&&(o.i=d.internals.rootParentIndex);const u=a&&!aL(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=ET(e),c=JA(e,n),d=_T(e.extent)?rT(c,e.extent,l):c;let u=rT({x:i+d.x,y:s+d.y},r,l);"parent"===e.extent&&(u=oT(u,l,t));const f=lL(e,o,a),p=t.internals.z??0;return{x:u.x,y:u.y,z:p>=f?p+1:f}}(e,d,i,s,u,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 lL(e,t,n){const r=hT(e.zIndex)?e.zIndex:0;return aL(n)?r:r+(e.selected?t:0)}function cL(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??dT(e),o=fT(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=ET(a),c=a.origin??r,d=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,u=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];(d>0||u>0||m||h)&&(o.push({id:i,type:"position",position:{x:a.position.x-d+m,y:a.position.y-u+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+d,y:t.position.y+u}})})),(l.width<t.width||l.height<t.height||d||u)&&o.push({id:i,type:"dimensions",setAttributes:!0,dimensions:{width:f+(d?c[0]*d-m:0),height:p+(u?c[1]*u-h:0)}})}),o}function dL(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 uL(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}`;dL("source",s,`${o}-${i}--${n}-${a}`,e,n,a),dL("target",s,l,e,o,i),t.set(r.id,r)}}function fL(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return!!n&&(!!n.selected||fL(n,t))}function pL(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 mL({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 hL(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,...JT(i,l,l.position,!0)}:l}function gL(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}const wL=()=>!0;function yL(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:a,doc:i,lib:s,flowId:l,isValidConnection:c=wL,nodeLookup:d}){const u="target"===a,f=t?i.querySelector(`.${s}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=OT(e),h=i.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,w={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){const e=gL(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 w;const l={source:u?t:r,sourceHandle:u?a:o,target:u?r:t,targetHandle:u?o:a};w.connection=l;const f=i&&s&&(n===FA.Strict?u&&"source"===e||!u&&"target"===e:t!==r||a!==o);w.isValid=f&&c(l),w.toHandle=hL(t,e,a,d,n,!0)}return w}const bL={onPointerDown:function(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:a,isTarget:i,domNode:s,nodeLookup:l,lib:c,autoPanOnConnect:d,flowId:u,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:w=wL,onReconnectEnd:y,updateConnection:b,getTransform:v,getFromHandle:x,autoPanSpeed:N,dragThreshold:_=1,handleDomNode:E}){const M=jT(e.target);let I,S=0;const{x:k,y:D}=OT(e),C=gL(a,E),j=s?.getBoundingClientRect();let A=!1;if(!j||!C)return;const T=hL(o,C,r,l,t);if(!T)return;let L=OT(e,j),O=!1,z=null,P=!1,R=null;function U(){if(!d||!j)return;const[e,t]=iT(L,j,N);f({x:e,y:t}),S=requestAnimationFrame(U)}const B={...T,nodeId:o,type:C,position:T.position},F=l.get(o);let Q={inProgress:!0,isValid:null,from:JT(F,B,GA.Left,!0),fromHandle:B,fromPosition:B.position,fromNode:F,to:L,toHandle:null,toPosition:HA[B.position],toNode:null,pointer:L};function V(){A=!0,b(Q),m?.(e,{nodeId:o,handleId:r,handleType:C})}function Y(e){if(!A){const{x:t,y:n}=OT(e),r=t-k,o=n-D;if(!(r*r+o*o>_*_))return;V()}if(!x()||!B)return void Z(e);const a=v();L=OT(e,j),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())pT(o,dT(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}=JT(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]}(yT(L,a,!1,[1,1]),n,l,B),O||(U(),O=!0);const s=yL(e,{handle:I,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:i?"target":"source",isValidConnection:w,doc:M,lib:c,flowId:u,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 d=l.get(o),f=d?JT(d,B,GA.Left,!0):Q.from,p={...Q,from:f,isValid:P,to:s.toHandle&&P?bT({x:s.toHandle.x,y:s.toHandle.y},a):L,toHandle:s.toHandle,toPosition:P&&s.toHandle?s.toHandle.position:HA[B.position],toNode:s.toHandle?l.get(s.toHandle.nodeId):null,pointer:L};b(p),Q=p}function Z(e){if(!("touches"in e&&e.touches.length>0)){if(A){(I||R)&&z&&P&&h?.(z);const{inProgress:t,...n}=Q,r={...n,toPosition:Q.toHandle?Q.toPosition:null};g?.(e,r),a&&y?.(e,r)}p(),cancelAnimationFrame(S),O=!1,P=!1,z=null,R=null,M.removeEventListener("mousemove",Y),M.removeEventListener("mouseup",Z),M.removeEventListener("touchmove",Y),M.removeEventListener("touchend",Z)}}0===_&&V(),M.addEventListener("mousemove",Y),M.addEventListener("mouseup",Z),M.addEventListener("touchmove",Y),M.addEventListener("touchend",Z)},isValid:yL},vL=e=>({x:e.x,y:e.y,zoom:e.k}),xL=({x:e,y:t,zoom:n})=>NA.translate(e,t).scale(n),NL=(e,t)=>e.target.closest(`.${t}`),_L=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),EL=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ML=(e,t=0,n=EL,r=()=>{})=>{const o="number"==typeof t&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},IL=e=>{const t=e.ctrlKey&&NT()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t};function SL({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},d=e.getBoundingClientRect(),u=AA().scaleExtent([t,n]).translateExtent(r),f=uC(e).call(u);w({x:o.x,y:o.y,zoom:nT(o.zoom,t,n)},[[0,0],[d.width,d.height]],r);const p=f.on("wheel.zoom"),m=f.on("dblclick.zoom");function h(e,t){return f?new Promise(n=>{u?.interpolate("linear"===t?.interpolate?PA:SC).transform(ML(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)}function g(){u.on("zoom",null)}async function w(e,t,n){const r=xL(e),o=u?.constrain()(r,t,n);return o&&await h(o),new Promise(e=>e(o))}return u.wheelDelta(IL),{update:function({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:o,panOnDrag:d,panOnScrollMode:h,panOnScrollSpeed:w,preventScrolling:y,zoomOnPinch:b,zoomOnScroll:v,zoomOnDoubleClick:x,zoomActivationKeyPressed:N,lib:_,onTransformChange:E,connectionInProgress:M,paneClickDistance:I,selectionOnDrag:S}){r&&!c.isZoomingOrPanning&&g();const k=o&&!N&&!r;u.clickDistance(S?1/0:!hT(I)||I<0?0:I);const D=k?function({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:a,zoomOnPinch:i,onPanZoomStart:s,onPanZoom:l,onPanZoomEnd:c}){return d=>{if(NL(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();const u=n.property("__zoom").k||1;if(d.ctrlKey&&i){const e=fC(d),t=IL(d),o=u*Math.pow(2,t);return void r.scaleTo(n,o,e,d)}const f=1===d.deltaMode?20:1;let p=o===QA.Vertical?0:d.deltaX*f,m=o===QA.Horizontal?0:d.deltaY*f;!NT()&&d.shiftKey&&o!==QA.Vertical&&(p=d.deltaY*f,m=0),r.translateBy(n,-p/u*a,-m/u*a,{internal:!0});const h=vL(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l?.(d,h),e.panScrollTimeout=setTimeout(()=>{c?.(d,h),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s?.(d,h))}}({zoomPanValues:c,noWheelClassName:e,d3Selection:f,d3Zoom:u,panOnScrollMode:h,panOnScrollSpeed:w,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=NL(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),i||s)return null;r.preventDefault(),n.call(this,r,o)}}({noWheelClassName:e,preventScrolling:y,d3ZoomHandler:p});if(f.on("wheel.zoom",D,{passive:!1}),!r){const e=function({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;const o=vL(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});u.on("start",e);const t=function({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return a=>{e.usedRightMouseButton=!(!n||!_L(t,e.mouseButton??0)),a.sourceEvent?.sync||r([a.transform.x,a.transform.y,a.transform.k]),o&&!a.sourceEvent?.internal&&o?.(a.sourceEvent,vL(a.transform))}}({zoomPanValues:c,panOnDrag:d,onPaneContextMenu:!!n,onPanZoom:a,onTransformChange:E});u.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&&_L(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&a(i.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const t=vL(i.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(i.sourceEvent,t)},n?150:0)}}}({zoomPanValues:c,panOnDrag:d,panOnScroll:o,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:l});u.on("end",r)}const C=function({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:a,userSelectionActive:i,noWheelClassName:s,noPanClassName:l,lib:c,connectionInProgress:d}){return u=>{const f=e||t,p=n&&u.ctrlKey,m="wheel"===u.type;if(1===u.button&&"mousedown"===u.type&&(NL(u,`${c}-flow__node`)||NL(u,`${c}-flow__edge`)))return!0;if(!(r||f||o||a||n))return!1;if(i)return!1;if(d&&!m)return!1;if(NL(u,s)&&m)return!1;if(NL(u,l)&&(!m||o&&m&&!e))return!1;if(!n&&u.ctrlKey&&m)return!1;if(!n&&"touchstart"===u.type&&u.touches?.length>1)return u.preventDefault(),!1;if(!f&&!o&&!p&&m)return!1;if(!r&&("mousedown"===u.type||"touchstart"===u.type))return!1;if(Array.isArray(r)&&!r.includes(u.button)&&"mousedown"===u.type)return!1;const h=Array.isArray(r)&&r.includes(u.button)||!u.button||u.button<=1;return(!u.ctrlKey||m)&&h}}({zoomActivationKeyPressed:N,panOnDrag:d,zoomOnScroll:v,panOnScroll:o,zoomOnDoubleClick:x,zoomOnPinch:b,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:_,connectionInProgress:M});u.filter(C),x?f.on("dblclick.zoom",m):f.on("dblclick.zoom",null)},destroy:g,setViewport:async function(e,t){const n=xL(e);return await h(n,t),new Promise(e=>e(n))},setViewportConstrained:w,getViewport:function(){const e=f?_A(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=>{u?.interpolate("linear"===t?.interpolate?PA:SC).scaleTo(ML(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)},scaleBy:function(e,t){return f?new Promise(n=>{u?.interpolate("linear"===t?.interpolate?PA:SC).scaleBy(ML(f,t?.duration,t?.ease,()=>n(!0)),e)}):Promise.resolve(!1)},setScaleExtent:function(e){u?.scaleExtent(e)},setTranslateExtent:function(e){u?.translateExtent(e)},syncViewport:function(e){if(f){const t=xL(e),n=f.property("__zoom");n.k===e.zoom&&n.x===e.x&&n.y===e.y||u?.transform(f,t,null,{sync:!0})}},setClickDistance:function(e){const t=!hT(e)||e<0?0:e;u?.clickDistance(t)}}}var kL;function DL(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 CL(e,t){return Math.max(0,t-e)}function jL(e,t){return Math.max(0,e-t)}function AL(e,t,n){return Math.max(0,t-e,e-n)}function TL(e,t){return e?!t:t}!function(e){e.Line="line",e.Handle="handle"}(kL||(kL={}));const LL={width:0,height:0,x:0,y:0},OL={...LL,pointerX:0,pointerY:0,aspectRatio:1};function zL(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 PL(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=PL(e[r]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var RL=n(9242);const UL=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:BL}=s,{useSyncExternalStoreWithSelector:FL}=RL,QL=e=>e;function VL(e,t=QL,n){const r=FL(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return BL(r),r}const YL=(e,t)=>{const n=(e=>e?UL(e):UL)(e),r=(e,r=t)=>VL(n,e,r);return Object.assign(r,n),r};function ZL(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 WL=(0,s.createContext)(null),GL=WL.Provider,HL="[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001";function $L(e,t){const n=(0,s.useContext)(WL);if(null===n)throw new Error(HL);return VL(n,e,t)}function XL(){const e=(0,s.useContext)(WL);if(null===e)throw new Error(HL);return(0,s.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const qL={display:"none"},JL={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},KL="react-flow__node-desc",eO="react-flow__edge-desc",tO=e=>e.ariaLiveMessage,nO=e=>e.ariaLabelConfig;function rO({rfId:e}){const t=$L(tO);return(0,C.jsx)("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:JL,children:t})}function oO({rfId:e,disableKeyboardA11y:t}){const n=$L(nO);return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{id:`${KL}-${e}`,style:qL,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,C.jsx)("div",{id:`${eO}-${e}`,style:qL,children:n["edge.a11yDescription.default"]}),!t&&(0,C.jsx)(rO,{rfId:e})]})}const aO=(0,s.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...o},a)=>{const i=`${e}`.split("-");return(0,C.jsx)("div",{className:PL(["react-flow__panel",n,...i]),style:r,ref:a,...o,children:t})});function iO({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:(0,C.jsx)(aO,{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,C.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}aO.displayName="Panel";const sO=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}},lO=e=>e.id;function cO(e,t){return ZL(e.selectedNodes.map(lO),t.selectedNodes.map(lO))&&ZL(e.selectedEdges.map(lO),t.selectedEdges.map(lO))}function dO({onSelectionChange:e}){const t=XL(),{selectedNodes:n,selectedEdges:r}=$L(sO,cO);return(0,s.useEffect)(()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChangeHandlers.forEach(e=>e(o))},[n,r,e]),null}const uO=e=>!!e.onSelectionChangeHandlers;function fO({onSelectionChange:e}){const t=$L(uO);return e||t?(0,C.jsx)(dO,{onSelectionChange:e}):null}const pO="undefined"!=typeof window?s.useLayoutEffect:s.useEffect,mO=[0,0],hO={x:0,y:0,zoom:1},gO=["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"],wO=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}),yO={translateExtent:RA,nodeOrigin:mO,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function bO(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:a,setNodeExtent:i,reset:l,setDefaultNodesAndEdges:c}=$L(wO,ZL),d=XL();pO(()=>(c(e.defaultNodes,e.defaultEdges),()=>{u.current=yO,l()}),[]);const u=(0,s.useRef)(yO);return pO(()=>{for(const s of gO){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?d.setState({ariaLabelConfig:kT(l)}):"fitView"===s?d.setState({fitViewQueued:l}):"fitViewOptions"===s?d.setState({fitViewOptions:l}):d.setState({[s]:l}))}u.current=e},gO.map(t=>e[t])),null}function vO(){return"undefined"!=typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}const xO="undefined"!=typeof document?document:null;function NO(e=null,t={target:xO,actInsideInputWithModifier:!0}){const[n,r]=(0,s.useState)(!1),o=(0,s.useRef)(!1),a=(0,s.useRef)(new Set([])),[i,l]=(0,s.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,s.useEffect)(()=>{const n=t?.target??xO,s=t?.actInsideInputWithModifier??!0;if(null!==e){const e=e=>{if(o.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!o.current||o.current&&!s)&&TT(e))return!1;const n=EO(e.code,l);if(a.current.add(e[n]),_O(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=EO(e.code,l);_O(i,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(e[t]),"Meta"===e.key&&a.current.clear(),o.current=!1},d=()=>{a.current.clear(),r(!1)};return n?.addEventListener("keydown",e),n?.addEventListener("keyup",c),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{n?.removeEventListener("keydown",e),n?.removeEventListener("keyup",c),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function _O(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function EO(e,t){return t.includes(e)?"code":"key"}function MO(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)IO(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 IO(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 SO(e,t){return MO(e,t)}function kO(e,t){return MO(e,t)}function DO(e,t){return{id:e,type:"select",selected:t}}function CO(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(DO(a.id,e)))}return r}function jO({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 AO(e){return{id:e.id,type:"remove"}}const TO=e=>(e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e))(e);function LO(e){return(0,s.forwardRef)(e)}function OO(e){const[t,n]=(0,s.useState)(BigInt(0)),[r]=(0,s.useState)(()=>function(){let e=[];return{get:()=>e,reset:()=>{e=[]},push:t=>{e.push(t),n(e=>e+BigInt(1))}}}());return pO(()=>{const t=r.get();t.length&&(e(t),r.reset())},[t]),r}const zO=(0,s.createContext)(null);function PO({children:e}){const t=XL(),n=(0,s.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 d=jO({items:c,lookup:i});for(const e of l.values())d=e(d);o&&r(c),d.length>0?a?.(d):s&&window.requestAnimationFrame(()=>{const{fitViewQueued:e,nodes:n,setNodes:r}=t.getState();e&&r(n)})},[]),r=OO(n),o=(0,s.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(jO({items:s,lookup:i}))},[]),a=OO(o),i=(0,s.useMemo)(()=>({nodeQueue:r,edgeQueue:a}),[]);return(0,C.jsx)(zO.Provider,{value:i,children:e})}const RO=e=>!!e.panZoom;function UO(){const e=(()=>{const e=XL();return(0,s.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=xT(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},d=n.snapGrid??o,u=n.snapToGrid??a;return yT(c,r,u,d)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:a}=r.getBoundingClientRect(),i=bT(t,n);return{x:i.x+o,y:i.y+a}}}),[])})(),t=XL(),n=function(){const e=(0,s.useContext)(zO);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}(),r=$L(RO),o=(0,s.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=TO(e)?e:n.get(e.id),a=o.parentId?IT(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 dT(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&&TO(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&&XA(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:d}=t.getState(),{nodes:u,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),d=c;for(const e of l)s.has(e.id)&&!d.find(t=>t.id===e.id)&&d.push(e);if(!o)return{edges:d,nodes:i};const u=await o({nodes:i,edges:d});return"boolean"==typeof u?u?{edges:d,nodes:i}:{edges:[],nodes:[]}:u}({nodesToRemove:e,edgesToRemove:n,nodes:r,edges:o,onBeforeDelete:d}),p=f.length>0,m=u.length>0;if(p){const e=f.map(AO);i?.(f),l(e)}if(m){const e=u.map(AO);a?.(u),s(e)}return(m||p)&&c?.({nodes:u,edges:f}),{deletedNodes:u,deletedEdges:f}},getIntersectingNodes:(e,n=!0,r)=>{const o=mT(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=dT(s?r:a),c=pT(l,i);return n&&c>0||c>=l.width*l.height||c>=i.width*i.height}):[]},isNodeIntersecting:(e,t,n=!0)=>{const r=mT(e)?e:a(e);if(!r)return!1;const o=pT(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):qA(n)?n:t.nodeLookup.get(n.id));const a=o?uT(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return sT(e,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return cT(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,s.useMemo)(()=>({...o,...e,viewportInitialized:r}),[r])}const BO=e=>e.selected,FO="undefined"!=typeof window?window:void 0,QO={position:"absolute",width:"100%",height:"100%",top:0,left:0},VO=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function YO({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:a=QA.Free,zoomOnDoubleClick:i=!0,panOnDrag:l=!0,defaultViewport:c,translateExtent:d,minZoom:u,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:h,noWheelClassName:g,noPanClassName:w,onViewportChange:y,isControlledViewport:b,paneClickDistance:v,selectionOnDrag:x}){const N=XL(),_=(0,s.useRef)(null),{userSelectionActive:E,lib:M,connectionInProgress:I}=$L(VO,ZL),S=NO(p),k=(0,s.useRef)();!function(e){const t=XL();(0,s.useEffect)(()=>{const n=()=>{if(!e.current||!(e.current.checkVisibility?.()??1))return!1;const n=CT(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)}}},[])}(_);const D=(0,s.useCallback)(e=>{y?.({x:e[0],y:e[1],zoom:e[2]}),b||N.setState({transform:e})},[y,b]);return(0,s.useEffect)(()=>{if(_.current){k.current=SL({domNode:_.current,minZoom:u,maxZoom:f,translateExtent:d,viewport:c,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}=k.current.getViewport();return N.setState({panZoom:k.current,transform:[e,t,n],domNode:_.current.closest(".react-flow")}),()=>{k.current?.destroy()}}},[]),(0,s.useEffect)(()=>{k.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:a,zoomOnDoubleClick:i,panOnDrag:l,zoomActivationKeyPressed:S,preventScrolling:m,noPanClassName:w,userSelectionActive:E,noWheelClassName:g,lib:M,onTransformChange:D,connectionInProgress:I,selectionOnDrag:x,paneClickDistance:v})},[e,t,n,r,o,a,i,l,S,m,w,E,g,M,D,I,x,v]),(0,C.jsx)("div",{className:"react-flow__renderer",ref:_,style:QO,children:h})}const ZO=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function WO(){const{userSelectionActive:e,userSelectionRect:t}=$L(ZO,ZL);return e&&t?(0,C.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 GO=(e,t)=>n=>{n.target===t.current&&e?.(n)},HO=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function $O({isSelecting:e,selectionKeyPressed:t,selectionMode:n=VA.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:a,onSelectionStart:i,onSelectionEnd:l,onPaneClick:c,onPaneContextMenu:d,onPaneScroll:u,onPaneMouseEnter:f,onPaneMouseMove:p,onPaneMouseLeave:m,children:h}){const g=XL(),{userSelectionActive:w,elementsSelectable:y,dragging:b,connectionInProgress:v}=$L(HO,ZL),x=y&&(e||w),N=(0,s.useRef)(null),_=(0,s.useRef)(),E=(0,s.useRef)(new Set),M=(0,s.useRef)(new Set),I=(0,s.useRef)(!1),S=e=>{I.current||v?I.current=!1:(c?.(e),g.getState().resetSelectedElements(),g.setState({nodesSelectionActive:!1}))},k=u?e=>u(e):void 0,D=!0===r||Array.isArray(r)&&r.includes(0);return(0,C.jsxs)("div",{className:PL(["react-flow__pane",{draggable:D,dragging:b,selection:e}]),onClick:x?void 0:GO(S,N),onContextMenu:GO(e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():d?.(e)},N),onWheel:GO(k,N),onPointerEnter:x?void 0:f,onPointerMove:x?e=>{const{userSelectionRect:r,transform:a,nodeLookup:s,edgeLookup:l,connectionLookup:c,triggerNodeChanges:d,triggerEdgeChanges:u,defaultEdgeOptions:f,resetSelectedElements:p}=g.getState();if(!_.current||!r)return;const{x:m,y:h}=OT(e.nativeEvent,_.current),{startX:w,startY:y}=r;if(!I.current){const n=t?0:o;if(Math.hypot(m-w,h-y)<=n)return;p(),i?.(e)}I.current=!0;const b={startX:w,startY:y,x:m<w?m:w,y:h<y?h:y,width:Math.abs(m-w),height:Math.abs(h-y)},v=E.current,x=M.current;E.current=new Set(eT(s,b,a,n===VA.Partial,!0).map(e=>e.id)),M.current=new Set;const N=f?.selectable??!0;for(const e of E.current){const t=c.get(e);if(t)for(const{edgeId:e}of t.values()){const t=l.get(e);t&&(t.selectable??N)&&M.current.add(e)}}ST(v,E.current)||d(CO(s,E.current,!0)),ST(x,M.current)||u(CO(l,M.current)),g.setState({userSelectionRect:b,userSelectionActive:!0,nodesSelectionActive:!1})}:p,onPointerUp:x?e=>{0===e.button&&(e.target?.releasePointerCapture?.(e.pointerId),!w&&e.target===N.current&&g.getState().userSelectionRect&&S?.(e),g.setState({userSelectionActive:!1,userSelectionRect:null}),I.current&&(l?.(e),g.setState({nodesSelectionActive:E.current.size>0})))}:void 0,onPointerDownCapture:x?n=>{const{domNode:r}=g.getState();if(_.current=r?.getBoundingClientRect(),!_.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}=OT(n.nativeEvent,_.current);g.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:m,ref:N,style:QO,children:[h,(0,C.jsx)(WO,{})]})}function XO({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 qO({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:a,nodeClickDistance:i}){const l=XL(),[c,d]=(0,s.useState)(!1),u=(0,s.useRef)();return(0,s.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},d=null,u=!1,f=null,p=!1,m=!1,h=null;return{update:function({noDragClassName:g,handleSelector:w,domNode:y,isSelectable:b,nodeId:v,nodeClickDistance:x=0}){function N({x:e,y:n}){const{nodeLookup:o,nodeExtent:i,snapGrid:l,snapToGrid:c,nodeOrigin:d,onNodeDrag:u,onSelectionDrag:f,onError:p,updateNodePositions:g}=t();a={x:e,y:n};let w=!1;const y=s.size>1,b=y&&i?lT(KA(s)):null,x=y&&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=wT(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)}:wT(a,l));let s=null;if(y&&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:u,positionAbsolute:f}=tT({nodeId:t,nextPosition:a,nodeLookup:o,nodeExtent:s||i,nodeOrigin:d,onError:p});w=w||r.position.x!==u.x||r.position.y!==u.y,r.position=u,r.internals.positionAbsolute=f}if(m=m||w,w&&(g(s,!0),h&&(r||u||!v&&f))){const[e,t]=mL({nodeId:v,dragItems:s,nodeLookup:o});r?.(h,s,e,t),u?.(h,e,t),v||f?.(h,t)}}async function _(){if(!d)return;const{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:o}=t();if(!o)return l=!1,void cancelAnimationFrame(i);const[s,u]=iT(c,d,r);0===s&&0===u||(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-u/e[2],await n({x:s,y:u})&&N(a)),i=requestAnimationFrame(_)}function E(r){const{nodeLookup:o,multiSelectionActive:i,nodesDraggable:l,transform:c,snapGrid:f,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:w}=t();u=!0,m&&b||i||!v||o.get(v)?.selected||w(),b&&m&&v&&e?.(v);const y=DT(r.sourceEvent,{transform:c,snapGrid:f,snapToGrid:p,containerBounds:d});if(a=y,s=function(e,t,n,r){const o=new Map;for(const[a,i]of e)if((i.selected||i.id===r)&&(!i.parentId||!fL(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,y,v),s.size>0&&(n||h||!v&&g)){const[e,t]=mL({nodeId:v,dragItems:s,nodeLookup:o});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),v||g?.(r.sourceEvent,t)}}f=uC(y);const M=MC().clickDistance(x).on("start",e=>{const{domNode:n,nodeDragThreshold:r,transform:o,snapGrid:i,snapToGrid:s}=t();d=n?.getBoundingClientRect()||null,p=!1,m=!1,h=e.sourceEvent,0===r&&E(e);const l=DT(e.sourceEvent,{transform:o,snapGrid:i,snapToGrid:s,containerBounds:d});a=l,c=OT(e.sourceEvent,d)}).on("drag",e=>{const{autoPanOnNodeDrag:n,transform:r,snapGrid:o,snapToGrid:i,nodeDragThreshold:f,nodeLookup:m}=t(),g=DT(e.sourceEvent,{transform:r,snapGrid:o,snapToGrid:i,containerBounds:d});if(h=e.sourceEvent,("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||v&&!m.has(v))&&(p=!0),!p){if(!l&&n&&u&&(l=!0,_()),!u){const t=OT(e.sourceEvent,d),n=t.x-c.x,r=t.y-c.y;Math.sqrt(n*n+r*r)>f&&E(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&u&&(c=OT(e.sourceEvent,d),N(g))}}).on("end",e=>{if(u&&!p&&(l=!1,u=!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]=mL({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||!pL(t,`.${g}`,y))&&(!w||pL(t,w,y))});f.call(M)},destroy:function(){f?.on(".drag",null)}}}({getStoreItems:()=>l.getState(),onNodeMouseDown:t=>{XO({id:t,store:l,nodeRef:e})},onDragStart:()=>{d(!0)},onDragStop:()=>{d(!1)}})},[]),(0,s.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]),c}function JO(){const e=XL(),t=(0,s.useCallback)(t=>{const{nodeExtent:n,snapToGrid:r,snapGrid:o,nodesDraggable:a,onError:i,updateNodePositions:s,nodeLookup:l,nodeOrigin:c}=e.getState(),d=new Map,u=(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(!u(e))continue;let t={x:e.internals.positionAbsolute.x+m,y:e.internals.positionAbsolute.y+h};r&&(t=wT(t,o));const{position:a,positionAbsolute:s}=tT({nodeId:e.id,nextPosition:t,nodeLookup:l,nodeExtent:n,nodeOrigin:c,onError:i});e.position=a,e.internals.positionAbsolute=s,d.set(e.id,e)}s(d)},[]);return t}const KO=(0,s.createContext)(null),ez=KO.Provider;KO.Consumer;const tz=()=>(0,s.useContext)(KO),nz=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),rz=(0,s.memo)(LO(function({type:e="source",position:t=GA.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:a=!0,id:i,onConnect:s,children:l,className:c,onMouseDown:d,onTouchStart:u,...f},p){const m=i||null,h="target"===e,g=XL(),w=tz(),{connectOnClick:y,noPanClassName:b,rfId:v}=$L(nz,ZL),{connectingFrom:x,connectingTo:N,clickConnecting:_,isPossibleEndHandle:E,connectionInProcess:M,clickConnectionInProcess:I,valid:S}=$L(((e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:a,connection:i}=r,{fromHandle:s,toHandle:l,isValid:c}=i,d=l?.nodeId===e&&l?.id===t&&l?.type===n;return{connectingFrom:s?.nodeId===e&&s?.id===t&&s?.type===n,connectingTo:d,clickConnecting:o?.nodeId===e&&o?.id===t&&o?.type===n,isPossibleEndHandle:a===FA.Strict?s?.type!==n:e!==s?.nodeId||t!==s?.id,connectionInProcess:!!s,clickConnectionInProcess:!!o,valid:d&&c}})(w,m,e),ZL);w||g.getState().onError?.("010","Handle: No node id found. Make sure to only use a Handle inside a custom Node.");const k=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=g.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=g.getState();t(YT(o,e))}n?.(o),s?.(o)},D=e=>{if(!w)return;const t=LT(e.nativeEvent);if(o&&(t&&0===e.button||!t)){const t=g.getState();bL.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:w,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>g.getState().onConnectEnd?.(...e),updateConnection:t.updateConnection,onConnect:k,isValidConnection:n||((...e)=>g.getState().isValidConnection?.(...e)??!0),getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?d?.(e):u?.(e)};return(0,C.jsx)("div",{"data-handleid":m,"data-nodeid":w,"data-handlepos":t,"data-id":`${v}-${w}-${m}-${e}`,className:PL(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",b,c,{source:!h,target:h,connectable:r,connectablestart:o,connectableend:a,clickconnecting:_,connectingfrom:x,connectingto:N,valid:S,connectionindicator:r&&(!M||E)&&(M||I?a:o)}]),onMouseDown:D,onTouchStart:D,onClick:y?t=>{const{onClickConnectStart:r,onClickConnectEnd:a,connectionClickStartHandle:i,connectionMode:s,isValidConnection:l,lib:c,rfId:d,nodeLookup:u,connection:f}=g.getState();if(!w||!i&&!o)return;if(!i)return r?.(t.nativeEvent,{nodeId:w,handleId:m,handleType:e}),void g.setState({connectionClickStartHandle:{nodeId:w,type:e,id:m}});const p=jT(t.target),h=n||l,{connection:y,isValid:b}=bL.isValid(t.nativeEvent,{handle:{nodeId:w,id:m,type:e},connectionMode:s,fromNodeId:i.nodeId,fromHandleId:i.id||null,fromType:i.type,isValidConnection:h,flowId:d,doc:p,lib:c,nodeLookup:u});b&&y&&k(y);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})})),oz={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},az={input:function({data:e,isConnectable:t,sourcePosition:n=GA.Bottom}){return(0,C.jsxs)(C.Fragment,{children:[e?.label,(0,C.jsx)(rz,{type:"source",position:n,isConnectable:t})]})},default:function({data:e,isConnectable:t,targetPosition:n=GA.Top,sourcePosition:r=GA.Bottom}){return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(rz,{type:"target",position:n,isConnectable:t}),e?.label,(0,C.jsx)(rz,{type:"source",position:r,isConnectable:t})]})},output:function({data:e,isConnectable:t,targetPosition:n=GA.Top}){return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(rz,{type:"target",position:n,isConnectable:t}),e?.label]})},group:function(){return null}},iz=e=>{const{width:t,height:n,x:r,y:o}=KA(e.nodeLookup,{filter:e=>!!e.selected});return{width:hT(t)?t:null,height:hT(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 sz({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=XL(),{width:o,height:a,transformString:i,userSelectionActive:l}=$L(iz,ZL),c=JO(),d=(0,s.useRef)(null);(0,s.useEffect)(()=>{n||d.current?.focus({preventScroll:!0})},[n]);const u=!l&&null!==o&&null!==a;if(qO({nodeRef:d,disabled:!u}),!u)return null;const f=e?t=>{const n=r.getState().nodes.filter(e=>e.selected);e(t,n)}:void 0;return(0,C.jsx)("div",{className:PL(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:(0,C.jsx)("div",{ref:d,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:e=>{Object.prototype.hasOwnProperty.call(oz,e.key)&&(e.preventDefault(),c({direction:oz[e.key],factor:e.shiftKey?4:1}))},style:{width:o,height:a}})})}const lz="undefined"!=typeof window?window:void 0,cz=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function dz({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:i,paneClickDistance:l,deleteKeyCode:c,selectionKeyCode:d,selectionOnDrag:u,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:h,panActivationKeyCode:g,zoomActivationKeyCode:w,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:v,panOnScroll:x,panOnScrollSpeed:N,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:M,defaultViewport:I,translateExtent:S,minZoom:k,maxZoom:D,preventScrolling:j,onSelectionContextMenu:A,noWheelClassName:T,noPanClassName:L,disableKeyboardA11y:O,onViewportChange:z,isControlledViewport:P}){const{nodesSelectionActive:R,userSelectionActive:U}=$L(cz,ZL),B=NO(d,{target:lz}),F=NO(g,{target:lz}),Q=F||M,V=F||x,Y=u&&!0!==Q,Z=B||U||Y;return function({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=XL(),{deleteElements:r}=UO(),o=NO(e,{actInsideInputWithModifier:!1}),a=NO(t,{target:FO});(0,s.useEffect)(()=>{if(o){const{edges:e,nodes:t}=n.getState();r({nodes:t.filter(BO),edges:e.filter(BO)}),n.setState({nodesSelectionActive:!1})}},[o]),(0,s.useEffect)(()=>{n.setState({multiSelectionActive:a})},[a])}({deleteKeyCode:c,multiSelectionKeyCode:h}),(0,C.jsx)(YO,{onPaneContextMenu:a,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:v,panOnScroll:V,panOnScrollSpeed:N,panOnScrollMode:_,zoomOnDoubleClick:E,panOnDrag:!B&&Q,defaultViewport:I,translateExtent:S,minZoom:k,maxZoom:D,zoomActivationKeyCode:w,preventScrolling:j,noWheelClassName:T,noPanClassName:L,onViewportChange:z,isControlledViewport:P,paneClickDistance:l,selectionOnDrag:Y,children:(0,C.jsxs)($O,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:a,onPaneScroll:i,panOnDrag:Q,isSelecting:!!Z,selectionMode:f,selectionKeyPressed:B,paneClickDistance:l,selectionOnDrag:Y,children:[e,R&&(0,C.jsx)(sz,{onSelectionContextMenu:A,noPanClassName:L,disableKeyboardA11y:O})]})})}dz.displayName="FlowRenderer";const uz=(0,s.memo)(dz);const fz=e=>e.updateNodeInternals;var pz=(0,s.memo)(function({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:a,onDoubleClick:i,nodesDraggable:l,elementsSelectable:c,nodesConnectable:d,nodesFocusable:u,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:h,rfId:g,nodeTypes:w,nodeClickDistance:y,onError:b}){const{node:v,internals:x,isParent:N}=$L(t=>{const n=t.nodeLookup.get(e),r=t.parentLookup.has(e);return{node:n,internals:n.internals,isParent:r}},ZL);let _=v.type||"default",E=w?.[_]||az[_];void 0===E&&(b?.("003",(e=>`Node type "${e}" not found. Using fallback type "default".`)(_)),_="default",E=w?.default||az.default);const M=!!(v.draggable||l&&void 0===v.draggable),I=!!(v.selectable||c&&void 0===v.selectable),S=!!(v.connectable||d&&void 0===v.connectable),k=!!(v.focusable||u&&void 0===v.focusable),D=XL(),j=MT(v),A=function({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=XL(),a=(0,s.useRef)(null),i=(0,s.useRef)(null),l=(0,s.useRef)(e.sourcePosition),c=(0,s.useRef)(e.targetPosition),d=(0,s.useRef)(t),u=n&&!!e.internals.handleBounds;return(0,s.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,s.useEffect)(()=>()=>{i.current&&(r?.unobserve(i.current),i.current=null)},[]),(0,s.useEffect)(()=>{if(a.current){const n=d.current!==t,r=l.current!==e.sourcePosition,i=c.current!==e.targetPosition;(n||r||i)&&(d.current=t,l.current=e.sourcePosition,c.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:_,hasDimensions:j,resizeObserver:f}),T=qO({nodeRef:A,disabled:v.hidden||!M,noDragClassName:p,handleSelector:v.dragHandle,nodeId:e,isSelectable:I,nodeClickDistance:y}),L=JO();if(v.hidden)return null;const O=ET(v),z=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),P=I||M||t||n||r||o,R=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,Q=i?e=>i(e,{...x.userNode}):void 0;return(0,C.jsx)("div",{className:PL(["react-flow__node",`react-flow__node-${_}`,{[m]:M},v.className,{selected:v.selected,selectable:I,parent:N,draggable:M,dragging:T}]),ref:A,style:{zIndex:x.z,transform:`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:j?"visible":"hidden",...v.style,...z},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:R,onMouseMove:U,onMouseLeave:B,onContextMenu:F,onClick:n=>{const{selectNodesOnDrag:r,nodeDragThreshold:o}=D.getState();I&&(!r||!M||o>0)&&XO({id:e,store:D,nodeRef:A}),t&&t(n,{...x.userNode})},onDoubleClick:Q,onKeyDown:k?t=>{if(!TT(t.nativeEvent)&&!h)if(UA.includes(t.key)&&I){const n="Escape"===t.key;XO({id:e,store:D,unselect:n,nodeRef:A})}else if(M&&v.selected&&Object.prototype.hasOwnProperty.call(oz,t.key)){t.preventDefault();const{ariaLabelConfig:e}=D.getState();D.setState({ariaLiveMessage:e["node.a11yDescription.ariaLiveMessage"]({direction:t.key.replace("Arrow","").toLowerCase(),x:~~x.positionAbsolute.x,y:~~x.positionAbsolute.y})}),L({direction:oz[t.key],factor:t.shiftKey?4:1})}}:void 0,tabIndex:k?0:void 0,onFocus:k?()=>{if(h||!A.current?.matches(":focus-visible"))return;const{transform:t,width:n,height:r,autoPanOnNodeFocus:o,setCenter:a}=D.getState();o&&(eT(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??(k?"group":void 0),"aria-roledescription":"node","aria-describedby":h?void 0:`${KL}-${g}`,"aria-label":v.ariaLabel,...v.domAttributes,children:(0,C.jsx)(ez,{value:e,children:(0,C.jsx)(E,{id:e,data:v.data,type:_,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:v.selected??!1,selectable:I,draggable:M,deletable:v.deletable??!0,isConnectable:S,sourcePosition:v.sourcePosition,targetPosition:v.targetPosition,dragging:T,dragHandle:v.dragHandle,zIndex:x.z,parentId:v.parentId,...O})})})});const mz=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function hz(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:a}=$L(mz,ZL),i=function(e){const t=$L((0,s.useCallback)((e=>t=>e?eT(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]),ZL);return t}(e.onlyRenderVisibleElements),l=function(){const e=$L(fz),[t]=(0,s.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,s.useEffect)(()=>()=>{t?.disconnect()},[t]),t}();return(0,C.jsx)("div",{className:"react-flow__nodes",style:QO,children:i.map(i=>(0,C.jsx)(pz,{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:l,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:a},i))})}hz.displayName="NodeRenderer";const gz=(0,s.memo)(hz),wz={[WA.Arrow]:({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return(0,C.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},[WA.ArrowClosed]:({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,C.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})}},yz=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:a="strokeWidth",strokeWidth:i,orient:l="auto-start-reverse"})=>{const c=function(e){const t=XL();return(0,s.useMemo)(()=>Object.prototype.hasOwnProperty.call(wz,e)?wz[e]:(t.getState().onError?.("009",(e=>`Marker type "${e}" doesn't exist.`)(e)),null),[e])}(t);return c?(0,C.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:l,refX:"0",refY:"0",children:(0,C.jsx)(c,{color:n,strokeWidth:i})}):null},bz=({defaultColor:e,rfId:t})=>{const n=$L(e=>e.edges),r=$L(e=>e.defaultEdgeOptions),o=(0,s.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=eL(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,C.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,C.jsx)("defs",{children:o.map(e=>(0,C.jsx)(yz,{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};bz.displayName="MarkerDefinitions";var vz=(0,s.memo)(bz);function xz({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:a,labelBgPadding:i=[2,4],labelBgBorderRadius:l=2,children:c,className:d,...u}){const[f,p]=(0,s.useState)({x:1,y:0,width:0,height:0}),m=PL(["react-flow__edge-textwrapper",d]),h=(0,s.useRef)(null);return(0,s.useEffect)(()=>{if(h.current){const e=h.current.getBBox();p({x:e.x,y:e.y,width:e.width,height:e.height})}},[n]),n?(0,C.jsxs)("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:m,visibility:f.width?"visible":"hidden",...u,children:[o&&(0,C.jsx)("rect",{width:f.width+2*i[0],x:-i[0],y:-i[1],height:f.height+2*i[1],className:"react-flow__edge-textbg",style:a,rx:l,ry:l}),(0,C.jsx)("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:h,style:r,children:n}),c]}):null}xz.displayName="EdgeText";const Nz=(0,s.memo)(xz);function _z({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:a,labelBgStyle:i,labelBgPadding:s,labelBgBorderRadius:l,interactionWidth:c=20,...d}){return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("path",{...d,d:e,fill:"none",className:PL(["react-flow__edge-path",d.className])}),c?(0,C.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:c,className:"react-flow__edge-interaction"}):null,r&&hT(t)&&hT(n)?(0,C.jsx)(Nz,{x:t,y:n,label:r,labelStyle:o,labelShowBg:a,labelBgStyle:i,labelBgPadding:s,labelBgBorderRadius:l}):null]})}function Ez({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===GA.Left||e===GA.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Mz({sourceX:e,sourceY:t,sourcePosition:n=GA.Bottom,targetX:r,targetY:o,targetPosition:a=GA.Top}){const[i,s]=Ez({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,c]=Ez({pos:a,x1:r,y1:o,x2:e,y2:t}),[d,u,f,p]=PT({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}`,d,u,f,p]}function Iz(e){return(0,s.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,sourcePosition:i,targetPosition:s,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:w})=>{const[y,b,v]=Mz({sourceX:n,sourceY:r,sourcePosition:i,targetX:o,targetY:a,targetPosition:s}),x=e.isInternal?void 0:t;return(0,C.jsx)(_z,{id:x,path:y,labelX:b,labelY:v,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:w})})}const Sz=Iz({isInternal:!1}),kz=Iz({isInternal:!0});function Dz(e){return(0,s.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:u,style:f,sourcePosition:p=GA.Bottom,targetPosition:m=GA.Top,markerEnd:h,markerStart:g,pathOptions:w,interactionWidth:y})=>{const[b,v,x]=$T({sourceX:n,sourceY:r,sourcePosition:p,targetX:o,targetY:a,targetPosition:m,borderRadius:w?.borderRadius,offset:w?.offset,stepPosition:w?.stepPosition}),N=e.isInternal?void 0:t;return(0,C.jsx)(_z,{id:N,path:b,labelX:v,labelY:x,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:u,style:f,markerEnd:h,markerStart:g,interactionWidth:y})})}Sz.displayName="SimpleBezierEdge",kz.displayName="SimpleBezierEdgeInternal";const Cz=Dz({isInternal:!1}),jz=Dz({isInternal:!0});function Az(e){return(0,s.memo)(({id:t,...n})=>{const r=e.isInternal?void 0:t;return(0,C.jsx)(Cz,{...n,id:r,pathOptions:(0,s.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}Cz.displayName="SmoothStepEdge",jz.displayName="SmoothStepEdgeInternal";const Tz=Az({isInternal:!1}),Lz=Az({isInternal:!0});function Oz(e){return(0,s.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:u,style:f,markerEnd:p,markerStart:m,interactionWidth:h})=>{const[g,w,y]=ZT({sourceX:n,sourceY:r,targetX:o,targetY:a}),b=e.isInternal?void 0:t;return(0,C.jsx)(_z,{id:b,path:g,labelX:w,labelY:y,label:i,labelStyle:s,labelShowBg:l,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:u,style:f,markerEnd:p,markerStart:m,interactionWidth:h})})}Tz.displayName="StepEdge",Lz.displayName="StepEdgeInternal";const zz=Oz({isInternal:!1}),Pz=Oz({isInternal:!0});function Rz(e){return(0,s.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,sourcePosition:i=GA.Bottom,targetPosition:s=GA.Top,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,pathOptions:w,interactionWidth:y})=>{const[b,v,x]=BT({sourceX:n,sourceY:r,sourcePosition:i,targetX:o,targetY:a,targetPosition:s,curvature:w?.curvature}),N=e.isInternal?void 0:t;return(0,C.jsx)(_z,{id:N,path:b,labelX:v,labelY:x,label:l,labelStyle:c,labelShowBg:d,labelBgStyle:u,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:y})})}zz.displayName="StraightEdge",Pz.displayName="StraightEdgeInternal";const Uz=Rz({isInternal:!1}),Bz=Rz({isInternal:!0});Uz.displayName="BezierEdge",Bz.displayName="BezierEdgeInternal";const Fz={default:Bz,straight:Pz,step:Lz,smoothstep:jz,simplebezier:kz},Qz={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Vz=(e,t,n)=>n===GA.Left?e-t:n===GA.Right?e+t:e,Yz=(e,t,n)=>n===GA.Top?e-t:n===GA.Bottom?e+t:e,Zz="react-flow__edgeupdater";function Wz({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:a,onMouseOut:i,type:s}){return(0,C.jsx)("circle",{onMouseDown:o,onMouseEnter:a,onMouseOut:i,className:PL([Zz,`${Zz}-${s}`]),cx:Vz(t,r,e),cy:Yz(n,r,e),r,stroke:"transparent",fill:"transparent"})}function Gz({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:a,targetY:i,sourcePosition:s,targetPosition:l,onReconnect:c,onReconnectStart:d,onReconnectEnd:u,setReconnecting:f,setUpdateHover:p}){const m=XL(),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:w,updateConnection:y}=m.getState(),b="target"===t.type;bL.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:w,isValidConnection:(...e)=>m.getState().isValidConnection?.(...e)??!0,onConnect:e=>c?.(n,e),onConnectStart:(r,o)=>{f(!0),d?.(e,n,t.type),l?.(r,o)},onConnectEnd:(...e)=>m.getState().onConnectEnd?.(...e),onReconnectEnd:(e,r)=>{f(!1),u?.(e,n,t.type,r)},updateConnection:y,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},g=()=>p(!0),w=()=>p(!1);return(0,C.jsxs)(C.Fragment,{children:[(!0===e||"source"===e)&&(0,C.jsx)(Wz,{position:s,centerX:r,centerY:o,radius:t,onMouseDown:e=>h(e,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),onMouseEnter:g,onMouseOut:w,type:"source"}),(!0===e||"target"===e)&&(0,C.jsx)(Wz,{position:l,centerX:a,centerY:i,radius:t,onMouseDown:e=>h(e,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),onMouseEnter:g,onMouseOut:w,type:"target"})]})}var Hz=(0,s.memo)(function({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:a,onContextMenu:i,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,reconnectRadius:u,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:h,edgeTypes:g,noPanClassName:w,onError:y,disableKeyboardA11y:b}){let v=$L(t=>t.edgeLookup.get(e));const x=$L(e=>e.defaultEdgeOptions);v=x?{...x,...v}:v;let N=v.type||"default",_=g?.[N]||Fz[N];void 0===_&&(y?.("011",(e=>`Edge type "${e}" not found. Using fallback type "default".`)(N)),N="default",_=g?.default||Fz.default);const E=!!(v.focusable||t&&void 0===v.focusable),M=void 0!==f&&(v.reconnectable||n&&void 0===v.reconnectable),I=!!(v.selectable||r&&void 0===v.selectable),S=(0,s.useRef)(null),[k,D]=(0,s.useState)(!1),[j,A]=(0,s.useState)(!1),T=XL(),{zIndex:L,sourceX:O,sourceY:z,targetX:P,targetY:R,sourcePosition:U,targetPosition:B}=$L((0,s.useCallback)(t=>{const n=t.nodeLookup.get(v.source),r=t.nodeLookup.get(v.target);if(!n||!r)return{zIndex:v.zIndex,...Qz};const o=function(e){const{sourceNode:t,targetNode:n}=e;if(!XT(t)||!XT(n))return null;const r=t.internals.handleBounds||qT(t.handles),o=n.internals.handleBounds||qT(n.handles),a=KT(r?.source??[],e.sourceHandle),i=KT(e.connectionMode===FA.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||GA.Bottom,l=i?.position||GA.Top,c=JT(t,a,s),d=JT(n,i,l);return{sourceX:c.x,sourceY:c.y,targetX:d.x,targetY:d.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||Qz}},[v.source,v.target,v.sourceHandle,v.targetHandle,v.selected,v.zIndex]),ZL),F=(0,s.useMemo)(()=>v.markerStart?`url('#${eL(v.markerStart,h)}')`:void 0,[v.markerStart,h]),Q=(0,s.useMemo)(()=>v.markerEnd?`url('#${eL(v.markerEnd,h)}')`:void 0,[v.markerEnd,h]);if(v.hidden||null===O||null===z||null===P||null===R)return null;const V=a?e=>{a(e,{...v})}:void 0,Y=i?e=>{i(e,{...v})}:void 0,Z=l?e=>{l(e,{...v})}:void 0,W=c?e=>{c(e,{...v})}:void 0,G=d?e=>{d(e,{...v})}:void 0;return(0,C.jsx)("svg",{style:{zIndex:L},children:(0,C.jsxs)("g",{className:PL(["react-flow__edge",`react-flow__edge-${N}`,v.className,w,{selected:v.selected,animated:v.animated,inactive:!I&&!o,updating:k,selectable:I}]),onClick:t=>{const{addSelectedEdges:n,unselectNodesAndEdges:r,multiSelectionActive:a}=T.getState();I&&(T.setState({nodesSelectionActive:!1}),v.selected&&a?(r({nodes:[],edges:[v]}),S.current?.blur()):n([e])),o&&o(t,v)},onDoubleClick:V,onContextMenu:Y,onMouseEnter:Z,onMouseMove:W,onMouseLeave:G,onKeyDown:E?t=>{if(!b&&UA.includes(t.key)&&I){const{unselectNodesAndEdges:n,addSelectedEdges:r}=T.getState();"Escape"===t.key?(S.current?.blur(),n({edges:[v]})):r([e])}}:void 0,tabIndex:E?0:void 0,role:v.ariaRole??(E?"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":E?`${eO}-${h}`:void 0,ref:S,...v.domAttributes,children:[!j&&(0,C.jsx)(_,{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:z,targetX:P,targetY:R,sourcePosition:U,targetPosition:B,data:v.data,style:v.style,sourceHandleId:v.sourceHandle,targetHandleId:v.targetHandle,markerStart:F,markerEnd:Q,pathOptions:"pathOptions"in v?v.pathOptions:void 0,interactionWidth:v.interactionWidth}),M&&(0,C.jsx)(Gz,{edge:v,isReconnectable:M,reconnectRadius:u,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:O,sourceY:z,targetX:P,targetY:R,sourcePosition:U,targetPosition:B,setUpdateHover:D,setReconnecting:A})]})})});const $z=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Xz({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:a,onEdgeContextMenu:i,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:d,onEdgeClick:u,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:h,disableKeyboardA11y:g}){const{edgesFocusable:w,edgesReconnectable:y,elementsSelectable:b,onError:v}=$L($z,ZL),x=function(e){const t=$L((0,s.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&&QT({sourceNode:r,targetNode:o,width:t.width,height:t.height,transform:t.transform})&&n.push(e.id)}return n},[e]),ZL);return t}(t);return(0,C.jsxs)("div",{className:"react-flow__edges",children:[(0,C.jsx)(vz,{defaultColor:e,rfId:n}),x.map(e=>(0,C.jsx)(Hz,{id:e,edgesFocusable:w,edgesReconnectable:y,elementsSelectable:b,noPanClassName:o,onReconnect:a,onContextMenu:i,onMouseEnter:l,onMouseMove:c,onMouseLeave:d,onClick:u,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:h,rfId:n,onError:v,edgeTypes:r,disableKeyboardA11y:g},e))]})}Xz.displayName="EdgeRenderer";const qz=(0,s.memo)(Xz),Jz=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Kz({children:e}){const t=$L(Jz);return(0,C.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}const eP=e=>e.panZoom?.syncViewport;function tP(e){return e.connection.inProgress?{...e.connection,to:yT(e.connection.to,e.transform)}:{...e.connection}}const nP=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function rP({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:a,height:i,isValid:s,inProgress:l}=$L(nP,ZL);return a&&o&&l?(0,C.jsx)("svg",{style:e,width:a,height:i,className:"react-flow__connectionline react-flow__container",children:(0,C.jsx)("g",{className:PL(["react-flow__connection",$A(s)]),children:(0,C.jsx)(oP,{style:t,type:n,CustomComponent:r,isValid:s})})}):null}const oP=({style:e,type:t=ZA.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:a,fromNode:i,fromHandle:s,fromPosition:l,to:c,toNode:d,toHandle:u,toPosition:f,pointer:p}=function(e){const t=function(e){if(e){const t=t=>{const n=tP(t);return e(n)};return t}return tP}(e);return $L(t,ZL)}();if(!o)return;if(n)return(0,C.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:$A(r),toNode:d,toHandle:u,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 ZA.Bezier:[m]=BT(h);break;case ZA.SimpleBezier:[m]=Mz(h);break;case ZA.Step:[m]=$T({...h,borderRadius:0});break;case ZA.SmoothStep:[m]=$T(h);break;default:[m]=ZT(h)}return(0,C.jsx)("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};oP.displayName="ConnectionLine";const aP={};function iP(e=aP){(0,s.useRef)(e),XL(),(0,s.useEffect)(()=>{},[e])}function sP({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:a,onEdgeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:u,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:h,connectionLineStyle:g,connectionLineComponent:w,connectionLineContainerStyle:y,selectionKeyCode:b,selectionOnDrag:v,selectionMode:x,multiSelectionKeyCode:N,panActivationKeyCode:_,zoomActivationKeyCode:E,deleteKeyCode:M,onlyRenderVisibleElements:I,elementsSelectable:S,defaultViewport:k,translateExtent:D,minZoom:j,maxZoom:A,preventScrolling:T,defaultMarkerColor:L,zoomOnScroll:O,zoomOnPinch:z,panOnScroll:P,panOnScrollSpeed:R,panOnScrollMode:U,zoomOnDoubleClick:B,panOnDrag:F,onPaneClick:Q,onPaneMouseEnter:V,onPaneMouseMove:Y,onPaneMouseLeave:Z,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:de,onViewportChange:ue}){return iP(e),iP(t),XL(),(0,s.useRef)(!1),(0,s.useEffect)(()=>{},[]),function(e){const t=UO(),n=(0,s.useRef)(!1);(0,s.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}(n),function(e){const t=$L(eP),n=XL();(0,s.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t])}(de),(0,C.jsx)(uz,{onPaneClick:Q,onPaneMouseEnter:V,onPaneMouseMove:Y,onPaneMouseLeave:Z,onPaneContextMenu:G,onPaneScroll:W,paneClickDistance:H,deleteKeyCode:M,selectionKeyCode:b,selectionOnDrag:v,selectionMode:x,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:_,zoomActivationKeyCode:E,elementsSelectable:S,zoomOnScroll:O,zoomOnPinch:z,zoomOnDoubleClick:B,panOnScroll:P,panOnScrollSpeed:R,panOnScrollMode:U,panOnDrag:F,defaultViewport:k,translateExtent:D,minZoom:j,maxZoom:A,onSelectionContextMenu:f,preventScrolling:T,noDragClassName:oe,noWheelClassName:ae,noPanClassName:ie,disableKeyboardA11y:se,onViewportChange:ue,isControlledViewport:!!de,children:(0,C.jsxs)(Kz,{children:[(0,C.jsx)(qz,{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:L,noPanClassName:ie,disableKeyboardA11y:se,rfId:ce}),(0,C.jsx)(rP,{style:g,type:h,component:w,containerStyle:y}),(0,C.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,C.jsx)(gz,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:a,onNodeMouseEnter:l,onNodeMouseMove:c,onNodeMouseLeave:d,onNodeContextMenu:u,nodeClickDistance:$,onlyRenderVisibleElements:I,noPanClassName:ie,noDragClassName:oe,disableKeyboardA11y:se,nodeExtent:le,rfId:ce}),(0,C.jsx)("div",{className:"react-flow__viewport-portal"})]})})}sP.displayName="GraphView";const lP=(0,s.memo)(sP),cP=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:i,fitViewOptions:s,minZoom:l=.5,maxZoom:c=2,nodeOrigin:d,nodeExtent:u,zIndexMode:f="basic"}={})=>{const p=new Map,m=new Map,h=new Map,g=new Map,w=r??t??[],y=n??e??[],b=d??[0,0],v=u??RA;uL(h,g,w);const{nodesInitialized:x}=iL(y,p,m,{nodeOrigin:b,nodeExtent:v,zIndexMode:f});let N=[0,0,1];if(i&&o&&a){const e=KA(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),{x:t,y:n,zoom:r}=xT(e,o,a,l,c,s?.padding??.1);N=[t,n,r]}return{rfId:"1",width:o??0,height:a??0,transform:N,nodes:y,nodesInitialized:x,nodeLookup:p,parentLookup:m,edges:w,edgeLookup:g,connectionLookup:h,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==n,hasDefaultEdges:void 0!==r,panZoom:null,minZoom:l,maxZoom:c,translateExtent:RA,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:FA.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:{...YA},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:gT,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:BA,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},dP=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:i,fitViewOptions:s,minZoom:l,maxZoom:c,nodeOrigin:d,nodeExtent:u,zIndexMode:f})=>((e,t)=>e?YL(e,t):YL)((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=KA(s),c=xT(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{...cP({nodes:e,edges:t,width:o,height:a,fitView:i,fitViewOptions:s,minZoom:l,maxZoom:c,nodeOrigin:d,nodeExtent:u,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}=iL(e,t,n,{nodeOrigin:r,nodeExtent:u,elevateNodesOnSelect:o,checkEquality:!0,zIndexMode:i}),d=s&&c;a&&l?(h(),p({nodes:e,nodesInitialized:l,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:d})):p({nodes:e,nodesInitialized:l,nodesSelectionActive:d})},setEdges:e=>{const{connectionLookup:t,edgeLookup:n}=m();uL(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:d,updatedInternals:u}=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=[],d=window.getComputedStyle(s),{m22:u}=new window.DOMMatrixReadOnly(d.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=CT(r.nodeElement),d=e.measured.width!==s.width||e.measured.height!==s.height;if(s.width&&s.height&&(d||!e.internals.handleBounds||r.force)){const p=r.nodeElement.getBoundingClientRect(),m=_T(e.extent)?e.extent:a;let{positionAbsolute:h}=e.internals;e.parentId&&"parent"===e.extent?h=oT(h,s,t.get(e.parentId)):m&&(h=rT(h,m,s));const g={...e,measured:s,internals:{...e.internals,positionAbsolute:h,handleBounds:{source:zT("source",r.nodeElement,p,u,e.id),target:zT("target",r.nodeElement,p,u,e.id)}}};t.set(e.id,g),e.parentId&&sL(g,t,n,{nodeOrigin:o,zIndexMode:i}),l=!0,d&&(c.push({id:e.id,type:"dimensions",dimensions:s}),e.expandParent&&e.parentId&&f.push({id:e.id,parentId:e.parentId,rect:dT(g,o)}))}}if(f.length>0){const e=cL(f,t,n,o);c.push(...e)}return{changes:c,updatedInternals:l}}(e,n,r,o,a,i,c);u&&(function(e,t,n){const r=rL(tL,n);for(const n of e.values())if(n.parentId)sL(n,e,t,r);else{const e=JA(n,r.nodeOrigin),t=_T(n.extent)?n.extent:r.nodeExtent,o=rT(e,t,ET(n));n.internals.positionAbsolute=o}}(n,r,{nodeOrigin:a,nodeExtent:i,zIndexMode:c}),l?(h(),p({fitViewQueued:!1,fitViewOptions:void 0})):p({}),d?.length>0&&(s&&console.log("React Flow: trigger node changes",d),t?.(d)))},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),d={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=JT(e,i.fromHandle,GA.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(d)}if(n.length>0){const{parentLookup:e,nodeOrigin:t}=m(),a=cL(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(SO(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(kO(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=>DO(e,!0))):(o(CO(r,new Set([...e]),!0)),a(CO(n)))},addSelectedEdges:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:r,triggerNodeChanges:o,triggerEdgeChanges:a}=m();t?a(e.map(e=>DO(e,!0))):(a(CO(n,new Set([...e]))),o(CO(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(DO(e.id,!1))}const d=[];for(const e of l)e.selected&&d.push(DO(e.id,!1));a(c),i(d)},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,DO(t.id,!1)]:e,[]),i=e.reduce((e,t)=>t.selected?[...e,DO(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]||(iL(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:{...YA}})},updateConnection:e=>{p({connection:e})},reset:()=>p({...cP()})}},Object.is);function uP({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:a,initialMinZoom:i,initialMaxZoom:l,initialFitViewOptions:c,fitView:d,nodeOrigin:u,nodeExtent:f,zIndexMode:p,children:m}){const[h]=(0,s.useState)(()=>dP({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:a,fitView:d,minZoom:i,maxZoom:l,fitViewOptions:c,nodeOrigin:u,nodeExtent:f,zIndexMode:p}));return(0,C.jsx)(GL,{value:h,children:(0,C.jsx)(PO,{children:m})})}function fP({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:a,height:i,fitView:l,fitViewOptions:c,minZoom:d,maxZoom:u,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return(0,s.useContext)(WL)?(0,C.jsx)(C.Fragment,{children:e}):(0,C.jsx)(uP,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:a,initialHeight:i,fitView:l,initialFitViewOptions:c,initialMinZoom:d,initialMaxZoom:u,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const pP={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var mP=LO(function({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:a,edgeTypes:i,onNodeClick:l,onEdgeClick:c,onInit:d,onMove:u,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:h,onConnectEnd:g,onClickConnectStart:w,onClickConnectEnd:y,onNodeMouseEnter:b,onNodeMouseMove:v,onNodeMouseLeave:x,onNodeContextMenu:N,onNodeDoubleClick:_,onNodeDragStart:E,onNodeDrag:M,onNodeDragStop:I,onNodesDelete:S,onEdgesDelete:k,onDelete:D,onSelectionChange:j,onSelectionDragStart:A,onSelectionDrag:T,onSelectionDragStop:L,onSelectionContextMenu:O,onSelectionStart:z,onSelectionEnd:P,onBeforeDelete:R,connectionMode:U,connectionLineType:B=ZA.Bezier,connectionLineStyle:F,connectionLineComponent:Q,connectionLineContainerStyle:V,deleteKeyCode:Y="Backspace",selectionKeyCode:Z="Shift",selectionOnDrag:W=!1,selectionMode:G=VA.Full,panActivationKeyCode:H="Space",multiSelectionKeyCode:$=(NT()?"Meta":"Control"),zoomActivationKeyCode:X=(NT()?"Meta":"Control"),snapToGrid:q,snapGrid:J,onlyRenderVisibleElements:K=!1,selectNodesOnDrag:ee,nodesDraggable:te,autoPanOnNodeFocus:ne,nodesConnectable:re,nodesFocusable:oe,nodeOrigin:ae=mO,edgesFocusable:ie,edgesReconnectable:se,elementsSelectable:le=!0,defaultViewport:ce=hO,minZoom:de=.5,maxZoom:ue=2,translateExtent:fe=RA,preventScrolling:pe=!0,nodeExtent:me,defaultMarkerColor:he="#b1b1b7",zoomOnScroll:ge=!0,zoomOnPinch:we=!0,panOnScroll:ye=!1,panOnScrollSpeed:be=.5,panOnScrollMode:ve=QA.Free,zoomOnDoubleClick:xe=!0,panOnDrag:Ne=!0,onPaneClick:_e,onPaneMouseEnter:Ee,onPaneMouseMove:Me,onPaneMouseLeave:Ie,onPaneScroll:Se,onPaneContextMenu:ke,paneClickDistance:De=1,nodeClickDistance:Ce=0,children:je,onReconnect:Ae,onReconnectStart:Te,onReconnectEnd:Le,onEdgeContextMenu:Oe,onEdgeDoubleClick:ze,onEdgeMouseEnter:Pe,onEdgeMouseMove:Re,onEdgeMouseLeave:Ue,reconnectRadius:Be=10,onNodesChange:Fe,onEdgesChange:Qe,noDragClassName:Ve="nodrag",noWheelClassName:Ye="nowheel",noPanClassName:Ze="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:dt,viewport:ut,onViewportChange:ft,width:pt,height:mt,colorMode:ht="light",debug:gt,onScroll:wt,ariaLabelConfig:yt,zIndexMode:bt="basic",...vt},xt){const Nt=lt||"1",_t=function(e){const[t,n]=(0,s.useState)("system"===e?null:e);return(0,s.useEffect)(()=>{if("system"!==e)return void n(e);const t=vO(),r=()=>n(t?.matches?"dark":"light");return r(),t?.addEventListener("change",r),()=>{t?.removeEventListener("change",r)}},[e]),null!==t?t:vO()?.matches?"dark":"light"}(ht),Et=(0,s.useCallback)(e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),wt?.(e)},[wt]);return(0,C.jsx)("div",{"data-testid":"rf__wrapper",...vt,onScroll:Et,style:{...st,...pP},ref:xt,className:PL(["react-flow",o,_t]),id:lt,role:"application",children:(0,C.jsxs)(fP,{nodes:e,edges:t,width:pt,height:mt,fitView:We,fitViewOptions:Ge,minZoom:de,maxZoom:ue,nodeOrigin:ae,nodeExtent:me,zIndexMode:bt,children:[(0,C.jsx)(bO,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:m,onConnectStart:h,onConnectEnd:g,onClickConnectStart:w,onClickConnectEnd:y,nodesDraggable:te,autoPanOnNodeFocus:ne,nodesConnectable:re,nodesFocusable:oe,edgesFocusable:ie,edgesReconnectable:se,elementsSelectable:le,elevateNodesOnSelect:Je,elevateEdgesOnSelect:Ke,minZoom:de,maxZoom:ue,nodeExtent:me,onNodesChange:Fe,onEdgesChange:Qe,snapToGrid:q,snapGrid:J,connectionMode:U,translateExtent:fe,connectOnClick:He,defaultEdgeOptions:qe,fitView:We,fitViewOptions:Ge,onNodesDelete:S,onEdgesDelete:k,onDelete:D,onNodeDragStart:E,onNodeDrag:M,onNodeDragStop:I,onSelectionDrag:T,onSelectionDragStart:A,onSelectionDragStop:L,onMove:u,onMoveStart:f,onMoveEnd:p,noPanClassName:Ze,nodeOrigin:ae,rfId:Nt,autoPanOnConnect:tt,autoPanOnNodeDrag:nt,autoPanSpeed:rt,onError:it,connectionRadius:ot,isValidConnection:at,selectNodesOnDrag:ee,nodeDragThreshold:ct,connectionDragThreshold:dt,onBeforeDelete:R,debug:gt,ariaLabelConfig:yt,zIndexMode:bt}),(0,C.jsx)(lP,{onInit:d,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:b,onNodeMouseMove:v,onNodeMouseLeave:x,onNodeContextMenu:N,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:i,connectionLineType:B,connectionLineStyle:F,connectionLineComponent:Q,connectionLineContainerStyle:V,selectionKeyCode:Z,selectionOnDrag:W,selectionMode:G,deleteKeyCode:Y,multiSelectionKeyCode:$,panActivationKeyCode:H,zoomActivationKeyCode:X,onlyRenderVisibleElements:K,defaultViewport:ce,translateExtent:fe,minZoom:de,maxZoom:ue,preventScrolling:pe,zoomOnScroll:ge,zoomOnPinch:we,zoomOnDoubleClick:xe,panOnScroll:ye,panOnScrollSpeed:be,panOnScrollMode:ve,panOnDrag:Ne,onPaneClick:_e,onPaneMouseEnter:Ee,onPaneMouseMove:Me,onPaneMouseLeave:Ie,onPaneScroll:Se,onPaneContextMenu:ke,paneClickDistance:De,nodeClickDistance:Ce,onSelectionContextMenu:O,onSelectionStart:z,onSelectionEnd:P,onReconnect:Ae,onReconnectStart:Te,onReconnectEnd:Le,onEdgeContextMenu:Oe,onEdgeDoubleClick:ze,onEdgeMouseEnter:Pe,onEdgeMouseMove:Re,onEdgeMouseLeave:Ue,reconnectRadius:Be,defaultMarkerColor:he,noDragClassName:Ve,noWheelClassName:Ye,noPanClassName:Ze,rfId:Nt,disableKeyboardA11y:et,nodeExtent:me,viewport:ut,onViewportChange:ft}),(0,C.jsx)(fO,{onSelectionChange:j}),je,(0,C.jsx)(iO,{proOptions:Xe,position:$e}),(0,C.jsx)(oO,{rfId:Nt,disableKeyboardA11y:et})]})})});const hP=e=>e.domNode?.querySelector(".react-flow__edgelabel-renderer");function gP({children:e}){const t=$L(hP);return t?(0,cn.createPortal)(e,t):null}const wP=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function yP({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,C.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:PL(["react-flow__background-pattern",n,r])})}function bP({radius:e,className:t}){return(0,C.jsx)("circle",{cx:e,cy:e,r:e,className:PL(["react-flow__background-pattern","dots",t])})}var vP;!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(vP||(vP={}));const xP={[vP.Dots]:1,[vP.Lines]:1,[vP.Cross]:6},NP=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function _P({id:e,variant:t=vP.Dots,gap:n=20,size:r,lineWidth:o=1,offset:a=0,color:i,bgColor:l,style:c,className:d,patternClassName:u}){const f=(0,s.useRef)(null),{transform:p,patternId:m}=$L(NP,ZL),h=r||xP[t],g=t===vP.Dots,w=t===vP.Cross,y=Array.isArray(n)?n:[n,n],b=[y[0]*p[2]||1,y[1]*p[2]||1],v=h*p[2],x=Array.isArray(a)?a:[a,a],N=w?[v,v]:b,_=[x[0]*p[2]||1+N[0]/2,x[1]*p[2]||1+N[1]/2],E=`${m}${e||""}`;return(0,C.jsxs)("svg",{className:PL(["react-flow__background",d]),style:{...c,...QO,"--xy-background-color-props":l,"--xy-background-pattern-color-props":i},ref:f,"data-testid":"rf__background",children:[(0,C.jsx)("pattern",{id:E,x:p[0]%b[0],y:p[1]%b[1],width:b[0],height:b[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:g?(0,C.jsx)(bP,{radius:v/2,className:u}):(0,C.jsx)(yP,{dimensions:N,lineWidth:o,variant:t,className:u})}),(0,C.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}_P.displayName="Background";const EP=(0,s.memo)(_P);function MP(){return(0,C.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,C.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function IP(){return(0,C.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,C.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function SP(){return(0,C.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,C.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 kP(){return(0,C.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,C.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 DP(){return(0,C.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,C.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 CP({children:e,className:t,...n}){return(0,C.jsx)("button",{type:"button",className:PL(["react-flow__controls-button",t]),...n,children:e})}const jP=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function AP({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:a,onZoomOut:i,onFitView:s,onInteractiveChange:l,className:c,children:d,position:u="bottom-left",orientation:f="vertical","aria-label":p}){const m=XL(),{isInteractive:h,minZoomReached:g,maxZoomReached:w,ariaLabelConfig:y}=$L(jP,ZL),{zoomIn:b,zoomOut:v,fitView:x}=UO(),N="horizontal"===f?"horizontal":"vertical";return(0,C.jsxs)(aO,{className:PL(["react-flow__controls",N,c]),position:u,style:e,"data-testid":"rf__controls","aria-label":p??y["controls.ariaLabel"],children:[t&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(CP,{onClick:()=>{b(),a?.()},className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:w,children:(0,C.jsx)(MP,{})}),(0,C.jsx)(CP,{onClick:()=>{v(),i?.()},className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:g,children:(0,C.jsx)(IP,{})})]}),n&&(0,C.jsx)(CP,{className:"react-flow__controls-fitview",onClick:()=>{x(o),s?.()},title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,C.jsx)(SP,{})}),r&&(0,C.jsx)(CP,{className:"react-flow__controls-interactive",onClick:()=>{m.setState({nodesDraggable:!h,nodesConnectable:!h,elementsSelectable:!h}),l?.(!h)},title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:h?(0,C.jsx)(DP,{}):(0,C.jsx)(kP,{})}),d]})}AP.displayName="Controls",(0,s.memo)(AP);const TP=(0,s.memo)(function({id:e,x:t,y:n,width:r,height:o,style:a,color:i,strokeColor:s,strokeWidth:l,className:c,borderRadius:d,shapeRendering:u,selected:f,onClick:p}){const{background:m,backgroundColor:h}=a||{},g=i||m||h;return(0,C.jsx)("rect",{className:PL(["react-flow__minimap-node",{selected:f},c]),x:t,y:n,rx:d,ry:d,width:r,height:o,style:{fill:g,stroke:s,strokeWidth:l},shapeRendering:u,onClick:p?t=>p(t,e):void 0})}),LP=e=>e.nodes.map(e=>e.id),OP=e=>e instanceof Function?e:()=>e,zP=(0,s.memo)(function({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:a,shapeRendering:i,NodeComponent:s,onClick:l}){const{node:c,x:d,y:u,width:f,height:p}=$L(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}=ET(r);return{node:r,x:o,y:a,width:i,height:s}},ZL);return c&&!c.hidden&&MT(c)?(0,C.jsx)(s,{x:d,y:u,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 PP=(0,s.memo)(function({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:a=TP,onClick:i}){const s=$L(LP,ZL),l=OP(t),c=OP(e),d=OP(n),u="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return(0,C.jsx)(C.Fragment,{children:s.map(e=>(0,C.jsx)(zP,{id:e,nodeColorFunc:l,nodeStrokeColorFunc:c,nodeClassNameFunc:d,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:a,onClick:i,shapeRendering:u},e))})});const RP=e=>!e.hidden,UP=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?fT(KA(e.nodeLookup,{filter:RP}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}};function BP({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:a=5,nodeStrokeWidth:i,nodeComponent:l,bgColor:c,maskColor:d,maskStrokeColor:u,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:h,pannable:g=!1,zoomable:w=!1,ariaLabel:y,inversePan:b,zoomStep:v=1,offsetScale:x=5}){const N=XL(),_=(0,s.useRef)(null),{boundingRect:E,viewBB:M,rfId:I,panZoom:S,translateExtent:k,flowWidth:D,flowHeight:j,ariaLabelConfig:A}=$L(UP,ZL),T=e?.width??200,L=e?.height??150,O=E.width/T,z=E.height/L,P=Math.max(O,z),R=P*T,U=P*L,B=x*P,F=E.x-(R-E.width)/2-B,Q=E.y-(U-E.height)/2-B,V=R+2*B,Y=U+2*B,Z=`react-flow__minimap-desc-${I}`,W=(0,s.useRef)(0),G=(0,s.useRef)();W.current=P,(0,s.useEffect)(()=>{if(_.current&&S)return G.current=function({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=uC(e);return{update:function({translateExtent:e,width:a,height:i,zoomStep:s=1,pannable:l=!0,zoomable:c=!0,inversePan:d=!1}){let u=[0,0];const f=AA().on("start",e=>{"mousedown"!==e.sourceEvent.type&&"touchstart"!==e.sourceEvent.type||(u=[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]-u[0],l[1]-u[1]];u=l;const f=r()*Math.max(s[2],Math.log(s[2]))*(d?-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&&NT()?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:fC}}({domNode:_.current,panZoom:S,getTransform:()=>N.getState().transform,getViewScale:()=>W.current}),()=>{G.current?.destroy()}},[S]),(0,s.useEffect)(()=>{G.current?.update({translateExtent:k,width:D,height:j,inversePan:b,pannable:g,zoomStep:v,zoomable:w})},[g,w,b,v,k,D,j]);const H=m?e=>{const[t,n]=G.current?.pointer(e)||[0,0];m(e,{x:t,y:n})}:void 0,$=h?(0,s.useCallback)((e,t)=>{const n=N.getState().nodeLookup.get(t).internals.userNode;h(e,n)},[]):void 0,X=y??A["minimap.ariaLabel"];return(0,C.jsx)(aO,{position:p,style:{...e,"--xy-minimap-background-color-props":"string"==typeof c?c:void 0,"--xy-minimap-mask-background-color-props":"string"==typeof d?d:void 0,"--xy-minimap-mask-stroke-color-props":"string"==typeof u?u:void 0,"--xy-minimap-mask-stroke-width-props":"number"==typeof f?f*P: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:PL(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,C.jsxs)("svg",{width:T,height:L,viewBox:`${F} ${Q} ${V} ${Y}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Z,ref:_,onClick:H,children:[X&&(0,C.jsx)("title",{id:Z,children:X}),(0,C.jsx)(PP,{onClick:$,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:o,nodeStrokeWidth:i,nodeComponent:l}),(0,C.jsx)("path",{className:"react-flow__minimap-mask",d:`M${F-B},${Q-B}h${V+2*B}v${Y+2*B}h${-V-2*B}z\n M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}BP.displayName="MiniMap";const FP=(0,s.memo)(BP),QP={[kL.Line]:"right",[kL.Handle]:"bottom-right"};(0,s.memo)(function({nodeId:e,position:t,variant:n=kL.Handle,className:r,style:o,children:a,color:i,minWidth:l=10,minHeight:c=10,maxWidth:d=Number.MAX_VALUE,maxHeight:u=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:h,onResizeStart:g,onResize:w,onResizeEnd:y}){const b=tz(),v="string"==typeof e?e:b,x=XL(),N=(0,s.useRef)(null),_=n===kL.Handle,E=$L((0,s.useCallback)((M=_&&m,e=>M?`${Math.max(1/e.transform[2],1)}`:void 0),[_,m]),ZL);var M;const I=(0,s.useRef)(null),S=t??QP[n];(0,s.useEffect)(()=>{if(N.current&&v)return I.current||(I.current=function({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const a=uC(e);let i={controlDirection:DL("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:d,onResize:u,onResizeEnd:f,shouldResize:p}){let m,h={...LL},g={...OL};i={boundaries:s,resizeDirection:c,keepAspectRatio:l,controlDirection:DL(e)};let w,y,b,v=null,x=[],N=!1;const _=MC().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:u}=DT(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:u,aspectRatio:h.width/h.height},w=void 0,m.parentId&&("parent"===m.extent||m.expandParent)&&(w=r.get(m.parentId),y=w&&"parent"===m.extent?function(e){return[[0,0],[e.measured.width,e.measured.height]]}(w):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=zL(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}d?.(e,{...h})}).on("drag",e=>{const{transform:t,snapGrid:o,snapToGrid:a,nodeOrigin:s}=n(),l=DT(e.sourceEvent,{transform:t,snapGrid:o,snapToGrid:a,containerBounds:v}),c=[];if(!m)return;const{x:d,y:f,width:_,height:E}=h,M={},I=m.origin??s,{width:S,height:k,x:D,y:C}=function(e,t,n,r,o,a,i,s){let{affectsX:l,affectsY:c}=t;const{isHorizontal:d,isVertical:u}=t,f=d&&u,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:w,maxHeight:y}=r,{x:b,y:v,width:x,height:N,aspectRatio:_}=e;let E=Math.floor(d?p-e.pointerX:0),M=Math.floor(u?m-e.pointerY:0);const I=x+(l?-E:E),S=N+(c?-M:M),k=-a[0]*x,D=-a[1]*N;let C=AL(I,h,g),j=AL(S,w,y);if(i){let e=0,t=0;l&&E<0?e=CL(b+E+k,i[0][0]):!l&&E>0&&(e=jL(b+I+k,i[1][0])),c&&M<0?t=CL(v+M+D,i[0][1]):!c&&M>0&&(t=jL(v+S+D,i[1][1])),C=Math.max(C,e),j=Math.max(j,t)}if(s){let e=0,t=0;l&&E>0?e=jL(b+E,s[0][0]):!l&&E<0&&(e=CL(b+I,s[1][0])),c&&M>0?t=jL(v+M,s[0][1]):!c&&M<0&&(t=CL(v+S,s[1][1])),C=Math.max(C,e),j=Math.max(j,t)}if(o){if(d){const e=AL(I/_,w,y)*_;if(C=Math.max(C,e),i){let e=0;e=!l&&!c||l&&!c&&f?jL(v+D+I/_,i[1][1])*_:CL(v+D+(l?E:-E)/_,i[0][1])*_,C=Math.max(C,e)}if(s){let e=0;e=!l&&!c||l&&!c&&f?CL(v+I/_,s[1][1])*_:jL(v+(l?E:-E)/_,s[0][1])*_,C=Math.max(C,e)}}if(u){const e=AL(S*_,h,g)/_;if(j=Math.max(j,e),i){let e=0;e=!l&&!c||c&&!l&&f?jL(b+S*_+k,i[1][0])/_:CL(b+(c?M:-M)*_+k,i[0][0])/_,j=Math.max(j,e)}if(s){let e=0;e=!l&&!c||c&&!l&&f?CL(b+S*_,s[1][0])/_:jL(b+(c?M:-M)*_,s[0][0])/_,j=Math.max(j,e)}}}M+=M<0?j:-j,E+=E<0?C:-C,o&&(f?I>S*_?M=(TL(l,c)?-E:E)/_:E=(TL(l,c)?-M:M)*_:d?(M=E/_,c=l):(E=M*_,l=c));const A=l?b+E:b,T=c?v+M:v;return{width:x+(l?-E:E),height:N+(c?-M:M),x:a[0]*E*(l?-1:1)+A,y:a[1]*M*(c?-1:1)+T}}(g,i.controlDirection,l,i.boundaries,i.keepAspectRatio,I,y,b),j=S!==_,A=k!==E,T=D!==d&&j,L=C!==f&&A;if(!(T||L||j||A))return;if((T||L||1===I[0]||1===I[1])&&(M.x=T?D:h.x,M.y=L?C:h.y,h.x=M.x,h.y=M.y,x.length>0)){const e=D-d,t=C-f;for(const n of x)n.position={x:n.position.x-e+I[0]*(S-_),y:n.position.y-t+I[1]*(k-E)},c.push(n)}if((j||A)&&(M.width=!j||i.resizeDirection&&"horizontal"!==i.resizeDirection?h.width:S,M.height=!A||i.resizeDirection&&"vertical"!==i.resizeDirection?h.height:k,h.width=M.width,h.height=M.height),w&&m.expandParent){const e=I[0]*(M.width??0);M.x&&M.x<e&&(h.x=e,g.x=g.x-(M.x-e));const t=I[1]*(M.height??0);M.y&&M.y<t&&(h.y=t,g.y=g.y-(M.y-t))}const O=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:_,height:h.height,prevHeight:E,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),z={...h,direction:O},P=p?.(e,z);!1!==P&&(N=!0,u?.(e,z),r(M,c))}).on("end",e=>{N&&(f?.(e,{...h}),o?.({...h}),N=!1)});a.call(_)},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,d=cL([{id:l.id,parentId:l.parentId,rect:{width:n,height:c,...IT({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(...d),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:!p||("horizontal"===p?"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:l,minHeight:c,maxWidth:d,maxHeight:u},keepAspectRatio:f,resizeDirection:p,onResizeStart:g,onResize:w,onResizeEnd:y,shouldResize:h}),()=>{I.current?.destroy()}},[S,l,c,d,u,f,g,w,y,h]);const k=S.split("-");return(0,C.jsx)("div",{className:PL(["react-flow__resize-control","nodrag",...k,n,r]),ref:N,style:{...o,scale:E,...i&&{[_?"backgroundColor":"borderColor"]:i}},children:a})});const VP=(0,s.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o="start"===e?.position,a="end"===e?.position,{position:s,id:l}="start"==(o?"start":"end")?n?{position:GA.Bottom,id:"bottom"}:r?{position:GA.Right,id:"right"}:{position:GA.Left,id:"left"}:n?{position:GA.Top,id:"top"}:r?{position:GA.Left,id:"left"}:{position:GA.Right,id:"right"};return(0,i.createElement)(i.Fragment,null,a&&(0,i.createElement)(rz,{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,i.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,i.createElement)(rz,{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 YP({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 ZP=s.forwardRef(YP),WP=(0,s.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),a=o?(0,D.sprintf)(/* translators: %d: number of dynamic-offer conditions on this checkout */ /* translators: %d: number of dynamic-offer conditions on this checkout */ |
| 47 |
(0,D._n)("%d condition","%d conditions",o,"cartflows"),o):"";return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:n,position:GA.Left,style:{background:"#555"},isConnectable:t,className:"react-flow__handle wcf-handle-left"}),(0,i.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,i.createElement)("div",{className:"wcf-custom-node-design"},(0,i.createElement)(I,{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,i.createElement)(ZP,{className:"w-8 h-8 !fill-[none] stroke-2 text-gray-500",style:{transform:"rotate(-45deg)"}})))),(0,i.createElement)("div",{className:"wcf-custom-node-label",style:{fontSize:"11px",fontWeight:"600",marginTop:"8px",textAlign:"center"}},e.label||(0,D.__)("Dynamic Offers","cartflows")),a&&(0,i.createElement)("div",{className:"wcf-conditional-node__summary",style:{fontSize:"10px",color:"#6B7280",marginTop:"2px",textAlign:"center"}},a),(0,i.createElement)(rz,{type:r,position:GA.Right,style:{background:"#555"},isConnectable:t,className:"react-flow__handle wcf-handle-right"}))}),GP="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFQUVBRUEiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOEgwVjEwWiIgZmlsbD0iI0U2RUFFRCIvPjxjaXJjbGUgY3g9IjE0IiBjeT0iMTQiIHI9IjQiIGZpbGw9IiNGRjNCMzAiLz48Y2lyY2xlIGN4PSIyNyIgY3k9IjE0IiByPSI0IiBmaWxsPSIjRkMwIi8+PGNpcmNsZSBjeD0iNDAiIGN5PSIxNCIgcj0iNCIgZmlsbD0iIzRDRDk2NCIvPjxyZWN0IHg9IjY0IiB5PSIxMCIgd2lkdGg9IjEwNyIgaGVpZ2h0PSI3IiByeD0iMSIgZmlsbD0iI2ZmZiIvPjxyZWN0IHg9IjIzIiB5PSIyMjAiIHdpZHRoPSIxNTQiIGhlaWdodD0iMjAiIHJ4PSIyIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTY3LjIwNiAyMzMuNWgyLjc5NmMxLjQ3IDAgMi4yNTMtLjc2NyAyLjI1My0xLjgwOSAwLS45NjgtLjY5My0xLjU1My0xLjQzOC0xLjU4OHYtLjA2NGMuNjgtLjE1NCAxLjE4My0uNjM2IDEuMTgzLTEuNDA3IDAtLjk4MS0uNzI5LTEuNjc3LTIuMTc0LTEuNjc3aC0yLjYydjYuNTQ1Wm0xLjM4My0xLjEzMXYtMS43MzloMS4xNmMuNjY1IDAgMS4wNzguMzgzIDEuMDc4LjkyNCAwIC40OTItLjMzNi44MTUtMS4xMS44MTVINjguNTlabTAtMi42NzV2LTEuNjIxaDEuMDUyYy42MTQgMCAuOTYyLjMxNy45NjIuNzkgMCAuNTE3LS40MjIuODMxLS45ODguODMxSDY4LjU5Wm03LjY5IDEuNzE2Yy4wMDIuNjU4LS40NDggMS4wMDMtLjkzNyAxLjAwMy0uNTE1IDAtLjg0Ny0uMzYxLS44NS0uOTM5di0yLjg4M0g3My4xM3YzLjEyNmMuMDAzIDEuMTQ3LjY3NSAxLjg0NyAxLjY2MiAxLjg0Ny43MzkgMCAxLjI2OS0uMzggMS40OS0uOTU2aC4wNXYuODkyaDEuMzA4di00LjkwOWgtMS4zNjJ2Mi44MTlabTMuMjkgMy45MzFjMS4wMTQgMCAxLjU1LS41MTggMS44MjgtMS4zMWwxLjkwOS01LjQzNC0xLjQ0Mi0uMDA2LTEuMDI2IDMuNjA1aC0uMDVsLTEuMDE3LTMuNjA1aC0xLjQzMmwxLjc2MSA1LjA1LS4wOC4yMDdjLS4xNzkuNDYxLS41Mi40ODMtMSAuMzM2bC0uMzA3IDEuMDE2Yy4xOTUuMDgzLjUxMS4xNDEuODU2LjE0MVptMTIuMDE3LTguMzg2aC0xLjM3OHY0LjExNmgtLjA1N2wtMi44MjYtNC4xMTZoLTEuMjE0djYuNTQ1aDEuMzg0di00LjEyaC4wNDhsMi44NDcgNC4xMmgxLjE5NnYtNi41NDVabTMuMzM1IDYuNjQxYzEuNDkgMCAyLjQxNy0xLjAyIDIuNDE3LTIuNTMxIDAtMS41MjItLjkyNy0yLjUzOC0yLjQxNi0yLjUzOC0xLjQ5IDAtMi40MTcgMS4wMTYtMi40MTcgMi41MzggMCAxLjUxMS45MjcgMi41MzEgMi40MTYgMi41MzFabS4wMDctMS4wNTVjLS42ODcgMC0xLjAzOS0uNjI5LTEuMDM5LTEuNDg2IDAtLjg1Ni4zNTItMS40ODkgMS4wMzktMS40ODkuNjc0IDAgMS4wMjYuNjMzIDEuMDI2IDEuNDg5IDAgLjg1Ny0uMzUyIDEuNDg2LTEuMDI2IDEuNDg2Wm00LjE0Ljk1OWgxLjQzOWwuODQzLTMuMDg3aC4wNjFsLjg0NCAzLjA4N2gxLjQ0MWwxLjMzMy00LjkwOWgtMS4zNzRsLS43NDggMy4yNzloLS4wNDJsLS44MDUtMy4yNzloLTEuMzUybC0uNzkzIDMuMjk4aC0uMDQ0bC0uNzYxLTMuMjk4aC0xLjM3OGwxLjMzNiA0LjkwOVptOS4wNzEtMi42MjRjMCAxLjU4OC40MTggMi45MDggMS4yOTEgNC4wNDZoMS4zMDFjLS42NjgtLjg0NC0xLjE3Ni0yLjUzMS0xLjE3Ni00LjA0NiAwLTEuNTEyLjUwOC0zLjE5OSAxLjE3Ni00LjA0M2gtMS4zMDFjLS44NzMgMS4xMzgtMS4yOTEgMi40NTUtMS4yOTEgNC4wNDNabTkuMTgzLTEuNjNjLS4xODMtMS41MTItMS4zMjctMi4zODEtMi44NDItMi4zODEtMS43MjkgMC0zLjA0OSAxLjIyMS0zLjA0OSAzLjM2MiAwIDIuMTM1IDEuMjk4IDMuMzYyIDMuMDQ5IDMuMzYyIDEuNjc4IDAgMi42OTEtMS4xMTUgMi44NDItMi4zMmwtMS40LS4wMDZjLS4xMzEuNy0uNjgxIDEuMTAyLTEuNDE5IDEuMTAyLS45OTQgMC0xLjY2OS0uNzM4LTEuNjY5LTIuMTM4IDAtMS4zNjEuNjY1LTIuMTM4IDEuNjc4LTIuMTM4Ljc1OCAwIDEuMzA0LjQzOCAxLjQxIDEuMTU3aDEuNFptLjc0My0xLjE1aDIuMDA0djUuNDA0aDEuMzY4di01LjQwNGgyLjAwM3YtMS4xNDFoLTUuMzc1djEuMTQxWm02LjU4IDUuNDA0LjQ4Ni0xLjQ5M2gyLjM2MmwuNDg2IDEuNDkzaDEuNDgzbC0yLjI1Ny02LjU0NWgtMS43ODNsLTIuMjYgNi41NDVoMS40ODNabS44MzgtMi41NzMuODA1LTIuNDc3aC4wNTFsLjgwNiAyLjQ3N2gtMS42NjJabTcuMDM2LS43YzAtMS41ODgtLjQxOS0yLjkwOC0xLjI5MS00LjA0NmgtMS4zMDFjLjY2OC44NDQgMS4xNzYgMi41MzEgMS4xNzYgNC4wNDYgMCAxLjUxMi0uNTA4IDMuMTk5LTEuMTc2IDQuMDQzaDEuMzAxYy44NzItMS4xMzggMS4yOTEtMi40NTQgMS4yOTEtNC4wNDNaIiBmaWxsPSIjZmZmIi8+PHJlY3QgeD0iNjUiIHk9IjE2NCIgd2lkdGg9IjcwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iNzUiIHk9IjU3IiB3aWR0aD0iNTAiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSI1MCIgeT0iNDMiIHdpZHRoPSIxMDAiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiMyMjcxQjEiLz48cmVjdCB4PSIyMy43NSIgeT0iNzYuNzUiIHdpZHRoPSIxNTIuNSIgaGVpZ2h0PSI2MS41IiByeD0iMS4yNSIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMjI3MUIxIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Im05NS44NzcgMTEzLjQ4MyAxOS4xMTMtMTkuMzg0IDI4LjM0OSAzMi4xNTFINTguODc2bDI0LjUzLTIzLjM1MSAxMS40MjcgMTAuNjA3LjUzMy40OTUuNTEtLjUxOFoiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzIyNzFCMSIgc3Ryb2tlLXdpZHRoPSIxLjUiLz48cGF0aCBkPSJNMTAxLjI1IDk1YzAgMi45NjItMi4xODcgNS4yNS00Ljc1IDUuMjVzLTQuNzUtMi4yODgtNC43NS01LjI1IDIuMTg3LTUuMjUgNC43NS01LjI1IDQuNzUgMi4yODggNC43NSA1LjI1WiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMjI3MUIxIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxwYXRoIGQ9Im0xNjYuNzI3IDExMS4wNiAzLjA1My0zLjA2LTMuMDUzLTMuMDYuOTQtLjk0IDQgNC00IDQtLjk0LS45NFpNMzQuMjcyIDExMS4wNiAzMS4yMTkgMTA4bDMuMDUzLTMuMDYtLjk0LS45NC00IDQgNCA0IC45NC0uOTRaIiBmaWxsPSIjMjI3MUIxIi8+PGNpcmNsZSBjeD0iOTEuNSIgY3k9IjE0Ny41IiByPSIxLjUiIGZpbGw9IiMyMjcxQjEiLz48Y2lyY2xlIGN4PSI5OS41IiBjeT0iMTQ3LjUiIHI9IjEuNSIgZmlsbD0iIzIyNzFCMSIvPjxjaXJjbGUgY3g9IjEwNy41IiBjeT0iMTQ3LjUiIHI9IjEuNSIgZmlsbD0iIzIyNzFCMSIvPjxyZWN0IHg9IjIzIiB5PSIxNzgiIHdpZHRoPSIxNTQiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSIyMyIgeT0iMTkyIiB3aWR0aD0iMTU0IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iMjMiIHk9IjIwNiIgd2lkdGg9IjE1NCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0U2RUFFRCIvPjwvc3ZnPg==";function HP({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 $P=s.forwardRef(HP);function XP({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 qP=s.forwardRef(XP);function JP({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 KP=s.forwardRef(JP);function eR({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 tR=s.forwardRef(eR);function nR({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 rR=s.forwardRef(nR),oR=Ao("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"}]]),aR=Ao("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"}]]),iR=Ao("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"}]]),sR=Ao("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"}]]),lR=Ao("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"}]]),cR=Ao("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"}]]),dR=Ao("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"}]]),uR=Ao("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"}]]),fR=Ao("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"}]]),pR=Ao("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"}]]),mR=e=>{const t=Number(e)||0;return 0===t?"—":Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`},hR=({bump:e,settingsUrl:t})=>{const n=!e.revenue&&!e.conversions;return(0,i.createElement)(I,{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,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,i.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,D.__)("Order bump","cartflows")},(0,i.createElement)(pR,{className:"w-3 h-3 stroke-2 text-primary-500"})),(0,i.createElement)(Ym,{as:"span",size:14,color:n?"tertiary":"primary",className:"wcf-bump-row__title truncate flex-1 text-left"},e.title),(0,i.createElement)(Ym,{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,i.createElement)(Ym,{as:"span",size:14,weight:n?400:600,color:n?"tertiary":"primary",className:"tabular-nums w-14 text-right"},mR(e.revenue)),(0,i.createElement)(Ex,{className:"w-3 h-3 stroke-2 text-text-tertiary shrink-0"})))},gR=({stepId:e,flowId:t,flowType:n,bumps:r=[],compact:o=!1})=>{const[a,l]=(0,s.useState)(!1);if(!Array.isArray(r)||0===r.length)return null;const c=r.reduce((e,t)=>e+(Number(t.revenue)||0),0),d="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,i.createElement)(I,{to:{pathname:"admin.php",search:d},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,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",justify:"between"},(0,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,i.createElement)(pR,{className:"w-3.5 h-3.5 stroke-2 text-text-primary"}),(0,i.createElement)(Ym,{as:"span",size:12,weight:500,color:"primary"},(0,D.__)("Order Bumps","cartflows")),(0,i.createElement)(Ym,{as:"span",size:12,color:"secondary",className:"tabular-nums"},"(",r.length,")")),(0,i.createElement)(Ym,{as:"span",size:12,color:"secondary",className:"tabular-nums"},mR(c)))):(0,i.createElement)(Pm,{containerType:"flex",direction:"column",className:"wcf-bumps-section px-4 py-3 border-0 border-t border-b border-solid border-border-subtle "+(a?"":"!gap-0")},(0,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",justify:"between",className:a?"mb-2":""},(0,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,i.createElement)(pR,{className:"w-4 h-4 stroke-2 text-text-primary"}),(0,i.createElement)(Ym,{as:"span",size:14,weight:500,color:"primary"},(0,D.__)("Order Bumps","cartflows")),(0,i.createElement)(Ym,{as:"span",size:12,color:"secondary",className:"tabular-nums"},"(",r.length,")")),(0,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,i.createElement)(Ym,{as:"span",size:12,color:"tertiary"},(0,D.__)("Total","cartflows")),(0,i.createElement)(Ym,{as:"span",size:12,weight:500,color:"primary",className:"tabular-nums"},mR(c)),(0,i.createElement)(Po,{variant:"ghost",size:"xs",type:"button",onClick:()=>l(e=>!e),"aria-expanded":a,"aria-label":a?(0,D.__)("Collapse order bumps","cartflows"):(0,D.__)("Expand order bumps","cartflows"),icon:(0,i.createElement)(lp,{className:"stroke-2 transition-transform duration-300 ease-in-out "+(a?"rotate-180":"")}),className:"wcf-bumps-section__toggle !p-0.5 text-text-tertiary hover:text-text-primary"}))),(0,i.createElement)("div",{className:"wcf-bumps-section__body grid transition-[grid-template-rows] duration-300 ease-in-out "+(a?"grid-rows-[1fr]":"grid-rows-[0fr]"),"aria-hidden":!a},(0,i.createElement)("div",{className:"overflow-hidden min-h-0"},(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"xs"},r.map(e=>(0,i.createElement)(hR,{key:e.id,bump:e,settingsUrl:d}))),(0,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",justify:"end",gap:"sm",className:"pt-1.5 mt-0.5"},(0,i.createElement)(Ym,{as:"span",size:12,color:"tertiary",className:"uppercase tracking-wide w-10 text-right"},(0,D.__)("Sales","cartflows")),(0,i.createElement)(Ym,{as:"span",size:12,color:"tertiary",className:"uppercase tracking-wide w-14 text-right"},(0,D.__)("Revenue","cartflows")),(0,i.createElement)("span",{className:"w-3","aria-hidden":"true"})))))},wR={cloneStepRequest({stepId:e,flowId:t,action:n="cartflows_clone_step",controlId:r}){if(!wcfCartflowsPro())return Promise.resolve(null);let o=cartflows_admin.clone_step_nonce;const a=new window.FormData;return"cartflows_clone_ab_test_step"===n&&(o=cartflows_admin.wcf_clone_ab_test_step_nonce,a.append("control_id",r)),a.append("action",n),a.append("security",o),a.append("step_id",e),a.append("post_id",t),window.wcfAction="cloneStep",Xf()({url:cartflows_admin.ajax_url,method:"POST",body:a})},createEventHandlers:(e,t,n,r,o={})=>({clone:async function(n){if(n.preventDefault(),!wcfCartflowsPro())return null;const o=n.currentTarget.getAttribute("data-action");if(await t({title:(0,D.__)("Duplicate Step","cartflows"),description:(0,D.__)("Do you want to duplicate this step? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Yes","cartflows"),cancelBtnText:(0,D.__)("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,Xh.$h)(Xf()({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,D.__)("Delete Step","cartflows"),description:(0,D.__)("Do you want to delete this step? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Yes","cartflows"),cancelBtnText:(0,D.__)("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,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{window.location.reload()}).catch(e=>{console.error("Delete step failed:",e),r(!1)}))}},abtest:function(t){if(t.preventDefault(),!wcfCartflowsTypePro())return null;r(!0);const n=new window.FormData;n.append("action","cartflows_create_ab_test_variation"),n.append("security",cartflows_admin.wcf_create_ab_test_variation_nonce),n.append("step_id",e?.step_id),n.append("flow_id",e?.flow_id),window.wcfAction="abtestStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{window.location.reload()}).catch(e=>{console.error("Create A/B variation failed:",e),r(!1)}))},winner:async function(n){if(n.preventDefault(),await t({title:(0,D.__)("Declare Winner","cartflows"),description:(0,D.__)("Do you want to declare this step as winner? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Declare Winner","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})){r(!0);const t=new window.FormData;t.append("action","cartflows_declare_ab_test_winner"),t.append("security",cartflows_admin.wcf_declare_ab_test_winner_nonce),t.append("step_id",e?.step_id),t.append("flow_id",e?.flow_id),window.wcfAction="winnerStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{gm.success((0,D.__)("Winner declared successfully!","cartflows")),window.location.reload()}).catch(e=>{console.error("Declare A/B test winner failed:",e),gm.error((0,D.__)("Failed to declare winner. Please try again.","cartflows")),r(!1)}))}},archived:async function(n){if(n.preventDefault(),await t({title:(0,D.__)("Archive Step","cartflows"),description:(0,D.__)("Do you want to archive this step? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Yes","cartflows"),cancelBtnText:(0,D.__)("No","cartflows")})){r(!0);const t=new window.FormData;t.append("action","cartflows_archive_ab_test_step"),t.append("security",cartflows_admin.wcf_archive_ab_test_step_nonce),t.append("step_id",e?.step_id),t.append("post_id",e?.flow_id),window.wcfAction="archiveStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{window.location.reload()}).catch(e=>{console.error("Archiving step failed:",e),r(!1)}))}},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,r,o={}){r(!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(o).length>0&&i.append("redirect_updates",JSON.stringify(o)),window.wcfAction="deleteStep";try{const e=(await Promise.resolve().then(n.t.bind(n,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),r(!1)}},nodeHtml(e,t,n,r,o,a,s,l,c,d,u,f,p=[],m=!1,h=[],g="",w=!1,y=!1){const b=cm(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?Wm(c.visits.revenue):0,_=e?.step_type||"",E=lm(e?.step_title||"");return(0,i.createElement)("div",{className:`wcf-custom-node-wrapper${m?" wcf-custom-node-wrapper--compact":""}${w?" wcf-custom-node-wrapper--locked pointer-events-none touch-none opacity-60":""}`},(0,i.createElement)("div",{className:"wcf-custom-node-design"},(0,i.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,i.createElement)(Zo,{content:(0,D.__)("View Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:n,target:"_blank",rel:"noreferrer","aria-label":(0,D.__)("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,i.createElement)(dR,{className:"w-5 h-5"}))),(0,i.createElement)(Zo,{content:b?dm():(0,D.__)("Edit Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:b?"#!":r,target:b?void 0:"_blank",rel:"noreferrer","aria-label":(0,D.__)("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,i.createElement)(uR,{className:"w-5 h-5"}))),(0,i.createElement)(Zo,{content:(0,D.__)("Edit Settings","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)(I,{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,D.__)("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,i.createElement)(fR,{className:"w-5 h-5"})))),(0,i.createElement)("div",{className:"wcf-custom-node-content bg-white border border-gray-200 rounded-lg shadow-md"+(f?" opacity-50":"")},(0,i.createElement)("div",{className:"wcf-custom-node-content--header flex flex-col gap-3 border-b border-gray-200 py-4 px-5"},(0,i.createElement)("div",{className:"wcf-node-step--info-wrapper flex flex-row items-center gap-4 w-full"},(0,i.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,i.createElement)($P,{className:n});break;case"optin":t=(0,i.createElement)(qP,{className:n});break;case"checkout":t=(0,i.createElement)(qI,{className:n});break;case"upsell":t=(0,i.createElement)(Dp,{className:n});break;case"downsell":t=(0,i.createElement)(KP,{className:n});break;case"thankyou":t=(0,i.createElement)(tR,{className:n});break;default:t=(0,i.createElement)(rR,{className:n})}return t})(_)),(0,i.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,i.createElement)("div",{className:"wcf-node-step--type flex items-center gap-2"},(0,i.createElement)("span",{className:"text-xs font-normal text-gray-400"},(M=_,{landing:(0,D.__)("Landing","cartflows"),optin:(0,D.__)("Optin","cartflows"),checkout:(0,D.__)("Checkout","cartflows"),upsell:(0,D.__)("Upsell","cartflows"),downsell:(0,D.__)("Downsell","cartflows"),thankyou:(0,D.__)("Thank You","cartflows")}[M]||M)),d&&(0,i.createElement)("span",{className:"wcf-flow-badge wcf-badge wcf-badge--error !text-[10px] !px-2 !py-px wcf-invalid-sequence-badge"},(0,i.createElement)(Rh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"}),(0,D.__)("Invalid Position","cartflows"))),(0,i.createElement)("div",{className:"wcf-node-step--title text-left"},(0,i.createElement)("span",{className:"font-semibold text-sm text-gray-800 hover:text-gray-800"},E)))),function(){let e=null;return u||(e=(0,i.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-no-product-badge"},(0,D.__)("No Product Assigned","cartflows"))),e}(),y&&(0,i.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,D.__)("Store Checkout - Remove selected checkout product","cartflows")),f&&(0,i.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-disabled-step-badge"},(0,D.__)("Disabled","cartflows")),p&&p.length>0&&(0,i.createElement)("div",{className:"wcf-node-warnings flex flex-wrap gap-1"},p.slice(0,2).map((e,t)=>(0,i.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,i.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,i.createElement)("div",{className:"wcf-custom-node-content--stats flex text-center justify-around items-center py-4 px-5"},(0,i.createElement)("div",{className:"wcf-step--stats-content--stat-view"},(0,i.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,D.__)("Views","cartflows")),(0,i.createElement)("div",{className:"font-semibold text-base text-gray-800"},v())),(0,i.createElement)("div",{className:"wcf-step--stats-content--stat-conversation"},(0,i.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,D.__)("Conversions","cartflows")),(0,i.createElement)("div",{className:"font-semibold text-base text-gray-800"},"thankyou"!==_?x():"-")),(0,i.createElement)("div",{className:"wcf-step--stats-content--stat-revenue"},(0,i.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,D.__)("Revenue","cartflows")),(0,i.createElement)("div",{className:"font-semibold text-base text-gray-800"},"thankyou"!==_&&"landing"!==_?N():"-"))),m&&(0,i.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,i.createElement)("span",{className:"tabular-nums"},(0,i.createElement)("span",{className:"font-semibold text-gray-800"},v())," ",(0,i.createElement)("span",{className:"text-gray-400"},(0,D.__)("views","cartflows"))),"thankyou"!==_&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"text-gray-300"},"·"),(0,i.createElement)("span",{className:"tabular-nums"},(0,i.createElement)("span",{className:"font-semibold text-gray-800"},x())," ",(0,i.createElement)("span",{className:"text-gray-400"},(0,D.__)("conv.","cartflows")))),"thankyou"!==_&&"landing"!==_&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"text-gray-300"},"·"),(0,i.createElement)("span",{className:"font-semibold text-gray-800 tabular-nums"},N()))),"checkout"===_&&Array.isArray(h)&&h.length>0&&(0,i.createElement)(gR,{stepId:e?.step_id,flowId:e?.flow_id,flowType:e?.flow_type,bumps:h,compact:m}),(0,i.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,i.createElement)(Zo,{content:(0,D.__)("View Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:n,target:"_blank",rel:"noreferrer","aria-label":(0,D.__)("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,i.createElement)(dR,{className:"w-5 h-5"}))),(0,i.createElement)(Zo,{content:b?dm():(0,D.__)("Edit Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:b?"#!":r,target:b?void 0:"_blank",rel:"noreferrer","aria-label":(0,D.__)("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,i.createElement)(uR,{className:"w-5 h-5"}))),(0,i.createElement)(Zo,{content:(0,D.__)("Edit Settings","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)(I,{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,D.__)("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,i.createElement)(fR,{className:"w-5 h-5"}))),(o?Object.keys(o):[]).map(t=>{const n=o[t],r=n?.class;let a=!1,c=!1;if((!wcfCartflowsPro()&&n?.pro||"abtest"===n?.slug&&!wcfCartflowsTypePro())&&(a=!0),wcfCartflowsPro()&&n?.pro&&"Activated"!==l&&(c=!0),"automation"===n?.slug&&"downsell"!==_&&"upsell"!==_&&"checkout"!==_)return null;const d=a||c,u=d?"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 a?f=(0,D.sprintf)( |
| 48 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 49 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 50 |
(0,D.__)("Upgrade to CartFlows Pro to use %s.","cartflows"),n?.text):c&&(f=(0,D.sprintf)( |
| 51 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 52 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 53 |
(0,D.__)("Activate your CartFlows license to use %s.","cartflows"),n?.text)),(0,i.createElement)(Zo,{key:n?.slug,content:f,placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:n?.link,className:`wcf-step__action-btn relative p-2 inline-flex items-center justify-center rounded-md ${r} ${u}`,"aria-label":n?.text,"data-id":e?.step_id,"data-control-id":e?.step_id,onClick:e=>{a||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,i.createElement)(oR,{className:"h-5 w-5"});break;case"delete":t=(0,i.createElement)(zo,{className:"h-5 w-5"});break;case"abtest":t=(0,i.createElement)(aR,{className:"h-5 w-5"});break;case"archived":t=(0,i.createElement)(iR,{className:"h-5 w-5"});break;case"winner":t=(0,i.createElement)(sR,{className:"h-5 w-5"});break;case"automation":t=(0,i.createElement)(lR,{className:"h-5 w-5"});break;default:t=(0,i.createElement)(cR,{className:"h-5 w-5"})}return t}(n?.slug),d&&(0,i.createElement)($h,{className:"absolute -top-1 -right-1 w-4 h-4 text-brand-600 fill-brand-600","aria-label":(0,D.__)("Pro feature","cartflows")})))})))));var M}},yR=wR,bR=(0,s.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o=r?"target":"source",a=r?"source":"target",[,l]=(0,s.useState)(!1),c=zh(),d=(0,qh.W6)(),[{license_status:f}]=u(),p=yR.createEventHandlers(e,c,d,l);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:o,position:GA.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,i.createElement)(rz,{type:"target",position:GA.Top,id:"top",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t&&n}),yR.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},GP,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,p,f,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,void 0,void 0,e.is_locked),(0,i.createElement)("div",{className:"wcf-custom-node-label",title:e.label},e?.label),(0,i.createElement)(rz,{type:a,position:GA.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,i.createElement)(rz,{type:"source",position:GA.Bottom,id:"bottom",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-bottom",isConnectable:t&&n}))}),vR="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFQUVBRUEiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOEgwVjEwWiIgZmlsbD0iI0U2RUFFRCIvPjxyZWN0IHg9IjY0IiB5PSIxMCIgd2lkdGg9IjEwNyIgaGVpZ2h0PSI3IiByeD0iMSIgZmlsbD0iI2ZmZiIvPjxjaXJjbGUgY3g9IjE0IiBjeT0iMTQiIHI9IjQiIGZpbGw9IiNGRjNCMzAiLz48Y2lyY2xlIGN4PSIyNyIgY3k9IjE0IiByPSI0IiBmaWxsPSIjRkMwIi8+PGNpcmNsZSBjeD0iNDAiIGN5PSIxNCIgcj0iNCIgZmlsbD0iIzRDRDk2NCIvPjxyZWN0IHg9IjIzIiB5PSIyMTkiIHdpZHRoPSIxNTQiIGhlaWdodD0iMjAiIHJ4PSIyIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTgxLjY4NiAyMzIuNWgxLjM4M3YtMi4xMjJoMS4xNjRjMS41MDUgMCAyLjM4LS44OTggMi4zOC0yLjIwNSAwLTEuMzAxLS44NTktMi4yMTgtMi4zNDUtMi4yMThoLTIuNTgydjYuNTQ1Wm0xLjM4My0zLjIzMXYtMi4xODNoLjkzNGMuNzk5IDAgMS4xODUuNDM1IDEuMTg1IDEuMDg3IDAgLjY0OC0uMzg2IDEuMDk2LTEuMTc5IDEuMDk2aC0uOTRabTUuNjg2IDMuMzI0Yy43MjYgMCAxLjE5Ni0uMzE3IDEuNDM1LS43NzRoLjAzOXYuNjgxaDEuMjl2LTMuMzExYzAtMS4xNy0uOTktMS42NjItMi4wODMtMS42NjItMS4xNzYgMC0xLjk1LjU2Mi0yLjEzOCAxLjQ1N2wxLjI1OS4xMDNjLjA5My0uMzI2LjM4NC0uNTY2Ljg3My0uNTY2LjQ2MyAwIC43MjguMjMzLjcyOC42MzZ2LjAxOWMwIC4zMTctLjMzNS4zNTgtMS4xODkuNDQxLS45NzEuMDktMS44NDQuNDE2LTEuODQ0IDEuNTEyIDAgLjk3MS42OTQgMS40NjQgMS42MyAxLjQ2NFptLjM5LS45NGMtLjQxOSAwLS43MTktLjE5NS0uNzE5LS41NjkgMC0uMzgzLjMxNi0uNTcyLjc5Ni0uNjM5LjI5Ny0uMDQyLjc4My0uMTEyLjk0Ni0uMjIxdi41MjFjMCAuNTE1LS40MjUuOTA4LTEuMDIzLjkwOFptNC4wOTYgMi42ODhjMS4wMTMgMCAxLjU1LS41MTggMS44MjgtMS4zMWwxLjkwOC01LjQzNC0xLjQ0MS0uMDA2LTEuMDI2IDMuNjA1aC0uMDUybC0xLjAxNi0zLjYwNUg5Mi4wMWwxLjc2MSA1LjA1LS4wOC4yMDdjLS4xNzguNDYxLS41Mi40ODMtMSAuMzM2bC0uMzA3IDEuMDE2Yy4xOTUuMDgzLjUxMi4xNDEuODU3LjE0MVptMTIuMDE2LTguMzg2aC0xLjM3N3Y0LjExNmgtLjA1OGwtMi44MjUtNC4xMTZoLTEuMjE1djYuNTQ1aDEuMzg0di00LjEyaC4wNDhsMi44NDggNC4xMmgxLjE5NXYtNi41NDVabTMuMzM2IDYuNjQxYzEuNDg5IDAgMi40MTYtMS4wMiAyLjQxNi0yLjUzMSAwLTEuNTIyLS45MjctMi41MzgtMi40MTYtMi41MzgtMS40ODkgMC0yLjQxNiAxLjAxNi0yLjQxNiAyLjUzOCAwIDEuNTExLjkyNyAyLjUzMSAyLjQxNiAyLjUzMVptLjAwNi0xLjA1NWMtLjY4NyAwLTEuMDM4LS42MjktMS4wMzgtMS40ODYgMC0uODU2LjM1MS0xLjQ4OSAxLjAzOC0xLjQ4OS42NzUgMCAxLjAyNi42MzMgMS4wMjYgMS40ODkgMCAuODU3LS4zNTEgMS40ODYtMS4wMjYgMS40ODZabTQuMTQxLjk1OWgxLjQzOGwuODQ0LTMuMDg3aC4wNmwuODQ0IDMuMDg3aDEuNDQybDEuMzMyLTQuOTA5aC0xLjM3NGwtLjc0OCAzLjI3OWgtLjA0MWwtLjgwNi0zLjI3OWgtMS4zNTJsLS43OTIgMy4yOThoLS4wNDVsLS43NjEtMy4yOThoLTEuMzc3bDEuMzM2IDQuOTA5WiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik0yNC40OTUgMTUxLjMzM2EuNS41IDAgMCAxIC41LS41SDE3NmEuNS41IDAgMCAxIC41LjV2NmEuNS41IDAgMCAxLS41LjVIMjQuOTk1YS41LjUgMCAwIDEtLjUtLjV2LTZaTTI0LjQ5NSAxNjguNjY3YS41LjUgMCAwIDEgLjUtLjVIMTc2YS41LjUgMCAwIDEgLjUuNXY2YS41LjUgMCAwIDEtLjUuNUgyNC45OTVhLjUuNSAwIDAgMS0uNS0uNXYtNlpNMjQuNDk1IDE4NmEuNS41IDAgMCAxIC41LS41SDY4LjI1YS41LjUgMCAwIDEgLjUuNXY2YS41LjUgMCAwIDEtLjUuNUgyNC45OTVhLjUuNSAwIDAgMS0uNS0uNXYtNlpNNzguMzcgMTg2YS41LjUgMCAwIDEgLjUtLjVoNDMuMjU1YS41LjUgMCAwIDEgLjUuNXY2YS41LjUgMCAwIDEtLjUuNUg3OC44N2EuNS41IDAgMCAxLS41LS41di02Wk0xMzIuMjQ1IDE4NmEuNS41IDAgMCAxIC41LS41SDE3NmEuNS41IDAgMCAxIC41LjV2NmEuNS41IDAgMCAxLS41LjVoLTQzLjI1NWEuNS41IDAgMCAxLS41LS41di02WiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjQjdDRkUyIi8+PHJlY3QgeD0iMjMuNSIgeT0iMjAyLjUiIHdpZHRoPSI2IiBoZWlnaHQ9IjYiIHJ4PSIuNSIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjQ0NERUVEIi8+PHJlY3QgeD0iNDMuMzkiIHk9IjIwNCIgd2lkdGg9IjEzMy42MSIgaGVpZ2h0PSIyLjY2NyIgcng9IjEiIGZpbGw9IiNCN0NGRTIiLz48ZyBjbGlwLXBhdGg9InVybCgjYSkiIGZpbGw9IiMyMjcxQjEiIHN0cm9rZT0iI2ZmZiIgc3Ryb2tlLXdpZHRoPSIxLjQiPjxwYXRoIGQ9Im05OS4wMDUgODIuMzY4LjQ5NS40OTYuNDk1LS40OTYgMTIuNDAzLTEyLjQwN2ExLjY0OCAxLjY0OCAwIDAgMSAyLjgxMSAxLjE2NGMwIC40MzctLjE3My44NTYtLjQ4MiAxLjE2NGwtMTQuMDYzIDE0LjA2M2ExLjY0MyAxLjY0MyAwIDAgMS0yLjMyOCAwbC03LjAzMi03LjAzMWExLjY0OSAxLjY0OSAwIDAgMSAwLTIuMzMgMS42NDQgMS42NDQgMCAwIDEgMi4zMyAwbDUuMzcgNS4zNzdaIi8+PHBhdGggZD0ibTcwLjIyNiA1Mi4yMDYtLjEzMi0uNTMxaC01Ljc1YTEuNjQ0IDEuNjQ0IDAgMCAxIDAtMy4yODdINzEuMzc1YTEuNjQzIDEuNjQzIDAgMCAxIDEuNTk0IDEuMjQ1bDEuODk5IDcuNi4xMzIuNTNIMTI5Ljk2OGExLjY0MyAxLjY0MyAwIDAgMSAxLjYxNCAxLjk0NmwtNy4wMzEgMzcuNWExLjY0NSAxLjY0NSAwIDAgMS0xLjYxNCAxLjM0MUg4MC43NTFhMS42NDQgMS42NDQgMCAwIDEtMS42MTUtMS4zNDFsLTcuMDIxLTM3LjQzLS4wMDQtLjAyLS4wMDUtLjAyLTEuODgtNy41MzNabTExLjc4MSA0Mi40ODYuMTA3LjU3aDM5LjQ1OWwuMTA3LS41NyA2LjE1NS0zMi44MTMuMTU1LS44MjlINzUuNjk3bC4xNTYuODI5IDYuMTU0IDMyLjgxM1ptLTIuNzA0IDcuNzk5YTguNjc1IDguNjc1IDAgMSAxIDEyLjI2OSAxMi4yNjcgOC42NzUgOC42NzUgMCAwIDEtMTIuMjY5LTEyLjI2N1ptMzIuODEzIDBhOC42NzQgOC42NzQgMCAxIDEgMTIuMjY4IDEyLjI2NiA4LjY3NCA4LjY3NCAwIDAgMS0xMi4yNjgtMTIuMjY2Wm0tMjIuODY5IDkuOTQ0YTUuMzkgNS4zOSAwIDAgMC0zLjgxLTkuMTk4IDUuMzg5IDUuMzg5IDAgMCAwLTMuODA5IDkuMTk4IDUuMzg4IDUuMzg4IDAgMCAwIDcuNjE5IDBabTMyLjgxMyAwYTUuMzkgNS4zOSAwIDAgMC0zLjgxLTkuMTk4IDUuMzkxIDUuMzkxIDAgMCAwLTUuMzg4IDUuMzg4IDUuMzkgNS4zOSAwIDAgMCA5LjE5OCAzLjgxWiIvPjwvZz48cmVjdCB4PSI1MCIgeT0iMTMzIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjMjI3MUIxIi8+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2MiA0MykiIGQ9Ik0wIDBoNzV2NzVIMHoiLz48L2NsaXBQYXRoPjwvZGVmcz48L3N2Zz4=",xR=(0,s.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o=r?"target":"source",a=r?"source":"target",[,l]=(0,s.useState)(!1),c=zh(),d=(0,qh.W6)(),[{license_status:f}]=u(),[{is_flow_instant_checkout:p}]=Zp(),m=yR.createEventHandlers(e,c,d,l);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:o,position:GA.Left,id:"left",style:{background:"#555",visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-left",isConnectable:t&&!n}),(0,i.createElement)(rz,{type:"target",position:GA.Top,id:"top",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t&&n}),yR.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},vR,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,m,f,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,e.bumps,p,e.is_locked,e.has_store_checkout_product_warning),(0,i.createElement)("div",{className:"wcf-custom-node-label"},e?.label),(0,i.createElement)(rz,{type:a,position:GA.Right,id:"right",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-right",isConnectable:t&&!n}),(0,i.createElement)(rz,{type:"source",position:GA.Bottom,id:"bottom",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-bottom",isConnectable:t&&n}))}),NR="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFRkVGRUYiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOC4xNDdIMFYxMFoiIGZpbGw9IiNFNkVBRUQiLz48ZWxsaXBzZSBjeD0iMTQiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGRjNCMzAiLz48ZWxsaXBzZSBjeD0iMjciIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGQzAiLz48ZWxsaXBzZSBjeD0iNDAiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiM0Q0Q5NjQiLz48cmVjdCB4PSI2NCIgeT0iMTEiIHdpZHRoPSIxMDciIGhlaWdodD0iNyIgcng9IjEiIGZpbGw9IiNmZmYiLz48Y2lyY2xlIGN4PSI5OS44NTIiIGN5PSI5Mi4xMDEiIHI9IjM4LjM1MiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMjI3MUIxIiBzdHJva2UtbWl0ZXJsaW1pdD0iMS44NjIiIHN0cm9rZS1kYXNoYXJyYXk9IjIgMyIvPjxjaXJjbGUgY3g9Ijk5Ljg1MiIgY3k9IjkyLjEwMSIgcj0iMzEuNTQzIiBmaWxsPSIjRjZGQUZGIi8+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBkPSJNMTE0LjUgNjMuMzQ3djEyLjEzYTEuNjUgMS42NSAwIDEgMCAzLjMwMiAwdi0xMi4xM2w0LjA4OCA0LjA4OWExLjY1MiAxLjY1MiAwIDEgMCAyLjMzNy0yLjMzN2wtNi45MDctNi45MDdhMS42NDEgMS42NDEgMCAwIDAtMS4xNjktLjQ4NSAxLjY0NCAxLjY0NCAwIDAgMC0xLjE2OC40ODVoLS4wMDFsLTYuOTA2IDYuOTA3YTEuNjUyIDEuNjUyIDAgMSAwIDIuMzM3IDIuMzM3bDQuMDg3LTQuMDlabTE0LjMyMi04LjU5OWExNy45MiAxNy45MiAwIDEgMS0yNS4zNDMgMjUuMzQxIDE3LjkyIDE3LjkyIDAgMCAxIDI1LjM0My0yNS4zNFoiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzIyNzFCMSIvPjwvZz48ZyBjbGlwLXBhdGg9InVybCgjYikiPjxwYXRoIGQ9Ik02OC42NzUgMTE2LjAyOWEyLjUxIDIuNTEgMCAwIDEgMi41MDgtMi41MDlINzYuMmEyLjUxIDIuNTEgMCAwIDEgMi41MDkgMi41MDl2Ny41MjZhMi41MSAyLjUxIDAgMCAxLTIuNTA5IDIuNTA4aC01LjAxN2EyLjUxIDIuNTEgMCAwIDEtMi41MDgtMi41MDh2LTcuNTI2Wm0xMi41NDMtMTAuMDM0YTIuNTA3IDIuNTA3IDAgMCAxIDIuNTA4LTIuNTA5aDUuMDE3YTIuNTA3IDIuNTA3IDAgMCAxIDIuNTA5IDIuNTA5djE3LjU2YTIuNTEgMi41MSAwIDAgMS0yLjUwOSAyLjUwOGgtNS4wMTdhMi41MSAyLjUxIDAgMCAxLTIuNTA4LTIuNTA4di0xNy41NlpNOTMuNzYgOTMuNDUyYTIuNTA5IDIuNTA5IDAgMCAxIDIuNTA5LTIuNTA5aDUuMDE3YTIuNTEgMi41MSAwIDAgMSAyLjUwOSAyLjUwOXYzMC4xMDNhMi41MTIgMi41MTIgMCAwIDEtMi41MDkgMi41MDhoLTUuMDE3YTIuNTEgMi41MSAwIDAgMS0yLjUwOS0yLjUwOFY5My40NTJaIiBmaWxsPSIjMjI3MUIxIi8+PC9nPjxyZWN0IHg9Ijg4LjQ5NyIgeT0iMTA5Ljc2NSIgd2lkdGg9IjI1LjIzNSIgaGVpZ2h0PSIyNS4yMzUiIHJ4PSIxMi42MTciIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTAxLjExNCAxMTEuODY4YTEwLjUxNyAxMC41MTcgMCAwIDAtOS43MTQgNi40OTEgMTAuNTEzIDEwLjUxMyAwIDEgMCA5LjcxNC02LjQ5MVptMCAxOC45MjZhOC40MTMgOC40MTMgMCAwIDEtNy43NzEtNS4xOTIgOC40MTEgOC40MTEgMCAxIDEgNy43NzEgNS4xOTJaIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTEwMS4xMTQgMTIxLjMzMWMtMi4xMDMgMC0yLjEwMy0uNjYyLTIuMTAzLTEuMDUxIDAtLjM4OS43MzYtMS4wNTIgMi4xMDMtMS4wNTIgMS4zNjcgMCAxLjQ2MS42NzMgMS40NzIgMS4wNTJoMi4xMDNhMy4xNSAzLjE1IDAgMCAwLTIuNTI0LTMuMDI4di0xLjE3OGgtMi4xMDJ2MS4xNDZjLTIuMTAzLjM0Ny0zLjE1NSAxLjcwMy0zLjE1NSAzLjA2IDAgMS4xNzcuNTQ3IDMuMTU0IDQuMjA2IDMuMTU0IDIuMTAzIDAgMi4xMDMuNzE1IDIuMTAzIDEuMDUyIDAgLjMzNi0uNjUyIDEuMDUxLTIuMTAzIDEuMDUxLTEuOTM1IDAtMi4xMDMtLjkwNC0yLjEwMy0xLjA1MWgtMi4xMDNjMCAuOTY3LjY5NCAyLjY4MSAzLjE1NSAzLjA3djEuMTM1aDIuMTAydi0xLjEzNWMyLjEwMy0uMzU4IDMuMTU1LTEuNzE0IDMuMTU1LTMuMDcgMC0xLjE3OC0uNTQ3LTMuMTU1LTQuMjA2LTMuMTU1WiIgZmlsbD0iIzIyNzFCMSIvPjxyZWN0IHg9IjUwIiB5PSIxNTAiIHdpZHRoPSIxMDAiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiMyMjcxQjEiLz48cmVjdCB4PSIyMyIgeT0iMTY0IiB3aWR0aD0iMTU0IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRUFFQUVBIi8+PHJlY3QgeD0iNzAiIHk9IjE3OCIgd2lkdGg9IjYwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRUFFQUVBIi8+PHJlY3QgeD0iMjMiIHk9IjE5NyIgd2lkdGg9IjE1NCIgaGVpZ2h0PSIyMCIgcng9IjIiIGZpbGw9IiMyMjcxQjEiLz48cGF0aCBkPSJtNzMuNCAyMTAuNS40ODYtMS40OTNoMi4zNjJsLjQ4NiAxLjQ5M2gxLjQ4M2wtMi4yNTYtNi41NDVoLTEuNzg0bC0yLjI2IDYuNTQ1aDEuNDg0Wm0uODM4LTIuNTczLjgwNS0yLjQ3N2guMDUybC44MDUgMi40NzdoLTEuNjYyWm02LjczIDIuNjY5YzEuMzA4IDAgMi4xMy0uNzY3IDIuMTkzLTEuODk1aC0xLjI4NGMtLjA4LjUyNC0uNDI1LjgxOC0uODkyLjgxOC0uNjM2IDAtMS4wNDgtLjUzNC0xLjA0OC0xLjQ3NCAwLS45MjYuNDE1LTEuNDU3IDEuMDQ4LTEuNDU3LjQ5OCAwIC44MTguMzI5Ljg5Mi44MThoMS4yODRjLS4wNTctMS4xMzQtLjkxNy0xLjg3OS0yLjE5OC0xLjg3OS0xLjQ5IDAtMi40MSAxLjAzMi0yLjQxIDIuNTM4IDAgMS40OTIuOTA0IDIuNTMxIDIuNDE2IDIuNTMxWm01LjI4MyAwYzEuMzA3IDAgMi4xMjktLjc2NyAyLjE5My0xLjg5NWgtMS4yODVjLS4wOC41MjQtLjQyNS44MTgtLjg5Mi44MTgtLjYzNiAwLTEuMDQ4LS41MzQtMS4wNDgtMS40NzQgMC0uOTI2LjQxNS0xLjQ1NyAxLjA0OC0xLjQ1Ny40OTkgMCAuODE4LjMyOS44OTIuODE4aDEuMjg1Yy0uMDU4LTEuMTM0LS45MTgtMS44NzktMi4yLTEuODc5LTEuNDg5IDAtMi40MSAxLjAzMi0yLjQxIDIuNTM4IDAgMS40OTIuOTA1IDIuNTMxIDIuNDE3IDIuNTMxWm01LjMwMSAwYzEuMjE1IDAgMi4wMzMtLjU5MSAyLjIyNS0xLjUwMmwtMS4yNi0uMDgzYy0uMTM3LjM3NC0uNDg4LjU2OS0uOTQyLjU2OS0uNjggMC0xLjExMi0uNDUxLTEuMTEyLTEuMTgzdi0uMDAzaDMuMzQzdi0uMzc0YzAtMS42NjgtMS4wMS0yLjQ5My0yLjMwOC0yLjQ5My0xLjQ0NCAwLTIuMzggMS4wMjYtMi4zOCAyLjU0MSAwIDEuNTU2LjkyMyAyLjUyOCAyLjQzNCAyLjUyOFptLTEuMDktMy4wNDZhMS4wMzcgMS4wMzcgMCAwIDEgMS4wNTktMS4wMDdjLjU5IDAgMSAuNDIyIDEuMDAzIDEuMDA3aC0yLjA2MVptNC4yMzIgNC43OTFoMS4zNjJ2LTIuNjI3aC4wNDFjLjE4OS40MDkuNjAxLjg2NiAxLjM5NC44NjYgMS4xMTggMCAxLjk5LS44ODUgMS45OS0yLjUyOCAwLTEuNjg4LS45MS0yLjUyNS0xLjk4Ny0yLjUyNS0uODIyIDAtMS4yMTUuNDg5LTEuMzk3Ljg4OGgtLjA2di0uODI0aC0xLjM0M3Y2Ljc1Wm0xLjMzMy00LjI5NmMwLS44NzUuMzctMS40MzUgMS4wMzItMS40MzUuNjc1IDAgMS4wMzMuNTg1IDEuMDMzIDEuNDM1IDAgLjg1Ny0uMzY1IDEuNDUxLTEuMDMzIDEuNDUxLS42NTUgMC0xLjAzMi0uNTc1LTEuMDMyLTEuNDUxWm02Ljk3NC0yLjQ1NGgtLjkyNHYtMS4xNzZoLTEuMzYxdjEuMTc2aC0uNjcydjEuMDIzaC42NzJ2Mi41NTZjLS4wMDcuOTYyLjY0OCAxLjQzOSAxLjYzNiAxLjM5Ny4zNTEtLjAxMy42MDEtLjA4My43MzgtLjEyOGwtLjIxNC0xLjAxM2MtLjA2Ny4wMTMtLjIxMS4wNDUtLjMzOS4wNDUtLjI3MSAwLS40Ni0uMTAyLS40Ni0uNDh2LTIuMzc3aC45MjR2LTEuMDIzWm05LjAxIDEuNjM2YzAtMi4xNDEtMS4zMjktMy4zNjItMy4wNjUtMy4zNjItMS43NDUgMC0zLjA2NSAxLjIyMS0zLjA2NSAzLjM2MiAwIDIuMTMyIDEuMzIgMy4zNjIgMy4wNjUgMy4zNjIgMS43MzYgMCAzLjA2NS0xLjIyIDMuMDY1LTMuMzYyWm0tMS40MDMgMGMwIDEuMzg3LS42NTggMi4xMzgtMS42NjIgMi4xMzgtMS4wMDcgMC0xLjY2Mi0uNzUxLTEuNjYyLTIuMTM4cy42NTUtMi4xMzggMS42NjItMi4xMzhjMS4wMDQgMCAxLjY2Mi43NTEgMS42NjIgMi4xMzhabTUuMDQzLTEuNjM2aC0uOTc1di0uMzI5YzAtLjMzMy4xMzQtLjUyOC41MzMtLjUyOC4xNjMgMCAuMzMuMDM2LjQzOC4wNzFsLjI0LTEuMDIzYTMuNTg5IDMuNTg5IDAgMCAwLS45NjItLjEzNGMtLjkyNCAwLTEuNjExLjUyMS0xLjYxMSAxLjU4OHYuMzU1aC0uNjkzdjEuMDIzaC42OTN2My44ODZoMS4zNjJ2LTMuODg2aC45NzV2LTEuMDIzWm0zLjQ3MSAwaC0uOTc1di0uMzI5YzAtLjMzMy4xMzUtLjUyOC41MzQtLjUyOC4xNjMgMCAuMzI5LjAzNi40MzguMDcxbC4yNC0xLjAyM2EzLjYwMyAzLjYwMyAwIDAgMC0uOTYyLS4xMzRjLS45MjQgMC0xLjYxMS41MjEtMS42MTEgMS41ODh2LjM1NWgtLjY5NHYxLjAyM2guNjk0djMuODg2aDEuMzYxdi0zLjg4NmguOTc1di0xLjAyM1ptMi44OTMgNS4wMDVjMS4yMTUgMCAyLjAzMy0uNTkxIDIuMjI1LTEuNTAybC0xLjI1OS0uMDgzYy0uMTM4LjM3NC0uNDg5LjU2OS0uOTQzLjU2OS0uNjgxIDAtMS4xMTItLjQ1MS0xLjExMi0xLjE4M3YtLjAwM2gzLjM0M3YtLjM3NGMwLTEuNjY4LTEuMDEtMi40OTMtMi4zMDgtMi40OTMtMS40NDUgMC0yLjM4MSAxLjAyNi0yLjM4MSAyLjU0MSAwIDEuNTU2LjkyNCAyLjUyOCAyLjQzNSAyLjUyOFptLTEuMDg5LTMuMDQ2YTEuMDM2IDEuMDM2IDAgMCAxIDEuMDU3LTEuMDA3Yy41OTIgMCAxLjAwMS40MjIgMS4wMDQgMS4wMDdoLTIuMDYxWm00LjIzMSAyLjk1aDEuMzYydi0yLjc3N2MwLS42MDQuNDQxLTEuMDIgMS4wNDItMS4wMi4xODggMCAuNDQ3LjAzMi41NzUuMDc0di0xLjIwOGEyLjAzMyAyLjAzMyAwIDAgMC0uNDI4LS4wNDhjLS41NSAwLTEuMDAxLjMxOS0xLjE4LjkyNmgtLjA1MXYtLjg1NmgtMS4zMnY0LjkwOVoiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNNzkuOTIxIDIzMy41aDEuMDc2di0xLjgwNWguNzg2bC45NjQgMS44MDVoMS4xODlsLTEuMDgyLTEuOTc5Yy41OC0uMjQ4LjktLjc1My45LTEuNDQ5IDAtMS4wMTItLjY2OS0xLjY2My0xLjgyNS0xLjY2M2gtMi4wMDh2NS4wOTFabTEuMDc2LTIuNjd2LTEuNTQxaC43MjZjLjYyMiAwIC45MjIuMjc2LjkyMi43ODMgMCAuNTA1LS4zLjc1OC0uOTE3Ljc1OGgtLjczWm01LjE3NiAyLjc0NWMuOTQ1IDAgMS41ODEtLjQ2IDEuNzMtMS4xNjlsLS45NzktLjA2NGMtLjEwNy4yOS0uMzguNDQyLS43MzMuNDQyLS41MyAwLS44NjUtLjM1LS44NjUtLjkydi0uMDAyaDIuNnYtLjI5MWMwLTEuMjk4LS43ODYtMS45MzktMS43OTUtMS45MzktMS4xMjQgMC0xLjg1Mi43OTgtMS44NTIgMS45NzYgMCAxLjIxMS43MTkgMS45NjcgMS44OTQgMS45NjdabS0uODQ3LTIuMzY5YS44MDYuODA2IDAgMCAxIC44MjMtLjc4M2MuNDYgMCAuNzc4LjMyOC43OC43ODNoLTEuNjAzWm0zLjI5LTEuNTI0djMuOTljMCAuMjg4LS4xMi40MzItLjQ2MS40MzItLjA0NSAwLS4wODUgMC0uMTQtLjAwNXYuODI4Yy4wNzcuMDAyLjE0LjAwNS4yMTQuMDA1LjkgMCAxLjQ0Ny0uMzU4IDEuNDQ3LTEuMjQzdi00LjAwN2gtMS4wNlptLjUyOC0uNDkyYy4zMTYgMCAuNTc0LS4yNDEuNTc0LS41MzcgMC0uMjk0LS4yNTgtLjUzNS0uNTc0LS41MzUtLjMxMyAwLS41NzIuMjQxLS41NzIuNTM1IDAgLjI5Ni4yNTkuNTM3LjU3Mi41MzdabTMuMTIgNC4zODVjLjk0NSAwIDEuNTgxLS40NiAxLjczLTEuMTY5bC0uOTgtLjA2NGMtLjEwNi4yOS0uMzguNDQyLS43MzIuNDQyLS41MyAwLS44NjUtLjM1LS44NjUtLjkydi0uMDAyaDIuNnYtLjI5MWMwLTEuMjk4LS43ODYtMS45MzktMS43OTUtMS45MzktMS4xMjQgMC0xLjg1Mi43OTgtMS44NTIgMS45NzYgMCAxLjIxMS43MTggMS45NjcgMS44OTQgMS45NjdabS0uODQ3LTIuMzY5YS44MDYuODA2IDAgMCAxIC44MjItLjc4M2MuNDYgMCAuNzc4LjMyOC43OC43ODNoLTEuNjAzWm01LjAxNiAyLjM2OWMxLjAxNyAwIDEuNjU1LS41OTcgMS43MDUtMS40NzVoLTFjLS4wNjEuNDA4LS4zMy42MzctLjY5My42MzctLjQ5NCAwLS44MTUtLjQxNS0uODE1LTEuMTQ2IDAtLjcyMS4zMjMtMS4xMzQuODE1LTEuMTM0LjM4OCAwIC42MzcuMjU2LjY5NC42MzdoMWMtLjA0Ni0uODgzLS43MTQtMS40NjItMS43MTEtMS40NjItMS4xNTkgMC0xLjg3NC44MDMtMS44NzQgMS45NzQgMCAxLjE2MS43MDMgMS45NjkgMS44NzkgMS45NjlabTQuNDE0LTMuODkzaC0uNzE4di0uOTE1aC0xLjA2di45MTVoLS41MjF2Ljc5NWguNTIydjEuOTg5Yy0uMDA1Ljc0OC41MDQgMS4xMTkgMS4yNzIgMS4wODYuMjc0LS4wMS40NjgtLjA2NC41NzUtLjA5OWwtLjE2Ny0uNzg4Yy0uMDUyLjAxLS4xNjQuMDM1LS4yNjMuMDM1LS4yMTIgMC0uMzU4LS4wOC0uMzU4LS4zNzN2LTEuODVoLjcxOHYtLjc5NVptNy4wMDggMS4yNzNjMC0xLjY2Ni0xLjAzNC0yLjYxNi0yLjM4NC0yLjYxNi0xLjM1NyAwLTIuMzg0Ljk1LTIuMzg0IDIuNjE2IDAgMS42NTggMS4wMjcgMi42MTUgMi4zODQgMi42MTUgMS4zNSAwIDIuMzg0LS45NSAyLjM4NC0yLjYxNVptLTEuMDkxIDBjMCAxLjA3OC0uNTEyIDEuNjYzLTEuMjkzIDEuNjYzLS43ODMgMC0xLjI5Mi0uNTg1LTEuMjkyLTEuNjYzIDAtMS4wNzkuNTA5LTEuNjYzIDEuMjkyLTEuNjYzLjc4MSAwIDEuMjkzLjU4NCAxLjI5MyAxLjY2M1ptMy45MjItMS4yNzNoLS43NTh2LS4yNTZjMC0uMjU5LjEwNC0uNDEuNDE1LS40MS4xMjcgMCAuMjU2LjAyNy4zNC4wNTRsLjE4Ny0uNzk1YTIuNzc4IDIuNzc4IDAgMCAwLS43NDgtLjEwNWMtLjcxOSAwLTEuMjUzLjQwNi0xLjI1MyAxLjIzNnYuMjc2aC0uNTR2Ljc5NWguNTR2My4wMjNoMS4wNTl2LTMuMDIzaC43NTh2LS43OTVabTIuNyAwaC0uNzU4di0uMjU2YzAtLjI1OS4xMDQtLjQxLjQxNS0uNDEuMTI3IDAgLjI1Ni4wMjcuMzQxLjA1NGwuMTg2LS43OTVhMi43NzggMi43NzggMCAwIDAtLjc0OC0uMTA1Yy0uNzE5IDAtMS4yNTMuNDA2LTEuMjUzIDEuMjM2di4yNzZoLS41NHYuNzk1aC41NHYzLjAyM2gxLjA1OXYtMy4wMjNoLjc1OHYtLjc5NVptMi4yNSAzLjg5M2MuOTQ1IDAgMS41ODEtLjQ2IDEuNzMtMS4xNjlsLS45NzktLjA2NGMtLjEwNy4yOS0uMzguNDQyLS43MzMuNDQyLS41MyAwLS44NjUtLjM1LS44NjUtLjkydi0uMDAyaDIuNnYtLjI5MWMwLTEuMjk4LS43ODYtMS45MzktMS43OTUtMS45MzktMS4xMjQgMC0xLjg1Mi43OTgtMS44NTIgMS45NzYgMCAxLjIxMS43MTggMS45NjcgMS44OTQgMS45NjdabS0uODQ3LTIuMzY5YS44MDYuODA2IDAgMCAxIC44MjItLjc4M2MuNDYgMCAuNzc4LjMyOC43ODEuNzgzaC0xLjYwM1ptMy4yOTEgMi4yOTRoMS4wNTl2LTIuMTZjMC0uNDcuMzQzLS43OTMuODEtLjc5My4xNDcgMCAuMzQ4LjAyNS40NDguMDU3di0uOTRhMS42MjcgMS42MjcgMCAwIDAtLjMzNC0uMDM3Yy0uNDI3IDAtLjc3OC4yNDktLjkxNy43MjFoLS4wNHYtLjY2NmgtMS4wMjZ2My44MThaIiBmaWxsPSIjQTFBMUExIi8+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSg5Ny43MzMgNDkpIiBkPSJNMCAwaDM2LjgzN3YzNi44MzdIMHoiLz48L2NsaXBQYXRoPjxjbGlwUGF0aCBpZD0iYiI+PHBhdGggZmlsbD0iI2ZmZiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoNjguMzA5IDg5LjU3OCkiIGQ9Ik0wIDBoMzcuODUydjM3Ljg1MkgweiIvPjwvY2xpcFBhdGg+PC9kZWZzPjwvc3ZnPg==",_R="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFRkVGRUYiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOC4xNDdIMFYxMFoiIGZpbGw9IiNFNkVBRUQiLz48ZWxsaXBzZSBjeD0iMTQiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGRjNCMzAiLz48ZWxsaXBzZSBjeD0iMjciIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGQzAiLz48ZWxsaXBzZSBjeD0iNDAiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiM0Q0Q5NjQiLz48cmVjdCB4PSI2NCIgeT0iMTEiIHdpZHRoPSIxMDciIGhlaWdodD0iNyIgcng9IjEiIGZpbGw9IiNmZmYiLz48cmVjdCB4PSI1MCIgeT0iMTUxIiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjMjI3MUIxIi8+PHJlY3QgeD0iMjMiIHk9IjE2NSIgd2lkdGg9IjE1NCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0VBRUFFQSIvPjxyZWN0IHg9IjcwIiB5PSIxNzgiIHdpZHRoPSI2MCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0VBRUFFQSIvPjxyZWN0IHg9IjIzIiB5PSIxOTciIHdpZHRoPSIxNTQiIGhlaWdodD0iMjAiIHJ4PSIyIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0ibTczLjQgMjEwIC40ODYtMS40OTNoMi4zNjJsLjQ4NiAxLjQ5M2gxLjQ4M2wtMi4yNTYtNi41NDVoLTEuNzg0TDcxLjkxNyAyMTBoMS40ODRabS44MzgtMi41NzMuODA1LTIuNDc3aC4wNTJsLjgwNSAyLjQ3N2gtMS42NjJabTYuNzMgMi42NjljMS4zMDggMCAyLjEzLS43NjcgMi4xOTMtMS44OTVoLTEuMjg0Yy0uMDguNTI0LS40MjUuODE4LS44OTIuODE4LS42MzYgMC0xLjA0OC0uNTM0LTEuMDQ4LTEuNDc0IDAtLjkyNi40MTUtMS40NTcgMS4wNDgtMS40NTcuNDk4IDAgLjgxOC4zMjkuODkyLjgxOGgxLjI4NGMtLjA1Ny0xLjEzNC0uOTE3LTEuODc5LTIuMTk4LTEuODc5LTEuNDkgMC0yLjQxIDEuMDMyLTIuNDEgMi41MzggMCAxLjQ5Mi45MDQgMi41MzEgMi40MTYgMi41MzFabTUuMjgzIDBjMS4zMDcgMCAyLjEyOS0uNzY3IDIuMTkzLTEuODk1aC0xLjI4NWMtLjA4LjUyNC0uNDI1LjgxOC0uODkyLjgxOC0uNjM2IDAtMS4wNDgtLjUzNC0xLjA0OC0xLjQ3NCAwLS45MjYuNDE1LTEuNDU3IDEuMDQ4LTEuNDU3LjQ5OSAwIC44MTguMzI5Ljg5Mi44MThoMS4yODVjLS4wNTgtMS4xMzQtLjkxOC0xLjg3OS0yLjItMS44NzktMS40ODkgMC0yLjQxIDEuMDMyLTIuNDEgMi41MzggMCAxLjQ5Mi45MDUgMi41MzEgMi40MTcgMi41MzFabTUuMzAxIDBjMS4yMTUgMCAyLjAzMy0uNTkxIDIuMjI1LTEuNTAybC0xLjI2LS4wODNjLS4xMzcuMzc0LS40ODguNTY5LS45NDIuNTY5LS42OCAwLTEuMTEyLS40NTEtMS4xMTItMS4xODN2LS4wMDNoMy4zNDN2LS4zNzRjMC0xLjY2OC0xLjAxLTIuNDkzLTIuMzA4LTIuNDkzLTEuNDQ0IDAtMi4zOCAxLjAyNi0yLjM4IDIuNTQxIDAgMS41NTYuOTIzIDIuNTI4IDIuNDM0IDIuNTI4Wm0tMS4wOS0zLjA0NmExLjAzNyAxLjAzNyAwIDAgMSAxLjA1OS0xLjAwN2MuNTkgMCAxIC40MjIgMS4wMDMgMS4wMDdoLTIuMDYxWm00LjIzMiA0Ljc5MWgxLjM2MnYtMi42MjdoLjA0MWMuMTg5LjQwOS42MDEuODY2IDEuMzk0Ljg2NiAxLjExOCAwIDEuOTktLjg4NSAxLjk5LTIuNTI4IDAtMS42ODgtLjkxLTIuNTI1LTEuOTg3LTIuNTI1LS44MjIgMC0xLjIxNS40ODktMS4zOTcuODg4aC0uMDZ2LS44MjRoLTEuMzQzdjYuNzVabTEuMzMzLTQuMjk2YzAtLjg3NS4zNy0xLjQzNSAxLjAzMi0xLjQzNS42NzUgMCAxLjAzMy41ODUgMS4wMzMgMS40MzUgMCAuODU3LS4zNjUgMS40NTEtMS4wMzMgMS40NTEtLjY1NSAwLTEuMDMyLS41NzUtMS4wMzItMS40NTFabTYuOTc0LTIuNDU0aC0uOTI0di0xLjE3NmgtMS4zNjF2MS4xNzZoLS42NzJ2MS4wMjNoLjY3MnYyLjU1NmMtLjAwNy45NjIuNjQ4IDEuNDM5IDEuNjM2IDEuMzk3LjM1MS0uMDEzLjYwMS0uMDgzLjczOC0uMTI4bC0uMjE0LTEuMDEzYy0uMDY3LjAxMy0uMjExLjA0NS0uMzM5LjA0NS0uMjcxIDAtLjQ2LS4xMDItLjQ2LS40OHYtMi4zNzdoLjkyNHYtMS4wMjNabTkuMDEgMS42MzZjMC0yLjE0MS0xLjMyOS0zLjM2Mi0zLjA2NS0zLjM2Mi0xLjc0NSAwLTMuMDY1IDEuMjIxLTMuMDY1IDMuMzYyIDAgMi4xMzIgMS4zMiAzLjM2MiAzLjA2NSAzLjM2MiAxLjczNiAwIDMuMDY1LTEuMjIgMy4wNjUtMy4zNjJabS0xLjQwMyAwYzAgMS4zODctLjY1OCAyLjEzOC0xLjY2MiAyLjEzOC0xLjAwNyAwLTEuNjYyLS43NTEtMS42NjItMi4xMzhzLjY1NS0yLjEzOCAxLjY2Mi0yLjEzOGMxLjAwNCAwIDEuNjYyLjc1MSAxLjY2MiAyLjEzOFptNS4wNDMtMS42MzZoLS45NzV2LS4zMjljMC0uMzMzLjEzNC0uNTI4LjUzMy0uNTI4LjE2MyAwIC4zMy4wMzYuNDM4LjA3MWwuMjQtMS4wMjNhMy41ODkgMy41ODkgMCAwIDAtLjk2Mi0uMTM0Yy0uOTI0IDAtMS42MTEuNTIxLTEuNjExIDEuNTg4di4zNTVoLS42OTN2MS4wMjNoLjY5M1YyMTBoMS4zNjJ2LTMuODg2aC45NzV2LTEuMDIzWm0zLjQ3MSAwaC0uOTc1di0uMzI5YzAtLjMzMy4xMzUtLjUyOC41MzQtLjUyOC4xNjMgMCAuMzI5LjAzNi40MzguMDcxbC4yNC0xLjAyM2EzLjYwMyAzLjYwMyAwIDAgMC0uOTYyLS4xMzRjLS45MjQgMC0xLjYxMS41MjEtMS42MTEgMS41ODh2LjM1NWgtLjY5NHYxLjAyM2guNjk0VjIxMGgxLjM2MXYtMy44ODZoLjk3NXYtMS4wMjNabTIuODkzIDUuMDA1YzEuMjE1IDAgMi4wMzMtLjU5MSAyLjIyNS0xLjUwMmwtMS4yNTktLjA4M2MtLjEzOC4zNzQtLjQ4OS41NjktLjk0My41NjktLjY4MSAwLTEuMTEyLS40NTEtMS4xMTItMS4xODN2LS4wMDNoMy4zNDN2LS4zNzRjMC0xLjY2OC0xLjAxLTIuNDkzLTIuMzA4LTIuNDkzLTEuNDQ1IDAtMi4zODEgMS4wMjYtMi4zODEgMi41NDEgMCAxLjU1Ni45MjQgMi41MjggMi40MzUgMi41MjhabS0xLjA4OS0zLjA0NmExLjAzNiAxLjAzNiAwIDAgMSAxLjA1Ny0xLjAwN2MuNTkyIDAgMS4wMDEuNDIyIDEuMDA0IDEuMDA3aC0yLjA2MVptNC4yMzEgMi45NWgxLjM2MnYtMi43NzdjMC0uNjA0LjQ0MS0xLjAyIDEuMDQyLTEuMDIuMTg4IDAgLjQ0Ny4wMzIuNTc1LjA3NHYtMS4yMDhhMi4wMzMgMi4wMzMgMCAwIDAtLjQyOC0uMDQ4Yy0uNTUgMC0xLjAwMS4zMTktMS4xOC45MjZoLS4wNTF2LS44NTZoLTEuMzJWMjEwWiIgZmlsbD0iI2ZmZiIvPjxwYXRoIGQ9Ik03OS45MjEgMjMzLjVoMS4wNzZ2LTEuODA1aC43ODZsLjk2NCAxLjgwNWgxLjE4OWwtMS4wODItMS45NzljLjU4LS4yNDguOS0uNzUzLjktMS40NDkgMC0xLjAxMi0uNjY5LTEuNjYzLTEuODI1LTEuNjYzaC0yLjAwOHY1LjA5MVptMS4wNzYtMi42N3YtMS41NDFoLjcyNmMuNjIyIDAgLjkyMi4yNzYuOTIyLjc4MyAwIC41MDUtLjMuNzU4LS45MTcuNzU4aC0uNzNabTUuMTc2IDIuNzQ1Yy45NDUgMCAxLjU4MS0uNDYgMS43My0xLjE2OWwtLjk3OS0uMDY0Yy0uMTA3LjI5LS4zOC40NDItLjczMy40NDItLjUzIDAtLjg2NS0uMzUtLjg2NS0uOTJ2LS4wMDJoMi42di0uMjkxYzAtMS4yOTgtLjc4Ni0xLjkzOS0xLjc5NS0xLjkzOS0xLjEyNCAwLTEuODUyLjc5OC0xLjg1MiAxLjk3NiAwIDEuMjExLjcxOSAxLjk2NyAxLjg5NCAxLjk2N1ptLS44NDctMi4zNjlhLjgwNi44MDYgMCAwIDEgLjgyMy0uNzgzYy40NiAwIC43NzguMzI4Ljc4Ljc4M2gtMS42MDNabTMuMjktMS41MjR2My45OWMwIC4yODgtLjEyLjQzMi0uNDYxLjQzMi0uMDQ1IDAtLjA4NSAwLS4xNC0uMDA1di44MjhjLjA3Ny4wMDIuMTQuMDA1LjIxNC4wMDUuOSAwIDEuNDQ3LS4zNTggMS40NDctMS4yNDN2LTQuMDA3aC0xLjA2Wm0uNTI4LS40OTJjLjMxNiAwIC41NzQtLjI0MS41NzQtLjUzNyAwLS4yOTQtLjI1OC0uNTM1LS41NzQtLjUzNS0uMzEzIDAtLjU3Mi4yNDEtLjU3Mi41MzUgMCAuMjk2LjI1OS41MzcuNTcyLjUzN1ptMy4xMiA0LjM4NWMuOTQ1IDAgMS41ODEtLjQ2IDEuNzMtMS4xNjlsLS45OC0uMDY0Yy0uMTA2LjI5LS4zOC40NDItLjczMi40NDItLjUzIDAtLjg2NS0uMzUtLjg2NS0uOTJ2LS4wMDJoMi42di0uMjkxYzAtMS4yOTgtLjc4Ni0xLjkzOS0xLjc5NS0xLjkzOS0xLjEyNCAwLTEuODUyLjc5OC0xLjg1MiAxLjk3NiAwIDEuMjExLjcxOCAxLjk2NyAxLjg5NCAxLjk2N1ptLS44NDctMi4zNjlhLjgwNi44MDYgMCAwIDEgLjgyMi0uNzgzYy40NiAwIC43NzguMzI4Ljc4Ljc4M2gtMS42MDNabTUuMDE2IDIuMzY5YzEuMDE3IDAgMS42NTUtLjU5NyAxLjcwNS0xLjQ3NWgtMWMtLjA2MS40MDgtLjMzLjYzNy0uNjkzLjYzNy0uNDk0IDAtLjgxNS0uNDE1LS44MTUtMS4xNDYgMC0uNzIxLjMyMy0xLjEzNC44MTUtMS4xMzQuMzg4IDAgLjYzNy4yNTYuNjk0LjYzN2gxYy0uMDQ2LS44ODMtLjcxNC0xLjQ2Mi0xLjcxMS0xLjQ2Mi0xLjE1OSAwLTEuODc0LjgwMy0xLjg3NCAxLjk3NCAwIDEuMTYxLjcwMyAxLjk2OSAxLjg3OSAxLjk2OVptNC40MTQtMy44OTNoLS43MTh2LS45MTVoLTEuMDZ2LjkxNWgtLjUyMXYuNzk1aC41MjJ2MS45ODljLS4wMDUuNzQ4LjUwNCAxLjExOSAxLjI3MiAxLjA4Ni4yNzQtLjAxLjQ2OC0uMDY0LjU3NS0uMDk5bC0uMTY3LS43ODhjLS4wNTIuMDEtLjE2NC4wMzUtLjI2My4wMzUtLjIxMiAwLS4zNTgtLjA4LS4zNTgtLjM3M3YtMS44NWguNzE4di0uNzk1Wm03LjAwOCAxLjI3M2MwLTEuNjY2LTEuMDM0LTIuNjE2LTIuMzg0LTIuNjE2LTEuMzU3IDAtMi4zODQuOTUtMi4zODQgMi42MTYgMCAxLjY1OCAxLjAyNyAyLjYxNSAyLjM4NCAyLjYxNSAxLjM1IDAgMi4zODQtLjk1IDIuMzg0LTIuNjE1Wm0tMS4wOTEgMGMwIDEuMDc4LS41MTIgMS42NjMtMS4yOTMgMS42NjMtLjc4MyAwLTEuMjkyLS41ODUtMS4yOTItMS42NjMgMC0xLjA3OS41MDktMS42NjMgMS4yOTItMS42NjMuNzgxIDAgMS4yOTMuNTg0IDEuMjkzIDEuNjYzWm0zLjkyMi0xLjI3M2gtLjc1OHYtLjI1NmMwLS4yNTkuMTA0LS40MS40MTUtLjQxLjEyNyAwIC4yNTYuMDI3LjM0LjA1NGwuMTg3LS43OTVhMi43NzggMi43NzggMCAwIDAtLjc0OC0uMTA1Yy0uNzE5IDAtMS4yNTMuNDA2LTEuMjUzIDEuMjM2di4yNzZoLS41NHYuNzk1aC41NHYzLjAyM2gxLjA1OXYtMy4wMjNoLjc1OHYtLjc5NVptMi43IDBoLS43NTh2LS4yNTZjMC0uMjU5LjEwNC0uNDEuNDE1LS40MS4xMjcgMCAuMjU2LjAyNy4zNDEuMDU0bC4xODYtLjc5NWEyLjc3OCAyLjc3OCAwIDAgMC0uNzQ4LS4xMDVjLS43MTkgMC0xLjI1My40MDYtMS4yNTMgMS4yMzZ2LjI3NmgtLjU0di43OTVoLjU0djMuMDIzaDEuMDU5di0zLjAyM2guNzU4di0uNzk1Wm0yLjI1IDMuODkzYy45NDUgMCAxLjU4MS0uNDYgMS43My0xLjE2OWwtLjk3OS0uMDY0Yy0uMTA3LjI5LS4zOC40NDItLjczMy40NDItLjUzIDAtLjg2NS0uMzUtLjg2NS0uOTJ2LS4wMDJoMi42di0uMjkxYzAtMS4yOTgtLjc4Ni0xLjkzOS0xLjc5NS0xLjkzOS0xLjEyNCAwLTEuODUyLjc5OC0xLjg1MiAxLjk3NiAwIDEuMjExLjcxOCAxLjk2NyAxLjg5NCAxLjk2N1ptLS44NDctMi4zNjlhLjgwNi44MDYgMCAwIDEgLjgyMi0uNzgzYy40NiAwIC43NzguMzI4Ljc4MS43ODNoLTEuNjAzWm0zLjI5MSAyLjI5NGgxLjA1OXYtMi4xNmMwLS40Ny4zNDMtLjc5My44MS0uNzkzLjE0NyAwIC4zNDguMDI1LjQ0OC4wNTd2LS45NGExLjYyNyAxLjYyNyAwIDAgMC0uMzM0LS4wMzdjLS40MjcgMC0uNzc4LjI0OS0uOTE3LjcyMWgtLjA0di0uNjY2aC0xLjAyNnYzLjgxOFoiIGZpbGw9IiNBMUExQTEiLz48Y2lyY2xlIGN4PSIxMDQuNTQyIiBjeT0iOTAuNTk1IiByPSIzOC43ODYiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzIyNzFCMSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEuODYyIiBzdHJva2UtZGFzaGFycmF5PSIyIDMiLz48Y2lyY2xlIGN4PSIxMDQuNTQxIiBjeT0iOTAuNTk1IiByPSIzMS45MDUiIGZpbGw9IiNGNkZBRkYiLz48ZyBjbGlwLXBhdGg9InVybCgjYSkiPjxwYXRoIGQ9Im0xMjcuMjU1IDY1LjQ3NC0zLjgwMiAzLjgwNFY1Ny40OGExLjg2MyAxLjg2MyAwIDAgMC0zLjE4Mi0xLjMxOGMtLjM1LjM1LS41NDcuODIzLS41NDcgMS4zMTh2MTEuOGwtMy44MDItMy44MDVhMS44NjUgMS44NjUgMCAxIDAtMi42MzkgMi42MzlsNi45ODYgNi45ODVhMS44NjUgMS44NjUgMCAwIDAgMi42NCAwbDYuOTg1LTYuOTg1YTEuODY2IDEuODY2IDAgMSAwLTIuNjM5LTIuNjM5Wm0xMi4yNjMuMTU1YTE3LjkzIDE3LjkzIDAgMCAxLTM1Ljg1OSAwIDE3LjkyNyAxNy45MjcgMCAwIDEgMTcuOTMtMTcuOTI5IDE3LjkzIDE3LjkzIDAgMCAxIDE3LjkyOSAxNy45M1oiIGZpbGw9IiNmZmYiIHN0cm9rZT0iIzIyNzFCMSIgc3Ryb2tlLXdpZHRoPSIxLjQiLz48L2c+PHBhdGggZD0iTTEwNy4xNDUgMTEyLjA2NnYuMDAxYzAgLjk2Ni4zODQgMS44OTMgMS4wNjggMi41NzdsMjAuMjY1IDIwLjI2NWEzLjY0NiAzLjY0NiAwIDAgMCA1LjE1NCAwbDEzLjI3Ny0xMy4yNzdhMy42NDYgMy42NDYgMCAwIDAgMC01LjE1NGwtMjAuMjY1LTIwLjI2NWEzLjY0NyAzLjY0NyAwIDAgMC0yLjU3Ny0xLjA2OEgxMTAuNzlhMy42NDIgMy42NDIgMCAwIDAtMy42NDUgMy42NDV2MTMuMjc2Wm0xNC40NzUtNi4wMzhhMy41OTIgMy41OTIgMCAxIDEtNy4xODUgMCAzLjU5MiAzLjU5MiAwIDAgMSA3LjE4NSAwWiIgZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjMjI3MUIxIiBzdHJva2Utd2lkdGg9IjEuNSIvPjxyZWN0IHg9IjU1IiB5PSI4OC41MjciIHdpZHRoPSIzNi4zODkiIGhlaWdodD0iMzYuMzg5IiByeD0iMTguMTk0IiBmaWxsPSIjZmZmIi8+PHBhdGggZD0iTTczLjE5NCA5MS41NmExNS4xNjIgMTUuMTYyIDAgMSAwIDAgMzAuMzI0IDE1LjE2MiAxNS4xNjIgMCAwIDAgMC0zMC4zMjRabTAgMjcuMjkxYTEyLjEyOCAxMi4xMjggMCAwIDEtOC41NzctMjAuNzA2IDEyLjEzIDEyLjEzIDAgMSAxIDguNTc3IDIwLjcwNloiIGZpbGw9IiMyMjcxQjEiLz48cGF0aCBkPSJNNzMuMTk0IDEwNS4yMDZjLTMuMDMyIDAtMy4wMzItLjk1Ni0zLjAzMi0xLjUxNyAwLS41NjEgMS4wNjEtMS41MTYgMy4wMzItMS41MTZzMi4xMDguOTcxIDIuMTIzIDEuNTE2aDMuMDMzYTQuNTQ1IDQuNTQ1IDAgMCAwLTMuNjQtNC4zNjZ2LTEuNjk4aC0zLjAzMnYxLjY1MmMtMy4wMzIuNS00LjU0OCAyLjQ1Ni00LjU0OCA0LjQxMiAwIDEuNjk4Ljc4OCA0LjU0OSA2LjA2NCA0LjU0OSAzLjAzMyAwIDMuMDMzIDEuMDMxIDMuMDMzIDEuNTE2IDAgLjQ4NS0uOTQgMS41MTYtMy4wMzMgMS41MTYtMi43OSAwLTMuMDMyLTEuMzA0LTMuMDMyLTEuNTE2SDY3LjEzYzAgMS4zOTUgMSAzLjg2NiA0LjU0OCA0LjQyN3YxLjYzOGgzLjAzM3YtMS42MzhjMy4wMzItLjUxNSA0LjU0OC0yLjQ3MSA0LjU0OC00LjQyNyAwLTEuNjk4LS43ODgtNC41NDgtNi4wNjUtNC41NDhaIiBmaWxsPSIjMjI3MUIxIi8+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMDIuOTU5IDQ3KSIgZD0iTTAgMGgzNy4yNTl2MzcuMjU5SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+";function ER(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}function MR(){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 ER(()=>{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=MR();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 IR(){let[e]=(0,s.useState)(MR);return(0,s.useEffect)(()=>()=>e.dispose(),[e]),e}var SR=Object.defineProperty,kR=(e,t,n)=>(((e,t,n)=>{t in e?SR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);let DR=new class{constructor(){kR(this,"current",this.detect()),kR(this,"handoffState","pending"),kR(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}},CR=(e,t)=>{DR.isServer?(0,s.useEffect)(e,t):(0,s.useLayoutEffect)(e,t)};function jR(e){let t=(0,s.useRef)(e);return CR(()=>{t.current=e},[e]),t}let AR=function(e){let t=jR(e);return s.useCallback((...e)=>t.current(...e),[t])};function TR(){let e=(0,s.useRef)(!1);return CR(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function LR(){let e=function(){let e="undefined"==typeof document;return"useSyncExternalStore"in l&&(e=>e.useSyncExternalStore)(l)(()=>()=>{},()=>!1,()=>!e)}(),[t,n]=s.useState(DR.isHandoffComplete);return t&&!1===DR.isHandoffComplete&&n(!1),s.useEffect(()=>{!0!==t&&n(!0)},[t]),s.useEffect(()=>DR.handoff(),[]),!e&&t}let OR=Symbol();function zR(...e){let t=(0,s.useRef)(e);(0,s.useEffect)(()=>{t.current=e},[e]);let n=AR(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[OR]))?void 0:n}var PR,RR;"undefined"!=typeof process&&"undefined"!=typeof globalThis&&"undefined"!=typeof Element&&"test"===(null==(PR=null==process?void 0:process.env)?void 0:PR.NODE_ENV)&&void 0===(null==(RR=null==Element?void 0:Element.prototype)?void 0:RR.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 UR=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(UR||{});function BR(e){let t={};for(let n in e)!0===e[n]&&(t[`data-${n}`]="");return t}let FR=(0,s.createContext)(null);FR.displayName="OpenClosedContext";var QR=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(QR||{});function VR(){return(0,s.useContext)(FR)}function YR({value:e,children:t}){return s.createElement(FR.Provider,{value:e},t)}function ZR({children:e}){return s.createElement(FR.Provider,{value:null},e)}function WR(...e){return Array.from(new Set(e.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}function GR(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,GR),r}var HR=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(HR||{}),$R=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))($R||{});function XR(){let e=function(){let e=(0,s.useRef)([]),t=(0,s.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,s.useCallback)(t=>function({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:o,visible:a=!0,name:i,mergeRefs:s}){s=null!=s?s:JR;let l=KR(t,e);if(a)return qR(l,n,r,i,s);let c=null!=o?o:0;if(2&c){let{static:e=!1,...t}=l;if(e)return qR(t,n,r,i,s)}if(1&c){let{unmount:e=!0,...t}=l;return GR(e?0:1,{0:()=>null,1:()=>qR({...t,hidden:!0,style:{display:"none"}},n,r,i,s)})}return qR(l,n,r,i,s)}({mergeRefs:e,...t}),[e])}function qR(e,t={},n,r,o){let{as:a=n,children:i,refName:l="ref",...c}=nU(e,["unmount","static"]),d=void 0!==e.ref?{[l]:e.ref}:{},u="function"==typeof i?i(t):i;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let f={};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){f["data-headlessui-state"]=n.join(" ");for(let e of n)f[`data-${e}`]=""}}if(oU(a)&&(Object.keys(tU(c)).length>0||Object.keys(tU(f)).length>0)){if(!(!(0,s.isValidElement)(u)||Array.isArray(u)&&u.length>1||function(e){return oU(e.type)}(u))){let e=u.props,t=null==e?void 0:e.className,n="function"==typeof t?(...e)=>WR(t(...e),c.className):WR(t,c.className),r=n?{className:n}:{},a=KR(u.props,tU(nU(c,["ref"])));for(let e in f)e in a&&delete f[e];return(0,s.cloneElement)(u,Object.assign({},a,f,d,{ref:o(rU(u),d.ref)},r))}if(Object.keys(tU(c)).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(tU(c)).concat(Object.keys(tU(f))).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,s.createElement)(a,Object.assign({},nU(c,["ref"]),!oU(a)&&d,!oU(a)&&f),u)}function JR(...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 KR(...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 eU(e){var t;return Object.assign((0,s.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function tU(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function nU(e,t=[]){let n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}function rU(e){return s.version.split(".")[0]>="19"?e.props.ref:e.ref}function oU(e){return e===s.Fragment||e===Symbol.for("react.fragment")}function aU(e){var t;return!!(e.enter||e.enterFrom||e.enterTo||e.leave||e.leaveFrom||e.leaveTo)||!oU(null!=(t=e.as)?t:uU)||1===s.Children.count(e.children)}let iU=(0,s.createContext)(null);iU.displayName="TransitionContext";var sU=(e=>(e.Visible="visible",e.Hidden="hidden",e))(sU||{});let lU=(0,s.createContext)(null);function cU(e){return"children"in e?cU(e.children):e.current.filter(({el:e})=>null!==e.current).filter(({state:e})=>"visible"===e).length>0}function dU(e,t){let n=jR(e),r=(0,s.useRef)([]),o=TR(),a=IR(),i=AR((e,t=$R.Hidden)=>{let i=r.current.findIndex(({el:t})=>t===e);-1!==i&&(GR(t,{[$R.Unmount](){r.current.splice(i,1)},[$R.Hidden](){r.current[i].state="hidden"}}),a.microTask(()=>{var e;!cU(r)&&o.current&&(null==(e=n.current)||e.call(n))}))}),l=AR(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,$R.Unmount)}),c=(0,s.useRef)([]),d=(0,s.useRef)(Promise.resolve()),u=(0,s.useRef)({enter:[],leave:[]}),f=AR((e,n,r)=>{c.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=>{c.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?d.current=d.current.then(()=>null==t?void 0:t.wait.current).then(()=>r(n)):r(n)}),p=AR((e,t,n)=>{Promise.all(u.current[t].splice(0).map(([e,t])=>t)).then(()=>{var e;null==(e=c.current.shift())||e()}).then(()=>n(t))});return(0,s.useMemo)(()=>({children:r,register:l,unregister:i,onStart:f,onStop:p,wait:d,chains:u}),[l,i,r,f,p,u,d])}lU.displayName="NestingContext";let uU=s.Fragment,fU=HR.RenderStrategy,pU=eU(function(e,t){let{show:n,appear:r=!1,unmount:o=!0,...a}=e,i=(0,s.useRef)(null),l=zR(...aU(e)?[i,t]:null===t?[]:[t]);LR();let c=VR();if(void 0===n&&null!==c&&(n=(c&QR.Open)===QR.Open),void 0===n)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,u]=(0,s.useState)(n?"visible":"hidden"),f=dU(()=>{n||u("hidden")}),[p,m]=(0,s.useState)(!0),h=(0,s.useRef)([n]);CR(()=>{!1!==p&&h.current[h.current.length-1]!==n&&(h.current.push(n),m(!1))},[h,n]);let g=(0,s.useMemo)(()=>({show:n,appear:r,initial:p}),[n,r,p]);CR(()=>{n?u("visible"):!cU(f)&&null!==i.current&&u("hidden")},[n,f]);let w={unmount:o},y=AR(()=>{var t;p&&m(!1),null==(t=e.beforeEnter)||t.call(e)}),b=AR(()=>{var t;p&&m(!1),null==(t=e.beforeLeave)||t.call(e)}),v=XR();return s.createElement(lU.Provider,{value:f},s.createElement(iU.Provider,{value:g},v({ourProps:{...w,as:s.Fragment,children:s.createElement(mU,{ref:l,...w,...a,beforeEnter:y,beforeLeave:b})},theirProps:{},defaultTag:s.Fragment,features:fU,visible:"visible"===d,name:"Transition"})))}),mU=eU(function(e,t){var n,r;let{transition:o=!0,beforeEnter:a,afterEnter:i,beforeLeave:l,afterLeave:c,enter:d,enterFrom:u,enterTo:f,entered:p,leave:m,leaveFrom:h,leaveTo:g,...w}=e,[y,b]=(0,s.useState)(null),v=(0,s.useRef)(null),x=aU(e),N=zR(...x?[v,t,b]:null===t?[]:[t]),_=null==(n=w.unmount)||n?$R.Unmount:$R.Hidden,{show:E,appear:M,initial:I}=function(){let e=(0,s.useContext)(iU);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[S,k]=(0,s.useState)(E?"visible":"hidden"),D=function(){let e=(0,s.useContext)(lU);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:C,unregister:j}=D;CR(()=>C(v),[C,v]),CR(()=>{if(_===$R.Hidden&&v.current)return E&&"visible"!==S?void k("visible"):GR(S,{hidden:()=>j(v),visible:()=>C(v)})},[S,v,C,j,E,_]);let A=LR();CR(()=>{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&&!M,L=M&&E&&I,O=(0,s.useRef)(!1),z=dU(()=>{O.current||(k("hidden"),j(v))},D),P=AR(e=>{O.current=!0;let t=e?"enter":"leave";z.onStart(v,t,e=>{"enter"===e?null==a||a():"leave"===e&&(null==l||l())})}),R=AR(e=>{let t=e?"enter":"leave";O.current=!1,z.onStop(v,t,e=>{"enter"===e?null==i||i():"leave"===e&&(null==c||c())}),"leave"===t&&!cU(z)&&(k("hidden"),j(v))});(0,s.useEffect)(()=>{x&&o||(P(E),R(E))},[E,x,o]);let U=!(!o||!x||!A||T),[,B]=function(e,t,n,r){let[o,a]=(0,s.useState)(n),{hasFlag:i,addFlag:l,removeFlag:c}=function(e=0){let[t,n]=(0,s.useState)(e),r=(0,s.useCallback)(e=>n(e),[]),o=(0,s.useCallback)(e=>n(t=>t|e),[]),a=(0,s.useCallback)(e=>(t&e)===e,[t]),i=(0,s.useCallback)(e=>n(t=>t&~e),[]),l=(0,s.useCallback)(e=>n(t=>t^e),[]);return{flags:t,setFlag:r,addFlag:o,hasFlag:a,removeFlag:i,toggleFlag:l}}(e&&o?3:0),d=(0,s.useRef)(!1),u=(0,s.useRef)(!1),f=IR();return CR(()=>{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=MR();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=MR();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:d,prepare(){u.current?u.current=!1:u.current=d.current,d.current=!0,!u.current&&(n?(l(3),c(4)):(l(4),c(2)))},run(){u.current?n?(c(3),l(4)):(c(4),l(3)):n?c(1):l(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)||(d.current=!1,c(7),n||a(!1),null==(e=null==r?void 0:r.end)||e.call(r,n))}})):void(n&&l(3))},[e,n,t,f]),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,E,{start:P,end:R}),F=tU({ref:N,className:(null==(r=WR(w.className,L&&d,L&&u,B.enter&&d,B.enter&&B.closed&&u,B.enter&&!B.closed&&f,B.leave&&m,B.leave&&!B.closed&&h,B.leave&&B.closed&&g,!B.transition&&E&&p))?void 0:r.trim())||void 0,...BR(B)}),Q=0;"visible"===S&&(Q|=QR.Open),"hidden"===S&&(Q|=QR.Closed),E&&"hidden"===S&&(Q|=QR.Opening),!E&&"visible"===S&&(Q|=QR.Closing);let V=XR();return s.createElement(lU.Provider,{value:z},s.createElement(YR,{value:Q},V({ourProps:F,theirProps:w,defaultTag:uU,features:fU,visible:"visible"===S,name:"Transition.Child"})))}),hU=eU(function(e,t){let n=null!==(0,s.useContext)(iU),r=null!==VR();return s.createElement(s.Fragment,null,!n&&r?s.createElement(pU,{ref:t,...e}):s.createElement(mU,{ref:t,...e}))}),gU=Object.assign(pU,{Child:hU,Root:pU});var wU=(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))(wU||{});function yU(e,t,n,r){let o=jR(n);(0,s.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 bU 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 vU,xU,NU,_U=Object.defineProperty,EU=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},MU=(e,t,n)=>(EU(e,t,"read from private field"),n?n.call(e):t.get(e)),IU=(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)},SU=(e,t,n,r)=>(EU(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);class kU{constructor(e){IU(this,vU,{}),IU(this,xU,new bU(()=>new Set)),IU(this,NU,new Set),((e,t,n)=>{((e,t,n)=>{t in e?_U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n)})(this,"disposables",MR()),SU(this,vU,e),DR.isServer&&this.disposables.microTask(()=>{this.dispose()})}dispose(){this.disposables.dispose()}get state(){return MU(this,vU)}subscribe(e,t){if(DR.isServer)return()=>{};let n={selector:e,callback:t,current:e(MU(this,vU))};return MU(this,NU).add(n),this.disposables.add(()=>{MU(this,NU).delete(n)})}on(e,t){return DR.isServer?()=>{}:(MU(this,xU).get(e).add(t),this.disposables.add(()=>{MU(this,xU).get(e).delete(t)}))}send(e){let t=this.reduce(MU(this,vU),e);if(t!==MU(this,vU)){SU(this,vU,t);for(let e of MU(this,NU)){let t=e.selector(MU(this,vU));DU(e.current,t)||(e.current=t,e.callback(t))}for(let t of MU(this,xU).get(e.type))t(MU(this,vU),e)}}}function DU(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&&CU(e[Symbol.iterator](),t[Symbol.iterator]()):e instanceof Map&&t instanceof Map||e instanceof Set&&t instanceof Set?e.size===t.size&&CU(e.entries(),t.entries()):!(!jU(e)||!jU(t))&&CU(Object.entries(e)[Symbol.iterator](),Object.entries(t)[Symbol.iterator]()))}function CU(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 jU(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;let t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}vU=new WeakMap,xU=new WeakMap,NU=new WeakMap;var AU=Object.defineProperty,TU=(e,t,n)=>(((e,t,n)=>{t in e?AU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n),LU=(e=>(e[e.Push=0]="Push",e[e.Pop=1]="Pop",e))(LU||{});let OU={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 zU extends kU{constructor(){super(...arguments),TU(this,"actions",{push:e=>this.send({type:0,id:e}),pop:e=>this.send({type:1,id:e})}),TU(this,"selectors",{isTop:(e,t)=>e.stack[e.stack.length-1]===t,inStack:(e,t)=>e.stack.includes(t)})}static new(){return new zU({stack:[]})}reduce(e,t){return GR(t.type,OU,e,t)}}const PU=new bU(()=>zU.new());var RU=n(8418);function UU(e,t,n=DU){return(0,RU.useSyncExternalStoreWithSelector)(AR(t=>e.subscribe(BU,t)),AR(()=>e.state),AR(()=>e.state),AR(t),n)}function BU(e){return e}function FU(e,t){let n=(0,s.useId)(),r=PU.get(t),[o,a]=UU(r,(0,s.useCallback)(e=>[r.selectors.isTop(e,n),r.selectors.inStack(e,n)],[r,n]));return CR(()=>{if(e)return r.actions.push(n),()=>r.actions.pop(n)},[r,e,n]),!!e&&(!a||o)}function QU(e){var t;return DR.isServer?null:null==e?document:null!=(t=null==e?void 0:e.ownerDocument)?t:document}function VU(e){var t,n;return DR.isServer?null:null==e?document:null!=(n=null==(t=null==e?void 0:e.getRootNode)?void 0:t.call(e))?n:document}function YU(e){var t,n;return null!=(n=null==(t=VU(e))?void 0:t.activeElement)?n:null}let ZU=new Map,WU=new Map;function GU(e){var t;let n=null!=(t=WU.get(e))?t:0;return WU.set(e,n+1),0!==n||(ZU.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=WU.get(e))?t:1;if(1===n?WU.delete(e):WU.set(e,n-1),1!==n)return;let r=ZU.get(e);r&&(null===r["aria-hidden"]?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r["aria-hidden"]),e.inert=r.inert,ZU.delete(e))}(e)}function HU(e){return function(e){return"object"==typeof e&&null!==e&&"nodeType"in e}(e)&&"tagName"in e}function $U(e){return HU(e)&&"accessKey"in e}function XU(e){return HU(e)&&"tabIndex"in e}let qU=["[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(","),JU=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var KU=(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))(KU||{}),eB=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(eB||{}),tB=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(tB||{});var nB=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(nB||{});var rB=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(rB||{});function oB(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 aB=["textarea","input"].join(",");function iB(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:o=[]}={}){let a=Array.isArray(e)?e.length>0?VU(e[0]):document:VU(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(JU)).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(qU)).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")})(),d=32&t?{preventScroll:!0}:{},u=0,f=i.length;do{if(u>=f||u+f<=0)return 0;let e=c+u;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(d),u+=l}while(s!==YU(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,aB))&&n}(s)&&s.select(),2}function sB(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function lB(){return sB()||/Android/gi.test(window.navigator.userAgent)}function cB(e,t,n,r){let o=jR(n);(0,s.useEffect)(()=>{if(e)return document.addEventListener(t,n,r),()=>document.removeEventListener(t,n,r);function n(e){o.current(e)}},[e,t,r])}function dB(e,t,n,r){let o=jR(n);(0,s.useEffect)(()=>{if(e)return window.addEventListener(t,n,r),()=>window.removeEventListener(t,n,r);function n(e){o.current(e)}},[e,t,r])}function uB(e,t,n){let r=jR(n),o=(0,s.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=QU(e))?void 0:n.body)&&GR(t,{0:()=>e.matches(qU),1(){let t=e;for(;null!==t;){if(t.matches(qU))return!0;t=t.parentElement}return!1}})}(o,nB.Loose)&&-1!==o.tabIndex&&e.preventDefault(),r.current(e,o)},[r,t]),a=(0,s.useRef)(null);cB(e,"pointerdown",e=>{var t,n;lB()||(a.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)},!0),cB(e,"pointerup",e=>{if(lB()||!a.current)return;let t=a.current;return a.current=null,o(e,()=>t)},!0);let i=(0,s.useRef)({x:0,y:0});cB(e,"touchstart",e=>{i.current.x=e.touches[0].clientX,i.current.y=e.touches[0].clientY},!0),cB(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,()=>XU(e.target)?e.target:null)},!0),dB(e,"blur",e=>o(e,()=>function(e){return $U(e)&&"IFRAME"===e.nodeName}(window.document.activeElement)?window.document.activeElement:null),!0)}function fB(...e){return(0,s.useMemo)(()=>QU(...e),[...e])}var pB=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(pB||{});let mB=eU(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 XR()({ourProps:a,theirProps:o,slot:{},defaultTag:"span",name:"Hidden"})}),hB=(0,s.createContext)(null);function gB({children:e,node:t}){let[n,r]=(0,s.useState)(null),o=wB(null!=t?t:n);return s.createElement(hB.Provider,{value:o},e,null===o&&s.createElement(mB,{features:pB.Hidden,ref:e=>{var t,n;if(e)for(let o of null!=(n=null==(t=QU(e))?void 0:t.querySelectorAll("html > *, body > *"))?n:[])if(o!==document.body&&o!==document.head&&HU(o)&&null!=o&&o.contains(e)){r(o);break}}}))}function wB(e=null){var t;return null!=(t=(0,s.useContext)(hB))?t:e}function yB(){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 bB(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let vB=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:MR(),meta:new Set,computedMeta:{}};return r.count++,r.meta.add(t),r.computedMeta=bB(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=bB(n.meta)),this},SCROLL_PREVENT(e){let t={doc:e.doc,d:e.d,meta:()=>e.computedMeta},n=[sB()?{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=MR();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(XU(t.target))try{let n=t.target.closest("a");if(!n)return;let{hash:o}=new URL(n.href),i=e.querySelector(o);XU(i)&&!r(i)&&(a=i)}catch{}},!0),t.group(n=>{t.addEventListener(e,"touchstart",e=>{if(n.dispose(),XU(e.target)&&function(e){return HU(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(XU(e.target)){if(function(e){return $U(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)})})}}:{},yB(),{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 xB(e){return(0,s.useMemo)(()=>e,Object.values(e))}vB.subscribe(()=>{let e=vB.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)&&vB.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),0===n.count&&vB.dispatch("TEARDOWN",n)}});let NB=(0,s.createContext)(()=>{});function _B({value:e,children:t}){return s.createElement(NB.Provider,{value:e},t)}let EB=(0,s.createContext)(!1);function MB(e){return s.createElement(EB.Provider,{value:e.force},e.children)}let IB=(0,s.createContext)(void 0),SB=(0,s.createContext)(null);function kB(){let e=(0,s.useContext)(SB);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,kB),e}return e}SB.displayName="DescriptionContext";let DB=eU(function(e,t){let n=(0,s.useId)(),r=(0,s.useContext)(IB),{id:o=`headlessui-description-${n}`,...a}=e,i=kB(),l=zR(t);CR(()=>i.register(o),[o,i.register]);let c=xB({...i.slot,disabled:r||!1}),d={ref:l,...i.props,id:o};return XR()({ourProps:d,theirProps:a,slot:c,defaultTag:"p",name:i.name||"Description"})}),CB=Object.assign(DB,{});function jB(e){let t=AR(e),n=(0,s.useRef)(!1);(0,s.useEffect)(()=>(n.current=!1,()=>{n.current=!0,ER(()=>{n.current&&t()})}),[t])}var AB=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(AB||{});function TB(e,t){let n=(0,s.useRef)([]),r=AR(e);(0,s.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 LB=[];function OB(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let n of e.current)HU(n.current)&&t.add(n.current);return t}!function(){function e(){"loading"!==document.readyState&&((()=>{function e(e){if(!XU(e.target)||e.target===document.body||LB[0]===e.target)return;let t=e.target;t=t.closest(qU),LB.unshift(null!=t?t:e.target),LB=LB.filter(e=>null!=e&&e.isConnected),LB.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 zB=(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))(zB||{});let PB=eU(function(e,t){let n=(0,s.useRef)(null),r=zR(n,t),{initialFocus:o,initialFocusFallback:a,containers:i,features:l=15,...c}=e;LR()||(l=0);let d=fB(n.current);!function(e,{ownerDocument:t}){let n=!!(8&e),r=function(e=!0){let t=(0,s.useRef)(LB.slice());return TB(([e],[n])=>{!0===n&&!1===e&&ER(()=>{t.current.splice(0)}),!1===n&&!0===e&&(t.current=LB.slice())},[e,LB,t]),AR(()=>{var e;return null!=(e=t.current.find(e=>null!=e&&e.isConnected))?e:null})}(n);TB(()=>{n||function(e){return YU(e)===e}(null==t?void 0:t.body)&&oB(r())},[n]),jB(()=>{n&&oB(r())})}(l,{ownerDocument:d});let u=function(e,{ownerDocument:t,container:n,initialFocus:r,initialFocusFallback:o}){let a=(0,s.useRef)(null),i=FU(!!(1&e),"focus-trap#initial-focus"),l=TR();return TB(()=>{if(0===e)return;if(!i)return void(null!=o&&o.current&&oB(o.current));let s=n.current;s&&ER(()=>{if(!l.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(s.contains(n))return void(a.current=n);if(null!=r&&r.current)oB(r.current);else{if(16&e){if(iB(s,KU.First|KU.AutoFocus)!==eB.Error)return}else if(iB(s,KU.First)!==eB.Error)return;if(null!=o&&o.current&&(oB(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}(l,{ownerDocument:d,container:n,initialFocus:o,initialFocusFallback:a});!function(e,{ownerDocument:t,container:n,containers:r,previousActiveElement:o}){let a=TR(),i=!!(4&e);yU(null==t?void 0:t.defaultView,"focus",e=>{if(!i||!a.current)return;let t=OB(r);$U(n.current)&&t.add(n.current);let s=o.current;if(!s)return;let l=e.target;$U(l)?UB(t,l)?(o.current=l,oB(l)):(e.preventDefault(),e.stopPropagation(),oB(s)):oB(o.current)},!0)}(l,{ownerDocument:d,container:n,containers:i,previousActiveElement:u});let f=function(){let e=(0,s.useRef)(0);return dB(!0,"keydown",t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)},!0),e}(),p=AR(e=>{if(!$U(n.current))return;let t=n.current;GR(f.current,{[AB.Forwards]:()=>{iB(t,KU.First,{skipElements:[e.relatedTarget,a]})},[AB.Backwards]:()=>{iB(t,KU.Last,{skipElements:[e.relatedTarget,a]})}})}),m=FU(!!(2&l),"focus-trap#tab-lock"),h=IR(),g=(0,s.useRef)(!1),w={ref:r,onKeyDown(e){"Tab"==e.key&&(g.current=!0,h.requestAnimationFrame(()=>{g.current=!1}))},onBlur(e){if(!(4&l))return;let t=OB(i);$U(n.current)&&t.add(n.current);let r=e.relatedTarget;XU(r)&&"true"!==r.dataset.headlessuiFocusGuard&&(UB(t,r)||(g.current?iB(n.current,GR(f.current,{[AB.Forwards]:()=>KU.Next,[AB.Backwards]:()=>KU.Previous})|KU.WrapAround,{relativeTo:e.target}):XU(e.target)&&oB(e.target)))}},y=XR();return s.createElement(s.Fragment,null,m&&s.createElement(mB,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:pB.Focusable}),y({ourProps:w,theirProps:c,defaultTag:"div",name:"FocusTrap"}),m&&s.createElement(mB,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:pB.Focusable}))}),RB=Object.assign(PB,{features:zB});function UB(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let BB=s.Fragment,FB=eU(function(e,t){let{ownerDocument:n=null,...r}=e,o=(0,s.useRef)(null),a=zR(function(e,t=!0){return Object.assign(e,{[OR]:t})}(e=>{o.current=e}),t),i=fB(o.current),l=function(e){let t=(0,s.useContext)(EB),n=(0,s.useContext)(VB),[r,o]=(0,s.useState)(()=>{var r;if(!t&&null!==n)return null!=(r=n.current)?r:null;if(DR.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,s.useEffect)(()=>{null!==r&&(null!=e&&e.body.contains(r)||null==e||e.body.appendChild(r))},[r,e]),(0,s.useEffect)(()=>{t||null!==n&&o(n.current)},[n,o,t]),r}(null!=n?n:i),c=(0,s.useContext)(YB),d=IR(),u=XR();return jB(()=>{var e;l&&l.childNodes.length<=0&&(null==(e=l.parentElement)||e.removeChild(l))}),l?(0,cn.createPortal)(s.createElement("div",{"data-headlessui-portal":"",ref:e=>{d.dispose(),c&&e&&d.add(c.register(e))}},u({ourProps:{ref:a},theirProps:r,slot:{},defaultTag:BB,name:"Portal"})),l):null}),QB=s.Fragment,VB=(0,s.createContext)(null),YB=(0,s.createContext)(null),ZB=eU(function(e,t){let n=zR(t),{enabled:r=!0,ownerDocument:o,...a}=e,i=XR();return r?s.createElement(FB,{...a,ownerDocument:o,ref:n}):i({ourProps:{ref:n},theirProps:a,slot:{},defaultTag:BB,name:"Portal"})}),WB=eU(function(e,t){let{target:n,...r}=e,o={ref:zR(t)},a=XR();return s.createElement(VB.Provider,{value:n},a({ourProps:o,theirProps:r,defaultTag:QB,name:"Popover.Group"}))}),GB=Object.assign(ZB,{Group:WB});var HB=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(HB||{}),$B=(e=>(e[e.SetTitleId=0]="SetTitleId",e))($B||{});let XB={0:(e,t)=>e.titleId===t.id?e:{...e,titleId:t.id}},qB=(0,s.createContext)(null);function JB(e){let t=(0,s.useContext)(qB);if(null===t){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,JB),t}return t}function KB(e,t){return GR(t.type,XB,e,t)}qB.displayName="DialogContext";let eF=eU(function(e,t){let n=(0,s.useId)(),{id:r=`headlessui-dialog-${n}`,open:o,onClose:a,initialFocus:i,role:l="dialog",autoFocus:c=!0,__demoMode:d=!1,unmount:u=!1,...f}=e,p=(0,s.useRef)(!1);l="dialog"===l||"alertdialog"===l?l:(p.current||(p.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog");let m=VR();void 0===o&&null!==m&&(o=(m&QR.Open)===QR.Open);let h=(0,s.useRef)(null),g=zR(h,t),w=fB(h.current),y=o?0:1,[b,v]=(0,s.useReducer)(KB,{titleId:null,descriptionId:null,panelRef:(0,s.createRef)()}),x=AR(()=>a(!1)),N=AR(e=>v({type:0,id:e})),_=!!LR()&&0===y,[E,M]=function(){let e=(0,s.useContext)(YB),t=(0,s.useRef)([]),n=AR(n=>(t.current.push(n),e&&e.register(n),()=>r(n))),r=AR(n=>{let r=t.current.indexOf(n);-1!==r&&t.current.splice(r,1),e&&e.unregister(n)}),o=(0,s.useMemo)(()=>({register:n,unregister:r,portals:t}),[n,r,t]);return[t,(0,s.useMemo)(()=>function({children:e}){return s.createElement(YB.Provider,{value:o},e)},[o])]}(),I={get current(){var e;return null!=(e=b.panelRef.current)?e:h.current}},S=wB(),{resolveContainers:k}=function({defaultContainers:e=[],portals:t,mainTreeNode:n}={}){let r=AR(()=>{var r,o;let a=QU(n),i=[];for(let t of e)null!==t&&(HU(t)?i.push(t):"current"in t&&HU(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&&HU(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:AR(e=>r().some(t=>t.contains(e)))}}({mainTreeNode:S,portals:E,defaultContainers:[I]}),D=null!==m&&(m&QR.Closing)===QR.Closing;!function(e,{allowed:t,disallowed:n}={}){let r=FU(e,"inert-others");CR(()=>{var e,o;if(!r)return;let a=MR();for(let t of null!=(e=null==n?void 0:n())?e:[])t&&a.add(GU(t));let i=null!=(o=null==t?void 0:t())?o:[];for(let e of i){if(!e)continue;let t=QU(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(GU(e));n=n.parentElement}}return a.dispose},[r,t,n])}(!d&&!D&&_,{allowed:AR(()=>{var e,t;return[null!=(t=null==(e=h.current)?void 0:e.closest("[data-headlessui-portal]"))?t:null]}),disallowed:AR(()=>{var e;return[null!=(e=null==S?void 0:S.closest("body > *:not(#headlessui-portal-root)"))?e:null]})});let C=PU.get(null);CR(()=>{if(_)return C.actions.push(r),()=>C.actions.pop(r)},[C,r,_]);let j=UU(C,(0,s.useCallback)(e=>C.selectors.isTop(e,r),[C,r]));uB(j,k,e=>{e.preventDefault(),x()}),function(e,t=("undefined"!=typeof document?document.defaultView:null),n){let r=FU(e,"escape");yU(t,"keydown",e=>{r&&(e.defaultPrevented||e.key===wU.Escape&&n(e))})}(j,null==w?void 0:w.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,s.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot)}(vB),o=t?r.get(t):void 0,a=!!o&&o.count>0;CR(()=>{if(t&&e)return vB.dispatch("PUSH",t,n),()=>vB.dispatch("POP",t,n)},[e,t])}(FU(e,"scroll-lock"),t,e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],n]}})}(!d&&!D&&_,w,k),function(e,t,n){let r=jR(e=>{let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&n()});(0,s.useEffect)(()=>{if(!e)return;let n=null===t?null:$U(t)?t:t.current;if(!n)return;let o=MR();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])}(_,h,x);let[A,T]=function(){let[e,t]=(0,s.useState)([]);return[e.length>0?e.join(" "):void 0,(0,s.useMemo)(()=>function(e){let n=AR(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,s.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 s.createElement(SB.Provider,{value:r},e.children)},[t])]}(),L=(0,s.useMemo)(()=>[{dialogState:y,close:x,setTitleId:N,unmount:u},b],[y,x,N,u,b]),O=xB({open:0===y}),z={ref:g,id:r,role:l,tabIndex:-1,"aria-modal":d?void 0:0===y||void 0,"aria-labelledby":b.titleId,"aria-describedby":A,unmount:u},P=!function(){var e;let[t]=(0,s.useState)(()=>"undefined"!=typeof window&&"function"==typeof window.matchMedia?window.matchMedia("(pointer: coarse)"):null),[n,r]=(0,s.useState)(null!=(e=null==t?void 0:t.matches)&&e);return CR(()=>{if(t)return t.addEventListener("change",e),()=>t.removeEventListener("change",e);function e(e){r(e.matches)}},[t]),n}(),R=zB.None;_&&!d&&(R|=zB.RestoreFocus,R|=zB.TabLock,c&&(R|=zB.AutoFocus),P&&(R|=zB.InitialFocus));let U=XR();return s.createElement(ZR,null,s.createElement(MB,{force:!0},s.createElement(GB,null,s.createElement(qB.Provider,{value:L},s.createElement(WB,{target:h},s.createElement(MB,{force:!1},s.createElement(T,{slot:O},s.createElement(M,null,s.createElement(RB,{initialFocus:i,initialFocusFallback:h,containers:k,features:R},s.createElement(_B,{value:x},U({ourProps:z,theirProps:f,slot:O,defaultTag:tF,features:nF,visible:0===y,name:"Dialog"})))))))))))}),tF="div",nF=HR.RenderStrategy|HR.Static,rF=eU(function(e,t){let{transition:n=!1,open:r,...o}=e,a=VR(),i=e.hasOwnProperty("open")||null!==a,l=e.hasOwnProperty("onClose");if(!i&&!l)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(!l)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?s.createElement(gB,null,s.createElement(eF,{ref:t,open:r,...o})):s.createElement(gB,null,s.createElement(gU,{show:r,transition:n,unmount:o.unmount},s.createElement(eF,{ref:t,...o})))}),oF=eU(function(e,t){let n=(0,s.useId)(),{id:r=`headlessui-dialog-panel-${n}`,transition:o=!1,...a}=e,[{dialogState:i,unmount:l},c]=JB("Dialog.Panel"),d=zR(t,c.panelRef),u=xB({open:0===i}),f=AR(e=>{e.stopPropagation()}),p={ref:d,id:r,onClick:f},m=o?hU:s.Fragment,h=o?{unmount:l}:{},g=XR();return s.createElement(m,{...h},g({ourProps:p,theirProps:a,slot:u,defaultTag:"div",name:"Dialog.Panel"}))}),aF=(eU(function(e,t){let{transition:n=!1,...r}=e,[{dialogState:o,unmount:a}]=JB("Dialog.Backdrop"),i=xB({open:0===o}),l={ref:t,"aria-hidden":!0},c=n?hU:s.Fragment,d=n?{unmount:a}:{},u=XR();return s.createElement(c,{...d},u({ourProps:l,theirProps:r,slot:i,defaultTag:"div",name:"Dialog.Backdrop"}))}),eU(function(e,t){let n=(0,s.useId)(),{id:r=`headlessui-dialog-title-${n}`,...o}=e,[{dialogState:a,setTitleId:i}]=JB("Dialog.Title"),l=zR(t);(0,s.useEffect)(()=>(i(r),()=>i(null)),[r,i]);let c=xB({open:0===a}),d={ref:l,id:r};return XR()({ourProps:d,theirProps:o,slot:c,defaultTag:"h2",name:"Dialog.Title"})})),iF=Object.assign(rF,{Panel:oF,Title:aF,Description:CB});const sF=({sourceStep:e,availableSteps:t,acceptRedirect:n,setAcceptRedirect:r,rejectRedirect:o,setRejectRedirect:a})=>(0,i.createElement)("div",{className:"border border-gray-200 rounded-lg p-4 mb-4"},(0,i.createElement)("div",{className:"font-medium text-gray-800 mb-3"},e.title," (",e.type,")",e.isVariation&&(0,i.createElement)("span",{className:"ml-2 text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded"},(0,D.__)("A/B Variation","cartflows"))),(0,i.createElement)("div",{className:"mb-3"},(0,i.createElement)("label",{className:"block text-sm font-normal text-gray-600 mb-1"},(0,D.__)("Accept (Yes) - redirect to:","cartflows")),(0,i.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,i.createElement)("option",{key:`accept-${e.id}`,value:e.id},e.title)))),(0,i.createElement)("div",null,(0,i.createElement)("label",{className:"block text-sm font-normal text-gray-600 mb-1"},(0,D.__)("Reject (No) - redirect to:","cartflows")),(0,i.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=>a(e.target.value)},t.map(e=>(0,i.createElement)("option",{key:`reject-${e.id}`,value:e.id},e.title))))),lF=({isOpen:e,onClose:t,onConfirm:n,stepToDelete:r,flowSteps:o})=>{const a=(0,s.useRef)(null),[l,c]=(0,s.useState)({}),d=(0,s.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,s.useEffect)(()=>{if(d.length>0){const e={};d.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}}),c(e)}},[e,o,r]);const f=(e,t,n)=>{c(r=>({...r,[e]:{...r[e],[t]:n}}))};return e?(0,cn.createPortal)((0,i.createElement)(gU.Root,{show:e,as:s.Fragment},(0,i.createElement)(iF,{as:"div",className:"relative z-[99999] wcf-confirm-popup",initialFocus:a,onClose:()=>{}},(0,i.createElement)(gU.Child,{as:s.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},(0,i.createElement)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})),(0,i.createElement)("div",{className:"fixed inset-0 z-10 overflow-y-auto"},(0,i.createElement)("div",{className:"flex min-h-full items-center justify-center p-4 text-center sm:p-0"},(0,i.createElement)(gU.Child,{as:s.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,i.createElement)(iF.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,i.createElement)("div",{className:"absolute top-0 right-0 hidden pt-4 pr-4 sm:block"},(0,i.createElement)("button",{type:"button",className:"rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none",onClick:t},(0,i.createElement)("span",{className:"sr-only"},"Close"),(0,i.createElement)(ww,{className:"h-6 w-6","aria-hidden":"true"}))),(0,i.createElement)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},(0,i.createElement)("div",{className:"sm:flex sm:items-start"},(0,i.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,i.createElement)(Ah,{className:"h-6 w-6 text-red-600","aria-hidden":"true"})),(0,i.createElement)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},(0,i.createElement)(iF.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900 capitalize"},(0,D.__)("Delete Step","cartflows")),(0,i.createElement)("div",{className:"mt-2"},(0,i.createElement)("p",{className:"text-sm text-gray-500"},(0,D.__)("Are you sure you want to delete this step?","cartflows"))))),d.length>0&&(0,i.createElement)("div",{className:"mt-4"},(0,i.createElement)("p",{className:"text-sm font-medium text-gray-700 mb-3"},(0,D.__)("The following steps have edges pointing to this step. Please select where they should redirect after deletion:","cartflows")),d.map(e=>{const t=u(e.id,e.controlStepId),n=l[e.id]||{};return(0,i.createElement)(sF,{key:e.id,sourceStep:e,availableSteps:t,acceptRedirect:n.accept||"",setAcceptRedirect:t=>f(e.id,"accept",t),rejectRedirect:n.reject||"",setRejectRedirect:t=>f(e.id,"reject",t)})}))),(0,i.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,i.createElement)("button",{type:"button",className:"wcf-button wcf-secondary-button",onClick:t,ref:a},(0,D.__)("Cancel","cartflows")),(0,i.createElement)("button",{type:"button",className:"wcf-button wcf-primary-button",onClick:()=>{n(l)}},(0,D.__)("Delete","cartflows"))))))))),document.body):null},cF=(0,s.memo)(({data:e,isConnectable:t})=>{const n="upsell"===e.step_type?NR:_R,r="vertical"===e?.axis,o="LR"===e.direction?"target":"source",a="LR"===e.direction?"source":"target",[,l]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),[f,p]=(0,s.useState)("cartflows_delete_step"),m=zh(),h=(0,qh.W6)(),[{license_status:g}]=u(),[{steps:w,is_flow_instant_checkout:y}]=Zp(),b=yR.createEventHandlers(e,m,h,l,{delete:e=>{e.preventDefault();const t=e.currentTarget.getAttribute("data-action")||"cartflows_delete_step";p(t),d(!0)}});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:"target",position:GA.Top,id:"top",style:{background:"#555",visibility:r?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t}),"LR"===e.direction&&!r&&(0,i.createElement)(rz,{type:o,position:GA.Left,id:"left",style:{background:"#555"},className:"react-flow__handle wcf-handle-left",isConnectable:t}),"RL"===e.direction&&!r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:o,position:GA.Left,className:"react-flow__handle-right-a wcf-handle-right",id:"a",style:{top:50},isConnectable:t}),(0,i.createElement)(rz,{type:o,position:GA.Left,className:"react-flow__handle-right-b wcf-handle-right",id:"b",style:{bottom:50,top:"auto"},isConnectable:t})),yR.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,b,g,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,[],y,e.is_locked),(0,i.createElement)("div",{className:"wcf-custom-node-label"},e?.label),"LR"===e.direction&&!r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:a,position:GA.Right,className:"react-flow__handle-right-a wcf-handle-right",id:"a",style:{top:50},isConnectable:t}),(0,i.createElement)(rz,{type:a,position:GA.Right,className:"react-flow__handle-right-b wcf-handle-right",id:"b",style:{bottom:50,top:"auto"},isConnectable:t})),"RL"===e.direction&&!r&&(0,i.createElement)(rz,{type:a,position:GA.Right,style:{background:"#555"},className:"react-flow__handle wcf-handle-left",isConnectable:t}),r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:"source",position:GA.Bottom,id:"a",style:{left:80,background:"#16A34A"},className:"react-flow__handle wcf-handle-bottom-accept",isConnectable:t}),(0,i.createElement)(rz,{type:"source",position:GA.Bottom,id:"b",style:{left:"auto",right:80,background:"#DC2626"},className:"react-flow__handle wcf-handle-bottom-reject",isConnectable:t})),(0,i.createElement)(lF,{isOpen:c,onClose:()=>d(!1),onConfirm:async t=>{d(!1),await yR.performDelete(e,f,l,t)},stepToDelete:e,flowSteps:w}))}),dF="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI1OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iLjUiIHdpZHRoPSIxOTkiIGhlaWdodD0iMjU4IiByeD0iOS41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNFQUVBRUEiLz48cGF0aCBkPSJNMCAxMEMwIDQuNDc3IDQuNDc3IDAgMTAgMGgxODBjNS41MjMgMCAxMCA0LjQ3NyAxMCAxMHYxOC4xNDdIMFYxMFoiIGZpbGw9IiNFNkVBRUQiLz48ZWxsaXBzZSBjeD0iMTQiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGRjNCMzAiLz48ZWxsaXBzZSBjeD0iMjciIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiNGQzAiLz48ZWxsaXBzZSBjeD0iNDAiIGN5PSIxNC4wMjEiIHJ4PSI0IiByeT0iNC4wMjEiIGZpbGw9IiM0Q0Q5NjQiLz48cmVjdCB4PSI2NCIgeT0iMTEiIHdpZHRoPSIxMDciIGhlaWdodD0iNyIgcng9IjEiIGZpbGw9IiNmZmYiLz48cGF0aCBkPSJNMTI2LjU4MyA3OS4wMDhWODEuNWEyNy4wOCAyNy4wOCAwIDAgMS0xOS40MDQgMjUuOTU2IDI3LjA4MyAyNy4wODMgMCAxIDEgMy4zNDQtNTAuNzEiIHN0cm9rZT0iIzIyNzFCMSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz48cGF0aCBkPSJNMTI2LjU4MyA1OS44MzMgOTkuNSA4Ni45NDNsLTguMTI1LTguMTI0IiBzdHJva2U9IiMyMjcxQjEiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PHJlY3QgeD0iODMiIHk9IjE0MyIgd2lkdGg9IjM1IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iNzgiIHk9IjEyOSIgd2lkdGg9IjQ1IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjMjI3MUIxIi8+PHJlY3QgeD0iMjMiIHk9IjE1NyIgd2lkdGg9IjE1NCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0U2RUFFRCIvPjxyZWN0IHg9IjIzIiB5PSIxNzEiIHdpZHRoPSIxNTQiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSIyMyIgeT0iMTg1IiB3aWR0aD0iMTU0IiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iMjMiIHk9IjE5OSIgd2lkdGg9IjkyLjQiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSI3MiIgeT0iMjIzIiB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIxIiBmaWxsPSIjRUFFQUVBIi8+PHJlY3QgeD0iOTQiIHk9IjIyMyIgd2lkdGg9IjEyIiBoZWlnaHQ9IjEyIiByeD0iMSIgZmlsbD0iI0VBRUFFQSIvPjxyZWN0IHg9IjExNiIgeT0iMjIzIiB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHJ4PSIxIiBmaWxsPSIjRUFFQUVBIi8+PC9zdmc+",uF=(0,s.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o=r?"target":"source",a=r?"source":"target",[,l]=(0,s.useState)(!1),c=zh(),d=(0,qh.W6)(),[{license_status:f}]=u(),[{is_flow_instant_checkout:p}]=Zp(),m=yR.createEventHandlers(e,c,d,l);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:"target",position:GA.Top,id:"top",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t}),(0,i.createElement)(rz,{type:o,position:GA.Left,id:"left",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-left",isConnectable:t&&!n}),yR.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},dF,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,m,f,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,[],p,e.is_locked),(0,i.createElement)(rz,{type:a,position:GA.Right,id:"right",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-right",isConnectable:t&&!n}),(0,i.createElement)(rz,{type:"source",position:GA.Bottom,id:"bottom",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-bottom",isConnectable:t&&n}),(0,i.createElement)("div",{className:"wcf-custom-node-label"},e?.label))}),fF="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjI2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB4PSIuNSIgeT0iMSIgd2lkdGg9IjE5OSIgaGVpZ2h0PSIyNTgiIHJ4PSI5LjUiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI0VBRUFFQSIvPjxwYXRoIGQ9Ik0wIDEwLjVDMCA0Ljk3NyA0LjQ3Ny41IDEwIC41aDE4MGM1LjUyMyAwIDEwIDQuNDc3IDEwIDEwdjE4SDB2LTE4WiIgZmlsbD0iI0U2RUFFRCIvPjxjaXJjbGUgY3g9IjE0IiBjeT0iMTQuNSIgcj0iNCIgZmlsbD0iI0ZGM0IzMCIvPjxjaXJjbGUgY3g9IjI3IiBjeT0iMTQuNSIgcj0iNCIgZmlsbD0iI0ZDMCIvPjxjaXJjbGUgY3g9IjQwIiBjeT0iMTQuNSIgcj0iNCIgZmlsbD0iIzRDRDk2NCIvPjxyZWN0IHg9IjY0IiB5PSIxMC41IiB3aWR0aD0iMTA3IiBoZWlnaHQ9IjciIHJ4PSIxIiBmaWxsPSIjZmZmIi8+PHBhdGggZmlsbD0iI0Y2RkFGRiIgZD0iTTExMyA0OWg2NHY5MmgtNjR6Ii8+PHJlY3QgeD0iMTI1IiB5PSI2NCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTEyMC41IDc5YS41LjUgMCAwIDEgLjUtLjVoNDhhLjUuNSAwIDAgMSAuNS41djRhLjUuNSAwIDAgMS0uNS41aC00OGEuNS41IDAgMCAxLS41LS41di00Wk0xMjAuNSA5MGEuNS41IDAgMCAxIC41LS41aDQ4YS41LjUgMCAwIDEgLjUuNXY0YS41LjUgMCAwIDEtLjUuNWgtNDhhLjUuNSAwIDAgMS0uNS0uNXYtNFoiIGZpbGw9IiNmZmYiIHN0cm9rZT0iI0I3Q0ZFMiIvPjxyZWN0IHg9IjEyMC41IiB5PSIxMDMuNSIgd2lkdGg9IjQiIGhlaWdodD0iNCIgcng9Ii41IiBmaWxsPSIjZmZmIiBzdHJva2U9IiNDQ0RFRUQiLz48cmVjdCB4PSIxMzAiIHk9IjEwNCIgd2lkdGg9IjQwIiBoZWlnaHQ9IjMiIHJ4PSIxIiBmaWxsPSIjQ0NERUVEIi8+PHJlY3QgeD0iMTIwIiB5PSIxMTgiIHdpZHRoPSI1MCIgaGVpZ2h0PSI3IiByeD0iMiIgZmlsbD0iIzIyNzFCMSIvPjxyZWN0IHg9IjIzIiB5PSI2MCIgd2lkdGg9IjgwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHBhdGggZmlsbD0iI2ZmZiIgc3Ryb2tlPSIjRTZFQUVEIiBzdHJva2Utd2lkdGg9IjEuNSIgZD0iTTIzLjc1IDc0Ljc1aDc4LjV2NDMuNWgtNzguNXoiLz48cGF0aCBkPSJNNjMgODguMjVhOC43NSA4Ljc1IDAgMSAwIC4wMDEgMTcuNTAxQTguNzUgOC43NSAwIDAgMCA2MyA4OC4yNVptMCAxNi4wMTZhNy4yNjcgNy4yNjcgMCAwIDEgMC0xNC41MzIgNy4yNjcgNy4yNjcgMCAwIDEgMCAxNC41MzJaIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0ibTY3LjA1IDk2Ljc0OC01Ljc4Mi00LjJhLjMxLjMxIDAgMCAwLS40OTUuMjUzdjguMzk4YzAgLjI1Ni4yOS40MDEuNDk1LjI1Mmw1Ljc4My00LjE5OWEuMzEyLjMxMiAwIDAgMCAuMDk1LS4zOTMuMzEyLjMxMiAwIDAgMC0uMDk1LS4xMTFabS01LjAzIDIuNjE3di00LjczTDY1LjI3NSA5N2wtMy4yNTYgMi4zNjVaIiBmaWxsPSIjMjI3MUIxIi8+PHJlY3QgeD0iNTAiIHk9IjE1NiIgd2lkdGg9IjEwMCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0U2RUFFRCIvPjxjaXJjbGUgY3g9IjI1IiBjeT0iMTc1IiByPSIyIiBmaWxsPSIjMjI3MUIxIi8+PGNpcmNsZSBjeD0iMjUiIGN5PSIxODkiIHI9IjIiIGZpbGw9IiMyMjcxQjEiLz48Y2lyY2xlIGN4PSIyNSIgY3k9IjIwMyIgcj0iMiIgZmlsbD0iIzIyNzFCMSIvPjxyZWN0IHg9IjM1IiB5PSIxNzMiIHdpZHRoPSIxNDIiIGhlaWdodD0iNCIgcng9IjEiIGZpbGw9IiNFNkVBRUQiLz48cmVjdCB4PSIzNSIgeT0iMTg3IiB3aWR0aD0iMTAwIiBoZWlnaHQ9IjQiIHJ4PSIxIiBmaWxsPSIjRTZFQUVEIi8+PHJlY3QgeD0iMzUiIHk9IjIwMSIgd2lkdGg9IjEyMCIgaGVpZ2h0PSI0IiByeD0iMSIgZmlsbD0iI0U2RUFFRCIvPjxyZWN0IHg9IjIzIiB5PSIyMTkiIHdpZHRoPSIxNTQiIGhlaWdodD0iMjAiIHJ4PSIyIiBmaWxsPSIjMjI3MUIxIi8+PHBhdGggZD0iTTk0LjQ0MiAyMjkuMjI3YzAtMi4xNDEtMS4zMy0zLjM2Mi0zLjA2NS0zLjM2Mi0xLjc0NSAwLTMuMDY1IDEuMjIxLTMuMDY1IDMuMzYyIDAgMi4xMzIgMS4zMiAzLjM2MiAzLjA2NSAzLjM2MiAxLjczNSAwIDMuMDY1LTEuMjIgMy4wNjUtMy4zNjJabS0xLjQwMyAwYzAgMS4zODctLjY1OSAyLjEzOC0xLjY2MiAyLjEzOC0xLjAwNyAwLTEuNjYyLS43NTEtMS42NjItMi4xMzhzLjY1NS0yLjEzOCAxLjY2Mi0yLjEzOGMxLjAwMyAwIDEuNjYyLjc1MSAxLjY2MiAyLjEzOFptMi40MDIgNS4xMTRoMS4zNjJ2LTIuNjI3aC4wNDFjLjE4OS40MDkuNjAxLjg2NiAxLjM5NC44NjYgMS4xMTggMCAxLjk5MS0uODg1IDEuOTkxLTIuNTI4IDAtMS42ODgtLjkxMS0yLjUyNS0xLjk4OC0yLjUyNS0uODIxIDAtMS4yMTUuNDg5LTEuMzk3Ljg4OGgtLjA2di0uODI0SDk1LjQ0djYuNzVabTEuMzMzLTQuMjk2YzAtLjg3NS4zNy0xLjQzNSAxLjAzMi0xLjQzNS42NzUgMCAxLjAzMy41ODUgMS4wMzMgMS40MzUgMCAuODU3LS4zNjUgMS40NTEtMS4wMzMgMS40NTEtLjY1NSAwLTEuMDMyLS41NzUtMS4wMzItMS40NTFabTYuOTc0LTIuNDU0aC0uOTI0di0xLjE3NmgtMS4zNjF2MS4xNzZoLS42NzJ2MS4wMjNoLjY3MnYyLjU1NmMtLjAwNy45NjIuNjQ4IDEuNDM5IDEuNjM2IDEuMzk3LjM1Mi0uMDEzLjYwMS0uMDgzLjczOC0uMTI4bC0uMjE0LTEuMDEzYy0uMDY3LjAxMy0uMjExLjA0NS0uMzM5LjA0NS0uMjcxIDAtLjQ2LS4xMDItLjQ2LS40OHYtMi4zNzdoLjkyNHYtMS4wMjNabS44ODcgNC45MDloMS4zNjF2LTQuOTA5aC0xLjM2MXY0LjkwOVptLjY4NC01LjU0MmMuNDA1IDAgLjczOC0uMzEuNzM4LS42OSAwLS4zNzctLjMzMy0uNjg3LS43MzgtLjY4Ny0uNDAzIDAtLjczNi4zMS0uNzM2LjY4NyAwIC4zOC4zMzMuNjkuNzM2LjY5Wm0zLjEyOSAyLjcwNGMuMDAzLS42MzMuMzgxLTEuMDA0LjkzLTEuMDA0LjU0NyAwIC44NzYuMzU4Ljg3My45NTl2Mi44ODNoMS4zNjF2LTMuMTI2YzAtMS4xNDQtLjY3MS0xLjg0Ny0xLjY5NC0xLjg0Ny0uNzI4IDAtMS4yNTYuMzU4LTEuNDc2LjkzaC0uMDU4di0uODY2aC0xLjI5N3Y0LjkwOWgxLjM2MXYtMi44MzhaIiBmaWxsPSIjZmZmIi8+PC9zdmc+",pF=(0,s.memo)(({data:e,isConnectable:t})=>{const n="vertical"===e?.axis,r="LR"===e?.direction,o=r?"target":"source",a=r?"source":"target",[,l]=(0,s.useState)(!1),c=zh(),d=(0,qh.W6)(),[{license_status:f}]=u(),p=yR.createEventHandlers(e,c,d,l);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:"target",position:GA.Top,id:"top",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t}),(0,i.createElement)(rz,{type:o,position:GA.Left,id:"left",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-left",isConnectable:t&&!n}),yR.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},fF,e.viewPageLink,e.editPage,e.menu_actions,e.ab_test_variations,p,f,e.analytics,e.isInvalidPosition,e.is_product_assigned,e.step_disabled,e.warnings,e.compact,void 0,void 0,e.is_locked),(0,i.createElement)("div",{className:"wcf-custom-node-label"},e?.label),(0,i.createElement)(rz,{type:a,position:GA.Right,id:"right",style:{visibility:n?"hidden":"visible"},className:"react-flow__handle wcf-handle-right",isConnectable:t&&!n}),(0,i.createElement)(rz,{type:"source",position:GA.Bottom,id:"bottom",style:{visibility:n?"visible":"hidden"},className:"react-flow__handle wcf-handle-bottom",isConnectable:t&&n}))}),mF={createEventHandlers:(e,t,n,r)=>({clone:async function(n){if(n.preventDefault(),!wcfCartflowsPro())return null;const o=n.currentTarget.getAttribute("data-action");if(await t({title:(0,D.__)("Duplicate Variation","cartflows"),description:(0,D.__)("Do you want to duplicate this variation? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Yes","cartflows"),cancelBtnText:(0,D.__)("No","cartflows")})){r(!0);const t=cartflows_admin.wcf_clone_ab_test_step_nonce,n=new window.FormData;n.append("action",o),n.append("security",t),n.append("step_id",e?.step_id),n.append("post_id",e?.flow_id),n.append("control_id",e?.control_id),window.wcfAction="cloneABTestStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{window.location.reload()}).catch(e=>{console.error("Clone Step failed:",e),r(!1)}))}},delete:async function(n){n.preventDefault();const o=n.currentTarget.getAttribute("data-action");if(await t({title:(0,D.__)("Delete Variation","cartflows"),description:(0,D.__)("Do you want to delete this variation? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Yes","cartflows"),cancelBtnText:(0,D.__)("No","cartflows")})){r(!0);const t=cartflows_admin.wcf_delete_ab_test_step_nonce,n=new window.FormData;n.append("action",o),n.append("security",t),n.append("step_id",e?.step_id),n.append("post_id",e?.flow_id),n.append("control_id",e?.control_id),window.wcfAction="deleteABTestStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{window.location.reload()}).catch(e=>{console.error("Delete step failed:",e),r(!1)}))}},winner:async function(n){if(n.preventDefault(),await t({title:(0,D.__)("Declare Winner","cartflows"),description:(0,D.__)("Do you want to declare this step as winner? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Declare Winner","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")})){r(!0);const t=new window.FormData;t.append("action","cartflows_declare_ab_test_winner"),t.append("security",cartflows_admin.wcf_declare_ab_test_winner_nonce),t.append("step_id",e?.step_id),t.append("flow_id",e?.flow_id),window.wcfAction="winnerStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{gm.success((0,D.__)("Winner declared successfully!","cartflows")),window.location.reload()}).catch(e=>{console.error("Declare AB Test Winner failed:",e),gm.error((0,D.__)("Failed to declare winner. Please try again.","cartflows")),r(!1)}))}},archived:async function(n){if(n.preventDefault(),await t({title:(0,D.__)("Archive Variation","cartflows"),description:(0,D.__)("Do you want to archive this variation? Are you sure?","cartflows"),actionBtnText:(0,D.__)("Yes","cartflows"),cancelBtnText:(0,D.__)("No","cartflows")})){r(!0);const t=new window.FormData;t.append("action","cartflows_archive_ab_test_step"),t.append("security",cartflows_admin.wcf_archive_ab_test_step_nonce),t.append("step_id",e?.step_id),t.append("post_id",e?.flow_id),window.wcfAction="archiveStep",(0,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:t}).then(()=>{window.location.reload()}).catch(e=>{console.error("Archiving step failed:",e),r(!1)}))}}}),nodeHtml(e,t,n,r,o,a,s,l,c,d,u,f,p,m,h,g,w,y=!1,b=""){const v=cm(e?.step_type,b),x=e?.step_type||"",N=lm(e?.step_title||"");return(0,i.createElement)("div",{className:"wcf-custom-node-wrapper wcf-ab-test-variation"+(y?" wcf-custom-node-wrapper--compact":"")},(0,i.createElement)("div",{className:"wcf-custom-node-design"},(0,i.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,i.createElement)(Zo,{content:(0,D.__)("View Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:n,target:"_blank",rel:"noreferrer","aria-label":(0,D.__)("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,i.createElement)(dR,{className:"w-5 h-5"}))),(0,i.createElement)(Zo,{content:v?dm():(0,D.__)("Edit Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:v?"#!":r,target:v?void 0:"_blank",rel:"noreferrer","aria-label":(0,D.__)("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,i.createElement)(uR,{className:"w-5 h-5"}))),(0,i.createElement)(Zo,{content:(0,D.__)("Edit Settings","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)(I,{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,D.__)("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,i.createElement)(fR,{className:"w-5 h-5"})))),(0,i.createElement)("div",{className:"wcf-custom-node-content bg-white border border-gray-200 rounded-lg shadow-md"+(p?" opacity-50":"")},(0,i.createElement)("div",{className:"wcf-custom-node-content--header flex flex-col gap-3 border-b border-gray-200 py-4 px-5"},(0,i.createElement)("div",{className:"wcf-node-step--info-wrapper flex flex-row items-center gap-4 w-full"},(0,i.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,i.createElement)($P,{className:n});break;case"optin":t=(0,i.createElement)(qP,{className:n});break;case"checkout":t=(0,i.createElement)(qI,{className:n});break;case"upsell":t=(0,i.createElement)(Dp,{className:n});break;case"downsell":t=(0,i.createElement)(KP,{className:n});break;case"thankyou":t=(0,i.createElement)(tR,{className:n});break;default:t=(0,i.createElement)(rR,{className:n})}return t})(x)),(0,i.createElement)("div",{className:"w-full flex flex-col gap-1"},(0,i.createElement)("div",{className:"wcf-node-step--type flex items-center gap-2"},(0,i.createElement)("span",{className:"text-xs font-normal text-gray-400 capitalize"},x),function(){let t="";return t=e.control_id===e.step_id?(0,i.createElement)("span",{className:"wcf-step-badge bg-primary-500 text-white text-xs px-2.5 py-1 rounded-full"},(0,D.__)("Control","cartflows")):(0,i.createElement)("span",{className:"wcf-step-badge bg-gray-800 text-white text-xs px-2.5 py-1 rounded-full"},(0,D.sprintf)(/* translators: %d is replaced with the count */ /* translators: %d is replaced with the count */ |
| 54 |
(0,D.__)("Variation-%d","cartflows"),d)),t}(),f&&(0,i.createElement)("span",{className:"wcf-flow-badge wcf-badge wcf-badge--error !text-[10px] !px-2 !py-px wcf-invalid-sequence-badge"},(0,i.createElement)(Rh,{className:"w-3.5 h-3.5 stroke-2","aria-hidden":"true"}),(0,D.__)("Invalid Position","cartflows"))),(0,i.createElement)("div",{className:"wcf-node-step--title text-left"},(0,i.createElement)("span",{className:"font-semibold text-sm text-gray-800 hover:text-gray-800"},N)))),function(){let e=null;return u||(e=(0,i.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-no-product-badge"},(0,D.__)("No Product Assigned","cartflows"))),e}(),p&&(0,i.createElement)("span",{className:"wcf-badge wcf-badge--error !flex !justify-center !rounded-sm !text-xs !text-center !py-2 wcf-disabled-step-badge"},(0,D.__)("Disabled","cartflows"))),(0,i.createElement)("div",{className:"wcf-custom-node-content--stats flex text-center justify-around items-center py-4 px-5"},(0,i.createElement)("div",{className:"wcf-step--stats-content--stat-view"},(0,i.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,D.__)("Views","cartflows")),(0,i.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,i.createElement)("div",{className:"wcf-step--stats-content--stat-conversation"},(0,i.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,D.__)("Conversions","cartflows")),(0,i.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,i.createElement)("div",{className:"wcf-step--stats-content--stat-revenue"},(0,i.createElement)("div",{className:"text-sm text-gray-400 capitalize"},(0,D.__)("Revenue","cartflows")),(0,i.createElement)("div",{className:"font-semibold text-base text-gray-800"},"thankyou"!==x&&"landing"!==x?l&&l?.visits?.revenue?Wm(l.visits.revenue):0:"-"))),(0,i.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,i.createElement)(Zo,{content:(0,D.__)("View Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:n,target:"_blank",rel:"noreferrer","aria-label":(0,D.__)("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,i.createElement)(dR,{className:"w-5 h-5"}))),(0,i.createElement)(Zo,{content:v?dm():(0,D.__)("Edit Page","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:v?"#!":r,target:v?void 0:"_blank",rel:"noreferrer","aria-label":(0,D.__)("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,i.createElement)(uR,{className:"w-5 h-5"}))),(0,i.createElement)(Zo,{content:(0,D.__)("Edit Settings","cartflows"),placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)(I,{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,D.__)("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,i.createElement)(fR,{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 d="";d=l||c?"wcf-pro text-text-disabled cursor-not-allowed":"text-text-tertiary";let u=n?.text;return l?u=(0,D.sprintf)( |
| 55 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 56 |
// translators: %s: action name (e.g. Clone, A/B Test). |
| 57 |
(0,D.__)("Upgrade to CartFlows Pro to use %s.","cartflows"),n?.text):c&&(u=(0,D.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,D.__)("Activate your CartFlows license to use %s.","cartflows"),n?.text)),(0,i.createElement)(Zo,{key:n?.slug,content:u,placement:"top",boundary:"viewport",arrow:!0},(0,i.createElement)("a",{href:n?.link,className:`wcf-step__action-btn relative ${r} ${d} 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&&a&&a[n?.slug]&&(e.preventDefault(),a[n?.slug](e))},"data-action":n?.ajaxcall},(0,i.createElement)("div",{className:"flex items-center gap-1.5"},function(e){let t="";switch(e){case"clone":t=(0,i.createElement)(oR,{className:"h-5 w-5"});break;case"delete":t=(0,i.createElement)(zo,{className:"h-5 w-5"});break;case"archived":t=(0,i.createElement)(iR,{className:"h-5 w-5"});break;case"winner":t=(0,i.createElement)(sR,{className:"h-5 w-5"});break;default:t=(0,i.createElement)(cR,{className:"h-5 w-5"})}return t}(n?.slug),(l||c)&&(0,i.createElement)($h,{className:"absolute -top-1 -right-1 w-4 h-4 text-brand-600 fill-brand-600","aria-label":(0,D.__)("Pro feature","cartflows")}))))})))))}},hF=mF,gF=(0,s.memo)(({data:e,isConnectable:t})=>{let n=GP;switch(e.step_type){case"landing":default:n=GP;break;case"checkout":n=vR;break;case"upsell":n=NR;break;case"downsell":n=_R;break;case"optin":n=fF;break;case"thankyou":n=dF}const r="upsell"===e.step_type||"downsell"===e.step_type,o="vertical"===e?.axis,a="LR"===e.direction?"target":"source",l="LR"===e.direction?"source":"target",[,c]=(0,s.useState)(!1),d=zh(),f=(0,qh.W6)(),[{license_status:p}]=u(),[{is_flow_instant_checkout:m}]=Zp(),h=hF.createEventHandlers(e,d,f,c);return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:"target",position:GA.Top,id:"top",style:{visibility:o?"visible":"hidden"},className:"react-flow__handle wcf-handle-top",isConnectable:t}),r&&"RL"===e.direction?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:a,position:GA.Left,className:"react-flow__handle-left-a wcf-handle-left",id:"a",style:{top:50},isConnectable:t}),(0,i.createElement)(rz,{type:a,position:GA.Left,className:"react-flow__handle-left-b wcf-handle-left",id:"b",style:{bottom:50,top:"auto"},isConnectable:t})):(0,i.createElement)(rz,{type:a,position:GA.Left,id:"left",style:{background:"#555"},className:"react-flow__handle wcf-handle-left",isConnectable:t}),hF.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,h,p,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,m),(0,i.createElement)("div",{className:"wcf-custom-node-label"},e.label),r&&"LR"===e.direction?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rz,{type:l,position:GA.Right,className:"react-flow__handle-right-a wcf-handle-right",id:"a",style:{top:50},isConnectable:t}),(0,i.createElement)(rz,{type:l,position:GA.Right,className:"react-flow__handle-right-b wcf-handle-right",id:"b",style:{bottom:50,top:"auto"},isConnectable:t})):(0,i.createElement)(rz,{type:l,position:GA.Right,className:"react-flow__handle wcf-handle-right",id:"right",isConnectable:t}))}),wF=Ao("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"}]]),yF=(0,s.forwardRef)(({variant:e="primary",size:t="md",border:n="subtle",src:r,alt:o,children:a,className:i,...l},c)=>{const[d,u]=(0,s.useState)(!1),f={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],p={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],m={none:"",subtle:"ring-1 ring-border-transparent-subtle",ring:"ring ring-border-subtle"}[r&&"none"===n?"subtle":n],h=r?"object-cover object-center":"",g=!r||d,w=g?"div":"img";return(0,s.useEffect)(()=>{u(!1)},[r]),(0,C.jsx)(w,{ref:c,className:Ie("rounded-full overflow-hidden flex items-center justify-center",g&&f,p,m,h,i),...g?{children:(()=>{if(r&&d){if(o&&"string"==typeof o)return o?.[0]?.toUpperCase();if(a&&"string"==typeof a)return a?.[0]?.toUpperCase();if(!a&&!o)return(0,C.jsx)(wF,{})}return a?"string"==typeof a?a?.[0]?.toUpperCase():a:null})()}:{src:r,alt:o,onError:()=>{u(!0)}},...l})}),bF=Ao("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"}]]),vF=Ao("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"}]]),xF=Ao("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"}]]),NF=Ao("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"}]]),_F=Ao("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"}]]),EF=Ao("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"}]]),MF=Ao("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"}]]),IF=({action:e,nonce:t,stepId:n,flowId:r,controlId:o})=>{const a=new window.FormData;return a.append("action",e),a.append("security",t),a.append("step_id",n),a.append("flow_id",r),a.append("control_id",o),a},SF=async({confirm:e,title:t,description:n,actionText:r,payload:o,successText:a,errorText:i})=>!!await e({title:t,description:n,actionBtnText:r,cancelBtnText:(0,D.__)("Cancel","cartflows")})&&(e=>Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}))(o).then(()=>{gm.success(a),window.location.reload()}).catch(()=>{gm.error(i)}),kF={restore:({confirm:e,stepId:t,flowId:n,controlId:r})=>SF({confirm:e,title:(0,D.__)("Restore Archived Variation","cartflows"),description:(0,D.__)("Do you want to restore this archived variation? Are you sure?","cartflows"),actionText:(0,D.__)("Restore","cartflows"),payload:IF({action:"cartflows_restore_archive_ab_test_variation",nonce:cartflows_admin.wcf_restore_archive_ab_test_variation_nonce,stepId:t,flowId:n,controlId:r}),successText:(0,D.__)("Variation restored.","cartflows"),errorText:(0,D.__)("Failed to restore variation. Please try again.","cartflows")}),delete:({confirm:e,stepId:t,flowId:n,controlId:r})=>SF({confirm:e,title:(0,D.__)("Trash Archived Variation","cartflows"),description:(0,D.__)("This action will trash this archived variation and its analytics data permanently. Do you want to delete this archived variation?","cartflows"),actionText:(0,D.__)("Trash","cartflows"),payload:IF({action:"cartflows_delete_archive_ab_test_variation",nonce:cartflows_admin.wcf_delete_archive_ab_test_variation_nonce,stepId:t,flowId:n,controlId:r}),successText:(0,D.__)("Variation moved to trash.","cartflows"),errorText:(0,D.__)("Failed to delete variation. Please try again.","cartflows")}),hide:({confirm:e,stepId:t})=>SF({confirm:e,title:(0,D.__)("Hide Archived Variation","cartflows"),description:(0,D.__)("This action will hide this archived variation from the list of steps, but its analytics will be visible. Do you want to hide this archived variation?","cartflows"),actionText:(0,D.__)("Hide","cartflows"),payload:(()=>{const e=new window.FormData;return e.append("action","cartflows_hide_archive_ab_test_variation"),e.append("security",cartflows_admin.hide_archive_ab_test_variation_nonce),e.append("step_id",t),e})(),successText:(0,D.__)("Variation hidden.","cartflows"),errorText:(0,D.__)("Failed to hide variation. Please try again.","cartflows")}),deleteArch:({confirm:e,stepId:t,flowId:n,controlId:r})=>SF({confirm:e,title:(0,D.__)("Trash Archived Variation","cartflows"),description:(0,D.__)("This action will delete this archived variation and its analytics data permanently. Do you want to delete this archived variation?","cartflows"),actionText:(0,D.__)("Delete","cartflows"),payload:IF({action:"cartflows_permanent_delete_archive_ab_test_variation",nonce:cartflows_admin.permanent_delete_archive_ab_test_variation_nonce,stepId:t,flowId:n,controlId:r}),successText:(0,D.__)("Variation permanently deleted.","cartflows"),errorText:(0,D.__)("Failed to delete variation. Please try again.","cartflows")})},DF=({open:e,setOpen:t,variations:n,type:r,flowId:o,controlId:a})=>{const s=zh(),l=n.filter(e=>"1"!==e.hide),c=l.filter(e=>e.deleted).length;return(0,i.createElement)(vh,{open:e,setOpen:t,design:"footer-divided",exitOnClickOutside:!1,exitOnEsc:!1,className:"!z-[999998]"},(0,i.createElement)(vh.Portal,null,(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Panel,{className:"w-[640px] max-w-[92vw]"},(0,i.createElement)(vh.Header,{className:"flex items-start justify-between"},(0,i.createElement)("div",{className:"space-y-1"},(0,i.createElement)(vh.Title,null,(0,D.__)("Archived Variations","cartflows")),(0,i.createElement)(vh.Description,null,(0,D.__)("Restore a variation back into the test, or delete it permanently.","cartflows"))),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,null,(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"xs"},l.map(e=>(0,i.createElement)(Pm,{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,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",gap:"sm"},(0,i.createElement)(yF,{variant:"primary-light",size:"sm",className:"!rounded-md !text-brand-500 ring-1 ring-brand-200 !p-1"},(e=>({landing:(0,i.createElement)(bF,{className:"w-5 h-5"}),checkout:(0,i.createElement)(vF,{className:"w-5 h-5"}),upsell:(0,i.createElement)(cR,{className:"w-5 h-5"}),downsell:(0,i.createElement)(xF,{className:"w-5 h-5"}),thankyou:(0,i.createElement)(NF,{className:"w-5 h-5"}),optin:(0,i.createElement)(_F,{className:"w-5 h-5"})}[e]||(0,i.createElement)(bF,{className:"w-5 h-5"})))(r)),(0,i.createElement)(Pm,{containerType:"flex",direction:"column",className:"!gap-1"},(0,i.createElement)(Pm,{containerType:"flex",direction:"row",align:"center",gap:"xs"},(0,i.createElement)(Ym,{size:12,weight:400,color:"tertiary",className:"capitalize"},"thankyou"===r?(0,D.__)("Thank You","cartflows"):r),(0,i.createElement)(Tf,{size:"xs",type:"pill",variant:e.deleted?"red":"inverse",className:"!font-normal text-[0.5rem]",label:(e.deleted?(0,D.__)("Deleted On: ","cartflows"):(0,D.__)("Archived On: ","cartflows"))+e.date})),(0,i.createElement)(Ym,{size:14,weight:400,color:"primary"},e.title))),(0,i.createElement)(Pm,{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,i.createElement)(Po,{key:t.slug,variant:"ghost",size:"xs",icon:(r=t.slug,{restore:(0,i.createElement)(EF,{className:"w-4 h-4"}),delete:(0,i.createElement)(zo,{className:"w-4 h-4"}),hide:(0,i.createElement)(MF,{className:"w-4 h-4"}),deleteArch:(0,i.createElement)(zo,{className:"w-4 h-4"})}[r]),iconPosition:"left",onClick:()=>((e,t)=>{const n=kF[e];n&&n({confirm:s,stepId:t.id,flowId:o,controlId:a})})(t.slug,e),className:`${n} !rounded-md`},t.text);var r})))))),(0,i.createElement)(vh.Footer,{className:"justify-between items-center border-0 border-t border-solid border-border-subtle"},(0,i.createElement)(Ym,{size:12,color:"tertiary"},l.length," ",(0,D.__)("archived","cartflows"),c>0&&` · ${c} ${(0,D.__)("deleted","cartflows")}`),(0,i.createElement)(Po,{variant:"outline",size:"sm",onClick:()=>t(!1)},(0,D.__)("Close","cartflows"))))))},CF=({variations:e=[],type:t,flowId:n,controlId:r})=>{const o=e.filter(e=>"1"!==e.hide).length,[a,l]=(0,s.useState)(!1);return 0===o?null:(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(iR,{className:"w-3.5 h-3.5"}),iconPosition:"left",onClick:()=>l(!0),className:"bg-background-primary border border-solid border-border-subtle shadow-sm rounded-full"},(0,i.createElement)("span",{className:"inline-flex items-center gap-1"},(0,D.__)("Archived","cartflows"),(0,i.createElement)(Tf,{size:"xxs",type:"rounded",variant:"inverse",label:String(o),className:"inline-flex"}))),(0,i.createElement)(DF,{open:a,setOpen:l,variations:e,type:t,flowId:n,controlId:r}))},jF=(0,s.memo)(({data:e,isConnectable:t})=>{const{step:n,flow_id:r,isDynamicOfferGroup:o,isOfferABTestGroup:a}=e;if(o)return(0,i.createElement)("div",{className:"dynamic-offer-group-container",style:{width:"100%",height:"100%",position:"relative"}});if(a){if(!n)return null;const e=n["ab-test-variations"]||[],t=n["ab-test-start"]||!1;return(0,i.createElement)("div",{className:"offer-ab-test-group-container"},(0,i.createElement)("div",{className:"ab-test-group-header absolute w-3/4 mx-auto top-[-30px] left-0 right-0 z-10"},(0,i.createElement)(og,{flow_id:r,control_id:n.id,step_id:n.id,abvariations:e,ab_test_start:t,compact:!0})))}if(!n)return null;const s=n["ab-test-variations"]||[],l=n["ab-test-start"]||!1;return(0,i.createElement)("div",{className:"ab-test-group-container"},(0,i.createElement)(rz,{type:"target",position:GA.Top,id:"top",style:{background:"#555",width:"10px",height:"10px",top:"-5px",left:"50%"},isConnectable:t}),(0,i.createElement)(rz,{type:"target",position:GA.Left,id:"left",style:{background:"#555",width:"10px",height:"10px",left:"-5px",top:"50%"},isConnectable:t}),(0,i.createElement)("div",{className:"ab-test-group-header absolute w-3/4 mx-auto top-[-30px] left-0 right-0 z-10"},(0,i.createElement)(og,{flow_id:r,control_id:n.id,step_id:n.id,abvariations:s,ab_test_start:l,compact:!0})),(0,i.createElement)("div",{className:"absolute -bottom-[14px] right-3 z-10"},(0,i.createElement)(CF,{variations:n["ab-test-archived-variations"]||[],type:n.type,flowId:r,controlId:n.id})),(0,i.createElement)(rz,{type:"source",position:GA.Right,id:"right",style:{background:"#555",width:"10px",height:"10px",right:"-5px",top:"50%"},isConnectable:t}),(0,i.createElement)(rz,{type:"source",position:GA.Bottom,id:"bottom",style:{background:"#555",width:"10px",height:"10px",bottom:"-5px",left:"50%"},isConnectable:t}))});jF.displayName="ABTestGroupNode";const AF=jF;var TF=n(6246),LF=n.n(TF);const OF=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:[]}}},zF=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;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][]`,e)}):o.append(`wcf-checkout-rules[${t}][rules][${n}][value]`,e.value)})}),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}},PF=["upsell","downsell"],RF=(e,t=[])=>{const n=[];if(!e||!e.type)return n;if(PF.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,D.__)("Accept target step is missing","cartflows")}),a&&!r.has(a)&&n.push({kind:"broken-redirect",severity:"error",message:(0,D.__)("Reject target step is missing","cartflows")})}return n},UF=550,BF=350,FF=-200,QF=300,VF=-50,YF=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(zF.hasDynamicOffers(e)){const t=zF.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=zF.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:UF,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+BF:r)}const a=this.steps[t-1],i=this.positions.get(a.id);if(i){let e=r;return i.hasDynamicOffers&&(e+=BF),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:UF,s=o+(a?i+BF: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+VF+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+VF+50-e.variationIndex*QF+150:t.y+FF:FF}applyABTestAcceptOffset(e,t){if(this.hasABTestVariations(e)){const n=this.calculateABGroupHeight(e["ab-test-variations"].length);return t+FF-n/3}return t}calculateABGroupHeight(e){return e*QF+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*QF+50}}static calculateABVariationPosition(e){return{x:25,y:50+e*QF}}static getABGroupYOffset(){return VF}},ZF={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}},WF=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?ZF.getInvalidStepIds(e):new Set,this.positionCalculator=new YF(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!OF.validateStepPosition(e,n,t,this.steps,this.flowType).isValid}createStartNode(){return{id:"wcf_start_node",type:"label",data:{position:"start",label:(0,D.__)("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,D.__)("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 d=e.actions?.view?.link||"",u=e.page_builder_edit?e.page_builder_edit.replace(/&/g,"&"):"",f=e.actions?.edit?.link||"",p="storeCheckout"===this.flowType?ZF.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:u,editSettings:f,viewPageLink:d,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:RF(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=YF.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}=YF.calculateABGroupDimensions(r.length),i="vertical"===this.axis?-25:VF,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}=YF.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+VF},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=YF.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(zF.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+UF,s=this.createConditionalNode(n,o,i);return e.push(s),void(t=o+BF)}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)=>{YF.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+UF});const n=this.positionCalculator.getMaxX(),r=Math.max(n+UF,t);return e.push(this.createEndNode(r)),e}},GF=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",d={label:l?(0,D.__)("Accept","cartflows"):(0,D.__)("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(),...d,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,D.__)("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,D.sprintf)(/* translators: %d is replaced with the condition number */ /* translators: %d is replaced with the condition number */ |
| 61 |
(0,D.__)("Condition %d","cartflows"),n+1),kind:"condition"}}return{label:(0,D.__)("Condition","cartflows"),kind:"condition"}}createConditionalEdges(e,t){const n=[];return zF.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(zF.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=>{zF.hasDynamicOffers(e)&&zF.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(!zF.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}},HF=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 WF(e,t,n,r,o,a,i),this.edgeBuilder=new GF(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(LF().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)}),LF().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"}`}},$F=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),Xf()({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),Xf()({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,D.__)("Invalid step connection.","cartflows")),{isValid:!1,errors:r};if(o===a)return r.push((0,D.__)("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,D.__)("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,D.__)("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 OF.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,D.__)("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,D.__)("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 d=s&&this.offerSteps.includes(s.type),u=e.sourceHandle,f=this.createEdgeData(e,s,d),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${u?"-"+u:""}-${n}`,target:t};e.push(r)}),this.setEdges(t=>[...t,...e])}else{f.target=p[0];const e=YT(f,this.edges);this.setEdges(e)}d&&u?(0,Xh.$h)(this.updateOfferRedirection(m,u,o)):!a&&s&&(0,Xh.$h)(this.updateStepConnection(m,o))}},XF=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(!zF.isConditionalEdge(e))return!1;const t=zF.extractCheckoutId(e.source),n=zF.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=zF.removeConditionsForStep(r.conditions,n),a=zF.updateDefaultStep(r.default_step,n,o);return await this.saveRules(t,o,a),!0}async saveRules(e,t,n){const r=zF.buildRulesFormData(e,this.flowId,t,n);try{const e=await(0,Xh.$h)(Xf()({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 zF.hasDynamicOffers(t)}},qF=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 XF(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=zF.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)&&zF.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)}},JF=()=>{const e=(0,m.useHistory)(),[{flow_type:t,flow_id:n}]=Zp(),r="storeCheckout"===t,[o,a]=(0,s.useState)(null),l=async({key:e,flowName:t,instantLayout:n})=>{if(!o){a(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"),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n})})({flowName:t,instantLayout:n});if(!e?.success)return gm.error((0,D.__)("Failed to create funnel.","cartflows")),void a(null);gm.success((0,D.__)("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){gm.error((0,D.__)("Failed to create funnel.","cartflows")),a(null)}}},c=[{key:"template",icon:Hm,title:(0,D.__)("Use a template","cartflows"),description:(0,D.__)("Start with a proven layout from our template library.","cartflows"),cta:(0,D.__)("Browse templates","cartflows"),onClick:()=>{e.push({pathname:"admin.php",search:"?page=cartflows&path=library"})}},{key:"quick-checkout",icon:qI,title:(0,D.__)("Quick checkout","cartflows"),description:(0,D.__)("Spin up a checkout funnel with Instant Layout enabled.","cartflows"),cta:(0,D.__)("Create checkout funnel","cartflows"),onClick:()=>l({key:"quick-checkout",flowName:(0,D.__)("Quick Checkout Funnel","cartflows"),instantLayout:!0})},{key:"scratch",icon:yg,title:(0,D.__)("Build from scratch","cartflows"),description:(0,D.__)("Start with an empty funnel and add steps yourself.","cartflows"),cta:(0,D.__)("Create blank funnel","cartflows"),onClick:()=>l({key:"scratch",flowName:(0,D.__)("New Funnel","cartflows"),instantLayout:!1})}],d=[{key:"store-template",icon:Hm,title:(0,D.__)("Use a Store Checkout template","cartflows"),description:(0,D.__)("Start from a ready-made Store Checkout layout.","cartflows"),cta:(0,D.__)("Browse templates","cartflows"),onClick:()=>{e.push({pathname:"admin.php",search:"?page=cartflows&path=store-checkout-library"})}},{key:"store-add-step",icon:yg,title:(0,D.__)("Add a step","cartflows"),description:(0,D.__)("Pick a step type to add to this Store Checkout.","cartflows"),cta:(0,D.__)("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?d:c,f=r?(0,D.__)("Start building your Store Checkout","cartflows"):(0,D.__)("Create your first funnel","cartflows"),p=r?(0,D.__)("Pick a starting point for this Store Checkout — you can always change things later.","cartflows"):(0,D.__)("Pick how you’d like to begin — you can always change things later.","cartflows"),h=`grid grid-cols-1 ${2===u.length?"md:grid-cols-2":"md:grid-cols-3"} gap-4`;return(0,i.createElement)(Pm,{align:"center",justify:"center",className:"wcf-canvas-empty-state w-full h-full bg-background-secondary"},(0,i.createElement)(Pm,{direction:"column",gap:"lg",className:"wcf-canvas-empty-state__panel max-w-4xl w-full mx-auto px-6 py-10"},(0,i.createElement)(Pm,{direction:"column",align:"center",gap:"xs",className:"text-center"},(0,i.createElement)(iS,{tag:"h2",size:"md",title:f}),(0,i.createElement)(Ym,{size:16,color:"secondary"},p)),(0,i.createElement)("div",{className:h},u.map(e=>{const t=e.icon,n=o===e.key;return(0,i.createElement)(Pm,{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,i.createElement)(Pm,{align:"center",justify:"center",className:"wcf-canvas-empty-state__icon w-10 h-10 rounded-md bg-primary-50 text-primary-500"},(0,i.createElement)(t,{className:"w-5 h-5 stroke-2"})),(0,i.createElement)(iS,{tag:"h3",size:"sm",title:e.title}),(0,i.createElement)(Ym,{size:14,color:"secondary",className:"flex-1"},e.description),(0,i.createElement)(Po,{variant:"secondary",size:"sm",loading:n,disabled:!!o&&!n,onClick:e.onClick},e.cta))}))))},KF=[{label:(0,D.__)("Open shortcuts panel","cartflows"),keys:["mod","/"]},{label:(0,D.__)("Open shortcuts panel (alt)","cartflows"),keys:["?"]},{label:(0,D.__)("Exit fullscreen","cartflows"),keys:["Esc"]},{label:(0,D.__)("Fit canvas to view","cartflows"),keys:["F"]},{label:(0,D.__)("Tidy layout","cartflows"),keys:["T"]},{label:(0,D.__)("Toggle vertical / horizontal layout","cartflows"),keys:["V"]},{label:(0,D.__)("Toggle minimap","cartflows"),keys:["M"]},{label:(0,D.__)("Toggle compact / detailed cards","cartflows"),keys:["C"]},{label:(0,D.__)("Zoom in","cartflows"),keys:["+"]},{label:(0,D.__)("Zoom out","cartflows"),keys:["−"]},{label:(0,D.__)("Duplicate selected step","cartflows"),keys:["mod","D"]},{label:(0,D.__)("Delete selected node","cartflows"),keys:["Backspace"]}],eQ=({children:e})=>(0,i.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),tQ=({open:e,onClose:t})=>{const n="undefined"!=typeof navigator&&/mac|iphone|ipad|ipod/i.test(navigator.platform||"")?"⌘":"Ctrl";return(0,i.createElement)(vh,{open:!!e,setOpen:e=>{e||t?.()},exitOnEsc:!0,exitOnClickOutside:!0,scrollLock:!0},(0,i.createElement)(vh.Portal,null,(0,i.createElement)(vh.Panel,{className:"max-w-xl gap-0"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Header,{className:"flex items-center justify-between px-6 pt-5 pb-0"},(0,i.createElement)(vh.Title,null,(0,D.__)("Keyboard shortcuts","cartflows")),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,{className:"px-6 py-4"},(0,i.createElement)(Pm,{direction:"column",gap:"sm",className:"m-0 p-0"},KF.map((e,t)=>(0,i.createElement)(Pm,{key:t,align:"center",justify:"between",gap:"md"},(0,i.createElement)(Ym,{size:14,color:"primary"},e.label),(0,i.createElement)(Pm,{align:"center",gap:"xs"},e.keys.map((e,t)=>(0,i.createElement)(s.Fragment,{key:t},t>0&&(0,i.createElement)(Ym,{size:12,color:"tertiary"},"+"),(0,i.createElement)(eQ,null,"mod"===e?n:e)))))))))))},nQ="wcf_canvas_axis",rQ="wcf_canvas_minimap",oQ="wcf_canvas_compact",aQ=()=>"vertical"===window.localStorage.getItem(nQ)?"vertical":"horizontal",iQ=()=>{const e=window.localStorage.getItem(rQ);return null===e||"true"===e},sQ=()=>{const e=window.localStorage.getItem(oQ);return null===e?null:"true"===e},lQ={custom:function(e){const{id:t,sourceX:n,sourceY:r,targetX:o,targetY:a,sourcePosition:s,targetPosition:l,style:c={},label:d,labelStyle:u,labelBgStyle:f,data:p,markerEnd:h}=e,g=p?.edgeStyle||"smoothstep",[w,y,b]="bezier"===g?BT({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:a,targetPosition:l}):$T({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:a,targetPosition:l}),v=!!d,x=p?.kind;let N=24;"accept"===x||"reject"===x?N=80:("condition"===x||"default"===x)&&(N=110);const[{flow_id:_,flow_type:E}]=Zp(),M=(0,m.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,i.createElement)(i.Fragment,null,(0,i.createElement)(_z,{id:t,path:w,style:c,markerEnd:h,interactionWidth:20}),(0,i.createElement)(gP,null,(0,i.createElement)("div",{className:"nodrag nopan wcf-edge-add-button flex items-center justify-center gap-1",style:{position:"absolute",transform:`translate(-50%, -50%) translate(${y}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,i.createElement)("span",{style:{color:u?.fill,fontWeight:u?.fontWeight,fontSize:u?.fontSize,lineHeight:1,paddingLeft:"4px"}},d),S&&(0,i.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"===E?"admin.php?page=cartflows&path=store-checkout":"admin.php?page=cartflows&path=flows",i=`&action=wcf-edit-flow&flow_id=${_}&tab=library`;M.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,i.createElement)(yg,{className:"text-primary-600",style:{width:v?"14px":"16px",height:v?"14px":"16px"}})))))}},cQ={label:VP,conditional:WP,landing:bR,checkout:xR,offer:cF,thankyou:uF,optin:pF,abtest:gF,group:AF},dQ={x:0,y:150,zoom:.75},uQ=[10,10],fQ={padding:.2,duration:400,minZoom:.3},pQ=({x:e,y:t,width:n,height:r,color:o,strokeColor:a,strokeWidth:s,borderRadius:l})=>{const c=e+n/2,d=t+r/2;return(0,i.createElement)("rect",{x:c-160,y:d-120,width:320,height:240,fill:o,stroke:a,strokeWidth:s,rx:l,ry:l})};function mQ({renderCb:e}){const[{steps:t,flow_type:n,flow_id:r,flow_analytics:o,emptySteps:a},l]=Zp(),[{},c]=u(),d=(0,s.useMemo)(()=>wcfCartflowsPro()?t:t.filter(e=>"upsell"!==e.type&&"downsell"!==e.type),[t]),[f,p]=(0,s.useState)(""),[m,h]=(0,s.useState)(!1),[g,w]=(0,s.useState)(null),[y,b]=(0,s.useState)("smoothstep"),[v,x]=(0,s.useState)(!0),N=(0,s.useMemo)(()=>({deletable:!0,focusable:!0,selectable:!0,style:{stroke:"#4B5563",strokeWidth:1},markerEnd:{type:WA.ArrowClosed,width:40,height:40,color:"#f06434"},data:{edgeStyle:y}}),[y]),_=""!==f?"wcf-fullscreen":"",E=cartflows_admin.is_rtl?"RL":"LR",M={direction:"initial"},[I,S,k]=function(){const[e,t]=(0,s.useState)([]),n=(0,s.useCallback)(e=>t(t=>SO(e,t)),[]);return[e,t,n]}(),[C,j,A]=function(){const[e,t]=(0,s.useState)([]),n=(0,s.useCallback)(e=>t(t=>kO(e,t)),[]);return[e,t,n]}(),{axis:T,setAxis:L,toggleAxis:O,showMinimap:z,setShowMinimap:P,compact:R,toggleCompact:U}=(({autoCompact:e=!1}={})=>{const[t,n]=(0,s.useState)(aQ),[r,o]=(0,s.useState)(iQ),[a,i]=(0,s.useState)(sQ),l=(0,s.useCallback)(e=>{const t="vertical"===e?"vertical":"horizontal";window.localStorage.setItem(nQ,t),n(t)},[]),c=(0,s.useCallback)(()=>{l("horizontal"===aQ()?"vertical":"horizontal")},[l]),d=(0,s.useCallback)(e=>{const t=!!e;window.localStorage.setItem(rQ,String(t)),o(t)},[]),u=(0,s.useCallback)(e=>{const t=!!e;window.localStorage.setItem(oQ,String(t)),i(t)},[]),f=(0,s.useCallback)(()=>{u(!(null===a?e:a))},[a,e,u]);return{axis:t,setAxis:l,toggleAxis:c,showMinimap:r,setShowMinimap:d,compact:null===a?e:a,setCompact:u,toggleCompact:f}})({autoCompact:d.length>12}),[B,F]=(0,s.useState)(0),Q=(0,s.useRef)(T),V=(0,s.useRef)(R),{fitView:Y,zoomIn:Z,zoomOut:W,setCenter:G,getViewport:H}=UO(),{zoom:$}=$L(wP,ZL),X=NO("Escape"),[q,J]=(0,s.useState)(!1),[K,ee]=(0,s.useState)(0),te=()=>{c({status:"SAVED"}),F(e=>e+1),e(),setTimeout(()=>Y(fQ),50)};(0,s.useEffect)(()=>{const e=new HF(d,n,r,o,E,T,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=Q.current!==T;Q.current=T;const l=V.current!==R;V.current=R;const c=B>0||s||l;S(e=>{if(c)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)}),j(i)},[d,n,r,o,E,T,R,B,S,j]);const ne=(0,s.useCallback)(t=>{new $F(d,n,r,I,C,j,w,l,c,e).handleConnect(t)},[d,n,r,I,C,j,l,c,e]),re=(0,s.useCallback)(t=>{new qF(C,j,A,d,l,r,c,e).handleEdgeChanges(t)},[C,j,A,d,l,r,c,e]);(0,s.useEffect)(()=>{j(e=>e.map(e=>({...e,data:{...e.data,edgeStyle:y}})))},[y,j]),(0,s.useEffect)(()=>(document.body.classList.add("wcf-flow-overview-screen"),()=>document.body.classList.remove("wcf-flow-overview-screen")),[]),(0,s.useEffect)(()=>{X&&"fullscreen"===f&&(p(""),Y(fQ))},[X,f,Y]),(0,s.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(),Y(fQ);break;case"t":e.preventDefault(),te();break;case"v":e.preventDefault(),O(),setTimeout(()=>Y(fQ),50);break;case"m":e.preventDefault(),P(!z);break;case"c":e.preventDefault(),U(),setTimeout(()=>Y(fQ),50);break;case"+":case"=":e.preventDefault(),Z({duration:200});break;case"-":e.preventDefault(),W({duration:200})}}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[Y,Z,W,O,U,z,P]),(0,s.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;yR.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=()=>{p("fullscreen"),h(!0),setTimeout(()=>{h(!1)},3e3),Y(fQ)},ae=()=>{p(""),Y(fQ)};return d.length<=0?(0,i.createElement)("div",{className:`wcf-steps-chart wcf-steps-chart--empty flex w-full h-screen items-center justify-center ${_}`,style:M},a?(0,i.createElement)(JF,null):(0,i.createElement)(Kg,{variant:"primary",size:"lg"})):(0,i.createElement)("div",{className:`wcf-steps-chart flex justify-center mx-auto h-screen w-full ${_}`,style:M},I.length>0&&(0,i.createElement)(mP,{minZoom:.3,maxZoom:1,nodes:I,edges:C,edgeTypes:lQ,colorMode:"light",onNodesChange:k,onEdgesChange:re,onConnect:ne,nodeTypes:cQ,snapToGrid:!0,snapGrid:uQ,defaultViewport:dQ,onInit:e=>{e.fitView(fQ)},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,i.createElement)(EP,{variant:"dots",gap:16,size:1,color:"#d1d5db"}),z&&(0,i.createElement)(FP,{pannable:!0,zoomable:!0,position:cartflows_admin.is_rtl?"bottom-left":"bottom-right",bgColor:"#ffffff",nodeColor:"#ffedd5",nodeStrokeColor:"#fdba74",nodeStrokeWidth:1,nodeBorderRadius:3,nodeComponent:pQ,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,i.createElement)(aO,{position:"top-right",className:"flex flex-col items-end gap-2"},(0,i.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,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Vertical Layout","cartflows"),placement:"left"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,i.createElement)(Rk,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,D.__)("Vertical Layout","cartflows"),onClick:()=>{"vertical"!==T&&(L("vertical"),setTimeout(()=>Y(fQ),50))}})),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Horizontal Layout","cartflows"),placement:"left"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,i.createElement)(Uk,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,D.__)("Horizontal Layout","cartflows"),onClick:()=>{"horizontal"!==T&&(L("horizontal"),setTimeout(()=>Y(fQ),50))}}))),(0,i.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,i.createElement)(Zo,{arrow:!0,variant:"dark",content:v?(0,D.__)("Lock Interaction","cartflows"):(0,D.__)("Unlock Interaction","cartflows"),placement:"left"},(0,i.createElement)(Po,{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,i.createElement)(Bk,{className:"!fill-[none] stroke-[1.5]"}):(0,i.createElement)(Fk,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":v?(0,D.__)("Lock Interaction","cartflows"):(0,D.__)("Unlock Interaction","cartflows"),onClick:()=>x(!v)})),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:"smoothstep"===y?(0,D.__)("Switch to Wavy Edges","cartflows"):(0,D.__)("Switch to Smooth Edges","cartflows"),placement:"left"},(0,i.createElement)(Po,{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,i.createElement)(Qk,{className:"!fill-[none] stroke-[1.5]"}):(0,i.createElement)(Vk,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,D.__)("Edge Style","cartflows"),onClick:()=>{b(e=>"smoothstep"===e?"bezier":"smoothstep")}})),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Tidy Layout","cartflows"),placement:"left"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,i.createElement)(Yk,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,D.__)("Tidy Layout","cartflows"),onClick:te})),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Fit View","cartflows"),placement:"left"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hidden hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,i.createElement)(Zk,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,D.__)("Fit View","cartflows"),onClick:()=>Y(fQ)})),(()=>{const e="fullscreen"===f;return(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:e?(0,D.__)("Exit Full Screen","cartflows"):(0,D.__)("Full Screen","cartflows"),placement:"left"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:e?(0,i.createElement)(zk,{className:"!fill-[none] stroke-[1.5]"}):(0,i.createElement)(Pk,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":e?(0,D.__)("Exit Full Screen","cartflows"):(0,D.__)("Full Screen","cartflows"),onClick:e?ae:oe}))})(),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Keyboard Shortcuts (?)","cartflows"),placement:"left"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,i.createElement)(Wk,{className:"!fill-[none] stroke-[1.5]"}),"aria-label":(0,D.__)("Keyboard Shortcuts","cartflows"),onClick:()=>J(!0)})))),(0,i.createElement)(aO,{position:"bottom-left"},(0,i.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,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",onClick:()=>Y(fQ)},(0,D.__)("Fit","cartflows")),(0,i.createElement)("div",{className:"w-px h-4 bg-border-subtle","aria-hidden":"true"}),(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,i.createElement)(Dg,{className:"stroke-[1.5]"}),"aria-label":(0,D.__)("Zoom Out","cartflows"),onClick:()=>W({duration:200})}),(0,i.createElement)(Ym,{size:12,weight:600,className:"tabular-nums min-w-[44px] text-center"},Math.round(100*$),"%"),(0,i.createElement)(Po,{variant:"ghost",size:"xs",className:"hover:bg-badge-hover-gray hover:text-text-primary focus:ring-1 focus:ring-offset-0",icon:(0,i.createElement)(yI,{className:"stroke-[1.5]"}),"aria-label":(0,D.__)("Zoom In","cartflows"),onClick:()=>Z({duration:200})}))),m&&(0,i.createElement)(aO,{position:"top-center",className:"wcf-steps-chart__exit-screen-msg"},(0,D.__)("Press ESC to exit full screen.","cartflows")),g&&(0,i.createElement)(aO,{position:"top-center",className:"wcf-steps-chart__error-msg"},g)),(0,i.createElement)(tQ,{open:q,onClose:()=>J(!1)}))}const hQ=function(e){return(0,i.createElement)(uP,null,(0,i.createElement)(mQ,e))},gQ=function({renderCb:e}){return(0,i.createElement)("div",{className:"wcf-steps-page-wrapper border-t border-border-subtle -mt-px"},(0,i.createElement)(hQ,{renderCb:e}))};function wQ({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 yQ=s.forwardRef(wQ);function bQ({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 vQ=s.forwardRef(bQ);function xQ({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 NQ=s.forwardRef(xQ),_Q=e=>{var t;const{steps:n}=e,[r,o]=(0,s.useState)(""),[a,l]=(0,s.useState)(""),[{flow_id:c,flow_title:d,flow_type:u},f]=Zp(),p=(0,m.useHistory)(),h=null!==(t=new URLSearchParams((0,m.useLocation)()?.search).get("automation"))&&void 0!==t?t:"";(0,s.useEffect)(()=>{const e=n.find(e=>e.id===parseInt(h));e&&(o(e.title),l(e.type))},[h,n]);return(0,s.useEffect)(()=>{r&&(()=>{const e=new window.FormData;e.append("action","cartflows_get_suretriggers_data"),e.append("security",cartflows_admin.get_suretriggers_data_nonce),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e&&e?.success&&e?.data?.connected&&(e=>{if(e&&d){let t=[];switch(a){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=h,t&&t.length>0&&(e.allowed_events={CartFlows:{triggers:t}}),e.selected_options={funnel_id:{value:c,label:d},funnel_step_id:{value:h,label:r}},f({type:"SET_SURETRIGGERS_CONFIG",config:e})}})(e?.data?.data)})})()},[r]),(0,i.createElement)(YS,{open:""!==h,setOpen:e=>{e||p.push("storeCheckout"===u?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${c}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${c}`)},position:"right",exitOnClickOutside:!0,exitOnEsc:!1,className:"wcf-funnel-step-setting--slide-out"},(0,i.createElement)(YS.Panel,{className:"pointer-events-auto w-screen max-w-4.5xl relative top-1"},(0,i.createElement)(YS.Backdrop,null),(0,i.createElement)("div",{className:"wcf-slide-out-panel--close bg-background-primary absolute -left-10"},(0,i.createElement)(I,{key:"close",to:{pathname:"admin.php",search:"storeCheckout"===u?`?page=cartflows&path=store-checkout&action=wcf-edit-flow&flow_id=${c}`:`?page=cartflows&path=flows&action=wcf-edit-flow&flow_id=${c}`},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,i.createElement)("button",{type:"button",onClick:()=>{o("")}},(0,i.createElement)(ww,{className:"w-5 h-5","aria-hidden":"true"})))),(0,i.createElement)(YS.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,i.createElement)("form",null,(0,i.createElement)(YS.Header,{className:"wcf-slide-out-panel--header flex justify-between px-6 py-5 !space-y-0"},(0,i.createElement)("div",{className:"wcf-slide-out-panel--step-title"},(0,i.createElement)(YS.Title,{className:"text-lg font-medium text-text-primary"},(0,D.__)("Automation for","cartflows"),":"," ",r))),(0,i.createElement)("div",{className:"wcf-slide-out-panel--settings flex-1 p-8 border-t border-border-subtle px-6"},(0,i.createElement)("div",{id:"suretriggers-iframe-wrapper",style:{width:"100%",height:"80vh"}}))))))},EQ=n.p+"images/abtest_bg.b54fd7f7.png",MQ=({visibility:e,setVisibility:t})=>(0,i.createElement)(vh,{open:"show"===e,setOpen:e=>{e||t("hide")},exitOnClickOutside:!0},(0,i.createElement)(vh.Panel,{className:"sm:max-w-lg w-full"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Header,{className:"flex items-center justify-between !space-y-0"},(0,i.createElement)(vh.Title,null,(0,D.__)("A/B Testing","cartflows"),(0,i.createElement)("span",{className:"ml-2 inline-flex align-middle"},(0,i.createElement)(zp,null))),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,null,(0,i.createElement)("img",{src:EQ,alt:"Abtest",className:"w-full p-5 bg-background-secondary rounded-lg box-border"}),(0,i.createElement)("div",{className:"mt-5 text-sm"},(0,D.__)("Optimize your sales with A/B testing in CartFlows! Experiment with product pricing, page layouts, messaging, and design. Create variants, analyze results, and discover new ways to boost revenue.","cartflows"))),(0,i.createElement)(vh.Footer,{className:"bg-brand-25"},(0,i.createElement)(Po,{tag:"a",href:getUpgradeToProUrl(),target:"blank",variant:"primary",className:"w-full no-underline text-center text-sm"},(0,D.__)("Upgrade to Pro","cartflows"))))),IQ=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,i.createElement)("div",{className:"wcf-add-step-connector flex flex-col items-center"},n&&(0,i.createElement)("div",{className:"w-px h-4 bg-background-secondary"}),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Add New Step","cartflows"),placement:r},(0,i.createElement)(I,{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,i.createElement)(yg,{className:"w-3.5 h-3.5 stroke-2 text-text-secondary","aria-hidden":"true"}))),n&&(0,i.createElement)("div",{className:"w-px h-4 bg-background-secondary"}))},SQ=Ao("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]),kQ=function({fromDate:e,toDate:t,onBack:n,onDateChange:r}){return(0,i.createElement)(Pm,{containerType:"flex",justify:"between",align:"center",gap:"none",className:"mt-0 mb-6 cursor-pointer"},(0,i.createElement)(Pm,{containerType:"flex",align:"center",gap:"sm"},(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Back to Steps","cartflows"),placement:"top"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",onClick:n,className:"text-text-secondary hover:text-text-primary"},(0,i.createElement)(SQ,{className:"w-5 h-5 !cursor-pointer",strokeWidth:2}))),(0,i.createElement)(iS,{tag:"h3",size:"sm",title:(0,D.__)("Analytics","cartflows")})),(0,i.createElement)(RE,{value:{startDate:e,endDate:t},onChangeCB:r,fieldParentWrapperClass:""}))},DQ=Ao("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"}]]),CQ=Ao("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"}]]),jQ=Ao("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"}]]),AQ=Ao("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"}]]),TQ=Ao("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"}]]),LQ=Ao("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"}]]),OQ=function({label:e,tooltip:t,value:n,icon:r}){return(0,i.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,i.createElement)("div",{className:"flex items-center justify-between"},(0,i.createElement)("div",{className:"flex items-center gap-1"},(0,i.createElement)(Ym,{as:"span",size:14,weight:400,color:"primary"},e),t&&(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:t,placement:"top"},(0,i.createElement)(To,{className:"w-3.5 h-3.5 text-text-tertiary cursor-help flex-shrink-0",strokeWidth:2}))),(0,i.createElement)("div",{className:"flex items-center p-2 rounded-lg bg-brand-25 border border-solid border-brand-100"},r)),(0,i.createElement)(Ym,{as:"div",size:24,weight:600,color:"primary"},null!=n?n:0))},zQ={className:"w-5 h-5 text-brand-500",strokeWidth:1.5},PQ=e=>e?Wm(e.toString()):0,RQ=function({revenue:e,totalVisitors:t,loading:n}){var r;const o=[[(0,D.__)("Total Visitors","cartflows"),(0,D.__)("Sum of all step views in this funnel.","cartflows"),t,DQ],[(0,D.__)("Total Orders","cartflows"),(0,D.__)("Total number of orders.","cartflows"),null!==(r=e?.order_count)&&void 0!==r?r:0,vF],[(0,D.__)("Total Revenue","cartflows"),(0,D.__)("Grand total of all orders.","cartflows"),PQ(e?.gross_sale),CQ],[(0,D.__)("Average Order Value","cartflows"),(0,D.__)("Average total of every order.","cartflows"),PQ(e?.avg_order_value),jQ],[(0,D.__)("Bump Offer Revenue","cartflows"),(0,D.__)("Grand total of all order bumps.","cartflows"),PQ(e?.bump_offer),AQ],[(0,D.__)("Offers Revenue","cartflows"),(0,D.__)("Total upsell/downsell revenue.","cartflows"),PQ(e?.upsell_revenue),vF],[(0,D.__)("Revenue Per Visit","cartflows"),(0,D.__)("Revenue per visit.","cartflows"),PQ(e?.revenue_per_visit),TQ],[(0,D.__)("RPUV","cartflows"),(0,D.__)("Revenue per unique visitor.","cartflows"),PQ(e?.revenue_per_unique_visits),LQ]];return(0,i.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,i.createElement)(OQ,{key:e,label:e,tooltip:t,value:n,icon:(0,i.createElement)(r,zQ)})))},UQ=(0,s.createContext)(void 0),BQ=()=>{const e=(0,s.useContext)(UQ);if(!e)throw new Error("Table components must be used within Table component");return e},FQ=({children:e,className:t,checkboxSelection:n=!1,...r})=>{const o={checkboxSelection:n},a=s.Children.toArray(e).find(e=>s.isValidElement(e)&&e.type===GQ),i=s.Children.toArray(e).filter(e=>s.isValidElement(e)&&e.type!==GQ);return(0,C.jsx)(UQ.Provider,{value:o,children:(0,C.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,C.jsx)("div",{className:"overflow-x-auto w-full",children:(0,C.jsx)("div",{className:"relative",children:(0,C.jsx)("table",{className:Ie("table-fixed min-w-full border-collapse border-spacing-0",t),...r,children:i})})}),a]})})},QQ=({children:e,className:t,selected:n,onChangeSelection:r,indeterminate:o,disabled:a,...i})=>{const{checkboxSelection:s}=BQ();return(0,C.jsx)("thead",{className:Ie("bg-background-secondary border-x-0 border-t-0 border-b-0.5 border-solid border-border-subtle",t),...i,children:(0,C.jsxs)("tr",{children:[s&&(0,C.jsx)("th",{scope:"col",className:"relative px-5.5 w-11 overflow-hidden",children:(0,C.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,C.jsx)(Cg,{size:"sm",checked:n,indeterminate:o,disabled:a,onChange:e=>{"function"==typeof r&&r(e)},"aria-label":n?"Deselect all":"Select all"})})}),e]})})},VQ=({children:e,className:t,...n})=>(0,C.jsx)("th",{scope:"col",className:Ie("p-3 text-left text-sm font-medium leading-5 text-text-primary",t),...n,children:e}),YQ=({children:e,className:t,...n})=>(0,C.jsx)("tbody",{className:Ie("bg-background-primary divide-y-0.5 divide-x-0 divide-solid divide-border-subtle",t),...n,children:e}),ZQ=({children:e,selected:t,value:n,className:r,onChangeSelection:o,...a})=>{const{checkboxSelection:i}=BQ();return(0,C.jsxs)("tr",{className:Ie("hover:bg-background-secondary",t&&"bg-background-secondary",r),...a,children:[i&&(0,C.jsx)("td",{className:"relative px-5.5 w-11 overflow-hidden",children:(0,C.jsx)("div",{className:"absolute inset-0 grid grid-cols-1 place-content-center",children:(0,C.jsx)(Cg,{size:"sm",checked:t,onChange:e=>{"function"==typeof o&&o(e,n)},"aria-label":"Select row"})})}),e]})},WQ=({children:e,className:t,...n})=>(0,C.jsx)("td",{className:Ie("px-3 py-3.5 text-sm font-normal leading-5 text-text-secondary",t),...n,children:e}),GQ=({children:e,className:t,...n})=>{const{checkboxSelection:r}=BQ();return(0,C.jsx)("div",{className:Ie("px-3 py-3",r&&"px-4",t),...n,children:e})};FQ.displayName="Table",QQ.displayName="Table.Head",VQ.displayName="Table.HeadCell",YQ.displayName="Table.Body",ZQ.displayName="Table.Row",WQ.displayName="Table.Cell",GQ.displayName="Table.Footer",FQ.Head=QQ,FQ.HeadCell=VQ,FQ.Body=YQ,FQ.Row=ZQ,FQ.Cell=WQ,FQ.Footer=GQ;const HQ=["thankyou","optin","landing"],$Q=(e,t,n)=>{var r;if(!e||HQ.includes(t))return"-";const o=null!==(r=e.revenue)&&void 0!==r?r:0;return n?`${window?.cartflows_admin?.woo_currency||""}${o}`:Wm(String(o))},XQ=(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} %`,$Q(e,t,n)]},qQ=[(0,D.__)("Step","cartflows"),(0,D.__)("Total Visits","cartflows"),(0,D.__)("Unique Visits","cartflows"),(0,D.__)("Conversions","cartflows"),(0,D.__)("Conversion rate","cartflows"),(0,D.__)("Revenue","cartflows")],JQ=({children:e})=>(0,i.createElement)(Ym,{as:"span",size:14,weight:500,color:"primary"},e),KQ=({cells:e,rowKey:t})=>e.map((e,n)=>(0,i.createElement)(FQ.Cell,{key:`${t}-c-${n}`},e)),eV=({rowKey:e,label:t,cells:n,rowClass:r=""})=>(0,i.createElement)(FQ.Row,{className:r},(0,i.createElement)(FQ.Cell,null,t),(0,i.createElement)(KQ,{cells:n,rowKey:e})),tV=({rowKey:e,data:t})=>{var n;return(0,i.createElement)(eV,{rowKey:e,label:(0,i.createElement)(JQ,null,null!==(n=t.visits?.title)&&void 0!==n?n:""),cells:XQ(t.visits,t.type)})},nV=({rowKey:e,data:t,isExpanded:n,onToggle:r})=>{var o;const a=n?lp:Ex;return(0,i.createElement)(eV,{rowKey:e,label:(0,i.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,D.__)("Collapse variations","cartflows"):(0,D.__)("Expand variations","cartflows")},(0,i.createElement)(a,{className:"w-4 h-4 text-text-tertiary",strokeWidth:2}),(0,i.createElement)(JQ,null,null!==(o=t.visits?.title)&&void 0!==o?o:"")),cells:XQ(t.visits,t.type)})},rV=({rowKey:e,data:t,stepId:n,variation:r,vIdx:o})=>{const a=((e,t,n)=>{const r=String(e)===String(t);return{isControl:r,label:r?(0,D.__)("Control","cartflows"):(0,D.sprintf)(/* translators: %d: variation index */ /* translators: %d: variation index */ |
| 62 |
(0,D.__)("Variation-%d","cartflows"),n),variant:r?"red":"neutral"}})(n,t.id,o);return(0,i.createElement)(eV,{rowKey:e,rowClass:"bg-background-secondary",label:(0,i.createElement)("div",{className:"flex items-center gap-2 pl-6"},(0,i.createElement)(JQ,null,r?.title||"-"),(0,i.createElement)(Tf,{label:a.label,size:"xs",variant:a.variant,type:"rounded",disableHover:!0})),cells:XQ(r,t.type,!0)})},oV=({rowKey:e,data:t,variation:n})=>(0,i.createElement)(eV,{rowKey:e,rowClass:"bg-background-secondary",label:(0,i.createElement)("div",{className:"flex items-center gap-2 pl-6"},(0,i.createElement)(JQ,null,n?.title||"-"),n?.archived_date&&(0,i.createElement)(Tf,{label:n.archived_date,size:"xs",variant:"inverse",type:"rounded",disableHover:!0})),cells:XQ(n,t.type,!0)}),aV=()=>(0,i.createElement)(FQ.Row,null,(0,i.createElement)(FQ.Cell,null,(0,i.createElement)(Ym,{as:"span",size:14,color:"secondary"},(0,D.__)("No analytics data available yet.","cartflows"))),Array(qQ.length-1).fill("-").map((e,t)=>(0,i.createElement)(FQ.Cell,{key:t},e))),iV=function({allSteps:e}){const[t,n]=function(){const[e,t]=(0,s.useState)(()=>new Set),n=(0,s.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:a,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,i.createElement)(tV,{key:o,rowKey:o,data:e})];const c=n.has(o),d=[(0,i.createElement)(nV,{key:o,rowKey:o,data:e,isExpanded:c,onToggle:()=>r(o)})];return c?(a.forEach(([t,n],r)=>{const a=`${o}-ab-${t}`;d.push((0,i.createElement)(rV,{key:a,rowKey:a,data:e,stepId:t,variation:n,vIdx:r}))}),s.forEach(([t,n])=>{const r=`${o}-arc-${t}`;d.push((0,i.createElement)(oV,{key:r,rowKey:r,data:e,variation:n}))}),d):d})(e,r,t,n)):(0,i.createElement)(aV,null);return(0,i.createElement)("div",{className:"bg-background-primary border border-border-subtle rounded-lg overflow-hidden mb-6"},(0,i.createElement)(FQ,null,(0,i.createElement)(FQ.Head,null,qQ.map(e=>(0,i.createElement)(FQ.HeadCell,{key:e},e))),(0,i.createElement)(FQ.Body,null,r)))},sV=Ao("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"}]]),lV=function({onReset:e,isResetting:t}){return(0,i.createElement)(Pm,{containerType:"flex",justify:"between",align:"center",gap:"none"},(0,i.createElement)(Ym,{as:"p",size:13,color:"secondary",className:"m-0"},(0,i.createElement)(Ym,{as:"span",size:13,weight:500,className:"text-brand-500"},(0,D.__)("Note:","cartflows"))," ",(0,D.__)("The orders which are placed by the admins are not considered while calculating the analytics.","cartflows")),(0,i.createElement)(Po,{variant:"outline",size:"sm",onClick:e,loading:t,disabled:t,icon:(0,i.createElement)(sV,{className:"w-4 h-4"+(t?" animate-spin":""),strokeWidth:2}),iconPosition:"left"},t?(0,D.__)("Resetting","cartflows"):(0,D.__)("Reset Analytics","cartflows")))},cV=function({onBack:e}){const[{flow_analytics:t,flow_id:n},r]=Zp(),o=new Date,a=new Date;a.setDate(o.getDate()-7);const[l,c]=(0,s.useState)(a),[d,u]=(0,s.useState)(o),[f,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)(!1),g=t?.revenue,w=t?.all_steps,y=w?.reduce((e,t)=>e+(Number(t.visits?.total_visits)||0),0)||0;return(0,i.createElement)("div",{className:"wcf-steps-analytics bg-background-primary p-6 shadow-sm border border-border-subtle border-solid rounded-lg"},(0,i.createElement)(kQ,{fromDate:l,toDate:d,onBack:e,onDateChange:({startDate:e,endDate:t})=>{if(c(e),u(t),!e||!t)return;p(!0);const o=new window.FormData;o.append("action","cartflows_pro_set_visit_data"),o.append("security",cartflows_admin.set_visit_data_nonce),o.append("flow_id",n),o.append("date_from",pm(e)),o.append("date_to",pm(t)),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:o}).then(e=>{p(!1),r({type:"SET_FLOW_ANALYTICS",flow_analytics:e})})}}),(0,i.createElement)(RQ,{revenue:g,totalVisitors:y,loading:f}),(0,i.createElement)(iV,{allSteps:w}),(0,i.createElement)(lV,{onReset:()=>{h(!0);const e=new window.FormData;e.append("action","cartflows_pro_reset_flow_analytics"),e.append("security",cartflows_admin.reset_flow_analytics_nonce),e.append("flow_id",n),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(()=>{h(!1),window.location.reload()})},isResetting:m}))},dV=Ao("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"}]]),uV=function(){const[{flow_analytics:e}]=Zp(),[{license_status:t}]=u();if(e)return null;let n,r,o,a;return"function"==typeof wcfCartflowsPro&&wcfCartflowsPro()&&"Activated"!==t?(n=(0,D.__)("Activate your license to unlock analytics","cartflows"),r=(0,D.__)("Your CartFlows Pro license isn't active yet. Activate it to see views, conversions, and revenue per step.","cartflows"),o=(0,D.__)("Activate License","cartflows"),a=cartflows_admin?.license_popup_url):(n=(0,D.__)("See Every Step's Performance:","cartflows"),r=(0,D.__)("Know exactly which steps win and which lose. Upgrade to Pro and track views, conversions, and revenue per step.","cartflows"),o=(0,D.__)("Upgrade to Pro","cartflows"),a=getUpgradeToProUrl()),(0,i.createElement)("div",{className:"wcf-pro-nudge--notice flex justify-center mb-5"},(0,i.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,i.createElement)("div",{className:"wcf-pro-nudge--notice-column-left flex items-center gap-3 min-w-0"},(0,i.createElement)("div",{className:"flex p-1 border border-solid border-brand-200 rounded-md"},(0,i.createElement)(dV,{className:"text-brand-500 h-4 w-4"})),(0,i.createElement)("div",{className:"flex min-w-0"},(0,i.createElement)("span",{className:"text-text-primary text-sm font-semibold mr-0.5"},n),(0,i.createElement)(Ym,{as:"span",size:14,color:"secondary",className:"truncate"},r),(0,i.createElement)(Po,{tag:"a",href:a,target:"_blank",rel:"noreferrer",variant:"link",size:"sm",icon:(0,i.createElement)(Kf,null),iconPosition:"right",className:"no-underline !text-sm focus:outline-none focus:ring-0"},o)))))},fV=function(e){const{type:t}=e,[{flow_id:n,title:r,steps:o,global_checkout:a,status:l},c]=Zp(),[d,u]=(0,s.useState)(!1),f=(0,D.__)("Save","cartflows"),[p,m]=(0,s.useState)({saveBtnString:f,saveBtnProcess:!1}),{saveBtnString:h,saveBtnProcess:g}=p,w=!!Number.isInteger(a),y=Number.isInteger(a)?"disable":"enable",[b,v]=((0,D.__)("Disable Store Checkout","cartflows"),(0,D.__)("Enable Store Checkout","cartflows"),(0,s.useState)(l||"draft")),[x,N]=(0,s.useState)(w),[_,E]=(0,s.useState)(!1),[M,I]=(0,s.useState)(y),S=(0,s.createRef)(),k=zh();let C="";if("storeCheckout"===t)for(let e=0;e<o.length;e++)if("checkout"===o[e].type){C=o[e].id;break}(0,s.useEffect)(()=>{v(l||"draft")},[l]);const j=function(e){e.preventDefault(),u(!0)},A=function(e){e.preventDefault(),m({saveBtnString:(0,D.__)("Saving…","cartflows"),saveBtnProcess:"processing"});const t=S.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),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{c({type:"SET_FLOW_TITLE",title:t}),m({saveBtnString:(0,D.__)("Saved","cartflows"),saveBtnProcess:"saved"}),gm.success((0,D.__)("Funnel title updated successfully!","cartflows")),setTimeout(()=>{m({saveBtnString:f,saveBtnProcess:!1}),u(!1)},3e3)})},T=function(e){e.preventDefault(),u(!1)};if(!1===r)return(0,i.createElement)("div",{className:"wcf-edit-flow__title-wrap animate-pulse"},(0,i.createElement)("div",{className:"wcf-flows-header--title wcf-step__title--editable flex gap-2.5 items-center"},(0,i.createElement)("span",{className:"h-3 w-full bg-background-secondary rounded-md px-10 block"})));const L=[{value:"draft",label:(0,D.__)("Draft","cartflows")},{value:"publish",label:(0,D.__)("Publish","cartflows")}];return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-edit-flow__title-wrap w-full"},(0,i.createElement)("div",{className:"wcf-flows-header--title wcf-step__title--editable flex gap-2.5 items-center"},function(){let e=r;""===r&&(e=(0,D.__)("(no title)","cartflows"));let t=um(e,cartflows_admin.title_length.max,cartflows_admin.title_length.display_length),n=(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Edit Title","cartflows"),placement:"top"},(0,i.createElement)(Po,{variant:"ghost",size:"md",className:"wcf-flows-header__title--edit",onClick:j,icon:(0,i.createElement)(Ck,{className:"w-5.5 h-5.5 stroke-1","aria-hidden":"true"})}));if(d){t=(0,i.createElement)(tg,{ref:S,id:"new-flow-title",defaultValue:r,autoComplete:"off",size:"sm",className:"wcf-flow-title-input [&>input]:!py-1.5"});let e=null;"processing"===g?e=(0,i.createElement)(Kg,{variant:"primary",size:"sm"}):"saved"===g&&(e=(0,i.createElement)(hw,{className:"w-4 h-4 stroke-2"})),n=(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Po,{variant:"primary",size:"sm",className:"!py-1.5",onClick:A,disabled:"processing"===g,icon:e,iconPosition:"left"},h),(0,i.createElement)(Po,{variant:"outline",size:"sm",className:"!py-1.5",onClick:T},(0,D.__)("Cancel","cartflows")))}return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"wcf-flows-header__title--text text-text-primary text-lg sm:text-2xl font-semibold",title:e},t),(0,i.createElement)("span",{className:"wcf-flows-header__title--buttons flex gap-3"},n))}(),"flows"===t&&!d&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"divider h-5 w-px bg-background-secondary"}),(0,i.createElement)("div",{className:"wcf-status-toggle inline-flex items-center border border-solid border-border-subtle p-1 rounded-3xl"},L.map(e=>(0,i.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===b?"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!==b&&async function(e){e.preventDefault();let t=!1,r="";switch(b){case"draft":case"private":t=await k({title:"Publish Funnel",description:(0,D.__)("Do you really want to publish this funnel?","cartflows"),actionBtnText:(0,D.__)("Publish","cartflows"),cancelBtnText:(0,D.__)("Cancel","cartflows")}),r="publish",window.wcfAction="restoreFlow";break;case"publish":t=await k({title:(0,D.__)("Draft Funnel","cartflows"),description:(0,D.__)("Do you really want to draft this funnel?","cartflows"),actionBtnText:(0,D.__)("Switch to Draft","cartflows"),cancelBtnText:(0,D.__)("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,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:o}).then(e=>{e.success&&(v(r),gm.success("publish"===r?(0,D.__)("Funnel published!","cartflows"):(0,D.__)("Funnel moved to draft!","cartflows")))}))}(t)}},e.value===b&&(0,i.createElement)(hw,{className:"w-4 h-4 stroke-2"}),e.label)))),"storeCheckout"===t&&!d&&(0,i.createElement)("div",{className:"wcf-store-checkout_status--container flex items-center gap-4"},(0,i.createElement)("span",{className:"divider w-px h-5 bg-background-secondary"}),(0,i.createElement)(Pg,{value:x,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",C),e.append("enable_store_checkout",!x),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.success&&(N(!x),E(!1),c({type:"SET_GLOBAL_CHECKOUT",global_checkout:e.data.checkout_id}),"enable"===M?(I("disable"),gm.success((0,D.__)("Store Checkout enabled!","cartflows"))):(I("enable"),gm.success((0,D.__)("Store Checkout disabled!","cartflows"))))})})(),size:"sm",label:{heading:(0,D.__)("Enable Store Checkout","cartflows")}}),_&&(0,i.createElement)(Kg,{variant:"primary",size:"sm"})))))};function pV({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 mV=s.forwardRef(pV);function hV({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 gV=s.forwardRef(hV);function wV({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 yV=s.forwardRef(wV),bV=function(){return(0,i.createElement)("div",{className:"wcf-flow-settings-view flex gap-6 items-start w-full"},(0,i.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,i.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,i.createElement)("div",{className:"flex flex-col gap-0.5 pt-2"},["w-28","w-24","w-20"].map((e,t)=>(0,i.createElement)("div",{key:t,className:"flex items-center gap-2.5 px-3 py-2 lg:justify-start justify-center"},(0,i.createElement)(HI,{className:"w-5 h-5 rounded"}),(0,i.createElement)(HI,{className:`h-3 ${e} lg:block hidden`})))))),(0,i.createElement)("div",{className:"min-w-0 max-w-3xl p-8 mx-auto w-full flex flex-col gap-3"},(0,i.createElement)("div",{className:"flex items-center gap-2 py-1"},(0,i.createElement)(HI,{className:"w-14 h-2.5"}),(0,i.createElement)(HI,{className:"w-2 h-2.5"}),(0,i.createElement)(HI,{className:"w-20 h-2.5"}),(0,i.createElement)(HI,{className:"w-2 h-2.5"}),(0,i.createElement)(HI,{className:"w-28 h-2.5"})),(0,i.createElement)("div",{className:"flex justify-between items-center h-10"},(0,i.createElement)("div",{className:"flex items-center gap-2.5"},(0,i.createElement)(HI,{className:"w-5 h-5 rounded"}),(0,i.createElement)(HI,{className:"w-40 h-5"})),(0,i.createElement)(HI,{className:"w-28 h-9 rounded-lg"})),(0,i.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,i.createElement)(HI,{className:"w-32 h-4"}),["w-28","w-36","w-24","w-32"].map((e,t)=>(0,i.createElement)("div",{key:t,className:"flex flex-col gap-2"},(0,i.createElement)(HI,{className:`${e} h-3.5`}),(0,i.createElement)(HI,{className:"w-full h-10 rounded-md"}))))))},vV=function({menuItems:e,currentTab:t,onTabChange:n}){return(0,i.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,i.createElement)(hk,{borderOn:!0,className:"!h-full md:pl-3 lg:p-4 lg:w-64 border-none box-border flex-grow"},(0,i.createElement)(hk.Body,{className:"!p-0"},(0,i.createElement)(hk.Item,null,(0,i.createElement)(up,{className:"w-full p-0 bg-transparent",size:"md"},(0,i.createElement)("ul",{className:"m-0 p-0 list-none flex flex-col"},e.map(e=>{const r=e.icon;return(0,i.createElement)(up.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,i.createElement)(r,{className:"w-5 h-5"}),(0,i.createElement)("span",{className:"flex-1 lg:block hidden"},e.name))})))))))},xV=Ao("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"}]]),NV={sm:{text:"text-sm",separator:"text-sm",separatorIconSize:16},md:{text:"text-base",separator:"text-base",separatorIconSize:18}},_V=(0,s.createContext)({sizes:NV.sm}),EV=({children:e,size:t="sm"})=>{const n=NV[t]||NV.sm;return(0,C.jsx)(_V.Provider,{value:{sizes:n},children:(0,C.jsx)("nav",{className:"flex m-0","aria-label":"Breadcrumb",children:(0,C.jsx)("ul",{className:"m-0 inline-flex items-center space-x-1 md:space-x-1",children:e})})})};EV.displayName="Breadcrumb";const MV=({children:e})=>(0,C.jsx)(C.Fragment,{children:e});MV.displayName="Breadcrumb.List";const IV=({children:e})=>(0,C.jsx)("li",{className:"m-0 inline-flex items-center gap-2",children:e});IV.displayName="Breadcrumb.Item";const SV=({href:e,children:t,className:n,as:r="a",...o})=>{const{sizes:a}=(0,s.useContext)(_V);return(0,C.jsx)(r,{href:e,className:Ie(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})};SV.displayName="Breadcrumb.Link";const kV=({type:e})=>{const{sizes:t}=(0,s.useContext)(_V),n={slash:(0,C.jsx)("span",{className:Ie("mx-1",t.separator),children:"/"}),arrow:(0,C.jsx)(Ex,{size:t.separatorIconSize})};return(0,C.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})};kV.displayName="Breadcrumb.Separator";const DV=()=>{const{sizes:e}=(0,s.useContext)(_V);return(0,C.jsx)(xV,{className:"mt-[2px] cursor-pointer text-text-tertiary hover:text-text-primary",size:e.separatorIconSize+4})};DV.displayName="Breadcrumb.Ellipsis";const CV=({children:e})=>{const{sizes:t}=(0,s.useContext)(_V);return(0,C.jsx)("span",{className:Ie(t.text,"font-medium text-text-primary"),children:e})};CV.displayName="Breadcrumb.Page",EV.List=MV,EV.Item=IV,EV.Link=SV,EV.Separator=kV,EV.Ellipsis=DV,EV.Page=CV;const jV=function({sectionObject:e,flowType:t,buttonRef:n,backUrl:r}){const[{title:o}]=Zp(),a="?page=cartflows&path="+("storeCheckout"===t?"store-checkout":"flows");return(0,i.createElement)(Pm,{containerType:"flex",direction:"column",gap:"sm",className:"wcf-flow-settings--content min-w-0 max-w-3xl p-8 mx-auto w-full"},(0,i.createElement)(EV,{size:"sm"},(0,i.createElement)(EV.Item,null,(0,i.createElement)(EV.Link,{href:`${cartflows_admin.admin_base_url}admin.php${a}`,className:"font-normal"},(0,D.__)("Funnels","cartflows"))),(0,i.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,i.createElement)(NQ,{className:"w-3 h-3 stroke-2"})),(0,i.createElement)(EV.Item,null,(0,i.createElement)(EV.Link,{as:I,to:{pathname:"admin.php",search:r},className:"font-normal"},o||(0,D.__)("(no title)","cartflows"))),(0,i.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,i.createElement)(NQ,{className:"w-3 h-3 stroke-2"})),(0,i.createElement)(EV.Item,null,(0,i.createElement)(EV.Page,null,(0,D.__)("Funnel Settings","cartflows")))),(0,i.createElement)("div",{className:"flex justify-between items-center h-10"},(0,i.createElement)("div",{className:"flex items-center gap-2.5"},(0,i.createElement)(I,{to:{pathname:"admin.php",search:r},className:"text-icon-secondary hover:text-icon-primary no-underline shrink-0 transition-colors","aria-label":(0,D.__)("Back to funnel","cartflows")},(0,i.createElement)(yk,{className:"w-5 h-5 flex stroke-1"})),(0,i.createElement)(fV,null)),(0,i.createElement)(bw,{id:"wcf-save-flow-settings",ref:n})),(0,i.createElement)(Pm,{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,i.createElement)(iS,{title:e.title,tag:"h5",size:"xs",className:"text-text-primary"}),(0,i.createElement)(bk,{section:e})))},AV={instant_layout:mV,funnel_advanced_options:gV,general:yV},TV=function(e){var t;const[{flow_id:n,flow_settings:r,flow_type:o}]=Zp(),[,a]=u(),l=(0,s.useRef)(null),c=zh(),[d,f]=(0,s.useState)(null),p=!r||void 0===r.settings,m=(0,s.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:AV[t.slug]||yV})):[],[r]),h=null!==(t=null!=d?d:m[0]?.slug)&&void 0!==t?t:"",g=r?.settings?Object.entries(r.settings).find(([,e])=>e.slug===h):null,w=g?g[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 p?(0,i.createElement)(bV,null):(0,i.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),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(()=>{a({status:"SAVED"}),e.renderCb()})}},(0,i.createElement)(vV,{menuItems:m,currentTab:h,onTabChange:async e=>{e!==h&&(await(async()=>!!window.wcfUnsavedChanges&&await c({title:"Save Changes",description:"You have made changes. Do you want to save the changes?",actionBtnText:"Yes",cancelBtnText:"No"}))()&&l.current?.click(),f(e),window.wcfUnsavedChanges=!1)}}),(0,i.createElement)(jV,{currentTab:h,sectionObject:w,flowType:o,buttonRef:l,backUrl:y}))},LV=function(){var e;const[{flow_id:t,steps:n,emptySteps:r,flow_type:o,is_flow_instant_checkout:a,flow_link:l,options:c,title:d},f]=Zp(),p=new URLSearchParams((0,m.useLocation)()?.search),h=null!==(e=p.get("step_id"))&&void 0!==e?e:"",g="true"===p.get("flow_settings"),y=zh(),[{canvasMode:b},v]=u(),[x,N]=(0,s.useState)(!1),[_,E]=(0,s.useState)(!1),[M,S]=(0,s.useState)("no"),[k,C]=(0,s.useState)(!1),[j,A]=(0,s.useState)("hide"),T=(0,s.useRef)(n);(0,s.useEffect)(()=>{T.current=n},[n]);const[L,O]=(0,s.useState)("yes"!==cartflows_admin?.instant_checkout_notice_status);let z=!0;n.length>0&&(z=!1);const P=function(){N(!x)};(0,s.useEffect)(()=>{let e=!0;return(async()=>{Xf()({path:`/cartflows/v1/admin/flow-data/${t}`}).then(t=>{e&&f({type:"SET_FLOW_DATA",data:t})})})(),()=>{e=!1}},[x]);const R=()=>{const e=t,n=[];T.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),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:r}).then(e=>{f({type:"SET_STEPS",steps:e.steps}),gm.success((0,D.__)("Steps reordered successfully!","cartflows"))})};(0,s.useEffect)(()=>{S(c&&c["wcf-testing"]?c["wcf-testing"]:"no")},[c]),(0,s.useEffect)(()=>{"yes"===a&&O(!1)},[a]);let U=!1,B=!1;const F=[],Q=[];if(h)return(0,i.createElement)(Pm,{align:"start",className:"wcf-step-settings-view--wrapper -m-8",containerType:"flex"},(0,i.createElement)(Ok,{renderCb:P}));if(g)return(0,i.createElement)(Pm,{align:"start",className:"wcf-flow-settings-view--wrapper -m-8",containerType:"flex"},(0,i.createElement)(TV,{renderCb:P}));const V="storeCheckout"===o,Y=V?"?page=cartflows&path=store-checkout":"?page=cartflows&path=flows",Z=V?(0,D.__)("Store Checkout","cartflows"):(0,D.__)("Funnels","cartflows");return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-steps-page-wrapper border-t border-border-subtle -mt-px"},(0,i.createElement)("div",{className:"wcf-page-header mb-4"},(0,i.createElement)(EV,{size:"sm"},(0,i.createElement)(EV.Item,null,(0,i.createElement)(EV.Link,{href:`${cartflows_admin.admin_base_url}admin.php${Y}`,className:"font-normal"},Z)),(0,i.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,i.createElement)(NQ,{className:"w-3 h-3 stroke-2"})),_?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(EV.Item,null,(0,i.createElement)(EV.Link,{as:"button",type:"button",onClick:()=>E(!1),className:"font-normal cursor-pointer bg-transparent border-0 p-0"},d||(0,D.__)("(no title)","cartflows"))),(0,i.createElement)("span",{role:"separator",className:"flex items-center text-text-tertiary mx-0 p-0 list-none","aria-hidden":"true"},(0,i.createElement)(NQ,{className:"w-3 h-3 stroke-2"})),(0,i.createElement)(EV.Item,null,(0,i.createElement)(EV.Page,null,(0,D.__)("Analytics","cartflows")))):(0,i.createElement)(EV.Item,null,(0,i.createElement)(EV.Page,null,d||(0,D.__)("(no title)","cartflows")))),(0,i.createElement)("div",{className:"wcf-flow-header flex gap-3 xl:gap-0 justify-between flex-col xl:flex-row w-full mt-4"},(0,i.createElement)(fV,{type:o}),(0,i.createElement)("div",{className:"wcf-flow-header--actions w-full flex gap-3 items-center xl:justify-end"},(0,i.createElement)("div",{className:"wcf-flow-header--action-canvas-mode flex items-center gap-2"},(0,i.createElement)("span",{className:"text-sm font-medium text-text-secondary"},(0,D.__)("Canvas Mode","cartflows")),(0,i.createElement)(Pg,{name:"wcf-enable-canvas-mode",size:"sm",value:b,onChange:e=>{e&&_&&E(!1),v({status:"UPDATE_CANVAS_MODE",canvasMode:e}),e?localStorage.setItem("wcf_canvas_mode_enabled","true"):localStorage.removeItem("wcf_canvas_mode_enabled")}})),(0,i.createElement)("div",{className:"wcf-flow-header--action-mode-select flex items-center gap-2 w-44"},k&&(0,i.createElement)(zf,{className:"w-4 h-4 stroke-2 animate-spin text-brand-500"}),(0,i.createElement)(lw,{size:"md",value:M,onChange:e=>(e=>{C(!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),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{f({type:"UPDATE_OPTIONS",options:{...c,"wcf-testing":e}}),C(!1),window.onbeforeunload=null,gm.success("yes"===e?(0,D.__)("Sandbox mode enabled!","cartflows"):(0,D.__)("Sandbox mode disabled!","cartflows"))}).catch(()=>{C(!1),gm.error((0,D.__)("Failed to update sandbox mode.","cartflows"))})})(e)},(0,i.createElement)(lw.Button,{placeholder:(0,D.__)("Select Mode","cartflows"),className:"gap-1",render:()=>"yes"===M?(0,i.createElement)("span",{className:"flex items-center gap-2"},(0,i.createElement)(vg,{className:"h-4 w-4 text-amber-500"}),(0,D.__)("Sandbox Mode","cartflows")):(0,i.createElement)("span",{className:"flex items-center gap-2"},(0,i.createElement)(Bh,{className:"h-4 w-4 text-support-success"}),(0,D.__)("Live Mode","cartflows"))}),(0,i.createElement)(lw.Options,null,(0,i.createElement)(lw.Option,{value:"no"},(0,i.createElement)("span",{className:"flex items-center gap-2"},(0,i.createElement)(Bh,{className:"h-4 w-4 text-support-success"}),(0,D.__)("Live Mode","cartflows"))),(0,i.createElement)(lw.Option,{value:"yes"},(0,i.createElement)("span",{className:"flex items-center gap-2"},(0,i.createElement)(vg,{className:"h-4 w-4 text-amber-500"}),(0,D.__)("Sandbox Mode","cartflows")))))),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Funnel Settings","cartflows"),placement:"top"},(0,i.createElement)(Po,{variant:"outline",size:"sm",className:"p-2.5",tag:I,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,i.createElement)(Hh,null)})),(0,i.createElement)(Zo,{arrow:!0,variant:"dark",content:(0,D.__)("Export Funnel","cartflows"),placement:"top"},(0,i.createElement)(Po,{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,Xh.$h)(Xf()({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()}gm.success((0,D.__)("Funnel exported successfully!","cartflows"))}else gm.error((0,D.__)("Failed to export funnel.","cartflows"))}).catch(()=>{gm.error((0,D.__)("Failed to export funnel.","cartflows"))}))},icon:(0,i.createElement)(yQ,null)})),"storeCheckout"===o&&(0,i.createElement)(Zo,{arrow:!0,content:(0,D.__)("Delete Store Checkout","cartflows"),placement:"top"},(0,i.createElement)(Po,{variant:"outline",size:"sm",className:"p-2.5",onClick:async e=>{if(e.preventDefault(),!await y({title:(0,D.__)("Delete Store Checkout","cartflows"),description:(0,D.sprintf)(/* translators: %s new line break */ /* translators: %s new line break */ |
| 63 |
(0,D.__)("Do you really want to delete store checkout?%1$1sNOTE: This action cannot be reversed.","cartflows"),"\r\n"),actionBtnText:(0,D.__)("Delete","cartflows"),cancelBtnText:(0,D.__)("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,Xh.$h)(Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(()=>{gm.success((0,D.__)("Store checkout deleted successfully!","cartflows")),f({type:"SET_FLOWS",flows:null}),window.location.replace(cartflows_admin.admin_base_url+"admin.php?page=cartflows&path=store-checkout")}))},icon:(0,i.createElement)(Xm,null)}))))),_?(0,i.createElement)(cV,{onBack:()=>E(!1)}):(0,i.createElement)(i.Fragment,null,L&&(0,i.createElement)("div",{className:"wcf-instant-checkout--notice flex justify-center mb-5"},(0,i.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,i.createElement)("div",{className:"wcf-instant-checkout--notice-column-left flex items-center gap-3"},(0,i.createElement)(qI,{className:"h-5 w-5 text-brand-500 hover:text-brand-600","aria-hidden":"true"}),(0,i.createElement)("span",{className:"text-text-primary text-sm font-medium"},(0,D.__)("Create a distraction free, high-converting checkout experience without needing a page builder.","cartflows"))),(0,i.createElement)("div",{className:"wcf-instant-checkout--notice-column-right flex items-center gap-4"},(0,i.createElement)(I,{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,D.__)("Enable Instant Layout","cartflows")),(0,i.createElement)(ww,{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),O(!1),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e?.status&&O(!1)})})()}})))),(0,i.createElement)("div",{className:"wcf-steps-header flex justify-center mb-5 "+(b?"hidden":"")},(0,i.createElement)("div",{className:"flex justify-between items-center w-full gap-2"},(0,i.createElement)(iS,{tag:"h3",size:"sm",title:(0,D.__)("Funnel Steps","cartflows")}),(0,i.createElement)("div",{className:"wcf-steps-header--actions flex items-center gap-3"},(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:()=>E(!0),icon:(0,i.createElement)(vQ,{className:"!w-4 !h-4 stroke-1"}),className:"text-sm font-normal",iconPosition:"left"},(0,D.__)("View Analytics","cartflows")),(0,i.createElement)(Po,{variant:"outline",size:"md",tag:"a",href:l,target:"_blank",rel:"noreferrer",icon:(0,i.createElement)(Yh,{className:"!w-4 !h-4 stroke-1"}),className:"text-sm font-normal no-underline",iconPosition:"left"},(0,D.__)("View Funnel","cartflows")),(0,i.createElement)(Po,{variant:"primary",size:"md",tag:I,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,i.createElement)(yg,{className:"!w-4 !h-4 stroke-2"}),iconPosition:"left"},(0,D.__)("Add New Step","cartflows"))))),b?(0,i.createElement)(gQ,{renderCb:P}):(0,i.createElement)(i.Fragment,null,(0,i.createElement)(uV,null),(0,i.createElement)("div",{className:"wcf-list-steps flex justify-center mb-4"},r&&function(){if(0===n.length)return(0,i.createElement)("div",{className:"wcf-analytics-no-step-notice text-center mb-8 bg-background-primary p-20 rounded-xl w-full"},(0,i.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,i.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,i.createElement)("h3",{className:"mt-2 text-sm font-semibold text-text-primary"},(0,D.__)("No Steps Added.","cartflows")),(0,i.createElement)("p",{className:"mt-1 text-sm text-text-secondary"},(0,D.__)("Seems like there are no steps created or added in this flow","cartflows")),(0,i.createElement)("div",{className:"mt-6"},(0,i.createElement)(Po,{variant:"primary",size:"sm",tag:I,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,i.createElement)(yg,{className:"w-4 h-4 stroke-2"}),iconPosition:"left"},(0,D.__)("Add New Step","cartflows"))))}(),!r&&z&&(0,i.createElement)($I,null),!z&&(0,i.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):Q.push(e);return""}),Q.length>0&&(B=!0),(0,i.createElement)(i.Fragment,null,!r&&!z&&(0,i.createElement)(i.Fragment,null,F.map(e=>(0,i.createElement)(GI,(0,w.A)({},e,{key:e.id,invalid:!0,setShowAbtestUpgradePopup:A}))),(0,i.createElement)(GI,(0,w.A)({},n[U],{key:n[U].id,setShowAbtestUpgradePopup:A})),B&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(IQ,{flowId:t,flowType:o}),(0,i.createElement)(Wp.ReactSortable,{list:Q,setList:e=>{const t=T.current.filter(e=>"checkout"===e.type||"landing"===e.type);T.current=[...t,...e],f({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},Q.map((e,n)=>"checkout"!==e.type?(0,i.createElement)("div",{key:e.id},(0,i.createElement)(GI,(0,w.A)({},e,{setShowAbtestUpgradePopup:A})),n<Q.length-1&&(0,i.createElement)(IQ,{flowId:t,flowType:o})):(0,i.createElement)(i.Fragment,null))))))):(0,i.createElement)(i.Fragment,null,!r&&!z&&(0,i.createElement)(Wp.ReactSortable,{list:n,setList:e=>{T.current=e,f({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,i.createElement)("div",{key:e.id},(0,i.createElement)(GI,(0,w.A)({},e,{setShowAbtestUpgradePopup:A})),r<n.length-1&&(0,i.createElement)(IQ,{flowId:t,flowType:o}))))))),(0,i.createElement)("div",{className:"wcf-step-footer flex justify-center pt-2 pb-4"},(0,i.createElement)(IQ,{flowId:t,flowType:o,showConnectorLines:!1,tooltipPlacement:"top"}))))),(0,i.createElement)(_Q,{renderCb:P,steps:n}),(0,i.createElement)(MQ,{visibility:j,setVisibility:A}))},OV=cartflows_admin.default_page_builder,zV=cartflows_admin.required_plugins,PV=cartflows_admin.required_plugins[OV],RV={};RV[OV]=Object.values(cartflows_admin.flows_and_steps);const UV={};UV[OV]=Object.values(cartflows_admin.store_checkout_flows_and_steps);const BV={default_page_builder:OV,page_builder_group_data:zV,page_builder_group:PV,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:{...RV},store_checkout_flows:{...UV},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"}},FV={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},QV={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:VV}=wp.data;function YV({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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"}))}VV("wcf/importer",{reducer:(e=BV,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:QV,selectors:FV});const ZV=s.forwardRef(YV),WV=(0,LI.compose)((0,OI.withSelect)(e=>{const{getstepTypes:t}=e("wcf/importer");return{stepTypes:t()}}),(0,OI.withDispatch)(e=>{const{setSelectedStep:t}=e("wcf/importer");return{setSelectedStep(e){t(e)}}}))(({stepTypes:e,setSelectedStep:t})=>(0,i.createElement)("div",{className:"wcf-create-step__dropdown-list wcf-select-option w-full text-left"},(0,i.createElement)(lw,{onChange:e=>{t(e)},size:"md"},(0,i.createElement)(lw.Button,{placeholder:(0,D.__)("Select Step Type","cartflows"),render:t=>t?e[t]||t:""}),(0,i.createElement)(lw.Options,null,Object.keys(e).map(t=>(0,i.createElement)(lw.Option,{value:t,key:t},e[t]))))));function GV({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 HV=s.forwardRef(GV),$V=(0,LI.compose)((0,OI.withDispatch)(e=>{const{updateWooCommerceStatus:t}=e("wcf/importer");return{updateWooCommerceStatus(e){t(e)}}}))(({title:e,updateWooCommerceStatus:t})=>{const n=e||(0,D.__)("Activate WooCommerce","cartflows"),[r,o]=(0,s.useState)({isProcessing:!1,buttonText:n}),{isProcessing:a,buttonText:l}=r;return(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(Po,{className:"wcf-button wcf-primary-button",variant:"primary",size:"md",loading:a,disabled:a,onClick:()=>{o({isProcessing:!0,buttonText:(0,D.__)("Activating WooCommerce..","cartflows")}),qf({slug:"woocommerce",init:"woocommerce/woocommerce.php",name:"WooCommerce"},!1).then(()=>{o({isProcessing:!1,buttonText:(0,D.__)("Successfully Activated!","cartflows")}),setTimeout(()=>{t("active")},3e3)}).catch(e=>{console.log(e),o({isProcessing:!1,buttonText:(0,D.__)("Failed! Activation!","cartflows")})})}},l)))}),XV=(0,LI.compose)((0,OI.withDispatch)(e=>{const{updateWooCommerceStatus:t}=e("wcf/importer");return{updateWooCommerceStatus(e){t(e)}}}))(({updateWooCommerceStatus:e})=>{const t=(0,D.__)("Install WooCommerce","cartflows"),[n,r]=(0,s.useState)({isProcessing:!1,buttonText:t}),{isProcessing:o,buttonText:a}=n;return(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(Po,{className:"wcf-button wcf-primary-button",variant:"primary",size:"md",loading:o,disabled:o,onClick:()=>{var n;r({isProcessing:!0,buttonText:(0,D.__)("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,D.__)("Successfully Installed!","cartflows")}),e("inactive")}).catch(e=>{console.log(e),r({isProcessing:!1,buttonText:(0,D.__)("Installation Failed!","cartflows")}),setTimeout(()=>{r({isProcessing:!1,buttonText:t})},3e3)})}},a)))}),qV=(0,LI.compose)((0,OI.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:a,stepTypes:l,license_status:c,setInputFieldVisibility:d,setErrorDesc:u,offerYesStepId:f="",offerNoStepId:p=""})=>{const m=e.type||"",h=e.title||l[m]||"",[g,w]=(0,s.useState)((0,D.__)("Import Step","cartflows")),[y,b]=(0,s.useState)(!1);if(""===e.type)return(0,i.createElement)(Po,{variant:"primary",size:"md",disabled:!0},g);if(1<=(r?r.filter(e=>m===e.type):[]).length&&!wcfCartflowsPro())return d("hidden"),u((0,D.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")),"not-installed"===o?(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Higher Plan","cartflows"),desc:(0,D.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")}):(u((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 64 |
(0,D.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,{description:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 65 |
(0,D.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)}));if("upsell"===m||"downsell"===m){if(d("hidden"),!wcfCartflowsTypePlusPro())return wcfInactiveProPlus()?(u((0,D.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 66 |
(0,D.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),m,cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,{description:(0,D.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 67 |
(0,D.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),m,cartflows_admin.cf_pro_type_inactive)})):(u((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 68 |
(0,D.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),m)),(0,i.createElement)(PI,{desc:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 69 |
(0,D.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),m),title:"Get CartFlows Higher Plan"}));if("Activated"!==c)return u((0,D.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 70 |
(0,D.__)("Add %1$s step to your flow by activating CartFlows license.","cartflows"),m)),d("hidden"),(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(BI,{title:"Activate License"})))}if("pro"===e.template_type){if(!wcfCartflowsTypePro())return"inactive"===o&&"pro"===wcfInactivepluginType()?(d("hidden"),u((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 71 |
(0,D.__)("Access all of our pro templates by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,{description:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 72 |
(0,D.__)("Access all of our pro templates by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)})):(d("hidden"),u((0,D.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")),(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Pro","cartflows"),desc:(0,D.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")}));if(wcfCartflowsTypePro()&&"Activated"!==c)return d("hidden"),u((0,D.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 73 |
(0,D.__)("Add %1$s step to your flows by activating license.","cartflows"),m)),(0,i.createElement)(BI,{title:"Activate License"})}return"landing"!==m&&"active"!==a?(d("hidden"),u((0,D.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")),"inactive"===a?(0,i.createElement)($V,{title:`Activate WooCommerce to Import ${h}`,description:(0,D.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")}):(0,i.createElement)(XV,null)):(d(""),(0,i.createElement)(Po,{variant:"primary",size:"md",loading:y,disabled:y,icon:(0,i.createElement)(HV,{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 d=window.sessionStorage.getItem("wcf_edge_insertion_context");if(d)try{const e=JSON.parse(d);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")}Xf()({url:cartflows_admin.ajax_url,method:"POST",body:c}).then(e=>{if(e.success)n((0,D.__)("Imported! Redirecting…","cartflows")),o(!1),gm.success((0,D.__)("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,D.__)(" Please sync the library and try importing the template again.","cartflows")),i(Wm(t)),n((0,D.__)("Import Failed! Try again.","cartflows")),gm.error((0,D.__)("Failed to import step.","cartflows")),setTimeout(()=>{n((0,D.__)("Import Step","cartflows"))},3e3),o(!1)}}).finally(()=>{window.sessionStorage.removeItem("wcf_edge_insertion_context")})})(e,n,w,t,b,y,u,f,p)}},g))}),JV=(0,LI.compose)((0,OI.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:a=""})=>{const[l,c]=(0,s.useState)({isProcessing:!1,buttonText:(0,D.__)("Create Step","cartflows")}),{isProcessing:d,buttonText:u}=l;return(0,i.createElement)(Po,{variant:"primary",size:"md",loading:d,disabled:d,onClick:i=>{i.preventDefault(),d||(c({isProcessing:!0,buttonText:(0,D.__)("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")}Xf()({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,D.__)("Step Created! Redirecting…","cartflows")}),gm.success((0,D.__)("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,D.__)("Failed to Create Step!","cartflows")}),gm.error((0,D.__)("Failed to create step.","cartflows")))})})(e,t,n,c,r,o,a))}},u)}),KV=(0,LI.compose)((0,OI.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:a,setInputFieldVisibility:s,setErrorDesc:l,offerYesStepId:c="",offerNoStepId:d=""})=>{if(""===e)return(0,i.createElement)("button",{className:"wcf-button wcf-primary-button",disabled:!0},(0,D.__)("Create Step","cartflows"));if(1<=(t?t.filter(t=>e===t.type):[]).length&&!wcfCartflowsPro())return s("hidden"),l((0,D.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")),"not-installed"===n?(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Higher Plan","cartflows")}):(l((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 74 |
(0,D.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,{description:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 75 |
(0,D.__)("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,D.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 76 |
(0,D.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),e,cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,null)):(s("hidden"),l((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 77 |
(0,D.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),e)),(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Higher Plan","cartflows")}));if(wcfCartflowsTypePlusPro()&&"Activated"!==o)return s("hidden"),l((0,D.__)("Activate license for adding more steps and other features.","cartflows")),(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(BI,{title:(0,D.__)("Activate License","cartflows")})))}return"landing"!==e&&"active"!==r?(s("hidden"),l((0,D.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")),"inactive"===r?(0,i.createElement)($V,null):(0,i.createElement)(XV,null)):(s(""),l(""),(0,i.createElement)(JV,{stepName:a,offerYesStepId:c,offerNoStepId:d}))}),eY=({stepName:e,setInputFieldVisibility:t,setErrorDesc:n,offerYesStepId:r="",offerNoStepId:o=""})=>(0,i.createElement)("div",{className:"wcf-create-step__button-wrap"},(0,i.createElement)(KV,{stepName:e,setInputFieldVisibility:t,setErrorDesc:n,offerYesStepId:r,offerNoStepId:o})),tY=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)},nY=({offerYesStepId:e,setOfferYesStepId:t,offerNoStepId:n,setOfferNoStepId:r,availableSteps:o=null})=>{const{currentFlowSteps:a}=(0,OI.useSelect)(e=>({currentFlowSteps:e("wcf/importer").getcurrentFlowSteps()})),s=null!==o?o:tY(a);return 0===s.length?null:(0,i.createElement)("div",{className:"mt-5 space-y-4"},(0,i.createElement)("div",{className:"text-sm font-medium text-gray-700 mb-2"},(0,D.__)("Conditional Redirect Settings","cartflows")),(0,i.createElement)("div",null,(0,i.createElement)("label",{className:"block text-sm font-normal text-gray-600 mb-1"},(0,D.__)("On Accept (Yes), go to:","cartflows")),(0,i.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,i.createElement)("option",{value:""},(0,D.__)("Default (Auto)","cartflows")),s.map(e=>(0,i.createElement)("option",{key:e.id,value:e.id},e.title)))),(0,i.createElement)("div",null,(0,i.createElement)("label",{className:"block text-sm font-normal text-gray-600 mb-1"},(0,D.__)("On Reject (No), go to:","cartflows")),(0,i.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,i.createElement)("option",{value:""},(0,D.__)("Default (Auto)","cartflows")),s.map(e=>(0,i.createElement)("option",{key:e.id,value:e.id},e.title)))))},rY=({visibility:e,setVisibility:t,item:n,type:r,stepName:o,setStepName:a})=>{const l="show"===e,[c,d]=(0,s.useState)(""),[u,f]=(0,s.useState)(""),[p,m]=(0,s.useState)(0),[h,g]=(0,s.useState)(""),[w,y]=(0,s.useState)(""),{currentFlowSteps:b,selectedStep:v}=(0,OI.useSelect)(e=>({currentFlowSteps:e("wcf/importer").getcurrentFlowSteps(),selectedStep:e("wcf/importer").getselectedStep()})),x="ready-templates"===r?n&&("upsell"===n.type||"downsell"===n.type):"upsell"===v||"downsell"===v,N=tY(b);return(0,i.createElement)(vh,{open:l,setOpen:e=>{e||t("hide")},exitOnClickOutside:!1},(0,i.createElement)(vh.Panel,{className:"sm:max-w-lg w-full"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Header,{className:"flex items-center justify-between !space-y-0"},(0,i.createElement)(vh.Title,null,"hidden"===c?(0,D.__)("Upgrade Required","cartflows"):(0,D.__)("Name Your Step","cartflows")),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,null,(0,i.createElement)("div",{className:`${c}`},(0,i.createElement)("div",{className:"flex justify-between py-2"},(0,i.createElement)("label",{className:"flex gap-1 text-sm font-normal text-text-primary"},(0,D.__)("Step Name","cartflows")),(0,i.createElement)("span",{className:"text-xs font-normal "+(40===p?"text-brand-500":"text-field-placeholder")},p,"/40")),(0,i.createElement)(tg,{type:"text",value:o,onChange:e=>{e.length<=40&&(m(e.length),a(e))},placeholder:(0,D.__)("Enter Step Name","cartflows"),size:"md"})),"hidden"!==c&&x&&N.length>0&&(0,i.createElement)(nY,{offerYesStepId:h,setOfferYesStepId:g,offerNoStepId:w,setOfferNoStepId:y,availableSteps:N}),""!==u&&(0,i.createElement)("p",{className:"text-sm font-regular text-text-secondary mt-3 m-0"},u)),(0,i.createElement)(vh.Footer,{className:"flex gap-3 justify-end"},"ready-templates"===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:()=>t("hide")},(0,D.__)("Cancel","cartflows")),(0,i.createElement)(qV,{currentStep:n,stepName:o,setInputFieldVisibility:d,setErrorDesc:f,offerYesStepId:h,offerNoStepId:w})),"create-your-own"===r&&(0,i.createElement)(eY,{stepName:o,setInputFieldVisibility:d,setErrorDesc:f,offerYesStepId:h,offerNoStepId:w}))))},oY=(0,LI.compose)((0,OI.withSelect)(e=>{const{getselectedStep:t}=e("wcf/importer");return{selectedStep:t()}}))(({selectedStep:e})=>{const[t,n]=(0,s.useState)("hide"),[r,o]=(0,s.useState)("");return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rY,{visibility:t,setVisibility:n,type:"create-your-own",stepName:r,setStepName:o}),(0,i.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,i.createElement)("div",{className:"wcf-step-library--item--scratch-select text-center w-full h-full min-h-[400px] max-h-[400px] flex flex-col gap-4 items-center justify-center"},(0,i.createElement)("h3",{className:"text-base text-text-primary p-4 text-center font-medium"},(0,D.__)("Select Step Type","cartflows")),(0,i.createElement)(WV,null),(0,i.createElement)(Po,{variant:"primary",size:"md",disabled:""===e,icon:(0,i.createElement)(yg,{className:"h-18 w-18 stroke-2"}),iconPosition:"left",onClick:()=>{n("hide"===t?"show":"hide")}},(0,D.__)("Create Step","cartflows")),(0,i.createElement)("div",{className:"wcf-learn-how"},(0,i.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,i.createElement)(UI,{className:"w-18 h-18 stroke-1"}),(0,D.__)("Learn How","cartflows")))),(0,i.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle absolute bottom-0 left-0 w-full"},(0,i.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,D.__)("Create from Scratch","cartflows")))))});function aY({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 iY=s.forwardRef(aY),sY=function({item:e}){const[t,n]=(0,s.useState)("hide"),[r,o]=(0,s.useState)("");return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rY,{visibility:t,setVisibility:n,type:"ready-templates",stepName:r,setStepName:o,item:e}),(0,i.createElement)("div",{key:e.id,className:"wcf-template-item group relative cursor-pointer transition ease-in-out delay-150 rounded-lg shadow-md"},"pro"===e.template_type?(0,i.createElement)("div",{className:"z-10 absolute top-5 right-5"},(0,i.createElement)(zp,null)):"",(0,i.createElement)("div",{className:"wcf-item__inner bg-background-primary border border-border-subtle"},(0,i.createElement)("div",{className:"wcf-item__thumbnail-wrap relative"},(0,i.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,i.createElement)("img",{className:"wcf-item__thumbnail-image w-full",src:e.featured_image_url,alt:(0,D.__)("Step thumbnail image","cartflows")})),(0,i.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,i.createElement)("div",{className:"mx-auto my-0 text-center flex flex-col gap-4 relative top-[35%]"},(0,i.createElement)("span",{className:"wcf-step-preview-wrap"},(0,i.createElement)(Po,{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,i.createElement)(UI,{className:"w-4 h-4 stroke-2"})},(0,D.__)("Preview","cartflows"))),(0,i.createElement)("span",{className:"wcf-item__btn",onClick:()=>{n("hide"===t?"show":"hide")}},(0,i.createElement)(Po,{variant:"primary",size:"sm",className:"mx-auto !w-fit",icon:(0,i.createElement)(iY,{className:"w-4 h-4 stroke-2"})},(0,D.__)("Import","cartflows")))))),(0,i.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle"},(0,i.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},e.title)))))},lY=function(e){const{templates:t,currentStep:n,setcurrentStepCB:r,allowedStepTypes:o}=e,a=t,{step_types:l}=(0,OI.useSelect)(e=>({step_types:e("wcf/importer").getstepTypes()})),c=Object.entries(l),d=e=>!o||o.hasOwnProperty(e);return(0,i.createElement)(s.Fragment,null,(0,i.createElement)("div",{className:"wcf-remote-steps-filters flex gap-4 items-center p-8 mb-8 -m-8 bg-background-primary"},(0,i.createElement)("div",{className:"wcf-categories w-full"},(0,i.createElement)("div",{className:"wcf-step-type-filter--links sm:block lg:block hidden"},(0,i.createElement)(YM.Group,{activeItem:n,variant:"rounded",size:"sm",width:"auto",className:"!bg-transparent !p-0 !ring-0 !gap-4",onChange:({value:e})=>{d(e.slug)&&r(e.slug)}},c.map(([e,t])=>{const r=e===n;return(0,i.createElement)(YM.Tab,{key:e,slug:e,text:t,disabled:!d(e),className:"step-type-filter-item !px-1 !py-1 !font-medium "+(r?"!bg-transparent !shadow-none !text-brand-500":"")})}))),(0,i.createElement)("div",{className:"sm:hidden lg:hidden block"},(0,i.createElement)(lw,{value:n,onChange:e=>{d(e)&&r(e)},size:"sm"},(0,i.createElement)(lw.Button,null),(0,i.createElement)(lw.Options,null,c.map(e=>{const t=e[0],n=e[1],r=d(t);return(0,i.createElement)(lw.Option,{key:t,value:t,disabled:!r},n,r?"":" (Not allowed)")})))))),(0,i.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,i.createElement)("div",{className:"wcf-start-from-scratch"},(0,i.createElement)(oY,null)),a.map(e=>(0,i.createElement)(sY,{item:e,key:e.id}))))},cY=(0,s.memo)(e=>{const t=(0,D.__)("Sync Library","cartflows"),{template:n}=e,r=n||"",[o,a]=(0,s.useState)({isProcessing:!1,buttonText:t}),{isProcessing:l,buttonText:c}=o,d=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 Xf()({url:cartflows_admin.ajax_url,method:"POST",body:n}).then(n=>{n.success&&(a({isProcessing:!0,buttonText:(0,D.sprintf)(/* translators: %d is replaced with the condition number */ /* translators: %d is replaced with the condition number */ |
| 78 |
(0,D.__)("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),a({isProcessing:!0,buttonText:(0,D.__)("Sync Complete","cartflows")}),await Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.success&&a({isProcessing:!1,buttonText:(0,D.__)("Sync Complete","cartflows")})}).catch(()=>{})})())}).catch(()=>{})};return(0,i.createElement)(Po,{variant:"outline",size:"md",loading:l,icon:(0,i.createElement)(zf,{className:"w-4 h-4 stroke-1"}),className:"wcf-sync whitespace-nowrap sm:whitespace-normal",onClick:e=>{e.preventDefault(),a({isProcessing:!0,buttonText:(0,D.__)("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 Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(e=>{e.success&&("updated"===e.data?(a({isProcessing:!1,buttonText:(0,D.__)("Library Synced","cartflows")}),setTimeout(()=>{a({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 Xf()({url:cartflows_admin.ajax_url,method:"POST",body:e}).then(async e=>{if(e.success){a({isProcessing:!0,buttonText:"Importing Pages.."});const t=e.data.count;for(let e=1;e<=t;e++)d(e,t)}else a({isProcessing:!1,buttonText:t})}).catch(()=>{})})())}).catch(()=>{})}catch(e){}})()}},c)}),dY=(0,LI.compose)((0,OI.withSelect)(e=>{const{getselectedStep:t}=e("wcf/importer");return{selectedStep:t()}}))(({selectedStep:e})=>{const[t,n]=(0,s.useState)("hide"),[r,o]=(0,s.useState)(""),[{page_builder:a}]=Zp();return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(rY,{visibility:t,setVisibility:n,type:"create-your-own",stepName:r,setStepName:o}),(0,i.createElement)("div",{className:"wcf-step-library--item__start-scratch flex gap-6 mx-auto max-w-4xl px-10 py-14"},(0,i.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,i.createElement)(iS,{title:(0,D.__)("Create from Scratch","cartflows"),description:(0,D.__)("Select a step type to get started.","cartflows"),tag:"h3",size:"xs",className:"text-center text-base [&>p]:text-text-secondary"}),(0,i.createElement)("div",{className:"w-full"},(0,i.createElement)(WV,null)),(0,i.createElement)(Po,{variant:"primary",size:"md",disabled:""===e,icon:(0,i.createElement)(yg,{className:"h-5 w-5 stroke-2"}),iconPosition:"left",onClick:()=>{n("hide"===t?"show":"hide")}},(0,D.__)("Create Step","cartflows"))),(0,i.createElement)("div",{className:"wcf-step-library--item__info flex flex-col gap-6 justify-center w-3/4"},(0,i.createElement)("h3",{className:"text-xl text-text-primary font-semibold m-0"},"bricks-builder"===a&&(0,D.__)("It seems that you are using the Bricks Builder.","cartflows"),"other"===a&&(0,D.__)("It seems that you are using the page builder other than Elementor, Beaver Builder, Block Builder.","cartflows")),(0,i.createElement)("span",{className:"text-base text-text-secondary font-normal mt-2"},"bricks-builder"===a&&(0,D.__)("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"===a&&(0,D.__)("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,i.createElement)("span",{className:"mt-2"},(0,i.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,D.__)("Learn How","cartflows"),(0,i.createElement)(UI,{className:"w-4 h-4 stroke-1"}))))))}),uY=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}},fY=function(){const e=(0,m.useHistory)(),[{page_builder:t,flow_id:n,flow_type:r}]=Zp(),[o,a]=(0,s.useState)("landing"),[l,c]=(0,s.useState)(""),[d,u]=(0,s.useState)(null),{all_step_templates:f,stepTypes:p,currentFlowSteps:h}=(0,OI.useSelect)(e=>({all_step_templates:e("wcf/importer").getAllStepTemplates(),stepTypes:e("wcf/importer").getstepTypes(),currentFlowSteps:e("wcf/importer").getcurrentFlowSteps()})),g=[];f.forEach(e=>{o===e.type&&g.push(e)});const[w,y]=(0,s.useState)(g);return(0,s.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 uY).getAllowedStepTypesObject(t.sourceStepId,t.targetStepId,h,p);u(e);const n=Object.keys(e);n.length>0&&!e.hasOwnProperty(o)&&a(n[0])}}catch(e){console.error("[Library] Error parsing edge context:",e),window.sessionStorage.removeItem("wcf_edge_insertion_context")}else u(null)},[r,h,p]),(0,s.useEffect)(()=>()=>{window.sessionStorage.getItem("wcf_edge_insertion_context")&&window.sessionStorage.removeItem("wcf_edge_insertion_context")},[]),(0,s.useEffect)(()=>{y(g)},[o]),(0,i.createElement)("div",{className:`wcf-step-library wcf-step-library-${t}`},(0,i.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,i.createElement)("h3",{className:"text-xl font-semibold text-text-primary m-0 flex items-center gap-2"},(0,i.createElement)(Po,{variant:"ghost",size:"xs","aria-label":(0,D.__)("Back to Flow","cartflows"),icon:(0,i.createElement)(yk,{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,D.__)("Steps Library","cartflows")),"other"!==t&&"bricks-builder"!==t&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"gap-4 flex justify-between items-center"},(0,i.createElement)("div",{className:"wcf-search-steps--form w-56"},(0,i.createElement)(tg,{type:"text",value:l,onChange:function(e){if(c(e),e&&e.length>=3){const t=e.toLowerCase(),n=g.filter(function(e){return(e.title&&e.title.toLowerCase()||"").includes(t)});y(n)}else y(g)},placeholder:(0,D.__)("Search Steps","cartflows"),size:"md",prefix:(0,i.createElement)(ZV,{className:"size-4 text-field-placeholder"}),suffix:l.length>=3?(0,i.createElement)(ww,{className:"size-4 cursor-pointer text-field-placeholder pointer-events-auto",onClick:()=>{c(""),y(g)}}):null})),(0,i.createElement)("span",{className:"divider w-px bg-background-secondary h-7"}),(0,i.createElement)(cY,null)))),(0,i.createElement)("div",{className:"wcf-step-library__body"},(0,i.createElement)("div",{className:"wcf-remote-content"},"other"!==t&&"bricks-builder"!==t&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-ready-templates"},(0,i.createElement)(lY,{templates:w,currentStep:o,setcurrentStepCB:a,allowedStepTypes:d}))),("other"===t||"bricks-builder"===t)&&(0,i.createElement)("div",{className:"wcf-start-from-scratch current flex items-center justify-center min-h-[500px]"},(0,i.createElement)(dY,null)))))},pY=(0,LI.compose)((0,OI.withSelect)(e=>{const{getDefaultPageBuilder:t}=e("wcf/importer");return{default_page_builder:t()}}))(({default_page_builder:e})=>{const[{flow_id:t}]=Zp();return"library"===new URLSearchParams((0,m.useLocation)().search).get("tab")?(0,i.createElement)(fY,null):(0,i.createElement)("div",{className:"wcf-flow-library wcf-flex"},"bricks-builder"!==e&&"other"!==e?(0,i.createElement)(I,{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,i.createElement)(oY,{page_builder:e}))}),mY=(0,LI.compose)((0,OI.withSelect)(e=>{const{getStoreStepTypes:t}=e("wcf/importer");return{stepTypes:t()}}),(0,OI.withDispatch)(e=>{const{setSelectedStep:t}=e("wcf/importer");return{setSelectedStep(e){t(e)}}}))(({stepTypes:e,setSelectedStep:t})=>(0,i.createElement)("div",{className:"wcf-create-step__dropdown-list wcf-select-option w-full text-left"},(0,i.createElement)(lw,{onChange:e=>{t(e)},size:"md"},(0,i.createElement)(lw.Button,{placeholder:(0,D.__)("Select Step Type","cartflows"),render:t=>t?e[t]||t:""}),(0,i.createElement)(lw.Options,null,Object.keys(e).map(t=>(0,i.createElement)(lw.Option,{value:t,key:t},e[t])))))),hY=(0,LI.compose)((0,OI.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:a,stepTypes:l,license_status:c,setInputFieldVisibility:d,setErrorDesc:u})=>{const f=e.type||"",p=e.title||l[f]||"",[m,h]=(0,s.useState)("Import Step"),[g,w]=(0,s.useState)(!1),[y,b]=(0,s.useState)({cta:"",error_msg:""}),{cta:v}=y;if(v)return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("span",{className:"wcf-message wcf-message--error",dangerouslySetInnerHTML:{__html:v}}));if(""===e.type)return(0,i.createElement)(Po,{variant:"primary",size:"md",disabled:!0},m);const x=r?r.filter(e=>f===e.type):[];if(console.log("selectedExistSteps.length",x.length),1<=x.length&&!wcfCartflowsPro())return d("hidden"),u((0,D.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")),"not-installed"===o?(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Higher plan","cartflows")}):(u((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 79 |
(0,D.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,null));if("upsell"===f||"downsell"===f){if(d("hidden"),!wcfCartflowsTypePlusPro())return wcfInactiveProPlus()?(u((0,D.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 80 |
(0,D.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),f,cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,null)):(u((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 81 |
(0,D.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),f)),(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Higher Plan","cartflows")}));if("Activated"!==c)return d("hidden"),u((0,D.__)("Activate license for adding more flows and other features.","cartflows")),(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(BI,{title:`Activate License and ${m}`})))}return"pro"!==e.template_type||wcfCartflowsTypePro()?"landing"!==f&&"active"!==a?(d("hidden"),"inactive"===a?(u((0,D.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")),(0,i.createElement)($V,{title:`Activate WooCommerce to Import ${p}`})):(0,i.createElement)(XV,null)):(d(""),(0,i.createElement)(Po,{variant:"primary",size:"md",loading:g,disabled:g,icon:(0,i.createElement)(HV,{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,D.__)("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")}Xf()({url:cartflows_admin.ajax_url,method:"POST",body:l}).then(e=>{if(e.success)o(!1),n((0,D.__)("Imported! Redirecting…","cartflows")),gm.success((0,D.__)("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,D.__)(" Please sync the library and try importing the template again.","cartflows")),s(Wm(t)),n((0,D.__)("Import Failed! Try again.","cartflows")),gm.error((0,D.__)("Failed to import step.","cartflows")),setTimeout(()=>{n((0,D.__)("Import Step","cartflows"))},3e3),o(!1)}}).finally(()=>{window.sessionStorage.removeItem("wcf_edge_insertion_context")})})(e,n,h,t,w,g,b,u)}},m)):(d("hidden"),"inactive"===o&&"pro"===wcfInactivepluginType()?(d("hidden"),u((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 82 |
(0,D.__)("Access all of our pro templates by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,null)):(d("hidden"),u((0,D.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")),(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Pro","cartflows")})))}),gY=(0,LI.compose)((0,OI.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:a=""})=>{const[l,c]=(0,s.useState)({isProcessing:!1,buttonText:"Create Step"}),{isProcessing:d,buttonText:u}=l;return(0,i.createElement)(Po,{variant:"primary",size:"md",loading:d,disabled:d,onClick:i=>{i.preventDefault(),d||(c({isProcessing:!0,buttonText:(0,D.__)("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")}Xf()({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,D.__)("Step Created! Redirecting…","cartflows")}),gm.success((0,D.__)("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,D.__)("Failed to Create Step!","cartflows")}),gm.error((0,D.__)("Failed to create step.","cartflows")))})})(e,t,n,c,r,o,a))}},u)}),wY=(0,LI.compose)((0,OI.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:a,setInputFieldVisibility:s,setErrorDesc:l,offerYesStepId:c="",offerNoStepId:d=""})=>{if(""===e)return(0,i.createElement)("button",{className:"wcf-button wcf-primary-button",disabled:!0},(0,D.__)("Create Step","cartflows"));if(1<=(t?t.filter(t=>e===t.type):[]).length&&!wcfCartflowsPro())return s("hidden"),l((0,D.__)("Add multiple steps to your flows today with an upgraded CartFlows plan.","cartflows")),"not-installed"===n?(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Higher Plan","cartflows")}):(l((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 83 |
(0,D.__)("Add multiple steps to your flows by activating %s.","cartflows"),cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,{description:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 84 |
(0,D.__)("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,D.sprintf)(/* translators: %1$s, %2$s are variables */ /* translators: %1$s, %2$s are variables */ |
| 85 |
(0,D.__)("Add %1$s step to your flows by activating %2$s.","cartflows"),e,cartflows_admin.cf_pro_type_inactive)),(0,i.createElement)(zI,null)):(s("hidden"),l((0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 86 |
(0,D.__)("Add unlimited income boosting one-click %s to your flows when you upgrade to our CartFlows Higher plan today.","cartflows"),e)),(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Higher Plan","cartflows")}));if(wcfCartflowsTypePlusPro()&&"Activated"!==o)return s("hidden"),l((0,D.__)("Activate license for adding more steps and other features.","cartflows")),(0,i.createElement)("div",{className:"wcf-name-your-flow__actions wcf-pro--required"},(0,i.createElement)("div",{className:"wcf-flow-import__button"},(0,i.createElement)(BI,{title:(0,D.__)("Activate License","cartflows")})))}return"landing"!==e&&"active"!==r?(s("hidden"),"inactive"===r?(l((0,D.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")),(0,i.createElement)($V,null)):(0,i.createElement)(XV,null)):(s(""),l(""),(0,i.createElement)(gY,{stepName:a,offerYesStepId:c,offerNoStepId:d}))}),yY=({stepName:e,setInputFieldVisibility:t,setErrorDesc:n,offerYesStepId:r="",offerNoStepId:o=""})=>(0,i.createElement)("div",{className:"wcf-create-step__button-wrap"},(0,i.createElement)(wY,{stepName:e,setInputFieldVisibility:t,setErrorDesc:n,offerYesStepId:r,offerNoStepId:o})),bY=({visibility:e,setVisibility:t,item:n,type:r,stepName:o,setStepName:a})=>{const l="show"===e,[c,d]=(0,s.useState)(""),[u,f]=(0,s.useState)(""),[p,m]=(0,s.useState)(0),[h,g]=(0,s.useState)(""),[w,y]=(0,s.useState)(""),{currentFlowSteps:b,selectedStep:v}=(0,OI.useSelect)(e=>({currentFlowSteps:e("wcf/importer").getcurrentFlowSteps(),selectedStep:e("wcf/importer").getselectedStep()})),x="ready-templates"===r?n&&("upsell"===n.type||"downsell"===n.type):"upsell"===v||"downsell"===v,N=tY(b);return(0,i.createElement)(vh,{open:l,setOpen:e=>{e||t("hide")},exitOnClickOutside:!1},(0,i.createElement)(vh.Panel,{className:"sm:max-w-lg w-full"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Header,{className:"flex items-center justify-between !space-y-0"},(0,i.createElement)(vh.Title,null,"hidden"===c?(0,D.__)("Upgrade Required","cartflows"):(0,D.__)("Name Your Step","cartflows")),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,null,(0,i.createElement)("div",{className:`${c}`},(0,i.createElement)("div",{className:"flex justify-between py-2"},(0,i.createElement)("label",{className:"flex gap-1 text-sm font-normal text-text-primary"},(0,D.__)("Step Name","cartflows")),(0,i.createElement)("span",{className:"text-xs font-normal "+(40===p?"text-brand-500":"text-field-placeholder")},p,"/40")),(0,i.createElement)(tg,{type:"text",value:o,onChange:e=>{e.length<=40&&(m(e.length),a(e))},placeholder:(0,D.__)("Enter Step Name","cartflows"),size:"md"})),"hidden"!==c&&x&&N.length>0&&(0,i.createElement)(nY,{offerYesStepId:h,setOfferYesStepId:g,offerNoStepId:w,setOfferNoStepId:y,availableSteps:N}),""!==u&&(0,i.createElement)("p",{className:"text-sm font-regular text-text-secondary mt-3 m-0"},u)),(0,i.createElement)(vh.Footer,{className:"flex gap-3 justify-end"},"ready-templates"===r&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Po,{variant:"outline",size:"md",onClick:()=>t("hide")},(0,D.__)("Cancel","cartflows")),(0,i.createElement)(hY,{currentStep:n,stepName:o,setInputFieldVisibility:d,setErrorDesc:f,offerYesStepId:h,offerNoStepId:w})),"create-your-own"===r&&(0,i.createElement)(yY,{stepName:o,setInputFieldVisibility:d,setErrorDesc:f,offerYesStepId:h,offerNoStepId:w}))))},vY=(0,LI.compose)((0,OI.withSelect)(e=>{const{getselectedStep:t}=e("wcf/importer");return{selectedStep:t()}}))(({selectedStep:e})=>{const[t,n]=(0,s.useState)("hide"),[r,o]=(0,s.useState)("");return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(bY,{visibility:t,setVisibility:n,type:"create-your-own",stepName:r,setStepName:o}),(0,i.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,i.createElement)("div",{className:"wcf-step-library--item--scratch-select text-center w-full h-full min-h-[400px] max-h-[400px] flex flex-col gap-4 items-center justify-center"},(0,i.createElement)("h3",{className:"text-base text-text-primary p-4 text-center font-medium m-0"},(0,D.__)("Select Step Type","cartflows")),(0,i.createElement)(mY,null),(0,i.createElement)(Po,{variant:"primary",size:"md",disabled:""===e,icon:(0,i.createElement)(yg,{className:"h-18 w-18 stroke-2"}),iconPosition:"left",onClick:()=>{n("hide"===t?"show":"hide")}},(0,D.__)("Create Step","cartflows")),(0,i.createElement)("div",{className:"wcf-learn-how"},(0,i.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,i.createElement)(UI,{className:"w-18 h-18 stroke-1"}),(0,D.__)("Learn More","cartflows")))),(0,i.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle absolute bottom-0 left-0 w-full"},(0,i.createElement)("div",{className:"wcf-item__heading text-base text-text-primary font-medium p-4 text-center"},(0,D.__)("Create from Scratch","cartflows")))))}),xY=(0,LI.compose)((0,OI.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,D.__)("Error","cartflows");return(0,cn.createPortal)((0,i.createElement)("div",{className:`wcf-name-your-flow ${e}`},(0,i.createElement)(vh,{open:"show"===e,setOpen:e=>{e||t("hide")},exitOnClickOutside:!0},(0,i.createElement)(vh.Panel,{className:"sm:max-w-lg w-full"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Header,{className:"flex items-center justify-between !space-y-0"},(0,i.createElement)(vh.Title,{className:"wcf-name-your-flow--title"},o),(0,i.createElement)(vh.CloseButton,null)),(0,i.createElement)(vh.Body,null,(0,i.createElement)("div",{className:"wcf-name-your-flow__body"},(0,i.createElement)("p",null,n))),(0,i.createElement)(vh.Footer,{className:"wcf-name-your-flow--footer bg-brand-25 flex justify-end gap-4"},(0,i.createElement)(Po,{variant:"outline",size:"md",className:"no-underline text-center",onClick:()=>t("hide")},(0,D.__)("Close","cartflows")))))),document.getElementById("wcf-json-importer"))}),NY=(0,LI.compose)((0,OI.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:a,stepTypes:l,license_status:c,setInputFieldVisibility:d,step_id:u})=>{const f=e.type||"",p=e.title||l[f]||"",[m,h]=(0,s.useState)("Choose"),[g,w]=(0,s.useState)(!1),[y,b]=(0,s.useState)("hide"),[v,x]=(0,s.useState)("");if(""===e.type)return(0,i.createElement)(Po,{variant:"primary",size:"md",disabled:!0},m);const N=r?r.filter(e=>f===e.type):[];if(console.log("selectedExistSteps.length",N.length),("upsell"===f||"downsell"===f)&&!wcfCartflowsPro()){if(d("hidden"),!wcfCartflowsTypePlusPro())return"not-installed"!==o||"pro"===cartflows_admin.cf_pro_type&&"plus"===cartflows_admin.cf_pro_type?(0,i.createElement)(zI,{description:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 87 |
(0,D.__)("Add unlimited income boosting one-click upsells to your flows by activating %s","cartflows"),cartflows_admin.cf_pro_type_inactive)}):(0,i.createElement)(PI,{desc:(0,D.__)("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"!==c)return d("hidden"),(0,i.createElement)(BI,{title:`Activate License and ${m}`})}return"pro"!==e.template_type||wcfCartflowsTypePro()?"landing"!==f&&"active"!==a?(d("hidden"),"inactive"===a?(0,i.createElement)($V,{title:`Activate WooCommerce to Import ${p}`,description:(0,D.__)("You need WooCommerce plugin installed and activated to import this step.","cartflows")}):(0,i.createElement)(XV,null)):(d(""),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Po,{variant:"primary",size:"md",loading:g,disabled:g,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),Xf()({url:cartflows_admin.ajax_url,method:"POST",body:c}).then(e=>{console.log(e),e.success?(o(!1),n("Changed! Redirecting..."),gm.success((0,D.__)("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,h,t,w,g,u,b,x)}},m),(0,i.createElement)(xY,{visibility:y,setVisibility:b,errorMessage:v}))):(d("hidden"),"not-installed"===o||"pro"!==cartflows_admin.cf_pro_type?(d("hidden"),(0,i.createElement)(PI,{title:(0,D.__)("Get CartFlows Pro","cartflows"),desc:(0,D.__)("Access all of our pro templates when you upgrade your plan to CartFlows Pro today.","cartflows")})):(d("hidden"),(0,i.createElement)(zI,{description:(0,D.sprintf)(/* translators: %s is replaced with plugin name */ /* translators: %s is replaced with plugin name */ |
| 88 |
(0,D.__)("Access all of our pro templates by activating %s","cartflows"),cartflows_admin.cf_pro_type_inactive)})))}),_Y=function({item:e,mode:t,step_id:n}){void 0===t&&(t="");const[r,o]=(0,s.useState)("hide"),[a,l]=(0,s.useState)("");return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(bY,{visibility:r,setVisibility:o,type:"ready-templates",stepName:a,setStepName:l,item:e}),(0,i.createElement)("div",{key:e.id,className:"wcf-template-item group cursor-pointer relative transition ease-in-out delay-150 rounded-lg shadow-md"},"pro"===e.template_type?(0,i.createElement)("div",{className:"z-10 absolute top-5 right-5"},(0,i.createElement)(zp,null)):"",(0,i.createElement)("div",{className:"wcf-item__inner bg-background-primary border border-border-subtle"},(0,i.createElement)("div",{className:"wcf-item__thumbnail-wrap relative"},(0,i.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,i.createElement)("img",{className:"wcf-item__thumbnail-image w-full",src:e.featured_image_url,alt:(0,D.__)("Step thumbnail image","cartflows")})),(0,i.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,i.createElement)("div",{className:"mx-auto my-0 text-center flex flex-col gap-4 relative top-[35%]"},(0,i.createElement)("span",{className:"wcf-step-preview-wrap"},(0,i.createElement)(Po,{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,i.createElement)(UI,{className:"w-4 h-4 stroke-2"})},(0,D.__)("Preview","cartflows"))),(0,i.createElement)("span",{className:"wcf-item__btn",onClick:()=>{o("hide"===r?"show":"hide")}},(0,i.createElement)(Po,{variant:"primary",size:"sm",className:"mx-auto !w-fit",icon:(0,i.createElement)(iY,{className:"w-4 h-4 stroke-2"})},(0,D.__)("Import","cartflows")))),"dynamic"===t&&(0,i.createElement)("div",{className:"mx-auto my-0 text-center relative top-1/2"},(0,i.createElement)(NY,{currentStep:e,stepName:"StepName",setInputFieldVisibility:o,step_id:n})))),(0,i.createElement)("div",{className:"wcf-item__heading-wrap border-0 border-t border-solid border-border-subtle"},(0,i.createElement)("span",{className:"wcf-item__heading block text-base text-text-primary font-medium p-4 text-center"},e.title)))))},EY=function(e){const{templates:t,currentStep:n,required_step_type:r,currentStepId:o,setcurrentStepCB:a}=e,l=t,{step_types:c}=(0,OI.useSelect)(e=>({step_types:e("wcf/importer").getStoreStepTypes()})),d=void 0===r?"default":"dynamic",u=void 0===r?c:r;let f=0;void 0!==o&&(f=o);const p=Object.entries(u);return(0,i.createElement)(s.Fragment,null,"default"===d&&(0,i.createElement)("div",{className:"wcf-remote-steps-filters flex gap-4 items-center p-8 mb-8 -m-8 bg-background-primary"},(0,i.createElement)("div",{className:"wcf-categories w-full"},(0,i.createElement)("div",{className:"wcf-step-type-filter--links sm:block lg:block hidden"},(0,i.createElement)(YM.Group,{activeItem:n,variant:"rounded",size:"sm",width:"auto",className:"!bg-transparent !p-0 !ring-0 !gap-4",onChange:({value:e})=>{a(e.slug)}},p.map(([e,t])=>{const r=e===n;return(0,i.createElement)(YM.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,i.createElement)("div",{className:"sm:hidden lg:hidden block"},(0,i.createElement)(lw,{value:n,onChange:e=>{a(e)},size:"sm"},(0,i.createElement)(lw.Button,null),(0,i.createElement)(lw.Options,null,p.map(e=>(0,i.createElement)(lw.Option,{key:e[0],value:e[0]},e[1]))))))),(0,i.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,i.createElement)("div",{className:"wcf-start-from-scratch"},(0,i.createElement)(vY,null)),l.map(e=>(0,i.createElement)(_Y,{item:e,key:e.id,mode:d,step_id:f}))))},MY=(0,LI.compose)((0,OI.withSelect)(e=>{const{getselectedStep:t}=e("wcf/importer");return{selectedStep:t()}}))(({selectedStep:e})=>{const[t,n]=(0,s.useState)("hide"),[r,o]=(0,s.useState)(""),[{page_builder:a}]=Zp();return(0,i.createElement)(i.Fragment,null,(0,i.createElement)(bY,{visibility:t,setVisibility:n,type:"create-your-own",stepName:r,setStepName:o}),(0,i.createElement)("div",{className:"wcf-step-library--item__start-scratch flex gap-6 mx-auto max-w-4xl px-10 py-14"},(0,i.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,i.createElement)(iS,{title:(0,D.__)("Create from Scratch","cartflows"),description:(0,D.__)("Select a step type to get started.","cartflows"),tag:"h3",size:"xs",className:"text-center text-base [&>p]:text-text-secondary"}),(0,i.createElement)("div",{className:"w-full"},(0,i.createElement)(mY,null)),(0,i.createElement)(Po,{variant:"primary",size:"md",disabled:""===e,icon:(0,i.createElement)(yg,{className:"h-5 w-5 stroke-2"}),iconPosition:"left",onClick:()=>{n("hide"===t?"show":"hide")}},(0,D.__)("Create Step","cartflows"))),(0,i.createElement)("div",{className:"wcf-step-library--item__info flex flex-col gap-6 justify-center w-3/4"},(0,i.createElement)("h3",{className:"text-xl text-text-primary font-semibold m-0"},"bricks-builder"===a&&(0,D.__)("It seems that you are using the Bricks Builder.","cartflows"),"other"===a&&(0,D.__)("It seems that you are using the page builder other than Elementor, Beaver Builder, Block Builder.","cartflows")),(0,i.createElement)("span",{className:"text-base text-text-secondary font-normal mt-2"},"bricks-builder"===a&&(0,D.__)("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"===a&&(0,D.__)("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,i.createElement)("span",{className:"mt-2"},(0,i.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,D.__)("Learn How","cartflows"),(0,i.createElement)(UI,{className:"w-4 h-4 stroke-1"}))))))}),IY=function(){const e=(0,m.useHistory)(),[{page_builder:t,flow_id:n}]=Zp(),[r,o]=(0,s.useState)("upsell"),[a,l]=(0,s.useState)(""),{all_step_templates:c}=(0,OI.useSelect)(e=>({all_step_templates:e("wcf/importer").getAllStepTemplates()})),d=[];c.forEach(e=>{r===e.type&&d.push(e)});const[u,f]=(0,s.useState)(d);return(0,s.useEffect)(()=>{f(d)},[r]),(0,i.createElement)("div",{className:`wcf-step-library wcf-step-library-${t}`},(0,i.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,i.createElement)("h3",{className:"text-xl font-semibold text-text-primary m-0 flex items-center gap-2"},(0,i.createElement)(Po,{variant:"ghost",size:"xs","aria-label":(0,D.__)("Back to Store Checkout","cartflows"),icon:(0,i.createElement)(yk,{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,D.__)("Steps Library","cartflows")),"other"!==t&&"bricks-builder"!==t&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"gap-4 flex justify-between items-center"},(0,i.createElement)("div",{className:"wcf-search-steps--form w-56"},(0,i.createElement)(tg,{type:"text",value:a,onChange:function(e){if(l(e),e&&e.length>=3){const t=e.toLowerCase(),n=d.filter(function(e){return(e.title&&e.title.toLowerCase()||"").includes(t)});f(n)}else f(d)},placeholder:(0,D.__)("Search Steps","cartflows"),size:"md",prefix:(0,i.createElement)(ZV,{className:"size-4 text-field-placeholder"}),suffix:a.length>=3?(0,i.createElement)(ww,{className:"size-4 cursor-pointer text-field-placeholder pointer-events-auto",onClick:()=>{l(""),f(d)}}):null})),(0,i.createElement)("span",{className:"divider w-px bg-background-secondary h-7"}),(0,i.createElement)(cY,{template:"store-checkout"})))),(0,i.createElement)("div",{className:"wcf-step-library__body"},(0,i.createElement)("div",{className:"wcf-remote-content"},"other"!==t&&"bricks-builder"!==t&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-ready-templates"},(0,i.createElement)(EY,{templates:u,currentStep:r,setcurrentStepCB:o}))),("other"===t||"bricks-builder"===t)&&(0,i.createElement)("div",{className:"wcf-start-from-scratch current flex items-center justify-center min-h-[500px]"},(0,i.createElement)(MY,null)))))},SY=(0,LI.compose)((0,OI.withSelect)(e=>{const{getDefaultPageBuilder:t}=e("wcf/importer");return{default_page_builder:t()}}))(({default_page_builder:e})=>{const[{flow_id:t}]=Zp();return"library"===new URLSearchParams((0,m.useLocation)().search).get("tab")?(0,i.createElement)(IY,null):(0,i.createElement)("div",{className:"wcf-flow-library wcf-flex"},"other"!==e?(0,i.createElement)(I,{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,i.createElement)(vY,null))}),kY=function(){const[{step_data:e,page_builder:t,flow_id:n,step_id:r}]=Zp(),o=(0,m.useHistory)(),a={[e.type]:""},[l,c]=(0,s.useState)(e.type),{all_step_templates:d}=(0,OI.useSelect)(e=>({all_step_templates:e("wcf/importer").getAllStepTemplates()})),u=[];d.forEach(t=>{e.type===t.type&&u.push(t)});const f=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&&f(),(0,i.createElement)("div",{className:`wcf-step-library wcf-step-library-${t}`},(0,i.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,i.createElement)(i.Fragment,null,(0,i.createElement)("h3",{className:"flex items-center gap-2 text-2xl font-semibold text-text-primary m-0"},(0,i.createElement)(Po,{variant:"ghost",size:"xs",icon:(0,i.createElement)(yk,{className:"w-6 h-6 stroke-1"}),onClick:f}),(0,D.sprintf)(/* translators: %s is replaced with the step title */ /* translators: %s is replaced with the step title */ |
| 89 |
(0,D.__)("Templates for %s","cartflows"),e.title)),(0,i.createElement)("div",{className:"wcf-step-library__step-actions"},(0,i.createElement)("div",{className:"wcf-tab-wrapper"},(0,i.createElement)("div",{className:"wcf-get-started-steps"}))))),(0,i.createElement)("div",{className:"wcf-step-library__body"},(0,i.createElement)("div",{className:"wcf-remote-content"},"other"!==t&&e&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-ready-templates current"},(0,i.createElement)(EY,{templates:u,currentStep:l,required_step_type:a,currentStepId:e.id,setcurrentStepCB:c}))),"other"===t&&(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{className:"wcf-start-from-scratch current"},(0,i.createElement)(vY,null))))))};function DY({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 CY=s.forwardRef(DY);function jY({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 AY=s.forwardRef(jY);function TY({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 LY=s.forwardRef(TY),OY=({slides:e})=>{const[t,n]=(0,s.useState)(0),[r,o]=(0,s.useState)(!1);return(0,i.createElement)("div",{className:"slider-container mb-2"},(0,i.createElement)("div",{className:"slide-wrapper gap-2 border border-solid border-yellow-400 rounded-lg bg-alert-background-warning p-3"},(0,i.createElement)("div",{className:"slide flex items-center gap-2 "+(r?"fade-out":"fade-in")},(0,i.createElement)("div",{className:"wcf-payment-gateway-notice--icon flex"},(0,i.createElement)(CY,{className:"h-5 w-5 text-support-warning","aria-hidden":"true"})),(0,i.createElement)("div",{dangerouslySetInnerHTML:{__html:e[t]}})),e.length>1&&(0,i.createElement)("div",{className:"slider-dots"},(0,i.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,i.createElement)(AY,{className:"h-8 w-8","aria-hidden":"true"})),(0,i.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,i.createElement)(LY,{className:"h-8 w-8","aria-hidden":"true"})))))},zY=function(){const e=new URLSearchParams((0,m.useLocation)().search),[{flow_type:t}]=Zp(),n=e.get("tab"),r=!!e.get("step_id"),o="true"===e.get("flow_settings"),a=cartflows_admin.cartflows_admin_notices,s=a.length>0&&!r&&!o;return(0,i.createElement)(i.Fragment,null,s&&(0,i.createElement)("div",{className:"wcf-notices-wrapper"},(0,i.createElement)(OY,{slides:a})),function(){let e="";switch(n){case"library":e="flows"===t?(0,i.createElement)(pY,null):(0,i.createElement)(SY,null);break;case"update-template":e=(0,i.createElement)(kY,null);break;default:e=(0,i.createElement)(LV,null)}return e}())},PY=function(){const[e]=Zp();return function(){const[{options:e},t]=Zp(),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:null!==e["wcf-pre-checkout-offer-product"]?e["wcf-pre-checkout-offer-product"].product_desc:""}),t({type:"SET_OPTION",name:"wcf-pre-checkout-offer-product-title",value:null!==e["wcf-pre-checkout-offer-product"]?e["wcf-pre-checkout-offer-product"].product_name:""}))},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:"image-selector"},{type:"toggle"},{type:"selectioncard"},{type:"select-with-logo"}];(0,s.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,i.createElement)(i.Fragment,null,(0,i.createElement)(zY,null))},RY=function(e){const t=new URLSearchParams((0,m.useLocation)()?.search).get("flow_id");return"flows"===e.flowType?(Up.flow_id=t,Up.flow_type="flows"):(Up.flow_id=cartflows_admin.global_checkout_id,Up.flow_type="storeCheckout"),(0,i.createElement)(i.Fragment,null,(0,i.createElement)(Yp,{reducer:Qp,initialState:Up},(0,i.createElement)(PY,{type:e.flowType})))},UY=function(){const e=new URLSearchParams((0,m.useLocation)().search),t=e.get("action"),n=e.get("path");let r="flows";return"store-checkout"===n&&(r="storeCheckout"),wcfWpNavMenuChange(n),(0,i.createElement)(i.Fragment,null,function(){let e="";return e="wcf-edit-flow"===t?(0,i.createElement)(RY,{flowType:r}):(0,i.createElement)("h1",null,"404 Not Found."),e}())};function BY({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 FY=s.forwardRef(BY);function QY({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 VY=s.forwardRef(QY);function YY({title:e,titleId:t,...n},r){return s.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?s.createElement("title",{id:t},e):null,s.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 ZY=s.forwardRef(YY),WY={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},GY={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"},HY="bg-background-inverse border-background-inverse",$Y={light:"text-icon-secondary",dark:"text-icon-inverse"};let XY=!1;const qY=({toastItem:e,title:t="",content:n="",autoDismiss:r=!0,dismissAfter:o=5e3,theme:a="light",design:i="stack",icon:l,variant:c="neutral",removeToast:d})=>{const u=(0,s.useRef)(0),f=(0,s.useRef)(0),p=(0,s.useRef)(),m=(e,t=o)=>{if(r&&!(o<0))return u.current=(new Date).getTime(),setTimeout(()=>{"function"==typeof d&&d(e.id)},t)};(0,s.useEffect)(()=>{const t=o;return p.current=m(e,t),()=>{clearTimeout(p.current)}},[]),(0,s.useEffect)(()=>{!e?.dismiss||"function"!=typeof d||d(e.id)},[e]);const h=()=>{"function"==typeof d&&e?.action?.onClick?.(()=>d(e.id))};let g=null;return"stack"===i&&(g=(0,C.jsx)("div",{className:Ie("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?HY:GY?.[c],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(p.current),f.current=(new Date).getTime()},onMouseLeave:()=>{p.current=m(e,o-(f.current-u.current))},children:"custom"!==e.type?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Bo({variant:c,icon:l,theme:a})}),(0,C.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[Qo({title:t,theme:a}),Vo({content:n,theme:a}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,C.jsx)("div",{className:"mt-2.5",children:Fo({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:h,theme:a})})]}),(0,C.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,C.jsx)("button",{className:Ie("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",$Y[a]??$Y.light),onClick:t=>{t.preventDefault(),t.stopPropagation(),"function"==typeof d&&d(e.id)},children:(0,C.jsx)(Af,{})})})]}):e?.jsx?.({close:()=>d(e.id),action:e?.action?{...e?.action,onClick:h}:null})})),"inline"===i&&(g=(0,C.jsxs)("div",{className:Ie("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?HY:GY?.[c],"lg:w-[47.5rem] w-full"),children:[(0,C.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Bo({variant:c,icon:l,theme:a})}),(0,C.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[Qo({title:t,theme:a}),Vo({content:n,theme:a})]}),(0,C.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,C.jsx)("button",{className:Ie("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",$Y[a]??$Y.light),onClick:()=>d(e.id),children:(0,C.jsx)(Af,{})})})]})),g},JY=(e=>(0,s.memo)(t=>{const n=t.singleTon;return XY&&n?null:(XY=!0,(0,C.jsx)(e,{...t}))}))(({position:e="top-right",design:t="stack",theme:n="light",className:r="",autoDismiss:o=!0,dismissAfter:a=5e3})=>{const[i,l]=(0,s.useState)([]);(0,s.useEffect)(()=>{hm.subscribe(e=>{e?.dismiss?l(t=>t.map(t=>t.id===e.id?{...t,dismiss:!0}:t)):setTimeout(()=>{(0,cn.flushSync)(()=>l(t=>-1!==t.findIndex(t=>t.id===e.id)?t.map(t=>t.id===e.id?{...t,...e}:t):[...t,e]))})})},[]);const c=e=>{l(t=>t.filter(t=>t.id!==e))};return(0,C.jsx)("ul",{className:Ie("fui-toast-container fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",WY[e]??WY["top-right"],r),children:(0,C.jsx)(sp,{initial:!1,children:i.map(e=>(0,C.jsx)(bf.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,C.jsx)(qY,{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:c,variant:e.type,theme:e?.theme??n})},e.id))})})});class KY extends s.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,i.createElement)("div",{className:"wcf-error-boundary flex items-center justify-center min-h-[60vh]"},(0,i.createElement)("div",{className:"w-full max-w-md rounded-xl border border-border-subtle bg-background-primary shadow-md text-center overflow-hidden"},(0,i.createElement)("div",{className:"h-1 bg-gradient-to-r from-orange-400 via-red-400 to-orange-400"}),(0,i.createElement)("div",{className:"px-8 pt-8 pb-8"},(0,i.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,i.createElement)(Ah,{className:"h-7 w-7 text-support-error"})),(0,i.createElement)(iS,{size:"md",tag:"h2",className:"mb-2"},(0,D.__)("Something went wrong","cartflows")),(0,i.createElement)(Ym,{size:"sm",color:"tertiary",className:"mb-6 max-w-xs mx-auto"},(0,D.__)("An unexpected error occurred while loading this section. Refreshing the page should fix the issue.","cartflows")),(0,i.createElement)("div",{className:"flex items-center justify-center gap-3"},(0,i.createElement)(Po,{variant:"outline",size:"sm",onClick:()=>window.history.back()},(0,D.__)("Go Back","cartflows")),(0,i.createElement)(Po,{variant:"primary",size:"sm",icon:(0,i.createElement)(zf,{className:"h-4 w-4"}),onClick:()=>window.location.reload()},(0,D.__)("Refresh Page","cartflows")))))):this.props.children}}const eZ=KY;(0,i.createRoot)(document.getElementById("wcf-editor-app")).render((0,i.createElement)(({reducer:e,initialState:t,children:n})=>(0,i.createElement)(d.Provider,{value:(0,s.useReducer)(e,t)},n),{initialState:p,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,i.createElement)(function({children:e}){const[t,n]=(0,s.useState)({isOpen:!1}),[r,o]=(0,s.useState)(!1),a=(0,s.useRef)(),l=(0,s.useRef)(),c=(0,s.useCallback)(e=>new Promise(t=>{n({...e,isOpen:!0}),l.current=e.onConfirm,a.current=r=>{t(r),n({...e,isOpen:!1})}}),[n]);return(0,i.createElement)(Oh.Provider,{value:c},e,(0,i.createElement)(Lh,(0,w.A)({isOpen:t.isOpen,isLoading:r},t,{onClose:()=>a.current(!1),onConfirm:()=>(async()=>{try{o(!0),l.current&&await l.current(),a.current&&a.current(!0)}catch(e){a.current&&a.current(!1)}finally{o(!1)}})()})))},null,(0,i.createElement)(eZ,null,(0,i.createElement)(function(){return(0,i.createElement)(v,null,(0,i.createElement)(Rp,null),(0,i.createElement)("div",{className:"wcf-app-content-wrapper wcf-app-wrapper--editor-app p-8"},(0,i.createElement)(m.Switch,null,(0,i.createElement)(m.Route,{path:"/"},(0,i.createElement)(UY,null)))))},null)),(0,i.createElement)(function(){const{promiseInProgress:e}=(0,Xh.H8)();let t=(0,D.__)("Please wait…","cartflows"),n="";if(e)switch(window.wcfAction){case"cloneFlow":t=(0,D.__)("Please wait. Duplicating funnel…","cartflows"),n=(0,i.createElement)(Hm,{className:"w-18 h-18 text-brand-500"});break;case"draftFlow":t=(0,D.__)("Please wait. Drafting funnel…","cartflows"),n=(0,i.createElement)(jp,{className:"w-18 h-18 text-brand-500"});break;case"deleteFlow":t=(0,D.__)("Please wait. Deleting funnel…","cartflows"),n=(0,i.createElement)(Xm,{className:"w-18 h-18 text-brand-500"});break;case"restoreFlow":t=(0,D.__)("Please wait. Restoring funnel…","cartflows"),n=(0,i.createElement)(FY,{className:"w-18 h-18 text-brand-500"});break;case"exportFlow":t=(0,D.__)("Please wait. Exporting…","cartflows"),n=(0,i.createElement)(VY,{className:"w-18 h-18 text-brand-500"});break;case"cloneStep":t=(0,D.__)("Please wait. Duplicating step…","cartflows"),n=(0,i.createElement)(Hm,{className:"w-18 h-18 text-brand-500"});break;case"deleteStep":t=(0,D.__)("Please wait. Deleting step…","cartflows"),n=(0,i.createElement)(Xm,{className:"w-18 h-18 text-brand-500"});break;case"abtestStep":t=(0,D.__)("Please wait. Creating variation…","cartflows"),n=(0,i.createElement)(Hm,{className:"w-18 h-18 text-brand-500"});break;case"archiveStep":t=(0,D.__)("Please wait. Archiving variation…","cartflows"),n=(0,i.createElement)(ZY,{className:"w-18 h-18 text-brand-500"});break;case"winnerStep":t=(0,D.__)("Please wait. Declaring winner…","cartflows"),n=(0,i.createElement)(FY,{className:"w-18 h-18 text-brand-500"});break;default:t=(0,D.__)("Please wait…","cartflows"),n=""}return(0,i.createElement)(vh,{open:!!e,setOpen:()=>{},exitOnClickOutside:!1,exitOnEsc:!1},(0,i.createElement)(vh.Panel,{className:"sm:max-w-sm w-full"},(0,i.createElement)(vh.Backdrop,null),(0,i.createElement)(vh.Body,{className:"flex flex-col items-center py-6"},(0,i.createElement)("div",{className:"relative"},(0,i.createElement)("div",{className:"w-16 h-16 border-brand-200 border-2 rounded-full"}),(0,i.createElement)("div",{className:"w-16 h-16 border-brand-500 border-t-2 animate-spin rounded-full absolute left-0 top-0"}),(0,i.createElement)("div",{className:"w-16 h-16 absolute left-0 top-0 flex justify-center items-center"},n)),(0,i.createElement)("p",{className:"mt-5 text-sm font-normal text-text-secondary text-center m-0"},t))))},null),(0,i.createElement)(JY,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:3e3,className:"z-999999"}))))},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}),d=i+1;return r.forEach(n.nodes(),function(e){l(c,d,n.node(e))}),{graph:n,buckets:c,zeroIdx:d}}(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,d=n(6353),u=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({},y,M(n,w),r.pick(n,b))),r.forEach(e.nodes(),function(n){var o=I(e.node(n));t.setNode(n,r.defaults(M(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({},_,M(o,N),r.pick(o,E)))}),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(){d.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(){d.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(){u(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 w=["nodesep","edgesep","ranksep","marginx","marginy"],y={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"],_={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function M(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 d=e.children(c);if(d.length){var u=o.addBorderNode(e,"_bt"),f=o.addBorderNode(e,"_bb"),p=e.node(c);e.setParent(u,c),p.borderTop=u,e.setParent(f,c),p.borderBottom=f,r.forEach(d,function(r){a(e,t,n,i,s,l,r);var o=e.node(r),d=o.borderTop?o.borderTop:r,p=o.borderBottom?o.borderBottom:r,m=o.borderTop?i:2*i,h=d!==p?1:s-l[c]+1;e.setEdge(u,d,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,f,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(c)||e.setEdge(t,u,{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,d=t.name,u=e.edge(t),f=u.labelRank;if(c!==s+1){for(e.removeEdge(t),a=0,++s;s<c;++a,++s)u.points=[],r={width:0,height:0,edgeLabel:u,edgeObj:t,rank:s},n=o.addDummyNode(e,"edge",r,"_d"),s===f&&(r.width=u.width,r.height=u.height,r.dummy="edge-label",r.labelpos=u.labelpos),e.setEdge(i,n,{weight:u.weight},d),0===a&&e.graph().dummyChains.push(n),i=n;e.setEdge(i,l,{weight:u.weight},d)}}(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,d=n(3988);function u(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=d.maxRank(e),n=u(e,r.range(1,t+1),"inEdges"),i=u(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=d.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),d=t.node(n),u=d?d.borderLeft:void 0,f=d?d.borderRight:void 0,p={};u&&(c=r.filter(c,function(e){return e!==u&&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(u&&(g.vs=r.flatten([u,g.vs,f],!0),t.predecessors(u).length)){var w=t.node(t.predecessors(u)[0]),y=t.node(t.predecessors(f)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+w.order+y.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=[],d=0,u=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),d+=e.barycenter*e.weight,u+=e.weight,f=a(c,l,f)});var p={vs:r.flatten(c,!0)};return u&&(p.barycenter=d/u,p.weight=u),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],d=!0;n!==o.w;){if(r=e.node(n),d){for(;(c=i[l])!==s&&e.node(c).maxRank<r.rank;)l++;c===s&&(d=!1)}if(!d){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,d){var u=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),function(t){return e.node(t).dummy})}(e,t),f=u?e.node(u).order:s;(u||t===c)&&(r.forEach(o.slice(i,d+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=d+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 d(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 d=(l.length-1)/2,u=Math.floor(d),f=Math.ceil(d);u<=f;++u){var p=l[u];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 u(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),d=0;if(d+=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&&(d+=n?s:-s),s=0,d+=(l.dummy?t:e)/2,d+=(c.dummy?t:e)/2,d+=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&&(d+=n?s:-s),s=0,d}}(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 d(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 d(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)),d(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 d=r.values(c);(s="l"===i?o-r.min(d):a-r.max(d))&&(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=d(0,t,o,i),c=u(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:d,horizontalCompaction:u,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],d=e.nodeCount();for(r.setNode(c,{});i(r,e)<d;)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 d(e){e=c(e),i(e);var t,n=o(e);for(p(n),u(n,e);t=h(n);)w(n,e,t,g(n,e,t))}function u(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,d=c?r.w:r.v;if(d!==o){var u=c===a,f=t.edge(r).weight;if(s+=u?f:-f,i=n,l=d,e.hasEdge(i,l)){var p=e.edge(n,d).cutvalue;s+=u?-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,d=!1;s.lim>l.lim&&(c=l,d=!0);var u=r.filter(t.edges(),function(t){return d===y(0,e.node(t.v),c)&&d!==y(0,e.node(t.w),c)});return r.minBy(u,function(e){return a(t,e)})}function w(e,t,n,o){var a=n.v,i=n.w;e.removeEdge(a,i),e.setEdge(o.v,o.w,{}),p(e),u(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 y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=d,d.initLowLimValues=p,d.initCutValues=u,d.calcCutValue=f,d.leaveEdge=h,d.enterEdge=g,d.exchangeEdges=w},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"},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 d=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=d;var u=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=u;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 w(e){return e.type===i.ElementType.CDATA}function y(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),y(e))n=new c(e.data);else if(b(e))n=new d(e.data);else if(g(e)){var r=t?_(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(w(e)){r=t?_(e.children):[];var i=new p(r);r.forEach(function(e){return e.parent=i}),n=i}else if(x(e)){r=t?_(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 u(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){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=w,t.isText=y,t.isComment=b,t.isDirective=v,t.isDocument=x,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=N},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 d=!1;l.size()>0;){if(n=l.removeMin(),r.has(s,n))i.setEdge(n,s[n]);else{if(d)throw new Error("Input graph is not connected: "+e);d=!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,d=[];do{c=n.pop(),o[c].onStack=!1,d.push(c)}while(s!==c);a.push(d)}}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 d=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=d.v,t=d.w,Object.freeze(d),this._edgeObjs[c]=d,i(this._preds[t],e),i(this._sucs[e],t),this._in[t][c]=d,this._out[e][c]=d,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:()=>D,createPath:()=>f,locationsAreEqual:()=>m,parsePath:()=>u});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 d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function u(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=u(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 w(e,t){t(window.confirm(e))}var y="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,u=l.forceRefresh,m=void 0!==u&&u,x=l.getUserConfirmation,N=void 0===x?w:x,_=l.keyLength,E=void 0===_?6:_,M=e.basename?d(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 M&&(a=c(a,M)),p(a,r,n)}function S(){return Math.random().toString(36).substr(2,E)}var k=h();function D(e){(0,r.A)(F,e),F.length=n.length,k.notifyListeners(F.location,F.action)}function C(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||T(I(e.state))}function j(){T(I(v()))}var A=!1;function T(e){A?(A=!1,D()):k.confirmTransitionTo(e,"POP",N,function(t){t?D({action:"POP",location:e}):function(e){var t=F.location,n=O.indexOf(t.key);-1===n&&(n=0);var r=O.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(A=!0,P(o))}(e)})}var L=I(v()),O=[L.key];function z(e){return M+f(e)}function P(e){n.go(e)}var R=0;function U(e){1===(R+=e)&&1===e?(window.addEventListener(y,C),a&&window.addEventListener(b,j)):0===R&&(window.removeEventListener(y,C),a&&window.removeEventListener(b,j))}var B=!1,F={length:n.length,action:"POP",location:L,createHref:z,push:function(e,t){var r="PUSH",a=p(e,t,S(),F.location);k.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=O.indexOf(F.location.key),c=O.slice(0,l+1);c.push(a.key),O=c,D({action:r,location:a})}else window.location.href=t}})},replace:function(e,t){var r="REPLACE",a=p(e,t,S(),F.location);k.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=O.indexOf(F.location.key);-1!==l&&(O[l]=a.key),D({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=k.setPrompt(e);return B||(U(1),B=!0),function(){return B&&(B=!1,U(-1)),t()}},listen:function(e){var t=k.appendListener(e);return U(1),function(){U(-1),t()}}};return F}var N="hashchange",_={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 E(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function M(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function I(e){window.location.replace(E(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?w:o,l=n.hashType,u=void 0===l?"slash":l,m=e.basename?d(s(e.basename)):"",y=_[u],b=y.encodePath,v=y.decodePath;function x(){var e=v(M());return m&&(e=c(e,m)),p(e)}var S=h();function k(e){(0,r.A)(B,e),B.length=t.length,S.notifyListeners(B.location,B.action)}var D=!1,C=null;function j(){var e,t,n=M(),r=b(n);if(n!==r)I(r);else{var o=x(),i=B.location;if(!D&&(t=o,(e=i).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(C===f(o))return;C=null,function(e){if(D)D=!1,k();else{S.confirmTransitionTo(e,"POP",a,function(t){t?k({action:"POP",location:e}):function(e){var t=B.location,n=O.lastIndexOf(f(t));-1===n&&(n=0);var r=O.lastIndexOf(f(e));-1===r&&(r=0);var o=n-r;o&&(D=!0,z(o))}(e)})}}(o)}}var A=M(),T=b(A);A!==T&&I(T);var L=x(),O=[f(L)];function z(e){t.go(e)}var P=0;function R(e){1===(P+=e)&&1===e?window.addEventListener(N,j):0===P&&window.removeEventListener(N,j)}var U=!1,B={length:t.length,action:"POP",location:L,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=E(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(M()!==o){C=t,function(e){window.location.hash=e}(o);var a=O.lastIndexOf(f(B.location)),i=O.slice(0,a+1);i.push(t),O=i,k({action:n,location:r})}else k()}})},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);M()!==o&&(C=t,I(o));var a=O.indexOf(f(B.location));-1!==a&&(O[a]=t),k({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 k(e,t,n){return Math.min(Math.max(e,t),n)}function D(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,d=h();function u(e){(0,r.A)(v,e),v.length=v.entries.length,d.notifyListeners(v.location,v.action)}function m(){return Math.random().toString(36).substr(2,c)}var g=k(s,0,a.length-1),w=a.map(function(e){return p(e,void 0,"string"==typeof e?m():e.key||m())}),y=f;function b(e){var t=k(v.index+e,0,v.entries.length-1),r=v.entries[t];d.confirmTransitionTo(r,"POP",n,function(e){e?u({action:"POP",location:r,index:t}):u()})}var v={length:w.length,action:"POP",location:w[g],index:g,entries:w,createHref:y,push:function(e,t){var r="PUSH",o=p(e,t,m(),v.location);d.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),u({action:r,location:o,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",o=p(e,t,m(),v.location);d.confirmTransitionTo(o,r,n,function(e){e&&(v.entries[v.index]=o,u({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),d.setPrompt(e)},listen:function(e){return d.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,d=Object.getOwnPropertyNames,u=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=d(n);u&&(i=i.concat(u(n)));for(var s=l(t),h=l(n),g=0;g<i.length;++g){var w=i[g];if(!(a[w]||r&&r[w]||h&&h[w]||s&&s[w])){var y=f(n,w);try{c(t,w,y)}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,d=n?Symbol.for("react.async_mode"):60111,u=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,w=n?Symbol.for("react.block"):60121,y=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 d:case u: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)===u}t.AsyncMode=d,t.ConcurrentMode=u,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)===d},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===u||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===y||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w)},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,d,u,f,m;e=(0,r.escapeSpecialCharacters)(e);var g=s.exec(e),w=null===(t=null==g?void 0:g[1])||void 0===t?void 0:t.toLowerCase();switch(w){case o:var y=c(e);return(0,r.hasOpenTag)(e,a)||null===(n=null==(v=y.querySelector(a))?void 0:v.parentNode)||void 0===n||n.removeChild(v),(0,r.hasOpenTag)(e,i)||null===(d=null==(v=y.querySelector(i))?void 0:v.parentNode)||void 0===d||d.removeChild(v),y.querySelectorAll(o);case a:case i:var b=l(e).querySelectorAll(w);return(0,r.hasOpenTag)(e,i)&&(0,r.hasOpenTag)(e,a)?null!==(f=null===(u=b[0].parentNode)||void 0===u?void 0:u.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`")},d="object"==typeof window&&window.DOMParser;if("function"==typeof d){var u=new d;l=c=function(e,t){return t&&(e="<".concat(t,">").concat(e,"</").concat(t,">")),u.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,d,u;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 w=i(g.nodeName);(f=new r.Element(w,a(g.attributes))).children=e("template"===w?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 y=null!==(d=p[m-1])&&void 0!==d?d:null;y&&(y.next=f),f.parent=n,f.prev=y,f.next=null,p.push(f)}return o&&((f=new r.ProcessingInstruction(o.substring(0,o.indexOf(" ")).toLowerCase(),o)).next=null!==(u=p[0])&&void 0!==u?u: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 d in e){var u=e[d];if((0,r.isCustomAttribute)(d))n[d]=u;else{var f=d.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]=u,null==m?void 0:m.type){case r.BOOLEAN:n[p]=!0;break;case r.OVERLOADED_BOOLEAN:""===u&&(n[p]=!0)}}else o.PRESERVE_CUSTOM_ATTRIBUTES&&(n[d]=u)}}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,d,u;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,w=h.createElement,y=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(y(N)){b>1&&(N=g(N,{key:null!==(d=N.key)&&void 0!==d?d:v})),f.push(m(N,x,v));continue}}if("text"!==x.type){var _=x,E={};l(_)?((0,i.setStyleProp)(_.attribs.style,_.attribs),E=_.attribs):_.attribs&&(E=(0,a.default)(_.attribs,_.name));var M=void 0;switch(x.type){case"script":case"style":x.children[0]&&(E.dangerouslySetInnerHTML={__html:x.children[0].data});break;case"tag":"textarea"===x.name&&x.children[0]?E.defaultValue=x.children[0].data:(null===(u=x.children)||void 0===u?void 0:u.length)&&(M=e(x.children,n));break;default:continue}b>1&&(E.key=v),f.push(m(w(x.name,E,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 d(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 u=1,f=1;function p(e){var t=e.match(n);t&&(u+=t.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function m(){var e={line:u,column:f};return function(t){return t.position=new h(e),y(),t}}function h(e){this.start=e,this.end={line:u,column:f},this.source=l.source}function g(t){var n=new Error(l.source+":"+u+":"+f+": "+t);if(n.reason=t,n.filename=l.source,n.line=u,n.column=f,n.source=e,!l.silent)throw n}function w(t){var n=t.exec(e);if(n){var r=n[0];return p(r),e=e.slice(r.length),n}}function y(){w(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=w(o);if(n){if(v(),!w(a))return g("property missing ':'");var r=w(i),l=e({type:"declaration",property:d(n[0].replace(t,c)),value:r?d(r[0].replace(t,c)):c});return w(s),l}}return h.prototype.content=e,y(),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}},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),d=!n&&o(e),u=!n&&!d&&i(e),f=!n&&!d&&!u&&l(e),p=n||d||u||f,m=p?r(e.length,String):[],h=m.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||u&&("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},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),d=n(2271),u=n(8948),f=n(2),p=n(3349),m=n(5861),h=n(6189),g=n(7199),w=n(5529),y=n(6449),b=n(3656),v=n(7730),x=n(3805),N=n(8440),_=n(5950),E=n(7241),M="[object Arguments]",I="[object Function]",S="[object Object]",k={};k[M]=k["[object Array]"]=k["[object ArrayBuffer]"]=k["[object DataView]"]=k["[object Boolean]"]=k["[object Date]"]=k["[object Float32Array]"]=k["[object Float64Array]"]=k["[object Int8Array]"]=k["[object Int16Array]"]=k["[object Int32Array]"]=k["[object Map]"]=k["[object Number]"]=k[S]=k["[object RegExp]"]=k["[object Set]"]=k["[object String]"]=k["[object Symbol]"]=k["[object Uint8Array]"]=k["[object Uint8ClampedArray]"]=k["[object Uint16Array]"]=k["[object Uint32Array]"]=!0,k["[object Error]"]=k[I]=k["[object WeakMap]"]=!1,e.exports=function e(t,n,D,C,j,A){var T,L=1&n,O=2&n,z=4&n;if(D&&(T=j?D(t,C,j,A):D(t)),void 0!==T)return T;if(!x(t))return t;var P=y(t);if(P){if(T=h(t),!L)return c(t,T)}else{var R=m(t),U=R==I||"[object GeneratorFunction]"==R;if(b(t))return l(t,L);if(R==S||R==M||U&&!j){if(T=O||U?{}:w(t),!L)return O?u(t,s(T,t)):d(t,i(T,t))}else{if(!k[R])return j?t:{};T=g(t,R,L)}}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,D,r,t,A))}):v(t)&&t.forEach(function(r,o){T.set(o,e(r,n,D,o,t,A))});var F=P?void 0:(z?O?p:f:O?E:_)(t);return o(F||t,function(r,o){F&&(r=t[o=r]),a(T,o,e(r,n,D,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},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 d=t[l];n>0&&a(d)?n>1?e(d,n-1,a,i,s):r(s,d):i||(s[s.length]=d)}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),d=n(7167),u="[object Arguments]",f="[object Array]",p="[object Object]",m=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,h,g,w){var y=l(e),b=l(t),v=y?f:s(e),x=b?f:s(t),N=(v=v==u?p:v)==p,_=(x=x==u?p:x)==p,E=v==x;if(E&&c(e)){if(!c(t))return!1;y=!0,N=!1}if(E&&!N)return w||(w=new r),y||d(e)?o(e,t,n,h,g,w):a(e,t,v,n,h,g,w);if(!(1&n)){var M=N&&m.call(e,"__wrapped__"),I=_&&m.call(t,"__wrapped__");if(M||I){var S=M?e.value():e,k=I?t.value():t;return w||(w=new r),g(S,k,n,h,w)}}return!!E&&(w||(w=new r),i(e,t,n,h,g,w))}},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 d=(c=n[i])[0],u=e[d],f=c[1];if(l&&c[2]){if(void 0===u&&!(d in e))return!1}else{var p=new r;if(a)var m=a(u,f,d,e,t,p);if(!(void 0===m?o(f,u,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,d=l.toString,u=c.hasOwnProperty,f=RegExp("^"+d.call(u).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,d,u,f){t!==n&&a(n,function(a,l){if(f||(f=new r),s(a))i(t,n,l,d,e,u,f);else{var p=u?u(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),d=n(3693),u=n(3656),f=n(1882),p=n(3805),m=n(1331),h=n(7167),g=n(4974),w=n(9884);e.exports=function(e,t,n,y,b,v,x){var N=g(e,n),_=g(t,n),E=x.get(_);if(E)r(e,n,E);else{var M=v?v(N,_,n+"",e,t,x):void 0,I=void 0===M;if(I){var S=c(_),k=!S&&u(_),D=!S&&!k&&h(_);M=_,S||k||D?c(N)?M=N:d(N)?M=i(N):k?(I=!1,M=o(_,!0)):D?(I=!1,M=a(_,!0)):M=[]:m(_)||l(_)?(M=N,l(N)?M=w(N):p(N)&&!f(N)||(M=s(_))):I=!1}I&&(x.set(_,M),b(M,_,y,v,x),x.delete(_)),r(e,n,M)}}},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),d=n(3488),u=n(6449);e.exports=function(e,t,n){t=t.length?r(t,function(e){return u(e)?function(t){return o(t,1===e.length?e[0]:e)}:e}):[d];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],d=r(e,c);n(d,c)&&o(l,a(c,e),d)}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,d=(t=o(t,e)).length,u=d-1,f=e;null!=f&&++c<d;){var p=s(t[c]),m=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(c!=u){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},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,d=o,u=e.length,f=!0,p=[],m=p;if(n)f=!1,d=a;else if(u>=200){var h=t?null:s(e);if(h)return l(h);f=!1,d=i,m=new r}else m=t?[]:p;e:for(;++c<u;){var g=e[c],w=t?t(g):g;if(g=n||0!==g?g:0,f&&w==w){for(var y=m.length;y--;)if(m[y]===w)continue e;t&&m.push(w),p.push(g)}else d(m,w,n)||(m!==p&&m.push(w),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))}},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,d=r(t);if(!l&&!d&&!i&&e>t||i&&s&&c&&!l&&!d||o&&s&&c||!n&&c||!a)return 1;if(!o&&!i&&!d&&e<t||d&&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],d=a?a(n[c],e[c],c,n,e):void 0;void 0===d&&(d=e[c]),i?o(n,c,d):r(n,c,d)}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}}},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,d=e.length,u=t.length;if(d!=u&&!(c&&u>d))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<d;){var w=e[m],y=t[m];if(i)var b=c?i(y,w,m,t,e,l):i(w,y,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)&&(w===e||s(w,e,n,i,l)))return g.push(t)})){h=!1;break}}else if(w!==y&&!s(w,y,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,d=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,u,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||!u(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,u,f);return f.delete(e),g;case"[object Symbol]":if(d)return d.call(e)==d.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),d=c.length;if(d!=r(t).length&&!l)return!1;for(var u=d;u--;){var f=c[u];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;++u<d;){var w=e[f=c[u]],y=t[f];if(a)var b=l?a(y,w,f,t,e,s):a(w,y,f,e,t,s);if(!(void 0===b?w===y||i(w,y,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),d="[object Map]",u="[object Promise]",f="[object Set]",p="[object WeakMap]",m="[object DataView]",h=c(r),g=c(o),w=c(a),y=c(i),b=c(s),v=l;(r&&v(new r(new ArrayBuffer(1)))!=m||o&&v(new o)!=d||a&&v(a.resolve())!=u||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 d;case w:return u;case y: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,d=(t=r(t,e)).length,u=!1;++c<d;){var f=l(t[c]);if(!(u=null!=e&&n(e,f)))break;e=e[f]}return u||++c!=d?u:!!(d=null==e?0:e.length)&&s(d)&&i(f,d)&&(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)}},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]?",d=c+l+"(?:\\u200d(?:"+[a,i,s].join("|")+")"+c+l+")*",u="(?:"+[a+r+"?",r,i,s,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+u+d,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},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}}},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 d=t[n],u=i(d),f=-1,p=u.length;++f<p;){var m=u[f],h=e[m];(void 0===h||o(h,s[m])&&!l.call(e,m))&&(e[m]=d[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}},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)}},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)}},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),d=n(7167),u=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)||d(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(u.call(e,n))return!1;return!0}},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},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,d=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)==d}},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}},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}},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),d=n(1882),u=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:[]:u(e)&&d(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},7200(e,t,n){var r=n(3222),o=0;e.exports=function(e){var t=++o;return r(e)+t}},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,d(t);var n=function(){return p(t)};return e.then(n,n),e};var d=function(e){u(e);var t=f(e);a.emit(i,t,e)},u=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,d(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 d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function u(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&&d(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 u(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(u(t)),t.updateProgress=t.updateProgress.bind(u(t)),t.subscribeToCounterUpdate=t.subscribeToCounterUpdate.bind(u(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],d=s(o.default.useState(!1),2),u=d[0],f=d[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:u}}},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),d=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]*$")),u=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=d,t.possibleStandardNames=u},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),d(e.prototype.constructor=e,t)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(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=u(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)}),w=h(function(e,t){var n=e.component,r=void 0===n?g:n,c=e.replace,d=e.to,w=e.innerRef,y=u(e,["component","replace","to","innerRef"]);return a.createElement(o.__RouterContext.Consumer,null,function(e){e||s(!1);var n=e.history,o=p(f(d,e.location),e.location),u=o?n.createHref(o):"",g=l({},y,{href:u,navigate:function(){var t=f(d,e.location),r=i.createPath(e.location)===i.createPath(p(t));(c||r?n.replace:n.push)(t)}});return m!==h?g.ref=t||w:g.innerRef=w,a.createElement(r,g)})}),y=function(e){return e},b=a.forwardRef;void 0===b&&(b=y);b(function(e,t){var n=e["aria-current"],r=void 0===n?"page":n,i=e.activeClassName,c=void 0===i?"active":i,d=e.activeStyle,m=e.className,h=e.exact,g=e.isActive,v=e.location,x=e.sensitive,N=e.strict,_=e.style,E=e.to,M=e.innerRef,I=u(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(E,n),n),u=i.pathname,S=u&&u.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),k=S?o.matchPath(n.pathname,{path:S,exact:h,sensitive:x,strict:N}):null,D=!!(g?g(k,n):k),C="function"==typeof m?m(D):m,j="function"==typeof _?_(D):_;D&&(C=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(" ")}(C,c),j=l({},j,d));var A=l({"aria-current":D&&r||null,className:C,style:j,to:i},I);return y!==b?A.ref=t||M:A.innerRef=M,a.createElement(w,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:()=>_,Prompt:()=>M,Redirect:()=>D,Route:()=>T,Router:()=>N,StaticRouter:()=>U,Switch:()=>B,__HistoryContext:()=>v,__RouterContext:()=>x,generatePath:()=>k,matchPath:()=>A,useHistory:()=>V,useLocation:()=>Y,useParams:()=>Z,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),d=n(8168),u=n(8505),f=n.n(u),p=(n(7564),n(8587)),m=n(4146),h=n.n(m),g=1073741823,w="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:{},y=a().createContext||function(e,t){var n,o,i,l="__create-react-context-"+((w[i="__global_unique_id__"]=(w[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 d=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 d.contextTypes=((o={})[l]=s().object,o),{Provider:c,Consumer:d}},b=function(e){var t=y();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),_=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),E=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 M(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(E,{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 k(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 D(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,u=(0,l.createLocation)(t?"string"==typeof n?k(n,t.params):(0,d.A)({},n,{pathname:k(n.pathname,t.params)}):n);return i?(s(u),null):a().createElement(E,{onMount:function(){s(u)},onUpdate:function(e,t){var n=(0,l.createLocation)(t.to);(0,l.locationsAreEqual)(n,(0,d.A)({},u,{key:n.key}))||s(u)},to:n})})}var C={},j=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=C[n]||(C[n]={});if(r[e])return r[e];var o=[],a={regexp:f()(e,o,t),keys:o};return j<1e4&&(r[e]=a,j++),a}(n,{end:a,strict:s,sensitive:c}),o=r.regexp,i=r.keys,l=o.exec(e);if(!l)return null;var d=l[0],u=l.slice(1),p=e===d;return a&&!p?null:{path:n,url:"/"===n&&""===d?"/":d,isExact:p,params:i.reduce(function(e,t,n){return e[t.name]=u[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,d.A)({},t,{location:n,match:r}),i=e.props,s=i.children,l=i.component,u=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):u?u(o):null:"function"==typeof s?s(o):null)})},t}(a().Component);function L(e){return"/"===e.charAt(0)?e:"/"+e}function O(e,t){if(!e)return t;var n=L(e);return 0!==t.pathname.indexOf(n)?t:(0,d.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,d.A)({},t,{pathname:L(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"]),u={createHref:function(e){return L(n+z(e))},action:"POP",location:O(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,d.A)({},c,{history:u,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,d.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,d.A)({},r,t,{ref:n}))})};return n.displayName=t,n.WrappedComponent=e,h()(n,e)}var Q=a().useContext;function V(){return Q(v)}function Y(){return Q(x).location}function Z(){var e=Q(x).match;return e?e.params:{}}function W(e){var t=Y(),n=Q(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 d=n[0],f=n[1],p=n.index;if(l+=e.slice(s,p),s=p+d.length,f)l+=f[1];else{var m=e[s],h=n[2],g=n[3],w=n[4],y=n[5],b=n[6],v=n[7];l&&(r.push(l),l="");var x=null!=h&&null!=m&&m!==h,N="+"===b||"*"===b,_="?"===b||"*"===b,E=h||c,M=w||y,I=h||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||a++,prefix:h||"",delimiter:E,optional:_,repeat:N,partial:x,asterisk:!!v,pattern:M?u(M):v?".*":i(E,I)})}}return s<e.length&&(l+=e.substr(s)),l&&r.push(l),r}function i(e,t){return!t||t.indexOf(e)>-1?"[^"+d(e)+"]+?":d(t)+"|(?:(?!"+d(t)+")[^"+d(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,d=0;d<e.length;d++){var u=e[d];if("string"!=typeof u){var f,p=i[u.name];if(null==p){if(u.optional){u.partial&&(a+=u.prefix);continue}throw new TypeError('Expected "'+u.name+'" to be defined')}if(r(p)){if(!u.repeat)throw new TypeError('Expected "'+u.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(u.optional)continue;throw new TypeError('Expected "'+u.name+'" to not be empty')}for(var m=0;m<p.length;m++){if(f=c(p[m]),!n[d].test(f))throw new TypeError('Expected all "'+u.name+'" to match "'+u.pattern+'", but received `'+JSON.stringify(f)+"`");a+=(0===m?u.prefix:u.delimiter)+f}}else{if(f=u.asterisk?l(p):c(p),!n[d].test(f))throw new TypeError('Expected "'+u.name+'" to match "'+u.pattern+'", but received "'+f+'"');a+=u.prefix+f}}else a+=u}return a}}function d(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function u(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+=d(l);else{var c=d(l.prefix),u="(?:"+l.pattern+")";t.push(l),l.repeat&&(u+="(?:"+c+u+")*"),i+=u=l.optional?l.partial?c+"("+u+")?":"(?:"+c+"("+u+"))?":c+"("+u+")"}}var m=d(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 d(e){e.forEach(e=>c(e.element))}function u(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",()=>w);const g={dragging:null};class w 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:d="sortable-swap-highlight",filter:u="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 u&&{[u.replace(".","")]:!!i.filtered},d=s(o)(l,{[n]:i.selected,[r]:i.chosen,...c});return(0,a.cloneElement)(e,{[p]:e.key,className:d})})}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:d,onClone:u,onEnd:f,onFilter:p,onRemove:m,onSort:h,onStart:g,onUnchoose:w,onUpdate:y,onMove:b,onSpill:v,onSelect:x,onDeselect:N,..._}=e;return _}(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]);d(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);u(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`)}d(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 d(r),u(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 y,b;y=e.exports,b={},Object.keys(b).forEach(function(e){"default"===e||"__esModule"===e||y.hasOwnProperty(e)||Object.defineProperty(y,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,d=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=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:d,props:a,_owner:s.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},4848(e,t,n){"use strict";e.exports=n(1020)},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 d=i[i.length-1];n="."===d||".."===d||""===d}else n=!1;for(var u=0,f=i.length;f>=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),u++):u&&(o(i,f),u--)}if(!c)for(;u--;u)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 d=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),u=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 w(e,t,n){e.addEventListener(t,n,!d&&g)}function y(e,t,n){e.removeEventListener(t,n,!d&&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,_=/\s+/g;function E(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(_," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(_," ")}}function M(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=M(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 k(){return document.scrollingElement||document.documentElement}function D(e,t,n,r,o){if(e.getBoundingClientRect||e===window){var a,i,s,l,c,u,f;if(e!==window&&e.parentNode&&e!==k()?(i=(a=e.getBoundingClientRect()).top,s=a.left,l=a.bottom,c=a.right,u=a.height,f=a.width):(i=0,s=0,l=window.innerHeight,c=window.innerWidth,u=window.innerHeight,f=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!d))do{if(o&&o.getBoundingClientRect&&("none"!==M(o,"transform")||n&&"static"!==M(o,"position"))){var p=o.getBoundingClientRect();i-=p.top+parseInt(M(o,"border-top-width")),s-=p.left+parseInt(M(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)+(u/=g),c=(s/=h)+(f/=h))}return{top:i,left:s,bottom:l,right:c,width:f,height:u}}}function C(e,t,n){for(var r=O(e,!0),o=D(e)[t];r;){var a=D(r)[n];if(!("top"===n||"left"===n?o>=a:o<=a))return r;if(r===k())break;r=O(r,!1)}return!1}function j(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"===M(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 L(e){var t=0,n=0,r=k();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 O(e,t){if(!e||!e.getBoundingClientRect)return k();var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=M(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 k();if(r||t)return n;r=!0}}}while(n=n.parentNode);return k()}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){M(e,"position","absolute"),M(e,"top",t.top),M(e,"left",t.left),M(e,"width",t.width),M(e,"height",t.height)}function F(e){M(e,"position",""),M(e,"top",""),M(e,"left",""),M(e,"width",""),M(e,"height","")}var Q="Sortable"+(new Date).getTime();var V=[],Y={initializeByDefault:!0},Z={mount:function(e){for(var t in Y)Y.hasOwnProperty(t)&&!(t in e)&&(e[t]=Y[t]);V.forEach(function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),V.push(e)},pluginEvent:function(e,t,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var a=e+"Global";V.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 V.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 V.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 V.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,w=e.extraEventProperties;if(t=t||n&&n[Q]){var y,b=t.options,v="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||d||u?(y=document.createEvent("Event")).initEvent(r,!0,!0):y=new CustomEvent(r,{bubbles:!0,cancelable:!0}),y.to=s||n,y.from=l||n,y.item=a||n,y.clone=i,y.oldIndex=c,y.newIndex=f,y.oldDraggableIndex=p,y.newDraggableIndex=m,y.originalEvent=h,y.pullMode=g?g.lastPutMode:void 0;var x=o(o({},w),Z.getEventProperties(r,t));for(var N in x)y[N]=x[N];n&&n.dispatchEvent(y),b[v]&&b[v].call(t,y)}}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);Z.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,de,ue,fe,pe,me,he,ge,we,ye,be,ve,xe=!1,Ne=!1,_e=[],Ee=!1,Me=!1,Ie=[],Se=!1,ke=[],De="undefined"!=typeof document,Ce=m,je=u||d?"cssFloat":"float",Ae=De&&!h&&!m&&"draggable"in document.createElement("div"),Te=function(){if(De){if(d)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Le=function(e,t){var n=M(e),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=j(e,0,t),a=j(e,1,t),i=o&&M(o),s=a&&M(a),l=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+D(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+D(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 d="left"===i.float?"left":"right";return!a||"both"!==s.clear&&s.clear!==d?"horizontal":"vertical"}return o&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||l>=r&&"none"===n[je]||a&&"none"===n[je]&&l+c>r)?"vertical":"horizontal"},Oe=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&&M(J,"display","none")},Pe=function(){!Te&&J&&M(J,"display","")};De&&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,_e.some(function(e){var t=e[Q].options.emptyInsertThreshold;if(t&&!A(e)){var n=D(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[Q]._onDragOver(n)}}var o,a,i},Ue=function(e){X&&X.parentNode[Q]._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[Q]=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 Le(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 Z.initializePlugins(this,e,a),a)!(i in t)&&(t[i]=a[i]);for(var l in Oe(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?w(e,"pointerdown",this._onTapStart):(w(e,"mousedown",this._onTapStart),w(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(w(e,"dragover",this),w(e,"dragenter",this)),_e.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"!==M(e,"display")&&e!==Be.ghost){r.push({target:e,rect:D(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=D(r),l=r.prevFromRect,c=r.prevToRect,d=e.rect,u=I(r,!0);u&&(s.top-=u.f,s.left-=u.e),r.toRect=s,r.thisAnimationDuration&&z(l,s)&&!z(i,s)&&(d.top-s.top)/(d.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}(d,l,c,t.options)),z(s,i)||(r.prevFromRect=i,r.prevToRect=s,n||(n=t.options.animation),t.animate(r,d,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){M(e,"transition",""),M(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,M(e,"transform","translate3d("+s+"px,"+l+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),M(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),M(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout(function(){M(e,"transition",""),M(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[Q],p=f.options.onMove;return!window.CustomEvent||d||u?(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||D(t),l.willInsertAfter=s,l.originalEvent=i,e.dispatchEvent(l),p&&(c=p.call(f,l,i)),c}function Qe(e){e.draggable=!1}function Ve(){Se=!1}function Ye(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 Ze(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||(we=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){ke.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var r=t[n];r.checked&&ke.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=D(n);if(K=a,q=(X=n).parentNode,ee=X.nextSibling,te=n,le=i.group,Be.dragged=X,de={target:X,clientX:(t||e).clientX,clientY:(t||e).clientY},me=de.clientX-l.left,he=de.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}),E(X,i.chosenClass,!0))},i.ignore.split(",").forEach(function(e){S(X,e.trim(),Qe)}),w(s,"dragover",Re),w(s,"mousemove",Re),w(s,"touchmove",Re),w(s,"mouseup",o._onDrop),w(s,"touchend",o._onDrop),w(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&&(u||d))r();else{if(Be.eventCanceled)return void this._onDrop();w(s,"mouseup",o._disableDelayedDrag),w(s,"touchend",o._disableDelayedDrag),w(s,"touchcancel",o._disableDelayedDrag),w(s,"mousemove",o._delayedDragTouchMoveHandler),w(s,"touchmove",o._delayedDragTouchMoveHandler),i.supportPointer&&w(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&&Qe(X),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._disableDelayedDrag),y(e,"touchend",this._disableDelayedDrag),y(e,"touchcancel",this._disableDelayedDrag),y(e,"mousemove",this._delayedDragTouchMoveHandler),y(e,"touchmove",this._delayedDragTouchMoveHandler),y(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?w(document,"pointermove",this._onTouchMove):w(document,t?"touchmove":"mousemove",this._onTouchMove):(w(X,"dragend",this),w(K,"dragstart",this._onDragStart));try{document.selection?Ze(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&&w(document,"dragover",Ue);var n=this.options;!e&&E(X,n.dragClass,!1),E(X,n.ghostClass,!0),Be.active=this,e&&this._appendGhost(),$({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ue){this._lastX=ue.clientX,this._lastY=ue.clientY,ze();for(var e=document.elementFromPoint(ue.clientX,ue.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ue.clientX,ue.clientY))!==t;)t=e;if(X.parentNode[Q]._isOutsideThisEl(e),t)do{if(t[Q]&&t[Q]._onDragOver({clientX:ue.clientX,clientY:ue.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Pe()}},_onTouchMove:function(e){if(de){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=Ce&&ve&&L(ve),c=(o.clientX-de.clientX+r.x)/(i||1)+(l?l[0]-Ie[0]:0)/(i||1),d=(o.clientY-de.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+=d-(pe||0)):a={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");M(J,"webkitTransform",u),M(J,"mozTransform",u),M(J,"msTransform",u),M(J,"transform",u),fe=c,pe=d,ue=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!J){var e=this.options.fallbackOnBody?document.body:K,t=D(X,!0,Ce,!0,e),n=this.options;if(Ce){for(ve=e;"static"===M(ve,"position")&&"none"===M(ve,"transform")&&ve!==document;)ve=ve.parentNode;ve!==document.body&&ve!==document.documentElement?(ve===document&&(ve=k()),t.top+=ve.scrollTop,t.left+=ve.scrollLeft):ve=k(),Ie=L(ve)}E(J=X.cloneNode(!0),n.ghostClass,!1),E(J,n.fallbackClass,!0),E(J,n.dragClass,!0),M(J,"transition",""),M(J,"transform",""),M(J,"box-sizing","border-box"),M(J,"margin",0),M(J,"top",t.top),M(J,"left",t.left),M(J,"width",t.width),M(J,"height",t.height),M(J,"opacity","0.8"),M(J,"position",Ce?"absolute":"fixed"),M(J,"zIndex","100000"),M(J,"pointerEvents","none"),Be.ghost=J,e.appendChild(J),M(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(),E(ne,this.options.chosenClass,!1),Be.clone=ne),n.cloneId=Ze(function(){H("clone",n),Be.eventCanceled||(n.options.removeCloneOnHide||K.insertBefore(ne,X),n._hideClone(),$({sortable:n,name:"clone"}))}),!t&&E(X,o.dragClass,!0),t?(Ne=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,X)),w(document,"drop",n),M(X,"transform","translateZ(0)")),xe=!0,n._dragStartId=Ze(n._dragStarted.bind(n,t,e)),w(document,"selectstart",n),ge=!0,p&&M(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,d=Be.active,u=le===c,f=l.sort,p=ce||d,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,d&&!l.disabled&&(u?f||(r=q!==K):ce===this||(this.lastPutMode=le.checkPull(this,d,X,e))&&c.checkPut(this,d,X,e))){if(a="vertical"===this._getDirection(e,s),t=D(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=D(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=D(s)),!1!==Fe(K,i,X,t,s,n,e,!!s))return B(),i.appendChild(X),q=i,V(),F(!0)}else if(g&&function(e,t,n){var r=D(j(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 w=j(i,0,l,!0);if(w===X)return F(!1);if(n=D(s=w),!1!==Fe(K,i,X,t,s,n,e,!1))return B(),i.insertBefore(X,w),q=i,V(),F(!0)}else if(s.parentNode===i){n=D(s);var y,b,v,N=X.parentNode!==i,_=!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=C(s,"top","top")||C(X,"top","top"),k=S?S.scrollTop:void 0;if(we!==s&&(b=n[I],Ee=!1,Me=!_&&l.invertSwap||N),y=function(e,t,n,r,o,a,i,s){var l=r?e.clientY:e.clientX,c=r?n.height:n.width,d=r?n.top:n.left,u=r?n.bottom:n.right,f=!1;if(!i)if(s&&be<c*o){if(!Ee&&(1===ye?l>d+c*a/2:l<u-c*a/2)&&(Ee=!0),Ee)f=!0;else if(1===ye?l<d+be:l>u-be)return-ye}else if(l>d+c*(1-o)/2&&l<u-c*(1-o)/2)return function(e){return T(X)<T(e)?1:-1}(t);return(f=f||i)&&(l<d+c*a/2||l>u-c*a/2)?l>d+c/2?1:-1:0}(e,s,n,a,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Me,we===s),0!==y){var L=T(X);do{L-=y,v=q.children[L]}while(v&&("none"===M(v,"display")||v===J))}if(0===y||v===s)return F(!1);we=s,ye=y;var O=s.nextElementSibling,z=!1,P=Fe(K,i,X,t,s,n,e,z=1===y);if(!1!==P)return 1!==P&&-1!==P||(z=1===P),Se=!0,setTimeout(Ve,30),B(),z&&!O?i.appendChild(X):s.parentNode.insertBefore(X,z?O:s),S&&R(S,0,k-S.scrollTop),q=X.parentNode,void 0===b||Me||(be=Math.abs(b-D(s)[I])),V(),F(!0)}if(i.contains(X))return F(!1)}return!1}function U(l,c){H(l,m,o({evt:e,isOwner:u,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,D(n),e,r)},changed:V},c))}function B(){U("dragOverAnimationCapture"),m.captureAnimationState(),m!==p&&p.captureAnimationState()}function F(t){return U("dragOverCompleted",{insertion:t}),t&&(u?d._hideClone():d._showClone(m),m!==p&&(E(X,ce?ce.options.ghostClass:d.options.ghostClass,!1),E(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)&&(we=null),l.dragoverBubble||e.rootEl||s===document||(X.parentNode[Q]._isOutsideThisEl(e.target),!t&&Re(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function V(){ae=T(X),se=T(X,l.draggable),$({sortable:m,name:"change",toEl:i,newIndex:ae,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",Re),y(document,"mousemove",Re),y(document,"touchmove",Re)},_offUpEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._onDrop),y(e,"touchend",this._onDrop),y(e,"pointerup",this._onDrop),y(e,"touchcancel",this._onDrop),y(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,Me=!1,Ee=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),We(this.cloneId),We(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),p&&M(document.body,"user-select",""),M(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&&y(X,"dragend",this),Qe(X),X.style["will-change"]="",ge&&!xe&&E(X,ce?ce.options.ghostClass:this.options.ghostClass,!1),E(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=de=ue=ge=ae=se=oe=ie=we=ye=ce=le=Be.dragged=Be.ghost=Be.clone=Be.active=null,ke.forEach(function(e){e.checked=!0}),ke.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)||Ye(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=Z.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&Oe(n)},destroy:function(){H("destroy",this);var e=this.el;e[Q]=null,y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart),y(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),_e.splice(_e.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!re){if(H("hideClone",this),Be.eventCanceled)return;M(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),M(ne,"display",""),re=!1}}else this._hideClone()}},De&&w(document,"touchmove",function(e){(Be.active||xe)&&e.cancelable&&e.preventDefault()}),Be.utils={on:w,off:y,css:M,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:E,clone:U,index:T,nextTick:Ze,cancelNextTick:We,detectDirection:Le,getChild:j},Be.get=function(e){return e[Q]},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)),Z.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=k(),d=!1;He!==n&&(He=n,tt(),Ge=t.scroll,o=t.scrollFn,!0===Ge&&(Ge=O(n,!0)));var u=0,f=Ge;do{var p=f,m=D(p),h=m.top,g=m.bottom,w=m.left,y=m.right,b=m.width,v=m.height,x=void 0,N=void 0,_=p.scrollWidth,E=p.scrollHeight,I=M(p),S=p.scrollLeft,C=p.scrollTop;p===c?(x=b<_&&("auto"===I.overflowX||"scroll"===I.overflowX||"visible"===I.overflowX),N=v<E&&("auto"===I.overflowY||"scroll"===I.overflowY||"visible"===I.overflowY)):(x=b<_&&("auto"===I.overflowX||"scroll"===I.overflowX),N=v<E&&("auto"===I.overflowY||"scroll"===I.overflowY));var j=x&&(Math.abs(y-a)<=s&&S+b<_)-(Math.abs(w-a)<=s&&!!S),A=N&&(Math.abs(g-i)<=s&&C+v<E)-(Math.abs(h-i)<=s&&!!C);if(!Ke[u])for(var T=0;T<=u;T++)Ke[T]||(Ke[T]={});Ke[u].vx==j&&Ke[u].vy==A&&Ke[u].el===p||(Ke[u].el=p,Ke[u].vx=j,Ke[u].vy=A,clearInterval(Ke[u].pid),0==j&&0==A||(d=!0,Ke[u].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[Q],n,t,e,qe,Ke[this.layer].el)||R(Ke[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&f!==c&&(f=O(f,!1)));et=d}},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,d=document.elementFromPoint(c.clientX,c.clientY);s(),l&&!l.el.contains(d)&&(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)?(E(n,l.swapClass,!0),rt=n):rt=null,c&&c!==rt&&E(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,d=l||this.sortable,u=this.options;rt&&E(rt,u.swapClass,!1),rt&&(u.swap||l&&l.options.swap)&&c!==rt&&(d.captureAnimationState(),d!==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])),d.animateAll(),d!==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=j(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,dt,ut,ft,pt,mt=[],ht=[],gt=!1,wt=!1,yt=!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?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),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var r="";mt.length&&dt===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;ut=t},delayEnded:function(){this.isMultiDrag=~mt.indexOf(ut)},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"]="",E(ht[r],this.options.selectedClass,!1),mt[r]===ut&&E(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&&dt===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){M(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){M(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)}),n(),pt=!0,r())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&dt&&dt.multiDrag._deselectMultiDrag(),mt.forEach(function(e){e.sortableIndex=T(e)}),mt=mt.sort(function(e,t){return e.sortableIndex-t.sortableIndex}),yt=!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!==ut&&M(e,"position","absolute")});var r=D(ut,!1,!0,!0);mt.forEach(function(e){e!==ut&&B(e,r)}),wt=!0,gt=!0}n.animateAll(function(){wt=!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;wt&&~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:wt?D(e):o}),F(e),e.fromRect=o,t.removeAnimationState(e)}),wt=!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&&(wt||!n&&!o.options.sort&&!i)){var l=D(ut,!1,!0,!0);mt.forEach(function(e){e!==ut&&(B(e,l),a.appendChild(e))}),wt=!0}if(!n)if(wt||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(ut,!0);ft.top-=o.f,ft.left-=o.e}},dragOverAnimationComplete:function(){wt&&(wt=!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,d=r.children;if(!yt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),E(ut,c.selectedClass,!~mt.indexOf(ut)),~mt.indexOf(ut))mt.splice(mt.indexOf(ut),1),ct=null,W({sortable:o,rootEl:n,name:"deselect",targetEl:ut,originalEvt:t});else{if(mt.push(ut),W({sortable:o,rootEl:n,name:"select",targetEl:ut,originalEvt:t}),t.shiftKey&&ct&&o.el.contains(ct)){var u,f,p=T(ct),m=T(ut);if(~p&&~m&&p!==m)for(m>p?(f=p,u=m):(f=m,u=p+1);f<u;f++)~mt.indexOf(d[f])||(E(d[f],c.selectedClass,!0),mt.push(d[f]),W({sortable:o,rootEl:n,name:"select",targetEl:d[f],originalEvt:t}))}else ct=ut;dt=l}if(yt&&this.isMultiDrag){if(wt=!1,(r[Q].options.sort||r!==n)&&mt.length>1){var h=D(ut),g=T(ut,":not(."+this.options.selectedClass+")");if(!gt&&c.animation&&(ut.thisAnimationDuration=null),l.captureAnimationState(),!gt&&(c.animation&&(ut.fromRect=h,mt.forEach(function(e){if(e.thisAnimationDuration=null,e!==ut){var t=wt?D(e):h;e.fromRect=t,l.addAnimationState({target:e,rect:t})}})),xt(),mt.forEach(function(e){d[g]?r.insertBefore(e,d[g]):r.appendChild(e),g++}),i===T(ut))){var w=!1;mt.forEach(function(e){e.sortableIndex===T(e)||(w=!0)}),w&&a("update")}mt.forEach(function(e){F(e)}),l.animateAll()}dt=l}(n===r||s&&"clone"!==s.lastPutMode)&&ht.forEach(function(e){e.parentNode&&e.parentNode.removeChild(e)})}},nullingGlobal:function(){this.isMultiDrag=yt=!1,ht.length=0},destroyGlobal:function(){this._deselectMultiDrag(),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)},_deselectMultiDrag:function(e){if(!(void 0!==yt&&yt||dt!==this.sortable||e&&x(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;mt.length;){var t=mt[0];E(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[Q];t&&t.options.multiDrag&&!~mt.indexOf(e)&&(dt&&dt!==t&&(dt.multiDrag._deselectMultiDrag(),dt=t),E(e,t.options.selectedClass,!0),mt.push(e))},deselect:function(e){var t=e.parentNode[Q],n=mt.indexOf(e);t&&t.options.multiDrag&&~n&&(E(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=wt&&e!==ut?-1:wt?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!==ut&&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?w(document,"dragover",this._handleAutoScroll):this.options.supportPointer?w(document,"pointermove",this._handleFallbackAutoScroll):t.touches?w(document,"touchmove",this._handleFallbackAutoScroll):w(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(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||u||d||p){ot(e,this.options,a,t);var i=O(a,!0);!et||Je&&r===$e&&o===Xe||(Je&&nt(),Je=setInterval(function(){var a=O(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||O(a,!0)===k())return void tt();ot(e,this.options,O(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 d="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,d=r[1];return s(function(){o.value=n,o.getSnapshot=t,c(o)&&d({inst:o})},[e,n,t]),i(function(){return c(o)&&d({inst:o}),e(function(){c(o)&&d({inst:o})})},[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:d},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,d=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var u=s(null);if(null===u.current){var f={hasValue:!1,value:null};u.current=f}else f=u.current;u=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,u[0],u[1]);return l(function(){f.hasValue=!0,f.value=p},[p]),d(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,d){var u=i(null);if(null===u.current){var f={hasValue:!1,value:null};u.current=f}else f=u.current;u=l(function(){function e(e){if(!s){if(s=!0,a=e,e=r(e),void 0!==d&&f.hasValue){var t=f.value;if(d(t,e))return i=t}return i=e}if(t=i,o(a,e))return t;var n=r(e);return void 0!==d&&d(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,d]);var p=a(e,u[0],u[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")}}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=r,e=[],a.O=(t,n,r,o)=>{if(!n){var i=1/0;for(d=0;d<e.length;d++){for(var[n,r,o]=e[d],s=!0,l=0;l<n.length;l++)(!1&o||i>=o)&&Object.keys(a.O).every(e=>a.O[e](n[l]))?n.splice(l--,1):(s=!1,o<i&&(i=o));if(s){e.splice(d--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,a.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);a.r(o);var i={};t=t||[null,n({}),n([]),n(n)];for(var s=2&r&&e;("object"==typeof s||"function"==typeof s)&&!~t.indexOf(s);s=n(s))Object.getOwnPropertyNames(s).forEach(t=>i[t]=()=>e[t]);return i.default=()=>e,a.d(o,i),o},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.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(/\/[^\/]+$/,"/"),a.p=e})(),(()=>{var e={174:0,306:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,s,l]=n,c=0;if(i.some(t=>0!==e[t])){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(l)var d=l(a)}for(t&&t(n);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(d)},n=globalThis.webpackChunkcartflows=globalThis.webpackChunkcartflows||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var i=a.O(void 0,[306],()=>a(8553));i=a.O(i)})(); |