@billgangcom/theme-lib 1.101.0 → 1.101.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +2 -2
- package/dist/{index-CvLThhG8.cjs → index-B7gaqj-C.cjs} +1 -1
- package/dist/{index-j3ElqsZ4.js → index-DD0tv6Rp.js} +1 -4
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +2 -2
- package/package.json +1 -1
|
@@ -70,7 +70,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
70
70
|
To pick up a draggable item, press the space bar.
|
|
71
71
|
While dragging, use the arrow keys to move the item.
|
|
72
72
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
73
|
-
`},iS={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function aS(e){let{announcements:t=iS,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=oS}=e;const{announce:a,announcement:s}=tS(),l=va("DndLiveRegion"),[c,u]=_.useState(!1);if(_.useEffect(()=>{u(!0)},[]),nS(_.useMemo(()=>({onDragStart(f){let{active:g}=f;a(t.onDragStart({active:g}))},onDragMove(f){let{active:g,over:m}=f;t.onDragMove&&a(t.onDragMove({active:g,over:m}))},onDragOver(f){let{active:g,over:m}=f;a(t.onDragOver({active:g,over:m}))},onDragEnd(f){let{active:g,over:m}=f;a(t.onDragEnd({active:g,over:m}))},onDragCancel(f){let{active:g,over:m}=f;a(t.onDragCancel({active:g,over:m}))}}),[a,t])),!c)return null;const h=_.createElement(_.Fragment,null,_.createElement(Jb,{id:o,value:i.draggable}),_.createElement(eS,{id:l,announcement:s}));return n?To.createPortal(h,n):h}var qt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(qt||(qt={}));function Ms(){}function Vp(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function zp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const dr=Object.freeze({x:0,y:0});function sS(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function lS(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function cS(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=i-o,l=a-n;if(o<i&&n<a){const c=t.width*t.height,u=e.width*e.height,h=s*l,f=h/(c+u-h);return Number(f.toFixed(4))}return 0}const uS=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const a of o){const{id:s}=a,l=n.get(s);if(l){const c=cS(l,t);c>0&&i.push({id:s,data:{droppableContainer:a,value:c}})}}return i.sort(sS)};function dS(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function $p(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:dr}function hS(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return i.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...n})}}const fS=hS(1);function pS(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function mS(e,t,n){const o=pS(t);if(!o)return e;const{scaleX:i,scaleY:a,x:s,y:l}=o,c=e.left-s-(1-i)*parseFloat(n),u=e.top-l-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),h=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:h,height:f,top:u,right:c+h,bottom:u+f,left:c}}const gS={ignoreTransform:!1};function hi(e,t){t===void 0&&(t=gS);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:h}=Dn(e).getComputedStyle(e);u&&(n=mS(n,u,h))}const{top:o,left:i,width:a,height:s,bottom:l,right:c}=n;return{top:o,left:i,width:a,height:s,bottom:l,right:c}}function v1(e){return hi(e,{ignoreTransform:!0})}function IS(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function CS(e,t){return t===void 0&&(t=Dn(e).getComputedStyle(e)),t.position==="fixed"}function bS(e,t){t===void 0&&(t=Dn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function Vu(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(Hu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!_a(i)||Hp(i)||n.includes(i))return n;const a=Dn(e).getComputedStyle(i);return i!==e&&bS(i,a)&&n.push(i),CS(i,a)?n:o(i.parentNode)}return e?o(e):n}function Wp(e){const[t]=Vu(e,1);return t??null}function Vl(e){return!rl||!e?null:ui(e)?e:Fu(e)?Hu(e)||e===di(e).scrollingElement?window:_a(e)?e:null:null}function qp(e){return ui(e)?e.scrollX:e.scrollLeft}function Gp(e){return ui(e)?e.scrollY:e.scrollTop}function Vc(e){return{x:qp(e),y:Gp(e)}}var nn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(nn||(nn={}));function Yp(e){return!rl||!e?!1:e===document.scrollingElement}function Zp(e){const t={x:0,y:0},n=Yp(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=o.y,l=e.scrollLeft>=o.x;return{isTop:i,isLeft:a,isBottom:s,isRight:l,maxScroll:o,minScroll:t}}const SS={x:.2,y:.2};function yS(e,t,n,o,i){let{top:a,left:s,right:l,bottom:c}=n;o===void 0&&(o=10),i===void 0&&(i=SS);const{isTop:u,isBottom:h,isLeft:f,isRight:g}=Zp(e),m={x:0,y:0},C={x:0,y:0},I={height:t.height*i.y,width:t.width*i.x};return!u&&a<=t.top+I.height?(m.y=nn.Backward,C.y=o*Math.abs((t.top+I.height-a)/I.height)):!h&&c>=t.bottom-I.height&&(m.y=nn.Forward,C.y=o*Math.abs((t.bottom-I.height-c)/I.height)),!g&&l>=t.right-I.width?(m.x=nn.Forward,C.x=o*Math.abs((t.right-I.width-l)/I.width)):!f&&s<=t.left+I.width&&(m.x=nn.Backward,C.x=o*Math.abs((t.left+I.width-s)/I.width)),{direction:m,speed:C}}function ES(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Xp(e){return e.reduce((t,n)=>Ko(t,Vc(n)),dr)}function TS(e){return e.reduce((t,n)=>t+qp(n),0)}function xS(e){return e.reduce((t,n)=>t+Gp(n),0)}function _S(e,t){if(t===void 0&&(t=hi),!e)return;const{top:n,left:o,bottom:i,right:a}=t(e);Wp(e)&&(i<=0||a<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const wS=[["x",["left","right"],TS],["y",["top","bottom"],xS]];class zu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=Vu(n),i=Xp(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,s,l]of wS)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=l(o),h=i[a]-u;return this.rect[c]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Gi{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var i;(i=this.target)==null||i.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function vS(e){const{EventTarget:t}=Dn(e);return e instanceof t?e:di(e)}function zl(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var Kn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Kn||(Kn={}));function A1(e){e.preventDefault()}function AS(e){e.stopPropagation()}var Qe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Qe||(Qe={}));const Kp={start:[Qe.Space,Qe.Enter],cancel:[Qe.Esc],end:[Qe.Space,Qe.Enter,Qe.Tab]},kS=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Qe.Right:return{...n,x:n.x+25};case Qe.Left:return{...n,x:n.x-25};case Qe.Down:return{...n,y:n.y+25};case Qe.Up:return{...n,y:n.y-25}}};class Qp{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Gi(di(n)),this.windowListeners=new Gi(Dn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kn.Resize,this.handleCancel),this.windowListeners.add(Kn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Kn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&_S(o),n(dr)}handleKeyDown(t){if(Uu(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:a=Kp,coordinateGetter:s=kS,scrollBehavior:l="smooth"}=i,{code:c}=t;if(a.end.includes(c)){this.handleEnd(t);return}if(a.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=o.current,h=u?{x:u.left,y:u.top}:dr;this.referenceCoordinates||(this.referenceCoordinates=h);const f=s(t,{active:n,context:o.current,currentCoordinates:h});if(f){const g=Os(f,h),m={x:0,y:0},{scrollableAncestors:C}=o.current;for(const I of C){const b=t.code,{isTop:S,isRight:y,isLeft:T,isBottom:k,maxScroll:A,minScroll:P}=Zp(I),E=ES(I),M={x:Math.min(b===Qe.Right?E.right-E.width/2:E.right,Math.max(b===Qe.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(b===Qe.Down?E.bottom-E.height/2:E.bottom,Math.max(b===Qe.Down?E.top:E.top+E.height/2,f.y))},B=b===Qe.Right&&!y||b===Qe.Left&&!T,w=b===Qe.Down&&!k||b===Qe.Up&&!S;if(B&&M.x!==f.x){const V=I.scrollLeft+g.x,H=b===Qe.Right&&V<=A.x||b===Qe.Left&&V>=P.x;if(H&&!g.y){I.scrollTo({left:V,behavior:l});return}H?m.x=I.scrollLeft-V:m.x=b===Qe.Right?I.scrollLeft-A.x:I.scrollLeft-P.x,m.x&&I.scrollBy({left:-m.x,behavior:l});break}else if(w&&M.y!==f.y){const V=I.scrollTop+g.y,H=b===Qe.Down&&V<=A.y||b===Qe.Up&&V>=P.y;if(H&&!g.x){I.scrollTo({top:V,behavior:l});return}H?m.y=I.scrollTop-V:m.y=b===Qe.Down?I.scrollTop-A.y:I.scrollTop-P.y,m.y&&I.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(t,Ko(Os(f,this.referenceCoordinates),m))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Qp.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Kp,onActivation:i}=t,{active:a}=n;const{code:s}=e.nativeEvent;if(o.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function k1(e){return!!(e&&"distance"in e)}function L1(e){return!!(e&&"delay"in e)}class $u{constructor(t,n,o){var i;o===void 0&&(o=vS(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:s}=a;this.props=t,this.events=n,this.document=di(s),this.documentListeners=new Gi(this.document),this.listeners=new Gi(o),this.windowListeners=new Gi(Dn(s)),this.initialCoordinates=(i=Uc(a))!=null?i:dr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Kn.Resize,this.handleCancel),this.windowListeners.add(Kn.DragStart,A1),this.windowListeners.add(Kn.VisibilityChange,this.handleCancel),this.windowListeners.add(Kn.ContextMenu,A1),this.documentListeners.add(Kn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(L1(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(k1(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:o,onPending:i}=this.props;i(o,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Kn.Click,AS,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:a}=this,{onMove:s,options:{activationConstraint:l}}=a;if(!i)return;const c=(n=Uc(t))!=null?n:dr,u=Os(i,c);if(!o&&l){if(k1(l)){if(l.tolerance!=null&&zl(u,l.tolerance))return this.handleCancel();if(zl(u,l.distance))return this.handleStart()}if(L1(l)&&zl(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),s(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Qe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const LS={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ol extends $u{constructor(t){const{event:n}=t,o=di(n.target);super(t,LS,o)}}ol.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const NS={move:{name:"mousemove"},end:{name:"mouseup"}};var zc;(function(e){e[e.RightClick=2]="RightClick"})(zc||(zc={}));class PS extends $u{constructor(t){super(t,NS,di(t.event.target))}}PS.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===zc.RightClick?!1:(o==null||o({event:n}),!0)}}];const $l={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class RS extends $u{constructor(t){super(t,$l)}static setup(){return window.addEventListener($l.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener($l.move.name,t)};function t(){}}}RS.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return i.length>1?!1:(o==null||o({event:n}),!0)}}];var Yi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Yi||(Yi={}));var Bs;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Bs||(Bs={}));function DS(e){let{acceleration:t,activator:n=Yi.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:s=5,order:l=Bs.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:h,delta:f,threshold:g}=e;const m=MS({delta:f,disabled:!a}),[C,I]=Yb(),b=_.useRef({x:0,y:0}),S=_.useRef({x:0,y:0}),y=_.useMemo(()=>{switch(n){case Yi.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Yi.DraggableRect:return i}},[n,i,c]),T=_.useRef(null),k=_.useCallback(()=>{const P=T.current;if(!P)return;const E=b.current.x*S.current.x,M=b.current.y*S.current.y;P.scrollBy(E,M)},[]),A=_.useMemo(()=>l===Bs.TreeOrder?[...u].reverse():u,[l,u]);_.useEffect(()=>{if(!a||!u.length||!y){I();return}for(const P of A){if((o==null?void 0:o(P))===!1)continue;const E=u.indexOf(P),M=h[E];if(!M)continue;const{direction:B,speed:w}=yS(P,M,y,t,g);for(const V of["x","y"])m[V][B[V]]||(w[V]=0,B[V]=0);if(w.x>0||w.y>0){I(),T.current=P,C(k,s),b.current=w,S.current=B;return}}b.current={x:0,y:0},S.current={x:0,y:0},I()},[t,k,o,I,a,s,JSON.stringify(y),JSON.stringify(m),C,u,A,h,JSON.stringify(g)])}const OS={x:{[nn.Backward]:!1,[nn.Forward]:!1},y:{[nn.Backward]:!1,[nn.Forward]:!1}};function MS(e){let{delta:t,disabled:n}=e;const o=jc(t);return wa(i=>{if(n||!o||!i)return OS;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[nn.Backward]:i.x[nn.Backward]||a.x===-1,[nn.Forward]:i.x[nn.Forward]||a.x===1},y:{[nn.Backward]:i.y[nn.Backward]||a.y===-1,[nn.Forward]:i.y[nn.Forward]||a.y===1}}},[n,t,o])}function BS(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return wa(i=>{var a;return t==null?null:(a=o??i)!=null?a:null},[o,t])}function FS(e,t){return _.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,a=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,o)}));return[...n,...a]},[]),[e,t])}var da;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(da||(da={}));var $c;(function(e){e.Optimized="optimized"})($c||($c={}));const N1=new Map;function HS(e,t){let{dragging:n,dependencies:o,config:i}=t;const[a,s]=_.useState(null),{frequency:l,measure:c,strategy:u}=i,h=_.useRef(e),f=b(),g=ua(f),m=_.useCallback(function(S){S===void 0&&(S=[]),!g.current&&s(y=>y===null?S:y.concat(S.filter(T=>!y.includes(T))))},[g]),C=_.useRef(null),I=wa(S=>{if(f&&!n)return N1;if(!S||S===N1||h.current!==e||a!=null){const y=new Map;for(let T of e){if(!T)continue;if(a&&a.length>0&&!a.includes(T.id)&&T.rect.current){y.set(T.id,T.rect.current);continue}const k=T.node.current,A=k?new zu(c(k),k):null;T.rect.current=A,A&&y.set(T.id,A)}return y}return S},[e,a,n,f,c]);return _.useEffect(()=>{h.current=e},[e]),_.useEffect(()=>{f||m()},[n,f]),_.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),_.useEffect(()=>{f||typeof l!="number"||C.current!==null||(C.current=setTimeout(()=>{m(),C.current=null},l))},[l,f,m,...o]),{droppableRects:I,measureDroppableContainers:m,measuringScheduled:a!=null};function b(){switch(u){case da.Always:return!1;case da.BeforeDragging:return n;default:return!n}}}function Jp(e,t){return wa(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function jS(e,t){return Jp(e,t)}function US(e){let{callback:t,disabled:n}=e;const o=ju(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(o)},[o,n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function il(e){let{callback:t,disabled:n}=e;const o=ju(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(o)},[n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function VS(e){return new zu(hi(e),e)}function P1(e,t,n){t===void 0&&(t=VS);const[o,i]=_.useState(null);function a(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const h=t(e);return JSON.stringify(c)===JSON.stringify(h)?c:h})}const s=US({callback(c){if(e)for(const u of c){const{type:h,target:f}=u;if(h==="childList"&&f instanceof HTMLElement&&f.contains(e)){a();break}}}}),l=il({callback:a});return wr(()=>{a(),e?(l==null||l.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),s==null||s.disconnect())},[e]),o}function zS(e){const t=Jp(e);return $p(e,t)}const R1=[];function $S(e){const t=_.useRef(e),n=wa(o=>e?o&&o!==R1&&e&&t.current&&e.parentNode===t.current.parentNode?o:Vu(e):R1,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function WS(e){const[t,n]=_.useState(null),o=_.useRef(e),i=_.useCallback(a=>{const s=Vl(a.target);s&&n(l=>l?(l.set(s,Vc(s)),new Map(l)):null)},[]);return _.useEffect(()=>{const a=o.current;if(e!==a){s(a);const l=e.map(c=>{const u=Vl(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Vc(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),o.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(c=>{const u=Vl(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>Ko(a,s),dr):Xp(e):dr,[e,t])}function D1(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const o=e!==dr;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?Os(e,n.current):dr}function qS(e){_.useEffect(()=>{if(!rl)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function GS(e,t){return _.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:a}=o;return n[i]=s=>{a(s,t)},n},{}),[e,t])}function e0(e){return _.useMemo(()=>e?IS(e):null,[e])}const O1=[];function YS(e,t){t===void 0&&(t=hi);const[n]=e,o=e0(n?Dn(n):null),[i,a]=_.useState(O1);function s(){a(()=>e.length?e.map(c=>Yp(c)?o:new zu(t(c),c)):O1)}const l=il({callback:s});return wr(()=>{l==null||l.disconnect(),s(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),i}function ZS(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return _a(t)?t:e}function XS(e){let{measure:t}=e;const[n,o]=_.useState(null),i=_.useCallback(u=>{for(const{target:h}of u)if(_a(h)){o(f=>{const g=t(h);return f?{...f,width:g.width,height:g.height}:g});break}},[t]),a=il({callback:i}),s=_.useCallback(u=>{const h=ZS(u);a==null||a.disconnect(),h&&(a==null||a.observe(h)),o(h?t(h):null)},[t,a]),[l,c]=Ds(s);return _.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const KS=[{sensor:ol,options:{}},{sensor:Qp,options:{}}],QS={current:{}},Cs={draggable:{measure:v1},droppable:{measure:v1,strategy:da.WhileDragging,frequency:$c.Optimized},dragOverlay:{measure:hi}};class Zi extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const JS={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Zi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ms},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Cs,measureDroppableContainers:Ms,windowRect:null,measuringScheduled:!1},e7={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ms,draggableNodes:new Map,over:null,measureDroppableContainers:Ms},al=_.createContext(e7),t0=_.createContext(JS);function t7(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Zi}}}function n7(e,t){switch(t.type){case qt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case qt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case qt.DragEnd:case qt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case qt.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new Zi(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case qt.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||o!==a.key)return e;const s=new Zi(e.droppable.containers);return s.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case qt.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const a=new Zi(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function r7(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=_.useContext(al),a=jc(o),s=jc(n==null?void 0:n.id);return _.useEffect(()=>{if(!t&&!o&&a&&s!=null){if(!Uu(a)||document.activeElement===a.target)return;const l=i.get(s);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const h of[c.current,u.current]){if(!h)continue;const f=Kb(h);if(f){f.focus();break}}})}},[o,t,i,s,a]),null}function o7(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...o}),n):n}function i7(e){return _.useMemo(()=>({draggable:{...Cs.draggable,...e==null?void 0:e.draggable},droppable:{...Cs.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Cs.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function a7(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const a=_.useRef(!1),{x:s,y:l}=typeof i=="boolean"?{x:i,y:i}:i;wr(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!o)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const h=n(u),f=$p(h,o);if(s||(f.x=0),l||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const g=Wp(u);g&&g.scrollBy({top:f.y,left:f.x})}},[t,s,l,o,n])}const n0=_.createContext({...dr,scaleX:1,scaleY:1});var eo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(eo||(eo={}));const r0=_.memo(function(t){var n,o,i,a;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:h=KS,collisionDetection:f=uS,measuring:g,modifiers:m,...C}=t;const I=_.useReducer(n7,void 0,t7),[b,S]=I,[y,T]=rS(),[k,A]=_.useState(eo.Uninitialized),P=k===eo.Initialized,{draggable:{active:E,nodes:M,translate:B},droppable:{containers:w}}=b,V=E!=null?M.get(E):null,H=_.useRef({initial:null,translated:null}),X=_.useMemo(()=>{var Ct;return E!=null?{id:E,data:(Ct=V==null?void 0:V.data)!=null?Ct:QS,rect:H}:null},[E,V]),W=_.useRef(null),[se,Ce]=_.useState(null),[be,ve]=_.useState(null),Le=ua(C,Object.values(C)),x=va("DndDescribedBy",s),ne=_.useMemo(()=>w.getEnabled(),[w]),pe=i7(g),{droppableRects:L,measureDroppableContainers:Z,measuringScheduled:le}=HS(ne,{dragging:P,dependencies:[B.x,B.y],config:pe.droppable}),ee=BS(M,E),Ie=_.useMemo(()=>be?Uc(be):null,[be]),Se=Nr(),ae=jS(ee,pe.draggable.measure);a7({activeNode:E!=null?M.get(E):null,config:Se.layoutShiftCompensation,initialRect:ae,measure:pe.draggable.measure});const ce=P1(ee,pe.draggable.measure,ae),Ue=P1(ee?ee.parentElement:null),Q=_.useRef({activatorEvent:null,active:null,activeNode:ee,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:w,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ve=w.getNodeFor((n=Q.current.over)==null?void 0:n.id),Te=XS({measure:pe.dragOverlay.measure}),we=(o=Te.nodeRef.current)!=null?o:ee,ze=P?(i=Te.rect)!=null?i:ce:null,Tt=!!(Te.nodeRef.current&&Te.rect),wt=zS(Tt?null:ce),$e=e0(we?Dn(we):null),nt=$S(P?Ve??ee:null),Tn=YS(nt),gt=o7(m,{transform:{x:B.x-wt.x,y:B.y-wt.y,scaleX:1,scaleY:1},activatorEvent:be,active:X,activeNodeRect:ce,containerNodeRect:Ue,draggingNodeRect:ze,over:Q.current.over,overlayNodeRect:Te.rect,scrollableAncestors:nt,scrollableAncestorRects:Tn,windowRect:$e}),dn=Ie?Ko(Ie,B):null,It=WS(nt),Lt=D1(It),q=D1(It,[ce]),oe=Ko(gt,Lt),_e=ze?fS(ze,gt):null,Ae=X&&_e?f({active:X,collisionRect:_e,droppableRects:L,droppableContainers:ne,pointerCoordinates:dn}):null,We=lS(Ae,"id"),[rt,hn]=_.useState(null),Je=Tt?gt:Ko(gt,q),fn=dS(Je,(a=rt==null?void 0:rt.rect)!=null?a:null,ce),pn=_.useRef(null),Nt=_.useCallback((Ct,Yt)=>{let{sensor:Zt,options:Mn}=Yt;if(W.current==null)return;const on=M.get(W.current);if(!on)return;const Pt=Ct.nativeEvent,Xt=new Zt({active:W.current,activeNode:on,event:Pt,options:Mn,context:Q,onAbort(Rt){if(!M.get(Rt))return;const{onDragAbort:F}=Le.current,$={id:Rt};F==null||F($),y({type:"onDragAbort",event:$})},onPending(Rt,O,F,$){if(!M.get(Rt))return;const{onDragPending:me}=Le.current,xe={id:Rt,constraint:O,initialCoordinates:F,offset:$};me==null||me(xe),y({type:"onDragPending",event:xe})},onStart(Rt){const O=W.current;if(O==null)return;const F=M.get(O);if(!F)return;const{onDragStart:$}=Le.current,te={activatorEvent:Pt,active:{id:O,data:F.data,rect:H}};To.unstable_batchedUpdates(()=>{$==null||$(te),A(eo.Initializing),S({type:qt.DragStart,initialCoordinates:Rt,active:O}),y({type:"onDragStart",event:te}),Ce(pn.current),ve(Pt)})},onMove(Rt){S({type:qt.DragMove,coordinates:Rt})},onEnd:gr(qt.DragEnd),onCancel:gr(qt.DragCancel)});pn.current=Xt;function gr(Rt){return async function(){const{active:F,collisions:$,over:te,scrollAdjustedTranslate:me}=Q.current;let xe=null;if(F&&me){const{cancelDrop:N}=Le.current;xe={activatorEvent:Pt,active:F,collisions:$,delta:me,over:te},Rt===qt.DragEnd&&typeof N=="function"&&await Promise.resolve(N(xe))&&(Rt=qt.DragCancel)}W.current=null,To.unstable_batchedUpdates(()=>{S({type:Rt}),A(eo.Uninitialized),hn(null),Ce(null),ve(null),pn.current=null;const N=Rt===qt.DragEnd?"onDragEnd":"onDragCancel";if(xe){const U=Le.current[N];U==null||U(xe),y({type:N,event:xe})}})}}},[M]),Gn=_.useCallback((Ct,Yt)=>(Zt,Mn)=>{const on=Zt.nativeEvent,Pt=M.get(Mn);if(W.current!==null||!Pt||on.dndKit||on.defaultPrevented)return;const Xt={active:Pt};Ct(Zt,Yt.options,Xt)===!0&&(on.dndKit={capturedBy:Yt.sensor},W.current=Mn,Nt(Zt,Yt))},[M,Nt]),zt=FS(h,Gn);qS(h),wr(()=>{ce&&k===eo.Initializing&&A(eo.Initialized)},[ce,k]),_.useEffect(()=>{const{onDragMove:Ct}=Le.current,{active:Yt,activatorEvent:Zt,collisions:Mn,over:on}=Q.current;if(!Yt||!Zt)return;const Pt={active:Yt,activatorEvent:Zt,collisions:Mn,delta:{x:oe.x,y:oe.y},over:on};To.unstable_batchedUpdates(()=>{Ct==null||Ct(Pt),y({type:"onDragMove",event:Pt})})},[oe.x,oe.y]),_.useEffect(()=>{const{active:Ct,activatorEvent:Yt,collisions:Zt,droppableContainers:Mn,scrollAdjustedTranslate:on}=Q.current;if(!Ct||W.current==null||!Yt||!on)return;const{onDragOver:Pt}=Le.current,Xt=Mn.get(We),gr=Xt&&Xt.rect.current?{id:Xt.id,rect:Xt.rect.current,data:Xt.data,disabled:Xt.disabled}:null,Rt={active:Ct,activatorEvent:Yt,collisions:Zt,delta:{x:on.x,y:on.y},over:gr};To.unstable_batchedUpdates(()=>{hn(gr),Pt==null||Pt(Rt),y({type:"onDragOver",event:Rt})})},[We]),wr(()=>{Q.current={activatorEvent:be,active:X,activeNode:ee,collisionRect:_e,collisions:Ae,droppableRects:L,draggableNodes:M,draggingNode:we,draggingNodeRect:ze,droppableContainers:w,over:rt,scrollableAncestors:nt,scrollAdjustedTranslate:oe},H.current={initial:ze,translated:_e}},[X,ee,Ae,_e,M,we,ze,L,w,rt,nt,oe]),DS({...Se,delta:B,draggingRect:_e,pointerCoordinates:dn,scrollableAncestors:nt,scrollableAncestorRects:Tn});const Lr=_.useMemo(()=>({active:X,activeNode:ee,activeNodeRect:ce,activatorEvent:be,collisions:Ae,containerNodeRect:Ue,dragOverlay:Te,draggableNodes:M,droppableContainers:w,droppableRects:L,over:rt,measureDroppableContainers:Z,scrollableAncestors:nt,scrollableAncestorRects:Tn,measuringConfiguration:pe,measuringScheduled:le,windowRect:$e}),[X,ee,ce,be,Ae,Ue,Te,M,w,L,rt,Z,nt,Tn,pe,le,$e]),ir=_.useMemo(()=>({activatorEvent:be,activators:zt,active:X,activeNodeRect:ce,ariaDescribedById:{draggable:x},dispatch:S,draggableNodes:M,over:rt,measureDroppableContainers:Z}),[be,zt,X,ce,S,x,M,rt,Z]);return _.createElement(Up.Provider,{value:T},_.createElement(al.Provider,{value:ir},_.createElement(t0.Provider,{value:Lr},_.createElement(n0.Provider,{value:fn},u)),_.createElement(r7,{disabled:(l==null?void 0:l.restoreFocus)===!1})),_.createElement(aS,{...l,hiddenTextDescribedById:x}));function Nr(){const Ct=(se==null?void 0:se.autoScrollEnabled)===!1,Yt=typeof c=="object"?c.enabled===!1:c===!1,Zt=P&&!Ct&&!Yt;return typeof c=="object"?{...c,enabled:Zt}:{enabled:Zt}}}),s7=_.createContext(null),M1="button",l7="Draggable";function c7(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const a=va(l7),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:h,draggableNodes:f,over:g}=_.useContext(al),{role:m=M1,roleDescription:C="draggable",tabIndex:I=0}=i??{},b=(c==null?void 0:c.id)===t,S=_.useContext(b?n0:s7),[y,T]=Ds(),[k,A]=Ds(),P=GS(s,t),E=ua(n);wr(()=>(f.set(t,{id:t,key:a,node:y,activatorNode:k,data:E}),()=>{const B=f.get(t);B&&B.key===a&&f.delete(t)}),[f,t]);const M=_.useMemo(()=>({role:m,tabIndex:I,"aria-disabled":o,"aria-pressed":b&&m===M1?!0:void 0,"aria-roledescription":C,"aria-describedby":h.draggable}),[o,m,I,b,C,h.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:M,isDragging:b,listeners:o?void 0:P,node:y,over:g,setNodeRef:T,setActivatorNodeRef:A,transform:S}}function u7(){return _.useContext(t0)}const d7="Droppable",h7={timeout:25};function f7(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const a=va(d7),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=_.useContext(al),h=_.useRef({disabled:n}),f=_.useRef(!1),g=_.useRef(null),m=_.useRef(null),{disabled:C,updateMeasurementsFor:I,timeout:b}={...h7,...i},S=ua(I??o),y=_.useCallback(()=>{if(!f.current){f.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(S.current)?S.current:[S.current]),m.current=null},b)},[b]),T=il({callback:y,disabled:C||!s}),k=_.useCallback((M,B)=>{T&&(B&&(T.unobserve(B),f.current=!1),M&&T.observe(M))},[T]),[A,P]=Ds(k),E=ua(t);return _.useEffect(()=>{!T||!A.current||(T.disconnect(),f.current=!1,T.observe(A.current))},[A,T]),_.useEffect(()=>(l({type:qt.RegisterDroppable,element:{id:o,key:a,disabled:n,node:A,rect:g,data:E}}),()=>l({type:qt.UnregisterDroppable,key:a,id:o})),[o]),_.useEffect(()=>{n!==h.current.disabled&&(l({type:qt.SetDroppableDisabled,id:o,key:a,disabled:n}),h.current.disabled=n)},[o,a,n,l]),{active:s,rect:g,isOver:(c==null?void 0:c.id)===o,node:A,over:c,setNodeRef:P}}function o0(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function p7(e,t){return e.reduce((n,o,i)=>{const a=t.get(o);return a&&(n[i]=a),n},Array(e.length))}function Ga(e){return e!==null&&e>=0}function m7(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function g7(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const i0=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const a=o0(t,o,n),s=t[i],l=a[i];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},Ya={scaleX:1,scaleY:1},a0=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:a,overIndex:s}=e;const l=(t=a[n])!=null?t:o;if(!l)return null;if(i===n){const u=a[s];return u?{x:0,y:n<s?u.top+u.height-(l.top+l.height):u.top-l.top,...Ya}:null}const c=I7(a,i,n);return i>n&&i<=s?{x:0,y:-l.height-c,...Ya}:i<n&&i>=s?{x:0,y:l.height+c,...Ya}:{x:0,y:0,...Ya}};function I7(e,t,n){const o=e[t],i=e[t-1],a=e[t+1];return o?n<t?i?o.top-(i.top+i.height):a?a.top-(o.top+o.height):0:a?a.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const s0="Sortable",l0=_.createContext({activeIndex:-1,containerId:s0,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:i0,disabled:{draggable:!1,droppable:!1}});function c0(e){let{children:t,id:n,items:o,strategy:i=i0,disabled:a=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:h}=u7(),f=va(s0,n),g=l.rect!==null,m=_.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),C=s!=null,I=s?m.indexOf(s.id):-1,b=u?m.indexOf(u.id):-1,S=_.useRef(m),y=!m7(m,S.current),T=b!==-1&&I===-1||y,k=g7(a);wr(()=>{y&&C&&h(m)},[y,m,C,h]),_.useEffect(()=>{S.current=m},[m]);const A=_.useMemo(()=>({activeIndex:I,containerId:f,disabled:k,disableTransforms:T,items:m,overIndex:b,useDragOverlay:g,sortedRects:p7(m,c),strategy:i}),[I,f,k.draggable,k.droppable,T,m,b,c,g,i]);return _.createElement(l0.Provider,{value:A},t)}const C7=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return o0(n,o,i).indexOf(t)},b7=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:a,newIndex:s,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!o||l!==a&&i===s?!1:n?!0:s!==i&&t===c},S7={duration:200,easing:"ease"},u0="transform",y7=ni.Transition.toString({property:u0,duration:0,easing:"linear"}),E7={roleDescription:"sortable"};function T7(e){let{disabled:t,index:n,node:o,rect:i}=e;const[a,s]=_.useState(null),l=_.useRef(n);return wr(()=>{if(!t&&n!==l.current&&o.current){const c=i.current;if(c){const u=hi(o.current,{ignoreTransform:!0}),h={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(h.x||h.y)&&s(h)}}n!==l.current&&(l.current=n)},[t,n,o,i]),_.useEffect(()=>{a&&s(null)},[a]),a}function d0(e){let{animateLayoutChanges:t=b7,attributes:n,disabled:o,data:i,getNewIndex:a=C7,id:s,strategy:l,resizeObserverConfig:c,transition:u=S7}=e;const{items:h,containerId:f,activeIndex:g,disabled:m,disableTransforms:C,sortedRects:I,overIndex:b,useDragOverlay:S,strategy:y}=_.useContext(l0),T=x7(o,m),k=h.indexOf(s),A=_.useMemo(()=>({sortable:{containerId:f,index:k,items:h},...i}),[f,i,k,h]),P=_.useMemo(()=>h.slice(h.indexOf(s)),[h,s]),{rect:E,node:M,isOver:B,setNodeRef:w}=f7({id:s,data:A,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...c}}),{active:V,activatorEvent:H,activeNodeRect:X,attributes:W,setNodeRef:se,listeners:Ce,isDragging:be,over:ve,setActivatorNodeRef:Le,transform:x}=c7({id:s,data:A,attributes:{...E7,...n},disabled:T.draggable}),ne=Gb(w,se),pe=!!V,L=pe&&!C&&Ga(g)&&Ga(b),Z=!S&&be,le=Z&&L?x:null,Ie=L?le??(l??y)({rects:I,activeNodeRect:X,activeIndex:g,overIndex:b,index:k}):null,Se=Ga(g)&&Ga(b)?a({id:s,items:h,activeIndex:g,overIndex:b}):k,ae=V==null?void 0:V.id,ce=_.useRef({activeId:ae,items:h,newIndex:Se,containerId:f}),Ue=h!==ce.current.items,Q=t({active:V,containerId:f,isDragging:be,isSorting:pe,id:s,index:k,items:h,newIndex:ce.current.newIndex,previousItems:ce.current.items,previousContainerId:ce.current.containerId,transition:u,wasDragging:ce.current.activeId!=null}),Ve=T7({disabled:!Q,index:k,node:M,rect:E});return _.useEffect(()=>{pe&&ce.current.newIndex!==Se&&(ce.current.newIndex=Se),f!==ce.current.containerId&&(ce.current.containerId=f),h!==ce.current.items&&(ce.current.items=h)},[pe,Se,f,h]),_.useEffect(()=>{if(ae===ce.current.activeId)return;if(ae!=null&&ce.current.activeId==null){ce.current.activeId=ae;return}const we=setTimeout(()=>{ce.current.activeId=ae},50);return()=>clearTimeout(we)},[ae]),{active:V,activeIndex:g,attributes:W,data:A,rect:E,index:k,newIndex:Se,items:h,isOver:B,isSorting:pe,isDragging:be,listeners:Ce,node:M,overIndex:b,over:ve,setNodeRef:ne,setActivatorNodeRef:Le,setDroppableNodeRef:w,setDraggableNodeRef:se,transform:Ve??Ie,transition:Te()};function Te(){if(Ve||Ue&&ce.current.newIndex===k)return y7;if(!(Z&&!Uu(H)||!u)&&(pe||Q))return ni.Transition.toString({...u,property:u0})}}function x7(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(o=e==null?void 0:e.droppable)!=null?o:t.droppable}}Qe.Down,Qe.Right,Qe.Up,Qe.Left;function _7({product:e,children:t}){const{attributes:n,listeners:o,setNodeRef:i,transform:a,transition:s,isDragging:l}=d0({id:e.id}),c={transform:ni.Transform.toString(a),transition:s};return d.jsx("div",{ref:i,style:c,className:`${Ot.product} ${l?Ot.dragging:""}`,...n,...o,children:t})}const h0=e=>{const{isActiveItems:t,setIsActiveItems:n,items:o,setItems:i,other:a,title:s,subtitle:l,editable:c=!0,draggable:u=!1,withImage:h=!1,deletable:f=!0,addable:g=!0,itemsType:m,itemsPlaceholder:C="",itemsOptions:I,hasRangeSelector:b=!1,rangeSelectorOptions:S,modalOptions:y,addableOptions:T={},limit:k,autoInterval:A,tip:P,aspectRatio:E,setAspectRatio:M}=e,[B,w]=_.useState(null),[V,H]=_.useState({top:0,left:0}),[X,W]=_.useState(null),se=_.useRef(null),[Ce,be]=_.useState(!1),ve=zp(Vp(ol,{activationConstraint:{distance:5}}));_.useEffect(()=>{if(B){const Z=[...o].map(le=>le.id===B.id?B:le);i(Z)}},[B]),_.useEffect(()=>{if(se.current&&X){const Z=se.current.getBoundingClientRect().height,le=window.innerHeight;let ee=X.top;ee+Z>le+window.scrollY-200&&(ee=le+window.scrollY-Z-200),ee<0&&(ee=10),H({top:ee-30,left:X.left})}},[se.current,X]);const Le=(Z,le)=>{Z.stopPropagation();const ee=Z.target.getBoundingClientRect();W({top:ee.top+window.scrollY-70,left:ee.left-(g?30:65)}),w(le),be(!0)},x=(Z,le)=>{const ee=[...o],Ie={...Z,id:Math.random().toString(36).substr(2,9)};ee.splice(le+1,0,Ie),i(ee)};function ne(Z){if(h)return Z?d.jsx("img",{src:`https://imagedelivery.net/${Z[0]}/w=1000`,alt:"image",width:16,height:16}):d.jsx(ie,{name:"Image",width:16,height:16,fill:"#757575"})}const pe=Z=>{const{active:le,over:ee}=Z;if(ee&&le.id!==ee.id){const Ie=o.findIndex(ae=>ae.id===le.id),Se=o.findIndex(ae=>ae.id===ee.id);if(Ie!==-1&&Se!==-1){const ae=[...o],[ce]=ae.splice(Ie,1);ae.splice(Se,0,ce),i(ae)}}},L=(Z,le)=>{var Ie,Se;const ee=d.jsxs(d.Fragment,{children:[u&&d.jsx("div",{children:d.jsx(ie,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),m==="select"&&I&&d.jsx(ao,{onChange:ae=>{const ce=[...o],Ue=I.find(Ve=>Ve.name["en-US"]===ae);if(!Ue)return;const Q=ce.map(Ve=>Ve.id===Z.id?{...Ue,name:{"en-US":ae}}:Ve);w({...Z,name:{"en-US":ae}}),i([...Q])},value:Z.name["en-US"],options:I.filter(ae=>!o.find(ce=>ce.name["en-US"]===ae.name["en-US"])).map(ae=>ae.name["en-US"]),leftAddonOptions:I.filter(ae=>{var ce;return((ce=ae.images)==null?void 0:ce.length)>0}).map(ae=>({value:ae.name["en-US"],addon:ne(ae.images)}))}),m==="selectInfiniteList"&&I&&d.jsx(Lu,{onChange:ae=>{const ce=[...o],Ue=I.find(Ve=>Ve.name["en-US"]===ae);if(!Ue)return;const Q=ce.map(Ve=>Ve.id===Z.id?{...Ue,name:{"en-US":ae}}:Ve);w({...Z,name:{"en-US":ae}}),i([...Q])},value:Z.name["en-US"],options:I.filter(ae=>!o.find(ce=>ce.name["en-US"]===ae.name["en-US"])).map(ae=>ae.name["en-US"]),leftAddonOptions:I.filter(ae=>{var ce;return((ce=ae.images)==null?void 0:ce.length)>0}).map(ae=>({value:ae.name["en-US"],addon:ne(ae.images)}))}),m==="input"&&d.jsx(nr,{onChange:ae=>{const Ue=[...o].map(Q=>Q.id===Z.id?{...Z,name:{"en-US":ae}}:Q);i([...Ue])},value:Z.name["en-US"],placeholder:C}),m==="image"&&d.jsx(xa,{onChange:ae=>{const Ue=[...o].map(Q=>Q.id===Z.id?{...Z,images:ae}:Q);i([...Ue])},activeImage:(Ie=o.find(ae=>ae.id===Z.id))!=null&&Ie.images?(Se=o.find(ae=>ae.id===Z.id))==null?void 0:Se.images[0]:void 0,tip:P}),d.jsxs("div",{className:Ot.buttons,children:[k&&k>o.length&&g&&d.jsx("div",{className:Ot.deleteButton,children:d.jsx(ie,{name:"Copy",hoverable:!0,width:20,height:20,onClick:()=>{x(Z,le)}})}),c&&d.jsx("div",{className:Ot.deleteButton,children:d.jsx(ie,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:ae=>{Le(ae,Z)}})}),f&&d.jsx("div",{className:Ot.deleteButton,children:d.jsx(ie,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>i(o.filter(ae=>ae.id!==Z.id))})})]})]});return u?d.jsx(_7,{product:Z,index:le,children:ee},Z.id):d.jsx("div",{className:Ot.product,children:ee},Z.id)};return d.jsxs("div",{className:Ot.productsBlock,children:[(s||t!==void 0)&&d.jsxs("div",{className:Ot.top,children:[s&&d.jsx("h3",{className:Ot.title,children:s}),t!==void 0&&d.jsx(vr,{current:t,onChange:Z=>n==null?void 0:n(Z)})]}),B&&c&&y&&Ce&&d.jsx(zb,{ref:se,activeItem:B,setActiveItem:w,popupPosition:V,modalOptions:y,setIsOpenModal:be}),(t===void 0||t)&&b&&S&&d.jsx(f0,{...S}),(t===void 0||t)&&d.jsxs("div",{className:Ot.products,children:[l&&d.jsx("h5",{className:Ot.subtitle,children:l}),u?d.jsx(r0,{sensors:ve,onDragEnd:pe,children:d.jsx(c0,{items:o.map(Z=>Z.id),strategy:a0,children:o.map((Z,le)=>L(Z,le))})}):o.map((Z,le)=>L(Z,le)),g&&d.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:d.jsx(ti,{withoutHover:!0,className:ge(Ot.button,{[Ot.disabled]:!!(k&&k<=o.length||o.length===(I==null?void 0:I.length))}),size:"s",disabled:!!(k&&k<=o.length||o.length===(I==null?void 0:I.length)),onClick:()=>{const Z=[...o];let le=null;if(I){for(let ee=0;ee<I.length;ee++)if(!o.find(Ie=>Ie.id===I[ee].id)){le=I[ee];break}}m==="select"&&I?Z.push({name:le?le.name:I[0].name,id:(le==null?void 0:le.id)||I[0].id,...T}):m==="input"?Z.push({name:{"en-US":""},id:pt(),...T}):Z.push({name:{"en-US":`Image ${o.length+1}`},id:pt(),...T}),i(Z)},style:{width:"fit-content"},children:d.jsxs("div",{className:Ot.addButton,children:[d.jsx("span",{children:"Add Option"}),d.jsx(ie,{name:"Plus",width:16,height:16})]})})})]}),E&&M&&d.jsx(ao,{value:E,label:"Aspect Ratio",options:Object.keys(Yf),onChange:Z=>M(Z),leftAddonOptions:Zf}),(t===void 0||t)&&a!==void 0&&d.jsx(Fp,{otherTitle:"Other",items:a}),(t===void 0||t)&&A!==void 0&&d.jsx(nr,{label:A.title||"Auto scroll interval",type:"number",value:String(A.autoInterval),onChange:Z=>A.setAutoInterval(Number(Z)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},w7="_title_cx65i_1",v7="_subtitle_cx65i_5",A7="_productsBlock_cx65i_14",k7="_top_cx65i_26",L7="_products_cx65i_14",N7="_product_cx65i_14",P7="_button_cx65i_80",R7="_disabled_cx65i_91",D7="_buttons_cx65i_118",O7="_modal_cx65i_125",M7="_link_cx65i_146",B7="_modalOptions_cx65i_152",F7="_addButton_cx65i_165",H7="_deleteButton_cx65i_180",j7="_closeIcon_cx65i_192",Co={title:w7,subtitle:v7,productsBlock:A7,top:k7,products:L7,product:N7,button:P7,disabled:R7,buttons:D7,modal:O7,link:M7,modalOptions:B7,addButton:F7,deleteButton:H7,closeIcon:j7},U7=_.forwardRef((e,t)=>{const{activeItem:n,setActiveItem:o,popupPosition:i,modalOptions:a,setIsOpenModal:s}=e;return si(t,()=>{o(null),s(!1)}),d.jsxs("div",{ref:t,className:Co.modal,onClick:l=>{l.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},children:[d.jsxs("div",{className:Co.top,children:[d.jsx("h3",{className:Co.title,children:n.name["en-US"]}),d.jsx("div",{className:Co.closeIcon,children:d.jsx(ie,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{o(null),s(!1)}})})]}),d.jsx("div",{className:Co.modalOptions,children:a.map(l=>{if(l.type==="image")return d.jsx(xa,{label:"Put up an attractive image",activeImage:n[l.field],onChange:c=>{const u={...n,[l.field]:c};o(u)}},String(l.field));if(l.type==="text")return d.jsx(Bu,{isActiveText:!0,typesText:n[l.field.type],setTypesText:c=>{const u={...n,[l.field.type]:c};o(u)},alignText:n[l.field.alignText],setAlignText:c=>{const u={...n,[l.field.alignText]:c};o(u)},text:n[l.field.text]["en-US"]||"",setText:c=>{const u={...n,[l.field.text]:{"en-US":c}};o(u)},typeFont:n[l.field.type],setTypeFont:c=>{const u={...n,[l.field.type]:c};o(u)},subtitle:l.label});if(l.type==="input")return d.jsx(nr,{onChange:c=>{const u={...n,[l.field]:{"en-US":c}};o(u)},value:n[l.field]["en-US"]||"",label:l.label,placeholder:l.placeholder});if(l.type==="inputNumber")return d.jsx(nr,{onChange:c=>{const u={...n,[l.field]:c};o(u)},value:n[l.field]||"",label:l.label,placeholder:l.placeholder,type:"number"});if(l.type==="inputSwitch")return d.jsxs("div",{className:Co.link,children:[d.jsx(nr,{onChange:c=>{const u={...n,[l.field.text]:{"en-US":c}};o(u)},value:n[l.field.text]["en-US"]||"",label:l.inputLabel,placeholder:l.placeholder}),d.jsx(vr,{current:!!n[l.field.switch]||!1,label:l.switchLabel,onChange:c=>{const u={...n,[l.field.switch]:c};o(u)}})]});if(l.type==="select")return d.jsx(ao,{options:l.itemsOptions,onChange:c=>{const u={...n,[l.field]:c};o(u)},label:l.label,value:n[l.field]||"String",leftAddonOptions:l.leftAddonOptions})})})]})}),V7="_title_hvj8m_1",z7="_buttonsBlock_hvj8m_15",$7="_top_hvj8m_26",W7="_modal_hvj8m_120",q7="_options_hvj8m_146",G7="_closeIcon_hvj8m_154",Go={title:V7,buttonsBlock:z7,top:$7,modal:W7,options:q7,closeIcon:G7},Y7=_.forwardRef((e,t)=>{var T;const{activeButton:n,setActiveButton:o,popupPosition:i,editableLink:a=!0}=e,[s,l]=_.useState(n.typesText),[c,u]=_.useState(n.destination),[h,f]=_.useState(n.page),[g,m]=_.useState(n.link||""),[C,I]=_.useState(n.text||{"en-US":""}),[b,S]=_.useState(n.openInNewTab),{pages:y}=zr();return si(t,()=>{o(null)}),_.useEffect(()=>{o({...n,...{text:C,link:g,destination:c,typesText:s,page:h,openInNewTab:b}})},[s,c,g,C,h,b]),d.jsxs("div",{className:Go.modal,onClick:k=>{k.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},ref:t,children:[d.jsxs("div",{className:Go.top,children:[d.jsx("h3",{className:Go.title,children:n.type}),d.jsx("div",{className:Go.closeIcon,children:d.jsx(ie,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>o(null)})})]}),d.jsxs("div",{className:Go.options,children:[a&&d.jsx(ao,{label:"Destination",onChange:k=>u(k),options:["Go to Page","Open Link"].filter(k=>k!==c),value:c}),a&&(c==="Go to Page"?d.jsx(ao,{label:"Go to",onChange:k=>{if(k==="Sign In")f("/customer-dash");else if(y){for(const A in y)if(y[A].name===k){f(y[A].path);break}}else f(Gf[0])},options:y?[...Object.values(y).filter(k=>k.path!==h).map(k=>k.name),"Sign In"]:["Sign In"],value:y?h==="/customer-dash"?"Sign In":((T=Object.values(y).find(k=>k.path===h))==null?void 0:T.name)||"Home":"Home"}):d.jsx(nr,{onChange:k=>m(k),value:g,placeholder:"https://",label:"Link"})),a&&d.jsx(vr,{current:n.openInNewTab,label:"Open in new tab",onChange:k=>S(k)}),d.jsx(Ou,{onChange:k=>I({"en-US":k}),value:C["en-US"],label:"Text"}),d.jsx(Du,{typesText:s,setTypesText:l})]})]})}),Z7="_wrapper_m18qi_1",X7="_subtitle_m18qi_7",K7="_content_m18qi_14",Q7="_range_m18qi_22",J7="_track_m18qi_27",ey="_progress_m18qi_36",ty="_dots_m18qi_46",ny="_dot_m18qi_46",ry="_active_m18qi_65",oy="_input_m18qi_77",iy="_countBlock_m18qi_91",ay="_controls_m18qi_107",sy="_button_m18qi_113",mn={wrapper:Z7,subtitle:X7,content:K7,range:Q7,track:J7,progress:ey,dots:ty,dot:ny,active:ry,input:oy,countBlock:iy,controls:ay,button:sy},f0=e=>{const{label:t,min:n=1,max:o=4,step:i=1,count:a,setCount:s}=e,[l,c]=_.useState(!1),u=Array.from({length:(o-n)/i+1}),h=(a-n)/(o-n)*100,f=()=>{a<o&&s(a+i)},g=()=>{a>n&&s(a-i)},m=C=>{const I=n+C*i;s(I)};return d.jsxs("div",{className:mn.wrapper,children:[t&&d.jsx("h5",{className:mn.subtitle,children:t}),d.jsxs("div",{className:mn.content,children:[d.jsxs("div",{className:mn.range,children:[d.jsx("div",{className:mn.track}),d.jsx("div",{className:mn.progress,style:{width:`${h}%`}}),d.jsx("div",{className:mn.dots,children:u.map((C,I)=>{const b=I<=(a-n)/i;return d.jsx("button",{onClick:()=>m(I),className:ge(mn.dot,{[mn.active]:b,[mn.inactive]:!b,[mn.dragging]:l}),"aria-label":`Set value to ${n+I*i}`},I)})}),d.jsx("input",{type:"range",min:n,max:o,step:i,value:a,onChange:C=>s(Number(C.target.value)),onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onTouchStart:()=>c(!0),onTouchEnd:()=>c(!1),className:mn.input})]}),d.jsxs("div",{className:mn.countBlock,children:[d.jsx(nr,{type:"number",min:n,max:o,paddingless:!0,onChange:C=>{const I=Number(C);I>o?s(o):I<n?s(n):s(I)},value:String(a)}),d.jsxs("div",{className:mn.controls,children:[d.jsx("button",{onClick:f,disabled:a>=o,className:mn.button,"aria-label":"Increment count",children:d.jsx(ie,{name:"CaretUp",width:15,height:15})}),d.jsx("button",{onClick:g,disabled:a<=n,className:mn.button,"aria-label":"Decrement count",children:d.jsx(ie,{name:"CaretDown",width:15,height:15})})]})]})]})]})},ly="_title_11jyy_1",cy="_subtitle_11jyy_5",uy="_productsBlock_11jyy_14",dy="_top_11jyy_26",hy="_products_11jyy_14",fy="_product_11jyy_14",py="_button_11jyy_80",my="_buttons_11jyy_114",gy="_modal_11jyy_121",Iy="_modalOptions_11jyy_148",Cy="_addButton_11jyy_161",by="_deleteButton_11jyy_176",Sy="_closeIcon_11jyy_188",Vi={title:ly,subtitle:cy,productsBlock:uy,top:dy,products:hy,product:fy,button:py,buttons:my,modal:gy,modalOptions:Iy,addButton:Cy,deleteButton:by,closeIcon:Sy},p0=({render:e,block:t})=>e(t),m0=({settings:e,pageContext:t})=>{const{footer:n}=Hr(),{settings:o}=Sa(),{pageContext:i}=zr(),{footer:a}=Lo();if(!a||!n)return null;const s=new a;return Object.keys(n).map(l=>{s[l]=n[l]}),s.renderBlock((e==null?void 0:e.blockSettings)||o,t||i)},g0=({settings:e,pageContext:t})=>{const{header:n}=Hr(),{settings:o}=Sa(),{pageContext:i}=zr(),{header:a}=Lo();if(!a||!n)return null;const s=new a;return Object.keys(n).map(l=>{s[l]=n[l]}),s.renderBlock((e==null?void 0:e.blockSettings)||o,t||i)},I0=({settings:e,pageContext:t})=>{const{announcement:n}=Hr(),{settings:o}=Sa(),{pageContext:i}=zr(),{announcement:a}=Lo();if(!a||!n)return null;const s=new a;return Object.keys(n).map(l=>{s[l]=n[l]}),s.renderBlock(e||o,t||i)},yy=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,i=localStorage.getItem("shopPassword");if(t&&!i)return null;const a=`${n.storeApi}/v2/shops/${o}/pages/${e}`+(t?`?password=${i}`:"");try{return await lt({url:a,withToken:!0,method:"get"})}catch(s){if(ht.isAxiosError(s)&&s.response&&s.response.status===404)return null}},Ey="_wrapper_5w9s8_1",Ty={wrapper:Ey},Wc=e=>{const{error:t}=e;return d.jsx("div",{className:Ty.wrapper,children:t})},xy=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.slApi}/v1/balance/top-up/${n}`;return await lt({url:o,method:"post",body:e,withToken:!1})},fi=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.customersApi}/v2/${n}/customers/${e}`;return await lt({url:o,withToken:!0,method:"get",typeToken:"customer"})},_y=()=>fi("dash/info"),wy=()=>fi("dash/dashboard/home"),vy=()=>fi("rewards"),Ay=()=>fi("balance"),ky=()=>fi("balance/top-up/settings"),Ly=()=>fi("referral-system"),qc=10,sl=async({url:e,PageNumber:t})=>{var l;const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.customersApi}/v2/${o}/${e}?PageNumber=${t}&PageSize=${qc}`,a=await lt({url:i,withToken:!0,method:"get",typeToken:"customer"}),s=Number((l=a.headers)==null?void 0:l["x-pagination-total"]);return{list:a.data,totalCount:s}},Wu=async(e,t="get",n)=>{const o=kt.getState().apiUrls,i=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${o.slApi}/v1/orders/${i}/${e}`;return await lt({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},Ny=e=>Wu("","post",e),Py=({PageNumber:e})=>sl({url:"customers/orders",PageNumber:e}),Ry=e=>Wu(e),Dy=e=>Wu(e),Oy=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.slApi}/v1/${n}/subscriptions`;return await lt({url:o,method:"post",withToken:!1,body:e})},My=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v2/${o}/subscriptions/${e}/${t}`;return await lt({url:i,method:"get",withToken:!1})},By=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v1/${o}/subscriptions/${e}/${t}/upgrades`;return await lt({url:i,method:"get",withToken:!1})},Fy=async(e,t,n)=>{const o=kt.getState().apiUrls,i=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${o.slApi}/v1/${i}/subscriptions/${e}/${t}/cancel`;return await lt({url:a,method:"post",withToken:!1,body:n})},Hy=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v2/${o}/subscriptions/${e}/change-gateway`;return await lt({url:i,method:"post",withToken:!1,body:{gateway:t}})},jy=({PageNumber:e})=>sl({url:"customers/subscriptions",PageNumber:e}),Uy=async({id:e,accessToken:t})=>await By(e,t),Vy=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v2/${o}/subscriptions/${e}/order`;return await lt({url:i,method:"post",withToken:!1,body:t})},zy=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v1/public/${o}/tickets/${e}/${t}`;return await lt({url:i,method:"get",withToken:!1})},$y=async(e,t,n,o,i)=>{const a=kt.getState().apiUrls,s=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,l=`${a.slApi}/v1/public/${s}/tickets/${e}/${t}/answer`;return(await lt({url:l,method:"post",body:{message:n,recaptcha:o,tsId:i},withToken:!1})).data},Wy=({PageNumber:e})=>sl({url:"customers/tickets",PageNumber:e}),qy=({PageNumber:e})=>sl({url:"customers/balance/transactions",PageNumber:e}),C0=async e=>{const t=kt.getState().apiUrls,n=e.map(s=>["names",s]),o=new URLSearchParams(n),i=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${i}&${o.toString()}`;return await lt({url:a,method:"get",withToken:!1})},b0=async({email:e,recaptcha:t,tsId:n})=>{const o=kt.getState().apiUrls,i=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${o.customersApi}/v2/${i}/auth/otp/request`;return(await lt({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},S0=async({email:e,otp:t,recaptcha:n,tsId:o})=>{const i=kt.getState().apiUrls,a=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,s=`${i.customersApi}/v2/${a}/auth/otp/login`,{data:l}=await lt({url:s,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:o},withToken:!1});return uo.getState().setToken(l.data),localStorage.setItem("token",l.data),{token:l.data,requested:!1}},Gc=async()=>{uo.getState().setToken(""),localStorage.removeItem("token")},Gy=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:S0,logoutCustomer:Gc,requestOtp:b0},Symbol.toStringTag,{value:"Module"})),Yy=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.slApi}/v2/coupons/${n}/validate`;return await lt({url:o,method:"post",body:e,withToken:!1})},Zy=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await lt({url:o,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},Xy=async()=>{const{data:e}=await Ly();return e},Ky=async e=>{const{data:t}=await Zy(e);return t};async function Qy(e){const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return lt({url:o,method:"post",withToken:!0,typeToken:"customer"})}const Wl="Balance",Jy={Number:"NUMBER",Textarea:"LARGE_TEXT",Checkbox:"CHECK_BOX",Hidden:"HIDDEN"},e8={recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:""},B1=(e,t)=>{var u;const{productId:n,productVariantId:o,quantity:i,chargeType:a}=t,s=e.find(h=>h.id===n);if(!s)throw new Error("Product does not exist");const l=s.variants.find(h=>h.id===o);if(!l)throw new Error("Variant does not exist");if(a==="RECURRING"&&!l.subscriptionSettings)throw new Error("Variant does not have subscription settings");if(i!==void 0&&((u=l.quantity)!=null&&u.available)&&l.quantity.available<i)throw new Error("Not enough quantity available");const c=Br.getState().cart;if(c.parts.length>0){const h=e.find(g=>g.id===c.parts[0].productId),f=h==null?void 0:h.variants.find(g=>g.id===c.parts[0].productVariantId);if(f&&l.price.currency!==f.price.currency)throw new Error("Product have different currency")}return l},t8=(e,t)=>{if(!e.volumeDiscounts||e.volumeDiscounts.length===0)return 0;const n=e.volumeDiscounts.filter(i=>t>=i.amount);return n.length===0?0:n.reduce((i,a)=>a.amount>i.amount?a:i).percentage},n8=(e,t)=>{let n=0,o=0;return e.forEach(i=>{var g,m;const a=t.find(C=>(C==null?void 0:C.id)===i.productId),s=a==null?void 0:a.variants.find(C=>C.id===i.productVariantId);if(!s)return;const{gateway:l}=Br.getState().cart,c=(s==null?void 0:s.gateways)||[],u=c.some(C=>C.name===l&&C.overrodePrice)?(g=c.find(C=>C.name===l))==null?void 0:g.overrodePrice:null;let h=0,f=0;if(i.chargeType==="ONE_TIME"?(h=(u==null?void 0:u.amount)||(s==null?void 0:s.price.amount)||0,f=h*i.quantity):f=s!=null&&s.subscriptionSettings?s.subscriptionSettings.price.amount+(((m=s.subscriptionSettings.entryFee)==null?void 0:m.amount)||0):0,n+=f,i.chargeType==="ONE_TIME"){const C=t8(s,i.quantity),I=f*(1-C/100);o+=I}else o+=f}),{total:n,totalWithVolumeDiscounts:o}},r8=(e,t)=>({isRequired:t.some(o=>{var a;const i=e.find(s=>(s==null?void 0:s.id)===o.productId);return(a=i==null?void 0:i.variants.find(s=>s.id===o.productVariantId))==null?void 0:a.discordSettings.isRequired}),isEnabled:t.some(o=>{var a;const i=e.find(s=>(s==null?void 0:s.id)===o.productId);return(a=i==null?void 0:i.variants.find(s=>s.id===o.productVariantId))==null?void 0:a.discordSettings.isEnabled})}),F1=e=>new Set(e.gateways.map(t=>t.name)),H1={availableGateways:[],requiresSignInGateways:[]},j1=(e,t)=>{var a;if(t.length===0)return H1;const n=(a=t[0])==null?void 0:a.variants[0];if(!n)return H1;const o=F1(n);for(const s of e){const l=t.find(h=>h.id===s.productId);if(!l)continue;const c=l.variants.find(h=>h.id===s.productVariantId);if(!c)continue;const u=F1(c);for(const h of o)u.has(h)||o.delete(h)}return!localStorage.getItem("token")&&o.has(Wl)?(o.delete(Wl),{availableGateways:[...o],requiresSignInGateways:[Wl]}):{availableGateways:[...o],requiresSignInGateways:[]}},o8=(e,t)=>{if(e.length===0)return[];const o=e.map(a=>{const s=t.find(c=>c.id===a.productId),l=s==null?void 0:s.variants.find(c=>c.id===a.productVariantId);return(l==null?void 0:l.customFields)??[]}).flat().reduce((a,s)=>{const l=a[s.name];return l?(s.required&&!l.required&&(a[s.name]={...s,value:s.defaultValue}),a):(a[s.name]={...s,value:s.defaultValue},a)},{});return Object.values(o).map(a=>({...a,value:""}))},i8=(e,t)=>{const n=t.find(i=>i.id===e.productId),o=n==null?void 0:n.variants.find(i=>i.id===e.productVariantId);return e.chargeType==="RECURRING"?!!(o!=null&&o.subscriptionSettings):!1},a8=()=>{const{cart:e,products:t,coupon:n,pending:o,applyCouponPending:i,customerEmail:a,setCart:s,setProducts:l,setCoupon:c,setPending:u,setApplyCouponPending:h}=Br(),f=async I=>{var E;h(!0);const{cart:b}=Br.getState(),{gateway:S,parts:y}=b,{notifications:T,setNotifications:k}=cn.getState();S||(h(!1),k([...T,{message:"There should be a gateway for the coupon",status:"error",id:pt()}]));const A=y.map(M=>M.productId);let P=null;try{const{data:M}=await Yy({gateway:S,couponName:I,productIds:A});P=M.data,k([...T,{message:"Coupon is applied",status:"success",id:pt()}]),s(B=>({...B,coupon:I}))}catch(M){const B=M;k([...T,{message:`Coupon is not applied: ${B.message}`,status:"error",id:pt()}]),s(w=>({...w,coupon:null})),c(null),h(!1)}if(h(!1),(E=P==null?void 0:P.restrictToProductIds)!=null&&E.length&&!A.every(M=>{var B;return(B=P==null?void 0:P.restrictToProductIds)==null?void 0:B.includes(M)}))throw new Error("Coupon can't be applied to such products");return c(P),P},C={reset(){s({...e8})},addProducts:I=>{const b=Br.getState().products,S=I.filter(y=>!b.some(T=>T.id===y.id));l([...b,...S])},addProductToCart:I=>{const b=Br.getState().cart;try{B1(t,I)}catch(y){throw new Error(y)}const S=b.parts.find(y=>y.productId===I.productId&&y.productVariantId===I.productVariantId&&y.chargeType===I.chargeType);if(S)return C.updateQuantityOfProduct({...S,quantity:(S.quantity||1)+(I.quantity||1),chargeType:I.chargeType});if(b.parts.length&&j1([...b.parts,I],t).availableGateways.length===0)throw new Error("No common payment gateways available");s({...b,parts:[...b.parts,I]}),b.coupon&&f(b.coupon)},removeProduct({productId:I,productVariantId:b}){s(S=>({...S,parts:S.parts.filter(y=>y.productId!==I||y.productVariantId!==b)})),e.coupon&&f(e.coupon)},getPossibleGateways(){return j1(e.parts,t)},removeCoupon(){c(null)},getDiscordSettings(){return r8(t,e.parts)},updateQuantityOfProduct(I){B1(t,I),s(b=>({...b,parts:b.parts.map(S=>S.productId===I.productId&&S.productVariantId===I.productVariantId?{...S,quantity:I.quantity,chargeType:I.chargeType}:S)})),e.coupon&&f(e.coupon)},getTotalAndDiscount(){const{coupon:I}=Br.getState(),{total:b,totalWithVolumeDiscounts:S}=n8(e.parts,t);let y;const T=S;return I&&I.discount?!I.isFixed&&I.discount===100?y=0:y=I.isFixed?Math.max(0,T-I.discount):T*(1-I.discount/100):S!==b&&(y=S),{total:b,totalWithVolumeDiscounts:S!==b?S:void 0,totalWithDiscount:y}},setGateway(I){s(S=>({...S,gateway:I}));const{isAntistock:b}=mt.getState();e.coupon&&!b&&f(e.coupon)},setPaymentMethod(I){s(b=>({...b,paymentMethod:I}))},async submitCart(I){u(!0);const{cart:b}=Br.getState(),{discordInfo:S}=Dp.getState();let y;if(b.parts&&a&&i8(b.parts[0],t))try{const{data:T}=await Oy({...b,partOrder:b.parts[0],referralCode:localStorage.getItem("referralCode"),discordSocialConnectId:S!=null&&S.authorized?S.id:null,customerEmail:a,recaptcha:I,customFields:{...b.customFields},tsId:so()});y=T.data}catch(T){console.error(T)}else try{const{data:T}=await Ny({...b,referralCode:localStorage.getItem("referralCode"),recaptcha:I,customFields:{...b.customFields},tsId:so(),discordSocialConnectId:S!=null&&S.authorized?S.id:null});y=T.data}catch(T){const k=T,{notifications:A,setNotifications:P}=cn.getState();P([...A,{message:`Failed to create order: ${k.message}`,status:"error",id:pt()}])}if(u(!1),y)return y;throw new Error("Failed to create order")},setDiscordSocialConnectId(I){s(b=>({...b,discordSocialConnectId:I}))},setCustomFields(I){s(b=>({...b,customFields:{...I}}))}};return _.useEffect(()=>{s(I=>({...I,customerEmail:a??""}))},[a,s]),{cart:e,products:t,coupon:n,pending:o,applyCouponPending:i,applyCoupon:f,...C}},ll=()=>{const{notifications:e,setNotifications:t}=cn();return n=>{navigator.clipboard.writeText(n),t([...e,{status:"success",message:"Successfully copied",id:pt()}])}};function y0(e,t=!0){if(!e||typeof e!="string")return"";if(/<[a-z][\s\S]*>/i.test(e))return e;const o=e.split(" "),i=20;if(t){let a="",s=[];return o.forEach(l=>{l.length>i?(s.length>0&&(a+=`<span style="hyphens: manual">${s.join(" ")} </span>`,s=[]),a+=`<span style="hyphens: auto" lang="en">${l} </span>`):s.push(l)}),s.length>0&&(a+=`<span style="hyphens: manual">${s.join(" ")}</span>`),a}else{const a=[];let s=[],l=0;return o.forEach(c=>{c.length>i?(s.length>0&&(a.push(d.jsxs("span",{style:{hyphens:"manual"},children:[s.join(" ")," "]},l++)),s=[]),a.push(d.jsxs("span",{style:{hyphens:"auto"},lang:"en",children:[c," "]},l++))):s.push(c)}),s.length>0&&a.push(d.jsx("span",{style:{hyphens:"manual"},children:s.join(" ")},l++)),a}}const s8=_.forwardRef((e,t)=>{const{activeItem:n,setActiveItem:o,popupPosition:i,setIsOpenModal:a,itemsOptions:s}=e,l=s.find(c=>c.id===n.listingId);return si(t,()=>{o(null),a(!1)}),l?d.jsxs("div",{className:Vi.modal,onClick:c=>{c.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},children:[d.jsxs("div",{className:Vi.top,children:[d.jsx("h3",{dangerouslySetInnerHTML:{__html:y0(l.productData.name)}}),d.jsx("div",{className:Vi.closeIcon,children:d.jsx(ie,{name:"X",height:20,width:20,onClick:()=>{a(!1),o(null)}})})]}),d.jsx("div",{className:Vi.modalOptions,children:d.jsx(xa,{label:"Put up an attractive image",activeImage:l.productData.images.length>0?l.productData.images[0].cfId:n.image?n.image:void 0,onChange:c=>{const u={...n,image:c[0]};o(u)}})})]}):null}),l8="_wrapper_ipyfg_1",c8="_label_ipyfg_9",u8="_input_ipyfg_18",d8="_disabled_ipyfg_31",h8="_paddingless_ipyfg_36",f8="_content_ipyfg_47",p8="_contentBorder_ipyfg_60",m8="_contentField_ipyfg_65",g8="_contentIsAntistock_ipyfg_69",I8="_borderless_ipyfg_74",C8="_rightIcon_ipyfg_79",b8="_leftIcon_ipyfg_87",S8="_requiredStar_ipyfg_94",xn={wrapper:l8,label:c8,input:u8,disabled:d8,paddingless:h8,content:f8,contentBorder:p8,contentField:m8,contentIsAntistock:g8,borderless:I8,rightIcon:C8,leftIcon:b8,requiredStar:S8},Ro=e=>{const{onChange:t,style:n,label:o,value:i,type:a="text",min:s,max:l,placeholder:c,disabled:u=!1,required:h=!1,regex:f,paddingless:g=!1,borderless:m=!1,editable:C=!1,isSearch:I=!1,centered:b=!1,maxSymbols:S,rightIcon:y,onFocus:T,leftIcon:k}=e,{themeSettings:A}=No(),{isAntistock:P}=mt(),{inputs:E}=A,[M,B]=_.useState(!1);function w(H){if(Number(H)<0)return String(s);const X=H.replace(/[^\d-]/g,"");return Number(X)<0?String(s):X}function V(H){return!h||!f?!0:new RegExp(f).test(H)}return d.jsxs("div",{className:xn.wrapper,children:[o&&d.jsxs("label",{className:xn.label,htmlFor:o,style:{color:P?"var(--text-secondary)":void 0},children:[o,h&&d.jsx("span",{className:xn.requiredStar,children:"*"})]}),d.jsxs("div",{className:ge(xn.content,{[xn.contentBorder]:!P&&E.border.active,[xn.contentField]:E.field.active,[xn.disabled]:u,[xn.contentIsAntistock]:P}),style:{...n},children:[k&&d.jsx("div",{className:xn.leftIcon,children:k}),d.jsx("input",{maxLength:S,id:o,type:a||"text",onChange:H=>{if(a==="text")t(H.target.value);else{const X=w(H.target.value);t(X)}},value:i,autoComplete:"off",autoCorrect:"off",spellCheck:!1,inputMode:"none",placeholder:c||"Type something...",className:ge(xn.input,{[xn.required]:M&&h&&!V(i),[xn.paddingless]:g,[xn.borderless]:m}),min:a==="number"?s:void 0,max:a==="number"?l:void 0,onFocus:()=>{T&&T(),B(!0)},disabled:u,style:{textAlign:b?"center":"left",padding:I?`7px ${Number(E.general.size)+20}px 7px ${k?35:11}px`:`7px ${y?35:11}px 7px ${k?35:11}px`}}),y&&d.jsx("div",{className:xn.rightIcon,children:y}),I&&d.jsx("div",{className:xn.rightIcon,children:d.jsx(ie,{name:"MagnifyingGlass",fill:"var(--text-secondary)",width:E.general.size,height:E.general.size})}),C&&d.jsx("div",{children:d.jsx(ie,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},y8="_button_1v5k3_1",E8="_primary_1v5k3_20",T8="_primaryHovered_1v5k3_30",x8="_secondary_1v5k3_35",_8="_secondaryHovered_1v5k3_45",w8="_secondaryAntistock_1v5k3_50",v8="_tertiary_1v5k3_61",A8="_special_1v5k3_71",k8="_tertiaryHovered_1v5k3_75",L8="_content_1v5k3_80",N8="_isAntistock_1v5k3_88",ar={button:y8,primary:E8,primaryHovered:T8,secondary:x8,secondaryHovered:_8,secondaryAntistock:w8,tertiary:v8,special:A8,tertiaryHovered:k8,content:L8,isAntistock:N8},P8=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,E0=({children:e,className:t,as:n="span",...o})=>{const[i,a]=_.useState(!1);return _.useEffect(()=>{typeof window<"u"&&a(P8())},[]),i?d.jsx(n,{className:t,...o,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):d.jsx(n,{className:t,...o,children:e})},_t=e=>{const{children:t,onClick:n,style:o,className:i,disabled:a=!1,type:s="Primary",dangerouslySetInnerHTML:l}=e,{themeSettings:c}=No(),{isAntistock:u}=mt(),h=I=>typeof I=="string"?d.jsx(E0,{children:I}):I,f={onClick:n,disabled:a,style:o,className:ge(ar.button,i,{[ar.primary]:s==="Primary",[ar.secondary]:s==="Secondary"&&!u,[ar.secondaryAntistock]:s==="Secondary"&&u,[ar.tertiary]:s==="Tertiary",[ar.primaryHovered]:s==="Primary"&&!a&&c.buttons.primary.hover&&!u,[ar.secondaryHovered]:s==="Secondary"&&!a&&c.buttons.secondary.hover&&!u,[ar.tertiaryHovered]:s==="Tertiary"&&!a&&c.buttons.tertiary.hover&&!u,[ar.isAntistock]:u})};if(s==="Special")return d.jsx("button",{...f,className:ar.special,...l?{dangerouslySetInnerHTML:l}:{children:h(t)}});const g=s.toLowerCase(),m=c.buttons[g],C=s==="Tertiary"?d.jsxs("div",{className:ar.content,children:[h(t),d.jsx(ie,{name:"ArrowRight",fill:"var(--text-tertiary)",width:20,height:20})]}):h(t);return d.jsx("button",{...f,style:{...o,textAlign:m.alignment},...l?{dangerouslySetInnerHTML:l}:{children:C}})},R8="_modal_1iz94_1",D8="_padding_1iz94_17",O8="_content_1iz94_21",M8="_close_1iz94_42",Za={modal:R8,padding:D8,content:O8,close:M8},cl=e=>{const{close:t,children:n,withAnimation:o=!0,hasPadding:i=!0}=e,{isOpen:a,setIsOpen:s}=$r(),l=()=>{s(!1),o?setTimeout(()=>{t(!1),s(!0)},300):(t(!1),s(!0))};return _.useEffect(()=>{const c=u=>{u.key==="Escape"&&l()};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[]),To.createPortal(d.jsx("div",{className:ge(Za.modal,{[Za.padding]:i}),onClick:l,children:o?d.jsx("div",{className:ge(Za.content,{[Za.close]:!a}),children:n}):d.jsx(d.Fragment,{children:n})}),document.body)},B8="_loader_1kbu3_1",F8="_loaderAntistock_1kbu3_18",U1={loader:B8,loaderAntistock:F8},qn=e=>{const{isAntistock:t}=mt();return t?d.jsx("span",{className:U1.loaderAntistock,style:{width:"15px",height:"15px",borderWidth:"2px"}}):d.jsx("div",{className:U1.loader,...e})},H8="_container_6vcrl_1",j8="_wrapper_6vcrl_5",V1={container:H8,wrapper:j8};class U8{constructor(){Ei(this,"observer",null);Ei(this,"callbacks",new Map);Ei(this,"handleWindowResize",()=>{this.callbacks.forEach((t,n)=>{const o=n.getBoundingClientRect().width;t.forEach(i=>i(o))})});this.observer=new ResizeObserver(t=>{var n;for(const o of t){const i=o.contentRect.width,a=o.target;this.callbacks.has(a)&&((n=this.callbacks.get(a))==null||n.forEach(s=>s(i)))}}),window.addEventListener("resize",this.handleWindowResize)}observe(t,n){var i;if(!this.observer)return;this.callbacks.has(t)||(this.callbacks.set(t,[]),this.observer.observe(t)),(this.callbacks.get(t)||[]).includes(n)||(i=this.callbacks.get(t))==null||i.push(n)}unobserve(t,n){var o;if(!(!this.observer||!this.callbacks.has(t))){if(n){const i=this.callbacks.get(t)||[];this.callbacks.set(t,i.filter(a=>a!==n))}(o=this.callbacks.get(t))!=null&&o.length||(this.callbacks.delete(t),this.observer.unobserve(t))}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callbacks.clear(),window.removeEventListener("resize",this.handleWindowResize)}}const z1=new U8;function T0(e){const[t,n]=_.useState("desktop");return _.useEffect(()=>{const o=e.current;if(!o)return;const i=l=>l>=1081?"desktop":l>=720?"tablet":"mobile",a=l=>{const c=i(l);n(c)};z1.observe(o,a);const s=o.getBoundingClientRect().width;return a(s),()=>{z1.unobserve(o,a)}},[e]),t}const Xa=16,x0=({children:e,padding:t,style:n,notPadding:o=!1,maxWidth:i="var(--max-width-store)"})=>{const a=_.useRef(null),s=T0(a);return d.jsx("div",{className:V1.container,ref:a,style:n,children:d.jsx("div",{className:V1.wrapper,style:{maxWidth:i,paddingTop:s==="desktop"?t==null?void 0:t.top:o?0:Xa,paddingBottom:s==="desktop"?t==null?void 0:t.bottom:o?0:Xa,paddingLeft:s==="desktop"?t==null?void 0:t.left:o?0:Xa,paddingRight:s==="desktop"?t==null?void 0:t.right:o?0:Xa,...n},children:e(s)})})},V8="_wrapper_d9z4o_1",z8="_label_d9z4o_10",$8="_contentBorder_d9z4o_19",W8="_textarea_d9z4o_23",q8="_contentField_d9z4o_35",G8="_antistock_d9z4o_49",Y8="_length_d9z4o_58",Gr={wrapper:V8,label:z8,contentBorder:$8,textarea:W8,contentField:q8,antistock:G8,length:Y8},Z8=e=>{const{onChange:t,label:n,value:o,maxLength:i,placeholder:a="Type something...",type:s="text",required:l=!1}=e,[c,u]=_.useState(o.length),{themeSettings:h}=No(),{isAntistock:f}=mt();function g(m){return s==="number"?m.replace(/[^\d\n]+/g,""):m}return d.jsxs("div",{className:Gr.wrapper,children:[n&&d.jsxs("label",{className:Gr.label,htmlFor:n,style:{color:f?"var(--text-secondary)":void 0},children:[n,l&&d.jsx("span",{className:Gr.requiredStar,children:"*"})]}),d.jsx("textarea",{id:n,value:o,onChange:m=>{const C=g(m.target.value);u(C.length),t(C)},placeholder:a,className:ge(Gr.textarea,{[Gr.contentBorder]:h.inputs.border.active,[Gr.contentField]:h.inputs.field.active,[Gr.antistock]:f}),maxLength:i}),i&&d.jsxs("div",{className:Gr.length,children:[c,"/",i]})]})},X8="_wrapper_ty9h3_2",K8="_label_ty9h3_9",Q8="_top_ty9h3_17",J8="_select_ty9h3_23",eE="_borderFocused_ty9h3_42",tE="_input_ty9h3_49",nE="_icon_ty9h3_59",rE="_rotate_ty9h3_64",oE="_content_ty9h3_68",iE="_options_ty9h3_72",aE="_filteredOptions_ty9h3_93",sE="_open_ty9h3_97",lE="_option_ty9h3_72",cE="_focused_ty9h3_115",uE="_addon_ty9h3_119",dE="_value_ty9h3_130",hE="_postfix_ty9h3_135",fE="_leftAddon_ty9h3_139",Jt={wrapper:X8,label:K8,top:Q8,select:J8,borderFocused:eE,input:tE,icon:nE,rotate:rE,content:oE,options:iE,filteredOptions:aE,open:sE,option:lE,focused:cE,addon:uE,value:dE,postfix:hE,leftAddon:fE};function pE(e,t){_.useEffect(()=>{function n(o){!e.current||e.current.contains(o.target)||t(o)}return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])}const _0=e=>{var M,B;const{onChange:t,label:n,value:o,options:i,style:a,switcher:s,postfixs:l,leftAddonOptions:c}=e,[u,h]=_.useState(!1),[f,g]=_.useState(""),[m,C]=_.useState(null),[I,b]=_.useState(!1),S=_.useRef(null);pE(S,()=>h(!1));function y(w){g(""),t(w),h(!1),C(null)}function T(w,V){return w?w.length>V+3?`${w.slice(0,V)}...`:w:""}function k(w){if(!u){(w.key==="Enter"||w.key==="ArrowDown")&&h(!0);return}const V=E;w.key==="ArrowDown"&&(w.preventDefault(),C(H=>H===null||H===V.length-1?0:H+1)),w.key==="ArrowUp"&&(w.preventDefault(),C(H=>H===null||H===0?V.length-1:H-1)),w.key==="Enter"&&m!==null&&(w.preventDefault(),y(V[m])),w.key==="Escape"&&h(!1)}const A=_.useRef(null),P=_.useMemo(()=>new Wr(i,{threshold:.4,minMatchCharLength:2}),[i]),E=_.useMemo(()=>I&&f.trim()!==""?P.search(f).map(w=>w.item):i,[f,i,I,P]);return d.jsxs("div",{className:Jt.wrapper,style:{...a},children:[n&&d.jsxs("div",{className:Jt.top,children:[d.jsx("label",{className:Jt.label,htmlFor:n,children:n}),s&&d.jsx(vr,{current:s.value,onChange:s.onChange})]}),d.jsxs("label",{className:Jt.content,ref:S,children:[d.jsxs("div",{className:ge(Jt.select,{[Jt.borderFocused]:u}),onKeyDown:k,onClick:w=>{w.stopPropagation(),h(V=>!V),b(!1)},ref:A,tabIndex:0,children:[c&&c.length>0&&d.jsx("div",{className:Jt.addon,children:(M=c.find(w=>w.value===o))==null?void 0:M.addon}),d.jsx("div",{className:Jt.input,id:"md",children:T(o,15)}),d.jsx("div",{className:ge(Jt.icon,{[Jt.rotate]:u}),onClick:w=>{w.stopPropagation(),h(V=>!V)},children:d.jsx(ie,{name:"CaretDown",width:16,height:16,fill:"var(--text-primary)"})})]}),d.jsxs("div",{className:ge(Jt.options,{[Jt.open]:u}),style:{top:((B=A.current)==null?void 0:B.clientHeight)+10},children:[i.length>6&&d.jsx(Ro,{type:"text",value:f,placeholder:"Search...",onChange:w=>{g(w),b(!0)},isSearch:!0}),d.jsxs("div",{className:Jt.filteredOptions,children:[E.map((w,V)=>{var H;return d.jsxs("div",{className:ge(Jt.option,{[Jt.focused]:V===m}),onClick:()=>{y(w),h(!1)},id:"md",children:[c&&c.length>0&&d.jsx("div",{className:Jt.leftAddon,children:(H=c.find(X=>X.value===w))==null?void 0:H.addon}),d.jsx("span",{className:Jt.value,id:"md",children:T(w,20)}),l&&d.jsx("span",{className:Jt.postfix,id:"md",children:l[V]})]},w)}),E.length===0&&d.jsx("div",{children:"No results found."})]})]})]})]})},mE="_wrapper_2vleg_1",gE="_label_2vleg_9",IE="_options_2vleg_17",CE="_radioLabel_2vleg_23",bE="_radio_2vleg_23",SE="_custom_2vleg_38",yE="_option_2vleg_17",mo={wrapper:mE,label:gE,options:IE,radioLabel:CE,radio:bE,custom:SE,option:yE},EE=e=>{const{defaultValue:t,options:n,onChange:o,label:i,flexDirection:a="row"}=e,[s,l]=_.useState(t),c=u=>{const h=u.target.value;l(h),o(h)};return d.jsxs("div",{className:mo.wrapper,children:[d.jsx("span",{className:mo.label,children:i}),d.jsx("div",{className:mo.options,style:{flexDirection:a},children:n.map(u=>d.jsxs("label",{className:mo.radioLabel,children:[d.jsx("input",{type:"radio",value:u.value,checked:s===u.value,onChange:c,className:mo.radio}),d.jsx("span",{className:mo.custom}),d.jsx("span",{className:mo.option,children:u.label})]},u.value))})]})},TE="_content_eonwv_1",xE="_main_eonwv_12",_E="_block_eonwv_16",wE="_active_eonwv_22",vE="_name_eonwv_32",AE="_addSection_eonwv_109",kE="_addSectionTop_eonwv_117",Yr={content:TE,main:xE,block:_E,active:wE,name:vE,addSection:AE,addSectionTop:kE},LE="_sidebar_xhqpt_1",NE="_content_xhqpt_14",PE="_button_xhqpt_24",RE="_moveButton_xhqpt_40",DE="_deleteButton_xhqpt_49",br={sidebar:LE,content:NE,button:PE,moveButton:RE,deleteButton:DE},OE=()=>{var A;const{activeBlock:e,setActiveBlock:t}=Xs(),{blocks:n,removeBlock:o,moveBlock:i,duplicateBlock:a,setCurrentBlock:s}=Hr(),{currentPage:l,pages:c}=zr(),{setTitle:u,setDescription:h,setOnConfirm:f}=Kf(),{setActiveBlock:g}=Lo(),m=(A=c==null?void 0:c[l])==null?void 0:A.path,C=m?n[m]:null,I=(C==null?void 0:C.order)||[],b=I.indexOf(e.id),S=P=>{P.stopPropagation(),b>0&&m&&(i(m,b,b-1),t({id:e.id,neededScroll:!0}),setTimeout(()=>{t({id:e.id,neededScroll:!1})},100))},y=P=>{P.stopPropagation(),b<I.length-1&&m&&(i(m,b,b+1),t({id:e.id,neededScroll:!0}),setTimeout(()=>{t({id:e.id,neededScroll:!1})},100))},T=P=>{P.stopPropagation(),m&&a(m,e.id)},k=()=>{m&&(o(m,e.id),s(null),g(null),t({id:null,neededScroll:!1}))};return d.jsx("div",{className:br.sidebar,children:d.jsxs("div",{className:br.content,children:[d.jsx("button",{onClick:S,className:ge(br.button,br.moveButton),disabled:b===0,children:d.jsx(ie,{name:"ArrowUp"})}),d.jsx("button",{onClick:y,className:ge(br.button,br.moveButton),disabled:b===I.length-1,children:d.jsx(ie,{name:"ArrowDown"})}),d.jsx("button",{onClick:T,className:ge(br.button,br.moveButton),children:d.jsx(ie,{name:"Copy"})}),d.jsx("button",{className:ge(br.button,br.deleteButton),onClick:P=>{P.stopPropagation(),u("Remove Block"),h(`Are you sure you want to delete ${(C==null?void 0:C.data[e.id].name)||"this"} block? Once you delete this block, any content visible will also be deleted. This is irreversible.`),f(k)},children:d.jsx(ie,{name:"Trash",hoverable:!0,fill:"#C12A2A"})})]})})};function zi(e,t){if(!t||!t[e])return"unknown name";const n=new t[e];return!n.blockSettings||!n.blockSettings.displayName?"unknown name":n.blockSettings.displayName}const ME=_.memo(({scrollableRef:e})=>{const{setActiveBlock:t,activeBlock:n,zoomLevel:o}=Xs(),{blocks:i,sourceBlocks:a}=Lo(),{blocks:s,setCurrentBlock:l,currentBlock:c,setPositionBlock:u,announcement:h}=Hr(),{settings:f}=Sa(),{currentPage:g,pages:m,pageContext:C}=zr(),{activeBlock:I,setActiveBlock:b}=No(),{setError:S}=Xf(),{setActiveBlock:y}=Lo(),T=_.useRef(n.id),k=_.useRef({});_.useEffect(()=>{if(n.id&&n.neededScroll&&k.current[n.id]){const E=k.current[n.id];if(E&&e.current){const M=E.offsetTop;e.current.scrollTo({top:M-30,behavior:"smooth"})}}},[n,e]);const A=Vr();_.useEffect(()=>{T.current=n.id},[n.id]);const P=E=>{if(!E||!E.name)return S({message:"Block or block.name is undefined.",failedSettings:!1,failedThemeSettings:!1,failedPageIds:m&&m[g].id?[m[g].id]:[]}),d.jsx(Wc,{error:"Block or block.name is undefined."});if(!i||!i[E.name])return S({message:'Block "${block.name}" does not exist in blocks.',failedSettings:!1,failedThemeSettings:!1,failedPageIds:m&&m[g].id?[m[g].id]:[]}),d.jsx(Wc,{error:`Block "${E.name}" does not exist in blocks.`});const M=new i[E.name];return E.value&&Object.assign(M,E.value),M.renderBlock(f,C)};return d.jsxs("div",{onClick:E=>{E.stopPropagation()},className:Yr.content,style:{width:"100%",height:"100%",zoom:`${o}`},ref:e,children:[h&&d.jsx(I0,{}),d.jsx(g0,{}),d.jsx("div",{className:Yr.main,children:m&&m[g]&&s[m[g].path]&&s[m[g].path].data&&s[m[g].path].order.map(E=>d.jsxs("div",{ref:M=>k.current[E]=M,onClick:M=>{M.stopPropagation(),y(null),I&&b(null),t({id:E,neededScroll:!0}),setTimeout(()=>{t({id:E,neededScroll:!1})},100),l(null),c?setTimeout(()=>{l(n.id)},100):l(n.id)},onMouseEnter:M=>{M.stopPropagation(),n.neededScroll||t({id:E,neededScroll:!1})},onMouseLeave:M=>{M.stopPropagation(),n.neededScroll||t({id:null,neededScroll:!1})},className:ge(Yr.block),children:[(n.id===E||c===E)&&d.jsx("div",{className:Yr.active}),(n.id===E||c===E)&&d.jsx("div",{className:Yr.name,children:zi(s[m[g].path].data[E].name,a)}),(n.id===E||c===E)&&zi(s[m[g].path].data[E].name,a)!=="unknown name"&&d.jsx(OE,{}),(n.id===E||c===E)&&zi(s[m[g].path].data[E].name,a)!=="unknown name"&&d.jsx("div",{className:Yr.addSection,children:d.jsx(ti,{onClick:M=>{M.stopPropagation(),u(E,!0),l(null),t({id:null,neededScroll:!1}),y(null),A("/admin/builder/add")},children:"Add Section"})}),(n.id===E||c===E)&&zi(s[m[g].path].data[E].name,a)!=="unknown name"&&d.jsx("div",{className:ge(Yr.addSection,Yr.addSectionTop),children:d.jsx(ti,{onClick:M=>{M.stopPropagation(),u(E,!1),l(null),t({id:null,neededScroll:!1}),y(null),A("/admin/builder/add")},children:"Add Section"})}),i&&d.jsx(p0,{render:P,block:s[m[g].path].data[E]})]},E))}),d.jsx(m0,{})]})}),BE="_statItem_fzeec_1",FE="_content_fzeec_44",HE="_withChildren_fzeec_50",jE="_info_fzeec_56",UE="_iconWrapper_fzeec_68",VE="_text_fzeec_78",zE="_title_fzeec_84",$E="_value_fzeec_88",WE="_emptyImage_fzeec_94",qE="_image_fzeec_11",GE="_imageTitle_fzeec_112",YE="_emptyImageText_fzeec_122",ZE="_hoverable_fzeec_147",Wt={statItem:BE,content:FE,withChildren:HE,info:jE,iconWrapper:UE,text:VE,title:zE,value:$E,emptyImage:WE,image:qE,imageTitle:GE,emptyImageText:YE,hoverable:ZE},Zn=({iconName:e,title:t,value:n,image:o,imageName:i,children:a,className:s,logo:l,customLogo:c,productSlug:u})=>{const h=Vr();return d.jsxs("div",{className:`${Wt.statItem} ${s}`,children:[o&&o!=="empty"&&d.jsxs("div",{style:{position:"relative"},onClick:()=>{u&&h(`/${u}`)},children:[d.jsx("div",{style:{background:"#000000"},children:d.jsx("img",{src:o,alt:i,className:ge(Wt.image,Wt.emptyImage,{[Wt.hoverable]:u})})}),d.jsx("div",{className:Wt.emptyImageText,children:d.jsx("div",{className:ge(Wt.title,Wt.imageTitle),id:"h5",children:i})})]}),o==="empty"&&d.jsx("div",{style:{background:"#000000"},children:d.jsxs("div",{className:ge(Wt.emptyImage,{[Wt.hoverable]:u}),onClick:()=>{u&&h(`/${u}`)},children:[d.jsx(ie,{name:"Image",width:64,height:64,fill:"var(--text-secondary)"}),d.jsx("div",{className:Wt.emptyImageText,children:d.jsx("div",{className:Wt.title,id:"h5",children:i||"No Product"})})]})}),d.jsxs("div",{className:`${Wt.content} ${a?Wt.withChildren:""}`,children:[d.jsxs("div",{className:Wt.info,children:[c?d.jsx("div",{style:{color:"var(--text-action)"},children:c}):l?d.jsx("div",{className:Wt.iconWrapper,children:d.jsx("img",{src:l,width:28,height:28,style:{objectFit:"contain"}})}):d.jsx(ie,{name:e||"File",className:Wt.iconWrapper,width:28,height:28,fill:"var(--text-action)"}),d.jsxs("div",{className:Wt.text,children:[d.jsx("div",{className:Wt.title,id:"h5",children:t}),d.jsx("div",{className:Wt.value,id:"h5-bold",children:n})]})]}),a]})]})},XE="_card_8m277_2",KE="_mobile_8m277_15",QE="_email_8m277_19",JE="_balance_8m277_25",eT="_sidebar_8m277_32",tT="_sidebarAntistock_8m277_33",nT="_navList_8m277_68",rT="_navListAntistock_8m277_86",oT="_navItem_8m277_91",iT="_antistockNavItem_8m277_92",aT="_activeNavItem_8m277_116",sT="_antistockActiveNavItem_8m277_121",lT="_antistockInactiveNavItem_8m277_139",cT="_inactiveNavItem_8m277_140",uT="_logoutNavItem_8m277_150",dT="_logoutNavItemAntistock_8m277_159",hT="_logoutNavItemContentAntistock_8m277_173",fT="_iconWrapper_8m277_185",pT="_skeleton_8m277_190",yt={card:XE,mobile:KE,email:QE,balance:JE,sidebar:eT,sidebarAntistock:tT,navList:nT,navListAntistock:rT,navItem:oT,antistockNavItem:iT,activeNavItem:aT,antistockActiveNavItem:sT,antistockInactiveNavItem:lT,inactiveNavItem:cT,logoutNavItem:uT,logoutNavItemAntistock:dT,logoutNavItemContentAntistock:hT,iconWrapper:fT,skeleton:pT},mT=({email:e,balance:t,adaptiveStyles:n})=>d.jsxs("div",{className:ge(yt.card,{[yt.mobile]:n!=="desktop"}),children:[d.jsx("div",{className:yt.email,id:"h5",children:e}),d.jsxs("div",{className:yt.balance,id:"md",children:["Balance: ",t]})]}),gT=[[Ut.Home,"House"],[Ut.Orders,"CurrencyCircleDollar"],[Ut.Rewards,"Medal"],[Ut.Balance,"Wallet"],[Ut.Subscriptions,"CalendarCheck"],[Ut.Tickets,"Question"]],IT=[[Hi.Home,"House"],[Hi.Orders,"CurrencyCircleDollar"],[Hi.Balance,"Wallet"],[Hi.Tickets,"Question"]],$1=({children:e,className:t="",onClick:n})=>{const{isAntistock:o}=mt();return d.jsx("button",{type:"button",className:ge(o?yt.antistockNavItem:yt.navItem,t),onClick:n,children:e})},CT=({adaptiveStyles:e})=>{const{route:t,setRoute:n}=rr(),{isAntistock:o}=mt(),i=o?IT:gT;return d.jsxs("div",{className:ge(yt.navList,{[yt.mobile]:e!=="desktop",[yt.navListAntistock]:o}),children:[i.map(([a,s])=>{const l=a===t;return d.jsxs($1,{onClick:()=>n(a),className:ge(l?o?yt.antistockActiveNavItem:yt.activeNavItem:o?yt.antistockInactiveNavItem:yt.inactiveNavItem),children:[o?null:d.jsx("div",{className:yt.iconWrapper,children:d.jsx(ie,{name:s})}),d.jsx("div",{children:a})]},a)}),d.jsx($1,{className:ge(yt.logoutNavItem,{[yt.logoutNavItemAntistock]:o}),onClick:()=>{o||Gc()},children:o?d.jsxs("div",{className:ge({[yt.logoutNavItemContentAntistock]:o}),onClick:()=>{Gc()},children:[d.jsx("div",{className:yt.iconWrapper,children:d.jsx(ie,{name:"SignOut"})}),d.jsx("div",{children:"Sign Out"})]}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:yt.iconWrapper,children:d.jsx(ie,{name:"SignOut"})}),d.jsx("div",{children:"Sign Out"})]})})]})};var Ge=(e=>(e.New="NEW",e.Pending="PENDING",e.Completed="COMPLETED",e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.FullDeliveryFailure="FULL_DELIVERY_FAILURE",e.PartiallyDelivered="PARTIALLY_DELIVERED",e.Refunded="REFUNDED",e.Failed="FAILED",e))(Ge||{}),at=(e=>(e.Text="TEXT",e.Serial="SERIALS",e.Ebook="EBOOK",e.Link="LINK",e.Download="DOWNLOAD",e.Discord="DISCORD",e.Custom="CUSTOM",e))(at||{}),Or=(e=>(e.RIAL="RIAL",e.AWAITING_PAYMENT="AWAITING_PAYMENT",e.ACTIVE="ACTIVE",e.PAST_DUE="PAST_DUE",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.CHANGED_GATEWAY="CHANGED_GATEWAY",e.REPLACED="REPLACED",e))(Or||{});const Aa=async e=>(await C0(e)).data,w0=async()=>{var n;const t=(await ky()).data;if(t.isEnabled){const o=(n=t==null?void 0:t.topUpSettings)==null?void 0:n.gateways;o&&Aa(o)}return t},qu=async()=>{const t=(await Ay()).data;return{amount:t.realBalance+t.manualBalance,currency:t.currency}};var $i=(e=>(e.ADDED="ADDED",e.REMOVED="REMOVED",e))($i||{}),it=(e=>(e.NotPaid="NOT_PAID",e.Pending="PENDING",e.Paid="PAID",e.Expired="EXPIRED",e.Cancelled="CANCELLED",e))(it||{}),ha=(e=>(e.Balance="BALANCE",e.Product="PRODUCT",e))(ha||{}),zn=(e=>(e.Spend="SPEND_AMOUNT",e.Order="ORDER_COUNT",e.Referral="REFER_FRIEND",e.Review="LEAVE_REVIEW",e))(zn||{});const bT=async()=>(await vy()).data;/*! *****************************************************************************
|
|
73
|
+
`},iS={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function aS(e){let{announcements:t=iS,container:n,hiddenTextDescribedById:o,screenReaderInstructions:i=oS}=e;const{announce:a,announcement:s}=tS(),l=va("DndLiveRegion"),[c,u]=_.useState(!1);if(_.useEffect(()=>{u(!0)},[]),nS(_.useMemo(()=>({onDragStart(f){let{active:g}=f;a(t.onDragStart({active:g}))},onDragMove(f){let{active:g,over:m}=f;t.onDragMove&&a(t.onDragMove({active:g,over:m}))},onDragOver(f){let{active:g,over:m}=f;a(t.onDragOver({active:g,over:m}))},onDragEnd(f){let{active:g,over:m}=f;a(t.onDragEnd({active:g,over:m}))},onDragCancel(f){let{active:g,over:m}=f;a(t.onDragCancel({active:g,over:m}))}}),[a,t])),!c)return null;const h=_.createElement(_.Fragment,null,_.createElement(Jb,{id:o,value:i.draggable}),_.createElement(eS,{id:l,announcement:s}));return n?To.createPortal(h,n):h}var qt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(qt||(qt={}));function Ms(){}function Vp(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function zp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(o=>o!=null),[...t])}const dr=Object.freeze({x:0,y:0});function sS(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function lS(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function cS(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),s=i-o,l=a-n;if(o<i&&n<a){const c=t.width*t.height,u=e.width*e.height,h=s*l,f=h/(c+u-h);return Number(f.toFixed(4))}return 0}const uS=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const i=[];for(const a of o){const{id:s}=a,l=n.get(s);if(l){const c=cS(l,t);c>0&&i.push({id:s,data:{droppableContainer:a,value:c}})}}return i.sort(sS)};function dS(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function $p(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:dr}function hS(e){return function(n){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return i.reduce((s,l)=>({...s,top:s.top+e*l.y,bottom:s.bottom+e*l.y,left:s.left+e*l.x,right:s.right+e*l.x}),{...n})}}const fS=hS(1);function pS(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function mS(e,t,n){const o=pS(t);if(!o)return e;const{scaleX:i,scaleY:a,x:s,y:l}=o,c=e.left-s-(1-i)*parseFloat(n),u=e.top-l-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),h=i?e.width/i:e.width,f=a?e.height/a:e.height;return{width:h,height:f,top:u,right:c+h,bottom:u+f,left:c}}const gS={ignoreTransform:!1};function hi(e,t){t===void 0&&(t=gS);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:h}=Dn(e).getComputedStyle(e);u&&(n=mS(n,u,h))}const{top:o,left:i,width:a,height:s,bottom:l,right:c}=n;return{top:o,left:i,width:a,height:s,bottom:l,right:c}}function v1(e){return hi(e,{ignoreTransform:!0})}function IS(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function CS(e,t){return t===void 0&&(t=Dn(e).getComputedStyle(e)),t.position==="fixed"}function bS(e,t){t===void 0&&(t=Dn(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?n.test(a):!1})}function Vu(e,t){const n=[];function o(i){if(t!=null&&n.length>=t||!i)return n;if(Hu(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!_a(i)||Hp(i)||n.includes(i))return n;const a=Dn(e).getComputedStyle(i);return i!==e&&bS(i,a)&&n.push(i),CS(i,a)?n:o(i.parentNode)}return e?o(e):n}function Wp(e){const[t]=Vu(e,1);return t??null}function Vl(e){return!rl||!e?null:ui(e)?e:Fu(e)?Hu(e)||e===di(e).scrollingElement?window:_a(e)?e:null:null}function qp(e){return ui(e)?e.scrollX:e.scrollLeft}function Gp(e){return ui(e)?e.scrollY:e.scrollTop}function Vc(e){return{x:qp(e),y:Gp(e)}}var nn;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(nn||(nn={}));function Yp(e){return!rl||!e?!1:e===document.scrollingElement}function Zp(e){const t={x:0,y:0},n=Yp(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,s=e.scrollTop>=o.y,l=e.scrollLeft>=o.x;return{isTop:i,isLeft:a,isBottom:s,isRight:l,maxScroll:o,minScroll:t}}const SS={x:.2,y:.2};function yS(e,t,n,o,i){let{top:a,left:s,right:l,bottom:c}=n;o===void 0&&(o=10),i===void 0&&(i=SS);const{isTop:u,isBottom:h,isLeft:f,isRight:g}=Zp(e),m={x:0,y:0},C={x:0,y:0},I={height:t.height*i.y,width:t.width*i.x};return!u&&a<=t.top+I.height?(m.y=nn.Backward,C.y=o*Math.abs((t.top+I.height-a)/I.height)):!h&&c>=t.bottom-I.height&&(m.y=nn.Forward,C.y=o*Math.abs((t.bottom-I.height-c)/I.height)),!g&&l>=t.right-I.width?(m.x=nn.Forward,C.x=o*Math.abs((t.right-I.width-l)/I.width)):!f&&s<=t.left+I.width&&(m.x=nn.Backward,C.x=o*Math.abs((t.left+I.width-s)/I.width)),{direction:m,speed:C}}function ES(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:s}=window;return{top:0,left:0,right:a,bottom:s,width:a,height:s}}const{top:t,left:n,right:o,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Xp(e){return e.reduce((t,n)=>Ko(t,Vc(n)),dr)}function TS(e){return e.reduce((t,n)=>t+qp(n),0)}function xS(e){return e.reduce((t,n)=>t+Gp(n),0)}function _S(e,t){if(t===void 0&&(t=hi),!e)return;const{top:n,left:o,bottom:i,right:a}=t(e);Wp(e)&&(i<=0||a<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const wS=[["x",["left","right"],TS],["y",["top","bottom"],xS]];class zu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=Vu(n),i=Xp(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,s,l]of wS)for(const c of s)Object.defineProperty(this,c,{get:()=>{const u=l(o),h=i[a]-u;return this.rect[c]+h},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Gi{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...n)})},this.target=t}add(t,n,o){var i;(i=this.target)==null||i.addEventListener(t,n,o),this.listeners.push([t,n,o])}}function vS(e){const{EventTarget:t}=Dn(e);return e instanceof t?e:di(e)}function zl(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t?o>t.y:!1}var Kn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Kn||(Kn={}));function A1(e){e.preventDefault()}function AS(e){e.stopPropagation()}var Qe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Qe||(Qe={}));const Kp={start:[Qe.Space,Qe.Enter],cancel:[Qe.Esc],end:[Qe.Space,Qe.Enter,Qe.Tab]},kS=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Qe.Right:return{...n,x:n.x+25};case Qe.Left:return{...n,x:n.x-25};case Qe.Down:return{...n,y:n.y+25};case Qe.Up:return{...n,y:n.y-25}}};class Qp{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Gi(di(n)),this.windowListeners=new Gi(Dn(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kn.Resize,this.handleCancel),this.windowListeners.add(Kn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Kn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,o=t.node.current;o&&_S(o),n(dr)}handleKeyDown(t){if(Uu(t)){const{active:n,context:o,options:i}=this.props,{keyboardCodes:a=Kp,coordinateGetter:s=kS,scrollBehavior:l="smooth"}=i,{code:c}=t;if(a.end.includes(c)){this.handleEnd(t);return}if(a.cancel.includes(c)){this.handleCancel(t);return}const{collisionRect:u}=o.current,h=u?{x:u.left,y:u.top}:dr;this.referenceCoordinates||(this.referenceCoordinates=h);const f=s(t,{active:n,context:o.current,currentCoordinates:h});if(f){const g=Os(f,h),m={x:0,y:0},{scrollableAncestors:C}=o.current;for(const I of C){const b=t.code,{isTop:S,isRight:y,isLeft:T,isBottom:k,maxScroll:A,minScroll:P}=Zp(I),E=ES(I),M={x:Math.min(b===Qe.Right?E.right-E.width/2:E.right,Math.max(b===Qe.Right?E.left:E.left+E.width/2,f.x)),y:Math.min(b===Qe.Down?E.bottom-E.height/2:E.bottom,Math.max(b===Qe.Down?E.top:E.top+E.height/2,f.y))},B=b===Qe.Right&&!y||b===Qe.Left&&!T,w=b===Qe.Down&&!k||b===Qe.Up&&!S;if(B&&M.x!==f.x){const V=I.scrollLeft+g.x,H=b===Qe.Right&&V<=A.x||b===Qe.Left&&V>=P.x;if(H&&!g.y){I.scrollTo({left:V,behavior:l});return}H?m.x=I.scrollLeft-V:m.x=b===Qe.Right?I.scrollLeft-A.x:I.scrollLeft-P.x,m.x&&I.scrollBy({left:-m.x,behavior:l});break}else if(w&&M.y!==f.y){const V=I.scrollTop+g.y,H=b===Qe.Down&&V<=A.y||b===Qe.Up&&V>=P.y;if(H&&!g.x){I.scrollTo({top:V,behavior:l});return}H?m.y=I.scrollTop-V:m.y=b===Qe.Down?I.scrollTop-A.y:I.scrollTop-P.y,m.y&&I.scrollBy({top:-m.y,behavior:l});break}}this.handleMove(t,Ko(Os(f,this.referenceCoordinates),m))}}}handleMove(t,n){const{onMove:o}=this.props;t.preventDefault(),o(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Qp.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Kp,onActivation:i}=t,{active:a}=n;const{code:s}=e.nativeEvent;if(o.start.includes(s)){const l=a.activatorNode.current;return l&&e.target!==l?!1:(e.preventDefault(),i==null||i({event:e.nativeEvent}),!0)}return!1}}];function k1(e){return!!(e&&"distance"in e)}function L1(e){return!!(e&&"delay"in e)}class $u{constructor(t,n,o){var i;o===void 0&&(o=vS(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:s}=a;this.props=t,this.events=n,this.document=di(s),this.documentListeners=new Gi(this.document),this.listeners=new Gi(o),this.windowListeners=new Gi(Dn(s)),this.initialCoordinates=(i=Uc(a))!=null?i:dr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Kn.Resize,this.handleCancel),this.windowListeners.add(Kn.DragStart,A1),this.windowListeners.add(Kn.VisibilityChange,this.handleCancel),this.windowListeners.add(Kn.ContextMenu,A1),this.documentListeners.add(Kn.Keydown,this.handleKeydown),n){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(L1(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(k1(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:o,onPending:i}=this.props;i(o,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Kn.Click,AS,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kn.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:o,initialCoordinates:i,props:a}=this,{onMove:s,options:{activationConstraint:l}}=a;if(!i)return;const c=(n=Uc(t))!=null?n:dr,u=Os(i,c);if(!o&&l){if(k1(l)){if(l.tolerance!=null&&zl(u,l.tolerance))return this.handleCancel();if(zl(u,l.distance))return this.handleStart()}if(L1(l)&&zl(u,l.tolerance))return this.handleCancel();this.handlePending(l,u);return}t.cancelable&&t.preventDefault(),s(c)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Qe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const LS={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class ol extends $u{constructor(t){const{event:n}=t,o=di(n.target);super(t,LS,o)}}ol.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!n.isPrimary||n.button!==0?!1:(o==null||o({event:n}),!0)}}];const NS={move:{name:"mousemove"},end:{name:"mouseup"}};var zc;(function(e){e[e.RightClick=2]="RightClick"})(zc||(zc={}));class PS extends $u{constructor(t){super(t,NS,di(t.event.target))}}PS.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button===zc.RightClick?!1:(o==null||o({event:n}),!0)}}];const $l={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class RS extends $u{constructor(t){super(t,$l)}static setup(){return window.addEventListener($l.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener($l.move.name,t)};function t(){}}}RS.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:i}=n;return i.length>1?!1:(o==null||o({event:n}),!0)}}];var Yi;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Yi||(Yi={}));var Bs;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Bs||(Bs={}));function DS(e){let{acceleration:t,activator:n=Yi.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:s=5,order:l=Bs.TreeOrder,pointerCoordinates:c,scrollableAncestors:u,scrollableAncestorRects:h,delta:f,threshold:g}=e;const m=MS({delta:f,disabled:!a}),[C,I]=Yb(),b=_.useRef({x:0,y:0}),S=_.useRef({x:0,y:0}),y=_.useMemo(()=>{switch(n){case Yi.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case Yi.DraggableRect:return i}},[n,i,c]),T=_.useRef(null),k=_.useCallback(()=>{const P=T.current;if(!P)return;const E=b.current.x*S.current.x,M=b.current.y*S.current.y;P.scrollBy(E,M)},[]),A=_.useMemo(()=>l===Bs.TreeOrder?[...u].reverse():u,[l,u]);_.useEffect(()=>{if(!a||!u.length||!y){I();return}for(const P of A){if((o==null?void 0:o(P))===!1)continue;const E=u.indexOf(P),M=h[E];if(!M)continue;const{direction:B,speed:w}=yS(P,M,y,t,g);for(const V of["x","y"])m[V][B[V]]||(w[V]=0,B[V]=0);if(w.x>0||w.y>0){I(),T.current=P,C(k,s),b.current=w,S.current=B;return}}b.current={x:0,y:0},S.current={x:0,y:0},I()},[t,k,o,I,a,s,JSON.stringify(y),JSON.stringify(m),C,u,A,h,JSON.stringify(g)])}const OS={x:{[nn.Backward]:!1,[nn.Forward]:!1},y:{[nn.Backward]:!1,[nn.Forward]:!1}};function MS(e){let{delta:t,disabled:n}=e;const o=jc(t);return wa(i=>{if(n||!o||!i)return OS;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[nn.Backward]:i.x[nn.Backward]||a.x===-1,[nn.Forward]:i.x[nn.Forward]||a.x===1},y:{[nn.Backward]:i.y[nn.Backward]||a.y===-1,[nn.Forward]:i.y[nn.Forward]||a.y===1}}},[n,t,o])}function BS(e,t){const n=t!=null?e.get(t):void 0,o=n?n.node.current:null;return wa(i=>{var a;return t==null?null:(a=o??i)!=null?a:null},[o,t])}function FS(e,t){return _.useMemo(()=>e.reduce((n,o)=>{const{sensor:i}=o,a=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,o)}));return[...n,...a]},[]),[e,t])}var da;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(da||(da={}));var $c;(function(e){e.Optimized="optimized"})($c||($c={}));const N1=new Map;function HS(e,t){let{dragging:n,dependencies:o,config:i}=t;const[a,s]=_.useState(null),{frequency:l,measure:c,strategy:u}=i,h=_.useRef(e),f=b(),g=ua(f),m=_.useCallback(function(S){S===void 0&&(S=[]),!g.current&&s(y=>y===null?S:y.concat(S.filter(T=>!y.includes(T))))},[g]),C=_.useRef(null),I=wa(S=>{if(f&&!n)return N1;if(!S||S===N1||h.current!==e||a!=null){const y=new Map;for(let T of e){if(!T)continue;if(a&&a.length>0&&!a.includes(T.id)&&T.rect.current){y.set(T.id,T.rect.current);continue}const k=T.node.current,A=k?new zu(c(k),k):null;T.rect.current=A,A&&y.set(T.id,A)}return y}return S},[e,a,n,f,c]);return _.useEffect(()=>{h.current=e},[e]),_.useEffect(()=>{f||m()},[n,f]),_.useEffect(()=>{a&&a.length>0&&s(null)},[JSON.stringify(a)]),_.useEffect(()=>{f||typeof l!="number"||C.current!==null||(C.current=setTimeout(()=>{m(),C.current=null},l))},[l,f,m,...o]),{droppableRects:I,measureDroppableContainers:m,measuringScheduled:a!=null};function b(){switch(u){case da.Always:return!1;case da.BeforeDragging:return n;default:return!n}}}function Jp(e,t){return wa(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function jS(e,t){return Jp(e,t)}function US(e){let{callback:t,disabled:n}=e;const o=ju(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(o)},[o,n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function il(e){let{callback:t,disabled:n}=e;const o=ju(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(o)},[n]);return _.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function VS(e){return new zu(hi(e),e)}function P1(e,t,n){t===void 0&&(t=VS);const[o,i]=_.useState(null);function a(){i(c=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=c??n)!=null?u:null}const h=t(e);return JSON.stringify(c)===JSON.stringify(h)?c:h})}const s=US({callback(c){if(e)for(const u of c){const{type:h,target:f}=u;if(h==="childList"&&f instanceof HTMLElement&&f.contains(e)){a();break}}}}),l=il({callback:a});return wr(()=>{a(),e?(l==null||l.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(l==null||l.disconnect(),s==null||s.disconnect())},[e]),o}function zS(e){const t=Jp(e);return $p(e,t)}const R1=[];function $S(e){const t=_.useRef(e),n=wa(o=>e?o&&o!==R1&&e&&t.current&&e.parentNode===t.current.parentNode?o:Vu(e):R1,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function WS(e){const[t,n]=_.useState(null),o=_.useRef(e),i=_.useCallback(a=>{const s=Vl(a.target);s&&n(l=>l?(l.set(s,Vc(s)),new Map(l)):null)},[]);return _.useEffect(()=>{const a=o.current;if(e!==a){s(a);const l=e.map(c=>{const u=Vl(c);return u?(u.addEventListener("scroll",i,{passive:!0}),[u,Vc(u)]):null}).filter(c=>c!=null);n(l.length?new Map(l):null),o.current=e}return()=>{s(e),s(a)};function s(l){l.forEach(c=>{const u=Vl(c);u==null||u.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,s)=>Ko(a,s),dr):Xp(e):dr,[e,t])}function D1(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const o=e!==dr;o&&!n.current&&(n.current=e),!o&&n.current&&(n.current=null)},[e]),n.current?Os(e,n.current):dr}function qS(e){_.useEffect(()=>{if(!rl)return;const t=e.map(n=>{let{sensor:o}=n;return o.setup==null?void 0:o.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function GS(e,t){return _.useMemo(()=>e.reduce((n,o)=>{let{eventName:i,handler:a}=o;return n[i]=s=>{a(s,t)},n},{}),[e,t])}function e0(e){return _.useMemo(()=>e?IS(e):null,[e])}const O1=[];function YS(e,t){t===void 0&&(t=hi);const[n]=e,o=e0(n?Dn(n):null),[i,a]=_.useState(O1);function s(){a(()=>e.length?e.map(c=>Yp(c)?o:new zu(t(c),c)):O1)}const l=il({callback:s});return wr(()=>{l==null||l.disconnect(),s(),e.forEach(c=>l==null?void 0:l.observe(c))},[e]),i}function ZS(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return _a(t)?t:e}function XS(e){let{measure:t}=e;const[n,o]=_.useState(null),i=_.useCallback(u=>{for(const{target:h}of u)if(_a(h)){o(f=>{const g=t(h);return f?{...f,width:g.width,height:g.height}:g});break}},[t]),a=il({callback:i}),s=_.useCallback(u=>{const h=ZS(u);a==null||a.disconnect(),h&&(a==null||a.observe(h)),o(h?t(h):null)},[t,a]),[l,c]=Ds(s);return _.useMemo(()=>({nodeRef:l,rect:n,setRef:c}),[n,l,c])}const KS=[{sensor:ol,options:{}},{sensor:Qp,options:{}}],QS={current:{}},Cs={draggable:{measure:v1},droppable:{measure:v1,strategy:da.WhileDragging,frequency:$c.Optimized},dragOverlay:{measure:hi}};class Zi extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,o;return(n=(o=this.get(t))==null?void 0:o.node.current)!=null?n:void 0}}const JS={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Zi,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Ms},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Cs,measureDroppableContainers:Ms,windowRect:null,measuringScheduled:!1},e7={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Ms,draggableNodes:new Map,over:null,measureDroppableContainers:Ms},al=_.createContext(e7),t0=_.createContext(JS);function t7(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Zi}}}function n7(e,t){switch(t.type){case qt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case qt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case qt.DragEnd:case qt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case qt.RegisterDroppable:{const{element:n}=t,{id:o}=n,i=new Zi(e.droppable.containers);return i.set(o,n),{...e,droppable:{...e.droppable,containers:i}}}case qt.SetDroppableDisabled:{const{id:n,key:o,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||o!==a.key)return e;const s=new Zi(e.droppable.containers);return s.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case qt.UnregisterDroppable:{const{id:n,key:o}=t,i=e.droppable.containers.get(n);if(!i||o!==i.key)return e;const a=new Zi(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function r7(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:i}=_.useContext(al),a=jc(o),s=jc(n==null?void 0:n.id);return _.useEffect(()=>{if(!t&&!o&&a&&s!=null){if(!Uu(a)||document.activeElement===a.target)return;const l=i.get(s);if(!l)return;const{activatorNode:c,node:u}=l;if(!c.current&&!u.current)return;requestAnimationFrame(()=>{for(const h of[c.current,u.current]){if(!h)continue;const f=Kb(h);if(f){f.focus();break}}})}},[o,t,i,s,a]),null}function o7(e,t){let{transform:n,...o}=t;return e!=null&&e.length?e.reduce((i,a)=>a({transform:i,...o}),n):n}function i7(e){return _.useMemo(()=>({draggable:{...Cs.draggable,...e==null?void 0:e.draggable},droppable:{...Cs.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Cs.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function a7(e){let{activeNode:t,measure:n,initialRect:o,config:i=!0}=e;const a=_.useRef(!1),{x:s,y:l}=typeof i=="boolean"?{x:i,y:i}:i;wr(()=>{if(!s&&!l||!t){a.current=!1;return}if(a.current||!o)return;const u=t==null?void 0:t.node.current;if(!u||u.isConnected===!1)return;const h=n(u),f=$p(h,o);if(s||(f.x=0),l||(f.y=0),a.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const g=Wp(u);g&&g.scrollBy({top:f.y,left:f.x})}},[t,s,l,o,n])}const n0=_.createContext({...dr,scaleX:1,scaleY:1});var eo;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(eo||(eo={}));const r0=_.memo(function(t){var n,o,i,a;let{id:s,accessibility:l,autoScroll:c=!0,children:u,sensors:h=KS,collisionDetection:f=uS,measuring:g,modifiers:m,...C}=t;const I=_.useReducer(n7,void 0,t7),[b,S]=I,[y,T]=rS(),[k,A]=_.useState(eo.Uninitialized),P=k===eo.Initialized,{draggable:{active:E,nodes:M,translate:B},droppable:{containers:w}}=b,V=E!=null?M.get(E):null,H=_.useRef({initial:null,translated:null}),X=_.useMemo(()=>{var Ct;return E!=null?{id:E,data:(Ct=V==null?void 0:V.data)!=null?Ct:QS,rect:H}:null},[E,V]),W=_.useRef(null),[se,Ce]=_.useState(null),[be,ve]=_.useState(null),Le=ua(C,Object.values(C)),x=va("DndDescribedBy",s),ne=_.useMemo(()=>w.getEnabled(),[w]),pe=i7(g),{droppableRects:L,measureDroppableContainers:Z,measuringScheduled:le}=HS(ne,{dragging:P,dependencies:[B.x,B.y],config:pe.droppable}),ee=BS(M,E),Ie=_.useMemo(()=>be?Uc(be):null,[be]),Se=Nr(),ae=jS(ee,pe.draggable.measure);a7({activeNode:E!=null?M.get(E):null,config:Se.layoutShiftCompensation,initialRect:ae,measure:pe.draggable.measure});const ce=P1(ee,pe.draggable.measure,ae),Ue=P1(ee?ee.parentElement:null),Q=_.useRef({activatorEvent:null,active:null,activeNode:ee,collisionRect:null,collisions:null,droppableRects:L,draggableNodes:M,draggingNode:null,draggingNodeRect:null,droppableContainers:w,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ve=w.getNodeFor((n=Q.current.over)==null?void 0:n.id),Te=XS({measure:pe.dragOverlay.measure}),we=(o=Te.nodeRef.current)!=null?o:ee,ze=P?(i=Te.rect)!=null?i:ce:null,Tt=!!(Te.nodeRef.current&&Te.rect),wt=zS(Tt?null:ce),$e=e0(we?Dn(we):null),nt=$S(P?Ve??ee:null),Tn=YS(nt),gt=o7(m,{transform:{x:B.x-wt.x,y:B.y-wt.y,scaleX:1,scaleY:1},activatorEvent:be,active:X,activeNodeRect:ce,containerNodeRect:Ue,draggingNodeRect:ze,over:Q.current.over,overlayNodeRect:Te.rect,scrollableAncestors:nt,scrollableAncestorRects:Tn,windowRect:$e}),dn=Ie?Ko(Ie,B):null,It=WS(nt),Lt=D1(It),q=D1(It,[ce]),oe=Ko(gt,Lt),_e=ze?fS(ze,gt):null,Ae=X&&_e?f({active:X,collisionRect:_e,droppableRects:L,droppableContainers:ne,pointerCoordinates:dn}):null,We=lS(Ae,"id"),[rt,hn]=_.useState(null),Je=Tt?gt:Ko(gt,q),fn=dS(Je,(a=rt==null?void 0:rt.rect)!=null?a:null,ce),pn=_.useRef(null),Nt=_.useCallback((Ct,Yt)=>{let{sensor:Zt,options:Mn}=Yt;if(W.current==null)return;const on=M.get(W.current);if(!on)return;const Pt=Ct.nativeEvent,Xt=new Zt({active:W.current,activeNode:on,event:Pt,options:Mn,context:Q,onAbort(Rt){if(!M.get(Rt))return;const{onDragAbort:F}=Le.current,$={id:Rt};F==null||F($),y({type:"onDragAbort",event:$})},onPending(Rt,O,F,$){if(!M.get(Rt))return;const{onDragPending:me}=Le.current,xe={id:Rt,constraint:O,initialCoordinates:F,offset:$};me==null||me(xe),y({type:"onDragPending",event:xe})},onStart(Rt){const O=W.current;if(O==null)return;const F=M.get(O);if(!F)return;const{onDragStart:$}=Le.current,te={activatorEvent:Pt,active:{id:O,data:F.data,rect:H}};To.unstable_batchedUpdates(()=>{$==null||$(te),A(eo.Initializing),S({type:qt.DragStart,initialCoordinates:Rt,active:O}),y({type:"onDragStart",event:te}),Ce(pn.current),ve(Pt)})},onMove(Rt){S({type:qt.DragMove,coordinates:Rt})},onEnd:gr(qt.DragEnd),onCancel:gr(qt.DragCancel)});pn.current=Xt;function gr(Rt){return async function(){const{active:F,collisions:$,over:te,scrollAdjustedTranslate:me}=Q.current;let xe=null;if(F&&me){const{cancelDrop:N}=Le.current;xe={activatorEvent:Pt,active:F,collisions:$,delta:me,over:te},Rt===qt.DragEnd&&typeof N=="function"&&await Promise.resolve(N(xe))&&(Rt=qt.DragCancel)}W.current=null,To.unstable_batchedUpdates(()=>{S({type:Rt}),A(eo.Uninitialized),hn(null),Ce(null),ve(null),pn.current=null;const N=Rt===qt.DragEnd?"onDragEnd":"onDragCancel";if(xe){const U=Le.current[N];U==null||U(xe),y({type:N,event:xe})}})}}},[M]),Gn=_.useCallback((Ct,Yt)=>(Zt,Mn)=>{const on=Zt.nativeEvent,Pt=M.get(Mn);if(W.current!==null||!Pt||on.dndKit||on.defaultPrevented)return;const Xt={active:Pt};Ct(Zt,Yt.options,Xt)===!0&&(on.dndKit={capturedBy:Yt.sensor},W.current=Mn,Nt(Zt,Yt))},[M,Nt]),zt=FS(h,Gn);qS(h),wr(()=>{ce&&k===eo.Initializing&&A(eo.Initialized)},[ce,k]),_.useEffect(()=>{const{onDragMove:Ct}=Le.current,{active:Yt,activatorEvent:Zt,collisions:Mn,over:on}=Q.current;if(!Yt||!Zt)return;const Pt={active:Yt,activatorEvent:Zt,collisions:Mn,delta:{x:oe.x,y:oe.y},over:on};To.unstable_batchedUpdates(()=>{Ct==null||Ct(Pt),y({type:"onDragMove",event:Pt})})},[oe.x,oe.y]),_.useEffect(()=>{const{active:Ct,activatorEvent:Yt,collisions:Zt,droppableContainers:Mn,scrollAdjustedTranslate:on}=Q.current;if(!Ct||W.current==null||!Yt||!on)return;const{onDragOver:Pt}=Le.current,Xt=Mn.get(We),gr=Xt&&Xt.rect.current?{id:Xt.id,rect:Xt.rect.current,data:Xt.data,disabled:Xt.disabled}:null,Rt={active:Ct,activatorEvent:Yt,collisions:Zt,delta:{x:on.x,y:on.y},over:gr};To.unstable_batchedUpdates(()=>{hn(gr),Pt==null||Pt(Rt),y({type:"onDragOver",event:Rt})})},[We]),wr(()=>{Q.current={activatorEvent:be,active:X,activeNode:ee,collisionRect:_e,collisions:Ae,droppableRects:L,draggableNodes:M,draggingNode:we,draggingNodeRect:ze,droppableContainers:w,over:rt,scrollableAncestors:nt,scrollAdjustedTranslate:oe},H.current={initial:ze,translated:_e}},[X,ee,Ae,_e,M,we,ze,L,w,rt,nt,oe]),DS({...Se,delta:B,draggingRect:_e,pointerCoordinates:dn,scrollableAncestors:nt,scrollableAncestorRects:Tn});const Lr=_.useMemo(()=>({active:X,activeNode:ee,activeNodeRect:ce,activatorEvent:be,collisions:Ae,containerNodeRect:Ue,dragOverlay:Te,draggableNodes:M,droppableContainers:w,droppableRects:L,over:rt,measureDroppableContainers:Z,scrollableAncestors:nt,scrollableAncestorRects:Tn,measuringConfiguration:pe,measuringScheduled:le,windowRect:$e}),[X,ee,ce,be,Ae,Ue,Te,M,w,L,rt,Z,nt,Tn,pe,le,$e]),ir=_.useMemo(()=>({activatorEvent:be,activators:zt,active:X,activeNodeRect:ce,ariaDescribedById:{draggable:x},dispatch:S,draggableNodes:M,over:rt,measureDroppableContainers:Z}),[be,zt,X,ce,S,x,M,rt,Z]);return _.createElement(Up.Provider,{value:T},_.createElement(al.Provider,{value:ir},_.createElement(t0.Provider,{value:Lr},_.createElement(n0.Provider,{value:fn},u)),_.createElement(r7,{disabled:(l==null?void 0:l.restoreFocus)===!1})),_.createElement(aS,{...l,hiddenTextDescribedById:x}));function Nr(){const Ct=(se==null?void 0:se.autoScrollEnabled)===!1,Yt=typeof c=="object"?c.enabled===!1:c===!1,Zt=P&&!Ct&&!Yt;return typeof c=="object"?{...c,enabled:Zt}:{enabled:Zt}}}),s7=_.createContext(null),M1="button",l7="Draggable";function c7(e){let{id:t,data:n,disabled:o=!1,attributes:i}=e;const a=va(l7),{activators:s,activatorEvent:l,active:c,activeNodeRect:u,ariaDescribedById:h,draggableNodes:f,over:g}=_.useContext(al),{role:m=M1,roleDescription:C="draggable",tabIndex:I=0}=i??{},b=(c==null?void 0:c.id)===t,S=_.useContext(b?n0:s7),[y,T]=Ds(),[k,A]=Ds(),P=GS(s,t),E=ua(n);wr(()=>(f.set(t,{id:t,key:a,node:y,activatorNode:k,data:E}),()=>{const B=f.get(t);B&&B.key===a&&f.delete(t)}),[f,t]);const M=_.useMemo(()=>({role:m,tabIndex:I,"aria-disabled":o,"aria-pressed":b&&m===M1?!0:void 0,"aria-roledescription":C,"aria-describedby":h.draggable}),[o,m,I,b,C,h.draggable]);return{active:c,activatorEvent:l,activeNodeRect:u,attributes:M,isDragging:b,listeners:o?void 0:P,node:y,over:g,setNodeRef:T,setActivatorNodeRef:A,transform:S}}function u7(){return _.useContext(t0)}const d7="Droppable",h7={timeout:25};function f7(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:i}=e;const a=va(d7),{active:s,dispatch:l,over:c,measureDroppableContainers:u}=_.useContext(al),h=_.useRef({disabled:n}),f=_.useRef(!1),g=_.useRef(null),m=_.useRef(null),{disabled:C,updateMeasurementsFor:I,timeout:b}={...h7,...i},S=ua(I??o),y=_.useCallback(()=>{if(!f.current){f.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(S.current)?S.current:[S.current]),m.current=null},b)},[b]),T=il({callback:y,disabled:C||!s}),k=_.useCallback((M,B)=>{T&&(B&&(T.unobserve(B),f.current=!1),M&&T.observe(M))},[T]),[A,P]=Ds(k),E=ua(t);return _.useEffect(()=>{!T||!A.current||(T.disconnect(),f.current=!1,T.observe(A.current))},[A,T]),_.useEffect(()=>(l({type:qt.RegisterDroppable,element:{id:o,key:a,disabled:n,node:A,rect:g,data:E}}),()=>l({type:qt.UnregisterDroppable,key:a,id:o})),[o]),_.useEffect(()=>{n!==h.current.disabled&&(l({type:qt.SetDroppableDisabled,id:o,key:a,disabled:n}),h.current.disabled=n)},[o,a,n,l]),{active:s,rect:g,isOver:(c==null?void 0:c.id)===o,node:A,over:c,setNodeRef:P}}function o0(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function p7(e,t){return e.reduce((n,o,i)=>{const a=t.get(o);return a&&(n[i]=a),n},Array(e.length))}function Ga(e){return e!==null&&e>=0}function m7(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function g7(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const i0=e=>{let{rects:t,activeIndex:n,overIndex:o,index:i}=e;const a=o0(t,o,n),s=t[i],l=a[i];return!l||!s?null:{x:l.left-s.left,y:l.top-s.top,scaleX:l.width/s.width,scaleY:l.height/s.height}},Ya={scaleX:1,scaleY:1},a0=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:i,rects:a,overIndex:s}=e;const l=(t=a[n])!=null?t:o;if(!l)return null;if(i===n){const u=a[s];return u?{x:0,y:n<s?u.top+u.height-(l.top+l.height):u.top-l.top,...Ya}:null}const c=I7(a,i,n);return i>n&&i<=s?{x:0,y:-l.height-c,...Ya}:i<n&&i>=s?{x:0,y:l.height+c,...Ya}:{x:0,y:0,...Ya}};function I7(e,t,n){const o=e[t],i=e[t-1],a=e[t+1];return o?n<t?i?o.top-(i.top+i.height):a?a.top-(o.top+o.height):0:a?a.top-(o.top+o.height):i?o.top-(i.top+i.height):0:0}const s0="Sortable",l0=_.createContext({activeIndex:-1,containerId:s0,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:i0,disabled:{draggable:!1,droppable:!1}});function c0(e){let{children:t,id:n,items:o,strategy:i=i0,disabled:a=!1}=e;const{active:s,dragOverlay:l,droppableRects:c,over:u,measureDroppableContainers:h}=u7(),f=va(s0,n),g=l.rect!==null,m=_.useMemo(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),C=s!=null,I=s?m.indexOf(s.id):-1,b=u?m.indexOf(u.id):-1,S=_.useRef(m),y=!m7(m,S.current),T=b!==-1&&I===-1||y,k=g7(a);wr(()=>{y&&C&&h(m)},[y,m,C,h]),_.useEffect(()=>{S.current=m},[m]);const A=_.useMemo(()=>({activeIndex:I,containerId:f,disabled:k,disableTransforms:T,items:m,overIndex:b,useDragOverlay:g,sortedRects:p7(m,c),strategy:i}),[I,f,k.draggable,k.droppable,T,m,b,c,g,i]);return _.createElement(l0.Provider,{value:A},t)}const C7=e=>{let{id:t,items:n,activeIndex:o,overIndex:i}=e;return o0(n,o,i).indexOf(t)},b7=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:i,items:a,newIndex:s,previousItems:l,previousContainerId:c,transition:u}=e;return!u||!o||l!==a&&i===s?!1:n?!0:s!==i&&t===c},S7={duration:200,easing:"ease"},u0="transform",y7=ni.Transition.toString({property:u0,duration:0,easing:"linear"}),E7={roleDescription:"sortable"};function T7(e){let{disabled:t,index:n,node:o,rect:i}=e;const[a,s]=_.useState(null),l=_.useRef(n);return wr(()=>{if(!t&&n!==l.current&&o.current){const c=i.current;if(c){const u=hi(o.current,{ignoreTransform:!0}),h={x:c.left-u.left,y:c.top-u.top,scaleX:c.width/u.width,scaleY:c.height/u.height};(h.x||h.y)&&s(h)}}n!==l.current&&(l.current=n)},[t,n,o,i]),_.useEffect(()=>{a&&s(null)},[a]),a}function d0(e){let{animateLayoutChanges:t=b7,attributes:n,disabled:o,data:i,getNewIndex:a=C7,id:s,strategy:l,resizeObserverConfig:c,transition:u=S7}=e;const{items:h,containerId:f,activeIndex:g,disabled:m,disableTransforms:C,sortedRects:I,overIndex:b,useDragOverlay:S,strategy:y}=_.useContext(l0),T=x7(o,m),k=h.indexOf(s),A=_.useMemo(()=>({sortable:{containerId:f,index:k,items:h},...i}),[f,i,k,h]),P=_.useMemo(()=>h.slice(h.indexOf(s)),[h,s]),{rect:E,node:M,isOver:B,setNodeRef:w}=f7({id:s,data:A,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...c}}),{active:V,activatorEvent:H,activeNodeRect:X,attributes:W,setNodeRef:se,listeners:Ce,isDragging:be,over:ve,setActivatorNodeRef:Le,transform:x}=c7({id:s,data:A,attributes:{...E7,...n},disabled:T.draggable}),ne=Gb(w,se),pe=!!V,L=pe&&!C&&Ga(g)&&Ga(b),Z=!S&&be,le=Z&&L?x:null,Ie=L?le??(l??y)({rects:I,activeNodeRect:X,activeIndex:g,overIndex:b,index:k}):null,Se=Ga(g)&&Ga(b)?a({id:s,items:h,activeIndex:g,overIndex:b}):k,ae=V==null?void 0:V.id,ce=_.useRef({activeId:ae,items:h,newIndex:Se,containerId:f}),Ue=h!==ce.current.items,Q=t({active:V,containerId:f,isDragging:be,isSorting:pe,id:s,index:k,items:h,newIndex:ce.current.newIndex,previousItems:ce.current.items,previousContainerId:ce.current.containerId,transition:u,wasDragging:ce.current.activeId!=null}),Ve=T7({disabled:!Q,index:k,node:M,rect:E});return _.useEffect(()=>{pe&&ce.current.newIndex!==Se&&(ce.current.newIndex=Se),f!==ce.current.containerId&&(ce.current.containerId=f),h!==ce.current.items&&(ce.current.items=h)},[pe,Se,f,h]),_.useEffect(()=>{if(ae===ce.current.activeId)return;if(ae!=null&&ce.current.activeId==null){ce.current.activeId=ae;return}const we=setTimeout(()=>{ce.current.activeId=ae},50);return()=>clearTimeout(we)},[ae]),{active:V,activeIndex:g,attributes:W,data:A,rect:E,index:k,newIndex:Se,items:h,isOver:B,isSorting:pe,isDragging:be,listeners:Ce,node:M,overIndex:b,over:ve,setNodeRef:ne,setActivatorNodeRef:Le,setDroppableNodeRef:w,setDraggableNodeRef:se,transform:Ve??Ie,transition:Te()};function Te(){if(Ve||Ue&&ce.current.newIndex===k)return y7;if(!(Z&&!Uu(H)||!u)&&(pe||Q))return ni.Transition.toString({...u,property:u0})}}function x7(e,t){var n,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(o=e==null?void 0:e.droppable)!=null?o:t.droppable}}Qe.Down,Qe.Right,Qe.Up,Qe.Left;function _7({product:e,children:t}){const{attributes:n,listeners:o,setNodeRef:i,transform:a,transition:s,isDragging:l}=d0({id:e.id}),c={transform:ni.Transform.toString(a),transition:s};return d.jsx("div",{ref:i,style:c,className:`${Ot.product} ${l?Ot.dragging:""}`,...n,...o,children:t})}const h0=e=>{const{isActiveItems:t,setIsActiveItems:n,items:o,setItems:i,other:a,title:s,subtitle:l,editable:c=!0,draggable:u=!1,withImage:h=!1,deletable:f=!0,addable:g=!0,itemsType:m,itemsPlaceholder:C="",itemsOptions:I,hasRangeSelector:b=!1,rangeSelectorOptions:S,modalOptions:y,addableOptions:T={},limit:k,autoInterval:A,tip:P,aspectRatio:E,setAspectRatio:M}=e,[B,w]=_.useState(null),[V,H]=_.useState({top:0,left:0}),[X,W]=_.useState(null),se=_.useRef(null),[Ce,be]=_.useState(!1),ve=zp(Vp(ol,{activationConstraint:{distance:5}}));_.useEffect(()=>{if(B){const Z=[...o].map(le=>le.id===B.id?B:le);i(Z)}},[B]),_.useEffect(()=>{if(se.current&&X){const Z=se.current.getBoundingClientRect().height,le=window.innerHeight;let ee=X.top;ee+Z>le+window.scrollY-200&&(ee=le+window.scrollY-Z-200),ee<0&&(ee=10),H({top:ee-30,left:X.left})}},[se.current,X]);const Le=(Z,le)=>{Z.stopPropagation();const ee=Z.target.getBoundingClientRect();W({top:ee.top+window.scrollY-70,left:ee.left-(g?30:65)}),w(le),be(!0)},x=(Z,le)=>{const ee=[...o],Ie={...Z,id:Math.random().toString(36).substr(2,9)};ee.splice(le+1,0,Ie),i(ee)};function ne(Z){if(h)return Z?d.jsx("img",{src:`https://imagedelivery.net/${Z[0]}/w=1000`,alt:"image",width:16,height:16}):d.jsx(ie,{name:"Image",width:16,height:16,fill:"#757575"})}const pe=Z=>{const{active:le,over:ee}=Z;if(ee&&le.id!==ee.id){const Ie=o.findIndex(ae=>ae.id===le.id),Se=o.findIndex(ae=>ae.id===ee.id);if(Ie!==-1&&Se!==-1){const ae=[...o],[ce]=ae.splice(Ie,1);ae.splice(Se,0,ce),i(ae)}}},L=(Z,le)=>{var Ie,Se;const ee=d.jsxs(d.Fragment,{children:[u&&d.jsx("div",{children:d.jsx(ie,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),m==="select"&&I&&d.jsx(ao,{onChange:ae=>{const ce=[...o],Ue=I.find(Ve=>Ve.name["en-US"]===ae);if(!Ue)return;const Q=ce.map(Ve=>Ve.id===Z.id?{...Ue,name:{"en-US":ae}}:Ve);w({...Z,name:{"en-US":ae}}),i([...Q])},value:Z.name["en-US"],options:I.filter(ae=>!o.find(ce=>ce.name["en-US"]===ae.name["en-US"])).map(ae=>ae.name["en-US"]),leftAddonOptions:I.filter(ae=>{var ce;return((ce=ae.images)==null?void 0:ce.length)>0}).map(ae=>({value:ae.name["en-US"],addon:ne(ae.images)}))}),m==="selectInfiniteList"&&I&&d.jsx(Lu,{onChange:ae=>{const ce=[...o],Ue=I.find(Ve=>Ve.name["en-US"]===ae);if(!Ue)return;const Q=ce.map(Ve=>Ve.id===Z.id?{...Ue,name:{"en-US":ae}}:Ve);w({...Z,name:{"en-US":ae}}),i([...Q])},value:Z.name["en-US"],options:I.filter(ae=>!o.find(ce=>ce.name["en-US"]===ae.name["en-US"])).map(ae=>ae.name["en-US"]),leftAddonOptions:I.filter(ae=>{var ce;return((ce=ae.images)==null?void 0:ce.length)>0}).map(ae=>({value:ae.name["en-US"],addon:ne(ae.images)}))}),m==="input"&&d.jsx(nr,{onChange:ae=>{const Ue=[...o].map(Q=>Q.id===Z.id?{...Z,name:{"en-US":ae}}:Q);i([...Ue])},value:Z.name["en-US"],placeholder:C}),m==="image"&&d.jsx(xa,{onChange:ae=>{const Ue=[...o].map(Q=>Q.id===Z.id?{...Z,images:ae}:Q);i([...Ue])},activeImage:(Ie=o.find(ae=>ae.id===Z.id))!=null&&Ie.images?(Se=o.find(ae=>ae.id===Z.id))==null?void 0:Se.images[0]:void 0,tip:P}),d.jsxs("div",{className:Ot.buttons,children:[k&&k>o.length&&g&&d.jsx("div",{className:Ot.deleteButton,children:d.jsx(ie,{name:"Copy",hoverable:!0,width:20,height:20,onClick:()=>{x(Z,le)}})}),c&&d.jsx("div",{className:Ot.deleteButton,children:d.jsx(ie,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:ae=>{Le(ae,Z)}})}),f&&d.jsx("div",{className:Ot.deleteButton,children:d.jsx(ie,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>i(o.filter(ae=>ae.id!==Z.id))})})]})]});return u?d.jsx(_7,{product:Z,index:le,children:ee},Z.id):d.jsx("div",{className:Ot.product,children:ee},Z.id)};return d.jsxs("div",{className:Ot.productsBlock,children:[(s||t!==void 0)&&d.jsxs("div",{className:Ot.top,children:[s&&d.jsx("h3",{className:Ot.title,children:s}),t!==void 0&&d.jsx(vr,{current:t,onChange:Z=>n==null?void 0:n(Z)})]}),B&&c&&y&&Ce&&d.jsx(zb,{ref:se,activeItem:B,setActiveItem:w,popupPosition:V,modalOptions:y,setIsOpenModal:be}),(t===void 0||t)&&b&&S&&d.jsx(f0,{...S}),(t===void 0||t)&&d.jsxs("div",{className:Ot.products,children:[l&&d.jsx("h5",{className:Ot.subtitle,children:l}),u?d.jsx(r0,{sensors:ve,onDragEnd:pe,children:d.jsx(c0,{items:o.map(Z=>Z.id),strategy:a0,children:o.map((Z,le)=>L(Z,le))})}):o.map((Z,le)=>L(Z,le)),g&&d.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:d.jsx(ti,{withoutHover:!0,className:ge(Ot.button,{[Ot.disabled]:!!(k&&k<=o.length||o.length===(I==null?void 0:I.length))}),size:"s",disabled:!!(k&&k<=o.length||o.length===(I==null?void 0:I.length)),onClick:()=>{const Z=[...o];let le=null;if(I){for(let ee=0;ee<I.length;ee++)if(!o.find(Ie=>Ie.id===I[ee].id)){le=I[ee];break}}m==="select"&&I?Z.push({name:le?le.name:I[0].name,id:(le==null?void 0:le.id)||I[0].id,...T}):m==="input"?Z.push({name:{"en-US":""},id:pt(),...T}):Z.push({name:{"en-US":`Image ${o.length+1}`},id:pt(),...T}),i(Z)},style:{width:"fit-content"},children:d.jsxs("div",{className:Ot.addButton,children:[d.jsx("span",{children:"Add Option"}),d.jsx(ie,{name:"Plus",width:16,height:16})]})})})]}),E&&M&&d.jsx(ao,{value:E,label:"Aspect Ratio",options:Object.keys(Yf),onChange:Z=>M(Z),leftAddonOptions:Zf}),(t===void 0||t)&&a!==void 0&&d.jsx(Fp,{otherTitle:"Other",items:a}),(t===void 0||t)&&A!==void 0&&d.jsx(nr,{label:A.title||"Auto scroll interval",type:"number",value:String(A.autoInterval),onChange:Z=>A.setAutoInterval(Number(Z)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},w7="_title_cx65i_1",v7="_subtitle_cx65i_5",A7="_productsBlock_cx65i_14",k7="_top_cx65i_26",L7="_products_cx65i_14",N7="_product_cx65i_14",P7="_button_cx65i_80",R7="_disabled_cx65i_91",D7="_buttons_cx65i_118",O7="_modal_cx65i_125",M7="_link_cx65i_146",B7="_modalOptions_cx65i_152",F7="_addButton_cx65i_165",H7="_deleteButton_cx65i_180",j7="_closeIcon_cx65i_192",Co={title:w7,subtitle:v7,productsBlock:A7,top:k7,products:L7,product:N7,button:P7,disabled:R7,buttons:D7,modal:O7,link:M7,modalOptions:B7,addButton:F7,deleteButton:H7,closeIcon:j7},U7=_.forwardRef((e,t)=>{const{activeItem:n,setActiveItem:o,popupPosition:i,modalOptions:a,setIsOpenModal:s}=e;return si(t,()=>{o(null),s(!1)}),d.jsxs("div",{ref:t,className:Co.modal,onClick:l=>{l.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},children:[d.jsxs("div",{className:Co.top,children:[d.jsx("h3",{className:Co.title,children:n.name["en-US"]}),d.jsx("div",{className:Co.closeIcon,children:d.jsx(ie,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{o(null),s(!1)}})})]}),d.jsx("div",{className:Co.modalOptions,children:a.map(l=>{if(l.type==="image")return d.jsx(xa,{label:"Put up an attractive image",activeImage:n[l.field],onChange:c=>{const u={...n,[l.field]:c};o(u)}},String(l.field));if(l.type==="text")return d.jsx(Bu,{isActiveText:!0,typesText:n[l.field.type],setTypesText:c=>{const u={...n,[l.field.type]:c};o(u)},alignText:n[l.field.alignText],setAlignText:c=>{const u={...n,[l.field.alignText]:c};o(u)},text:n[l.field.text]["en-US"]||"",setText:c=>{const u={...n,[l.field.text]:{"en-US":c}};o(u)},typeFont:n[l.field.type],setTypeFont:c=>{const u={...n,[l.field.type]:c};o(u)},subtitle:l.label});if(l.type==="input")return d.jsx(nr,{onChange:c=>{const u={...n,[l.field]:{"en-US":c}};o(u)},value:n[l.field]["en-US"]||"",label:l.label,placeholder:l.placeholder});if(l.type==="inputNumber")return d.jsx(nr,{onChange:c=>{const u={...n,[l.field]:c};o(u)},value:n[l.field]||"",label:l.label,placeholder:l.placeholder,type:"number"});if(l.type==="inputSwitch")return d.jsxs("div",{className:Co.link,children:[d.jsx(nr,{onChange:c=>{const u={...n,[l.field.text]:{"en-US":c}};o(u)},value:n[l.field.text]["en-US"]||"",label:l.inputLabel,placeholder:l.placeholder}),d.jsx(vr,{current:!!n[l.field.switch]||!1,label:l.switchLabel,onChange:c=>{const u={...n,[l.field.switch]:c};o(u)}})]});if(l.type==="select")return d.jsx(ao,{options:l.itemsOptions,onChange:c=>{const u={...n,[l.field]:c};o(u)},label:l.label,value:n[l.field]||"String",leftAddonOptions:l.leftAddonOptions})})})]})}),V7="_title_hvj8m_1",z7="_buttonsBlock_hvj8m_15",$7="_top_hvj8m_26",W7="_modal_hvj8m_120",q7="_options_hvj8m_146",G7="_closeIcon_hvj8m_154",Go={title:V7,buttonsBlock:z7,top:$7,modal:W7,options:q7,closeIcon:G7},Y7=_.forwardRef((e,t)=>{var T;const{activeButton:n,setActiveButton:o,popupPosition:i,editableLink:a=!0}=e,[s,l]=_.useState(n.typesText),[c,u]=_.useState(n.destination),[h,f]=_.useState(n.page),[g,m]=_.useState(n.link||""),[C,I]=_.useState(n.text||{"en-US":""}),[b,S]=_.useState(n.openInNewTab),{pages:y}=zr();return si(t,()=>{o(null)}),_.useEffect(()=>{o({...n,...{text:C,link:g,destination:c,typesText:s,page:h,openInNewTab:b}})},[s,c,g,C,h,b]),d.jsxs("div",{className:Go.modal,onClick:k=>{k.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},ref:t,children:[d.jsxs("div",{className:Go.top,children:[d.jsx("h3",{className:Go.title,children:n.type}),d.jsx("div",{className:Go.closeIcon,children:d.jsx(ie,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>o(null)})})]}),d.jsxs("div",{className:Go.options,children:[a&&d.jsx(ao,{label:"Destination",onChange:k=>u(k),options:["Go to Page","Open Link"].filter(k=>k!==c),value:c}),a&&(c==="Go to Page"?d.jsx(ao,{label:"Go to",onChange:k=>{if(k==="Sign In")f("/customer-dash");else if(y){for(const A in y)if(y[A].name===k){f(y[A].path);break}}else f(Gf[0])},options:y?[...Object.values(y).filter(k=>k.path!==h).map(k=>k.name),"Sign In"]:["Sign In"],value:y?h==="/customer-dash"?"Sign In":((T=Object.values(y).find(k=>k.path===h))==null?void 0:T.name)||"Home":"Home"}):d.jsx(nr,{onChange:k=>m(k),value:g,placeholder:"https://",label:"Link"})),a&&d.jsx(vr,{current:n.openInNewTab,label:"Open in new tab",onChange:k=>S(k)}),d.jsx(Ou,{onChange:k=>I({"en-US":k}),value:C["en-US"],label:"Text"}),d.jsx(Du,{typesText:s,setTypesText:l})]})]})}),Z7="_wrapper_m18qi_1",X7="_subtitle_m18qi_7",K7="_content_m18qi_14",Q7="_range_m18qi_22",J7="_track_m18qi_27",ey="_progress_m18qi_36",ty="_dots_m18qi_46",ny="_dot_m18qi_46",ry="_active_m18qi_65",oy="_input_m18qi_77",iy="_countBlock_m18qi_91",ay="_controls_m18qi_107",sy="_button_m18qi_113",mn={wrapper:Z7,subtitle:X7,content:K7,range:Q7,track:J7,progress:ey,dots:ty,dot:ny,active:ry,input:oy,countBlock:iy,controls:ay,button:sy},f0=e=>{const{label:t,min:n=1,max:o=4,step:i=1,count:a,setCount:s}=e,[l,c]=_.useState(!1),u=Array.from({length:(o-n)/i+1}),h=(a-n)/(o-n)*100,f=()=>{a<o&&s(a+i)},g=()=>{a>n&&s(a-i)},m=C=>{const I=n+C*i;s(I)};return d.jsxs("div",{className:mn.wrapper,children:[t&&d.jsx("h5",{className:mn.subtitle,children:t}),d.jsxs("div",{className:mn.content,children:[d.jsxs("div",{className:mn.range,children:[d.jsx("div",{className:mn.track}),d.jsx("div",{className:mn.progress,style:{width:`${h}%`}}),d.jsx("div",{className:mn.dots,children:u.map((C,I)=>{const b=I<=(a-n)/i;return d.jsx("button",{onClick:()=>m(I),className:ge(mn.dot,{[mn.active]:b,[mn.inactive]:!b,[mn.dragging]:l}),"aria-label":`Set value to ${n+I*i}`},I)})}),d.jsx("input",{type:"range",min:n,max:o,step:i,value:a,onChange:C=>s(Number(C.target.value)),onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onTouchStart:()=>c(!0),onTouchEnd:()=>c(!1),className:mn.input})]}),d.jsxs("div",{className:mn.countBlock,children:[d.jsx(nr,{type:"number",min:n,max:o,paddingless:!0,onChange:C=>{const I=Number(C);I>o?s(o):I<n?s(n):s(I)},value:String(a)}),d.jsxs("div",{className:mn.controls,children:[d.jsx("button",{onClick:f,disabled:a>=o,className:mn.button,"aria-label":"Increment count",children:d.jsx(ie,{name:"CaretUp",width:15,height:15})}),d.jsx("button",{onClick:g,disabled:a<=n,className:mn.button,"aria-label":"Decrement count",children:d.jsx(ie,{name:"CaretDown",width:15,height:15})})]})]})]})]})},ly="_title_11jyy_1",cy="_subtitle_11jyy_5",uy="_productsBlock_11jyy_14",dy="_top_11jyy_26",hy="_products_11jyy_14",fy="_product_11jyy_14",py="_button_11jyy_80",my="_buttons_11jyy_114",gy="_modal_11jyy_121",Iy="_modalOptions_11jyy_148",Cy="_addButton_11jyy_161",by="_deleteButton_11jyy_176",Sy="_closeIcon_11jyy_188",Vi={title:ly,subtitle:cy,productsBlock:uy,top:dy,products:hy,product:fy,button:py,buttons:my,modal:gy,modalOptions:Iy,addButton:Cy,deleteButton:by,closeIcon:Sy},p0=({render:e,block:t})=>e(t),m0=({settings:e,pageContext:t})=>{const{footer:n}=Hr(),{settings:o}=Sa(),{pageContext:i}=zr(),{footer:a}=Lo();if(!a||!n)return null;const s=new a;return Object.keys(n).map(l=>{s[l]=n[l]}),s.renderBlock((e==null?void 0:e.blockSettings)||o,t||i)},g0=({settings:e,pageContext:t})=>{const{header:n}=Hr(),{settings:o}=Sa(),{pageContext:i}=zr(),{header:a}=Lo();if(!a||!n)return null;const s=new a;return Object.keys(n).map(l=>{s[l]=n[l]}),s.renderBlock((e==null?void 0:e.blockSettings)||o,t||i)},I0=({settings:e,pageContext:t})=>{const{announcement:n}=Hr(),{settings:o}=Sa(),{pageContext:i}=zr(),{announcement:a}=Lo();if(!a||!n)return null;const s=new a;return Object.keys(n).map(l=>{s[l]=n[l]}),s.renderBlock(e||o,t||i)},yy=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,i=localStorage.getItem("shopPassword");if(t&&!i)return null;const a=`${n.storeApi}/v2/shops/${o}/pages/${e}`+(t?`?password=${i}`:"");try{return await lt({url:a,withToken:!0,method:"get"})}catch(s){if(ht.isAxiosError(s)&&s.response&&s.response.status===404)return null}},Ey="_wrapper_5w9s8_1",Ty={wrapper:Ey},Wc=e=>{const{error:t}=e;return d.jsx("div",{className:Ty.wrapper,children:t})},xy=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.slApi}/v1/balance/top-up/${n}`;return await lt({url:o,method:"post",body:e,withToken:!1})},fi=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.customersApi}/v2/${n}/customers/${e}`;return await lt({url:o,withToken:!0,method:"get",typeToken:"customer"})},_y=()=>fi("dash/info"),wy=()=>fi("dash/dashboard/home"),vy=()=>fi("rewards"),Ay=()=>fi("balance"),ky=()=>fi("balance/top-up/settings"),Ly=()=>fi("referral-system"),qc=10,sl=async({url:e,PageNumber:t})=>{var l;const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.customersApi}/v2/${o}/${e}?PageNumber=${t}&PageSize=${qc}`,a=await lt({url:i,withToken:!0,method:"get",typeToken:"customer"}),s=Number((l=a.headers)==null?void 0:l["x-pagination-total"]);return{list:a.data,totalCount:s}},Wu=async(e,t="get",n)=>{const o=kt.getState().apiUrls,i=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${o.slApi}/v1/orders/${i}/${e}`;return await lt({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},Ny=e=>Wu("","post",e),Py=({PageNumber:e})=>sl({url:"customers/orders",PageNumber:e}),Ry=e=>Wu(e),Dy=e=>Wu(e),Oy=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.slApi}/v1/${n}/subscriptions`;return await lt({url:o,method:"post",withToken:!1,body:e})},My=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v2/${o}/subscriptions/${e}/${t}`;return await lt({url:i,method:"get",withToken:!1})},By=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v1/${o}/subscriptions/${e}/${t}/upgrades`;return await lt({url:i,method:"get",withToken:!1})},Fy=async(e,t,n)=>{const o=kt.getState().apiUrls,i=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${o.slApi}/v1/${i}/subscriptions/${e}/${t}/cancel`;return await lt({url:a,method:"post",withToken:!1,body:n})},Hy=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v2/${o}/subscriptions/${e}/change-gateway`;return await lt({url:i,method:"post",withToken:!1,body:{gateway:t}})},jy=({PageNumber:e})=>sl({url:"customers/subscriptions",PageNumber:e}),Uy=async({id:e,accessToken:t})=>await By(e,t),Vy=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v2/${o}/subscriptions/${e}/order`;return await lt({url:i,method:"post",withToken:!1,body:t})},zy=async(e,t)=>{const n=kt.getState().apiUrls,o=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,i=`${n.slApi}/v1/public/${o}/tickets/${e}/${t}`;return await lt({url:i,method:"get",withToken:!1})},$y=async(e,t,n,o,i)=>{const a=kt.getState().apiUrls,s=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,l=`${a.slApi}/v1/public/${s}/tickets/${e}/${t}/answer`;return(await lt({url:l,method:"post",body:{message:n,recaptcha:o,tsId:i},withToken:!1})).data},Wy=({PageNumber:e})=>sl({url:"customers/tickets",PageNumber:e}),qy=({PageNumber:e})=>sl({url:"customers/balance/transactions",PageNumber:e}),C0=async e=>{const t=kt.getState().apiUrls,n=e.map(s=>["names",s]),o=new URLSearchParams(n),i=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${i}&${o.toString()}`;return await lt({url:a,method:"get",withToken:!1})},b0=async({email:e,recaptcha:t,tsId:n})=>{const o=kt.getState().apiUrls,i=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${o.customersApi}/v2/${i}/auth/otp/request`;return(await lt({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},S0=async({email:e,otp:t,recaptcha:n,tsId:o})=>{const i=kt.getState().apiUrls,a=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,s=`${i.customersApi}/v2/${a}/auth/otp/login`,{data:l}=await lt({url:s,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:o},withToken:!1});return uo.getState().setToken(l.data),localStorage.setItem("token",l.data),{token:l.data,requested:!1}},Gc=async()=>{uo.getState().setToken(""),localStorage.removeItem("token")},Gy=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:S0,logoutCustomer:Gc,requestOtp:b0},Symbol.toStringTag,{value:"Module"})),Yy=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.slApi}/v2/coupons/${n}/validate`;return await lt({url:o,method:"post",body:e,withToken:!1})},Zy=async e=>{const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await lt({url:o,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},Xy=async()=>{const{data:e}=await Ly();return e},Ky=async e=>{const{data:t}=await Zy(e);return t};async function Qy(e){const t=kt.getState().apiUrls,n=Vt?localStorage.getItem("fakeDomain"):window.location.hostname,o=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return lt({url:o,method:"post",withToken:!0,typeToken:"customer"})}const Wl="Balance",Jy={Number:"NUMBER",Textarea:"LARGE_TEXT",Checkbox:"CHECK_BOX",Hidden:"HIDDEN"},e8={recaptcha:"",gateway:"",paymentMethod:"",parts:[],customFields:{},discordSocialConnectId:null,coupon:null,tsId:""},B1=(e,t)=>{var u;const{productId:n,productVariantId:o,quantity:i,chargeType:a}=t,s=e.find(h=>h.id===n);if(!s)throw new Error("Product does not exist");const l=s.variants.find(h=>h.id===o);if(!l)throw new Error("Variant does not exist");if(a==="RECURRING"&&!l.subscriptionSettings)throw new Error("Variant does not have subscription settings");if(i!==void 0&&((u=l.quantity)!=null&&u.available)&&l.quantity.available<i)throw new Error("Not enough quantity available");const c=Br.getState().cart;if(c.parts.length>0){const h=e.find(g=>g.id===c.parts[0].productId),f=h==null?void 0:h.variants.find(g=>g.id===c.parts[0].productVariantId);if(f&&l.price.currency!==f.price.currency)throw new Error("Product have different currency")}return l},t8=(e,t)=>{if(!e.volumeDiscounts||e.volumeDiscounts.length===0)return 0;const n=e.volumeDiscounts.filter(i=>t>=i.amount);return n.length===0?0:n.reduce((i,a)=>a.amount>i.amount?a:i).percentage},n8=(e,t)=>{let n=0,o=0;return e.forEach(i=>{var g,m;const a=t.find(C=>(C==null?void 0:C.id)===i.productId),s=a==null?void 0:a.variants.find(C=>C.id===i.productVariantId);if(!s)return;const{gateway:l}=Br.getState().cart,c=(s==null?void 0:s.gateways)||[],u=c.some(C=>C.name===l&&C.overrodePrice)?(g=c.find(C=>C.name===l))==null?void 0:g.overrodePrice:null;let h=0,f=0;if(i.chargeType==="ONE_TIME"?(h=(u==null?void 0:u.amount)||(s==null?void 0:s.price.amount)||0,f=h*i.quantity):f=s!=null&&s.subscriptionSettings?s.subscriptionSettings.price.amount+(((m=s.subscriptionSettings.entryFee)==null?void 0:m.amount)||0):0,n+=f,i.chargeType==="ONE_TIME"){const C=t8(s,i.quantity),I=f*(1-C/100);o+=I}else o+=f}),{total:n,totalWithVolumeDiscounts:o}},r8=(e,t)=>({isRequired:t.some(o=>{var a;const i=e.find(s=>(s==null?void 0:s.id)===o.productId);return(a=i==null?void 0:i.variants.find(s=>s.id===o.productVariantId))==null?void 0:a.discordSettings.isRequired}),isEnabled:t.some(o=>{var a;const i=e.find(s=>(s==null?void 0:s.id)===o.productId);return(a=i==null?void 0:i.variants.find(s=>s.id===o.productVariantId))==null?void 0:a.discordSettings.isEnabled})}),F1=e=>new Set(e.gateways.map(t=>t.name)),H1={availableGateways:[],requiresSignInGateways:[]},j1=(e,t)=>{var a;if(t.length===0)return H1;const n=(a=t[0])==null?void 0:a.variants[0];if(!n)return H1;const o=F1(n);for(const s of e){const l=t.find(h=>h.id===s.productId);if(!l)continue;const c=l.variants.find(h=>h.id===s.productVariantId);if(!c)continue;const u=F1(c);for(const h of o)u.has(h)||o.delete(h)}return!localStorage.getItem("token")&&o.has(Wl)?(o.delete(Wl),{availableGateways:[...o],requiresSignInGateways:[Wl]}):{availableGateways:[...o],requiresSignInGateways:[]}},o8=(e,t)=>{if(e.length===0)return[];const o=e.map(a=>{const s=t.find(c=>c.id===a.productId),l=s==null?void 0:s.variants.find(c=>c.id===a.productVariantId);return(l==null?void 0:l.customFields)??[]}).flat().reduce((a,s)=>{const l=a[s.name];return l?(s.required&&!l.required&&(a[s.name]={...s,value:s.defaultValue}),a):(a[s.name]={...s,value:s.defaultValue},a)},{});return Object.values(o).map(a=>({...a,value:""}))},i8=(e,t)=>{const n=t.find(i=>i.id===e.productId),o=n==null?void 0:n.variants.find(i=>i.id===e.productVariantId);return e.chargeType==="RECURRING"?!!(o!=null&&o.subscriptionSettings):!1},a8=()=>{const{cart:e,products:t,coupon:n,pending:o,applyCouponPending:i,customerEmail:a,setCart:s,setProducts:l,setCoupon:c,setPending:u,setApplyCouponPending:h}=Br(),f=async I=>{var E;h(!0);const{cart:b}=Br.getState(),{gateway:S,parts:y}=b,{notifications:T,setNotifications:k}=cn.getState();S||(h(!1),k([...T,{message:"There should be a gateway for the coupon",status:"error",id:pt()}]));const A=y.map(M=>M.productId);let P=null;try{const{data:M}=await Yy({gateway:S,couponName:I,productIds:A});P=M.data,k([...T,{message:"Coupon is applied",status:"success",id:pt()}]),s(B=>({...B,coupon:I}))}catch(M){const B=M;k([...T,{message:`Coupon is not applied: ${B.message}`,status:"error",id:pt()}]),s(w=>({...w,coupon:null})),c(null),h(!1)}if(h(!1),(E=P==null?void 0:P.restrictToProductIds)!=null&&E.length&&!A.every(M=>{var B;return(B=P==null?void 0:P.restrictToProductIds)==null?void 0:B.includes(M)}))throw new Error("Coupon can't be applied to such products");return c(P),P},C={reset(){s({...e8})},addProducts:I=>{const b=Br.getState().products,S=I.filter(y=>!b.some(T=>T.id===y.id));l([...b,...S])},addProductToCart:I=>{const b=Br.getState().cart;try{B1(t,I)}catch(y){throw new Error(y)}const S=b.parts.find(y=>y.productId===I.productId&&y.productVariantId===I.productVariantId&&y.chargeType===I.chargeType);if(S)return C.updateQuantityOfProduct({...S,quantity:(S.quantity||1)+(I.quantity||1),chargeType:I.chargeType});if(b.parts.length&&j1([...b.parts,I],t).availableGateways.length===0)throw new Error("No common payment gateways available");s({...b,parts:[...b.parts,I]}),b.coupon&&f(b.coupon)},removeProduct({productId:I,productVariantId:b}){s(S=>({...S,parts:S.parts.filter(y=>y.productId!==I||y.productVariantId!==b)})),e.coupon&&f(e.coupon)},getPossibleGateways(){return j1(e.parts,t)},removeCoupon(){c(null)},getDiscordSettings(){return r8(t,e.parts)},updateQuantityOfProduct(I){B1(t,I),s(b=>({...b,parts:b.parts.map(S=>S.productId===I.productId&&S.productVariantId===I.productVariantId?{...S,quantity:I.quantity,chargeType:I.chargeType}:S)})),e.coupon&&f(e.coupon)},getTotalAndDiscount(){const{coupon:I}=Br.getState(),{total:b,totalWithVolumeDiscounts:S}=n8(e.parts,t);let y;const T=S;return I&&I.discount?!I.isFixed&&I.discount===100?y=0:y=I.isFixed?Math.max(0,T-I.discount):T*(1-I.discount/100):S!==b&&(y=S),{total:b,totalWithVolumeDiscounts:S!==b?S:void 0,totalWithDiscount:y}},setGateway(I){s(S=>({...S,gateway:I}));const{isAntistock:b}=mt.getState();e.coupon&&!b&&f(e.coupon)},setPaymentMethod(I){s(b=>({...b,paymentMethod:I}))},async submitCart(I){u(!0);const{cart:b}=Br.getState(),{discordInfo:S}=Dp.getState();let y;if(b.parts&&a&&i8(b.parts[0],t))try{const{data:T}=await Oy({...b,partOrder:b.parts[0],referralCode:localStorage.getItem("referralCode"),discordSocialConnectId:S!=null&&S.authorized?S.id:null,customerEmail:a,recaptcha:I,customFields:{...b.customFields},tsId:so()});y=T.data}catch(T){console.error(T)}else try{const{data:T}=await Ny({...b,referralCode:localStorage.getItem("referralCode"),recaptcha:I,customFields:{...b.customFields},tsId:so(),discordSocialConnectId:S!=null&&S.authorized?S.id:null});y=T.data}catch(T){const k=T,{notifications:A,setNotifications:P}=cn.getState();P([...A,{message:`Failed to create order: ${k.message}`,status:"error",id:pt()}])}if(u(!1),y)return y;throw new Error("Failed to create order")},setDiscordSocialConnectId(I){s(b=>({...b,discordSocialConnectId:I}))},setCustomFields(I){s(b=>({...b,customFields:{...I}}))}};return _.useEffect(()=>{s(I=>({...I,customerEmail:a??""}))},[a,s]),{cart:e,products:t,coupon:n,pending:o,applyCouponPending:i,applyCoupon:f,...C}},ll=()=>{const{notifications:e,setNotifications:t}=cn();return n=>{navigator.clipboard.writeText(n),t([...e,{status:"success",message:"Successfully copied",id:pt()}])}};function y0(e,t=!0){if(!e||typeof e!="string")return"";if(/<[a-z][\s\S]*>/i.test(e))return e;const o=e.split(" "),i=20;if(t){let a="",s=[];return o.forEach(l=>{l.length>i?(s.length>0&&(a+=`<span style="hyphens: manual">${s.join(" ")} </span>`,s=[]),a+=`<span style="hyphens: auto" lang="en">${l} </span>`):s.push(l)}),s.length>0&&(a+=`<span style="hyphens: manual">${s.join(" ")}</span>`),a}else{const a=[];let s=[],l=0;return o.forEach(c=>{c.length>i?(s.length>0&&(a.push(d.jsxs("span",{style:{hyphens:"manual"},children:[s.join(" ")," "]},l++)),s=[]),a.push(d.jsxs("span",{style:{hyphens:"auto"},lang:"en",children:[c," "]},l++))):s.push(c)}),s.length>0&&a.push(d.jsx("span",{style:{hyphens:"manual"},children:s.join(" ")},l++)),a}}const s8=_.forwardRef((e,t)=>{const{activeItem:n,setActiveItem:o,popupPosition:i,setIsOpenModal:a,itemsOptions:s}=e,l=s.find(c=>c.id===n.listingId);return si(t,()=>{o(null),a(!1)}),l?d.jsxs("div",{className:Vi.modal,onClick:c=>{c.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},children:[d.jsxs("div",{className:Vi.top,children:[d.jsx("h3",{dangerouslySetInnerHTML:{__html:y0(l.productData.name)}}),d.jsx("div",{className:Vi.closeIcon,children:d.jsx(ie,{name:"X",height:20,width:20,onClick:()=>{a(!1),o(null)}})})]}),d.jsx("div",{className:Vi.modalOptions,children:d.jsx(xa,{label:"Put up an attractive image",activeImage:l.productData.images.length>0?l.productData.images[0].cfId:n.image?n.image:void 0,onChange:c=>{const u={...n,image:c[0]};o(u)}})})]}):null}),l8="_wrapper_ipyfg_1",c8="_label_ipyfg_9",u8="_input_ipyfg_18",d8="_disabled_ipyfg_31",h8="_paddingless_ipyfg_36",f8="_content_ipyfg_47",p8="_contentBorder_ipyfg_60",m8="_contentField_ipyfg_65",g8="_contentIsAntistock_ipyfg_69",I8="_borderless_ipyfg_74",C8="_rightIcon_ipyfg_79",b8="_leftIcon_ipyfg_87",S8="_requiredStar_ipyfg_94",xn={wrapper:l8,label:c8,input:u8,disabled:d8,paddingless:h8,content:f8,contentBorder:p8,contentField:m8,contentIsAntistock:g8,borderless:I8,rightIcon:C8,leftIcon:b8,requiredStar:S8},Ro=e=>{const{onChange:t,style:n,label:o,value:i,type:a="text",min:s,max:l,placeholder:c,disabled:u=!1,required:h=!1,regex:f,paddingless:g=!1,borderless:m=!1,editable:C=!1,isSearch:I=!1,centered:b=!1,maxSymbols:S,rightIcon:y,onFocus:T,leftIcon:k}=e,{themeSettings:A}=No(),{isAntistock:P}=mt(),{inputs:E}=A,[M,B]=_.useState(!1);function w(H){if(Number(H)<0)return String(s);const X=H.replace(/[^\d-]/g,"");return Number(X)<0?String(s):X}function V(H){return!h||!f?!0:new RegExp(f).test(H)}return d.jsxs("div",{className:xn.wrapper,children:[o&&d.jsxs("label",{className:xn.label,htmlFor:o,style:{color:P?"var(--text-secondary)":void 0},children:[o,h&&d.jsx("span",{className:xn.requiredStar,children:"*"})]}),d.jsxs("div",{className:ge(xn.content,{[xn.contentBorder]:!P&&E.border.active,[xn.contentField]:E.field.active,[xn.disabled]:u,[xn.contentIsAntistock]:P}),style:{...n},children:[k&&d.jsx("div",{className:xn.leftIcon,children:k}),d.jsx("input",{maxLength:S,id:o,type:a||"text",onChange:H=>{if(a==="text")t(H.target.value);else{const X=w(H.target.value);t(X)}},value:i,autoComplete:"off",placeholder:c||"Type something...",className:ge(xn.input,{[xn.required]:M&&h&&!V(i),[xn.paddingless]:g,[xn.borderless]:m}),min:a==="number"?s:void 0,max:a==="number"?l:void 0,onFocus:()=>{T==null||T(),B(!0)},disabled:u,style:{textAlign:b?"center":"left",padding:I?`7px ${Number(E.general.size)+20}px 7px ${k?35:11}px`:`7px ${y?35:11}px 7px ${k?35:11}px`}}),y&&d.jsx("div",{className:xn.rightIcon,children:y}),I&&d.jsx("div",{className:xn.rightIcon,children:d.jsx(ie,{name:"MagnifyingGlass",fill:"var(--text-secondary)",width:E.general.size,height:E.general.size})}),C&&d.jsx("div",{children:d.jsx(ie,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},y8="_button_1v5k3_1",E8="_primary_1v5k3_20",T8="_primaryHovered_1v5k3_30",x8="_secondary_1v5k3_35",_8="_secondaryHovered_1v5k3_45",w8="_secondaryAntistock_1v5k3_50",v8="_tertiary_1v5k3_61",A8="_special_1v5k3_71",k8="_tertiaryHovered_1v5k3_75",L8="_content_1v5k3_80",N8="_isAntistock_1v5k3_88",ar={button:y8,primary:E8,primaryHovered:T8,secondary:x8,secondaryHovered:_8,secondaryAntistock:w8,tertiary:v8,special:A8,tertiaryHovered:k8,content:L8,isAntistock:N8},P8=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,E0=({children:e,className:t,as:n="span",...o})=>{const[i,a]=_.useState(!1);return _.useEffect(()=>{typeof window<"u"&&a(P8())},[]),i?d.jsx(n,{className:t,...o,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):d.jsx(n,{className:t,...o,children:e})},_t=e=>{const{children:t,onClick:n,style:o,className:i,disabled:a=!1,type:s="Primary",dangerouslySetInnerHTML:l}=e,{themeSettings:c}=No(),{isAntistock:u}=mt(),h=I=>typeof I=="string"?d.jsx(E0,{children:I}):I,f={onClick:n,disabled:a,style:o,className:ge(ar.button,i,{[ar.primary]:s==="Primary",[ar.secondary]:s==="Secondary"&&!u,[ar.secondaryAntistock]:s==="Secondary"&&u,[ar.tertiary]:s==="Tertiary",[ar.primaryHovered]:s==="Primary"&&!a&&c.buttons.primary.hover&&!u,[ar.secondaryHovered]:s==="Secondary"&&!a&&c.buttons.secondary.hover&&!u,[ar.tertiaryHovered]:s==="Tertiary"&&!a&&c.buttons.tertiary.hover&&!u,[ar.isAntistock]:u})};if(s==="Special")return d.jsx("button",{...f,className:ar.special,...l?{dangerouslySetInnerHTML:l}:{children:h(t)}});const g=s.toLowerCase(),m=c.buttons[g],C=s==="Tertiary"?d.jsxs("div",{className:ar.content,children:[h(t),d.jsx(ie,{name:"ArrowRight",fill:"var(--text-tertiary)",width:20,height:20})]}):h(t);return d.jsx("button",{...f,style:{...o,textAlign:m.alignment},...l?{dangerouslySetInnerHTML:l}:{children:C}})},R8="_modal_1iz94_1",D8="_padding_1iz94_17",O8="_content_1iz94_21",M8="_close_1iz94_42",Za={modal:R8,padding:D8,content:O8,close:M8},cl=e=>{const{close:t,children:n,withAnimation:o=!0,hasPadding:i=!0}=e,{isOpen:a,setIsOpen:s}=$r(),l=()=>{s(!1),o?setTimeout(()=>{t(!1),s(!0)},300):(t(!1),s(!0))};return _.useEffect(()=>{const c=u=>{u.key==="Escape"&&l()};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}},[]),To.createPortal(d.jsx("div",{className:ge(Za.modal,{[Za.padding]:i}),onClick:l,children:o?d.jsx("div",{className:ge(Za.content,{[Za.close]:!a}),children:n}):d.jsx(d.Fragment,{children:n})}),document.body)},B8="_loader_1kbu3_1",F8="_loaderAntistock_1kbu3_18",U1={loader:B8,loaderAntistock:F8},qn=e=>{const{isAntistock:t}=mt();return t?d.jsx("span",{className:U1.loaderAntistock,style:{width:"15px",height:"15px",borderWidth:"2px"}}):d.jsx("div",{className:U1.loader,...e})},H8="_container_6vcrl_1",j8="_wrapper_6vcrl_5",V1={container:H8,wrapper:j8};class U8{constructor(){Ei(this,"observer",null);Ei(this,"callbacks",new Map);Ei(this,"handleWindowResize",()=>{this.callbacks.forEach((t,n)=>{const o=n.getBoundingClientRect().width;t.forEach(i=>i(o))})});this.observer=new ResizeObserver(t=>{var n;for(const o of t){const i=o.contentRect.width,a=o.target;this.callbacks.has(a)&&((n=this.callbacks.get(a))==null||n.forEach(s=>s(i)))}}),window.addEventListener("resize",this.handleWindowResize)}observe(t,n){var i;if(!this.observer)return;this.callbacks.has(t)||(this.callbacks.set(t,[]),this.observer.observe(t)),(this.callbacks.get(t)||[]).includes(n)||(i=this.callbacks.get(t))==null||i.push(n)}unobserve(t,n){var o;if(!(!this.observer||!this.callbacks.has(t))){if(n){const i=this.callbacks.get(t)||[];this.callbacks.set(t,i.filter(a=>a!==n))}(o=this.callbacks.get(t))!=null&&o.length||(this.callbacks.delete(t),this.observer.unobserve(t))}}disconnect(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callbacks.clear(),window.removeEventListener("resize",this.handleWindowResize)}}const z1=new U8;function T0(e){const[t,n]=_.useState("desktop");return _.useEffect(()=>{const o=e.current;if(!o)return;const i=l=>l>=1081?"desktop":l>=720?"tablet":"mobile",a=l=>{const c=i(l);n(c)};z1.observe(o,a);const s=o.getBoundingClientRect().width;return a(s),()=>{z1.unobserve(o,a)}},[e]),t}const Xa=16,x0=({children:e,padding:t,style:n,notPadding:o=!1,maxWidth:i="var(--max-width-store)"})=>{const a=_.useRef(null),s=T0(a);return d.jsx("div",{className:V1.container,ref:a,style:n,children:d.jsx("div",{className:V1.wrapper,style:{maxWidth:i,paddingTop:s==="desktop"?t==null?void 0:t.top:o?0:Xa,paddingBottom:s==="desktop"?t==null?void 0:t.bottom:o?0:Xa,paddingLeft:s==="desktop"?t==null?void 0:t.left:o?0:Xa,paddingRight:s==="desktop"?t==null?void 0:t.right:o?0:Xa,...n},children:e(s)})})},V8="_wrapper_d9z4o_1",z8="_label_d9z4o_10",$8="_contentBorder_d9z4o_19",W8="_textarea_d9z4o_23",q8="_contentField_d9z4o_35",G8="_antistock_d9z4o_49",Y8="_length_d9z4o_58",Gr={wrapper:V8,label:z8,contentBorder:$8,textarea:W8,contentField:q8,antistock:G8,length:Y8},Z8=e=>{const{onChange:t,label:n,value:o,maxLength:i,placeholder:a="Type something...",type:s="text",required:l=!1}=e,[c,u]=_.useState(o.length),{themeSettings:h}=No(),{isAntistock:f}=mt();function g(m){return s==="number"?m.replace(/[^\d\n]+/g,""):m}return d.jsxs("div",{className:Gr.wrapper,children:[n&&d.jsxs("label",{className:Gr.label,htmlFor:n,style:{color:f?"var(--text-secondary)":void 0},children:[n,l&&d.jsx("span",{className:Gr.requiredStar,children:"*"})]}),d.jsx("textarea",{id:n,value:o,onChange:m=>{const C=g(m.target.value);u(C.length),t(C)},placeholder:a,className:ge(Gr.textarea,{[Gr.contentBorder]:h.inputs.border.active,[Gr.contentField]:h.inputs.field.active,[Gr.antistock]:f}),maxLength:i}),i&&d.jsxs("div",{className:Gr.length,children:[c,"/",i]})]})},X8="_wrapper_ty9h3_2",K8="_label_ty9h3_9",Q8="_top_ty9h3_17",J8="_select_ty9h3_23",eE="_borderFocused_ty9h3_42",tE="_input_ty9h3_49",nE="_icon_ty9h3_59",rE="_rotate_ty9h3_64",oE="_content_ty9h3_68",iE="_options_ty9h3_72",aE="_filteredOptions_ty9h3_93",sE="_open_ty9h3_97",lE="_option_ty9h3_72",cE="_focused_ty9h3_115",uE="_addon_ty9h3_119",dE="_value_ty9h3_130",hE="_postfix_ty9h3_135",fE="_leftAddon_ty9h3_139",Jt={wrapper:X8,label:K8,top:Q8,select:J8,borderFocused:eE,input:tE,icon:nE,rotate:rE,content:oE,options:iE,filteredOptions:aE,open:sE,option:lE,focused:cE,addon:uE,value:dE,postfix:hE,leftAddon:fE};function pE(e,t){_.useEffect(()=>{function n(o){!e.current||e.current.contains(o.target)||t(o)}return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[e,t])}const _0=e=>{var M,B;const{onChange:t,label:n,value:o,options:i,style:a,switcher:s,postfixs:l,leftAddonOptions:c}=e,[u,h]=_.useState(!1),[f,g]=_.useState(""),[m,C]=_.useState(null),[I,b]=_.useState(!1),S=_.useRef(null);pE(S,()=>h(!1));function y(w){g(""),t(w),h(!1),C(null)}function T(w,V){return w?w.length>V+3?`${w.slice(0,V)}...`:w:""}function k(w){if(!u){(w.key==="Enter"||w.key==="ArrowDown")&&h(!0);return}const V=E;w.key==="ArrowDown"&&(w.preventDefault(),C(H=>H===null||H===V.length-1?0:H+1)),w.key==="ArrowUp"&&(w.preventDefault(),C(H=>H===null||H===0?V.length-1:H-1)),w.key==="Enter"&&m!==null&&(w.preventDefault(),y(V[m])),w.key==="Escape"&&h(!1)}const A=_.useRef(null),P=_.useMemo(()=>new Wr(i,{threshold:.4,minMatchCharLength:2}),[i]),E=_.useMemo(()=>I&&f.trim()!==""?P.search(f).map(w=>w.item):i,[f,i,I,P]);return d.jsxs("div",{className:Jt.wrapper,style:{...a},children:[n&&d.jsxs("div",{className:Jt.top,children:[d.jsx("label",{className:Jt.label,htmlFor:n,children:n}),s&&d.jsx(vr,{current:s.value,onChange:s.onChange})]}),d.jsxs("label",{className:Jt.content,ref:S,children:[d.jsxs("div",{className:ge(Jt.select,{[Jt.borderFocused]:u}),onKeyDown:k,onClick:w=>{w.stopPropagation(),h(V=>!V),b(!1)},ref:A,tabIndex:0,children:[c&&c.length>0&&d.jsx("div",{className:Jt.addon,children:(M=c.find(w=>w.value===o))==null?void 0:M.addon}),d.jsx("div",{className:Jt.input,id:"md",children:T(o,15)}),d.jsx("div",{className:ge(Jt.icon,{[Jt.rotate]:u}),onClick:w=>{w.stopPropagation(),h(V=>!V)},children:d.jsx(ie,{name:"CaretDown",width:16,height:16,fill:"var(--text-primary)"})})]}),d.jsxs("div",{className:ge(Jt.options,{[Jt.open]:u}),style:{top:((B=A.current)==null?void 0:B.clientHeight)+10},children:[i.length>6&&d.jsx(Ro,{type:"text",value:f,placeholder:"Search...",onChange:w=>{g(w),b(!0)},isSearch:!0}),d.jsxs("div",{className:Jt.filteredOptions,children:[E.map((w,V)=>{var H;return d.jsxs("div",{className:ge(Jt.option,{[Jt.focused]:V===m}),onClick:()=>{y(w),h(!1)},id:"md",children:[c&&c.length>0&&d.jsx("div",{className:Jt.leftAddon,children:(H=c.find(X=>X.value===w))==null?void 0:H.addon}),d.jsx("span",{className:Jt.value,id:"md",children:T(w,20)}),l&&d.jsx("span",{className:Jt.postfix,id:"md",children:l[V]})]},w)}),E.length===0&&d.jsx("div",{children:"No results found."})]})]})]})]})},mE="_wrapper_2vleg_1",gE="_label_2vleg_9",IE="_options_2vleg_17",CE="_radioLabel_2vleg_23",bE="_radio_2vleg_23",SE="_custom_2vleg_38",yE="_option_2vleg_17",mo={wrapper:mE,label:gE,options:IE,radioLabel:CE,radio:bE,custom:SE,option:yE},EE=e=>{const{defaultValue:t,options:n,onChange:o,label:i,flexDirection:a="row"}=e,[s,l]=_.useState(t),c=u=>{const h=u.target.value;l(h),o(h)};return d.jsxs("div",{className:mo.wrapper,children:[d.jsx("span",{className:mo.label,children:i}),d.jsx("div",{className:mo.options,style:{flexDirection:a},children:n.map(u=>d.jsxs("label",{className:mo.radioLabel,children:[d.jsx("input",{type:"radio",value:u.value,checked:s===u.value,onChange:c,className:mo.radio}),d.jsx("span",{className:mo.custom}),d.jsx("span",{className:mo.option,children:u.label})]},u.value))})]})},TE="_content_eonwv_1",xE="_main_eonwv_12",_E="_block_eonwv_16",wE="_active_eonwv_22",vE="_name_eonwv_32",AE="_addSection_eonwv_109",kE="_addSectionTop_eonwv_117",Yr={content:TE,main:xE,block:_E,active:wE,name:vE,addSection:AE,addSectionTop:kE},LE="_sidebar_xhqpt_1",NE="_content_xhqpt_14",PE="_button_xhqpt_24",RE="_moveButton_xhqpt_40",DE="_deleteButton_xhqpt_49",br={sidebar:LE,content:NE,button:PE,moveButton:RE,deleteButton:DE},OE=()=>{var A;const{activeBlock:e,setActiveBlock:t}=Xs(),{blocks:n,removeBlock:o,moveBlock:i,duplicateBlock:a,setCurrentBlock:s}=Hr(),{currentPage:l,pages:c}=zr(),{setTitle:u,setDescription:h,setOnConfirm:f}=Kf(),{setActiveBlock:g}=Lo(),m=(A=c==null?void 0:c[l])==null?void 0:A.path,C=m?n[m]:null,I=(C==null?void 0:C.order)||[],b=I.indexOf(e.id),S=P=>{P.stopPropagation(),b>0&&m&&(i(m,b,b-1),t({id:e.id,neededScroll:!0}),setTimeout(()=>{t({id:e.id,neededScroll:!1})},100))},y=P=>{P.stopPropagation(),b<I.length-1&&m&&(i(m,b,b+1),t({id:e.id,neededScroll:!0}),setTimeout(()=>{t({id:e.id,neededScroll:!1})},100))},T=P=>{P.stopPropagation(),m&&a(m,e.id)},k=()=>{m&&(o(m,e.id),s(null),g(null),t({id:null,neededScroll:!1}))};return d.jsx("div",{className:br.sidebar,children:d.jsxs("div",{className:br.content,children:[d.jsx("button",{onClick:S,className:ge(br.button,br.moveButton),disabled:b===0,children:d.jsx(ie,{name:"ArrowUp"})}),d.jsx("button",{onClick:y,className:ge(br.button,br.moveButton),disabled:b===I.length-1,children:d.jsx(ie,{name:"ArrowDown"})}),d.jsx("button",{onClick:T,className:ge(br.button,br.moveButton),children:d.jsx(ie,{name:"Copy"})}),d.jsx("button",{className:ge(br.button,br.deleteButton),onClick:P=>{P.stopPropagation(),u("Remove Block"),h(`Are you sure you want to delete ${(C==null?void 0:C.data[e.id].name)||"this"} block? Once you delete this block, any content visible will also be deleted. This is irreversible.`),f(k)},children:d.jsx(ie,{name:"Trash",hoverable:!0,fill:"#C12A2A"})})]})})};function zi(e,t){if(!t||!t[e])return"unknown name";const n=new t[e];return!n.blockSettings||!n.blockSettings.displayName?"unknown name":n.blockSettings.displayName}const ME=_.memo(({scrollableRef:e})=>{const{setActiveBlock:t,activeBlock:n,zoomLevel:o}=Xs(),{blocks:i,sourceBlocks:a}=Lo(),{blocks:s,setCurrentBlock:l,currentBlock:c,setPositionBlock:u,announcement:h}=Hr(),{settings:f}=Sa(),{currentPage:g,pages:m,pageContext:C}=zr(),{activeBlock:I,setActiveBlock:b}=No(),{setError:S}=Xf(),{setActiveBlock:y}=Lo(),T=_.useRef(n.id),k=_.useRef({});_.useEffect(()=>{if(n.id&&n.neededScroll&&k.current[n.id]){const E=k.current[n.id];if(E&&e.current){const M=E.offsetTop;e.current.scrollTo({top:M-30,behavior:"smooth"})}}},[n,e]);const A=Vr();_.useEffect(()=>{T.current=n.id},[n.id]);const P=E=>{if(!E||!E.name)return S({message:"Block or block.name is undefined.",failedSettings:!1,failedThemeSettings:!1,failedPageIds:m&&m[g].id?[m[g].id]:[]}),d.jsx(Wc,{error:"Block or block.name is undefined."});if(!i||!i[E.name])return S({message:'Block "${block.name}" does not exist in blocks.',failedSettings:!1,failedThemeSettings:!1,failedPageIds:m&&m[g].id?[m[g].id]:[]}),d.jsx(Wc,{error:`Block "${E.name}" does not exist in blocks.`});const M=new i[E.name];return E.value&&Object.assign(M,E.value),M.renderBlock(f,C)};return d.jsxs("div",{onClick:E=>{E.stopPropagation()},className:Yr.content,style:{width:"100%",height:"100%",zoom:`${o}`},ref:e,children:[h&&d.jsx(I0,{}),d.jsx(g0,{}),d.jsx("div",{className:Yr.main,children:m&&m[g]&&s[m[g].path]&&s[m[g].path].data&&s[m[g].path].order.map(E=>d.jsxs("div",{ref:M=>k.current[E]=M,onClick:M=>{M.stopPropagation(),y(null),I&&b(null),t({id:E,neededScroll:!0}),setTimeout(()=>{t({id:E,neededScroll:!1})},100),l(null),c?setTimeout(()=>{l(n.id)},100):l(n.id)},onMouseEnter:M=>{M.stopPropagation(),n.neededScroll||t({id:E,neededScroll:!1})},onMouseLeave:M=>{M.stopPropagation(),n.neededScroll||t({id:null,neededScroll:!1})},className:ge(Yr.block),children:[(n.id===E||c===E)&&d.jsx("div",{className:Yr.active}),(n.id===E||c===E)&&d.jsx("div",{className:Yr.name,children:zi(s[m[g].path].data[E].name,a)}),(n.id===E||c===E)&&zi(s[m[g].path].data[E].name,a)!=="unknown name"&&d.jsx(OE,{}),(n.id===E||c===E)&&zi(s[m[g].path].data[E].name,a)!=="unknown name"&&d.jsx("div",{className:Yr.addSection,children:d.jsx(ti,{onClick:M=>{M.stopPropagation(),u(E,!0),l(null),t({id:null,neededScroll:!1}),y(null),A("/admin/builder/add")},children:"Add Section"})}),(n.id===E||c===E)&&zi(s[m[g].path].data[E].name,a)!=="unknown name"&&d.jsx("div",{className:ge(Yr.addSection,Yr.addSectionTop),children:d.jsx(ti,{onClick:M=>{M.stopPropagation(),u(E,!1),l(null),t({id:null,neededScroll:!1}),y(null),A("/admin/builder/add")},children:"Add Section"})}),i&&d.jsx(p0,{render:P,block:s[m[g].path].data[E]})]},E))}),d.jsx(m0,{})]})}),BE="_statItem_fzeec_1",FE="_content_fzeec_44",HE="_withChildren_fzeec_50",jE="_info_fzeec_56",UE="_iconWrapper_fzeec_68",VE="_text_fzeec_78",zE="_title_fzeec_84",$E="_value_fzeec_88",WE="_emptyImage_fzeec_94",qE="_image_fzeec_11",GE="_imageTitle_fzeec_112",YE="_emptyImageText_fzeec_122",ZE="_hoverable_fzeec_147",Wt={statItem:BE,content:FE,withChildren:HE,info:jE,iconWrapper:UE,text:VE,title:zE,value:$E,emptyImage:WE,image:qE,imageTitle:GE,emptyImageText:YE,hoverable:ZE},Zn=({iconName:e,title:t,value:n,image:o,imageName:i,children:a,className:s,logo:l,customLogo:c,productSlug:u})=>{const h=Vr();return d.jsxs("div",{className:`${Wt.statItem} ${s}`,children:[o&&o!=="empty"&&d.jsxs("div",{style:{position:"relative"},onClick:()=>{u&&h(`/${u}`)},children:[d.jsx("div",{style:{background:"#000000"},children:d.jsx("img",{src:o,alt:i,className:ge(Wt.image,Wt.emptyImage,{[Wt.hoverable]:u})})}),d.jsx("div",{className:Wt.emptyImageText,children:d.jsx("div",{className:ge(Wt.title,Wt.imageTitle),id:"h5",children:i})})]}),o==="empty"&&d.jsx("div",{style:{background:"#000000"},children:d.jsxs("div",{className:ge(Wt.emptyImage,{[Wt.hoverable]:u}),onClick:()=>{u&&h(`/${u}`)},children:[d.jsx(ie,{name:"Image",width:64,height:64,fill:"var(--text-secondary)"}),d.jsx("div",{className:Wt.emptyImageText,children:d.jsx("div",{className:Wt.title,id:"h5",children:i||"No Product"})})]})}),d.jsxs("div",{className:`${Wt.content} ${a?Wt.withChildren:""}`,children:[d.jsxs("div",{className:Wt.info,children:[c?d.jsx("div",{style:{color:"var(--text-action)"},children:c}):l?d.jsx("div",{className:Wt.iconWrapper,children:d.jsx("img",{src:l,width:28,height:28,style:{objectFit:"contain"}})}):d.jsx(ie,{name:e||"File",className:Wt.iconWrapper,width:28,height:28,fill:"var(--text-action)"}),d.jsxs("div",{className:Wt.text,children:[d.jsx("div",{className:Wt.title,id:"h5",children:t}),d.jsx("div",{className:Wt.value,id:"h5-bold",children:n})]})]}),a]})]})},XE="_card_8m277_2",KE="_mobile_8m277_15",QE="_email_8m277_19",JE="_balance_8m277_25",eT="_sidebar_8m277_32",tT="_sidebarAntistock_8m277_33",nT="_navList_8m277_68",rT="_navListAntistock_8m277_86",oT="_navItem_8m277_91",iT="_antistockNavItem_8m277_92",aT="_activeNavItem_8m277_116",sT="_antistockActiveNavItem_8m277_121",lT="_antistockInactiveNavItem_8m277_139",cT="_inactiveNavItem_8m277_140",uT="_logoutNavItem_8m277_150",dT="_logoutNavItemAntistock_8m277_159",hT="_logoutNavItemContentAntistock_8m277_173",fT="_iconWrapper_8m277_185",pT="_skeleton_8m277_190",yt={card:XE,mobile:KE,email:QE,balance:JE,sidebar:eT,sidebarAntistock:tT,navList:nT,navListAntistock:rT,navItem:oT,antistockNavItem:iT,activeNavItem:aT,antistockActiveNavItem:sT,antistockInactiveNavItem:lT,inactiveNavItem:cT,logoutNavItem:uT,logoutNavItemAntistock:dT,logoutNavItemContentAntistock:hT,iconWrapper:fT,skeleton:pT},mT=({email:e,balance:t,adaptiveStyles:n})=>d.jsxs("div",{className:ge(yt.card,{[yt.mobile]:n!=="desktop"}),children:[d.jsx("div",{className:yt.email,id:"h5",children:e}),d.jsxs("div",{className:yt.balance,id:"md",children:["Balance: ",t]})]}),gT=[[Ut.Home,"House"],[Ut.Orders,"CurrencyCircleDollar"],[Ut.Rewards,"Medal"],[Ut.Balance,"Wallet"],[Ut.Subscriptions,"CalendarCheck"],[Ut.Tickets,"Question"]],IT=[[Hi.Home,"House"],[Hi.Orders,"CurrencyCircleDollar"],[Hi.Balance,"Wallet"],[Hi.Tickets,"Question"]],$1=({children:e,className:t="",onClick:n})=>{const{isAntistock:o}=mt();return d.jsx("button",{type:"button",className:ge(o?yt.antistockNavItem:yt.navItem,t),onClick:n,children:e})},CT=({adaptiveStyles:e})=>{const{route:t,setRoute:n}=rr(),{isAntistock:o}=mt(),i=o?IT:gT;return d.jsxs("div",{className:ge(yt.navList,{[yt.mobile]:e!=="desktop",[yt.navListAntistock]:o}),children:[i.map(([a,s])=>{const l=a===t;return d.jsxs($1,{onClick:()=>n(a),className:ge(l?o?yt.antistockActiveNavItem:yt.activeNavItem:o?yt.antistockInactiveNavItem:yt.inactiveNavItem),children:[o?null:d.jsx("div",{className:yt.iconWrapper,children:d.jsx(ie,{name:s})}),d.jsx("div",{children:a})]},a)}),d.jsx($1,{className:ge(yt.logoutNavItem,{[yt.logoutNavItemAntistock]:o}),onClick:()=>{o||Gc()},children:o?d.jsxs("div",{className:ge({[yt.logoutNavItemContentAntistock]:o}),onClick:()=>{Gc()},children:[d.jsx("div",{className:yt.iconWrapper,children:d.jsx(ie,{name:"SignOut"})}),d.jsx("div",{children:"Sign Out"})]}):d.jsxs(d.Fragment,{children:[d.jsx("div",{className:yt.iconWrapper,children:d.jsx(ie,{name:"SignOut"})}),d.jsx("div",{children:"Sign Out"})]})})]})};var Ge=(e=>(e.New="NEW",e.Pending="PENDING",e.Completed="COMPLETED",e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.FullDeliveryFailure="FULL_DELIVERY_FAILURE",e.PartiallyDelivered="PARTIALLY_DELIVERED",e.Refunded="REFUNDED",e.Failed="FAILED",e))(Ge||{}),at=(e=>(e.Text="TEXT",e.Serial="SERIALS",e.Ebook="EBOOK",e.Link="LINK",e.Download="DOWNLOAD",e.Discord="DISCORD",e.Custom="CUSTOM",e))(at||{}),Or=(e=>(e.RIAL="RIAL",e.AWAITING_PAYMENT="AWAITING_PAYMENT",e.ACTIVE="ACTIVE",e.PAST_DUE="PAST_DUE",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.CHANGED_GATEWAY="CHANGED_GATEWAY",e.REPLACED="REPLACED",e))(Or||{});const Aa=async e=>(await C0(e)).data,w0=async()=>{var n;const t=(await ky()).data;if(t.isEnabled){const o=(n=t==null?void 0:t.topUpSettings)==null?void 0:n.gateways;o&&Aa(o)}return t},qu=async()=>{const t=(await Ay()).data;return{amount:t.realBalance+t.manualBalance,currency:t.currency}};var $i=(e=>(e.ADDED="ADDED",e.REMOVED="REMOVED",e))($i||{}),it=(e=>(e.NotPaid="NOT_PAID",e.Pending="PENDING",e.Paid="PAID",e.Expired="EXPIRED",e.Cancelled="CANCELLED",e))(it||{}),ha=(e=>(e.Balance="BALANCE",e.Product="PRODUCT",e))(ha||{}),zn=(e=>(e.Spend="SPEND_AMOUNT",e.Order="ORDER_COUNT",e.Referral="REFER_FRIEND",e.Review="LEAVE_REVIEW",e))(zn||{});const bT=async()=>(await vy()).data;/*! *****************************************************************************
|
|
74
74
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
75
75
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
76
76
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -17841,9 +17841,6 @@ const vRe = $.forwardRef(
|
|
|
17841
17841
|
},
|
|
17842
17842
|
value: i,
|
|
17843
17843
|
autoComplete: "off",
|
|
17844
|
-
autoCorrect: "off",
|
|
17845
|
-
spellCheck: !1,
|
|
17846
|
-
inputMode: "none",
|
|
17847
17844
|
placeholder: l || "Type something...",
|
|
17848
17845
|
className: me(kn.input, {
|
|
17849
17846
|
[kn.required]: P && d && !j(i),
|
|
@@ -17853,7 +17850,7 @@ const vRe = $.forwardRef(
|
|
|
17853
17850
|
min: a === "number" ? o : void 0,
|
|
17854
17851
|
max: a === "number" ? s : void 0,
|
|
17855
17852
|
onFocus: () => {
|
|
17856
|
-
I
|
|
17853
|
+
I == null || I(), O(!0);
|
|
17857
17854
|
},
|
|
17858
17855
|
disabled: u,
|
|
17859
17856
|
style: {
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./builder.cjs.js"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./builder.cjs.js"),t=require("./index-B7gaqj-C.cjs");exports.App=e.App;exports.Checkout=e.Checkout;exports.ColorVariables=e.ColorVariables;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.useBalance=e.useBalance;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.ReCaptchaProvider=t.ReCaptchaProvider;exports.aspectRatioOptions=t.aspectRatioOptions;exports.formatPrice=t.formatPrice;exports.parseDraftJsText=t.parseDraftJsText;exports.splitTextIntoSpans=t.splitTextIntoSpans;exports.useAdaptiveStyles=t.useAdaptiveStyles;exports.useCart=t.useCart;exports.useGeneralInfo=t.useGeneralInfo;exports.useReCaptcha=t.useReCaptcha;
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { App as s, Checkout as t, ColorVariables as o, hotReload as r, iconNames as i, removeNotification as p, showNotification as c, useBalance as u, useBuilderPages as n, useCreateTicket as f } from "./builder.es.js";
|
|
2
|
-
import { R as C, a as d, f as h, p as m, s as R, d as x, b as v, c as N, u as P } from "./index-
|
|
2
|
+
import { R as C, a as d, f as h, p as m, s as R, d as x, b as v, c as N, u as P } from "./index-DD0tv6Rp.js";
|
|
3
3
|
export {
|
|
4
4
|
s as App,
|
|
5
5
|
t as Checkout,
|