react-beauty-calendar 1.5.0 → 2.0.0
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/build/main.cjs.js +1 -1
- package/dist/build/main.es.js +2 -1
- package/package.json +2 -1
package/dist/build/main.cjs.js
CHANGED
|
@@ -187,7 +187,7 @@ object-assign
|
|
|
187
187
|
*/var ai,du;function rT(){if(du)return ai;du=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var i={},a=0;a<10;a++)i["_"+String.fromCharCode(a)]=a;var l=Object.getOwnPropertyNames(i).map(function(u){return i[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ai=o()?Object.assign:function(s,i){for(var a,l=r(s),c,u=1;u<arguments.length;u++){a=Object(arguments[u]);for(var d in a)t.call(a,d)&&(l[d]=a[d]);if(e){c=e(a);for(var f=0;f<c.length;f++)n.call(a,c[f])&&(l[c[f]]=a[c[f]])}}return l},ai}var li,fu;function wl(){if(fu)return li;fu=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return li=e,li}var ci,hu;function Mg(){return hu||(hu=1,ci=Function.call.bind(Object.prototype.hasOwnProperty)),ci}var ui,pu;function oT(){if(pu)return ui;pu=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=wl(),n={},r=Mg();e=function(s){var i="Warning: "+s;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function o(s,i,a,l,c){if(process.env.NODE_ENV!=="production"){for(var u in s)if(r(s,u)){var d;try{if(typeof s[u]!="function"){var f=Error((l||"React class")+": "+a+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof s[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=s[u](i,u,l,a,null,t)}catch(m){d=m}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+a+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var h=c?c():"";e("Failed "+a+" type: "+d.message+(h??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},ui=o,ui}var di,gu;function sT(){if(gu)return di;gu=1;var e=Tg(),t=rT(),n=wl(),r=Mg(),o=oT(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function i(){return null}return di=function(a,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(k){var I=k&&(c&&k[c]||k[u]);if(typeof I=="function")return I}var f="<<anonymous>>",h={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:g(),arrayOf:w,element:C(),elementType:x(),instanceOf:M,node:E(),objectOf:D,oneOf:S,oneOfType:P,shape:F,exact:W};function m(k,I){return k===I?k!==0||1/k===1/I:k!==k&&I!==I}function p(k,I){this.message=k,this.data=I&&typeof I=="object"?I:{},this.stack=""}p.prototype=Error.prototype;function b(k){if(process.env.NODE_ENV!=="production")var I={},$=0;function H(Z,q,B,K,X,G,ne){if(K=K||f,G=G||B,ne!==n){if(l){var z=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw z.name="Invariant Violation",z}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var le=K+":"+B;!I[le]&&$<3&&(s("You are manually calling a React.PropTypes validation function for the `"+G+"` prop on `"+K+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),I[le]=!0,$++)}}return q[B]==null?Z?q[B]===null?new p("The "+X+" `"+G+"` is marked as required "+("in `"+K+"`, but its value is `null`.")):new p("The "+X+" `"+G+"` is marked as required in "+("`"+K+"`, but its value is `undefined`.")):null:k(q,B,K,X,G)}var U=H.bind(null,!1);return U.isRequired=H.bind(null,!0),U}function y(k){function I($,H,U,Z,q,B){var K=$[H],X=_(K);if(X!==k){var G=N(K);return new p("Invalid "+Z+" `"+q+"` of type "+("`"+G+"` supplied to `"+U+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return b(I)}function g(){return b(i)}function w(k){function I($,H,U,Z,q){if(typeof k!="function")return new p("Property `"+q+"` of component `"+U+"` has invalid PropType notation inside arrayOf.");var B=$[H];if(!Array.isArray(B)){var K=_(B);return new p("Invalid "+Z+" `"+q+"` of type "+("`"+K+"` supplied to `"+U+"`, expected an array."))}for(var X=0;X<B.length;X++){var G=k(B,X,U,Z,q+"["+X+"]",n);if(G instanceof Error)return G}return null}return b(I)}function C(){function k(I,$,H,U,Z){var q=I[$];if(!a(q)){var B=_(q);return new p("Invalid "+U+" `"+Z+"` of type "+("`"+B+"` supplied to `"+H+"`, expected a single ReactElement."))}return null}return b(k)}function x(){function k(I,$,H,U,Z){var q=I[$];if(!e.isValidElementType(q)){var B=_(q);return new p("Invalid "+U+" `"+Z+"` of type "+("`"+B+"` supplied to `"+H+"`, expected a single ReactElement type."))}return null}return b(k)}function M(k){function I($,H,U,Z,q){if(!($[H]instanceof k)){var B=k.name||f,K=V($[H]);return new p("Invalid "+Z+" `"+q+"` of type "+("`"+K+"` supplied to `"+U+"`, expected ")+("instance of `"+B+"`."))}return null}return b(I)}function S(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):s("Invalid argument supplied to oneOf, expected an array.")),i;function I($,H,U,Z,q){for(var B=$[H],K=0;K<k.length;K++)if(m(B,k[K]))return null;var X=JSON.stringify(k,function(ne,z){var le=N(z);return le==="symbol"?String(z):z});return new p("Invalid "+Z+" `"+q+"` of value `"+String(B)+"` "+("supplied to `"+U+"`, expected one of "+X+"."))}return b(I)}function D(k){function I($,H,U,Z,q){if(typeof k!="function")return new p("Property `"+q+"` of component `"+U+"` has invalid PropType notation inside objectOf.");var B=$[H],K=_(B);if(K!=="object")return new p("Invalid "+Z+" `"+q+"` of type "+("`"+K+"` supplied to `"+U+"`, expected an object."));for(var X in B)if(r(B,X)){var G=k(B,X,U,Z,q+"."+X,n);if(G instanceof Error)return G}return null}return b(I)}function P(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var I=0;I<k.length;I++){var $=k[I];if(typeof $!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+O($)+" at index "+I+"."),i}function H(U,Z,q,B,K){for(var X=[],G=0;G<k.length;G++){var ne=k[G],z=ne(U,Z,q,B,K,n);if(z==null)return null;z.data&&r(z.data,"expectedType")&&X.push(z.data.expectedType)}var le=X.length>0?", expected one of type ["+X.join(", ")+"]":"";return new p("Invalid "+B+" `"+K+"` supplied to "+("`"+q+"`"+le+"."))}return b(H)}function E(){function k(I,$,H,U,Z){return L(I[$])?null:new p("Invalid "+U+" `"+Z+"` supplied to "+("`"+H+"`, expected a ReactNode."))}return b(k)}function A(k,I,$,H,U){return new p((k||"React class")+": "+I+" type `"+$+"."+H+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+U+"`.")}function F(k){function I($,H,U,Z,q){var B=$[H],K=_(B);if(K!=="object")return new p("Invalid "+Z+" `"+q+"` of type `"+K+"` "+("supplied to `"+U+"`, expected `object`."));for(var X in k){var G=k[X];if(typeof G!="function")return A(U,Z,q,X,N(G));var ne=G(B,X,U,Z,q+"."+X,n);if(ne)return ne}return null}return b(I)}function W(k){function I($,H,U,Z,q){var B=$[H],K=_(B);if(K!=="object")return new p("Invalid "+Z+" `"+q+"` of type `"+K+"` "+("supplied to `"+U+"`, expected `object`."));var X=t({},$[H],k);for(var G in X){var ne=k[G];if(r(k,G)&&typeof ne!="function")return A(U,Z,q,G,N(ne));if(!ne)return new p("Invalid "+Z+" `"+q+"` key `"+G+"` supplied to `"+U+"`.\nBad object: "+JSON.stringify($[H],null," ")+`
|
|
188
188
|
Valid keys: `+JSON.stringify(Object.keys(k),null," "));var z=ne(B,G,U,Z,q+"."+G,n);if(z)return z}return null}return b(I)}function L(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(L);if(k===null||a(k))return!0;var I=d(k);if(I){var $=I.call(k),H;if(I!==k.entries){for(;!(H=$.next()).done;)if(!L(H.value))return!1}else for(;!(H=$.next()).done;){var U=H.value;if(U&&!L(U[1]))return!1}}else return!1;return!0;default:return!1}}function j(k,I){return k==="symbol"?!0:I?I["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&I instanceof Symbol:!1}function _(k){var I=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":j(I,k)?"symbol":I}function N(k){if(typeof k>"u"||k===null)return""+k;var I=_(k);if(I==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return I}function O(k){var I=N(k);switch(I){case"array":case"object":return"an "+I;case"boolean":case"date":case"regexp":return"a "+I;default:return I}}function V(k){return!k.constructor||!k.constructor.name?f:k.constructor.name}return h.checkPropTypes=o,h.resetWarningCache=o.resetWarningCache,h.PropTypes=h,h},di}var fi,mu;function iT(){if(mu)return fi;mu=1;var e=wl();function t(){}function n(){}return n.resetWarningCache=t,fi=function(){function r(i,a,l,c,u,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function o(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},fi}var vu;function ks(){if(vu)return yo.exports;if(vu=1,process.env.NODE_ENV!=="production"){var e=Tg(),t=!0;yo.exports=sT()(e.isElement,t)}else yo.exports=iT()();return yo.exports}function Pg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Pg(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function yu(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Pg(e))&&(r&&(r+=" "),r+=t);return r}const aT=Object.freeze(Object.defineProperty({__proto__:null,clsx:yu,default:yu},Symbol.toStringTag,{value:"Module"})),lT=qv(aT);var be={},Vt={},wu;function Is(){if(wu)return Vt;wu=1,Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.dontSetMe=o,Vt.findInArray=e,Vt.int=r,Vt.isFunction=t,Vt.isNum=n;function e(s,i){for(let a=0,l=s.length;a<l;a++)if(i.apply(i,[s[a],a,s]))return s[a]}function t(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Function]"}function n(s){return typeof s=="number"&&!isNaN(s)}function r(s){return parseInt(s,10)}function o(s,i,a){if(s[i])return new Error("Invalid prop ".concat(i," passed to ").concat(a," - do not set this, set it on the child."))}return Vt}var Lt={},xu;function cT(){if(xu)return Lt;xu=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.browserPrefixToKey=n,Lt.browserPrefixToStyle=r,Lt.default=void 0,Lt.getPrefix=t;const e=["Moz","Webkit","O","ms"];function t(){var s;let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const a=(s=window.document)===null||s===void 0||(s=s.documentElement)===null||s===void 0?void 0:s.style;if(!a||i in a)return"";for(let l=0;l<e.length;l++)if(n(i,e[l])in a)return e[l];return""}function n(s,i){return i?"".concat(i).concat(o(s)):s}function r(s,i){return i?"-".concat(i.toLowerCase(),"-").concat(s):s}function o(s){let i="",a=!0;for(let l=0;l<s.length;l++)a?(i+=s[l].toUpperCase(),a=!1):s[l]==="-"?a=!0:i+=s[l];return i}return Lt.default=t(),Lt}var bu;function xl(){if(bu)return be;bu=1,Object.defineProperty(be,"__esModule",{value:!0}),be.addClassName=x,be.addEvent=a,be.addUserSelectStyles=w,be.createCSSTransform=m,be.createSVGTransform=p,be.getTouch=y,be.getTouchIdentifier=g,be.getTranslation=b,be.innerHeight=d,be.innerWidth=f,be.matchesSelector=s,be.matchesSelectorAndParentsTo=i,be.offsetXYFromParent=h,be.outerHeight=c,be.outerWidth=u,be.removeClassName=M,be.removeEvent=l,be.removeUserSelectStyles=C;var e=Is(),t=r(cT());function n(S){if(typeof WeakMap!="function")return null;var D=new WeakMap,P=new WeakMap;return(n=function(E){return E?P:D})(S)}function r(S,D){if(S&&S.__esModule)return S;if(S===null||typeof S!="object"&&typeof S!="function")return{default:S};var P=n(D);if(P&&P.has(S))return P.get(S);var E={},A=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var F in S)if(F!=="default"&&Object.prototype.hasOwnProperty.call(S,F)){var W=A?Object.getOwnPropertyDescriptor(S,F):null;W&&(W.get||W.set)?Object.defineProperty(E,F,W):E[F]=S[F]}return E.default=S,P&&P.set(S,E),E}let o="";function s(S,D){return o||(o=(0,e.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(P){return(0,e.isFunction)(S[P])})),(0,e.isFunction)(S[o])?S[o](D):!1}function i(S,D,P){let E=S;do{if(s(E,D))return!0;if(E===P)return!1;E=E.parentNode}while(E);return!1}function a(S,D,P,E){if(!S)return;const A={capture:!0,...E};S.addEventListener?S.addEventListener(D,P,A):S.attachEvent?S.attachEvent("on"+D,P):S["on"+D]=P}function l(S,D,P,E){if(!S)return;const A={capture:!0,...E};S.removeEventListener?S.removeEventListener(D,P,A):S.detachEvent?S.detachEvent("on"+D,P):S["on"+D]=null}function c(S){let D=S.clientHeight;const P=S.ownerDocument.defaultView.getComputedStyle(S);return D+=(0,e.int)(P.borderTopWidth),D+=(0,e.int)(P.borderBottomWidth),D}function u(S){let D=S.clientWidth;const P=S.ownerDocument.defaultView.getComputedStyle(S);return D+=(0,e.int)(P.borderLeftWidth),D+=(0,e.int)(P.borderRightWidth),D}function d(S){let D=S.clientHeight;const P=S.ownerDocument.defaultView.getComputedStyle(S);return D-=(0,e.int)(P.paddingTop),D-=(0,e.int)(P.paddingBottom),D}function f(S){let D=S.clientWidth;const P=S.ownerDocument.defaultView.getComputedStyle(S);return D-=(0,e.int)(P.paddingLeft),D-=(0,e.int)(P.paddingRight),D}function h(S,D,P){const A=D===D.ownerDocument.body?{left:0,top:0}:D.getBoundingClientRect(),F=(S.clientX+D.scrollLeft-A.left)/P,W=(S.clientY+D.scrollTop-A.top)/P;return{x:F,y:W}}function m(S,D){const P=b(S,D,"px");return{[(0,t.browserPrefixToKey)("transform",t.default)]:P}}function p(S,D){return b(S,D,"")}function b(S,D,P){let{x:E,y:A}=S,F="translate(".concat(E).concat(P,",").concat(A).concat(P,")");if(D){const W="".concat(typeof D.x=="string"?D.x:D.x+P),L="".concat(typeof D.y=="string"?D.y:D.y+P);F="translate(".concat(W,", ").concat(L,")")+F}return F}function y(S,D){return S.targetTouches&&(0,e.findInArray)(S.targetTouches,P=>D===P.identifier)||S.changedTouches&&(0,e.findInArray)(S.changedTouches,P=>D===P.identifier)}function g(S){if(S.targetTouches&&S.targetTouches[0])return S.targetTouches[0].identifier;if(S.changedTouches&&S.changedTouches[0])return S.changedTouches[0].identifier}function w(S){if(!S)return;let D=S.getElementById("react-draggable-style-el");D||(D=S.createElement("style"),D.type="text/css",D.id="react-draggable-style-el",D.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
189
189
|
`,D.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
190
|
-
`,S.getElementsByTagName("head")[0].appendChild(D)),S.body&&x(S.body,"react-draggable-transparent-selection")}function C(S){if(S)try{if(S.body&&M(S.body,"react-draggable-transparent-selection"),S.selection)S.selection.empty();else{const D=(S.defaultView||window).getSelection();D&&D.type!=="Caret"&&D.removeAllRanges()}}catch{}}function x(S,D){S.classList?S.classList.add(D):S.className.match(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)")))||(S.className+=" ".concat(D))}function M(S,D){S.classList?S.classList.remove(D):S.className=S.className.replace(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)"),"g"),"")}return be}var ft={},Su;function Eg(){if(Su)return ft;Su=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.canDragX=o,ft.canDragY=s,ft.createCoreData=a,ft.createDraggableData=l,ft.getBoundPosition=n,ft.getControlPosition=i,ft.snapToGrid=r;var e=Is(),t=xl();function n(d,f,h){if(!d.props.bounds)return[f,h];let{bounds:m}=d.props;m=typeof m=="string"?m:c(m);const p=u(d);if(typeof m=="string"){const{ownerDocument:b}=p,y=b.defaultView;let g;if(m==="parent"?g=p.parentNode:g=b.querySelector(m),!(g instanceof y.HTMLElement))throw new Error('Bounds selector "'+m+'" could not find an element.');const w=g,C=y.getComputedStyle(p),x=y.getComputedStyle(w);m={left:-p.offsetLeft+(0,e.int)(x.paddingLeft)+(0,e.int)(C.marginLeft),top:-p.offsetTop+(0,e.int)(x.paddingTop)+(0,e.int)(C.marginTop),right:(0,t.innerWidth)(w)-(0,t.outerWidth)(p)-p.offsetLeft+(0,e.int)(x.paddingRight)-(0,e.int)(C.marginRight),bottom:(0,t.innerHeight)(w)-(0,t.outerHeight)(p)-p.offsetTop+(0,e.int)(x.paddingBottom)-(0,e.int)(C.marginBottom)}}return(0,e.isNum)(m.right)&&(f=Math.min(f,m.right)),(0,e.isNum)(m.bottom)&&(h=Math.min(h,m.bottom)),(0,e.isNum)(m.left)&&(f=Math.max(f,m.left)),(0,e.isNum)(m.top)&&(h=Math.max(h,m.top)),[f,h]}function r(d,f,h){const m=Math.round(f/d[0])*d[0],p=Math.round(h/d[1])*d[1];return[m,p]}function o(d){return d.props.axis==="both"||d.props.axis==="x"}function s(d){return d.props.axis==="both"||d.props.axis==="y"}function i(d,f,h){const m=typeof f=="number"?(0,t.getTouch)(d,f):null;if(typeof f=="number"&&!m)return null;const p=u(h),b=h.props.offsetParent||p.offsetParent||p.ownerDocument.body;return(0,t.offsetXYFromParent)(m||d,b,h.props.scale)}function a(d,f,h){const m=!(0,e.isNum)(d.lastX),p=u(d);return m?{node:p,deltaX:0,deltaY:0,lastX:f,lastY:h,x:f,y:h}:{node:p,deltaX:f-d.lastX,deltaY:h-d.lastY,lastX:d.lastX,lastY:d.lastY,x:f,y:h}}function l(d,f){const h=d.props.scale;return{node:f.node,x:d.state.x+f.deltaX/h,y:d.state.y+f.deltaY/h,deltaX:f.deltaX/h,deltaY:f.deltaY/h,lastX:d.state.x,lastY:d.state.y}}function c(d){return{left:d.left,top:d.top,right:d.right,bottom:d.bottom}}function u(d){const f=d.findDOMNode();if(!f)throw new Error("<DraggableCore>: Unmounted during event!");return f}return ft}var fr={},xo={},Cu;function Ag(){if(Cu)return xo;Cu=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.default=e;function e(){}return xo}var Ru;function uT(){if(Ru)return fr;Ru=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.default=void 0;var e=c(T),t=a(ks()),n=a(Ct),r=xl(),o=Eg(),s=Is(),i=a(Ag());function a(b){return b&&b.__esModule?b:{default:b}}function l(b){if(typeof WeakMap!="function")return null;var y=new WeakMap,g=new WeakMap;return(l=function(w){return w?g:y})(b)}function c(b,y){if(b&&b.__esModule)return b;if(b===null||typeof b!="object"&&typeof b!="function")return{default:b};var g=l(y);if(g&&g.has(b))return g.get(b);var w={},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in b)if(x!=="default"&&Object.prototype.hasOwnProperty.call(b,x)){var M=C?Object.getOwnPropertyDescriptor(b,x):null;M&&(M.get||M.set)?Object.defineProperty(w,x,M):w[x]=b[x]}return w.default=b,g&&g.set(b,w),w}function u(b,y,g){return y=d(y),y in b?Object.defineProperty(b,y,{value:g,enumerable:!0,configurable:!0,writable:!0}):b[y]=g,b}function d(b){var y=f(b,"string");return typeof y=="symbol"?y:String(y)}function f(b,y){if(typeof b!="object"||b===null)return b;var g=b[Symbol.toPrimitive];if(g!==void 0){var w=g.call(b,y);if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(b)}const h={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let m=h.mouse,p=class extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",y=>{if(this.props.onMouseDown(y),!this.props.allowAnyClick&&typeof y.button=="number"&&y.button!==0)return!1;const g=this.findDOMNode();if(!g||!g.ownerDocument||!g.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:w}=g;if(this.props.disabled||!(y.target instanceof w.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(y.target,this.props.handle,g)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(y.target,this.props.cancel,g))return;y.type==="touchstart"&&y.preventDefault();const C=(0,r.getTouchIdentifier)(y);this.touchIdentifier=C;const x=(0,o.getControlPosition)(y,C,this);if(x==null)return;const{x:M,y:S}=x,D=(0,o.createCoreData)(this,M,S);(0,i.default)("DraggableCore: handleDragStart: %j",D),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(y,D)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(w),this.dragging=!0,this.lastX=M,this.lastY=S,(0,r.addEvent)(w,m.move,this.handleDrag),(0,r.addEvent)(w,m.stop,this.handleDragStop))}),u(this,"handleDrag",y=>{const g=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(g==null)return;let{x:w,y:C}=g;if(Array.isArray(this.props.grid)){let S=w-this.lastX,D=C-this.lastY;if([S,D]=(0,o.snapToGrid)(this.props.grid,S,D),!S&&!D)return;w=this.lastX+S,C=this.lastY+D}const x=(0,o.createCoreData)(this,w,C);if((0,i.default)("DraggableCore: handleDrag: %j",x),this.props.onDrag(y,x)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const D=document.createEvent("MouseEvents");D.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(D)}return}this.lastX=w,this.lastY=C}),u(this,"handleDragStop",y=>{if(!this.dragging)return;const g=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(g==null)return;let{x:w,y:C}=g;if(Array.isArray(this.props.grid)){let D=w-this.lastX||0,P=C-this.lastY||0;[D,P]=(0,o.snapToGrid)(this.props.grid,D,P),w=this.lastX+D,C=this.lastY+P}const x=(0,o.createCoreData)(this,w,C);if(this.props.onStop(y,x)===!1||this.mounted===!1)return!1;const S=this.findDOMNode();S&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(S.ownerDocument),(0,i.default)("DraggableCore: handleDragStop: %j",x),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,S&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(S.ownerDocument,m.move,this.handleDrag),(0,r.removeEvent)(S.ownerDocument,m.stop,this.handleDragStop))}),u(this,"onMouseDown",y=>(m=h.mouse,this.handleDragStart(y))),u(this,"onMouseUp",y=>(m=h.mouse,this.handleDragStop(y))),u(this,"onTouchStart",y=>(m=h.touch,this.handleDragStart(y))),u(this,"onTouchEnd",y=>(m=h.touch,this.handleDragStop(y)))}componentDidMount(){this.mounted=!0;const y=this.findDOMNode();y&&(0,r.addEvent)(y,h.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const y=this.findDOMNode();if(y){const{ownerDocument:g}=y;(0,r.removeEvent)(g,h.mouse.move,this.handleDrag),(0,r.removeEvent)(g,h.touch.move,this.handleDrag),(0,r.removeEvent)(g,h.mouse.stop,this.handleDragStop),(0,r.removeEvent)(g,h.touch.stop,this.handleDragStop),(0,r.removeEvent)(y,h.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(g)}}findDOMNode(){var y,g;return(y=this.props)!==null&&y!==void 0&&y.nodeRef?(g=this.props)===null||g===void 0||(g=g.nodeRef)===null||g===void 0?void 0:g.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return fr.default=p,u(p,"displayName","DraggableCore"),u(p,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(b,y){if(b[y]&&b[y].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),u(p,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),fr}var Du;function dT(){return Du||(Du=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return l.default}}),e.default=void 0;var t=f(T),n=u(ks()),r=u(Ct),o=u(lT),s=xl(),i=Eg(),a=Is(),l=u(uT()),c=u(Ag());function u(g){return g&&g.__esModule?g:{default:g}}function d(g){if(typeof WeakMap!="function")return null;var w=new WeakMap,C=new WeakMap;return(d=function(x){return x?C:w})(g)}function f(g,w){if(g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var C=d(w);if(C&&C.has(g))return C.get(g);var x={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in g)if(S!=="default"&&Object.prototype.hasOwnProperty.call(g,S)){var D=M?Object.getOwnPropertyDescriptor(g,S):null;D&&(D.get||D.set)?Object.defineProperty(x,S,D):x[S]=g[S]}return x.default=g,C&&C.set(g,x),x}function h(){return h=Object.assign?Object.assign.bind():function(g){for(var w=1;w<arguments.length;w++){var C=arguments[w];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(g[x]=C[x])}return g},h.apply(this,arguments)}function m(g,w,C){return w=p(w),w in g?Object.defineProperty(g,w,{value:C,enumerable:!0,configurable:!0,writable:!0}):g[w]=C,g}function p(g){var w=b(g,"string");return typeof w=="symbol"?w:String(w)}function b(g,w){if(typeof g!="object"||g===null)return g;var C=g[Symbol.toPrimitive];if(C!==void 0){var x=C.call(g,w);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(g)}class y extends t.Component{static getDerivedStateFromProps(w,C){let{position:x}=w,{prevPropsPosition:M}=C;return x&&(!M||x.x!==M.x||x.y!==M.y)?((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:x,prevPropsPosition:M}),{x:x.x,y:x.y,prevPropsPosition:{...x}}):null}constructor(w){super(w),m(this,"onDragStart",(C,x)=>{if((0,c.default)("Draggable: onDragStart: %j",x),this.props.onStart(C,(0,i.createDraggableData)(this,x))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),m(this,"onDrag",(C,x)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",x);const M=(0,i.createDraggableData)(this,x),S={x:M.x,y:M.y,slackX:0,slackY:0};if(this.props.bounds){const{x:P,y:E}=S;S.x+=this.state.slackX,S.y+=this.state.slackY;const[A,F]=(0,i.getBoundPosition)(this,S.x,S.y);S.x=A,S.y=F,S.slackX=this.state.slackX+(P-S.x),S.slackY=this.state.slackY+(E-S.y),M.x=S.x,M.y=S.y,M.deltaX=S.x-this.state.x,M.deltaY=S.y-this.state.y}if(this.props.onDrag(C,M)===!1)return!1;this.setState(S)}),m(this,"onDragStop",(C,x)=>{if(!this.state.dragging||this.props.onStop(C,(0,i.createDraggableData)(this,x))===!1)return!1;(0,c.default)("Draggable: onDragStop: %j",x);const S={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:P,y:E}=this.props.position;S.x=P,S.y=E}this.setState(S)}),this.state={dragging:!1,dragged:!1,x:w.position?w.position.x:w.defaultPosition.x,y:w.position?w.position.y:w.defaultPosition.y,prevPropsPosition:{...w.position},slackX:0,slackY:0,isElementSVG:!1},w.position&&!(w.onDrag||w.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var w,C;return(w=(C=this.props)===null||C===void 0||(C=C.nodeRef)===null||C===void 0?void 0:C.current)!==null&&w!==void 0?w:r.default.findDOMNode(this)}render(){const{axis:w,bounds:C,children:x,defaultPosition:M,defaultClassName:S,defaultClassNameDragging:D,defaultClassNameDragged:P,position:E,positionOffset:A,scale:F,...W}=this.props;let L={},j=null;const N=!!!E||this.state.dragging,O=E||M,V={x:(0,i.canDragX)(this)&&N?this.state.x:O.x,y:(0,i.canDragY)(this)&&N?this.state.y:O.y};this.state.isElementSVG?j=(0,s.createSVGTransform)(V,A):L=(0,s.createCSSTransform)(V,A);const k=(0,o.default)(x.props.className||"",S,{[D]:this.state.dragging,[P]:this.state.dragged});return t.createElement(l.default,h({},W,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(x),{className:k,style:{...x.props.style,...L},transform:j}))}}e.default=y,m(y,"displayName","Draggable"),m(y,"propTypes",{...l.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),m(y,"defaultProps",{...l.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(ii)),ii}var Tu;function Og(){if(Tu)return dr.exports;Tu=1;const{default:e,DraggableCore:t}=dT();return dr.exports=e,dr.exports.default=e,dr.exports.DraggableCore=t,dr.exports}var bo={},Mu;function fT(){if(Mu)return bo;Mu=1,bo.__esModule=!0,bo.cloneElement=a;var e=t(T);function t(l){return l&&l.__esModule?l:{default:l}}function n(l,c){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(l);c&&(d=d.filter(function(f){return Object.getOwnPropertyDescriptor(l,f).enumerable})),u.push.apply(u,d)}return u}function r(l){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?n(Object(u),!0).forEach(function(d){o(l,d,u[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):n(Object(u)).forEach(function(d){Object.defineProperty(l,d,Object.getOwnPropertyDescriptor(u,d))})}return l}function o(l,c,u){return c=s(c),c in l?Object.defineProperty(l,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[c]=u,l}function s(l){var c=i(l,"string");return typeof c=="symbol"?c:String(c)}function i(l,c){if(typeof l!="object"||l===null)return l;var u=l[Symbol.toPrimitive];if(u!==void 0){var d=u.call(l,c);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function a(l,c){return c.style&&l.props.style&&(c.style=r(r({},l.props.style),c.style)),c.className&&l.props.className&&(c.className=l.props.className+" "+c.className),e.default.cloneElement(l,c)}return bo}var hr={},Pu;function _g(){if(Pu)return hr;Pu=1,hr.__esModule=!0,hr.resizableProps=void 0;var e=t(ks());Og();function t(r){return r&&r.__esModule?r:{default:r}}var n={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="y"){var l;return(l=e.default.number).isRequired.apply(l,s)}return e.default.number.apply(e.default,s)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="x"){var l;return(l=e.default.number).isRequired.apply(l,s)}return e.default.number.apply(e.default,s)}};return hr.resizableProps=n,hr}var Eu;function kg(){if(Eu)return ur;Eu=1,ur.__esModule=!0,ur.default=void 0;var e=i(T),t=Og(),n=fT(),r=_g(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function s(y){if(typeof WeakMap!="function")return null;var g=new WeakMap,w=new WeakMap;return(s=function(x){return x?w:g})(y)}function i(y,g){if(y&&y.__esModule)return y;if(y===null||typeof y!="object"&&typeof y!="function")return{default:y};var w=s(g);if(w&&w.has(y))return w.get(y);var C={},x=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in y)if(M!=="default"&&Object.prototype.hasOwnProperty.call(y,M)){var S=x?Object.getOwnPropertyDescriptor(y,M):null;S&&(S.get||S.set)?Object.defineProperty(C,M,S):C[M]=y[M]}return C.default=y,w&&w.set(y,C),C}function a(){return a=Object.assign?Object.assign.bind():function(y){for(var g=1;g<arguments.length;g++){var w=arguments[g];for(var C in w)Object.prototype.hasOwnProperty.call(w,C)&&(y[C]=w[C])}return y},a.apply(this,arguments)}function l(y,g){if(y==null)return{};var w={},C=Object.keys(y),x,M;for(M=0;M<C.length;M++)x=C[M],!(g.indexOf(x)>=0)&&(w[x]=y[x]);return w}function c(y,g){var w=Object.keys(y);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(y);g&&(C=C.filter(function(x){return Object.getOwnPropertyDescriptor(y,x).enumerable})),w.push.apply(w,C)}return w}function u(y){for(var g=1;g<arguments.length;g++){var w=arguments[g]!=null?arguments[g]:{};g%2?c(Object(w),!0).forEach(function(C){d(y,C,w[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(w)):c(Object(w)).forEach(function(C){Object.defineProperty(y,C,Object.getOwnPropertyDescriptor(w,C))})}return y}function d(y,g,w){return g=f(g),g in y?Object.defineProperty(y,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):y[g]=w,y}function f(y){var g=h(y,"string");return typeof g=="symbol"?g:String(g)}function h(y,g){if(typeof y!="object"||y===null)return y;var w=y[Symbol.toPrimitive];if(w!==void 0){var C=w.call(y,g);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(y)}function m(y,g){y.prototype=Object.create(g.prototype),y.prototype.constructor=y,p(y,g)}function p(y,g){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,x){return C.__proto__=x,C},p(y,g)}var b=function(y){m(g,y);function g(){for(var C,x=arguments.length,M=new Array(x),S=0;S<x;S++)M[S]=arguments[S];return C=y.call.apply(y,[this].concat(M))||this,C.handleRefs={},C.lastHandleRect=null,C.slack=null,C}var w=g.prototype;return w.componentWillUnmount=function(){this.resetData()},w.resetData=function(){this.lastHandleRect=this.slack=null},w.runConstraints=function(x,M){var S=this.props,D=S.minConstraints,P=S.maxConstraints,E=S.lockAspectRatio;if(!D&&!P&&!E)return[x,M];if(E){var A=this.props.width/this.props.height,F=x-this.props.width,W=M-this.props.height;Math.abs(F)>Math.abs(W*A)?M=x/A:x=M*A}var L=x,j=M,_=this.slack||[0,0],N=_[0],O=_[1];return x+=N,M+=O,D&&(x=Math.max(D[0],x),M=Math.max(D[1],M)),P&&(x=Math.min(P[0],x),M=Math.min(P[1],M)),this.slack=[N+(L-x),O+(j-M)],[x,M]},w.resizeHandler=function(x,M){var S=this;return function(D,P){var E=P.node,A=P.deltaX,F=P.deltaY;x==="onResizeStart"&&S.resetData();var W=(S.props.axis==="both"||S.props.axis==="x")&&M!=="n"&&M!=="s",L=(S.props.axis==="both"||S.props.axis==="y")&&M!=="e"&&M!=="w";if(!(!W&&!L)){var j=M[0],_=M[M.length-1],N=E.getBoundingClientRect();if(S.lastHandleRect!=null){if(_==="w"){var O=N.left-S.lastHandleRect.left;A+=O}if(j==="n"){var V=N.top-S.lastHandleRect.top;F+=V}}S.lastHandleRect=N,_==="w"&&(A=-A),j==="n"&&(F=-F);var k=S.props.width+(W?A/S.props.transformScale:0),I=S.props.height+(L?F/S.props.transformScale:0),$=S.runConstraints(k,I);k=$[0],I=$[1];var H=k!==S.props.width||I!==S.props.height,U=typeof S.props[x]=="function"?S.props[x]:null,Z=x==="onResize"&&!H;U&&!Z&&(D.persist==null||D.persist(),U(D,{node:E,size:{width:k,height:I},handle:M})),x==="onResizeStop"&&S.resetData()}}},w.renderResizeHandle=function(x,M){var S=this.props.handle;if(!S)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+x,ref:M});if(typeof S=="function")return S(x,M);var D=typeof S.type=="string",P=u({ref:M},D?{}:{handleAxis:x});return e.cloneElement(S,P)},w.render=function(){var x=this,M=this.props,S=M.children,D=M.className,P=M.draggableOpts;M.width,M.height,M.handle,M.handleSize,M.lockAspectRatio,M.axis,M.minConstraints,M.maxConstraints,M.onResize,M.onResizeStop,M.onResizeStart;var E=M.resizeHandles;M.transformScale;var A=l(M,o);return(0,n.cloneElement)(S,u(u({},A),{},{className:(D?D+" ":"")+"react-resizable",children:[].concat(S.props.children,E.map(function(F){var W,L=(W=x.handleRefs[F])!=null?W:x.handleRefs[F]=e.createRef();return e.createElement(t.DraggableCore,a({},P,{nodeRef:L,key:"resizableHandle-"+F,onStop:x.resizeHandler("onResizeStop",F),onStart:x.resizeHandler("onResizeStart",F),onDrag:x.resizeHandler("onResize",F)}),x.renderResizeHandle(F,L))}))}))},g}(e.Component);return ur.default=b,b.propTypes=r.resizableProps,b.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},ur}var pr={},Au;function hT(){if(Au)return pr;Au=1,pr.__esModule=!0,pr.default=void 0;var e=a(T),t=s(ks()),n=s(kg()),r=_g(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function s(g){return g&&g.__esModule?g:{default:g}}function i(g){if(typeof WeakMap!="function")return null;var w=new WeakMap,C=new WeakMap;return(i=function(M){return M?C:w})(g)}function a(g,w){if(g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var C=i(w);if(C&&C.has(g))return C.get(g);var x={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in g)if(S!=="default"&&Object.prototype.hasOwnProperty.call(g,S)){var D=M?Object.getOwnPropertyDescriptor(g,S):null;D&&(D.get||D.set)?Object.defineProperty(x,S,D):x[S]=g[S]}return x.default=g,C&&C.set(g,x),x}function l(){return l=Object.assign?Object.assign.bind():function(g){for(var w=1;w<arguments.length;w++){var C=arguments[w];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(g[x]=C[x])}return g},l.apply(this,arguments)}function c(g,w){var C=Object.keys(g);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(g);w&&(x=x.filter(function(M){return Object.getOwnPropertyDescriptor(g,M).enumerable})),C.push.apply(C,x)}return C}function u(g){for(var w=1;w<arguments.length;w++){var C=arguments[w]!=null?arguments[w]:{};w%2?c(Object(C),!0).forEach(function(x){d(g,x,C[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(C)):c(Object(C)).forEach(function(x){Object.defineProperty(g,x,Object.getOwnPropertyDescriptor(C,x))})}return g}function d(g,w,C){return w=f(w),w in g?Object.defineProperty(g,w,{value:C,enumerable:!0,configurable:!0,writable:!0}):g[w]=C,g}function f(g){var w=h(g,"string");return typeof w=="symbol"?w:String(w)}function h(g,w){if(typeof g!="object"||g===null)return g;var C=g[Symbol.toPrimitive];if(C!==void 0){var x=C.call(g,w);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(g)}function m(g,w){if(g==null)return{};var C={},x=Object.keys(g),M,S;for(S=0;S<x.length;S++)M=x[S],!(w.indexOf(M)>=0)&&(C[M]=g[M]);return C}function p(g,w){g.prototype=Object.create(w.prototype),g.prototype.constructor=g,b(g,w)}function b(g,w){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,M){return x.__proto__=M,x},b(g,w)}var y=function(g){p(w,g);function w(){for(var x,M=arguments.length,S=new Array(M),D=0;D<M;D++)S[D]=arguments[D];return x=g.call.apply(g,[this].concat(S))||this,x.state={width:x.props.width,height:x.props.height,propsWidth:x.props.width,propsHeight:x.props.height},x.onResize=function(P,E){var A=E.size;x.props.onResize?(P.persist==null||P.persist(),x.setState(A,function(){return x.props.onResize&&x.props.onResize(P,E)})):x.setState(A)},x}w.getDerivedStateFromProps=function(M,S){return S.propsWidth!==M.width||S.propsHeight!==M.height?{width:M.width,height:M.height,propsWidth:M.width,propsHeight:M.height}:null};var C=w.prototype;return C.render=function(){var M=this.props,S=M.handle,D=M.handleSize;M.onResize;var P=M.onResizeStart,E=M.onResizeStop,A=M.draggableOpts,F=M.minConstraints,W=M.maxConstraints,L=M.lockAspectRatio,j=M.axis;M.width,M.height;var _=M.resizeHandles,N=M.style,O=M.transformScale,V=m(M,o);return e.createElement(n.default,{axis:j,draggableOpts:A,handle:S,handleSize:D,height:this.state.height,lockAspectRatio:L,maxConstraints:W,minConstraints:F,onResizeStart:P,onResize:this.onResize,onResizeStop:E,resizeHandles:_,transformScale:O,width:this.state.width},e.createElement("div",l({},V,{style:u(u({},N),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},w}(e.Component);return pr.default=y,y.propTypes=u(u({},r.resizableProps),{},{children:t.default.element}),pr}var Ou;function pT(){return Ou||(Ou=1,cr.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},cr.exports.Resizable=kg().default,cr.exports.ResizableBox=hT().default),cr.exports}var Ig=pT();const _u=({booking:e,slotData:t,customClasses:n,hoveringAdditionalCardId:r="",children:o,ref:s})=>{const[i,a]=T.useState(!1),{updateIsDragging:l,isDragging:c}=xn(C=>C),{attributes:u,listeners:d,setNodeRef:f,isDragging:h,transform:m}=Fa({id:e.id,data:{type:"booking-slots",booking:e,slotData:t},disabled:e.disabledResize==="full"||e.disabledResize==="half"}),p=m?{transform:`translate3d(${m.x}px, ${m.y}px, 0)`}:void 0;Gr({onDragStart:()=>b(),onDragAbort:()=>y(),onDragCancel:()=>y(),onDragEnd:()=>y()});const b=T.useCallback(()=>{l(!0)},[]),y=T.useCallback(()=>{l(!1)},[]),g=T.useMemo(()=>({cursor:c?"ns-resize":"pointer",width:"100%"}),[c]),w=(C,x)=>r!=null&&r.length?C===x:!1;if(T.useImperativeHandle(s,()=>({changeCurrentCardResize:()=>a(C=>!C)})),!h)return v.jsx("div",{ref:f,className:he("cardContent_render",(i||w(r,e.id))&&"cardContent_render_dragging",n),style:{...p,...g},...d,...u,children:o},e.id)},Ng=({booking:e,slotData:t,events:n,style:r,ref:o})=>{if(!e||!t)return null;const{day:s,hour:i}=t,{users:a}=Hr(m=>m),[l,c]=T.useState(e),u=T.useMemo(()=>a.find(m=>m.id===l.userId),[a,l.userId]),d=T.useMemo(()=>{const m=Y.timeDiffInMinutes(l.finishAt,l.startAt),p=Math.floor(m/60),b=m%60;return p>0?b>0?`${p}h ${b}m`:`${p}h`:`${b}m`},[l.startAt,l.finishAt]),f=T.useMemo(()=>{const m=new Date,p=new Date(l.startAt),b=new Date(l.finishAt);return m>b?"past":m>=p&&m<=b?"current":"future"},[l.startAt,l.finishAt]),h=T.useCallback(()=>{const m=(u==null?void 0:u.profile.color)||"#3b82f6";switch(f){case"past":return{backgroundColor:`${m}60`};case"current":return{backgroundColor:m,boxShadow:`0 0 0 2px ${m}, 0 0 8px ${m}40`};default:return{backgroundColor:`${m}e6`}}},[u==null?void 0:u.profile.color,f]);return T.useEffect(()=>{e&&c(e)},[e]),T.useImperativeHandle(o,()=>({updateBooking:m=>c(m)})),v.jsx("div",{className:he("booking_card_content_container","overflow-hidden transition-all duration-200 hover:shadow-lg","min-h-[3rem] p-1 cursor-pointer relative"),style:{...r,...h()},onPointerUp:n==null?void 0:n.onClick,children:v.jsxs("div",{className:"booking_card_content text-white h-full flex flex-col justify-between",children:[v.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[v.jsx(Yf,{className:"w-3 h-3 opacity-80"}),v.jsx("span",{className:"text-xs font-medium truncate",children:(u==null?void 0:u.profile.name)||`User ${l.userId}`})]}),v.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[v.jsx(Kf,{className:"w-3 h-3 opacity-80"}),v.jsxs("span",{className:"text-xs",children:[Y.dateAndHourDateToString(l.startAt)," -",Y.dateAndHourDateToString(l.finishAt)]})]}),v.jsxs("div",{className:"flex items-center justify-between gap-1",children:[v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(Yo,{className:"w-3 h-3 opacity-80"}),v.jsx("span",{className:"text-xs opacity-90",children:d})]}),f!=="future"&&v.jsx("span",{className:he("text-xs px-1 py-0.5 rounded-full text-white font-medium",f==="current"?"bg-white/20":"bg-black/20"),children:f==="current"?"LIVE":"FEITO"})]})]})},`${s}-${i}`)},ku=({afterResize:e=!1,booking:t,slotData:n,events:r,style:o})=>{if(!t||!n)return null;const{day:s,hour:i}=n,a=T.useMemo(()=>{const l=Y.timeDiffInMinutes(t.finishAt,t.startAt),c=Math.floor(l/60),u=l%60;return c>0?u>0?`${c}h ${u}m`:`${c}h`:u===15?"":`${u}m`},[t.startAt,t.finishAt]);return v.jsxs("div",{className:he("booking_card_content_container","overflow-hidden","min-h-[3rem] p-1 relative"),style:{...o,backgroundColor:"#000456c0"},onPointerUp:r==null?void 0:r.onClick,children:[!e&&v.jsx("div",{className:"absolute top-1 right-1",children:v.jsx("div",{className:"w-2 h-2 bg-white rounded-full animate-ping"})}),v.jsxs("div",{className:"booking_card_content text-white h-full flex flex-col justify-between",children:[v.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[v.jsx(Kf,{className:"w-3 h-3 opacity-80"}),v.jsxs("span",{className:"text-xs",children:[Y.dateAndHourDateToString(t.startAt),"-",Y.dateAndHourDateToString(t.finishAt)]})]}),a.length&&v.jsx("div",{className:"flex items-center justify-between gap-1",children:v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(Yo,{className:"w-3 h-3 opacity-80"}),v.jsx("span",{className:"text-xs opacity-90",children:a})]})})]})]},`${s}-${i}`)};function gT(e,t){const n=e>new Date(t.startAt),r=e<new Date(t.finishAt);return n&&r}const mT={calculateOverlappingBookings:(e,t)=>{const n=t.filter(o=>{const s=new Date(o.startAt).getDate(),i=e.startAt.getDate();return s===i&&o.id!==e.id});let r=0;for(const o of n)gT(e.startAt,o)&&r++;return r}},bl=({resize:e=!1,bookingInit:t,slotData:n,heightStyle:r,topHeightIncrement:o=0,customClasses:s,resizableParam:i,events:a,open:l=!0,lastCard:c,half:u,cardContentRef:d,cardsQuantity:f,cardIndex:h,hoveringAdditionalCardId:m,ref:p})=>{var k;const b=xn(el(I=>I.updateIsDragging)),{emptySlotNodes:y}=Jt(),{bookings:g,onCardResizeEnd:w}=wn(),[C,x]=T.useState(""),M=T.useRef(null),S=(I,$)=>{var H;D("show-handle",!0),i!=null&&i.onResizeStart&&i.onResizeStart(I,$),(H=M.current)==null||H.changeCurrentCardResize()},D=(I="",$=!1)=>{x(I),b($)},P=(I,$)=>{var H;(H=M.current)==null||H.changeCurrentCardResize(),D(),$.handle.includes("n")&&w(ki.resizeBookingNorthId(t)),$.handle.includes("s")&&w(ki.resizeBookingSouthId(t)),i!=null&&i.onResizeStop&&i.onResizeStop(I,$)},E=T.useMemo(()=>mT.calculateOverlappingBookings(t,g),[t,g]),A=I=>I===0?"8rem":"4rem",F=T.useMemo(()=>u&&f===3&&(h===0||h===1)?A(h):E===2?"0.8rem":c&&E===1?"0.2rem":c&&E?"1rem":E===1?"0.4rem":0,[E,h,f]),W=T.useMemo(()=>{const I=`${o}rem`,$=`${r}rem`;if(!u)return{inset:`${I} ${F} ${$}`};if(f===2&&h===1)return{inset:`${I} 0% ${$} 50%`};const H=()=>{const B=100/(f||0),K=(h||0)*B,X=100-K-B;return{cardWidth:B,leftPercent:K,rightPercent:X}},{cardWidth:U,leftPercent:Z,rightPercent:q}=H();return c?{inset:`${I} 0 ${$} ${100-U}%`}:{inset:`${I} ${q}% ${$} ${Z}%`}},[r,o,h,f,F,u,c]),L=(I,$)=>{const H=y.get($);H==null||H.hoveringAdditionalCard(I.id)},j=I=>{const $=y.get(I);$==null||$.clearHoveringCard()},_=(I,$)=>{({mouseenter:()=>L(t,I),mouseleave:()=>j(I)}[$]||(()=>console.warn(`Unhandled event type: ${$}`)))()},N=I=>{const $=I.toDateString();return pn({key:$,time:Pa})},O=I=>{const $=Y.calculateDaysDifference(t.finishAt,t.startAt);if($===1){_(N(t.finishAt),I);return}const H=Y.buildFutureDateList(t,$);for(const U of H)_(N(U),I)},V=I=>{const $=I.type;if(t!=null&&t.nodes)for(const H of t.nodes)_(H,$);O($)};if(T.useEffect(()=>()=>{a!=null&&a.onUnmount&&a.onUnmount()},[]),T.useImperativeHandle(d,()=>({changeCurrentCardResize:()=>{var I;(I=M.current)==null||I.changeCurrentCardResize()}})),!l&&!t.finishAt)return null;if((k=i==null?void 0:i.state)!=null&&k.height){const{state:I,onResize:$,resizeHandle:H=["s","n"]}=i,Z=(()=>{switch(t==null?void 0:t.disabledResize){case"full":return[];case"half":return["s"];default:return H}})();return v.jsx(Ig.Resizable,{className:he(i==null?void 0:i.customClass,C),height:I==null?void 0:I.height,width:I==null?void 0:I.width,onResize:$,onResizeStart:S,onResizeStop:P,resizeHandles:Z,draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:v.jsx("div",{className:"card_content_core",style:W,onMouseEnter:V,onMouseLeave:V,onBlur:()=>{},children:v.jsx(_u,{ref:M,booking:t,slotData:n,hoveringAdditionalCardId:m,children:e?v.jsx(ku,{booking:t,slotData:n,events:{onClick:a==null?void 0:a.onClick}}):v.jsx(Ng,{booking:t,slotData:n,events:{onClick:a==null?void 0:a.onClick}})},t.id)})})}return v.jsx("div",{ref:p,className:"card_content_core",style:W,children:v.jsx(_u,{customClasses:s,booking:t,slotData:n,children:v.jsx(ku,{booking:t,slotData:n,afterResize:!0,events:{onClick:a==null?void 0:a.onClick}})})})},Iu=({booking:e,slotData:t,cardsQuantity:n=1,cardIndex:r=0,lastCard:o=!1,half:s=!1,hoveringAdditionalCardId:i,ref:a})=>{const{bookingViewType:l}=$e(),[c,u]=T.useState({...e});T.useEffect(()=>{e&&u(e)},[e]);const[d,f]=T.useState(!1),h=T.useRef("left"),m=()=>{const M=t.day.split(":")[0].trim();if(l===ae.DAY)h.current="top";else switch(M){case"Mon":case"Sun":h.current="right";break;default:h.current="left";break}f(!0)},p=async M=>{try{u(S=>({...S,finishAt:M}))}catch(S){console.log(S)}},b=async M=>{u(S=>({...S,startAt:M}))},y=async M=>{try{u(S=>({...S,finishAt:M}))}catch(S){console.log(S)}},{state:g,heightStyle:w,topHeightIncrement:C,onResize:x}=$p({booking:c,onAddTime:p,onAddStartTime:b,onSubTime:y,starter:!0});return T.useImperativeHandle(a,()=>({bookingId:e.id}),[e.id]),v.jsx(Dg,{booking:c,onOpenChange:f,side:l===ae.DAY?"top":"left",isEditingOpen:d,children:v.jsx(bl,{resizableParam:{state:g,onResize:x,resizeHandle:["s","n"]},customClasses:"Draggable",bookingInit:c,slotData:t,topHeightIncrement:C,heightStyle:w,events:{onClick:m},half:s,lastCard:o,cardsQuantity:n,cardIndex:r,hoveringAdditionalCardId:i})})},Nu=({bookings:e,blockTimeString:t,slotData:n,hoveringAdditionalCardId:r})=>{if(!e||!(n!=null&&n.day)&&!(n!=null&&n.hour)||!t||!e.length)return null;const o=T.useMemo(()=>e.filter(s=>{const i=Y.dateAndHourDateToString(new Date(s.startAt));return Y.compareSameDate(new Date(n.day),new Date(s.startAt))&&i.split(":")[1]===t}),[e,t]);if(!(!o||!(o!=null&&o.length)))return o.length===1?v.jsx(Iu,{booking:o[0],slotData:n,hoveringAdditionalCardId:r}):v.jsx(v.Fragment,{children:o.map((s,i)=>v.jsx(Iu,{booking:s,half:!0,slotData:n,lastCard:o.length-1===i,cardsQuantity:o.length,cardIndex:i,hoveringAdditionalCardId:r},s.id))})},vT=({booking:e,onAddTime:t,onStartAtChange:n,onSubTime:r,operationalHours:o,starter:s=!1})=>{const[i,a]=T.useState({height:Ht,width:Ht}),[l,c]=T.useState(0),u=(P,E)=>{const A=Y.timeDiffInMinutes(P,E),F=Math.ceil(A/Oo);return-Math.abs((F-1)*2)},[d,f]=T.useState(s?u(e.finishAt,e.startAt):0),h=P=>P===-Math.abs(0)||P===0,m=P=>{const E=((o==null?void 0:o.startTime)||24)-1;return P.getHours()===E&&P.getMinutes()===45},p=P=>{const E=o!=null&&o.endTime?o.endTime+1:0;return P.getHours()===E&&P.getMinutes()===15},b=()=>{const P=C(e.finishAt,"add");return p(P)?!0:(f(E=>h(E)?uf:E-2),t&&t(P),!1)},y=async()=>{const P=C(e.finishAt,"remove");f(E=>E+2),r&&r(P)},g=()=>{const P=x(e.startAt,"remove");return m(P)?!0:(c(E=>E-2),n&&n(P),!1)},w=async()=>{const P=x(e.startAt,"add");c(E=>E+2),n&&n(P)},C=(P,E)=>{const A=new Date(P),F=A.getMinutes();return E==="add"&&A.setMinutes(F+15),E==="remove"&&A.setMinutes(F-15),A},x=(P,E)=>{const A=new Date(P),F=A.getMinutes();return E==="add"&&A.setMinutes(F+15),E==="remove"&&A.setMinutes(F-15),A};return{state:i,setState:a,resetState:()=>{a({height:Ht,width:Ht})},resetHeightStyle:()=>{f(0)},heightStyle:d,topHeightIncrement:l,onResize:(P,{size:E})=>{P.stopPropagation(),P.preventDefault();const A=E.height;a(F=>{let W=!1;return F.height<A&&(l!==0?w():W=b()),F.height>A&&(A<600?W=g():y()),W?{...F}:{...F,height:A}})}}},yT=T.forwardRef(({slotData:e,events:{onClick:t,renderPreviewCard:n}},r)=>{const[o,s]=T.useState(!1),[i,a]=T.useState(e.time),[l,c]=T.useState(Y.addMinutesToHour(i,15)),[u,d]=T.useState(!1),{isDragging:f}=xn(j=>j),{systemColor:h,isTimeInfoVisible:m}=yf(j=>j),{operationalStartTime:p,operationalEndTime:b}=$e(),y=T.useRef(null),g=u?{backgroundColor:"white",border:"none"}:{},w=T.useMemo(()=>({id:"dragging_booking_preview",startAt:Y.convertStringTimeToDateFormat(i),finishAt:Y.convertStringTimeToDateFormat(l)}),[l,i]),C=()=>{var j;(j=y.current)==null||j.changeCurrentCardResize(),d(!0),n()},x=()=>{t(l,i)},{state:M,resetState:S,resetHeightStyle:D,heightStyle:P,onResize:E,topHeightIncrement:A}=vT({booking:w,operationalHours:{startTime:p,endTime:b},onAddTime:j=>{console.log("onAddTime date time",j),c(Y.dateTimeAsString(j))},onStartAtChange:j=>{console.log("onStartAtChange date time",j),a(Y.dateTimeAsString(j))},onSubTime:j=>{console.log("onSubTime date time",j),c(Y.dateTimeAsString(j))}}),F=()=>{},W=()=>{c(Y.addMinutesToHour(e.time,15))},L=()=>{d(!1),W(),S(),D()};if(T.useImperativeHandle(r,()=>({show:()=>s(!0),hide:()=>{s(!1)},changeIsOpen:j=>s(j),reset:L}),[]),!!o)return v.jsx("div",{style:{...g,border:m&&!f?`1.5px solid ${h}`:"none"},className:he("timeInfo_core",g),children:v.jsx(Ig.Resizable,{className:"slot-resizable",height:M.height,width:M.width,onResizeStart:C,onResizeStop:x,onResize:E,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:u?v.jsx("div",{className:"timeInfo_core_dragging",children:v.jsx(bl,{resize:!0,bookingInit:w,slotData:{day:e.key,hour:"09:00"},topHeightIncrement:A,heightStyle:P,cardContentRef:y,resizableParam:{state:M,onResize:E,customClass:"show-handle"},events:{onUnmount:F}})}):v.jsx("div",{className:"timeInfo_core_timeParent",children:!f&&v.jsx("span",{className:"timeInfo_core_timeParent_time",style:{color:h,display:m?"initial":"none"},children:e.time})})})})}),So=({slotData:e,blockTimeString:t,dayHour:n,slotPosition:r,disabledCss:o,events:s,bookings:i,children:a,ref:l})=>{const{isDragging:c,updateIsDragging:u}=xn(J=>J),{emptySlotNodes:d,setSelectedNode:f}=Jt(),{onModalClose:h,onSlotClick:m}=wn(),{startAt:p,finishAt:b,updateDate:y,updateStartAt:g,updateFinishAtWithOffset:w}=gf(J=>J),C=$e(J=>J.bookingViewType),[x,M]=T.useState(!1),[S,D]=T.useState(!1),[P,E]=T.useState([]),[A,F]=T.useState(""),W=T.useRef(null),L=T.useRef(null),j=T.useRef(null),_=J=>{E(ue=>ue.filter(xe=>xe.id!==J.id))},N=(J,ue,xe=!1)=>{const Be=new Date(J.finishAt);Be.setHours(24,0);const tt=[{id:J.id,userId:J.userId,finishAt:xe?Be:J.finishAt,overflow:!0,startAt:ki.resetToFirstHourNextDay(J),disabledResize:xe?"full":"half",nodes:ue}];E(tt)},O=()=>j.current,V=()=>{var J;(J=j.current)==null||J.isModalOpen()},k=()=>{var J;(J=O())==null||J.showCreationModal()},I=()=>{var J;(J=L.current)==null||J.show()},$=()=>{var J;(J=L.current)==null||J.hide()},H=J=>{var ue;(ue=L.current)==null||ue.changeIsOpen(J)},U=T.useMemo(()=>({id:"dragging_booking_preview",startAt:Y.convertStringTimeToDateFormat(p),finishAt:Y.convertStringTimeToDateFormat(b)}),[b,p]),{updateHeightStyle:Z,heightStyle:q}=$p({booking:U}),B=(J,ue)=>!ue||!(ue!=null&&ue.length)?!1:!!ue.find(xe=>Y.dateTimeAsString(xe.startAt)===J),K=T.useCallback(()=>{if(B(e.time,i)||c||V()||x)return;s.onMouseEnterEvent()===r&&I()},[r,c,x,s,P,i]),X=J=>{var Be,tt;console.log("onCloseCreationModal"),(Be=L.current)==null||Be.reset();const ue=pn(e),xe=d==null?void 0:d.get(ue);xe&&xe.closeEvent(),h==null||h(),J==null||J.stopPropagation(),J==null||J.preventDefault(),(tt=O())==null||tt.closeModal()},G=J=>{J||X(),M(J),H(J)},ne=T.useCallback((J,ue)=>{if(c&&!J)return;u(!1);const{time:xe,key:Be,userId:tt}=e,nr=pn({key:Be,time:ue||xe,userId:tt}),rr=d==null?void 0:d.get(nr);f(nr),rr&&rr.showEvent(ue||xe),y(Be);const _t=w(J||xe,J?0:15);m({slotData:e,finishTime:_t}),k()},[e,d,c,m,w]),z=()=>{c||V()||$()},le=o.length||S?o:"hovering_slotTrigger_core",me=T.useCallback(()=>{const{time:J,key:ue}=e;u(!0),D(!0),y(ue),g(J),w(J)},[w,e,y,u,g]),Ie=()=>{k()},Ee=T.useCallback(()=>{D(!1)},[]),ct=()=>{setTimeout(()=>{$(),k(),M(!0)},0)};return T.useEffect(()=>{c?document.body.style.cursor="ns-resize":document.body.style.cursor="default"},[c]),T.useEffect(()=>{if(!b||!p)return;const J=Y.convertStringTimeToDateFormat(b),ue=Y.convertStringTimeToDateFormat(p);Number.isNaN(J)||Number.isNaN(ue)||!(J instanceof Date)||!(ue instanceof Date)||Z(J,ue)},[b,p]),T.useEffect(()=>{if(!x){$();return}W!=null&&W.current&&W.current.scrollIntoView({behavior:"smooth",block:"center"})},[x]),T.useEffect(()=>{i!=null&&i.length&&$(),S&&I()},[i,S]),T.useEffect(()=>{S&&I()},[S]),T.useImperativeHandle(l,()=>({showEvent:J=>{g(J),ct()},closeEvent:()=>{var J;(J=O())==null||J.closeModal(),M(!1),$(),Ee()},onOpenCloseChange:J=>{H(J),M(J),Ee()},addAdditionalBooking:N,removeFromAdditionalBooking:_,hoveringAdditionalCard:J=>{F(J)},clearHoveringCard:()=>{F("")}})),v.jsxs(v.Fragment,{children:[v.jsxs("div",{ref:e.ref,style:{borderBottom:r==="fourth"?"1px solid #8080807a":"",...e.style},className:he("slotTrigger_core",C===ae.DAY&&"slotTrigger_core_day",le),onMouseOver:K,onMouseLeave:z,onFocus:()=>{},children:[v.jsx(yT,{ref:L,slotData:e,events:{onClick:ne,openOptions:Ie,renderPreviewCard:me,resetPrevView:Ee}}),a,x&&v.jsx(bl,{ref:W,bookingInit:U,slotData:{day:new Date().toISOString(),hour:"09:00"},hoveringAdditionalCardId:A,heightStyle:q}),v.jsx(Nu,{hoveringAdditionalCardId:A,bookings:P,blockTimeString:"00",slotData:n}),v.jsx(Nu,{hoveringAdditionalCardId:A,bookings:i,blockTimeString:t,slotData:n})]},e.key),v.jsx(Lp,{ref:j,onClose:X,onOpenChange:G,buttonTrigger:v.jsx("div",{},e.key),side:"right"})]})};var wT="Separator",ju="horizontal",xT=["horizontal","vertical"],jg=R.forwardRef((e,t)=>{const{decorative:n,orientation:r=ju,...o}=e,s=bT(r)?r:ju,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return v.jsx(ce.div,{"data-orientation":s,...a,...o,ref:t})});jg.displayName=wT;function bT(e){return xT.includes(e)}var ST=jg;function CT({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return v.jsx(ST,{"data-slot":"separator-root",decorative:n,orientation:t,className:he("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const RT=La("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function DT({className:e,variant:t,...n}){return v.jsx("div",{className:he(RT({variant:t}),e),...n})}const TT=({dateToRender:e,isFirstDay:t})=>v.jsx("div",{style:{left:t?"3px":"10px"},className:"first_day_slot",children:v.jsx("span",{children:v.jsx(DT,{children:e})})});class MT{constructor(){sn(this,"positionBasedOnSeconds",t=>{const[,n]=t.split(":");if(!t.length)return-3;const r=Number(n);return this.normalizingMinutes(r)});sn(this,"normalizingMinutes",t=>t>=0&&t<=15?t*2:t>15&&t<30?(t-15)*2:t>=30&&t<=59?t-30:-3);sn(this,"isInitialMinute",t=>t>=0&&t<=8);sn(this,"isSameHour",(t,n)=>n.split(":")[0]===t)}}class PT{constructor(){sn(this,"is15MinLess",t=>{const n=new Date,[r,o]=t.split(":"),s=new Date(n.getFullYear(),n.getMonth(),n.getDate(),Number(r),Number(o),0),i=new Date(n),a=Y.roundMinutes(n.getMinutes());i.setHours(n.getHours(),a,0,0);const l=Y.minuteDifference(s,i);return l>30||l<-30});sn(this,"normalizeDateNow",t=>{const n=t.getHours(),r=Y.roundMinutes(t.getMinutes());return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})}}const Co=({color:e="#000",isFirstDay:t,slotData:n})=>{const{bookingViewType:r}=$e(),[o,s]=T.useState(""),[i,a]=T.useState(!1),[l,c]=T.useState(!1),u=T.useMemo(()=>{const y=new Date,g=new Date(n.key);return g.getDay()===y.getDay()&&g.getDate()===y.getDate()},[n.key]),d=y=>{s(y)},f=()=>{a(!0)},h=()=>{a(!1)},m=T.useMemo(()=>new MT().positionBasedOnSeconds(o),[n.time,o]),p=T.useMemo(()=>t?"101%":r===ae.DAY?"102%":"100%",[t,r]),b=T.useMemo(()=>u?{top:`${m-2}px`,left:"0px",width:"100%"}:{top:`${m-1}px`,left:"0px",width:"100%"},[u,t,p,m]);if(T.useEffect(()=>{const y=n.time,g=new PT,w=()=>{const x=new Date,M=g.normalizeDateNow(x),S=Y.dateAndHourDateToString(x);o!==S&&d(S),c(M===y)};let C;return g.is15MinLess(y)||(C=setInterval(()=>w(),1e3)),()=>clearInterval(C)},[n.time,o]),!!l)return v.jsxs("div",{style:{...b},className:he("timeIndicator_today",u&&p,u&&r===ae.WEEK&&"timeIndicator_today_circle"),onMouseEnter:f,onMouseOut:h,onBlur:()=>{},children:[v.jsx(CT,{className:"focus-effect",style:{height:u&&r===ae.WEEK?"4px":"2px",backgroundColor:e}}),i&&v.jsx(TT,{isFirstDay:t,dateToRender:o})]})},Fu=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,userId:a,dayHour:l})=>{const{operationalStartTime:c,operationalEndTime:u}=$e(),{setEmptySlotNode:d,emptySlotNodes:f}=Jt(),h=T.useCallback((g,w)=>{if(!g)return;const C=pn(w);f.get(C)||d(g,w,{startTime:c,endTime:u})},[d,f]),m=(g,w)=>{const C=g.toDateString();return pn({key:C,time:w?Y.dateTimeAsString(w):Pa})},p=T.useCallback(g=>{const w=m(g);return f.get(w)},[f]),b=(g,w,C)=>{const x=Y.buildFutureDateList(g,w);for(let M=0;M<x.length;M++){const S=p(x[M]);if(!S)return;S.addAdditionalBooking(g,C,M!==x.length-1)}},y=T.useCallback(()=>{if(e!=null&&e.length)for(const g of e){const w=Y.calculateDaysDifference(g.finishAt,g.startAt),x=Y.buildFutureDateList(g,w+1,0).map((M,S)=>m(M,S===0?g.startAt:void 0)).filter(M=>M!==void 0);if(w===1){const M=p(g.finishAt);if(!M)return;M.addAdditionalBooking(g,x);return}b(g,w,x)}},[e,p,b]);return T.useEffect(()=>{e!=null&&e.length&&y()},[e,f,y]),v.jsxs(v.Fragment,{children:[v.jsx(So,{ref:g=>h(g,{key:t.key,time:t.time,userId:a}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",dayHour:l,bookings:e,blockTimeString:"00",children:v.jsx(Co,{isFirstDay:i,slotData:t})}),v.jsx(So,{ref:g=>h(g,{key:n.key,time:n.time,userId:a}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},slotPosition:"second",dayHour:l,bookings:e,blockTimeString:"15",children:v.jsx(Co,{isFirstDay:i,slotData:n})}),v.jsx(So,{ref:g=>h(g,{key:r.key,time:r.time,userId:a}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",dayHour:l,bookings:e,blockTimeString:"30",children:v.jsx(Co,{isFirstDay:i,slotData:r})}),v.jsx(So,{ref:g=>h(g,{key:o.key,time:o.time,userId:a}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",dayHour:l,bookings:e,blockTimeString:"45",children:v.jsx(Co,{isFirstDay:i,slotData:o})})]})},ET=T.memo(({firstDay:e,booking:t,dayHour:n,disabledCss:r,user:o,firstBlockTimeData:s,secondBlockTimeData:i,thirdBlockTimeData:a,fourthBlockTimeData:l})=>{const{day:c,hour:u}=n,d=Hr(h=>h.users),f=T.useMemo(()=>t.filter(h=>{const m=Y.dateAndHourDateToString(h.startAt),p=new Date(h.startAt).getDate(),b=new Date(c).getDate(),y=u.split(":")[0],w=m.split(":")[0]===y,C=p===b;if(!(o!=null&&o.id)){const M=d.find(S=>S.id===h.userId);return w&&C&&(M==null?void 0:M.status)}const x=h.userId===o.id;return w&&C&&x}),[t,n,d,o]);return f.length?v.jsx(Fu,{dayHour:n,bookings:f,first:s,second:i,third:a,fourth:l,disabledCss:r,firstDay:e}):v.jsx(Fu,{dayHour:n,first:s,second:i,third:a,fourth:l,disabledCss:r,firstDay:e})}),Vu=({dayHour:e,firstDay:t,user:n,bookingBulk:r})=>{const o=T.useRef(""),s=bf(M=>M.updateStartAt),i=T.useMemo(()=>Y.addMinuteToHour(e.hour,15),[e.hour]),a=T.useMemo(()=>Y.addMinuteToHour(e.hour,30),[e.hour]),l=T.useMemo(()=>Y.addMinuteToHour(e.hour,45),[e.hour]),c=(M,S)=>S?`${M};${S}`:`${M}`,{isOver:u,setNodeRef:d}=lo({id:c(Y.newDateKey(e.day,e.hour),n==null?void 0:n.id),data:{accepts:["booking-slots"]}}),{isOver:f,setNodeRef:h}=lo({id:c(Y.newDateKey(e.day,i),n==null?void 0:n.id),data:{accepts:["booking-slots"]}}),{isOver:m,setNodeRef:p}=lo({id:c(Y.newDateKey(e.day,a),n==null?void 0:n.id),data:{accepts:["booking-slots"]}}),{isOver:b,setNodeRef:y}=lo({id:c(Y.newDateKey(e.day,l),n==null?void 0:n.id),data:{accepts:["booking-slots"]}});T.useEffect(()=>{u&&s(c(Y.newDateKey(e.day,e.hour),n==null?void 0:n.id)),f&&s(c(Y.newDateKey(e.day,i),n==null?void 0:n.id)),m&&s(c(Y.newDateKey(e.day,a),n==null?void 0:n.id)),b&&s(c(Y.newDateKey(e.day,l),n==null?void 0:n.id))},[u,f,m,b]);const g=T.useMemo(()=>({ref:d,style:{backgroundColor:u?"#0066ff":""},key:Y.newDateKey(e.day,e.hour),time:e.hour,userId:n==null?void 0:n.id}),[e.day,u,e.hour,d]),w=T.useMemo(()=>({ref:h,style:{backgroundColor:f?"#0066ff":""},key:Y.newDateKey(e.day,i),time:i,userId:n==null?void 0:n.id}),[e.day,f,i,h]),C=T.useMemo(()=>({ref:p,style:{backgroundColor:m?"#0066ff":""},key:Y.newDateKey(e.day,a),time:a,userId:n==null?void 0:n.id}),[e.day,m,a,p]),x=T.useMemo(()=>({ref:y,style:{backgroundColor:b?"#0066ff":""},key:Y.newDateKey(e.day,l),time:l,userId:n==null?void 0:n.id}),[e.day,l,b,y]);return v.jsx("td",{className:"slot",children:v.jsx(ET,{booking:r,dayHour:e,firstDay:t,user:n,disabledCss:o.current,firstBlockTimeData:g,secondBlockTimeData:w,thirdBlockTimeData:C,fourthBlockTimeData:x})},`${e.day}-${e.hour}-slot`)},AT=({hour:e})=>v.jsxs(hl,{children:[v.jsx(pl,{children:v.jsx("span",{className:"border-solid hover:border-b-2 hover:border-b-purple-600 border-b-white cursor-pointer",children:e})}),v.jsxs(gl,{children:[v.jsx(_R,{children:"Hour options"}),v.jsx(kR,{}),v.jsx(su,{children:"Set lunch interval"}),v.jsx(su,{children:"Remove lunch interval"})]})]}),OT=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r}=$e(el(b=>({bookingBulkData:b.bookingBulkData,bookingViewType:b.bookingViewType,daysOfWeek:b.daysOfWeek,hours:b.hours}))),{selectedNode:o,emptySlotNodes:s}=Jt(),{users:i}=Hr(b=>b),{finishAt:a,updateFinishAtWithOffset:l}=gf(b=>b),[c]=T.useState({startAt:"12:00",finishAt:"12:30"}),u=T.useMemo(()=>n===ae.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),d=T.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]),f=T.useMemo(()=>o.split(";")[1],[o]),h=T.useMemo(()=>{const b=[];if(n===ae.DAY)for(let y=0;y<i.length;y++)b.push(t[0]);return b},[n,t,i]);T.useEffect(()=>{if(o){const b=s.get(o);b==null||b.showEvent(f)}},[o,s]),T.useEffect(()=>{f===a&&l(f)},[o,a]);const m=T.useCallback(b=>{const y=g=>g===0;return n===ae.DAY?i.filter(g=>g.status).map((g,w)=>v.jsx(Vu,{dayHour:{day:String(h[w]),hour:b},user:g,lunchTimeBlock:c,firstDay:y(w),bookingBulk:r.booking},`${h[w]}-${b}-slot-content-{${g.id}}`)):t.map((g,w)=>v.jsx(Vu,{dayHour:{day:String(g),hour:b},lunchTimeBlock:c,firstDay:y(w),bookingBulk:r.booking},`${g}-${b}-slot-content`))},[n,i,t,h,r.booking]);return T.useMemo(()=>v.jsx("tbody",{children:e.map(b=>v.jsxs("tr",{children:[v.jsx("td",{style:{...d,...u},className:"time-col",children:v.jsx("div",{className:"calendarCore_actions",children:v.jsx(AT,{hour:b})})},`${b}-hour`),m(b)]},`${b}-content`))}),[u,e,d,r.booking,n,t,m,t.length])},_T={id:"user-123",profile:{id:"profile-123",name:"Diego",color:"#14b8a6",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date};function kT(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const IT=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:kT(t,n,r)},Fg=T.createContext({});function NT(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sl=typeof window<"u",jT=Sl?T.useLayoutEffect:T.useEffect,Cl=T.createContext(null);function Rl(e,t){e.indexOf(t)===-1&&e.push(t)}function Dl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Pt=(e,t,n)=>n>t?t:n<e?e:n;let Jn=()=>{},Et=()=>{};process.env.NODE_ENV!=="production"&&(Jn=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Et=(e,t)=>{if(!e)throw new Error(t)});const At={},Vg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Lg(e){return typeof e=="object"&&e!==null}const $g=e=>/^0[^.\s]+$/u.test(e);function Tl(e){let t;return()=>(t===void 0&&(t=e()),t)}const Qe=e=>e,FT=(e,t)=>n=>t(e(n)),oo=(...e)=>e.reduce(FT),Nr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ml{constructor(){this.subscriptions=[]}add(t){return Rl(this.subscriptions,t),()=>Dl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ot=e=>e*1e3,gt=e=>e/1e3;function Bg(e,t){return t?e*(1e3/t):0}const Lu=new Set;function Pl(e,t,n){e||Lu.has(t)||(console.warn(t),Lu.add(t))}const zg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,VT=1e-7,LT=12;function $T(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=zg(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>VT&&++a<LT);return i}function so(e,t,n,r){if(e===t&&n===r)return Qe;const o=s=>$T(s,0,1,e,n);return s=>s===0||s===1?s:zg(o(s),t,r)}const Hg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wg=e=>t=>1-e(1-t),Ug=so(.33,1.53,.69,.99),El=Wg(Ug),Gg=Hg(El),Kg=e=>(e*=2)<1?.5*El(e):.5*(2-Math.pow(2,-10*(e-1))),Al=e=>1-Math.sin(Math.acos(e)),Yg=Wg(Al),qg=Hg(Al),BT=so(.42,0,1,1),zT=so(0,0,.58,1),Xg=so(.42,0,.58,1),HT=e=>Array.isArray(e)&&typeof e[0]!="number",Zg=e=>Array.isArray(e)&&typeof e[0]=="number",$u={linear:Qe,easeIn:BT,easeInOut:Xg,easeOut:zT,circIn:Al,circInOut:qg,circOut:Yg,backIn:El,backInOut:Gg,backOut:Ug,anticipate:Kg},WT=e=>typeof e=="string",Bu=e=>{if(Zg(e)){Et(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return so(t,n,r,o)}else if(WT(e))return Et($u[e]!==void 0,`Invalid easing type '${e}'`),$u[e];return e},Ro=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],zu={value:null};function UT(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const p=h&&o?n:r;return f&&i.add(d),p.has(d)||p.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&zu.value&&zu.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const GT=40;function Jg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Ro.reduce((w,C)=>(w[C]=UT(s,t?C:void 0),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:m}=i,p=()=>{const w=At.useManualTiming?o.timestamp:performance.now();n=!1,At.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,GT),1)),o.timestamp=w,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),h.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))},b=()=>{n=!0,r=!0,o.isProcessing||e(p)};return{schedule:Ro.reduce((w,C)=>{const x=i[C];return w[C]=(M,S=!1,D=!1)=>(n||b(),x.schedule(M,S,D)),w},{}),cancel:w=>{for(let C=0;C<Ro.length;C++)i[Ro[C]].cancel(w)},state:o,steps:i}}const{schedule:we,cancel:qt,state:Pe,steps:hi}=Jg(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qe,!0);let jo;function KT(){jo=void 0}const Le={now:()=>(jo===void 0&&Le.set(Pe.isProcessing||At.useManualTiming?Pe.timestamp:performance.now()),jo),set:e=>{jo=e,queueMicrotask(KT)}},Qg=e=>t=>typeof t=="string"&&t.startsWith(e),Ol=Qg("--"),YT=Qg("var(--"),_l=e=>YT(e)?qT.test(e.split("/*")[0].trim()):!1,qT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jr={...Qn,transform:e=>Pt(0,1,e)},Do={...Qn,default:1},Cr=e=>Math.round(e*1e5)/1e5,kl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function XT(e){return e==null}const ZT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Il=(e,t)=>n=>!!(typeof n=="string"&&ZT.test(n)&&n.startsWith(e)||t&&!XT(n)&&Object.prototype.hasOwnProperty.call(n,t)),em=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(kl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},JT=e=>Pt(0,255,e),pi={...Qn,transform:e=>Math.round(JT(e))},un={test:Il("rgb","red"),parse:em("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+pi.transform(e)+", "+pi.transform(t)+", "+pi.transform(n)+", "+Cr(jr.transform(r))+")"};function QT(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const na={test:Il("#"),parse:QT,transform:un.transform},io=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Bt=io("deg"),mt=io("%"),re=io("px"),eM=io("vh"),tM=io("vw"),Hu={...mt,parse:e=>mt.parse(e)/100,transform:e=>mt.transform(e*100)},En={test:Il("hsl","hue"),parse:em("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+mt.transform(Cr(t))+", "+mt.transform(Cr(n))+", "+Cr(jr.transform(r))+")"},_e={test:e=>un.test(e)||na.test(e)||En.test(e),parse:e=>un.test(e)?un.parse(e):En.test(e)?En.parse(e):na.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?un.transform(e):En.transform(e)},nM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function rM(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(kl))==null?void 0:t.length)||0)+(((n=e.match(nM))==null?void 0:n.length)||0)>0}const tm="number",nm="color",oM="var",sM="var(",Wu="${}",iM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(iM,l=>(_e.test(l)?(r.color.push(s),o.push(nm),n.push(_e.parse(l))):l.startsWith(sM)?(r.var.push(s),o.push(oM),n.push(l)):(r.number.push(s),o.push(tm),n.push(parseFloat(l))),++s,Wu)).split(Wu);return{values:n,split:a,indexes:r,types:o}}function rm(e){return Fr(e).values}function om(e){const{split:t,types:n}=Fr(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===tm?s+=Cr(o[i]):a===nm?s+=_e.transform(o[i]):s+=o[i]}return s}}const aM=e=>typeof e=="number"?0:e;function lM(e){const t=rm(e);return om(e)(t.map(aM))}const Xt={test:rM,parse:rm,createTransformer:om,getAnimatableNone:lM};function gi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function cM({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=gi(l,a,e+1/3),s=gi(l,a,e),i=gi(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function ns(e,t){return n=>n>0?t:e}const ye=(e,t,n)=>e+(t-e)*n,mi=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},uM=[na,un,En],dM=e=>uM.find(t=>t.test(e));function Uu(e){const t=dM(e);if(Jn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===En&&(n=cM(n)),n}const Gu=(e,t)=>{const n=Uu(e),r=Uu(t);if(!n||!r)return ns(e,t);const o={...n};return s=>(o.red=mi(n.red,r.red,s),o.green=mi(n.green,r.green,s),o.blue=mi(n.blue,r.blue,s),o.alpha=ye(n.alpha,r.alpha,s),un.transform(o))},ra=new Set(["none","hidden"]);function fM(e,t){return ra.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function hM(e,t){return n=>ye(e,t,n)}function Nl(e){return typeof e=="number"?hM:typeof e=="string"?_l(e)?ns:_e.test(e)?Gu:mM:Array.isArray(e)?sm:typeof e=="object"?_e.test(e)?Gu:pM:ns}function sm(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Nl(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function pM(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Nl(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function gM(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],i=e.indexes[s][r[s]],a=e.values[i]??0;n[o]=a,r[s]++}return n}const mM=(e,t)=>{const n=Xt.createTransformer(t),r=Fr(e),o=Fr(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?ra.has(e)&&!o.values.length||ra.has(t)&&!r.values.length?fM(e,t):oo(sm(gM(r,o),o.values),n):(Jn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ns(e,t))};function im(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):Nl(e)(e,t)}const vM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>we.update(t,n),stop:()=>qt(t),now:()=>Pe.isProcessing?Pe.timestamp:Le.now()}},am=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(s/(o-1))+", ";return`linear(${r.substring(0,r.length-2)})`},rs=2e4;function jl(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<rs;)t+=n,r=e.next(t);return t>=rs?1/0:t}function yM(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jl(r),rs);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:gt(o)}}const wM=5;function lm(e,t,n){const r=Math.max(t-wM,0);return Bg(n-e(r),t-r)}const ve={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ku=.001;function xM({duration:e=ve.duration,bounce:t=ve.bounce,velocity:n=ve.velocity,mass:r=ve.mass}){let o,s;Jn(e<=ot(ve.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Pt(ve.minDamping,ve.maxDamping,i),e=Pt(ve.minDuration,ve.maxDuration,gt(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=oa(c,i),m=Math.exp(-d);return Ku-f/h*m},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),p=oa(Math.pow(c,2),i);return(-o(c)+Ku>0?-1:1)*((f-h)*m)/p}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=SM(o,s,a);if(e=ot(e),isNaN(l))return{stiffness:ve.stiffness,damping:ve.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const bM=12;function SM(e,t,n){let r=n;for(let o=1;o<bM;o++)r=r-e(r)/t(r);return r}function oa(e,t){return e*Math.sqrt(1-t*t)}const CM=["duration","bounce"],RM=["stiffness","damping","mass"];function Yu(e,t){return t.some(n=>e[n]!==void 0)}function DM(e){let t={velocity:ve.velocity,stiffness:ve.stiffness,damping:ve.damping,mass:ve.mass,isResolvedFromDuration:!1,...e};if(!Yu(e,RM)&&Yu(e,CM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Pt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ve.mass,stiffness:o,damping:s}}else{const n=xM(e);t={...t,...n,mass:ve.mass},t.isResolvedFromDuration=!0}return t}function os(e=ve.visualDuration,t=ve.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=DM({...n,velocity:-gt(n.velocity||0)}),m=f||0,p=c/(2*Math.sqrt(l*u)),b=i-s,y=gt(Math.sqrt(l/u)),g=Math.abs(b)<5;r||(r=g?ve.restSpeed.granular:ve.restSpeed.default),o||(o=g?ve.restDelta.granular:ve.restDelta.default);let w;if(p<1){const x=oa(y,p);w=M=>{const S=Math.exp(-p*y*M);return i-S*((m+p*y*b)/x*Math.sin(x*M)+b*Math.cos(x*M))}}else if(p===1)w=x=>i-Math.exp(-y*x)*(b+(m+y*b)*x);else{const x=y*Math.sqrt(p*p-1);w=M=>{const S=Math.exp(-p*y*M),D=Math.min(x*M,300);return i-S*((m+p*y*b)*Math.sinh(D)+x*b*Math.cosh(D))/x}}const C={calculatedDuration:h&&d||null,next:x=>{const M=w(x);if(h)a.done=x>=d;else{let S=x===0?m:0;p<1&&(S=x===0?ot(m):lm(w,x,M));const D=Math.abs(S)<=r,P=Math.abs(i-M)<=o;a.done=D&&P}return a.value=a.done?i:M,a},toString:()=>{const x=Math.min(jl(C),rs),M=am(S=>C.next(x*S).value,x,30);return x+"ms "+M},toTransition:()=>{}};return C}os.applyToOptions=e=>{const t=yM(e,100,os);return e.ease=t.ease,e.duration=ot(t.duration),e.type="keyframes",e};function sa({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=D=>a!==void 0&&D<a||l!==void 0&&D>l,m=D=>a===void 0?l:l===void 0||Math.abs(a-D)<Math.abs(l-D)?a:l;let p=n*t;const b=d+p,y=i===void 0?b:i(b);y!==b&&(p=y-d);const g=D=>-p*Math.exp(-D/r),w=D=>y+g(D),C=D=>{const P=g(D),E=w(D);f.done=Math.abs(P)<=c,f.value=f.done?y:E};let x,M;const S=D=>{h(f.value)&&(x=D,M=os({keyframes:[f.value,m(f.value)],velocity:lm(w,D,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:D=>{let P=!1;return!M&&x===void 0&&(P=!0,C(D),S(D)),x!==void 0&&D>=x?M.next(D-x):(!P&&C(D),f)}}}function TM(e,t,n){const r=[],o=n||At.mix||im,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Qe:t;a=oo(l,a)}r.push(a)}return r}function MM(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Et(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=TM(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Nr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Pt(e[0],e[s-1],u)):c}function PM(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Nr(0,t,r);e.push(ye(n,1,o))}}function EM(e){const t=[0];return PM(t,e.length-1),t}function AM(e,t){return e.map(n=>n*t)}function OM(e,t){return e.map(()=>t||Xg).splice(0,e.length-1)}function An({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=HT(r)?r.map(Bu):Bu(r),s={done:!1,value:t[0]},i=AM(n&&n.length===t.length?n:EM(t),e),a=MM(i,t,{ease:Array.isArray(o)?o:OM(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const _M=e=>e!==null;function Fl(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(_M),a=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const kM={decay:sa,inertia:sa,tween:An,keyframes:An,spring:os};function cm(e){typeof e.type=="string"&&(e.type=kM[e.type])}class Vl{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const IM=e=>e/100;class Ll extends Vl{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(n=!0)=>{var r,o;if(n){const{motionValue:s}=this.options;s&&s.updatedAt!==Le.now()&&this.tick(Le.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;cm(t);const{type:n=An,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=t;let{keyframes:a}=t;const l=n||An;process.env.NODE_ENV!=="production"&&l!==An&&Et(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`),l!==An&&typeof a[0]!="number"&&(this.mixKeyframes=oo(IM,im(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=jl(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,C=r;if(d){const D=Math.min(this.currentTime,o)/a;let P=Math.floor(D),E=D%1;!E&&D>=1&&(E=1),E===1&&P--,P=Math.min(P,d+1),!!(P%2)&&(f==="reverse"?(E=1-E,h&&(E-=h/a)):f==="mirror"&&(C=i)),w=Pt(0,1,E)*a}const x=g?{done:!1,value:u[0]}:C.next(w);s&&(x.value=s(x.value));let{done:M}=x;!g&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return S&&m!==sa&&(x.value=Fl(u,this.options,b,this.speed)),p&&p(x.value),S&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return gt(this.calculatedDuration)}get time(){return gt(this.currentTime)}set time(t){var n;t=ot(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=gt(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=vM,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function NM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const dn=e=>e*180/Math.PI,ia=e=>{const t=dn(Math.atan2(e[1],e[0]));return aa(t)},jM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ia,rotateZ:ia,skewX:e=>dn(Math.atan(e[1])),skewY:e=>dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},aa=e=>(e=e%360,e<0&&(e+=360),e),qu=ia,Xu=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Zu=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),FM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xu,scaleY:Zu,scale:e=>(Xu(e)+Zu(e))/2,rotateX:e=>aa(dn(Math.atan2(e[6],e[5]))),rotateY:e=>aa(dn(Math.atan2(-e[2],e[0]))),rotateZ:qu,rotate:qu,skewX:e=>dn(Math.atan(e[4])),skewY:e=>dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function la(e){return e.includes("scale")?1:0}function ca(e,t){if(!e||e==="none")return la(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=FM,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=jM,o=a}if(!o)return la(t);const s=r[t],i=o[1].split(",").map(LM);return typeof s=="function"?s(i):i[s]}const VM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ca(n,t)};function LM(e){return parseFloat(e.trim())}const er=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tr=new Set(er),Ju=e=>e===Qn||e===re,$M=new Set(["x","y","z"]),BM=er.filter(e=>!$M.has(e));function zM(e){const t=[];return BM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const fn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ca(t,"x"),y:(e,{transform:t})=>ca(t,"y")};fn.translateX=fn.x;fn.translateY=fn.y;const hn=new Set;let ua=!1,da=!1,fa=!1;function um(){if(da){const e=Array.from(hn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=zM(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))==null||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}da=!1,ua=!1,hn.forEach(e=>e.complete(fa)),hn.clear()}function dm(){hn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(da=!0)})}function HM(){fa=!0,dm(),um(),fa=!1}class $l{constructor(t,n,r,o,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(hn.add(this),ua||(ua=!0,we.read(dm),we.resolveKeyframes(um))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}NM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),hn.delete(this)}cancel(){this.state==="scheduled"&&(hn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const WM=e=>e.startsWith("--");function UM(e,t,n){WM(t)?e.style.setProperty(t,n):e.style[t]=n}const GM=Tl(()=>window.ScrollTimeline!==void 0),KM={};function YM(e,t){const n=Tl(e);return()=>KM[t]??n()}const fm=YM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Qu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wr([0,.65,.55,1]),circOut:wr([.55,0,1,.45]),backIn:wr([.31,.01,.66,-.59]),backOut:wr([.33,1.53,.69,.99])};function hm(e,t){if(e)return typeof e=="function"?fm()?am(e,t):"ease-out":Zg(e)?wr(e):Array.isArray(e)?e.map(n=>hm(n,t)||Qu.easeOut):Qu[e]}function qM(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=hm(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function pm(e){return typeof e=="function"&&"applyToOptions"in e}function XM({type:e,...t}){return pm(e)&&fm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ZM extends Vl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,Et(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=XM(t);this.animation=qM(n,r,o,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=Fl(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):UM(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return gt(Number(t))}get time(){return gt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ot(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&GM()?(this.animation.timeline=t,Qe):n(this)}}const gm={anticipate:Kg,backInOut:Gg,circInOut:qg};function JM(e){return e in gm}function QM(e){typeof e.ease=="string"&&JM(e.ease)&&(e.ease=gm[e.ease])}const ed=10;class eP extends ZM{constructor(t){QM(t),cm(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Ll({...i,autoplay:!1}),l=ot(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ed).value,a.sample(l).value,ed),a.stop()}}const td=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Xt.test(e)||e==="0")&&!e.startsWith("url("));function tP(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function nP(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=td(o,t),a=td(s,t);return Jn(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:tP(e)||(n==="spring"||pm(n))&&r}function mm(e){return Lg(e)&&"offsetHeight"in e}const rP=new Set(["opacity","clipPath","filter","transform"]),oP=Tl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function sP(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:i}=e;if(!mm((c=t==null?void 0:t.owner)==null?void 0:c.current))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return oP()&&n&&rP.has(n)&&(n!=="transform"||!l)&&!a&&!r&&o!=="mirror"&&s!==0&&i!=="inertia"}const iP=40;class aP extends Vl{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var p,b;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Le.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||$l;this.keyframeResolver=new h(a,(p,b,y)=>this.onKeyframesResolved(p,b,f,!y),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:i,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Le.now(),nP(t,s,i,a)||((At.instantAnimations||!l)&&(u==null||u(Fl(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>iP?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!c&&sP(f)?new eP({...f,element:f.motionValue.owner.current}):new Ll(f);h.finished.then(()=>this.notifyFinished()).catch(Qe),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),HM()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const lP=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cP(e){const t=lP.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const uP=4;function vm(e,t,n=1){Et(n<=uP,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=cP(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Vg(i)?parseFloat(i):i}return _l(o)?vm(o,t,n+1):o}function Bl(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const ym=new Set(["width","height","top","left","right","bottom",...er]),dP={test:e=>e==="auto",parse:e=>e},wm=e=>t=>t.test(e),xm=[Qn,re,mt,Bt,tM,eM,dP],nd=e=>xm.find(wm(e));function fP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$g(e):!0}const hP=new Set(["brightness","contrast","saturate","opacity"]);function pP(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kl)||[];if(!r)return e;const o=n.replace(r,"");let s=hP.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const gP=/\b([a-z-]*)\(.*?\)/gu,ha={...Xt,getAnimatableNone:e=>{const t=e.match(gP);return t?t.map(pP).join(" "):e}},rd={...Qn,transform:Math.round},mP={rotate:Bt,rotateX:Bt,rotateY:Bt,rotateZ:Bt,scale:Do,scaleX:Do,scaleY:Do,scaleZ:Do,skew:Bt,skewX:Bt,skewY:Bt,distance:re,translateX:re,translateY:re,translateZ:re,x:re,y:re,z:re,perspective:re,transformPerspective:re,opacity:jr,originX:Hu,originY:Hu,originZ:re},zl={borderWidth:re,borderTopWidth:re,borderRightWidth:re,borderBottomWidth:re,borderLeftWidth:re,borderRadius:re,radius:re,borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomRightRadius:re,borderBottomLeftRadius:re,width:re,maxWidth:re,height:re,maxHeight:re,top:re,right:re,bottom:re,left:re,padding:re,paddingTop:re,paddingRight:re,paddingBottom:re,paddingLeft:re,margin:re,marginTop:re,marginRight:re,marginBottom:re,marginLeft:re,backgroundPositionX:re,backgroundPositionY:re,...mP,zIndex:rd,fillOpacity:jr,strokeOpacity:jr,numOctaves:rd},vP={...zl,color:_e,backgroundColor:_e,outlineColor:_e,fill:_e,stroke:_e,borderColor:_e,borderTopColor:_e,borderRightColor:_e,borderBottomColor:_e,borderLeftColor:_e,filter:ha,WebkitFilter:ha},bm=e=>vP[e];function Sm(e,t){let n=bm(e);return n!==ha&&(n=Xt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yP=new Set(["auto","none","0"]);function wP(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!yP.has(s)&&Fr(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Sm(n,o)}class xP extends $l{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),_l(c))){const u=vm(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ym.has(r)||t.length!==2)return;const[o,s]=t,i=nd(o),a=nd(s);if(i!==a)if(Ju(i)&&Ju(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else fn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||fP(t[o]))&&r.push(o);r.length&&wP(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=fn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function bP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const od=30,SP=e=>!isNaN(parseFloat(e));class CP{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{var i,a;const s=Le.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();o&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=SP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Pl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ml);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>od)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,od);return Bg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zn(e,t){return new CP(e,t)}const Cm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,{schedule:Hl}=Jg(queueMicrotask,!1),rt={x:!1,y:!1};function Rm(){return rt.x||rt.y}function RP(e){return e==="x"||e==="y"?rt[e]?null:(rt[e]=!0,()=>{rt[e]=!1}):rt.x||rt.y?null:(rt.x=rt.y=!0,()=>{rt.x=rt.y=!1})}function Dm(e,t){const n=bP(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function sd(e){return!(e.pointerType==="touch"||Rm())}function DP(e,t,n={}){const[r,o,s]=Dm(e,n),i=a=>{if(!sd(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{sd(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}const Tm=(e,t)=>t?e===t?!0:Tm(e,t.parentElement):!1,Wl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,TP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function MP(e){return TP.has(e.tagName)||e.tabIndex!==-1}const Fo=new WeakSet;function id(e){return t=>{t.key==="Enter"&&e(t)}}function vi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const PP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=id(()=>{if(Fo.has(n))return;vi(n,"down");const o=id(()=>{vi(n,"up")}),s=()=>vi(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ad(e){return Wl(e)&&!Rm()}function EP(e,t,n={}){const[r,o,s]=Dm(e,n),i=a=>{const l=a.currentTarget;if(!ad(a))return;Fo.add(l);const c=t(l,a),u=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Fo.has(l)&&Fo.delete(l),ad(h)&&typeof c=="function"&&c(h,{success:m})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Tm(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,o),mm(a)&&(a.addEventListener("focus",c=>PP(c,o)),!MP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Mm(e){return Lg(e)&&"ownerSVGElement"in e}function AP(e){return Mm(e)&&e.tagName==="svg"}const ke=e=>!!(e&&e.getVelocity),OP=[...xm,_e,Xt],_P=e=>OP.find(wm(e)),Pm=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function kP(e=!0){const t=T.useContext(Cl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=T.useId();T.useEffect(()=>{if(e)return o(s)},[e]);const i=T.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Em=T.createContext({strict:!1}),ld={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Hn={};for(const e in ld)Hn[e]={isEnabled:t=>ld[e].some(n=>!!t[n])};function IP(e){for(const t in e)Hn[t]={...Hn[t],...e[t]}}const NP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ss(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||NP.has(e)}let Am=e=>!ss(e);function jP(e){e&&(Am=t=>t.startsWith("on")?!ss(t):e(t))}try{jP(require("@emotion/is-prop-valid").default)}catch{}function FP(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Am(o)||n===!0&&ss(o)||!t&&!ss(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function VP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Pl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Ns=T.createContext({});function js(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Vr(e){return typeof e=="string"||Array.isArray(e)}const Ul=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gl=["initial",...Ul];function Fs(e){return js(e.animate)||Gl.some(t=>Vr(e[t]))}function Om(e){return!!(Fs(e)||e.variants)}function LP(e,t){if(Fs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vr(n)?n:void 0,animate:Vr(r)?r:void 0}}return e.inherit!==!1?t:{}}function $P(e){const{initial:t,animate:n}=LP(e,T.useContext(Ns));return T.useMemo(()=>({initial:t,animate:n}),[cd(t),cd(n)])}function cd(e){return Array.isArray(e)?e.join(" "):e}const BP=Symbol.for("motionComponentSymbol");function On(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zP(e,t,n){return T.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):On(n)&&(n.current=r))},[t])}const Kl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),HP="framerAppearId",_m="data-"+Kl(HP),km=T.createContext({});function WP(e,t,n,r,o){var p,b;const{visualElement:s}=T.useContext(Ns),i=T.useContext(Em),a=T.useContext(Cl),l=T.useContext(Pm).reducedMotion,c=T.useRef(null);r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=T.useContext(km);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&UP(c.current,n,o,d);const f=T.useRef(!1);T.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[_m],m=T.useRef(!!h&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return jT(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Hl.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),T.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,h)}),m.current=!1))}),u}function UP(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Im(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&On(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Im(e){if(e)return e.options.allowProjection!==!1?e.projection:Im(e.parent)}function GP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&IP(e);function s(a,l){let c;const u={...T.useContext(Pm),...a,layoutId:KP(a)},{isStatic:d}=u,f=$P(a),h=r(a,d);if(!d&&Sl){YP(u,e);const m=qP(u);c=m.MeasureLayout,f.visualElement=WP(o,h,u,t,m.ProjectionNode)}return v.jsxs(Ns.Provider,{value:f,children:[c&&f.visualElement?v.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,zP(h,f.visualElement,l),h,d,f.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const i=T.forwardRef(s);return i[BP]=o,i}function KP({layoutId:e}){const t=T.useContext(Fg).id;return t&&e!==void 0?t+"-"+e:e}function YP(e,t){const n=T.useContext(Em).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Jn(!1,r):Et(!1,r)}}function qP(e){const{drag:t,layout:n}=Hn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Lr={};function XP(e){for(const t in e)Lr[t]=e[t],Ol(t)&&(Lr[t].isCSSVariable=!0)}function Nm(e,{layout:t,layoutId:n}){return tr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Lr[e]||e==="opacity")}const ZP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},JP=er.length;function QP(e,t,n){let r="",o=!0;for(let s=0;s<JP;s++){const i=er[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Cm(a,zl[i]);if(!l){o=!1;const u=ZP[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Yl(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(tr.has(l)){i=!0;continue}else if(Ol(l)){o[l]=c;continue}else{const u=Cm(c,zl[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=QP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const ql=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jm(e,t,n){for(const r in t)!ke(t[r])&&!Nm(r,n)&&(e[r]=t[r])}function eE({transformTemplate:e},t){return T.useMemo(()=>{const n=ql();return Yl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tE(e,t){const n=e.style||{},r={};return jm(r,n,e),Object.assign(r,eE(e,t)),r}function nE(e,t){const n={},r=tE(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const rE={offset:"stroke-dashoffset",array:"stroke-dasharray"},oE={offset:"strokeDashoffset",array:"strokeDasharray"};function sE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?rE:oE;e[s.offset]=re.transform(-r);const i=re.transform(t),a=re.transform(n);e[s.array]=`${i} ${a}`}function Fm(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:i=0,...a},l,c,u){if(Yl(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&sE(d,o,s,i,!1)}const Vm=()=>({...ql(),attrs:{}}),Lm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function iE(e,t,n,r){const o=T.useMemo(()=>{const s=Vm();return Fm(s,t,Lm(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};jm(s,e.style,e),o.style={...s,...o.style}}return o}const aE=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xl(e){return typeof e!="string"||e.includes("-")?!1:!!(aE.indexOf(e)>-1||/[A-Z]/u.test(e))}function lE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Xl(n)?iE:nE)(r,s,i,n),c=FP(r,typeof n=="string",e),u=n!==T.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=T.useMemo(()=>ke(d)?d.get():d,[d]);return T.createElement(n,{...u,children:f})}}function ud(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zl(e,t,n,r){if(typeof t=="function"){const[o,s]=ud(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ud(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Vo(e){return ke(e)?e.get():e}function cE({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:uE(n,r,o,e),renderState:t()}}const $m=e=>(t,n)=>{const r=T.useContext(Ns),o=T.useContext(Cl),s=()=>cE(e,t,r,o);return n?s():NT(s)};function uE(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=Vo(s[f]);let{initial:i,animate:a}=e;const l=Fs(e),c=Om(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!js(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Zl(e,f[h]);if(m){const{transitionEnd:p,transition:b,...y}=m;for(const g in y){let w=y[g];if(Array.isArray(w)){const C=u?w.length-1:0;w=w[C]}w!==null&&(o[g]=w)}for(const g in p)o[g]=p[g]}}}return o}function Jl(e,t,n){var s;const{style:r}=e,o={};for(const i in r)(ke(r[i])||t.style&&ke(t.style[i])||Nm(i,e)||((s=n==null?void 0:n.getValue(i))==null?void 0:s.liveStyle)!==void 0)&&(o[i]=r[i]);return o}const dE={useVisualState:$m({scrapeMotionValuesFromProps:Jl,createRenderState:ql})};function Bm(e,t,n){const r=Jl(e,t,n);for(const o in e)if(ke(e[o])||ke(t[o])){const s=er.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const fE={useVisualState:$m({scrapeMotionValuesFromProps:Bm,createRenderState:Vm})};function hE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...Xl(r)?fE:dE,preloadedFeatures:e,useRender:lE(o),createVisualElement:t,Component:r};return GP(i)}}function $r(e,t,n){const r=e.getProps();return Zl(r,t,n!==void 0?n:r.custom,e)}const pa=e=>Array.isArray(e);function pE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zn(n))}function gE(e){return pa(e)?e[e.length-1]||0:e}function mE(e,t){const n=$r(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=gE(s[i]);pE(e,i,a)}}function vE(e){return!!(ke(e)&&e.add)}function ga(e,t){const n=e.getValue("willChange");if(vE(n))return n.add(t);if(!n&&At.WillChange){const r=new At.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function zm(e){return e.props[_m]}const yE=e=>e!==null;function wE(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(yE),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const xE={type:"spring",stiffness:500,damping:25,restSpeed:10},bE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),SE={type:"keyframes",duration:.8},CE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RE=(e,{keyframes:t})=>t.length>2?SE:tr.has(e)?e.startsWith("scale")?bE(t[1]):xE:CE;function DE({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Ql=(e,t,n,r={},o,s)=>i=>{const a=Bl(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ot(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};DE(a)||Object.assign(u,RE(e,u)),u.duration&&(u.duration=ot(u.duration)),u.repeatDelay&&(u.repeatDelay=ot(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(At.instantAnimations||At.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=wE(u.keyframes,a);if(f!==void 0){we.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Ll(u):new aP(u)};function TE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hm(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:i,...a}=t;r&&(s=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&TE(c,u))continue;const h={delay:n,...Bl(s||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const y=zm(e);if(y){const g=window.MotionHandoffAnimation(y,u,we);g!==null&&(h.startTime=g,p=!0)}}ga(e,u),d.start(Ql(u,d,f,e.shouldReduceMotion&&ym.has(u)?{type:!1}:h,e,p));const b=d.animation;b&&l.push(b)}return i&&Promise.all(l).then(()=>{we.update(()=>{i&&mE(e,i)})}),l}function ma(e,t,n={}){var l;const r=$r(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(Hm(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=o;return ME(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[c,u]=a==="beforeChildren"?[s,i]:[i,s];return c().then(()=>u())}else return Promise.all([s(),i(n.delay)])}function ME(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(PE).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(ma(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function PE(e,t){return e.sortNodePosition(t)}function EE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>ma(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=ma(e,t,n);else{const o=typeof t=="function"?$r(e,t,n.custom):t;r=Promise.all(Hm(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Wm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const AE=Gl.length;function Um(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Um(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<AE;n++){const r=Gl[n],o=e.props[r];(Vr(o)||o===!1)&&(t[r]=o)}return t}const OE=[...Ul].reverse(),_E=Ul.length;function kE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>EE(e,n,r)))}function IE(e){let t=kE(e),n=dd(),r=!0;const o=l=>(c,u)=>{var f;const d=$r(e,u,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:m,...p}=d;c={...c,...p,...m}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=Um(e.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let b=0;b<_E;b++){const y=OE[b],g=n[y],w=c[y]!==void 0?c[y]:u[y],C=Vr(w),x=y===l?g.isActive:null;x===!1&&(m=b);let M=w===u[y]&&w!==c[y]&&C;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),g.protectedKeys={...h},!g.isActive&&x===null||!w&&!g.prevProp||js(w)||typeof w=="boolean")continue;const S=NE(g.prevProp,w);let D=S||y===l&&g.isActive&&!M&&C||b>m&&C,P=!1;const E=Array.isArray(w)?w:[w];let A=E.reduce(o(y),{});x===!1&&(A={});const{prevResolvedValues:F={}}=g,W={...F,...A},L=N=>{D=!0,f.has(N)&&(P=!0,f.delete(N)),g.needsAnimating[N]=!0;const O=e.getValue(N);O&&(O.liveStyle=!1)};for(const N in W){const O=A[N],V=F[N];if(h.hasOwnProperty(N))continue;let k=!1;pa(O)&&pa(V)?k=!Wm(O,V):k=O!==V,k?O!=null?L(N):f.add(N):O!==void 0&&f.has(N)?L(N):g.protectedKeys[N]=!0}g.prevProp=w,g.prevResolvedValues=A,g.isActive&&(h={...h,...A}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(M&&S)||P)&&d.push(...E.map(N=>({animation:N,options:{type:y}})))}if(f.size){const b={};if(typeof c.initial!="boolean"){const y=$r(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(b.transition=y.transition)}f.forEach(y=>{const g=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),b[y]=g??null}),d.push({animation:b})}let p=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const u=i(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=dd(),r=!0}}}function NE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wm(t,e):!1}function ln(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dd(){return{animate:ln(!0),whileInView:ln(),whileHover:ln(),whileTap:ln(),whileDrag:ln(),whileFocus:ln(),exit:ln()}}class on{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jE extends on{constructor(t){super(t),t.animationState||(t.animationState=IE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();js(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let FE=0;class VE extends on{constructor(){super(...arguments),this.id=FE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const LE={animation:{Feature:jE},exit:{Feature:VE}};function Br(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ao(e){return{point:{x:e.pageX,y:e.pageY}}}const $E=e=>t=>Wl(t)&&e(t,ao(t));function Rr(e,t,n,r){return Br(e,t,$E(n),r)}function Gm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Km=1e-4,HE=1-Km,WE=1+Km,Ym=.01,UE=0-Ym,GE=0+Ym;function Ne(e){return e.max-e.min}function KE(e,t,n){return Math.abs(e-t)<=n}function fd(e,t,n,r=.5){e.origin=r,e.originPoint=ye(t.min,t.max,e.origin),e.scale=Ne(n)/Ne(t),e.translate=ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=HE&&e.scale<=WE||isNaN(e.scale))&&(e.scale=1),(e.translate>=UE&&e.translate<=GE||isNaN(e.translate))&&(e.translate=0)}function Dr(e,t,n,r){fd(e.x,t.x,n.x,r?r.originX:void 0),fd(e.y,t.y,n.y,r?r.originY:void 0)}function hd(e,t,n){e.min=n.min+t.min,e.max=e.min+Ne(t)}function YE(e,t,n){hd(e.x,t.x,n.x),hd(e.y,t.y,n.y)}function pd(e,t,n){e.min=t.min-n.min,e.max=e.min+Ne(t)}function Tr(e,t,n){pd(e.x,t.x,n.x),pd(e.y,t.y,n.y)}const gd=()=>({translate:0,scale:1,origin:0,originPoint:0}),_n=()=>({x:gd(),y:gd()}),md=()=>({min:0,max:0}),Se=()=>({x:md(),y:md()});function Xe(e){return[e("x"),e("y")]}function yi(e){return e===void 0||e===1}function va({scale:e,scaleX:t,scaleY:n}){return!yi(e)||!yi(t)||!yi(n)}function cn(e){return va(e)||qm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qm(e){return vd(e.x)||vd(e.y)}function vd(e){return e&&e!=="0%"}function is(e,t,n){const r=e-n,o=t*r;return n+o}function yd(e,t,n,r,o){return o!==void 0&&(e=is(e,o,r)),is(e,n,r)+t}function ya(e,t=0,n=1,r,o){e.min=yd(e.min,t,n,r,o),e.max=yd(e.max,t,n,r,o)}function Xm(e,{x:t,y:n}){ya(e.x,t.translate,t.scale,t.originPoint),ya(e.y,n.translate,n.scale,n.originPoint)}const wd=.999999999999,xd=1.0000000000001;function qE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&In(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Xm(e,i)),r&&cn(s.latestValues)&&In(e,s.latestValues))}t.x<xd&&t.x>wd&&(t.x=1),t.y<xd&&t.y>wd&&(t.y=1)}function kn(e,t){e.min=e.min+t,e.max=e.max+t}function bd(e,t,n,r,o=.5){const s=ye(e.min,e.max,o);ya(e,t,n,s,r)}function In(e,t){bd(e.x,t.x,t.scaleX,t.scale,t.originX),bd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zm(e,t){return Gm(zE(e.getBoundingClientRect(),t))}function XE(e,t,n){const r=Zm(e,n),{scroll:o}=t;return o&&(kn(r.x,o.offset.x),kn(r.y,o.offset.y)),r}const Jm=({current:e})=>e?e.ownerDocument.defaultView:null,Sd=(e,t)=>Math.abs(e-t);function ZE(e,t){const n=Sd(e.x,t.x),r=Sd(e.y,t.y);return Math.sqrt(n**2+r**2)}class Qm{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=xi(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=ZE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:m}=d,{timestamp:p}=Pe;this.history.push({...m,timestamp:p});const{onStart:b,onMove:y}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=wi(f,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=xi(d.type==="pointercancel"?this.lastMoveEventInfo:wi(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,b),m&&m(d,b)},!Wl(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=ao(t),a=wi(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Pe;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,xi(a,this.history)),this.removeListeners=oo(Rr(this.contextWindow,"pointermove",this.handlePointerMove),Rr(this.contextWindow,"pointerup",this.handlePointerUp),Rr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qt(this.updatePoint)}}function wi(e,t){return t?{point:t(e.point)}:e}function Cd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xi({point:e},t){return{point:e,delta:Cd(e,ev(t)),offset:Cd(e,JE(t)),velocity:QE(t,.1)}}function JE(e){return e[0]}function ev(e){return e[e.length-1]}function QE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ev(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ot(t)));)n--;if(!r)return{x:0,y:0};const s=gt(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function eA(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ye(n,e,r.max):Math.min(e,n)),e}function Rd(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function tA(e,{top:t,left:n,bottom:r,right:o}){return{x:Rd(e.x,n,o),y:Rd(e.y,t,r)}}function Dd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nA(e,t){return{x:Dd(e.x,t.x),y:Dd(e.y,t.y)}}function rA(e,t){let n=.5;const r=Ne(e),o=Ne(t);return o>r?n=Nr(t.min,t.max-r,e.min):r>o&&(n=Nr(e.min,e.max-o,t.min)),Pt(0,1,n)}function oA(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const wa=.35;function sA(e=wa){return e===!1?e=0:e===!0&&(e=wa),{x:Td(e,"left","right"),y:Td(e,"top","bottom")}}function Td(e,t,n){return{min:Md(e,t),max:Md(e,n)}}function Md(e,t){return typeof e=="number"?e:e[t]||0}const iA=new WeakMap;class aA{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Se(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ao(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:m}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=RP(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xe(b=>{let y=this.getAxisMotionValue(b).get()||0;if(mt.test(y)){const{projection:g}=this.visualElement;if(g&&g.layout){const w=g.layout.layoutBox[b];w&&(y=Ne(w)*(parseFloat(y)/100))}}this.originPoint[b]=y}),m&&we.postRender(()=>m(u,d)),ga(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=d;if(h&&this.currentDirection===null){this.currentDirection=lA(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),p&&p(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Xe(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)==null?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Qm(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Jm(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&we.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!To(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=eA(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&On(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=tA(r.layoutBox,t):this.constraints=!1,this.elastic=sA(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=oA(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!On(t))return!1;const r=t.current;Et(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=XE(r,o.root,this.visualElement.getTransformPagePoint());let i=nA(o.layout.layoutBox,s);if(n){const a=n(BE(i));this.hasMutatedConstraints=!!a,a&&(i=Gm(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xe(u=>{if(!To(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ga(this.visualElement,t),r.start(Ql(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xe(n=>{const{drag:r}=this.getProps();if(!To(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-ye(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!On(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=rA({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xe(i=>{if(!To(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(ye(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;iA.set(this.visualElement,this);const t=this.visualElement.current,n=Rr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();On(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),we.read(r);const i=Br(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Xe(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=wa,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function To(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lA(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class cA extends on{constructor(t){super(t),this.removeGroupControls=Qe,this.removeListeners=Qe,this.controls=new aA(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Pd=e=>(t,n)=>{e&&we.postRender(()=>e(t,n))};class uA extends on{constructor(){super(...arguments),this.removePointerDownListener=Qe}onPointerDown(t){this.session=new Qm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Pd(t),onStart:Pd(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&we.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Rr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Lo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ed(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const gr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(re.test(e))e=parseFloat(e);else return e;const n=Ed(e,t.target.x),r=Ed(e,t.target.y);return`${n}% ${r}%`}},dA={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Xt.parse(e);if(o.length>5)return r;const s=Xt.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=ye(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class fA extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;XP(hA),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Lo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:i}=r;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||we.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Hl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tv(e){const[t,n]=kP(),r=T.useContext(Fg);return v.jsx(fA,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(km),isPresent:t,safeToRemove:n})}const hA={borderRadius:{...gr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gr,borderTopRightRadius:gr,borderBottomLeftRadius:gr,borderBottomRightRadius:gr,boxShadow:dA};function pA(e,t,n){const r=ke(e)?e:zn(e);return r.start(Ql("",r,t,n)),r.animation}const gA=(e,t)=>e.depth-t.depth;class mA{constructor(){this.children=[],this.isDirty=!1}add(t){Rl(this.children,t),this.isDirty=!0}remove(t){Dl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gA),this.isDirty=!1,this.children.forEach(t)}}function vA(e,t){const n=Le.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(qt(r),e(s-t))};return we.setup(r,!0),()=>qt(r)}const nv=["TopLeft","TopRight","BottomLeft","BottomRight"],yA=nv.length,Ad=e=>typeof e=="string"?parseFloat(e):e,Od=e=>typeof e=="number"||re.test(e);function wA(e,t,n,r,o,s){o?(e.opacity=ye(0,n.opacity??1,xA(r)),e.opacityExit=ye(t.opacity??1,0,bA(r))):s&&(e.opacity=ye(t.opacity??1,n.opacity??1,r));for(let i=0;i<yA;i++){const a=`border${nv[i]}Radius`;let l=_d(t,a),c=_d(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Od(l)===Od(c)?(e[a]=Math.max(ye(Ad(l),Ad(c),r),0),(mt.test(c)||mt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ye(t.rotate||0,n.rotate||0,r))}function _d(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xA=rv(0,.5,Yg),bA=rv(.5,.95,Qe);function rv(e,t,n){return r=>r<e?0:r>t?1:n(Nr(e,t,r))}function kd(e,t){e.min=t.min,e.max=t.max}function qe(e,t){kd(e.x,t.x),kd(e.y,t.y)}function Id(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Nd(e,t,n,r,o){return e-=t,e=is(e,1/n,r),o!==void 0&&(e=is(e,1/o,r)),e}function SA(e,t=0,n=1,r=.5,o,s=e,i=e){if(mt.test(t)&&(t=parseFloat(t),t=ye(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=ye(s.min,s.max,r);e===s&&(a-=t),e.min=Nd(e.min,t,n,a,o),e.max=Nd(e.max,t,n,a,o)}function jd(e,t,[n,r,o],s,i){SA(e,t[n],t[r],t[o],t.scale,s,i)}const CA=["x","scaleX","originX"],RA=["y","scaleY","originY"];function Fd(e,t,n,r){jd(e.x,t,CA,n?n.x:void 0,r?r.x:void 0),jd(e.y,t,RA,n?n.y:void 0,r?r.y:void 0)}function Vd(e){return e.translate===0&&e.scale===1}function ov(e){return Vd(e.x)&&Vd(e.y)}function Ld(e,t){return e.min===t.min&&e.max===t.max}function DA(e,t){return Ld(e.x,t.x)&&Ld(e.y,t.y)}function $d(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sv(e,t){return $d(e.x,t.x)&&$d(e.y,t.y)}function Bd(e){return Ne(e.x)/Ne(e.y)}function zd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TA{constructor(){this.members=[]}add(t){Rl(this.members,t),t.scheduleRender()}remove(t){if(Dl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function MA(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const bi=["","X","Y","Z"],PA={visibility:"hidden"},EA=1e3;let AA=0;function Si(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iv(r)}function av({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=AA++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(kA),this.nodes.forEach(VA),this.nodes.forEach(LA),this.nodes.forEach(IA)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new mA)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Ml),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Mm(i)&&!AP(i),this.instance=i;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=vA(d,250),Lo.hasAnimatedSinceResize&&(Lo.hasAnimatedSinceResize=!1,this.nodes.forEach(Wd))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||WA,{onLayoutAnimationStart:p,onLayoutAnimationComplete:b}=c.getProps(),y=!this.targetLayout||!sv(this.targetLayout,h),g=!d&&f;if(this.options.layoutRoot||this.resumeFrom||g||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,g);const w={...Bl(m,"layout"),onPlay:p,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||Wd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),qt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach($A),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Hd);return}this.isUpdating||this.nodes.forEach(jA),this.isUpdating=!1,this.nodes.forEach(FA),this.nodes.forEach(OA),this.nodes.forEach(_A),this.clearAllSnapshots();const a=Le.now();Pe.delta=Pt(0,1e3/60,a-Pe.timestamp),Pe.timestamp=a,Pe.isProcessing=!0,hi.update.process(Pe),hi.preRender.process(Pe),hi.render.process(Pe),Pe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NA),this.sharedNodes.forEach(BA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ne(this.snapshot.measuredBox.x)&&!Ne(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Se(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ov(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&this.instance&&(a||cn(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),UA(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:i}=this.options;if(!i)return Se();const a=i.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(GA))){const{scroll:u}=this.root;u&&(kn(a.x,u.offset.x),kn(a.y,u.offset.y))}return a}removeElementScroll(i){var l;const a=Se();if(qe(a,i),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&qe(a,i),kn(a.x,d.offset.x),kn(a.y,d.offset.y))}return a}applyTransform(i,a=!1){const l=Se();qe(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&In(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),cn(u.latestValues)&&In(l,u.latestValues)}return cn(this.latestValues)&&In(l,this.latestValues),l}removeTransform(i){const a=Se();qe(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!cn(c.latestValues))continue;va(c.latestValues)&&c.updateSnapshot();const u=Se(),d=c.measurePageBox();qe(u,d),Fd(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return cn(this.latestValues)&&Fd(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Pe.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Tr(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Se(),this.targetWithTransforms=Se()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),YE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),Xm(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Tr(this.relativeTargetOrigin,this.target,h.target),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||va(this.parent.latestValues)||qm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Pe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;qe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;qE(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Se());const{target:h}=i;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Id(this.prevProjectionDelta.x,this.projectionDelta.x),Id(this.prevProjectionDelta.y,this.projectionDelta.y)),Dr(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!zd(this.projectionDelta.x,this.prevProjectionDelta.x)||!zd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_n(),this.projectionDelta=_n(),this.projectionDeltaWithTransform=_n()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=_n();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Se(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,b=this.getStack(),y=!b||b.members.length<=1,g=!!(p&&!y&&this.options.crossfade===!0&&!this.path.some(HA));this.animationProgress=0;let w;this.mixTargetDelta=C=>{const x=C/1e3;Ud(d.x,i.x,x),Ud(d.y,i.y,x),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zA(this.relativeTarget,this.relativeTargetOrigin,f,x),w&&DA(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Se()),qe(w,this.relativeTarget)),p&&(this.animationValues=u,wA(u,c,this.latestValues,x,g,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(!1),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(!1),this.pendingAnimation&&(qt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Lo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zn(0)),this.currentAnimation=pA(this.motionValue,[0,1e3],{...i,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(EA),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&lv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Se();const d=Ne(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Ne(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}qe(a,l),In(a,u),Dr(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new TA),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Si("z",i,c,this.animationValues);for(let u=0;u<bi.length;u++)Si(`rotate${bi[u]}`,i,c,this.animationValues),Si(`skew${bi[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){if(!this.instance||this.isSVG)return;if(!this.isVisible)return PA;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Vo(i==null?void 0:i.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Vo(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!cn(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=MA(this.projectionDeltaWithTransform,this.treeScale,u),l&&(a.transform=l(u,a.transform));const{x:d,y:f}=this.projectionDelta;a.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const h in Lr){if(u[h]===void 0)continue;const{correct:m,applyTo:p,isCSSVariable:b}=Lr[h],y=a.transform==="none"?u[h]:m(u[h],c);if(p){const g=p.length;for(let w=0;w<g;w++)a[p[w]]=y}else b?this.options.visualElement.renderState.vars[h]=y:a[h]=y}return this.options.layoutId&&(a.pointerEvents=c===this?Vo(i==null?void 0:i.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop(!1)}),this.root.nodes.forEach(Hd),this.root.sharedNodes.clear()}}}function OA(e){e.updateLayout()}function _A(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;s==="size"?Xe(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=Ne(f);f.min=r[d].min,f.max=f.min+h}):lv(s,t.layoutBox,r)&&Xe(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=Ne(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=_n();Dr(a,r,t.layoutBox);const l=_n();i?Dr(l,e.applyTransform(o,!0),t.measuredBox):Dr(l,r,t.layoutBox);const c=!ov(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=Se();Tr(m,t.layoutBox,f.layoutBox);const p=Se();Tr(p,r,h.layoutBox),sv(m,p)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function kA(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function IA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NA(e){e.clearSnapshot()}function Hd(e){e.clearMeasurements()}function jA(e){e.isLayoutDirty=!1}function FA(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function VA(e){e.resolveTargetDelta()}function LA(e){e.calcProjection()}function $A(e){e.resetSkewAndRotation()}function BA(e){e.removeLeadSnapshot()}function Ud(e,t,n){e.translate=ye(t.translate,0,n),e.scale=ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gd(e,t,n,r){e.min=ye(t.min,n.min,r),e.max=ye(t.max,n.max,r)}function zA(e,t,n,r){Gd(e.x,t.x,n.x,r),Gd(e.y,t.y,n.y,r)}function HA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const WA={duration:.45,ease:[.4,0,.1,1]},Kd=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yd=Kd("applewebkit/")&&!Kd("chrome/")?Math.round:Qe;function qd(e){e.min=Yd(e.min),e.max=Yd(e.max)}function UA(e){qd(e.x),qd(e.y)}function lv(e,t,n){return e==="position"||e==="preserve-aspect"&&!KE(Bd(t),Bd(n),.2)}function GA(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const KA=av({attachResizeListener:(e,t)=>Br(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ci={current:void 0},cv=av({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ci.current){const e=new KA({});e.mount(window),e.setOptions({layoutScroll:!0}),Ci.current=e}return Ci.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),YA={pan:{Feature:uA},drag:{Feature:cA,ProjectionNode:cv,MeasureLayout:tv}};function Xd(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&we.postRender(()=>s(t,ao(t)))}class qA extends on{mount(){const{current:t}=this.node;t&&(this.unmount=DP(t,(n,r)=>(Xd(this.node,r,"Start"),o=>Xd(this.node,o,"End"))))}unmount(){}}class XA extends on{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oo(Br(this.node.current,"focus",()=>this.onFocus()),Br(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Zd(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&we.postRender(()=>s(t,ao(t)))}class ZA extends on{mount(){const{current:t}=this.node;t&&(this.unmount=EP(t,(n,r)=>(Zd(this.node,r,"Start"),(o,{success:s})=>Zd(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const xa=new WeakMap,Ri=new WeakMap,JA=e=>{const t=xa.get(e.target);t&&t(e)},QA=e=>{e.forEach(JA)};function eO({root:e,...t}){const n=e||document;Ri.has(n)||Ri.set(n,{});const r=Ri.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(QA,{root:e,...t})),r[o]}function tO(e,t,n){const r=eO(t);return xa.set(e,n),r.observe(e),()=>{xa.delete(e),r.unobserve(e)}}const nO={some:0,all:1};class rO extends on{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:nO[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return tO(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(oO(t,n))&&this.startObserver()}unmount(){}}function oO({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const sO={inView:{Feature:rO},tap:{Feature:ZA},focus:{Feature:XA},hover:{Feature:qA}},iO={layout:{ProjectionNode:cv,MeasureLayout:tv}},ba={current:null},uv={current:!1};function aO(){if(uv.current=!0,!!Sl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ba.current=e.matches;e.addListener(t),t()}else ba.current=!1}const lO=new WeakMap;function cO(e,t,n){for(const r in t){const o=t[r],s=n[r];if(ke(o))e.addValue(r,o);else if(ke(s))e.addValue(r,zn(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,zn(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Jd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class uO{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$l,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Le.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,we.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Fs(n),this.isVariantNode=Om(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&ke(h)&&h.set(l[f],!1)}}mount(t){this.current=t,lO.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),uv.current||aO(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ba.current,process.env.NODE_ENV!=="production"&&Pl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qt(this.notifyUpdate),qt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=tr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&we.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hn){const n=Hn[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Jd.length;r++){const o=Jd[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=cO(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Vg(r)||$g(r))?r=parseFloat(r):!_P(r)&&Xt.test(n)&&(r=Sm(t,n)),this.setBaseTarget(t,ke(r)?r.get():r)),ke(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Zl(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ke(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ml),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class dv extends uO{constructor(){super(...arguments),this.KeyframeResolver=xP}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ke(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function fv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}function dO(e){return window.getComputedStyle(e)}class fO extends dv{constructor(){super(...arguments),this.type="html",this.renderInstance=fv}readValueFromInstance(t,n){var r;if(tr.has(n))return(r=this.projection)!=null&&r.isProjecting?la(n):VM(t,n);{const o=dO(t),s=(Ol(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zm(t,n)}build(t,n,r){Yl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jl(t,n,r)}}const hv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function hO(e,t,n,r){fv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(hv.has(o)?o:Kl(o),t.attrs[o])}class pO extends dv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(tr.has(n)){const r=bm(n);return r&&r.default||0}return n=hv.has(n)?n:Kl(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Bm(t,n,r)}build(t,n,r){Fm(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){hO(t,n,r,o)}mount(t){this.isSVGTag=Lm(t.tagName),super.mount(t)}}const gO=(e,t)=>Xl(e)?new pO(t):new fO(t,{allowProjection:e!==T.Fragment}),mO=hE({...LE,...sO,...YA,...iO},gO),vO=VP(mO),yO=({children:e})=>v.jsx(zw,{modifiers:[IT],dropAnimation:{duration:500,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:"Draggable dragging",children:v.jsx(vO.div,{style:{height:"100%",width:"100%",border:"2px solid #f6543b",borderRadius:"8px",boxShadow:"0 0 0 4px rgba(246, 140, 59, 0.2), 0 4px 12px rgba(228, 3, 3, 0.15)"},initial:{scale:.7,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.4,ease:[.22,1,.36,1],mass:.5},children:e})});/**
|
|
190
|
+
`,S.getElementsByTagName("head")[0].appendChild(D)),S.body&&x(S.body,"react-draggable-transparent-selection")}function C(S){if(S)try{if(S.body&&M(S.body,"react-draggable-transparent-selection"),S.selection)S.selection.empty();else{const D=(S.defaultView||window).getSelection();D&&D.type!=="Caret"&&D.removeAllRanges()}}catch{}}function x(S,D){S.classList?S.classList.add(D):S.className.match(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)")))||(S.className+=" ".concat(D))}function M(S,D){S.classList?S.classList.remove(D):S.className=S.className.replace(new RegExp("(?:^|\\s)".concat(D,"(?!\\S)"),"g"),"")}return be}var ft={},Su;function Eg(){if(Su)return ft;Su=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.canDragX=o,ft.canDragY=s,ft.createCoreData=a,ft.createDraggableData=l,ft.getBoundPosition=n,ft.getControlPosition=i,ft.snapToGrid=r;var e=Is(),t=xl();function n(d,f,h){if(!d.props.bounds)return[f,h];let{bounds:m}=d.props;m=typeof m=="string"?m:c(m);const p=u(d);if(typeof m=="string"){const{ownerDocument:b}=p,y=b.defaultView;let g;if(m==="parent"?g=p.parentNode:g=b.querySelector(m),!(g instanceof y.HTMLElement))throw new Error('Bounds selector "'+m+'" could not find an element.');const w=g,C=y.getComputedStyle(p),x=y.getComputedStyle(w);m={left:-p.offsetLeft+(0,e.int)(x.paddingLeft)+(0,e.int)(C.marginLeft),top:-p.offsetTop+(0,e.int)(x.paddingTop)+(0,e.int)(C.marginTop),right:(0,t.innerWidth)(w)-(0,t.outerWidth)(p)-p.offsetLeft+(0,e.int)(x.paddingRight)-(0,e.int)(C.marginRight),bottom:(0,t.innerHeight)(w)-(0,t.outerHeight)(p)-p.offsetTop+(0,e.int)(x.paddingBottom)-(0,e.int)(C.marginBottom)}}return(0,e.isNum)(m.right)&&(f=Math.min(f,m.right)),(0,e.isNum)(m.bottom)&&(h=Math.min(h,m.bottom)),(0,e.isNum)(m.left)&&(f=Math.max(f,m.left)),(0,e.isNum)(m.top)&&(h=Math.max(h,m.top)),[f,h]}function r(d,f,h){const m=Math.round(f/d[0])*d[0],p=Math.round(h/d[1])*d[1];return[m,p]}function o(d){return d.props.axis==="both"||d.props.axis==="x"}function s(d){return d.props.axis==="both"||d.props.axis==="y"}function i(d,f,h){const m=typeof f=="number"?(0,t.getTouch)(d,f):null;if(typeof f=="number"&&!m)return null;const p=u(h),b=h.props.offsetParent||p.offsetParent||p.ownerDocument.body;return(0,t.offsetXYFromParent)(m||d,b,h.props.scale)}function a(d,f,h){const m=!(0,e.isNum)(d.lastX),p=u(d);return m?{node:p,deltaX:0,deltaY:0,lastX:f,lastY:h,x:f,y:h}:{node:p,deltaX:f-d.lastX,deltaY:h-d.lastY,lastX:d.lastX,lastY:d.lastY,x:f,y:h}}function l(d,f){const h=d.props.scale;return{node:f.node,x:d.state.x+f.deltaX/h,y:d.state.y+f.deltaY/h,deltaX:f.deltaX/h,deltaY:f.deltaY/h,lastX:d.state.x,lastY:d.state.y}}function c(d){return{left:d.left,top:d.top,right:d.right,bottom:d.bottom}}function u(d){const f=d.findDOMNode();if(!f)throw new Error("<DraggableCore>: Unmounted during event!");return f}return ft}var fr={},xo={},Cu;function Ag(){if(Cu)return xo;Cu=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.default=e;function e(){}return xo}var Ru;function uT(){if(Ru)return fr;Ru=1,Object.defineProperty(fr,"__esModule",{value:!0}),fr.default=void 0;var e=c(T),t=a(ks()),n=a(Ct),r=xl(),o=Eg(),s=Is(),i=a(Ag());function a(b){return b&&b.__esModule?b:{default:b}}function l(b){if(typeof WeakMap!="function")return null;var y=new WeakMap,g=new WeakMap;return(l=function(w){return w?g:y})(b)}function c(b,y){if(b&&b.__esModule)return b;if(b===null||typeof b!="object"&&typeof b!="function")return{default:b};var g=l(y);if(g&&g.has(b))return g.get(b);var w={},C=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var x in b)if(x!=="default"&&Object.prototype.hasOwnProperty.call(b,x)){var M=C?Object.getOwnPropertyDescriptor(b,x):null;M&&(M.get||M.set)?Object.defineProperty(w,x,M):w[x]=b[x]}return w.default=b,g&&g.set(b,w),w}function u(b,y,g){return y=d(y),y in b?Object.defineProperty(b,y,{value:g,enumerable:!0,configurable:!0,writable:!0}):b[y]=g,b}function d(b){var y=f(b,"string");return typeof y=="symbol"?y:String(y)}function f(b,y){if(typeof b!="object"||b===null)return b;var g=b[Symbol.toPrimitive];if(g!==void 0){var w=g.call(b,y);if(typeof w!="object")return w;throw new TypeError("@@toPrimitive must return a primitive value.")}return(y==="string"?String:Number)(b)}const h={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let m=h.mouse,p=class extends e.Component{constructor(){super(...arguments),u(this,"dragging",!1),u(this,"lastX",NaN),u(this,"lastY",NaN),u(this,"touchIdentifier",null),u(this,"mounted",!1),u(this,"handleDragStart",y=>{if(this.props.onMouseDown(y),!this.props.allowAnyClick&&typeof y.button=="number"&&y.button!==0)return!1;const g=this.findDOMNode();if(!g||!g.ownerDocument||!g.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:w}=g;if(this.props.disabled||!(y.target instanceof w.defaultView.Node)||this.props.handle&&!(0,r.matchesSelectorAndParentsTo)(y.target,this.props.handle,g)||this.props.cancel&&(0,r.matchesSelectorAndParentsTo)(y.target,this.props.cancel,g))return;y.type==="touchstart"&&y.preventDefault();const C=(0,r.getTouchIdentifier)(y);this.touchIdentifier=C;const x=(0,o.getControlPosition)(y,C,this);if(x==null)return;const{x:M,y:S}=x,D=(0,o.createCoreData)(this,M,S);(0,i.default)("DraggableCore: handleDragStart: %j",D),(0,i.default)("calling",this.props.onStart),!(this.props.onStart(y,D)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,r.addUserSelectStyles)(w),this.dragging=!0,this.lastX=M,this.lastY=S,(0,r.addEvent)(w,m.move,this.handleDrag),(0,r.addEvent)(w,m.stop,this.handleDragStop))}),u(this,"handleDrag",y=>{const g=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(g==null)return;let{x:w,y:C}=g;if(Array.isArray(this.props.grid)){let S=w-this.lastX,D=C-this.lastY;if([S,D]=(0,o.snapToGrid)(this.props.grid,S,D),!S&&!D)return;w=this.lastX+S,C=this.lastY+D}const x=(0,o.createCoreData)(this,w,C);if((0,i.default)("DraggableCore: handleDrag: %j",x),this.props.onDrag(y,x)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const D=document.createEvent("MouseEvents");D.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(D)}return}this.lastX=w,this.lastY=C}),u(this,"handleDragStop",y=>{if(!this.dragging)return;const g=(0,o.getControlPosition)(y,this.touchIdentifier,this);if(g==null)return;let{x:w,y:C}=g;if(Array.isArray(this.props.grid)){let D=w-this.lastX||0,P=C-this.lastY||0;[D,P]=(0,o.snapToGrid)(this.props.grid,D,P),w=this.lastX+D,C=this.lastY+P}const x=(0,o.createCoreData)(this,w,C);if(this.props.onStop(y,x)===!1||this.mounted===!1)return!1;const S=this.findDOMNode();S&&this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(S.ownerDocument),(0,i.default)("DraggableCore: handleDragStop: %j",x),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,S&&((0,i.default)("DraggableCore: Removing handlers"),(0,r.removeEvent)(S.ownerDocument,m.move,this.handleDrag),(0,r.removeEvent)(S.ownerDocument,m.stop,this.handleDragStop))}),u(this,"onMouseDown",y=>(m=h.mouse,this.handleDragStart(y))),u(this,"onMouseUp",y=>(m=h.mouse,this.handleDragStop(y))),u(this,"onTouchStart",y=>(m=h.touch,this.handleDragStart(y))),u(this,"onTouchEnd",y=>(m=h.touch,this.handleDragStop(y)))}componentDidMount(){this.mounted=!0;const y=this.findDOMNode();y&&(0,r.addEvent)(y,h.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const y=this.findDOMNode();if(y){const{ownerDocument:g}=y;(0,r.removeEvent)(g,h.mouse.move,this.handleDrag),(0,r.removeEvent)(g,h.touch.move,this.handleDrag),(0,r.removeEvent)(g,h.mouse.stop,this.handleDragStop),(0,r.removeEvent)(g,h.touch.stop,this.handleDragStop),(0,r.removeEvent)(y,h.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,r.removeUserSelectStyles)(g)}}findDOMNode(){var y,g;return(y=this.props)!==null&&y!==void 0&&y.nodeRef?(g=this.props)===null||g===void 0||(g=g.nodeRef)===null||g===void 0?void 0:g.current:n.default.findDOMNode(this)}render(){return e.cloneElement(e.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};return fr.default=p,u(p,"displayName","DraggableCore"),u(p,"propTypes",{allowAnyClick:t.default.bool,children:t.default.node.isRequired,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:function(b,y){if(b[y]&&b[y].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:t.default.arrayOf(t.default.number),handle:t.default.string,cancel:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),u(p,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),fr}var Du;function dT(){return Du||(Du=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return l.default}}),e.default=void 0;var t=f(T),n=u(ks()),r=u(Ct),o=u(lT),s=xl(),i=Eg(),a=Is(),l=u(uT()),c=u(Ag());function u(g){return g&&g.__esModule?g:{default:g}}function d(g){if(typeof WeakMap!="function")return null;var w=new WeakMap,C=new WeakMap;return(d=function(x){return x?C:w})(g)}function f(g,w){if(g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var C=d(w);if(C&&C.has(g))return C.get(g);var x={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in g)if(S!=="default"&&Object.prototype.hasOwnProperty.call(g,S)){var D=M?Object.getOwnPropertyDescriptor(g,S):null;D&&(D.get||D.set)?Object.defineProperty(x,S,D):x[S]=g[S]}return x.default=g,C&&C.set(g,x),x}function h(){return h=Object.assign?Object.assign.bind():function(g){for(var w=1;w<arguments.length;w++){var C=arguments[w];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(g[x]=C[x])}return g},h.apply(this,arguments)}function m(g,w,C){return w=p(w),w in g?Object.defineProperty(g,w,{value:C,enumerable:!0,configurable:!0,writable:!0}):g[w]=C,g}function p(g){var w=b(g,"string");return typeof w=="symbol"?w:String(w)}function b(g,w){if(typeof g!="object"||g===null)return g;var C=g[Symbol.toPrimitive];if(C!==void 0){var x=C.call(g,w);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(g)}class y extends t.Component{static getDerivedStateFromProps(w,C){let{position:x}=w,{prevPropsPosition:M}=C;return x&&(!M||x.x!==M.x||x.y!==M.y)?((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:x,prevPropsPosition:M}),{x:x.x,y:x.y,prevPropsPosition:{...x}}):null}constructor(w){super(w),m(this,"onDragStart",(C,x)=>{if((0,c.default)("Draggable: onDragStart: %j",x),this.props.onStart(C,(0,i.createDraggableData)(this,x))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),m(this,"onDrag",(C,x)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",x);const M=(0,i.createDraggableData)(this,x),S={x:M.x,y:M.y,slackX:0,slackY:0};if(this.props.bounds){const{x:P,y:E}=S;S.x+=this.state.slackX,S.y+=this.state.slackY;const[A,F]=(0,i.getBoundPosition)(this,S.x,S.y);S.x=A,S.y=F,S.slackX=this.state.slackX+(P-S.x),S.slackY=this.state.slackY+(E-S.y),M.x=S.x,M.y=S.y,M.deltaX=S.x-this.state.x,M.deltaY=S.y-this.state.y}if(this.props.onDrag(C,M)===!1)return!1;this.setState(S)}),m(this,"onDragStop",(C,x)=>{if(!this.state.dragging||this.props.onStop(C,(0,i.createDraggableData)(this,x))===!1)return!1;(0,c.default)("Draggable: onDragStop: %j",x);const S={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:P,y:E}=this.props.position;S.x=P,S.y=E}this.setState(S)}),this.state={dragging:!1,dragged:!1,x:w.position?w.position.x:w.defaultPosition.x,y:w.position?w.position.y:w.defaultPosition.y,prevPropsPosition:{...w.position},slackX:0,slackY:0,isElementSVG:!1},w.position&&!(w.onDrag||w.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var w,C;return(w=(C=this.props)===null||C===void 0||(C=C.nodeRef)===null||C===void 0?void 0:C.current)!==null&&w!==void 0?w:r.default.findDOMNode(this)}render(){const{axis:w,bounds:C,children:x,defaultPosition:M,defaultClassName:S,defaultClassNameDragging:D,defaultClassNameDragged:P,position:E,positionOffset:A,scale:F,...W}=this.props;let L={},j=null;const N=!!!E||this.state.dragging,O=E||M,V={x:(0,i.canDragX)(this)&&N?this.state.x:O.x,y:(0,i.canDragY)(this)&&N?this.state.y:O.y};this.state.isElementSVG?j=(0,s.createSVGTransform)(V,A):L=(0,s.createCSSTransform)(V,A);const k=(0,o.default)(x.props.className||"",S,{[D]:this.state.dragging,[P]:this.state.dragged});return t.createElement(l.default,h({},W,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(x),{className:k,style:{...x.props.style,...L},transform:j}))}}e.default=y,m(y,"displayName","Draggable"),m(y,"propTypes",{...l.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:a.dontSetMe,style:a.dontSetMe,transform:a.dontSetMe}),m(y,"defaultProps",{...l.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(ii)),ii}var Tu;function Og(){if(Tu)return dr.exports;Tu=1;const{default:e,DraggableCore:t}=dT();return dr.exports=e,dr.exports.default=e,dr.exports.DraggableCore=t,dr.exports}var bo={},Mu;function fT(){if(Mu)return bo;Mu=1,bo.__esModule=!0,bo.cloneElement=a;var e=t(T);function t(l){return l&&l.__esModule?l:{default:l}}function n(l,c){var u=Object.keys(l);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(l);c&&(d=d.filter(function(f){return Object.getOwnPropertyDescriptor(l,f).enumerable})),u.push.apply(u,d)}return u}function r(l){for(var c=1;c<arguments.length;c++){var u=arguments[c]!=null?arguments[c]:{};c%2?n(Object(u),!0).forEach(function(d){o(l,d,u[d])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(u)):n(Object(u)).forEach(function(d){Object.defineProperty(l,d,Object.getOwnPropertyDescriptor(u,d))})}return l}function o(l,c,u){return c=s(c),c in l?Object.defineProperty(l,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):l[c]=u,l}function s(l){var c=i(l,"string");return typeof c=="symbol"?c:String(c)}function i(l,c){if(typeof l!="object"||l===null)return l;var u=l[Symbol.toPrimitive];if(u!==void 0){var d=u.call(l,c);if(typeof d!="object")return d;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function a(l,c){return c.style&&l.props.style&&(c.style=r(r({},l.props.style),c.style)),c.className&&l.props.className&&(c.className=l.props.className+" "+c.className),e.default.cloneElement(l,c)}return bo}var hr={},Pu;function _g(){if(Pu)return hr;Pu=1,hr.__esModule=!0,hr.resizableProps=void 0;var e=t(ks());Og();function t(r){return r&&r.__esModule?r:{default:r}}var n={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="y"){var l;return(l=e.default.number).isRequired.apply(l,s)}return e.default.number.apply(e.default,s)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];var a=s[0];if(a.axis==="both"||a.axis==="x"){var l;return(l=e.default.number).isRequired.apply(l,s)}return e.default.number.apply(e.default,s)}};return hr.resizableProps=n,hr}var Eu;function kg(){if(Eu)return ur;Eu=1,ur.__esModule=!0,ur.default=void 0;var e=i(T),t=Og(),n=fT(),r=_g(),o=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function s(y){if(typeof WeakMap!="function")return null;var g=new WeakMap,w=new WeakMap;return(s=function(x){return x?w:g})(y)}function i(y,g){if(y&&y.__esModule)return y;if(y===null||typeof y!="object"&&typeof y!="function")return{default:y};var w=s(g);if(w&&w.has(y))return w.get(y);var C={},x=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var M in y)if(M!=="default"&&Object.prototype.hasOwnProperty.call(y,M)){var S=x?Object.getOwnPropertyDescriptor(y,M):null;S&&(S.get||S.set)?Object.defineProperty(C,M,S):C[M]=y[M]}return C.default=y,w&&w.set(y,C),C}function a(){return a=Object.assign?Object.assign.bind():function(y){for(var g=1;g<arguments.length;g++){var w=arguments[g];for(var C in w)Object.prototype.hasOwnProperty.call(w,C)&&(y[C]=w[C])}return y},a.apply(this,arguments)}function l(y,g){if(y==null)return{};var w={},C=Object.keys(y),x,M;for(M=0;M<C.length;M++)x=C[M],!(g.indexOf(x)>=0)&&(w[x]=y[x]);return w}function c(y,g){var w=Object.keys(y);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(y);g&&(C=C.filter(function(x){return Object.getOwnPropertyDescriptor(y,x).enumerable})),w.push.apply(w,C)}return w}function u(y){for(var g=1;g<arguments.length;g++){var w=arguments[g]!=null?arguments[g]:{};g%2?c(Object(w),!0).forEach(function(C){d(y,C,w[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(y,Object.getOwnPropertyDescriptors(w)):c(Object(w)).forEach(function(C){Object.defineProperty(y,C,Object.getOwnPropertyDescriptor(w,C))})}return y}function d(y,g,w){return g=f(g),g in y?Object.defineProperty(y,g,{value:w,enumerable:!0,configurable:!0,writable:!0}):y[g]=w,y}function f(y){var g=h(y,"string");return typeof g=="symbol"?g:String(g)}function h(y,g){if(typeof y!="object"||y===null)return y;var w=y[Symbol.toPrimitive];if(w!==void 0){var C=w.call(y,g);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(y)}function m(y,g){y.prototype=Object.create(g.prototype),y.prototype.constructor=y,p(y,g)}function p(y,g){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,x){return C.__proto__=x,C},p(y,g)}var b=function(y){m(g,y);function g(){for(var C,x=arguments.length,M=new Array(x),S=0;S<x;S++)M[S]=arguments[S];return C=y.call.apply(y,[this].concat(M))||this,C.handleRefs={},C.lastHandleRect=null,C.slack=null,C}var w=g.prototype;return w.componentWillUnmount=function(){this.resetData()},w.resetData=function(){this.lastHandleRect=this.slack=null},w.runConstraints=function(x,M){var S=this.props,D=S.minConstraints,P=S.maxConstraints,E=S.lockAspectRatio;if(!D&&!P&&!E)return[x,M];if(E){var A=this.props.width/this.props.height,F=x-this.props.width,W=M-this.props.height;Math.abs(F)>Math.abs(W*A)?M=x/A:x=M*A}var L=x,j=M,_=this.slack||[0,0],N=_[0],O=_[1];return x+=N,M+=O,D&&(x=Math.max(D[0],x),M=Math.max(D[1],M)),P&&(x=Math.min(P[0],x),M=Math.min(P[1],M)),this.slack=[N+(L-x),O+(j-M)],[x,M]},w.resizeHandler=function(x,M){var S=this;return function(D,P){var E=P.node,A=P.deltaX,F=P.deltaY;x==="onResizeStart"&&S.resetData();var W=(S.props.axis==="both"||S.props.axis==="x")&&M!=="n"&&M!=="s",L=(S.props.axis==="both"||S.props.axis==="y")&&M!=="e"&&M!=="w";if(!(!W&&!L)){var j=M[0],_=M[M.length-1],N=E.getBoundingClientRect();if(S.lastHandleRect!=null){if(_==="w"){var O=N.left-S.lastHandleRect.left;A+=O}if(j==="n"){var V=N.top-S.lastHandleRect.top;F+=V}}S.lastHandleRect=N,_==="w"&&(A=-A),j==="n"&&(F=-F);var k=S.props.width+(W?A/S.props.transformScale:0),I=S.props.height+(L?F/S.props.transformScale:0),$=S.runConstraints(k,I);k=$[0],I=$[1];var H=k!==S.props.width||I!==S.props.height,U=typeof S.props[x]=="function"?S.props[x]:null,Z=x==="onResize"&&!H;U&&!Z&&(D.persist==null||D.persist(),U(D,{node:E,size:{width:k,height:I},handle:M})),x==="onResizeStop"&&S.resetData()}}},w.renderResizeHandle=function(x,M){var S=this.props.handle;if(!S)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+x,ref:M});if(typeof S=="function")return S(x,M);var D=typeof S.type=="string",P=u({ref:M},D?{}:{handleAxis:x});return e.cloneElement(S,P)},w.render=function(){var x=this,M=this.props,S=M.children,D=M.className,P=M.draggableOpts;M.width,M.height,M.handle,M.handleSize,M.lockAspectRatio,M.axis,M.minConstraints,M.maxConstraints,M.onResize,M.onResizeStop,M.onResizeStart;var E=M.resizeHandles;M.transformScale;var A=l(M,o);return(0,n.cloneElement)(S,u(u({},A),{},{className:(D?D+" ":"")+"react-resizable",children:[].concat(S.props.children,E.map(function(F){var W,L=(W=x.handleRefs[F])!=null?W:x.handleRefs[F]=e.createRef();return e.createElement(t.DraggableCore,a({},P,{nodeRef:L,key:"resizableHandle-"+F,onStop:x.resizeHandler("onResizeStop",F),onStart:x.resizeHandler("onResizeStart",F),onDrag:x.resizeHandler("onResize",F)}),x.renderResizeHandle(F,L))}))}))},g}(e.Component);return ur.default=b,b.propTypes=r.resizableProps,b.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},ur}var pr={},Au;function hT(){if(Au)return pr;Au=1,pr.__esModule=!0,pr.default=void 0;var e=a(T),t=s(ks()),n=s(kg()),r=_g(),o=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function s(g){return g&&g.__esModule?g:{default:g}}function i(g){if(typeof WeakMap!="function")return null;var w=new WeakMap,C=new WeakMap;return(i=function(M){return M?C:w})(g)}function a(g,w){if(g&&g.__esModule)return g;if(g===null||typeof g!="object"&&typeof g!="function")return{default:g};var C=i(w);if(C&&C.has(g))return C.get(g);var x={},M=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var S in g)if(S!=="default"&&Object.prototype.hasOwnProperty.call(g,S)){var D=M?Object.getOwnPropertyDescriptor(g,S):null;D&&(D.get||D.set)?Object.defineProperty(x,S,D):x[S]=g[S]}return x.default=g,C&&C.set(g,x),x}function l(){return l=Object.assign?Object.assign.bind():function(g){for(var w=1;w<arguments.length;w++){var C=arguments[w];for(var x in C)Object.prototype.hasOwnProperty.call(C,x)&&(g[x]=C[x])}return g},l.apply(this,arguments)}function c(g,w){var C=Object.keys(g);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(g);w&&(x=x.filter(function(M){return Object.getOwnPropertyDescriptor(g,M).enumerable})),C.push.apply(C,x)}return C}function u(g){for(var w=1;w<arguments.length;w++){var C=arguments[w]!=null?arguments[w]:{};w%2?c(Object(C),!0).forEach(function(x){d(g,x,C[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(g,Object.getOwnPropertyDescriptors(C)):c(Object(C)).forEach(function(x){Object.defineProperty(g,x,Object.getOwnPropertyDescriptor(C,x))})}return g}function d(g,w,C){return w=f(w),w in g?Object.defineProperty(g,w,{value:C,enumerable:!0,configurable:!0,writable:!0}):g[w]=C,g}function f(g){var w=h(g,"string");return typeof w=="symbol"?w:String(w)}function h(g,w){if(typeof g!="object"||g===null)return g;var C=g[Symbol.toPrimitive];if(C!==void 0){var x=C.call(g,w);if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(g)}function m(g,w){if(g==null)return{};var C={},x=Object.keys(g),M,S;for(S=0;S<x.length;S++)M=x[S],!(w.indexOf(M)>=0)&&(C[M]=g[M]);return C}function p(g,w){g.prototype=Object.create(w.prototype),g.prototype.constructor=g,b(g,w)}function b(g,w){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(x,M){return x.__proto__=M,x},b(g,w)}var y=function(g){p(w,g);function w(){for(var x,M=arguments.length,S=new Array(M),D=0;D<M;D++)S[D]=arguments[D];return x=g.call.apply(g,[this].concat(S))||this,x.state={width:x.props.width,height:x.props.height,propsWidth:x.props.width,propsHeight:x.props.height},x.onResize=function(P,E){var A=E.size;x.props.onResize?(P.persist==null||P.persist(),x.setState(A,function(){return x.props.onResize&&x.props.onResize(P,E)})):x.setState(A)},x}w.getDerivedStateFromProps=function(M,S){return S.propsWidth!==M.width||S.propsHeight!==M.height?{width:M.width,height:M.height,propsWidth:M.width,propsHeight:M.height}:null};var C=w.prototype;return C.render=function(){var M=this.props,S=M.handle,D=M.handleSize;M.onResize;var P=M.onResizeStart,E=M.onResizeStop,A=M.draggableOpts,F=M.minConstraints,W=M.maxConstraints,L=M.lockAspectRatio,j=M.axis;M.width,M.height;var _=M.resizeHandles,N=M.style,O=M.transformScale,V=m(M,o);return e.createElement(n.default,{axis:j,draggableOpts:A,handle:S,handleSize:D,height:this.state.height,lockAspectRatio:L,maxConstraints:W,minConstraints:F,onResizeStart:P,onResize:this.onResize,onResizeStop:E,resizeHandles:_,transformScale:O,width:this.state.width},e.createElement("div",l({},V,{style:u(u({},N),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},w}(e.Component);return pr.default=y,y.propTypes=u(u({},r.resizableProps),{},{children:t.default.element}),pr}var Ou;function pT(){return Ou||(Ou=1,cr.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},cr.exports.Resizable=kg().default,cr.exports.ResizableBox=hT().default),cr.exports}var Ig=pT();const _u=({booking:e,slotData:t,customClasses:n,hoveringAdditionalCardId:r="",children:o,ref:s})=>{const[i,a]=T.useState(!1),{updateIsDragging:l,isDragging:c}=xn(C=>C),{attributes:u,listeners:d,setNodeRef:f,isDragging:h,transform:m}=Fa({id:e.id,data:{type:"booking-slots",booking:e,slotData:t},disabled:e.disabledResize==="full"||e.disabledResize==="half"}),p=m?{transform:`translate3d(${m.x}px, ${m.y}px, 0)`}:void 0;Gr({onDragStart:()=>b(),onDragAbort:()=>y(),onDragCancel:()=>y(),onDragEnd:()=>y()});const b=T.useCallback(()=>{l(!0)},[]),y=T.useCallback(()=>{l(!1)},[]),g=T.useMemo(()=>({cursor:c?"ns-resize":"pointer",width:"100%"}),[c]),w=(C,x)=>r!=null&&r.length?C===x:!1;if(T.useImperativeHandle(s,()=>({changeCurrentCardResize:()=>a(C=>!C)})),!h)return v.jsx("div",{ref:f,className:he("cardContent_render",(i||w(r,e.id))&&"cardContent_render_dragging",n),style:{...p,...g},...d,...u,children:o},e.id)},Ng=({booking:e,slotData:t,events:n,style:r,ref:o})=>{if(!e||!t)return null;const{day:s,hour:i}=t,{users:a}=Hr(m=>m),[l,c]=T.useState(e),u=T.useMemo(()=>a.find(m=>m.id===l.userId),[a,l.userId]),d=T.useMemo(()=>{const m=Y.timeDiffInMinutes(l.finishAt,l.startAt),p=Math.floor(m/60),b=m%60;return p>0?b>0?`${p}h ${b}m`:`${p}h`:`${b}m`},[l.startAt,l.finishAt]),f=T.useMemo(()=>{const m=new Date,p=new Date(l.startAt),b=new Date(l.finishAt);return m>b?"past":m>=p&&m<=b?"current":"future"},[l.startAt,l.finishAt]),h=T.useCallback(()=>{const m=(u==null?void 0:u.profile.color)||"#3b82f6";switch(f){case"past":return{backgroundColor:`${m}60`};case"current":return{backgroundColor:m,boxShadow:`0 0 0 2px ${m}, 0 0 8px ${m}40`};default:return{backgroundColor:`${m}e6`}}},[u==null?void 0:u.profile.color,f]);return T.useEffect(()=>{e&&c(e)},[e]),T.useImperativeHandle(o,()=>({updateBooking:m=>c(m)})),v.jsx("div",{className:he("booking_card_content_container","overflow-hidden transition-all duration-200 hover:shadow-lg","min-h-[3rem] p-1 cursor-pointer relative"),style:{...r,...h()},onPointerUp:n==null?void 0:n.onClick,children:v.jsxs("div",{className:"booking_card_content text-white h-full flex flex-col justify-between",children:[v.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[v.jsx(Yf,{className:"w-3 h-3 opacity-80"}),v.jsx("span",{className:"text-xs font-medium truncate",children:(u==null?void 0:u.profile.name)||`User ${l.userId}`})]}),v.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[v.jsx(Kf,{className:"w-3 h-3 opacity-80"}),v.jsxs("span",{className:"text-xs",children:[Y.dateAndHourDateToString(l.startAt)," -",Y.dateAndHourDateToString(l.finishAt)]})]}),v.jsxs("div",{className:"flex items-center justify-between gap-1",children:[v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(Yo,{className:"w-3 h-3 opacity-80"}),v.jsx("span",{className:"text-xs opacity-90",children:d})]}),f!=="future"&&v.jsx("span",{className:he("text-xs px-1 py-0.5 rounded-full text-white font-medium",f==="current"?"bg-white/20":"bg-black/20"),children:f==="current"?"LIVE":"FEITO"})]})]})},`${s}-${i}`)},ku=({afterResize:e=!1,booking:t,slotData:n,events:r,style:o})=>{if(!t||!n)return null;const{day:s,hour:i}=n,a=T.useMemo(()=>{const l=Y.timeDiffInMinutes(t.finishAt,t.startAt),c=Math.floor(l/60),u=l%60;return c>0?u>0?`${c}h ${u}m`:`${c}h`:u===15?"":`${u}m`},[t.startAt,t.finishAt]);return v.jsxs("div",{className:he("booking_card_content_container","overflow-hidden","min-h-[3rem] p-1 relative"),style:{...o,backgroundColor:"#000456c0"},onPointerUp:r==null?void 0:r.onClick,children:[!e&&v.jsx("div",{className:"absolute top-1 right-1",children:v.jsx("div",{className:"w-2 h-2 bg-white rounded-full animate-ping"})}),v.jsxs("div",{className:"booking_card_content text-white h-full flex flex-col justify-between",children:[v.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[v.jsx(Kf,{className:"w-3 h-3 opacity-80"}),v.jsxs("span",{className:"text-xs",children:[Y.dateAndHourDateToString(t.startAt),"-",Y.dateAndHourDateToString(t.finishAt)]})]}),a.length&&v.jsx("div",{className:"flex items-center justify-between gap-1",children:v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx(Yo,{className:"w-3 h-3 opacity-80"}),v.jsx("span",{className:"text-xs opacity-90",children:a})]})})]})]},`${s}-${i}`)};function gT(e,t){const n=e>new Date(t.startAt),r=e<new Date(t.finishAt);return n&&r}const mT={calculateOverlappingBookings:(e,t)=>{const n=t.filter(o=>{const s=new Date(o.startAt).getDate(),i=e.startAt.getDate();return s===i&&o.id!==e.id});let r=0;for(const o of n)gT(e.startAt,o)&&r++;return r}},bl=({resize:e=!1,bookingInit:t,slotData:n,heightStyle:r,topHeightIncrement:o=0,customClasses:s,resizableParam:i,events:a,open:l=!0,lastCard:c,half:u,cardContentRef:d,cardsQuantity:f,cardIndex:h,hoveringAdditionalCardId:m,ref:p})=>{var k;const b=xn(el(I=>I.updateIsDragging)),{emptySlotNodes:y}=Jt(),{bookings:g,onCardResizeEnd:w}=wn(),[C,x]=T.useState(""),M=T.useRef(null),S=(I,$)=>{var H;D("show-handle",!0),i!=null&&i.onResizeStart&&i.onResizeStart(I,$),(H=M.current)==null||H.changeCurrentCardResize()},D=(I="",$=!1)=>{x(I),b($)},P=(I,$)=>{var H;(H=M.current)==null||H.changeCurrentCardResize(),D(),$.handle.includes("n")&&w(ki.resizeBookingNorthId(t)),$.handle.includes("s")&&w(ki.resizeBookingSouthId(t)),i!=null&&i.onResizeStop&&i.onResizeStop(I,$)},E=T.useMemo(()=>mT.calculateOverlappingBookings(t,g),[t,g]),A=I=>I===0?"8rem":"4rem",F=T.useMemo(()=>u&&f===3&&(h===0||h===1)?A(h):E===2?"0.8rem":c&&E===1?"0.2rem":c&&E?"1rem":E===1?"0.4rem":0,[E,h,f]),W=T.useMemo(()=>{const I=`${o}rem`,$=`${r}rem`;if(!u)return{inset:`${I} ${F} ${$}`};if(f===2&&h===1)return{inset:`${I} 0% ${$} 50%`};const H=()=>{const B=100/(f||0),K=(h||0)*B,X=100-K-B;return{cardWidth:B,leftPercent:K,rightPercent:X}},{cardWidth:U,leftPercent:Z,rightPercent:q}=H();return c?{inset:`${I} 0 ${$} ${100-U}%`}:{inset:`${I} ${q}% ${$} ${Z}%`}},[r,o,h,f,F,u,c]),L=(I,$)=>{const H=y.get($);H==null||H.hoveringAdditionalCard(I.id)},j=I=>{const $=y.get(I);$==null||$.clearHoveringCard()},_=(I,$)=>{({mouseenter:()=>L(t,I),mouseleave:()=>j(I)}[$]||(()=>console.warn(`Unhandled event type: ${$}`)))()},N=I=>{const $=I.toDateString();return pn({key:$,time:Pa})},O=I=>{const $=Y.calculateDaysDifference(t.finishAt,t.startAt);if($===1){_(N(t.finishAt),I);return}const H=Y.buildFutureDateList(t,$);for(const U of H)_(N(U),I)},V=I=>{const $=I.type;if(t!=null&&t.nodes)for(const H of t.nodes)_(H,$);O($)};if(T.useEffect(()=>()=>{a!=null&&a.onUnmount&&a.onUnmount()},[]),T.useImperativeHandle(d,()=>({changeCurrentCardResize:()=>{var I;(I=M.current)==null||I.changeCurrentCardResize()}})),!l&&!t.finishAt)return null;if((k=i==null?void 0:i.state)!=null&&k.height){const{state:I,onResize:$,resizeHandle:H=["s","n"]}=i,Z=(()=>{switch(t==null?void 0:t.disabledResize){case"full":return[];case"half":return["s"];default:return H}})();return v.jsx(Ig.Resizable,{className:he(i==null?void 0:i.customClass,C),height:I==null?void 0:I.height,width:I==null?void 0:I.width,onResize:$,onResizeStart:S,onResizeStop:P,resizeHandles:Z,draggableOpts:{grid:[35,35]},handleSize:[20,20],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:v.jsx("div",{className:"card_content_core",style:W,onMouseEnter:V,onMouseLeave:V,onBlur:()=>{},children:v.jsx(_u,{ref:M,booking:t,slotData:n,hoveringAdditionalCardId:m,children:e?v.jsx(ku,{booking:t,slotData:n,events:{onClick:a==null?void 0:a.onClick}}):v.jsx(Ng,{booking:t,slotData:n,events:{onClick:a==null?void 0:a.onClick}})},t.id)})})}return v.jsx("div",{ref:p,className:"card_content_core",style:W,children:v.jsx(_u,{customClasses:s,booking:t,slotData:n,children:v.jsx(ku,{booking:t,slotData:n,afterResize:!0,events:{onClick:a==null?void 0:a.onClick}})})})},Iu=({booking:e,slotData:t,cardsQuantity:n=1,cardIndex:r=0,lastCard:o=!1,half:s=!1,hoveringAdditionalCardId:i,ref:a})=>{const{bookingViewType:l}=$e(),[c,u]=T.useState({...e});T.useEffect(()=>{e&&u(e)},[e]);const[d,f]=T.useState(!1),h=T.useRef("left"),m=()=>{const M=t.day.split(":")[0].trim();if(l===ae.DAY)h.current="top";else switch(M){case"Mon":case"Sun":h.current="right";break;default:h.current="left";break}f(!0)},p=async M=>{try{u(S=>({...S,finishAt:M}))}catch(S){console.log(S)}},b=async M=>{u(S=>({...S,startAt:M}))},y=async M=>{try{u(S=>({...S,finishAt:M}))}catch(S){console.log(S)}},{state:g,heightStyle:w,topHeightIncrement:C,onResize:x}=$p({booking:c,onAddTime:p,onAddStartTime:b,onSubTime:y,starter:!0});return T.useImperativeHandle(a,()=>({bookingId:e.id}),[e.id]),v.jsx(Dg,{booking:c,onOpenChange:f,side:l===ae.DAY?"top":"left",isEditingOpen:d,children:v.jsx(bl,{resizableParam:{state:g,onResize:x,resizeHandle:["s","n"]},customClasses:"Draggable",bookingInit:c,slotData:t,topHeightIncrement:C,heightStyle:w,events:{onClick:m},half:s,lastCard:o,cardsQuantity:n,cardIndex:r,hoveringAdditionalCardId:i})})},Nu=({bookings:e,blockTimeString:t,slotData:n,hoveringAdditionalCardId:r})=>{if(!e||!(n!=null&&n.day)&&!(n!=null&&n.hour)||!t||!e.length)return null;const o=T.useMemo(()=>e.filter(s=>{const i=Y.dateAndHourDateToString(new Date(s.startAt));return Y.compareSameDate(new Date(n.day),new Date(s.startAt))&&i.split(":")[1]===t}),[e,t]);if(!(!o||!(o!=null&&o.length)))return o.length===1?v.jsx(Iu,{booking:o[0],slotData:n,hoveringAdditionalCardId:r}):v.jsx(v.Fragment,{children:o.map((s,i)=>v.jsx(Iu,{booking:s,half:!0,slotData:n,lastCard:o.length-1===i,cardsQuantity:o.length,cardIndex:i,hoveringAdditionalCardId:r},s.id))})},vT=({booking:e,onAddTime:t,onStartAtChange:n,onSubTime:r,operationalHours:o,starter:s=!1})=>{const[i,a]=T.useState({height:Ht,width:Ht}),[l,c]=T.useState(0),u=(P,E)=>{const A=Y.timeDiffInMinutes(P,E),F=Math.ceil(A/Oo);return-Math.abs((F-1)*2)},[d,f]=T.useState(s?u(e.finishAt,e.startAt):0),h=P=>P===-Math.abs(0)||P===0,m=P=>{const E=((o==null?void 0:o.startTime)||24)-1;return P.getHours()===E&&P.getMinutes()===45},p=P=>{const E=o!=null&&o.endTime?o.endTime+1:0;return P.getHours()===E&&P.getMinutes()===15},b=()=>{const P=C(e.finishAt,"add");return p(P)?!0:(f(E=>h(E)?uf:E-2),t&&t(P),!1)},y=async()=>{const P=C(e.finishAt,"remove");f(E=>E+2),r&&r(P)},g=()=>{const P=x(e.startAt,"remove");return m(P)?!0:(c(E=>E-2),n&&n(P),!1)},w=async()=>{const P=x(e.startAt,"add");c(E=>E+2),n&&n(P)},C=(P,E)=>{const A=new Date(P),F=A.getMinutes();return E==="add"&&A.setMinutes(F+15),E==="remove"&&A.setMinutes(F-15),A},x=(P,E)=>{const A=new Date(P),F=A.getMinutes();return E==="add"&&A.setMinutes(F+15),E==="remove"&&A.setMinutes(F-15),A};return{state:i,setState:a,resetState:()=>{a({height:Ht,width:Ht})},resetHeightStyle:()=>{f(0)},heightStyle:d,topHeightIncrement:l,onResize:(P,{size:E})=>{P.stopPropagation(),P.preventDefault();const A=E.height;a(F=>{let W=!1;return F.height<A&&(l!==0?w():W=b()),F.height>A&&(A<600?W=g():y()),W?{...F}:{...F,height:A}})}}},yT=T.forwardRef(({slotData:e,events:{onClick:t,renderPreviewCard:n}},r)=>{const[o,s]=T.useState(!1),[i,a]=T.useState(e.time),[l,c]=T.useState(Y.addMinutesToHour(i,15)),[u,d]=T.useState(!1),{isDragging:f}=xn(j=>j),{systemColor:h,isTimeInfoVisible:m}=yf(j=>j),{operationalStartTime:p,operationalEndTime:b}=$e(),y=T.useRef(null),g=u?{backgroundColor:"white",border:"none"}:{},w=T.useMemo(()=>({id:"dragging_booking_preview",startAt:Y.convertStringTimeToDateFormat(i),finishAt:Y.convertStringTimeToDateFormat(l)}),[l,i]),C=()=>{var j;(j=y.current)==null||j.changeCurrentCardResize(),d(!0),n()},x=()=>{t(l,i)},{state:M,resetState:S,resetHeightStyle:D,heightStyle:P,onResize:E,topHeightIncrement:A}=vT({booking:w,operationalHours:{startTime:p,endTime:b},onAddTime:j=>{console.log("onAddTime date time",j),c(Y.dateTimeAsString(j))},onStartAtChange:j=>{console.log("onStartAtChange date time",j),a(Y.dateTimeAsString(j))},onSubTime:j=>{console.log("onSubTime date time",j),c(Y.dateTimeAsString(j))}}),F=()=>{},W=()=>{c(Y.addMinutesToHour(e.time,15))},L=()=>{d(!1),W(),S(),D()};if(T.useImperativeHandle(r,()=>({show:()=>s(!0),hide:()=>{s(!1)},changeIsOpen:j=>s(j),reset:L}),[]),!!o)return v.jsx("div",{style:{...g,border:m&&!f?`1.5px solid ${h}`:"none"},className:he("timeInfo_core",g),children:v.jsx(Ig.Resizable,{className:"slot-resizable",height:M.height,width:M.width,onResizeStart:C,onResizeStop:x,onResize:E,resizeHandles:["se"],draggableOpts:{grid:[35,35]},handleSize:[30,30],maxConstraints:[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],transformScale:1,children:u?v.jsx("div",{className:"timeInfo_core_dragging",children:v.jsx(bl,{resize:!0,bookingInit:w,slotData:{day:e.key,hour:"09:00"},topHeightIncrement:A,heightStyle:P,cardContentRef:y,resizableParam:{state:M,onResize:E,customClass:"show-handle"},events:{onUnmount:F}})}):v.jsx("div",{className:"timeInfo_core_timeParent",children:!f&&v.jsx("span",{className:"timeInfo_core_timeParent_time",style:{color:h,display:m?"initial":"none"},children:e.time})})})})}),So=({slotData:e,blockTimeString:t,dayHour:n,slotPosition:r,disabledCss:o,events:s,bookings:i,children:a,ref:l})=>{const{isDragging:c,updateIsDragging:u}=xn(J=>J),{emptySlotNodes:d,setSelectedNode:f}=Jt(),{onModalClose:h,onSlotClick:m}=wn(),{startAt:p,finishAt:b,updateDate:y,updateStartAt:g,updateFinishAtWithOffset:w}=gf(J=>J),C=$e(J=>J.bookingViewType),[x,M]=T.useState(!1),[S,D]=T.useState(!1),[P,E]=T.useState([]),[A,F]=T.useState(""),W=T.useRef(null),L=T.useRef(null),j=T.useRef(null),_=J=>{E(ue=>ue.filter(xe=>xe.id!==J.id))},N=(J,ue,xe=!1)=>{const Be=new Date(J.finishAt);Be.setHours(24,0);const tt=[{id:J.id,userId:J.userId,finishAt:xe?Be:J.finishAt,overflow:!0,startAt:ki.resetToFirstHourNextDay(J),disabledResize:xe?"full":"half",nodes:ue}];E(tt)},O=()=>j.current,V=()=>{var J;(J=j.current)==null||J.isModalOpen()},k=()=>{var J;(J=O())==null||J.showCreationModal()},I=()=>{var J;(J=L.current)==null||J.show()},$=()=>{var J;(J=L.current)==null||J.hide()},H=J=>{var ue;(ue=L.current)==null||ue.changeIsOpen(J)},U=T.useMemo(()=>({id:"dragging_booking_preview",startAt:Y.convertStringTimeToDateFormat(p),finishAt:Y.convertStringTimeToDateFormat(b)}),[b,p]),{updateHeightStyle:Z,heightStyle:q}=$p({booking:U}),B=(J,ue)=>!ue||!(ue!=null&&ue.length)?!1:!!ue.find(xe=>Y.dateTimeAsString(xe.startAt)===J),K=T.useCallback(()=>{if(B(e.time,i)||c||V()||x)return;s.onMouseEnterEvent()===r&&I()},[r,c,x,s,P,i]),X=J=>{var Be,tt;console.log("onCloseCreationModal"),(Be=L.current)==null||Be.reset();const ue=pn(e),xe=d==null?void 0:d.get(ue);xe&&xe.closeEvent(),h==null||h(),J==null||J.stopPropagation(),J==null||J.preventDefault(),(tt=O())==null||tt.closeModal()},G=J=>{J||X(),M(J),H(J)},ne=T.useCallback((J,ue)=>{if(c&&!J)return;u(!1);const{time:xe,key:Be,userId:tt}=e,nr=pn({key:Be,time:ue||xe,userId:tt}),rr=d==null?void 0:d.get(nr);f(nr),rr&&rr.showEvent(ue||xe),y(Be);const _t=w(J||xe,J?0:15);m({slotData:e,finishTime:_t}),k()},[e,d,c,m,w]),z=()=>{c||V()||$()},le=o.length||S?o:"hovering_slotTrigger_core",me=T.useCallback(()=>{const{time:J,key:ue}=e;u(!0),D(!0),y(ue),g(J),w(J)},[w,e,y,u,g]),Ie=()=>{k()},Ee=T.useCallback(()=>{D(!1)},[]),ct=()=>{setTimeout(()=>{$(),k(),M(!0)},0)};return T.useEffect(()=>{c?document.body.style.cursor="ns-resize":document.body.style.cursor="default"},[c]),T.useEffect(()=>{if(!b||!p)return;const J=Y.convertStringTimeToDateFormat(b),ue=Y.convertStringTimeToDateFormat(p);Number.isNaN(J)||Number.isNaN(ue)||!(J instanceof Date)||!(ue instanceof Date)||Z(J,ue)},[b,p]),T.useEffect(()=>{if(!x){$();return}W!=null&&W.current&&W.current.scrollIntoView({behavior:"smooth",block:"center"})},[x]),T.useEffect(()=>{i!=null&&i.length&&$(),S&&I()},[i,S]),T.useEffect(()=>{S&&I()},[S]),T.useImperativeHandle(l,()=>({showEvent:J=>{g(J),ct()},closeEvent:()=>{var J;(J=O())==null||J.closeModal(),M(!1),$(),Ee()},onOpenCloseChange:J=>{H(J),M(J),Ee()},addAdditionalBooking:N,removeFromAdditionalBooking:_,hoveringAdditionalCard:J=>{F(J)},clearHoveringCard:()=>{F("")}})),v.jsxs(v.Fragment,{children:[v.jsxs("div",{ref:e.ref,style:{borderBottom:r==="fourth"?"1px solid #8080807a":"",...e.style},className:he("slotTrigger_core",C===ae.DAY&&"slotTrigger_core_day",le),onMouseOver:K,onMouseLeave:z,onFocus:()=>{},children:[v.jsx(yT,{ref:L,slotData:e,events:{onClick:ne,openOptions:Ie,renderPreviewCard:me,resetPrevView:Ee}}),a,x&&v.jsx(bl,{ref:W,bookingInit:U,slotData:{day:new Date().toISOString(),hour:"09:00"},hoveringAdditionalCardId:A,heightStyle:q}),v.jsx(Nu,{hoveringAdditionalCardId:A,bookings:P,blockTimeString:"00",slotData:n}),v.jsx(Nu,{hoveringAdditionalCardId:A,bookings:i,blockTimeString:t,slotData:n})]},e.key),v.jsx(Lp,{ref:j,onClose:X,onOpenChange:G,buttonTrigger:v.jsx("div",{},e.key),side:"right"})]})};var wT="Separator",ju="horizontal",xT=["horizontal","vertical"],jg=R.forwardRef((e,t)=>{const{decorative:n,orientation:r=ju,...o}=e,s=bT(r)?r:ju,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return v.jsx(ce.div,{"data-orientation":s,...a,...o,ref:t})});jg.displayName=wT;function bT(e){return xT.includes(e)}var ST=jg;function CT({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return v.jsx(ST,{"data-slot":"separator-root",decorative:n,orientation:t,className:he("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}const RT=La("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function DT({className:e,variant:t,...n}){return v.jsx("div",{className:he(RT({variant:t}),e),...n})}const TT=({dateToRender:e,isFirstDay:t})=>v.jsx("div",{style:{left:t?"3px":"10px"},className:"first_day_slot",children:v.jsx("span",{children:v.jsx(DT,{children:e})})});class MT{constructor(){sn(this,"positionBasedOnSeconds",t=>{const[,n]=t.split(":");if(!t.length)return-3;const r=Number(n);return this.normalizingMinutes(r)});sn(this,"normalizingMinutes",t=>t>=0&&t<=15?t*2:t>15&&t<30?(t-15)*2:t>=30&&t<=59?t-30:-3);sn(this,"isInitialMinute",t=>t>=0&&t<=8);sn(this,"isSameHour",(t,n)=>n.split(":")[0]===t)}}class PT{constructor(){sn(this,"is15MinLess",t=>{const n=new Date,[r,o]=t.split(":"),s=new Date(n.getFullYear(),n.getMonth(),n.getDate(),Number(r),Number(o),0),i=new Date(n),a=Y.roundMinutes(n.getMinutes());i.setHours(n.getHours(),a,0,0);const l=Y.minuteDifference(s,i);return l>30||l<-30});sn(this,"normalizeDateNow",t=>{const n=t.getHours(),r=Y.roundMinutes(t.getMinutes());return`${n.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`})}}const Co=({color:e="#000",isFirstDay:t,slotData:n})=>{const{bookingViewType:r}=$e(),[o,s]=T.useState(""),[i,a]=T.useState(!1),[l,c]=T.useState(!1),u=T.useMemo(()=>{const y=new Date,g=new Date(n.key);return g.getDay()===y.getDay()&&g.getDate()===y.getDate()},[n.key]),d=y=>{s(y)},f=()=>{a(!0)},h=()=>{a(!1)},m=T.useMemo(()=>new MT().positionBasedOnSeconds(o),[n.time,o]),p=T.useMemo(()=>t?"101%":r===ae.DAY?"102%":"100%",[t,r]),b=T.useMemo(()=>u?{top:`${m-2}px`,left:"0px",width:"100%"}:{top:`${m-1}px`,left:"0px",width:"100%"},[u,t,p,m]);if(T.useEffect(()=>{const y=n.time,g=new PT,w=()=>{const x=new Date,M=g.normalizeDateNow(x),S=Y.dateAndHourDateToString(x);o!==S&&d(S),c(M===y)};let C;return g.is15MinLess(y)||(C=setInterval(()=>w(),1e3)),()=>clearInterval(C)},[n.time,o]),!!l)return v.jsxs("div",{style:{...b},className:he("timeIndicator_today",u&&p,u&&r===ae.WEEK&&"timeIndicator_today_circle"),onMouseEnter:f,onMouseOut:h,onBlur:()=>{},children:[v.jsx(CT,{className:"focus-effect",style:{height:u&&r===ae.WEEK?"4px":"2px",backgroundColor:e}}),i&&v.jsx(TT,{isFirstDay:t,dateToRender:o})]})},Fu=({bookings:e,first:t,second:n,third:r,fourth:o,disabledCss:s,firstDay:i,userId:a,dayHour:l})=>{const{operationalStartTime:c,operationalEndTime:u}=$e(),{setEmptySlotNode:d,emptySlotNodes:f}=Jt(),h=T.useCallback((g,w)=>{if(!g)return;const C=pn(w);f.get(C)||d(g,w,{startTime:c,endTime:u})},[d,f]),m=(g,w)=>{const C=g.toDateString();return pn({key:C,time:w?Y.dateTimeAsString(w):Pa})},p=T.useCallback(g=>{const w=m(g);return f.get(w)},[f]),b=(g,w,C)=>{const x=Y.buildFutureDateList(g,w);for(let M=0;M<x.length;M++){const S=p(x[M]);if(!S)return;S.addAdditionalBooking(g,C,M!==x.length-1)}},y=T.useCallback(()=>{if(e!=null&&e.length)for(const g of e){const w=Y.calculateDaysDifference(g.finishAt,g.startAt),x=Y.buildFutureDateList(g,w+1,0).map((M,S)=>m(M,S===0?g.startAt:void 0)).filter(M=>M!==void 0);if(w===1){const M=p(g.finishAt);if(!M)return;M.addAdditionalBooking(g,x);return}b(g,w,x)}},[e,p,b]);return T.useEffect(()=>{e!=null&&e.length&&y()},[e,f,y]),v.jsxs(v.Fragment,{children:[v.jsx(So,{ref:g=>h(g,{key:t.key,time:t.time,userId:a}),slotData:t,disabledCss:s,events:{onMouseEnterEvent:()=>"first"},slotPosition:"first",dayHour:l,bookings:e,blockTimeString:"00",children:v.jsx(Co,{isFirstDay:i,slotData:t})}),v.jsx(So,{ref:g=>h(g,{key:n.key,time:n.time,userId:a}),slotData:n,disabledCss:s,events:{onMouseEnterEvent:()=>"second"},slotPosition:"second",dayHour:l,bookings:e,blockTimeString:"15",children:v.jsx(Co,{isFirstDay:i,slotData:n})}),v.jsx(So,{ref:g=>h(g,{key:r.key,time:r.time,userId:a}),slotData:r,disabledCss:s,events:{onMouseEnterEvent:()=>"third"},slotPosition:"third",dayHour:l,bookings:e,blockTimeString:"30",children:v.jsx(Co,{isFirstDay:i,slotData:r})}),v.jsx(So,{ref:g=>h(g,{key:o.key,time:o.time,userId:a}),slotData:o,disabledCss:s,events:{onMouseEnterEvent:()=>"fourth"},slotPosition:"fourth",dayHour:l,bookings:e,blockTimeString:"45",children:v.jsx(Co,{isFirstDay:i,slotData:o})})]})},ET=T.memo(({firstDay:e,booking:t,dayHour:n,disabledCss:r,user:o,firstBlockTimeData:s,secondBlockTimeData:i,thirdBlockTimeData:a,fourthBlockTimeData:l})=>{const{day:c,hour:u}=n,d=Hr(h=>h.users),f=T.useMemo(()=>t.filter(h=>{const m=Y.dateAndHourDateToString(h.startAt),p=new Date(h.startAt).getDate(),b=new Date(c).getDate(),y=u.split(":")[0],w=m.split(":")[0]===y,C=p===b;if(!(o!=null&&o.id)){const M=d.find(S=>S.id===h.userId);return w&&C&&(M==null?void 0:M.status)}const x=h.userId===o.id;return w&&C&&x}),[t,n,d,o]);return f.length?v.jsx(Fu,{dayHour:n,bookings:f,first:s,second:i,third:a,fourth:l,disabledCss:r,firstDay:e}):v.jsx(Fu,{dayHour:n,first:s,second:i,third:a,fourth:l,disabledCss:r,firstDay:e,userId:o==null?void 0:o.id})}),Vu=({dayHour:e,firstDay:t,user:n,bookingBulk:r})=>{const o=T.useRef(""),s=bf(M=>M.updateStartAt),i=T.useMemo(()=>Y.addMinuteToHour(e.hour,15),[e.hour]),a=T.useMemo(()=>Y.addMinuteToHour(e.hour,30),[e.hour]),l=T.useMemo(()=>Y.addMinuteToHour(e.hour,45),[e.hour]),c=(M,S)=>S?`${M};${S}`:`${M}`,{isOver:u,setNodeRef:d}=lo({id:c(Y.newDateKey(e.day,e.hour),n==null?void 0:n.id),data:{accepts:["booking-slots"]}}),{isOver:f,setNodeRef:h}=lo({id:c(Y.newDateKey(e.day,i),n==null?void 0:n.id),data:{accepts:["booking-slots"]}}),{isOver:m,setNodeRef:p}=lo({id:c(Y.newDateKey(e.day,a),n==null?void 0:n.id),data:{accepts:["booking-slots"]}}),{isOver:b,setNodeRef:y}=lo({id:c(Y.newDateKey(e.day,l),n==null?void 0:n.id),data:{accepts:["booking-slots"]}});T.useEffect(()=>{u&&s(c(Y.newDateKey(e.day,e.hour),n==null?void 0:n.id)),f&&s(c(Y.newDateKey(e.day,i),n==null?void 0:n.id)),m&&s(c(Y.newDateKey(e.day,a),n==null?void 0:n.id)),b&&s(c(Y.newDateKey(e.day,l),n==null?void 0:n.id))},[u,f,m,b]);const g=T.useMemo(()=>({ref:d,style:{backgroundColor:u?"#0066ff":""},key:Y.newDateKey(e.day,e.hour),time:e.hour,userId:n==null?void 0:n.id}),[e.day,u,e.hour,d]),w=T.useMemo(()=>({ref:h,style:{backgroundColor:f?"#0066ff":""},key:Y.newDateKey(e.day,i),time:i,userId:n==null?void 0:n.id}),[e.day,f,i,h]),C=T.useMemo(()=>({ref:p,style:{backgroundColor:m?"#0066ff":""},key:Y.newDateKey(e.day,a),time:a,userId:n==null?void 0:n.id}),[e.day,m,a,p]),x=T.useMemo(()=>({ref:y,style:{backgroundColor:b?"#0066ff":""},key:Y.newDateKey(e.day,l),time:l,userId:n==null?void 0:n.id}),[e.day,l,b,y]);return v.jsx("td",{className:"slot",children:v.jsx(ET,{booking:r,dayHour:e,firstDay:t,user:n,disabledCss:o.current,firstBlockTimeData:g,secondBlockTimeData:w,thirdBlockTimeData:C,fourthBlockTimeData:x})},`${e.day}-${e.hour}-slot`)},AT=({hour:e})=>v.jsxs(hl,{children:[v.jsx(pl,{children:v.jsx("span",{className:"border-solid hover:border-b-2 hover:border-b-purple-600 border-b-white cursor-pointer",children:e})}),v.jsxs(gl,{children:[v.jsx(_R,{children:"Hour options"}),v.jsx(kR,{}),v.jsx(su,{children:"Set lunch interval"}),v.jsx(su,{children:"Remove lunch interval"})]})]}),OT=()=>{const{hours:e,daysOfWeek:t,bookingViewType:n,bookingBulkData:r}=$e(el(b=>({bookingBulkData:b.bookingBulkData,bookingViewType:b.bookingViewType,daysOfWeek:b.daysOfWeek,hours:b.hours}))),{selectedNode:o,emptySlotNodes:s}=Jt(),{users:i}=Hr(b=>b),{finishAt:a,updateFinishAtWithOffset:l}=gf(b=>b),[c]=T.useState({startAt:"12:00",finishAt:"12:30"}),u=T.useMemo(()=>n===ae.DAY?{maxWidth:"5rem",padding:0,minWidth:"4rem"}:{},[n]),d=T.useMemo(()=>({borderLeft:"none",backgroundColor:"white"}),[]),f=T.useMemo(()=>o.split(";")[1],[o]),h=T.useMemo(()=>{const b=[];if(n===ae.DAY)for(let y=0;y<i.length;y++)b.push(t[0]);return b},[n,t,i]);T.useEffect(()=>{if(o){const b=s.get(o);b==null||b.showEvent(f)}},[o,s]),T.useEffect(()=>{f===a&&l(f)},[o,a]);const m=T.useCallback(b=>{const y=g=>g===0;return n===ae.DAY?i.filter(g=>g.status).map((g,w)=>v.jsx(Vu,{dayHour:{day:String(h[w]),hour:b},user:g,lunchTimeBlock:c,firstDay:y(w),bookingBulk:r.booking},`${h[w]}-${b}-slot-content-{${g.id}}`)):t.map((g,w)=>v.jsx(Vu,{dayHour:{day:String(g),hour:b},lunchTimeBlock:c,firstDay:y(w),bookingBulk:r.booking},`${g}-${b}-slot-content`))},[n,i,t,h,r.booking]);return T.useMemo(()=>v.jsx("tbody",{children:e.map(b=>v.jsxs("tr",{children:[v.jsx("td",{style:{...d,...u},className:"time-col",children:v.jsx("div",{className:"calendarCore_actions",children:v.jsx(AT,{hour:b})})},`${b}-hour`),m(b)]},`${b}-content`))}),[u,e,d,r.booking,n,t,m,t.length])},_T={id:"user-123",profile:{id:"profile-123",name:"Diego",color:"#14b8a6",email:"jane.smith@example.com"},createdAt:new Date,updatedAt:new Date};function kT(e,t,n){const r={...e};return t.top+e.y<=n.top?r.y=n.top-t.top:t.bottom+e.y>=n.top+n.height&&(r.y=n.top+n.height-t.bottom),t.left+e.x<=n.left?r.x=n.left-t.left:t.right+e.x>=n.left+n.width&&(r.x=n.left+n.width-t.right),r}const IT=e=>{let{transform:t,draggingNodeRect:n,windowRect:r}=e;return!n||!r?t:kT(t,n,r)},Fg=T.createContext({});function NT(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const Sl=typeof window<"u",jT=Sl?T.useLayoutEffect:T.useEffect,Cl=T.createContext(null);function Rl(e,t){e.indexOf(t)===-1&&e.push(t)}function Dl(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const Pt=(e,t,n)=>n>t?t:n<e?e:n;let Jn=()=>{},Et=()=>{};process.env.NODE_ENV!=="production"&&(Jn=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Et=(e,t)=>{if(!e)throw new Error(t)});const At={},Vg=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Lg(e){return typeof e=="object"&&e!==null}const $g=e=>/^0[^.\s]+$/u.test(e);function Tl(e){let t;return()=>(t===void 0&&(t=e()),t)}const Qe=e=>e,FT=(e,t)=>n=>t(e(n)),oo=(...e)=>e.reduce(FT),Nr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Ml{constructor(){this.subscriptions=[]}add(t){return Rl(this.subscriptions,t),()=>Dl(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const ot=e=>e*1e3,gt=e=>e/1e3;function Bg(e,t){return t?e*(1e3/t):0}const Lu=new Set;function Pl(e,t,n){e||Lu.has(t)||(console.warn(t),Lu.add(t))}const zg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,VT=1e-7,LT=12;function $T(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=zg(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>VT&&++a<LT);return i}function so(e,t,n,r){if(e===t&&n===r)return Qe;const o=s=>$T(s,0,1,e,n);return s=>s===0||s===1?s:zg(o(s),t,r)}const Hg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Wg=e=>t=>1-e(1-t),Ug=so(.33,1.53,.69,.99),El=Wg(Ug),Gg=Hg(El),Kg=e=>(e*=2)<1?.5*El(e):.5*(2-Math.pow(2,-10*(e-1))),Al=e=>1-Math.sin(Math.acos(e)),Yg=Wg(Al),qg=Hg(Al),BT=so(.42,0,1,1),zT=so(0,0,.58,1),Xg=so(.42,0,.58,1),HT=e=>Array.isArray(e)&&typeof e[0]!="number",Zg=e=>Array.isArray(e)&&typeof e[0]=="number",$u={linear:Qe,easeIn:BT,easeInOut:Xg,easeOut:zT,circIn:Al,circInOut:qg,circOut:Yg,backIn:El,backInOut:Gg,backOut:Ug,anticipate:Kg},WT=e=>typeof e=="string",Bu=e=>{if(Zg(e)){Et(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return so(t,n,r,o)}else if(WT(e))return Et($u[e]!==void 0,`Invalid easing type '${e}'`),$u[e];return e},Ro=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],zu={value:null};function UT(e,t){let n=new Set,r=new Set,o=!1,s=!1;const i=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(a)}const u={schedule:(d,f=!1,h=!1)=>{const p=h&&o?n:r;return f&&i.add(d),p.has(d)||p.add(d),d},cancel:d=>{r.delete(d),i.delete(d)},process:d=>{if(a=d,o){s=!0;return}o=!0,[n,r]=[r,n],n.forEach(c),t&&zu.value&&zu.value.frameloop[t].push(l),l=0,n.clear(),o=!1,s&&(s=!1,u.process(d))}};return u}const GT=40;function Jg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=Ro.reduce((w,C)=>(w[C]=UT(s,t?C:void 0),w),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:h,postRender:m}=i,p=()=>{const w=At.useManualTiming?o.timestamp:performance.now();n=!1,At.useManualTiming||(o.delta=r?1e3/60:Math.max(Math.min(w-o.timestamp,GT),1)),o.timestamp=w,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),h.process(o),m.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))},b=()=>{n=!0,r=!0,o.isProcessing||e(p)};return{schedule:Ro.reduce((w,C)=>{const x=i[C];return w[C]=(M,S=!1,D=!1)=>(n||b(),x.schedule(M,S,D)),w},{}),cancel:w=>{for(let C=0;C<Ro.length;C++)i[Ro[C]].cancel(w)},state:o,steps:i}}const{schedule:we,cancel:qt,state:Pe,steps:hi}=Jg(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qe,!0);let jo;function KT(){jo=void 0}const Le={now:()=>(jo===void 0&&Le.set(Pe.isProcessing||At.useManualTiming?Pe.timestamp:performance.now()),jo),set:e=>{jo=e,queueMicrotask(KT)}},Qg=e=>t=>typeof t=="string"&&t.startsWith(e),Ol=Qg("--"),YT=Qg("var(--"),_l=e=>YT(e)?qT.test(e.split("/*")[0].trim()):!1,qT=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Qn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jr={...Qn,transform:e=>Pt(0,1,e)},Do={...Qn,default:1},Cr=e=>Math.round(e*1e5)/1e5,kl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function XT(e){return e==null}const ZT=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Il=(e,t)=>n=>!!(typeof n=="string"&&ZT.test(n)&&n.startsWith(e)||t&&!XT(n)&&Object.prototype.hasOwnProperty.call(n,t)),em=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(kl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},JT=e=>Pt(0,255,e),pi={...Qn,transform:e=>Math.round(JT(e))},un={test:Il("rgb","red"),parse:em("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+pi.transform(e)+", "+pi.transform(t)+", "+pi.transform(n)+", "+Cr(jr.transform(r))+")"};function QT(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const na={test:Il("#"),parse:QT,transform:un.transform},io=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Bt=io("deg"),mt=io("%"),re=io("px"),eM=io("vh"),tM=io("vw"),Hu={...mt,parse:e=>mt.parse(e)/100,transform:e=>mt.transform(e*100)},En={test:Il("hsl","hue"),parse:em("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+mt.transform(Cr(t))+", "+mt.transform(Cr(n))+", "+Cr(jr.transform(r))+")"},_e={test:e=>un.test(e)||na.test(e)||En.test(e),parse:e=>un.test(e)?un.parse(e):En.test(e)?En.parse(e):na.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?un.transform(e):En.transform(e)},nM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function rM(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(kl))==null?void 0:t.length)||0)+(((n=e.match(nM))==null?void 0:n.length)||0)>0}const tm="number",nm="color",oM="var",sM="var(",Wu="${}",iM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Fr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(iM,l=>(_e.test(l)?(r.color.push(s),o.push(nm),n.push(_e.parse(l))):l.startsWith(sM)?(r.var.push(s),o.push(oM),n.push(l)):(r.number.push(s),o.push(tm),n.push(parseFloat(l))),++s,Wu)).split(Wu);return{values:n,split:a,indexes:r,types:o}}function rm(e){return Fr(e).values}function om(e){const{split:t,types:n}=Fr(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===tm?s+=Cr(o[i]):a===nm?s+=_e.transform(o[i]):s+=o[i]}return s}}const aM=e=>typeof e=="number"?0:e;function lM(e){const t=rm(e);return om(e)(t.map(aM))}const Xt={test:rM,parse:rm,createTransformer:om,getAnimatableNone:lM};function gi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function cM({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=gi(l,a,e+1/3),s=gi(l,a,e),i=gi(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function ns(e,t){return n=>n>0?t:e}const ye=(e,t,n)=>e+(t-e)*n,mi=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},uM=[na,un,En],dM=e=>uM.find(t=>t.test(e));function Uu(e){const t=dM(e);if(Jn(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===En&&(n=cM(n)),n}const Gu=(e,t)=>{const n=Uu(e),r=Uu(t);if(!n||!r)return ns(e,t);const o={...n};return s=>(o.red=mi(n.red,r.red,s),o.green=mi(n.green,r.green,s),o.blue=mi(n.blue,r.blue,s),o.alpha=ye(n.alpha,r.alpha,s),un.transform(o))},ra=new Set(["none","hidden"]);function fM(e,t){return ra.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function hM(e,t){return n=>ye(e,t,n)}function Nl(e){return typeof e=="number"?hM:typeof e=="string"?_l(e)?ns:_e.test(e)?Gu:mM:Array.isArray(e)?sm:typeof e=="object"?_e.test(e)?Gu:pM:ns}function sm(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Nl(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function pM(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Nl(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function gM(e,t){const n=[],r={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],i=e.indexes[s][r[s]],a=e.values[i]??0;n[o]=a,r[s]++}return n}const mM=(e,t)=>{const n=Xt.createTransformer(t),r=Fr(e),o=Fr(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?ra.has(e)&&!o.values.length||ra.has(t)&&!r.values.length?fM(e,t):oo(sm(gM(r,o),o.values),n):(Jn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),ns(e,t))};function im(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):Nl(e)(e,t)}const vM=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>we.update(t,n),stop:()=>qt(t),now:()=>Pe.isProcessing?Pe.timestamp:Le.now()}},am=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(s/(o-1))+", ";return`linear(${r.substring(0,r.length-2)})`},rs=2e4;function jl(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<rs;)t+=n,r=e.next(t);return t>=rs?1/0:t}function yM(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(jl(r),rs);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:gt(o)}}const wM=5;function lm(e,t,n){const r=Math.max(t-wM,0);return Bg(n-e(r),t-r)}const ve={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Ku=.001;function xM({duration:e=ve.duration,bounce:t=ve.bounce,velocity:n=ve.velocity,mass:r=ve.mass}){let o,s;Jn(e<=ot(ve.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=Pt(ve.minDamping,ve.maxDamping,i),e=Pt(ve.minDuration,ve.maxDuration,gt(e)),i<1?(o=c=>{const u=c*i,d=u*e,f=u-n,h=oa(c,i),m=Math.exp(-d);return Ku-f/h*m},s=c=>{const d=c*i*e,f=d*n+n,h=Math.pow(i,2)*Math.pow(c,2)*e,m=Math.exp(-d),p=oa(Math.pow(c,2),i);return(-o(c)+Ku>0?-1:1)*((f-h)*m)/p}):(o=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-.001+u*d},s=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const a=5/e,l=SM(o,s,a);if(e=ot(e),isNaN(l))return{stiffness:ve.stiffness,damping:ve.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const bM=12;function SM(e,t,n){let r=n;for(let o=1;o<bM;o++)r=r-e(r)/t(r);return r}function oa(e,t){return e*Math.sqrt(1-t*t)}const CM=["duration","bounce"],RM=["stiffness","damping","mass"];function Yu(e,t){return t.some(n=>e[n]!==void 0)}function DM(e){let t={velocity:ve.velocity,stiffness:ve.stiffness,damping:ve.damping,mass:ve.mass,isResolvedFromDuration:!1,...e};if(!Yu(e,RM)&&Yu(e,CM))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*Pt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:ve.mass,stiffness:o,damping:s}}else{const n=xM(e);t={...t,...n,mass:ve.mass},t.isResolvedFromDuration=!0}return t}function os(e=ve.visualDuration,t=ve.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:h}=DM({...n,velocity:-gt(n.velocity||0)}),m=f||0,p=c/(2*Math.sqrt(l*u)),b=i-s,y=gt(Math.sqrt(l/u)),g=Math.abs(b)<5;r||(r=g?ve.restSpeed.granular:ve.restSpeed.default),o||(o=g?ve.restDelta.granular:ve.restDelta.default);let w;if(p<1){const x=oa(y,p);w=M=>{const S=Math.exp(-p*y*M);return i-S*((m+p*y*b)/x*Math.sin(x*M)+b*Math.cos(x*M))}}else if(p===1)w=x=>i-Math.exp(-y*x)*(b+(m+y*b)*x);else{const x=y*Math.sqrt(p*p-1);w=M=>{const S=Math.exp(-p*y*M),D=Math.min(x*M,300);return i-S*((m+p*y*b)*Math.sinh(D)+x*b*Math.cosh(D))/x}}const C={calculatedDuration:h&&d||null,next:x=>{const M=w(x);if(h)a.done=x>=d;else{let S=x===0?m:0;p<1&&(S=x===0?ot(m):lm(w,x,M));const D=Math.abs(S)<=r,P=Math.abs(i-M)<=o;a.done=D&&P}return a.value=a.done?i:M,a},toString:()=>{const x=Math.min(jl(C),rs),M=am(S=>C.next(x*S).value,x,30);return x+"ms "+M},toTransition:()=>{}};return C}os.applyToOptions=e=>{const t=yM(e,100,os);return e.ease=t.ease,e.duration=ot(t.duration),e.type="keyframes",e};function sa({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],f={done:!1,value:d},h=D=>a!==void 0&&D<a||l!==void 0&&D>l,m=D=>a===void 0?l:l===void 0||Math.abs(a-D)<Math.abs(l-D)?a:l;let p=n*t;const b=d+p,y=i===void 0?b:i(b);y!==b&&(p=y-d);const g=D=>-p*Math.exp(-D/r),w=D=>y+g(D),C=D=>{const P=g(D),E=w(D);f.done=Math.abs(P)<=c,f.value=f.done?y:E};let x,M;const S=D=>{h(f.value)&&(x=D,M=os({keyframes:[f.value,m(f.value)],velocity:lm(w,D,f.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:D=>{let P=!1;return!M&&x===void 0&&(P=!0,C(D),S(D)),x!==void 0&&D>=x?M.next(D-x):(!P&&C(D),f)}}}function TM(e,t,n){const r=[],o=n||At.mix||im,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Qe:t;a=oo(l,a)}r.push(a)}return r}function MM(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Et(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=TM(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const f=Nr(e[d],e[d+1],u);return a[d](f)};return n?u=>c(Pt(e[0],e[s-1],u)):c}function PM(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Nr(0,t,r);e.push(ye(n,1,o))}}function EM(e){const t=[0];return PM(t,e.length-1),t}function AM(e,t){return e.map(n=>n*t)}function OM(e,t){return e.map(()=>t||Xg).splice(0,e.length-1)}function An({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=HT(r)?r.map(Bu):Bu(r),s={done:!1,value:t[0]},i=AM(n&&n.length===t.length?n:EM(t),e),a=MM(i,t,{ease:Array.isArray(o)?o:OM(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const _M=e=>e!==null;function Fl(e,{repeat:t,repeatType:n="loop"},r,o=1){const s=e.filter(_M),a=o<0||t&&n!=="loop"&&t%2===1?0:s.length-1;return!a||r===void 0?s[a]:r}const kM={decay:sa,inertia:sa,tween:An,keyframes:An,spring:os};function cm(e){typeof e.type=="string"&&(e.type=kM[e.type])}class Vl{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const IM=e=>e/100;class Ll extends Vl{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(n=!0)=>{var r,o;if(n){const{motionValue:s}=this.options;s&&s.updatedAt!==Le.now()&&this.tick(Le.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(o=(r=this.options).onStop)==null||o.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;cm(t);const{type:n=An,repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=t;let{keyframes:a}=t;const l=n||An;process.env.NODE_ENV!=="production"&&l!==An&&Et(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`),l!==An&&typeof a[0]!="number"&&(this.mixKeyframes=oo(IM,im(a[0],a[1])),a=[0,100]);const c=l({...t,keyframes:a});s==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...a].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=jl(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(r+1)-o,this.generator=c}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:o,mixKeyframes:s,mirroredGenerator:i,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:h,type:m,onUpdate:p,finalKeyframe:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const y=this.currentTime-c*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?y<0:y>o;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let w=this.currentTime,C=r;if(d){const D=Math.min(this.currentTime,o)/a;let P=Math.floor(D),E=D%1;!E&&D>=1&&(E=1),E===1&&P--,P=Math.min(P,d+1),!!(P%2)&&(f==="reverse"?(E=1-E,h&&(E-=h/a)):f==="mirror"&&(C=i)),w=Pt(0,1,E)*a}const x=g?{done:!1,value:u[0]}:C.next(w);s&&(x.value=s(x.value));let{done:M}=x;!g&&l!==null&&(M=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return S&&m!==sa&&(x.value=Fl(u,this.options,b,this.speed)),p&&p(x.value),S&&this.finish(),x}then(t,n){return this.finished.then(t,n)}get duration(){return gt(this.calculatedDuration)}get time(){return gt(this.currentTime)}set time(t){var n;t=ot(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Le.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=gt(this.currentTime))}play(){var o,s;if(this.isStopped)return;const{driver:t=vM,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),(s=(o=this.options).onPlay)==null||s.call(o);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Le.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function NM(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const dn=e=>e*180/Math.PI,ia=e=>{const t=dn(Math.atan2(e[1],e[0]));return aa(t)},jM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ia,rotateZ:ia,skewX:e=>dn(Math.atan(e[1])),skewY:e=>dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},aa=e=>(e=e%360,e<0&&(e+=360),e),qu=ia,Xu=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Zu=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),FM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xu,scaleY:Zu,scale:e=>(Xu(e)+Zu(e))/2,rotateX:e=>aa(dn(Math.atan2(e[6],e[5]))),rotateY:e=>aa(dn(Math.atan2(-e[2],e[0]))),rotateZ:qu,rotate:qu,skewX:e=>dn(Math.atan(e[4])),skewY:e=>dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function la(e){return e.includes("scale")?1:0}function ca(e,t){if(!e||e==="none")return la(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,o;if(n)r=FM,o=n;else{const a=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=jM,o=a}if(!o)return la(t);const s=r[t],i=o[1].split(",").map(LM);return typeof s=="function"?s(i):i[s]}const VM=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return ca(n,t)};function LM(e){return parseFloat(e.trim())}const er=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],tr=new Set(er),Ju=e=>e===Qn||e===re,$M=new Set(["x","y","z"]),BM=er.filter(e=>!$M.has(e));function zM(e){const t=[];return BM.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const fn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>ca(t,"x"),y:(e,{transform:t})=>ca(t,"y")};fn.translateX=fn.x;fn.translateY=fn.y;const hn=new Set;let ua=!1,da=!1,fa=!1;function um(){if(da){const e=Array.from(hn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=zM(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))==null||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}da=!1,ua=!1,hn.forEach(e=>e.complete(fa)),hn.clear()}function dm(){hn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(da=!0)})}function HM(){fa=!0,dm(),um(),fa=!1}class $l{constructor(t,n,r,o,s,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(hn.add(this),ua||(ua=!0,we.read(dm),we.resolveKeyframes(um))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;if(t[0]===null){const s=o==null?void 0:o.get(),i=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const a=r.readValue(n,i);a!=null&&(t[0]=a)}t[0]===void 0&&(t[0]=i),o&&s===void 0&&o.set(t[0])}NM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),hn.delete(this)}cancel(){this.state==="scheduled"&&(hn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const WM=e=>e.startsWith("--");function UM(e,t,n){WM(t)?e.style.setProperty(t,n):e.style[t]=n}const GM=Tl(()=>window.ScrollTimeline!==void 0),KM={};function YM(e,t){const n=Tl(e);return()=>KM[t]??n()}const fm=YM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),wr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Qu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wr([0,.65,.55,1]),circOut:wr([.55,0,1,.45]),backIn:wr([.31,.01,.66,-.59]),backOut:wr([.33,1.53,.69,.99])};function hm(e,t){if(e)return typeof e=="function"?fm()?am(e,t):"ease-out":Zg(e)?wr(e):Array.isArray(e)?e.map(n=>hm(n,t)||Qu.easeOut):Qu[e]}function qM(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[t]:n};l&&(u.offset=l);const d=hm(a,o);Array.isArray(d)&&(u.easing=d);const f={delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),e.animate(u,f)}function pm(e){return typeof e=="function"&&"applyToOptions"in e}function XM({type:e,...t}){return pm(e)&&fm()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ZM extends Vl{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:o,pseudoElement:s,allowFlatten:i=!1,finalKeyframe:a,onComplete:l}=t;this.isPseudoElement=!!s,this.allowFlatten=i,this.options=t,Et(typeof t.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=XM(t);this.animation=qM(n,r,o,c,s),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const u=Fl(o,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):UM(n,r,u),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return gt(Number(t))}get time(){return gt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ot(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&GM()?(this.animation.timeline=t,Qe):n(this)}}const gm={anticipate:Kg,backInOut:Gg,circInOut:qg};function JM(e){return e in gm}function QM(e){typeof e.ease=="string"&&JM(e.ease)&&(e.ease=gm[e.ease])}const ed=10;class eP extends ZM{constructor(t){QM(t),cm(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:o,element:s,...i}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const a=new Ll({...i,autoplay:!1}),l=ot(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-ed).value,a.sample(l).value,ed),a.stop()}}const td=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Xt.test(e)||e==="0")&&!e.startsWith("url("));function tP(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function nP(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=td(o,t),a=td(s,t);return Jn(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:tP(e)||(n==="spring"||pm(n))&&r}function mm(e){return Lg(e)&&"offsetHeight"in e}const rP=new Set(["opacity","clipPath","filter","transform"]),oP=Tl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function sP(e){var c;const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:s,type:i}=e;if(!mm((c=t==null?void 0:t.owner)==null?void 0:c.current))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return oP()&&n&&rP.has(n)&&(n!=="transform"||!l)&&!a&&!r&&o!=="mirror"&&s!==0&&i!=="inertia"}const iP=40;class aP extends Vl{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",keyframes:a,name:l,motionValue:c,element:u,...d}){var m;super(),this.stop=()=>{var p,b;this._animation&&(this._animation.stop(),(p=this.stopTimeline)==null||p.call(this)),(b=this.keyframeResolver)==null||b.cancel()},this.createdAt=Le.now();const f={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,name:l,motionValue:c,element:u,...d},h=(u==null?void 0:u.KeyframeResolver)||$l;this.keyframeResolver=new h(a,(p,b,y)=>this.onKeyframesResolved(p,b,f,!y),l,c,u),(m=this.keyframeResolver)==null||m.scheduleResolve()}onKeyframesResolved(t,n,r,o){this.keyframeResolver=void 0;const{name:s,type:i,velocity:a,delay:l,isHandoff:c,onUpdate:u}=r;this.resolvedAt=Le.now(),nP(t,s,i,a)||((At.instantAnimations||!l)&&(u==null||u(Fl(t,r,n))),t[0]=t[t.length-1],r.duration=0,r.repeat=0);const f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>iP?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},h=!c&&sP(f)?new eP({...f,element:f.motionValue.owner.current}):new Ll(f);h.finished.then(()=>this.notifyFinished()).catch(Qe),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),HM()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const lP=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cP(e){const t=lP.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const uP=4;function vm(e,t,n=1){Et(n<=uP,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=cP(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return Vg(i)?parseFloat(i):i}return _l(o)?vm(o,t,n+1):o}function Bl(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const ym=new Set(["width","height","top","left","right","bottom",...er]),dP={test:e=>e==="auto",parse:e=>e},wm=e=>t=>t.test(e),xm=[Qn,re,mt,Bt,tM,eM,dP],nd=e=>xm.find(wm(e));function fP(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||$g(e):!0}const hP=new Set(["brightness","contrast","saturate","opacity"]);function pP(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(kl)||[];if(!r)return e;const o=n.replace(r,"");let s=hP.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const gP=/\b([a-z-]*)\(.*?\)/gu,ha={...Xt,getAnimatableNone:e=>{const t=e.match(gP);return t?t.map(pP).join(" "):e}},rd={...Qn,transform:Math.round},mP={rotate:Bt,rotateX:Bt,rotateY:Bt,rotateZ:Bt,scale:Do,scaleX:Do,scaleY:Do,scaleZ:Do,skew:Bt,skewX:Bt,skewY:Bt,distance:re,translateX:re,translateY:re,translateZ:re,x:re,y:re,z:re,perspective:re,transformPerspective:re,opacity:jr,originX:Hu,originY:Hu,originZ:re},zl={borderWidth:re,borderTopWidth:re,borderRightWidth:re,borderBottomWidth:re,borderLeftWidth:re,borderRadius:re,radius:re,borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomRightRadius:re,borderBottomLeftRadius:re,width:re,maxWidth:re,height:re,maxHeight:re,top:re,right:re,bottom:re,left:re,padding:re,paddingTop:re,paddingRight:re,paddingBottom:re,paddingLeft:re,margin:re,marginTop:re,marginRight:re,marginBottom:re,marginLeft:re,backgroundPositionX:re,backgroundPositionY:re,...mP,zIndex:rd,fillOpacity:jr,strokeOpacity:jr,numOctaves:rd},vP={...zl,color:_e,backgroundColor:_e,outlineColor:_e,fill:_e,stroke:_e,borderColor:_e,borderTopColor:_e,borderRightColor:_e,borderBottomColor:_e,borderLeftColor:_e,filter:ha,WebkitFilter:ha},bm=e=>vP[e];function Sm(e,t){let n=bm(e);return n!==ha&&(n=Xt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yP=new Set(["auto","none","0"]);function wP(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!yP.has(s)&&Fr(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Sm(n,o)}class xP extends $l{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),_l(c))){const u=vm(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!ym.has(r)||t.length!==2)return;const[o,s]=t,i=nd(o),a=nd(s);if(i!==a)if(Ju(i)&&Ju(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else fn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)(t[o]===null||fP(t[o]))&&r.push(o);r.length&&wP(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=fn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var a;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const s=r.length-1,i=r[s];r[s]=fn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,c])=>{t.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function bP(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const o=(n==null?void 0:n[e])??r.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}const od=30,SP=e=>!isNaN(parseFloat(e));class CP{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{var i,a;const s=Le.now();if(this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((i=this.events.change)==null||i.notify(this.current),this.dependents))for(const l of this.dependents)l.dirty();o&&((a=this.events.renderRequest)==null||a.notify(this.current))},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Le.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=SP(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Pl(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Ml);const r=this.events[t].add(n);return t==="change"?()=>{r(),we.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Le.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>od)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,od);return Bg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zn(e,t){return new CP(e,t)}const Cm=(e,t)=>t&&typeof e=="number"?t.transform(e):e,{schedule:Hl}=Jg(queueMicrotask,!1),rt={x:!1,y:!1};function Rm(){return rt.x||rt.y}function RP(e){return e==="x"||e==="y"?rt[e]?null:(rt[e]=!0,()=>{rt[e]=!1}):rt.x||rt.y?null:(rt.x=rt.y=!0,()=>{rt.x=rt.y=!1})}function Dm(e,t){const n=bP(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function sd(e){return!(e.pointerType==="touch"||Rm())}function DP(e,t,n={}){const[r,o,s]=Dm(e,n),i=a=>{if(!sd(a))return;const{target:l}=a,c=t(l,a);if(typeof c!="function"||!l)return;const u=d=>{sd(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}const Tm=(e,t)=>t?e===t?!0:Tm(e,t.parentElement):!1,Wl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,TP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function MP(e){return TP.has(e.tagName)||e.tabIndex!==-1}const Fo=new WeakSet;function id(e){return t=>{t.key==="Enter"&&e(t)}}function vi(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const PP=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=id(()=>{if(Fo.has(n))return;vi(n,"down");const o=id(()=>{vi(n,"up")}),s=()=>vi(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function ad(e){return Wl(e)&&!Rm()}function EP(e,t,n={}){const[r,o,s]=Dm(e,n),i=a=>{const l=a.currentTarget;if(!ad(a))return;Fo.add(l);const c=t(l,a),u=(h,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Fo.has(l)&&Fo.delete(l),ad(h)&&typeof c=="function"&&c(h,{success:m})},d=h=>{u(h,l===window||l===document||n.useGlobalTarget||Tm(l,h.target))},f=h=>{u(h,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,o),mm(a)&&(a.addEventListener("focus",c=>PP(c,o)),!MP(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),s}function Mm(e){return Lg(e)&&"ownerSVGElement"in e}function AP(e){return Mm(e)&&e.tagName==="svg"}const ke=e=>!!(e&&e.getVelocity),OP=[...xm,_e,Xt],_P=e=>OP.find(wm(e)),Pm=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function kP(e=!0){const t=T.useContext(Cl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=T.useId();T.useEffect(()=>{if(e)return o(s)},[e]);const i=T.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Em=T.createContext({strict:!1}),ld={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Hn={};for(const e in ld)Hn[e]={isEnabled:t=>ld[e].some(n=>!!t[n])};function IP(e){for(const t in e)Hn[t]={...Hn[t],...e[t]}}const NP=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ss(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||NP.has(e)}let Am=e=>!ss(e);function jP(e){e&&(Am=t=>t.startsWith("on")?!ss(t):e(t))}try{jP(require("@emotion/is-prop-valid").default)}catch{}function FP(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Am(o)||n===!0&&ss(o)||!t&&!ss(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function VP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Pl(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Ns=T.createContext({});function js(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Vr(e){return typeof e=="string"||Array.isArray(e)}const Ul=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gl=["initial",...Ul];function Fs(e){return js(e.animate)||Gl.some(t=>Vr(e[t]))}function Om(e){return!!(Fs(e)||e.variants)}function LP(e,t){if(Fs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Vr(n)?n:void 0,animate:Vr(r)?r:void 0}}return e.inherit!==!1?t:{}}function $P(e){const{initial:t,animate:n}=LP(e,T.useContext(Ns));return T.useMemo(()=>({initial:t,animate:n}),[cd(t),cd(n)])}function cd(e){return Array.isArray(e)?e.join(" "):e}const BP=Symbol.for("motionComponentSymbol");function On(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function zP(e,t,n){return T.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):On(n)&&(n.current=r))},[t])}const Kl=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),HP="framerAppearId",_m="data-"+Kl(HP),km=T.createContext({});function WP(e,t,n,r,o){var p,b;const{visualElement:s}=T.useContext(Ns),i=T.useContext(Em),a=T.useContext(Cl),l=T.useContext(Pm).reducedMotion,c=T.useRef(null);r=r||i.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:s,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,d=T.useContext(km);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&UP(c.current,n,o,d);const f=T.useRef(!1);T.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const h=n[_m],m=T.useRef(!!h&&!((p=window.MotionHandoffIsComplete)!=null&&p.call(window,h))&&((b=window.MotionHasOptimisedAnimation)==null?void 0:b.call(window,h)));return jT(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Hl.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),T.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)==null||y.call(window,h)}),m.current=!1))}),u}function UP(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Im(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&On(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}function Im(e){if(e)return e.options.allowProjection!==!1?e.projection:Im(e.parent)}function GP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){e&&IP(e);function s(a,l){let c;const u={...T.useContext(Pm),...a,layoutId:KP(a)},{isStatic:d}=u,f=$P(a),h=r(a,d);if(!d&&Sl){YP(u,e);const m=qP(u);c=m.MeasureLayout,f.visualElement=WP(o,h,u,t,m.ProjectionNode)}return v.jsxs(Ns.Provider,{value:f,children:[c&&f.visualElement?v.jsx(c,{visualElement:f.visualElement,...u}):null,n(o,a,zP(h,f.visualElement,l),h,d,f.visualElement)]})}s.displayName=`motion.${typeof o=="string"?o:`create(${o.displayName??o.name??""})`}`;const i=T.forwardRef(s);return i[BP]=o,i}function KP({layoutId:e}){const t=T.useContext(Fg).id;return t&&e!==void 0?t+"-"+e:e}function YP(e,t){const n=T.useContext(Em).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Jn(!1,r):Et(!1,r)}}function qP(e){const{drag:t,layout:n}=Hn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const Lr={};function XP(e){for(const t in e)Lr[t]=e[t],Ol(t)&&(Lr[t].isCSSVariable=!0)}function Nm(e,{layout:t,layoutId:n}){return tr.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Lr[e]||e==="opacity")}const ZP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},JP=er.length;function QP(e,t,n){let r="",o=!0;for(let s=0;s<JP;s++){const i=er[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Cm(a,zl[i]);if(!l){o=!1;const u=ZP[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Yl(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(tr.has(l)){i=!0;continue}else if(Ol(l)){o[l]=c;continue}else{const u=Cm(c,zl[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=QP(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const ql=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jm(e,t,n){for(const r in t)!ke(t[r])&&!Nm(r,n)&&(e[r]=t[r])}function eE({transformTemplate:e},t){return T.useMemo(()=>{const n=ql();return Yl(n,t,e),Object.assign({},n.vars,n.style)},[t])}function tE(e,t){const n=e.style||{},r={};return jm(r,n,e),Object.assign(r,eE(e,t)),r}function nE(e,t){const n={},r=tE(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const rE={offset:"stroke-dashoffset",array:"stroke-dasharray"},oE={offset:"strokeDashoffset",array:"strokeDasharray"};function sE(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?rE:oE;e[s.offset]=re.transform(-r);const i=re.transform(t),a=re.transform(n);e[s.array]=`${i} ${a}`}function Fm(e,{attrX:t,attrY:n,attrScale:r,pathLength:o,pathSpacing:s=1,pathOffset:i=0,...a},l,c,u){if(Yl(e,a,c),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=(u==null?void 0:u.transformBox)??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),o!==void 0&&sE(d,o,s,i,!1)}const Vm=()=>({...ql(),attrs:{}}),Lm=e=>typeof e=="string"&&e.toLowerCase()==="svg";function iE(e,t,n,r){const o=T.useMemo(()=>{const s=Vm();return Fm(s,t,Lm(r),e.transformTemplate,e.style),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};jm(s,e.style,e),o.style={...s,...o.style}}return o}const aE=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Xl(e){return typeof e!="string"||e.includes("-")?!1:!!(aE.indexOf(e)>-1||/[A-Z]/u.test(e))}function lE(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Xl(n)?iE:nE)(r,s,i,n),c=FP(r,typeof n=="string",e),u=n!==T.Fragment?{...c,...l,ref:o}:{},{children:d}=r,f=T.useMemo(()=>ke(d)?d.get():d,[d]);return T.createElement(n,{...u,children:f})}}function ud(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Zl(e,t,n,r){if(typeof t=="function"){const[o,s]=ud(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=ud(r);t=t(n!==void 0?n:e.custom,o,s)}return t}function Vo(e){return ke(e)?e.get():e}function cE({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,o){return{latestValues:uE(n,r,o,e),renderState:t()}}const $m=e=>(t,n)=>{const r=T.useContext(Ns),o=T.useContext(Cl),s=()=>cE(e,t,r,o);return n?s():NT(s)};function uE(e,t,n,r){const o={},s=r(e,{});for(const f in s)o[f]=Vo(s[f]);let{initial:i,animate:a}=e;const l=Fs(e),c=Om(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const d=u?a:i;if(d&&typeof d!="boolean"&&!js(d)){const f=Array.isArray(d)?d:[d];for(let h=0;h<f.length;h++){const m=Zl(e,f[h]);if(m){const{transitionEnd:p,transition:b,...y}=m;for(const g in y){let w=y[g];if(Array.isArray(w)){const C=u?w.length-1:0;w=w[C]}w!==null&&(o[g]=w)}for(const g in p)o[g]=p[g]}}}return o}function Jl(e,t,n){var s;const{style:r}=e,o={};for(const i in r)(ke(r[i])||t.style&&ke(t.style[i])||Nm(i,e)||((s=n==null?void 0:n.getValue(i))==null?void 0:s.liveStyle)!==void 0)&&(o[i]=r[i]);return o}const dE={useVisualState:$m({scrapeMotionValuesFromProps:Jl,createRenderState:ql})};function Bm(e,t,n){const r=Jl(e,t,n);for(const o in e)if(ke(e[o])||ke(t[o])){const s=er.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}const fE={useVisualState:$m({scrapeMotionValuesFromProps:Bm,createRenderState:Vm})};function hE(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...Xl(r)?fE:dE,preloadedFeatures:e,useRender:lE(o),createVisualElement:t,Component:r};return GP(i)}}function $r(e,t,n){const r=e.getProps();return Zl(r,t,n!==void 0?n:r.custom,e)}const pa=e=>Array.isArray(e);function pE(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,zn(n))}function gE(e){return pa(e)?e[e.length-1]||0:e}function mE(e,t){const n=$r(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=gE(s[i]);pE(e,i,a)}}function vE(e){return!!(ke(e)&&e.add)}function ga(e,t){const n=e.getValue("willChange");if(vE(n))return n.add(t);if(!n&&At.WillChange){const r=new At.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function zm(e){return e.props[_m]}const yE=e=>e!==null;function wE(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(yE),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return o[s]}const xE={type:"spring",stiffness:500,damping:25,restSpeed:10},bE=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),SE={type:"keyframes",duration:.8},CE={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},RE=(e,{keyframes:t})=>t.length>2?SE:tr.has(e)?e.startsWith("scale")?bE(t[1]):xE:CE;function DE({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const Ql=(e,t,n,r={},o,s)=>i=>{const a=Bl(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ot(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};DE(a)||Object.assign(u,RE(e,u)),u.duration&&(u.duration=ot(u.duration)),u.repeatDelay&&(u.repeatDelay=ot(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(At.instantAnimations||At.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!a.type&&!a.ease,d&&!s&&t.get()!==void 0){const f=wE(u.keyframes,a);if(f!==void 0){we.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new Ll(u):new aP(u)};function TE({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Hm(e,t,{delay:n=0,transitionOverride:r,type:o}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:i,...a}=t;r&&(s=r);const l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(const u in a){const d=e.getValue(u,e.latestValues[u]??null),f=a[u];if(f===void 0||c&&TE(c,u))continue;const h={delay:n,...Bl(s||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){const y=zm(e);if(y){const g=window.MotionHandoffAnimation(y,u,we);g!==null&&(h.startTime=g,p=!0)}}ga(e,u),d.start(Ql(u,d,f,e.shouldReduceMotion&&ym.has(u)?{type:!1}:h,e,p));const b=d.animation;b&&l.push(b)}return i&&Promise.all(l).then(()=>{we.update(()=>{i&&mE(e,i)})}),l}function ma(e,t,n={}){var l;const r=$r(e,t,n.type==="exit"?(l=e.presenceContext)==null?void 0:l.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(o=n.transitionOverride);const s=r?()=>Promise.all(Hm(e,r,n)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=o;return ME(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:a}=o;if(a){const[c,u]=a==="beforeChildren"?[s,i]:[i,s];return c().then(()=>u())}else return Promise.all([s(),i(n.delay)])}function ME(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(PE).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(ma(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function PE(e,t){return e.sortNodePosition(t)}function EE(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>ma(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=ma(e,t,n);else{const o=typeof t=="function"?$r(e,t,n.custom):t;r=Promise.all(Hm(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Wm(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const AE=Gl.length;function Um(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Um(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<AE;n++){const r=Gl[n],o=e.props[r];(Vr(o)||o===!1)&&(t[r]=o)}return t}const OE=[...Ul].reverse(),_E=Ul.length;function kE(e){return t=>Promise.all(t.map(({animation:n,options:r})=>EE(e,n,r)))}function IE(e){let t=kE(e),n=dd(),r=!0;const o=l=>(c,u)=>{var f;const d=$r(e,u,l==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(d){const{transition:h,transitionEnd:m,...p}=d;c={...c,...p,...m}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=Um(e.parent)||{},d=[],f=new Set;let h={},m=1/0;for(let b=0;b<_E;b++){const y=OE[b],g=n[y],w=c[y]!==void 0?c[y]:u[y],C=Vr(w),x=y===l?g.isActive:null;x===!1&&(m=b);let M=w===u[y]&&w!==c[y]&&C;if(M&&r&&e.manuallyAnimateOnMount&&(M=!1),g.protectedKeys={...h},!g.isActive&&x===null||!w&&!g.prevProp||js(w)||typeof w=="boolean")continue;const S=NE(g.prevProp,w);let D=S||y===l&&g.isActive&&!M&&C||b>m&&C,P=!1;const E=Array.isArray(w)?w:[w];let A=E.reduce(o(y),{});x===!1&&(A={});const{prevResolvedValues:F={}}=g,W={...F,...A},L=N=>{D=!0,f.has(N)&&(P=!0,f.delete(N)),g.needsAnimating[N]=!0;const O=e.getValue(N);O&&(O.liveStyle=!1)};for(const N in W){const O=A[N],V=F[N];if(h.hasOwnProperty(N))continue;let k=!1;pa(O)&&pa(V)?k=!Wm(O,V):k=O!==V,k?O!=null?L(N):f.add(N):O!==void 0&&f.has(N)?L(N):g.protectedKeys[N]=!0}g.prevProp=w,g.prevResolvedValues=A,g.isActive&&(h={...h,...A}),r&&e.blockInitialAnimation&&(D=!1),D&&(!(M&&S)||P)&&d.push(...E.map(N=>({animation:N,options:{type:y}})))}if(f.size){const b={};if(typeof c.initial!="boolean"){const y=$r(e,Array.isArray(c.initial)?c.initial[0]:c.initial);y&&y.transition&&(b.transition=y.transition)}f.forEach(y=>{const g=e.getBaseTarget(y),w=e.getValue(y);w&&(w.liveStyle=!0),b[y]=g??null}),d.push({animation:b})}let p=!!d.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,p?t(d):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)==null||d.forEach(f=>{var h;return(h=f.animationState)==null?void 0:h.setActive(l,c)}),n[l].isActive=c;const u=i(l);for(const f in n)n[f].protectedKeys={};return u}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=dd(),r=!0}}}function NE(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Wm(t,e):!1}function ln(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function dd(){return{animate:ln(!0),whileInView:ln(),whileHover:ln(),whileTap:ln(),whileDrag:ln(),whileFocus:ln(),exit:ln()}}class on{constructor(t){this.isMounted=!1,this.node=t}update(){}}class jE extends on{constructor(t){super(t),t.animationState||(t.animationState=IE(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();js(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let FE=0;class VE extends on{constructor(){super(...arguments),this.id=FE++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const LE={animation:{Feature:jE},exit:{Feature:VE}};function Br(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ao(e){return{point:{x:e.pageX,y:e.pageY}}}const $E=e=>t=>Wl(t)&&e(t,ao(t));function Rr(e,t,n,r){return Br(e,t,$E(n),r)}function Gm({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function zE(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const Km=1e-4,HE=1-Km,WE=1+Km,Ym=.01,UE=0-Ym,GE=0+Ym;function Ne(e){return e.max-e.min}function KE(e,t,n){return Math.abs(e-t)<=n}function fd(e,t,n,r=.5){e.origin=r,e.originPoint=ye(t.min,t.max,e.origin),e.scale=Ne(n)/Ne(t),e.translate=ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=HE&&e.scale<=WE||isNaN(e.scale))&&(e.scale=1),(e.translate>=UE&&e.translate<=GE||isNaN(e.translate))&&(e.translate=0)}function Dr(e,t,n,r){fd(e.x,t.x,n.x,r?r.originX:void 0),fd(e.y,t.y,n.y,r?r.originY:void 0)}function hd(e,t,n){e.min=n.min+t.min,e.max=e.min+Ne(t)}function YE(e,t,n){hd(e.x,t.x,n.x),hd(e.y,t.y,n.y)}function pd(e,t,n){e.min=t.min-n.min,e.max=e.min+Ne(t)}function Tr(e,t,n){pd(e.x,t.x,n.x),pd(e.y,t.y,n.y)}const gd=()=>({translate:0,scale:1,origin:0,originPoint:0}),_n=()=>({x:gd(),y:gd()}),md=()=>({min:0,max:0}),Se=()=>({x:md(),y:md()});function Xe(e){return[e("x"),e("y")]}function yi(e){return e===void 0||e===1}function va({scale:e,scaleX:t,scaleY:n}){return!yi(e)||!yi(t)||!yi(n)}function cn(e){return va(e)||qm(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function qm(e){return vd(e.x)||vd(e.y)}function vd(e){return e&&e!=="0%"}function is(e,t,n){const r=e-n,o=t*r;return n+o}function yd(e,t,n,r,o){return o!==void 0&&(e=is(e,o,r)),is(e,n,r)+t}function ya(e,t=0,n=1,r,o){e.min=yd(e.min,t,n,r,o),e.max=yd(e.max,t,n,r,o)}function Xm(e,{x:t,y:n}){ya(e.x,t.translate,t.scale,t.originPoint),ya(e.y,n.translate,n.scale,n.originPoint)}const wd=.999999999999,xd=1.0000000000001;function qE(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&In(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Xm(e,i)),r&&cn(s.latestValues)&&In(e,s.latestValues))}t.x<xd&&t.x>wd&&(t.x=1),t.y<xd&&t.y>wd&&(t.y=1)}function kn(e,t){e.min=e.min+t,e.max=e.max+t}function bd(e,t,n,r,o=.5){const s=ye(e.min,e.max,o);ya(e,t,n,s,r)}function In(e,t){bd(e.x,t.x,t.scaleX,t.scale,t.originX),bd(e.y,t.y,t.scaleY,t.scale,t.originY)}function Zm(e,t){return Gm(zE(e.getBoundingClientRect(),t))}function XE(e,t,n){const r=Zm(e,n),{scroll:o}=t;return o&&(kn(r.x,o.offset.x),kn(r.y,o.offset.y)),r}const Jm=({current:e})=>e?e.ownerDocument.defaultView:null,Sd=(e,t)=>Math.abs(e-t);function ZE(e,t){const n=Sd(e.x,t.x),r=Sd(e.y,t.y);return Math.sqrt(n**2+r**2)}class Qm{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=xi(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=ZE(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:m}=d,{timestamp:p}=Pe;this.history.push({...m,timestamp:p});const{onStart:b,onMove:y}=this.handlers;f||(b&&b(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=wi(f,this.transformPagePoint),we.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:m,resumeAnimation:p}=this.handlers;if(this.dragSnapToOrigin&&p&&p(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=xi(d.type==="pointercancel"?this.lastMoveEventInfo:wi(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,b),m&&m(d,b)},!Wl(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=ao(t),a=wi(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Pe;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,xi(a,this.history)),this.removeListeners=oo(Rr(this.contextWindow,"pointermove",this.handlePointerMove),Rr(this.contextWindow,"pointerup",this.handlePointerUp),Rr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),qt(this.updatePoint)}}function wi(e,t){return t?{point:t(e.point)}:e}function Cd(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xi({point:e},t){return{point:e,delta:Cd(e,ev(t)),offset:Cd(e,JE(t)),velocity:QE(t,.1)}}function JE(e){return e[0]}function ev(e){return e[e.length-1]}function QE(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ev(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ot(t)));)n--;if(!r)return{x:0,y:0};const s=gt(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function eA(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ye(n,e,r.max):Math.min(e,n)),e}function Rd(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function tA(e,{top:t,left:n,bottom:r,right:o}){return{x:Rd(e.x,n,o),y:Rd(e.y,t,r)}}function Dd(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nA(e,t){return{x:Dd(e.x,t.x),y:Dd(e.y,t.y)}}function rA(e,t){let n=.5;const r=Ne(e),o=Ne(t);return o>r?n=Nr(t.min,t.max-r,e.min):r>o&&(n=Nr(e.min,e.max-o,t.min)),Pt(0,1,n)}function oA(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const wa=.35;function sA(e=wa){return e===!1?e=0:e===!0&&(e=wa),{x:Td(e,"left","right"),y:Td(e,"top","bottom")}}function Td(e,t,n){return{min:Md(e,t),max:Md(e,n)}}function Md(e,t){return typeof e=="number"?e:e[t]||0}const iA=new WeakMap;class aA{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Se(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ao(u).point)},s=(u,d)=>{const{drag:f,dragPropagation:h,onDragStart:m}=this.getProps();if(f&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=RP(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xe(b=>{let y=this.getAxisMotionValue(b).get()||0;if(mt.test(y)){const{projection:g}=this.visualElement;if(g&&g.layout){const w=g.layout.layoutBox[b];w&&(y=Ne(w)*(parseFloat(y)/100))}}this.originPoint[b]=y}),m&&we.postRender(()=>m(u,d)),ga(this.visualElement,"transform");const{animationState:p}=this.visualElement;p&&p.setActive("whileDrag",!0)},i=(u,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:m,onDrag:p}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:b}=d;if(h&&this.currentDirection===null){this.currentDirection=lA(b),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,b),this.updateAxis("y",d.point,b),this.visualElement.render(),p&&p(u,d)},a=(u,d)=>this.stop(u,d),l=()=>Xe(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)==null?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Qm(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Jm(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&we.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!To(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=eA(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,o=this.constraints;t&&On(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=tA(r.layoutBox,t):this.constraints=!1,this.elastic=sA(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Xe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=oA(r.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!On(t))return!1;const r=t.current;Et(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=XE(r,o.root,this.visualElement.getTransformPagePoint());let i=nA(o.layout.layoutBox,s);if(n){const a=n(BE(i));this.hasMutatedConstraints=!!a,a&&(i=Gm(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xe(u=>{if(!To(u,n,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});const f=o?200:1e6,h=o?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return ga(this.visualElement,t),r.start(Ql(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xe(n=>{const{drag:r}=this.getProps();if(!To(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-ye(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!On(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=rA({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xe(i=>{if(!To(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(ye(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;iA.set(this.visualElement,this);const t=this.visualElement.current,n=Rr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();On(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),we.read(r);const i=Br(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Xe(u=>{const d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=wa,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function To(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function lA(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class cA extends on{constructor(t){super(t),this.removeGroupControls=Qe,this.removeListeners=Qe,this.controls=new aA(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qe}unmount(){this.removeGroupControls(),this.removeListeners()}}const Pd=e=>(t,n)=>{e&&we.postRender(()=>e(t,n))};class uA extends on{constructor(){super(...arguments),this.removePointerDownListener=Qe}onPointerDown(t){this.session=new Qm(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jm(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Pd(t),onStart:Pd(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&we.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=Rr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Lo={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ed(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const gr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(re.test(e))e=parseFloat(e);else return e;const n=Ed(e,t.target.x),r=Ed(e,t.target.y);return`${n}% ${r}%`}},dA={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Xt.parse(e);if(o.length>5)return r;const s=Xt.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=ye(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class fA extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;XP(hA),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Lo.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,{projection:i}=r;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0||t.isPresent!==s?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||we.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Hl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function tv(e){const[t,n]=kP(),r=T.useContext(Fg);return v.jsx(fA,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(km),isPresent:t,safeToRemove:n})}const hA={borderRadius:{...gr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:gr,borderTopRightRadius:gr,borderBottomLeftRadius:gr,borderBottomRightRadius:gr,boxShadow:dA};function pA(e,t,n){const r=ke(e)?e:zn(e);return r.start(Ql("",r,t,n)),r.animation}const gA=(e,t)=>e.depth-t.depth;class mA{constructor(){this.children=[],this.isDirty=!1}add(t){Rl(this.children,t),this.isDirty=!0}remove(t){Dl(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gA),this.isDirty=!1,this.children.forEach(t)}}function vA(e,t){const n=Le.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(qt(r),e(s-t))};return we.setup(r,!0),()=>qt(r)}const nv=["TopLeft","TopRight","BottomLeft","BottomRight"],yA=nv.length,Ad=e=>typeof e=="string"?parseFloat(e):e,Od=e=>typeof e=="number"||re.test(e);function wA(e,t,n,r,o,s){o?(e.opacity=ye(0,n.opacity??1,xA(r)),e.opacityExit=ye(t.opacity??1,0,bA(r))):s&&(e.opacity=ye(t.opacity??1,n.opacity??1,r));for(let i=0;i<yA;i++){const a=`border${nv[i]}Radius`;let l=_d(t,a),c=_d(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Od(l)===Od(c)?(e[a]=Math.max(ye(Ad(l),Ad(c),r),0),(mt.test(c)||mt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ye(t.rotate||0,n.rotate||0,r))}function _d(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xA=rv(0,.5,Yg),bA=rv(.5,.95,Qe);function rv(e,t,n){return r=>r<e?0:r>t?1:n(Nr(e,t,r))}function kd(e,t){e.min=t.min,e.max=t.max}function qe(e,t){kd(e.x,t.x),kd(e.y,t.y)}function Id(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Nd(e,t,n,r,o){return e-=t,e=is(e,1/n,r),o!==void 0&&(e=is(e,1/o,r)),e}function SA(e,t=0,n=1,r=.5,o,s=e,i=e){if(mt.test(t)&&(t=parseFloat(t),t=ye(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=ye(s.min,s.max,r);e===s&&(a-=t),e.min=Nd(e.min,t,n,a,o),e.max=Nd(e.max,t,n,a,o)}function jd(e,t,[n,r,o],s,i){SA(e,t[n],t[r],t[o],t.scale,s,i)}const CA=["x","scaleX","originX"],RA=["y","scaleY","originY"];function Fd(e,t,n,r){jd(e.x,t,CA,n?n.x:void 0,r?r.x:void 0),jd(e.y,t,RA,n?n.y:void 0,r?r.y:void 0)}function Vd(e){return e.translate===0&&e.scale===1}function ov(e){return Vd(e.x)&&Vd(e.y)}function Ld(e,t){return e.min===t.min&&e.max===t.max}function DA(e,t){return Ld(e.x,t.x)&&Ld(e.y,t.y)}function $d(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sv(e,t){return $d(e.x,t.x)&&$d(e.y,t.y)}function Bd(e){return Ne(e.x)/Ne(e.y)}function zd(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class TA{constructor(){this.members=[]}add(t){Rl(this.members,t),t.scheduleRender()}remove(t){if(Dl(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function MA(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:h,skewY:m}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),h&&(r+=`skewX(${h}deg) `),m&&(r+=`skewY(${m}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const bi=["","X","Y","Z"],PA={visibility:"hidden"},EA=1e3;let AA=0;function Si(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function iv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=zm(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",we,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&iv(r)}function av({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=AA++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(kA),this.nodes.forEach(VA),this.nodes.forEach(LA),this.nodes.forEach(IA)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new mA)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Ml),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=Mm(i)&&!AP(i),this.instance=i;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),e){let u;const d=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=vA(d,250),Lo.hasAnimatedSinceResize&&(Lo.hasAnimatedSinceResize=!1,this.nodes.forEach(Wd))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:h})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||WA,{onLayoutAnimationStart:p,onLayoutAnimationComplete:b}=c.getProps(),y=!this.targetLayout||!sv(this.targetLayout,h),g=!d&&f;if(this.options.layoutRoot||this.resumeFrom||g||d&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,g);const w={...Bl(m,"layout"),onPlay:p,onComplete:b};(c.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else d||Wd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=h})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),qt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach($A),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&iv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Hd);return}this.isUpdating||this.nodes.forEach(jA),this.isUpdating=!1,this.nodes.forEach(FA),this.nodes.forEach(OA),this.nodes.forEach(_A),this.clearAllSnapshots();const a=Le.now();Pe.delta=Pt(0,1e3/60,a-Pe.timestamp),Pe.timestamp=a,Pe.isProcessing=!0,hi.update.process(Pe),hi.preRender.process(Pe),hi.render.process(Pe),Pe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Hl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(NA),this.sharedNodes.forEach(BA)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,we.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){we.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ne(this.snapshot.measuredBox.x)&&!Ne(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Se(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!ov(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&this.instance&&(a||cn(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),UA(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var c;const{visualElement:i}=this.options;if(!i)return Se();const a=i.measureViewportBox();if(!(((c=this.scroll)==null?void 0:c.wasRoot)||this.path.some(GA))){const{scroll:u}=this.root;u&&(kn(a.x,u.offset.x),kn(a.y,u.offset.y))}return a}removeElementScroll(i){var l;const a=Se();if(qe(a,i),(l=this.scroll)!=null&&l.wasRoot)return a;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&qe(a,i),kn(a.x,d.offset.x),kn(a.y,d.offset.y))}return a}applyTransform(i,a=!1){const l=Se();qe(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&In(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),cn(u.latestValues)&&In(l,u.latestValues)}return cn(this.latestValues)&&In(l,this.latestValues),l}removeTransform(i){const a=Se();qe(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!cn(c.latestValues))continue;va(c.latestValues)&&c.updateSnapshot();const u=Se(),d=c.measurePageBox();qe(u,d),Fd(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return cn(this.latestValues)&&Fd(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var f;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Pe.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Tr(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Se(),this.targetWithTransforms=Se()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),YE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),Xm(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Se(),this.relativeTargetOrigin=Se(),Tr(this.relativeTargetOrigin,this.target,h.target),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||va(this.parent.latestValues)||qm(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var m;const i=this.getLead(),a=!!this.resumingFrom||this!==i;let l=!0;if((this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Pe.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;qe(this.layoutCorrected,this.layout.layoutBox);const d=this.treeScale.x,f=this.treeScale.y;qE(this.layoutCorrected,this.treeScale,this.path,a),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Se());const{target:h}=i;if(!h){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Id(this.prevProjectionDelta.x,this.projectionDelta.x),Id(this.prevProjectionDelta.y,this.projectionDelta.y)),Dr(this.projectionDelta,this.layoutCorrected,h,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!zd(this.projectionDelta.x,this.prevProjectionDelta.x)||!zd(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",h))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=_n(),this.projectionDelta=_n(),this.projectionDeltaWithTransform=_n()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=_n();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Se(),h=l?l.source:void 0,m=this.layout?this.layout.source:void 0,p=h!==m,b=this.getStack(),y=!b||b.members.length<=1,g=!!(p&&!y&&this.options.crossfade===!0&&!this.path.some(HA));this.animationProgress=0;let w;this.mixTargetDelta=C=>{const x=C/1e3;Ud(d.x,i.x,x),Ud(d.y,i.y,x),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tr(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),zA(this.relativeTarget,this.relativeTargetOrigin,f,x),w&&DA(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Se()),qe(w,this.relativeTarget)),p&&(this.animationValues=u,wA(u,c,this.latestValues,x,g,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){var a,l,c;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(!1),(c=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||c.stop(!1),this.pendingAnimation&&(qt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=we.update(()=>{Lo.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=zn(0)),this.currentAnimation=pA(this.motionValue,[0,1e3],{...i,isSync:!0,onUpdate:u=>{this.mixTargetDelta(u),i.onUpdate&&i.onUpdate(u)},onStop:()=>{},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(EA),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&lv(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Se();const d=Ne(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;const f=Ne(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}qe(a,l),In(a,u),Dr(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new TA),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var a;const{layoutId:i}=this.options;return i?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:i}=this.options;return i?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Si("z",i,c,this.animationValues);for(let u=0;u<bi.length;u++)Si(`rotate${bi[u]}`,i,c,this.animationValues),Si(`skew${bi[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){if(!this.instance||this.isSVG)return;if(!this.isVisible)return PA;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Vo(i==null?void 0:i.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=Vo(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!cn(this.latestValues)&&(h.transform=l?l({},""):"none",this.hasProjected=!1),h}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=MA(this.projectionDeltaWithTransform,this.treeScale,u),l&&(a.transform=l(u,a.transform));const{x:d,y:f}=this.projectionDelta;a.transformOrigin=`${d.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const h in Lr){if(u[h]===void 0)continue;const{correct:m,applyTo:p,isCSSVariable:b}=Lr[h],y=a.transform==="none"?u[h]:m(u[h],c);if(p){const g=p.length;for(let w=0;w<g;w++)a[p[w]]=y}else b?this.options.visualElement.renderState.vars[h]=y:a[h]=y}return this.options.layoutId&&(a.pointerEvents=c===this?Vo(i==null?void 0:i.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)==null?void 0:a.stop(!1)}),this.root.nodes.forEach(Hd),this.root.sharedNodes.clear()}}}function OA(e){e.updateLayout()}function _A(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=t.source!==e.layout.source;s==="size"?Xe(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=Ne(f);f.min=r[d].min,f.max=f.min+h}):lv(s,t.layoutBox,r)&&Xe(d=>{const f=i?t.measuredBox[d]:t.layoutBox[d],h=Ne(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=_n();Dr(a,r,t.layoutBox);const l=_n();i?Dr(l,e.applyTransform(o,!0),t.measuredBox):Dr(l,r,t.layoutBox);const c=!ov(a);let u=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const m=Se();Tr(m,t.layoutBox,f.layoutBox);const p=Se();Tr(p,r,h.layoutBox),sv(m,p)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeLayoutChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function kA(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function IA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function NA(e){e.clearSnapshot()}function Hd(e){e.clearMeasurements()}function jA(e){e.isLayoutDirty=!1}function FA(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Wd(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function VA(e){e.resolveTargetDelta()}function LA(e){e.calcProjection()}function $A(e){e.resetSkewAndRotation()}function BA(e){e.removeLeadSnapshot()}function Ud(e,t,n){e.translate=ye(t.translate,0,n),e.scale=ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gd(e,t,n,r){e.min=ye(t.min,n.min,r),e.max=ye(t.max,n.max,r)}function zA(e,t,n,r){Gd(e.x,t.x,n.x,r),Gd(e.y,t.y,n.y,r)}function HA(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const WA={duration:.45,ease:[.4,0,.1,1]},Kd=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Yd=Kd("applewebkit/")&&!Kd("chrome/")?Math.round:Qe;function qd(e){e.min=Yd(e.min),e.max=Yd(e.max)}function UA(e){qd(e.x),qd(e.y)}function lv(e,t,n){return e==="position"||e==="preserve-aspect"&&!KE(Bd(t),Bd(n),.2)}function GA(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const KA=av({attachResizeListener:(e,t)=>Br(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ci={current:void 0},cv=av({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ci.current){const e=new KA({});e.mount(window),e.setOptions({layoutScroll:!0}),Ci.current=e}return Ci.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),YA={pan:{Feature:uA},drag:{Feature:cA,ProjectionNode:cv,MeasureLayout:tv}};function Xd(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&we.postRender(()=>s(t,ao(t)))}class qA extends on{mount(){const{current:t}=this.node;t&&(this.unmount=DP(t,(n,r)=>(Xd(this.node,r,"Start"),o=>Xd(this.node,o,"End"))))}unmount(){}}class XA extends on{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=oo(Br(this.node.current,"focus",()=>this.onFocus()),Br(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Zd(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&we.postRender(()=>s(t,ao(t)))}class ZA extends on{mount(){const{current:t}=this.node;t&&(this.unmount=EP(t,(n,r)=>(Zd(this.node,r,"Start"),(o,{success:s})=>Zd(this.node,o,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const xa=new WeakMap,Ri=new WeakMap,JA=e=>{const t=xa.get(e.target);t&&t(e)},QA=e=>{e.forEach(JA)};function eO({root:e,...t}){const n=e||document;Ri.has(n)||Ri.set(n,{});const r=Ri.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(QA,{root:e,...t})),r[o]}function tO(e,t,n){const r=eO(t);return xa.set(e,n),r.observe(e),()=>{xa.delete(e),r.unobserve(e)}}const nO={some:0,all:1};class rO extends on{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:nO[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return tO(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(oO(t,n))&&this.startObserver()}unmount(){}}function oO({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const sO={inView:{Feature:rO},tap:{Feature:ZA},focus:{Feature:XA},hover:{Feature:qA}},iO={layout:{ProjectionNode:cv,MeasureLayout:tv}},ba={current:null},uv={current:!1};function aO(){if(uv.current=!0,!!Sl)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ba.current=e.matches;e.addListener(t),t()}else ba.current=!1}const lO=new WeakMap;function cO(e,t,n){for(const r in t){const o=t[r],s=n[r];if(ke(o))e.addValue(r,o);else if(ke(s))e.addValue(r,zn(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,zn(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Jd=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class uO{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=$l,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Le.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,we.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=Fs(n),this.isVariantNode=Om(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&ke(h)&&h.set(l[f],!1)}}mount(t){this.current=t,lO.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),uv.current||aO(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ba.current,process.env.NODE_ENV!=="production"&&Pl(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),qt(this.notifyUpdate),qt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=tr.has(t);r&&this.onBindTransform&&this.onBindTransform();const o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&we.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Hn){const n=Hn[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Se()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Jd.length;r++){const o=Jd[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=cO(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=zn(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Vg(r)||$g(r))?r=parseFloat(r):!_P(r)&&Xt.test(n)&&(r=Sm(t,n)),this.setBaseTarget(t,ke(r)?r.get():r)),ke(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const i=Zl(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);i&&(r=i[t])}if(n&&r!==void 0)return r;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ke(o)?o:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Ml),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class dv extends uO{constructor(){super(...arguments),this.KeyframeResolver=xP}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ke(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function fv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}function dO(e){return window.getComputedStyle(e)}class fO extends dv{constructor(){super(...arguments),this.type="html",this.renderInstance=fv}readValueFromInstance(t,n){var r;if(tr.has(n))return(r=this.projection)!=null&&r.isProjecting?la(n):VM(t,n);{const o=dO(t),s=(Ol(n)?o.getPropertyValue(n):o[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Zm(t,n)}build(t,n,r){Yl(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Jl(t,n,r)}}const hv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function hO(e,t,n,r){fv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(hv.has(o)?o:Kl(o),t.attrs[o])}class pO extends dv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Se}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(tr.has(n)){const r=bm(n);return r&&r.default||0}return n=hv.has(n)?n:Kl(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Bm(t,n,r)}build(t,n,r){Fm(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,o){hO(t,n,r,o)}mount(t){this.isSVGTag=Lm(t.tagName),super.mount(t)}}const gO=(e,t)=>Xl(e)?new pO(t):new fO(t,{allowProjection:e!==T.Fragment}),mO=hE({...LE,...sO,...YA,...iO},gO),vO=VP(mO),yO=({children:e})=>v.jsx(zw,{modifiers:[IT],dropAnimation:{duration:500,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},className:"Draggable dragging",children:v.jsx(vO.div,{style:{height:"100%",width:"100%",border:"2px solid #f6543b",borderRadius:"8px",boxShadow:"0 0 0 4px rgba(246, 140, 59, 0.2), 0 4px 12px rgba(228, 3, 3, 0.15)"},initial:{scale:.7,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.4,ease:[.22,1,.36,1],mass:.5},children:e})});/**
|
|
191
191
|
* table-core
|
|
192
192
|
*
|
|
193
193
|
* Copyright (c) TanStack
|
package/dist/build/main.es.js
CHANGED
|
@@ -16345,7 +16345,8 @@ const No = ({
|
|
|
16345
16345
|
third: a,
|
|
16346
16346
|
fourth: l,
|
|
16347
16347
|
disabledCss: r,
|
|
16348
|
-
firstDay: e
|
|
16348
|
+
firstDay: e,
|
|
16349
|
+
userId: o == null ? void 0 : o.id
|
|
16349
16350
|
}
|
|
16350
16351
|
);
|
|
16351
16352
|
}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"private": false,
|
|
14
|
-
"version": "
|
|
14
|
+
"version": "2.0.0",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"react",
|
|
17
17
|
"component",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"@dnd-kit/core": "^6.3.1",
|
|
52
52
|
"@dnd-kit/modifiers": "^9.0.0",
|
|
53
53
|
"@radix-ui/react-checkbox": "^1.3.3",
|
|
54
|
+
"@react-spring/web": "^10.0.3",
|
|
54
55
|
"@tailwindcss/vite": "^4.0.15",
|
|
55
56
|
"@tanstack/react-query": "^5.69.0",
|
|
56
57
|
"@tanstack/react-table": "^8.21.2",
|