Current path: home/webdevt/www/wdp/wp-content/plugins/extendify/public/build/
?? Go up: /home/webdevt/www/wdp/wp-content/plugins/extendify/public
!function(){var t={184:function(t,e){var n;!function(){"use strict";var r={}.hasOwnProperty;function s(){for(var t=[],e=0;e<arguments.length;e++){var n=arguments[e];if(n){var o=typeof n;if("string"===o||"number"===o)t.push(n);else if(Array.isArray(n)){if(n.length){var i=s.apply(null,n);i&&t.push(i)}}else if("object"===o){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){t.push(n.toString());continue}for(var a in n)r.call(n,a)&&n[a]&&t.push(a)}}}return t.join(" ")}t.exports?(s.default=s,t.exports=s):void 0===(n=function(){return s}.apply(e,[]))||(t.exports=n)}()},250:function(t,e,n){"use strict";var r=n(196),s="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},o=r.useState,i=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!s(t,n)}catch(t){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var n=e(),r=o({inst:{value:n,getSnapshot:e}}),s=r[0].inst,u=r[1];return a((function(){s.value=n,s.getSnapshot=e,c(s)&&u({inst:s})}),[t,n,e]),i((function(){return c(s)&&u({inst:s}),t((function(){c(s)&&u({inst:s})}))}),[t]),l(n),n};e.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},139:function(t,e,n){"use strict";var r=n(196),s=n(688),o="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},i=s.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;e.useSyncExternalStoreWithSelector=function(t,e,n,r,s){var h=a(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;h=c((function(){function t(t){if(!l){if(l=!0,i=t,t=r(t),void 0!==s&&d.hasValue){var e=d.value;if(s(e,t))return a=e}return a=t}if(e=a,o(i,t))return e;var n=r(t);return void 0!==s&&s(e,n)?e:(i=t,a=n)}var i,a,l=!1,c=void 0===n?null:n;return[function(){return t(e())},null===c?void 0:function(){return t(c())}]}),[e,n,r,s]);var p=i(t,h[0],h[1]);return l((function(){d.hasValue=!0,d.value=p}),[p]),u(p),p}},688:function(t,e,n){"use strict";t.exports=n(250)},798:function(t,e,n){"use strict";t.exports=n(139)},196:function(t){"use strict";t.exports=window.React}},e={};function n(r){var s=e[r];if(void 0!==s)return s.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=window.wp.element,e=window.wp.components,r=window.wp.plugins,s=n(196);const o="undefined"!=typeof document,i=o?s.useLayoutEffect:s.useEffect;function a(){const t=(0,s.useRef)(!1);return i((()=>(t.current=!0,()=>{t.current=!1})),[]),t}const l=t=>t;class c{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const u=["prepare","read","update","preRender","render","postRender"],{schedule:h,cancel:d,state:p,steps:m}=function(t,e){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=u.reduce(((t,e)=>(t[e]=function(t){let e=new c,n=new c,r=0,s=!1,o=!1;const i=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&s,c=l?e:n;return o&&i.add(t),c.add(t)&&l&&s&&(r=e.order.length),t},cancel:t=>{n.remove(t),i.delete(t)},process:l=>{if(s)o=!0;else{if(s=!0,[e,n]=[n,e],n.clear(),r=e.order.length,r)for(let n=0;n<r;n++){const r=e.order[n];r(l),i.has(r)&&(a.schedule(r),t())}s=!1,o&&(o=!1,a.process(l))}}};return a}((()=>n=!0)),t)),{}),i=t=>o[t].process(s),a=()=>{const e=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(e-s.timestamp,40),1),s.timestamp=e,s.isProcessing=!0,u.forEach(i),s.isProcessing=!1,n&&(r=!1,t(a))};return{schedule:u.reduce(((e,i)=>{const l=o[i];return e[i]=(e,o=!1,i=!1)=>(n||(n=!0,r=!0,s.isProcessing||t(a)),l.schedule(e,o,i)),e}),{}),cancel:t=>u.forEach((e=>o[e].cancel(t))),state:s,steps:o}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:l),f=(0,s.createContext)(null);function g(t){const e=(0,s.useRef)(null);return null===e.current&&(e.current=t()),e.current}class y extends s.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=this.props.sizeRef.current;t.height=e.offsetHeight||0,t.width=e.offsetWidth||0,t.top=e.offsetTop,t.left=e.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function v({children:t,isPresent:e}){const n=(0,s.useId)(),r=(0,s.useRef)(null),o=(0,s.useRef)({width:0,height:0,top:0,left:0});return(0,s.useInsertionEffect)((()=>{const{width:t,height:s,top:i,left:a}=o.current;if(e||!r.current||!t||!s)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${s}px !important;\n top: ${i}px !important;\n left: ${a}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[e]),s.createElement(y,{isPresent:e,childRef:r,sizeRef:o},s.cloneElement(t,{ref:r}))}const x=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:i,mode:a})=>{const l=g(b),c=(0,s.useId)(),u=(0,s.useMemo)((()=>({id:c,initial:e,isPresent:n,custom:o,onExitComplete:t=>{l.set(t,!0);for(const t of l.values())if(!t)return;r&&r()},register:t=>(l.set(t,!1),()=>l.delete(t))})),i?void 0:[n]);return(0,s.useMemo)((()=>{l.forEach(((t,e)=>l.set(e,!1)))}),[n]),s.useEffect((()=>{!n&&!l.size&&r&&r()}),[n]),"popLayout"===a&&(t=s.createElement(v,{isPresent:n},t)),s.createElement(f.Provider,{value:u},t)};function b(){return new Map}const w=(0,s.createContext)({});let E=l,S=l;const C=t=>t.key||"",P=({children:t,custom:e,initial:n=!0,onExitComplete:r,exitBeforeEnter:o,presenceAffectsLayout:l=!0,mode:c="sync"})=>{S(!o,"Replace exitBeforeEnter with mode='wait'");const u=(0,s.useContext)(w).forceRender||function(){const t=a(),[e,n]=(0,s.useState)(0),r=(0,s.useCallback)((()=>{t.current&&n(e+1)}),[e]);return[(0,s.useCallback)((()=>h.postRender(r)),[r]),e]}()[0],d=a(),p=function(t){const e=[];return s.Children.forEach(t,(t=>{(0,s.isValidElement)(t)&&e.push(t)})),e}(t);let m=p;const f=(0,s.useRef)(new Map).current,g=(0,s.useRef)(m),y=(0,s.useRef)(new Map).current,v=(0,s.useRef)(!0);var b;if(i((()=>{v.current=!1,function(t,e){t.forEach((t=>{const n=C(t);e.set(n,t)}))}(p,y),g.current=m})),b=()=>{v.current=!0,y.clear(),f.clear()},(0,s.useEffect)((()=>()=>b()),[]),v.current)return s.createElement(s.Fragment,null,m.map((t=>s.createElement(x,{key:C(t),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:l,mode:c},t))));m=[...m];const E=g.current.map(C),P=p.map(C),T=E.length;for(let t=0;t<T;t++){const e=E[t];-1!==P.indexOf(e)||f.has(e)||f.set(e,void 0)}return"wait"===c&&f.size&&(m=[]),f.forEach(((t,n)=>{if(-1!==P.indexOf(n))return;const o=y.get(n);if(!o)return;const i=E.indexOf(n);let a=t;if(!a){const t=()=>{y.delete(n),f.delete(n);const t=g.current.findIndex((t=>t.key===n));if(g.current.splice(t,1),!f.size){if(g.current=p,!1===d.current)return;u(),r&&r()}};a=s.createElement(x,{key:C(o),isPresent:!1,onExitComplete:t,custom:e,presenceAffectsLayout:l,mode:c},o),f.set(n,a)}m.splice(i,0,a)})),m=m.map((t=>{const e=t.key;return f.has(e)?t:s.createElement(x,{key:C(t),isPresent:!0,presenceAffectsLayout:l,mode:c},t)})),s.createElement(s.Fragment,null,f.size?m:m.map((t=>(0,s.cloneElement)(t))))},T=(0,s.createContext)({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),A=(0,s.createContext)({}),R=(0,s.createContext)({strict:!1});function L(t){return"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function O(t){return"string"==typeof t||Array.isArray(t)}function V(t){return"object"==typeof t&&"function"==typeof t.start}const D=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],k=["initial",...D];function M(t){return V(t.animate)||k.some((e=>O(t[e])))}function j(t){return Boolean(M(t)||t.variants)}function N(t){return Array.isArray(t)?t.join(" "):t}const B={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"]},F={};for(const t in B)F[t]={isEnabled:e=>B[t].some((t=>!!e[t]))};const I=(0,s.createContext)({}),U=Symbol.for("motionComponentSymbol");function _({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:r,Component:a}){t&&function(t){for(const e in t)F[e]={...F[e],...t[e]}}(t);const l=(0,s.forwardRef)((function(l,c){let u;const h={...(0,s.useContext)(T),...l,layoutId:H(l)},{isStatic:d}=h,p=function(t){const{initial:e,animate:n}=function(t,e){if(M(t)){const{initial:e,animate:n}=t;return{initial:!1===e||O(e)?e:void 0,animate:O(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,(0,s.useContext)(A));return(0,s.useMemo)((()=>({initial:e,animate:n})),[N(e),N(n)])}(l),m=r(l,d);if(!d&&o){p.visualElement=function(t,e,n,r){const{visualElement:o}=(0,s.useContext)(A),a=(0,s.useContext)(R),l=(0,s.useContext)(f),c=(0,s.useContext)(T).reducedMotion,u=(0,s.useRef)();r=r||a.renderer,!u.current&&r&&(u.current=r(t,{visualState:e,parent:o,props:n,presenceContext:l,blockInitialAnimation:!!l&&!1===l.initial,reducedMotionConfig:c}));const h=u.current;(0,s.useInsertionEffect)((()=>{h&&h.update(n,l)}));const d=(0,s.useRef)(Boolean(window.HandoffAppearAnimations));return i((()=>{h&&(h.render(),d.current&&h.animationState&&h.animationState.animateChanges())})),(0,s.useEffect)((()=>{h&&(h.updateFeatures(),!d.current&&h.animationState&&h.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)})),h}(a,m,h,e);const n=(0,s.useContext)(I),r=(0,s.useContext)(R).strict;p.visualElement&&(u=p.visualElement.loadFeatures(h,r,t,n))}return s.createElement(A.Provider,{value:p},u&&p.visualElement?s.createElement(u,{visualElement:p.visualElement,...h}):null,n(a,l,function(t,e,n){return(0,s.useCallback)((r=>{r&&t.mount&&t.mount(r),e&&(r?e.mount(r):e.unmount()),n&&("function"==typeof n?n(r):L(n)&&(n.current=r))}),[e])}(m,p.visualElement,c),m,d,p.visualElement))}));return l[U]=a,l}function H({layoutId:t}){const e=(0,s.useContext)(w).id;return e&&void 0!==t?e+"-"+t:t}function z(t){function e(e,n={}){return _(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,r)=>(n.has(r)||n.set(r,e(r)),n.get(r))})}const q=["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 $(t){return"string"==typeof t&&!t.includes("-")&&!!(q.indexOf(t)>-1||/[A-Z]/.test(t))}const W={},X=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],G=new Set(X);function Z(t,{layout:e,layoutId:n}){return G.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!W[t]||"opacity"===t)}const J=t=>Boolean(t&&t.getVelocity),Y={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},K=X.length,Q=t=>e=>"string"==typeof e&&e.startsWith(t),tt=Q("--"),et=Q("var(--"),nt=(t,e)=>e&&"number"==typeof t?e.transform(t):t,rt=(t,e,n)=>Math.min(Math.max(n,t),e),st={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},ot={...st,transform:t=>rt(0,1,t)},it={...st,default:1},at=t=>Math.round(1e5*t)/1e5,lt=/(-)?([\d]*\.?[\d])+/g,ct=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ut=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ht(t){return"string"==typeof t}const dt=t=>({test:e=>ht(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),pt=dt("deg"),mt=dt("%"),ft=dt("px"),gt=dt("vh"),yt=dt("vw"),vt={...mt,parse:t=>mt.parse(t)/100,transform:t=>mt.transform(100*t)},xt={...st,transform:Math.round},bt={borderWidth:ft,borderTopWidth:ft,borderRightWidth:ft,borderBottomWidth:ft,borderLeftWidth:ft,borderRadius:ft,radius:ft,borderTopLeftRadius:ft,borderTopRightRadius:ft,borderBottomRightRadius:ft,borderBottomLeftRadius:ft,width:ft,maxWidth:ft,height:ft,maxHeight:ft,size:ft,top:ft,right:ft,bottom:ft,left:ft,padding:ft,paddingTop:ft,paddingRight:ft,paddingBottom:ft,paddingLeft:ft,margin:ft,marginTop:ft,marginRight:ft,marginBottom:ft,marginLeft:ft,rotate:pt,rotateX:pt,rotateY:pt,rotateZ:pt,scale:it,scaleX:it,scaleY:it,scaleZ:it,skew:pt,skewX:pt,skewY:pt,distance:ft,translateX:ft,translateY:ft,translateZ:ft,x:ft,y:ft,z:ft,perspective:ft,transformPerspective:ft,opacity:ot,originX:vt,originY:vt,originZ:ft,zIndex:xt,fillOpacity:ot,strokeOpacity:ot,numOctaves:xt};function wt(t,e,n,r){const{style:s,vars:o,transform:i,transformOrigin:a}=t;let l=!1,c=!1,u=!0;for(const t in e){const n=e[t];if(tt(t)){o[t]=n;continue}const r=bt[t],h=nt(n,r);if(G.has(t)){if(l=!0,i[t]=h,!u)continue;n!==(r.default||0)&&(u=!1)}else t.startsWith("origin")?(c=!0,a[t]=h):s[t]=h}if(e.transform||(l||r?s.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},r,s){let o="";for(let e=0;e<K;e++){const n=X[e];void 0!==t[n]&&(o+=`${Y[n]||n}(${t[n]}) `)}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,r?"":o):n&&r&&(o="none"),o}(t.transform,n,u,r):s.transform&&(s.transform="none")),c){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;s.transformOrigin=`${t} ${e} ${n}`}}const Et=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function St(t,e,n){for(const r in e)J(e[r])||Z(r,n)||(t[r]=e[r])}function Ct(t,e,n){const r={},o=function(t,e,n){const r={};return St(r,t.style||{},t),Object.assign(r,function({transformTemplate:t},e,n){return(0,s.useMemo)((()=>{const r=Et();return wt(r,e,{enableHardwareAcceleration:!n},t),Object.assign({},r.vars,r.style)}),[e])}(t,e,n)),t.transformValues?t.transformValues(r):r}(t,e,n);return t.drag&&!1!==t.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(r.tabIndex=0),r.style=o,r}const Pt=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Tt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||Pt.has(t)}let At=t=>!Tt(t);try{(Rt=require("@emotion/is-prop-valid").default)&&(At=t=>t.startsWith("on")?!Tt(t):Rt(t))}catch(t){}var Rt;function Lt(t,e,n){return"string"==typeof t?t:ft.transform(e+n*t)}const Ot={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vt={offset:"strokeDashoffset",array:"strokeDasharray"};function Dt(t,{attrX:e,attrY:n,attrScale:r,originX:s,originY:o,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,h,d){if(wt(t,c,u,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==s||void 0!==o||m.transform)&&(m.transformOrigin=function(t,e,n){return`${Lt(e,t.x,t.width)} ${Lt(n,t.y,t.height)}`}(f,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==i&&function(t,e,n=1,r=0,s=!0){t.pathLength=1;const o=s?Ot:Vt;t[o.offset]=ft.transform(-r);const i=ft.transform(e),a=ft.transform(n);t[o.array]=`${i} ${a}`}(p,i,a,l,!1)}const kt=()=>({...Et(),attrs:{}}),Mt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function jt(t,e,n,r){const o=(0,s.useMemo)((()=>{const n=kt();return Dt(n,e,{enableHardwareAcceleration:!1},Mt(r),t.transformTemplate),{...n.attrs,style:{...n.style}}}),[e]);if(t.style){const e={};St(e,t.style,t),o.style={...e,...o.style}}return o}function Nt(t=!1){return(e,n,r,{latestValues:o},i)=>{const a=($(e)?jt:Ct)(n,o,i,e),l=function(t,e,n){const r={};for(const s in t)"values"===s&&"object"==typeof t.values||(At(s)||!0===n&&Tt(s)||!e&&!Tt(s)||t.draggable&&s.startsWith("onDrag"))&&(r[s]=t[s]);return r}(n,"string"==typeof e,t),c={...l,...a,ref:r},{children:u}=n,h=(0,s.useMemo)((()=>J(u)?u.get():u),[u]);return(0,s.createElement)(e,{...c,children:h})}}const Bt=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Ft(t,{style:e,vars:n},r,s){Object.assign(t.style,e,s&&s.getProjectionStyles(r));for(const e in n)t.style.setProperty(e,n[e])}const It=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 Ut(t,e,n,r){Ft(t,e,void 0,r);for(const n in e.attrs)t.setAttribute(It.has(n)?n:Bt(n),e.attrs[n])}function _t(t,e){const{style:n}=t,r={};for(const s in n)(J(n[s])||e.style&&J(e.style[s])||Z(s,t))&&(r[s]=n[s]);return r}function Ht(t,e){const n=_t(t,e);for(const r in t)(J(t[r])||J(e[r]))&&(n[-1!==X.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=t[r]);return n}function zt(t,e,n,r={},s={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,r,s)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,r,s)),e}const qt=t=>Array.isArray(t),$t=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Wt=t=>qt(t)?t[t.length-1]||0:t;function Xt(t){const e=J(t)?t.get():t;return $t(e)?e.toValue():e}const Gt=t=>(e,n)=>{const r=(0,s.useContext)(A),o=(0,s.useContext)(f),i=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},r,s,o){const i={latestValues:Zt(r,s,o,t),renderState:e()};return n&&(i.mount=t=>n(r,t,i)),i}(t,e,r,o);return n?i():g(i)};function Zt(t,e,n,r){const s={},o=r(t,{});for(const t in o)s[t]=Xt(o[t]);let{initial:i,animate:a}=t;const l=M(t),c=j(t);e&&c&&!l&&!1!==t.inherit&&(void 0===i&&(i=e.initial),void 0===a&&(a=e.animate));let u=!!n&&!1===n.initial;u=u||!1===i;const h=u?a:i;return h&&"boolean"!=typeof h&&!V(h)&&(Array.isArray(h)?h:[h]).forEach((e=>{const n=zt(t,e);if(!n)return;const{transitionEnd:r,transition:o,...i}=n;for(const t in i){let e=i[t];Array.isArray(e)&&(e=e[u?e.length-1:0]),null!==e&&(s[t]=e)}for(const t in r)s[t]=r[t]})),s}const Jt={useVisualState:Gt({scrapeMotionValuesFromProps:Ht,createRenderState:kt,onMount:(t,e,{renderState:n,latestValues:r})=>{h.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),h.render((()=>{Dt(n,r,{enableHardwareAcceleration:!1},Mt(e.tagName),t.transformTemplate),Ut(e,n)}))}})},Yt={useVisualState:Gt({scrapeMotionValuesFromProps:_t,createRenderState:Et})};function Kt(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}const Qt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function te(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const ee=t=>e=>Qt(e)&&t(e,te(e));function ne(t,e,n,r){return Kt(t,e,ee(n),r)}const re=(t,e)=>n=>e(t(n)),se=(...t)=>t.reduce(re);function oe(t){let e=null;return()=>null===e&&(e=t,()=>{e=null})}const ie=oe("dragHorizontal"),ae=oe("dragVertical");function le(t){let e=!1;if("y"===t)e=ae();else if("x"===t)e=ie();else{const t=ie(),n=ae();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function ce(){const t=le(!0);return!t||(t(),!1)}class ue{constructor(t){this.isMounted=!1,this.node=t}update(){}}function he(t,e){const n="pointer"+(e?"enter":"leave"),r="onHover"+(e?"Start":"End");return ne(t.current,n,((n,s)=>{if("touch"===n.type||ce())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[r]&&h.update((()=>o[r](n,s)))}),{passive:!t.getProps()[r]})}const de=(t,e)=>!!e&&(t===e||de(t,e.parentElement));function pe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,te(n))}const me=new WeakMap,fe=new WeakMap,ge=t=>{const e=me.get(t.target);e&&e(t)},ye=t=>{t.forEach(ge)};const ve={some:0,all:1},xe={inView:{Feature:class extends ue{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:r="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:ve[r]};return function(t,e,n){const r=function({root:t,...e}){const n=t||document;fe.has(n)||fe.set(n,{});const r=fe.get(n),s=JSON.stringify(e);return r[s]||(r[s]=new IntersectionObserver(ye,{root:t,...e})),r[s]}(e);return me.set(t,n),r.observe(t),()=>{me.delete(t),r.unobserve(t)}}(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),o=e?n:r;o&&o(t)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends ue{constructor(){super(...arguments),this.removeStartListeners=l,this.removeEndListeners=l,this.removeAccessibleListeners=l,this.startPointerPress=(t,e)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=ne(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();h.update((()=>{de(this.node.current,t.target)?n&&n(t,e):r&&r(t,e)}))}),{passive:!(n.onTap||n.onPointerUp)}),s=ne(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=se(r,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Kt(this.node.current,"keydown",(t=>{"Enter"!==t.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=Kt(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&pe("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&h.update((()=>n(t,e)))}))})),pe("down",((t,e)=>{this.startPress(t,e)})))})),e=Kt(this.node.current,"blur",(()=>{this.isPressing&&pe("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=se(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&h.update((()=>n(t,e)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ce()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&h.update((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=ne(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Kt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=se(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ue{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){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=se(Kt(this.node.current,"focus",(()=>this.onFocus())),Kt(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends ue{mount(){this.unmount=se(he(this.node,!0),he(this.node,!1))}unmount(){}}}};function be(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}function we(t,e,n){const r=t.getProps();return zt(r,e,void 0!==n?n:r.custom,function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.get())),e}(t),function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.getVelocity())),e}(t))}const Ee="data-"+Bt("framerAppearId"),Se=t=>1e3*t,Ce=t=>t/1e3,Pe=t=>Array.isArray(t)&&"number"==typeof t[0];function Te(t){return Boolean(!t||"string"==typeof t&&Re[t]||Pe(t)||Array.isArray(t)&&t.every(Te))}const Ae=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Re={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ae([0,.65,.55,1]),circOut:Ae([.55,0,1,.45]),backIn:Ae([.31,.01,.66,-.59]),backOut:Ae([.33,1.53,.69,.99])};function Le(t){if(t)return Pe(t)?Ae(t):Array.isArray(t)?t.map(Le):Re[t]}const Oe=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Ve(t,e,n,r){if(t===e&&n===r)return l;return s=>0===s||1===s?s:Oe(function(t,e,n,r,s){let o,i,a=0;do{i=e+(n-e)/2,o=Oe(i,r,s)-t,o>0?n=i:e=i}while(Math.abs(o)>1e-7&&++a<12);return i}(s,0,1,t,n),e,r)}const De=Ve(.42,0,1,1),ke=Ve(0,0,.58,1),Me=Ve(.42,0,.58,1),je=t=>Array.isArray(t)&&"number"!=typeof t[0],Ne=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Be=t=>e=>1-t(1-e),Fe=t=>1-Math.sin(Math.acos(t)),Ie=Be(Fe),Ue=Ne(Ie),_e=Ve(.33,1.53,.69,.99),He=Be(_e),ze=Ne(He),qe={linear:l,easeIn:De,easeInOut:Me,easeOut:ke,circIn:Fe,circInOut:Ue,circOut:Ie,backIn:He,backInOut:ze,backOut:_e,anticipate:t=>(t*=2)<1?.5*He(t):.5*(2-Math.pow(2,-10*(t-1)))},$e=t=>{if(Array.isArray(t)){S(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,r,s]=t;return Ve(e,n,r,s)}return"string"==typeof t?(S(void 0!==qe[t],`Invalid easing type '${t}'`),qe[t]):t},We=(t,e)=>n=>Boolean(ht(n)&&ut.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),Xe=(t,e,n)=>r=>{if(!ht(r))return r;const[s,o,i,a]=r.match(lt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(i),alpha:void 0!==a?parseFloat(a):1}},Ge={...st,transform:t=>Math.round((t=>rt(0,255,t))(t))},Ze={test:We("rgb","red"),parse:Xe("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Ge.transform(t)+", "+Ge.transform(e)+", "+Ge.transform(n)+", "+at(ot.transform(r))+")"},Je={test:We("#"),parse:function(t){let e="",n="",r="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,r+=r,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}},transform:Ze.transform},Ye={test:We("hsl","hue"),parse:Xe("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+mt.transform(at(e))+", "+mt.transform(at(n))+", "+at(ot.transform(r))+")"},Ke={test:t=>Ze.test(t)||Je.test(t)||Ye.test(t),parse:t=>Ze.test(t)?Ze.parse(t):Ye.test(t)?Ye.parse(t):Je.parse(t),transform:t=>ht(t)?t:t.hasOwnProperty("red")?Ze.transform(t):Ye.transform(t)},Qe=(t,e,n)=>-n*t+n*e+t;function tn(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}const en=(t,e,n)=>{const r=t*t;return Math.sqrt(Math.max(0,n*(e*e-r)+r))},nn=[Je,Ze,Ye];function rn(t){const e=(n=t,nn.find((t=>t.test(n))));var n;S(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`);let r=e.parse(t);return e===Ye&&(r=function({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,n/=100;let s=0,o=0,i=0;if(e/=100){const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;s=tn(a,r,t+1/3),o=tn(a,r,t),i=tn(a,r,t-1/3)}else s=o=i=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*i),alpha:r}}(r)),r}const sn=(t,e)=>{const n=rn(t),r=rn(e),s={...n};return t=>(s.red=en(n.red,r.red,t),s.green=en(n.green,r.green,t),s.blue=en(n.blue,r.blue,t),s.alpha=Qe(n.alpha,r.alpha,t),Ze.transform(s))},on={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:l},an={regex:ct,countKey:"Colors",token:"${c}",parse:Ke.parse},ln={regex:lt,countKey:"Numbers",token:"${n}",parse:st.parse};function cn(t,{regex:e,countKey:n,token:r,parse:s}){const o=t.tokenised.match(e);o&&(t["num"+n]=o.length,t.tokenised=t.tokenised.replace(e,r),t.values.push(...o.map(s)))}function un(t){const e=t.toString(),n={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&cn(n,on),cn(n,an),cn(n,ln),n}function hn(t){return un(t).values}function dn(t){const{values:e,numColors:n,numVars:r,tokenised:s}=un(t),o=e.length;return t=>{let e=s;for(let s=0;s<o;s++)e=s<r?e.replace(on.token,t[s]):s<r+n?e.replace(an.token,Ke.transform(t[s])):e.replace(ln.token,at(t[s]));return e}}const pn=t=>"number"==typeof t?0:t,mn={test:function(t){var e,n;return isNaN(t)&&ht(t)&&((null===(e=t.match(lt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(ct))||void 0===n?void 0:n.length)||0)>0},parse:hn,createTransformer:dn,getAnimatableNone:function(t){const e=hn(t);return dn(t)(e.map(pn))}},fn=(t,e)=>n=>`${n>0?e:t}`;function gn(t,e){return"number"==typeof t?n=>Qe(t,e,n):Ke.test(t)?sn(t,e):t.startsWith("var(")?fn(t,e):xn(t,e)}const yn=(t,e)=>{const n=[...t],r=n.length,s=t.map(((t,n)=>gn(t,e[n])));return t=>{for(let e=0;e<r;e++)n[e]=s[e](t);return n}},vn=(t,e)=>{const n={...t,...e},r={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(r[s]=gn(t[s],e[s]));return t=>{for(const e in r)n[e]=r[e](t);return n}},xn=(t,e)=>{const n=mn.createTransformer(e),r=un(t),s=un(e);return r.numVars===s.numVars&&r.numColors===s.numColors&&r.numNumbers>=s.numNumbers?se(yn(r.values,s.values),n):(E(!0,`Complex values '${t}' and '${e}' 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.`),fn(t,e))},bn=(t,e,n)=>{const r=e-t;return 0===r?1:(n-t)/r},wn=(t,e)=>n=>Qe(t,e,n);function En(t,e,{clamp:n=!0,ease:r,mixer:s}={}){const o=t.length;if(S(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const i=function(t,e,n){const r=[],s=n||("number"==typeof(o=t[0])?wn:"string"==typeof o?Ke.test(o)?sn:xn:Array.isArray(o)?yn:"object"==typeof o?vn:wn);var o;const i=t.length-1;for(let n=0;n<i;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||l:e;o=se(t,o)}r.push(o)}return r}(e,r,s),a=i.length,c=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const r=bn(t[n],t[n+1],e);return i[n](r)};return n?e=>c(rt(t[0],t[o-1],e)):c}function Sn({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const s=je(r)?r.map($e):$e(r),o={done:!1,value:e[0]},i=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:function(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const s=bn(0,e,r);t.push(Qe(n,1,s))}}(e,t.length-1),e}(e),t),a=En(i,e,{ease:Array.isArray(s)?s:(l=e,c=s,l.map((()=>c||Me)).splice(0,l.length-1))});var l,c;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}function Cn(t,e){return e?t*(1e3/e):0}const Pn=5;function Tn(t,e,n){const r=Math.max(e-Pn,0);return Cn(n-t(r),e-r)}const An=.001,Rn=.01,Ln=10,On=.05,Vn=1;const Dn=12;function kn(t,e){return t*Math.sqrt(1-e*e)}const Mn=["duration","bounce"],jn=["stiffness","damping","mass"];function Nn(t,e){return e.some((e=>void 0!==t[e]))}function Bn({keyframes:t,restDelta:e,restSpeed:n,...r}){const s=t[0],o=t[t.length-1],i={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Nn(t,jn)&&Nn(t,Mn)){const n=function({duration:t=800,bounce:e=.25,velocity:n=0,mass:r=1}){let s,o;E(t<=Se(Ln),"Spring duration must be 10 seconds or less");let i=1-e;i=rt(On,Vn,i),t=rt(Rn,Ln,Ce(t)),i<1?(s=e=>{const r=e*i,s=r*t,o=r-n,a=kn(e,i),l=Math.exp(-s);return An-o/a*l},o=e=>{const r=e*i*t,o=r*n+n,a=Math.pow(i,2)*Math.pow(e,2)*t,l=Math.exp(-r),c=kn(Math.pow(e,2),i);return(-s(e)+An>0?-1:1)*((o-a)*l)/c}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-An,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let r=n;for(let n=1;n<Dn;n++)r-=t(r)/e(r);return r}(s,o,5/t);if(t=Se(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*r;return{stiffness:e,damping:2*i*Math.sqrt(r*e),duration:t}}}(t);e={...e,...n,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}(r),p=u?-Ce(u):0,m=l/(2*Math.sqrt(a*c)),f=o-s,g=Ce(Math.sqrt(a/c)),y=Math.abs(f)<5;let v;if(n||(n=y?.01:2),e||(e=y?.005:.5),m<1){const t=kn(g,m);v=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)v=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);v=e=>{const n=Math.exp(-m*g*e),r=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(r)+t*f*Math.cosh(r))/t}}return{calculatedDuration:d&&h||null,next:t=>{const r=v(t);if(d)i.done=t>=h;else{let s=p;0!==t&&(s=m<1?Tn(v,t,r):0);const a=Math.abs(s)<=n,l=Math.abs(o-r)<=e;i.done=a&&l}return i.value=i.done?o:r,i}}}function Fn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===i?f:i(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/r),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=c,d.value=d.done?g:n};let b,w;const E=t=>{var e;e=d.value,(void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,w=Bn({keyframes:[d.value,p(d.value)],velocity:Tn(v,t,d.value),damping:s,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:t=>{let e=!1;return w||void 0!==b||(e=!0,x(t),E(t)),void 0!==b&&t>b?w.next(t-b):(!e&&x(t),d)}}}const In=t=>{const e=({timestamp:e})=>t(e);return{start:()=>h.update(e,!0),stop:()=>d(e),now:()=>p.isProcessing?p.timestamp:performance.now()}},Un=2e4;function Hn(t){let e=0,n=t.next(e);for(;!n.done&&e<Un;)e+=50,n=t.next(e);return e>=Un?1/0:e}const zn={decay:Fn,inertia:Fn,tween:Sn,keyframes:Sn,spring:Bn};function qn({autoplay:t=!0,delay:e=0,driver:n=In,keyframes:r,type:s="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let p,m,f=1,g=!1;const y=()=>{m=new Promise((t=>{p=t}))};let v;y();const x=zn[s]||Sn;let b;x!==Sn&&"number"!=typeof r[0]&&(b=En([0,100],r,{clamp:!1}),r=[0,100]);const w=x({...d,keyframes:r});let E;"mirror"===a&&(E=x({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let S="idle",C=null,P=null,T=null;null===w.calculatedDuration&&o&&(w.calculatedDuration=Hn(w));const{calculatedDuration:A}=w;let R=1/0,L=1/0;null!==A&&(R=A+i,L=R*(o+1)-i);let O=0;const V=t=>{if(null===P)return;f>0&&(P=Math.min(P,t)),f<0&&(P=Math.min(t-L/f,P)),O=null!==C?C:Math.round(t-P)*f;const n=O-e*(f>=0?1:-1),s=f>=0?n<0:n>L;O=Math.max(n,0),"finished"===S&&null===C&&(O=L);let l=O,c=w;if(o){const t=O/R;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);const r=Boolean(e%2);r&&("reverse"===a?(n=1-n,i&&(n-=i/R)):"mirror"===a&&(c=E));let s=rt(0,1,n);O>L&&(s="reverse"===a&&r?1:0),l=s*R}const u=s?{done:!1,value:r[0]}:c.next(l);b&&(u.value=b(u.value));let{done:d}=u;s||null===A||(d=f>=0?O>=L:O<=0);const p=null===C&&("finished"===S||"running"===S&&d);return h&&h(u.value),p&&M(),u},D=()=>{v&&v.stop(),v=void 0},k=()=>{S="idle",D(),p(),y(),P=T=null},M=()=>{S="finished",u&&u(),D(),p()},j=()=>{if(g)return;v||(v=n(V));const t=v.now();l&&l(),null!==C?P=t-C:P&&"finished"!==S||(P=t),"finished"===S&&y(),T=P,C=null,S="running",v.start()};t&&j();const N={then(t,e){return m.then(t,e)},get time(){return Ce(O)},set time(t){t=Se(t),O=t,null===C&&v&&0!==f?P=v.now()-t/f:C=t},get duration(){const t=null===w.calculatedDuration?Hn(w):w.calculatedDuration;return Ce(t)},get speed(){return f},set speed(t){t!==f&&v&&(f=t,N.time=Ce(O))},get state(){return S},play:j,pause:()=>{S="paused",C=O},stop:()=>{g=!0,"idle"!==S&&(S="idle",c&&c(),k())},cancel:()=>{null!==T&&V(T),k()},complete:()=>{S="finished"},sample:t=>(P=0,V(t))};return N}const $n=function(t){let e;return()=>(void 0===e&&(e=Object.hasOwnProperty.call(Element.prototype,"animate")),e)}(),Wn=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);const Xn={type:"spring",stiffness:500,damping:25,restSpeed:10},Gn={type:"keyframes",duration:.8},Zn={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jn=(t,{keyframes:e})=>e.length>2?Gn:G.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Xn:Zn,Yn=(t,e)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!mn.test(e)&&"0"!==e||e.startsWith("url("))),Kn=new Set(["brightness","contrast","saturate","opacity"]);function Qn(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[r]=n.match(lt)||[];if(!r)return t;const s=n.replace(r,"");let o=Kn.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+s+")"}const tr=/([a-z-]*)\(.*?\)/g,er={...mn,getAnimatableNone:t=>{const e=t.match(tr);return e?e.map(Qn).join(" "):t}},nr={...bt,color:Ke,backgroundColor:Ke,outlineColor:Ke,fill:Ke,stroke:Ke,borderColor:Ke,borderTopColor:Ke,borderRightColor:Ke,borderBottomColor:Ke,borderLeftColor:Ke,filter:er,WebkitFilter:er},rr=t=>nr[t];function sr(t,e){let n=rr(t);return n!==er&&(n=mn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const or=t=>/^0[^.\s]+$/.test(t);function ir(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||or(t):void 0}function ar(t,e){return t[e]||t.default||t}const lr=(t,e,n,r={})=>s=>{const o=ar(r,t)||{},i=o.delay||r.delay||0;let{elapsed:a=0}=r;a-=Se(i);const c=function(t,e,n,r){const s=Yn(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const i=void 0!==r.from?r.from:t.get();let a;const l=[];for(let t=0;t<o.length;t++)null===o[t]&&(o[t]=0===t?i:o[t-1]),ir(o[t])&&l.push(t),"string"==typeof o[t]&&"none"!==o[t]&&"0"!==o[t]&&(a=o[t]);if(s&&l.length&&a)for(let t=0;t<l.length;t++)o[l[t]]=sr(e,a);return o}(e,t,n,o),u=c[0],m=c[c.length-1],f=Yn(t,u),g=Yn(t,m);E(f===g,`You are trying to animate ${t} from "${u}" to "${m}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${m} via the \`style\` property.`);let y={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:o,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(o)||(y={...y,...Jn(t,y)}),y.duration&&(y.duration=Se(y.duration)),y.repeatDelay&&(y.repeatDelay=Se(y.repeatDelay)),!f||!g||!1===o.type)return function({keyframes:t,delay:e,onUpdate:n,onComplete:r}){const s=()=>(n&&n(t[t.length-1]),r&&r(),{time:0,speed:1,duration:0,play:l,pause:l,stop:l,then:t=>(t(),Promise.resolve()),cancel:l,complete:l});return e?qn({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}(y);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=function(t,e,{onUpdate:n,onComplete:r,...s}){if(!$n()||!Wn.has(e)||s.repeatDelay||"mirror"===s.repeatType||0===s.damping||"inertia"===s.type)return!1;let o,i,a=!1;const c=()=>{i=new Promise((t=>{o=t}))};c();let{keyframes:u,duration:m=300,ease:f,times:g}=s;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!Te(e.ease))(e,s)){const t=qn({...s,repeat:0,delay:0});let e={done:!1,value:u[0]};const n=[];let r=0;for(;!e.done&&r<2e4;)e=t.sample(r),n.push(e.value),r+=10;g=void 0,u=n,m=r-10,f="linear"}const y=function(t,e,n,{delay:r=0,duration:s,repeat:o=0,repeatType:i="loop",ease:a,times:l}={}){const c={[e]:n};l&&(c.offset=l);const u=Le(a);return Array.isArray(u)&&(c.easing=u),t.animate(c,{delay:r,duration:s,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:o+1,direction:"reverse"===i?"alternate":"normal"})}(t.owner.current,e,u,{...s,duration:m,ease:f,times:g});s.syncStart&&(y.startTime=p.isProcessing?p.timestamp:document.timeline?document.timeline.currentTime:performance.now());const v=()=>y.cancel(),x=()=>{h.update(v),o(),c()};return y.onfinish=()=>{t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(u,s)),r&&r(),x()},{then(t,e){return i.then(t,e)},attachTimeline(t){return y.timeline=t,y.onfinish=null,l},get time(){return Ce(y.currentTime||0)},set time(t){y.currentTime=Se(t)},get speed(){return y.playbackRate},set speed(t){y.playbackRate=t},get duration(){return Ce(m)},play:()=>{a||(y.play(),d(v))},pause:()=>y.pause(),stop:()=>{if(a=!0,"idle"===y.playState)return;const{currentTime:e}=y;if(e){const n=qn({...s,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}x()},complete:()=>y.finish(),cancel:x}}(e,t,y);if(n)return n}return qn(y)};function cr(t){return Boolean(J(t)&&t.add)}const ur=t=>/^\-?\d*\.?\d+$/.test(t);function hr(t,e){-1===t.indexOf(e)&&t.push(e)}function dr(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class pr{constructor(){this.subscriptions=[]}add(t){return hr(this.subscriptions,t),()=>dr(this.subscriptions,t)}notify(t,e,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(let s=0;s<r;s++){const r=this.subscriptions[s];r&&r(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const mr={current:void 0};class fr{constructor(t,e={}){var n;this.version="10.16.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{this.prev=this.current,this.current=t;const{delta:n,timestamp:r}=p;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,h.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>h.postRender(this.velocityCheck),this.velocityCheck=({timestamp:t})=>{t!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new pr);const n=this.events[t].add(e);return"change"===t?()=>{n(),h.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return mr.current&&mr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Cn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise((e=>{this.hasAnimated=!0,this.animation=t(e),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function gr(t,e){return new fr(t,e)}const yr=t=>e=>e.test(t),vr=[st,ft,mt,pt,yt,gt,{test:t=>"auto"===t,parse:t=>t}],xr=t=>vr.find(yr(t)),br=[...vr,Ke,mn];function wr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,gr(n))}function Er(t,e){if(e)return(e[t]||e.default||e).from}function Sr({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,r}function Cr(t,e,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:i,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");r&&(o=r);const c=[],u=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const r=t.getValue(e),s=a[e];if(!r||void 0===s||u&&Sr(u,e))continue;const i={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!r.hasAnimated){const n=t.getProps()[Ee];n&&(i.elapsed=window.HandoffAppearAnimations(n,e,r,h),i.syncStart=!0)}r.start(lr(e,r,s,t.shouldReduceMotion&&G.has(e)?{type:!1}:i));const d=r.animation;cr(l)&&(l.add(e),d.then((()=>l.remove(e)))),c.push(d)}return i&&Promise.all(c).then((()=>{i&&function(t,e){const n=we(t,e);let{transitionEnd:r={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const e in o)wr(t,e,Wt(o[e]))}(t,i)})),c}function Pr(t,e,n={}){const r=we(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const o=r?()=>Promise.all(Cr(t,r,n)):()=>Promise.resolve(),i=t.variantChildren&&t.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:i,staggerDirection:a}=s;return function(t,e,n=0,r=0,s=1,o){const i=[],a=(t.variantChildren.size-1)*r,l=1===s?(t=0)=>t*r:(t=0)=>a-t*r;return Array.from(t.variantChildren).sort(Tr).forEach(((t,r)=>{t.notify("AnimationStart",e),i.push(Pr(t,e,{...o,delay:n+l(r)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(i)}(t,e,o+r,i,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,i]:[i,o];return t().then((()=>e()))}return Promise.all([o(),i(n.delay)])}function Tr(t,e){return t.sortNodePosition(e)}const Ar=[...D].reverse(),Rr=D.length;function Lr(t){let e=function(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let r;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>Pr(t,e,n)));r=Promise.all(s)}else if("string"==typeof e)r=Pr(t,e,n);else{const s="function"==typeof e?we(t,e,n.custom):e;r=Promise.all(Cr(t,s,n))}return r.then((()=>t.notify("AnimationComplete",e)))}(t,e,n))))}(t);const n={animate:Or(!0),whileInView:Or(),whileHover:Or(),whileTap:Or(),whileDrag:Or(),whileFocus:Or(),exit:Or()};let r=!0;const s=(e,n)=>{const r=we(t,n);if(r){const{transition:t,transitionEnd:n,...s}=r;e={...e,...s,...n}}return e};function o(o,i){const a=t.getProps(),l=t.getVariantContext(!0)||{},c=[],u=new Set;let h={},d=1/0;for(let e=0;e<Rr;e++){const f=Ar[e],g=n[f],y=void 0!==a[f]?a[f]:l[f],v=O(y),x=f===i?g.isActive:null;!1===x&&(d=e);let b=y===l[f]&&y!==a[f]&&v;if(b&&r&&t.manuallyAnimateOnMount&&(b=!1),g.protectedKeys={...h},!g.isActive&&null===x||!y&&!g.prevProp||V(y)||"boolean"==typeof y)continue;const w=(p=g.prevProp,"string"==typeof(m=y)?m!==p:!!Array.isArray(m)&&!be(m,p));let E=w||f===i&&g.isActive&&!b&&v||e>d&&v;const S=Array.isArray(y)?y:[y];let C=S.reduce(s,{});!1===x&&(C={});const{prevResolvedValues:P={}}=g,T={...P,...C},A=t=>{E=!0,u.delete(t),g.needsAnimating[t]=!0};for(const t in T){const e=C[t],n=P[t];h.hasOwnProperty(t)||(e!==n?qt(e)&&qt(n)?!be(e,n)||w?A(t):g.protectedKeys[t]=!0:void 0!==e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):g.protectedKeys[t]=!0)}g.prevProp=y,g.prevResolvedValues=C,g.isActive&&(h={...h,...C}),r&&t.blockInitialAnimation&&(E=!1),E&&!b&&c.push(...S.map((t=>({animation:t,options:{type:f,...o}}))))}var p,m;if(u.size){const e={};u.forEach((n=>{const r=t.getBaseTarget(n);void 0!==r&&(e[n]=r)})),c.push({animation:e})}let f=Boolean(c.length);return r&&!1===a.initial&&!t.manuallyAnimateOnMount&&(f=!1),r=!1,f?e(c):Promise.resolve()}return{animateChanges:o,setActive:function(e,r,s){var i;if(n[e].isActive===r)return Promise.resolve();null===(i=t.variantChildren)||void 0===i||i.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)})),n[e].isActive=r;const a=o(s,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Or(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Vr=0;const Dr={animation:{Feature:class extends ue{constructor(t){super(t),t.animationState||(t.animationState=Lr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),V(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ue{constructor(){super(...arguments),this.id=Vr++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&s.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},kr=(t,e)=>Math.abs(t-e);class Mr{constructor(t,e,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Br(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=kr(t.x,e.x),r=kr(t.y,e.y);return Math.sqrt(n**2+r**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:r}=t,{timestamp:s}=p;this.history.push({...r,timestamp:s});const{onStart:o,onMove:i}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),i&&i(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=jr(e,this.transformPagePoint),h.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,s=Br("pointercancel"===t.type?this.lastMoveEventInfo:jr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,s),r&&r(t,s)},!Qt(t))return;this.handlers=e,this.transformPagePoint=n;const r=jr(te(t),this.transformPagePoint),{point:s}=r,{timestamp:o}=p;this.history=[{...s,timestamp:o}];const{onSessionStart:i}=e;i&&i(t,Br(r,this.history)),this.removeListeners=se(ne(window,"pointermove",this.handlePointerMove),ne(window,"pointerup",this.handlePointerUp),ne(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),d(this.updatePoint)}}function jr(t,e){return e?{point:e(t.point)}:t}function Nr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Br({point:t},e){return{point:t,delta:Nr(t,Ir(e)),offset:Nr(t,Fr(e)),velocity:Ur(e,.1)}}function Fr(t){return t[0]}function Ir(t){return t[t.length-1]}function Ur(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const s=Ir(t);for(;n>=0&&(r=t[n],!(s.timestamp-r.timestamp>Se(e)));)n--;if(!r)return{x:0,y:0};const o=Ce(s.timestamp-r.timestamp);if(0===o)return{x:0,y:0};const i={x:(s.x-r.x)/o,y:(s.y-r.y)/o};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function _r(t){return t.max-t.min}function Hr(t,e=0,n=.01){return Math.abs(t-e)<=n}function zr(t,e,n,r=.5){t.origin=r,t.originPoint=Qe(e.min,e.max,t.origin),t.scale=_r(n)/_r(e),(Hr(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Qe(n.min,n.max,t.origin)-t.originPoint,(Hr(t.translate)||isNaN(t.translate))&&(t.translate=0)}function qr(t,e,n,r){zr(t.x,e.x,n.x,r?r.originX:void 0),zr(t.y,e.y,n.y,r?r.originY:void 0)}function $r(t,e,n){t.min=n.min+e.min,t.max=t.min+_r(e)}function Wr(t,e,n){t.min=e.min-n.min,t.max=t.min+_r(e)}function Xr(t,e,n){Wr(t.x,e.x,n.x),Wr(t.y,e.y,n.y)}function Gr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Zr(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}const Jr=.35;function Yr(t,e,n){return{min:Kr(t,e),max:Kr(t,n)}}function Kr(t,e){return"number"==typeof t?t:t[e]||0}const Qr=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),ts=()=>({x:{min:0,max:0},y:{min:0,max:0}});function es(t){return[t("x"),t("y")]}function ns({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function rs(t){return void 0===t||1===t}function ss({scale:t,scaleX:e,scaleY:n}){return!rs(t)||!rs(e)||!rs(n)}function os(t){return ss(t)||is(t)||t.z||t.rotate||t.rotateX||t.rotateY}function is(t){return as(t.x)||as(t.y)}function as(t){return t&&"0%"!==t}function ls(t,e,n){return n+e*(t-n)}function cs(t,e,n,r,s){return void 0!==s&&(t=ls(t,s,r)),ls(t,n,r)+e}function us(t,e=0,n=1,r,s){t.min=cs(t.min,e,n,r,s),t.max=cs(t.max,e,n,r,s)}function hs(t,{x:e,y:n}){us(t.x,e.translate,e.scale,e.originPoint),us(t.y,n.translate,n.scale,n.originPoint)}function ds(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function ps(t,e){t.min=t.min+e,t.max=t.max+e}function ms(t,e,[n,r,s]){const o=void 0!==e[s]?e[s]:.5,i=Qe(t.min,t.max,o);us(t,e[n],e[r],i,e.scale)}const fs=["x","scaleX","originX"],gs=["y","scaleY","originY"];function ys(t,e){ms(t.x,e,fs),ms(t.y,e,gs)}function vs(t,e){return ns(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(t.getBoundingClientRect(),e))}const xs=new WeakMap;class bs{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ts(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;n&&!1===n.isPresent||(this.panSession=new Mr(t,{onSessionStart:t=>{this.stopAnimation(),e&&this.snapToCursor(te(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:r,onDragStart:s}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=le(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),es((t=>{let e=this.getAxisMotionValue(t).get()||0;if(mt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[t];r&&(e=_r(r)*(parseFloat(e)/100))}}this.originPoint[t]=e})),s&&h.update((()=>s(t,e)),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:i}=e;if(r&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}(i),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,i),this.updateAxis("y",e.point,i),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e)},{transformPagePoint:this.visualElement.getTransformPagePoint()}))}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=e;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&h.update((()=>s(t,e)))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:r}=this.getProps();if(!n||!ws(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},r){return void 0!==e&&t<e?t=r?Qe(e,t,r.min):Math.max(t,e):void 0!==n&&t>n&&(t=r?Qe(n,t,r.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){const{dragConstraints:t,dragElastic:e}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;t&&L(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(t,{top:e,left:n,bottom:r,right:s}){return{x:Gr(t.x,n,s),y:Gr(t.y,e,r)}}(n.layoutBox,t),this.elastic=function(t=Jr){return!1===t?t=0:!0===t&&(t=Jr),{x:Yr(t,"left","right"),y:Yr(t,"top","bottom")}}(e),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&es((t=>{this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(n.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!L(t))return!1;const n=t.current;S(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=function(t,e,n){const r=vs(t,n),{scroll:s}=e;return s&&(ps(r.x,s.offset.x),ps(r.y,s.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Zr(t.x,e.x),y:Zr(t.y,e.y)}}(r.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=ns(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:i}=this.getProps(),a=this.constraints||{},l=es((i=>{if(!ws(i,e,this.currentDirection))return;let l=a&&a[i]||{};o&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,h={type:"inertia",velocity:n?t[i]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(i,h)}));return Promise.all(l).then(i)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(lr(t,n,0,e))}stopAnimation(){es((t=>this.getAxisMotionValue(t).stop()))}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps();return n[e]||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){es((e=>{const{drag:n}=this.getProps();if(!ws(e,n,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(e);if(r&&r.layout){const{min:n,max:o}=r.layout.layoutBox[e];s.set(t[e]-Qe(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!L(e)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};es((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();r[t]=function(t,e){let n=.5;const r=_r(t),s=_r(e);return s>r?n=bn(e.min,e.max-r,t.min):r>s&&(n=bn(t.min,t.max-s,e.min)),rt(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),es((e=>{if(!ws(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Qe(s,o,r[e]))}))}addListeners(){if(!this.visualElement.current)return;xs.set(this.visualElement,this);const t=ne(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();L(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const s=Kt(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(es((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{s(),t(),r(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Jr,dragMomentum:i=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:i}}}function ws(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Es=t=>(e,n)=>{t&&h.update((()=>t(e,n)))},Ss={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Cs(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ps={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ft.test(t))return t;t=parseFloat(t)}return`${Cs(t,e.target.x)}% ${Cs(t,e.target.y)}%`}},Ts={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,s=mn.parse(t);if(s.length>5)return r;const o=mn.createTransformer(t),i="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+i]/=a,s[1+i]/=l;const c=Qe(a,l,.5);return"number"==typeof s[2+i]&&(s[2+i]/=c),"number"==typeof s[3+i]&&(s[3+i]/=c),o(s)}};class As extends s.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:r}=this.props,{projection:s}=t;var o;o=Ls,Object.assign(W,o),s&&(e.group&&e.group.add(s),n&&n.register&&r&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(()=>{this.safeToRemove()})),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Ss.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:r,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,r||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||h.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),queueMicrotask((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Rs(t){const[e,n]=function(){const t=(0,s.useContext)(f);if(null===t)return[!0,null];const{isPresent:e,onExitComplete:n,register:r}=t,o=(0,s.useId)();return(0,s.useEffect)((()=>r(o)),[]),!e&&n?[!1,()=>n&&n(o)]:[!0]}(),r=(0,s.useContext)(w);return s.createElement(As,{...t,layoutGroup:r,switchLayoutGroup:(0,s.useContext)(I),isPresent:e,safeToRemove:n})}const Ls={borderRadius:{...Ps,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ps,borderTopRightRadius:Ps,borderBottomLeftRadius:Ps,borderBottomRightRadius:Ps,boxShadow:Ts},Os=["TopLeft","TopRight","BottomLeft","BottomRight"],Vs=Os.length,Ds=t=>"string"==typeof t?parseFloat(t):t,ks=t=>"number"==typeof t||ft.test(t);function Ms(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const js=Bs(0,.5,Ie),Ns=Bs(.5,.95,l);function Bs(t,e,n){return r=>r<t?0:r>e?1:n(bn(t,e,r))}function Fs(t,e){t.min=e.min,t.max=e.max}function Is(t,e){Fs(t.x,e.x),Fs(t.y,e.y)}function Us(t,e,n,r,s){return t=ls(t-=e,1/n,r),void 0!==s&&(t=ls(t,1/s,r)),t}function _s(t,e,[n,r,s],o,i){!function(t,e=0,n=1,r=.5,s,o=t,i=t){if(mt.test(e)&&(e=parseFloat(e),e=Qe(i.min,i.max,e/100)-i.min),"number"!=typeof e)return;let a=Qe(o.min,o.max,r);t===o&&(a-=e),t.min=Us(t.min,e,n,a,s),t.max=Us(t.max,e,n,a,s)}(t,e[n],e[r],e[s],e.scale,o,i)}const Hs=["x","scaleX","originX"],zs=["y","scaleY","originY"];function qs(t,e,n,r){_s(t.x,e,Hs,n?n.x:void 0,r?r.x:void 0),_s(t.y,e,zs,n?n.y:void 0,r?r.y:void 0)}function $s(t){return 0===t.translate&&1===t.scale}function Ws(t){return $s(t.x)&&$s(t.y)}function Xs(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function Gs(t){return _r(t.x)/_r(t.y)}class Zs{constructor(){this.members=[]}add(t){hr(this.members,t),t.scheduleRender()}remove(t){if(dr(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex((e=>t===e));if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((t=>{t.instance&&t.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Js(t,e,n){let r="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(r=`translate3d(${s}px, ${o}px, 0) `),1===e.x&&1===e.y||(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:s}=n;t&&(r+=`rotate(${t}deg) `),e&&(r+=`rotateX(${e}deg) `),s&&(r+=`rotateY(${s}deg) `)}const i=t.x.scale*e.x,a=t.y.scale*e.y;return 1===i&&1===a||(r+=`scale(${i}, ${a})`),r||"none"}const Ys=(t,e)=>t.depth-e.depth;class Ks{constructor(){this.children=[],this.isDirty=!1}add(t){hr(this.children,t),this.isDirty=!0}remove(t){dr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ys),this.isDirty=!1,this.children.forEach(t)}}const Qs=["","X","Y","Z"];let to=0;const eo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function no({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=to++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;eo.totalNodes=eo.resolvedTargetDeltas=eo.recalculatedProjection=0,this.nodes.forEach(oo),this.nodes.forEach(po),this.nodes.forEach(mo),this.nodes.forEach(io),t=eo,window.MotionDebug&&window.MotionDebug.record(t)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ks)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new pr),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=e)instanceof SVGElement&&"svg"!==r.tagName,this.instance=e;const{layoutId:s,layout:o,visualElement:i}=this.options;if(i&&!i.current&&i.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||s)&&(this.isLayoutDirty=!0),t){let n;const r=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=performance.now(),r=({timestamp:e})=>{const s=e-n;s>=250&&(d(r),t(s-250))};return h.read(r,!0),()=>d(r)}(r),Ss.hasAnimatedSinceResize&&(Ss.hasAnimatedSinceResize=!1,this.nodes.forEach(ho))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&i&&(s||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||i.getDefaultTransition()||bo,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=i.getProps(),l=!this.targetLayout||!Xs(this.targetLayout,r)||n,c=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,c);const e={...ar(s,"layout"),onPlay:o,onComplete:a};(i.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||ho(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,d(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(fo),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(lo);this.isUpdating||this.nodes.forEach(co),this.isUpdating=!1,this.nodes.forEach(uo),this.nodes.forEach(ro),this.nodes.forEach(so),this.clearAllSnapshots();const t=performance.now();p.delta=rt(0,1e3/60,t-p.timestamp),p.timestamp=t,p.isProcessing=!0,m.update.process(p),m.preRender.process(p),m.render.process(p),p.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(ao),this.sharedNodes.forEach(go)}scheduleUpdateProjection(){h.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){h.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++)this.path[t].updateScroll();const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ts(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!Ws(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;t&&(e||os(this.latestValues)||o)&&(s(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var r;return t&&(n=this.removeTransform(n)),So((r=n).x),So(r.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return ts();const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(ps(e.x,n.offset.x),ps(e.y,n.offset.y)),e}removeElementScroll(t){const e=ts();Is(e,t);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:s,options:o}=r;if(r!==this.root&&s&&o.layoutScroll){if(s.isRoot){Is(e,t);const{scroll:n}=this.root;n&&(ps(e.x,-n.offset.x),ps(e.y,-n.offset.y))}ps(e.x,s.offset.x),ps(e.y,s.offset.y)}}return e}applyTransform(t,e=!1){const n=ts();Is(n,t);for(let t=0;t<this.path.length;t++){const r=this.path[t];!e&&r.options.layoutScroll&&r.scroll&&r!==r.root&&ys(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),os(r.latestValues)&&ys(n,r.latestValues)}return os(this.latestValues)&&ys(n,this.latestValues),n}removeTransform(t){const e=ts();Is(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!os(n.latestValues))continue;ss(n.latestValues)&&n.updateSnapshot();const r=ts();Is(r,n.measurePageBox()),qs(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return os(this.latestValues)&&qs(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==p.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(t||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=p.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ts(),this.relativeTargetOrigin=ts(),Xr(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Is(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var i,a,l;if(this.target||(this.target=ts(),this.targetWithTransforms=ts()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),i=this.target,a=this.relativeTarget,l=this.relativeParent.target,$r(i.x,a.x,l.x),$r(i.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Is(this.target,this.layout.layoutBox),hs(this.target,this.targetDelta)):Is(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ts(),this.relativeTargetOrigin=ts(),Xr(this.relativeTargetOrigin,this.target,t.target),Is(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}eo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!ss(this.parent.latestValues)&&!is(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let r=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===p.timestamp&&(r=!1),r)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Is(this.layoutCorrected,this.layout.layoutBox);const i=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,r=!1){const s=n.length;if(!s)return;let o,i;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],i=o.projectionDelta;const s=o.instance;s&&s.style&&"contents"===s.style.display||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ys(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),i&&(e.x*=i.x.scale,e.y*=i.y.scale,hs(t,i)),r&&os(o.latestValues)&&ys(t,o.latestValues))}e.x=ds(e.x),e.y=ds(e.y)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox);const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta=Qr(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=Qr(),this.projectionDeltaWithTransform=Qr());const c=this.projectionTransform;qr(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=Js(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===i&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),eo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,r=n?n.latestValues:{},s={...this.latestValues},o=Qr();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const i=ts(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(xo));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;yo(o.x,t.x,n),yo(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Xr(i,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=i,g=n,vo(p.x,m.x,f.x,g),vo(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h=ts()),Is(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,r,s,o){s?(t.opacity=Qe(0,void 0!==n.opacity?n.opacity:1,js(r)),t.opacityExit=Qe(void 0!==e.opacity?e.opacity:1,0,Ns(r))):o&&(t.opacity=Qe(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let s=0;s<Vs;s++){const o=`border${Os[s]}Radius`;let i=Ms(e,o),a=Ms(n,o);void 0===i&&void 0===a||(i||(i=0),a||(a=0),0===i||0===a||ks(i)===ks(a)?(t[o]=Math.max(Qe(Ds(i),Ds(a),r),0),(mt.test(a)||mt.test(i))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Qe(e.rotate||0,n.rotate||0,r))}(s,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(d(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=h.update((()=>{Ss.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const r=J(0)?0:gr(0);return r.start(lr("",r,1e3,n)),r.animation}(0,0,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:r,latestValues:s}=t;if(e&&n&&r){if(this!==t&&this.layout&&r&&Co(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||ts();const e=_r(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const r=_r(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+r}Is(e,n),ys(e,s),qr(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Zs),this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const r={};for(let e=0;e<Qs.length;e++){const s="rotate"+Qs[e];n[s]&&(r[s]=n[s],t.setStaticValue(s,0))}t.render();for(const e in r)t.setStaticValue(e,r[e]);t.scheduleRender()}getProjectionStyles(t={}){var e,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Xt(t.pointerEvents)||"",r.transform=s?s(this.latestValues,""):"none",r;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=Xt(t.pointerEvents)||""),this.hasProjected&&!os(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const i=o.animationValues||o.latestValues;this.applyTransformsToTarget(),r.transform=Js(this.projectionDeltaWithTransform,this.treeScale,i),s&&(r.transform=s(i,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?r.opacity=o===this?null!==(n=null!==(e=i.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r.opacity=o===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const t in W){if(void 0===i[t])continue;const{correct:e,applyTo:n}=W[t],s="none"===r.transform?i[t]:e(i[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)r[n[e]]=s}else r[t]=s}return this.options.layoutId&&(r.pointerEvents=o===this?Xt(t.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()})),this.root.nodes.forEach(lo),this.root.sharedNodes.clear()}}}function ro(t){t.updateLayout()}function so(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:r}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?es((t=>{const r=o?n.measuredBox[t]:n.layoutBox[t],s=_r(r);r.min=e[t].min,r.max=r.min+s})):Co(s,n.layoutBox,e)&&es((r=>{const s=o?n.measuredBox[r]:n.layoutBox[r],i=_r(e[r]);s.max=s.min+i,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[r].max=t.relativeTarget[r].min+i)}));const i=Qr();qr(i,e,n.layoutBox);const a=Qr();o?qr(a,t.applyTransform(r,!0),n.measuredBox):qr(a,e,n.layoutBox);const l=!Ws(i);let c=!1;if(!t.resumeFrom){const r=t.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:s,layout:o}=r;if(s&&o){const i=ts();Xr(i,n.layoutBox,s.layoutBox);const a=ts();Xr(a,e,o.layoutBox),Xs(i,a)||(c=!0),r.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=i,t.relativeParent=r)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:i,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function oo(t){eo.totalNodes++,t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function io(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ao(t){t.clearSnapshot()}function lo(t){t.clearMeasurements()}function co(t){t.isLayoutDirty=!1}function uo(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function ho(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function po(t){t.resolveTargetDelta()}function mo(t){t.calcProjection()}function fo(t){t.resetRotation()}function go(t){t.removeLeadSnapshot()}function yo(t,e,n){t.translate=Qe(e.translate,0,n),t.scale=Qe(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function vo(t,e,n,r){t.min=Qe(e.min,n.min,r),t.max=Qe(e.max,n.max,r)}function xo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const bo={duration:.45,ease:[.4,0,.1,1]},wo=t=>"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().includes(t),Eo=wo("applewebkit/")&&!wo("chrome/")?Math.round:l;function So(t){t.min=Eo(t.min),t.max=Eo(t.max)}function Co(t,e,n){return"position"===t||"preserve-aspect"===t&&!Hr(Gs(e),Gs(n),.2)}const Po=no({attachResizeListener:(t,e)=>Kt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),To={current:void 0},Ao=no({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!To.current){const t=new Po({});t.mount(window),t.setOptions({layoutScroll:!0}),To.current=t}return To.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Ro={pan:{Feature:class extends ue{constructor(){super(...arguments),this.removePointerDownListener=l}onPointerDown(t){this.session=new Mr(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Es(t),onStart:Es(e),onMove:n,onEnd:(t,e)=>{delete this.session,r&&h.update((()=>r(t,e)))}}}mount(){this.removePointerDownListener=ne(this.node.current,"pointerdown",(t=>this.onPointerDown(t)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends ue{constructor(t){super(t),this.removeGroupControls=l,this.removeListeners=l,this.controls=new bs(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||l}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Ao,MeasureLayout:Rs}},Lo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Oo(t,e,n=1){S(n<=4,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[r,s]=function(t){const e=Lo.exec(t);if(!e)return[,];const[,n,r]=e;return[n,r]}(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const t=o.trim();return ur(t)?parseFloat(t):t}return et(s)?Oo(s,e,n+1):s}const Vo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Do=t=>Vo.has(t),ko=t=>t===st||t===ft,Mo=(t,e)=>parseFloat(t.split(", ")[e]),jo=(t,e)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/);if(s)return Mo(s[1],e);{const e=r.match(/^matrix\((.+)\)$/);return e?Mo(e[1],t):0}},No=new Set(["x","y","z"]),Bo=X.filter((t=>!No.has(t))),Fo={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:jo(4,13),y:jo(5,14)};Fo.translateX=Fo.x,Fo.translateY=Fo.y;function Io(t,e,n,r){return(t=>Object.keys(t).some(Do))(e)?((t,e,n={},r={})=>{e={...e},r={...r};const s=Object.keys(e).filter(Do);let i=[],a=!1;const l=[];if(s.forEach((s=>{const o=t.getValue(s);if(!t.hasValue(s))return;let c=n[s],u=xr(c);const h=e[s];let d;if(qt(h)){const t=h.length,e=null===h[0]?1:0;c=h[e],u=xr(c);for(let n=e;n<t&&null!==h[n];n++)d?S(xr(h[n])===d,"All keyframes must be of the same type"):(d=xr(h[n]),S(d===u||ko(u)&&ko(d),"Keyframes must be of the same dimension as the current value"))}else d=xr(h);if(u!==d)if(ko(u)&&ko(d)){const t=o.get();"string"==typeof t&&o.set(parseFloat(t)),"string"==typeof h?e[s]=parseFloat(h):Array.isArray(h)&&d===ft&&(e[s]=h.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==d?void 0:d.transform)&&(0===c||0===h)?0===c?o.set(d.transform(c)):e[s]=u.transform(h):(a||(i=function(t){const e=[];return Bo.forEach((n=>{const r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),a=!0),l.push(s),r[s]=void 0!==r[s]?r[s]:e[s],o.jump(h))})),l.length){const n=l.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const r=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:i}=o,a={};"none"===i&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=Fo[t](r,o)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const r=e.getValue(n);r&&r.jump(a[n]),t[n]=Fo[n](l,o)})),t})(e,t,l);return i.length&&i.forEach((([e,n])=>{t.getValue(e).set(n)})),t.render(),o&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:r}}return{target:e,transitionEnd:r}})(t,e,n,r):{target:e,transitionEnd:r}}const Uo={current:null},_o={current:!1},Ho=new WeakMap,zo=Object.keys(F),qo=zo.length,$o=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Wo=k.length;class Xo{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>h.render(this.render,!1,!0);const{latestValues:i,renderState:a}=s;this.latestValues=i,this.baseTarget={...i},this.initialValues=e.initial?{...i}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=M(e),this.isVariantNode=j(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(e,{});for(const t in c){const e=c[t];void 0!==i[t]&&J(e)&&(e.set(i[t],!1),cr(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,Ho.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(((t,e)=>this.bindToMotionValue(e,t))),_o.current||function(){if(_o.current=!0,o)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Uo.current=t.matches;t.addListener(e),e()}else Uo.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Uo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Ho.delete(this.current),this.projection&&this.projection.unmount(),d(this.notifyUpdate),d(this.render),this.valueSubscriptions.forEach((t=>t())),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=G.has(t),r=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&h.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,(()=>{r(),s()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,r,s){let o,i;for(let t=0;t<qo;t++){const n=zo[t],{isEnabled:r,Feature:s,ProjectionNode:a,MeasureLayout:l}=F[n];a&&(o=a),r(e)&&(!this.features[n]&&s&&(this.features[n]=new s(this)),l&&(i=l))}if(!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:r,dragConstraints:i,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(r)||i&&L(i),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:a,layoutRoot:l})}return i}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ts()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(t,this.props,e)}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<$o.length;e++){const n=$o[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=t["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(t,e,n){const{willChange:r}=e;for(const s in e){const o=e[s],i=n[s];if(J(o))t.addValue(s,o),cr(r)&&r.add(s);else if(J(i))t.addValue(s,gr(o,{owner:t})),cr(r)&&r.remove(s);else if(i!==o)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(s);t.addValue(s,gr(void 0!==e?e:o,{owner:t}))}}for(const r in n)void 0===e[r]&&t.removeValue(r);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<Wo;t++){const n=k[t],r=this.props[n];(O(r)||!1===r)&&(e[n]=r)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,e)),this.values.set(t,e),this.latestValues[t]=e.get()}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=gr(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(e=zt(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==r)return r;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||J(s)?void 0!==this.initialValues[t]&&void 0===r?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new pr),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Go extends Xo{sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},{transformValues:r},s){let o=function(t,e,n){const r={};for(const s in t){const t=Er(s,e);if(void 0!==t)r[s]=t;else{const t=n.getValue(s);t&&(r[s]=t.get())}}return r}(n,t||{},this);if(r&&(e&&(e=r(e)),n&&(n=r(n)),o&&(o=r(o))),s){!function(t,e,n){var r,s;const o=Object.keys(e).filter((e=>!t.hasValue(e))),i=o.length;var a;if(i)for(let l=0;l<i;l++){const i=o[l],c=e[i];let u=null;Array.isArray(c)&&(u=c[0]),null===u&&(u=null!==(s=null!==(r=n[i])&&void 0!==r?r:t.readValue(i))&&void 0!==s?s:e[i]),null!=u&&("string"==typeof u&&(ur(u)||or(u))?u=parseFloat(u):(a=u,!br.find(yr(a))&&mn.test(c)&&(u=sr(i,c))),t.addValue(i,gr(u,{owner:t})),void 0===n[i]&&(n[i]=u),null!==u&&t.setBaseTarget(i,u))}}(this,n,o);const t=((t,e,n,r)=>{const s=function(t,{...e},n){const r=t.current;if(!(r instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach((t=>{const e=t.get();if(!et(e))return;const n=Oo(e,r);n&&t.set(n)}));for(const t in e){const s=e[t];if(!et(s))continue;const o=Oo(s,r);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=s))}return{target:e,transitionEnd:n}}(t,e,r);return Io(t,e=s.target,n,r=s.transitionEnd)})(this,n,o,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class Zo extends Go{readValueFromInstance(t,e){if(G.has(e)){const t=rr(e);return t&&t.default||0}{const r=(n=t,window.getComputedStyle(n)),s=(tt(e)?r.getPropertyValue(e):r[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return vs(t,e)}build(t,e,n,r){wt(t,e,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,e){return _t(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;J(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}renderInstance(t,e,n,r){Ft(t,e,n,r)}}class Jo extends Go{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(G.has(e)){const t=rr(e);return t&&t.default||0}return e=It.has(e)?e:Bt(e),t.getAttribute(e)}measureInstanceViewportBox(){return ts()}scrapeMotionValuesFromProps(t,e){return Ht(t,e)}build(t,e,n,r){Dt(t,e,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,e,n,r){Ut(t,e,0,r)}mount(t){this.isSVGTag=Mt(t.tagName),super.mount(t)}}const Yo=(t,e)=>$(t)?new Jo(e,{enableHardwareAcceleration:!1}):new Zo(e,{enableHardwareAcceleration:!0}),Ko={...Dr,...xe,...Ro,layout:{ProjectionNode:Ao,MeasureLayout:Rs}},Qo=z(((t,e)=>function(t,{forwardMotionProps:e=!1},n,r){return{...$(t)?Jt:Yt,preloadedFeatures:n,useRender:Nt(e),createVisualElement:r,Component:t}}(t,e,Ko,Yo)));var ti=window.wp.i18n;const ei="https://ai.extendify.com";function ni(t,e){return function(){return t.apply(e,arguments)}}const{toString:ri}=Object.prototype,{getPrototypeOf:si}=Object,oi=(ii=Object.create(null),t=>{const e=ri.call(t);return ii[e]||(ii[e]=e.slice(8,-1).toLowerCase())});var ii;const ai=t=>(t=t.toLowerCase(),e=>oi(e)===t),li=t=>e=>typeof e===t,{isArray:ci}=Array,ui=li("undefined"),hi=ai("ArrayBuffer"),di=li("string"),pi=li("function"),mi=li("number"),fi=t=>null!==t&&"object"==typeof t,gi=t=>{if("object"!==oi(t))return!1;const e=si(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},yi=ai("Date"),vi=ai("File"),xi=ai("Blob"),bi=ai("FileList"),wi=ai("URLSearchParams");function Ei(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let r,s;if("object"!=typeof t&&(t=[t]),ci(t))for(r=0,s=t.length;r<s;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let i;for(r=0;r<o;r++)i=s[r],e.call(null,t[i],i,t)}}function Si(t,e){e=e.toLowerCase();const n=Object.keys(t);let r,s=n.length;for(;s-- >0;)if(r=n[s],e===r.toLowerCase())return r;return null}const Ci="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Pi=t=>!ui(t)&&t!==Ci,Ti=(Ai="undefined"!=typeof Uint8Array&&si(Uint8Array),t=>Ai&&t instanceof Ai);var Ai;const Ri=ai("HTMLFormElement"),Li=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Oi=ai("RegExp"),Vi=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Ei(n,((n,s)=>{let o;!1!==(o=e(n,s,t))&&(r[s]=o||n)})),Object.defineProperties(t,r)},Di="abcdefghijklmnopqrstuvwxyz",ki="0123456789",Mi={DIGIT:ki,ALPHA:Di,ALPHA_DIGIT:Di+Di.toUpperCase()+ki},ji=ai("AsyncFunction");var Ni={isArray:ci,isArrayBuffer:hi,isBuffer:function(t){return null!==t&&!ui(t)&&null!==t.constructor&&!ui(t.constructor)&&pi(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||pi(t.append)&&("formdata"===(e=oi(t))||"object"===e&&pi(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&hi(t.buffer),e},isString:di,isNumber:mi,isBoolean:t=>!0===t||!1===t,isObject:fi,isPlainObject:gi,isUndefined:ui,isDate:yi,isFile:vi,isBlob:xi,isRegExp:Oi,isFunction:pi,isStream:t=>fi(t)&&pi(t.pipe),isURLSearchParams:wi,isTypedArray:Ti,isFileList:bi,forEach:Ei,merge:function t(){const{caseless:e}=Pi(this)&&this||{},n={},r=(r,s)=>{const o=e&&Si(n,s)||s;gi(n[o])&&gi(r)?n[o]=t(n[o],r):gi(r)?n[o]=t({},r):ci(r)?n[o]=r.slice():n[o]=r};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&Ei(arguments[t],r);return n},extend:(t,e,n,{allOwnKeys:r}={})=>(Ei(e,((e,r)=>{n&&pi(e)?t[r]=ni(e,n):t[r]=e}),{allOwnKeys:r}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,r)=>{let s,o,i;const a={};if(e=e||{},null==t)return e;do{for(s=Object.getOwnPropertyNames(t),o=s.length;o-- >0;)i=s[o],r&&!r(i,t,e)||a[i]||(e[i]=t[i],a[i]=!0);t=!1!==n&&si(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:oi,kindOfTest:ai,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return-1!==r&&r===n},toArray:t=>{if(!t)return null;if(ci(t))return t;let e=t.length;if(!mi(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=n.next())&&!r.done;){const n=r.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const r=[];for(;null!==(n=t.exec(e));)r.push(n);return r},isHTMLForm:Ri,hasOwnProperty:Li,hasOwnProp:Li,reduceDescriptors:Vi,freezeMethods:t=>{Vi(t,((e,n)=>{if(pi(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=t[n];pi(r)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},r=t=>{t.forEach((t=>{n[t]=!0}))};return ci(t)?r(t):r(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:Si,global:Ci,isContextDefined:Pi,ALPHABET:Mi,generateString:(t=16,e=Mi.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n},isSpecCompliantForm:function(t){return!!(t&&pi(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,r)=>{if(fi(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[r]=t;const s=ci(t)?[]:{};return Ei(t,((t,e)=>{const o=n(t,r+1);!ui(o)&&(s[e]=o)})),e[r]=void 0,s}}return t};return n(t,0)},isAsyncFn:ji,isThenable:t=>t&&(fi(t)||pi(t))&&pi(t.then)&&pi(t.catch)};function Bi(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}Ni.inherits(Bi,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ni.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Fi=Bi.prototype,Ii={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Ii[t]={value:t}})),Object.defineProperties(Bi,Ii),Object.defineProperty(Fi,"isAxiosError",{value:!0}),Bi.from=(t,e,n,r,s,o)=>{const i=Object.create(Fi);return Ni.toFlatObject(t,i,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),Bi.call(i,t.message,e,n,r,s),i.cause=t,i.name=t.name,o&&Object.assign(i,o),i};var Ui=Bi;function _i(t){return Ni.isPlainObject(t)||Ni.isArray(t)}function Hi(t){return Ni.endsWith(t,"[]")?t.slice(0,-2):t}function zi(t,e,n){return t?t.concat(e).map((function(t,e){return t=Hi(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const qi=Ni.toFlatObject(Ni,{},null,(function(t){return/^is[A-Z]/.test(t)}));var $i=function(t,e,n){if(!Ni.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const r=(n=Ni.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!Ni.isUndefined(e[t])}))).metaTokens,s=n.visitor||c,o=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Ni.isSpecCompliantForm(e);if(!Ni.isFunction(s))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(Ni.isDate(t))return t.toISOString();if(!a&&Ni.isBlob(t))throw new Ui("Blob is not supported. Use a Buffer instead.");return Ni.isArrayBuffer(t)||Ni.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function c(t,n,s){let a=t;if(t&&!s&&"object"==typeof t)if(Ni.endsWith(n,"{}"))n=r?n:n.slice(0,-2),t=JSON.stringify(t);else if(Ni.isArray(t)&&function(t){return Ni.isArray(t)&&!t.some(_i)}(t)||(Ni.isFileList(t)||Ni.endsWith(n,"[]"))&&(a=Ni.toArray(t)))return n=Hi(n),a.forEach((function(t,r){!Ni.isUndefined(t)&&null!==t&&e.append(!0===i?zi([n],r,o):null===i?n:n+"[]",l(t))})),!1;return!!_i(t)||(e.append(zi(s,n,o),l(t)),!1)}const u=[],h=Object.assign(qi,{defaultVisitor:c,convertValue:l,isVisitable:_i});if(!Ni.isObject(t))throw new TypeError("data must be an object");return function t(n,r){if(!Ni.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Ni.forEach(n,(function(n,o){!0===(!(Ni.isUndefined(n)||null===n)&&s.call(e,n,Ni.isString(o)?o.trim():o,r,h))&&t(n,r?r.concat(o):[o])})),u.pop()}}(t),e};function Wi(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Xi(t,e){this._pairs=[],t&&$i(t,this,e)}const Gi=Xi.prototype;Gi.append=function(t,e){this._pairs.push([t,e])},Gi.toString=function(t){const e=t?function(e){return t.call(this,e,Wi)}:Wi;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var Zi=Xi;function Ji(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Yi(t,e,n){if(!e)return t;const r=n&&n.encode||Ji,s=n&&n.serialize;let o;if(o=s?s(e,n):Ni.isURLSearchParams(e)?e.toString():new Zi(e,n).toString(r),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}var Ki=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ni.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Qi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ta={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Zi,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let t;return("undefined"==typeof navigator||"ReactNative"!==(t=navigator.product)&&"NativeScript"!==t&&"NS"!==t)&&"undefined"!=typeof window&&"undefined"!=typeof document})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]},ea=function(t){function e(t,n,r,s){let o=t[s++];const i=Number.isFinite(+o),a=s>=t.length;return o=!o&&Ni.isArray(r)?r.length:o,a?(Ni.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n,!i):(r[o]&&Ni.isObject(r[o])||(r[o]=[]),e(t,n,r[o],s)&&Ni.isArray(r[o])&&(r[o]=function(t){const e={},n=Object.keys(t);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],e[o]=t[o];return e}(r[o])),!i)}if(Ni.isFormData(t)&&Ni.isFunction(t.entries)){const n={};return Ni.forEachEntry(t,((t,r)=>{e(function(t){return Ni.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),r,n,0)})),n}return null};const na={transitional:Qi,adapter:["xhr","http"],transformRequest:[function(t,e){const n=e.getContentType()||"",r=n.indexOf("application/json")>-1,s=Ni.isObject(t);if(s&&Ni.isHTMLForm(t)&&(t=new FormData(t)),Ni.isFormData(t))return r&&r?JSON.stringify(ea(t)):t;if(Ni.isArrayBuffer(t)||Ni.isBuffer(t)||Ni.isStream(t)||Ni.isFile(t)||Ni.isBlob(t))return t;if(Ni.isArrayBufferView(t))return t.buffer;if(Ni.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return $i(t,new ta.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,r){return ta.isNode&&Ni.isBuffer(t)?(this.append(e,t.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=Ni.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return $i(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return s||r?(e.setContentType("application/json",!1),function(t,e,n){if(Ni.isString(t))try{return(0,JSON.parse)(t),Ni.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||na.transitional,n=e&&e.forcedJSONParsing,r="json"===this.responseType;if(t&&Ni.isString(t)&&(n&&!this.responseType||r)){const n=!(e&&e.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw Ui.from(t,Ui.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ta.classes.FormData,Blob:ta.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ni.forEach(["delete","get","head","post","put","patch"],(t=>{na.headers[t]={}}));var ra=na;const sa=Ni.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oa=Symbol("internals");function ia(t){return t&&String(t).trim().toLowerCase()}function aa(t){return!1===t||null==t?t:Ni.isArray(t)?t.map(aa):String(t)}function la(t,e,n,r,s){return Ni.isFunction(r)?r.call(this,e,n):(s&&(e=n),Ni.isString(e)?Ni.isString(r)?-1!==e.indexOf(r):Ni.isRegExp(r)?r.test(e):void 0:void 0)}class ca{constructor(t){t&&this.set(t)}set(t,e,n){const r=this;function s(t,e,n){const s=ia(e);if(!s)throw new Error("header name must be a non-empty string");const o=Ni.findKey(r,s);(!o||void 0===r[o]||!0===n||void 0===n&&!1!==r[o])&&(r[o||e]=aa(t))}const o=(t,e)=>Ni.forEach(t,((t,n)=>s(t,n,e)));return Ni.isPlainObject(t)||t instanceof this.constructor?o(t,e):Ni.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let n,r,s;return t&&t.split("\n").forEach((function(t){s=t.indexOf(":"),n=t.substring(0,s).trim().toLowerCase(),r=t.substring(s+1).trim(),!n||e[n]&&sa[n]||("set-cookie"===n?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)})),e})(t),e):null!=t&&s(e,t,n),this}get(t,e){if(t=ia(t)){const n=Ni.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}(t);if(Ni.isFunction(e))return e.call(this,t,n);if(Ni.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=ia(t)){const n=Ni.findKey(this,t);return!(!n||void 0===this[n]||e&&!la(0,this[n],n,e))}return!1}delete(t,e){const n=this;let r=!1;function s(t){if(t=ia(t)){const s=Ni.findKey(n,t);!s||e&&!la(0,n[s],s,e)||(delete n[s],r=!0)}}return Ni.isArray(t)?t.forEach(s):s(t),r}clear(t){const e=Object.keys(this);let n=e.length,r=!1;for(;n--;){const s=e[n];t&&!la(0,this[s],s,t,!0)||(delete this[s],r=!0)}return r}normalize(t){const e=this,n={};return Ni.forEach(this,((r,s)=>{const o=Ni.findKey(n,s);if(o)return e[o]=aa(r),void delete e[s];const i=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(s):String(s).trim();i!==s&&delete e[s],e[i]=aa(r),n[i]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return Ni.forEach(this,((n,r)=>{null!=n&&!1!==n&&(e[r]=t&&Ni.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[oa]=this[oa]={accessors:{}}).accessors,n=this.prototype;function r(t){const r=ia(t);e[r]||(function(t,e){const n=Ni.toCamelCase(" "+e);["get","set","has"].forEach((r=>{Object.defineProperty(t,r+n,{value:function(t,n,s){return this[r].call(this,e,t,n,s)},configurable:!0})}))}(n,t),e[r]=!0)}return Ni.isArray(t)?t.forEach(r):r(t),this}}ca.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Ni.reduceDescriptors(ca.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),Ni.freezeMethods(ca);var ua=ca;function ha(t,e){const n=this||ra,r=e||n,s=ua.from(r.headers);let o=r.data;return Ni.forEach(t,(function(t){o=t.call(n,o,s.normalize(),e?e.status:void 0)})),s.normalize(),o}function da(t){return!(!t||!t.__CANCEL__)}function pa(t,e,n){Ui.call(this,null==t?"canceled":t,Ui.ERR_CANCELED,e,n),this.name="CanceledError"}Ni.inherits(pa,Ui,{__CANCEL__:!0});var ma=pa,fa=ta.isStandardBrowserEnv?{write:function(t,e,n,r,s,o){const i=[];i.push(t+"="+encodeURIComponent(e)),Ni.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),Ni.isString(r)&&i.push("path="+r),Ni.isString(s)&&i.push("domain="+s),!0===o&&i.push("secure"),document.cookie=i.join("; ")},read:function(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ga(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var ya=ta.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let n;function r(n){let r=n;return t&&(e.setAttribute("href",r),r=e.href),e.setAttribute("href",r),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return n=r(window.location.href),function(t){const e=Ni.isString(t)?r(t):t;return e.protocol===n.protocol&&e.host===n.host}}():function(){return!0};function va(t,e){let n=0;const r=function(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s,o=0,i=0;return e=void 0!==e?e:1e3,function(a){const l=Date.now(),c=r[i];s||(s=l),n[o]=a,r[o]=l;let u=i,h=0;for(;u!==o;)h+=n[u++],u%=t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),l-s<e)return;const d=c&&l-c;return d?Math.round(1e3*h/d):void 0}}(50,250);return s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,a=o-n,l=r(a);n=o;const c={loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&o<=i?(i-o)/l:void 0,event:s};c[e?"download":"upload"]=!0,t(c)}}const xa={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){let r=t.data;const s=ua.from(t.headers).normalize(),o=t.responseType;let i,a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(i),t.signal&&t.signal.removeEventListener("abort",i)}Ni.isFormData(r)&&(ta.isStandardBrowserEnv||ta.isStandardBrowserWebWorkerEnv?s.setContentType(!1):s.getContentType(/^\s*multipart\/form-data/)?Ni.isString(a=s.getContentType())&&s.setContentType(a.replace(/^\s*(multipart\/form-data);+/,"$1")):s.setContentType("multipart/form-data"));let c=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",n=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.set("Authorization","Basic "+btoa(e+":"+n))}const u=ga(t.baseURL,t.url);function h(){if(!c)return;const r=ua.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders());!function(t,e,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(new Ui("Request failed with status code "+n.status,[Ui.ERR_BAD_REQUEST,Ui.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}((function(t){e(t),l()}),(function(t){n(t),l()}),{data:o&&"text"!==o&&"json"!==o?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:r,config:t,request:c}),c=null}if(c.open(t.method.toUpperCase(),Yi(u,t.params,t.paramsSerializer),!0),c.timeout=t.timeout,"onloadend"in c?c.onloadend=h:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(h)},c.onabort=function(){c&&(n(new Ui("Request aborted",Ui.ECONNABORTED,t,c)),c=null)},c.onerror=function(){n(new Ui("Network Error",Ui.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const r=t.transitional||Qi;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),n(new Ui(e,r.clarifyTimeoutError?Ui.ETIMEDOUT:Ui.ECONNABORTED,t,c)),c=null},ta.isStandardBrowserEnv){const e=(t.withCredentials||ya(u))&&t.xsrfCookieName&&fa.read(t.xsrfCookieName);e&&s.set(t.xsrfHeaderName,e)}void 0===r&&s.setContentType(null),"setRequestHeader"in c&&Ni.forEach(s.toJSON(),(function(t,e){c.setRequestHeader(e,t)})),Ni.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),o&&"json"!==o&&(c.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&c.addEventListener("progress",va(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",va(t.onUploadProgress)),(t.cancelToken||t.signal)&&(i=e=>{c&&(n(!e||e.type?new ma(null,t,c):e),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(i),t.signal&&(t.signal.aborted?i():t.signal.addEventListener("abort",i)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(u);d&&-1===ta.protocols.indexOf(d)?n(new Ui("Unsupported protocol "+d+":",Ui.ERR_BAD_REQUEST,t)):c.send(r||null)}))}};Ni.forEach(xa,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ba=t=>`- ${t}`,wa=t=>Ni.isFunction(t)||null===t||!1===t;var Ea=t=>{t=Ni.isArray(t)?t:[t];const{length:e}=t;let n,r;const s={};for(let o=0;o<e;o++){let e;if(n=t[o],r=n,!wa(n)&&(r=xa[(e=String(n)).toLowerCase()],void 0===r))throw new Ui(`Unknown adapter '${e}'`);if(r)break;s[e||"#"+o]=r}if(!r){const t=Object.entries(s).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(ba).join("\n"):" "+ba(t[0]):"as no adapter specified";throw new Ui("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return r};function Sa(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ma(null,t)}function Ca(t){return Sa(t),t.headers=ua.from(t.headers),t.data=ha.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ea(t.adapter||ra.adapter)(t).then((function(e){return Sa(t),e.data=ha.call(t,t.transformResponse,e),e.headers=ua.from(e.headers),e}),(function(e){return da(e)||(Sa(t),e&&e.response&&(e.response.data=ha.call(t,t.transformResponse,e.response),e.response.headers=ua.from(e.response.headers))),Promise.reject(e)}))}const Pa=t=>t instanceof ua?t.toJSON():t;function Ta(t,e){e=e||{};const n={};function r(t,e,n){return Ni.isPlainObject(t)&&Ni.isPlainObject(e)?Ni.merge.call({caseless:n},t,e):Ni.isPlainObject(e)?Ni.merge({},e):Ni.isArray(e)?e.slice():e}function s(t,e,n){return Ni.isUndefined(e)?Ni.isUndefined(t)?void 0:r(void 0,t,n):r(t,e,n)}function o(t,e){if(!Ni.isUndefined(e))return r(void 0,e)}function i(t,e){return Ni.isUndefined(e)?Ni.isUndefined(t)?void 0:r(void 0,t):r(void 0,e)}function a(n,s,o){return o in e?r(n,s):o in t?r(void 0,n):void 0}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(t,e)=>s(Pa(t),Pa(e),!0)};return Ni.forEach(Object.keys(Object.assign({},t,e)),(function(r){const o=l[r]||s,i=o(t[r],e[r],r);Ni.isUndefined(i)&&o!==a||(n[r]=i)})),n}const Aa={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Aa[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const Ra={};Aa.transitional=function(t,e,n){function r(t,e){return"[Axios v1.5.1] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,s,o)=>{if(!1===t)throw new Ui(r(s," has been removed"+(e?" in "+e:"")),Ui.ERR_DEPRECATED);return e&&!Ra[s]&&(Ra[s]=!0,console.warn(r(s," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,s,o)}};var La={assertOptions:function(t,e,n){if("object"!=typeof t)throw new Ui("options must be an object",Ui.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],i=e[o];if(i){const e=t[o],n=void 0===e||i(e,o,t);if(!0!==n)throw new Ui("option "+o+" must be "+n,Ui.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Ui("Unknown option "+o,Ui.ERR_BAD_OPTION)}},validators:Aa};const Oa=La.validators;class Va{constructor(t){this.defaults=t,this.interceptors={request:new Ki,response:new Ki}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Ta(this.defaults,e);const{transitional:n,paramsSerializer:r,headers:s}=e;void 0!==n&&La.assertOptions(n,{silentJSONParsing:Oa.transitional(Oa.boolean),forcedJSONParsing:Oa.transitional(Oa.boolean),clarifyTimeoutError:Oa.transitional(Oa.boolean)},!1),null!=r&&(Ni.isFunction(r)?e.paramsSerializer={serialize:r}:La.assertOptions(r,{encode:Oa.function,serialize:Oa.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=s&&Ni.merge(s.common,s[e.method]);s&&Ni.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete s[t]})),e.headers=ua.concat(o,s);const i=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,i.unshift(t.fulfilled,t.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let u,h=0;if(!a){const t=[Ca.bind(this),void 0];for(t.unshift.apply(t,i),t.push.apply(t,l),u=t.length,c=Promise.resolve(e);h<u;)c=c.then(t[h++],t[h++]);return c}u=i.length;let d=e;for(h=0;h<u;){const t=i[h++],e=i[h++];try{d=t(d)}catch(t){e.call(this,t);break}}try{c=Ca.call(this,d)}catch(t){return Promise.reject(t)}for(h=0,u=l.length;h<u;)c=c.then(l[h++],l[h++]);return c}getUri(t){return Yi(ga((t=Ta(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}Ni.forEach(["delete","get","head","options"],(function(t){Va.prototype[t]=function(e,n){return this.request(Ta(n||{},{method:t,url:e,data:(n||{}).data}))}})),Ni.forEach(["post","put","patch"],(function(t){function e(e){return function(n,r,s){return this.request(Ta(s||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Va.prototype[t]=e(),Va.prototype[t+"Form"]=e(!0)}));var Da=Va;class ka{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const r=new Promise((t=>{n.subscribe(t),e=t})).then(t);return r.cancel=function(){n.unsubscribe(e)},r},t((function(t,r,s){n.reason||(n.reason=new ma(t,r,s),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;return{token:new ka((function(e){t=e})),cancel:t}}}var Ma=ka;const ja={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ja).forEach((([t,e])=>{ja[e]=t}));var Na=ja;const Ba=function t(e){const n=new Da(e),r=ni(Da.prototype.request,n);return Ni.extend(r,Da.prototype,n,{allOwnKeys:!0}),Ni.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return t(Ta(e,n))},r}(ra);Ba.Axios=Da,Ba.CanceledError=ma,Ba.CancelToken=Ma,Ba.isCancel=da,Ba.VERSION="1.5.1",Ba.toFormData=$i,Ba.AxiosError=Ui,Ba.Cancel=Ba.CanceledError,Ba.all=function(t){return Promise.all(t)},Ba.spread=function(t){return function(e){return t.apply(null,e)}},Ba.isAxiosError=function(t){return Ni.isObject(t)&&!0===t.isAxiosError},Ba.mergeConfig=Ta,Ba.AxiosHeaders=ua,Ba.formToJSON=t=>ea(Ni.isHTMLForm(t)?new FormData(t):t),Ba.getAdapter=Ea,Ba.HttpStatusCode=Na,Ba.default=Ba;var Fa=Ba;const Ia=window.extChatData.root,Ua={"Content-Type":"application/json","X-WP-Nonce":window.extChatData.nonce,"X-Requested-With":"XMLHttpRequest","X-Extendify-Chat":!0,"X-Extendify":!0},_a=Fa.create({baseURL:Ia,headers:Ua});_a.interceptors.response.use((t=>Object.prototype.hasOwnProperty.call(t,"data")?t.data:t));const Ha=["nonce","api"],za={...Object.fromEntries(Object.entries(window.extChatData).filter((([t])=>!Ha.includes(t))))},qa=t=>_a.post("chat/options",{options:t}),$a=({showChat:n,setShowChat:r})=>{const[s,o]=(0,t.useState)(!1);return(0,t.createElement)("div",{className:"flex items-center my-6"},(0,t.createElement)(e.ToggleControl,{label:(0,ti.__)("Enable the AI Chatbot","extendify-local"),checked:n,onChange:()=>{o(!0),qa({showChat:!n}).then((()=>{r(!n),o(!1)}))},className:"m-0 focus:ring-2 focus:ring-design-main focus:border-design-main"}),s&&(0,t.createElement)(e.Spinner,{className:"mt-0 text-design-main"}))};var Wa=(0,t.forwardRef)((function({icon:e,size:n=24,...r},s){return(0,t.cloneElement)(e,{width:n,height:n,...r,ref:s})})),Xa=(0,t.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M24 8.38285L12 19.2951L1.81039e-06 8.38285L2.01651 6.16406L12 15.2426L21.9835 6.16406L24 8.38285Z"})),Ga=(0,t.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("g",{clipPath:"url(#clip0_2114_35675)"},(0,t.createElement)("path",{d:"M11.2266 6.0469V4.93948C11.0919 4.889 10.9613 4.82828 10.8359 4.75784C10.345 4.46641 9.97524 4.00815 9.79416 3.46671C9.61308 2.92526 9.63277 2.33675 9.84962 1.80862C9.97012 1.5206 10.1452 1.25862 10.3652 1.03713C10.5846 0.817735 10.8447 0.643251 11.1309 0.523459C11.4193 0.403518 11.7287 0.342425 12.041 0.343772C12.5103 0.343706 12.9689 0.48286 13.359 0.74362C13.7491 1.00438 14.0531 1.37502 14.2324 1.80862C14.4719 2.38837 14.4719 3.03941 14.2324 3.61917C14.1131 3.90723 13.9378 4.16878 13.7168 4.3887L13.7051 4.40042C13.566 4.53722 13.4113 4.65718 13.2442 4.75784C13.1202 4.83102 12.9894 4.89186 12.8535 4.93948V6.0469H18.416C19.2143 6.04948 19.9792 6.36788 20.5435 6.93255C21.1078 7.49722 21.4257 8.26227 21.4278 9.06058V9.50784H22.459C22.8681 9.50939 23.2599 9.67272 23.549 9.96217C23.8381 10.2516 24.0009 10.6437 24.002 11.0528V14.6407C24.0009 15.0497 23.8381 15.4418 23.549 15.7313C23.2599 16.0207 22.8681 16.184 22.459 16.1856H21.4336V16.5899C21.431 17.389 21.1122 18.1547 20.5467 18.7194C19.9812 19.2841 19.2152 19.602 18.416 19.6036H10.7852L6.21094 23.5313C6.16052 23.5746 6.10202 23.6075 6.03882 23.6281C5.97562 23.6487 5.90897 23.6566 5.84271 23.6514C5.77644 23.6461 5.71188 23.6278 5.65273 23.5974C5.59357 23.5671 5.54101 23.5254 5.49805 23.4747C5.41215 23.3745 5.36809 23.2451 5.37501 23.1133L5.61915 19.5977H5.57813C4.78086 19.5956 4.01681 19.2781 3.45287 18.7146C2.88893 18.151 2.57094 17.3871 2.56836 16.5899V16.1856H1.54297C1.13355 16.1846 0.74119 16.0215 0.451684 15.7319C0.162178 15.4424 -0.00092183 15.0501 -0.00195312 14.6407L-0.00195312 11.0528C-0.000924304 10.6437 0.161907 10.2516 0.450991 9.96217C0.740076 9.67272 1.13193 9.50939 1.54102 9.50784H2.56836V9.05862C2.56991 8.26068 2.88744 7.49583 3.45149 6.93141C4.01554 6.367 4.78019 6.04897 5.57813 6.0469H11.2266ZM16.1582 9.58597C16.5198 9.58597 16.8732 9.69319 17.1739 9.89406C17.4745 10.0949 17.7088 10.3805 17.8472 10.7145C17.9856 11.0485 18.0218 11.4161 17.9512 11.7707C17.8807 12.1254 17.7066 12.4511 17.4509 12.7068C17.1952 12.9624 16.8695 13.1366 16.5149 13.2071C16.1602 13.2776 15.7927 13.2414 15.4586 13.1031C15.1246 12.9647 14.8391 12.7304 14.6382 12.4297C14.4373 12.1291 14.3301 11.7757 14.3301 11.4141C14.3301 10.9292 14.5227 10.4643 14.8655 10.1214C15.2084 9.77857 15.6734 9.58597 16.1582 9.58597ZM7.8418 9.58597C8.20337 9.58597 8.55682 9.69319 8.85746 9.89406C9.15809 10.0949 9.39241 10.3805 9.53077 10.7145C9.66914 11.0485 9.70534 11.4161 9.6348 11.7707C9.56427 12.1254 9.39015 12.4511 9.13448 12.7068C8.87882 12.9624 8.55308 13.1366 8.19845 13.2071C7.84383 13.2776 7.47626 13.2414 7.14221 13.1031C6.80816 12.9647 6.52265 12.7304 6.32177 12.4297C6.1209 12.1291 6.01368 11.7757 6.01368 11.4141C6.01368 10.9292 6.20628 10.4643 6.54912 10.1214C6.89196 9.77857 7.35695 9.58597 7.8418 9.58597ZM9.0879 15.711C9.06032 15.6892 9.03541 15.6643 9.01368 15.6368C8.95038 15.5625 8.91453 15.4687 8.91212 15.3711C8.91035 15.2731 8.94204 15.1773 9.00196 15.0996C9.02434 15.0714 9.0499 15.0459 9.07813 15.0235C9.18557 14.9388 9.31767 14.8915 9.45442 14.8887C9.59117 14.8859 9.72511 14.9277 9.83595 15.0078C10.1697 15.2712 10.5402 15.4844 10.9356 15.6407C11.2762 15.7724 11.6387 15.8387 12.0039 15.836C12.3737 15.8281 12.7393 15.7554 13.084 15.6211C13.4841 15.4612 13.8616 15.2498 14.207 14.9922C14.3204 14.9149 14.4558 14.8766 14.5928 14.8829C14.7298 14.8893 14.8611 14.94 14.9668 15.0274C14.9933 15.0518 15.0175 15.0786 15.0391 15.1075C15.0965 15.1867 15.1254 15.2831 15.1211 15.3809C15.1128 15.4787 15.073 15.5712 15.0078 15.6446C14.9831 15.6727 14.9548 15.6977 14.9238 15.7188C14.4846 16.0434 14.0029 16.3063 13.4922 16.5C13.0218 16.6774 12.5242 16.7719 12.0215 16.7793C11.5182 16.7864 11.0179 16.7016 10.5449 16.5293C10.0237 16.3343 9.53556 16.0603 9.09766 15.7168L9.0879 15.711ZM18.4141 7.06253H5.57813C5.04903 7.06459 4.54222 7.27582 4.16826 7.65014C3.79431 8.02445 3.58358 8.53147 3.58203 9.06058V16.5899C3.58358 17.119 3.79431 17.626 4.16826 18.0003C4.54222 18.3746 5.04903 18.5859 5.57813 18.5879H6.19727C6.33117 18.5979 6.45571 18.6604 6.54384 18.7617C6.63197 18.863 6.67658 18.995 6.66797 19.1289L6.47266 21.9766L10.2422 18.7325C10.2891 18.6856 10.3448 18.6485 10.4062 18.6233C10.4676 18.5982 10.5333 18.5855 10.5996 18.586H18.4121C18.9412 18.5839 19.448 18.3727 19.822 17.9984C20.1959 17.6241 20.4067 17.117 20.4082 16.5879V9.05862C20.4072 8.52988 20.1968 8.02306 19.8231 7.649C19.4494 7.27494 18.9428 7.06408 18.4141 7.06253Z"})),(0,t.createElement)("defs",null,(0,t.createElement)("clipPath",{id:"clip0_2114_35675"},(0,t.createElement)("rect",{width:"24",height:"23.3106",transform:"translate(0 0.34375)"})))),Za=(0,t.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M3.51 6.03L11.02 9.25L3.5 8.25L3.51 6.03ZM11.01 14.75L3.5 17.97V15.75L11.01 14.75ZM1.51 3L1.5 10L16.5 12L1.5 14L1.51 21L22.5 12L1.51 3Z"})),Ja=(0,t.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M14.1818 5H7.63636C7.03273 5 6.51636 5.36364 6.29818 5.88727L4.10182 11.0145C4.03636 11.1818 4 11.3564 4 11.5455V13C4 13.8 4.65455 14.4545 5.45455 14.4545H10.0436L9.35273 17.7782L9.33091 18.0109C9.33091 18.3091 9.45455 18.5855 9.65091 18.7818L10.4218 19.5455L15.2145 14.7527C15.4764 14.4909 15.6364 14.1273 15.6364 13.7273V6.45455C15.6364 5.65455 14.9818 5 14.1818 5ZM14.1818 13.7273L11.0255 16.8836L12 13H5.45455V11.5455L7.63636 6.45455H14.1818V13.7273ZM17.0909 5H20V13.7273H17.0909V5Z"})),Ya=(0,t.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M9.81818 19.5455H16.3636C16.9673 19.5455 17.4836 19.1818 17.7018 18.6582L19.8982 13.5309C19.9636 13.3636 20 13.1891 20 13V11.5455C20 10.7455 19.3455 10.0909 18.5455 10.0909H13.9564L14.6473 6.76727L14.6691 6.53455C14.6691 6.23636 14.5455 5.96 14.3491 5.76364L13.5782 5L8.78545 9.79273C8.52364 10.0545 8.36364 10.4182 8.36364 10.8182V18.0909C8.36364 18.8909 9.01818 19.5455 9.81818 19.5455ZM9.81818 10.8182L12.9745 7.66182L12 11.5455H18.5455V13L16.3636 18.0909H9.81818V10.8182ZM4 10.8182H6.90909V19.5455H4V10.8182Z"})),Ka=(0,t.createElement)("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M15.5 4V11H5.67L4.5 12.17V4H15.5ZM16.5 2H3.5C2.95 2 2.5 2.45 2.5 3V17L6.5 13H16.5C17.05 13 17.5 12.55 17.5 12V3C17.5 2.45 17.05 2 16.5 2ZM21.5 6H19.5V15H6.5V17C6.5 17.55 6.95 18 7.5 18H18.5L22.5 22V7C22.5 6.45 22.05 6 21.5 6Z"})),Qa=(0,t.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,t.createElement)("path",{d:"M9.70492 6L8.29492 7.41L12.8749 12L8.29492 16.59L9.70492 18L15.7049 12L9.70492 6Z"}));const tl=({showDialog:e,onClick:n})=>(0,t.createElement)("div",{className:"fixed bottom-6 right-6 rounded-full overflow-hidden"},(0,t.createElement)("button",{type:"button",className:"extendify-chat-button outline-none border-none bg-design-main flex items-center p-3 cursor-pointer","aria-label":(0,ti.__)("AI Chat","extendify-local"),onClick:n},(0,t.createElement)(Wa,{icon:e?Xa:Ga,className:"text-design-text fill-current w-6 h-6"})));var el=window.wp.blocks,nl=n(184),rl=n.n(nl);const sl=({text:e,reset:n})=>(0,t.createElement)("div",{className:"p-5 rounded-lg bg-red-100 border border-solid border-red-500"},(0,t.createElement)("p",{className:"m-0 mb-4 text-gray-800 text-sm"},e),n&&(0,t.createElement)("p",{className:"m-0"},(0,t.createElement)("button",{type:"button",className:"bg-transparent border-none p-0 underline cursor-pointer",onClick:n},(0,ti.__)("Please try again.","extendify-local")))),ol=({answerId:e})=>{const[n,r]=(0,t.useState)(void 0);return(0,t.useEffect)((()=>{e&&void 0!==n&&(({answerId:t,rating:e})=>{fetch(`${ei}/api/chat/rate-answer`,{method:"POST",headers:Ua,body:JSON.stringify({answerId:t,rating:e})})})({answerId:e,rating:n})}),[n,e]),(0,t.createElement)("div",{className:"mt-1 flex items-center gap-0.5 justify-end text-right"},(0,t.createElement)("button",{type:"button","aria-pressed":1===n,"aria-live":"polite",onClick:()=>r((t=>1===t?0:1)),"aria-label":1===n?(0,ti.__)("Remove rating","extendify-local"):(0,ti.__)("Rate that this answer was helpful","extendify-local"),className:rl()("cursor-pointer bg-transparent w-5 h-5 border-0 p-0 m-0 hover:text-design-main",{"text-design-main":1===n,"text-gray-500":1!==n})},(0,t.createElement)(Wa,{className:"fill-current",icon:Ya})),(0,t.createElement)("button",{type:"button","aria-pressed":-1===n,"aria-live":"polite",onClick:()=>r((t=>-1===t?0:-1)),"aria-label":-1===n?(0,ti.__)("Remove rating","extendify-local"):(0,ti.__)("Rate that this answer was not helpful","extendify-local"),className:rl()("cursor-pointer bg-transparent w-5 h-5 border-0 p-0 m-0 hover:text-design-main",{"text-design-main":-1===n,"text-gray-500":-1!==n})},(0,t.createElement)(Wa,{className:"fill-current",icon:Ja})))},il=t=>{let e;const n=new Set,r=(t,r)=>{const s="function"==typeof t?t(e):t;if(!Object.is(s,e)){const t=e;e=(null!=r?r:"object"!=typeof s)?s:Object.assign({},e,s),n.forEach((n=>n(e,t)))}},s=()=>e,o={setState:r,getState:s,subscribe:t=>(n.add(t),()=>n.delete(t)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return e=t(r,s,o),o};var al=n(798);const{useSyncExternalStoreWithSelector:ll}=al;let cl=!1;const ul=t=>{"function"!=typeof t&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e="function"==typeof t?(t=>t?il(t):il)(t):t,n=(t,n)=>function(t,e=t.getState,n){n&&!cl&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),cl=!0);const r=ll(t.subscribe,t.getState,t.getServerState||t.getState,e,n);return(0,s.useDebugValue)(r),r}(e,t,n);return Object.assign(n,e),n},hl=new Map,dl=t=>{const e=hl.get(t);return e?Object.fromEntries(Object.entries(e.stores).map((([t,e])=>[t,e.getState()]))):{}},pl=(t,e)=>{let n;try{n=JSON.parse(t)}catch(t){console.error("[zustand devtools middleware] Could not parse the received json",t)}void 0!==n&&e(n)};function ml(t,e){let n;try{n=t()}catch(t){return}return{getItem:t=>{var r;const s=t=>null===t?null:JSON.parse(t,null==e?void 0:e.reviver),o=null!=(r=n.getItem(t))?r:null;return o instanceof Promise?o.then(s):s(o)},setItem:(t,r)=>n.setItem(t,JSON.stringify(r,null==e?void 0:e.replacer)),removeItem:t=>n.removeItem(t)}}const fl=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(t){return fl(t)(n)},catch(t){return this}}}catch(t){return{then(t){return this},catch(e){return fl(e)(t)}}}},gl=(xl=((t,e={})=>(n,r,s)=>{const{enabled:o,anonymousActionType:i,store:a,...l}=e;let c;try{c=(null==o||o)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch(t){}if(!c)return o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,s);const{connection:u,...h}=((t,e,n)=>{if(void 0===t)return{type:"untracked",connection:e.connect(n)};const r=hl.get(n.name);if(r)return{type:"tracked",store:t,...r};const s={connection:e.connect(n),stores:{}};return hl.set(n.name,s),{type:"tracked",store:t,...s}})(a,c,l);let d=!0;s.setState=(t,e,o)=>{const c=n(t,e);if(!d)return c;const h=void 0===o?{type:i||"anonymous"}:"string"==typeof o?{type:o}:o;return void 0===a?(null==u||u.send(h,r()),c):(null==u||u.send({...h,type:`${a}/${h.type}`},{...dl(l.name),[a]:s.getState()}),c)};const p=(...t)=>{const e=d;d=!1,n(...t),d=e},m=t(s.setState,r,s);if("untracked"===h.type?null==u||u.init(m):(h.stores[h.store]=s,null==u||u.init(Object.fromEntries(Object.entries(h.stores).map((([t,e])=>[t,t===h.store?m:e.getState()]))))),s.dispatchFromDevtools&&"function"==typeof s.dispatch){let t=!1;const e=s.dispatch;s.dispatch=(...n)=>{"__setState"!==n[0].type||t||(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),t=!0),e(...n)}}return u.subscribe((t=>{var e;switch(t.type){case"ACTION":return"string"!=typeof t.payload?void console.error("[zustand devtools middleware] Unsupported action format"):pl(t.payload,(t=>{if("__setState"!==t.type)s.dispatchFromDevtools&&"function"==typeof s.dispatch&&s.dispatch(t);else{if(void 0===a)return void p(t.state);1!==Object.keys(t.state).length&&console.error('\n [zustand devtools middleware] Unsupported __setState action format. \n When using \'store\' option in devtools(), the \'state\' should have only one key, which is a value of \'store\' that was passed in devtools(),\n and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }\n ');const e=t.state[a];if(null==e)return;JSON.stringify(s.getState())!==JSON.stringify(e)&&p(e)}}));case"DISPATCH":switch(t.payload.type){case"RESET":return p(m),void 0===a?null==u?void 0:u.init(s.getState()):null==u?void 0:u.init(dl(l.name));case"COMMIT":return void 0===a?void(null==u||u.init(s.getState())):null==u?void 0:u.init(dl(l.name));case"ROLLBACK":return pl(t.state,(t=>{if(void 0===a)return p(t),void(null==u||u.init(s.getState()));p(t[a]),null==u||u.init(dl(l.name))}));case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return pl(t.state,(t=>{void 0!==a?JSON.stringify(s.getState())!==JSON.stringify(t[a])&&p(t[a]):p(t)}));case"IMPORT_STATE":{const{nextLiftedState:n}=t.payload,r=null==(e=n.computedStates.slice(-1)[0])?void 0:e.state;if(!r)return;return p(void 0===a?r:r[a]),void(null==u||u.send(null,n))}case"PAUSE_RECORDING":return d=!d}return}})),m})(((t,e)=>({history:[],addHistory(e){t((t=>({history:[e,...t.history.filter((({questionId:t})=>t===e.questionId))]})))},hasHistory(){return e().history.length>0}})),{name:"Extendify Chat History"}),bl={name:"extendify-chat-history",storage:ml((()=>sessionStorage))},vl="getStorage"in bl||"serialize"in bl||"deserialize"in bl?(console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),((t,e)=>(n,r,s)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:t=>t,version:0,merge:(t,e)=>({...e,...t}),...e},i=!1;const a=new Set,l=new Set;let c;try{c=o.getStorage()}catch(t){}if(!c)return t(((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...t)}),r,s);const u=fl(o.serialize),h=()=>{const t=o.partialize({...r()});let e;const n=u({state:t,version:o.version}).then((t=>c.setItem(o.name,t))).catch((t=>{e=t}));if(e)throw e;return n},d=s.setState;s.setState=(t,e)=>{d(t,e),h()};const p=t(((...t)=>{n(...t),h()}),r,s);let m;const f=()=>{var t;if(!c)return;i=!1,a.forEach((t=>t(r())));const e=(null==(t=o.onRehydrateStorage)?void 0:t.call(o,r()))||void 0;return fl(c.getItem.bind(c))(o.name).then((t=>{if(t)return o.deserialize(t)})).then((t=>{if(t){if("number"!=typeof t.version||t.version===o.version)return t.state;if(o.migrate)return o.migrate(t.state,t.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((t=>{var e;return m=o.merge(t,null!=(e=r())?e:p),n(m,!0),h()})).then((()=>{null==e||e(m,void 0),i=!0,l.forEach((t=>t(m)))})).catch((t=>{null==e||e(void 0,t)}))};return s.persist={setOptions:t=>{o={...o,...t},t.getStorage&&(c=t.getStorage())},clearStorage:()=>{null==c||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>f(),hasHydrated:()=>i,onHydrate:t=>(a.add(t),()=>{a.delete(t)}),onFinishHydration:t=>(l.add(t),()=>{l.delete(t)})},f(),m||p})(xl,bl)):((t,e)=>(n,r,s)=>{let o={storage:ml((()=>localStorage)),partialize:t=>t,version:0,merge:(t,e)=>({...e,...t}),...e},i=!1;const a=new Set,l=new Set;let c=o.storage;if(!c)return t(((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...t)}),r,s);const u=()=>{const t=o.partialize({...r()});return c.setItem(o.name,{state:t,version:o.version})},h=s.setState;s.setState=(t,e)=>{h(t,e),u()};const d=t(((...t)=>{n(...t),u()}),r,s);let p;const m=()=>{var t,e;if(!c)return;i=!1,a.forEach((t=>{var e;return t(null!=(e=r())?e:d)}));const s=(null==(e=o.onRehydrateStorage)?void 0:e.call(o,null!=(t=r())?t:d))||void 0;return fl(c.getItem.bind(c))(o.name).then((t=>{if(t){if("number"!=typeof t.version||t.version===o.version)return t.state;if(o.migrate)return o.migrate(t.state,t.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}})).then((t=>{var e;return p=o.merge(t,null!=(e=r())?e:d),n(p,!0),u()})).then((()=>{null==s||s(p,void 0),p=r(),i=!0,l.forEach((t=>t(p)))})).catch((t=>{null==s||s(void 0,t)}))};return s.persist={setOptions:t=>{o={...o,...t},t.storage&&(c=t.storage)},clearStorage:()=>{null==c||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>i,onHydrate:t=>(a.add(t),()=>{a.delete(t)}),onFinishHydration:t=>(l.add(t),()=>{l.delete(t)})},o.skipHydration||m(),p||d})(xl,bl),vl?ul(vl):ul),yl=({question:e,answer:n,reset:r,error:s,answerId:o})=>{const i=(0,t.useRef)(null),{addHistory:a}=gl(),l=(0,el.pasteHandler)({plainText:n.replace(/[\r\n]+/g,"<br />")}),c=Array.isArray(l)?(0,el.serialize)(l):l;return(0,t.useEffect)((()=>{o&&a({answerId:o,htmlAnswer:c,question:e,time:Date.now()})}),[o,c,a,e]),s?(0,t.createElement)("div",{className:"p-6 pb-10 h-80 overflow-y-auto",ref:i},(0,t.createElement)("div",{className:"flex justify-end mb-8 ml-4 relative"},(0,t.createElement)(sl,{text:(0,ti.__)("Oops! We were unable to send your question.","extendify-local"),reset:r}))):(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",{className:"p-6 pb-10 h-80 overflow-y-auto",ref:i},(0,t.createElement)("div",{className:"flex justify-end mb-8 ml-4 relative"},(0,t.createElement)("div",{className:"m-0 p-5 rounded-lg bg-gray-800 text-design-text text-sm"},e)),(0,t.createElement)("div",{className:"relative"},(0,t.createElement)("div",{className:"absolute z-10 -mt-4 -ml-2 rounded-full bg-design-main p-2 flex items-center"},(0,t.createElement)(Wa,{icon:Ga,className:"text-design-text fill-current w-4 h-4"})),(0,t.createElement)("div",{className:rl()("m-0 p-5 rounded-lg bg-gray-100 inline-block text-gray-800 text-sm",{"animate-pulse bg-gray-300":"..."===n,"bg-gray-100":"..."!==n}),dangerouslySetInnerHTML:{__html:c}}),o&&(0,t.createElement)(ol,{answerId:o}))),(0,t.createElement)("div",{className:"ask-another-question p-6 relative flex justify-center"},(0,t.createElement)("button",{type:"button",onClick:r,className:"bg-design-main text-design-text border-none py-2 px-4 rounded-sm cursor-pointer text-sm flex items-center gap-2"},(0,ti.__)("Ask Another Question","extendify-local"),(0,t.createElement)(Wa,{icon:Za,className:"text-design-text fill-current h-6"}))))};var vl,xl,bl,wl=window.wp.primitives,El=(0,t.createElement)(wl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(wl.Path,{d:"M13 19h-2v-2h2v2zm0-6h-2v-2h2v2zm0-6h-2V5h2v2z"})),Sl=(0,t.createElement)(wl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(wl.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"}));const Cl=({question:n,reset:r,experienceLevel:s,setExperienceLevel:o,showHistory:i,setShowChat:a})=>{const l={beginner:(0,ti.__)("Beginner","extendify-local"),intermediate:(0,ti.__)("Intermediate","extendify-local"),advanced:(0,ti.__)("Advanced","extendify-local")},c=()=>{a(!1),qa({showChat:!1})};return(0,t.createElement)("header",{className:"flex items-center gap-2 justify-between"},(0,t.createElement)("div",{className:"flex items-center gap-2"},(n||i)&&(0,t.createElement)("button",{type:"button",onClick:r,className:"bg-transparent border-none p-0 cursor-pointer"},(0,t.createElement)(e.Icon,{icon:Xa,className:"text-design-text fill-current h-4 rotate-90"})),i&&(0,t.createElement)("div",{className:"text-white p-2 flex items-center"},(0,ti.__)("Recent History","extendify-local"))),i||(0,t.createElement)("div",{className:"flex gap-2 items-center"},(0,t.createElement)("div",{className:"rounded-full bg-white p-2 flex items-center"},(0,t.createElement)(e.Icon,{icon:Ga,className:"text-design-main fill-current w-4 h-4"})),(0,t.createElement)(e.Dropdown,{className:"flex",contentClassName:"origin-top-right rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none",position:"bottom right",popoverProps:{placement:"bottom-start"},renderToggle:({onToggle:n})=>(0,t.createElement)(e.Icon,{icon:El,onClick:n,className:"text-design-text fill-current w-6 h-6 p-1 rounded cursor-pointer hover:bg-white/10"}),renderContent:()=>(0,t.createElement)(e.MenuGroup,{label:(0,ti.__)("WordPress Comfort Level","extendify-local")},Object.entries(l).map((([n,r])=>(0,t.createElement)(e.MenuItem,{key:n,isSelected:s===n,onClick:()=>{return o(t=n),void qa({experienceLevel:t});var t},icon:s===n?Sl:null},r))),(0,t.createElement)("hr",null),(0,t.createElement)(e.MenuItem,{onClick:c},(0,ti.__)("Hide the chat bot","extendify-local")))})))},Pl=({reset:e})=>{const{history:n}=gl(),[r,s]=(0,t.useState)(null);return(0,t.createElement)(t.Fragment,null,r?(0,t.createElement)(yl,{question:r.question,answer:r.htmlAnswer,reset:e}):(0,t.createElement)("div",{className:"py-6 h-96 overflow-scroll"},(0,t.createElement)("div",{className:"relative"},[...n].sort(((t,e)=>t.time-e.time)).map((e=>(0,t.createElement)("button",{className:"bg-white border-0 border-b border-gray-100 border-solid cursor-pointer flex gap-4 group hover:bg-gray-100 items-center justify-between last:border-b-0 p-3 px-6 text-gray-800 w-full",key:e.answerId,onClick:()=>s(e)},(0,t.createElement)("span",{className:"text-ellipsis overflow-hidden truncate"},e.question.substring(0,100)),(0,t.createElement)("span",null,(0,t.createElement)(Wa,{className:"fill-current text-gray-200 group-hover:text-gray-600",icon:Qa}))))))))},Tl=({value:e,className:n,onChange:r,onKeyDown:s,disabled:o,placeholder:i,maxRows:a=6})=>{const l=(0,t.useRef)(null),[c,u]=(0,t.useState)("auto"),[h,d]=(0,t.useState)("auto");return(0,t.useLayoutEffect)((()=>{if(!l.current)return;const t=window.getComputedStyle(l.current),e=parseFloat(t.lineHeight);d(e)}),[]),(0,t.useLayoutEffect)((()=>{const t=document.createElement("textarea");t.value=e||i,t.rows=1;const n=window.getComputedStyle(l.current);["paddingTop","paddingBottom","paddingLeft","paddingRight","width","fontFamily","fontSize","borderWidth"].forEach((e=>t.style[e]=n[e])),Object.assign(t.style,{position:"absolute",left:"-9999px"}),document.body.appendChild(t),u(t.scrollHeight),document.body.removeChild(t)}),[e,i]),(0,t.useEffect)((()=>{const t=l.current;if(!t)return;if(document.activeElement===t)return;const e=t.value.length;t.focus(),t.setSelectionRange(e,e)}),[e]),(0,t.createElement)(P,null,(0,t.createElement)(Qo.div,{key:"input",animate:{height:`${c}px`},transition:{duration:.2},style:{overflow:"hidden",maxHeight:h?h*a+16+"px":"none"}},(0,t.createElement)("label",{htmlFor:"draft-ai-textarea",className:"sr-only"},i),(0,t.createElement)("textarea",{ref:l,id:"draft-ai-textarea",disabled:o,className:n,value:e,rows:1,onChange:r,onKeyDown:s,placeholder:i,style:{overflowY:c<h*a?"hidden":"scroll",maxHeight:h?h*a+"px":"none",boxShadow:"none"}})))},Al=({onSubmit:e})=>{const[n,r]=(0,t.useState)(""),s=(0,t.useRef)(null);return(0,t.createElement)("form",{onSubmit:e,ref:s,className:"py-20"},(0,t.createElement)("p",{className:"text-lg font-medium m-0 mb-1 opacity-80"},(0,ti.__)("Hi there!","extendify-local")),(0,t.createElement)("p",{className:"text-2xl font-medium m-0 mb-6"},(0,ti.__)("Ask me any questions about WordPress.","extendify-local")),(0,t.createElement)("div",{className:"relative rounded border shadow border-gray-300 bg-white"},(0,t.createElement)(Tl,{value:n,className:"w-full h-full flex-1 py-4 pl-3 pr-10 placeholder-gray-600 resize-none",placeholder:(0,ti.__)("Ask your WordPress question…","extendify-local"),onChange:t=>{r(t.target.value)},onKeyDown:t=>{"Enter"!==t.key||t.shiftKey||s?.current?.requestSubmit()}}),(0,t.createElement)("button",{type:"submit",className:"absolute bottom-3.5 right-2.5 h-6 bg-transparent border-none fill-current flex items-center cursor-pointer text-gray-700 hover:text-gray-900",disabled:!n},(0,t.createElement)(Wa,{icon:Za,className:"w-4 h-4"}))))};var Rl=(0,t.createElement)(wl.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(wl.Path,{d:"M19.5 4.5h-7V6h4.44l-5.97 5.97 1.06 1.06L18 7.06v4.44h1.5v-7Zm-13 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-3H17v3a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h3V5.5h-3Z"}));const Ll=({height:e})=>window.extChatData?.supportUrl?(0,t.createElement)("div",{className:"px-6 py-8"},(0,t.createElement)("a",{href:window.extChatData.supportUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-gray-800 no-underline border border-gray-300 border-solid rounded py-3 px-4 flex items-center gap-4"},(0,t.createElement)("span",null,(0,ti.__)("For other questions, visit our support page.","extendify-local")),(0,t.createElement)(Wa,{icon:Rl,className:"w-8"}))):(0,t.createElement)("div",{className:`bg-design-main ${e}`}),Ol=({setShowChat:e})=>{var n;const[r,s]=(0,t.useState)(void 0),[o,i]=(0,t.useState)(void 0),[a,l]=(0,t.useState)(void 0),[c,u]=(0,t.useState)(!1),[h,d]=(0,t.useState)(null!==(n=window.extChatData?.experienceLevel)&&void 0!==n?n:"beginner"),[p,m]=(0,t.useState)(!1),{hasHistory:f}=gl(),g=window.extChatData?.showAIConsent,y=window.extChatData?.consentTermsUrl,v=window.extChatData?.userId,[x,b]=(0,t.useState)(window.extChatData?.userGaveConsent),w=()=>{s(void 0),i(void 0),l(void 0),u(!1),l(void 0),m(!1)};return(0,t.createElement)("div",{className:"fixed z-high overflow-hidden w-80 bottom-24 right-6 border border-solid border-gray-300 text-base bg-white rounded-lg shadow-2xl"},(0,t.createElement)("div",{className:"p-6 bg-design-main text-design-text"},(0,t.createElement)(Cl,{question:r,reset:w,experienceLevel:h,setExperienceLevel:d,showHistory:p,setShowChat:e}),!o&&!r&&!p&&(0,t.createElement)(Al,{onSubmit:async t=>{var e;t.preventDefault();const n=null!==(e=t.target?.[0]?.value)&&void 0!==e?e:"";if(!n)return;i("..."),s(n);const r=await(({question:t,experienceLevel:e})=>fetch(`${ei}/api/chat/ask-question`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:t,experienceLevel:e,...za})}))({question:n,experienceLevel:h});if(r.ok)try{const t=r.body.getReader(),e=new TextDecoder;for(;;){const{value:n,done:r}=await t.read();if(r)break;const s=e.decode(n);try{const{id:t}=JSON.parse(s);if(!t)throw new Error("False positive");l(t)}catch(t){i((t=>"..."===t?s:t+s))}}}catch(t){console.error(t)}else u(!0)}})),!o&&!r&&!p&&(0,t.createElement)(Ll,{height:f()?"h-11":"h-32"}),r&&!p&&(0,t.createElement)(yl,{question:r,answer:o,answerId:a,reset:w,error:c}),p&&(0,t.createElement)(Pl,{reset:w}),!o&&!r&&f()&&!p&&(0,t.createElement)("div",{className:"text-xs p-6 border border-b-0 border-r-0 border-l-0 border-solid border-gray-300 text-gray-600 flex justify-around"},(0,t.createElement)("div",{className:"flex flex-col items-center group cursor-pointer",onClick:()=>m(!0)},(0,t.createElement)("span",null,(0,t.createElement)(Wa,{icon:Ka,className:"group-hover:text-design-main cursor-pointer w-5 h-5 text-gray-500 fill-current"})),(0,t.createElement)("span",{className:"group-hover:text-design-main"},(0,ti.__)("Recent History","extendify-local")))),g&&!x&&(0,t.createElement)("div",{className:"bg-black/75 rounded p-6 absolute inset-0 flex items-center justify-center"},(0,t.createElement)("div",{className:"bg-white p-4 rounded"},(0,t.createElement)("h2",{className:"text-lg mt-0 mb-2"},(0,ti.__)("Terms of Use","extendify-local")),(0,t.createElement)("p",{className:"m-0"},
// translators: at the end of the sentence, there is a link to the terms of use
(0,ti.__)("In order to use the AI-powered chatbot to answer your WordPress questions, you must agree to the terms of use. For more information, click on this link:","extendify-local")," ",(0,t.createElement)("a",{href:y,target:"_blank",rel:"noreferrer"},(0,ti.__)("Terms of Use","extendify-local"))),(0,t.createElement)("button",{className:"mt-4 bg-wp-theme-500 text-white rounded px-4 py-2 border-0 text-center w-full cursor-pointer",type:"button",onClick:()=>{return t=v,_a.post("draft/update-user-meta",{user:t,option:"extendify_ai_consent",value:!0}),void b(!0);var t}},(0,ti.__)("Accept","extendify-local")))))},Vl=()=>{const[n,s]=(0,t.useState)(window.extChatData?.showChat),[o,i]=(0,t.useState)(!1);return(0,t.useEffect)((()=>{const{Fill:o}=(0,e.createSlotFill)("Extendify/Assist/Settings");return(0,r.registerPlugin)("extendify-chat-settings",{render:()=>(0,t.createElement)(o,null,(0,t.createElement)($a,{showChat:n,setShowChat:s}))}),()=>(0,r.unregisterPlugin)("extendify-chat-settings")}),[n]),n?(0,t.createElement)(t.Fragment,null,(0,t.createElement)(tl,{showDialog:o,onClick:()=>i(!o)}),(0,t.createElement)(P,null,o&&(0,t.createElement)(Qo.div,{key:"chat-dialog",className:"fixed bottom-0 right-0 z-high",initial:{y:15,opacity:0},exit:{y:15,opacity:0},transition:{y:{duration:.25},opacity:{duration:.1}},animate:{y:0,opacity:1}},(0,t.createElement)(Ol,{setShowChat:s})))):null};requestAnimationFrame((()=>{if(window.parent!==window)return;const e=Object.assign(document.createElement("div"),{className:"extendify-chat"});document.body.append(e),"function"==typeof t.createRoot?(0,t.createRoot)(e).render((0,t.createElement)(Vl,null)):(0,t.render)((0,t.createElement)(Vl,null),e)}))}()}();