@anker-in/campaign-ui 0.2.10-beta.10 → 0.2.10-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +126 -147
- package/dist/cjs/index.js.map +3 -3
- package/dist/esm/index.js +705 -1
- package/dist/esm/index.js.map +4 -4
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,706 @@
|
|
|
1
|
-
|
|
1
|
+
var Ck=Object.create;var Ic=Object.defineProperty;var xk=Object.getOwnPropertyDescriptor;var wk=Object.getOwnPropertyNames;var bk=Object.getPrototypeOf,yk=Object.prototype.hasOwnProperty;var Sk=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var w4=(e,t)=>()=>(e&&(t=e(e=0)),t);var cr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),X2=(e,t)=>{for(var r in t)Ic(e,r,{get:t[r],enumerable:!0})},b4=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of wk(t))!yk.call(e,o)&&o!==r&&Ic(e,o,{get:()=>t[o],enumerable:!(n=xk(t,o))||n.enumerable});return e};var Ge=(e,t,r)=>(r=e!=null?Ck(bk(e)):{},b4(t||!e||!e.__esModule?Ic(r,"default",{value:e,enumerable:!0}):r,e)),Rk=e=>b4(Ic({},"__esModule",{value:!0}),e);var Rf=cr((hae,Bh)=>{Bh.exports=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}});var rg=cr((Vae,tg)=>{"use strict";var Du=Object.prototype.hasOwnProperty,eg=Object.prototype.toString,qh=Object.defineProperty,Kh=Object.getOwnPropertyDescriptor,Yh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):eg.call(t)==="[object Array]"},Xh=function(t){if(!t||eg.call(t)!=="[object Object]")return!1;var r=Du.call(t,"constructor"),n=t.constructor&&t.constructor.prototype&&Du.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!r&&!n)return!1;var o;for(o in t);return typeof o>"u"||Du.call(t,o)},Qh=function(t,r){qh&&r.name==="__proto__"?qh(t,r.name,{enumerable:!0,configurable:!0,value:r.newValue,writable:!0}):t[r.name]=r.newValue},Jh=function(t,r){if(r==="__proto__")if(Du.call(t,r)){if(Kh)return Kh(t,r).value}else return;return t[r]};tg.exports=function e(){var t,r,n,o,i,s,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(t=arguments[l],t!=null)for(r in t)n=Jh(a,r),o=Jh(t,r),a!==o&&(u&&o&&(Xh(o)||(i=Yh(o)))?(i?(i=!1,s=n&&Yh(n)?n:[]):s=n&&Xh(n)?n:{},Qh(a,{name:r,newValue:e(u,s,o)})):typeof o<"u"&&Qh(a,{name:r,newValue:o}));return a}});var Cv=cr((n0e,vv)=>{"use strict";var $F="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";vv.exports=$F});var yv=cr((o0e,bv)=>{"use strict";var _F=Cv();function xv(){}function wv(){}wv.resetWarningCache=xv;bv.exports=function(){function e(n,o,i,s,a,l){if(l!==_F){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:wv,resetWarningCache:xv};return r.PropTypes=r,r}});var Rv=cr((a0e,Sv)=>{Sv.exports=yv()();var i0e,s0e});var Pv=cr(Ae=>{"use strict";var f5=Symbol.for("react.element"),p5=Symbol.for("react.portal"),od=Symbol.for("react.fragment"),id=Symbol.for("react.strict_mode"),sd=Symbol.for("react.profiler"),ad=Symbol.for("react.provider"),ld=Symbol.for("react.context"),WF=Symbol.for("react.server_context"),cd=Symbol.for("react.forward_ref"),ud=Symbol.for("react.suspense"),dd=Symbol.for("react.suspense_list"),fd=Symbol.for("react.memo"),pd=Symbol.for("react.lazy"),qF=Symbol.for("react.offscreen"),Iv;Iv=Symbol.for("react.module.reference");function qr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case f5:switch(e=e.type,e){case od:case sd:case id:case ud:case dd:return e;default:switch(e=e&&e.$$typeof,e){case WF:case ld:case cd:case pd:case fd:case ad:return e;default:return t}}case p5:return t}}}Ae.ContextConsumer=ld;Ae.ContextProvider=ad;Ae.Element=f5;Ae.ForwardRef=cd;Ae.Fragment=od;Ae.Lazy=pd;Ae.Memo=fd;Ae.Portal=p5;Ae.Profiler=sd;Ae.StrictMode=id;Ae.Suspense=ud;Ae.SuspenseList=dd;Ae.isAsyncMode=function(){return!1};Ae.isConcurrentMode=function(){return!1};Ae.isContextConsumer=function(e){return qr(e)===ld};Ae.isContextProvider=function(e){return qr(e)===ad};Ae.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===f5};Ae.isForwardRef=function(e){return qr(e)===cd};Ae.isFragment=function(e){return qr(e)===od};Ae.isLazy=function(e){return qr(e)===pd};Ae.isMemo=function(e){return qr(e)===fd};Ae.isPortal=function(e){return qr(e)===p5};Ae.isProfiler=function(e){return qr(e)===sd};Ae.isStrictMode=function(e){return qr(e)===id};Ae.isSuspense=function(e){return qr(e)===ud};Ae.isSuspenseList=function(e){return qr(e)===dd};Ae.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===od||e===sd||e===id||e===ud||e===dd||e===qF||typeof e=="object"&&e!==null&&(e.$$typeof===pd||e.$$typeof===fd||e.$$typeof===ad||e.$$typeof===ld||e.$$typeof===cd||e.$$typeof===Iv||e.getModuleId!==void 0)};Ae.typeOf=qr});var Dv=cr((o2e,Ov)=>{"use strict";Ov.exports=Pv()});var Zv=cr((l2e,zv)=>{var Hv=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,KF=/\n/g,YF=/^\s*/,XF=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,QF=/^:\s*/,JF=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,eV=/^[;\s]*/,tV=/^\s+|\s+$/g,rV=`
|
|
2
|
+
`,$v="/",_v="*",es="",nV="comment",oV="declaration";zv.exports=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function o(h){var g=h.match(KF);g&&(r+=g.length);var v=h.lastIndexOf(rV);n=~v?h.length-v:n+h.length}function i(){var h={line:r,column:n};return function(g){return g.position=new s(h),u(),g}}function s(h){this.start=h,this.end={line:r,column:n},this.source=t.source}s.prototype.content=e;var a=[];function l(h){var g=new Error(t.source+":"+r+":"+n+": "+h);if(g.reason=h,g.filename=t.source,g.line=r,g.column=n,g.source=e,t.silent)a.push(g);else throw g}function c(h){var g=h.exec(e);if(g){var v=g[0];return o(v),e=e.slice(v.length),g}}function u(){c(YF)}function d(h){var g;for(h=h||[];g=f();)g!==!1&&h.push(g);return h}function f(){var h=i();if(!($v!=e.charAt(0)||_v!=e.charAt(1))){for(var g=2;es!=e.charAt(g)&&(_v!=e.charAt(g)||$v!=e.charAt(g+1));)++g;if(g+=2,es===e.charAt(g-1))return l("End of comment missing");var v=e.slice(2,g-2);return n+=2,o(v),e=e.slice(g),n+=2,h({type:nV,comment:v})}}function p(){var h=i(),g=c(XF);if(g){if(f(),!c(QF))return l("property missing ':'");var v=c(JF),C=h({type:oV,property:Bv(g[0].replace(Hv,es)),value:v?Bv(v[0].replace(Hv,es)):es});return c(eV),C}}function m(){var h=[];d(h);for(var g;g=p();)g!==!1&&(h.push(g),d(h));return h}return u(),m()};function Bv(e){return e?e.replace(tV,es):es}});var Uv=cr((c2e,m5)=>{var iV=Zv();function jv(e,t){var r=null;if(!e||typeof e!="string")return r;for(var n,o=iV(e),i=typeof t=="function",s,a,l=0,c=o.length;l<c;l++)n=o[l],s=n.property,a=n.value,i?t(s,a,n):a&&(r||(r={}),r[s]=a);return r}m5.exports=jv;m5.exports.default=jv});var Ub=cr(jb=>{"use strict";var Sa=Sk("react");function Zz(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jz=typeof Object.is=="function"?Object.is:Zz,Uz=Sa.useState,Gz=Sa.useEffect,Wz=Sa.useLayoutEffect,qz=Sa.useDebugValue;function Kz(e,t){var r=t(),n=Uz({inst:{value:r,getSnapshot:t}}),o=n[0].inst,i=n[1];return Wz(function(){o.value=r,o.getSnapshot=t,Gp(o)&&i({inst:o})},[e,r,t]),Gz(function(){return Gp(o)&&i({inst:o}),e(function(){Gp(o)&&i({inst:o})})},[e]),qz(r),r}function Gp(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!jz(e,r)}catch{return!0}}function Yz(e,t){return t()}var Xz=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Yz:Kz;jb.useSyncExternalStore=Sa.useSyncExternalStore!==void 0?Sa.useSyncExternalStore:Xz});var Wb=cr((T6e,Gb)=>{"use strict";Gb.exports=Ub()});var ir=cr((Hve,e0)=>{(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",i=0;i<arguments.length;i++){var s=arguments[i];s&&(o=n(o,r(s)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return t.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var i="";for(var s in o)e.call(o,s)&&o[s]&&(i=n(i,s));return i}function n(o,i){return i?o?o+" "+i:o+i:o}typeof e0<"u"&&e0.exports?(t.default=t,e0.exports=t):typeof define=="function"&&typeof define.amd=="object"&&define.amd?define("classnames",[],function(){return t}):window.classNames=t})()});var nL=cr((tye,rL)=>{rL.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,r=[],n=0;n<e.rangeCount;n++)r.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||r.forEach(function(o){e.addRange(o)}),t&&t.focus()}}});var s7=cr((rye,iL)=>{"use strict";var HW=nL(),oL={"text/plain":"Text","text/html":"Url",default:"Text"},$W="Copy to clipboard: #{key}, Enter";function _W(e){var t=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function BW(e,t){var r,n,o,i,s,a,l=!1;t||(t={}),r=t.debug||!1;try{o=HW(),i=document.createRange(),s=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(u){if(u.stopPropagation(),t.format)if(u.preventDefault(),typeof u.clipboardData>"u"){r&&console.warn("unable to use e.clipboardData"),r&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=oL[t.format]||oL.default;window.clipboardData.setData(d,e)}else u.clipboardData.clearData(),u.clipboardData.setData(t.format,e);t.onCopy&&(u.preventDefault(),t.onCopy(u.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),s.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(u){r&&console.error("unable to copy using execCommand: ",u),r&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){r&&console.error("unable to copy using clipboardData: ",d),r&&console.error("falling back to prompt"),n=_W("message"in t?t.message:$W),window.prompt(n,e)}}finally{s&&(typeof s.removeRange=="function"?s.removeRange(i):s.removeAllRanges()),a&&document.body.removeChild(a),o()}return l}iL.exports=BW});function CL(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var xL=w4(()=>{});var wL={};X2(wL,{default:()=>hq});var mq,hq,bL=w4(()=>{xL();mq=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,hq=CL(function(e){return mq.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91})});import{useMemo as a$}from"react";import{useCallback as ip,useState as h1,useEffect as zC}from"react";import{useCallback as J2,useReducer as Mk}from"react";function Ti(e){let t={};for(let n of e||[])t[n.name]=y4(n);let r=[];for(let n of e||[])n.required!==!1&&r.push(n.name);return{type:"object",properties:t,required:r}}function y4(e){var t,r,n;switch(e.type){case"string":return{type:"string",description:e.description,...e.enum&&{enum:e.enum}};case"number":case"boolean":return{type:e.type,description:e.description};case"object":case"object[]":let o=(t=e.attributes)==null?void 0:t.reduce((s,a)=>(s[a.name]=y4(a),s),{}),i=(r=e.attributes)==null?void 0:r.filter(s=>s.required!==!1).map(s=>s.name);return e.type==="object[]"?{type:"array",items:{type:"object",...o&&{properties:o},...i&&i.length>0&&{required:i}},description:e.description}:{type:"object",description:e.description,...o&&{properties:o},...i&&i.length>0&&{required:i}};default:return(n=e.type)!=null&&n.endsWith("[]")?{type:"array",items:{type:e.type.slice(0,-2)},description:e.description}:{type:"string",description:e.description}}}function an(){return"ck-"+globalThis.crypto.randomUUID()}var S4="https://api.copilotkit.ai",R4="v1",Q2=`${S4}/copilotkit/${R4}`,wl="X-CopilotCloud-Public-Api-Key";var Lk="1.1.2",L4=Lk;var Ek=()=>{let[e,t]=Mk(Tk,new Map),r=J2((i,s)=>{let a=an();return t({type:"ADD_ELEMENT",value:i,id:a,categories:s}),a},[]),n=J2(i=>{t({type:"REMOVE_ELEMENT",id:i})},[]),o=J2(i=>{let s=new Set(i),a=[];return e.forEach(l=>{kk(s,l.categories)&&a.push(l.value)}),a},[e]);return{addElement:r,removeElement:n,allElements:o}},M4=Ek;function Tk(e,t){switch(t.type){case"ADD_ELEMENT":{let{value:r,id:n,categories:o}=t,i={id:n,value:r,categories:new Set(o)},s=new Map(e);return s.set(n,i),s}case"REMOVE_ELEMENT":{let r=new Map(e);return r.delete(t.id),r}default:return e}}function kk(e,t){let[r,n]=e.size<=t.size?[e,t]:[t,e];for(let o of r)if(n.has(o))return!0;return!1}var Ak=Object.defineProperty,Ik=Object.defineProperties,Pk=Object.getOwnPropertyDescriptors,Pc=Object.getOwnPropertySymbols,T4=Object.prototype.hasOwnProperty,k4=Object.prototype.propertyIsEnumerable,E4=(e,t,r)=>t in e?Ak(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ct=(e,t)=>{for(var r in t||(t={}))T4.call(t,r)&&E4(e,r,t[r]);if(Pc)for(var r of Pc(t))k4.call(t,r)&&E4(e,r,t[r]);return e},_r=(e,t)=>Ik(e,Pk(t)),A4=e=>typeof e=="symbol"?e:e+"",bl=(e,t)=>{var r={};for(var n in e)T4.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Pc)for(var n of Pc(e))t.indexOf(n)<0&&k4.call(e,n)&&(r[n]=e[n]);return r},Br=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{a(r.next(l))}catch(c){o(c)}},s=l=>{try{a(r.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);a((r=r.apply(e,t)).next())});import{useCallback as e9,useReducer as Ok}from"react";var I4=(e,t)=>e.reduce((r,n)=>{if(n.id!==t){let o=_r(ct({},n),{children:I4(n.children,t)});r.push(o)}return r},[]),P4=(e,t,r)=>r?e.map(n=>n.id===r?_r(ct({},n),{children:[...n.children,t]}):n.children.length?_r(ct({},n),{children:P4(n.children,t,r)}):n):[...e,t],O4=(e,t)=>t===0?(e+1).toString():t===1?String.fromCharCode(65+e):t===2?String.fromCharCode(97+e):"-",D4=(e,t="",r=0)=>{let n=" ".repeat(3).repeat(r),o=t.length+n.length,i=" ".repeat(o),s=e.value.split(`
|
|
3
|
+
`),a=`${n}${t}${s[0]}`,l=s.slice(1).map(d=>`${i}${d}`).join(`
|
|
4
|
+
`),c=`${a}
|
|
5
|
+
`;l&&(c+=`${l}
|
|
6
|
+
`);let u=" ".repeat(t.length);return e.children.forEach((d,f)=>c+=D4(d,`${u}${O4(f,r+1)}. `,r+1)),c};function Dk(e,t){switch(t.type){case"ADD_NODE":{let{value:r,parentId:n,id:o}=t,i={id:o,value:r,children:[],categories:new Set(t.categories)};try{return P4(e,i,n)}catch(s){return console.error(`Error while adding node with id ${o}: ${s}`),e}}case"REMOVE_NODE":return I4(e,t.id);default:return e}}var Nk=()=>{let[e,t]=Ok(Dk,[]),r=e9((i,s,a)=>{let l=an();return t({type:"ADD_NODE",value:i,parentId:a,id:l,categories:s}),l},[]),n=e9(i=>{t({type:"REMOVE_NODE",id:i})},[]),o=e9(i=>{let s=new Set(i),a="";return e.forEach((l,c)=>{Fk(s,l.categories)&&(c!==0&&(a+=`
|
|
7
|
+
`),a+=D4(l,`${O4(c,0)}. `))}),a},[e]);return{tree:e,addElement:r,printTree:o,removeElement:n}},N4=Nk;function Fk(e,t){let[r,n]=e.size<=t.size?[e,t]:[t,e];for(let o of r)if(n.has(o))return!0;return!1}import F4 from"react";var Vk={actions:{},setAction:()=>{},removeAction:()=>{},chatComponentsCache:{current:{}},getContextString:(e,t)=>ki(""),addContext:()=>"",removeContext:()=>{},getFunctionCallHandler:()=>ki(()=>Br(void 0,null,function*(){})),messages:[],setMessages:()=>ki([]),isLoading:!1,setIsLoading:()=>ki(!1),chatInstructions:"",setChatInstructions:()=>ki(""),getDocumentsContext:e=>ki([]),addDocumentContext:()=>ki(""),removeDocumentContext:()=>{},copilotApiConfig:new class{get chatApiEndpoint(){throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!")}get headers(){return{}}get body(){return{}}},chatSuggestionConfiguration:{},addChatSuggestionConfiguration:()=>{},removeChatSuggestionConfiguration:()=>{},showDevConsole:"auto"},Ln=F4.createContext(Vk);function Jt(){return F4.useContext(Ln)}function ki(e){throw new Error("Remember to wrap your app in a `<CopilotKit> {...} </CopilotKit>` !!!")}import{useCallback as eo,useRef as Hk,useState as yl}from"react";import{flushSync as $k}from"react-dom";import{jsx as _k}from"react/jsx-runtime";function t9(e){var t=e,{children:r}=t,n=bl(t,["children"]),o,i;if(!n.runtimeUrl&&!n.publicApiKey)throw new Error("Please provide either a runtimeUrl or a publicApiKey to the CopilotKit component.");let s=n.runtimeUrl||Q2,[a,l]=yl({}),c=Hk({}),{addElement:u,removeElement:d,printTree:f}=N4(),[p,m]=yl([]),[h,g]=yl(!1),[v,C]=yl(""),{addElement:x,removeElement:w,allElements:y}=M4(),b=eo((Z,J)=>{l(T=>_r(ct({},T),{[Z]:J}))},[]),R=eo(Z=>{l(J=>{let T=ct({},J);return delete T[Z],T})},[]),L=eo((Z,J)=>{let T=Z.map(ve=>`${ve.name} (${ve.sourceApplication}):
|
|
8
|
+
${ve.getContents()}`).join(`
|
|
9
|
+
|
|
10
|
+
`),W=f(J);return`${T}
|
|
11
|
+
|
|
12
|
+
${W}`},[f]),E=eo((Z,J,T=to)=>u(Z,T,J),[u]),S=eo(Z=>{d(Z)},[d]),A=eo(Z=>Bk(Object.values(Z||a)),[a]),k=eo(Z=>y(Z),[y]),I=eo((Z,J=to)=>x(Z,J),[x]),N=eo(Z=>{w(Z)},[w]);if(!n.publicApiKey&&n.cloudRestrictToTopic)throw new Error("To use the cloudRestrictToTopic feature, please sign up at https://copilotkit.ai and provide a publicApiKey.");let D;n.publicApiKey&&(D={guardrails:{input:{restrictToTopic:{enabled:!!n.cloudRestrictToTopic,validTopics:((o=n.cloudRestrictToTopic)==null?void 0:o.validTopics)||[],invalidTopics:((i=n.cloudRestrictToTopic)==null?void 0:i.invalidTopics)||[]}}}});let F=_r(ct({publicApiKey:n.publicApiKey},D?{cloud:D}:{}),{chatApiEndpoint:s,headers:n.headers||{},properties:n.properties||{},transcribeAudioUrl:n.transcribeAudioUrl,textToSpeechUrl:n.textToSpeechUrl,credentials:n.credentials}),[H,P]=yl({}),O=(Z,J)=>{P(T=>_r(ct({},T),{[Z]:J}))},M=Z=>{P(J=>{let T=J,{[Z]:W}=T;return bl(T,[A4(Z)])})};return _k(Ln.Provider,{value:{actions:a,chatComponentsCache:c,getFunctionCallHandler:A,setAction:b,removeAction:R,getContextString:L,addContext:E,removeContext:S,getDocumentsContext:k,addDocumentContext:I,removeDocumentContext:N,copilotApiConfig:F,messages:p,setMessages:m,isLoading:h,setIsLoading:g,chatSuggestionConfiguration:H,addChatSuggestionConfiguration:O,removeChatSuggestionConfiguration:M,chatInstructions:v,setChatInstructions:C,showDevConsole:n.showDevConsole===void 0?"auto":n.showDevConsole},children:r})}var to=["global"];function Bk(e){return t=>Br(this,[t],function*({messages:r,name:n,args:o}){let i={};for(let l of e)i[l.name]=l;let s=i[n],a;return s&&(yield new Promise((l,c)=>{$k(()=>Br(this,null,function*(){try{a=yield s.handler(o),l()}catch(u){c(u)}}))}),yield new Promise(l=>setTimeout(l,20))),a})}var Do=(e=>(e.Chat="Chat",e.Suggestion="Suggestion",e.Task="Task",e.TextareaCompletion="TextareaCompletion",e.TextareaPopover="TextareaPopover",e))(Do||{});var Ns=(e=>(e.Assistant="assistant",e.System="system",e.User="user",e))(Ns||{}),No=(e=>(e.Failed="Failed",e.Pending="Pending",e.Success="Success",e))(No||{});var r9={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"generateCopilotResponse"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GenerateCopilotResponseInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"properties"}},type:{kind:"NamedType",name:{kind:"Name",value:"JSONObject"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"generateCopilotResponse"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}},{kind:"Argument",name:{kind:"Name",value:"properties"},value:{kind:"Variable",name:{kind:"Name",value:"properties"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"threadId"}},{kind:"Field",name:{kind:"Name",value:"runId"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CopilotResponse"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BaseResponseStatus"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"FailedResponseStatus"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reason"}},{kind:"Field",name:{kind:"Name",value:"details"}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"messages"},directives:[{kind:"Directive",name:{kind:"Name",value:"stream"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BaseMessageOutput"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BaseMessageOutput"}},directives:[{kind:"Directive",name:{kind:"Name",value:"defer"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SuccessMessageStatus"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"FailedMessageStatus"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"reason"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PendingMessageStatus"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TextMessageOutput"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},directives:[{kind:"Directive",name:{kind:"Name",value:"stream"}}]},{kind:"Field",name:{kind:"Name",value:"role"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionExecutionMessageOutput"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"scope"}},{kind:"Field",name:{kind:"Name",value:"arguments"},directives:[{kind:"Directive",name:{kind:"Name",value:"stream"}}]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ResultMessageOutput"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"result"}},{kind:"Field",name:{kind:"Name",value:"actionExecutionId"}},{kind:"Field",name:{kind:"Name",value:"actionName"}}]}}]}}]}}]}}]};var zk={"\n mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {\n generateCopilotResponse(data: $data, properties: $properties) {\n threadId\n runId\n ... on CopilotResponse @defer {\n status {\n ... on BaseResponseStatus {\n code\n }\n ... on FailedResponseStatus {\n reason\n details\n }\n }\n }\n messages @stream {\n __typename\n ... on BaseMessageOutput {\n id\n createdAt\n }\n ... on BaseMessageOutput @defer {\n status {\n ... on SuccessMessageStatus {\n code\n }\n ... on FailedMessageStatus {\n code\n reason\n }\n ... on PendingMessageStatus {\n code\n }\n }\n }\n ... on TextMessageOutput {\n content @stream\n role\n }\n ... on ActionExecutionMessageOutput {\n name\n scope\n arguments @stream\n }\n ... on ResultMessageOutput {\n result\n actionExecutionId\n actionName\n }\n }\n }\n }\n":r9};function Zk(e){return zk[e]??{}}var V4=Zk(`
|
|
13
|
+
mutation generateCopilotResponse($data: GenerateCopilotResponseInput!, $properties: JSONObject) {
|
|
14
|
+
generateCopilotResponse(data: $data, properties: $properties) {
|
|
15
|
+
threadId
|
|
16
|
+
runId
|
|
17
|
+
... on CopilotResponse @defer {
|
|
18
|
+
status {
|
|
19
|
+
... on BaseResponseStatus {
|
|
20
|
+
code
|
|
21
|
+
}
|
|
22
|
+
... on FailedResponseStatus {
|
|
23
|
+
reason
|
|
24
|
+
details
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
messages @stream {
|
|
29
|
+
__typename
|
|
30
|
+
... on BaseMessageOutput {
|
|
31
|
+
id
|
|
32
|
+
createdAt
|
|
33
|
+
}
|
|
34
|
+
... on BaseMessageOutput @defer {
|
|
35
|
+
status {
|
|
36
|
+
... on SuccessMessageStatus {
|
|
37
|
+
code
|
|
38
|
+
}
|
|
39
|
+
... on FailedMessageStatus {
|
|
40
|
+
code
|
|
41
|
+
reason
|
|
42
|
+
}
|
|
43
|
+
... on PendingMessageStatus {
|
|
44
|
+
code
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
... on TextMessageOutput {
|
|
49
|
+
content @stream
|
|
50
|
+
role
|
|
51
|
+
}
|
|
52
|
+
... on ActionExecutionMessageOutput {
|
|
53
|
+
name
|
|
54
|
+
scope
|
|
55
|
+
arguments @stream
|
|
56
|
+
}
|
|
57
|
+
... on ResultMessageOutput {
|
|
58
|
+
result
|
|
59
|
+
actionExecutionId
|
|
60
|
+
actionName
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
`);var Ai={NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType"};var Fs=class extends Error{constructor(t,r,n,o,i,s,a){super(t),this.name="GraphQLError",this.message=t,i&&(this.path=i),r&&(this.nodes=Array.isArray(r)?r:[r]),n&&(this.source=n),o&&(this.positions=o),s&&(this.originalError=s);var l=a;if(!l&&s){var c=s.extensions;c&&typeof c=="object"&&(l=c)}this.extensions=l||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}},K,_;function dr(e){return new Fs(`Syntax Error: Unexpected token at ${_} in ${e}`)}function H4(e){if(e.lastIndex=_,e.test(K))return K.slice(_,_=e.lastIndex)}var Oc=/ +(?=[^\s])/y;function jk(e){for(var t=e.split(`
|
|
66
|
+
`),r="",n=0,o=0,i=t.length-1,s=0;s<t.length;s++)Oc.lastIndex=0,Oc.test(t[s])&&(s&&(!n||Oc.lastIndex<n)&&(n=Oc.lastIndex),o=o||s,i=s);for(var a=o;a<=i;a++)a!==o&&(r+=`
|
|
67
|
+
`),r+=t[a].slice(n).replace(/\\"""/g,'"""');return r}function we(){for(var e=0|K.charCodeAt(_++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|K.charCodeAt(_++))if(e===35)for(;(e=K.charCodeAt(_++))!==10&&e!==13;);_--}function n9(){for(var e=_,t=0|K.charCodeAt(_++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|K.charCodeAt(_++));if(e===_-1)throw dr("Name");var r=K.slice(e,--_);return we(),r}function fr(){return{kind:"Name",value:n9()}}var Uk=/(?:"""|(?:[\s\S]*?[^\\])""")/y,Gk=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function Dc(e){var t;switch(K.charCodeAt(_)){case 91:_++,we();for(var r=[];K.charCodeAt(_)!==93;)r.push(Dc(e));return _++,we(),{kind:"ListValue",values:r};case 123:_++,we();for(var n=[];K.charCodeAt(_)!==125;){var o=fr();if(K.charCodeAt(_++)!==58)throw dr("ObjectField");we(),n.push({kind:"ObjectField",name:o,value:Dc(e)})}return _++,we(),{kind:"ObjectValue",fields:n};case 36:if(e)throw dr("Variable");return _++,{kind:"Variable",name:fr()};case 34:if(K.charCodeAt(_+1)===34&&K.charCodeAt(_+2)===34){if(_+=3,(t=H4(Uk))==null)throw dr("StringValue");return we(),{kind:"StringValue",value:jk(t.slice(0,-3)),block:!0}}else{var i=_,s;_++;var a=!1;for(s=0|K.charCodeAt(_++);s===92&&(_++,a=!0)||s!==10&&s!==13&&s!==34&&s;s=0|K.charCodeAt(_++));if(s!==34)throw dr("StringValue");return t=K.slice(i,_),we(),{kind:"StringValue",value:a?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var l=_++,c;(c=0|K.charCodeAt(_++))>=48&&c<=57;);var u=K.slice(l,--_);if((c=K.charCodeAt(_))===46||c===69||c===101){if((t=H4(Gk))==null)throw dr("FloatValue");return we(),{kind:"FloatValue",value:u+t}}else return we(),{kind:"IntValue",value:u};case 110:if(K.charCodeAt(_+1)===117&&K.charCodeAt(_+2)===108&&K.charCodeAt(_+3)===108)return _+=4,we(),{kind:"NullValue"};break;case 116:if(K.charCodeAt(_+1)===114&&K.charCodeAt(_+2)===117&&K.charCodeAt(_+3)===101)return _+=4,we(),{kind:"BooleanValue",value:!0};break;case 102:if(K.charCodeAt(_+1)===97&&K.charCodeAt(_+2)===108&&K.charCodeAt(_+3)===115&&K.charCodeAt(_+4)===101)return _+=5,we(),{kind:"BooleanValue",value:!1};break}return{kind:"EnumValue",value:n9()}}function _4(e){if(K.charCodeAt(_)===40){var t=[];_++,we();do{var r=fr();if(K.charCodeAt(_++)!==58)throw dr("Argument");we(),t.push({kind:"Argument",name:r,value:Dc(e)})}while(K.charCodeAt(_)!==41);return _++,we(),t}}function Fo(e){if(K.charCodeAt(_)===64){var t=[];do _++,t.push({kind:"Directive",name:fr(),arguments:_4(e)});while(K.charCodeAt(_)===64);return t}}function Wk(){for(var e=0;K.charCodeAt(_)===91;)e++,_++,we();var t={kind:"NamedType",name:fr()};do if(K.charCodeAt(_)===33&&(_++,we(),t={kind:"NonNullType",type:t}),e){if(K.charCodeAt(_++)!==93)throw dr("NamedType");we(),t={kind:"ListType",type:t}}while(e--);return t}function Nc(){if(K.charCodeAt(_++)!==123)throw dr("SelectionSet");return we(),Fc()}function Fc(){var e=[];do if(K.charCodeAt(_)===46){if(K.charCodeAt(++_)!==46||K.charCodeAt(++_)!==46)throw dr("SelectionSet");switch(_++,we(),K.charCodeAt(_)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:Fo(!1),selectionSet:Nc()});break;case 111:K.charCodeAt(_+1)===110?(_+=2,we(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:fr()},directives:Fo(!1),selectionSet:Nc()})):e.push({kind:"FragmentSpread",name:fr(),directives:Fo(!1)});break;case 123:_++,we(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:Fc()});break;default:e.push({kind:"FragmentSpread",name:fr(),directives:Fo(!1)})}}else{var t=fr(),r=void 0;K.charCodeAt(_)===58&&(_++,we(),r=t,t=fr());var n=_4(!1),o=Fo(!1),i=void 0;K.charCodeAt(_)===123&&(_++,we(),i=Fc()),e.push({kind:"Field",alias:r,name:t,arguments:n,directives:o,selectionSet:i})}while(K.charCodeAt(_)!==125);return _++,we(),{kind:"SelectionSet",selections:e}}function qk(){if(we(),K.charCodeAt(_)===40){var e=[];_++,we();do{if(K.charCodeAt(_++)!==36)throw dr("Variable");var t=fr();if(K.charCodeAt(_++)!==58)throw dr("VariableDefinition");we();var r=Wk(),n=void 0;K.charCodeAt(_)===61&&(_++,we(),n=Dc(!0)),we(),e.push({kind:"VariableDefinition",variable:{kind:"Variable",name:t},type:r,defaultValue:n,directives:Fo(!0)})}while(K.charCodeAt(_)!==41);return _++,we(),e}}function Kk(){var e=fr();if(K.charCodeAt(_++)!==111||K.charCodeAt(_++)!==110)throw dr("FragmentDefinition");return we(),{kind:"FragmentDefinition",name:e,typeCondition:{kind:"NamedType",name:fr()},directives:Fo(!1),selectionSet:Nc()}}function $4(){var e=[];do if(K.charCodeAt(_)===123)_++,we(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:Fc()});else{var t=n9();switch(t){case"fragment":e.push(Kk());break;case"query":case"mutation":case"subscription":var r,n=void 0;(r=K.charCodeAt(_))!==40&&r!==64&&r!==123&&(n=fr()),e.push({kind:"OperationDefinition",operation:t,name:n,variableDefinitions:qk(),directives:Fo(!1),selectionSet:Nc()});break;default:throw dr("Document")}}while(_<K.length);return e}function B4(e,t){return K=e.body?e.body:e,_=0,we(),t&&t.noLocation?{kind:"Document",definitions:$4()}:{kind:"Document",definitions:$4(),loc:{start:0,end:K.length,startToken:void 0,endToken:void 0,source:{body:K,name:"graphql.web",locationOffset:{line:1,column:1}}}}}function ur(e,t,r){for(var n="",o=0;o<e.length;o++)o&&(n+=t),n+=r(e[o]);return n}function Yk(e){return JSON.stringify(e)}function Xk(e){return`"""
|
|
68
|
+
`+e.replace(/"""/g,'\\"""')+`
|
|
69
|
+
"""`}var Mn=`
|
|
70
|
+
`,nt={OperationDefinition(e){var t=e.operation;return e.name&&(t+=" "+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(t+=" "),t+="("+ur(e.variableDefinitions,", ",nt.VariableDefinition)+")"),e.directives&&e.directives.length&&(t+=" "+ur(e.directives," ",nt.Directive)),t!=="query"?t+" "+nt.SelectionSet(e.selectionSet):nt.SelectionSet(e.selectionSet)},VariableDefinition(e){var t=nt.Variable(e.variable)+": "+ro(e.type);return e.defaultValue&&(t+=" = "+ro(e.defaultValue)),e.directives&&e.directives.length&&(t+=" "+ur(e.directives," ",nt.Directive)),t},Field(e){var t=e.alias?e.alias.value+": "+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var r=ur(e.arguments,", ",nt.Argument);t.length+r.length+2>80?t+="("+(Mn+=" ")+ur(e.arguments,Mn,nt.Argument)+(Mn=Mn.slice(0,-2))+")":t+="("+r+")"}return e.directives&&e.directives.length&&(t+=" "+ur(e.directives," ",nt.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(t+=" "+nt.SelectionSet(e.selectionSet)),t},StringValue(e){return e.block?Xk(e.value).replace(/\n/g,Mn):Yk(e.value)},BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+ur(e.values,", ",ro)+"]",ObjectValue:e=>"{"+ur(e.fields,", ",nt.ObjectField)+"}",ObjectField:e=>e.name.value+": "+ro(e.value),Document(e){return!e.definitions||!e.definitions.length?"":ur(e.definitions,`
|
|
71
|
+
|
|
72
|
+
`,ro)},SelectionSet:e=>"{"+(Mn+=" ")+ur(e.selections,Mn,ro)+(Mn=Mn.slice(0,-2))+"}",Argument:e=>e.name.value+": "+ro(e.value),FragmentSpread(e){var t="..."+e.name.value;return e.directives&&e.directives.length&&(t+=" "+ur(e.directives," ",nt.Directive)),t},InlineFragment(e){var t="...";return e.typeCondition&&(t+=" on "+e.typeCondition.name.value),e.directives&&e.directives.length&&(t+=" "+ur(e.directives," ",nt.Directive)),t+=" "+nt.SelectionSet(e.selectionSet)},FragmentDefinition(e){var t="fragment "+e.name.value;return t+=" on "+e.typeCondition.name.value,e.directives&&e.directives.length&&(t+=" "+ur(e.directives," ",nt.Directive)),t+" "+nt.SelectionSet(e.selectionSet)},Directive(e){var t="@"+e.name.value;return e.arguments&&e.arguments.length&&(t+="("+ur(e.arguments,", ",nt.Argument)+")"),t},NamedType:e=>e.name.value,ListType:e=>"["+ro(e.type)+"]",NonNullType:e=>ro(e.type)+"!"},ro=e=>nt[e.kind](e);function z4(e){return Mn=`
|
|
73
|
+
`,nt[e.kind]?nt[e.kind](e):""}var j4=()=>{},Lr=j4;function ln(e){return{tag:0,0:e}}function Sl(e){return{tag:1,0:e}}var Z4=()=>typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator";var Qk=e=>e;function _t(e){return t=>r=>{var n=Lr;t(o=>{o===0?r(0):o.tag===0?(n=o[0],r(o)):e(o[0])?r(o):n(0)})}}function Rl(e){return t=>r=>t(n=>{n===0||n.tag===0?r(n):r(Sl(e(n[0])))})}function o9(e){return t=>r=>{var n=[],o=Lr,i=!1,s=!1;t(a=>{s||(a===0?(s=!0,n.length||r(0)):a.tag===0?o=a[0]:(i=!1,function(c){var u=Lr;c(d=>{if(d===0){if(n.length){var f=n.indexOf(u);f>-1&&(n=n.slice()).splice(f,1),n.length||(s?r(0):i||(i=!0,o(0)))}}else d.tag===0?(n.push(u=d[0]),u(0)):n.length&&(r(d),u(0))})}(e(a[0])),i||(i=!0,o(0))))}),r(ln(a=>{if(a===1){s||(s=!0,o(1));for(var l=0,c=n,u=n.length;l<u;l++)c[l](1);n.length=0}else{!s&&!i?(i=!0,o(0)):i=!1;for(var d=0,f=n,p=n.length;d<p;d++)f[d](0)}}))}}function Jk(e){return o9(Qk)(e)}function Vs(e){return Jk(tA(e))}function Vc(e){return t=>r=>{var n=!1;t(o=>{if(!n)if(o===0)n=!0,r(0),e();else if(o.tag===0){var i=o[0];r(ln(s=>{s===1?(n=!0,i(1),e()):i(s)}))}else r(o)})}}function Hc(e){return t=>r=>{var n=!1;t(o=>{if(!n)if(o===0)n=!0,r(0);else if(o.tag===0){var i=o[0];r(ln(s=>{s===1&&(n=!0),i(s)}))}else e(o[0]),r(o)})}}function i9(e){return t=>r=>t(n=>{n===0?r(0):n.tag===0?(r(n),e()):r(n)})}function Hs(e){var t=[],r=Lr,n=!1;return o=>{t.push(o),t.length===1&&e(i=>{if(i===0){for(var s=0,a=t,l=t.length;s<l;s++)a[s](0);t.length=0}else if(i.tag===0)r=i[0];else{n=!1;for(var c=0,u=t,d=t.length;c<d;c++)u[c](i)}}),o(ln(i=>{if(i===1){var s=t.indexOf(o);s>-1&&(t=t.slice()).splice(s,1),t.length||r(1)}else n||(n=!0,r(0))}))}}function s9(e){return t=>r=>{var n=Lr,o=Lr,i=!1,s=!1,a=!1,l=!1;t(c=>{l||(c===0?(l=!0,a||r(0)):c.tag===0?n=c[0]:(a&&(o(1),o=Lr),i?i=!1:(i=!0,n(0)),function(d){a=!0,d(f=>{a&&(f===0?(a=!1,l?r(0):i||(i=!0,n(0))):f.tag===0?(s=!1,(o=f[0])(0)):(r(f),s?s=!1:o(0)))})}(e(c[0]))))}),r(ln(c=>{c===1?(l||(l=!0,n(1)),a&&(a=!1,o(1))):(!l&&!i&&(i=!0,n(0)),a&&!s&&(s=!0,o(0)))}))}}function a9(e){return t=>r=>{var n=Lr,o=!1,i=0;t(s=>{o||(s===0?(o=!0,r(0)):s.tag===0?e<=0?(o=!0,r(0),s[0](1)):n=s[0]:i++<e?(r(s),!o&&i>=e&&(o=!0,r(0),n(1))):r(s))}),r(ln(s=>{s===1&&!o?(o=!0,n(1)):s===0&&!o&&i<e&&n(0)}))}}function l9(e){return t=>r=>{var n=Lr,o=Lr,i=!1;t(s=>{i||(s===0?(i=!0,o(1),r(0)):s.tag===0?(n=s[0],e(a=>{a===0||(a.tag===0?(o=a[0])(0):(i=!0,o(1),n(1),r(0)))})):r(s))}),r(ln(s=>{s===1&&!i?(i=!0,n(1),o(1)):i||n(0)}))}}function U4(e,t){return r=>n=>{var o=Lr,i=!1;r(s=>{i||(s===0?(i=!0,n(0)):s.tag===0?(o=s[0],n(s)):e(s[0])?n(s):(i=!0,t&&n(s),n(0),o(1)))})}}function G4(e){return t=>e()(t)}function c9(e){return t=>{var r=e[Z4()]&&e[Z4()]()||e,n=!1,o=!1,i=!1,s;t(ln(async a=>{if(a===1)n=!0,r.return&&r.return();else if(o)i=!0;else{for(i=o=!0;i&&!n;)if((s=await r.next()).done)n=!0,r.return&&await r.return(),t(0);else try{i=!1,t(Sl(s.value))}catch(l){if(r.throw)(n=!!(await r.throw(l)).done)&&t(0);else throw l}o=!1}}))}}function eA(e){return e[Symbol.asyncIterator]?c9(e):t=>{var r=e[Symbol.iterator](),n=!1,o=!1,i=!1,s;t(ln(a=>{if(a===1)n=!0,r.return&&r.return();else if(o)i=!0;else{for(i=o=!0;i&&!n;)if((s=r.next()).done)n=!0,r.return&&r.return(),t(0);else try{i=!1,t(Sl(s.value))}catch(l){if(r.throw)(n=!!r.throw(l).done)&&t(0);else throw l}o=!1}}))}}var tA=eA;function $c(e){return t=>{var r=!1;t(ln(n=>{n===1?r=!0:r||(r=!0,t(Sl(e)),t(0))}))}}function W4(e){return t=>{var r=!1,n=e({next(o){r||t(Sl(o))},complete(){r||(r=!0,t(0))}});t(ln(o=>{o===1&&!r&&(r=!0,n())}))}}function q4(){var e,t;return{source:Hs(W4(r=>(e=r.next,t=r.complete,j4))),next(r){e&&e(r)},complete(){t&&t()}}}function _c(e){return t=>{var r=Lr,n=!1;return t(o=>{o===0?n=!0:o.tag===0?(r=o[0])(0):n||(e(o[0]),r(0))}),{unsubscribe(){n||(n=!0,r(1))}}}}function K4(e){_c(t=>{})(e)}function Y4(e){return new Promise(t=>{var r=Lr,n;e(o=>{o===0?Promise.resolve(n).then(t):o.tag===0?(r=o[0])(0):(n=o[0],r(0))})})}var rA=e=>e&&typeof e.message=="string"&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&typeof e.message=="string"?new Fs(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new Fs(e),_s=class extends Error{constructor(t){var r=(t.graphQLErrors||[]).map(rA),n=((o,i)=>{var s="";if(o)return`[Network] ${o.message}`;if(i)for(var a=0,l=i.length;a<l;a++)s&&(s+=`
|
|
74
|
+
`),s+=`[GraphQL] ${i[a].message}`;return s})(t.networkError,r);super(n),this.name="CombinedError",this.message=n,this.graphQLErrors=r,this.networkError=t.networkError,this.response=t.response}toString(){return this.message}},Bc=(e,t)=>{for(var r=0|(t||5381),n=0,o=0|e.length;n<o;n++)r=(r<<5)+r+e.charCodeAt(n);return r},Ii=new Set,X4=new WeakMap,$s=(e,t)=>{if(e===null||Ii.has(e))return"null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return $s(e.toJSON(),t);if(Array.isArray(e)){for(var r="[",n=0,o=e.length;n<o;n++)r.length>1&&(r+=","),r+=$s(e[n],t)||"null";return r+="]"}else if(!t&&(jc!==Vo&&e instanceof jc||Uc!==Vo&&e instanceof Uc))return"null";var i=Object.keys(e).sort();if(!i.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var s=X4.get(e)||Math.random().toString(36).slice(2);return X4.set(e,s),$s({__key:s},t)}Ii.add(e);for(var a="{",l=0,c=i.length;l<c;l++){var u=$s(e[i[l]],t);u&&(a.length>1&&(a+=","),a+=$s(i[l],t)+":"+u)}return Ii.delete(e),a+="}"},u9=(e,t,r)=>{if(!(r==null||typeof r!="object"||r.toJSON||Ii.has(r)))if(Array.isArray(r))for(var n=0,o=r.length;n<o;n++)u9(e,`${t}.${n}`,r[n]);else if(r instanceof jc||r instanceof Uc)e.set(t,r);else{Ii.add(r);for(var i in r)u9(e,`${t}.${i}`,r[i])}},Zc=(e,t)=>(Ii.clear(),$s(e,t||!1)),Vo=class{},jc=typeof File<"u"?File:Vo,Uc=typeof Blob<"u"?Blob:Vo,nA=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,oA=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,iA=(e,t)=>t%2==0?e.replace(oA,`
|
|
75
|
+
`):e,Q4=e=>e.split(nA).map(iA).join("").trim(),J4=new Map,zc=new Map,qc=e=>{var t;return typeof e=="string"?t=Q4(e):e.loc&&zc.get(e.__key)===e?t=e.loc.source.body:(t=J4.get(e)||Q4(z4(e)),J4.set(e,t)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:"gql",locationOffset:{line:1,column:1}}}),t},em=e=>{var t;if(e.documentId)t=Bc(e.documentId);else if(t=Bc(qc(e)),e.definitions){var r=om(e);r&&(t=Bc(`
|
|
76
|
+
# ${r}`,t))}return t},d9=e=>{var t,r;return typeof e=="string"?(t=em(e),r=zc.get(t)||B4(e,{noLocation:!0})):(t=e.__key||em(e),r=zc.get(t)||e),r.loc||qc(r),r.__key=t,zc.set(t,r),r},Kc=(e,t,r)=>{var n=t||{},o=d9(e),i=Zc(n,!0),s=o.__key;return i!=="{}"&&(s=Bc(i,s)),{key:s,query:o,variables:n,extensions:r}},om=e=>{for(var t=0,r=e.definitions.length;t<r;t++){var n=e.definitions[t];if(n.kind===Ai.OPERATION_DEFINITION)return n.name?n.name.value:void 0}};var Gc=(e,t,r)=>{if(!("data"in t||"errors"in t&&Array.isArray(t.errors)))throw new Error("No Content");var n=e.kind==="subscription";return{operation:e,data:t.data,error:Array.isArray(t.errors)?new _s({graphQLErrors:t.errors,response:r}):void 0,extensions:t.extensions?{...t.extensions}:void 0,hasNext:t.hasNext==null?n:t.hasNext,stale:!1}},Wc=(e,t)=>{if(typeof e=="object"&&e!=null){if(Array.isArray(e)){e=[...e];for(var r=0,n=t.length;r<n;r++)e[r]=Wc(e[r],t[r]);return e}if(!e.constructor||e.constructor===Object){e={...e};for(var o in t)e[o]=Wc(e[o],t[o]);return e}}return t},im=(e,t,r,n)=>{var o=e.error?e.error.graphQLErrors:[],i=!!e.extensions||!!(t.payload||t).extensions,s={...e.extensions,...(t.payload||t).extensions},a=t.incremental;"path"in t&&(a=[t]);var l={data:e.data};if(a)for(var c=function(){var f=a[u];Array.isArray(f.errors)&&o.push(...f.errors),f.extensions&&(Object.assign(s,f.extensions),i=!0);var p="data",m=l,h=[];if(f.path)h=f.path;else if(n){var g=n.find(b=>b.id===f.id);f.subPath?h=[...g.path,...f.subPath]:h=g.path}for(var v=0,C=h.length;v<C;p=h[v++])m=m[p]=Array.isArray(m[p])?[...m[p]]:{...m[p]};if(f.items)for(var x=+p>=0?p:0,w=0,y=f.items.length;w<y;w++)m[x+w]=Wc(m[x+w],f.items[w]);else f.data!==void 0&&(m[p]=Wc(m[p],f.data))},u=0,d=a.length;u<d;u++)c();else l.data=(t.payload||t).data||e.data,o=t.errors||t.payload&&t.payload.errors||o;return{operation:e.operation,data:l.data,error:o.length?new _s({graphQLErrors:o,response:r}):void 0,extensions:i?s:void 0,hasNext:t.hasNext!=null?t.hasNext:e.hasNext,stale:!1}},sm=(e,t,r)=>({operation:e,data:void 0,error:new _s({networkError:t,response:r}),extensions:void 0,hasNext:!1,stale:!1});function am(e){var t={query:void 0,documentId:void 0,operationName:om(e.query),variables:e.variables||void 0,extensions:e.extensions};return"documentId"in e.query&&e.query.documentId&&(!e.query.definitions||!e.query.definitions.length)?t.documentId=e.query.documentId:(!e.extensions||!e.extensions.persistedQuery||e.extensions.persistedQuery.miss)&&(t.query=qc(e.query)),t}var lm=(e,t)=>{var r=e.kind==="query"&&e.context.preferGetMethod;if(!r||!t)return e.context.url;var n=sA(e.context.url);for(var o in t){var i=t[o];i&&n[1].set(o,typeof i=="object"?Zc(i):i)}var s=n.join("?");return s.length>2047&&r!=="force"?(e.context.preferGetMethod=!1,e.context.url):s},sA=e=>{var t=e.indexOf("?");return t>-1?[e.slice(0,t),new URLSearchParams(e.slice(t+1))]:[e,new URLSearchParams]},aA=(e,t)=>{if(t&&!(e.kind==="query"&&e.context.preferGetMethod)){var r=Zc(t),n=(a=>{var l=new Map;return(jc!==Vo||Uc!==Vo)&&(Ii.clear(),u9(l,"variables",a)),l})(t.variables);if(n.size){var o=new FormData;o.append("operations",r),o.append("map",Zc({...[...n.keys()].map(a=>[a])}));var i=0;for(var s of n.values())o.append(""+i++,s);return o}return r}},cm=(e,t)=>{var r={accept:e.kind==="subscription"?"text/event-stream, multipart/mixed":"application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed"},n=(typeof e.context.fetchOptions=="function"?e.context.fetchOptions():e.context.fetchOptions)||{};if(n.headers)if((s=>"has"in s&&!Object.keys(s).length)(n.headers))n.headers.forEach((s,a)=>{r[a]=s});else if(Array.isArray(n.headers))n.headers.forEach((s,a)=>{Array.isArray(s)?r[s[0]]?r[s[0]]=`${r[s[0]]},${s[1]}`:r[s[0]]=s[1]:r[a]=s});else for(var o in n.headers)r[o.toLowerCase()]=n.headers[o];var i=aA(e,t);return typeof i=="string"&&!r["content-type"]&&(r["content-type"]="application/json"),{...n,method:i?"POST":"GET",body:i,headers:r}},lA=typeof TextDecoder<"u"?new TextDecoder:null,cA=/boundary="?([^=";]+)"?/i,uA=/data: ?([^\n]+)/,tm=e=>e.constructor.name==="Buffer"?e.toString():lA.decode(e);async function*rm(e){if(e.body[Symbol.asyncIterator])for await(var t of e.body)yield tm(t);else{var r=e.body.getReader(),n;try{for(;!(n=await r.read()).done;)yield tm(n.value)}finally{r.cancel()}}}async function*nm(e,t){var r="",n;for await(var o of e)for(r+=o;(n=r.indexOf(t))>-1;)yield r.slice(0,n),r=r.slice(n+t.length)}async function*dA(e,t,r){var n=!0,o=null,i;try{yield await Promise.resolve();var s=(i=await(e.context.fetch||fetch)(t,r)).headers.get("Content-Type")||"",a;/multipart\/mixed/i.test(s)?a=async function*(d,f){var p=d.match(cA),m="--"+(p?p[1]:"-"),h=!0,g;for await(var v of nm(rm(f),`\r
|
|
77
|
+
`+m)){if(h){h=!1;var C=v.indexOf(m);if(C>-1)v=v.slice(C+m.length);else continue}try{yield g=JSON.parse(v.slice(v.indexOf(`\r
|
|
78
|
+
\r
|
|
79
|
+
`)+4))}catch(x){if(!g)throw x}if(g&&g.hasNext===!1)break}g&&g.hasNext!==!1&&(yield{hasNext:!1})}(s,i):/text\/event-stream/i.test(s)?a=async function*(d){var f;for await(var p of nm(rm(d),`
|
|
80
|
+
|
|
81
|
+
`)){var m=p.match(uA);if(m){var h=m[1];try{yield f=JSON.parse(h)}catch(g){if(!f)throw g}if(f&&f.hasNext===!1)break}}f&&f.hasNext!==!1&&(yield{hasNext:!1})}(i):/text\//i.test(s)?a=async function*(d){var f=await d.text();try{var p=JSON.parse(f);yield p}catch{throw new Error(f)}}(i):a=async function*(d){yield JSON.parse(await d.text())}(i);var l;for await(var c of a)c.pending&&!o?l=c.pending:c.pending&&(l=[...l,...c.pending]),o=o?im(o,c,i,l):Gc(e,c,i),n=!1,yield o,n=!0;o||(yield o=Gc(e,{},i))}catch(u){if(!n)throw u;yield sm(e,i&&(i.status<200||i.status>=300)&&i.statusText?new Error(i.statusText):u,i)}}function um(e,t,r){var n;return typeof AbortController<"u"&&(r.signal=(n=new AbortController).signal),Vc(()=>{n&&n.abort()})(_t(o=>!!o)(c9(dA(e,t,r))))}var p9=(e,t)=>{if(Array.isArray(e))for(var r=0,n=e.length;r<n;r++)p9(e[r],t);else if(typeof e=="object"&&e!==null)for(var o in e)o==="__typename"&&typeof e[o]=="string"?t.add(e[o]):p9(e[o],t);return t},m9=e=>{if("definitions"in e){for(var t=[],r=0,n=e.definitions.length;r<n;r++){var o=m9(e.definitions[r]);t.push(o)}return{...e,definitions:t}}if("directives"in e&&e.directives&&e.directives.length){for(var i=[],s={},a=0,l=e.directives.length;a<l;a++){var c=e.directives[a],u=c.name.value;u[0]!=="_"?i.push(c):u=u.slice(1),s[u]=c}e={...e,directives:i,_directives:s}}if("selectionSet"in e){var d=[],f=e.kind===Ai.OPERATION_DEFINITION;if(e.selectionSet){for(var p=0,m=e.selectionSet.selections.length;p<m;p++){var h=e.selectionSet.selections[p];f=f||h.kind===Ai.FIELD&&h.name.value==="__typename"&&!h.alias;var g=m9(h);d.push(g)}return f||d.push({kind:Ai.FIELD,name:{kind:Ai.NAME,value:"__typename"},_generated:!0}),{...e,selectionSet:{...e.selectionSet,selections:d}}}}return e},dm=new Map,fA=e=>{var t=d9(e),r=dm.get(t.__key);return r||(dm.set(t.__key,r=m9(t)),Object.defineProperty(r,"__key",{value:t.__key,enumerable:!1})),r};function fm(e){var t=r=>e(r);return t.toPromise=()=>Y4(a9(1)(_t(r=>!r.stale&&!r.hasNext)(t))),t.then=(r,n)=>t.toPromise().then(r,n),t.subscribe=r=>_c(r)(t),t}function Ll(e,t,r){return{...t,kind:e,context:t.context?{...t.context,...r}:r||t.context}}var pm=(e,t)=>Ll(e.kind,e,{meta:{...e.context.meta,...t}}),pA=()=>{};var f9=({kind:e})=>e!=="mutation"&&e!=="query",mA=e=>{var t=fA(e.query);if(t!==e.query){var r=Ll(e.kind,e);return r.query=t,r}else return e},hm=({forward:e,client:t,dispatchDebug:r})=>{var n=new Map,o=new Map,i=s=>s.kind==="query"&&s.context.requestPolicy!=="network-only"&&(s.context.requestPolicy==="cache-only"||n.has(s.key));return s=>{var a=Rl(c=>{var u=n.get(c.key),d=u||Gc(c,{data:null});return d={...d,operation:pm(c,{cacheOutcome:u?"hit":"miss"})},c.context.requestPolicy==="cache-and-network"&&(d.stale=!0,mm(t,c)),d})(_t(c=>!f9(c)&&i(c))(s)),l=Hc(c=>{var{operation:u}=c;if(u){var d=u.context.additionalTypenames||[];if(c.operation.kind!=="subscription"&&(d=(y=>[...p9(y,new Set)])(c.data).concat(d)),c.operation.kind==="mutation"||c.operation.kind==="subscription"){for(var f=new Set,p=0;p<d.length;p++){var m=d[p],h=o.get(m);h||o.set(m,h=new Set);for(var g of h.values())f.add(g);h.clear()}for(var v of f.values())n.has(v)&&(u=n.get(v).operation,n.delete(v),mm(t,u))}else if(u.kind==="query"&&c.data){n.set(u.key,c);for(var C=0;C<d.length;C++){var x=d[C],w=o.get(x);w||o.set(x,w=new Set),w.add(u.key)}}}})(e(_t(c=>c.kind!=="query"||c.context.requestPolicy!=="cache-only")(Rl(c=>pm(c,{cacheOutcome:"miss"}))(Vs([Rl(mA)(_t(c=>!f9(c)&&!i(c))(s)),_t(c=>f9(c))(s)])))));return Vs([a,l])}},mm=(e,t)=>e.reexecuteOperation(Ll(t.kind,t,{requestPolicy:"network-only"}));var gm=({forward:e,dispatchDebug:t})=>r=>{var n=o9(i=>{var s=am(i),a=lm(i,s),l=cm(i,s),c=l9(_t(u=>u.kind==="teardown"&&u.key===i.key)(r))(um(i,a,l));return c})(_t(i=>i.kind!=="teardown"&&(i.kind!=="subscription"||!!i.context.fetchSubscriptions))(r)),o=e(_t(i=>i.kind==="teardown"||i.kind==="subscription"&&!i.context.fetchSubscriptions)(r));return Vs([n,o])},hA=e=>({client:t,forward:r,dispatchDebug:n})=>e.reduceRight((o,i)=>{var s=!1;return i({client:t,forward(a){return Hs(o(Hs(a)))},dispatchDebug(a){}})},r);var gA=({dispatchDebug:e})=>t=>_t(r=>!1)(t),vm=function e(t){var r=0,n=new Map,o=new Map,i=new Set,s=[],a={url:t.url,fetchSubscriptions:t.fetchSubscriptions,fetchOptions:t.fetchOptions,fetch:t.fetch,preferGetMethod:t.preferGetMethod,requestPolicy:t.requestPolicy||"cache-first"},l=q4();function c(w){(w.kind==="mutation"||w.kind==="teardown"||!i.has(w.key))&&(w.kind==="teardown"?i.delete(w.key):w.kind!=="mutation"&&i.add(w.key),l.next(w))}var u=!1;function d(w){if(w&&c(w),!u){for(u=!0;u&&(w=s.shift());)c(w);u=!1}}var f=w=>{var y=l9(_t(b=>b.kind==="teardown"&&b.key===w.key)(l.source))(_t(b=>b.operation.kind===w.kind&&b.operation.key===w.key&&(!b.operation.context._instance||b.operation.context._instance===w.context._instance))(x));return w.kind!=="query"?y=U4(b=>!!b.hasNext,!0)(y):y=s9(b=>{var R=$c(b);return b.stale||b.hasNext?R:Vs([R,Rl(()=>(b.stale=!0,b))(a9(1)(_t(L=>L.key===w.key)(l.source)))])})(y),w.kind!=="mutation"?y=Vc(()=>{i.delete(w.key),n.delete(w.key),o.delete(w.key),u=!1;for(var b=s.length-1;b>=0;b--)s[b].key===w.key&&s.splice(b,1);c(Ll("teardown",w,w.context))})(Hc(b=>{if(b.stale)if(!b.hasNext)i.delete(w.key);else for(var R=0;R<s.length;R++){var L=s[R];if(L.key===b.operation.key){i.delete(L.key);break}}else b.hasNext||i.delete(w.key);n.set(w.key,b)})(y)):y=i9(()=>{c(w)})(y),Hs(y)},p=this instanceof e?this:Object.create(e.prototype),m=Object.assign(p,{suspense:!!t.suspense,operations$:l.source,reexecuteOperation(w){if(w.kind==="teardown")d(w);else if(w.kind==="mutation")s.push(w),Promise.resolve().then(d);else if(o.has(w.key)){for(var y=!1,b=0;b<s.length;b++)s[b].key===w.key&&(s[b]=w,y=!0);y||i.has(w.key)&&w.context.requestPolicy!=="network-only"?(i.delete(w.key),Promise.resolve().then(d)):(s.push(w),Promise.resolve().then(d))}},createRequestOperation(w,y,b){b||(b={});var R;return Ll(w,y,{_instance:w==="mutation"?r=r+1|0:void 0,...a,...b,requestPolicy:b.requestPolicy||a.requestPolicy,suspense:b.suspense||b.suspense!==!1&&m.suspense})},executeRequestOperation(w){return w.kind==="mutation"?fm(f(w)):fm(G4(()=>{var y=o.get(w.key);y||o.set(w.key,y=f(w)),y=i9(()=>{d(w)})(y);var b=n.get(w.key);return w.kind==="query"&&b&&(b.stale||b.hasNext)?s9($c)(Vs([y,_t(R=>R===n.get(w.key))($c(b))])):y}))},executeQuery(w,y){var b=m.createRequestOperation("query",w,y);return m.executeRequestOperation(b)},executeSubscription(w,y){var b=m.createRequestOperation("subscription",w,y);return m.executeRequestOperation(b)},executeMutation(w,y){var b=m.createRequestOperation("mutation",w,y);return m.executeRequestOperation(b)},readQuery(w,y,b){var R=null;return _c(L=>{R=L})(m.query(w,y,b)).unsubscribe(),R},query:(w,y,b)=>m.executeQuery(Kc(w,y),b),subscription:(w,y,b)=>m.executeSubscription(Kc(w,y),b),mutation:(w,y,b)=>m.executeMutation(Kc(w,y),b)}),h=pA;if(0)var g,v;var C=hA(t.exchanges),x=Hs(C({client:m,dispatchDebug:h,forward:gA({dispatchDebug:h})})(l.source));return K4(x),m};var vA="1.1.2",Pi=class{constructor(e){let t={};e.headers&&Object.assign(t,e.headers),e.publicApiKey&&(t["x-copilotcloud-public-api-key"]=e.publicApiKey),this.client=new vm({url:e.url,exchanges:[hm,gm],fetchOptions:{headers:{...t,"X-CopilotKit-Runtime-Client-GQL-Version":vA},...e.credentials?{credentials:e.credentials}:{}}})}generateCopilotResponse({data:e,properties:t,signal:r}){return this.client.mutation(V4,{data:e,properties:t},{fetch:(o,i)=>fetch(o,{...i,signal:r})})}static asStream(e){return new ReadableStream({start(t){e.subscribe(({data:r,hasNext:n})=>{t.enqueue(r),n||t.close()})}})}};var Yc=class{constructor(e){e.id??(e.id=an()),e.status??(e.status={code:"Success"}),e.createdAt??(e.createdAt=new Date),Object.assign(this,e)}},ot=Ns,Te=class extends Yc{constructor(e){super(e)}},vt=class extends Yc{constructor(e){super(e)}},pr=class extends Yc{constructor(e){super(e)}static decodeResult(e){try{return JSON.parse(e)}catch{return e}}static encodeResult(e){return e===void 0?"":typeof e=="string"?e:JSON.stringify(e)}};import CA from"untruncate-json";function Ml(e){return e.map(t=>{if(t instanceof Te)return{id:t.id,createdAt:t.createdAt,textMessage:{content:t.content,role:t.role}};if(t instanceof vt)return{id:t.id,createdAt:t.createdAt,actionExecutionMessage:{name:t.name,arguments:JSON.stringify(t.arguments),scope:t.scope}};if(t instanceof pr)return{id:t.id,createdAt:t.createdAt,resultMessage:{result:t.result,actionExecutionId:t.actionExecutionId,actionName:t.actionName}};throw new Error("Unknown message type")})}function El(e){return e.map(t=>{if(t.__typename==="TextMessageOutput")return new Te({id:t.id,role:t.role,content:t.content.join(""),createdAt:new Date,status:t.status||{code:"Pending"}});if(t.__typename==="ActionExecutionMessageOutput")return new vt({id:t.id,name:t.name,arguments:xA(t.arguments),scope:t.scope,createdAt:new Date,status:t.status||{code:"Pending"}});if(t.__typename==="ResultMessageOutput")return new pr({id:t.id,result:t.result,actionExecutionId:t.actionExecutionId,actionName:t.actionName,createdAt:new Date,status:t.status||{code:"Pending"}});throw new Error("Unknown message type")})}function xA(e){try{return JSON.parse(CA(e.join("")))}catch{return{}}}function h9(e){return Br(this,arguments,function*({context:t,instructions:r,parameters:n,include:o,data:i,abortSignal:s,stream:a,requestType:l=Do.Task}){var c,u;let{messages:d}=t,f={name:"extract",parameters:n,handler:R=>{}},p=(c=o?.readable)!=null?c:!1,m=(u=o?.messages)!=null?u:!1,h="";i&&(h=(typeof i=="string"?i:JSON.stringify(i))+`
|
|
82
|
+
|
|
83
|
+
`),p&&(h+=t.getContextString([],to));let g=new Te({content:wA(h,r),role:ot.System}),v=ct(ct({},t.copilotApiConfig.headers||{}),t.copilotApiConfig.publicApiKey?{[wl]:t.copilotApiConfig.publicApiKey}:{}),C=new Pi({url:t.copilotApiConfig.chatApiEndpoint,publicApiKey:t.copilotApiConfig.publicApiKey,headers:v,credentials:t.copilotApiConfig.credentials}),w=Pi.asStream(C.generateCopilotResponse({data:{frontend:{actions:[{name:f.name,description:f.description||"",jsonSchema:JSON.stringify(Ti(f.parameters||[]))}]},messages:Ml(m?[g,...d]:[g]),metadata:{requestType:l},forwardedParameters:{toolChoice:"function",toolChoiceFunctionName:f.name}},properties:t.copilotApiConfig.properties,signal:s})).getReader(),y=!0,b;for(;;){let{done:R,value:L}=yield w.read();if(R)break;if(s?.aborted)throw new Error("Aborted");b=El(L.generateCopilotResponse.messages).find(E=>E instanceof vt),b&&(a?.({status:y?"initial":"inProgress",args:b.arguments}),y=!1)}if(!b)throw new Error("extract() failed: No function call occurred");return a?.({status:"complete",args:b.arguments}),b.arguments})}function wA(e,t){return`
|
|
84
|
+
Please act as an efficient, competent, conscientious, and industrious professional assistant.
|
|
85
|
+
|
|
86
|
+
Help the user achieve their goals, and you do so in a way that is as efficient as possible, without unnecessary fluff, but also without sacrificing professionalism.
|
|
87
|
+
Always be polite and respectful, and prefer brevity over verbosity.
|
|
88
|
+
|
|
89
|
+
The user has provided you with the following context:
|
|
90
|
+
\`\`\`
|
|
91
|
+
${e}
|
|
92
|
+
\`\`\`
|
|
93
|
+
|
|
94
|
+
They have also provided you with a function called extract you MUST call to initiate actions on their behalf.
|
|
95
|
+
|
|
96
|
+
Please assist them as best you can.
|
|
97
|
+
|
|
98
|
+
This is not a conversation, so please do not ask questions. Just call the function without saying anything else.
|
|
99
|
+
|
|
100
|
+
The user has given you the following task to complete:
|
|
101
|
+
|
|
102
|
+
\`\`\`
|
|
103
|
+
${t}
|
|
104
|
+
\`\`\`
|
|
105
|
+
|
|
106
|
+
Any additional messages provided are for providing context only and should not be used to ask questions or engage in conversation.
|
|
107
|
+
`}import{useContext as bA,useEffect as yA,useRef as SA}from"react";function RA(e,t){return`${e}: ${typeof t=="string"?t:JSON.stringify(t)}`}function Tl({description:e,value:t,parentId:r,categories:n,convert:o},i){let{addContext:s,removeContext:a}=bA(Ln),l=SA();o=o||RA;let c=o(e,t);return yA(()=>{let u=s(c,r,n);return l.current=u,()=>{a(u)}},[c,r,s,a,...i||[]]),l.current}import{useRef as LA,useContext as MA,useEffect as EA}from"react";function zr(e,t){let{setAction:r,removeAction:n,actions:o,chatComponentsCache:i}=MA(Ln),s=LA(an());t===void 0&&o[s.current]&&(o[s.current].handler=e.handler,typeof e.render=="function"&&i.current!==null&&(i.current[e.name]=e.render)),EA(()=>(r(s.current,e),i.current!==null&&e.render!==void 0&&(i.current[e.name]=e.render),()=>{n(s.current)}),[r,n,e.description,e.name,JSON.stringify(e.parameters),typeof e.render=="string"?e.render:void 0,...t||[]])}import{useRef as g9}from"react";function Cm(e){let{messages:t,setMessages:r,makeSystemMessageCallback:n,copilotConfig:o,setIsLoading:i,initialMessages:s,isLoading:a,actions:l,onFunctionCall:c}=e,u=g9(),d=g9(null),f=g9(null),p=o.publicApiKey,m=ct(ct({},o.headers||{}),p?{[wl]:p}:{}),h=new Pi({url:o.chatApiEndpoint,publicApiKey:o.publicApiKey,headers:m,credentials:o.credentials}),g=y=>Br(this,null,function*(){var b,R,L,E,S,A,k,I,N;i(!0);let D=[new Te({content:"",role:ot.Assistant})],F=new AbortController;u.current=F,r([...y,...D]);let P=[n(),...s||[],...y],O=Pi.asStream(h.generateCopilotResponse({data:_r(ct({frontend:{actions:l.map(T=>({name:T.name,description:T.description||"",jsonSchema:JSON.stringify(Ti(T.parameters||[]))}))},threadId:d.current,runId:f.current,messages:Ml(P)},o.cloud?{cloud:ct({},(L=(R=(b=o.cloud.guardrails)==null?void 0:b.input)==null?void 0:R.restrictToTopic)!=null&&L.enabled?{guardrails:{inputValidationRules:{allowList:o.cloud.guardrails.input.restrictToTopic.validTopics,denyList:o.cloud.guardrails.input.restrictToTopic.invalidTopics}}}:{})}:{}),{metadata:{requestType:Do.Chat}}),properties:o.properties,signal:(E=u.current)==null?void 0:E.signal})),M=((k=(A=(S=o.cloud)==null?void 0:S.guardrails)==null?void 0:A.input)==null?void 0:k.restrictToTopic.enabled)||!1,Z=O.getReader(),J={};try{for(;;){let{done:T,value:W}=yield Z.read();if(T)break;if(!W?.generateCopilotResponse)continue;d.current=W.generateCopilotResponse.threadId||null,f.current=W.generateCopilotResponse.runId||null;let ve=El(W.generateCopilotResponse.messages);if(ve.length!==0){if(D=[],((I=W.generateCopilotResponse.status)==null?void 0:I.__typename)==="FailedResponseStatus"&&W.generateCopilotResponse.status.reason==="GUARDRAILS_VALIDATION_FAILED")D=[new Te({role:Ns.Assistant,content:((N=W.generateCopilotResponse.status.details)==null?void 0:N.guardrailsReason)||""})];else for(let Le of ve)if(D.push(Le),Le instanceof vt&&Le.status.code!==No.Pending&&Le.scope==="client"&&c){if(!(Le.id in J)){if(M&&W.generateCopilotResponse.status===void 0)break;let ae=yield c({messages:y,name:Le.name,args:Le.arguments});J[Le.id]=ae}D.push(new pr({result:pr.encodeResult(J[Le.id]),actionExecutionId:Le.id,actionName:Le.name}))}D.length>0&&r([...y,...D])}}return Object.values(J).length||D.length&&D[D.length-1]instanceof pr?(yield new Promise(T=>setTimeout(T,10)),yield g([...y,...D])):D.slice()}finally{i(!1)}}),v=y=>Br(this,null,function*(){yield g(y)});return{append:y=>Br(this,null,function*(){if(a)return;let b=[...t,y];return r(b),v(b)}),reload:()=>Br(this,null,function*(){if(a||t.length===0)return;let y=[...t],b=t[t.length-1];return b instanceof Te&&b.role==="assistant"&&(y=y.slice(0,-1)),r(y),v(y)}),stop:()=>{var y;(y=u.current)==null||y.abort()}}}import{useContext as TA,useRef as kA,useEffect as AA,useCallback as xm}from"react";function cn(e={}){var t=e,{makeSystemMessage:r}=t,n=bl(t,["makeSystemMessage"]);let{getContextString:o,getFunctionCallHandler:i,copilotApiConfig:s,messages:a,setMessages:l,isLoading:c,setIsLoading:u,chatInstructions:d,actions:f}=TA(Ln),p=IA(o),m=xm(x=>{l(w=>w.filter(y=>y.id!==x))},[l]),h=xm(()=>{let x=r||PA,w=p.current([],to);return new Te({content:x(w,d),role:ot.System})},[o,r,d]),{append:g,reload:v,stop:C}=Cm(_r(ct({},n),{actions:Object.values(f),copilotConfig:s,initialMessages:n.initialMessages||[],onFunctionCall:i(),messages:a,setMessages:l,makeSystemMessageCallback:h,isLoading:c,setIsLoading:u}));return{visibleMessages:a,appendMessage:g,setMessages:l,reloadMessages:v,stopGeneration:C,deleteMessage:m,isLoading:c}}function IA(e){let t=kA(e);return AA(()=>{t.current=e},[e]),t}function PA(e,t){return`
|
|
108
|
+
Please act as an efficient, competent, conscientious, and industrious professional assistant.
|
|
109
|
+
|
|
110
|
+
Help the user achieve their goals, and you do so in a way that is as efficient as possible, without unnecessary fluff, but also without sacrificing professionalism.
|
|
111
|
+
Always be polite and respectful, and prefer brevity over verbosity.
|
|
112
|
+
|
|
113
|
+
The user has provided you with the following context:
|
|
114
|
+
\`\`\`
|
|
115
|
+
${e}
|
|
116
|
+
\`\`\`
|
|
117
|
+
|
|
118
|
+
They have also provided you with functions you can call to initiate actions on their behalf, or functions you can call to receive more information.
|
|
119
|
+
|
|
120
|
+
Please assist them as best you can.
|
|
121
|
+
|
|
122
|
+
You can ask them for clarifying questions if needed, but don't be annoying about it. If you can reasonably 'fill in the blanks' yourself, do so.
|
|
123
|
+
|
|
124
|
+
If you would like to call a function, call it without saying anything else.
|
|
125
|
+
`+(t?`
|
|
126
|
+
|
|
127
|
+
${t}`:"")}import OA,{useCallback as v9,useEffect as DA}from"react";import{jsx as NA}from"react/jsx-runtime";var ym=({open:e,setOpen:t,children:r,clickOutsideToClose:n,shortcut:o,hitEscapeToClose:i})=>{let s=OA.useRef(null),a=v9(u=>{var d;if(!n)return;let f=(d=s.current)==null?void 0:d.parentElement,p="";u.target instanceof HTMLElement&&(p=u.target.className),e&&f&&!f.contains(u.target)&&!p.includes("copilotKitDebugMenu")&&t(!1)},[n,e,t]),l=v9(u=>{var d;let f=u.target,p=f.tagName==="INPUT"||f.tagName==="SELECT"||f.tagName==="TEXTAREA"||f.isContentEditable,m=(d=s.current)==null?void 0:d.contains(f);e&&u.key==="Escape"&&(!p||m)&&i?t(!1):u.key===o&&(bm()&&u.metaKey||!bm()&&u.ctrlKey)&&(!p||m)&&t(!e)},[i,o,e,t]),c=v9(()=>{let u=s.current,d=window.visualViewport;!u||!d||(window.innerWidth<640&&e?(u.style.height=`${d.height}px`,u.style.left=`${d.offsetLeft}px`,u.style.top=`${d.offsetTop}px`,document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height=`${window.innerHeight}px`,document.body.style.overflow="hidden",document.body.style.touchAction="none",document.body.addEventListener("touchmove",wm,{passive:!1})):(u.style.height="",u.style.left="",u.style.top="",document.body.style.position="",document.body.style.height="",document.body.style.width="",document.body.style.overflow="",document.body.style.top="",document.body.style.touchAction="",document.body.removeEventListener("touchmove",wm)))},[e]);return DA(()=>(document.addEventListener("mousedown",a),document.addEventListener("keydown",l),window.visualViewport&&(window.visualViewport.addEventListener("resize",c),c()),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",l),window.visualViewport&&window.visualViewport.removeEventListener("resize",c)}),[c,a,l]),NA("div",{className:`copilotKitWindow${e?" open":""}`,ref:s,children:r})},wm=e=>{let t=e.target;((n,o)=>{for(;n&&n!==document.body;){if(n.classList.contains(o))return!0;n=n.parentElement}return!1})(t,"copilotKitMessages")||e.preventDefault()};function bm(){return/Mac|iMac|Macintosh/i.test(navigator.userAgent)}var FA=Object.defineProperty,VA=Object.defineProperties,HA=Object.getOwnPropertyDescriptors,Xc=Object.getOwnPropertySymbols,Rm=Object.prototype.hasOwnProperty,Lm=Object.prototype.propertyIsEnumerable,Sm=(e,t,r)=>t in e?FA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Bt=(e,t)=>{for(var r in t||(t={}))Rm.call(t,r)&&Sm(e,r,t[r]);if(Xc)for(var r of Xc(t))Lm.call(t,r)&&Sm(e,r,t[r]);return e},En=(e,t)=>VA(e,HA(t)),Oi=(e,t)=>{var r={};for(var n in e)Rm.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&Xc)for(var n of Xc(e))t.indexOf(n)<0&&Lm.call(e,n)&&(r[n]=e[n]);return r},Tn=(e,t,r)=>new Promise((n,o)=>{var i=l=>{try{a(r.next(l))}catch(c){o(c)}},s=l=>{try{a(r.throw(l))}catch(c){o(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);a((r=r.apply(e,t)).next())});import{jsx as Ie,jsxs as C9}from"react/jsx-runtime";var Mm=Ie("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"24",height:"24",children:Ie("g",{transform:"translate(24, 0) scale(-1, 1)",children:Ie("path",{fillRule:"evenodd",d:"M5.337 21.718a6.707 6.707 0 01-.533-.074.75.75 0 01-.44-1.223 3.73 3.73 0 00.814-1.686c.023-.115-.022-.317-.254-.543C3.274 16.587 2.25 14.41 2.25 12c0-5.03 4.428-9 9.75-9s9.75 3.97 9.75 9c0 5.03-4.428 9-9.75 9-.833 0-1.643-.097-2.417-.279a6.721 6.721 0 01-4.246.997z",clipRule:"evenodd"})})}),Em=Ie("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",width:"24",height:"24",children:Ie("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 8.25l-7.5 7.5-7.5-7.5"})}),Tm=Ie("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",width:"24",height:"24",children:Ie("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),km=Ie("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",width:"24",height:"24",children:Ie("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5"})}),Am=C9("svg",{style:{animation:"copilotKitSpinAnimation 1s linear infinite",color:"rgb(107 114 128)"},width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ie("circle",{style:{opacity:.25},cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Ie("path",{style:{opacity:.75},fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),Qc=C9("svg",{style:{animation:"copilotKitSpinAnimation 1s linear infinite"},width:"13",height:"13",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[Ie("circle",{style:{opacity:.25},cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),Ie("path",{style:{opacity:.75},fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),Im=C9("svg",{style:{display:"inline-block",marginLeft:"0.25rem",marginRight:"0.25rem"},height:"24",width:"24",viewBox:"0 0 27 27",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",children:[Ie("circle",{className:"copilotKitActivityDot1",cx:"4",cy:"12",r:"3"}),Ie("circle",{className:"copilotKitActivityDot1 copilotKitActivityDot2",cx:"12",cy:"12",r:"3"}),Ie("circle",{className:"copilotKitActivityDot1 copilotKitActivityDot3",cx:"20",cy:"12",r:"3"})]});function Pm(e){var t=e,{className:r}=t,n=Oi(t,["className"]);return Ie("svg",En(Bt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",style:{height:"1rem",width:"1rem"},className:r},n),{children:Ie("path",{d:"m229.66 77.66-128 128a8 8 0 0 1-11.32 0l-56-56a8 8 0 0 1 11.32-11.32L96 188.69 218.34 66.34a8 8 0 0 1 11.32 11.32Z"})}))}function Om(e){var t=e,{className:r}=t,n=Oi(t,["className"]);return Ie("svg",En(Bt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",style:{height:"1rem",width:"1rem"},className:r},n),{children:Ie("path",{d:"M224 152v56a16 16 0 0 1-16 16H48a16 16 0 0 1-16-16v-56a8 8 0 0 1 16 0v56h160v-56a8 8 0 0 1 16 0Zm-101.66 5.66a8 8 0 0 0 11.32 0l40-40a8 8 0 0 0-11.32-11.32L136 132.69V40a8 8 0 0 0-16 0v92.69l-26.34-26.35a8 8 0 0 0-11.32 11.32Z"})}))}function Dm(e){var t=e,{className:r}=t,n=Oi(t,["className"]);return Ie("svg",En(Bt({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",style:{height:"1rem",width:"1rem"},className:r},n),{children:Ie("path",{d:"M216 32H88a8 8 0 0 0-8 8v40H40a8 8 0 0 0-8 8v128a8 8 0 0 0 8 8h128a8 8 0 0 0 8-8v-40h40a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8Zm-56 176H48V96h112Zm48-48h-32V88a8 8 0 0 0-8-8H96V48h112Z"})}))}var Nm=Ie("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",style:{height:"1rem",width:"1rem"},children:Ie("path",{d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24Zm0 192a88 88 0 1 1 88-88 88.1 88.1 0 0 1-88 88Zm24-120h-48a8 8 0 0 0-8 8v48a8 8 0 0 0 8 8h48a8 8 0 0 0 8-8v-48a8 8 0 0 0-8-8Zm-8 48h-32v-32h32Z"})}),Fm=Ie("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",fill:"currentColor",style:{height:"1rem",width:"1rem"},children:Ie("path",{d:"M197.67 186.37a8 8 0 0 1 0 11.29C196.58 198.73 170.82 224 128 224c-37.39 0-64.53-22.4-80-39.85V208a8 8 0 0 1-16 0v-48a8 8 0 0 1 8-8h48a8 8 0 0 1 0 16H55.44C67.76 183.35 93 208 128 208c36 0 58.14-21.46 58.36-21.68a8 8 0 0 1 11.31.05ZM216 40a8 8 0 0 0-8 8v23.85C192.53 54.4 165.39 32 128 32c-42.82 0-68.58 25.27-69.66 26.34a8 8 0 0 0 11.3 11.34C69.86 69.46 92 48 128 48c35 0 60.24 24.65 72.56 40H168a8 8 0 0 0 0 16h48a8 8 0 0 0 8-8V48a8 8 0 0 0-8-8Z"})}),Vm=Ie("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",children:Ie("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 18.75a6 6 0 0 0 6-6v-1.5m-6 7.5a6 6 0 0 1-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 0 1-3-3V4.5a3 3 0 1 1 6 0v8.25a3 3 0 0 1-3 3Z"})});import Hm from"react";import{jsx as $A}from"react/jsx-runtime";var kl=Hm.createContext(void 0);function Tt(){let e=Hm.useContext(kl);if(e===void 0)throw new Error("Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?");return e}var Jc=({labels:e,icons:t,children:r,open:n,setOpen:o})=>{let i={labels:Bt(Bt({},{initial:"",title:"CopilotKit",placeholder:"Type a message...",error:"\u274C An error occurred. Please try again.",stopGenerating:"Stop generating",regenerateResponse:"Regenerate response"}),e),icons:Bt(Bt({},{openIcon:Mm,closeIcon:Em,headerCloseIcon:Tm,sendIcon:km,activityIcon:Im,spinnerIcon:Am,stopIcon:Nm,regenerateIcon:Fm,pushToTalkIcon:Vm}),t),open:n,setOpen:o};return $A(kl.Provider,{value:i,children:r})};import{jsx as $m,jsxs as _A}from"react/jsx-runtime";var _m=({setOpen:e})=>{let t=Tt();return _A("div",{className:"copilotKitHeader",children:[$m("div",{children:t.labels.title}),$m("button",{onClick:()=>e(!1),"aria-label":"Close",children:t.icons.headerCloseIcon})]})};import{jsx as x9,jsxs as BA}from"react/jsx-runtime";var Bm=({open:e,setOpen:t})=>{let r=Tt();return x9("div",{onClick:()=>t(!e),children:BA("button",{className:`copilotKitButton ${e?"open":""}`,"aria-label":e?"Close Chat":"Open Chat",children:[x9("div",{className:"copilotKitButtonIcon copilotKitButtonIconOpen",children:r.icons.openIcon}),x9("div",{className:"copilotKitButtonIcon copilotKitButtonIconClose",children:r.icons.closeIcon})]})})};import{jsx as zA,jsxs as ZA}from"react/jsx-runtime";function zm({title:e,message:t,onClick:r,partial:n,className:o}){return ZA("button",{disabled:n,onClick:i=>{i.preventDefault(),r(t)},className:o||"suggestion",children:[n&&Qc,zA("span",{children:e})]})}var Zm=(e,t,r,n)=>Tn(void 0,null,function*(){let o=n.current,i=JSON.stringify(Object.values(e.actions).map(a=>({name:a.name,description:a.description,jsonSchema:JSON.stringify(Ti(a.parameters))}))),s=[];for(let a of Object.values(t))try{let l=a.minSuggestions===0?`Produce up to ${a.maxSuggestions} suggestions. If there are no highly relevant suggestions you can think of, provide an empty array.`:`Produce between ${a.minSuggestions} and ${a.maxSuggestions} suggestions.`,c=yield h9({context:e,instructions:"Suggest what the user could say next. Provide clear, highly relevant suggestions. Do not literally suggest function calls. "+a.instructions+`
|
|
128
|
+
|
|
129
|
+
`+l,data:"Available tools: "+i+`
|
|
130
|
+
|
|
131
|
+
`,requestType:Do.Task,parameters:[{name:"suggestions",type:"object[]",attributes:[{name:"title",description:"The title of the suggestion. This is shown as a button and should be short.",type:"string"},{name:"message",description:"The message to send when the suggestion is clicked. This should be a clear, complete sentence and will be sent as an instruction to the AI.",type:"string"}]}],include:{messages:!0,readable:!0},abortSignal:o?.signal,stream:({status:u,args:d})=>{let f=d.suggestions||[],p=[];for(let m=0;m<f.length&&!(a.maxSuggestions!==void 0&&m>=a.maxSuggestions);m++){let{title:h,message:g}=f[m],v=m==f.length-1&&u!=="complete";p.push({title:h,message:g,partial:v,className:a.className})}r([...s,...p])}});s.push(...c.suggestions)}catch(l){console.error("Error loading suggestions",l)}n.current===o&&(n.current=null)});function jm(e){return typeof e=="boolean"?e:eu()==="localhost"||eu()==="127.0.0.1"||eu()==="0.0.0.0"||eu()==="::1"}function eu(){return typeof window<"u"&&window.location?window.location.hostname:""}function Um(e,t=!1){return Tn(this,null,function*(){let r="__copilotkit_version_check__",n=localStorage.getItem(r);if(n&&!t)try{let o=JSON.parse(n),i=60*60*1e3,s=new Date().getTime();if(o.current===e&&s-new Date(o.lastChecked).getTime()<i)return o}catch(o){console.error("Failed to parse CopilotKitVersion from localStorage",o)}try{let i=yield(yield fetch("https://api.cloud.stagingcopilotkit.ai/check-for-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({packages:[{packageName:"@copilotkit/shared",packageVersion:e}]})})).json(),s={current:e,lastChecked:new Date().getTime(),latest:i.packages[0].latestVersion,severity:i.packages[0].severity,advisory:i.packages[0].advisory||null};return localStorage.setItem(r,JSON.stringify(s)),s}catch(o){throw console.error("Failed to check for updates",o),o}})}function Gm(e){let t=e.getContextString([],to).trim();if(t.length===0){console.log("No readables found");return}console.log(t)}function Wm(e){if(Object.values(e.actions).length===0){console.log("No actions found");return}for(let t of Object.values(e.actions))console.group(t.name),console.log("name",t.name),console.log("description",t.description),console.log("parameters",t.parameters),console.groupEnd()}import{jsx as it,jsxs as jA}from"react/jsx-runtime";var qm=it("svg",{width:"13.3967723px",height:"12px",viewBox:"0 0 13.3967723 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:it("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:it("g",{id:"exclamation-triangle",fill:"#CD2121",children:it("path",{d:"M5.39935802,0.75 C5.97670802,-0.25 7.42007802,-0.25 7.99742802,0.75 L13.193588,9.75 C13.770888,10.75 13.049288,12 11.894588,12 L1.50223802,12 C0.34753802,12 -0.37414898,10.75 0.20319802,9.75 L5.39935802,0.75 Z M6.69838802,2.5 C7.11260802,2.5 7.44838802,2.83579 7.44838802,3.25 L7.44838802,6.25 C7.44838802,6.66421 7.11260802,7 6.69838802,7 C6.28417802,7 5.94838802,6.66421 5.94838802,6.25 L5.94838802,3.25 C5.94838802,2.83579 6.28417802,2.5 6.69838802,2.5 Z M6.69838802,10.5 C7.25067802,10.5 7.69838802,10.0523 7.69838802,9.5 C7.69838802,8.9477 7.25067802,8.5 6.69838802,8.5 C6.14610802,8.5 5.69838802,8.9477 5.69838802,9.5 C5.69838802,10.0523 6.14610802,10.5 6.69838802,10.5 Z",id:"Shape"})})})}),Km=it("svg",{width:"14px",height:"14px",viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:it("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:it("g",{id:"exclamation-circle",fill:"#EC662C",children:it("path",{d:"M7,14 C10.866,14 14,10.866 14,7 C14,3.13401 10.866,0 7,0 C3.13401,0 0,3.13401 0,7 C0,10.866 3.13401,14 7,14 Z M7,3 C7.41421,3 7.75,3.33579 7.75,3.75 L7.75,6.75 C7.75,7.16421 7.41421,7.5 7,7.5 C6.58579,7.5 6.25,7.16421 6.25,6.75 L6.25,3.75 C6.25,3.33579 6.58579,3 7,3 Z M7,11 C7.55228,11 8,10.5523 8,10 C8,9.4477 7.55228,9 7,9 C6.44772,9 6,9.4477 6,10 C6,10.5523 6.44772,11 7,11 Z",id:"Shape"})})})}),Ym=it("svg",{width:"7px",height:"4px",viewBox:"0 0 7 4",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:it("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:it("g",{id:"Group",fill:"#000000",fillRule:"nonzero",children:it("path",{d:"M3.71690723,3.90271086 C3.59268176,4.03242971 3.39143629,4.03242971 3.26721082,3.90271086 L0.0853966595,0.57605615 C-0.0314221035,0.444981627 -0.0279751448,0.240725043 0.0931934622,0.114040675 C0.214362069,-0.0126436935 0.409725445,-0.0162475626 0.535093061,0.105888951 L3.49205902,3.19746006 L6.44902499,0.105888951 C6.52834574,0.0168884389 6.64780588,-0.0197473458 6.7605411,0.0103538404 C6.87327633,0.0404550266 6.96130636,0.132492308 6.99009696,0.250359396 C7.01888756,0.368226483 6.98384687,0.493124608 6.89872139,0.57605615 L3.71690723,3.90271086 Z",id:"Path"})})})}),Xm=it("svg",{width:"14px",height:"14px",viewBox:"0 0 14 14",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:it("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:it("g",{id:"Group-2",transform:"translate(-118, 0)",fill:"#1BC030",fillRule:"nonzero",children:it("g",{id:"Group",transform:"translate(118, 0)",children:it("path",{d:"M0,7 C0,3.13384615 3.13384615,0 7,0 C10.8661538,0 14,3.13384615 14,7 C14,10.8661538 10.8661538,14 7,14 C3.13384615,14 0,10.8661538 0,7 Z M9.59179487,5.69764103 C9.70905818,5.54139023 9.73249341,5.33388318 9.65303227,5.15541491 C9.57357113,4.97694665 9.40367989,4.85551619 9.20909814,4.83811118 C9.01451638,4.82070616 8.82577109,4.91005717 8.71589744,5.07158974 L6.39261538,8.32389744 L5.22666667,7.15794872 C5.01450582,6.96025518 4.68389046,6.9660885 4.47883563,7.17114332 C4.27378081,7.37619815 4.26794748,7.70681351 4.46564103,7.91897436 L6.08102564,9.53435897 C6.19289944,9.64614839 6.3482622,9.70310251 6.50588106,9.69010587 C6.66349993,9.67710922 6.80743532,9.59547613 6.89948718,9.46687179 L9.59179487,5.69764103 L9.59179487,5.69764103 Z",id:"Shape"})})})})}),Qm=jA("svg",{width:"33px",height:"35px",viewBox:"0 0 33 35",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:[it("title",{children:"bd5c9079-929b-4d55-bdc9-16d1c8181b71"}),it("g",{id:"Page-1",stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:it("image",{x:"0",y:"0",width:"33",height:"35",xlinkHref:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAACXCAYAAAAoE9hYAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAjaADAAQAAAABAAAAlwAAAACI8Oz3AABAAElEQVR4Ae2dCYAlVXnvv6q79d7TMz37sIMgKKBCkLhkSKK4xJUMQVzAqJBgNDGJa2LsvJfERI0aiEbwRXnoQ2VYRASiQUFRUGQm7DAwzDBbT+/rvbfvXu/3P1V1+84CzEw3MNPD6a579nOqzvev73znO0t59rzZbQu88sXndp2w4gVLp5oG+6+47ivDu010kAb6B+lzP+Vjr1zZk0xV/ddMVIufap/34g+e+s9rX9351U1dT5npIIpMHkTPusePmto+tKhctVWPDW1/c27hIVNbCsFbCpa7/aR/f/SWFV2ZX974zsNG97iwOZjwedDshqiZlL3AD9JH9Y8PpTYMPJEuLj7+pclE5vBquXZ6MV/56Zu/ueGnmWpqzer3HzKym+xzPsib80+4lw/Y09Pjr7lm9GO+eR+eKI4tXdeRsomXv8a6Dj3eqn6iRoPl5qW83o60vyaT9O5IWPX2llrH+hsuXJbfy6oO2OTPg2Yn0p1/6ueWFK1wWTKReo1XDZoeqw7YxhcfYfNf9NtWSHTYVLVqxSAIqoFlU76NzEt6mzqSCQBkt3up1NrlHUdsXX22V92p2DnlfR40O5Az8N57+pfPgcv8YzLZdHjKS3i9uS1254Kitf3271qq81ATGkq1wPJCDVexEtS8oFZKpBLZeWl/w7yE98uUZ3cnLPhNefSFmx7s8Uo7VDEHPM+DpoGI71v5xaODkn02kUi9Ne03Jz3Ps2Jh3O4ubbCB006yzqNPsYrfYhbUrBwEBnZstBLYBFIzSDIXQB5LeOY3JXoXJv3/afP9H9dqdtv8XHb9mp5T5kQX9rwg3ACaaiF4ZcL3T0x6KQATaiNS6RZbmm+yib7tFiwfM7+1ySTYJACMuE6zktFP5X3PKgDIyoCnULFavrKs3/eW9af8N3qZRN9wU9N9R33hgZ8kveRvyuXs2g2fOGW8oeoDyvk8p4nI9Z7f/eLyZMn/AkR9azrR3ASvMHgJsXRD2X67q3nUci87yVoPOQluk4apBI7blNVVkSyLXRHrURZYiwlAdF8EhmFqaV5RL+XnM+nEffN8W2OJxG2e1R5MpPz++dUFxWMP+3lh9dln7/fy0POggZYaMT3xo67XpnzvX1PJzPFJP2PIusAFonNVK1P2QOEJ23z0Qms/+dVWycwHNDUHnBJJCoBl3PVQ5HDAIZD8rrvCcragUI0BRGCSpk95401pf327F/w64QcP1FLN92Rq3qZM81h2xchUaeVnVpZ6PE8w3K/M86CBHBe86tKlQa3wlwk/+cFUoqVZXVMAKAQYcRSDbn3ZrfZAe8EqLz/dMguPtrKHqEuUZBsxkzxgEbcpi7u4rPw4O/KL7MrAvwOPQCSOFHEg870KHKevxfc2pBOJe2F066pWe6g5mehrSVo2KLdM+C21wvoPHV225xhIBz1oVq26KjGvt/+Nnnl/m0o2n5pI0IeIsIDGWVBedr44bg9Vttn2E4+wjhecYuVMZ8hAAIp6InGbCTBQhJuEeCOQsJDjqDxd8mPrR7ZAFaeJw0URBGlL+oVEwgaafX+T79umivkbkKWeyPjJrS1+ZSRhifFMMjNR7U5MPLHp8JL1PHsc6aAXhDu2TnQGvvdKRkwvSAIYDw5SC2ADIp4jJDaOTLLJFpeabWRgwCrLRiyZ7rAy7ECDJQ8wpEjVjLuMQFxVRknLngrA9uVXObgVF0S2hGgVoHAllRGwwq6sqeoFh2a5LGGvskStAAcc8xLFrRXP206Ovlott63Sm3y8LbOud8nFj/UlvMmxtnRtbM0FLys8k9xId3zQGsdl+gdP84PEF1KJ9OmpRMa1RbUmqom44jL6Q36hK8kWRuy+1KBNnPhCaznyZVZJNiPritMg9wCKEnaWrHnyqedxQBHbESAcR1GxKjcs3rlxOqOw3RnlazQRxgBFYAl/Cq40giy2vdn3NgaJxBMJv/ZgS8bvbc/4A8lydaw14eeqqdzEmgtPKTcWMxP3Qc1p2scmFyc8/3UJL/FiAcZHlpGAK/2MBOHQhFSSnNOUarPu8pils0PGINxGLAND8WEEGLhJAnw0wT2qcJIC+R1DcdxF8VySdxxnaSw7dquQnYyqhnOFJrZJrywBBVdqLVaxFtCwAg53qiWq5UzCHylXaqMTU9brIw+1+tbfWWldd9IXHxpIJoLBZCY9kilXpyrJYi7d3zGx8jOH77WwHd9JdGMHj9Wz8tZkf/Dwa7wg8Zl0svk0N2KCEkwQOOA4ARhWEY+iZNdqZZsIhm3By5qtdNwLbU1hqY0DH1FQHMdxGzhDEaJOYGsILkZDIeFVd8dhje0dgaExqE6dyOGsRrfKacig7lBIFUABm+f7tWY/KACkQbA65vneIIL2cMazyXTCG0glElsyCZvgxZmyWmXKTyfGWpPJscHc1NT/jCUqlsoFJw4+UFm06RfFyuCjudtuu62i2g5aTjNU3rDISyTfgODruEw8YqqpxSGyGEIAAdQLiBDqpESNxQvm2wsOa7LtqSnLTObQu2QizqRoyTbkASxViJYjyPUJyurYjsrCTbyTYyL6h4THE/uJDRM2BDQ4w3RR+jjccbAozOV3Jfj5mteSD4LDCDrM5/6yPBDjvmoq4RUSXpBtTnilZq9aSfpW8CvVXD5ZG68EyUnzikzB1aqPZw4tVg77/bHjW4/+1etftfC2m29fPXRQgub8ld9sCqrVF9ItrUz56Rbf1/BZbCCkm7onEVI9QBgSERnCd3Q3WWtXxiaGxq00mbJUV4cFKPscJkiNvsXlaRYwAE4Wn4bkrkCVqyL147hPFC5rFyN2gXHCtHNEeRUWXWFhkd8VvEucerc06WSrRCwYjie6t3EPbRXJYAQmEdwD6irAHlO1YiWVG6mWhweCyuQAPGi8XCoUTignukdXrVp160EJmiYrLPH8zNmJZPK4FJzCGahO22F8GjjSz7gQhYdAgN1b17K0+anA+h7rs4lK3lo6llg1AWigiBchR9xJwHP5CM/icsARoJQmtgUc1SHryYyAFpvYraDYrbg4SRTmgxCN5gSSBD9pbBFawEmQWMl0aWSvzA5QvDR+ecqq+WFvcnBLakHvllStr8/aJkdtHiUUUi3ztle212657YbaQQeaj5x+VXMtUTwTAeVt6WQm6QMEJ/TSgHXahQigOSXjqF0VWbNMm29ti5JWypattGmK6YSCVQ8ftWSGlxYSSa5RcobwTjhOwWFaCUFWNsbAWlIR9kwCjgqOQCbSuYzOsfMPafl3ZmdbgS5MhAcouB04qE+gkdsBBDsGjGzlEagVnwjQAE1NWHmyz/L9W6za32udA+O2rNJirbVWeqiKsUykmEk0PZzIDj9AluCgAg0k9S5MfGthc83elkgmFkiRp0YV8eqACduUcHQwDgR6X3kLSdDayQiqw2x8O0SZzFirN27V0QFLdyxkGqnFEU7UV9oK2fRWCxut/IifFQCjgCNBuRYDh3BXue7jyYy7RyJ1K85oZkyzEPzwAOIYGsFpZkJ2IgKEezb8SivgiveF4CEsQNqaGrXSWJ8Vejdapr/fusbytqDSZIsSS6y9eR65zIa4ysZUv+fdc+zjfzF8n93hwOYiD4afj772Wy1NleC1NN1vo5eByYRDbPfC0+CiQf0XArtuRqo6JSBt+5KkJaBUdoChdaXZumrj1j/Ub7VFK8xvb7EahEnx45R7gEOE8slbBiQiXELgwV/ALwFZQ/NQz6N6n9owke7AoFSurDpAFB7etcLFcZwKAHcIFKUHLspPvYlakS5ozAqjvTbVu8FSA0O2aKJoi3ie7tQKa2lpRRkdCfe8LAlUEZVqYYzmeHC1hZOpBxWnqdUC1v4m/iKdTranWQgMDc2XAKg/GtsNanCLdYsAjjwkqjAMT6GA6VrhWxk2Md5XsXSiybqCVts+OGrFsUFrbetmxMTst/JTpt5yn7wChwRRAUplJumy1HUILJKPBRyNY52sjL07Q1Euj8qUkeW6HrnxxBwkjhdwZEIbENEFJUpTFoD27HCvFbc+YW2A5Yhszbr9DutuWmpNTa0Ai1K5r/Av5JJowkvmTW2s+JP3u0L5OWhA86HX35SplUY+7Cf8E1LpFIwDQroRDqSkoTRKEetmHR7ekIQSbBOMrKpQta2bkROcZnx7xfKjUsamrCPRZl3jfTY50GteN9r+FuCgMhxAICXFqEy3OoLy1V3pPwSMwBpWLZ2f3LEhiZI5IAloMgJjnF+RcbjSiZO4fxcuCKlAngfB1grIK/Snk8PbrYhgO28sZ0dMJW2hv9A62+ZZiukRdcVhlmnoqowqYGPWf6TcvPBXP/j5lwfdjfBzUIAGQdf7+GuvfmXF89+cTCctlQofO34z1RhqavACBWhw5yAMQjtdDeDpWIzg2BzY5GDNWClhgA+1Hl1UIWW5wSEWXTEf1dxOphQEFolpXBAjW7/wHziZuAs1qR6MMEvRrttQikbj8hMQhyJ94Qu7HuVxBlvgCWP0q1rgKuWSBVMjlh/aYtnBXkv3D1k7XdBR1Ywt9hdYZ0snwm0IFpW/Q91hMa5eacdZlDYy0dZ5N8nqiDooQPPRM7+1MKglP5FOp+enm3lkNQwm5Cw0GlTQCMq9o7ghr2siyTxV1LySYzqXI//AcRhkGC+g+WjDUgBkHtxmYGzMSsN9TiD2mf2uggpxMRFXLc3cUESEEDghgNwtuHjpRwQmmYhmYeRufqNbdzHqfuSXwG7VogXFrFUmBy0/0mvV7b0WjIzb8nxgy4M2m5/qthZGeX4Cbqjn1Z/yycSFOpsf/qUZ94JqrZhKPjbc5K8JE4a/cx40LLBKTt6ReT3d9avTzSjjkChdt+QaLXzrpcF1wq7ai3Z0RFX7QHGPvqa5kxEQ3dPUeGBTYyRwxJKdtLYkXVRx0gYGB6y6iHmpjLiNhOgQMFiOQAKPAykEk1v0chexZHBhOJwJ+RRORdUpKmcoa4U5NEpDM1cRV5m04ni/FYe2W7m/zzLjWQeWRV6HdaQ6rJmJVZ/u1IFBRYYFO1fdqxuN6nIvj+7aD4rFVGLNkYmugUbUzHnQTNx53Akpz7sg1YQkk0YqgJ+H8oC4iwhH40RgUc+kPsNNJahrQigRdxGXSbUENrYJGqHiTdA1KU4FpJEJukttNtzP8HUZ3GbeYt7mZleJ4wAqEmKE77YIE5JGdTaCwgHJxUYpuBclCQEUcir5fdWLkFWVrJIdtfJIv1WHByw5NGYLciVbWEpZZ6Lb2ptaLEUXZCz1kOFp+FUJDWYH7w4emqEWMO0wNpH07/7x6h2XoM5p0Hx81VWdXs7eiT7m5AzL3xKMTQUUdqY4sKgdJew64KhNFYkRR1D70mx0TTXrXEY4tMoOkLaSABSKUxrgBQtrS7VaW27MxuA2vOLmt2gSUybkIGrkGBTKJtDKFnBc3bjjYTJOZxSve3BCrgthIF8uWA2uUpoYtiKCbW1o2NKjE7aARcrd1SYE825ra251Qrp7OygkBIsrIPpxJVO2HnJXE4bqt0Yvm+hdUq49uHOqOQuaq1iR9z9Tidf4SW9VpjnZlExBFtqrsa0cRlzDRsDRyAl2o7UzbrgK98+g0GtfUbXCJFsrhxBEWU7nqE5aAUHD8wyg6co328TgsFXGUfY1tQMmlPdwK3Evx8lAgMgVcphpUmqorwgXF1HHhRHicx+1aokeKM88F0AZHbTKQJ+lhsdtXrZkXeWkdVm7tdL9ZFLN4IR7E71VXvQCREWG4c5DAqXZyYTSEVHcj56fOyz5yeTdR1ZO7N0p6dwdPd1v6eOTyeCdybS/nG4pVlk0PD/N5Bo3bmc1Jk1FmJvxFjtgLNzazfRBR2AjjyWskhfnEcHV6iAqIk6CuaeuRLsNTgzaFAJxav5S85sBjeJdsQIMHkz4GwHIhfBDmjicjXe85GyBqbIeOTdu+fEhFHGMdgcHLc1weUGuZvMrSevwu6wZoGgdkBsyx2WHBYUPFZe/O5REcTFYKMSlEmicWI4OkvHi2p7bzqCD3tHMSU7zyVU3LfRrpYsYXr8i1ZxMSSejFzo2cbtGlKq/lSEXQNjkha0BGI9epm0p4ABA+UHkoarPPBPkr6LJVSNja1gqrW97upPh96Rt6N1urUsPtWQLs98RIWJIqD7VLWCGwItvCqmH1YLqfkqUMQVQ8qNDVgQoLcMT1pkvA5S0dRrzQckWOBkLxugW4+dw9/0UwIifuw6QOK0A3eBWV+gGAXqmlD+YSgR3xnkb7TkHGinxMlZ6jZ/wzkg2JeZruFxv3YhGcUM5rwjoiCgOE3KEkAPR7bTUrKUbjfAUr90EsgxlaSMAEqJLGwKHRVt0VSzkctrVvmFGMSN91rxghdWSmnESaaOKHUmoI7olx1UQamsMlYu5UZtATikPDVkwzJrAyZItoN6FNea42EPeJK7CCEgz7SoxBF0jKZ/MHT+t4nX/8b04r0JcRtn6cxyRBqCre7jW5W90kTv9zDnQdDRPnYbk8X64zFHwGMY5NEpMpPjhd9dwIKdODLnpJZrnMzrqrDBNwGLzfMK0ikIAc1wI8IiANbiYdDnS6XQ2zbdulHyD2/ssWDFuibZFACQUe52conopIKE1yBW4CkCZHB+0yf5tDJWHLDmaQzYKrLuGUJuErySZB0Kv4lR60TPoHp/ckAgT/k67ph8XWEx7SEdK9x/mYFEIL0CVZ2HGPOn/8pLVF+W+ah90ZTb+zCnQfHbV9UcXzT6EHPNbmUwyqW5F635l1NhqGicghm2l4GkD0WUECqXxEElaFtGAaWalWasmfY1AI3rXmPnTdINPFyYAJdRdVRPWyjzOolKXjaBUq2aHAQ2b6ihIJaMoM5/5nwpD5SxAGUf2ybLV1x+atA7mgA5FWzs/iZySbrWMFrgzVHb3q3vSje3WhMQOf5Ug8tcDYn9kuzJwu/84LLRBE8HcqcceC98rsWbkbkJ2W/WcAU3Pqv+aX/HLLHnwXpnJpFrontxb5cAStlPYqFEzNLxwLrzuJ17LFvxMzdJdyBkVFPPZFAKwdDyARfKOZFUpBLnEZRicAhwAxNqE7nK3LSzkrDAG56CLYt0tKycnbAoheWRgK9MQfVYcGKb7KdqSYsq6mfSchwKuKd0cDpUhXdhNToMlJq+j+c4/jc8Wxe3ITfR4KkGgCI1zRQ88XXYoz/BUzJr7m8e9zC5D7Sj73Bg9reSMvIRfXIle4Wy4zCJkDxn3jG7YNN1a0dskZMRtGUeqWTFiC4wX0m10TS1VlGhMWE6FmmTpZcIph2nQ+Exfo22PgIQiEC3swrFWe2yg35q6nrBaqslGezfZ8JYt5g1OWDtrKw9HTulKzLOOTAeykHZBTAu17qYh3PRdhSHR3cWeuh0/ZxwQ5uOX528sI+QiYarpmCi1aytAA4dVe/mp5G8OO+29w3bzH8fF7mDPCU7zu0tfeiyPegES/ylpZrClxHPtoEfVyEncBVvvbtjIalS8siLbuaNmFm6aOljRlq5ZaYQhFENcFL8ug+ve6pyGSUkaWmGsObZiscDWXOSUYNIe2bjdmkf7bSkASQ+X7egiM8upZdbGNEMKIMG2VCB3FLI+9xs6XWhjnNy6zfjXOeMfFxHDIEwVpozcWHFsY34XVo+j9WiIqqYlCNPJFj09vCFPYg5o0EAs7+/P++EhiVrij9C5vTrdFHMEnlYNQkOEoMCDCZU1zqmWCbkN3kjTLhcA4BewpLoqbmhdmUwbq/yYoIzIq26JRG7GmpFPqVK0bClrfbkR24hi7/HJEdvC0LmA/DI6mbeXJA61o1qOZQjO/A9iuTTJ8KUQaJSjTqHeEYW3Gd1gBCjdkDN6ILmVKEy4U/IwWZy2MY1LGIJU0a5diFfbhIDSL92wx4vi+1kv5d3ZUNguzgMaNB9/3w9Y5pJaGST8d6QyfjOXk/xdo6pBXKO4VgoZjUNQ2AZyat2LjAvG7/Ih4CZbWBfbzFAa7lArhKv1xBgEFu2+rARFy5VzNsTa2s0IvJsZBT2SnbTxEkBDj2IdC0AGfdwkW3gZJje3tMNYWKCFMKRhti5BsOZeZoFQdTeAJ8KJu0d3X7z0Lkye+FKeaRPf/nRI+HDT4QKJ66SiJCFQXH+sRFGdcOm+TN5/bLqcXV0HLGgu/tBNmeKU9zLGtB9JphNHp5vYEk+35AyNowZXs8Rt7GIIDBVh9eCoRaJ0+JQu2Va2RKbK4iW6EVT1ASegTbGgSRxlOwDZlh+3zZNjtrlQsCGwEWiolV4MWFhAnG6jAPwsVTC40PrCmB3v51HKcRiSph64PMlB/GllnxZ8aWmE6+Lc3TSAJ7ofETa877jH0F26J3I59FP3OUcEiCgwhE88ixUGht10mFOpxf30C6zue8n85rF6wbtxHLCgKU3VXuR56Q8m0t5JDjCsb3ENETWUQCPkqLHVaDFYGruoKIkShk0DvTy6IYGGiR+WU1dtmC24A+heNjD305ebsI1TU9bPot+a1MWsUWEPCxNUrQCFYbJUya4sFUStTfOsd2oTuzCz6F26HFjcUlDN7ZBEo68AdueAoy7L3YXyqvsLbyn+1R0Cs8i7Y2T8crjniTO4+3AxhAgwKjd6TnyhM/S7dkOY19kHTO7ed/ZOs9r1IiPHAQeanp7A7+q9ZQXnI14Ijd7MZCQbJQUYPRE/ssO2ICxunCiI8Ph9U5qQBEqs0U/FCkXOVGwuWmsr229zZfvJo5vtsW2j1lsqWS8cIvAARmYpi2vgJk1cblJSQBERucJ+JvRKUGrttqnJfttQHrblzYvAFF0XlYrTCBQ6ItRxGHEeaRNViitDb7zIHIbpDlVDaKZdcYieTn+hCW3llmJRvjAOl4uK4ndwh7XRzedGkxmt0ntKc8CBZsWWO+dNpr03JYLE21jsnQ71J9EzCiRyhu3iGsuBKfK7AZRC1S0w4ajRQplZ5ByzyGPoVrZnWZOyNGWLU122abBkN20bJxziq+vR3pUMRNcwyikCVSgEjFmCaOmCcET1GbPf4jYbSuP24sq4daOLEctz3I9kjFXIzv1oKtwBCcEYZ4AyKFxqGnOWqEjFkSesRw75wsrCl0ZhoZH0Mh3WmGZHt9K4MsXp/MTWfMp/PC7jyewDDjS5xOSbmDb862ST351i9zp7TONWCpuPVlCIGkO21Pfh8gQUdQixZTbxCySTpZwNMjk4MJVDkM3acKFko6R9w6GL3RLhe9nXlG89BjkF7iJVsBsiuxIpNJYtVFFYffgrj+KwxTF0QFL7IhsYGrX1pSFbkOkGb+zGFJX40b1LUeiKw+0EZMk9SiDZx8k6YcmkqkNEzxYSWnHh8+56H8TU7w1H+O8CXXAUJ25cQ12gEqeSTfd01vyRuMYnsw8o0Fz8J//9EkSAD6L1PTwJYKT1Vcvo+XdsiNAv9l5jWFyAm0wy2hlGhT9UyNoWB5KijZbLNoY2dwL5pOrNt/kL2m3pohZGRr5tmGqzcgtcxrU8JIqBImqFQ6mwTesVK0IX3EFEj8PhUOVUuz3CSVovas0h22ibS8htxFUc5pVFWFM3pXySdRzLoRjSqDj+wyKxZXYAxA5+F6uf6TRqI3c/LjhyRwGyqEA8jlMAHso35wthqif/PWBA80/v+NFxtYT32VTaf5l2FGhRlZ43bgyam7amy0E2qcJNsuhJJhjtDOQnbBvcZAMC7ASySQ6QTPocFcL6F/bZwkXocphBlnxy9ArPjpxfYBjt21iOUVM0H+W4h2QUBwaRL6KiKKwwGVFX4Y4IYh9RuA4+QrYZGN9k/aUR6+AELWaxiBah4u4oeo4IPO7tV/6o63Npo+JVQSj3uEpdfaoydjh3GEDbyBFxPpcmqieGn6J1gdhqKpktesHa3m1sZXgac0CA5h/OvfEw9JV/zl6j32FeiQVl6uvpbnhYrZovViocPz/lup3hKXU1OXuikLeREgIt5/pOIiOM1Uc7AokuuhwWT7kRj4hPH3ZIZ5GF2IH9bJKTEYuqg0uNGpv4tRc46pdr9dDr0hHnujKliQxbXEu5AbqoUTuktthamLmuiaCOrQAckklnFHajeKhHKhzFqBQtSXVdVgREt0Q1Kjp+aUKvOIraRHZ4425BWT1tFIY/XB0oh6Cr5abB9kTN37hy5fml2257b5Rj99Z+D5o3vvJPu1K11F966co7UulKE4p9G+folJw4STmPXJJ3INmIzmQE5RrnPpMiZXmUbJXUPAs00nEgkQDLiny0sg4Mje1Bq3UwQXlMpw40MntwnE1xVZpGSV2T4lDLytS163qDCXQUV2T0RjvCKtxFOKIwiWWV1gX2RLbPBovDdlgruxnDrW8h8URkygrntbCpTp/ucLsmKEpdl0pzjCeqRn7Vr+pCfIQhSqllGs5EQfIJn6olNnIpn2Qq1T2VTj7itdvAU00fxHn3a9CcfPjJ8w5rPuI9A1PbzimVi51BqmLDgKWvVGQYTBeEvqRAd1Ni3rWQaEV2oJthYTXqXIACSMRJJIy6N1+PPN1oYQOI2BhabymTk4e0VW2kmLCRPJzAvfrE1UEgtxJjZKvFGzmPinZpccR5lFbhcJagucsmc4O2qThih7QsYZ0Me79FcKWRgap65wUcBxbKdvIOaULlHyRXGsJd8VGeEDCuhPAnCog5TXxLcT3T6eFjBEqp5yAW+BvaptBG7oHZn0GTOGbx7523oTJ50SNDmxeNoJWtZjmGlX2NFRq8mumymgCiYa00sLFyzSnYePKYsE/ZCLSaXkHElRUdNZvHnNNdgxnLsWvSUUygcK3N6+jKU7kKkKfhcuBRuNiAwiNTdxKHLDOZbreHy5N2QpBlp2MLRUsSI1GUTgTWJWKKu6gLcfJLvegwratO96FwMii741VRUFy9bJWlKzQhUGKfbI3Yiik/V0wk7vO7DjvgQRM8Vhyd2pAoNnPyMmtVkENajmDR7pIQINopKOG0PhRWC3CpBWVcQ/Hj7DBoJ08YSIsmAMvCDg3JPbs/m7YJdU0OMFFhIVWi9Hhi6rrKFBldoo6jdpTGgUhh+HW/TV02PjEBlxyzhYDel7JQWXWP2OIOys5tOLc4jm5Doy11i47TCJeEx9xHwFIaGRUTG92KjIbtO5s4Lrxt1s/43lDKr25ZvOxlGns/raHV91sT9DWNPlhMdD8YdK5YwGTQChRlSZt3GNwFOUUngAkw7lKjisnGfmz16/V4+SOANYZFeY5tr9qZy3KOidzey0kQU3Autay7yOvKjfzOTZBr+TgM2xFWdqOJ4wlzZbE2h/XATdW8HdbcZk16EQjXX2yUTFMdApDcLhbbgSNGWD1eonJYtEup9Fw6W8/lVWSDCcNcDle+HliLyDgf8K5Uqnb1Z7/6ooGG5E/qVIvsv+aJJwp2z5U3WWv72VYr/aFN9F5rE5vZADQeDgudYAt4BAhdEnLdpbAoXPuU3F6lKI1LG8ULeKRf1lG2pc0Vewwu01/k7XdlNeSTXOTKiMpU2eJyse3c+OuAVJyjXkhFF44fjXCldT5LJ0q2tcicIN8SY4M91dFRcR/axOcuKfp4FCn/HDPVreCWgKt1yRHWqUNu0jgQCSjIQQ2AiYETxodgiYkt2anKNIaHYm+iKf34xg6USHtoePoDwPzg42xVsxvttA/dbi3jf8TTnmNNhZej2m9C6FVr08I7PcfO/sZotaYM/UAqWbVFbRVjVYXdk83YQFndHvEuDay9Xg4JXNdDPtkuImb98suQxhnCFeW6hihOfoGRaYWxXL89BmiOZolFSzKFXimqRFZcpHPjaYwTkFS+5Bl1UXLXbzDkOtN+F/mUPzryhB0V1c6p0hMZK+7xt6jip3zKwvebyF9fMsHXLL5hlfIfs1blf9lE/10cATbmliGIyLx54YU7JnyjHcc7QIRpFnN8yIs7SnwpzrdRQBOglQ25xO7KEDgVj63LsQPZevdiP/EhmyBMZUTl4XRpGP5PcbJELyqCYQ6yhvoht3EcI8zisvHjOISK436J3sEOuYfCwjziQKEH/9MZ8jjIaX2PZ+PoqB8+Jts28XTZ4nhqOsCMpu2vff8mVkJdworvj7Gr7DrO1ljP6YlFt/BJj6OWjC+1dnzFYbENK+9qqtjidMUGWHA1ykLvaSI35AspRhxlO7cIpCsGiuqLw2TLH4WFmaJ45acONtaNwC02s9amxKfspm8vBIfL4ooIgeM2+5HIyTqyuaa7pbCq8LGVSa6nNi6JmFgo0CPHeP0fOu31OrRrj8yB0T3t7lFuuFDs9HZ72xXrrDbyarjNWZZpp8tqXWGJJuYZIOhTGYiaYSvKoe1Fa+Z8+keRZ0bY3B8TLMy6EwXkdX2CfvAIGOFQh3C6IQWLEAp3XVXUjbnkhClOHIG93mOFNnucKY5jWsdtSTPDb0DEEh5XhDQ2MfG1/kbZXVdHVqVxpTpQhundL4nCdLoHZdiN0W05o6E8paj7TPqPe4nasNdT11rGiZ7U5jYOcHPdewbYCX+9lXP/m67qK5YbvQtBOWvxFErUuCGHoNWcX7bZgnTVjmsr8rabbc6nmZeKQbNjujqQ6nkb4sUmduAyalKuOK0DD2likMmW8pEuarBcse1wG2m5pzlHyFGUX7ka6w79UbeFR12USxdaSo2RJ3TFv64khbkLwGA7bDOOZzFrX7LWzNlee24OXE7T+IyXXSjW+pCt+spmjs68k/Nb/oCjFl7P9MGxcB6EZR7TNVj0CqrVMN18iuKIlhKqfUZNU2iQlUgTQGG0SzP9+sob5Rex5FTL1xNH71+sF3FR/LiylJ5L4BKf0KirqZNlGQP2KCdtHtWet84UxzlG0Uorp4rQr6rTj5TUTo2sYuMicbt5JOpVsulbElTCEggOMzhH+BMqDb0C2qmNNJ4GGnts5gZo4sdd/UGdKv9LO+c7G5nFXAt4Xm+18mtZjrnUMm7VeZzSncG7HMDMY2ri/mybbSsJWDS7QNNoYko4WxF1R+RuTAxVY9CIYKKy4/rKwxVTVMRn+F1iycR2phVG2EzXgbZY54y7w5IEAN2Gsqh4fhxIFOSKCiPcyeridOqvSORwKScZXT4VgAndzunKVPpoADjhJf2tRy1c/rTLIaLcztLtzz3z3Xf02pX+tRwT/WmE5L/laMubLTtWMdbPhC3rs64lsONai/RagW3MZfhUMqBRa4RUkWP6Upi7CHKcKPIrvbvwi3juoouLR1aKjLuuMGHkV1oEYuaj+jj/+/H8KKO3qWjwFwm6qoI/bSt23ZArSnGxXodY6nMDQul3qNN1cbofjG5XYNkBMApXGMN1nXaBSx8b692+h5pgMjgTVRF755LNKOuK89hZn7jailN/Z1PZ/wA4W20K+ZmhZlu6bIc2lyyL8DskDbATaKMmVsvGV2OTxMARG6iDJ04bZVAaZa6DRW4uNyRWYQ3x7FyYYpP/FhaGjZcmSCblHAAgfQgAgSbyk2+XYXYU56pTNXHZqgajandnNGpS90R521nQNrInM9uN5cyt7qnxyWL36rPVZa21VVdtgXK3o+N5F4fAvJYlLk2Lm8q2Ltdk2zTUfjITN3z9lRV1Yo9sJYj8sVPUcl1TFB/JUNRPWr3hURlab4yybwsfrdjMjoclLQsZ9Omo1iiZFp4rNT9RSY5RKr9L4yJCqGguqp4ovg/y7mzUQ4aLuJysNMRXY/ZKnlF5c5jT7NRcq88eZLvBj+HNn17k5y4+pXliq9ZybaBrGmZvk6P9Tll28IoQupyJHC4sJicRomRIzYizaDSmJtYVxUVZnT8afo8ycbkpN2l5lqRKGgmLmU4fc5i46sZqdiiWCPfn7sGl3uHH5aN8dU+UrqmYTfw+5R6nHQqIPHOf0zQ+9eqzx/He9+FLrk4vnld55UghsWLDEDsmp1i5ldEkJbFOWG3MtJPbpVFY5JDlOE89AozgdlhSGICRFbOBcAikAMKJYNKyyne+Hy1ut5ciFLdxKIDP+cTq/qS7ccfVqgg3naBuRfnCvA4b1K0wBwhsRTujNHVPFOaCiHAZbIqtP5tZhCROvFdGr8BBZW699dbkicuD5Qua/SNZzfLoyNjUFTaORplloiFd96BJRBBnIoes+GrM7igpikeRzo/b+VUAbk2E0lcO11K2MTvCJ5rzIQBII+yFspGyhFwEsVgZozRyRHHOdjH1sDid7EYTYWmCRSHDS5f27rEmOC6j8RHjsDltDw4ONhWrdhocet6ituBHr1pa+TBHZ15oYyM/sMmxKacUdEIszeCIFtk7t0pIuzDSuUWKiHKidiMw5HbdVBTu/LhdekiAhriGsu8xdnAOFkZDTqDYenI5VATAIVA53Y/cLlGYuJ4+TBGmicpRFhmnuIbTkK8frXDfhaGOK4zcw9+DDjTJZLIFQfCl1VrAunPv3ss+QZf1nbN/yjkhF1l29F9sfPQBy+c0Jo0IE7Wko9ROrVoPw6GWjLsphety42EcAowDErYDZJwgspnptpYuW4dq+hG2/1Y1H6X0AokECGyXXUW5K8zn3IpTOjzucvehREqrdNNGvVK4GJ8uzTM+zZzc40nK6VK4nUbPXHcDFr9SqRxCY57INcqZwI/Un3n12dvMy32BA4P/lhMT77RsljNZ1cqkCGlUT7qDo5EujekcRZWSQEc82XFzR2FxuGbItYOTI/M3cgxsluG35A5g4KoWYEKwyY7A0VB0XIyzwxoVS9roit3YAg4R2p0zwe3s8XII5YpN/BSxf07bq1evZoWVnc6RH13Yj4+Pjz+6wwN/6z05u3LV9cyef9ByY1+3iTGmJdjf4DSupBQRdmdcOD+OSBHK6mEK1xU1teM0uJ3fJaJEbA2/mxfaRnZUbM4NsRO0GHEK5eXfXZGbAMdV6vcSgksJXS0uGT8yO1rhO8CXEYnYNqIvxu2DOahAMzU11QJ3ORWt6gSNvratrW33W1CvfOc9lpv8rGVHLreJiXWWyzPEAjkiQESEXdrahfPTmCZ2i+Kuf1Fz61K6hkuFqR9qmccnkJvtMQ5GyvNR1R2AEqFBYXH20BH7VR7/9UtACsGl4p2h+9Q+dtJwFr/Xf2Lrwuc5Tdw2T2a3trYur1arL4fTIAQGvz77bLTGT2auffd2W7Lin21i8uOA57+wxzmkBv4uqu3GOLav8JB4O9gKE1gcl4ncrhy54wunzrZp6rYHJyetH27jdDaRvKLsEpEch4ltqB8CIyxeRYVriaNisZyJqpDlFHueN0YRA5sO1+mCe28OKj0NDXYyTXQonOZXuPuuvPLKbgRjtaU1NzcH5XI5gBvVWlr45Ioz/cxztt3+wVsmtk6M1y7kkIC3sqN/CTqdaDxMohhErhT5yRoDSG6o48LUxTnhxAWE+ZTX6V+IUyYNv9sWcA5Orz3Ad5uO7FzBclQ21gEOR+woq1LLiKs4GQVbbgnETn5XuP6iBPV00a1R2hBp+3p6znjylyasYre/BxtoTqUV0nCaZRDifACThRgiBaKLPkfKTplksgp42DXrhkIsBqwEX35ForRxohL8vD87nq+WFgfpJg4ShcAYtyvSucIfNw/owvUTEQ/AiLgiqOa9HAAcuCK3COyoTwLOEw7mL7ZMMcdWmnFbwL5zN9QW31H34hBAObo9QCevCncAoRwXzU/UDbk0qlZcK7SFUziNn2Bs74Kw9s4cNKC57rrrjmLk9HKBhIY/kmb6Yy69/2p2EU1tKqIoLPa6M2SgT3BYm1VWtQToeAq0dNF9uVYbH5TJXS67SBOZyFGPd4Wq4DiBbIFl2h87vWCR9fNNhIn1HExdnc/x9uF8lG7Ryc+AxTE4gUilCDwqS57GyxVNgACmFLJAHmVwOnZtn4bbKvKgAM1VV121BFnmUzzvcVz3crmDlQGIDF4xgBprs9ERiwI7GScDk1Bf/2ni+wicG+xtz9UWb8n7JxQttQDu5EAUZgzf6HoREMrRytmhR35RUIQOY2O/IuilWDbRn89b7zgfVm/tsm52j+quImi4Lq9+k3Rv4SOIy8Sh2tKrZwH/BE0Dk/q8gINUvN6SFwyHte3975wHzY9+9KPWycnJdwOGt3FtoYk+VyqV7uF7lgKIazE4kGttgOX8gCdu/V1atEYcIAnWDQcLb9sSvGG0kj43yLQuSzQxZI5yOdiERTtMhEtXQq7i6lQ/pTN7Q/Ustk57hOjufkIwlfj0YblvzI5bNmrz+eaCx+hKxavsEBtATgHiNtiO24glxrdOHep32epOEsEzrJ9MBTZcDKYT1b2e3Y4bY06DBg6TQBdzDiC4iLcwCSg+v3jx4mvPOOOMvVqpFjfWDnbPrUnbNvi4JYvb+PD2+63ZPwFpGt4NO4pfbdkCj+vwZMsfXTXS6UMLDjjq50jkgKQMmCofzqxk7OGJfju8HRmHbbyavKxzGweGMKnQxL+rSraMKwU0Obi4wJivBVOIY/29XaN7tG87LG3HX4FxzppUKvUqwPLnvN2Hcn0T8MwOYNRiPXw864SHtppNfZuz8D/HYvZ7rZDVhvBwxCSyiVharKVWlhucOLf84gisuHO23C4NNv/iHu7E0NaFdl+eswDdfBRfr3UgIF5JSO84jkuvfOqmoq4q9NbT1/OFoJ2k9IHLLrtgn4bbqluPMSfN97///dPgLD2A5TQa7SaG0n997rnn7l6Zt68tcNttgT1wTd7mv24d3+/awM7PZXCTQ9jsz7GAUBXqQE0uOWRHJhabXDw/zlZc7MDWnipYQgVO0+VX7AgA5Ou8Ypm4SNft4I2yxQxOCdQdxcaFg+Ua+7YxT6TS3nW3PXT85jh+b23he86Z73znO4cgp4jDvATArMX+l3e/+92Dz9iD3vbegrUd9d9WKn3acuO/tOwE81biOBFQZNUvHDu45W+4xHIcCyEPi83LbKx7iIOuJzgh1GkBxE30IPqJk7rs01xGcVGqMB1+QQi5h5G5n6ML3eeRk6qeU6ABHN7111+/jKmCv8J9JtdWrr/mOe8CPNOvnp58ts1lp5Ttu6vuYBh2nuUnvm6TfMa2iAZZxBUI1E2FntBfB0pEeQcU3AKaiyM55+5U25fa1rJn6ya3w8gKrgSV4/6UlfS6FBF2Q/jljsLljtfgsNOhwgEBfeVJjuOagZlToPnGN77Rxsjo3bTH22nAPMPo/0TT+xumC8JTJmbQUHuc9cqzNiGxfpYPPF3FUosx4zzAcLws6kW4xRlSVtTV5aiPHddSdzDG72SrS4c9nB3nuLhJkmi0FAJDqZXSXfzUw6NAFe1iZSNr8doUAz85WPYzz3MaNQ0jpXRnZ+dKnOdzLaQBvwWX+f6b3vSmfZqUo4x9N98+azufSv07lll8i5nyvLGTMhofhxSOS3bE5acOGr3DApDCFInhGLhKywLbNFVkemEYyCAQuwiAI5c8cdooXIFxUFyUhuTINlMsJB9uyXBo4QzMnOA0PT09SUCyEs7yYYByiEZJjJy+vm7dum0zaJuZZf02E575xN+z+uBiOA5fQ2WUL0ajFneElh05YjsGQT2B0iAQo6fJBhm7j/moXDkbxtbLCMuLweFsglxRcVcnP5Xzxbgsa423fWb1qr1e4umKiH4OeNAAEv+44447EtCcx3UKz/Vrwr6+ffv2rYDJDRcaH/hZdV/39mFrHf1nOM4VCMe9bimpE22guIguUye+wuSJUFVHAX52Y+boptahJR5mCYyOwQ35TPwbF6QiprmMC43qcSOoRJDztdm/Pt5Sir03B/SQG1D4rPk9DM5yAUD5Q+wnaLTP4/7FeeedN3MF3t6356451vywaC9541pWAU4hJB+PyrYjPHE0oqZQE4k6YWZ5dggACZBJ+h8+RNbNztClACilk0sbUqr7cfkas+N2XvQzVc5TZtJtg5/2b7z1AbYtz8Ac0JzmxBNP7GKk9BZAcjZgmaR7Wo0g/AsE373eljGDNnz6rFecN2Ktwf/hDJ3/sDyrAYsc0qBX33EWssf4cfKMSNLAbVS60rHWJs8JoY/nszbKclC3OS7mKkQrSZ3LqLzGy3lpJc+yfD5Rs9szMgcsaBB829DFnEFTXEBjcS6sfZvrShR4QzNqkWcmc2CXsYDdz1/KN5b/3vLjD7JlhsXrcI86cUV1Ko9VvXVAKRCDQFxt6eagggob61h8zvcewhiXqZ5NgQ48ziH4SQB2807VZCIxWPWTM1ZwHpCg0d4lGuJUGucD2EuxfwrHueqhh6TW34/NFech49Su4YtzX0XOuZdj7nRWv6gcAcZRPASO4zaQpw4euig20o0y0bU+N+Y+h+g6nyire+q4HDyhMyqPKuAyZbjTMMfZz2i4rXoOONBEcszhAOUi7v80QHM7XdJlXV1djzzngq9a9OmMOI7mq4LSP8Jt1jJfxcJ1cRwIXDcRsR0vUbjAw8Vx+YU036LS8JuTJmp8OEScxAFEyZSt7ncuF6bRAGmKLJfoP+oFR+zxKZ7129nJccCB5vjjj18AYN7Pc6zk2owccyVLFe5i5nqfJ+B2apNn3vv/3jXBQUs/snJBHOduN9GpZRnhImDsCDQCSoiE8J50GBK7Mcc4nmQzQnGhogOswplvBxeXzSHHpQ+5DWxGs+OeX/CT/uBDPatn3E4HFGjgKlooJRnmQuws9v/Bvn6/E3xDEj/17zfeMsln7a62aulfAM1dVpjgWHboGQPFcZcYPLENufiud45lEo9PTfLtqlE3/Bau6sYlFZfB8OOG2jgZOfHVB7+/x2auhjigQHPNNde8Hs7yp4Cnmesq3FcBmL06L67euPuDQ8egTIz/xCr5r6AE/CVTD3RVmq+CLI19joOAYADX0EfGMvNsG/h6YmoMQSUWiIl2gIkezLmFmgg4vpUtU9vnhVeNzXXAgOa73/3uS7nxf4W7aKPbDwDNV1atWtXf+DAHpPsH75u0tqOv4uiKv7Pc8N0ccVtyi7PUVYnbxEhwIMLvuqgOG7ZmW883N3MsQJehXUgppPAfTWC6CMVxJRNe0a/5s6KKOCBAw/B6OdMCHwUox/D8a+iSPg9gttJQvEdzwGiGvCP/K6vlP2VT479hQRefx4tkHAcekT02uPWNbw4M6CtVrZ/TQStwm52NQOTQoghOtMc7Ua66HQg7J91r/34PGuljaIAeuqI383QjAOZvzzrrrN8QpkHB3DE6veGq993KKsA/s8nBtZYfroSrACGRk3MiW2Bw3KbLtgRpewidTY7DkELZGV4jfOmS5Txy8M2MpD9cSo3Mig5rvwbNTTfd1AFI/gwOI43vFNdfApifuxaZqz+r33sPXOYDVhy+ybIDJY62DUFTR4M4CGTTgQF8CmhzLs/OBfR1Wl/sTAgcB5gIQAjBZfzjR3YdO6PZ7bjJ91vQXHrppSmWaGqK4N08cBJO838BzHfiG5/T9jXn3cdxth+zwtgvOJ0UGUf79SGVgOMunl4fRgM02ziXbxNnEZeqnFQaN0oEFlmR7lD910hTW3JGs9tx8fV64oD9wb777rtT3d3dr2SN719wP4cAnKtwSwiOX6f94Taf2XtY/b51KADfj3zzAwTkbP2jIa7vERwgHcPvLF/91XzUiOajtNCKGCcQi7J4aDuSesXxpnTv2T0n7Cr87MNT7Heg4SH99evXHwtn+RNAcjT+texR+uI555zTtw/Pd2BnWf2BjaxiYKdD/haG5EXXVemJ6tyGk1OY8d4mgXhq1A2/HVKUJH5yJD/2QpW2tjbPeM4pLnK/Ag0A8W644YbD0PB+iBs8A9Dcj/1v/f39j+CeW4JvTIGns2uta5l2YBXgxK02NVZAGRjlABY65JpVfUMcT/Lw5BAfgmVEHaMF2zn5SQReaXmBY9FnyexXoOHQoW7mkd4Kl3kDAMpxXQ6Afn7hhe7bB7P0yAdYMfpU0eD2h+mePsfSil9YcRLgRKKJOI4+H42yb91Ugc8ojjDgqkSMyEEmfFjPKouL5bkHGnYRtMNN3s5T/jE2gyb/CkBz/dvfzuq3g93c1lPh4wl3mhX/HuBwPuB4Ify2ldgIAjHf/O6rpuxxDkMq1VCQR3jhTAqt0QtqST872pTao+9T7klT7xechqUOTcVi8VRAci7XMgBzA9zmahR4TwMYLVdzS9b25FkP7DSXs7eqNX23Vae+xiKu2wFPNFdFE+gwJD7OsYHdmDouPxwy8bjIwFpNU04lx29rmzcrOho14nMOGkCSGBoaeilA0UTkidzTHbi/Pjo6+vRyjPTBPXqvDiLg+PNvsXL2S8yOr7VitA1Yw+/WbtM3eDbwwfiKht8M0aUvZ0qBMwtsPO+VZmXe6TkHDYDxrr322hVwlXNw/y6gecQPgm/PmzfvwT2SYzSN0CMBWc1zkJjVTNCmAr7xUPxPRlQPWYnja8VS+KJLiQ/bP8p3FnLgQy2iRqFxau1BbfwN4/lZUeyplZ9TTnPzzTd3CzCA5TzuJY8m9GvJTOamWTnVQU83V42+a1UofA/h+AuMqNbBcdxyUJ0O+mC+ZBvz6onCAwOSCb86lkkNHr9y5aytBnjOQBNpfF8Hh5HgW+S6KlWt/tdb3sI6k+fN07fAzR9Gmzf1A5ZVfN2KE4+yoMst0MqyHHQDx+VX2fwgblMtVmvrzB87my+bP32he5biOQGNdkMuXLhQSzU/gvyyCMBcwxrfr775He+YNQl/zx7/AE/1/Y8wxZ34GjLOxVYYGXQHPbYu4kt5Ods63GfjQzn26RWqI9kC0vHsdeHPCWgAymFMC/w1oNFSh/8BNF9/61vfuhlb3fDzZm9aQF8NLvlXwmmuhePwpTGzIfZ9r9n2BPvzsoy3a7WWoDor62ji23rWQSMuQ+V/x/VmrvU80+eYiFwLYGaNfcYPd9DYN140yofPPmfDG2+xie3lWmnK1kz22mTAAq2E1U4qyDF75lkFDVMELXCZv4HDvBOQ9HL9K7qYH83e4xzEJd34kQ1WGu9h1d+vmY+qjLDGZlupnyF3rZaoZQ9MTiMOw1m9bwQwfw5pRwHMN4eHh6/Ffr5Lmi2s//xLzNVV/5GTuB7TUopNfMK5EBSC3tK6Ge9AaLzFZ4XTaKTEHNLvUPFnuJoAzreQaS5GF/PsHwPS+PRz0X3b5/8LBc0/Waq1b1Mlx1ddttXK2dKs6WjUZGykeWaNNrcxUjqaLbQfo2s6Ghnm1wDoq8wpPXPHmT2zj7T/l95WXG3WeWS+OPmn94ysH1lYHpw1HY0e/hkHDZv0BRQNrV8Fh1lHd/RJAPPo/t/yB/Ad3nxJ0Y78/X8rtrTlHh0fmN8/8eCsraV5xkGD4KulDu8CLK+nskGA8xVGSnccwORAN8881yU3p21kUTvatBZLsn2xorNWOc4zz+mMLfoKrRa2/LBgz+X5OBtuGbdTz7rOVrzpdeObDk/Y+JWz1uyM6p8Zg+DbCVfRnNInsPkChfd5OM7lbG6bVdQ/M3e/m1Lf+qV5fIliMWfFHM4moqM5xeE4y3CMQ1NzYJm2wFo7OAY2U2ODtdZdbkDRdpclyttsuGOLXXLMrMoUu7m73Qe95/qXWNvCf2dy8wZr7fyqXfLyWVlT84x0T9/85jc5893eyPUBwMK8vX2DL5t8lyWbe/0N6N23xrMYeuY/LrVycaVlx1/J6iaUkd4S7EVcXey99gFPn7W0P2qdS8atfd6xrNs9kinmPODZzDrLrdaZ+4V98r5f8ZGDe+wTR+3Tl9z2+Wlbuk5iH/cpgJrZzMIm67l1tTs0e58LDDPOOmjgMMwIJE6Gq5xHFccCmu9zXc35dwPYB44CDwHebvd+xyrls+AaK+Eeh9I3taJi1ZcqioxQWPhd+xWzzL9kbcuj7tvICf94SzWfy0lXK0l7MmlOwH6J+ZU38E3MX9qn197AUYn32RdOmlVl25NiQPUHJZSpwdHcy/m2tXoPaR9+0vR7GDHr3RMnhb+YkZLO8X0H1294Gf/q8MMPX3vKKewiPFDMmy7lTI9+VhEGf0Vj68st4pyh4YOphP+QaeX/NK/0sBpEFgAADklJREFUMJ+2HrebL9HC3cBWfbHZjn31MvNSfwygLiJkXpRLuyik4n8c+4eWrHzLek7dEMU9M9YFl6as9oIfcDzt63Rr/HNaQO3Llkl90b56xoyUfbPKaeAyC9G/vFOCL1zlcbjN11Hg3f+Hf/iHBw5gTv9Is031nQeBL6ArOllzOdPGk2xyBcdk/ocNLthga3Zau7z6LzW03WCfuvvf4TbowALAY4sIYwW4deE+GXupVdKL7W/u/4b944vvxv8MmcO6WUpzBEDhNsTga53Mc59mU7UX4Fk7k0pnTbnHR7jmAZazAMq7uKES7n/js343XnDBBQ06Aq2w07WfmlUApm3+e1hm9FfQma6FW3XbRWT7PId/I8eDfMFeXn1sF8BMPxKqtVO2W6LwWWSaf5sOdq4kwFlO9/ZONLf/2z629pSd4mfPW0suRK5awAVeYHQ1dauVY1i89TLqnxENZgU0F198cQZB99VwFx1nxvJ4+wFd1I/WrFkzQhi8MTaN7jhsP7FXXZWwye6z2BbyAQTcQwFLKjxkiCZyuxsTD8FhvmArrXePhtI9jFRSua+BuyvdE6oV4pYIgnbe/ldb0vuofew3v/WMvEjVYrMFZT5qBWAct5FdhesFJ9nZqztm0uozBo0E32XLlkng/VNu5Hiu23BfgeC7dffHme2nwJlc/1sMpz8AWF4MWAAMPYqOYtXF4btcl9mhC+7eI8DEFOk5XSdp9gCWh+KgyBbr4uNQ9iZOxPqUffpejoqd2du/U/l8K6raBEiSIZcBMDqFolptY7vvEZaxhbuk34uAGcs0jJRWIMd8GKCcSb1aG/MlZJhf78U9PPdJ3/TFE2jMD9FzvgLOIKSE9xQzcc/7obUccjkndO6lbMYL8g/2mP3NPf8L4HydtxyFYGTYXYJfwHkLZ4VM2MfXfhb3jEc2cfGAfz7PlHL+WK4J9GUyZKua11lPtw+OGXEauMx8uqM/YYR0NnXfi30xe7DZn3MAmTO/OJ9GfAcc5XVwk4Q7GFpfwk3wPsFwmDHuI/wfbPUMPspRnfwxQsW/AxxO86Rt3JlmOOIuK7C3w93eaT0b49HWzBvQq4jT+G5jnY5lm77SgHR6NLgPNe0zaK644opW6tNSh/O5pGn8LkLw9w+oAxN7+LxyxnshBPt9AIKyTkCJLoEmwfHgfupmu+EvfrMPbTud5fHttE/iSsDyqAOMwKIBTQygmvQ/wR+xSPwVdsHdIXeYzr1vLr4NDVDYL0e3pCPZBBon37CrLlHM7FuhYS5aZu+N5Bi4ihaFf5pLH7O4hk36l7MofM81niKYPZG2sbEma+EhauWSNf1kfK9khr2/9R1z3Pu1bvOb0WPUXuwiNFIKHfRQcnvDfG7nu1HgvlvaWvuxX2xi4/X/pby/oRtEEBZiGkwNBZyh2+m07Whu75ux5haZARmGSgCN0Kn6wjrZP+eO12qofO+c+wQaqngZYNGc0nKu1QDoKwCm/ymrvvixjPUNz7OAYw6migssdy/DwWAJE37L2bCDWj79gI2/9nvIjc/O3JSUX2Opl9Cwr6MRW0KQ6Aki4LDJjC7r+9bkrXnK59rTyM+9ImufvPc6vofNMDt4K9k0/J42jqDe79EmD9kYuh7jd2+MBOnGkWrAl8VqfCtX4w7Np8Y2IjLA3UvZbMcb2WvQ6FN/AOWvKeZEuiN96u8bCL5PL8BtzR9u1eTbzK8ei5ywnDdgKfSZTzmdNF4L153sS5bS6dkRoifbqbfwKrqf42hVqm3kMnjN30b3dJU1TarrnQUD1TIbN3MQ47fgNCcBnGMcaBqBY3yfx/Pegrx8tV0QrLXLvL0lrh4iLLFUZs7PCb5hUJ3TMAVS9fMzeaC9kmkk+LKA6nwqfDNgeRz70rGxsT0TfINSNw3yHh7pfFD/GuwXkX8ZVyv04q92KIR6kZ1/64yENMp7eiOdTM1fDmAAjd8WCr+8P6Ecg53mbUz82CY67jadhTdbpueIgiWaf4mi7Sbe/smwu4DGjqDQW9itBUcR8EfWsgaN7l6YkMtMQzCoLUY/g0KP7knf/XYKvipyTrWfCdihvSh5l6R7DBp9FJ3c5wOWD2Bn1SXxJbfVe7R9VtWWkw9y93fIOW30jPHFzLGh8JrXccR0/DPk6rI29pa+HKH3ZIATjpJ2sP2NTFJ+305tnf2Ne+vvH2Mn22rA8Us4Dksp4iYQeHDXkPU8NMYBXdW+GvdSVF7gwAJO3CcRdTxJrcJZJNV7ranct69FK98egUZrfCcmJs6gWzqfaz7XdwHN6jPPPHPPZ2u//JIxCPQdeMrgNFCiW3e44ajKgI98JbguCGZnBLH7lvHYALwEUPwe3KTDjZY8uExdkecjy6R+akHq/hkLo7urX0KxZR8EHNfCcXrr70y9+yBToKUXtXfbRx5U9733pjK8AMCc5BR6bqhNlSGn2cqnEdfa6o/M6FtYewQadC+/A4f5c+5ek103I8t8jiWbe78bspyD03hXcOnolF2wQwCsufZ6a1172N631B7muOBSBNDUqbwvrI9JcCs0wQ5XYhtE+6G1pQH3M2S+fMaYeW0/pFu6lmsYAPHY1KU2cV0UdtVexYHUf7RPd1AtvhzQSGEZg4Wy2TAXwOmrrXfxwKppn83Tgoaj5Y8EMNpvrRHT3Vz/weq7zftU45d+WxuM/5O8DzxJ/gwN9wpU679tH/rVjOZHnqR8XvLlCIgG61d3uIuR8u0X7JF+yC77g6ldYmczYNsDA7SFhvP/TZ15B5gdScncUe0Cu+jOF+5VtW/7d7hM7e2M0pQ/BE0AKmtVXobqLdbRtfcv+0438JSg0TeuAYkmIV9Hvn6mDD7LuTG371TG3nlbXrqOB7qYTDvqdDT14qZfvOVoMc9lRZxmY5/y/vauYlKvvDVpSWZ5fT1PAJvZ2TDcNQjZlt0y07dx55J38aubmte2BmL+G0LCLcRPj2jqXVWgebBP2EV3Ldkl/+4CJMsUS+9BZnqD647qk5W1IdryOsu3/ATNNn3VzMyTEoWRkr7cdhbFn82ldSTfRF/0sz0WfJ/svnrUNVV+AlGucSCpg0UZeNU45AjrdJR9Z9nHHtodN3iykp8+/KjBDqYM3kUdu5breehFvNVWTd8xqyOmp7orHdE6OXUPz3spXdRPsAvcW0MO13/+PnLeR+2iW58aOCt7kpbf8ka4yZ8CmIUNXKaM+wYr175pt31wz2XQhrvY2blb0ACYNAlfA0j0QdFuhN6vcX1v1j6RM+9Hm61UgdsE97pOPH6z1F7h1cHw/F0cFXa2ffzuGU2u7fDABZ+XANaNNi+uKLTRswc15oeqV9mxf/DsKBfjG7v8jILNP4W67ZNclwMadR+0glQuzrUMgZnZ95Z/tT+7c6VJKdlopNR76+eOspbWv0Hw/Ree4xiAQwlOOOqnvP9A4P8ne1VpvSutMe8+uqM7m84NSDwWVL0CYfeTXL9LzI3Ynz766KPXz+qSzQ+hIU6Ov49+/dO8/bu+RRwwCIE3AZ6PWnXwBrvkDTNb0f/e7x/CyOF6Sj2ZFm14bqHUbjev8k/WMvmTZ43LTDd56FLXkj601RbYK63iv5F2+S2AcxLPH4LE8wF2sInrGk4w/5mNPz5skxNo1UuvACTSJAOWGnKgG3kiL9nPWE/z/6yS+oXNP3psNrql+JYbGi8Muvrqq4/B9VnA8xbsn8FhPnP//fffufu1MXEx+2h/4r4u+uB3kPszEHORYBKayCHLQ6VetY+wMPvHprdyX8253/s6Wd/vXuKw3LCkIHiEsI9ZJXnTbDbsvt5mPd/5t84zf+p0Dpx+JUA5HtnmSPQsyxlRsbOAD3SX8nyyuYImneUVQXWCUddDPMd6wu5AEXy7/eRT+J8ZUwcNIPG/973vHYGw+wGquojrcUZMn2DJ5m1veMMM3/KnuveP3NFsXvIsVNt/AWc5CSaw49RGSGA0mN7lVit8ybqXj1jP4XCdPRg2inW/7fJOa2mSJvrz3Abdrti2jNb7Bg/TU33VxgevsJs/PDNOFhb6zPyKC6WGOmy82MX9L4GrMAXCbLXnw4+10L06yJqu7XbaSPbZmPB1oIm6pPl0Q1oUrp0EnAjpfxXAXApgJp6Zlmgotae3xUa2vQau8nc0AtsumIPZnfGC/7IqK+iK5TtQyo3YpS/TScsRW9opg5YYlO5fYKX0ByjzgwBEanUSOTEui2MDjf0vlrLr7VvvmRUBcac7mLNeBxqNlADJmTzlPwMYzXlcgv8yttBufdaeXBynhsIt8OEK3qupVyOcpnr9Dhruh1EOKnjztT2Ds1ja+q0yPm5fOp2uCwD1MKzesLnTyv6plHUuwDiH8FAu0CIoC6SFvZH837ar3ill4+5BV6/4ecfOLeBAw/HyryLiMwDmFdg3Min5aTS+Tz9zvXNps+H/s18fwQ7FcwDOayDosXAHWLIH54l0Nlrn4oRkLR1g9BX4t8I81iAbPW5VvgE5NbyMyf8zzKsySnL5NXMspd0w9v3cIvM+CMSr39s3G7d7MJbhwWUWIrt8hYeXAu9ndFGfZ2j9C8Lizv/Zb5ce5qEm7j2cibbT6cN/i+7qOMAxDzejA38hdiu6CKYDYBLVWolRQh9bMzZYOcdHtQqHErYEQHEmqgMWk3TeFgDzU5jKf9v3znv02X+guVVjEsFXH+A6kcdaD1Aub29v//VzChi1b49X4vdRhLr11vsHN1pz7Qj8bDKrLULpdyJzKocw1OwCKBm2zYKPCh1PiQ87sujILdnw1gKQrQiMDNmTj5nP0P2F714fHlStCp43M2kBT2t9EXjfBlBydEu37Pfn+J7/zXkIt50IxO3oK1rgKgEaU5YYAJhaUOCLawjufOW8i0Pnlm1/bo/7mAll9uO8/x9teQya14m6TgAAAABJRU5ErkJggg=="})})]});import{useEffect as bf,useRef as Th,useState as Jl}from"react";import UA from"react";var Al=typeof document<"u"?UA.useLayoutEffect:()=>{};import{useRef as GA,useCallback as WA}from"react";function w9(e){let t=GA(null);return Al(()=>{t.current=e},[e]),WA((...r)=>{let n=t.current;return n?.(...r)},[])}var Mr=e=>{var t;return(t=e?.ownerDocument)!==null&&t!==void 0?t:document},kn=e=>e&&"window"in e&&e.window===e?e:Mr(e).defaultView||window;function qA(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function b9(e){return qA(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var KA=!1;function tu(){return KA}function Il(e,t){if(!tu())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let r=t;for(;r!==null;){if(r===e)return!0;r.tagName==="SLOT"&&r.assignedSlot?r=r.assignedSlot.parentNode:b9(r)?r=r.host:r=r.parentNode}return!1}var Bs=(e=document)=>{var t;if(!tu())return e.activeElement;let r=e.activeElement;for(;r&&"shadowRoot"in r&&(!((t=r.shadowRoot)===null||t===void 0)&&t.activeElement);)r=r.shadowRoot.activeElement;return r};function Pl(e){return tu()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}function Jm(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Jm(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function zs(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Jm(e))&&(n&&(n+=" "),n+=t);return n}function ru(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(r=>e.test(r.brand)))||e.test(window.navigator.userAgent)}function y9(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function no(e){let t=null;return()=>(t==null&&(t=e()),t)}var Ol=no(function(){return y9(/^Mac/i)}),e8=no(function(){return y9(/^iPhone/i)}),t8=no(function(){return y9(/^iPad/i)||Ol()&&navigator.maxTouchPoints>1}),r8=no(function(){return e8()||t8()}),YA=no(function(){return Ol()||r8()}),XA=no(function(){return ru(/AppleWebKit/i)&&!n8()}),n8=no(function(){return ru(/Chrome/i)}),S9=no(function(){return ru(/Android/i)}),QA=no(function(){return ru(/Firefox/i)});import{useRef as JA,useCallback as R9,useEffect as eI}from"react";function Dl(){let e=JA(new Map),t=R9((o,i,s,a)=>{let l=a?.once?(...c)=>{e.current.delete(s),s(...c)}:s;e.current.set(s,{type:i,eventTarget:o,fn:l,options:a}),o.addEventListener(i,l,a)},[]),r=R9((o,i,s,a)=>{var l;let c=((l=e.current.get(s))===null||l===void 0?void 0:l.fn)||s;o.removeEventListener(i,c,a),e.current.delete(s)},[]),n=R9(()=>{e.current.forEach((o,i)=>{r(o.eventTarget,o.type,i,o.options)})},[r]);return eI(()=>n,[n]),{addGlobalListener:t,removeGlobalListener:r,removeAllGlobalListeners:n}}function L9(e){return e.mozInputSource===0&&e.isTrusted?!0:S9()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}import{useRef as tI,useCallback as rI}from"react";function M9(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function o8(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function nu(e){let t=tI({isFocused:!1,observer:null});Al(()=>{let n=t.current;return()=>{n.observer&&(n.observer.disconnect(),n.observer=null)}},[]);let r=w9(n=>{e?.(n)});return rI(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let o=n.target,i=s=>{if(t.current.isFocused=!1,o.disabled){let a=M9(s);r(a)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&o.disabled){var s;(s=t.current.observer)===null||s===void 0||s.disconnect();let a=o===document.activeElement?null:document.activeElement;o.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),t.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[r])}var E9=!1;import{useState as mte,useEffect as nI}from"react";var Fl=null,T9=new Set,Nl=new Map,Di=!1,k9=!1,oI={Tab:!0,Escape:!0};function I9(e,t){for(let r of T9)r(e,t)}function iI(e){return!(e.metaKey||!Ol()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ou(e){Di=!0,iI(e)&&(Fl="keyboard",I9("keyboard",e))}function Zs(e){Fl="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Di=!0,I9("pointer",e))}function i8(e){L9(e)&&(Di=!0,Fl="virtual")}function s8(e){e.target===window||e.target===document||E9||!e.isTrusted||(!Di&&!k9&&(Fl="virtual",I9("virtual",e)),Di=!1,k9=!1)}function a8(){E9||(Di=!1,k9=!0)}function A9(e){if(typeof window>"u"||Nl.get(kn(e)))return;let t=kn(e),r=Mr(e),n=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Di=!0,n.apply(this,arguments)},r.addEventListener("keydown",ou,!0),r.addEventListener("keyup",ou,!0),r.addEventListener("click",i8,!0),t.addEventListener("focus",s8,!0),t.addEventListener("blur",a8,!1),typeof PointerEvent<"u"&&(r.addEventListener("pointerdown",Zs,!0),r.addEventListener("pointermove",Zs,!0),r.addEventListener("pointerup",Zs,!0)),t.addEventListener("beforeunload",()=>{l8(e)},{once:!0}),Nl.set(t,{focus:n})}var l8=(e,t)=>{let r=kn(e),n=Mr(e);t&&n.removeEventListener("DOMContentLoaded",t),Nl.has(r)&&(r.HTMLElement.prototype.focus=Nl.get(r).focus,n.removeEventListener("keydown",ou,!0),n.removeEventListener("keyup",ou,!0),n.removeEventListener("click",i8,!0),r.removeEventListener("focus",s8,!0),r.removeEventListener("blur",a8,!1),typeof PointerEvent<"u"&&(n.removeEventListener("pointerdown",Zs,!0),n.removeEventListener("pointermove",Zs,!0),n.removeEventListener("pointerup",Zs,!0)),Nl.delete(r))};function c8(e){let t=Mr(e),r;return t.readyState!=="loading"?A9(e):(r=()=>{A9(e)},t.addEventListener("DOMContentLoaded",r)),()=>l8(e,r)}typeof document<"u"&&c8();function iu(){return Fl!=="pointer"}var sI=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function aI(e,t,r){let n=Mr(r?.target),o=typeof window<"u"?kn(r?.target).HTMLInputElement:HTMLInputElement,i=typeof window<"u"?kn(r?.target).HTMLTextAreaElement:HTMLTextAreaElement,s=typeof window<"u"?kn(r?.target).HTMLElement:HTMLElement,a=typeof window<"u"?kn(r?.target).KeyboardEvent:KeyboardEvent;return e=e||n.activeElement instanceof o&&!sI.has(n.activeElement.type)||n.activeElement instanceof i||n.activeElement instanceof s&&n.activeElement.isContentEditable,!(e&&t==="keyboard"&&r instanceof a&&!oI[r.key])}function P9(e,t,r){A9(),nI(()=>{let n=(o,i)=>{aI(!!r?.isTextInput,o,i)&&e(iu())};return T9.add(n),()=>{T9.delete(n)}},t)}import{useCallback as u8}from"react";function O9(e){let{isDisabled:t,onFocus:r,onBlur:n,onFocusChange:o}=e,i=u8(l=>{if(l.target===l.currentTarget)return n&&n(l),o&&o(!1),!0},[n,o]),s=nu(i),a=u8(l=>{let c=Mr(l.target),u=c?Bs(c):Bs();l.target===l.currentTarget&&u===Pl(l.nativeEvent)&&(r&&r(l),o&&o(!0),s(l))},[o,r,s]);return{focusProps:{onFocus:!t&&(r||o||n)?a:void 0,onBlur:!t&&(n||o)?i:void 0}}}import{useRef as lI,useCallback as d8}from"react";function D9(e){let{isDisabled:t,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=e,i=lI({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:a}=Dl(),l=d8(d=>{d.currentTarget.contains(d.target)&&i.current.isFocusWithin&&!d.currentTarget.contains(d.relatedTarget)&&(i.current.isFocusWithin=!1,a(),r&&r(d),o&&o(!1))},[r,o,i,a]),c=nu(l),u=d8(d=>{if(!d.currentTarget.contains(d.target))return;let f=Mr(d.target),p=Bs(f);if(!i.current.isFocusWithin&&p===Pl(d.nativeEvent)){n&&n(d),o&&o(!0),i.current.isFocusWithin=!0,c(d);let m=d.currentTarget;s(f,"focus",h=>{if(i.current.isFocusWithin&&!Il(m,h.target)){let g=new f.defaultView.FocusEvent("blur",{relatedTarget:h.target});o8(g,m);let v=M9(g);l(v)}},{capture:!0})}},[n,o,c,s,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:l}}}import{useState as cI,useRef as uI,useEffect as f8,useMemo as dI}from"react";var F9=!1,N9=0;function fI(){F9=!0,setTimeout(()=>{F9=!1},50)}function p8(e){e.pointerType==="touch"&&fI()}function pI(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",p8),N9++,()=>{N9--,!(N9>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",p8)}}function V9(e){let{onHoverStart:t,onHoverChange:r,onHoverEnd:n,isDisabled:o}=e,[i,s]=cI(!1),a=uI({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;f8(pI,[]);let{addGlobalListener:l,removeAllGlobalListeners:c}=Dl(),{hoverProps:u,triggerHoverEnd:d}=dI(()=>{let f=(h,g)=>{if(a.pointerType=g,o||g==="touch"||a.isHovered||!h.currentTarget.contains(h.target))return;a.isHovered=!0;let v=h.currentTarget;a.target=v,l(Mr(h.target),"pointerover",C=>{a.isHovered&&a.target&&!Il(a.target,C.target)&&p(C,C.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:v,pointerType:g}),r&&r(!0),s(!0)},p=(h,g)=>{let v=a.target;a.pointerType="",a.target=null,!(g==="touch"||!a.isHovered||!v)&&(a.isHovered=!1,c(),n&&n({type:"hoverend",target:v,pointerType:g}),r&&r(!1),s(!1))},m={};return typeof PointerEvent<"u"&&(m.onPointerEnter=h=>{F9&&h.pointerType==="mouse"||f(h,h.pointerType)},m.onPointerLeave=h=>{!o&&h.currentTarget.contains(h.target)&&p(h,h.pointerType)}),{hoverProps:m,triggerHoverEnd:p}},[t,r,n,o,a,l,c]);return f8(()=>{o&&d({currentTarget:a.target},a.pointerType)},[o]),{hoverProps:u,isHovered:i}}import{useRef as mI,useState as m8,useCallback as h8}from"react";function H9(e={}){let{autoFocus:t=!1,isTextInput:r,within:n}=e,o=mI({isFocused:!1,isFocusVisible:t||iu()}),[i,s]=m8(!1),[a,l]=m8(()=>o.current.isFocused&&o.current.isFocusVisible),c=h8(()=>l(o.current.isFocused&&o.current.isFocusVisible),[]),u=h8(p=>{o.current.isFocused=p,s(p),c()},[c]);P9(p=>{o.current.isFocusVisible=p,c()},[],{isTextInput:r});let{focusProps:d}=O9({isDisabled:n,onFocusChange:u}),{focusWithinProps:f}=D9({isDisabled:!n,onFocusWithinChange:u});return{isFocused:i,isFocusVisible:a,focusProps:n?f:d}}import{useRef as SI,useState as RI}from"react";var hI=Object.defineProperty,gI=(e,t,r)=>t in e?hI(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,$9=(e,t,r)=>(gI(e,typeof t!="symbol"?t+"":t,r),r),_9=class{constructor(){$9(this,"current",this.detect()),$9(this,"handoffState","pending"),$9(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},un=new _9;function dn(e){return un.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}import{useEffect as vI,useState as CI}from"react";function su(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Ct(){let e=[],t={addEventListener(r,n,o,i){return r.addEventListener(n,o,i),t.add(()=>r.removeEventListener(n,o,i))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return su(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,o){let i=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:o}),this.add(()=>{Object.assign(r.style,{[n]:i})})},group(r){let n=Ct();return r(n),this.add(()=>n.dispose())},add(r){return e.includes(r)||e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let o of e.splice(n,1))o()}},dispose(){for(let r of e.splice(0))r()}};return t}function Ho(){let[e]=CI(Ct);return vI(()=>()=>e.dispose(),[e]),e}import yI from"react";import{useRef as bI}from"react";import{useEffect as xI,useLayoutEffect as wI}from"react";var ge=(e,t)=>{un.isServer?xI(e,t):wI(e,t)};function An(e){let t=bI(e);return ge(()=>{t.current=e},[e]),t}var Ee=function(e){let t=An(e);return yI.useCallback((...r)=>t.current(...r),[t])};function LI(e){let t=e.width/2,r=e.height/2;return{top:e.clientY-r,right:e.clientX+t,bottom:e.clientY+r,left:e.clientX-t}}function MI(e,t){return!(!e||!t||e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom)}function g8({disabled:e=!1}={}){let t=SI(null),[r,n]=RI(!1),o=Ho(),i=Ee(()=>{t.current=null,n(!1),o.dispose()}),s=Ee(a=>{if(o.dispose(),t.current===null){t.current=a.currentTarget,n(!0);{let l=dn(a.currentTarget);o.addEventListener(l,"pointerup",i,!1),o.addEventListener(l,"pointermove",c=>{if(t.current){let u=LI(c);n(MI(u,t.current.getBoundingClientRect()))}},!1),o.addEventListener(l,"pointercancel",i,!1)}}});return{pressed:r,pressProps:e?{}:{onPointerDown:s,onPointerUp:i,onClick:i}}}import dre,{createContext as EI,useContext as TI}from"react";var kI=EI(void 0);function au(){return TI(kI)}import{Fragment as z9,cloneElement as AI,createElement as II,forwardRef as PI,isValidElement as OI,useCallback as gre,useRef as vre}from"react";function B9(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}function $o(e,t,...r){if(e in t){let o=t[e];return typeof o=="function"?o(...r):o}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,$o),n}var cu=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(cu||{}),DI=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(DI||{});function zt({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:o,visible:i=!0,name:s,mergeRefs:a}){a=a??NI;let l=v8(t,e);if(i)return lu(l,r,n,s,a);let c=o??0;if(c&2){let{static:u=!1,...d}=l;if(u)return lu(d,r,n,s,a)}if(c&1){let{unmount:u=!0,...d}=l;return $o(u?0:1,{0(){return null},1(){return lu({...d,hidden:!0,style:{display:"none"}},r,n,s,a)}})}return lu(l,r,n,s,a)}function lu(e,t={},r,n,o){let{as:i=r,children:s,refName:a="ref",...l}=Z9(e,["unmount","static"]),c=e.ref!==void 0?{[a]:e.ref}:{},u=typeof s=="function"?s(t):s;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t)),l["aria-labelledby"]&&l["aria-labelledby"]===l.id&&(l["aria-labelledby"]=void 0);let d={};if(t){let f=!1,p=[];for(let[m,h]of Object.entries(t))typeof h=="boolean"&&(f=!0),h===!0&&p.push(m.replace(/([A-Z])/g,g=>`-${g.toLowerCase()}`));if(f){d["data-headlessui-state"]=p.join(" ");for(let m of p)d[`data-${m}`]=""}}if(i===z9&&(Object.keys(js(l)).length>0||Object.keys(js(d)).length>0))if(!OI(u)||Array.isArray(u)&&u.length>1){if(Object.keys(js(l)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(js(l)).concat(Object.keys(js(d))).map(f=>` - ${f}`).join(`
|
|
132
|
+
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
|
|
133
|
+
`)].join(`
|
|
134
|
+
`))}else{let f=u.props,p=f?.className,m=typeof p=="function"?(...v)=>B9(p(...v),l.className):B9(p,l.className),h=m?{className:m}:{},g=v8(u.props,js(Z9(l,["ref"])));for(let v in d)v in g&&delete d[v];return AI(u,Object.assign({},g,d,c,{ref:o(u.ref,c.ref)},h))}return II(i,Object.assign({},Z9(l,["ref"]),i!==z9&&c,i!==z9&&d),u)}function NI(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function v8(...e){var t;if(e.length===0)return{};if(e.length===1)return e[0];let r={},n={};for(let o of e)for(let i in o)i.startsWith("on")&&typeof o[i]=="function"?((t=n[i])!=null||(n[i]=[]),n[i].push(o[i])):r[i]=o[i];if(r.disabled||r["aria-disabled"])for(let o in n)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(o)&&(n[o]=[i=>{var s;return(s=i?.preventDefault)==null?void 0:s.call(i)}]);for(let o in n)Object.assign(r,{[o](i,...s){let a=n[o];for(let l of a){if((i instanceof Event||i?.nativeEvent instanceof Event)&&i.defaultPrevented)return;l(i,...s)}}});return r}function j9(...e){var t;if(e.length===0)return{};if(e.length===1)return e[0];let r={},n={};for(let o of e)for(let i in o)i.startsWith("on")&&typeof o[i]=="function"?((t=n[i])!=null||(n[i]=[]),n[i].push(o[i])):r[i]=o[i];for(let o in n)Object.assign(r,{[o](...i){let s=n[o];for(let a of s)a?.(...i)}});return r}function Zt(e){var t;return Object.assign(PI(e),{displayName:(t=e.displayName)!=null?t:e.name})}function js(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Z9(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}import{useId as oo}from"react";import Rre,{createContext as FI,useContext as VI}from"react";var HI=FI(void 0);function C8(){return VI(HI)}function x8(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=t?.getAttribute("disabled")==="";return n&&$I(r)?!1:n}function $I(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}import zI,{createContext as ZI,useContext as jI,useMemo as U9,useState as UI}from"react";import{useEffect as _I,useRef as BI}from"react";var w8=Symbol();function b8(e,t=!0){return Object.assign(e,{[w8]:t})}function Er(...e){let t=BI(e);_I(()=>{t.current=e},[e]);let r=Ee(n=>{for(let o of t.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return e.every(n=>n==null||n?.[w8])?void 0:r}var G9=ZI(null);G9.displayName="DescriptionContext";function y8(){let e=jI(G9);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,y8),t}return e}function S8(){let[e,t]=UI([]);return[e.length>0?e.join(" "):void 0,U9(()=>function(r){let n=Ee(i=>(t(s=>[...s,i]),()=>t(s=>{let a=s.slice(),l=a.indexOf(i);return l!==-1&&a.splice(l,1),a}))),o=U9(()=>({register:n,slot:r.slot,name:r.name,props:r.props,value:r.value}),[n,r.slot,r.name,r.props,r.value]);return zI.createElement(G9.Provider,{value:o},r.children)},[t])]}var GI="p";function WI(e,t){let r=oo(),n=au(),{id:o=`headlessui-description-${r}`,...i}=e,s=y8(),a=Er(t);ge(()=>s.register(o),[o,s.register]);let l=n||!1,c=U9(()=>({...s.slot,disabled:l}),[s.slot,l]),u={ref:a,...s.props,id:o};return zt({ourProps:u,theirProps:i,slot:c,defaultTag:GI,name:s.name||"Description"})}var qI=Zt(WI),Vre=Object.assign(qI,{});var xt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(xt||{});import KI,{createContext as YI,useContext as R8,useMemo as W9,useState as XI}from"react";var uu=YI(null);uu.displayName="LabelContext";function du(){let e=R8(uu);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,du),t}return e}function QI(e){var t,r,n;let o=(r=(t=R8(uu))==null?void 0:t.value)!=null?r:void 0;return((n=e?.length)!=null?n:0)>0?[o,...e].filter(Boolean).join(" "):o}function q9({inherit:e=!1}={}){let t=QI(),[r,n]=XI([]),o=e?[t,...r].filter(Boolean):r;return[o.length>0?o.join(" "):void 0,W9(()=>function(i){let s=Ee(l=>(n(c=>[...c,l]),()=>n(c=>{let u=c.slice(),d=u.indexOf(l);return d!==-1&&u.splice(d,1),u}))),a=W9(()=>({register:s,slot:i.slot,name:i.name,props:i.props,value:i.value}),[s,i.slot,i.name,i.props,i.value]);return KI.createElement(uu.Provider,{value:a},i.children)},[n])]}var JI="label";function eP(e,t){var r;let n=oo(),o=du(),i=C8(),s=au(),{id:a=`headlessui-label-${n}`,htmlFor:l=i??((r=o.props)==null?void 0:r.htmlFor),passive:c=!1,...u}=e,d=Er(t);ge(()=>o.register(a),[a,o.register]);let f=Ee(g=>{let v=g.currentTarget;if(v instanceof HTMLLabelElement&&g.preventDefault(),o.props&&"onClick"in o.props&&typeof o.props.onClick=="function"&&o.props.onClick(g),v instanceof HTMLLabelElement){let C=document.getElementById(v.htmlFor);if(C){let x=C.getAttribute("disabled");if(x==="true"||x==="")return;let w=C.getAttribute("aria-disabled");if(w==="true"||w==="")return;(C instanceof HTMLInputElement&&(C.type==="radio"||C.type==="checkbox")||C.role==="radio"||C.role==="checkbox"||C.role==="switch")&&C.click(),C.focus({preventScroll:!0})}}}),p=s||!1,m=W9(()=>({...o.slot,disabled:p}),[o.slot,p]),h={ref:d,...o.props,id:a,htmlFor:l,onClick:f};return c&&("onClick"in h&&(delete h.htmlFor,delete h.onClick),"onClick"in u&&delete u.onClick),zt({ourProps:h,theirProps:u,slot:m,defaultTag:l?JI:"div",name:o.name||"Label"})}var tP=Zt(eP),qre=Object.assign(tP,{});import{useMemo as rP,useReducer as nP}from"react";function oP(e){if(e===null)return{width:0,height:0};let{width:t,height:r}=e.getBoundingClientRect();return{width:t,height:r}}function L8(e,t=!1){let r=e===null?null:"current"in e?e.current:e,[n,o]=nP(()=>({}),{}),i=rP(()=>oP(r),[r,n]);return ge(()=>{if(!r)return;let s=new ResizeObserver(o);return s.observe(r),()=>{s.disconnect()}},[r]),t?{width:`${i.width}px`,height:`${i.height}px`}:i}import{useId as sP}from"react";var fu=class extends Map{constructor(t){super(),this.factory=t}get(t){let r=super.get(t);return r===void 0&&(r=this.factory(t),this.set(t,r)),r}};function pu(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...i){let s=t[o].call(r,...i);s&&(r=s,n.forEach(a=>a()))}}}import{useSyncExternalStore as iP}from"react";function mu(e){return iP(e.subscribe,e.getSnapshot,e.getSnapshot)}var aP=new fu(()=>pu(()=>[],{ADD(e){return this.includes(e)?this:[...this,e]},REMOVE(e){let t=this.indexOf(e);if(t===-1)return this;let r=this.slice();return r.splice(t,1),r}}));function Us(e,t){let r=aP.get(t),n=sP(),o=mu(r);if(ge(()=>{if(e)return r.dispatch("ADD",n),()=>r.dispatch("REMOVE",n)},[r,e]),!e)return!1;let i=o.indexOf(n),s=o.length;return i===-1&&(i=s,s+=1),i===s-1}var K9=new Map,Vl=new Map;function M8(e){var t;let r=(t=Vl.get(e))!=null?t:0;return Vl.set(e,r+1),r!==0?()=>E8(e):(K9.set(e,{"aria-hidden":e.getAttribute("aria-hidden"),inert:e.inert}),e.setAttribute("aria-hidden","true"),e.inert=!0,()=>E8(e))}function E8(e){var t;let r=(t=Vl.get(e))!=null?t:1;if(r===1?Vl.delete(e):Vl.set(e,r-1),r!==1)return;let n=K9.get(e);n&&(n["aria-hidden"]===null?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",n["aria-hidden"]),e.inert=n.inert,K9.delete(e))}function T8(e,{allowed:t,disallowed:r}={}){let n=Us(e,"inert-others");ge(()=>{var o,i;if(!n)return;let s=Ct();for(let l of(o=r?.())!=null?o:[])l&&s.add(M8(l));let a=(i=t?.())!=null?i:[];for(let l of a){if(!l)continue;let c=dn(l);if(!c)continue;let u=l.parentElement;for(;u&&u!==c.body;){for(let d of u.children)a.some(f=>d.contains(f))||s.add(M8(d));u=u.parentElement}}return s.dispose},[n,t,r])}import{useEffect as lP}from"react";function k8(e,t,r){let n=An(o=>{let i=o.getBoundingClientRect();i.x===0&&i.y===0&&i.width===0&&i.height===0&&r()});lP(()=>{if(!e)return;let o=t===null?null:t instanceof HTMLElement?t:t.current;if(!o)return;let i=Ct();if(typeof ResizeObserver<"u"){let s=new ResizeObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}if(typeof IntersectionObserver<"u"){let s=new IntersectionObserver(()=>n.current(o));s.observe(o),i.add(()=>s.disconnect())}return()=>i.dispose()},[t,n,e])}import{useCallback as bP,useRef as D8}from"react";var Y9=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(","),cP=["[data-autofocus]"].map(e=>`${e}:not([tabindex='-1'])`).join(","),hu=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e[e.AutoFocus=64]="AutoFocus",e))(hu||{}),uP=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(uP||{}),dP=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(dP||{});function A8(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Y9)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}function fP(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(cP)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Hl=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Hl||{});function $l(e,t=0){var r;return e===((r=dn(e))==null?void 0:r.body)?!1:$o(t,{0(){return e.matches(Y9)},1(){let n=e;for(;n!==null;){if(n.matches(Y9))return!0;n=n.parentElement}return!1}})}function X9(e){let t=dn(e);Ct().nextFrame(()=>{t&&!$l(t.activeElement,0)&&mP(e)})}var pP=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(pP||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function mP(e){e?.focus({preventScroll:!0})}var hP=["textarea","input"].join(",");function gP(e){var t,r;return(r=(t=e?.matches)==null?void 0:t.call(e,hP))!=null?r:!1}function Q9(e,t=r=>r){return e.slice().sort((r,n)=>{let o=t(r),i=t(n);if(o===null||i===null)return 0;let s=o.compareDocumentPosition(i);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function I8(e,t){return vP(A8(),t,{relativeTo:e})}function vP(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,s=Array.isArray(e)?r?Q9(e):e:t&64?fP(e):A8(e);o.length>0&&s.length>1&&(s=s.filter(p=>!o.some(m=>m!=null&&"current"in m?m?.current===p:m===p))),n=n??i.activeElement;let a=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,s.indexOf(n))-1;if(t&4)return Math.max(0,s.indexOf(n))+1;if(t&8)return s.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=t&32?{preventScroll:!0}:{},u=0,d=s.length,f;do{if(u>=d||u+d<=0)return 0;let p=l+u;if(t&16)p=(p+d)%d;else{if(p<0)return 3;if(p>=d)return 1}f=s[p],f?.focus(c),u+=a}while(f!==i.activeElement);return t&6&&gP(f)&&f.select(),2}function J9(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function CP(){return/Android/gi.test(window.navigator.userAgent)}function P8(){return J9()||CP()}import{useEffect as xP}from"react";function Gs(e,t,r,n){let o=An(r);xP(()=>{if(!e)return;function i(s){o.current(s)}return document.addEventListener(t,i,n),()=>document.removeEventListener(t,i,n)},[e,t,n])}import{useEffect as wP}from"react";function O8(e,t,r,n){let o=An(r);wP(()=>{if(!e)return;function i(s){o.current(s)}return window.addEventListener(t,i,n),()=>window.removeEventListener(t,i,n)},[e,t,n])}var N8=30;function F8(e,t,r){let n=Us(e,"outside-click"),o=An(r),i=bP(function(l,c){if(l.defaultPrevented)return;let u=c(l);if(u===null||!u.getRootNode().contains(u)||!u.isConnected)return;let d=function f(p){return typeof p=="function"?f(p()):Array.isArray(p)||p instanceof Set?p:[p]}(t);for(let f of d){if(f===null)continue;let p=f instanceof HTMLElement?f:f.current;if(p!=null&&p.contains(u)||l.composed&&l.composedPath().includes(p))return}return!$l(u,Hl.Loose)&&u.tabIndex!==-1&&l.preventDefault(),o.current(l,u)},[o]),s=D8(null);Gs(n,"pointerdown",l=>{var c,u;s.current=((u=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:u[0])||l.target},!0),Gs(n,"mousedown",l=>{var c,u;s.current=((u=(c=l.composedPath)==null?void 0:c.call(l))==null?void 0:u[0])||l.target},!0),Gs(n,"click",l=>{P8()||s.current&&(i(l,()=>s.current),s.current=null)},!0);let a=D8({x:0,y:0});Gs(n,"touchstart",l=>{a.current.x=l.touches[0].clientX,a.current.y=l.touches[0].clientY},!0),Gs(n,"touchend",l=>{let c={x:l.changedTouches[0].clientX,y:l.changedTouches[0].clientY};if(!(Math.abs(c.x-a.current.x)>=N8||Math.abs(c.y-a.current.y)>=N8))return i(l,()=>l.target instanceof HTMLElement?l.target:null)},!0),O8(n,"blur",l=>i(l,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}import{useMemo as yP}from"react";function _l(...e){return yP(()=>dn(...e),[...e])}import{useState as SP}from"react";function V8(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}function H8(e,t){let[r,n]=SP(()=>V8(e));return ge(()=>{n(V8(e))},[e.type,e.as]),ge(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}function $8(){let e;return{before({doc:t}){var r;let n=t.documentElement,o=(r=t.defaultView)!=null?r:window;e=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:t,d:r}){let n=t.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),i=Math.max(0,e-o);r.style(n,"paddingRight",`${i}px`)}}}function _8(){return J9()?{before({doc:e,d:t,meta:r}){function n(o){return r.containers.flatMap(i=>i()).some(i=>i.contains(o))}t.microTask(()=>{var o;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let a=Ct();a.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>a.dispose()))}let i=(o=window.scrollY)!=null?o:window.pageYOffset,s=null;t.addEventListener(e,"click",a=>{if(a.target instanceof HTMLElement)try{let l=a.target.closest("a");if(!l)return;let{hash:c}=new URL(l.href),u=e.querySelector(c);u&&!n(u)&&(s=u)}catch{}},!0),t.addEventListener(e,"touchstart",a=>{if(a.target instanceof HTMLElement)if(n(a.target)){let l=a.target;for(;l.parentElement&&n(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(a.target,"touchAction","none")}),t.addEventListener(e,"touchmove",a=>{if(a.target instanceof HTMLElement){if(a.target.tagName==="INPUT")return;if(n(a.target)){let l=a.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&a.preventDefault()}else a.preventDefault()}},{passive:!1}),t.add(()=>{var a;let l=(a=window.scrollY)!=null?a:window.pageYOffset;i!==l&&window.scrollTo(0,i),s&&s.isConnected&&(s.scrollIntoView({block:"nearest"}),s=null)})})}}:{}}function B8(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function RP(e){let t={};for(let r of e)Object.assign(t,r(t));return t}var _o=pu(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:Ct(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:RP(r)},o=[_8(),$8(),B8()];o.forEach(({before:i})=>i?.(n)),o.forEach(({after:i})=>i?.(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});_o.subscribe(()=>{let e=_o.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",o=r.count!==0;(o&&!n||!o&&n)&&_o.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&_o.dispatch("TEARDOWN",r)}});function z8(e,t,r=()=>({containers:[]})){let n=mu(_o),o=t?n.get(t):void 0,i=o?o.count>0:!1;return ge(()=>{if(!(!t||!e))return _o.dispatch("PUSH",t,r),()=>_o.dispatch("POP",t,r)},[e,t]),i}function Z8(e,t,r=()=>[document.body]){let n=Us(e,"scroll-lock");z8(n,t,o=>{var i;return{containers:[...(i=o.containers)!=null?i:[],r]}})}import{useRef as LP}from"react";function j8(e){return[e.screenX,e.screenY]}function U8(){let e=LP([-1,-1]);return{wasMoved(t){let r=j8(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=j8(t)}}}import{useRef as q8,useState as EP}from"react";function G8(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}import{useCallback as Bl,useState as MP}from"react";function W8(e=0){let[t,r]=MP(e),n=Bl(l=>r(l),[t]),o=Bl(l=>r(c=>c|l),[t]),i=Bl(l=>(t&l)===l,[t]),s=Bl(l=>r(c=>c&~l),[r]),a=Bl(l=>r(c=>c^l),[r]);return{flags:t,setFlag:n,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:a}}var TP=(e=>(e[e.None=0]="None",e[e.Closed=1]="Closed",e[e.Enter=2]="Enter",e[e.Leave=4]="Leave",e))(TP||{});function K8(e){let t={};for(let r in e)e[r]===!0&&(t[`data-${r}`]="");return t}function Y8(e,t,r,n){let[o,i]=EP(r),{hasFlag:s,addFlag:a,removeFlag:l}=W8(e&&o?3:0),c=q8(!1),u=q8(!1),d=Ho();return ge(function f(){var p;if(!e)return;r&&i(!0);let m=t.current;return m?((p=n?.start)==null||p.call(n,r),kP(m,{inFlight:c,prepare(){u.current?u.current=!1:u.current=c.current,c.current=!0,!u.current&&(r?(a(3),l(4)):(a(4),l(2)))},run(){u.current?r?(l(3),a(4)):(l(4),a(3)):r?l(1):a(1)},done(){var h;u.current&&typeof m.getAnimations=="function"&&m.getAnimations().length>0||(c.current=!1,l(7),r||i(!1),(h=n?.end)==null||h.call(n,r))}})):r?(a(3),d.nextFrame(()=>f())):void 0},[e,r,t,d]),e?[o,{closed:s(1),enter:s(2),leave:s(4),transition:s(2)||s(4)}]:[r,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function kP(e,{prepare:t,run:r,done:n,inFlight:o}){let i=Ct();return IP(e,{prepare:t,inFlight:o}),i.nextFrame(()=>{i.add(AP(e,n)),r()}),i.dispose}function AP(e,t){let r=G8(t),n=Ct();if(!e)return n.dispose;let{transitionDuration:o,transitionDelay:i}=getComputedStyle(e),[s,a]=[o,i].map(c=>{let[u=0]=c.split(",").filter(Boolean).map(d=>d.includes("ms")?parseFloat(d):parseFloat(d)*1e3).sort((d,f)=>f-d);return u}),l=s+a;if(l!==0){let c=n.group(u=>{let d=u.setTimeout(()=>{r(),u.dispose()},l);u.addEventListener(e,"transitionrun",f=>{f.target===f.currentTarget&&(d(),u.addEventListener(e,"transitioncancel",p=>{p.target===p.currentTarget&&(r(),c())}))})});n.addEventListener(e,"transitionend",u=>{u.target===u.currentTarget&&(r(),n.dispose())})}else r();return n.dispose}function IP(e,{inFlight:t,prepare:r}){if(t!=null&&t.current){r();return}let n=e.style.transition;e.style.transition="none",r(),e.offsetHeight,e.style.transition=n}import{useEffect as PP,useRef as X8}from"react";function Q8(e,{container:t,accept:r,walk:n}){let o=X8(r),i=X8(n);PP(()=>{o.current=r,i.current=n},[r,n]),ge(()=>{if(!t||!e)return;let s=dn(t);if(!s)return;let a=o.current,l=i.current,c=Object.assign(d=>a(d),{acceptNode:a}),u=s.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,c,!1);for(;u.nextNode();)l(u.currentNode)},[t,e,o,i])}import*as oe from"react";import{useLayoutEffect as tO,useEffect as rO,useRef as aie}from"react";function gu(){return typeof window<"u"}function Bo(e){return e6(e)?(e.nodeName||"").toLowerCase():"#document"}function er(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fn(e){var t;return(t=(e6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function e6(e){return gu()?e instanceof Node||e instanceof er(e).Node:!1}function kt(e){return gu()?e instanceof Element||e instanceof er(e).Element:!1}function Zr(e){return gu()?e instanceof HTMLElement||e instanceof er(e).HTMLElement:!1}function J8(e){return!gu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof er(e).ShadowRoot}function Ws(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function t6(e){return["table","td","th"].includes(Bo(e))}function zl(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function vu(e){let t=Zl(),r=kt(e)?Tr(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function r6(e){let t=In(e);for(;Zr(t)&&!zo(t);){if(vu(t))return t;if(zl(t))return null;t=In(t)}return null}function Zl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function zo(e){return["html","body","#document"].includes(Bo(e))}function Tr(e){return er(e).getComputedStyle(e)}function jl(e){return kt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function In(e){if(Bo(e)==="html")return e;let t=e.assignedSlot||e.parentNode||J8(e)&&e.host||fn(e);return J8(t)?t.host:t}function n6(e){let t=In(e);return zo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zr(t)&&Ws(t)?t:n6(t)}function io(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=n6(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=er(o);if(i){let a=Cu(s);return t.concat(s,s.visualViewport||[],Ws(o)?o:[],a&&r?io(a):[])}return t.concat(o,io(o,[],r))}function Cu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function o6(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}var i6=["top","right","bottom","left"];var jr=Math.min,ut=Math.max,Ni=Math.round,qs=Math.floor,pn=e=>({x:e,y:e}),OP={left:"right",right:"left",bottom:"top",top:"bottom"},DP={start:"end",end:"start"};function wu(e,t,r){return ut(e,jr(t,r))}function Ur(e,t){return typeof e=="function"?e(t):e}function Pn(e){return e.split("-")[0]}function Fi(e){return e.split("-")[1]}function bu(e){return e==="x"?"y":"x"}function yu(e){return e==="y"?"height":"width"}function On(e){return["top","bottom"].includes(Pn(e))?"y":"x"}function Su(e){return bu(On(e))}function s6(e,t,r){r===void 0&&(r=!1);let n=Fi(e),o=Su(e),i=yu(o),s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=Ul(s)),[s,Ul(s)]}function a6(e){let t=Ul(e);return[xu(e),t,xu(t)]}function xu(e){return e.replace(/start|end/g,t=>DP[t])}function NP(e,t,r){let n=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:s;default:return[]}}function l6(e,t,r,n){let o=Fi(e),i=NP(Pn(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(xu)))),i}function Ul(e){return e.replace(/left|right|bottom|top/g,t=>OP[t])}function FP(e){return{top:0,right:0,bottom:0,left:0,...e}}function ef(e){return typeof e!="number"?FP(e):{top:e,right:e,bottom:e,left:e}}function Vi(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}import{tabbable as fie,isTabbable as pie}from"tabbable";import*as Kl from"react-dom";function c6(e,t,r){let{reference:n,floating:o}=e,i=On(t),s=Su(t),a=yu(s),l=Pn(t),c=i==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[a]/2-o[a]/2,p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(Fi(t)){case"start":p[s]-=f*(r&&c?-1:1);break;case"end":p[s]+=f*(r&&c?-1:1);break}return p}var f6=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=c6(c,n,l),f=n,p={},m=0;for(let h=0;h<a.length;h++){let{name:g,fn:v}=a[h],{x:C,y:x,data:w,reset:y}=await v({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=C??u,d=x??d,p={...p,[g]:{...p[g],...w}},y&&m<=50&&(m++,typeof y=="object"&&(y.placement&&(f=y.placement),y.rects&&(c=y.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:u,y:d}=c6(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function Hi(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Ur(t,e),m=ef(p),g=a[f?d==="floating"?"reference":"floating":d],v=Vi(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),C=d==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),w=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},y=Vi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:x,strategy:l}):C);return{top:(v.top-y.top+m.top)/w.y,bottom:(y.bottom-v.bottom+m.bottom)/w.y,left:(v.left-y.left+m.left)/w.x,right:(y.right-v.right+m.right)/w.x}}var p6=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=Ur(e,t)||{};if(c==null)return{};let d=ef(u),f={x:r,y:n},p=Su(o),m=yu(p),h=await s.getDimensions(c),g=p==="y",v=g?"top":"left",C=g?"bottom":"right",x=g?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],y=f[p]-i.reference[p],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),R=b?b[x]:0;(!R||!await(s.isElement==null?void 0:s.isElement(b)))&&(R=a.floating[x]||i.floating[m]);let L=w/2-y/2,E=R/2-h[m]/2-1,S=jr(d[v],E),A=jr(d[C],E),k=S,I=R-h[m]-A,N=R/2-h[m]/2+L,D=wu(k,N,I),F=!l.arrow&&Fi(o)!=null&&N!==D&&i.reference[m]/2-(N<k?S:A)-h[m]/2<0,H=F?N<k?N-k:N-I:0;return{[p]:f[p]+H,data:{[p]:D,centerOffset:N-D-H,...F&&{alignmentOffset:H}},reset:F}}});var m6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Ur(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let v=Pn(o),C=On(a),x=Pn(a)===a,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),y=f||(x||!h?[Ul(a)]:a6(a)),b=m!=="none";!f&&b&&y.push(...l6(a,h,m,w));let R=[a,...y],L=await Hi(t,g),E=[],S=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&E.push(L[v]),d){let D=s6(o,s,w);E.push(L[D[0]],L[D[1]])}if(S=[...S,{placement:o,overflows:E}],!E.every(D=>D<=0)){var A,k;let D=(((A=i.flip)==null?void 0:A.index)||0)+1,F=R[D];if(F){var I;let P=d==="alignment"?C!==On(F):!1,O=((I=S[0])==null?void 0:I.overflows[0])>0;if(!P||O)return{data:{index:D,overflows:S},reset:{placement:F}}}let H=(k=S.filter(P=>P.overflows[0]<=0).sort((P,O)=>P.overflows[1]-O.overflows[1])[0])==null?void 0:k.placement;if(!H)switch(p){case"bestFit":{var N;let P=(N=S.filter(O=>{if(b){let M=On(O.placement);return M===C||M==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(M=>M>0).reduce((M,Z)=>M+Z,0)]).sort((O,M)=>O[1]-M[1])[0])==null?void 0:N[0];P&&(H=P);break}case"initialPlacement":H=a;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function u6(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function d6(e){return i6.some(t=>e[t]>=0)}var h6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...o}=Ur(e,t);switch(n){case"referenceHidden":{let i=await Hi(t,{...o,elementContext:"reference"}),s=u6(i,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:d6(s)}}}case"escaped":{let i=await Hi(t,{...o,altBoundary:!0}),s=u6(i,r.floating);return{data:{escapedOffsets:s,escaped:d6(s)}}}default:return{}}}}};async function VP(e,t){let{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=Pn(r),a=Fi(r),l=On(r)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=Ur(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(p=a==="end"?m*-1:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}var g6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:i,placement:s,middlewareData:a}=t,l=await VP(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},v6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:g=>{let{x:v,y:C}=g;return{x:v,y:C}}},...l}=Ur(e,t),c={x:r,y:n},u=await Hi(t,l),d=On(Pn(o)),f=bu(d),p=c[f],m=c[d];if(i){let g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",C=p+u[g],x=p-u[v];p=wu(C,p,x)}if(s){let g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",C=m+u[g],x=m-u[v];m=wu(C,m,x)}let h=a.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[f]:i,[d]:s}}}}}},C6=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=Ur(e,t),u={x:r,y:n},d=On(o),f=bu(d),p=u[f],m=u[d],h=Ur(a,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let x=f==="y"?"height":"width",w=i.reference[f]-i.floating[x]+g.mainAxis,y=i.reference[f]+i.reference[x]-g.mainAxis;p<w?p=w:p>y&&(p=y)}if(c){var v,C;let x=f==="y"?"width":"height",w=["top","left"].includes(Pn(o)),y=i.reference[d]-i.floating[x]+(w&&((v=s.offset)==null?void 0:v[d])||0)+(w?0:g.crossAxis),b=i.reference[d]+i.reference[x]+(w?0:((C=s.offset)==null?void 0:C[d])||0)-(w?g.crossAxis:0);m<y?m=y:m>b&&(m=b)}return{[f]:p,[d]:m}}}},x6=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Ur(e,t),u=await Hi(t,c),d=Pn(o),f=Fi(o),p=On(o)==="y",{width:m,height:h}=i.floating,g,v;d==="top"||d==="bottom"?(g=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");let C=h-u.top-u.bottom,x=m-u.left-u.right,w=jr(h-u[g],C),y=jr(m-u[v],x),b=!t.middlewareData.shift,R=w,L=y;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(R=C),b&&!f){let S=ut(u.left,0),A=ut(u.right,0),k=ut(u.top,0),I=ut(u.bottom,0);p?L=m-2*(S!==0||A!==0?S+A:ut(u.left,u.right)):R=h-2*(k!==0||I!==0?k+I:ut(u.top,u.bottom))}await l({...t,availableWidth:L,availableHeight:R});let E=await s.getDimensions(a.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function y6(e){let t=Tr(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=Zr(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=Ni(r)!==i||Ni(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function rf(e){return kt(e)?e:e.contextElement}function Ks(e){let t=rf(e);if(!Zr(t))return pn(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=y6(t),s=(i?Ni(r.width):r.width)/n,a=(i?Ni(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}var HP=pn(0);function S6(e){let t=er(e);return!Zl()||!t.visualViewport?HP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function $P(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==er(e)?!1:t}function $i(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),i=rf(e),s=pn(1);t&&(n?kt(n)&&(s=Ks(n)):s=Ks(e));let a=$P(i,r,n)?S6(i):pn(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){let f=er(i),p=n&&kt(n)?er(n):n,m=f,h=Cu(m);for(;h&&n&&p!==m;){let g=Ks(h),v=h.getBoundingClientRect(),C=Tr(h),x=v.left+(h.clientLeft+parseFloat(C.paddingLeft))*g.x,w=v.top+(h.clientTop+parseFloat(C.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=x,c+=w,m=er(h),h=Cu(m)}}return Vi({width:u,height:d,x:l,y:c})}function nf(e,t){let r=jl(e).scrollLeft;return t?t.left+r:$i(fn(e)).left+r}function R6(e,t,r){r===void 0&&(r=!1);let n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-(r?0:nf(e,n)),i=n.top+t.scrollTop;return{x:o,y:i}}function _P(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i=o==="fixed",s=fn(n),a=t?zl(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},c=pn(1),u=pn(0),d=Zr(n);if((d||!d&&!i)&&((Bo(n)!=="body"||Ws(s))&&(l=jl(n)),Zr(n))){let p=$i(n);c=Ks(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}let f=s&&!d&&!i?R6(s,l,!0):pn(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function BP(e){return Array.from(e.getClientRects())}function zP(e){let t=fn(e),r=jl(e),n=e.ownerDocument.body,o=ut(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=ut(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-r.scrollLeft+nf(e),a=-r.scrollTop;return Tr(n).direction==="rtl"&&(s+=ut(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}function ZP(e,t){let r=er(e),n=fn(e),o=r.visualViewport,i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;let c=Zl();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function jP(e,t){let r=$i(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Zr(e)?Ks(e):pn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=n*i.y;return{width:s,height:a,x:l,y:c}}function w6(e,t,r){let n;if(t==="viewport")n=ZP(e,r);else if(t==="document")n=zP(fn(e));else if(kt(t))n=jP(t,r);else{let o=S6(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vi(n)}function L6(e,t){let r=In(e);return r===t||!kt(r)||zo(r)?!1:Tr(r).position==="fixed"||L6(r,t)}function UP(e,t){let r=t.get(e);if(r)return r;let n=io(e,[],!1).filter(a=>kt(a)&&Bo(a)!=="body"),o=null,i=Tr(e).position==="fixed",s=i?In(e):e;for(;kt(s)&&!zo(s);){let a=Tr(s),l=vu(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Ws(s)&&!l&&L6(e,s))?n=n.filter(u=>u!==s):o=a,s=In(s)}return t.set(e,n),n}function GP(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,s=[...r==="clippingAncestors"?zl(t)?[]:UP(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((c,u)=>{let d=w6(t,u,o);return c.top=ut(d.top,c.top),c.right=jr(d.right,c.right),c.bottom=jr(d.bottom,c.bottom),c.left=ut(d.left,c.left),c},w6(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function WP(e){let{width:t,height:r}=y6(e);return{width:t,height:r}}function qP(e,t,r){let n=Zr(t),o=fn(t),i=r==="fixed",s=$i(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=pn(0);function c(){l.x=nf(o)}if(n||!n&&!i)if((Bo(t)!=="body"||Ws(o))&&(a=jl(t)),n){let p=$i(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();i&&!n&&o&&c();let u=o&&!n&&!i?R6(o,a):pn(0),d=s.left+a.scrollLeft-l.x-u.x,f=s.top+a.scrollTop-l.y-u.y;return{x:d,y:f,width:s.width,height:s.height}}function tf(e){return Tr(e).position==="static"}function b6(e,t){if(!Zr(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return fn(e)===r&&(r=r.ownerDocument.body),r}function M6(e,t){let r=er(e);if(zl(e))return r;if(!Zr(e)){let o=In(e);for(;o&&!zo(o);){if(kt(o)&&!tf(o))return o;o=In(o)}return r}let n=b6(e,t);for(;n&&t6(n)&&tf(n);)n=b6(n,t);return n&&zo(n)&&tf(n)&&!vu(n)?r:n||r6(e)||r}var KP=async function(e){let t=this.getOffsetParent||M6,r=this.getDimensions,n=await r(e.floating);return{reference:qP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function YP(e){return Tr(e).direction==="rtl"}var of={convertOffsetParentRelativeRectToViewportRelativeRect:_P,getDocumentElement:fn,getClippingRect:GP,getOffsetParent:M6,getElementRects:KP,getClientRects:BP,getDimensions:WP,getScale:Ks,isElement:kt,isRTL:YP};function E6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function XP(e,t){let r=null,n,o=fn(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;let m=qs(d),h=qs(o.clientWidth-(u+f)),g=qs(o.clientHeight-(d+p)),v=qs(u),x={rootMargin:-m+"px "+-h+"px "+-g+"px "+-v+"px",threshold:ut(0,jr(1,l))||1},w=!0;function y(b){let R=b[0].intersectionRatio;if(R!==l){if(!w)return s();R?s(!1,R):n=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!E6(c,e.getBoundingClientRect())&&s(),w=!1}try{r=new IntersectionObserver(y,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(y,x)}r.observe(e)}return s(!0),i}function Ys(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=rf(e),u=o||i?[...c?io(c):[],...io(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),i&&v.addEventListener("resize",r)});let d=c&&a?XP(c,r):null,f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[C]=v;C&&C.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let m,h=l?$i(e):null;l&&g();function g(){let v=$i(e);h&&!E6(h,v)&&r(),h=v,m=requestAnimationFrame(g)}return r(),()=>{var v;u.forEach(C=>{o&&C.removeEventListener("scroll",r),i&&C.removeEventListener("resize",r)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var Xs=Hi,T6=g6;var k6=v6,A6=m6,I6=x6,P6=h6,sf=p6;var O6=C6,Ru=(e,t,r)=>{let n=new Map,o={platform:of,...r},i={...o.platform,_c:n};return f6(e,t,{...o,platform:i})};import*as st from"react";import{useLayoutEffect as QP,useEffect as JP}from"react";import*as N6 from"react-dom";var Lu=typeof document<"u"?QP:JP;function Mu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Mu(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Mu(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function F6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function D6(e,t){let r=F6(e);return Math.round(t*r)/r}function af(e){let t=st.useRef(e);return Lu(()=>{t.current=e}),t}function Eu(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=st.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=st.useState(n);Mu(f,n)||p(n);let[m,h]=st.useState(null),[g,v]=st.useState(null),C=st.useCallback(P=>{P!==b.current&&(b.current=P,h(P))},[]),x=st.useCallback(P=>{P!==R.current&&(R.current=P,v(P))},[]),w=i||m,y=s||g,b=st.useRef(null),R=st.useRef(null),L=st.useRef(u),E=l!=null,S=af(l),A=af(o),k=af(c),I=st.useCallback(()=>{if(!b.current||!R.current)return;let P={placement:t,strategy:r,middleware:f};A.current&&(P.platform=A.current),Ru(b.current,R.current,P).then(O=>{let M={...O,isPositioned:k.current!==!1};N.current&&!Mu(L.current,M)&&(L.current=M,N6.flushSync(()=>{d(M)}))})},[f,t,r,A,k]);Lu(()=>{c===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);let N=st.useRef(!1);Lu(()=>(N.current=!0,()=>{N.current=!1}),[]),Lu(()=>{if(w&&(b.current=w),y&&(R.current=y),w&&y){if(S.current)return S.current(w,y,I);I()}},[w,y,I,S,E]);let D=st.useMemo(()=>({reference:b,floating:R,setReference:C,setFloating:x}),[C,x]),F=st.useMemo(()=>({reference:w,floating:y}),[w,y]),H=st.useMemo(()=>{let P={position:r,left:0,top:0};if(!F.floating)return P;let O=D6(F.floating,u.x),M=D6(F.floating,u.y);return a?{...P,transform:"translate("+O+"px, "+M+"px)",...F6(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:M}},[r,a,F.floating,u.x,u.y]);return st.useMemo(()=>({...u,update:I,refs:D,elements:F,floatingStyles:H}),[u,I,D,F,H])}var eO=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?sf({element:n.current,padding:o}).fn(r):{}:n?sf({element:n,padding:o}).fn(r):{}}}},_i=(e,t)=>({...T6(e),options:[e,t]}),Gl=(e,t)=>({...k6(e),options:[e,t]}),lf=(e,t)=>({...O6(e),options:[e,t]}),Wl=(e,t)=>({...A6(e),options:[e,t]}),ql=(e,t)=>({...I6(e),options:[e,t]});var cf=(e,t)=>({...P6(e),options:[e,t]});var uf=(e,t)=>({...eO(e),options:[e,t]});var z6={...oe},nO=z6.useInsertionEffect,oO=nO||(e=>e());function Z6(e){let t=oe.useRef(()=>{});return oO(()=>{t.current=e}),oe.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}var iO="ArrowUp",sO="ArrowDown",aO="ArrowLeft",lO="ArrowRight";var ff=typeof document<"u"?tO:rO;var cO=[aO,lO],uO=[iO,sO],hie=[...cO,...uO];var V6=!1,dO=0,H6=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+dO++;function fO(){let[e,t]=oe.useState(()=>V6?H6():void 0);return ff(()=>{e==null&&t(H6())},[]),oe.useEffect(()=>{V6=!0},[]),e}var pO=z6.useId,mO=pO||fO;function hO(){let e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}var gO=oe.createContext(null),vO=oe.createContext(null),CO=()=>{var e;return((e=oe.useContext(gO))==null?void 0:e.id)||null},xO=()=>oe.useContext(vO);var wO="data-floating-ui-focusable";function bO(e){let{open:t=!1,onOpenChange:r,elements:n}=e,o=mO(),i=oe.useRef({}),[s]=oe.useState(()=>hO()),a=CO()!=null,[l,c]=oe.useState(n.reference),u=Z6((p,m,h)=>{i.current.openEvent=p?m:void 0,s.emit("openchange",{open:p,event:m,reason:h,nested:a}),r?.(p,m,h)}),d=oe.useMemo(()=>({setPositionReference:c}),[]),f=oe.useMemo(()=>({reference:l||n.reference||null,floating:n.floating||null,domReference:n.reference}),[l,n.reference,n.floating]);return oe.useMemo(()=>({dataRef:i,open:t,onOpenChange:u,elements:f,events:s,floatingId:o,refs:d}),[t,u,f,s,o,d])}function j6(e){e===void 0&&(e={});let{nodeId:t}=e,r=bO({...e,elements:{reference:null,floating:null,...e.elements}}),n=e.rootContext||r,o=n.elements,[i,s]=oe.useState(null),[a,l]=oe.useState(null),u=o?.domReference||i,d=oe.useRef(null),f=xO();ff(()=>{u&&(d.current=u)},[u]);let p=Eu({...e,elements:{...o,...a&&{reference:a}}}),m=oe.useCallback(x=>{let w=kt(x)?{getBoundingClientRect:()=>x.getBoundingClientRect(),contextElement:x}:x;l(w),p.refs.setReference(w)},[p.refs]),h=oe.useCallback(x=>{(kt(x)||x===null)&&(d.current=x,s(x)),(kt(p.refs.reference.current)||p.refs.reference.current===null||x!==null&&!kt(x))&&p.refs.setReference(x)},[p.refs]),g=oe.useMemo(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:d}),[p.refs,h,m]),v=oe.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),C=oe.useMemo(()=>({...p,...n,refs:g,elements:v,nodeId:t}),[p,g,v,t,n]);return ff(()=>{n.dataRef.current.floatingContext=C;let x=f?.nodesRef.current.find(w=>w.id===t);x&&(x.context=C)}),oe.useMemo(()=>({...p,context:C,refs:g,elements:v}),[p,g,v,C])}var $6="active",_6="selected";function df(e,t,r){let n=new Map,o=r==="item",i=e;if(o&&e){let{[$6]:s,[_6]:a,...l}=e;i=l}return{...r==="floating"&&{tabIndex:-1,[wO]:""},...i,...t.map(s=>{let a=s?s[r]:null;return typeof a=="function"?e?a(e):null:a}).concat(e).reduce((s,a)=>(a&&Object.entries(a).forEach(l=>{let[c,u]=l;if(!(o&&[$6,_6].includes(c)))if(c.indexOf("on")===0){if(n.has(c)||n.set(c,[]),typeof u=="function"){var d;(d=n.get(c))==null||d.push(u),s[c]=function(){for(var f,p=arguments.length,m=new Array(p),h=0;h<p;h++)m[h]=arguments[h];return(f=n.get(c))==null?void 0:f.map(g=>g(...m)).find(g=>g!==void 0)}}}else s[c]=u}),s),{})}}function U6(e){e===void 0&&(e=[]);let t=e.map(a=>a?.reference),r=e.map(a=>a?.floating),n=e.map(a=>a?.item),o=oe.useCallback(a=>df(a,e,"reference"),t),i=oe.useCallback(a=>df(a,e,"floating"),r),s=oe.useCallback(a=>df(a,e,"item"),n);return oe.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}function B6(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}var G6=e=>({name:"inner",options:e,async fn(t){let{listRef:r,overflowRef:n,onFallbackChange:o,offset:i=0,index:s=0,minItemsVisible:a=4,referenceOverflowThreshold:l=0,scrollRef:c,...u}=Ur(e,t),{rects:d,elements:{floating:f}}=t,p=r.current[s],m=c?.current||f,h=f.clientTop||m.clientTop,g=f.clientTop!==0,v=m.clientTop!==0,C=f===m;if(!p)return{};let x={...t,...await _i(-p.offsetTop-f.clientTop-d.reference.height/2-p.offsetHeight/2-i).fn(t)},w=await Xs(B6(x,m.scrollHeight+h+f.clientTop),u),y=await Xs(x,{...u,elementContext:"reference"}),b=ut(0,w.top),R=x.y+b,S=(m.scrollHeight>m.clientHeight?A=>A:Ni)(ut(0,m.scrollHeight+(g&&C||v?h*2:0)-b-ut(0,w.bottom)));if(m.style.maxHeight=S+"px",m.scrollTop=b,o){let A=m.offsetHeight<p.offsetHeight*jr(a,r.current.length)-1||y.top>=-l||y.bottom>=-l;Kl.flushSync(()=>o(A))}return n&&(n.current=await Xs(B6({...x,y:R},m.offsetHeight+h+f.clientTop),u)),{y:R}}});function W6(e,t){let{open:r,elements:n}=e,{enabled:o=!0,overflowRef:i,scrollRef:s,onChange:a}=t,l=Z6(a),c=oe.useRef(!1),u=oe.useRef(null),d=oe.useRef(null);oe.useEffect(()=>{if(!o)return;function p(h){if(h.ctrlKey||!m||i.current==null)return;let g=h.deltaY,v=i.current.top>=-.5,C=i.current.bottom>=-.5,x=m.scrollHeight-m.clientHeight,w=g<0?-1:1,y=g<0?"max":"min";m.scrollHeight<=m.clientHeight||(!v&&g>0||!C&&g<0?(h.preventDefault(),Kl.flushSync(()=>{l(b=>b+Math[y](g,x*w))})):/firefox/i.test(o6())&&(m.scrollTop+=g))}let m=s?.current||n.floating;if(r&&m)return m.addEventListener("wheel",p),requestAnimationFrame(()=>{u.current=m.scrollTop,i.current!=null&&(d.current={...i.current})}),()=>{u.current=null,d.current=null,m.removeEventListener("wheel",p)}},[o,r,n.floating,i,s,l]);let f=oe.useMemo(()=>({onKeyDown(){c.current=!0},onWheel(){c.current=!1},onPointerMove(){c.current=!1},onScroll(){let p=s?.current||n.floating;if(!(!i.current||!p||!c.current)){if(u.current!==null){let m=p.scrollTop-u.current;(i.current.bottom<-.5&&m<-1||i.current.top<-.5&&m>1)&&Kl.flushSync(()=>l(h=>h+m))}requestAnimationFrame(()=>{u.current=p.scrollTop})}}}),[n.floating,l,i,s]);return oe.useMemo(()=>o?{floating:f}:{},[o,f])}import*as mf from"react";import{createContext as Y6,useCallback as yO,useContext as Yl,useMemo as Xl,useRef as SO,useState as Tu}from"react";var Qs=Y6({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});Qs.displayName="FloatingContext";var hf=Y6(null);hf.displayName="PlacementContext";function X6(e){return Xl(()=>e?typeof e=="string"?{to:e}:e:null,[e])}function Q6(){return Yl(Qs).setReference}function J6(){return Yl(Qs).getReferenceProps}function eh(){let{getFloatingProps:e,slot:t}=Yl(Qs);return yO((...r)=>Object.assign({},e(...r),{"data-anchor":t.anchor}),[e,t])}function th(e=null){e===!1&&(e=null),typeof e=="string"&&(e={to:e});let t=Yl(hf),r=Xl(()=>e,[JSON.stringify(e,typeof HTMLElement<"u"?(o,i)=>i instanceof HTMLElement?i.outerHTML:i:void 0)]);ge(()=>{t?.(r??null)},[t,r]);let n=Yl(Qs);return Xl(()=>[n.setFloating,e?n.styles:{}],[n.setFloating,e,n.styles])}var q6=4;function rh({children:e,enabled:t=!0}){let[r,n]=Tu(null),[o,i]=Tu(0),s=SO(null),[a,l]=Tu(null);RO(a);let c=t&&r!==null&&a!==null,{to:u="bottom",gap:d=0,offset:f=0,padding:p=0,inner:m}=LO(r,a),[h,g="center"]=u.split(" ");ge(()=>{c&&i(0)},[c]);let{refs:v,floatingStyles:C,context:x}=j6({open:c,placement:h==="selection"?g==="center"?"bottom":`bottom-${g}`:g==="center"?`${h}`:`${h}-${g}`,strategy:"absolute",transform:!1,middleware:[_i({mainAxis:h==="selection"?0:d,crossAxis:f}),Gl({padding:p}),h!=="selection"&&Wl({padding:p}),h==="selection"&&m?G6({...m,padding:p,overflowRef:s,offset:o,minItemsVisible:q6,referenceOverflowThreshold:p,onFallbackChange(A){var k,I;if(!A)return;let N=x.elements.floating;if(!N)return;let D=parseFloat(getComputedStyle(N).scrollPaddingBottom)||0,F=Math.min(q6,N.childElementCount),H=0,P=0;for(let O of(I=(k=x.elements.floating)==null?void 0:k.childNodes)!=null?I:[])if(O instanceof HTMLElement){let M=O.offsetTop,Z=M+O.clientHeight+D,J=N.scrollTop,T=J+N.clientHeight;if(M>=J&&Z<=T)F--;else{P=Math.max(0,Math.min(Z,T)-Math.max(M,J)),H=O.clientHeight;break}}F>=1&&i(O=>{let M=H*F-P+D;return O>=M?O:M})}}):null,ql({padding:p,apply({availableWidth:A,availableHeight:k,elements:I}){Object.assign(I.floating.style,{overflow:"auto",maxWidth:`${A}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${k}px)`})}})].filter(Boolean),whileElementsMounted:Ys}),[w=h,y=g]=x.placement.split("-");h==="selection"&&(w="selection");let b=Xl(()=>({anchor:[w,y].filter(Boolean).join(" ")}),[w,y]),R=W6(x,{overflowRef:s,onChange:i}),{getReferenceProps:L,getFloatingProps:E}=U6([R]),S=Ee(A=>{l(A),v.setFloating(A)});return mf.createElement(hf.Provider,{value:n},mf.createElement(Qs.Provider,{value:{setFloating:S,setReference:v.setReference,styles:C,getReferenceProps:L,getFloatingProps:E,slot:b}},e))}function RO(e){ge(()=>{if(!e)return;let t=new MutationObserver(()=>{let r=e.style.maxHeight;parseFloat(r)!==parseInt(r)&&(e.style.maxHeight=`${Math.ceil(parseFloat(r))}px`)});return t.observe(e,{attributes:!0,attributeFilter:["style"]}),()=>{t.disconnect()}},[e])}function LO(e,t){var r,n,o;let i=pf((r=e?.gap)!=null?r:"var(--anchor-gap, 0)",t),s=pf((n=e?.offset)!=null?n:"var(--anchor-offset, 0)",t),a=pf((o=e?.padding)!=null?o:"var(--anchor-padding, 0)",t);return{...e,gap:i,offset:s,padding:a}}function pf(e,t,r=void 0){let n=Ho(),o=Ee((l,c)=>{if(l==null)return[r,null];if(typeof l=="number")return[l,null];if(typeof l=="string"){if(!c)return[r,null];let u=K6(l,c);return[u,d=>{let f=nh(l);{let p=f.map(m=>window.getComputedStyle(c).getPropertyValue(m));n.requestAnimationFrame(function m(){n.nextFrame(m);let h=!1;for(let[v,C]of f.entries()){let x=window.getComputedStyle(c).getPropertyValue(C);if(p[v]!==x){p[v]=x,h=!0;break}}if(!h)return;let g=K6(l,c);u!==g&&(d(g),u=g)})}return n.dispose}]}return[r,null]}),i=Xl(()=>o(e,t)[0],[e,t]),[s=i,a]=Tu();return ge(()=>{let[l,c]=o(e,t);if(a(l),!!c)return c(a)},[e,t]),s}function nh(e){let t=/var\((.*)\)/.exec(e);if(t){let r=t[1].indexOf(",");if(r===-1)return[t[1]];let n=t[1].slice(0,r).trim(),o=t[1].slice(r+1).trim();return o?[n,...nh(o)]:[n]}return[]}function K6(e,t){let r=document.createElement("div");t.appendChild(r),r.style.setProperty("margin-top","0px","important"),r.style.setProperty("margin-top",e,"important");let n=parseFloat(window.getComputedStyle(r).marginTop)||0;return t.removeChild(r),n}import MO,{createContext as EO,useContext as TO}from"react";var gf=EO(null);gf.displayName="OpenClosedContext";var Js=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Js||{});function oh(){return TO(gf)}function ih({value:e,children:t}){return MO.createElement(gf.Provider,{value:e},t)}function kO(e){throw new Error("Unexpected object: "+e)}var At=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(At||{});function ku(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),o=n??-1;switch(e.focus){case 0:{for(let i=0;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 1:{o===-1&&(o=r.length);for(let i=o-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 2:{for(let i=o+1;i<r.length;++i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 3:{for(let i=r.length-1;i>=0;--i)if(!t.resolveDisabled(r[i],i,r))return i;return n}case 4:{for(let i=0;i<r.length;++i)if(t.resolveId(r[i],i,r)===e.id)return i;return n}case 5:return null;default:kO(e)}}import uh,{Fragment as dh,createContext as fh,useContext as ph,useEffect as ch,useMemo as Vie,useRef as FO,useState as mh}from"react";import{createPortal as VO}from"react-dom";import{useEffect as AO,useRef as IO}from"react";function sh(e){let t=Ee(e),r=IO(!1);AO(()=>(r.current=!1,()=>{r.current=!0,su(()=>{r.current&&t()})}),[t])}import*as Bi from"react";function PO(){let e=typeof document>"u";return"useSyncExternalStore"in Bi?(t=>t.useSyncExternalStore)(Bi)(()=>()=>{},()=>!1,()=>!e):!1}function ah(){let e=PO(),[t,r]=Bi.useState(un.isHandoffComplete);return t&&un.isHandoffComplete===!1&&r(!1),Bi.useEffect(()=>{t!==!0&&r(!0)},[t]),Bi.useEffect(()=>un.handoff(),[]),e?!1:t}import Die,{createContext as OO,useContext as DO}from"react";var NO=OO(!1);function lh(){return DO(NO)}function HO(e){let t=lh(),r=ph(gh),n=_l(e),[o,i]=mh(()=>{var s;if(!t&&r!==null)return(s=r.current)!=null?s:null;if(un.isServer)return null;let a=n?.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let l=n.createElement("div");return l.setAttribute("id","headlessui-portal-root"),n.body.appendChild(l)});return ch(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),ch(()=>{t||r!==null&&i(r.current)},[r,i,t]),o}var hh=dh,$O=Zt(function(e,t){let r=e,n=FO(null),o=Er(b8(u=>{n.current=u}),t),i=_l(n),s=HO(n),[a]=mh(()=>{var u;return un.isServer?null:(u=i?.createElement("div"))!=null?u:null}),l=ph(ZO),c=ah();return ge(()=>{!s||!a||s.contains(a)||(a.setAttribute("data-headlessui-portal",""),s.appendChild(a))},[s,a]),ge(()=>{if(a&&l)return l.register(a)},[l,a]),sh(()=>{var u;!s||!a||(a instanceof Node&&s.contains(a)&&s.removeChild(a),s.childNodes.length<=0&&((u=s.parentElement)==null||u.removeChild(s)))}),c?!s||!a?null:VO(zt({ourProps:{ref:o},theirProps:r,slot:{},defaultTag:hh,name:"Portal"}),a):null});function _O(e,t){let r=Er(t),{enabled:n=!0,...o}=e;return n?uh.createElement($O,{...o,ref:r}):zt({ourProps:{ref:r},theirProps:o,slot:{},defaultTag:hh,name:"Portal"})}var BO=dh,gh=fh(null);function zO(e,t){let{target:r,...n}=e,o={ref:Er(t)};return uh.createElement(gh.Provider,{value:r},zt({ourProps:o,theirProps:n,defaultTag:BO,name:"Popover.Group"}))}var ZO=fh(null);var jO=Zt(_O),UO=Zt(zO),vh=Object.assign(jO,{Group:UO});import{useRef as GO}from"react";function Ch(e,t){let r=GO({left:0,top:0});if(ge(()=>{let o=t.current;if(!o)return;let i=o.getBoundingClientRect();i&&(r.current=i)},[e]),t.current==null||!e||t.current===document.activeElement)return!1;let n=t.current.getBoundingClientRect();return n.top!==r.current.top||n.left!==r.current.left}import{useRef as yh}from"react";var xh=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function wh(e){var t,r;let n=(t=e.innerText)!=null?t:"",o=e.cloneNode(!0);if(!(o instanceof HTMLElement))return n;let i=!1;for(let a of o.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))a.remove(),i=!0;let s=i?(r=o.innerText)!=null?r:"":n;return xh.test(s)&&(s=s.replace(xh,"")),s}function bh(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(o=>{let i=document.getElementById(o);if(i){let s=i.getAttribute("aria-label");return typeof s=="string"?s.trim():wh(i).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return wh(e).trim()}function Sh(e){let t=yh(""),r=yh("");return Ee(()=>{let n=e.current;if(!n)return"";let o=n.innerText;if(t.current===o)return r.current;let i=bh(n).trim().toLowerCase();return t.current=o,r.current=i,i})}import zi,{Fragment as Mh,createContext as WO,createRef as Rh,useContext as qO,useEffect as KO,useMemo as Au,useReducer as YO,useRef as Lh}from"react";import{flushSync as Ql}from"react-dom";var XO=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(XO||{}),QO=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(QO||{}),JO=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(JO||{});function vf(e,t=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=Q9(t(e.items.slice()),i=>i.dataRef.current.domRef.current),o=r?n.indexOf(r):null;return o===-1&&(o=null),{items:n,activeItemIndex:o}}var eD={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var r,n,o,i,s;if(e.menuState===1)return e;let a={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===At.Nothing)return{...a,activeItemIndex:null};if(t.focus===At.Specific)return{...a,activeItemIndex:e.items.findIndex(u=>u.id===t.id)};if(t.focus===At.Previous){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,f=ku(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(f!==null){let p=e.items[f].dataRef.current.domRef;if(((n=d.current)==null?void 0:n.previousElementSibling)===p.current||((o=p.current)==null?void 0:o.previousElementSibling)===null)return{...a,activeItemIndex:f}}}}else if(t.focus===At.Next){let u=e.activeItemIndex;if(u!==null){let d=e.items[u].dataRef.current.domRef,f=ku(t,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled});if(f!==null){let p=e.items[f].dataRef.current.domRef;if(((i=d.current)==null?void 0:i.nextElementSibling)===p.current||((s=p.current)==null?void 0:s.nextElementSibling)===null)return{...a,activeItemIndex:f}}}}let l=vf(e),c=ku(t,{resolveItems:()=>l.items,resolveActiveIndex:()=>l.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});return{...a,...l,activeItemIndex:c}},3:(e,t)=>{let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find(s=>{var a;return((a=s.dataRef.current.textValue)==null?void 0:a.startsWith(n))&&!s.dataRef.current.disabled}),i=o?e.items.indexOf(o):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:i,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let r=vf(e,n=>[...n,{id:t.id,dataRef:t.dataRef}]);return{...e,...r}},6:(e,t)=>{let r=vf(e,n=>{let o=n.findIndex(i=>i.id===t.id);return o!==-1&&n.splice(o,1),n});return{...e,...r,activationTrigger:1}}},Cf=WO(null);Cf.displayName="MenuContext";function Iu(e){let t=qO(Cf);if(t===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Iu),r}return t}function tD(e,t){return $o(t.type,eD,e,t)}var rD=Mh;function nD(e,t){let{__demoMode:r=!1,...n}=e,o=YO(tD,{__demoMode:r,menuState:r?0:1,buttonRef:Rh(),itemsRef:Rh(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:s,buttonRef:a},l]=o,c=Er(t);F8(i===0,[a,s],(p,m)=>{var h;l({type:1}),$l(m,Hl.Loose)||(p.preventDefault(),(h=a.current)==null||h.focus())});let u=Ee(()=>{l({type:1})}),d=Au(()=>({open:i===0,close:u}),[i,u]),f={ref:c};return zi.createElement(rh,null,zi.createElement(Cf.Provider,{value:o},zi.createElement(ih,{value:$o(i,{0:Js.Open,1:Js.Closed})},zt({ourProps:f,theirProps:n,slot:d,defaultTag:rD,name:"Menu"}))))}var oD="button";function iD(e,t){var r;let n=oo(),{id:o=`headlessui-menu-button-${n}`,disabled:i=!1,autoFocus:s=!1,...a}=e,[l,c]=Iu("Menu.Button"),u=J6(),d=Er(l.buttonRef,t,Q6()),f=Ee(R=>{switch(R.key){case xt.Space:case xt.Enter:case xt.ArrowDown:R.preventDefault(),R.stopPropagation(),Ql(()=>c({type:0})),c({type:2,focus:At.First});break;case xt.ArrowUp:R.preventDefault(),R.stopPropagation(),Ql(()=>c({type:0})),c({type:2,focus:At.Last});break}}),p=Ee(R=>{switch(R.key){case xt.Space:R.preventDefault();break}}),m=Ee(R=>{var L;if(x8(R.currentTarget))return R.preventDefault();i||(l.menuState===0?(Ql(()=>c({type:1})),(L=l.buttonRef.current)==null||L.focus({preventScroll:!0})):(R.preventDefault(),c({type:0})))}),{isFocusVisible:h,focusProps:g}=H9({autoFocus:s}),{isHovered:v,hoverProps:C}=V9({isDisabled:i}),{pressed:x,pressProps:w}=g8({disabled:i}),y=Au(()=>({open:l.menuState===0,active:x||l.menuState===0,disabled:i,hover:v,focus:h,autofocus:s}),[l,v,h,x,i,s]),b=j9(u(),{ref:d,id:o,type:H8(e,l.buttonRef),"aria-haspopup":"menu","aria-controls":(r=l.itemsRef.current)==null?void 0:r.id,"aria-expanded":l.menuState===0,disabled:i||void 0,autoFocus:s,onKeyDown:f,onKeyUp:p,onClick:m},g,C,w);return zt({ourProps:b,theirProps:a,slot:y,defaultTag:oD,name:"Menu.Button"})}var sD="div",aD=cu.RenderStrategy|cu.Static;function lD(e,t){var r,n;let o=oo(),{id:i=`headlessui-menu-items-${o}`,anchor:s,portal:a=!1,modal:l=!0,transition:c=!1,...u}=e,d=X6(s),[f,p]=Iu("Menu.Items"),[m,h]=th(d),g=eh(),v=Er(f.itemsRef,t,d?m:null),C=_l(f.itemsRef);d&&(a=!0);let x=oh(),[w,y]=Y8(c,f.itemsRef,x!==null?(x&Js.Open)===Js.Open:f.menuState===0);k8(w,f.buttonRef,()=>{p({type:1})});let b=f.__demoMode?!1:l&&f.menuState===0;Z8(b,C);let R=f.__demoMode?!1:l&&f.menuState===0;T8(R,{allowed:Ee(()=>[f.buttonRef.current,f.itemsRef.current])});let L=f.menuState!==0,E=Ch(L,f.buttonRef)?!1:w;KO(()=>{let D=f.itemsRef.current;D&&f.menuState===0&&D!==C?.activeElement&&D.focus({preventScroll:!0})},[f.menuState,f.itemsRef,C,f.itemsRef.current]),Q8(f.menuState===0,{container:f.itemsRef.current,accept(D){return D.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:D.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(D){D.setAttribute("role","none")}});let S=Ho(),A=Ee(D=>{var F,H,P;switch(S.dispose(),D.key){case xt.Space:if(f.searchQuery!=="")return D.preventDefault(),D.stopPropagation(),p({type:3,value:D.key});case xt.Enter:if(D.preventDefault(),D.stopPropagation(),p({type:1}),f.activeItemIndex!==null){let{dataRef:O}=f.items[f.activeItemIndex];(H=(F=O.current)==null?void 0:F.domRef.current)==null||H.click()}X9(f.buttonRef.current);break;case xt.ArrowDown:return D.preventDefault(),D.stopPropagation(),p({type:2,focus:At.Next});case xt.ArrowUp:return D.preventDefault(),D.stopPropagation(),p({type:2,focus:At.Previous});case xt.Home:case xt.PageUp:return D.preventDefault(),D.stopPropagation(),p({type:2,focus:At.First});case xt.End:case xt.PageDown:return D.preventDefault(),D.stopPropagation(),p({type:2,focus:At.Last});case xt.Escape:D.preventDefault(),D.stopPropagation(),Ql(()=>p({type:1})),(P=f.buttonRef.current)==null||P.focus({preventScroll:!0});break;case xt.Tab:D.preventDefault(),D.stopPropagation(),Ql(()=>p({type:1})),I8(f.buttonRef.current,D.shiftKey?hu.Previous:hu.Next);break;default:D.key.length===1&&(p({type:3,value:D.key}),S.setTimeout(()=>p({type:4}),350));break}}),k=Ee(D=>{switch(D.key){case xt.Space:D.preventDefault();break}}),I=Au(()=>({open:f.menuState===0}),[f.menuState]),N=j9(d?g():{},{"aria-activedescendant":f.activeItemIndex===null||(r=f.items[f.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=f.buttonRef.current)==null?void 0:n.id,id:i,onKeyDown:A,onKeyUp:k,role:"menu",tabIndex:f.menuState===0?0:void 0,ref:v,style:{...u.style,...h,"--button-width":L8(f.buttonRef,!0).width},...K8(y)});return zi.createElement(vh,{enabled:a?e.static||w:!1},zt({ourProps:N,theirProps:u,slot:I,defaultTag:sD,features:aD,visible:E,name:"Menu.Items"}))}var cD=Mh;function uD(e,t){let r=oo(),{id:n=`headlessui-menu-item-${r}`,disabled:o=!1,...i}=e,[s,a]=Iu("Menu.Item"),l=s.activeItemIndex!==null?s.items[s.activeItemIndex].id===n:!1,c=Lh(null),u=Er(t,c);ge(()=>{if(!s.__demoMode&&s.menuState===0&&l&&s.activationTrigger!==0)return Ct().requestAnimationFrame(()=>{var E,S;(S=(E=c.current)==null?void 0:E.scrollIntoView)==null||S.call(E,{block:"nearest"})})},[s.__demoMode,c,l,s.menuState,s.activationTrigger,s.activeItemIndex]);let d=Sh(c),f=Lh({disabled:o,domRef:c,get textValue(){return d()}});ge(()=>{f.current.disabled=o},[f,o]),ge(()=>(a({type:5,id:n,dataRef:f}),()=>a({type:6,id:n})),[f,n]);let p=Ee(()=>{a({type:1})}),m=Ee(E=>{if(o)return E.preventDefault();a({type:1}),X9(s.buttonRef.current)}),h=Ee(()=>{if(o)return a({type:2,focus:At.Nothing});a({type:2,focus:At.Specific,id:n})}),g=U8(),v=Ee(E=>{g.update(E),!o&&(l||a({type:2,focus:At.Specific,id:n,trigger:0}))}),C=Ee(E=>{g.wasMoved(E)&&(o||l||a({type:2,focus:At.Specific,id:n,trigger:0}))}),x=Ee(E=>{g.wasMoved(E)&&(o||l&&a({type:2,focus:At.Nothing}))}),[w,y]=q9(),[b,R]=S8(),L=Au(()=>({active:l,focus:l,disabled:o,close:p}),[l,o,p]);return zi.createElement(y,null,zi.createElement(R,null,zt({ourProps:{id:n,ref:u,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-labelledby":w,"aria-describedby":b,disabled:void 0,onClick:m,onFocus:h,onPointerEnter:v,onMouseEnter:v,onPointerMove:C,onMouseMove:C,onPointerLeave:x,onMouseLeave:x},theirProps:i,slot:L,defaultTag:cD,name:"Menu.Item"})))}var dD="div";function fD(e,t){let[r,n]=q9();return zi.createElement(n,null,zt({ourProps:{ref:t,"aria-labelledby":r,role:"group"},theirProps:e,slot:{},defaultTag:dD,name:"Menu.Section"}))}var pD="header";function mD(e,t){let r=oo(),{id:n=`headlessui-menu-heading-${r}`,...o}=e,i=du();ge(()=>i.register(n),[n,i.register]);let s={id:n,ref:t,role:"presentation",...i.props};return zt({ourProps:s,theirProps:o,slot:{},defaultTag:pD,name:"Menu.Heading"})}var hD="div";function gD(e,t){return zt({ourProps:{ref:t,role:"separator"},theirProps:e,slot:{},defaultTag:hD,name:"Menu.Separator"})}var vD=Zt(nD),xf=Zt(iD),wf=Zt(lD),ea=Zt(uD),CD=Zt(fD),xD=Zt(mD),wD=Zt(gD),Eh=Object.assign(vD,{Button:xf,Items:wf,Item:ea,Section:CD,Heading:xD,Separator:wD});import{Fragment as bD,jsx as wt,jsxs as Zi}from"react/jsx-runtime";function kh(){let e=L4,t=Jt(),[r,n]=Jl(!1);bf(()=>{n(jm(t.showDevConsole))},[t.showDevConsole]);let o=Th(!1),[i,s]=Jl("unknown"),[a,l]=Jl(""),c=Th(null),[u,d]=Jl("full"),f=(p=!1)=>{s("checking"),Um(e,p).then(m=>{l(m.latest);let h=!1;(m.current===m.latest||/[a-zA-Z]/.test(m.current))&&(h=!0),h?s("latest"):m.severity!=="low"?s("outdated"):s("update-available")}).catch(m=>{console.error(m),s("unknown")})};return bf(()=>{o.current!==!0&&(o.current=!0,f())},[]),bf(()=>{let p=h=>{for(let g of h)g.target===c.current&&(g.contentRect.width<400?d("compact"):d("full"))},m=new ResizeObserver(p);return c.current&&(m.observe(c.current),c.current.getBoundingClientRect().width<400?d("compact"):d("full")),()=>{c.current&&m.unobserve(c.current)}},[c.current]),r?Zi("div",{ref:c,className:"copilotKitDevConsole "+(i==="update-available"?"copilotKitDevConsoleUpgrade":"")+(i==="outdated"?"copilotKitDevConsoleWarnOutdated":""),children:[wt("div",{className:"copilotKitDevConsoleLogo",children:wt("a",{href:"https://copilotkit.ai",target:"_blank",children:Qm})}),wt(yD,{showDevConsole:t.showDevConsole,versionStatus:i,currentVersion:e,latestVersion:a}),wt(SD,{setShowDevConsole:n,checkForUpdates:f,mode:u})]}):null}function yD({showDevConsole:e,versionStatus:t,currentVersion:r,latestVersion:n}){let[o,i]=Jl(""),s="",a="",l=r;t==="latest"?(s="latest",a=Xm):t==="checking"?(s="checking",a=Qc):t==="update-available"?(s="update available",a=Km,l=`${r} \u2192 ${n}`):t==="outdated"&&(s="outdated",a=qm,l=`${r} \u2192 ${n}`);let c="";e==="auto"?c="(localhost only)":e===!0&&(c="(always on)");let u=["npm install",`@copilotkit/react-core@${n}`,`@copilotkit/react-ui@${n}`,`@copilotkit/react-textarea@${n}`].join(" ");return Zi("div",{className:"copilotKitVersionInfo",children:[Zi("header",{children:["COPILOTKIT DEV CONSOLE",e==="auto"&&wt("aside",{children:c})]}),Zi("section",{children:["Version: ",s," (",l,") ",a]}),(t==="update-available"||t==="outdated")&&wt("footer",{children:wt("button",{onClick:()=>{navigator.clipboard.writeText(u.trim()).then(()=>{i("Command copied to clipboard!"),setTimeout(()=>i(""),1e3)})},children:o||u})})]})}function SD({setShowDevConsole:e,checkForUpdates:t,mode:r}){let n=Jt();return wt("div",{className:"bg-black fixed top-24 w-52 text-right",children:Zi(Eh,{children:[wt(xf,{className:`copilotKitDebugMenuButton ${r==="compact"?"compact":""}`,children:r=="compact"?"Debug":Zi(bD,{children:["Debug ",Ym]})}),Zi(wf,{transition:!0,anchor:"bottom end",className:"copilotKitDebugMenu",style:{zIndex:40},children:[wt(ea,{children:wt("button",{className:"copilotKitDebugMenuItem",onClick:()=>Gm(n),children:"Log Readables"})}),wt(ea,{children:wt("button",{className:"copilotKitDebugMenuItem",onClick:()=>Wm(n),children:"Log Actions"})}),wt(ea,{children:wt("button",{className:"copilotKitDebugMenuItem",onClick:()=>t(!0),children:"Check for Updates"})}),wt("hr",{}),wt(ea,{children:wt("button",{className:"copilotKitDebugMenuItem",onClick:()=>e(!1),children:"Hide Dev Console"})})]})]})})}import{useState as RD,useRef as LD,useEffect as Ah,forwardRef as MD,useImperativeHandle as ED}from"react";import{jsx as TD}from"react/jsx-runtime";var kD=MD(({maxRows:e=1,placeholder:t,value:r,onChange:n,onKeyDown:o,autoFocus:i},s)=>{let a=LD(null),[l,c]=RD(0);return ED(s,()=>a.current),Ah(()=>{(()=>{let d=a.current;if(d){d.style.height="auto";let f=d.scrollHeight;c(f*e),i&&d.focus()}})()},[e]),Ah(()=>{let u=a.current;u&&(u.style.height="auto",u.style.height=`${Math.min(u.scrollHeight,l)}px`)},[r,l]),TD("textarea",{ref:a,value:r,onChange:n,onKeyDown:o,placeholder:t,style:{overflow:"auto",resize:"none",maxHeight:`${l}px`},rows:1})}),Ih=kD;import{useEffect as Ph,useRef as Pu,useState as Oh}from"react";var AD=(e,t,r,n,o)=>Tn(void 0,null,function*(){(!e.current||!r.current)&&(e.current=yield navigator.mediaDevices.getUserMedia({audio:!0}),r.current=new window.AudioContext,yield r.current.resume()),t.current=new MediaRecorder(e.current),t.current.start(1e3),t.current.ondataavailable=i=>{n.push(i.data)},t.current.onstop=o}),Dh=e=>{e.current&&e.current.state!=="inactive"&&e.current.stop()},ID=(e,t)=>Tn(void 0,null,function*(){let r=new Blob(e,{type:"audio/mp4"}),n=new FormData;n.append("file",r,"recording.mp4");let o=yield fetch(t,{method:"POST",body:n});if(!o.ok)throw new Error(`Error: ${o.statusText}`);return(yield o.json()).text}),PD=(e,t,r)=>{let n=encodeURIComponent(e),o=`${t}?text=${n}`;fetch(o).then(i=>i.arrayBuffer()).then(i=>r.decodeAudioData(i)).then(i=>{let s=r.createBufferSource();s.buffer=i,s.connect(r.destination),s.start(0)}).catch(i=>{console.error("Error with decoding audio data",i)})},Nh=({sendFunction:e,inProgress:t})=>{let[r,n]=Oh("idle"),o=Pu(null),i=Pu(null),s=Pu(null),a=Pu([]),l=Jt(),[c,u]=Oh(null);return Ph(()=>(r==="recording"?AD(o,s,i,a.current,()=>{n("transcribing")}):(Dh(s),r==="transcribing"&&ID(a.current,l.copilotApiConfig.transcribeAudioUrl).then(d=>Tn(void 0,null,function*(){a.current=[],n("idle");let f=yield e(d);u(f.id)}))),()=>{Dh(s)}),[r]),Ph(()=>{if(t===!1&&c){let d=l.messages.findIndex(m=>m.id===c),p=l.messages.slice(d+1).filter(m=>m instanceof Te&&m.role==="assistant").map(m=>m.content).join(`
|
|
135
|
+
`);PD(p,l.copilotApiConfig.textToSpeechUrl,i.current),u(null)}},[c,t]),{pushToTalkState:r,setPushToTalkState:n}};import{useEffect as OD,useRef as DD,useState as ND}from"react";import{jsx as yf,jsxs as Fh}from"react/jsx-runtime";var Ou=({inProgress:e,onSend:t,isVisible:r=!1})=>{let n=Tt(),o=Jt(),i=o.copilotApiConfig.textToSpeechUrl!==void 0&&o.copilotApiConfig.transcribeAudioUrl!==void 0,s=DD(null),a=g=>{var v;g.target===g.currentTarget&&((v=s.current)==null||v.focus())},[l,c]=ND(""),u=()=>{var g;e||(t(l),c(""),(g=s.current)==null||g.focus())};OD(()=>{var g;r&&((g=s.current)==null||g.focus())},[r]);let{pushToTalkState:d,setPushToTalkState:f}=Nh({sendFunction:t,inProgress:e}),p=e||d==="transcribing"?n.icons.activityIcon:n.icons.sendIcon,m=i&&(d==="idle"||d==="recording")&&!e,h=e||l.length===0||d!=="idle";return Fh("div",{className:"copilotKitInput",onClick:a,children:[yf(Ih,{ref:s,placeholder:n.labels.placeholder,autoFocus:!0,maxRows:5,value:l,onChange:g=>c(g.target.value),onKeyDown:g=>{g.key==="Enter"&&!g.shiftKey&&(g.preventDefault(),u())}}),Fh("div",{className:"copilotKitInputControls",children:[m&&yf("button",{onClick:()=>f(d==="idle"?"recording":"transcribing"),className:d==="recording"?"copilotKitPushToTalkRecording":"",children:n.icons.pushToTalkIcon}),yf("button",{disabled:h,onClick:u,children:p})]})]})};import*as Vh from"react";function Hh({timeout:e=2e3}){let[t,r]=Vh.useState(!1);return{isCopied:t,copyToClipboard:o=>{var i;typeof window>"u"||!((i=navigator.clipboard)!=null&&i.writeText)||o&&navigator.clipboard.writeText(o).then(()=>{r(!0),setTimeout(()=>{r(!1)},e)})}}}import{memo as FD}from"react";import{Prism as VD}from"react-syntax-highlighter";import{jsx as ji,jsxs as e1}from"react/jsx-runtime";var HD={javascript:".js",python:".py",java:".java",c:".c",cpp:".cpp","c++":".cpp","c#":".cs",ruby:".rb",php:".php",swift:".swift","objective-c":".m",kotlin:".kt",typescript:".ts",go:".go",perl:".pl",rust:".rs",scala:".scala",haskell:".hs",lua:".lua",shell:".sh",sql:".sql",html:".html",css:".css"},$D=(e,t=!1)=>{let r="ABCDEFGHJKLMNPQRSTUVWXY3456789",n="";for(let o=0;o<e;o++)n+=r.charAt(Math.floor(Math.random()*r.length));return t?n.toLowerCase():n},Sf=FD(({language:e,value:t})=>{let{isCopied:r,copyToClipboard:n}=Hh({timeout:2e3});return e1("div",{className:"copilotKitCodeBlock",children:[e1("div",{className:"copilotKitCodeBlockToolbar",children:[ji("span",{className:"copilotKitCodeBlockToolbarLanguage",children:e}),e1("div",{className:"copilotKitCodeBlockToolbarButtons",children:[e1("button",{className:"copilotKitCodeBlockToolbarButton",onClick:()=>{if(typeof window>"u")return;let s=HD[e]||".file",a=`file-${$D(3,!0)}${s}`,l=window.prompt("Enter file name",a);if(!l)return;let c=new Blob([t],{type:"text/plain"}),u=URL.createObjectURL(c),d=document.createElement("a");d.download=l,d.href=u,d.style.display="none",document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(u)},children:[ji(Om,{}),ji("span",{className:"sr-only",children:"Download"})]}),e1("button",{className:"copilotKitCodeBlockToolbarButton",onClick:()=>{r||n(t)},children:[r?ji(Pm,{}):ji(Dm,{}),ji("span",{className:"sr-only",children:"Copy code"})]})]})]}),ji(VD,{language:e,style:_D,PreTag:"div",customStyle:{margin:0,borderBottomLeftRadius:"0.375rem",borderBottomRightRadius:"0.375rem"},children:t})]})});Sf.displayName="CodeBlock";var _D={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}};import{memo as TH}from"react";var $h=["http","https","mailto","tel"];function _h(e){let t=(e||"").trim(),r=t.charAt(0);if(r==="#"||r==="/")return t;let n=t.indexOf(":");if(n===-1)return t;let o=-1;for(;++o<$h.length;){let i=$h[o];if(n===i.length&&t.slice(0,i.length).toLowerCase()===i)return t}return o=t.indexOf("?"),o!==-1&&n>o||(o=t.indexOf("#"),o!==-1&&n>o)?t:"javascript:void(0)"}import x5 from"react";var Wh=Ge(Rf(),1);function Zo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zh(e.position):"start"in e||"end"in e?zh(e):"line"in e||"column"in e?Lf(e):""}function Lf(e){return Zh(e&&e.line)+":"+Zh(e&&e.column)}function zh(e){return Lf(e&&e.start)+"-"+Lf(e&&e.end)}function Zh(e){return e&&typeof e=="number"?e:1}var jt=class extends Error{constructor(t,r,n){let o=[null,null],i={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof r=="string"&&(n=r,r=void 0),typeof n=="string"){let s=n.indexOf(":");s===-1?o[1]=n:(o[0]=n.slice(0,s),o[1]=n.slice(s+1))}r&&("type"in r||"position"in r?r.position&&(i=r.position):"start"in r||"end"in r?i=r:("line"in r||"column"in r)&&(i.start=r)),this.name=Zo(r)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=i.start.line,this.column=i.start.column,this.position=i,this.source=o[0],this.ruleId=o[1],this.file,this.actual,this.expected,this.url,this.note}};jt.prototype.file="";jt.prototype.name="";jt.prototype.reason="";jt.prototype.message="";jt.prototype.stack="";jt.prototype.fatal=null;jt.prototype.column=null;jt.prototype.line=null;jt.prototype.source=null;jt.prototype.ruleId=null;jt.prototype.position=null;var mn={basename:BD,dirname:zD,extname:ZD,join:jD,sep:"/"};function BD(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');t1(e);let r=0,n=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.charCodeAt(o)===47){if(i){r=o+1;break}}else n<0&&(i=!0,n=o+1);return n<0?"":e.slice(r,n)}if(t===e)return"";let s=-1,a=t.length-1;for(;o--;)if(e.charCodeAt(o)===47){if(i){r=o+1;break}}else s<0&&(i=!0,s=o+1),a>-1&&(e.charCodeAt(o)===t.charCodeAt(a--)?a<0&&(n=o):(a=-1,n=s));return r===n?n=s:n<0&&(n=e.length),e.slice(r,n)}function zD(e){if(t1(e),e.length===0)return".";let t=-1,r=e.length,n;for(;--r;)if(e.charCodeAt(r)===47){if(n){t=r;break}}else n||(n=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function ZD(e){t1(e);let t=e.length,r=-1,n=0,o=-1,i=0,s;for(;t--;){let a=e.charCodeAt(t);if(a===47){if(s){n=t+1;break}continue}r<0&&(s=!0,r=t+1),a===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||r<0||i===0||i===1&&o===r-1&&o===n+1?"":e.slice(o,r)}function jD(...e){let t=-1,r;for(;++t<e.length;)t1(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":UD(r)}function UD(e){t1(e);let t=e.charCodeAt(0)===47,r=GD(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.charCodeAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function GD(e,t){let r="",n=0,o=-1,i=0,s=-1,a,l;for(;++s<=e.length;){if(s<e.length)a=e.charCodeAt(s);else{if(a===47)break;a=47}if(a===47){if(!(o===s-1||i===1))if(o!==s-1&&i===2){if(r.length<2||n!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){if(l=r.lastIndexOf("/"),l!==r.length-1){l<0?(r="",n=0):(r=r.slice(0,l),n=r.length-1-r.lastIndexOf("/")),o=s,i=0;continue}}else if(r.length>0){r="",n=0,o=s,i=0;continue}}t&&(r=r.length>0?r+"/..":"..",n=2)}else r.length>0?r+="/"+e.slice(o+1,s):r=e.slice(o+1,s),n=s-o-1;o=s,i=0}else a===46&&i>-1?i++:i=-1}return r}function t1(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var jh={cwd:WD};function WD(){return"/"}function ta(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function Uh(e){if(typeof e=="string")e=new URL(e);else if(!ta(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return qD(e)}function qD(e){if(e.hostname!==""){let n=new TypeError('File URL host must be "localhost" or empty on darwin');throw n.code="ERR_INVALID_FILE_URL_HOST",n}let t=e.pathname,r=-1;for(;++r<t.length;)if(t.charCodeAt(r)===37&&t.charCodeAt(r+1)===50){let n=t.charCodeAt(r+2);if(n===70||n===102){let o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}var Mf=["history","path","basename","stem","extname","dirname"],Ui=class{constructor(t){let r;t?typeof t=="string"||KD(t)?r={value:t}:ta(t)?r={path:t}:r=t:r={},this.data={},this.messages=[],this.history=[],this.cwd=jh.cwd(),this.value,this.stored,this.result,this.map;let n=-1;for(;++n<Mf.length;){let i=Mf[n];i in r&&r[i]!==void 0&&r[i]!==null&&(this[i]=i==="history"?[...r[i]]:r[i])}let o;for(o in r)Mf.includes(o)||(this[o]=r[o])}get path(){return this.history[this.history.length-1]}set path(t){ta(t)&&(t=Uh(t)),Tf(t,"path"),this.path!==t&&this.history.push(t)}get dirname(){return typeof this.path=="string"?mn.dirname(this.path):void 0}set dirname(t){Gh(this.basename,"dirname"),this.path=mn.join(t||"",this.basename)}get basename(){return typeof this.path=="string"?mn.basename(this.path):void 0}set basename(t){Tf(t,"basename"),Ef(t,"basename"),this.path=mn.join(this.dirname||"",t)}get extname(){return typeof this.path=="string"?mn.extname(this.path):void 0}set extname(t){if(Ef(t,"extname"),Gh(this.dirname,"extname"),t){if(t.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=mn.join(this.dirname,this.stem+(t||""))}get stem(){return typeof this.path=="string"?mn.basename(this.path,this.extname):void 0}set stem(t){Tf(t,"stem"),Ef(t,"stem"),this.path=mn.join(this.dirname||"",t+(this.extname||""))}toString(t){return(this.value||"").toString(t||void 0)}message(t,r,n){let o=new jt(t,r,n);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}info(t,r,n){let o=this.message(t,r,n);return o.fatal=null,o}fail(t,r,n){let o=this.message(t,r,n);throw o.fatal=!0,o}};function Ef(e,t){if(e&&e.includes(mn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+mn.sep+"`")}function Tf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Gh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function KD(e){return(0,Wh.default)(e)}function kf(e){if(e)throw e}var ag=Ge(Rf(),1),Df=Ge(rg(),1);function r1(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Af(){let e=[],t={run:r,use:n};return t;function r(...o){let i=-1,s=o.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);a(null,...o);function a(l,...c){let u=e[++i],d=-1;if(l){s(l);return}for(;++d<o.length;)(c[d]===null||c[d]===void 0)&&(c[d]=o[d]);o=c,u?ng(u,a)(...c):s(null,...c)}}function n(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function ng(e,t){let r;return n;function n(...s){let a=e.length>s.length,l;a&&s.push(o);try{l=e.apply(this,s)}catch(c){let u=c;if(a&&r)throw u;return o(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(s,...a){r||(r=!0,t(s,...a))}function i(s){o(null,s)}}var Nf=cg().freeze(),lg={}.hasOwnProperty;function cg(){let e=Af(),t=[],r={},n,o=-1;return i.data=s,i.Parser=void 0,i.Compiler=void 0,i.freeze=a,i.attachers=t,i.use=l,i.parse=c,i.stringify=u,i.run=d,i.runSync=f,i.process=p,i.processSync=m,i;function i(){let h=cg(),g=-1;for(;++g<t.length;)h.use(...t[g]);return h.data((0,Df.default)(!0,{},r)),h}function s(h,g){return typeof h=="string"?arguments.length===2?(Of("data",n),r[h]=g,i):lg.call(r,h)&&r[h]||null:h?(Of("data",n),r=h,i):r}function a(){if(n)return i;for(;++o<t.length;){let[h,...g]=t[o];if(g[0]===!1)continue;g[0]===!0&&(g[0]=void 0);let v=h.call(i,...g);typeof v=="function"&&e.use(v)}return n=!0,o=Number.POSITIVE_INFINITY,i}function l(h,...g){let v;if(Of("use",n),h!=null)if(typeof h=="function")y(h,...g);else if(typeof h=="object")Array.isArray(h)?w(h):x(h);else throw new TypeError("Expected usable value, not `"+h+"`");return v&&(r.settings=Object.assign(r.settings||{},v)),i;function C(b){if(typeof b=="function")y(b);else if(typeof b=="object")if(Array.isArray(b)){let[R,...L]=b;y(R,...L)}else x(b);else throw new TypeError("Expected usable value, not `"+b+"`")}function x(b){w(b.plugins),b.settings&&(v=Object.assign(v||{},b.settings))}function w(b){let R=-1;if(b!=null)if(Array.isArray(b))for(;++R<b.length;){let L=b[R];C(L)}else throw new TypeError("Expected a list of plugins, not `"+b+"`")}function y(b,R){let L=-1,E;for(;++L<t.length;)if(t[L][0]===b){E=t[L];break}E?(r1(E[1])&&r1(R)&&(R=(0,Df.default)(!0,E[1],R)),E[1]=R):t.push([...arguments])}}function c(h){i.freeze();let g=n1(h),v=i.Parser;return If("parse",v),og(v,"parse")?new v(String(g),g).parse():v(String(g),g)}function u(h,g){i.freeze();let v=n1(g),C=i.Compiler;return Pf("stringify",C),ig(h),og(C,"compile")?new C(h,v).compile():C(h,v)}function d(h,g,v){if(ig(h),i.freeze(),!v&&typeof g=="function"&&(v=g,g=void 0),!v)return new Promise(C);C(null,v);function C(x,w){e.run(h,n1(g),y);function y(b,R,L){R=R||h,b?w(b):x?x(R):v(null,R,L)}}}function f(h,g){let v,C;return i.run(h,g,x),sg("runSync","run",C),v;function x(w,y){kf(w),v=y,C=!0}}function p(h,g){if(i.freeze(),If("process",i.Parser),Pf("process",i.Compiler),!g)return new Promise(v);v(null,g);function v(C,x){let w=n1(h);i.run(i.parse(w),w,(b,R,L)=>{if(b||!R||!L)y(b);else{let E=i.stringify(R,L);E==null||(QD(E)?L.value=E:L.result=E),y(b,L)}});function y(b,R){b||!R?x(b):C?C(R):g(null,R)}}}function m(h){let g;i.freeze(),If("processSync",i.Parser),Pf("processSync",i.Compiler);let v=n1(h);return i.process(v,C),sg("processSync","process",g),v;function C(x){g=!0,kf(x)}}}function og(e,t){return typeof e=="function"&&e.prototype&&(YD(e.prototype)||t in e.prototype)}function YD(e){let t;for(t in e)if(lg.call(e,t))return!0;return!1}function If(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Pf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function Of(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ig(e){if(!r1(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function sg(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function n1(e){return XD(e)?e:new Ui(e)}function XD(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function QD(e){return typeof e=="string"||(0,ag.default)(e)}var JD={};function Ff(e,t){let r=t||JD,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return dg(e,n,o)}function dg(e,t,r){if(eN(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ug(e.children,t,r)}return Array.isArray(e)?ug(e,t,r):""}function ug(e,t,r){let n=[],o=-1;for(;++o<e.length;)n[o]=dg(e[o],t,r);return n.join("")}function eN(e){return!!(e&&typeof e=="object")}function Je(e,t,r,n){let o=e.length,i=0,s;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,r=r>0?r:0,n.length<1e4)s=Array.from(n),s.unshift(t,r),e.splice(...s);else for(r&&e.splice(t,r);i<n.length;)s=n.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function tr(e,t){return e.length>0?(Je(e,e.length,0,t),e):t}var fg={}.hasOwnProperty;function Nu(e){let t={},r=-1;for(;++r<e.length;)tN(t,e[r]);return t}function tN(e,t){let r;for(r in t){let o=(fg.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r],s;if(i)for(s in i){fg.call(o,s)||(o[s]=[]);let a=i[s];rN(o[s],Array.isArray(a)?a:a?[a]:[])}}}function rN(e,t){let r=-1,n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Je(e,0,0,n)}var pg=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/;var dt=jo(/[A-Za-z]/),Ye=jo(/[\dA-Za-z]/),mg=jo(/[#-'*+\--9=?A-Z^-~]/);function Gi(e){return e!==null&&(e<32||e===127)}var o1=jo(/\d/),hg=jo(/[\dA-Fa-f]/),gg=jo(/[!-/:-@[-`{-~]/);function j(e){return e!==null&&e<-2}function me(e){return e!==null&&(e<0||e===32)}function te(e){return e===-2||e===-1||e===32}var Wi=jo(pg),Dn=jo(/\s/);function jo(e){return t;function t(r){return r!==null&&e.test(String.fromCharCode(r))}}function Y(e,t,r,n){let o=n?n-1:Number.POSITIVE_INFINITY,i=0;return s;function s(l){return te(l)?(e.enter(r),a(l)):t(l)}function a(l){return te(l)&&i++<o?(e.consume(l),a):(e.exit(r),t(l))}}var vg={tokenize:nN};function nN(e){let t=e.attempt(this.parser.constructs.contentInitial,n,o),r;return t;function n(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Y(e,t,"linePrefix")}function o(a){return e.enter("paragraph"),i(a)}function i(a){let l=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=l),r=l,s(a)}function s(a){if(a===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(a);return}return j(a)?(e.consume(a),e.exit("chunkText"),i):(e.consume(a),s)}}var xg={tokenize:oN},Cg={tokenize:iN};function oN(e){let t=this,r=[],n=0,o,i,s;return a;function a(x){if(n<r.length){let w=r[n];return t.containerState=w[1],e.attempt(w[0].continuation,l,c)(x)}return c(x)}function l(x){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();let w=t.events.length,y=w,b;for(;y--;)if(t.events[y][0]==="exit"&&t.events[y][1].type==="chunkFlow"){b=t.events[y][1].end;break}v(n);let R=w;for(;R<t.events.length;)t.events[R][1].end=Object.assign({},b),R++;return Je(t.events,y+1,0,t.events.slice(w)),t.events.length=R,c(x)}return a(x)}function c(x){if(n===r.length){if(!o)return f(x);if(o.currentConstruct&&o.currentConstruct.concrete)return m(x);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Cg,u,d)(x)}function u(x){return o&&C(),v(n),f(x)}function d(x){return t.parser.lazy[t.now().line]=n!==r.length,s=t.now().offset,m(x)}function f(x){return t.containerState={},e.attempt(Cg,p,m)(x)}function p(x){return n++,r.push([t.currentConstruct,t.containerState]),f(x)}function m(x){if(x===null){o&&C(),v(0),e.consume(x);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),h(x)}function h(x){if(x===null){g(e.exit("chunkFlow"),!0),v(0),e.consume(x);return}return j(x)?(e.consume(x),g(e.exit("chunkFlow")),n=0,t.interrupt=void 0,a):(e.consume(x),h)}function g(x,w){let y=t.sliceStream(x);if(w&&y.push(null),x.previous=i,i&&(i.next=x),i=x,o.defineSkip(x.start),o.write(y),t.parser.lazy[x.start.line]){let b=o.events.length;for(;b--;)if(o.events[b][1].start.offset<s&&(!o.events[b][1].end||o.events[b][1].end.offset>s))return;let R=t.events.length,L=R,E,S;for(;L--;)if(t.events[L][0]==="exit"&&t.events[L][1].type==="chunkFlow"){if(E){S=t.events[L][1].end;break}E=!0}for(v(n),b=R;b<t.events.length;)t.events[b][1].end=Object.assign({},S),b++;Je(t.events,L+1,0,t.events.slice(R)),t.events.length=b}}function v(x){let w=r.length;for(;w-- >x;){let y=r[w];t.containerState=y[1],y[0].exit.call(t,e)}r.length=x}function C(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function iN(e,t,r){return Y(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ra(e){if(e===null||me(e)||Dn(e))return 1;if(Wi(e))return 2}function Uo(e,t,r){let n=[],o=-1;for(;++o<e.length;){let i=e[o].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}var i1={name:"attention",tokenize:aN,resolveAll:sN};function sN(e,t){let r=-1,n,o,i,s,a,l,c,u;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;l=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;let d=Object.assign({},e[n][1].end),f=Object.assign({},e[r][1].start);wg(d,-l),wg(f,l),s={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:f},i={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},o={type:l>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},e[n][1].end=Object.assign({},s.start),e[r][1].start=Object.assign({},a.end),c=[],e[n][1].end.offset-e[n][1].start.offset&&(c=tr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])),c=tr(c,[["enter",o,t],["enter",s,t],["exit",s,t],["enter",i,t]]),c=tr(c,Uo(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),c=tr(c,[["exit",i,t],["enter",a,t],["exit",a,t],["exit",o,t]]),e[r][1].end.offset-e[r][1].start.offset?(u=2,c=tr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])):u=0,Je(e,n-1,r-n+3,c),r=n+c.length-u-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function aN(e,t){let r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=ra(n),i;return s;function s(l){return i=l,e.enter("attentionSequence"),a(l)}function a(l){if(l===i)return e.consume(l),a;let c=e.exit("attentionSequence"),u=ra(l),d=!u||u===2&&o||r.includes(l),f=!o||o===2&&u||r.includes(n);return c._open=!!(i===42?d:d&&(o||!f)),c._close=!!(i===42?f:f&&(u||!d)),t(l)}}function wg(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Vf={name:"autolink",tokenize:lN};function lN(e,t,r){let n=0;return o;function o(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(p){return dt(p)?(e.consume(p),s):c(p)}function s(p){return p===43||p===45||p===46||Ye(p)?(n=1,a(p)):c(p)}function a(p){return p===58?(e.consume(p),n=0,l):(p===43||p===45||p===46||Ye(p))&&n++<32?(e.consume(p),a):(n=0,c(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Gi(p)?r(p):(e.consume(p),l)}function c(p){return p===64?(e.consume(p),u):mg(p)?(e.consume(p),c):r(p)}function u(p){return Ye(p)?d(p):r(p)}function d(p){return p===46?(e.consume(p),n=0,u):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):f(p)}function f(p){if((p===45||Ye(p))&&n++<63){let m=p===45?f:d;return e.consume(p),m}return r(p)}}var Nn={tokenize:cN,partial:!0};function cN(e,t,r){return n;function n(i){return te(i)?Y(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||j(i)?t(i):r(i)}}var Fu={name:"blockQuote",tokenize:uN,continuation:{tokenize:dN},exit:fN};function uN(e,t,r){let n=this;return o;function o(s){if(s===62){let a=n.containerState;return a.open||(e.enter("blockQuote",{_container:!0}),a.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return r(s)}function i(s){return te(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function dN(e,t,r){let n=this;return o;function o(s){return te(s)?Y(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Fu,t,r)(s)}}function fN(e){e.exit("blockQuote")}var Vu={name:"characterEscape",tokenize:pN};function pN(e,t,r){return n;function n(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return gg(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}var bg=document.createElement("i");function na(e){let t="&"+e+";";bg.innerHTML=t;let r=bg.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}var Hu={name:"characterReference",tokenize:mN};function mN(e,t,r){let n=this,o=0,i,s;return a;function a(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),l}function l(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,s=Ye,u(d))}function c(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=hg,u):(e.enter("characterReferenceValue"),i=7,s=o1,u(d))}function u(d){if(d===59&&o){let f=e.exit("characterReferenceValue");return s===Ye&&!na(n.sliceSerialize(f))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(d)&&o++<i?(e.consume(d),u):r(d)}}var yg={tokenize:gN,partial:!0},$u={name:"codeFenced",tokenize:hN,concrete:!0};function hN(e,t,r){let n=this,o={tokenize:y,partial:!0},i=0,s=0,a;return l;function l(b){return c(b)}function c(b){let R=n.events[n.events.length-1];return i=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,a=b,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(b)}function u(b){return b===a?(s++,e.consume(b),u):s<3?r(b):(e.exit("codeFencedFenceSequence"),te(b)?Y(e,d,"whitespace")(b):d(b))}function d(b){return b===null||j(b)?(e.exit("codeFencedFence"),n.interrupt?t(b):e.check(yg,h,w)(b)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===null||j(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(b)):te(b)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Y(e,p,"whitespace")(b)):b===96&&b===a?r(b):(e.consume(b),f)}function p(b){return b===null||j(b)?d(b):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||j(b)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(b)):b===96&&b===a?r(b):(e.consume(b),m)}function h(b){return e.attempt(o,w,g)(b)}function g(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),v}function v(b){return i>0&&te(b)?Y(e,C,"linePrefix",i+1)(b):C(b)}function C(b){return b===null||j(b)?e.check(yg,h,w)(b):(e.enter("codeFlowValue"),x(b))}function x(b){return b===null||j(b)?(e.exit("codeFlowValue"),C(b)):(e.consume(b),x)}function w(b){return e.exit("codeFenced"),t(b)}function y(b,R,L){let E=0;return S;function S(D){return b.enter("lineEnding"),b.consume(D),b.exit("lineEnding"),A}function A(D){return b.enter("codeFencedFence"),te(D)?Y(b,k,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):k(D)}function k(D){return D===a?(b.enter("codeFencedFenceSequence"),I(D)):L(D)}function I(D){return D===a?(E++,b.consume(D),I):E>=s?(b.exit("codeFencedFenceSequence"),te(D)?Y(b,N,"whitespace")(D):N(D)):L(D)}function N(D){return D===null||j(D)?(b.exit("codeFencedFence"),R(D)):L(D)}}}function gN(e,t,r){let n=this;return o;function o(s){return s===null?r(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}var s1={name:"codeIndented",tokenize:CN},vN={tokenize:xN,partial:!0};function CN(e,t,r){let n=this;return o;function o(c){return e.enter("codeIndented"),Y(e,i,"linePrefix",5)(c)}function i(c){let u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):r(c)}function s(c){return c===null?l(c):j(c)?e.attempt(vN,s,l)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||j(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),a)}function l(c){return e.exit("codeIndented"),t(c)}}function xN(e,t,r){let n=this;return o;function o(s){return n.parser.lazy[n.now().line]?r(s):j(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),o):Y(e,i,"linePrefix",5)(s)}function i(s){let a=n.events[n.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):j(s)?o(s):r(s)}}var Hf={name:"codeText",tokenize:yN,resolve:wN,previous:bN};function wN(e){let t=e.length-4,r=3,n,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)o===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(o=n):(n===t||e[n][1].type==="lineEnding")&&(e[o][1].type="codeTextData",n!==o+2&&(e[o][1].end=e[n-1][1].end,e.splice(o+2,n-o-2),t-=n-o-2,n=o+2),o=void 0);return e}function bN(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function yN(e,t,r){let n=this,o=0,i,s;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),l(f)}function l(f){return f===96?(e.consume(f),o++,l):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?r(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(s=e.enter("codeTextSequence"),i=0,d(f)):j(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||j(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),i++,d):i===o?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",u(f))}}function _u(e){let t={},r=-1,n,o,i,s,a,l,c;for(;++r<e.length;){for(;r in t;)r=t[r];if(n=e[r],r&&n[1].type==="chunkFlow"&&e[r-1][1].type==="listItemPrefix"&&(l=n[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,SN(e,r)),r=t[r],c=!0);else if(n[1]._container){for(i=r,o=void 0;i--&&(s=e[i],s[1].type==="lineEnding"||s[1].type==="lineEndingBlank");)s[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),s[1].type="lineEnding",o=i);o&&(n[1].end=Object.assign({},e[o][1].start),a=e.slice(o,r),a.unshift(n),Je(e,o,r-o+1,a))}}return!c}function SN(e,t){let r=e[t][1],n=e[t][2],o=t-1,i=[],s=r._tokenizer||n.parser[r.contentType](r.start),a=s.events,l=[],c={},u,d,f=-1,p=r,m=0,h=0,g=[h];for(;p;){for(;e[++o][1]!==p;);i.push(o),p._tokenizer||(u=n.sliceStream(p),p.next||u.push(null),d&&s.defineSkip(p.start),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),p._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=r;++f<a.length;)a[f][0]==="exit"&&a[f-1][0]==="enter"&&a[f][1].type===a[f-1][1].type&&a[f][1].start.line!==a[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(s.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let v=a.slice(g[f],g[f+1]),C=i.pop();l.unshift([C,C+v.length-1]),Je(e,C,2,v)}for(f=-1;++f<l.length;)c[m+l[f][0]]=m+l[f][1],m+=l[f][1]-l[f][0]-1;return c}var $f={tokenize:MN,resolve:LN},RN={tokenize:EN,partial:!0};function LN(e){return _u(e),e}function MN(e,t){let r;return n;function n(a){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(a)}function o(a){return a===null?i(a):j(a)?e.check(RN,s,i)(a):(e.consume(a),o)}function i(a){return e.exit("chunkContent"),e.exit("content"),t(a)}function s(a){return e.consume(a),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function EN(e,t,r){let n=this;return o;function o(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Y(e,i,"linePrefix")}function i(s){if(s===null||j(s))return r(s);let a=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):e.interrupt(n.parser.constructs.flow,r,t)(s)}}function Bu(e,t,r,n,o,i,s,a,l){let c=l||Number.POSITIVE_INFINITY,u=0;return d;function d(v){return v===60?(e.enter(n),e.enter(o),e.enter(i),e.consume(v),e.exit(i),f):v===null||v===32||v===41||Gi(v)?r(v):(e.enter(n),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),h(v))}function f(v){return v===62?(e.enter(i),e.consume(v),e.exit(i),e.exit(o),e.exit(n),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(v))}function p(v){return v===62?(e.exit("chunkString"),e.exit(a),f(v)):v===null||v===60||j(v)?r(v):(e.consume(v),v===92?m:p)}function m(v){return v===60||v===62||v===92?(e.consume(v),p):p(v)}function h(v){return!u&&(v===null||v===41||me(v))?(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(n),t(v)):u<c&&v===40?(e.consume(v),u++,h):v===41?(e.consume(v),u--,h):v===null||v===32||v===40||Gi(v)?r(v):(e.consume(v),v===92?g:h)}function g(v){return v===40||v===41||v===92?(e.consume(v),h):h(v)}}function zu(e,t,r,n,o,i){let s=this,a=0,l;return c;function c(p){return e.enter(n),e.enter(o),e.consume(p),e.exit(o),e.enter(i),u}function u(p){return a>999||p===null||p===91||p===93&&!l||p===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs?r(p):p===93?(e.exit(i),e.enter(o),e.consume(p),e.exit(o),e.exit(n),t):j(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===null||p===91||p===93||j(p)||a++>999?(e.exit("chunkString"),u(p)):(e.consume(p),l||(l=!te(p)),p===92?f:d)}function f(p){return p===91||p===92||p===93?(e.consume(p),a++,d):d(p)}}function Zu(e,t,r,n,o,i){let s;return a;function a(f){return f===34||f===39||f===40?(e.enter(n),e.enter(o),e.consume(f),e.exit(o),s=f===40?41:f,l):r(f)}function l(f){return f===s?(e.enter(o),e.consume(f),e.exit(o),e.exit(n),t):(e.enter(i),c(f))}function c(f){return f===s?(e.exit(i),l(s)):f===null?r(f):j(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),Y(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||j(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?d:u)}function d(f){return f===s||f===92?(e.consume(f),u):u(f)}}function qi(e,t){let r;return n;function n(o){return j(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):te(o)?Y(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}function Ut(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var _f={name:"definition",tokenize:kN},TN={tokenize:AN,partial:!0};function kN(e,t,r){let n=this,o;return i;function i(p){return e.enter("definition"),s(p)}function s(p){return zu.call(n,e,a,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return o=Ut(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):r(p)}function l(p){return me(p)?qi(e,c)(p):c(p)}function c(p){return Bu(e,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function u(p){return e.attempt(TN,d,d)(p)}function d(p){return te(p)?Y(e,f,"whitespace")(p):f(p)}function f(p){return p===null||j(p)?(e.exit("definition"),n.parser.defined.push(o),t(p)):r(p)}}function AN(e,t,r){return n;function n(a){return me(a)?qi(e,o)(a):r(a)}function o(a){return Zu(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function i(a){return te(a)?Y(e,s,"whitespace")(a):s(a)}function s(a){return a===null||j(a)?t(a):r(a)}}var Bf={name:"hardBreakEscape",tokenize:IN};function IN(e,t,r){return n;function n(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return j(i)?(e.exit("hardBreakEscape"),t(i)):r(i)}}var zf={name:"headingAtx",tokenize:ON,resolve:PN};function PN(e,t){let r=e.length-2,n=3,o,i;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(o={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},i={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},Je(e,n,r-n+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function ON(e,t,r){let n=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&n++<6?(e.consume(u),s):u===null||me(u)?(e.exit("atxHeadingSequence"),a(u)):r(u)}function a(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||j(u)?(e.exit("atxHeading"),t(u)):te(u)?Y(e,a,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||me(u)?(e.exit("atxHeadingText"),a(u)):(e.consume(u),c)}}var Sg=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Zf=["pre","script","style","textarea"];var jf={name:"htmlFlow",tokenize:VN,resolveTo:FN,concrete:!0},DN={tokenize:$N,partial:!0},NN={tokenize:HN,partial:!0};function FN(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function VN(e,t,r){let n=this,o,i,s,a,l;return c;function c(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),f):T===47?(e.consume(T),i=!0,h):T===63?(e.consume(T),o=3,n.interrupt?t:M):dt(T)?(e.consume(T),s=String.fromCharCode(T),g):r(T)}function f(T){return T===45?(e.consume(T),o=2,p):T===91?(e.consume(T),o=5,a=0,m):dt(T)?(e.consume(T),o=4,n.interrupt?t:M):r(T)}function p(T){return T===45?(e.consume(T),n.interrupt?t:M):r(T)}function m(T){let W="CDATA[";return T===W.charCodeAt(a++)?(e.consume(T),a===W.length?n.interrupt?t:k:m):r(T)}function h(T){return dt(T)?(e.consume(T),s=String.fromCharCode(T),g):r(T)}function g(T){if(T===null||T===47||T===62||me(T)){let W=T===47,ve=s.toLowerCase();return!W&&!i&&Zf.includes(ve)?(o=1,n.interrupt?t(T):k(T)):Sg.includes(s.toLowerCase())?(o=6,W?(e.consume(T),v):n.interrupt?t(T):k(T)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(T):i?C(T):x(T))}return T===45||Ye(T)?(e.consume(T),s+=String.fromCharCode(T),g):r(T)}function v(T){return T===62?(e.consume(T),n.interrupt?t:k):r(T)}function C(T){return te(T)?(e.consume(T),C):S(T)}function x(T){return T===47?(e.consume(T),S):T===58||T===95||dt(T)?(e.consume(T),w):te(T)?(e.consume(T),x):S(T)}function w(T){return T===45||T===46||T===58||T===95||Ye(T)?(e.consume(T),w):y(T)}function y(T){return T===61?(e.consume(T),b):te(T)?(e.consume(T),y):x(T)}function b(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),l=T,R):te(T)?(e.consume(T),b):L(T)}function R(T){return T===l?(e.consume(T),l=null,E):T===null||j(T)?r(T):(e.consume(T),R)}function L(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||me(T)?y(T):(e.consume(T),L)}function E(T){return T===47||T===62||te(T)?x(T):r(T)}function S(T){return T===62?(e.consume(T),A):r(T)}function A(T){return T===null||j(T)?k(T):te(T)?(e.consume(T),A):r(T)}function k(T){return T===45&&o===2?(e.consume(T),F):T===60&&o===1?(e.consume(T),H):T===62&&o===4?(e.consume(T),Z):T===63&&o===3?(e.consume(T),M):T===93&&o===5?(e.consume(T),O):j(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(DN,J,I)(T)):T===null||j(T)?(e.exit("htmlFlowData"),I(T)):(e.consume(T),k)}function I(T){return e.check(NN,N,J)(T)}function N(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),D}function D(T){return T===null||j(T)?I(T):(e.enter("htmlFlowData"),k(T))}function F(T){return T===45?(e.consume(T),M):k(T)}function H(T){return T===47?(e.consume(T),s="",P):k(T)}function P(T){if(T===62){let W=s.toLowerCase();return Zf.includes(W)?(e.consume(T),Z):k(T)}return dt(T)&&s.length<8?(e.consume(T),s+=String.fromCharCode(T),P):k(T)}function O(T){return T===93?(e.consume(T),M):k(T)}function M(T){return T===62?(e.consume(T),Z):T===45&&o===2?(e.consume(T),M):k(T)}function Z(T){return T===null||j(T)?(e.exit("htmlFlowData"),J(T)):(e.consume(T),Z)}function J(T){return e.exit("htmlFlow"),t(T)}}function HN(e,t,r){let n=this;return o;function o(s){return j(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):r(s)}function i(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function $N(e,t,r){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Nn,t,r)}}var Uf={name:"htmlText",tokenize:_N};function _N(e,t,r){let n=this,o,i,s;return a;function a(M){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(M),l}function l(M){return M===33?(e.consume(M),c):M===47?(e.consume(M),y):M===63?(e.consume(M),x):dt(M)?(e.consume(M),L):r(M)}function c(M){return M===45?(e.consume(M),u):M===91?(e.consume(M),i=0,m):dt(M)?(e.consume(M),C):r(M)}function u(M){return M===45?(e.consume(M),p):r(M)}function d(M){return M===null?r(M):M===45?(e.consume(M),f):j(M)?(s=d,H(M)):(e.consume(M),d)}function f(M){return M===45?(e.consume(M),p):d(M)}function p(M){return M===62?F(M):M===45?f(M):d(M)}function m(M){let Z="CDATA[";return M===Z.charCodeAt(i++)?(e.consume(M),i===Z.length?h:m):r(M)}function h(M){return M===null?r(M):M===93?(e.consume(M),g):j(M)?(s=h,H(M)):(e.consume(M),h)}function g(M){return M===93?(e.consume(M),v):h(M)}function v(M){return M===62?F(M):M===93?(e.consume(M),v):h(M)}function C(M){return M===null||M===62?F(M):j(M)?(s=C,H(M)):(e.consume(M),C)}function x(M){return M===null?r(M):M===63?(e.consume(M),w):j(M)?(s=x,H(M)):(e.consume(M),x)}function w(M){return M===62?F(M):x(M)}function y(M){return dt(M)?(e.consume(M),b):r(M)}function b(M){return M===45||Ye(M)?(e.consume(M),b):R(M)}function R(M){return j(M)?(s=R,H(M)):te(M)?(e.consume(M),R):F(M)}function L(M){return M===45||Ye(M)?(e.consume(M),L):M===47||M===62||me(M)?E(M):r(M)}function E(M){return M===47?(e.consume(M),F):M===58||M===95||dt(M)?(e.consume(M),S):j(M)?(s=E,H(M)):te(M)?(e.consume(M),E):F(M)}function S(M){return M===45||M===46||M===58||M===95||Ye(M)?(e.consume(M),S):A(M)}function A(M){return M===61?(e.consume(M),k):j(M)?(s=A,H(M)):te(M)?(e.consume(M),A):E(M)}function k(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),o=M,I):j(M)?(s=k,H(M)):te(M)?(e.consume(M),k):(e.consume(M),N)}function I(M){return M===o?(e.consume(M),o=void 0,D):M===null?r(M):j(M)?(s=I,H(M)):(e.consume(M),I)}function N(M){return M===null||M===34||M===39||M===60||M===61||M===96?r(M):M===47||M===62||me(M)?E(M):(e.consume(M),N)}function D(M){return M===47||M===62||me(M)?E(M):r(M)}function F(M){return M===62?(e.consume(M),e.exit("htmlTextData"),e.exit("htmlText"),t):r(M)}function H(M){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),P}function P(M){return te(M)?Y(e,O,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):O(M)}function O(M){return e.enter("htmlTextData"),s(M)}}var Ki={name:"labelEnd",tokenize:GN,resolveTo:UN,resolveAll:jN},BN={tokenize:WN},zN={tokenize:qN},ZN={tokenize:KN};function jN(e){let t=-1;for(;++t<e.length;){let r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function UN(e,t){let r=e.length,n=0,o,i,s,a;for(;r--;)if(o=e[r][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(s){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=r,o.type!=="labelLink")){n=2;break}}else o.type==="labelEnd"&&(s=r);let l={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[s][1].end)},u={type:"labelText",start:Object.assign({},e[i+n+2][1].end),end:Object.assign({},e[s-2][1].start)};return a=[["enter",l,t],["enter",c,t]],a=tr(a,e.slice(i+1,i+n+3)),a=tr(a,[["enter",u,t]]),a=tr(a,Uo(t.parser.constructs.insideSpan.null,e.slice(i+n+4,s-3),t)),a=tr(a,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),a=tr(a,e.slice(s+1)),a=tr(a,[["exit",l,t]]),Je(e,i,e.length,a),e}function GN(e,t,r){let n=this,o=n.events.length,i,s;for(;o--;)if((n.events[o][1].type==="labelImage"||n.events[o][1].type==="labelLink")&&!n.events[o][1]._balanced){i=n.events[o][1];break}return a;function a(f){return i?i._inactive?d(f):(s=n.parser.defined.includes(Ut(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),l):r(f)}function l(f){return f===40?e.attempt(BN,u,s?u:d)(f):f===91?e.attempt(zN,u,s?c:d)(f):s?u(f):d(f)}function c(f){return e.attempt(ZN,u,d)(f)}function u(f){return t(f)}function d(f){return i._balanced=!0,r(f)}}function WN(e,t,r){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return me(d)?qi(e,i)(d):i(d)}function i(d){return d===41?u(d):Bu(e,s,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function s(d){return me(d)?qi(e,l)(d):u(d)}function a(d){return r(d)}function l(d){return d===34||d===39||d===40?Zu(e,c,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return me(d)?qi(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function qN(e,t,r){let n=this;return o;function o(a){return zu.call(n,e,i,s,"reference","referenceMarker","referenceString")(a)}function i(a){return n.parser.defined.includes(Ut(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(a):r(a)}function s(a){return r(a)}}function KN(e,t,r){return n;function n(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}var Gf={name:"labelStartImage",tokenize:YN,resolveAll:Ki.resolveAll};function YN(e,t,r){let n=this;return o;function o(a){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(a),e.exit("labelImageMarker"),i}function i(a){return a===91?(e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelImage"),s):r(a)}function s(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}var Wf={name:"labelStartLink",tokenize:XN,resolveAll:Ki.resolveAll};function XN(e,t,r){let n=this;return o;function o(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}var a1={name:"lineEnding",tokenize:QN};function QN(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Y(e,t,"linePrefix")}}var Yi={name:"thematicBreak",tokenize:JN};function JN(e,t,r){let n=0,o;return i;function i(c){return e.enter("thematicBreak"),s(c)}function s(c){return o=c,a(c)}function a(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):n>=3&&(c===null||j(c))?(e.exit("thematicBreak"),t(c)):r(c)}function l(c){return c===o?(e.consume(c),n++,l):(e.exit("thematicBreakSequence"),te(c)?Y(e,a,"whitespace")(c):a(c))}}var Gt={name:"list",tokenize:rF,continuation:{tokenize:nF},exit:iF},eF={tokenize:sF,partial:!0},tF={tokenize:oF,partial:!0};function rF(e,t,r){let n=this,o=n.events[n.events.length-1],i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return a;function a(p){let m=n.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!n.containerState.marker||p===n.containerState.marker:o1(p)){if(n.containerState.type||(n.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(Yi,r,c)(p):c(p);if(!n.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return r(p)}function l(p){return o1(p)&&++s<10?(e.consume(p),l):(!n.interrupt||s<2)&&(n.containerState.marker?p===n.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):r(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||p,e.check(Nn,n.interrupt?r:u,e.attempt(eF,f,d))}function u(p){return n.containerState.initialBlankLine=!0,i++,f(p)}function d(p){return te(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),f):r(p)}function f(p){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function nF(e,t,r){let n=this;return n.containerState._closeFlow=void 0,e.check(Nn,o,i);function o(a){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Y(e,t,"listItemIndent",n.containerState.size+1)(a)}function i(a){return n.containerState.furtherBlankLines||!te(a)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,s(a)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(tF,t,s)(a))}function s(a){return n.containerState._closeFlow=!0,n.interrupt=void 0,Y(e,e.attempt(Gt,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function oF(e,t,r){let n=this;return Y(e,o,"listItemIndent",n.containerState.size+1);function o(i){let s=n.events[n.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===n.containerState.size?t(i):r(i)}}function iF(e){e.exit(this.containerState.type)}function sF(e,t,r){let n=this;return Y(e,o,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){let s=n.events[n.events.length-1];return!te(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):r(i)}}var ju={name:"setextUnderline",tokenize:lF,resolveTo:aF};function aF(e,t){let r=e.length,n,o,i;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!i&&e[r][1].type==="definition"&&(i=r);let s={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",s,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=s,e.push(["exit",s,t]),e}function lF(e,t,r){let n=this,o;return i;function i(c){let u=n.events.length,d;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){d=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),o=c,s(c)):r(c)}function s(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===o?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),te(c)?Y(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||j(c)?(e.exit("setextHeadingLine"),t(c)):r(c)}}var Rg={tokenize:cF};function cF(e){let t=this,r=e.attempt(Nn,n,e.attempt(this.parser.constructs.flowInitial,o,Y(e,e.attempt(this.parser.constructs.flow,o,e.attempt($f,o)),"linePrefix")));return r;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r}}var Lg={resolveAll:kg()},Mg=Tg("string"),Eg=Tg("text");function Tg(e){return{tokenize:t,resolveAll:kg(e==="text"?uF:void 0)};function t(r){let n=this,o=this.parser.constructs[e],i=r.attempt(o,s,a);return s;function s(u){return c(u)?i(u):a(u)}function a(u){if(u===null){r.consume(u);return}return r.enter("data"),r.consume(u),l}function l(u){return c(u)?(r.exit("data"),i(u)):(r.consume(u),l)}function c(u){if(u===null)return!0;let d=o[u],f=-1;if(d)for(;++f<d.length;){let p=d[f];if(!p.previous||p.previous.call(n,n.previous))return!0}return!1}}}function kg(e){return t;function t(r,n){let o=-1,i;for(;++o<=r.length;)i===void 0?r[o]&&r[o][1].type==="data"&&(i=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==i+2&&(r[i][1].end=r[o-1][1].end,r.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(r,n):r}}function uF(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){let n=e[r-1][1],o=t.sliceStream(n),i=o.length,s=-1,a=0,l;for(;i--;){let c=o[i];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)a++,s--;if(s)break;s=-1}else if(c===-2)l=!0,a++;else if(c!==-1){i++;break}}if(a){let c={type:r===e.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-a,offset:n.end.offset-a,_index:n.start._index+i,_bufferIndex:i?s:n.start._bufferIndex+s},end:Object.assign({},n.end)};n.end=Object.assign({},c.start),n.start.offset===n.end.offset?Object.assign(n,c):(e.splice(r,0,["enter",c,t],["exit",c,t]),r+=2)}r++}return e}function Ag(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1}),o={},i=[],s=[],a=[],l=!0,c={consume:w,enter:y,exit:b,attempt:E(R),check:E(L),interrupt:E(L,{interrupt:!0})},u={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:h,sliceSerialize:m,now:g,defineSkip:v,write:p},d=t.tokenize.call(u,c),f;return t.resolveAll&&i.push(t),u;function p(I){return s=tr(s,I),C(),s[s.length-1]!==null?[]:(S(t,0),u.events=Uo(i,u.events,u),u.events)}function m(I,N){return fF(h(I),N)}function h(I){return dF(s,I)}function g(){let{line:I,column:N,offset:D,_index:F,_bufferIndex:H}=n;return{line:I,column:N,offset:D,_index:F,_bufferIndex:H}}function v(I){o[I.line]=I.column,k()}function C(){let I;for(;n._index<s.length;){let N=s[n._index];if(typeof N=="string")for(I=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===I&&n._bufferIndex<N.length;)x(N.charCodeAt(n._bufferIndex));else x(N)}}function x(I){l=void 0,f=I,d=d(I)}function w(I){j(I)?(n.line++,n.column=1,n.offset+=I===-3?2:1,k()):I!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===s[n._index].length&&(n._bufferIndex=-1,n._index++)),u.previous=I,l=!0}function y(I,N){let D=N||{};return D.type=I,D.start=g(),u.events.push(["enter",D,u]),a.push(D),D}function b(I){let N=a.pop();return N.end=g(),u.events.push(["exit",N,u]),N}function R(I,N){S(I,N.from)}function L(I,N){N.restore()}function E(I,N){return D;function D(F,H,P){let O,M,Z,J;return Array.isArray(F)?W(F):"tokenize"in F?W([F]):T(F);function T(pe){return Mt;function Mt(Be){let Re=Be!==null&&pe[Be],G=Be!==null&&pe.null,Ce=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(G)?G:G?[G]:[]];return W(Ce)(Be)}}function W(pe){return O=pe,M=0,pe.length===0?P:ve(pe[M])}function ve(pe){return Mt;function Mt(Be){return J=A(),Z=pe,pe.partial||(u.currentConstruct=pe),pe.name&&u.parser.constructs.disable.null.includes(pe.name)?ae(Be):pe.tokenize.call(N?Object.assign(Object.create(u),N):u,c,Le,ae)(Be)}}function Le(pe){return l=!0,I(Z,J),H}function ae(pe){return l=!0,J.restore(),++M<O.length?ve(O[M]):P}}}function S(I,N){I.resolveAll&&!i.includes(I)&&i.push(I),I.resolve&&Je(u.events,N,u.events.length-N,I.resolve(u.events.slice(N),u)),I.resolveTo&&(u.events=I.resolveTo(u.events,u))}function A(){let I=g(),N=u.previous,D=u.currentConstruct,F=u.events.length,H=Array.from(a);return{restore:P,from:F};function P(){n=I,u.previous=N,u.currentConstruct=D,u.events.length=F,a=H,k()}}function k(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}function dF(e,t){let r=t.start._index,n=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex,s;if(r===o)s=[e[r].slice(n,i)];else{if(s=e.slice(r,o),n>-1){let a=s[0];typeof a=="string"?s[0]=a.slice(n):s.shift()}i>0&&s.push(e[o].slice(0,i))}return s}function fF(e,t){let r=-1,n=[],o;for(;++r<e.length;){let i=e[r],s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
|
|
136
|
+
`;break}case-3:{s=`\r
|
|
137
|
+
`;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&o)continue;s=" ";break}default:s=String.fromCharCode(i)}o=i===-2,n.push(s)}return n.join("")}var qf={};X2(qf,{attentionMarkers:()=>wF,contentInitial:()=>mF,disable:()=>bF,document:()=>pF,flow:()=>gF,flowInitial:()=>hF,insideSpan:()=>xF,string:()=>vF,text:()=>CF});var pF={42:Gt,43:Gt,45:Gt,48:Gt,49:Gt,50:Gt,51:Gt,52:Gt,53:Gt,54:Gt,55:Gt,56:Gt,57:Gt,62:Fu},mF={91:_f},hF={[-2]:s1,[-1]:s1,32:s1},gF={35:zf,42:Yi,45:[ju,Yi],60:jf,61:ju,95:Yi,96:$u,126:$u},vF={38:Hu,92:Vu},CF={[-5]:a1,[-4]:a1,[-3]:a1,33:Gf,38:Hu,42:i1,60:[Vf,Uf],91:Wf,92:[Bf,Vu],93:Ki,95:i1,96:Hf},xF={null:[i1,Lg]},wF={null:[42,95]},bF={null:[]};function Ig(e){let r=Nu([qf,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:o(vg),document:o(xg),flow:o(Rg),string:o(Mg),text:o(Eg)};return n;function o(i){return s;function s(a){return Ag(n,i,a)}}}var Pg=/[\0\t\n\r]/g;function Og(){let e=1,t="",r=!0,n;return o;function o(i,s,a){let l=[],c,u,d,f,p;for(i=t+i.toString(s),d=0,t="",r&&(i.charCodeAt(0)===65279&&d++,r=void 0);d<i.length;){if(Pg.lastIndex=d,c=Pg.exec(i),f=c&&c.index!==void 0?c.index:i.length,p=i.charCodeAt(f),!c){t=i.slice(d);break}if(p===10&&d===f&&n)l.push(-3),n=void 0;else switch(n&&(l.push(-5),n=void 0),d<f&&(l.push(i.slice(d,f)),e+=f-d),p){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:n=!0,e=1}d=f+1}return a&&(n&&l.push(-5),t&&l.push(t),l.push(null)),l}}function Dg(e){for(;!_u(e););return e}function Uu(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCharCode(r)}var yF=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Gu(e){return e.replace(yF,SF)}function SF(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let o=r.charCodeAt(1),i=o===120||o===88;return Uu(r.slice(i?2:1),i?16:10)}return na(r)||e}var Fg={}.hasOwnProperty,Kf=function(e,t,r){return typeof t!="string"&&(r=t,t=void 0),RF(r)(Dg(Ig(r).document().write(Og()(e,t,!0))))};function RF(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Rn),autolinkProtocol:A,autolinkEmail:A,atxHeading:a(Sr),blockQuote:a(Re),characterEscape:A,characterReference:A,codeFenced:a(G),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(G,l),codeText:a(Ce,l),codeTextData:A,data:A,codeFlowValue:A,definition:a(Ke),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Et),hardBreakEscape:a(Hr),hardBreakTrailing:a(Hr),htmlFlow:a(yn,l),htmlFlowData:A,htmlText:a(yn,l),htmlTextData:A,image:a(Sn),label:l,link:a(Rn),listItem:a(vl),listItemValue:m,listOrdered:a(Oo,p),listUnordered:a(Oo),paragraph:a(Cl),reference:ve,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Sr),strong:a(kc),thematicBreak:a(Y2)},exit:{atxHeading:u(),atxHeadingSequence:R,autolink:u(),autolinkEmail:Be,autolinkProtocol:Mt,blockQuote:u(),characterEscapeValue:k,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:pe,codeFenced:u(C),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:k,codeIndented:u(x),codeText:u(H),codeTextData:k,data:k,definition:u(),definitionDestinationString:b,definitionLabelString:w,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(N),hardBreakTrailing:u(N),htmlFlow:u(D),htmlFlowData:k,htmlText:u(F),htmlTextData:k,image:u(O),label:Z,labelText:M,lineEnding:I,link:u(P),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:Le,resourceDestinationString:J,resourceTitleString:T,resource:W,setextHeading:u(S),setextHeadingLineSequence:E,setextHeadingText:L,strong:u(),thematicBreak:u()}};Vg(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(V){let z={type:"root",children:[]},re={stack:[z],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:f,setData:i,getData:s},xe=[],Me=-1;for(;++Me<V.length;)if(V[Me][1].type==="listOrdered"||V[Me][1].type==="listUnordered")if(V[Me][0]==="enter")xe.push(Me);else{let Qt=xe.pop();Me=o(V,Qt,Me)}for(Me=-1;++Me<V.length;){let Qt=t[V[Me][0]];Fg.call(Qt,V[Me][1].type)&&Qt[V[Me][1].type].call(Object.assign({sliceSerialize:V[Me][2].sliceSerialize},re),V[Me][1])}if(re.tokenStack.length>0){let Qt=re.tokenStack[re.tokenStack.length-1];(Qt[1]||Ng).call(re,void 0,Qt[0])}for(z.position={start:Go(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:Go(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<t.transforms.length;)z=t.transforms[Me](z)||z;return z}function o(V,z,re){let xe=z-1,Me=-1,Qt=!1,Rr,sn,Mi,Ei;for(;++xe<=re;){let Ue=V[xe];if(Ue[1].type==="listUnordered"||Ue[1].type==="listOrdered"||Ue[1].type==="blockQuote"?(Ue[0]==="enter"?Me++:Me--,Ei=void 0):Ue[1].type==="lineEndingBlank"?Ue[0]==="enter"&&(Rr&&!Ei&&!Me&&!Mi&&(Mi=xe),Ei=void 0):Ue[1].type==="linePrefix"||Ue[1].type==="listItemValue"||Ue[1].type==="listItemMarker"||Ue[1].type==="listItemPrefix"||Ue[1].type==="listItemPrefixWhitespace"||(Ei=void 0),!Me&&Ue[0]==="enter"&&Ue[1].type==="listItemPrefix"||Me===-1&&Ue[0]==="exit"&&(Ue[1].type==="listUnordered"||Ue[1].type==="listOrdered")){if(Rr){let xl=xe;for(sn=void 0;xl--;){let $r=V[xl];if($r[1].type==="lineEnding"||$r[1].type==="lineEndingBlank"){if($r[0]==="exit")continue;sn&&(V[sn][1].type="lineEndingBlank",Qt=!0),$r[1].type="lineEnding",sn=xl}else if(!($r[1].type==="linePrefix"||$r[1].type==="blockQuotePrefix"||$r[1].type==="blockQuotePrefixWhitespace"||$r[1].type==="blockQuoteMarker"||$r[1].type==="listItemIndent"))break}Mi&&(!sn||Mi<sn)&&(Rr._spread=!0),Rr.end=Object.assign({},sn?V[sn][1].start:Ue[1].end),V.splice(sn||xe,0,["exit",Rr,Ue[2]]),xe++,re++}Ue[1].type==="listItemPrefix"&&(Rr={type:"listItem",_spread:!1,start:Object.assign({},Ue[1].start),end:void 0},V.splice(xe,0,["enter",Rr,Ue[2]]),xe++,re++,Mi=void 0,Ei=!0)}}return V[z][1]._spread=Qt,re}function i(V,z){r[V]=z}function s(V){return r[V]}function a(V,z){return re;function re(xe){c.call(this,V(xe),xe),z&&z.call(this,xe)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(V,z,re){return this.stack[this.stack.length-1].children.push(V),this.stack.push(V),this.tokenStack.push([z,re]),V.position={start:Go(z.start)},V}function u(V){return z;function z(re){V&&V.call(this,re),d.call(this,re)}}function d(V,z){let re=this.stack.pop(),xe=this.tokenStack.pop();if(xe)xe[0].type!==V.type&&(z?z.call(this,V,xe[0]):(xe[1]||Ng).call(this,V,xe[0]));else throw new Error("Cannot close `"+V.type+"` ("+Zo({start:V.start,end:V.end})+"): it\u2019s not open");return re.position.end=Go(V.end),re}function f(){return Ff(this.stack.pop())}function p(){i("expectingFirstListItemValue",!0)}function m(V){if(s("expectingFirstListItemValue")){let z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(V),10),i("expectingFirstListItemValue")}}function h(){let V=this.resume(),z=this.stack[this.stack.length-1];z.lang=V}function g(){let V=this.resume(),z=this.stack[this.stack.length-1];z.meta=V}function v(){s("flowCodeInside")||(this.buffer(),i("flowCodeInside",!0))}function C(){let V=this.resume(),z=this.stack[this.stack.length-1];z.value=V.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),i("flowCodeInside")}function x(){let V=this.resume(),z=this.stack[this.stack.length-1];z.value=V.replace(/(\r?\n|\r)$/g,"")}function w(V){let z=this.resume(),re=this.stack[this.stack.length-1];re.label=z,re.identifier=Ut(this.sliceSerialize(V)).toLowerCase()}function y(){let V=this.resume(),z=this.stack[this.stack.length-1];z.title=V}function b(){let V=this.resume(),z=this.stack[this.stack.length-1];z.url=V}function R(V){let z=this.stack[this.stack.length-1];if(!z.depth){let re=this.sliceSerialize(V).length;z.depth=re}}function L(){i("setextHeadingSlurpLineEnding",!0)}function E(V){let z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(V).charCodeAt(0)===61?1:2}function S(){i("setextHeadingSlurpLineEnding")}function A(V){let z=this.stack[this.stack.length-1],re=z.children[z.children.length-1];(!re||re.type!=="text")&&(re=Ac(),re.position={start:Go(V.start)},z.children.push(re)),this.stack.push(re)}function k(V){let z=this.stack.pop();z.value+=this.sliceSerialize(V),z.position.end=Go(V.end)}function I(V){let z=this.stack[this.stack.length-1];if(s("atHardBreak")){let re=z.children[z.children.length-1];re.position.end=Go(V.end),i("atHardBreak");return}!s("setextHeadingSlurpLineEnding")&&t.canContainEols.includes(z.type)&&(A.call(this,V),k.call(this,V))}function N(){i("atHardBreak",!0)}function D(){let V=this.resume(),z=this.stack[this.stack.length-1];z.value=V}function F(){let V=this.resume(),z=this.stack[this.stack.length-1];z.value=V}function H(){let V=this.resume(),z=this.stack[this.stack.length-1];z.value=V}function P(){let V=this.stack[this.stack.length-1];if(s("inReference")){let z=s("referenceType")||"shortcut";V.type+="Reference",V.referenceType=z,delete V.url,delete V.title}else delete V.identifier,delete V.label;i("referenceType")}function O(){let V=this.stack[this.stack.length-1];if(s("inReference")){let z=s("referenceType")||"shortcut";V.type+="Reference",V.referenceType=z,delete V.url,delete V.title}else delete V.identifier,delete V.label;i("referenceType")}function M(V){let z=this.sliceSerialize(V),re=this.stack[this.stack.length-2];re.label=Gu(z),re.identifier=Ut(z).toLowerCase()}function Z(){let V=this.stack[this.stack.length-1],z=this.resume(),re=this.stack[this.stack.length-1];if(i("inReference",!0),re.type==="link"){let xe=V.children;re.children=xe}else re.alt=z}function J(){let V=this.resume(),z=this.stack[this.stack.length-1];z.url=V}function T(){let V=this.resume(),z=this.stack[this.stack.length-1];z.title=V}function W(){i("inReference")}function ve(){i("referenceType","collapsed")}function Le(V){let z=this.resume(),re=this.stack[this.stack.length-1];re.label=z,re.identifier=Ut(this.sliceSerialize(V)).toLowerCase(),i("referenceType","full")}function ae(V){i("characterReferenceType",V.type)}function pe(V){let z=this.sliceSerialize(V),re=s("characterReferenceType"),xe;re?(xe=Uu(z,re==="characterReferenceMarkerNumeric"?10:16),i("characterReferenceType")):xe=na(z);let Me=this.stack.pop();Me.value+=xe,Me.position.end=Go(V.end)}function Mt(V){k.call(this,V);let z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(V)}function Be(V){k.call(this,V);let z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(V)}function Re(){return{type:"blockquote",children:[]}}function G(){return{type:"code",lang:null,meta:null,value:""}}function Ce(){return{type:"inlineCode",value:""}}function Ke(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Et(){return{type:"emphasis",children:[]}}function Sr(){return{type:"heading",depth:void 0,children:[]}}function Hr(){return{type:"break"}}function yn(){return{type:"html",value:""}}function Sn(){return{type:"image",title:null,url:"",alt:null}}function Rn(){return{type:"link",title:null,url:"",children:[]}}function Oo(V){return{type:"list",ordered:V.type==="listOrdered",start:null,spread:V._spread,children:[]}}function vl(V){return{type:"listItem",spread:V._spread,checked:null,children:[]}}function Cl(){return{type:"paragraph",children:[]}}function kc(){return{type:"strong",children:[]}}function Ac(){return{type:"text",value:""}}function Y2(){return{type:"thematicBreak"}}}function Go(e){return{line:e.line,column:e.column,offset:e.offset}}function Vg(e,t){let r=-1;for(;++r<t.length;){let n=t[r];Array.isArray(n)?Vg(e,n):LF(e,n)}}function LF(e,t){let r;for(r in t)if(Fg.call(t,r)){if(r==="canContainEols"){let n=t[r];n&&e[r].push(...n)}else if(r==="transforms"){let n=t[r];n&&e[r].push(...n)}else if(r==="enter"||r==="exit"){let n=t[r];n&&Object.assign(e[r],n)}}}function Ng(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Zo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Zo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Zo({start:t.start,end:t.end})+") is still open")}function Wu(e){Object.assign(this,{Parser:r=>{let n=this.data("settings");return Kf(r,Object.assign({},n,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}function Hg(e,t){let r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function $g(e,t){let r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
138
|
+
`}]}function _g(e,t){let r=t.value?t.value+`
|
|
139
|
+
`:"",n=t.lang?t.lang.match(/^[^ \t]+(?=[ \t]|$)/):null,o={};n&&(o.className=["language-"+n]);let i={type:"element",tagName:"code",properties:o,children:[{type:"text",value:r}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function Bg(e,t){let r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function zg(e,t){let r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Gr(e){let t=[],r=-1,n=0,o=0;for(;++r<e.length;){let i=e.charCodeAt(r),s="";if(i===37&&Ye(e.charCodeAt(r+1))&&Ye(e.charCodeAt(r+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){let a=e.charCodeAt(r+1);i<56320&&a>56319&&a<57344?(s=String.fromCharCode(i,a),o=1):s="\uFFFD"}else s=String.fromCharCode(i);s&&(t.push(e.slice(n,r),encodeURIComponent(s)),n=r+o+1,s=""),o&&(r+=o,o=0)}return t.join("")+e.slice(n)}function qu(e,t){let r=String(t.identifier).toUpperCase(),n=Gr(r.toLowerCase()),o=e.footnoteOrder.indexOf(r),i;o===-1?(e.footnoteOrder.push(r),e.footnoteCounts[r]=1,i=e.footnoteOrder.length):(e.footnoteCounts[r]++,i=o+1);let s=e.footnoteCounts[r],a={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fn-"+n,id:e.clobberPrefix+"fnref-"+n+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(i)}]};e.patch(t,a);let l={type:"element",tagName:"sup",properties:{},children:[a]};return e.patch(t,l),e.applyData(t,l)}function Zg(e,t){let r=e.footnoteById,n=1;for(;n in r;)n++;let o=String(n);return r[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},qu(e,{type:"footnoteReference",identifier:o,position:t.position})}function jg(e,t){let r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Ug(e,t){if(e.dangerous){let r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}return null}function Ku(e,t){let r=t.referenceType,n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return{type:"text",value:"!["+t.alt+n};let o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});let s=o[o.length-1];return s&&s.type==="text"?s.value+=n:o.push({type:"text",value:n}),o}function Gg(e,t){let r=e.definition(t.identifier);if(!r)return Ku(e,t);let n={src:Gr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,o),e.applyData(t,o)}function Wg(e,t){let r={src:Gr(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);let n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function qg(e,t){let r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);let n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function Kg(e,t){let r=e.definition(t.identifier);if(!r)return Ku(e,t);let n={href:Gr(r.url||"")};r.title!==null&&r.title!==void 0&&(n.title=r.title);let o={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Yg(e,t){let r={href:Gr(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);let n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xg(e,t,r){let n=e.all(t),o=r?MF(r):Qg(t),i={},s=[];if(typeof t.checked=="boolean"){let u=n[0],d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let a=-1;for(;++a<n.length;){let u=n[a];(o||a!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
|
|
140
|
+
`}),u.type==="element"&&u.tagName==="p"&&!o?s.push(...u.children):s.push(u)}let l=n[n.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&s.push({type:"text",value:`
|
|
141
|
+
`});let c={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,c),e.applyData(t,c)}function MF(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let r=e.children,n=-1;for(;!t&&++n<r.length;)t=Qg(r[n])}return t}function Qg(e){let t=e.spread;return t??e.children.length>1}function Jg(e,t){let r={},n=e.all(t),o=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++o<n.length;){let s=n[o];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(n,!0)};return e.patch(t,i),e.applyData(t,i)}function ev(e,t){let r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tv(e,t){let r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function rv(e,t){let r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}var oa=nv("start"),ia=nv("end");function Yf(e){return{start:oa(e),end:ia(e)}}function nv(e){return t;function t(r){let n=r&&r.position&&r.position[e]||{};return{line:n.line||null,column:n.column||null,offset:n.offset>-1?n.offset:null}}}function ov(e,t){let r=e.all(t),n=r.shift(),o=[];if(n){let s={type:"element",tagName:"thead",properties:{},children:e.wrap([n],!0)};e.patch(t.children[0],s),o.push(s)}if(r.length>0){let s={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},a=oa(t.children[1]),l=ia(t.children[t.children.length-1]);a.line&&l.line&&(s.position={start:a,end:l}),o.push(s)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function iv(e,t,r){let n=r?r.children:void 0,i=(n?n.indexOf(t):1)===0?"th":"td",s=r&&r.type==="table"?r.align:void 0,a=s?s.length:t.children.length,l=-1,c=[];for(;++l<a;){let d=t.children[l],f={},p=s?s[l]:void 0;p&&(f.align=p);let m={type:"element",tagName:i,properties:f,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(t,m)),c.push(m)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function sv(e,t){let r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lv(e){let t=String(e),r=/\r?\n|\r/g,n=r.exec(t),o=0,i=[];for(;n;)i.push(av(t.slice(o,n.index),o>0,!0),n[0]),o=n.index+n[0].length,n=r.exec(t);return i.push(av(t.slice(o),o>0,!1)),i.join("")}function av(e,t,r){let n=0,o=e.length;if(t){let i=e.codePointAt(n);for(;i===9||i===32;)n++,i=e.codePointAt(n)}if(r){let i=e.codePointAt(o-1);for(;i===9||i===32;)o--,i=e.codePointAt(o-1)}return o>n?e.slice(n,o):""}function cv(e,t){let r={type:"text",value:lv(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function uv(e,t){let r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}var dv={blockquote:Hg,break:$g,code:_g,delete:Bg,emphasis:zg,footnoteReference:qu,footnote:Zg,heading:jg,html:Ug,imageReference:Gg,image:Wg,inlineCode:qg,linkReference:Kg,link:Yg,listItem:Xg,list:Jg,paragraph:ev,root:tv,strong:rv,table:ov,tableCell:sv,tableRow:iv,text:cv,thematicBreak:uv,toml:Yu,yaml:Yu,definition:Yu,footnoteDefinition:Yu};function Yu(){return null}var sa=function(e){if(e==null)return AF;if(typeof e=="string")return kF(e);if(typeof e=="object")return Array.isArray(e)?EF(e):TF(e);if(typeof e=="function")return Xu(e);throw new Error("Expected function, string, or object as test")};function EF(e){let t=[],r=-1;for(;++r<e.length;)t[r]=sa(e[r]);return Xu(n);function n(...o){let i=-1;for(;++i<t.length;)if(t[i].call(this,...o))return!0;return!1}}function TF(e){return Xu(t);function t(r){let n;for(n in e)if(r[n]!==e[n])return!1;return!0}}function kF(e){return Xu(t);function t(r){return r&&r.type===e}}function Xu(e){return t;function t(r,...n){return!!(r&&typeof r=="object"&&"type"in r&&e.call(this,r,...n))}}function AF(){return!0}var Xf=!0,Qu=!1,Qf="skip",l1=function(e,t,r,n){typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null);let o=sa(t),i=n?-1:1;s(e,void 0,[])();function s(a,l,c){let u=a&&typeof a=="object"?a:{};if(typeof u.type=="string"){let f=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(a.type+(f?"<"+f+">":""))+")"})}return d;function d(){let f=[],p,m,h;if((!t||o(a,l,c[c.length-1]||null))&&(f=IF(r(a,c)),f[0]===Qu))return f;if(a.children&&f[0]!==Qf)for(m=(n?a.children.length:-1)+i,h=c.concat(a);m>-1&&m<a.children.length;){if(p=s(a.children[m],m,h)(),p[0]===Qu)return p;m=typeof p[1]=="number"?p[1]:m+i}return f}}};function IF(e){return Array.isArray(e)?e:typeof e=="number"?[Xf,e]:[e]}var Xi=function(e,t,r,n){typeof t=="function"&&typeof r!="function"&&(n=r,r=t,t=null),l1(e,t,o,n);function o(i,s){let a=s[s.length-1];return r(i,a?a.children.indexOf(i):null,a)}};function Jf(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}var fv={}.hasOwnProperty;function e5(e){let t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Xi(e,"definition",n=>{let o=pv(n.identifier);o&&!fv.call(t,o)&&(t[o]=n)}),r;function r(n){let o=pv(n);return o&&fv.call(t,o)?t[o]:null}}function pv(e){return String(e||"").toUpperCase()}var Ju={}.hasOwnProperty;function mv(e,t){let r=t||{},n=r.allowDangerousHtml||!1,o={};return s.dangerous=n,s.clobberPrefix=r.clobberPrefix===void 0||r.clobberPrefix===null?"user-content-":r.clobberPrefix,s.footnoteLabel=r.footnoteLabel||"Footnotes",s.footnoteLabelTagName=r.footnoteLabelTagName||"h2",s.footnoteLabelProperties=r.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=r.footnoteBackLabel||"Back to content",s.unknownHandler=r.unknownHandler,s.passThrough=r.passThrough,s.handlers={...dv,...r.handlers},s.definition=e5(e),s.footnoteById=o,s.footnoteOrder=[],s.footnoteCounts={},s.patch=PF,s.applyData=OF,s.one=a,s.all=l,s.wrap=NF,s.augment=i,Xi(e,"footnoteDefinition",c=>{let u=String(c.identifier).toUpperCase();Ju.call(o,u)||(o[u]=c)}),s;function i(c,u){if(c&&"data"in c&&c.data){let d=c.data;d.hName&&(u.type!=="element"&&(u={type:"element",tagName:"",properties:{},children:[]}),u.tagName=d.hName),u.type==="element"&&d.hProperties&&(u.properties={...u.properties,...d.hProperties}),"children"in u&&u.children&&d.hChildren&&(u.children=d.hChildren)}if(c){let d="type"in c?c:{position:c};Jf(d)||(u.position={start:oa(d),end:ia(d)})}return u}function s(c,u,d,f){return Array.isArray(d)&&(f=d,d={}),i(c,{type:"element",tagName:u,properties:d||{},children:f||[]})}function a(c,u){return hv(s,c,u)}function l(c){return t5(s,c)}}function PF(e,t){e.position&&(t.position=Yf(e))}function OF(e,t){let r=t;if(e&&e.data){let n=e.data.hName,o=e.data.hChildren,i=e.data.hProperties;typeof n=="string"&&(r.type==="element"?r.tagName=n:r={type:"element",tagName:n,properties:{},children:[]}),r.type==="element"&&i&&(r.properties={...r.properties,...i}),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function hv(e,t,r){let n=t&&t.type;if(!n)throw new Error("Expected node, got `"+t+"`");return Ju.call(e.handlers,n)?e.handlers[n](e,t,r):e.passThrough&&e.passThrough.includes(n)?"children"in t?{...t,children:t5(e,t)}:t:e.unknownHandler?e.unknownHandler(e,t,r):DF(e,t)}function t5(e,t){let r=[];if("children"in t){let n=t.children,o=-1;for(;++o<n.length;){let i=hv(e,n[o],t);if(i){if(o&&n[o-1].type==="break"&&(!Array.isArray(i)&&i.type==="text"&&(i.value=i.value.replace(/^\s+/,"")),!Array.isArray(i)&&i.type==="element")){let s=i.children[0];s&&s.type==="text"&&(s.value=s.value.replace(/^\s+/,""))}Array.isArray(i)?r.push(...i):r.push(i)}}}return r}function DF(e,t){let r=t.data||{},n="value"in t&&!(Ju.call(r,"hProperties")||Ju.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:t5(e,t)};return e.patch(t,n),e.applyData(t,n)}function NF(e,t){let r=[],n=-1;for(t&&r.push({type:"text",value:`
|
|
142
|
+
`});++n<e.length;)n&&r.push({type:"text",value:`
|
|
143
|
+
`}),r.push(e[n]);return t&&e.length>0&&r.push({type:"text",value:`
|
|
144
|
+
`}),r}function gv(e){let t=[],r=-1;for(;++r<e.footnoteOrder.length;){let n=e.footnoteById[e.footnoteOrder[r]];if(!n)continue;let o=e.all(n),i=String(n.identifier).toUpperCase(),s=Gr(i.toLowerCase()),a=0,l=[];for(;++a<=e.footnoteCounts[i];){let d={type:"element",tagName:"a",properties:{href:"#"+e.clobberPrefix+"fnref-"+s+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"\u21A9"}]};a>1&&d.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),l.length>0&&l.push({type:"text",value:" "}),l.push(d)}let c=o[o.length-1];if(c&&c.type==="element"&&c.tagName==="p"){let d=c.children[c.children.length-1];d&&d.type==="text"?d.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...l)}else o.push(...l);let u={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:e.wrap(o,!0)};e.patch(n,u),t.push(u)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:e.footnoteLabel}]},{type:"text",value:`
|
|
145
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(t,!0)},{type:"text",value:`
|
|
146
|
+
`}]}}function ed(e,t){let r=mv(e,t),n=r.one(e,null),o=gv(r);return o&&n.children.push({type:"text",value:`
|
|
147
|
+
`},o),Array.isArray(n)?{type:"root",children:n}:n}var FF=function(e,t){return e&&"run"in e?VF(e,t):HF(e||t)},r5=FF;function VF(e,t){return(r,n,o)=>{e.run(ed(r,t),n,i=>{o(i)})}}function HF(e){return t=>ed(t,e)}var ie=Ge(Rv(),1);var so=class{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}};so.prototype.property={};so.prototype.normal={};so.prototype.space=null;function n5(e,t){let r={},n={},o=-1;for(;++o<e.length;)Object.assign(r,e[o].property),Object.assign(n,e[o].normal);return new so(r,n,t)}function c1(e){return e.toLowerCase()}var Wt=class{constructor(t,r){this.property=t,this.attribute=r}};Wt.prototype.space=null;Wt.prototype.boolean=!1;Wt.prototype.booleanish=!1;Wt.prototype.overloadedBoolean=!1;Wt.prototype.number=!1;Wt.prototype.commaSeparated=!1;Wt.prototype.spaceSeparated=!1;Wt.prototype.commaOrSpaceSeparated=!1;Wt.prototype.mustUseProperty=!1;Wt.prototype.defined=!1;var u1={};X2(u1,{boolean:()=>le,booleanish:()=>Xe,commaOrSpaceSeparated:()=>mr,commaSeparated:()=>Wo,number:()=>$,overloadedBoolean:()=>o5,spaceSeparated:()=>ke});var BF=0,le=Qi(),Xe=Qi(),o5=Qi(),$=Qi(),ke=Qi(),Wo=Qi(),mr=Qi();function Qi(){return 2**++BF}var i5=Object.keys(u1),Ji=class extends Wt{constructor(t,r,n,o){let i=-1;if(super(t,r),Lv(this,"space",o),typeof n=="number")for(;++i<i5.length;){let s=i5[i];Lv(this,i5[i],(n&u1[s])===u1[s])}}};Ji.prototype.defined=!0;function Lv(e,t,r){r&&(e[t]=r)}var zF={}.hasOwnProperty;function Wr(e){let t={},r={},n;for(n in e.properties)if(zF.call(e.properties,n)){let o=e.properties[n],i=new Ji(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[c1(n)]=n,r[c1(i.attribute)]=n}return new so(t,r,e.space)}var s5=Wr({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});var a5=Wr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function td(e,t){return t in e?e[t]:t}function rd(e,t){return td(e,t.toLowerCase())}var l5=Wr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:rd,properties:{xmlns:null,xmlnsXLink:null}});var c5=Wr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Xe,ariaAutoComplete:null,ariaBusy:Xe,ariaChecked:Xe,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:ke,ariaCurrent:null,ariaDescribedBy:ke,ariaDetails:null,ariaDisabled:Xe,ariaDropEffect:ke,ariaErrorMessage:null,ariaExpanded:Xe,ariaFlowTo:ke,ariaGrabbed:Xe,ariaHasPopup:null,ariaHidden:Xe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ke,ariaLevel:$,ariaLive:null,ariaModal:Xe,ariaMultiLine:Xe,ariaMultiSelectable:Xe,ariaOrientation:null,ariaOwns:ke,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:Xe,ariaReadOnly:Xe,ariaRelevant:null,ariaRequired:Xe,ariaRoleDescription:ke,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:Xe,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null}});var Mv=Wr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:rd,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Wo,acceptCharset:ke,accessKey:ke,action:null,allow:null,allowFullScreen:le,allowPaymentRequest:le,allowUserMedia:le,alt:null,as:null,async:le,autoCapitalize:null,autoComplete:ke,autoFocus:le,autoPlay:le,blocking:ke,capture:null,charSet:null,checked:le,cite:null,className:ke,cols:$,colSpan:null,content:null,contentEditable:Xe,controls:le,controlsList:ke,coords:$|Wo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:le,defer:le,dir:null,dirName:null,disabled:le,download:o5,draggable:Xe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:le,formTarget:null,headers:ke,height:$,hidden:le,high:$,href:null,hrefLang:null,htmlFor:ke,httpEquiv:ke,id:null,imageSizes:null,imageSrcSet:null,inert:le,inputMode:null,integrity:null,is:null,isMap:le,itemId:null,itemProp:ke,itemRef:ke,itemScope:le,itemType:ke,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:le,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:le,muted:le,name:null,nonce:null,noModule:le,noValidate:le,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:le,optimum:$,pattern:null,ping:ke,placeholder:null,playsInline:le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:le,referrerPolicy:null,rel:ke,required:le,reversed:le,rows:$,rowSpan:$,sandbox:ke,scope:null,scoped:le,seamless:le,selected:le,shadowRootClonable:le,shadowRootDelegatesFocus:le,shadowRootMode:null,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:Xe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:le,useMap:null,value:Xe,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ke,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:le,declare:le,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:le,noHref:le,noShade:le,noWrap:le,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:Xe,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:le,disableRemotePlayback:le,prefix:null,property:null,results:$,security:null,unselectable:null}});var Ev=Wr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:td,properties:{about:mr,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:ke,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:le,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Wo,g2:Wo,glyphName:Wo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:mr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ke,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:mr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:mr,rev:mr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:mr,requiredFeatures:mr,requiredFonts:mr,requiredFormats:mr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:mr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:mr,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:mr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}});var ZF=/^data[-\w.:]+$/i,Tv=/-[a-z]/g,jF=/[A-Z]/g;function u5(e,t){let r=c1(t),n=t,o=Wt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&ZF.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(Tv,GF);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!Tv.test(i)){let s=i.replace(jF,UF);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}o=Ji}return new o(n,t)}function UF(e){return"-"+e.toLowerCase()}function GF(e){return e.charAt(1).toUpperCase()}var nd={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"};var kv=n5([a5,s5,l5,c5,Mv],"html"),Av=n5([a5,s5,l5,c5,Ev],"svg");function d5(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Xi(t,"element",(r,n,o)=>{let i=o,s;if(e.allowedElements?s=!e.allowedElements.includes(r.tagName):e.disallowedElements&&(s=e.disallowedElements.includes(r.tagName)),!s&&e.allowElement&&typeof n=="number"&&(s=!e.allowElement(r,n,i)),s&&typeof n=="number")return e.unwrapDisallowed&&r.children?i.children.splice(n,1,...r.children):i.children.splice(n,1),n})}}var qv=Ge(Dv(),1);import h5 from"react";function Nv(e){let t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function Fv(e){return e.join(" ").trim()}function Vv(e,t){let r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}var Gv=Ge(Uv(),1),Wv=Gv.default;var v5={}.hasOwnProperty,sV=new Set(["table","thead","tbody","tfoot","tr"]);function C5(e,t){let r=[],n=-1,o;for(;++n<t.children.length;)o=t.children[n],o.type==="element"?r.push(aV(e,o,n,t)):o.type==="text"?(t.type!=="element"||!sV.has(t.tagName)||!Nv(o))&&r.push(o.value):o.type==="raw"&&!e.options.skipHtml&&r.push(o.value);return r}function aV(e,t,r,n){let o=e.options,i=o.transformLinkUri===void 0?_h:o.transformLinkUri,s=e.schema,a=t.tagName,l={},c=s,u;if(s.space==="html"&&a==="svg"&&(c=Av,e.schema=c),t.properties)for(u in t.properties)v5.call(t.properties,u)&&cV(l,u,t.properties[u],e);(a==="ol"||a==="ul")&&e.listDepth++;let d=C5(e,t);(a==="ol"||a==="ul")&&e.listDepth--,e.schema=s;let f=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},p=o.components&&v5.call(o.components,a)?o.components[a]:a,m=typeof p=="string"||p===h5.Fragment;if(!qv.default.isValidElementType(p))throw new TypeError(`Component for name \`${a}\` not defined or is not renderable`);if(l.key=r,a==="a"&&o.linkTarget&&(l.target=typeof o.linkTarget=="function"?o.linkTarget(String(l.href||""),t.children,typeof l.title=="string"?l.title:null):o.linkTarget),a==="a"&&i&&(l.href=i(String(l.href||""),t.children,typeof l.title=="string"?l.title:null)),!m&&a==="code"&&n.type==="element"&&n.tagName!=="pre"&&(l.inline=!0),!m&&(a==="h1"||a==="h2"||a==="h3"||a==="h4"||a==="h5"||a==="h6")&&(l.level=Number.parseInt(a.charAt(1),10)),a==="img"&&o.transformImageUri&&(l.src=o.transformImageUri(String(l.src||""),String(l.alt||""),typeof l.title=="string"?l.title:null)),!m&&a==="li"&&n.type==="element"){let h=lV(t);l.checked=h&&h.properties?!!h.properties.checked:null,l.index=g5(n,t),l.ordered=n.tagName==="ol"}return!m&&(a==="ol"||a==="ul")&&(l.ordered=a==="ol",l.depth=e.listDepth),(a==="td"||a==="th")&&(l.align&&(l.style||(l.style={}),l.style.textAlign=l.align,delete l.align),m||(l.isHeader=a==="th")),!m&&a==="tr"&&n.type==="element"&&(l.isHeader=n.tagName==="thead"),o.sourcePos&&(l["data-sourcepos"]=fV(f)),!m&&o.rawSourcePos&&(l.sourcePosition=t.position),!m&&o.includeElementIndex&&(l.index=g5(n,t),l.siblingCount=g5(n)),m||(l.node=t),d.length>0?h5.createElement(p,l,d):h5.createElement(p,l)}function lV(e){let t=-1;for(;++t<e.children.length;){let r=e.children[t];if(r.type==="element"&&r.tagName==="input")return r}return null}function g5(e,t){let r=-1,n=0;for(;++r<e.children.length&&e.children[r]!==t;)e.children[r].type==="element"&&n++;return n}function cV(e,t,r,n){let o=u5(n.schema,t),i=r;i==null||i!==i||(Array.isArray(i)&&(i=o.commaSeparated?Vv(i):Fv(i)),o.property==="style"&&typeof i=="string"&&(i=uV(i)),o.space&&o.property?e[v5.call(nd,o.property)?nd[o.property]:o.property]=i:o.attribute&&(e[o.attribute]=i))}function uV(e){let t={};try{Wv(e,r)}catch{}return t;function r(n,o){let i=n.slice(0,4)==="-ms-"?`ms-${n.slice(4)}`:n;t[i.replace(/-([a-z])/g,dV)]=o}}function dV(e,t){return t.toUpperCase()}function fV(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(String).join("")}var Kv={}.hasOwnProperty,pV="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",md={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function aa(e){for(let i in md)if(Kv.call(md,i)&&Kv.call(e,i)){let s=md[i];console.warn(`[react-markdown] Warning: please ${s.to?`use \`${s.to}\` instead of`:"remove"} \`${i}\` (see <${pV}#${s.id}> for more info)`),delete md[i]}let t=Nf().use(Wu).use(e.remarkPlugins||[]).use(r5,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(d5,e),r=new Ui;typeof e.children=="string"?r.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);let n=t.runSync(t.parse(r),r);if(n.type!=="root")throw new TypeError("Expected a `root` node");let o=x5.createElement(x5.Fragment,{},C5({options:e,schema:kv,listDepth:0},n));return e.className&&(o=x5.createElement("div",{className:e.className},o)),o}aa.propTypes={children:ie.default.string,className:ie.default.string,allowElement:ie.default.func,allowedElements:ie.default.arrayOf(ie.default.string),disallowedElements:ie.default.arrayOf(ie.default.string),unwrapDisallowed:ie.default.bool,remarkPlugins:ie.default.arrayOf(ie.default.oneOfType([ie.default.object,ie.default.func,ie.default.arrayOf(ie.default.oneOfType([ie.default.bool,ie.default.string,ie.default.object,ie.default.func,ie.default.arrayOf(ie.default.any)]))])),rehypePlugins:ie.default.arrayOf(ie.default.oneOfType([ie.default.object,ie.default.func,ie.default.arrayOf(ie.default.oneOfType([ie.default.bool,ie.default.string,ie.default.object,ie.default.func,ie.default.arrayOf(ie.default.any)]))])),sourcePos:ie.default.bool,rawSourcePos:ie.default.bool,skipHtml:ie.default.bool,includeElementIndex:ie.default.bool,transformLinkUri:ie.default.oneOfType([ie.default.func,ie.default.bool]),linkTarget:ie.default.oneOfType([ie.default.func,ie.default.string]),transformImageUri:ie.default.func,components:ie.default.object};var mV={tokenize:xV,partial:!0},Yv={tokenize:wV,partial:!0},Xv={tokenize:bV,partial:!0},Qv={tokenize:yV,partial:!0},hV={tokenize:SV,partial:!0},Jv={tokenize:vV,previous:tC},eC={tokenize:CV,previous:rC},ao={tokenize:gV,previous:nC},Fn={},b5={text:Fn},ts=48;for(;ts<123;)Fn[ts]=ao,ts++,ts===58?ts=65:ts===91&&(ts=97);Fn[43]=ao;Fn[45]=ao;Fn[46]=ao;Fn[95]=ao;Fn[72]=[ao,eC];Fn[104]=[ao,eC];Fn[87]=[ao,Jv];Fn[119]=[ao,Jv];function gV(e,t,r){let n=this,o,i;return s;function s(d){return!w5(d)||!nC.call(n,n.previous)||y5(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(d))}function a(d){return w5(d)?(e.consume(d),a):d===64?(e.consume(d),l):r(d)}function l(d){return d===46?e.check(hV,u,c)(d):d===45||d===95||Ye(d)?(i=!0,e.consume(d),l):u(d)}function c(d){return e.consume(d),o=!0,l}function u(d){return i&&o&&dt(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function vV(e,t,r){let n=this;return o;function o(s){return s!==87&&s!==119||!tC.call(n,n.previous)||y5(n.events)?r(s):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(mV,e.attempt(Yv,e.attempt(Xv,i),r),r)(s))}function i(s){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(s)}}function CV(e,t,r){let n=this,o="",i=!1;return s;function s(d){return(d===72||d===104)&&rC.call(n,n.previous)&&!y5(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),a):r(d)}function a(d){if(dt(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),a;if(d===58){let f=o.toLowerCase();if(f==="http"||f==="https")return e.consume(d),l}return r(d)}function l(d){return d===47?(e.consume(d),i?c:(i=!0,l)):r(d)}function c(d){return d===null||Gi(d)||me(d)||Dn(d)||Wi(d)?r(d):e.attempt(Yv,e.attempt(Xv,u),r)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function xV(e,t,r){let n=0;return o;function o(s){return(s===87||s===119)&&n<3?(n++,e.consume(s),o):s===46&&n===3?(e.consume(s),i):r(s)}function i(s){return s===null?r(s):t(s)}}function wV(e,t,r){let n,o,i;return s;function s(c){return c===46||c===95?e.check(Qv,l,a)(c):c===null||me(c)||Dn(c)||c!==45&&Wi(c)?l(c):(i=!0,e.consume(c),s)}function a(c){return c===95?n=!0:(o=n,n=void 0),e.consume(c),s}function l(c){return o||n||!i?r(c):t(c)}}function bV(e,t){let r=0,n=0;return o;function o(s){return s===40?(r++,e.consume(s),o):s===41&&n<r?i(s):s===33||s===34||s===38||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===60||s===63||s===93||s===95||s===126?e.check(Qv,t,i)(s):s===null||me(s)||Dn(s)?t(s):(e.consume(s),o)}function i(s){return s===41&&n++,e.consume(s),o}}function yV(e,t,r){return n;function n(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(e.consume(a),n):a===38?(e.consume(a),i):a===93?(e.consume(a),o):a===60||a===null||me(a)||Dn(a)?t(a):r(a)}function o(a){return a===null||a===40||a===91||me(a)||Dn(a)?t(a):n(a)}function i(a){return dt(a)?s(a):r(a)}function s(a){return a===59?(e.consume(a),n):dt(a)?(e.consume(a),s):r(a)}}function SV(e,t,r){return n;function n(i){return e.consume(i),o}function o(i){return Ye(i)?r(i):t(i)}}function tC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||me(e)}function rC(e){return!dt(e)}function nC(e){return!(e===47||w5(e))}function w5(e){return e===43||e===45||e===46||e===95||Ye(e)}function y5(e){let t=e.length,r=!1;for(;t--;){let n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}var RV={tokenize:IV,partial:!0};function S5(){return{document:{91:{tokenize:TV,continuation:{tokenize:kV},exit:AV}},text:{91:{tokenize:EV},93:{add:"after",tokenize:LV,resolveTo:MV}}}}function LV(e,t,r){let n=this,o=n.events.length,i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),s;for(;o--;){let l=n.events[o][1];if(l.type==="labelImage"){s=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!s||!s._balanced)return r(l);let c=Ut(n.sliceSerialize({start:s.end,end:n.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?r(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function MV(e,t){let r=e.length,n;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){n=e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";let o={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[e[r+1],e[r+2],["enter",o,t],e[r+3],e[r+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(r,e.length-r+1,...l),e}function EV(e,t,r){let n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),i=0,s;return a;function a(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(d){if(i>999||d===93&&!s||d===null||d===91||me(d))return r(d);if(d===93){e.exit("chunkString");let f=e.exit("gfmFootnoteCallString");return o.includes(Ut(n.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return me(d)||(s=!0),i++,e.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,c):c(d)}}function TV(e,t,r){let n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]),i,s=0,a;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(m)}function u(m){if(s>999||m===93&&!a||m===null||m===91||me(m))return r(m);if(m===93){e.exit("chunkString");let h=e.exit("gfmFootnoteDefinitionLabelString");return i=Ut(n.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return me(m)||(a=!0),s++,e.consume(m),m===92?d:u}function d(m){return m===91||m===92||m===93?(e.consume(m),s++,u):u(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),o.includes(i)||o.push(i),Y(e,p,"gfmFootnoteDefinitionWhitespace")):r(m)}function p(m){return t(m)}}function kV(e,t,r){return e.check(Nn,t,e.attempt(RV,t,r))}function AV(e){e.exit("gfmFootnoteDefinition")}function IV(e,t,r){let n=this;return Y(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){let s=n.events[n.events.length-1];return s&&s[1].type==="gfmFootnoteDefinitionIndent"&&s[2].sliceSerialize(s[1],!0).length===4?t(i):r(i)}}function R5(e){let r=(e||{}).singleTilde,n={tokenize:i,resolveAll:o};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function o(s,a){let l=-1;for(;++l<s.length;)if(s[l][0]==="enter"&&s[l][1].type==="strikethroughSequenceTemporary"&&s[l][1]._close){let c=l;for(;c--;)if(s[c][0]==="exit"&&s[c][1].type==="strikethroughSequenceTemporary"&&s[c][1]._open&&s[l][1].end.offset-s[l][1].start.offset===s[c][1].end.offset-s[c][1].start.offset){s[l][1].type="strikethroughSequence",s[c][1].type="strikethroughSequence";let u={type:"strikethrough",start:Object.assign({},s[c][1].start),end:Object.assign({},s[l][1].end)},d={type:"strikethroughText",start:Object.assign({},s[c][1].end),end:Object.assign({},s[l][1].start)},f=[["enter",u,a],["enter",s[c][1],a],["exit",s[c][1],a],["enter",d,a]],p=a.parser.constructs.insideSpan.null;p&&Je(f,f.length,0,Uo(p,s.slice(c+1,l),a)),Je(f,f.length,0,[["exit",d,a],["enter",s[l][1],a],["exit",s[l][1],a],["exit",u,a]]),Je(s,c-1,l-c+3,f),l=c+f.length-2;break}}for(l=-1;++l<s.length;)s[l][1].type==="strikethroughSequenceTemporary"&&(s[l][1].type="data");return s}function i(s,a,l){let c=this.previous,u=this.events,d=0;return f;function f(m){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(m):(s.enter("strikethroughSequenceTemporary"),p(m))}function p(m){let h=ra(c);if(m===126)return d>1?l(m):(s.consume(m),d++,p);if(d<2&&!r)return l(m);let g=s.exit("strikethroughSequenceTemporary"),v=ra(m);return g._open=!v||v===2&&!!h,g._close=!h||h===2&&!!v,a(m)}}}var hd=class{constructor(){this.map=[]}add(t,r,n){PV(this,t,r,n)}consume(t){if(this.map.sort((i,s)=>i[0]-s[0]),this.map.length===0)return;let r=this.map.length,n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1])),n.push(this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let o=n.pop();for(;o;)t.push(...o),o=n.pop();this.map.length=0}};function PV(e,t,r,n){let o=0;if(!(r===0&&n.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=r,e.map[o][2].push(...n);return}o+=1}e.map.push([t,r,n])}}function oC(e,t){let r=!1,n=[];for(;t<e.length;){let o=e[t];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){let i=n.length-1;n[i]=n[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}var L5={flow:{null:{tokenize:OV,resolveAll:DV}}};function OV(e,t,r){let n=this,o=0,i=0,s;return a;function a(S){let A=n.events.length-1;for(;A>-1;){let N=n.events[A][1].type;if(N==="lineEnding"||N==="linePrefix")A--;else break}let k=A>-1?n.events[A][1].type:null,I=k==="tableHead"||k==="tableRow"?b:l;return I===b&&n.parser.lazy[n.now().line]?r(S):I(S)}function l(S){return e.enter("tableHead"),e.enter("tableRow"),c(S)}function c(S){return S===124||(s=!0,i+=1),u(S)}function u(S){return S===null?r(S):j(S)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),p):r(S):te(S)?Y(e,u,"whitespace")(S):(i+=1,s&&(s=!1,o+=1),S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),s=!0,u):(e.enter("data"),d(S)))}function d(S){return S===null||S===124||me(S)?(e.exit("data"),u(S)):(e.consume(S),S===92?f:d)}function f(S){return S===92||S===124?(e.consume(S),d):d(S)}function p(S){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(S):(e.enter("tableDelimiterRow"),s=!1,te(S)?Y(e,m,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):m(S))}function m(S){return S===45||S===58?g(S):S===124?(s=!0,e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),h):y(S)}function h(S){return te(S)?Y(e,g,"whitespace")(S):g(S)}function g(S){return S===58?(i+=1,s=!0,e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),v):S===45?(i+=1,v(S)):S===null||j(S)?w(S):y(S)}function v(S){return S===45?(e.enter("tableDelimiterFiller"),C(S)):y(S)}function C(S){return S===45?(e.consume(S),C):S===58?(s=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(S),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(S))}function x(S){return te(S)?Y(e,w,"whitespace")(S):w(S)}function w(S){return S===124?m(S):S===null||j(S)?!s||o!==i?y(S):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(S)):y(S)}function y(S){return r(S)}function b(S){return e.enter("tableRow"),R(S)}function R(S){return S===124?(e.enter("tableCellDivider"),e.consume(S),e.exit("tableCellDivider"),R):S===null||j(S)?(e.exit("tableRow"),t(S)):te(S)?Y(e,R,"whitespace")(S):(e.enter("data"),L(S))}function L(S){return S===null||S===124||me(S)?(e.exit("data"),R(S)):(e.consume(S),S===92?E:L)}function E(S){return S===92||S===124?(e.consume(S),L):L(S)}}function DV(e,t){let r=-1,n=!0,o=0,i=[0,0,0,0],s=[0,0,0,0],a=!1,l=0,c,u,d,f=new hd;for(;++r<e.length;){let p=e[r],m=p[1];p[0]==="enter"?m.type==="tableHead"?(a=!1,l!==0&&(iC(f,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(r,0,[["enter",c,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(n=!0,d=void 0,i=[0,0,0,0],s=[0,r+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(r,0,[["enter",u,t]])),o=m.type==="tableDelimiterRow"?2:u?3:1):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(n=!1,s[2]===0&&(i[1]!==0&&(s[0]=s[1],d=gd(f,t,i,o,void 0,d),i=[0,0,0,0]),s[2]=r)):m.type==="tableCellDivider"&&(n?n=!1:(i[1]!==0&&(s[0]=s[1],d=gd(f,t,i,o,void 0,d)),i=s,s=[i[1],r,0,0])):m.type==="tableHead"?(a=!0,l=r):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=r,i[1]!==0?(s[0]=s[1],d=gd(f,t,i,o,r,d)):s[1]!==0&&(d=gd(f,t,s,o,r,d)),o=0):o&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(s[3]=r)}for(l!==0&&iC(f,t,l,c,u),f.consume(t.events),r=-1;++r<t.events.length;){let p=t.events[r];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=oC(t.events,r))}return e}function gd(e,t,r,n,o,i){let s=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",a="tableContent";r[0]!==0&&(i.end=Object.assign({},la(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));let l=la(t.events,r[1]);if(i={type:s,start:Object.assign({},l),end:Object.assign({},l)},e.add(r[1],0,[["enter",i,t]]),r[2]!==0){let c=la(t.events,r[2]),u=la(t.events,r[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){let f=t.events[r[2]],p=t.events[r[3]];if(f[1].end=Object.assign({},p[1].end),f[1].type="chunkText",f[1].contentType="text",r[3]>r[2]+1){let m=r[2]+1,h=r[3]-r[2]-1;e.add(m,h,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},la(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function iC(e,t,r,n,o){let i=[],s=la(t.events,r);o&&(o.end=Object.assign({},s),i.push(["exit",o,t])),n.end=Object.assign({},s),i.push(["exit",n,t]),e.add(r+1,0,i)}function la(e,t){let r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}var NV={tokenize:FV},M5={text:{91:NV}};function FV(e,t,r){let n=this;return o;function o(l){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return me(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),s):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),s):r(l)}function s(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):r(l)}function a(l){return j(l)?t(l):te(l)?e.check({tokenize:VV},t,r)(l):r(l)}}function VV(e,t,r){return Y(e,n,"whitespace");function n(o){return o===null?r(o):t(o)}}function sC(e){return Nu([b5,S5(),R5(e),L5,M5])}function E5(e,t){let r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let n=0,o=r.indexOf(t);for(;o!==-1;)n++,o=r.indexOf(t,o+t.length);return n}function T5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var HV={}.hasOwnProperty,k5=function(e,t,r,n){let o,i;typeof t=="string"||t instanceof RegExp?(i=[[t,r]],o=n):(i=t,o=r),o||(o={});let s=sa(o.ignore||[]),a=$V(i),l=-1;for(;++l<a.length;)l1(e,"text",c);return e;function c(d,f){let p=-1,m;for(;++p<f.length;){let h=f[p];if(s(h,m?m.children.indexOf(h):void 0,m))return;m=h}if(m)return u(d,f)}function u(d,f){let p=f[f.length-1],m=a[l][0],h=a[l][1],g=0,v=p.children.indexOf(d),C=!1,x=[];m.lastIndex=0;let w=m.exec(d.value);for(;w;){let y=w.index,b={index:w.index,input:w.input,stack:[...f,d]},R=h(...w,b);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R!==!1&&(g!==y&&x.push({type:"text",value:d.value.slice(g,y)}),Array.isArray(R)?x.push(...R):R&&x.push(R),g=y+w[0].length,C=!0),!m.global)break;w=m.exec(d.value)}return C?(g<d.value.length&&x.push({type:"text",value:d.value.slice(g)}),p.children.splice(v,1,...x)):x=[d],v+x.length}};function $V(e){let t=[];if(typeof e!="object")throw new TypeError("Expected array or object as schema");if(Array.isArray(e)){let r=-1;for(;++r<e.length;)t.push([aC(e[r][0]),lC(e[r][1])])}else{let r;for(r in e)HV.call(e,r)&&t.push([aC(r),lC(e[r])])}return t}function aC(e){return typeof e=="string"?new RegExp(T5(e),"g"):e}function lC(e){return typeof e=="function"?e:()=>e}var A5="phrasing",I5=["autolink","link","image","label"],O5={transforms:[UV],enter:{literalAutolink:_V,literalAutolinkEmail:P5,literalAutolinkHttp:P5,literalAutolinkWww:P5},exit:{literalAutolink:jV,literalAutolinkEmail:ZV,literalAutolinkHttp:BV,literalAutolinkWww:zV}},D5={unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:A5,notInConstruct:I5},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:A5,notInConstruct:I5},{character:":",before:"[ps]",after:"\\/",inConstruct:A5,notInConstruct:I5}]};function _V(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function P5(e){this.config.enter.autolinkProtocol.call(this,e)}function BV(e){this.config.exit.autolinkProtocol.call(this,e)}function zV(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.url="http://"+this.sliceSerialize(e)}function ZV(e){this.config.exit.autolinkEmail.call(this,e)}function jV(e){this.exit(e)}function UV(e){k5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,GV],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/g,WV]],{ignore:["link","linkReference"]})}function GV(e,t,r,n,o){let i="";if(!cC(o)||(/^w/i.test(t)&&(r=t+r,t="",i="http://"),!qV(r)))return!1;let s=KV(r+n);if(!s[0])return!1;let a={type:"link",title:null,url:i+t+s[0],children:[{type:"text",value:t+s[0]}]};return s[1]?[a,{type:"text",value:s[1]}]:a}function WV(e,t,r,n){return!cC(n,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function qV(e){let t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function KV(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],n=r.indexOf(")"),o=E5(e,"("),i=E5(e,")");for(;n!==-1&&o>i;)e+=r.slice(0,n+1),r=r.slice(n+1),n=r.indexOf(")"),i++;return[e,r]}function cC(e,t){let r=e.input.charCodeAt(e.index-1);return(e.index===0||Dn(r)||Wi(r))&&(!t||r!==47)}function N5(e){return e.label||!e.identifier?e.label||"":Gu(e.identifier)}function uC(e,t,r){let n=t.indexStack,o=e.children||[],i=t.createTracker(r),s=[],a=-1;for(n.push(-1);++a<o.length;){let l=o[a];n[n.length-1]=a,s.push(i.move(t.handle(l,e,t,{before:`
|
|
148
|
+
`,after:`
|
|
149
|
+
`,...i.current()}))),l.type!=="list"&&(t.bulletLastUsed=void 0),a<o.length-1&&s.push(i.move(YV(l,o[a+1],e,t)))}return n.pop(),s.join("")}function YV(e,t,r,n){let o=n.join.length;for(;o--;){let i=n.join[o](e,t,r,n);if(i===!0||i===1)break;if(typeof i=="number")return`
|
|
150
|
+
`.repeat(1+i);if(i===!1)return`
|
|
151
|
+
|
|
152
|
+
<!---->
|
|
153
|
+
|
|
154
|
+
`}return`
|
|
155
|
+
|
|
156
|
+
`}var XV=/\r?\n|\r/g;function dC(e,t){let r=[],n=0,o=0,i;for(;i=XV.exec(e);)s(e.slice(n,i.index)),r.push(i[0]),n=i.index+i[0].length,o++;return s(e.slice(n)),r.join("");function s(a){r.push(t(a,o,!a))}}function ca(e){if(!e._compiled){let t=(e.atBreak?"[\\r\\n][\\t ]*":"")+(e.before?"(?:"+e.before+")":"");e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(e.after?"(?:"+e.after+")":""),"g")}return e._compiled}function pC(e,t){return fC(e,t.inConstruct,!0)&&!fC(e,t.notInConstruct,!1)}function fC(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let n=-1;for(;++n<t.length;)if(e.includes(t[n]))return!0;return!1}function d1(e,t,r){let n=(r.before||"")+(t||"")+(r.after||""),o=[],i=[],s={},a=-1;for(;++a<e.unsafe.length;){let u=e.unsafe[a];if(!pC(e.stack,u))continue;let d=ca(u),f;for(;f=d.exec(n);){let p="before"in u||!!u.atBreak,m="after"in u,h=f.index+(p?f[1].length:0);o.includes(h)?(s[h].before&&!p&&(s[h].before=!1),s[h].after&&!m&&(s[h].after=!1)):(o.push(h),s[h]={before:p,after:m})}}o.sort(QV);let l=r.before?r.before.length:0,c=n.length-(r.after?r.after.length:0);for(a=-1;++a<o.length;){let u=o[a];u<l||u>=c||u+1<c&&o[a+1]===u+1&&s[u].after&&!s[u+1].before&&!s[u+1].after||o[a-1]===u-1&&s[u].before&&!s[u-1].before&&!s[u-1].after||(l!==u&&i.push(mC(n.slice(l,u),"\\")),l=u,/[!-/:-@[-`{-~]/.test(n.charAt(u))&&(!r.encode||!r.encode.includes(n.charAt(u)))?i.push("\\"):(i.push("&#x"+n.charCodeAt(u).toString(16).toUpperCase()+";"),l++))}return i.push(mC(n.slice(l,c),r.after)),i.join("")}function QV(e,t){return e-t}function mC(e,t){let r=/\\(?=[!-/:-@[-`{-~])/g,n=[],o=[],i=e+t,s=-1,a=0,l;for(;l=r.exec(i);)n.push(l.index);for(;++s<n.length;)a!==n[s]&&o.push(e.slice(a,n[s])),o.push("\\"),a=n[s];return o.push(e.slice(a)),o.join("")}function lo(e){let t=e||{},r=t.now||{},n=t.lineShift||0,o=r.line||1,i=r.column||1;return{move:l,current:s,shift:a};function s(){return{now:{line:o,column:i},lineShift:n}}function a(c){n+=c}function l(c){let u=c||"",d=u.split(/\r?\n|\r/g),f=d[d.length-1];return o+=d.length-1,i=d.length===1?i+f.length:1+f.length+n,u}}hC.peek=aH;function F5(){return{enter:{gfmFootnoteDefinition:JV,gfmFootnoteDefinitionLabelString:eH,gfmFootnoteCall:nH,gfmFootnoteCallString:oH},exit:{gfmFootnoteDefinition:rH,gfmFootnoteDefinitionLabelString:tH,gfmFootnoteCall:sH,gfmFootnoteCallString:iH}}}function V5(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:lH,footnoteReference:hC}}}function JV(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function eH(){this.buffer()}function tH(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Ut(this.sliceSerialize(e)).toLowerCase()}function rH(e){this.exit(e)}function nH(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function oH(){this.buffer()}function iH(e){let t=this.resume(),r=this.stack[this.stack.length-1];r.label=t,r.identifier=Ut(this.sliceSerialize(e)).toLowerCase()}function sH(e){this.exit(e)}function hC(e,t,r,n){let o=lo(n),i=o.move("[^"),s=r.enter("footnoteReference"),a=r.enter("reference");return i+=o.move(d1(r,N5(e),{...o.current(),before:i,after:"]"})),a(),s(),i+=o.move("]"),i}function aH(){return"["}function lH(e,t,r,n){let o=lo(n),i=o.move("[^"),s=r.enter("footnoteDefinition"),a=r.enter("label");return i+=o.move(d1(r,N5(e),{...o.current(),before:i,after:"]"})),a(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(dC(uC(e,r,o.current()),cH)),s(),i}function cH(e,t,r){return t===0?e:(r?"":" ")+e}function vd(e,t,r){let n=t.indexStack,o=e.children||[],i=[],s=-1,a=r.before;n.push(-1);let l=t.createTracker(r);for(;++s<o.length;){let c=o[s],u;if(n[n.length-1]=s,s+1<o.length){let d=t.handle.handlers[o[s+1].type];d&&d.peek&&(d=d.peek),u=d?d(o[s+1],e,t,{before:"",after:"",...l.current()}).charAt(0):""}else u=r.after;i.length>0&&(a==="\r"||a===`
|
|
157
|
+
`)&&c.type==="html"&&(i[i.length-1]=i[i.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=t.createTracker(r),l.move(i.join(""))),i.push(l.move(t.handle(c,e,t,{...l.current(),before:a,after:u}))),a=i[i.length-1].slice(-1)}return n.pop(),i.join("")}var uH=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];gC.peek=pH;var H5={canContainEols:["delete"],enter:{strikethrough:dH},exit:{strikethrough:fH}},$5={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:uH}],handlers:{delete:gC}};function dH(e){this.enter({type:"delete",children:[]},e)}function fH(e){this.exit(e)}function gC(e,t,r,n){let o=lo(n),i=r.enter("strikethrough"),s=o.move("~~");return s+=vd(e,r,{...o.current(),before:s,after:"~"}),s+=o.move("~~"),i(),s}function pH(){return"~"}_5.peek=mH;function _5(e,t,r){let n=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(n);)o+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++i<r.unsafe.length;){let s=r.unsafe[i],a=ca(s),l;if(s.atBreak)for(;l=a.exec(n);){let c=l.index;n.charCodeAt(c)===10&&n.charCodeAt(c-1)===13&&c--,n=n.slice(0,c)+" "+n.slice(l.index+1)}}return o+n+o}function mH(){return"`"}function hH(e){return e.length}function CC(e,t){let r=t||{},n=(r.align||[]).concat(),o=r.stringLength||hH,i=[],s=[],a=[],l=[],c=0,u=-1;for(;++u<e.length;){let h=[],g=[],v=-1;for(e[u].length>c&&(c=e[u].length);++v<e[u].length;){let C=gH(e[u][v]);if(r.alignDelimiters!==!1){let x=o(C);g[v]=x,(l[v]===void 0||x>l[v])&&(l[v]=x)}h.push(C)}s[u]=h,a[u]=g}let d=-1;if(typeof n=="object"&&"length"in n)for(;++d<c;)i[d]=vC(n[d]);else{let h=vC(n);for(;++d<c;)i[d]=h}d=-1;let f=[],p=[];for(;++d<c;){let h=i[d],g="",v="";h===99?(g=":",v=":"):h===108?g=":":h===114&&(v=":");let C=r.alignDelimiters===!1?1:Math.max(1,l[d]-g.length-v.length),x=g+"-".repeat(C)+v;r.alignDelimiters!==!1&&(C=g.length+C+v.length,C>l[d]&&(l[d]=C),p[d]=C),f[d]=x}s.splice(1,0,f),a.splice(1,0,p),u=-1;let m=[];for(;++u<s.length;){let h=s[u],g=a[u];d=-1;let v=[];for(;++d<c;){let C=h[d]||"",x="",w="";if(r.alignDelimiters!==!1){let y=l[d]-(g[d]||0),b=i[d];b===114?x=" ".repeat(y):b===99?y%2?(x=" ".repeat(y/2+.5),w=" ".repeat(y/2-.5)):(x=" ".repeat(y/2),w=x):w=" ".repeat(y)}r.delimiterStart!==!1&&!d&&v.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&C==="")&&(r.delimiterStart!==!1||d)&&v.push(" "),r.alignDelimiters!==!1&&v.push(x),v.push(C),r.alignDelimiters!==!1&&v.push(w),r.padding!==!1&&v.push(" "),(r.delimiterEnd!==!1||d!==c-1)&&v.push("|")}m.push(r.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return m.join(`
|
|
158
|
+
`)}function gH(e){return e==null?"":String(e)}function vC(e){let t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var z5={enter:{table:vH,tableData:xC,tableHeader:xC,tableRow:xH},exit:{codeText:wH,table:CH,tableData:B5,tableHeader:B5,tableRow:B5}};function vH(e){let t=e._align;this.enter({type:"table",align:t.map(r=>r==="none"?null:r),children:[]},e),this.setData("inTable",!0)}function CH(e){this.exit(e),this.setData("inTable")}function xH(e){this.enter({type:"tableRow",children:[]},e)}function B5(e){this.exit(e)}function xC(e){this.enter({type:"tableCell",children:[]},e)}function wH(e){let t=this.resume();this.getData("inTable")&&(t=t.replace(/\\([\\|])/g,bH));let r=this.stack[this.stack.length-1];r.value=t,this.exit(e)}function bH(e,t){return t==="|"?t:e}function Z5(e){let t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,o=t.stringLength,i=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
159
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:s,tableRow:a,tableCell:l,inlineCode:f}};function s(p,m,h,g){return c(u(p,h,g),p.align)}function a(p,m,h,g){let v=d(p,h,g),C=c([v]);return C.slice(0,C.indexOf(`
|
|
160
|
+
`))}function l(p,m,h,g){let v=h.enter("tableCell"),C=h.enter("phrasing"),x=vd(p,h,{...g,before:i,after:i});return C(),v(),x}function c(p,m){return CC(p,{align:m,alignDelimiters:n,padding:r,stringLength:o})}function u(p,m,h){let g=p.children,v=-1,C=[],x=m.enter("table");for(;++v<g.length;)C[v]=d(g[v],m,h);return x(),C}function d(p,m,h){let g=p.children,v=-1,C=[],x=m.enter("tableRow");for(;++v<g.length;)C[v]=l(g[v],p,m,h);return x(),C}function f(p,m,h){let g=_5(p,m,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function wC(e){let t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function bC(e){let t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function yC(e,t,r,n){let o=bC(r),i=r.bulletCurrent||wC(r);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let s=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(s=Math.ceil(s/4)*4);let a=r.createTracker(n);a.move(i+" ".repeat(s-i.length)),a.shift(s);let l=r.enter("listItem"),c=r.indentLines(r.containerFlow(e,a.current()),u);return l(),c;function u(d,f,p){return f?(p?"":" ".repeat(s))+d:(p?i:i+" ".repeat(s-i.length))+d}}var j5={exit:{taskListCheckValueChecked:SC,taskListCheckValueUnchecked:SC,paragraph:yH}},U5={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:SH}};function SC(e){let t=this.stack[this.stack.length-2];t.checked=e.type==="taskListCheckValueChecked"}function yH(e){let t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){let r=this.stack[this.stack.length-1],n=r.children[0];if(n&&n.type==="text"){let o=t.children,i=-1,s;for(;++i<o.length;){let a=o[i];if(a.type==="paragraph"){s=a;break}}s===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function SH(e,t,r,n){let o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",s="["+(e.checked?"x":" ")+"] ",a=lo(n);i&&a.move(s);let l=yC(e,t,r,{...n,...a.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+s}}function G5(){return[O5,F5(),H5,z5,j5]}function W5(e){return{extensions:[D5,V5(),$5,Z5(e),U5]}}function f1(e={}){let t=this.data();r("micromarkExtensions",sC(e)),r("fromMarkdownExtensions",G5()),r("toMarkdownExtensions",W5(e));function r(n,o){(t[n]?t[n]:t[n]=[]).push(o)}}var LC={tokenize:RH,concrete:!0},RC={tokenize:LH,partial:!0};function RH(e,t,r){let n=this,o=n.events[n.events.length-1],i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,s=0;return a;function a(C){return e.enter("mathFlow"),e.enter("mathFlowFence"),e.enter("mathFlowFenceSequence"),l(C)}function l(C){return C===36?(e.consume(C),s++,l):s<2?r(C):(e.exit("mathFlowFenceSequence"),Y(e,c,"whitespace")(C))}function c(C){return C===null||j(C)?d(C):(e.enter("mathFlowFenceMeta"),e.enter("chunkString",{contentType:"string"}),u(C))}function u(C){return C===null||j(C)?(e.exit("chunkString"),e.exit("mathFlowFenceMeta"),d(C)):C===36?r(C):(e.consume(C),u)}function d(C){return e.exit("mathFlowFence"),n.interrupt?t(C):e.attempt(RC,f,g)(C)}function f(C){return e.attempt({tokenize:v,partial:!0},g,p)(C)}function p(C){return(i?Y(e,m,"linePrefix",i+1):m)(C)}function m(C){return C===null?g(C):j(C)?e.attempt(RC,f,g)(C):(e.enter("mathFlowValue"),h(C))}function h(C){return C===null||j(C)?(e.exit("mathFlowValue"),m(C)):(e.consume(C),h)}function g(C){return e.exit("mathFlow"),t(C)}function v(C,x,w){let y=0;return Y(C,b,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function b(E){return C.enter("mathFlowFence"),C.enter("mathFlowFenceSequence"),R(E)}function R(E){return E===36?(y++,C.consume(E),R):y<s?w(E):(C.exit("mathFlowFenceSequence"),Y(C,L,"whitespace")(E))}function L(E){return E===null||j(E)?(C.exit("mathFlowFence"),x(E)):w(E)}}}function LH(e,t,r){let n=this;return o;function o(s){return s===null?t(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return n.parser.lazy[n.now().line]?r(s):t(s)}}function MC(e){let r=(e||{}).singleDollarTextMath;return r==null&&(r=!0),{tokenize:n,resolve:MH,previous:EH};function n(o,i,s){let a=this,l=0,c,u;return d;function d(g){return o.enter("mathText"),o.enter("mathTextSequence"),f(g)}function f(g){return g===36?(o.consume(g),l++,f):l<2&&!r?s(g):(o.exit("mathTextSequence"),p(g))}function p(g){return g===null?s(g):g===36?(u=o.enter("mathTextSequence"),c=0,h(g)):g===32?(o.enter("space"),o.consume(g),o.exit("space"),p):j(g)?(o.enter("lineEnding"),o.consume(g),o.exit("lineEnding"),p):(o.enter("mathTextData"),m(g))}function m(g){return g===null||g===32||g===36||j(g)?(o.exit("mathTextData"),p(g)):(o.consume(g),m)}function h(g){return g===36?(o.consume(g),c++,h):c===l?(o.exit("mathTextSequence"),o.exit("mathText"),i(g)):(u.type="mathTextData",m(g))}}}function MH(e){let t=e.length-4,r=3,n,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="mathTextData"){e[t][1].type="mathTextPadding",e[r][1].type="mathTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)o===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(o=n):(n===t||e[n][1].type==="lineEnding")&&(e[o][1].type="mathTextData",n!==o+2&&(e[o][1].end=e[n-1][1].end,e.splice(o+2,n-o-2),t-=n-o-2,n=o+2),o=void 0);return e}function EH(e){return e!==36||this.events[this.events.length-1][1].type==="characterEscape"}function q5(e){return{flow:{36:LC},text:{36:MC(e)}}}function EC(e,t){let r=String(e),n=r.indexOf(t),o=n,i=0,s=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;n!==-1;)n===o?++i>s&&(s=i):i=1,o=n+t.length,n=r.indexOf(t,o);return s}function K5(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:i},exit:{mathFlow:o,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:a,mathText:s,mathTextData:a}};function e(l){this.enter({type:"math",meta:null,value:"",data:{hName:"div",hProperties:{className:["math","math-display"]},hChildren:[{type:"text",value:""}]}},l)}function t(){this.buffer()}function r(){let l=this.resume(),c=this.stack[this.stack.length-1];c.meta=l}function n(){this.getData("mathFlowInside")||(this.buffer(),this.setData("mathFlowInside",!0))}function o(l){let c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),u=this.exit(l);u.value=c,u.data.hChildren[0].value=c,this.setData("mathFlowInside")}function i(l){this.enter({type:"inlineMath",value:"",data:{hName:"span",hProperties:{className:["math","math-inline"]},hChildren:[{type:"text",value:""}]}},l),this.buffer()}function s(l){let c=this.resume(),u=this.exit(l);u.value=c,u.data.hChildren[0].value=c}function a(l){this.config.enter.data.call(this,l),this.config.exit.data.call(this,l)}}function Y5(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=o,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
|
|
161
|
+
`,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(i,s,a,l){let c=i.value||"",u=lo(l),d="$".repeat(Math.max(EC(c,"$")+1,2)),f=a.enter("mathFlow"),p=u.move(d);if(i.meta){let m=a.enter("mathFlowMeta");p+=u.move(d1(a,i.meta,{before:p,after:`
|
|
162
|
+
`,encode:["$"],...u.current()})),m()}return p+=u.move(`
|
|
163
|
+
`),c&&(p+=u.move(c+`
|
|
164
|
+
`)),p+=u.move(d),f(),p}function n(i,s,a){let l=i.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(l);)c++;let u="$".repeat(c);/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^\$|\$$/.test(l))&&(l=" "+l+" ");let d=-1;for(;++d<a.unsafe.length;){let f=a.unsafe[d],p=ca(f),m;if(f.atBreak)for(;m=p.exec(l);){let h=m.index;l.codePointAt(h)===10&&l.codePointAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(m.index+1)}}return u+l+u}function o(){return"$"}}function p1(e={}){let t=this.data();r("micromarkExtensions",q5(e)),r("fromMarkdownExtensions",K5()),r("toMarkdownExtensions",Y5(e));function r(n,o){(t[n]?t[n]:t[n]=[]).push(o)}}import{jsx as rs}from"react/jsx-runtime";var kH=TH(aa,(e,t)=>e.children===t.children&&e.className===t.className),TC=({content:e})=>rs("div",{className:"copilotKitMarkdown",children:rs(kH,{components:AH,remarkPlugins:[f1,p1],children:e})}),AH={p({children:e}){return rs("p",{children:e})},a(e){var t=e,{children:r}=t,n=Oi(t,["children"]);return rs("a",En(Bt({style:{color:"blue",textDecoration:"underline"}},n),{target:"_blank",rel:"noopener noreferrer",children:r}))},code(e){var t=e,{children:r,className:n,inline:o}=t,i=Oi(t,["children","className","inline"]);if(r.length){if(r[0]=="\u258D")return rs("span",{style:{animation:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",marginTop:"0.25rem"},children:"\u258D"});r[0]=r[0].replace("`\u258D`","\u258D")}let s=/language-(\w+)/.exec(n||"");return o?rs("code",En(Bt({className:n},i),{children:r})):rs(Sf,Bt({language:s&&s[1]||"",value:String(r).replace(/\n$/,"")},i),Math.random())}};import IH,{useEffect as PH,useMemo as OH}from"react";import{jsx as ns,jsxs as X5}from"react/jsx-runtime";var Cd=({messages:e,inProgress:t,children:r})=>{let{chatComponentsCache:n}=Jt(),o=Tt();e=[...OH(()=>DH(o.labels.initial),[o.labels.initial]),...e];let s={};for(let c=0;c<e.length;c++)if(e[c]instanceof vt){let u=e[c].id,d=e.find(f=>f instanceof pr&&f.actionExecutionId===u);d&&(s[u]=pr.decodeResult(d.result||""))}let a=IH.useRef(null),l=()=>{a.current&&a.current.scrollIntoView({behavior:"auto"})};return PH(()=>{l()},[e]),X5("div",{className:"copilotKitMessages",children:[e.map((c,u)=>{let d=u===e.length-1;if(c instanceof Te&&c.role==="user")return ns("div",{className:"copilotKitMessage copilotKitUserMessage",children:c.content},u);if(c instanceof Te&&c.role=="assistant")return ns("div",{className:"copilotKitMessage copilotKitAssistantMessage",children:d&&t&&!c.content?o.icons.spinnerIcon:ns(TC,{content:c.content})},u);if(c instanceof vt)if(n.current!==null&&n.current[c.name]){let f=n.current[c.name];if(typeof f=="string")return d&&t?X5("div",{className:"copilotKitMessage copilotKitAssistantMessage",children:[o.icons.spinnerIcon," ",ns("span",{className:"inProgressLabel",children:f})]},u):null;{let p=c.arguments,m="inProgress";s[c.id]!==void 0?m="complete":c.status.code!==No.Pending&&(m="executing");let h=f({status:m,args:p,result:s[c.id]});return!h&&m==="complete"?null:typeof h=="string"?X5("div",{className:"copilotKitMessage copilotKitAssistantMessage",children:[d&&t&&o.icons.spinnerIcon," ",h]},u):ns("div",{className:"copilotKitCustomAssistantMessage",children:h},u)}}else return!t||!d?null:ns("div",{className:"copilotKitMessage copilotKitAssistantMessage",children:o.icons.spinnerIcon},u)}),ns("footer",{ref:a,children:r})]})};function DH(e){let t=[];return e&&(Array.isArray(e)?t.push(...e):t.push(e)),t.map(r=>new Te({role:ot.Assistant,content:r}))}import{jsx as NH,jsxs as FH}from"react/jsx-runtime";var xd=({onClick:e,inProgress:t})=>{let r=Tt();return FH("button",{onClick:e,className:"copilotKitResponseButton",children:[NH("span",{children:t?r.icons.stopIcon:r.icons.regenerateIcon}),t?r.labels.stopGenerating:r.labels.regenerateResponse]})};import AC,{useEffect as IC,useRef as kC,useState as VH}from"react";import{Fragment as HH,jsx as co,jsxs as Q5}from"react/jsx-runtime";function PC({instructions:e,onSubmitMessage:t,makeSystemMessage:r,showResponseButton:n=!0,onInProgress:o,Messages:i=Cd,Input:s=Ou,ResponseButton:a=xd,className:l,icons:c,labels:u}){let d=Jt();IC(()=>{d.setChatInstructions(e||"")},[e]);let{visibleMessages:f,isLoading:p,currentSuggestions:m,sendMessage:h,stopGeneration:g,reloadMessages:v}=BH(r,o,t),C=AC.useContext(kl),x=C?C.open:!0;return Q5($H,{icons:c,labels:u,className:l,children:[co(kh,{}),Q5(i,{messages:f,inProgress:p,children:[m.length>0&&Q5("div",{children:[co("h6",{children:"Suggested:"}),co("div",{className:"suggestions",children:m.map((w,y)=>co(zm,{title:w.title,message:w.message,partial:w.partial,className:w.className,onClick:b=>h(b)},y))})]}),n&&f.length>0&&co(a,{onClick:p?g:v,inProgress:p})]}),co(s,{inProgress:p,onSend:h,isVisible:x})]})}function $H({children:e,icons:t,labels:r,className:n}){return AC.useContext(kl)?co(HH,{children:e}):co(Jc,{icons:t,labels:r,open:!0,setOpen:()=>{},children:co("div",{className:`copilotKitChat ${n}`,children:e})})}var _H=1e3,BH=(e,t,r)=>{let{visibleMessages:n,appendMessage:o,reloadMessages:i,stopGeneration:s,isLoading:a}=cn({id:an(),makeSystemMessage:e}),[l,c]=VH([]),u=kC(null),d=kC(),f=()=>{var h;(h=u.current)==null||h.abort(),u.current=null},p=Jt();return IC(()=>(t?.(a),f(),d.current=setTimeout(()=>{!a&&Object.keys(p.chatSuggestionConfiguration).length!==0&&(u.current=new AbortController,Zm(p,p.chatSuggestionConfiguration,c,u))},l.length==0?0:_H),()=>{clearTimeout(d.current)}),[a,p.chatSuggestionConfiguration]),{visibleMessages:n,isLoading:a,currentSuggestions:l,sendMessage:h=>Tn(void 0,null,function*(){f(),c([]);let g=new Te({content:h,role:ot.User});if(o(g),r)try{yield r(h)}catch(v){console.error("Error in onSubmitMessage:",v)}return g}),stopGeneration:s,reloadMessages:i}};import zH from"react";import{jsx as J5,jsxs as ep}from"react/jsx-runtime";var OC=({instructions:e,defaultOpen:t=!1,clickOutsideToClose:r=!0,hitEscapeToClose:n=!0,onSetOpen:o,onSubmitMessage:i,shortcut:s="/",icons:a,labels:l,makeSystemMessage:c,showResponseButton:u=!0,onInProgress:d,Window:f=ym,Button:p=Bm,Header:m=_m,Messages:h=Cd,Input:g=Ou,ResponseButton:v=xd,className:C,children:x})=>{let[w,y]=zH.useState(t),b=R=>{o?.(R),y(R)};return ep(Jc,{icons:a,labels:l,open:w,setOpen:y,children:[x,ep("div",{className:C,children:[J5(p,{open:w,setOpen:b}),ep(f,{open:w,setOpen:b,clickOutsideToClose:r,shortcut:s,hitEscapeToClose:n,children:[J5(m,{open:w,setOpen:b}),J5(PC,{instructions:e,onSubmitMessage:i,makeSystemMessage:c,showResponseButton:u,onInProgress:d,Messages:h,Input:g,ResponseButton:v})]})]})]})};import{jsx as ZH}from"react/jsx-runtime";function tp(e){return e=En(Bt({},e),{className:e.className?e.className+" copilotKitPopup":"copilotKitPopup"}),ZH(OC,En(Bt({},e),{children:e.children}))}import{jsx as DC,jsxs as UH}from"react/jsx-runtime";var jH=({setOpen:e})=>{let t=Tt();return UH("button",{onClick:()=>e(),className:"copilotKitButton ","aria-label":"Open Chat",children:[DC("div",{className:"copilotKitButtonIcon copilotKitButtonIconOpen",children:t.icons.openIcon}),DC("div",{className:"copilotKitButtonIcon copilotKitButtonIconClose",children:t.icons.closeIcon})]})},NC=jH;import FC,{useEffect as bd,useMemo as KH,useState as YH}from"react";import{memo as GH}from"react";import{jsx as wd}from"react/jsx-runtime";var WH=GH(aa,(e,t)=>e.children===t.children&&e.className===t.className),rp=({content:e})=>wd("div",{className:"copilotKitMarkdown",children:wd(WH,{components:qH,remarkPlugins:[f1,p1],children:e})}),qH={p({children:e}){return wd("p",{children:e})},a({children:e,...t}){return wd("a",{style:{color:"blue",textDecoration:"underline"},...t,target:"_blank",rel:"noopener noreferrer",children:e})}};import{jsx as Vn,jsxs as np}from"react/jsx-runtime";var XH=({messages:e,inProgress:t,ResponseButton:r,messagesCallback:n,children:o})=>{let[i,s]=YH(!0),{chatComponentsCache:a}=Jt(),l=Tt();e=[...KH(()=>QH(l.labels.initial),[l.labels.initial]),...e];let u={};for(let m=0;m<e.length;m++)if(e[m]instanceof vt){let h=e[m].id,g=e.find(v=>v instanceof pr&&v.actionExecutionId===h);g&&(u[h]=pr.decodeResult(g.result||""))}let d=FC.useRef(null),f=FC.useRef(null),p=()=>{d.current&&d.current.scrollIntoView({behavior:"auto"})};return bd(()=>{p()},[e]),bd(()=>{n&&n(e)},[e]),bd(()=>{let m=document.querySelector(".copilotKitInput textarea");m&&m.addEventListener("click",function(){m.value&&document.activeElement===m?s(!1):(s(!0),p())}),m&&m.addEventListener("input",function(){m.value&&document.activeElement===m?s(!1):(s(!0),p())})},[]),bd(()=>{let m=f.current;i&&m?(m.style.maxHeight="500px",m.style.overflow="visible"):!i&&m&&(m.style.maxHeight="0",m.style.overflow="hidden")},[i]),np("div",{className:"copilotKitMessages",children:[e.map((m,h)=>{let g=h===e.length-1;if(m instanceof Te&&m.role==="user")return Vn("div",{className:"copilotKitMessage copilotKitUserMessage",children:Vn(rp,{content:m.content})},h);if(m instanceof Te&&m.role=="assistant")return Vn("div",{className:"copilotKitMessage copilotKitAssistantMessage",children:g&&t&&!m.content?l.icons.spinnerIcon:Vn(rp,{content:m.content})},h);if(m instanceof vt)if(a.current!==null&&a.current[m.name]){let v=a.current[m.name];if(typeof v=="string")return g&&t?np("div",{className:"copilotKitMessage copilotKitAssistantMessage",children:[l.icons.spinnerIcon," ",Vn("span",{className:"inProgressLabel",children:v})]},h):null;{let C=m.arguments,x="inProgress";u[m.id]!==void 0?x="complete":m.status.code!==No.Pending&&(x="executing");let w=v({status:x,args:C,result:u[m.id]});return!w&&x==="complete"?null:typeof w=="string"?np("div",{className:"copilotKitMessage copilotKitAssistantMessage",children:[g&&t&&l.icons.spinnerIcon," ",w]},h):Vn("div",{className:"copilotKitCustomAssistantMessage",children:w},h)}}else return!t||!g?null:Vn("div",{className:"copilotKitMessage copilotKitAssistantMessage",children:l.icons.spinnerIcon},h)}),Vn("div",{className:"responseButtonBox",children:r}),Vn("footer",{ref:d,children:Vn("div",{className:"copilotKitMessagesFooter",ref:f,children:o})})]})};function QH(e){let t=[];return e&&(Array.isArray(e)?t.push(...e):t.push(e)),t.map(r=>new Te({role:ot.Assistant,content:r}))}var VC=XH;import{jsx as e$,jsxs as t$}from"react/jsx-runtime";var JH=({messagesId:e})=>{let t=Tt(),{isLoading:r,reloadMessages:n,stopGeneration:o}=cn();return!r&&t$("button",{onClick:()=>r?o():n(),className:"copilotKitResponseButton",children:[r?t.labels.stopGenerating:t.labels.regenerateResponse,e$("span",{children:r?t.icons.stopIcon:t.icons.regenerateIcon})]})},HC=JH;import{jsx as op}from"react/jsx-runtime";var r$=({currentSuggestions:e})=>{let{appendMessage:t}=cn();return e?.length>0&&op("div",{className:"suggestions",children:e.map(({title:r,message:n,partial:o,className:i},s)=>op("button",{disabled:o,onClick:a=>{a.preventDefault();let l=new Te({content:n,role:ot.User});t(l)},className:i||"suggestion",children:op("span",{children:r})},n+s))})},$C=r$;import{useEffect as n$}from"react";import{jsx as uo}from"react/jsx-runtime";var _C=({start:e,history:t,addtocartHandler:r,commonRender:n,pointsExchangeCouponRender:o,gotocheckoutRender:i,gotocartRender:s,addtocartRender:a,productRender:l,signupRender:c,shulexRender:u,children:d})=>{let{setMessages:f,appendMessage:p,isLoading:m}=cn();return n$(()=>{let h=t?.filter(g=>g?.content||g?.arguments);if(h?.length>0){let g=h?.map(v=>{if(v?.name&&v?.arguments){let C=v?.arguments?.map(x=>x?{...x,ishistory:!0}:{});return new vt({name:v?.name,arguments:C,scope:v?.scope})}return new Te({...v,role:v?.role==="user"?ot.User:ot.Assistant})});f(g)}},[t]),zr({name:"go_to_checkout",description:"go to cart",parameters:[{sku:"",handle:""}],render:i||(h=>uo("div",{className:"hidden",children:JSON.stringify(h)})),handler:function(){}}),zr({name:"common_action",description:"common action",parameters:[{act:""}],render:n||(h=>uo("div",{className:"hidden",children:JSON.stringify(h)})),handler:function(){}}),zr({name:"points_exchange_coupon",description:"points exchange coupon",parameters:[{act:""}],render:o||(h=>uo("div",{className:"hidden",children:JSON.stringify(h)})),handler:function(){}}),zr({name:"go_to_cart",description:"go to cart",parameters:[{sku:"",handle:""}],render:s||(h=>uo("div",{className:"hidden",children:JSON.stringify(h)})),handler:function(){}}),zr({name:"add_to_cart",description:"add to cart",parameters:[{sku:"",handle:""}],render:a||(h=>uo("div",{className:"hidden",children:JSON.stringify(h)})),handler:function(h){r&&r(h)}}),zr({name:"show_product_card",description:"product card",parameters:[{sku:"",handle:""}],render:l||(h=>uo("div",{className:"hidden",children:JSON.stringify(h)})),handler:function(h){}}),zr({name:"signup",description:"signup",parameters:[{name:"signup"}],render:c||(h=>uo("div",{className:"hidden",children:JSON.stringify(h)})),handler:function(){}}),zr({name:"shulex",description:"shulex",parameters:[{name:"shulex"}],render:u||(h=>uo("div",{className:"hidden",children:JSON.stringify(h)})),handler:function(){}}),Tl({description:"Today's date",value:new Date().toLocaleDateString()}),uo("div",{children:d})};async function o$(e){try{let t=await e.json();return{status:e.status,statusText:e.statusText,errors:t?.data?.error||t?.data?.code||e.statusText||e.status,type:t?.data?.type,data:t?.data,message:t?.data?.message}}catch(t){console.log(t)}}var i$=async e=>{if(e.ok)try{let t=await e.json(),{errors:r}=t;return r&&r.length?{errors:r,status:e.status}:t}catch(t){console.log(t)}return await o$(e)},BC=i$;var s$=async({locale:e="en",url:t,method:r="POST",headers:n={},repeatKey:o,body:i,type:s,timeout:a=9e4})=>{let l="";s==="uploadFile"?l=i:l=i?JSON.stringify(i):"";let c=new AbortController;a&&setTimeout(()=>c.abort(),a);let u=await fetch(t,{method:r,mode:"cors",headers:{"current-language":e,...n},...a&&{signal:c.signal},...r!=="GET"&&{body:l}});return BC(u)},m1=s$;import{Fragment as u$,jsx as Hn,jsxs as d$}from"react/jsx-runtime";var l$=e=>{let{title:t,runtimeUrl:r,popup:n,shopifyDomain:o,userId:i="",account:s="",prologue:a="",locale:l="",query:c="",messagesCallback:u,showResponseButton:d,gotocheckoutRender:f,commonRender:p,shulexRender:m,pointsExchangeCouponRender:h,gotocartRender:g,addtocartRender:v,productRender:C,signupRender:x,addtocartHandler:w,style:y,className:b="",lang:R}=e,[L,E]=R?.popupTipTimeout||[3e3,6e3],[S,A]=h1(!1),[k,I]=h1(!1),[N,D]=h1(a),[F,H]=h1([]),[P,O]=h1([]),M=a$(()=>({"x-user-id":i||"","x-shopify-domain":o,"x-member-ship":s,"x-user-locale":l}),[i,o,s,l]),Z=ip(async()=>{let W=await m1({url:`${r}/copilotkit/start${c}`,method:"GET",headers:M});H(W?.suggested_questions?.map(ve=>({message:ve,title:ve}))||[]),D(W?.opening_statement||""),O(W?.history||[])},[i,o,s,l,c]),J=ip(async()=>{let W=await m1({url:`${r}/copilotkit/suggested_questions${c}`,method:"GET",headers:M});H(W?.suggested_questions?.data?.map(ve=>({message:ve,title:ve}))||[])},[i,o,s,l,c]),T=()=>{S||A(!0),setTimeout(()=>{A(!1)},E)};return zC(()=>{let W=setTimeout(()=>{T()},L);return()=>{clearTimeout(W)}},[]),Hn("div",{className:b,style:y||{},children:i&&r&&Hn(t9,{runtimeUrl:`${r}/copilotkit/chat${c}`,showDevConsole:!1,headers:M,children:Hn(tp,{...n,showResponseButton:d!=="follow",labels:{title:t||"DTC Live Chat",initial:N||""},instructions:N||"",onInProgress:W=>{k&&W&&H([]),k&&!W&&J()},Messages:({messages:W,inProgress:ve})=>Hn(VC,{messages:W,inProgress:ve,messagesCallback:u,ResponseButton:d==="follow"?Hn(HC,{messagesId:W?.[W.length-1]?.id}):void 0,children:Hn($C,{currentSuggestions:F})}),Button:({open:W,setOpen:ve})=>{let Le=n?.Button||NC;zC(()=>{I(W)},[W]);let ae=ip(()=>{ve(!W),A(!1),(!N||!P?.length)&&Z()},[N]);return d$(u$,{children:[R?.popupTip&&S&&!k&&Hn("div",{className:"copilotKitPopup copilotKitPopupTip",children:Hn("button",{onClick:ae,"aria-label":"Open Chat",className:"copilotKitPopupTipContent",children:R?.popupTip})}),Hn(Le,{open:W,setOpen:ae})]})},children:Hn(_C,{start:N,history:P,commonRender:p,shulexRender:m,pointsExchangeCouponRender:h,gotocartRender:g,gotocheckoutRender:f,addtocartRender:v,signupRender:x,productRender:C,addtocartHandler:w,productRenderTipMessage:R?.productRenderTipMessage})})})})},c$=l$;import{createContext as f$,useContext as p$}from"react";import{jsx as h$}from"react/jsx-runtime";var ZC=f$({profile:null,isLoadingProfile:!1,taskIdToTypeMapping:{},removeProfile:()=>{},openSignInPopup:()=>{},openSignUpPopup:()=>{},creditInfo:void 0,customerLoading:!1,fetchCreditInfo:e=>{},gtm:{pageGroup:""}});function m$({children:e,profile:t,removeProfile:r,isLoadingProfile:n,openSignInPopup:o,openSignUpPopup:i,taskIdToTypeMapping:s,creditInfo:a,customer:l,customerLoading:c,fetchCreditInfo:u,gtm:d}){return h$(ZC.Provider,{value:{profile:t,isLoadingProfile:n,removeProfile:r,openSignInPopup:o,openSignUpPopup:i,taskIdToTypeMapping:s,creditInfo:a,fetchCreditInfo:u,customer:l,customerLoading:c,gtm:d},children:e})}function ue(){return p$(ZC)}import g$ from"swr/mutation";var v$=async(e,{arg:{orderName:t}})=>{let r=await fetch("/api/multipass/mktsrv/v1/credit/upload_third_party_order",{credentials:"include",method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_name:t})}),{data:n}=await r.json();return console.log("data",n),{ok:n?.code===0,code:n?.code}},sp=()=>g$("/api/multipass/mktsrv/v1/credit/upload_third_party_order",v$);import{Fragment as cx,jsx as Yo,jsxs as ux}from"react/jsx-runtime";import*as dx from"react";import*as KC from"react";import*as WC from"react";import*as qC from"react-dom";import*as at from"react";import*as UC from"react";function jC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function g1(...e){return t=>{let r=!1,n=e.map(o=>{let i=jC(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){let i=n[o];typeof i=="function"?i():jC(e[o],null)}}}}function he(...e){return UC.useCallback(g1(...e),e)}import{Fragment as t3e,jsx as GC}from"react/jsx-runtime";function Kr(e){let t=C$(e),r=at.forwardRef((n,o)=>{let{children:i,...s}=n,a=at.Children.toArray(i),l=a.find(w$);if(l){let c=l.props.children,u=a.map(d=>d===l?at.Children.count(c)>1?at.Children.only(null):at.isValidElement(c)?c.props.children:null:d);return GC(t,{...s,ref:o,children:at.isValidElement(c)?at.cloneElement(c,void 0,u):null})}return GC(t,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var hr=Kr("Slot");function C$(e){let t=at.forwardRef((r,n)=>{let{children:o,...i}=r,s=at.isValidElement(o)?y$(o):void 0,a=he(s,n);if(at.isValidElement(o)){let l=b$(i,o.props);return o.type!==at.Fragment&&(l.ref=a),at.cloneElement(o,l)}return at.Children.count(o)>1?at.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var x$=Symbol("radix.slottable");function w$(e){return at.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===x$}function b$(e,t){let r={...t};for(let n in t){let o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{let l=i(...a);return o(...a),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function y$(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}import{jsx as S$}from"react/jsx-runtime";var R$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=R$.reduce((e,t)=>{let r=Kr(`Primitive.${t}`),n=WC.forwardRef((o,i)=>{let{asChild:s,...a}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S$(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function yd(e,t){e&&qC.flushSync(()=>e.dispatchEvent(t))}import{jsx as L$}from"react/jsx-runtime";var M$=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),E$="VisuallyHidden",ap=KC.forwardRef((e,t)=>L$(ee.span,{...e,ref:t,style:{...M$,...e.style}}));ap.displayName=E$;var YC=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,XC=zs,Pe=(e,t)=>r=>{var n;if(t?.variants==null)return XC(e,r?.class,r?.className);let{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{let u=r?.[c],d=i?.[c];if(u===null)return null;let f=YC(u)||YC(d);return o[c][f]}),a=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(m=>{let[h,g]=m;return Array.isArray(g)?g.includes({...i,...a}[h]):{...i,...a}[h]===g})?[...c,d,f]:c},[]);return XC(e,s,l,r?.class,r?.className)};import{jsx as ax}from"react/jsx-runtime";var fp="-",T$=e=>{let t=A$(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{let a=s.split(fp);return a[0]===""&&a.length!==1&&a.shift(),ex(a,t)||k$(s)},getConflictingClassGroupIds:(s,a)=>{let l=r[s]||[];return a&&n[s]?[...l,...n[s]]:l}}},ex=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?ex(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let i=e.join(fp);return t.validators.find(({validator:s})=>s(i))?.classGroupId},QC=/^\[(.+)\]$/,k$=e=>{if(QC.test(e)){let t=QC.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},A$=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return P$(Object.entries(e.classGroups),r).forEach(([i,s])=>{cp(s,n,i,t)}),n},cp=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let i=o===""?t:JC(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(I$(o)){cp(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([i,s])=>{cp(s,JC(t,i),r,n)})})},JC=(e,t)=>{let r=e;return t.split(fp).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},I$=e=>e.isThemeGetter,P$=(e,t)=>t?e.map(([r,n])=>{let o=n.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[r,o]}):e,O$=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,o=(i,s)=>{r.set(i,s),t++,t>e&&(t=0,n=r,r=new Map)};return{get(i){let s=r.get(i);if(s!==void 0)return s;if((s=n.get(i))!==void 0)return o(i,s),s},set(i,s){r.has(i)?r.set(i,s):o(i,s)}}},tx="!",D$=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],i=t.length,s=a=>{let l=[],c=0,u=0,d;for(let g=0;g<a.length;g++){let v=a[g];if(c===0){if(v===o&&(n||a.slice(g,g+i)===t)){l.push(a.slice(u,g)),u=g+i;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}let f=l.length===0?a:a.substring(u),p=f.startsWith(tx),m=p?f.substring(1):f,h=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}};return r?a=>r({className:a,parseClassName:s}):s},N$=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},F$=e=>({cache:O$(e.cacheSize),parseClassName:D$(e),...T$(e)}),V$=/\s+/,H$=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(V$),a="";for(let l=s.length-1;l>=0;l-=1){let c=s[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c),m=!!p,h=n(m?f.substring(0,p):f);if(!h){if(!m){a=c+(a.length>0?" "+a:a);continue}if(h=n(f),!h){a=c+(a.length>0?" "+a:a);continue}m=!1}let g=N$(u).join(":"),v=d?g+tx:g,C=v+h;if(i.includes(C))continue;i.push(C);let x=o(h,m);for(let w=0;w<x.length;++w){let y=x[w];i.push(v+y)}a=c+(a.length>0?" "+a:a)}return a};function $$(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=rx(t))&&(n&&(n+=" "),n+=r);return n}var rx=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=rx(e[n]))&&(r&&(r+=" "),r+=t);return r};function up(e,...t){let r,n,o,i=s;function s(l){let c=t.reduce((u,d)=>d(u),e());return r=F$(c),n=r.cache.get,o=r.cache.set,i=a,a(l)}function a(l){let c=n(l);if(c)return c;let u=H$(l,r);return o(l,u),u}return function(){return i($$.apply(null,arguments))}}var He=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},nx=/^\[(?:([a-z-]+):)?(.+)\]$/i,_$=/^\d+\/\d+$/,B$=new Set(["px","full","screen"]),z$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Z$=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,j$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,U$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,G$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fo=e=>ua(e)||B$.has(e)||_$.test(e),qo=e=>da(e,"length",e_),ua=e=>!!e&&!Number.isNaN(Number(e)),lp=e=>da(e,"number",ua),v1=e=>!!e&&Number.isInteger(Number(e)),W$=e=>e.endsWith("%")&&ua(e.slice(0,-1)),de=e=>nx.test(e),Ko=e=>z$.test(e),q$=new Set(["length","size","percentage"]),K$=e=>da(e,q$,ox),Y$=e=>da(e,"position",ox),X$=new Set(["image","url"]),Q$=e=>da(e,X$,r_),J$=e=>da(e,"",t_),C1=()=>!0,da=(e,t,r)=>{let n=nx.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},e_=e=>Z$.test(e)&&!j$.test(e),ox=()=>!1,t_=e=>U$.test(e),r_=e=>G$.test(e);var dp=()=>{let e=He("colors"),t=He("spacing"),r=He("blur"),n=He("brightness"),o=He("borderColor"),i=He("borderRadius"),s=He("borderSpacing"),a=He("borderWidth"),l=He("contrast"),c=He("grayscale"),u=He("hueRotate"),d=He("invert"),f=He("gap"),p=He("gradientColorStops"),m=He("gradientColorStopPositions"),h=He("inset"),g=He("margin"),v=He("opacity"),C=He("padding"),x=He("saturate"),w=He("scale"),y=He("sepia"),b=He("skew"),R=He("space"),L=He("translate"),E=()=>["auto","contain","none"],S=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",de,t],k=()=>[de,t],I=()=>["",fo,qo],N=()=>["auto",ua,de],D=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],H=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",de],M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Z=()=>[ua,de];return{cacheSize:500,separator:":",theme:{colors:[C1],spacing:[fo,qo],blur:["none","",Ko,de],brightness:Z(),borderColor:[e],borderRadius:["none","","full",Ko,de],borderSpacing:k(),borderWidth:I(),contrast:Z(),grayscale:O(),hueRotate:Z(),invert:O(),gap:k(),gradientColorStops:[e],gradientColorStopPositions:[W$,qo],inset:A(),margin:A(),opacity:Z(),padding:k(),saturate:Z(),scale:Z(),sepia:O(),skew:Z(),space:k(),translate:k()},classGroups:{aspect:[{aspect:["auto","square","video",de]}],container:["container"],columns:[{columns:[Ko]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...D(),de]}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",v1,de]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",de]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",v1,de]}],"grid-cols":[{"grid-cols":[C1]}],"col-start-end":[{col:["auto",{span:["full",v1,de]},de]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[C1]}],"row-start-end":[{row:["auto",{span:[v1,de]},de]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",de]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",de]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",de,t]}],"min-w":[{"min-w":[de,t,"min","max","fit"]}],"max-w":[{"max-w":[de,t,"none","full","min","max","fit","prose",{screen:[Ko]},Ko]}],h:[{h:[de,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[de,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[de,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[de,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ko,qo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",lp]}],"font-family":[{font:[C1]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",de]}],"line-clamp":[{"line-clamp":["none",ua,lp]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",fo,de]}],"list-image":[{"list-image":["none",de]}],"list-style-type":[{list:["none","disc","decimal",de]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",fo,qo]}],"underline-offset":[{"underline-offset":["auto",fo,de]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",de]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",de]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...D(),Y$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",K$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Q$]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[fo,de]}],"outline-w":[{outline:[fo,qo]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[fo,qo]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ko,J$]}],"shadow-color":[{shadow:[C1]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...H(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":H()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ko,de]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",de]}],duration:[{duration:Z()}],ease:[{ease:["linear","in","out","in-out",de]}],delay:[{delay:Z()}],animate:[{animate:["none","spin","ping","pulse","bounce",de]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[v1,de]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",de]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",de]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",de]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[fo,qo,lp]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},n_=(e,{cacheSize:t,prefix:r,separator:n,experimentalParseClassName:o,extend:i={},override:s={}})=>{x1(e,"cacheSize",t),x1(e,"prefix",r),x1(e,"separator",n),x1(e,"experimentalParseClassName",o);for(let a in s)o_(e[a],s[a]);for(let a in i)i_(e[a],i[a]);return e},x1=(e,t,r)=>{r!==void 0&&(e[t]=r)},o_=(e,t)=>{if(t)for(let r in t)x1(e,r,t[r])},i_=(e,t)=>{if(t)for(let r in t){let n=t[r];n!==void 0&&(e[r]=(e[r]||[]).concat(n))}},ix=(e,...t)=>typeof e=="function"?up(dp,e,...t):up(()=>n_(dp(),e),...t),sx=up(dp);var s_=ix({extend:{theme:{borderRadius:["btn"]},classGroups:{"font-size":["text-heading-1","text-heading-2","text-heading-3","text-heading-4","text-heading-5","text-text-3","text-text-2","text-text-1"],"text-color":["text-info-primary","text-info-secondary","text-info-tertiary","text-info-quaternary","text-info-white"],leading:["leading-tight","leading-normal","leading-loose"]}}});function B(...e){return s_(zs(e))}var a_=e=>ax("svg",{fill:"none",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",width:"1rem",className:B("animate-spin",e.className),children:ax("path",{d:"M1 10C1 14.9706 5.02944 19 10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1",strokeWidth:"2",strokeLinecap:"round"})}),lx=a_;var l_={sm:{width:"16",height:"16"},base:{width:"18",height:"18"},lg:{width:"20",height:"20"}},c_=({size:e="base",...t})=>{let{width:r,height:n}=l_[e];return Yo("svg",{width:r,height:n,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t,children:Yo("path",{d:"M7.5 5L12.5 10L7.5 15",stroke:"currentColor",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})})},u_=Pe("rounded-btn inline-flex cursor-pointer items-center justify-center text-sm font-bold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none",{variants:{variant:{primary:"bg-btn-primary text-btn-primary-foreground hover:bg-btn-primary-active hover:text-btn-primary-active-foreground hover:bg-gradient-brand border-none ",secondary:"bg-btn-secondary outline-btn-primary text-btn-secondary-foreground hover:bg-btn-secondary-active hover:text-btn-secondary-active-foreground border-solid outline outline-[1.6px] outline-offset-[-1.6px]",link:"text-info-primary hover:text-btn-primary-active border-none",ghost:"text-info-primary hover:bg-btn-primary hover:text-btn-primary-foreground"},size:{sm:"px-3 py-2 text-[12px] leading-tight",base:"px-5 pb-[10px] pt-[11px] text-[14px] leading-tight",lg:"lg-desktop:px-7 lg-desktop:pb-[14px] lg-desktop:pt-[15px] lg-desktop:text-[16px] px-5 pb-[10px] pt-[11px] text-[14px] leading-tight",icon:"size-10 rounded-full leading-tight"},hoverEffect:{none:"",slide:""},state:{default:"",disabled:"",loading:""}},compoundVariants:[{variant:"primary",hoverEffect:"slide",class:'before:rounded-btn hover:!bg-btn-primary before:bg-btn-primary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[""] hover:before:translate-x-0'},{variant:"secondary",hoverEffect:"slide",class:'before:rounded-btn hover:!bg-btn-secondary before:bg-btn-secondary-active relative z-[1] overflow-hidden before:absolute before:inset-y-0 before:-z-[1] before:w-full before:-translate-x-full before:transition-transform before:duration-300 before:ease-in-out before:content-[""] hover:before:translate-x-0'},{variant:"primary",state:"loading",class:"bg-btn-primary-active disabled:border-btn-primary-disabled-border"},{variant:"secondary",state:"loading",class:"bg-btn-secondary disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-primary-disabled"},{variant:"primary",state:"disabled",class:"disabled:bg-btn-primary-disabled disabled:text-btn-primary-disabled-foreground disabled:border-btn-primary-disabled"},{variant:"secondary",state:"disabled",class:"disabled:bg-btn-secondary-disabled disabled:text-btn-secondary-disabled-foreground disabled:border-btn-secondary-disabled-border"},{variant:"link",state:"disabled",class:"disabled:text-info-quaternary"}],defaultVariants:{variant:"primary",size:"lg",hoverEffect:"none",state:"default"}}),d_=Pe("",{variants:{variant:{primary:"stroke-btn-primary-foreground",secondary:"stroke-btn-secondary-foreground",link:"stroke-primary",ghost:"stroke-primary"}},defaultVariants:{variant:"primary"}}),fx=dx.forwardRef(({asChild:e=!1,as:t="button",href:r,size:n="lg",children:o,variant:i,hoverEffect:s="none",className:a,disabled:l=!1,loading:c=!1,spinner:u,iconClassName:d,...f},p)=>Yo(t,{disabled:l||c,className:B(u_({variant:i,size:n,hoverEffect:s,state:c?"loading":l?"disabled":"default"}),a),ref:p,...t==="a"?{href:r}:{},...f,children:c?ux(cx,{children:[Yo("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0,children:o}),Yo("span",{className:"absolute",children:u||Yo(lx,{className:d_({variant:i})})}),Yo(ap,{children:o})]}):ux(cx,{children:[o,i==="link"&&n&&n!=="icon"&&Yo(c_,{className:d,size:n})]})}));fx.displayName="Button";var Oe=fx;import{jsx as k3e}from"react/jsx-runtime";import"react";var O3e=Pe("text-brand-0 outline-brand-0 inline-flex items-center justify-center rounded-[16px] border-none text-xs font-bold outline outline-[1.6px] outline-offset-[-1.6px] backdrop-blur-sm transition-colors focus:outline-none",{variants:{size:{sm:"h-[24px] px-[6px] pb-[3px] pt-[4px] text-[14px] leading-tight",lg:"lg-desktop:px-[8px] lg-desktop:pb-[4px] lg-desktop:pt-[5px] lg-desktop:text-[16px] lg-desktop:h-[28px] h-[24px] px-[6px] pb-[3px] pt-[4px] text-[14px] leading-tight"}},defaultVariants:{size:"lg"}});import{jsx as pp,jsxs as f_}from"react/jsx-runtime";import*as w1 from"react";var px=Pe("border-input text-info-primary bg-background flex w-full flex-row items-center overflow-hidden rounded-md border focus-visible:outline-none",{variants:{size:{sm:"h-8 text-sm",base:"h-10",lg:"h-12 text-lg"}},defaultVariants:{size:"base"}}),mx=w1.forwardRef((e,t)=>{let{className:r,side:n="right",children:o,...i}=e;return pp("div",{ref:t,...i,className:B("flex h-full items-center",r,{"-order-1":n==="left","order-2":n==="right"}),children:o})}),hx=w1.forwardRef(({className:e,type:t,size:r,children:n,...o},i)=>w1.isValidElement(n)?f_("div",{className:B(px({size:r}),e),children:[pp("input",{type:t,className:B("placeholder:text-muted-foreground flex size-full px-3 file:border-0 file:bg-transparent file:font-medium focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"),ref:i,...o}),n]}):pp("input",{type:t,className:B(px({size:r}),"px-3",e),ref:i,...o}));hx.displayName="Input",mx.displayName="InputSlot";import{jsx as vp}from"react/jsx-runtime";import*as Px from"react";import*as rr from"react";import*as Yr from"react";import{jsx as gx}from"react/jsx-runtime";function vx(e,t){let r=Yr.createContext(t),n=i=>{let{children:s,...a}=i,l=Yr.useMemo(()=>a,Object.values(a));return gx(r.Provider,{value:l,children:s})};n.displayName=e+"Provider";function o(i){let s=Yr.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[n,o]}function ze(e,t=[]){let r=[];function n(i,s){let a=Yr.createContext(s),l=r.length;r=[...r,s];let c=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||a,g=Yr.useMemo(()=>m,Object.values(m));return gx(h.Provider,{value:g,children:p})};c.displayName=i+"Provider";function u(d,f){let p=f?.[e]?.[l]||a,m=Yr.useContext(p);if(m)return m;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[c,u]}let o=()=>{let i=r.map(s=>Yr.createContext(s));return function(a){let l=a?.[e]||i;return Yr.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,p_(o,...t)]}function p_(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){let s=n.reduce((a,{useScope:l,scopeName:c})=>{let d=l(i)[`__scope${c}`];return{...a,...d}},{});return Yr.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function q(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}import*as Xr from"react";import*as Cx from"react";var bt=globalThis?.document?Cx.useLayoutEffect:()=>{};import*as Sd from"react";var m_=Xr[" useInsertionEffect ".trim().toString()]||bt;function gr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,i,s]=h_({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{let u=Xr.useRef(e!==void 0);Xr.useEffect(()=>{let d=u.current;d!==a&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}let c=Xr.useCallback(u=>{if(a){let d=g_(u)?u(e):u;d!==e&&s.current?.(d)}else i(u)},[a,e,i,s]);return[l,c]}function h_({defaultProp:e,onChange:t}){let[r,n]=Xr.useState(e),o=Xr.useRef(r),i=Xr.useRef(t);return m_(()=>{i.current=t},[t]),Xr.useEffect(()=>{o.current!==r&&(i.current?.(r),o.current=r)},[r,o]),[r,n,i]}function g_(e){return typeof e=="function"}var j3e=Symbol("RADIX:SYNC_STATE");import*as Rd from"react";function Ld(e){let t=Rd.useRef({value:e,previous:e});return Rd.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}import*as xx from"react";function fa(e){let[t,r]=xx.useState(void 0);return bt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let i=o[0],s,a;if("borderBoxSize"in i){let l=i.borderBoxSize,c=Array.isArray(l)?l[0]:l;s=c.inlineSize,a=c.blockSize}else s=e.offsetWidth,a=e.offsetHeight;r({width:s,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}import*as vr from"react";import*as wx from"react";function v_(e,t){return wx.useReducer((r,n)=>t[r][n]??r,e)}var ft=e=>{let{present:t,children:r}=e,n=C_(t),o=typeof r=="function"?r({present:n.isPresent}):vr.Children.only(r),i=he(n.ref,x_(o));return typeof r=="function"||n.isPresent?vr.cloneElement(o,{ref:i}):null};ft.displayName="Presence";function C_(e){let[t,r]=vr.useState(),n=vr.useRef(null),o=vr.useRef(e),i=vr.useRef("none"),s=e?"mounted":"unmounted",[a,l]=v_(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return vr.useEffect(()=>{let c=Md(n.current);i.current=a==="mounted"?c:"none"},[a]),bt(()=>{let c=n.current,u=o.current;if(u!==e){let f=i.current,p=Md(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),bt(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=Md(n.current).includes(p.animationName);if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(i.current=Md(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:vr.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function Md(e){return e?.animationName||"none"}function x_(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}import{Fragment as w_,jsx as Xo,jsxs as b_}from"react/jsx-runtime";var Ed="Checkbox",[y_,a7e]=ze(Ed),[S_,mp]=y_(Ed);function R_(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=gr({prop:r,defaultProp:o??!1,onChange:l,caller:Ed}),[m,h]=rr.useState(null),[g,v]=rr.useState(null),C=rr.useRef(!1),x=m?!!s||!!m.closest("form"):!0,w={checked:f,disabled:i,setChecked:p,control:m,setControl:h,name:a,form:s,value:u,hasConsumerStoppedPropagationRef:C,required:c,defaultChecked:Qo(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:v};return Xo(S_,{scope:t,...w,children:L_(d)?d(w):n})}var bx="CheckboxTrigger",yx=rr.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:i,value:s,disabled:a,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=mp(bx,e),h=he(o,u),g=rr.useRef(l);return rr.useEffect(()=>{let v=i?.form;if(v){let C=()=>d(g.current);return v.addEventListener("reset",C),()=>v.removeEventListener("reset",C)}},[i,d]),Xo(ee.button,{type:"button",role:"checkbox","aria-checked":Qo(l)?"mixed":l,"aria-required":c,"data-state":Mx(l),"data-disabled":a?"":void 0,disabled:a,value:s,...n,ref:h,onKeyDown:q(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:q(r,v=>{d(C=>Qo(C)?!0:!C),m&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});yx.displayName=bx;var hp=rr.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:s,disabled:a,value:l,onCheckedChange:c,form:u,...d}=e;return Xo(R_,{__scopeCheckbox:r,checked:o,defaultChecked:i,disabled:a,required:s,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>b_(w_,{children:[Xo(yx,{...d,ref:t,__scopeCheckbox:r}),f&&Xo(Lx,{__scopeCheckbox:r})]})})});hp.displayName=Ed;var Sx="CheckboxIndicator",gp=rr.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,i=mp(Sx,r);return Xo(ft,{present:n||Qo(i.checked)||i.checked===!0,children:Xo(ee.span,{"data-state":Mx(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});gp.displayName=Sx;var Rx="CheckboxBubbleInput",Lx=rr.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:s,required:a,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=mp(Rx,e),m=he(r,p),h=Ld(i),g=fa(n);rr.useEffect(()=>{let C=f;if(!C)return;let x=window.HTMLInputElement.prototype,y=Object.getOwnPropertyDescriptor(x,"checked").set,b=!o.current;if(h!==i&&y){let R=new Event("click",{bubbles:b});C.indeterminate=Qo(i),y.call(C,Qo(i)?!1:i),C.dispatchEvent(R)}},[f,h,i,o]);let v=rr.useRef(Qo(i)?!1:i);return Xo(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:a,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Lx.displayName=Rx;function L_(e){return typeof e=="function"}function Qo(e){return e==="indeterminate"}function Mx(e){return Qo(e)?"indeterminate":e?"checked":"unchecked"}import{forwardRef as pa,createElement as Qr}from"react";function ma(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,i;for(i=0;i<n.length;i++)o=n[i],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}var E_=["color"],ha=pa(function(e,t){var r=e.color,n=r===void 0?"currentColor":r,o=ma(e,E_);return Qr("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),Qr("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});var T_=["color"],Ex=pa(function(e,t){var r=e.color,n=r===void 0?"currentColor":r,o=ma(e,T_);return Qr("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),Qr("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});var k_=["color"],Tx=pa(function(e,t){var r=e.color,n=r===void 0?"currentColor":r,o=ma(e,k_);return Qr("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),Qr("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});var A_=["color"],kx=pa(function(e,t){var r=e.color,n=r===void 0?"currentColor":r,o=ma(e,A_);return Qr("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),Qr("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});var I_=["color"],Ax=pa(function(e,t){var r=e.color,n=r===void 0?"currentColor":r,o=ma(e,I_);return Qr("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),Qr("path",{d:"M2.25 7.5C2.25 7.22386 2.47386 7 2.75 7H12.25C12.5261 7 12.75 7.22386 12.75 7.5C12.75 7.77614 12.5261 8 12.25 8H2.75C2.47386 8 2.25 7.77614 2.25 7.5Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});var P_=["color"],Ix=pa(function(e,t){var r=e.color,n=r===void 0?"currentColor":r,o=ma(e,P_);return Qr("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o,{ref:t}),Qr("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:n,fillRule:"evenodd",clipRule:"evenodd"}))});var O_=Pe("border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground disabled:bg-btn-primary-disabled peer shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"size-[14px]",base:"size-4",lg:"size-5"}},defaultVariants:{size:"base"}}),D_=Px.forwardRef(({className:e,size:t,...r},n)=>vp(hp,{ref:n,className:B(O_({size:t}),e),...r,children:vp(gp,{className:B("flex size-full items-center justify-center text-current"),children:vp(ha,{})})}));D_.displayName="Checkbox";import{jsx as N_}from"react/jsx-runtime";import*as b1 from"react";var F_=b1.forwardRef((e,t)=>{let{children:r,className:n,loading:o=!0,...i}=e;if(!o)return r;let s=b1.isValidElement(r)?hr:"span";return N_(s,{ref:t,className:B(`bg-skeleton !pointer-events-none animate-pulse !cursor-default !select-none !border-none !bg-none !decoration-clone
|
|
165
|
+
!bg-clip-border !text-transparent !shadow-none !outline-none before:!invisible after:!invisible
|
|
166
|
+
empty:block data-[inline-skeleton=true]:leading-[0] [&>*]:!invisible
|
|
167
|
+
`,n),"data-inline-skeleton":b1.isValidElement(r)?void 0:!0,tabIndex:-1,...i,children:r})});F_.displayName="Skeleton";import{jsx as ei,jsxs as kp}from"react/jsx-runtime";import*as R1 from"react";import*as Fe from"react";import*as Cp from"react";var V_=Cp[" useId ".trim().toString()]||(()=>{}),H_=0;function qt(e){let[t,r]=Cp.useState(V_());return bt(()=>{e||r(n=>n??String(H_++))},[e]),e||(t?`radix-${t}`:"")}import*as We from"react";import*as ga from"react";function yt(e){let t=ga.useRef(e);return ga.useEffect(()=>{t.current=e}),ga.useMemo(()=>(...r)=>t.current?.(...r),[])}import*as Ox from"react";function Dx(e,t=globalThis?.document){let r=yt(e);Ox.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}import{jsx as Vx}from"react/jsx-runtime";var $_="DismissableLayer",xp="dismissableLayer.update",__="dismissableLayer.pointerDownOutside",B_="dismissableLayer.focusOutside",Nx,Hx=We.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),os=We.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,c=We.useContext(Hx),[u,d]=We.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=We.useState({}),m=he(t,R=>d(R)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),C=u?h.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,w=C>=v,y=j_(R=>{let L=R.target,E=[...c.branches].some(S=>S.contains(L));!w||E||(o?.(R),s?.(R),R.defaultPrevented||a?.())},f),b=U_(R=>{let L=R.target;[...c.branches].some(S=>S.contains(L))||(i?.(R),s?.(R),R.defaultPrevented||a?.())},f);return Dx(R=>{C===c.layers.size-1&&(n?.(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},f),We.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Nx=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Fx(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Nx)}},[u,f,r,c]),We.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Fx())},[u,c]),We.useEffect(()=>{let R=()=>p({});return document.addEventListener(xp,R),()=>document.removeEventListener(xp,R)},[]),Vx(ee.div,{...l,ref:m,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:q(e.onFocusCapture,b.onFocusCapture),onBlurCapture:q(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,y.onPointerDownCapture)})});os.displayName=$_;var z_="DismissableLayerBranch",Z_=We.forwardRef((e,t)=>{let r=We.useContext(Hx),n=We.useRef(null),o=he(t,n);return We.useEffect(()=>{let i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),Vx(ee.div,{...e,ref:o})});Z_.displayName=z_;function j_(e,t=globalThis?.document){let r=yt(e),n=We.useRef(!1),o=We.useRef(()=>{});return We.useEffect(()=>{let i=a=>{if(a.target&&!n.current){let c=function(){$x(__,r,u,{discrete:!0})};var l=c;let u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function U_(e,t=globalThis?.document){let r=yt(e),n=We.useRef(!1);return We.useEffect(()=>{let o=i=>{i.target&&!n.current&&$x(B_,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Fx(){let e=new CustomEvent(xp);document.dispatchEvent(e)}function $x(e,t,r,{discrete:n}){let o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?yd(o,i):o.dispatchEvent(i)}import*as Jr from"react";import{jsx as G_}from"react/jsx-runtime";var wp="focusScope.autoFocusOnMount",bp="focusScope.autoFocusOnUnmount",_x={bubbles:!1,cancelable:!0},W_="FocusScope",is=Jr.forwardRef((e,t)=>{let{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=Jr.useState(null),c=yt(o),u=yt(i),d=Jr.useRef(null),f=he(t,h=>l(h)),p=Jr.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Jr.useEffect(()=>{if(n){let C=function(b){if(p.paused||!a)return;let R=b.target;a.contains(R)?d.current=R:Jo(d.current,{select:!0})},x=function(b){if(p.paused||!a)return;let R=b.relatedTarget;R!==null&&(a.contains(R)||Jo(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(let L of b)L.removedNodes.length>0&&Jo(a)};var h=C,g=x,v=w;document.addEventListener("focusin",C),document.addEventListener("focusout",x);let y=new MutationObserver(w);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",x),y.disconnect()}}},[n,a,p.paused]),Jr.useEffect(()=>{if(a){zx.add(p);let h=document.activeElement;if(!a.contains(h)){let v=new CustomEvent(wp,_x);a.addEventListener(wp,c),a.dispatchEvent(v),v.defaultPrevented||(q_(J_(jx(a)),{select:!0}),document.activeElement===h&&Jo(a))}return()=>{a.removeEventListener(wp,c),setTimeout(()=>{let v=new CustomEvent(bp,_x);a.addEventListener(bp,u),a.dispatchEvent(v),v.defaultPrevented||Jo(h??document.body,{select:!0}),a.removeEventListener(bp,u),zx.remove(p)},0)}}},[a,c,u,p]);let m=Jr.useCallback(h=>{if(!r&&!n||p.paused)return;let g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,v=document.activeElement;if(g&&v){let C=h.currentTarget,[x,w]=K_(C);x&&w?!h.shiftKey&&v===w?(h.preventDefault(),r&&Jo(x,{select:!0})):h.shiftKey&&v===x&&(h.preventDefault(),r&&Jo(w,{select:!0})):v===C&&h.preventDefault()}},[r,n,p.paused]);return G_(ee.div,{tabIndex:-1,...s,ref:f,onKeyDown:m})});is.displayName=W_;function q_(e,{select:t=!1}={}){let r=document.activeElement;for(let n of e)if(Jo(n,{select:t}),document.activeElement!==r)return}function K_(e){let t=jx(e),r=Bx(t,e),n=Bx(t.reverse(),e);return[r,n]}function jx(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Bx(e,t){for(let r of e)if(!Y_(r,{upTo:t}))return r}function Y_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function X_(e){return e instanceof HTMLInputElement&&"select"in e}function Jo(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&X_(e)&&t&&e.select()}}var zx=Q_();function Q_(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=Zx(e,t),e.unshift(t)},remove(t){e=Zx(e,t),e[0]?.resume()}}}function Zx(e,t){let r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function J_(e){return e.filter(t=>t.tagName!=="A")}import*as Td from"react";import eB from"react-dom";import{jsx as tB}from"react/jsx-runtime";var rB="Portal",ss=Td.forwardRef((e,t)=>{let{container:r,...n}=e,[o,i]=Td.useState(!1);bt(()=>i(!0),[]);let s=r||o&&globalThis?.document?.body;return s?eB.createPortal(tB(ee.div,{...n,ref:t}),s):null});ss.displayName=rB;import*as Gx from"react";var yp=0;function va(){Gx.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ux()),document.body.insertAdjacentElement("beforeend",e[1]??Ux()),yp++,()=>{yp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),yp--}},[])}function Ux(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}import{RemoveScroll as nB}from"react-remove-scroll";import{hideOthers as oB}from"aria-hidden";import{Fragment as Wx,jsx as et,jsxs as qx}from"react/jsx-runtime";var Ad="Dialog",[Kx,n4e]=ze(Ad),[iB,hn]=Kx(Ad),Yx=e=>{let{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=Fe.useRef(null),l=Fe.useRef(null),[c,u]=gr({prop:n,defaultProp:o??!1,onChange:i,caller:Ad});return et(iB,{scope:t,triggerRef:a,contentRef:l,contentId:qt(),titleId:qt(),descriptionId:qt(),open:c,onOpenChange:u,onOpenToggle:Fe.useCallback(()=>u(d=>!d),[u]),modal:s,children:r})};Yx.displayName=Ad;var Xx="DialogTrigger",sB=Fe.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=hn(Xx,r),i=he(t,o.triggerRef);return et(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Lp(o.open),...n,ref:i,onClick:q(e.onClick,o.onOpenToggle)})});sB.displayName=Xx;var Sp="DialogPortal",[aB,Qx]=Kx(Sp,{forceMount:void 0}),Jx=e=>{let{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=hn(Sp,t);return et(aB,{scope:t,forceMount:r,children:Fe.Children.map(n,s=>et(ft,{present:r||i.open,children:et(ss,{asChild:!0,container:o,children:s})}))})};Jx.displayName=Sp;var kd="DialogOverlay",ew=Fe.forwardRef((e,t)=>{let r=Qx(kd,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=hn(kd,e.__scopeDialog);return i.modal?et(ft,{present:n||i.open,children:et(cB,{...o,ref:t})}):null});ew.displayName=kd;var lB=Kr("DialogOverlay.RemoveScroll"),cB=Fe.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=hn(kd,r);return et(nB,{as:lB,allowPinchZoom:!0,shards:[o.contentRef],children:et(ee.div,{"data-state":Lp(o.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),as="DialogContent",tw=Fe.forwardRef((e,t)=>{let r=Qx(as,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=hn(as,e.__scopeDialog);return et(ft,{present:n||i.open,children:i.modal?et(uB,{...o,ref:t}):et(dB,{...o,ref:t})})});tw.displayName=as;var uB=Fe.forwardRef((e,t)=>{let r=hn(as,e.__scopeDialog),n=Fe.useRef(null),o=he(t,r.contentRef,n);return Fe.useEffect(()=>{let i=n.current;if(i)return oB(i)},[]),et(rw,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,i=>{i.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:q(e.onFocusOutside,i=>i.preventDefault())})}),dB=Fe.forwardRef((e,t)=>{let r=hn(as,e.__scopeDialog),n=Fe.useRef(!1),o=Fe.useRef(!1);return et(rw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(n.current||r.triggerRef.current?.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let s=i.target;r.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),rw=Fe.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=hn(as,r),l=Fe.useRef(null),c=he(t,l);return va(),qx(Wx,{children:[et(is,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:et(os,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Lp(a.open),...s,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),qx(Wx,{children:[et(fB,{titleId:a.titleId}),et(mB,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Rp="DialogTitle",nw=Fe.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=hn(Rp,r);return et(ee.h2,{id:o.titleId,...n,ref:t})});nw.displayName=Rp;var ow="DialogDescription",iw=Fe.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=hn(ow,r);return et(ee.p,{id:o.descriptionId,...n,ref:t})});iw.displayName=ow;var sw="DialogClose",aw=Fe.forwardRef((e,t)=>{let{__scopeDialog:r,...n}=e,o=hn(sw,r);return et(ee.button,{type:"button",...n,ref:t,onClick:q(e.onClick,()=>o.onOpenChange(!1))})});aw.displayName=sw;function Lp(e){return e?"open":"closed"}var lw="DialogTitleWarning",[o4e,cw]=vx(lw,{contentName:as,titleName:Rp,docsSlug:"dialog"}),fB=({titleId:e})=>{let t=cw(lw),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
168
|
+
|
|
169
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
170
|
+
|
|
171
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Fe.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},pB="DialogDescriptionWarning",mB=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cw(pB).contentName}}.`;return Fe.useEffect(()=>{let o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Mp=Yx;var Ep=Jx,y1=ew,S1=tw,Id=nw,Pd=iw,Tp=aw;var dw=Mp;dw.displayName="Dialog";var fw=Ep;var Ap=R1.forwardRef(({className:e,...t},r)=>ei(y1,{ref:r,className:B("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-[100] bg-black/80",e),...t}));Ap.displayName=y1.displayName;var pw=R1.forwardRef(({className:e,children:t,...r},n)=>kp(fw,{children:[ei(Ap,{}),kp(S1,{ref:n,className:B("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] tablet:rounded-lg fixed left-1/2 top-1/2 z-[100] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border p-6 shadow-lg duration-200",e),...r,children:[t,kp(Tp,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:[ei(kx,{className:"size-4"}),ei("span",{className:"sr-only",children:"Close"})]})]})]}));pw.displayName=S1.displayName;var mw=({className:e,...t})=>ei("div",{className:B("tablet:text-left flex flex-col space-y-1.5 text-center",e),...t});mw.displayName="DialogHeader";var hw=({className:e,...t})=>ei("div",{className:B("tablet:flex-row tablet:justify-end tablet:space-x-2 flex flex-col-reverse",e),...t});hw.displayName="DialogFooter";var gw=R1.forwardRef(({className:e,...t},r)=>ei(Id,{ref:r,className:B("text-lg font-semibold leading-none tracking-tight",e),...t}));gw.displayName=Id.displayName;var vw=R1.forwardRef(({className:e,...t},r)=>ei(Pd,{ref:r,className:B("text-muted-foreground text-sm",e),...t}));vw.displayName=Pd.displayName;import{jsx as Bw}from"react/jsx-runtime";import*as zw from"react";import*as Ze from"react";import*as kr from"react";import*as xw from"react";import{jsx as Cw}from"react/jsx-runtime";var gB="Arrow",ww=xw.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...i}=e;return Cw(ee.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:Cw("polygon",{points:"0,0 30,0 15,10"})})});ww.displayName=gB;var bw=ww;import{jsx as ls}from"react/jsx-runtime";var Ip="Popper",[yw,Ca]=ze(Ip),[CB,Sw]=yw(Ip),Rw=e=>{let{__scopePopper:t,children:r}=e,[n,o]=kr.useState(null);return ls(CB,{scope:t,anchor:n,onAnchorChange:o,children:r})};Rw.displayName=Ip;var Lw="PopperAnchor",Mw=kr.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,i=Sw(Lw,r),s=kr.useRef(null),a=he(t,s);return kr.useEffect(()=>{i.onAnchorChange(n?.current||s.current)}),n?null:ls(ee.div,{...o,ref:a})});Mw.displayName=Lw;var Pp="PopperContent",[xB,wB]=yw(Pp),Ew=kr.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:m,...h}=e,g=Sw(Pp,r),[v,C]=kr.useState(null),x=he(t,ae=>C(ae)),[w,y]=kr.useState(null),b=fa(w),R=b?.width??0,L=b?.height??0,E=n+(i!=="center"?"-"+i:""),S=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},A=Array.isArray(c)?c:[c],k=A.length>0,I={padding:S,boundary:A.filter(yB),altBoundary:k},{refs:N,floatingStyles:D,placement:F,isPositioned:H,middlewareData:P}=Eu({strategy:"fixed",placement:E,whileElementsMounted:(...ae)=>Ys(...ae,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[_i({mainAxis:o+L,alignmentAxis:s}),l&&Gl({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?lf():void 0,...I}),l&&Wl({...I}),ql({...I,apply:({elements:ae,rects:pe,availableWidth:Mt,availableHeight:Be})=>{let{width:Re,height:G}=pe.reference,Ce=ae.floating.style;Ce.setProperty("--radix-popper-available-width",`${Mt}px`),Ce.setProperty("--radix-popper-available-height",`${Be}px`),Ce.setProperty("--radix-popper-anchor-width",`${Re}px`),Ce.setProperty("--radix-popper-anchor-height",`${G}px`)}}),w&&uf({element:w,padding:a}),SB({arrowWidth:R,arrowHeight:L}),f&&cf({strategy:"referenceHidden",...I})]}),[O,M]=Aw(F),Z=yt(m);bt(()=>{H&&Z?.()},[H,Z]);let J=P.arrow?.x,T=P.arrow?.y,W=P.arrow?.centerOffset!==0,[ve,Le]=kr.useState();return bt(()=>{v&&Le(window.getComputedStyle(v).zIndex)},[v]),ls("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:H?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:ls(xB,{scope:r,placedSide:O,onArrowChange:y,arrowX:J,arrowY:T,shouldHideArrow:W,children:ls(ee.div,{"data-side":O,"data-align":M,...h,ref:x,style:{...h.style,animation:H?void 0:"none"}})})})});Ew.displayName=Pp;var Tw="PopperArrow",bB={top:"bottom",right:"left",bottom:"top",left:"right"},kw=kr.forwardRef(function(t,r){let{__scopePopper:n,...o}=t,i=wB(Tw,n),s=bB[i.placedSide];return ls("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:ls(bw,{...o,ref:r,style:{...o.style,display:"block"}})})});kw.displayName=Tw;function yB(e){return e!==null}var SB=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,u]=Aw(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+a/2,p=(o.arrow?.y??0)+l/2,m="",h="";return c==="bottom"?(m=s?d:`${f}px`,h=`${-l}px`):c==="top"?(m=s?d:`${f}px`,h=`${n.floating.height+l}px`):c==="right"?(m=`${-l}px`,h=s?d:`${p}px`):c==="left"&&(m=`${n.floating.width+l}px`,h=s?d:`${p}px`),{data:{x:m,y:h}}}});function Aw(e){let[t,r="center"]=e.split("-");return[t,r]}var L1=Rw,M1=Mw,Od=Ew,Dd=kw;import{hideOthers as RB}from"aria-hidden";import{RemoveScroll as LB}from"react-remove-scroll";import{jsx as pt}from"react/jsx-runtime";var Nd="Popover",[Pw,N4e]=ze(Nd,[Ca]),E1=Ca(),[MB,ti]=Pw(Nd),EB=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=E1(t),l=Ze.useRef(null),[c,u]=Ze.useState(!1),[d,f]=gr({prop:n,defaultProp:o??!1,onChange:i,caller:Nd});return pt(L1,{...a,children:pt(MB,{scope:t,contentId:qt(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:Ze.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:c,onCustomAnchorAdd:Ze.useCallback(()=>u(!0),[]),onCustomAnchorRemove:Ze.useCallback(()=>u(!1),[]),modal:s,children:r})})};EB.displayName=Nd;var Ow="PopoverAnchor",TB=Ze.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=ti(Ow,r),i=E1(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return Ze.useEffect(()=>(s(),()=>a()),[s,a]),pt(M1,{...i,...n,ref:t})});TB.displayName=Ow;var Dw="PopoverTrigger",kB=Ze.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=ti(Dw,r),i=E1(r),s=he(t,o.triggerRef),a=pt(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$w(o.open),...n,ref:s,onClick:q(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:pt(M1,{asChild:!0,...i,children:a})});kB.displayName=Dw;var Op="PopoverPortal",[AB,IB]=Pw(Op,{forceMount:void 0}),Nw=e=>{let{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=ti(Op,t);return pt(AB,{scope:t,forceMount:r,children:pt(ft,{present:r||i.open,children:pt(ss,{asChild:!0,container:o,children:n})})})};Nw.displayName=Op;var xa="PopoverContent",Fw=Ze.forwardRef((e,t)=>{let r=IB(xa,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=ti(xa,e.__scopePopover);return pt(ft,{present:n||i.open,children:i.modal?pt(OB,{...o,ref:t}):pt(DB,{...o,ref:t})})});Fw.displayName=xa;var PB=Kr("PopoverContent.RemoveScroll"),OB=Ze.forwardRef((e,t)=>{let r=ti(xa,e.__scopePopover),n=Ze.useRef(null),o=he(t,n),i=Ze.useRef(!1);return Ze.useEffect(()=>{let s=n.current;if(s)return RB(s)},[]),pt(LB,{as:PB,allowPinchZoom:!0,children:pt(Vw,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,s=>{s.preventDefault(),i.current||r.triggerRef.current?.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,s=>{let a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:q(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),DB=Ze.forwardRef((e,t)=>{let r=ti(xa,e.__scopePopover),n=Ze.useRef(!1),o=Ze.useRef(!1);return pt(Vw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(n.current||r.triggerRef.current?.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let s=i.target;r.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Vw=Ze.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=ti(xa,r),p=E1(r);return va(),pt(is,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:pt(os,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:pt(Od,{"data-state":$w(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Hw="PopoverClose",NB=Ze.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=ti(Hw,r);return pt(ee.button,{type:"button",...n,ref:t,onClick:q(e.onClick,()=>o.onOpenChange(!1))})});NB.displayName=Hw;var FB="PopoverArrow",VB=Ze.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=E1(r);return pt(Dd,{...o,...n,ref:t})});VB.displayName=FB;function $w(e){return e?"open":"closed"}var _w=Nw,Dp=Fw;var Zw=zw.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>Bw(_w,{children:Bw(Dp,{ref:o,align:t,sideOffset:r,className:B("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",e),...n})}));Zw.displayName=Dp.displayName;import{jsx as I1,jsxs as dz}from"react/jsx-runtime";import*as ds from"react";import*as mo from"react";import*as St from"react";import cs from"react";import{jsx as Np}from"react/jsx-runtime";import Y4e from"react";import{jsx as Q4e}from"react/jsx-runtime";function Fd(e){let t=e+"CollectionProvider",[r,n]=ze(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=h=>{let{scope:g,children:v}=h,C=cs.useRef(null),x=cs.useRef(new Map).current;return Np(o,{scope:g,itemMap:x,collectionRef:C,children:v})};s.displayName=t;let a=e+"CollectionSlot",l=Kr(a),c=cs.forwardRef((h,g)=>{let{scope:v,children:C}=h,x=i(a,v),w=he(g,x.collectionRef);return Np(l,{ref:w,children:C})});c.displayName=a;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Kr(u),p=cs.forwardRef((h,g)=>{let{scope:v,children:C,...x}=h,w=cs.useRef(null),y=he(g,w),b=i(u,v);return cs.useEffect(()=>(b.itemMap.set(w,{ref:w,...x}),()=>void b.itemMap.delete(w))),Np(f,{[d]:"",ref:y,children:C})});p.displayName=u;function m(h){let g=i(e+"CollectionConsumer",h);return cs.useCallback(()=>{let C=g.collectionRef.current;if(!C)return[];let x=Array.from(C.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((b,R)=>x.indexOf(b.ref.current)-x.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},m,n]}import*as Vd from"react";import{jsx as rme}from"react/jsx-runtime";var $B=Vd.createContext(void 0);function ri(e){let t=Vd.useContext($B);return e||t||"ltr"}import{jsx as us}from"react/jsx-runtime";var Fp="rovingFocusGroup.onEntryFocus",_B={bubbles:!1,cancelable:!0},T1="RovingFocusGroup",[Vp,jw,BB]=Fd(T1),[zB,po]=ze(T1,[BB]),[ZB,jB]=zB(T1),Uw=St.forwardRef((e,t)=>us(Vp.Provider,{scope:e.__scopeRovingFocusGroup,children:us(Vp.Slot,{scope:e.__scopeRovingFocusGroup,children:us(UB,{...e,ref:t})})}));Uw.displayName=T1;var UB=St.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=St.useRef(null),p=he(t,f),m=ri(i),[h,g]=gr({prop:s,defaultProp:a??null,onChange:l,caller:T1}),[v,C]=St.useState(!1),x=yt(c),w=jw(r),y=St.useRef(!1),[b,R]=St.useState(0);return St.useEffect(()=>{let L=f.current;if(L)return L.addEventListener(Fp,x),()=>L.removeEventListener(Fp,x)},[x]),us(ZB,{scope:r,orientation:n,dir:m,loop:o,currentTabStopId:h,onItemFocus:St.useCallback(L=>g(L),[g]),onItemShiftTab:St.useCallback(()=>C(!0),[]),onFocusableItemAdd:St.useCallback(()=>R(L=>L+1),[]),onFocusableItemRemove:St.useCallback(()=>R(L=>L-1),[]),children:us(ee.div,{tabIndex:v||b===0?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:q(e.onMouseDown,()=>{y.current=!0}),onFocus:q(e.onFocus,L=>{let E=!y.current;if(L.target===L.currentTarget&&E&&!v){let S=new CustomEvent(Fp,_B);if(L.currentTarget.dispatchEvent(S),!S.defaultPrevented){let A=w().filter(F=>F.focusable),k=A.find(F=>F.active),I=A.find(F=>F.id===h),D=[k,I,...A].filter(Boolean).map(F=>F.ref.current);qw(D,u)}}y.current=!1}),onBlur:q(e.onBlur,()=>C(!1))})})}),Gw="RovingFocusGroupItem",Ww=St.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,children:s,...a}=e,l=qt(),c=i||l,u=jB(Gw,r),d=u.currentTabStopId===c,f=jw(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return St.useEffect(()=>{if(n)return p(),()=>m()},[n,p,m]),us(Vp.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:us(ee.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:q(e.onMouseDown,g=>{n?u.onItemFocus(c):g.preventDefault()}),onFocus:q(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:q(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;let v=qB(g,u.orientation,u.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=f().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();let w=x.indexOf(g.currentTarget);x=u.loop?KB(x,w+1):x.slice(w+1)}setTimeout(()=>qw(x))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:h!=null}):s})})});Ww.displayName=Gw;var GB={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WB(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function qB(e,t,r){let n=WB(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return GB[n]}function qw(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function KB(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var wa=Uw,ba=Ww;import*as gn from"react";import{jsx as k1,jsxs as YB}from"react/jsx-runtime";import{jsx as ya}from"react/jsx-runtime";var $p="Radio",[XB,Kw]=ze($p),[QB,JB]=XB($p),Yw=gn.forwardRef((e,t)=>{let{__scopeRadio:r,name:n,checked:o=!1,required:i,disabled:s,value:a="on",onCheck:l,form:c,...u}=e,[d,f]=gn.useState(null),p=he(t,g=>f(g)),m=gn.useRef(!1),h=d?c||!!d.closest("form"):!0;return YB(QB,{scope:r,checked:o,disabled:s,children:[k1(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":eb(o),"data-disabled":s?"":void 0,disabled:s,value:a,...u,ref:p,onClick:q(e.onClick,g=>{o||l?.(),h&&(m.current=g.isPropagationStopped(),m.current||g.stopPropagation())})}),h&&k1(Jw,{control:d,bubbles:!m.current,name:n,value:a,checked:o,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});Yw.displayName=$p;var Xw="RadioIndicator",Qw=gn.forwardRef((e,t)=>{let{__scopeRadio:r,forceMount:n,...o}=e,i=JB(Xw,r);return k1(ft,{present:n||i.checked,children:k1(ee.span,{"data-state":eb(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t})})});Qw.displayName=Xw;var ez="RadioBubbleInput",Jw=gn.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},i)=>{let s=gn.useRef(null),a=he(s,i),l=Ld(r),c=fa(t);return gn.useEffect(()=>{let u=s.current;if(!u)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let m=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(m)}},[l,r,n]),k1(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Jw.displayName=ez;function eb(e){return e?"checked":"unchecked"}var tz=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Hd="RadioGroup",[rz,Ame]=ze(Hd,[po,Kw]),tb=po(),rb=Kw(),[nz,oz]=rz(Hd),nb=mo.forwardRef((e,t)=>{let{__scopeRadioGroup:r,name:n,defaultValue:o,value:i,required:s=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:d,...f}=e,p=tb(r),m=ri(c),[h,g]=gr({prop:i,defaultProp:o??null,onChange:d,caller:Hd});return ya(nz,{scope:r,name:n,required:s,disabled:a,value:h,onValueChange:g,children:ya(wa,{asChild:!0,...p,orientation:l,dir:m,loop:u,children:ya(ee.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":a?"":void 0,dir:m,...f,ref:t})})})});nb.displayName=Hd;var ob="RadioGroupItem",ib=mo.forwardRef((e,t)=>{let{__scopeRadioGroup:r,disabled:n,...o}=e,i=oz(ob,r),s=i.disabled||n,a=tb(r),l=rb(r),c=mo.useRef(null),u=he(t,c),d=i.value===o.value,f=mo.useRef(!1);return mo.useEffect(()=>{let p=h=>{tz.includes(h.key)&&(f.current=!0)},m=()=>f.current=!1;return document.addEventListener("keydown",p),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",p),document.removeEventListener("keyup",m)}},[]),ya(ba,{asChild:!0,...a,focusable:!s,active:d,children:ya(Yw,{disabled:s,required:i.required,checked:d,...l,...o,name:i.name,ref:u,onCheck:()=>i.onValueChange(o.value),onKeyDown:q(p=>{p.key==="Enter"&&p.preventDefault()}),onFocus:q(o.onFocus,()=>{f.current&&c.current?.click()})})})});ib.displayName=ob;var iz="RadioGroupIndicator",sb=mo.forwardRef((e,t)=>{let{__scopeRadioGroup:r,...n}=e,o=rb(r);return ya(Qw,{...o,...n,ref:t})});sb.displayName=iz;var ab=nb,lb=ib,cb=sb;import{jsx as Eb}from"react/jsx-runtime";import*as Tb from"react";var ub={quote:({node:e,nodesToHTML:t,providedStyleTag:r})=>{let n=t({nodes:e.children}).join("");return`<blockquote${r}>${n}</blockquote>`}};var db={heading:({node:e,nodesToHTML:t,providedStyleTag:r})=>{let n=t({nodes:e.children}).join("");return`<${e.tag}${r}>${n}</${e.tag}>`}};var fb={horizontalrule:"<hr />"};var pb={linebreak:"<br />"};var mb=({internalDocToHref:e})=>({autolink:({node:t,nodesToHTML:r,providedStyleTag:n})=>{let o=r({nodes:t.children}).join("");return`<a${n} href="${t.fields.url}"${t.fields.newTab?' rel="noopener noreferrer" target="_blank"':""}>
|
|
172
|
+
${o}
|
|
173
|
+
</a>`},link:({node:t,nodesToHTML:r,providedStyleTag:n})=>{let o=r({nodes:t.children}).join(""),i=t.fields.url??"";return t.fields.linkType==="internal"&&(e?i=e({linkNode:t}):(console.error("Lexical => HTML converter: Link converter: found internal link, but internalDocToHref is not provided"),i="#")),`<a${n} href="${i}"${t.fields.newTab?' rel="noopener noreferrer" target="_blank"':""}>
|
|
174
|
+
${o}
|
|
175
|
+
</a>`}});var It=[];for($d=0;$d<256;++$d)It.push(($d+256).toString(16).slice(1));var $d;function hb(e,t=0){return(It[e[t+0]]+It[e[t+1]]+It[e[t+2]]+It[e[t+3]]+"-"+It[e[t+4]]+It[e[t+5]]+"-"+It[e[t+6]]+It[e[t+7]]+"-"+It[e[t+8]]+It[e[t+9]]+"-"+It[e[t+10]]+It[e[t+11]]+It[e[t+12]]+It[e[t+13]]+It[e[t+14]]+It[e[t+15]]).toLowerCase()}var _d,az=new Uint8Array(16);function _p(){if(!_d&&(_d=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!_d))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return _d(az)}var lz=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Bp={randomUUID:lz};function cz(e,t,r){if(Bp.randomUUID&&!t&&!e)return Bp.randomUUID();e=e||{};var n=e.random||(e.rng||_p)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return hb(n)}var zp=cz;var gb={list:({node:e,nodesToHTML:t,providedStyleTag:r})=>{let n=t({nodes:e.children}).join("");return`<${e.tag}${r} class="list-${e.listType}">${n}</${e.tag}>`},listitem:({node:e,nodesToHTML:t,parent:r,providedCSSString:n})=>{let o=e.children.some(s=>s.type==="list"),i=t({nodes:e.children}).join("");if("listType"in r&&r?.listType==="check"){let s=zp();return`<li
|
|
176
|
+
aria-checked="${e.checked?"true":"false"}"
|
|
177
|
+
class="list-item-checkbox${e.checked?" list-item-checkbox-checked":" list-item-checkbox-unchecked"}${o?" nestedListItem":""}"
|
|
178
|
+
role="checkbox"
|
|
179
|
+
style="list-style-type: none;${n}"
|
|
180
|
+
tabIndex="-1"
|
|
181
|
+
value="${e.value}"
|
|
182
|
+
>
|
|
183
|
+
${o?i:`<input${e.checked?" checked":""} id="${s}" readOnly="true" type="checkbox" />
|
|
184
|
+
<label htmlFor="${s}">${i}</label>
|
|
185
|
+
<br />`}
|
|
186
|
+
</li>`}else return`<li
|
|
187
|
+
class="${o?"nestedListItem":""}"
|
|
188
|
+
style="${o?`list-style-type: none;${n}`:n}"
|
|
189
|
+
value="${e.value}"
|
|
190
|
+
>${i}</li>`}};var vb={paragraph:({node:e,nodesToHTML:t,providedStyleTag:r})=>{let n=t({nodes:e.children});return n?.length?`<p${r}>${n.join("")}</p>`:`<p${r}><br /></p>`}};var Cb={tab:" "};var xb={table:({node:e,nodesToHTML:t,providedStyleTag:r})=>{let n=t({nodes:e.children}).join("");return`<div${r} class="lexical-table-container">
|
|
191
|
+
<table class="lexical-table" style="border-collapse: collapse;">
|
|
192
|
+
<tbody>${n}</tbody>
|
|
193
|
+
</table>
|
|
194
|
+
</div>`},tablecell:({node:e,nodesToHTML:t,providedCSSString:r})=>{let n=t({nodes:e.children}).join(""),o=e.headerState>0?"th":"td",i=`lexical-table-cell-header-${e.headerState}`,s="border: 1px solid #ccc; padding: 8px;"+r;e.backgroundColor&&(s+=` background-color: ${e.backgroundColor};`);let a=e.colSpan&&e.colSpan>1?` colspan="${e.colSpan}"`:"",l=e.rowSpan&&e.rowSpan>1?` rowspan="${e.rowSpan}"`:"";return`<${o}
|
|
195
|
+
class="lexical-table-cell ${i}"
|
|
196
|
+
${a}
|
|
197
|
+
${l}
|
|
198
|
+
style="${s}"
|
|
199
|
+
>
|
|
200
|
+
${n}
|
|
201
|
+
</${o}>
|
|
202
|
+
`},tablerow:({node:e,nodesToHTML:t,providedStyleTag:r})=>{let n=t({nodes:e.children}).join("");return`<tr${r} class="lexical-table-row">
|
|
203
|
+
${n}
|
|
204
|
+
</tr>`}};var ce={DOM_ELEMENT_TYPE:1,DOM_TEXT_TYPE:3,NO_DIRTY_NODES:0,HAS_DIRTY_NODES:1,FULL_RECONCILE:2,IS_NORMAL:0,IS_TOKEN:1,IS_SEGMENTED:2,IS_INERT:3,IS_BOLD:1,IS_ITALIC:2,IS_STRIKETHROUGH:4,IS_UNDERLINE:8,IS_CODE:16,IS_SUBSCRIPT:32,IS_SUPERSCRIPT:64,IS_HIGHLIGHT:128,IS_DIRECTIONLESS:1,IS_UNMERGEABLE:2,IS_ALIGN_LEFT:1,IS_ALIGN_CENTER:2,IS_ALIGN_RIGHT:3,IS_ALIGN_JUSTIFY:4,IS_ALIGN_START:5,IS_ALIGN_END:6},Yme=ce.IS_BOLD|ce.IS_ITALIC|ce.IS_STRIKETHROUGH|ce.IS_UNDERLINE|ce.IS_CODE|ce.IS_SUBSCRIPT|ce.IS_SUPERSCRIPT|ce.IS_HIGHLIGHT;var wb="\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC",bb="A-Za-z\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u0300-\u0590\u0800-\u1FFF\u200E\u2C00-\uFB1C\uFE00-\uFE6F\uFEFD-\uFFFF",Xme=new RegExp("^[^"+bb+"]*["+wb+"]"),Qme=new RegExp("^[^"+wb+"]*["+bb+"]"),Jme={bold:ce.IS_BOLD,code:ce.IS_CODE,highlight:ce.IS_HIGHLIGHT,italic:ce.IS_ITALIC,strikethrough:ce.IS_STRIKETHROUGH,subscript:ce.IS_SUBSCRIPT,superscript:ce.IS_SUPERSCRIPT,underline:ce.IS_UNDERLINE},e8e={directionless:ce.IS_DIRECTIONLESS,unmergeable:ce.IS_UNMERGEABLE},t8e={center:ce.IS_ALIGN_CENTER,end:ce.IS_ALIGN_END,justify:ce.IS_ALIGN_JUSTIFY,left:ce.IS_ALIGN_LEFT,right:ce.IS_ALIGN_RIGHT,start:ce.IS_ALIGN_START},r8e={[ce.IS_ALIGN_CENTER]:"center",[ce.IS_ALIGN_END]:"end",[ce.IS_ALIGN_JUSTIFY]:"justify",[ce.IS_ALIGN_LEFT]:"left",[ce.IS_ALIGN_RIGHT]:"right",[ce.IS_ALIGN_START]:"start"},n8e={normal:ce.IS_NORMAL,segmented:ce.IS_SEGMENTED,token:ce.IS_TOKEN},o8e={[ce.IS_NORMAL]:"normal",[ce.IS_SEGMENTED]:"segmented",[ce.IS_TOKEN]:"token"};var yb={text:({node:e})=>{let t=e.text;return e.format&ce.IS_BOLD&&(t=`<strong>${t}</strong>`),e.format&ce.IS_ITALIC&&(t=`<em>${t}</em>`),e.format&ce.IS_STRIKETHROUGH&&(t=`<span style="text-decoration: line-through;">${t}</span>`),e.format&ce.IS_UNDERLINE&&(t=`<span style="text-decoration: underline;">${t}</span>`),e.format&ce.IS_CODE&&(t=`<code>${t}</code>`),e.format&ce.IS_SUBSCRIPT&&(t=`<sub>${t}</sub>`),e.format&ce.IS_SUPERSCRIPT&&(t=`<sup>${t}</sup>`),t}};var Sb={upload:({node:e,providedStyleTag:t})=>{let r=e,n;if(typeof r.value!="object"||(n=r.value,!n))return"";let o=n.url;if(!n.mimeType.startsWith("image"))return`<a${t} href="${o}" rel="noopener noreferrer">${n.filename}</a$>`;if(!n.sizes||!Object.keys(n.sizes).length)return`
|
|
205
|
+
<img${t}
|
|
206
|
+
alt="${n.filename}"
|
|
207
|
+
height="${n.height}"
|
|
208
|
+
src="${o}"
|
|
209
|
+
width="${n.width}"
|
|
210
|
+
/>
|
|
211
|
+
`;let i="";for(let s in n.sizes){let a=n.sizes[s];!a||!a.width||!a.height||!a.mimeType||!a.filesize||!a.filename||!a.url||(i+=`
|
|
212
|
+
<source
|
|
213
|
+
media="(max-width: ${a.width}px)"
|
|
214
|
+
srcset="${a.url}"
|
|
215
|
+
type="${a.mimeType}"
|
|
216
|
+
/>
|
|
217
|
+
`)}return i+=`
|
|
218
|
+
<img
|
|
219
|
+
alt="${n.filename}"
|
|
220
|
+
height="${n.height}"
|
|
221
|
+
src="${o}"
|
|
222
|
+
width="${n.width}"
|
|
223
|
+
/>
|
|
224
|
+
`,`<picture${t}>${i}</picture$>`}};var Zp={...vb,...yb,...pb,...ub,...xb,...db,...fb,...gb,...mb({}),...Sb,...Cb};function Rb(e){let t=!!e?.root?.children?.length,r=!1;if(e?.root?.children?.length===1&&e?.root?.children[0]?.type==="paragraph"){let n=e?.root?.children[0];if(!n?.children||n?.children?.length===0)r=!0;else if(n?.children?.length===1){let o=n?.children[0];o?.type==="text"&&(o?.text?.length||(r=!0))}}return!(!t||r)}function Lb({converters:e,disableIndent:t,disableTextAlign:r,node:n,unknownConverter:o}){let i;n.type==="block"?(i=e?.blocks?.[n?.fields?.blockType],!i&&!o&&console.error(`Lexical => HTML converter: Blocks converter: found ${n?.fields?.blockType} block, but no converter is provided`)):n.type==="inlineBlock"?(i=e?.inlineBlocks?.[n?.fields?.blockType],!i&&!o&&console.error(`Lexical => HTML converter: Inline Blocks converter: found ${n?.fields?.blockType} inline block, but no converter is provided`)):i=e[n.type];let s={};if(!r&&(!Array.isArray(r)||!r?.includes(n.type))&&"format"in n&&n.format)switch(n.format){case"center":s["text-align"]="center";break;case"end":s["text-align"]="right";break;case"justify":s["text-align"]="justify";break;case"left":break;case"right":s["text-align"]="right";break;case"start":s["text-align"]="left";break}!t&&(!Array.isArray(t)||!t?.includes(n.type))&&"indent"in n&&n.indent&&n.type!=="listitem"&&(s["padding-inline-start"]=`${Number(n.indent)*2}em`);let a="";for(let c of Object.keys(s))a+=`${c}: ${s[c]};`;let l=a?.length?` style="${a}"`:"";return{converterForNode:i??o,providedCSSString:a,providedStyleTag:l}}function A1({className:e,converters:t,data:r,disableContainer:n,disableIndent:o,disableTextAlign:i}){if(Rb(r)){let s={};t?typeof t=="function"?s=t({defaultConverters:Zp}):s=t:s=Zp;let a=Mb({converters:s,disableIndent:o,disableTextAlign:i,nodes:r?.root?.children,parent:r?.root}).join("");return n?a:`<div class="${e??"payload-richtext"}">${a}</div>`}return n?"":`<div class="${e??"payload-richtext"}"></div>`}function Mb({converters:e,disableIndent:t,disableTextAlign:r,nodes:n,parent:o}){let i=e.unknown,s=[],a=-1;for(let l of n){a++;let{converterForNode:c,providedCSSString:u,providedStyleTag:d}=Lb({converters:e,disableIndent:t,disableTextAlign:r,node:l,unknownConverter:i});try{let f;c?f=typeof c=="function"?c({childIndex:a,converters:e,node:l,nodesToHTML:m=>Mb({converters:m.converters??e,disableIndent:m.disableIndent??t,disableTextAlign:m.disableTextAlign??r,nodes:m.nodes,parent:m.parent??{...l,parent:o}}),parent:o,providedCSSString:u,providedStyleTag:d}):c:f="<span>unknown node</span>",s.push(f)}catch(f){console.error("Error converting lexical node to HTML:",f,"node:",l),s.push("")}}return s.filter(Boolean)}var uz=Pe("text-pretty tracking-[-0.02em]",{variants:{size:{none:"tracking",1:"text-[12px] leading-[140%]",2:"text-[14px] leading-[140%]",3:"text-[16px] leading-[140%]",4:"text-[18px] leading-[140%]"},weight:{medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"none",weight:"bold"}}),U=Tb.forwardRef((e,t)=>{let{children:r,size:n="none",weight:o,align:i,className:s,asChild:a,as:l="span",color:c,html:u,...d}=e,f=u?{dangerouslySetInnerHTML:{__html:typeof u=="string"?u:A1({data:u})}}:null,p=c?{style:{color:c}}:null;return Eb(hr,{...d,ref:t,className:B(uz({size:n,weight:n==="none"?o??"medium":o,align:i}),s),...f,...p,children:a?r:Eb(l,{children:f?null:r})})});U.displayName="Text";var kb=ds.createContext({size:"base"}),fz=Pe("border-primary text-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground aspect-square rounded-full border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{size:{sm:"size-[14px]",base:"size-4",lg:"size-5"}},defaultVariants:{size:"base"}}),Ab=ds.forwardRef(({className:e,children:t,size:r,...n},o)=>I1(ab,{className:B("text-info-primary grid gap-2",e),...n,ref:o,children:I1(kb.Provider,{value:{size:r},children:t})}));Ab.displayName="RadioGroup";var Ib=ds.forwardRef(({className:e,size:t,children:r,...n},o)=>{let{size:i}=ds.useContext(kb),s=I1(lb,{ref:o,className:B(fz({size:t??i}),e),...n,children:I1(cb,{className:"flex size-full items-center justify-center text-current",children:I1(ha,{})})});return r?dz(U,{as:"label",className:B("flex items-center gap-1",e),children:[s,r]}):s});Ib.displayName="RadioGroupItem";import{jsx as Pb}from"react/jsx-runtime";import Ob from"react";var pz={1:"col-span-1",2:"col-span-2",3:"col-span-3",4:"col-span-4",5:"col-span-5",6:"col-span-6",7:"col-span-7",8:"col-span-8",9:"col-span-9",10:"col-span-10",11:"col-span-11",12:"col-span-12"},mz={1:"col-start-1",2:"col-start-2",3:"col-start-3",4:"col-start-4",5:"col-start-5",6:"col-start-6",7:"col-start-7",8:"col-start-8",9:"col-start-9",10:"col-start-10",11:"col-start-11",12:"col-start-12"},hz={2:"col-end-2",3:"col-end-3",4:"col-end-4",5:"col-end-5",6:"col-end-6",7:"col-end-7",8:"col-end-8",9:"col-end-9",10:"col-end-10",11:"col-end-11",12:"col-end-12",13:"col-end-13"},Db=Ob.forwardRef(({className:e,children:t},r)=>Pb("div",{ref:r,className:B("laptop:gap-4 grid grid-cols-12 gap-3",e),children:t}));Db.displayName="Grid";var Nb=Ob.forwardRef(({className:e,children:t,span:r=12,start:n,end:o},i)=>Pb("div",{ref:i,className:B(pz[r],n&&mz[n],o&&hz[o],e),children:t}));Nb.displayName="GridItem";import{jsx as Fb}from"react/jsx-runtime";import gz from"react";var vz=Pe("text-balance leading-tight tracking-[-0.04em]",{variants:{size:{none:"tracking-[-0.04em]",1:"lg-desktop:text-[16px] text-[14px] leading-[120%]",2:"lg-desktop:text-[24px] text-[20px] leading-[120%]",3:"desktop:text-[32px] text-[24px] leading-[120%]",4:"desktop:text-[40px] lg-desktop:text-[48px] text-[32px] leading-[100%]",5:"desktop:text-[56px] lg-desktop:text-[64px] text-[40px] leading-[100%]"},weight:{medium:"font-medium",semibold:"font-semibold",bold:"font-bold",extraBold:"font-extrabold",black:"font-black"},align:{left:"text-left",center:"text-center",right:"text-right"}},defaultVariants:{size:"none",weight:"bold"}}),je=gz.forwardRef((e,t)=>{let{children:r,className:n,size:o="none",align:i,weight:s,asChild:a,as:l="h2",color:c,html:u,...d}=e,f=u?{dangerouslySetInnerHTML:{__html:typeof u=="string"?u:A1({data:u})}}:null,p=c?{style:{color:c}}:null;return Fb(hr,{...d,ref:t,className:B(vz({size:o,weight:s,align:i}),n),...f,...p,children:a?r:Fb(l,{children:f?null:r})})});je.displayName="Heading";import{Fragment as Cz,jsx as Bd}from"react/jsx-runtime";import Vb from"react";var xz=({children:e})=>Bd(Cz,{children:e}),wz=Vb.forwardRef(({...e},t)=>{let{asChild:r,children:n,className:o,childClassName:i,spaceY:s="none",spaceTop:a="none",spaceBottom:l="none",...c}=e,u=r?hr:"div",d={default:"tablet:my-[80px] laptop:my-[96px] desktop:my-[112px] lg-desktop:my-[128px] my-[64px]",none:""},f={default:"tablet:pt-[80px] laptop:pt-[96px] desktop:pt-[112px] lg-desktop:pt-[128px] pt-[64px]",none:""},p={default:"tablet:pb-[80px] laptop:pb-[96px] desktop:pb-[112px] lg-desktop:pb-[128px] pb-[64px]",none:""};return Bd(u,{...c,ref:t,className:B(o,"ipc_container","relative z-10 w-full"),children:Bd("div",{className:B(i,"lg-desktop:max-w-full mx-auto size-full","tablet:px-8 laptop:px-16 desktop:px-16 lg-desktop:px-[calc(50%-832px)] px-4",d?.[s]||s,f?.[a]||a,p?.[l]||l),children:n})})}),Pt=Vb.forwardRef(({...e},t)=>{let{children:r,mode:n="section"}=e,o={section:wz,fragment:xz}[n];return Bd(o,{...e,ref:t,children:r})});Pt.displayName="Container";import{jsx as bz}from"react/jsx-runtime";import*as Hb from"react";var yz=Pe("",{variants:{color:{brand0:"bg-brand-0",brand1:"bg-brand-1",success0:"bg-success-0",success1:"bg-success-1",success2:"bg-success-2",success3:"bg-success-3",success4:"bg-success-4",warning0:"bg-warning-0",warning1:"bg-warning-1",warning2:"bg-warning-2",warning3:"bg-warning-3",warning4:"bg-warning-4",error0:"bg-error-0",error1:"bg-error-1",error2:"bg-error-2",error3:"bg-error-3",error4:"bg-error-4",infoPrimary:"bg-info-primary",infoSecondary:"bg-info-secondary",infoTertiary:"bg-info-tertiary",infoQuaternary:"bg-info-quaternary",infoWhite:"bg-info-white",containerPrimary:"bg-container-primary",containerSecondary0:"bg-container-secondary-0",containerSecondary1:"bg-container-secondary-1",bg0:"bg-bg-0",bg1:"bg-bg-1",lines:"bg-lines",masks0:"bg-masks-0",masks1:"bg-masks-1",tabWord0:"bg-tab-word-0",tabWord1:"bg-tab-word-1",tabWord2:"bg-tab-word-2",tabStroke0:"bg-tab-stroke-0",tabStroke1:"bg-tab-stroke-1",tabStroke2:"bg-tab-stroke-2",tabFill0:"bg-tab-fill-0",tabFill1:"bg-tab-fill-1",tabFill2:"bg-tab-fill-2"}},defaultVariants:{color:"brand0"}}),$b=Hb.forwardRef((e,t)=>{let{children:r,color:n="brand0",className:o,...i}=e;return bz(hr,{...i,ref:t,className:B(yz({color:n}),o),children:r})});$b.displayName="Color";import{jsx as h6e,jsxs as g6e}from"react/jsx-runtime";import"react";import*as Bb from"react";import mt,{useLayoutEffect as c6e,useEffect as u6e,useMemo as Rz}from"react";function Sz(e){if(!e||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}var Lz=mt.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),zd=()=>{let e=mt.useContext(Lz);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Sz(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
225
|
+
[data-state=closed]
|
|
226
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);var d6e=typeof document<"u"&&window.visualViewport;function Mz(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ez(...e){return t=>e.forEach(r=>Mz(r,t))}function zb(...e){return Bb.useCallback(Ez(...e),e)}var _b=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function jp(e,t){if(!e)return()=>{};let r=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=r}}function Tz(...e){return(...t)=>{for(let r of e)typeof r=="function"&&r(...t)}}var Up={DURATION:.5,EASE:[.32,.72,0,1]};var kz=8;var Az=26;var Iz=()=>()=>{};function Pz(){let{direction:e,isOpen:t,shouldScaleBackground:r,setBackgroundColorOnScale:n,noBodyStyles:o}=zd(),i=mt.useRef(null),s=Rz(()=>document.body.style.backgroundColor,[]);function a(){return(window.innerWidth-Az)/window.innerWidth}mt.useEffect(()=>{if(t&&r){i.current&&clearTimeout(i.current);let l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;Tz(n&&!o?jp(document.body,{background:"black"}):Iz,jp(l,{transformOrigin:_b(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Up.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Up.EASE.join(",")})`}));let c=jp(l,{borderRadius:`${kz}px`,overflow:"hidden",..._b(e)?{transform:`scale(${a()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${a()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{c(),i.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},Up.DURATION*1e3)}}},[t,r,s])}var Oz=mt.forwardRef(function({...e},t){let{overlayRef:r,snapPoints:n,onRelease:o,shouldFade:i,isOpen:s,modal:a,shouldAnimate:l}=zd(),c=zb(t,r),u=n&&n.length>0;if(!a)return null;let d=mt.useCallback(f=>o(f),[o]);return mt.createElement(y1,{onMouseUp:d,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":s&&u?"true":"false","data-vaul-snap-points-overlay":s&&i?"true":"false","data-vaul-animate":l?.current?"true":"false",...e})});Oz.displayName="Drawer.Overlay";var Dz=mt.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:r,...n},o){let{drawerRef:i,onPress:s,onRelease:a,onDrag:l,keyboardIsOpen:c,snapPointsOffset:u,activeSnapPointIndex:d,modal:f,isOpen:p,direction:m,snapPoints:h,container:g,handleOnly:v,shouldAnimate:C,autoFocus:x}=zd(),[w,y]=mt.useState(!1),b=zb(o,i),R=mt.useRef(null),L=mt.useRef(null),E=mt.useRef(!1),S=h&&h.length>0;Pz();let A=(I,N,D=0)=>{if(E.current)return!0;let F=Math.abs(I.y),H=Math.abs(I.x),P=H>F,O=["bottom","right"].includes(N)?1:-1;if(N==="left"||N==="right"){if(!(I.x*O<0)&&H>=0&&H<=D)return P}else if(!(I.y*O<0)&&F>=0&&F<=D)return!P;return E.current=!0,!0};mt.useEffect(()=>{S&&window.requestAnimationFrame(()=>{y(!0)})},[]);function k(I){R.current=null,E.current=!1,a(I)}return mt.createElement(S1,{"data-vaul-drawer-direction":m,"data-vaul-drawer":"","data-vaul-delayed-snap-points":w?"true":"false","data-vaul-snap-points":p&&S?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":C?.current?"true":"false",...n,ref:b,style:u&&u.length>0?{"--snap-point-height":`${u[d??0]}px`,...t}:t,onPointerDown:I=>{v||(n.onPointerDown==null||n.onPointerDown.call(n,I),R.current={x:I.pageX,y:I.pageY},s(I))},onOpenAutoFocus:I=>{r?.(I),x||I.preventDefault()},onPointerDownOutside:I=>{if(e?.(I),!f||I.defaultPrevented){I.preventDefault();return}c.current&&(c.current=!1)},onFocusOutside:I=>{if(!f){I.preventDefault();return}},onPointerMove:I=>{if(L.current=I,v||(n.onPointerMove==null||n.onPointerMove.call(n,I),!R.current))return;let N=I.pageY-R.current.y,D=I.pageX-R.current.x,F=I.pointerType==="touch"?10:2;A({x:D,y:N},m,F)?l(I):(Math.abs(D)>F||Math.abs(N)>F)&&(R.current=null)},onPointerUp:I=>{n.onPointerUp==null||n.onPointerUp.call(n,I),R.current=null,E.current=!1,a(I)},onPointerOut:I=>{n.onPointerOut==null||n.onPointerOut.call(n,I),k(L.current)},onContextMenu:I=>{n.onContextMenu==null||n.onContextMenu.call(n,I),L.current&&k(L.current)}})});Dz.displayName="Drawer.Content";var Nz=250,Fz=120,Vz=mt.forwardRef(function({preventCycle:e=!1,children:t,...r},n){let{closeDrawer:o,isDragging:i,snapPoints:s,activeSnapPoint:a,setActiveSnapPoint:l,dismissible:c,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=zd(),m=mt.useRef(null),h=mt.useRef(!1);function g(){if(h.current){x();return}window.setTimeout(()=>{v()},Fz)}function v(){if(i||e||h.current){x();return}if(x(),!s||s.length===0){c||o();return}if(a===s[s.length-1]&&c){o();return}let y=s.findIndex(R=>R===a);if(y===-1)return;let b=s[y+1];l(b)}function C(){m.current=window.setTimeout(()=>{h.current=!0},Nz)}function x(){m.current&&window.clearTimeout(m.current),h.current=!1}return mt.createElement("div",{onClick:g,onPointerCancel:x,onPointerDown:w=>{u&&f(w),C()},onPointerMove:w=>{u&&p(w)},ref:n,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...r},mt.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});Vz.displayName="Drawer.Handle";import{Fragment as Hz,jsx as Zb,jsxs as $z}from"react/jsx-runtime";import _z from"react";var Bz=Pe("tracking hover:text-brand-0 font-bold underline transition-colors",{variants:{size:{base:"text-text-2",lg:"text-text-3"},variant:{secoundry:"text-info-secondary hover:text-info-primary",primary:"text-info-primary hover:text-brand-0"}}}),zz=_z.forwardRef(({children:e,size:t="base",variant:r="primary",className:n,asChild:o=!1,href:i,style:s,disabled:a=!1,suffixIcon:l,onClick:c,...u},d)=>Zb(o?hr:"a",{ref:d,onClick:f=>{if(!a&&c?.(f),a||!i){f.preventDefault();return}},href:a?void 0:i,className:B(Bz({size:t,variant:r}),n,{"flex items-center":l,"cursor-pointer":!a,"text-info-quaternary cursor-not-allowed hover:text-info-quaternary":a}),...s?{style:s}:null,...u,children:$z(Hz,{children:[e,l&&Zb("span",{className:"svg",children:l})]})}));zz.displayName="Link";import{jsx as P1}from"react/jsx-runtime";import{useEffect as nZ,useRef as oZ,forwardRef as Yp}from"react";import iZ from"fitty";import*as en from"react";var qb=Ge(Wb(),1);function Kb(){return(0,qb.useSyncExternalStore)(Qz,()=>!0,()=>!1)}function Qz(){return()=>{}}import{jsx as Zd}from"react/jsx-runtime";var Wp="Avatar",[Jz,F6e]=ze(Wp),[eZ,Xb]=Jz(Wp),Qb=en.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[o,i]=en.useState("idle");return Zd(eZ,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:Zd(ee.span,{...n,ref:t})})});Qb.displayName=Wp;var Jb="AvatarImage",ey=en.forwardRef((e,t)=>{let{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...i}=e,s=Xb(Jb,r),a=tZ(n,i),l=yt(c=>{o(c),s.onImageLoadingStatusChange(c)});return bt(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?Zd(ee.img,{...i,ref:t,src:n}):null});ey.displayName=Jb;var ty="AvatarFallback",ry=en.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...o}=e,i=Xb(ty,r),[s,a]=en.useState(n===void 0);return en.useEffect(()=>{if(n!==void 0){let l=window.setTimeout(()=>a(!0),n);return()=>window.clearTimeout(l)}},[n]),s&&i.imageLoadingStatus!=="loaded"?Zd(ee.span,{...o,ref:t}):null});ry.displayName=ty;function Yb(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function tZ(e,{referrerPolicy:t,crossOrigin:r}){let n=Kb(),o=en.useRef(null),i=n?(o.current||(o.current=new window.Image),o.current):null,[s,a]=en.useState(()=>Yb(i,e));return bt(()=>{a(Yb(i,e))},[i,e]),bt(()=>{let l=d=>()=>{a(d)};if(!i)return;let c=l("loaded"),u=l("error");return i.addEventListener("load",c),i.addEventListener("error",u),t&&(i.referrerPolicy=t),typeof r=="string"&&(i.crossOrigin=r),()=>{i.removeEventListener("load",c),i.removeEventListener("error",u)}},[i,r,t]),s}var ny=Qb,qp=ey,Kp=ry;var sZ=Pe("tracking transition-colors",{variants:{size:{small:"size-8 text-sm",medium:"size-10 text-xl",large:"size-12 text-2xl"}}}),oy=Yp(({className:e,textClassName:t,isAdaptation:r=!1,minSize:n=4,maxSize:o=16,children:i,style:s,size:a="small",onClick:l,...c},u)=>{let d=oZ(null),f=p=>{l?.(p)};return nZ(()=>{let p;return r&&d.current&&(p=iZ?.(d.current,{minSize:n,maxSize:o})),()=>p?.unsubscribe?.()},[]),P1(ny,{ref:u,onClick:f,className:B(sZ({size:a}),"bg-container-secondary-0 text-info-primary relative flex shrink-0 items-center justify-center overflow-hidden rounded-full",e),...s?{style:s}:null,...c,children:r?P1("span",{className:"bg-muted flex size-full items-center justify-center rounded-full",children:P1("span",{ref:d,className:B("px-2",t),children:i})}):i})});oy.displayName="Avatar";var iy=Yp(({className:e,...t},r)=>P1(qp,{ref:r,className:B("aspect-square size-full",e),...t}));iy.displayName=qp.displayName;var sy=Yp(({className:e,...t},r)=>P1(Kp,{ref:r,className:B("bg-muted flex size-full items-center justify-center rounded-full",e),...t}));sy.displayName=Kp.displayName;import{Fragment as aZ,jsx as fs,jsxs as ay}from"react/jsx-runtime";import{useState as lZ,useEffect as cZ,forwardRef as uZ}from"react";var dZ=Pe("size-full border bg-transparent text-center text-base outline-none",{variants:{status:{default:"border-lines-1 group-hover:border-lines-2",success:"border-lines-3 group-hover:border-lines-3",warning:"border-lines-4 group-hover:border-lines-4",error:"border-lines-5 group-hover:border-lines-5"},disabled:{true:"border-lines-1 group-hover:border-lines-1 text-info-quaternary cursor-not-allowed"}}}),fZ=uZ(({value:e,defaultValue:t=0,step:r=1,min:n=0,max:o,tips:i,style:s,children:a,asChild:l=!1,disabled:c=!1,readonly:u=!1,status:d="default",className:f,onChange:p,onBlur:m,onEnter:h},g)=>{let[v,C]=lZ(t),x=l?hr:"div",w=B("border-lines-1 flex size-12 items-center justify-center border text-base",{"group-hover:border-lines-2":!c,"text-info-quaternary cursor-not-allowed":c}),y=(k,I)=>I?"text-lines-1":{default:"text-lines-1",success:"text-lines-3",warning:"text-lines-4",error:"text-lines-5"}[k||"default"],b=k=>k===""||/^[0-9]+$/.test(k),R=k=>{if(c||u)return;let I=k.target.value;if(b(I)&&(C(I),I!=="")){let N=Number(I);o!==void 0&&N>o&&(N=o),n!==void 0&&N<n&&(N=n),p?.(N)}},L=k=>{if(!(c||u))if(v===""||isNaN(Number(v))){let I=n!==void 0?n:0;C(I),m?.(I,k)}else{let I=Number(v);C(I),m?.(I,k)}},E=()=>{if(c||u)return;let k=Number(v)+(r?Math.ceil(Number(r)):1);o!==void 0&&k>o&&(k=o),C(k),p?.(k)},S=()=>{if(c||u)return;let k=Number(v)-(r?Math.ceil(Number(r)):1);n!==void 0&&k<n&&(k=n),C(k),p?.(k)},A=k=>{if(!(c||u)&&k.key==="Enter"){let I=k.target?.value;h?.(I,k)}};return cZ(()=>{C(e||0)},[e]),fs(x,{ref:g,...s?{style:s}:null,className:B({"group flex items-center":!l},f),children:l?a:ay(aZ,{children:[fs("button",{onClick:E,className:w,children:fs(Ix,{})}),ay("div",{className:"relative mx-1.5 h-[52px] w-[105px]",children:[fs("input",{type:"text",value:v,disabled:c,readOnly:u,onBlur:L,onKeyDown:A,onChange:R,className:B(dZ({status:d,disabled:c}))}),i?fs("span",{className:B(y(d,c),"absolute -bottom-4 left-0 w-full truncate text-xs"),children:i}):null]}),fs("button",{onClick:S,className:w,children:fs(Ax,{})})]})})});fZ.displayName="InputNumber";import{jsx as or,jsxs as g3}from"react/jsx-runtime";import ho from"react";import*as ht from"react";import*as Q from"react";import{hideOthers as pZ}from"aria-hidden";import{RemoveScroll as mZ}from"react-remove-scroll";import{jsx as se}from"react/jsx-runtime";var Xp=["Enter"," "],hZ=["ArrowDown","PageUp","Home"],cy=["ArrowUp","PageDown","End"],gZ=[...hZ,...cy],vZ={ltr:[...Xp,"ArrowRight"],rtl:[...Xp,"ArrowLeft"]},CZ={ltr:["ArrowLeft"],rtl:["ArrowRight"]},F1="Menu",[D1,xZ,wZ]=Fd(F1),[ps,Qp]=ze(F1,[wZ,Ca,po]),V1=Ca(),uy=po(),[dy,ni]=ps(F1),[bZ,H1]=ps(F1),fy=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:s=!0}=e,a=V1(t),[l,c]=Q.useState(null),u=Q.useRef(!1),d=yt(i),f=ri(o);return Q.useEffect(()=>{let p=()=>{u.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),se(L1,{...a,children:se(dy,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:se(bZ,{scope:t,onClose:Q.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:s,children:n})})})};fy.displayName=F1;var yZ="MenuAnchor",Jp=Q.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=V1(r);return se(M1,{...o,...n,ref:t})});Jp.displayName=yZ;var e3="MenuPortal",[SZ,py]=ps(e3,{forceMount:void 0}),my=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=ni(e3,t);return se(SZ,{scope:t,forceMount:r,children:se(ft,{present:r||i.open,children:se(ss,{asChild:!0,container:o,children:n})})})};my.displayName=e3;var tn="MenuContent",[RZ,t3]=ps(tn),hy=Q.forwardRef((e,t)=>{let r=py(tn,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=ni(tn,e.__scopeMenu),s=H1(tn,e.__scopeMenu);return se(D1.Provider,{scope:e.__scopeMenu,children:se(ft,{present:n||i.open,children:se(D1.Slot,{scope:e.__scopeMenu,children:s.modal?se(LZ,{...o,ref:t}):se(MZ,{...o,ref:t})})})})}),LZ=Q.forwardRef((e,t)=>{let r=ni(tn,e.__scopeMenu),n=Q.useRef(null),o=he(t,n);return Q.useEffect(()=>{let i=n.current;if(i)return pZ(i)},[]),se(r3,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:q(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),MZ=Q.forwardRef((e,t)=>{let r=ni(tn,e.__scopeMenu);return se(r3,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),EZ=Kr("MenuContent.ScrollLock"),r3=Q.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=ni(tn,r),v=H1(tn,r),C=V1(r),x=uy(r),w=xZ(r),[y,b]=Q.useState(null),R=Q.useRef(null),L=he(t,R,g.onContentChange),E=Q.useRef(0),S=Q.useRef(""),A=Q.useRef(0),k=Q.useRef(null),I=Q.useRef("right"),N=Q.useRef(0),D=m?mZ:Q.Fragment,F=m?{as:EZ,allowPinchZoom:!0}:void 0,H=O=>{let M=S.current+O,Z=w().filter(ae=>!ae.disabled),J=document.activeElement,T=Z.find(ae=>ae.ref.current===J)?.textValue,W=Z.map(ae=>ae.textValue),ve=_Z(W,M,T),Le=Z.find(ae=>ae.textValue===ve)?.ref.current;(function ae(pe){S.current=pe,window.clearTimeout(E.current),pe!==""&&(E.current=window.setTimeout(()=>ae(""),1e3))})(M),Le&&setTimeout(()=>Le.focus())};Q.useEffect(()=>()=>window.clearTimeout(E.current),[]),va();let P=Q.useCallback(O=>I.current===k.current?.side&&zZ(O,k.current?.area),[]);return se(RZ,{scope:r,searchRef:S,onItemEnter:Q.useCallback(O=>{P(O)&&O.preventDefault()},[P]),onItemLeave:Q.useCallback(O=>{P(O)||(R.current?.focus(),b(null))},[P]),onTriggerLeave:Q.useCallback(O=>{P(O)&&O.preventDefault()},[P]),pointerGraceTimerRef:A,onPointerGraceIntentChange:Q.useCallback(O=>{k.current=O},[]),children:se(D,{...F,children:se(is,{asChild:!0,trapped:o,onMountAutoFocus:q(i,O=>{O.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:se(os,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:se(wa,{asChild:!0,...x,dir:v.dir,orientation:"vertical",loop:n,currentTabStopId:y,onCurrentTabStopIdChange:b,onEntryFocus:q(l,O=>{v.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:se(Od,{role:"menu","aria-orientation":"vertical","data-state":Iy(g.open),"data-radix-menu-content":"",dir:v.dir,...C,...h,ref:L,style:{outline:"none",...h.style},onKeyDown:q(h.onKeyDown,O=>{let Z=O.target.closest("[data-radix-menu-content]")===O.currentTarget,J=O.ctrlKey||O.altKey||O.metaKey,T=O.key.length===1;Z&&(O.key==="Tab"&&O.preventDefault(),!J&&T&&H(O.key));let W=R.current;if(O.target!==W||!gZ.includes(O.key))return;O.preventDefault();let Le=w().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);cy.includes(O.key)&&Le.reverse(),HZ(Le)}),onBlur:q(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(E.current),S.current="")}),onPointerMove:q(e.onPointerMove,N1(O=>{let M=O.target,Z=N.current!==O.clientX;if(O.currentTarget.contains(M)&&Z){let J=O.clientX>N.current?"right":"left";I.current=J,N.current=O.clientX}}))})})})})})})});hy.displayName=tn;var TZ="MenuGroup",n3=Q.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return se(ee.div,{role:"group",...n,ref:t})});n3.displayName=TZ;var kZ="MenuLabel",gy=Q.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return se(ee.div,{...n,ref:t})});gy.displayName=kZ;var jd="MenuItem",ly="menu.itemSelect",Gd=Q.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...o}=e,i=Q.useRef(null),s=H1(jd,e.__scopeMenu),a=t3(jd,e.__scopeMenu),l=he(t,i),c=Q.useRef(!1),u=()=>{let d=i.current;if(!r&&d){let f=new CustomEvent(ly,{bubbles:!0,cancelable:!0});d.addEventListener(ly,p=>n?.(p),{once:!0}),yd(d,f),f.defaultPrevented?c.current=!1:s.onClose()}};return se(vy,{...o,ref:l,disabled:r,onClick:q(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),c.current=!0},onPointerUp:q(e.onPointerUp,d=>{c.current||d.currentTarget?.click()}),onKeyDown:q(e.onKeyDown,d=>{let f=a.searchRef.current!=="";r||f&&d.key===" "||Xp.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Gd.displayName=jd;var vy=Q.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,s=t3(jd,r),a=uy(r),l=Q.useRef(null),c=he(t,l),[u,d]=Q.useState(!1),[f,p]=Q.useState("");return Q.useEffect(()=>{let m=l.current;m&&p((m.textContent??"").trim())},[i.children]),se(D1.ItemSlot,{scope:r,disabled:n,textValue:o??f,children:se(ba,{asChild:!0,...a,focusable:!n,children:se(ee.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...i,ref:c,onPointerMove:q(e.onPointerMove,N1(m=>{n?s.onItemLeave(m):(s.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:q(e.onPointerLeave,N1(m=>s.onItemLeave(m))),onFocus:q(e.onFocus,()=>d(!0)),onBlur:q(e.onBlur,()=>d(!1))})})})}),AZ="MenuCheckboxItem",Cy=Q.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...o}=e;return se(Sy,{scope:e.__scopeMenu,checked:r,children:se(Gd,{role:"menuitemcheckbox","aria-checked":Ud(r)?"mixed":r,...o,ref:t,"data-state":s3(r),onSelect:q(o.onSelect,()=>n?.(Ud(r)?!0:!r),{checkForDefaultPrevented:!1})})})});Cy.displayName=AZ;var xy="MenuRadioGroup",[IZ,PZ]=ps(xy,{value:void 0,onValueChange:()=>{}}),wy=Q.forwardRef((e,t)=>{let{value:r,onValueChange:n,...o}=e,i=yt(n);return se(IZ,{scope:e.__scopeMenu,value:r,onValueChange:i,children:se(n3,{...o,ref:t})})});wy.displayName=xy;var by="MenuRadioItem",yy=Q.forwardRef((e,t)=>{let{value:r,...n}=e,o=PZ(by,e.__scopeMenu),i=r===o.value;return se(Sy,{scope:e.__scopeMenu,checked:i,children:se(Gd,{role:"menuitemradio","aria-checked":i,...n,ref:t,"data-state":s3(i),onSelect:q(n.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});yy.displayName=by;var o3="MenuItemIndicator",[Sy,OZ]=ps(o3,{checked:!1}),Ry=Q.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...o}=e,i=OZ(o3,r);return se(ft,{present:n||Ud(i.checked)||i.checked===!0,children:se(ee.span,{...o,ref:t,"data-state":s3(i.checked)})})});Ry.displayName=o3;var DZ="MenuSeparator",Ly=Q.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return se(ee.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});Ly.displayName=DZ;var NZ="MenuArrow",My=Q.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=V1(r);return se(Dd,{...o,...n,ref:t})});My.displayName=NZ;var i3="MenuSub",[FZ,Ey]=ps(i3),VZ=e=>{let{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,i=ni(i3,t),s=V1(t),[a,l]=Q.useState(null),[c,u]=Q.useState(null),d=yt(o);return Q.useEffect(()=>(i.open===!1&&d(!1),()=>d(!1)),[i.open,d]),se(L1,{...s,children:se(dy,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:se(FZ,{scope:t,contentId:qt(),triggerId:qt(),trigger:a,onTriggerChange:l,children:r})})})};VZ.displayName=i3;var O1="MenuSubTrigger",Ty=Q.forwardRef((e,t)=>{let r=ni(O1,e.__scopeMenu),n=H1(O1,e.__scopeMenu),o=Ey(O1,e.__scopeMenu),i=t3(O1,e.__scopeMenu),s=Q.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=i,c={__scopeMenu:e.__scopeMenu},u=Q.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return Q.useEffect(()=>u,[u]),Q.useEffect(()=>{let d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),se(Jp,{asChild:!0,...c,children:se(vy,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":Iy(r.open),...e,ref:g1(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:q(e.onPointerMove,N1(d=>{i.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!s.current&&(i.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:q(e.onPointerLeave,N1(d=>{u();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,m=p==="right",h=m?-5:5,g=f[m?"left":"right"],v=f[m?"right":"left"];i.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:g,y:f.top},{x:v,y:f.top},{x:v,y:f.bottom},{x:g,y:f.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(d),d.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:q(e.onKeyDown,d=>{let f=i.searchRef.current!=="";e.disabled||f&&d.key===" "||vZ[n.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});Ty.displayName=O1;var ky="MenuSubContent",Ay=Q.forwardRef((e,t)=>{let r=py(tn,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=ni(tn,e.__scopeMenu),s=H1(tn,e.__scopeMenu),a=Ey(ky,e.__scopeMenu),l=Q.useRef(null),c=he(t,l);return se(D1.Provider,{scope:e.__scopeMenu,children:se(ft,{present:n||i.open,children:se(D1.Slot,{scope:e.__scopeMenu,children:se(r3,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{s.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:q(e.onFocusOutside,u=>{u.target!==a.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:q(e.onEscapeKeyDown,u=>{s.onClose(),u.preventDefault()}),onKeyDown:q(e.onKeyDown,u=>{let d=u.currentTarget.contains(u.target),f=CZ[s.dir].includes(u.key);d&&f&&(i.onOpenChange(!1),a.trigger?.focus(),u.preventDefault())})})})})})});Ay.displayName=ky;function Iy(e){return e?"open":"closed"}function Ud(e){return e==="indeterminate"}function s3(e){return Ud(e)?"indeterminate":e?"checked":"unchecked"}function HZ(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function $Z(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function _Z(e,t,r){let o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=r?e.indexOf(r):-1,s=$Z(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==r));let l=s.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function BZ(e,t){let{x:r,y:n}=e,o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){let a=t[i],l=t[s],c=a.x,u=a.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function zZ(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return BZ(r,t)}function N1(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Py=fy,Oy=Jp,Dy=my,Ny=hy,Fy=n3,Vy=gy,Hy=Gd,$y=Cy,_y=wy,By=yy,zy=Ry,Zy=Ly,jy=My;var Uy=Ty,Gy=Ay;import{jsx as Ot}from"react/jsx-runtime";var Wd="DropdownMenu",[jZ,Rhe]=ze(Wd,[Qp]),nr=Qp(),[UZ,Wy]=jZ(Wd),qy=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=nr(t),c=ht.useRef(null),[u,d]=gr({prop:o,defaultProp:i??!1,onChange:s,caller:Wd});return Ot(UZ,{scope:t,triggerId:qt(),triggerRef:c,contentId:qt(),open:u,onOpenChange:d,onOpenToggle:ht.useCallback(()=>d(f=>!f),[d]),modal:a,children:Ot(Py,{...l,open:u,onOpenChange:d,dir:n,modal:a,children:r})})};qy.displayName=Wd;var Ky="DropdownMenuTrigger",GZ=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=Wy(Ky,r),s=nr(r);return Ot(Oy,{asChild:!0,...s,children:Ot(ee.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n,...o,ref:g1(t,i.triggerRef),onPointerDown:q(e.onPointerDown,a=>{!n&&a.button===0&&a.ctrlKey===!1&&(i.onOpenToggle(),i.open||a.preventDefault())}),onKeyDown:q(e.onKeyDown,a=>{n||(["Enter"," "].includes(a.key)&&i.onOpenToggle(),a.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});GZ.displayName=Ky;var WZ="DropdownMenuPortal",Yy=e=>{let{__scopeDropdownMenu:t,...r}=e,n=nr(t);return Ot(Dy,{...n,...r})};Yy.displayName=WZ;var Xy="DropdownMenuContent",Qy=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Wy(Xy,r),i=nr(r),s=ht.useRef(!1);return Ot(Ny,{id:o.contentId,"aria-labelledby":o.triggerId,...i,...n,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,a=>{s.current||o.triggerRef.current?.focus(),s.current=!1,a.preventDefault()}),onInteractOutside:q(e.onInteractOutside,a=>{let l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qy.displayName=Xy;var qZ="DropdownMenuGroup",KZ=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(Fy,{...o,...n,ref:t})});KZ.displayName=qZ;var YZ="DropdownMenuLabel",Jy=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(Vy,{...o,...n,ref:t})});Jy.displayName=YZ;var XZ="DropdownMenuItem",eS=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(Hy,{...o,...n,ref:t})});eS.displayName=XZ;var QZ="DropdownMenuCheckboxItem",tS=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot($y,{...o,...n,ref:t})});tS.displayName=QZ;var JZ="DropdownMenuRadioGroup",ej=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(_y,{...o,...n,ref:t})});ej.displayName=JZ;var tj="DropdownMenuRadioItem",rS=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(By,{...o,...n,ref:t})});rS.displayName=tj;var rj="DropdownMenuItemIndicator",nS=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(zy,{...o,...n,ref:t})});nS.displayName=rj;var nj="DropdownMenuSeparator",oS=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(Zy,{...o,...n,ref:t})});oS.displayName=nj;var oj="DropdownMenuArrow",ij=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(jy,{...o,...n,ref:t})});ij.displayName=oj;var sj="DropdownMenuSubTrigger",iS=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(Uy,{...o,...n,ref:t})});iS.displayName=sj;var aj="DropdownMenuSubContent",sS=ht.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=nr(r);return Ot(Gy,{...o,...n,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sS.displayName=aj;var aS=qy;var lS=Yy,a3=Qy;var l3=Jy,c3=eS,u3=tS;var d3=rS,f3=nS,p3=oS;var m3=iS,h3=sS;var cj=ho.forwardRef(({children:e,...t},r)=>or(aS,{...t,children:e}));var cS=ho.forwardRef(({className:e,inset:t,children:r,...n},o)=>g3(m3,{ref:o,className:B("focus:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n,children:[r,or(Ex,{className:"ml-auto"})]}));cS.displayName=m3.displayName;var uS=ho.forwardRef(({className:e,...t},r)=>or(h3,{ref:r,className:B("bg-primary-foreground text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-32 origin-[--radix-dropdown-menu-content-transform-origin] overflow-hidden rounded-md border p-1 shadow-lg",e),...t}));uS.displayName=h3.displayName;var dS=ho.forwardRef(({className:e,sideOffset:t=4,...r},n)=>or(lS,{children:or(a3,{ref:n,sideOffset:t,className:B("bg-primary-foreground text-popover-foreground z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border p-1 shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...r})}));dS.displayName=a3.displayName;var fS=ho.forwardRef(({className:e,inset:t,...r},n)=>or(c3,{ref:n,className:B("focus:bg-accent focus:text-accent-foreground hover:text-brand-0 relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...r}));fS.displayName=c3.displayName;var pS=ho.forwardRef(({className:e,children:t,checked:r,...n},o)=>g3(u3,{ref:o,className:B("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...n,children:[or("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:or(f3,{children:or(ha,{className:"size-4"})})}),t]}));pS.displayName=u3.displayName;var mS=ho.forwardRef(({className:e,children:t,...r},n)=>g3(d3,{ref:n,className:B("focus:bg-accent focus:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[or("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:or(f3,{children:or(Tx,{className:"size-2 fill-current"})})}),t]}));mS.displayName=d3.displayName;var hS=ho.forwardRef(({className:e,inset:t,...r},n)=>or(l3,{ref:n,className:B("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));hS.displayName=l3.displayName;var gS=ho.forwardRef(({className:e,...t},r)=>or(p3,{ref:r,className:B("bg-muted -mx-1 my-1 h-px",e),...t}));gS.displayName=p3.displayName;var vS=({className:e,...t})=>or("span",{className:B("ml-auto text-xs tracking-widest opacity-60",e),...t});vS.displayName="DropdownMenuShortcut";import{jsx as Ra}from"react/jsx-runtime";import*as ms from"react";var CS=ms.forwardRef(({className:e,...t},r)=>Ra("div",{ref:r,className:B("bg-card text-card-foreground text-info-primary rounded-lg border shadow-sm",e),...t}));CS.displayName="Card";var xS=ms.forwardRef(({className:e,...t},r)=>Ra("div",{ref:r,className:B("lg-desktop:px-6 lg-desktop:pt-[32px] flex flex-col space-y-1.5 px-4 pt-6",e),...t}));xS.displayName="CardHeader";var wS=ms.forwardRef(({className:e,...t},r)=>Ra("div",{ref:r,className:B("text-2xl font-semibold leading-none tracking-tight",e),...t}));wS.displayName="CardTitle";var bS=ms.forwardRef(({className:e,...t},r)=>Ra("div",{ref:r,className:B("text-muted-foreground text-sm",e),...t}));bS.displayName="CardDescription";var yS=ms.forwardRef(({className:e,...t},r)=>Ra("div",{ref:r,className:B("lg-desktop:p-6 p-4 pt-0",e),...t}));yS.displayName="CardContent";var SS=ms.forwardRef(({className:e,...t},r)=>Ra("div",{ref:r,className:B("lg-desktop:px-6 lg-desktop:pb-[32px] flex items-center px-4 pb-6 pt-0",e),...t}));SS.displayName="CardFooter";import{jsx as Ar,jsxs as G1}from"react/jsx-runtime";import*as Ne from"react";import{useRef as OS,useState as DS,useCallback as zj,useEffect as y3}from"react";function uj(e){return Object.prototype.toString.call(e)==="[object Object]"}function RS(e){return uj(e)||Array.isArray(e)}function MS(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function qd(e,t){let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;let o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:r.every(s=>{let a=e[s],l=t[s];return typeof a=="function"?`${a}`==`${l}`:!RS(a)||!RS(l)?a===l:qd(a,l)})}function LS(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function ES(e,t){if(e.length!==t.length)return!1;let r=LS(e),n=LS(t);return r.every((o,i)=>{let s=n[i];return qd(o,s)})}function x3(e){return typeof e=="number"}function v3(e){return typeof e=="string"}function Kd(e){return typeof e=="boolean"}function TS(e){return Object.prototype.toString.call(e)==="[object Object]"}function qe(e){return Math.abs(e)}function w3(e){return Math.sign(e)}function _1(e,t){return qe(e-t)}function dj(e,t){if(e===0||t===0||qe(e)<=qe(t))return 0;let r=_1(qe(e),qe(t));return qe(r/e)}function fj(e){return Math.round(e*100)/100}function B1(e){return z1(e).map(Number)}function vn(e){return e[j1(e)]}function j1(e){return Math.max(0,e.length-1)}function b3(e,t){return t===j1(e)}function kS(e,t=0){return Array.from(Array(e),(r,n)=>t+n)}function z1(e){return Object.keys(e)}function AS(e,t){return[e,t].reduce((r,n)=>(z1(n).forEach(o=>{let i=r[o],s=n[o],a=TS(i)&&TS(s);r[o]=a?AS(i,s):s}),r),{})}function C3(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function pj(e,t){let r={start:n,center:o,end:i};function n(){return 0}function o(l){return i(l)/2}function i(l){return t-l}function s(l,c){return v3(e)?r[e](l):e(t,l,c)}return{measure:s}}function Z1(){let e=[];function t(o,i,s,a={passive:!0}){let l;if("addEventListener"in o)o.addEventListener(i,s,a),l=()=>o.removeEventListener(i,s,a);else{let c=o;c.addListener(s),l=()=>c.removeListener(s)}return e.push(l),n}function r(){e=e.filter(o=>o())}let n={add:t,clear:r};return n}function mj(e,t,r,n){let o=Z1(),i=1e3/60,s=null,a=0,l=0;function c(){o.add(e,"visibilitychange",()=>{e.hidden&&m()})}function u(){p(),o.clear()}function d(g){if(!l)return;s||(s=g,r(),r());let v=g-s;for(s=g,a+=v;a>=i;)r(),a-=i;let C=a/i;n(C),l&&(l=t.requestAnimationFrame(d))}function f(){l||(l=t.requestAnimationFrame(d))}function p(){t.cancelAnimationFrame(l),s=null,a=0,l=0}function m(){s=null,a=0}return{init:c,destroy:u,start:f,stop:p,update:r,render:n}}function hj(e,t){let r=t==="rtl",n=e==="y",o=n?"y":"x",i=n?"x":"y",s=!n&&r?-1:1,a=u(),l=d();function c(m){let{height:h,width:g}=m;return n?h:g}function u(){return n?"top":r?"right":"left"}function d(){return n?"bottom":r?"left":"right"}function f(m){return m*s}return{scroll:o,cross:i,startEdge:a,endEdge:l,measureSize:c,direction:f}}function hs(e=0,t=0){let r=qe(e-t);function n(c){return c<e}function o(c){return c>t}function i(c){return n(c)||o(c)}function s(c){return i(c)?n(c)?e:t:c}function a(c){return r?c-r*Math.ceil((c-t)/r):c}return{length:r,max:t,min:e,constrain:s,reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:a}}function IS(e,t,r){let{constrain:n}=hs(0,e),o=e+1,i=s(t);function s(f){return r?qe((o+f)%o):n(f)}function a(){return i}function l(f){return i=s(f),d}function c(f){return u().set(a()+f)}function u(){return IS(e,a(),r)}let d={get:a,set:l,add:c,clone:u};return d}function gj(e,t,r,n,o,i,s,a,l,c,u,d,f,p,m,h,g,v,C){let{cross:x,direction:w}=e,y=["INPUT","SELECT","TEXTAREA"],b={passive:!1},R=Z1(),L=Z1(),E=hs(50,225).constrain(p.measure(20)),S={mouse:300,touch:400},A={mouse:500,touch:600},k=m?43:25,I=!1,N=0,D=0,F=!1,H=!1,P=!1,O=!1;function M(G){if(!C)return;function Ce(Et){(Kd(C)||C(G,Et))&&Le(Et)}let Ke=t;R.add(Ke,"dragstart",Et=>Et.preventDefault(),b).add(Ke,"touchmove",()=>{},b).add(Ke,"touchend",()=>{}).add(Ke,"touchstart",Ce).add(Ke,"mousedown",Ce).add(Ke,"touchcancel",pe).add(Ke,"contextmenu",pe).add(Ke,"click",Mt,!0)}function Z(){R.clear(),L.clear()}function J(){let G=O?r:t;L.add(G,"touchmove",ae,b).add(G,"touchend",pe).add(G,"mousemove",ae,b).add(G,"mouseup",pe)}function T(G){let Ce=G.nodeName||"";return y.includes(Ce)}function W(){return(m?A:S)[O?"mouse":"touch"]}function ve(G,Ce){let Ke=d.add(w3(G)*-1),Et=u.byDistance(G,!m).distance;return m||qe(G)<E?Et:g&&Ce?Et*.5:u.byIndex(Ke.get(),0).distance}function Le(G){let Ce=C3(G,n);O=Ce,P=m&&Ce&&!G.buttons&&I,I=_1(o.get(),s.get())>=2,!(Ce&&G.button!==0)&&(T(G.target)||(F=!0,i.pointerDown(G),c.useFriction(0).useDuration(0),o.set(s),J(),N=i.readPoint(G),D=i.readPoint(G,x),f.emit("pointerDown")))}function ae(G){if(!C3(G,n)&&G.touches.length>=2)return pe(G);let Ke=i.readPoint(G),Et=i.readPoint(G,x),Sr=_1(Ke,N),Hr=_1(Et,D);if(!H&&!O&&(!G.cancelable||(H=Sr>Hr,!H)))return pe(G);let yn=i.pointerMove(G);Sr>h&&(P=!0),c.useFriction(.3).useDuration(.75),a.start(),o.add(w(yn)),G.preventDefault()}function pe(G){let Ke=u.byDistance(0,!1).index!==d.get(),Et=i.pointerUp(G)*W(),Sr=ve(w(Et),Ke),Hr=dj(Et,Sr),yn=k-10*Hr,Sn=v+Hr/50;H=!1,F=!1,L.clear(),c.useDuration(yn).useFriction(Sn),l.distance(Sr,!m),O=!1,f.emit("pointerUp")}function Mt(G){P&&(G.stopPropagation(),G.preventDefault(),P=!1)}function Be(){return F}return{init:M,destroy:Z,pointerDown:Be}}function vj(e,t){let n,o;function i(d){return d.timeStamp}function s(d,f){let m=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(C3(d,t)?d:d.touches[0])[m]}function a(d){return n=d,o=d,s(d)}function l(d){let f=s(d)-s(o),p=i(d)-i(n)>170;return o=d,p&&(n=d),f}function c(d){if(!n||!o)return 0;let f=s(o)-s(n),p=i(d)-i(n),m=i(d)-i(o)>170,h=f/p;return p&&!m&&qe(h)>.1?h:0}return{pointerDown:a,pointerMove:l,pointerUp:c,readPoint:s}}function Cj(){function e(r){let{offsetTop:n,offsetLeft:o,offsetWidth:i,offsetHeight:s}=r;return{top:n,right:o+i,bottom:n+s,left:o,width:i,height:s}}return{measure:e}}function xj(e){function t(n){return e*(n/100)}return{measure:t}}function wj(e,t,r,n,o,i,s){let a=[e].concat(n),l,c,u=[],d=!1;function f(g){return o.measureSize(s.measure(g))}function p(g){if(!i)return;c=f(e),u=n.map(f);function v(C){for(let x of C){if(d)return;let w=x.target===e,y=n.indexOf(x.target),b=w?c:u[y],R=f(w?e:n[y]);if(qe(R-b)>=.5){g.reInit(),t.emit("resize");break}}}l=new ResizeObserver(C=>{(Kd(i)||i(g,C))&&v(C)}),r.requestAnimationFrame(()=>{a.forEach(C=>l.observe(C))})}function m(){d=!0,l&&l.disconnect()}return{init:p,destroy:m}}function bj(e,t,r,n,o,i){let s=0,a=0,l=o,c=i,u=e.get(),d=0;function f(){let b=n.get()-e.get(),R=!l,L=0;return R?(s=0,r.set(n),e.set(n),L=b):(r.set(e),s+=b/l,s*=c,u+=s,e.add(s),L=u-d),a=w3(L),d=u,y}function p(){let b=n.get()-t.get();return qe(b)<.001}function m(){return l}function h(){return a}function g(){return s}function v(){return x(o)}function C(){return w(i)}function x(b){return l=b,y}function w(b){return c=b,y}let y={direction:h,duration:m,velocity:g,seek:f,settled:p,useBaseFriction:C,useBaseDuration:v,useFriction:w,useDuration:x};return y}function yj(e,t,r,n,o){let i=o.measure(10),s=o.measure(50),a=hs(.1,.99),l=!1;function c(){return!(l||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function u(p){if(!c())return;let m=e.reachedMin(t.get())?"min":"max",h=qe(e[m]-t.get()),g=r.get()-t.get(),v=a.constrain(h/s);r.subtract(g*v),!p&&qe(g)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:c,constrain:u,toggleActive:d}}function Sj(e,t,r,n,o){let i=hs(-t+e,0),s=d(),a=u(),l=f();function c(m,h){return _1(m,h)<=1}function u(){let m=s[0],h=vn(s),g=s.lastIndexOf(m),v=s.indexOf(h)+1;return hs(g,v)}function d(){return r.map((m,h)=>{let{min:g,max:v}=i,C=i.constrain(m),x=!h,w=b3(r,h);return x?v:w||c(g,C)?g:c(v,C)?v:C}).map(m=>parseFloat(m.toFixed(3)))}function f(){if(t<=e+o)return[i.max];if(n==="keepSnaps")return s;let{min:m,max:h}=a;return s.slice(m,h)}return{snapsContained:l,scrollContainLimit:a}}function Rj(e,t,r){let n=t[0],o=r?n-e:vn(t);return{limit:hs(o,n)}}function Lj(e,t,r,n){let i=t.min+.1,s=t.max+.1,{reachedMin:a,reachedMax:l}=hs(i,s);function c(f){return f===1?l(r.get()):f===-1?a(r.get()):!1}function u(f){if(!c(f))return;let p=e*(f*-1);n.forEach(m=>m.add(p))}return{loop:u}}function Mj(e){let{max:t,length:r}=e;function n(i){let s=i-t;return r?s/-r:0}return{get:n}}function Ej(e,t,r,n,o){let{startEdge:i,endEdge:s}=e,{groupSlides:a}=o,l=d().map(t.measure),c=f(),u=p();function d(){return a(n).map(h=>vn(h)[s]-h[0][i]).map(qe)}function f(){return n.map(h=>r[i]-h[i]).map(h=>-qe(h))}function p(){return a(c).map(h=>h[0]).map((h,g)=>h+l[g])}return{snaps:c,snapsAligned:u}}function Tj(e,t,r,n,o,i){let{groupSlides:s}=o,{min:a,max:l}=n,c=u();function u(){let f=s(i),p=!e||t==="keepSnaps";return r.length===1?[i]:p?f:f.slice(a,l).map((m,h,g)=>{let v=!h,C=b3(g,h);if(v){let x=vn(g[0])+1;return kS(x)}if(C){let x=j1(i)-vn(g)[0]+1;return kS(x,vn(g)[0])}return m})}return{slideRegistry:c}}function kj(e,t,r,n,o){let{reachedAny:i,removeOffset:s,constrain:a}=n;function l(m){return m.concat().sort((h,g)=>qe(h)-qe(g))[0]}function c(m){let h=e?s(m):a(m),g=t.map((C,x)=>({diff:u(C-h,0),index:x})).sort((C,x)=>qe(C.diff)-qe(x.diff)),{index:v}=g[0];return{index:v,distance:h}}function u(m,h){let g=[m,m+r,m-r];if(!e)return m;if(!h)return l(g);let v=g.filter(C=>w3(C)===h);return v.length?l(v):vn(g)-r}function d(m,h){let g=t[m]-o.get(),v=u(g,h);return{index:m,distance:v}}function f(m,h){let g=o.get()+m,{index:v,distance:C}=c(g),x=!e&&i(g);if(!h||x)return{index:v,distance:m};let w=t[v]-C,y=m+u(w,0);return{index:v,distance:y}}return{byDistance:f,byIndex:d,shortcut:u}}function Aj(e,t,r,n,o,i,s){function a(d){let f=d.distance,p=d.index!==t.get();i.add(f),f&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(r.set(t.get()),t.set(d.index),s.emit("select"))}function l(d,f){let p=o.byDistance(d,f);a(p)}function c(d,f){let p=t.clone().set(d),m=o.byIndex(p.get(),f);a(m)}return{distance:l,index:c}}function Ij(e,t,r,n,o,i,s,a){let l={passive:!0,capture:!0},c=0;function u(p){if(!a)return;function m(h){if(new Date().getTime()-c>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;let C=r.findIndex(x=>x.includes(h));x3(C)&&(o.useDuration(0),n.index(C,0),s.emit("slideFocus"))}i.add(document,"keydown",d,!1),t.forEach((h,g)=>{i.add(h,"focus",v=>{(Kd(a)||a(p,v))&&m(g)},l)})}function d(p){p.code==="Tab"&&(c=new Date().getTime())}return{init:u}}function $1(e){let t=e;function r(){return t}function n(l){t=s(l)}function o(l){t+=s(l)}function i(l){t-=s(l)}function s(l){return x3(l)?l:l.get()}return{get:r,set:n,add:o,subtract:i}}function PS(e,t){let r=e.scroll==="x"?s:a,n=t.style,o=null,i=!1;function s(f){return`translate3d(${f}px,0px,0px)`}function a(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(i)return;let p=fj(e.direction(f));p!==o&&(n.transform=r(p),o=p)}function c(f){i=!f}function u(){i||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function Pj(e,t,r,n,o,i,s,a,l){let u=B1(o),d=B1(o).reverse(),f=v().concat(C());function p(R,L){return R.reduce((E,S)=>E-o[S],L)}function m(R,L){return R.reduce((E,S)=>p(E,L)>0?E.concat([S]):E,[])}function h(R){return i.map((L,E)=>({start:L-n[E]+.5+R,end:L+t-.5+R}))}function g(R,L,E){let S=h(L);return R.map(A=>{let k=E?0:-r,I=E?r:0,N=E?"end":"start",D=S[A][N];return{index:A,loopPoint:D,slideLocation:$1(-1),translate:PS(e,l[A]),target:()=>a.get()>D?k:I}})}function v(){let R=s[0],L=m(d,R);return g(L,r,!1)}function C(){let R=t-s[0]-1,L=m(u,R);return g(L,-r,!0)}function x(){return f.every(({index:R})=>{let L=u.filter(E=>E!==R);return p(L,t)<=.1})}function w(){f.forEach(R=>{let{target:L,translate:E,slideLocation:S}=R,A=L();A!==S.get()&&(E.to(A),S.set(A))})}function y(){f.forEach(R=>R.translate.clear())}return{canLoop:x,clear:y,loop:w,loopPoints:f}}function Oj(e,t,r){let n,o=!1;function i(l){if(!r)return;function c(u){for(let d of u)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{o||(Kd(r)||r(l,u))&&c(u)}),n.observe(e,{childList:!0})}function s(){n&&n.disconnect(),o=!0}return{init:i,destroy:s}}function Dj(e,t,r,n){let o={},i=null,s=null,a,l=!1;function c(){a=new IntersectionObserver(m=>{l||(m.forEach(h=>{let g=t.indexOf(h.target);o[g]=h}),i=null,s=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(m=>a.observe(m))}function u(){a&&a.disconnect(),l=!0}function d(m){return z1(o).reduce((h,g)=>{let v=parseInt(g),{isIntersecting:C}=o[v];return(m&&C||!m&&!C)&&h.push(v),h},[])}function f(m=!0){if(m&&i)return i;if(!m&&s)return s;let h=d(m);return m&&(i=h),m||(s=h),h}return{init:c,destroy:u,get:f}}function Nj(e,t,r,n,o,i){let{measureSize:s,startEdge:a,endEdge:l}=e,c=r[0]&&o,u=m(),d=h(),f=r.map(s),p=g();function m(){if(!c)return 0;let C=r[0];return qe(t[a]-C[a])}function h(){if(!c)return 0;let C=i.getComputedStyle(vn(n));return parseFloat(C.getPropertyValue(`margin-${l}`))}function g(){return r.map((C,x,w)=>{let y=!x,b=b3(w,x);return y?f[x]+u:b?f[x]+d:w[x+1][a]-C[a]}).map(qe)}return{slideSizes:f,slideSizesWithGaps:p,startGap:u,endGap:d}}function Fj(e,t,r,n,o,i,s,a,l){let{startEdge:c,endEdge:u,direction:d}=e,f=x3(r);function p(v,C){return B1(v).filter(x=>x%C===0).map(x=>v.slice(x,x+C))}function m(v){return v.length?B1(v).reduce((C,x,w)=>{let y=vn(C)||0,b=y===0,R=x===j1(v),L=o[c]-i[y][c],E=o[c]-i[x][u],S=!n&&b?d(s):0,A=!n&&R?d(a):0,k=qe(E-A-(L+S));return w&&k>t+l&&C.push(x),R&&C.push(v.length),C},[]).map((C,x,w)=>{let y=Math.max(w[x-1]||0);return v.slice(y,C)}):[]}function h(v){return f?p(v,r):m(v)}return{groupSlides:h}}function Vj(e,t,r,n,o,i,s){let{align:a,axis:l,direction:c,startIndex:u,loop:d,duration:f,dragFree:p,dragThreshold:m,inViewThreshold:h,slidesToScroll:g,skipSnaps:v,containScroll:C,watchResize:x,watchSlides:w,watchDrag:y,watchFocus:b}=i,R=2,L=Cj(),E=L.measure(t),S=r.map(L.measure),A=hj(l,c),k=A.measureSize(E),I=xj(k),N=pj(a,k),D=!d&&!!C,F=d||!!C,{slideSizes:H,slideSizesWithGaps:P,startGap:O,endGap:M}=Nj(A,E,S,r,F,o),Z=Fj(A,k,g,d,E,S,O,M,R),{snaps:J,snapsAligned:T}=Ej(A,N,E,S,Z),W=-vn(J)+vn(P),{snapsContained:ve,scrollContainLimit:Le}=Sj(k,W,T,C,R),ae=D?ve:T,{limit:pe}=Rj(W,ae,d),Mt=IS(j1(ae),u,d),Be=Mt.clone(),Re=B1(r),G=({dragHandler:xe,scrollBody:Me,scrollBounds:Qt,options:{loop:Rr}})=>{Rr||Qt.constrain(xe.pointerDown()),Me.seek()},Ce=({scrollBody:xe,translate:Me,location:Qt,offsetLocation:Rr,previousLocation:sn,scrollLooper:Mi,slideLooper:Ei,dragHandler:Ue,animation:xl,eventHandler:$r,scrollBounds:hk,options:{loop:h4}},g4)=>{let v4=xe.settled(),gk=!hk.shouldConstrain(),C4=h4?v4:v4&&gk,x4=C4&&!Ue.pointerDown();x4&&xl.stop();let vk=Qt.get()*g4+sn.get()*(1-g4);Rr.set(vk),h4&&(Mi.loop(xe.direction()),Ei.loop()),Me.to(Rr.get()),x4&&$r.emit("settle"),C4||$r.emit("scroll")},Ke=mj(n,o,()=>G(re),xe=>Ce(re,xe)),Et=.68,Sr=ae[Mt.get()],Hr=$1(Sr),yn=$1(Sr),Sn=$1(Sr),Rn=$1(Sr),Oo=bj(Hr,Sn,yn,Rn,f,Et),vl=kj(d,ae,W,pe,Rn),Cl=Aj(Ke,Mt,Be,Oo,vl,Rn,s),kc=Mj(pe),Ac=Z1(),Y2=Dj(t,r,s,h),{slideRegistry:V}=Tj(D,C,ae,Le,Z,Re),z=Ij(e,r,V,Cl,Oo,Ac,s,b),re={ownerDocument:n,ownerWindow:o,eventHandler:s,containerRect:E,slideRects:S,animation:Ke,axis:A,dragHandler:gj(A,e,n,o,Rn,vj(A,o),Hr,Ke,Cl,Oo,vl,Mt,s,I,p,m,v,Et,y),eventStore:Ac,percentOfView:I,index:Mt,indexPrevious:Be,limit:pe,location:Hr,offsetLocation:Sn,previousLocation:yn,options:i,resizeHandler:wj(t,s,o,r,A,x,L),scrollBody:Oo,scrollBounds:yj(pe,Sn,Rn,Oo,I),scrollLooper:Lj(W,pe,Sn,[Hr,Sn,yn,Rn]),scrollProgress:kc,scrollSnapList:ae.map(kc.get),scrollSnaps:ae,scrollTarget:vl,scrollTo:Cl,slideLooper:Pj(A,k,W,H,P,J,ae,Sn,r),slideFocus:z,slidesHandler:Oj(t,s,w),slidesInView:Y2,slideIndexes:Re,slideRegistry:V,slidesToScroll:Z,target:Rn,translate:PS(A,t)};return re}function Hj(){let e={},t;function r(c){t=c}function n(c){return e[c]||[]}function o(c){return n(c).forEach(u=>u(t,c)),l}function i(c,u){return e[c]=n(c).concat([u]),l}function s(c,u){return e[c]=n(c).filter(d=>d!==u),l}function a(){e={}}let l={init:r,emit:o,off:s,on:i,clear:a};return l}var $j={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function _j(e){function t(i,s){return AS(i,s||{})}function r(i){let s=i.breakpoints||{},a=z1(s).filter(l=>e.matchMedia(l).matches).map(l=>s[l]).reduce((l,c)=>t(l,c),{});return t(i,a)}function n(i){return i.map(s=>z1(s.breakpoints||{})).reduce((s,a)=>s.concat(a),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function Bj(e){let t=[];function r(i,s){return t=s.filter(({options:a})=>e.optionsAtMedia(a).active!==!1),t.forEach(a=>a.init(i,e)),s.reduce((a,l)=>Object.assign(a,{[l.name]:l}),{})}function n(){t=t.filter(i=>i.destroy())}return{init:r,destroy:n}}function U1(e,t,r){let n=e.ownerDocument,o=n.defaultView,i=_j(o),s=Bj(i),a=Z1(),l=Hj(),{mergeOptions:c,optionsAtMedia:u,optionsMediaQueries:d}=i,{on:f,off:p,emit:m}=l,h=A,g=!1,v,C=c($j,U1.globalOptions),x=c(C),w=[],y,b,R;function L(){let{container:Re,slides:G}=x;b=(v3(Re)?e.querySelector(Re):Re)||e.children[0];let Ke=v3(G)?b.querySelectorAll(G):G;R=[].slice.call(Ke||b.children)}function E(Re){let G=Vj(e,b,R,n,o,Re,l);if(Re.loop&&!G.slideLooper.canLoop()){let Ce=Object.assign({},Re,{loop:!1});return E(Ce)}return G}function S(Re,G){g||(C=c(C,Re),x=u(C),w=G||w,L(),v=E(x),d([C,...w.map(({options:Ce})=>Ce)]).forEach(Ce=>a.add(Ce,"change",A)),x.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(Be),v.eventHandler.init(Be),v.resizeHandler.init(Be),v.slidesHandler.init(Be),v.options.loop&&v.slideLooper.loop(),b.offsetParent&&R.length&&v.dragHandler.init(Be),y=s.init(Be,w)))}function A(Re,G){let Ce=Z();k(),S(c({startIndex:Ce},Re),G),l.emit("reInit")}function k(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),s.destroy(),a.clear()}function I(){g||(g=!0,a.clear(),k(),l.emit("destroy"),l.clear())}function N(Re,G,Ce){!x.active||g||(v.scrollBody.useBaseFriction().useDuration(G===!0?0:x.duration),v.scrollTo.index(Re,Ce||0))}function D(Re){let G=v.index.add(1).get();N(G,Re,-1)}function F(Re){let G=v.index.add(-1).get();N(G,Re,1)}function H(){return v.index.add(1).get()!==Z()}function P(){return v.index.add(-1).get()!==Z()}function O(){return v.scrollSnapList}function M(){return v.scrollProgress.get(v.offsetLocation.get())}function Z(){return v.index.get()}function J(){return v.indexPrevious.get()}function T(){return v.slidesInView.get()}function W(){return v.slidesInView.get(!1)}function ve(){return y}function Le(){return v}function ae(){return e}function pe(){return b}function Mt(){return R}let Be={canScrollNext:H,canScrollPrev:P,containerNode:pe,internalEngine:Le,destroy:I,off:p,on:f,emit:m,plugins:ve,previousScrollSnap:J,reInit:h,rootNode:ae,scrollNext:D,scrollPrev:F,scrollProgress:M,scrollSnapList:O,scrollTo:N,selectedScrollSnap:Z,slideNodes:Mt,slidesInView:T,slidesNotInView:W};return S(t,r),setTimeout(()=>l.emit("init"),0),Be}U1.globalOptions=void 0;function Yd(e={},t=[]){let r=OS(e),n=OS(t),[o,i]=DS(),[s,a]=DS(),l=zj(()=>{o&&o.reInit(r.current,n.current)},[o]);return y3(()=>{qd(r.current,e)||(r.current=e,l())},[e,l]),y3(()=>{ES(n.current,t)||(n.current=t,l())},[t,l]),y3(()=>{if(MS()&&s){U1.globalOptions=Yd.globalOptions;let c=U1(s,r.current,n.current);return i(c),()=>c.destroy()}else i(void 0)},[s,i]),[a,o]}Yd.globalOptions=void 0;var Zj=(e,t)=>{let[r,n]=Ne.useState(0),[o,i]=Ne.useState([]),s=Ne.useCallback(c=>{e&&(e.scrollTo(c),t&&t(e))},[e,t]),a=Ne.useCallback(c=>{i(c.scrollSnapList())},[]),l=Ne.useCallback(c=>{n(c.selectedScrollSnap())},[]);return Ne.useEffect(()=>{e&&(a(e),l(e),e.on("reInit",a).on("reInit",l).on("select",l))},[e,a,l]),{selectedIndex:r,scrollSnaps:o,onDotButtonClick:s}},jj=e=>{let{children:t,...r}=e;return Ar("button",{type:"button",...r,children:t})},NS=Ne.createContext(null);function Xd(){let e=Ne.useContext(NS);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var FS=Ne.forwardRef(({orientation:e="horizontal",showNavigation:t=!1,navigationPosition:r="inner",opts:n,setApi:o,plugins:i,className:s,children:a,...l},c)=>{let[u,d]=Yd({...n,axis:e==="horizontal"?"x":"y"},i),[f,p]=Ne.useState(!1),[m,h]=Ne.useState(!1),{selectedIndex:g,scrollSnaps:v,onDotButtonClick:C}=Zj(d),x=Ne.useCallback(R=>{R&&(p(R.canScrollPrev()),h(R.canScrollNext()))},[]),w=Ne.useCallback(()=>{d?.scrollPrev()},[d]),y=Ne.useCallback(()=>{d?.scrollNext()},[d]),b=Ne.useCallback(R=>{R.key==="ArrowLeft"?(R.preventDefault(),w()):R.key==="ArrowRight"&&(R.preventDefault(),y())},[w,y]);return Ne.useEffect(()=>{!d||!o||o(d)},[d,o]),Ne.useEffect(()=>{if(d)return x(d),d.on("reInit",x),d.on("select",x),()=>{d?.off("select",x)}},[d,x]),Ar(NS.Provider,{value:{carouselRef:u,api:d,opts:n,orientation:e||(n?.axis==="y"?"vertical":"horizontal"),scrollPrev:w,scrollNext:y,canScrollPrev:f,canScrollNext:m},children:G1("div",{ref:c,onKeyDownCapture:b,className:B("relative",s),role:"region","aria-roledescription":"carousel",...l,children:[a,t&&Ar("div",{className:B("absolute left-1/2 mx-auto flex -translate-x-1/2 justify-center gap-[8px]",{"laptop:bottom-[40px] bottom-[24px]":r==="inner","laptop:-bottom-[40px] -bottom-[24px]":r==="outter"}),children:v.map((R,L)=>Ar(jj,{onClick:()=>C(L),className:B("laptop:w-[30px] h-[3px] w-[16px] bg-[#86868C]",{"bg-[#1D1D1F]":L===g})},L))})]})})});FS.displayName="Carousel";var VS=Ne.forwardRef(({className:e,...t},r)=>{let{carouselRef:n,orientation:o}=Xd();return Ar("div",{ref:n,className:"overflow-hidden",children:Ar("div",{ref:r,className:B("flex",o==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})});VS.displayName="CarouselContent";var HS=Ne.forwardRef(({className:e,...t},r)=>{let{orientation:n}=Xd();return Ar("div",{ref:r,role:"group","aria-roledescription":"slide",className:B("w-0 shrink-0 grow-0 basis-full",n==="horizontal"?"pl-4":"pt-4",e),...t})});HS.displayName="CarouselItem";var $S=Ne.forwardRef(({className:e,variant:t="secondary",size:r="icon",children:n,...o},i)=>{let{orientation:s,scrollPrev:a,canScrollPrev:l}=Xd();return G1(Oe,{ref:i,variant:t,size:r,className:B("absolute size-8 rounded-full",s==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:a,...o,children:[n||G1("svg",{width:"58",height:"58",viewBox:"0 0 58 58",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ar("circle",{opacity:"0.2",cx:"29",cy:"29",r:"29",transform:"matrix(1 -8.74228e-08 -8.74228e-08 -1 0 58)",fill:"#1D1D1F"}),Ar("path",{d:"M32.1583 36.8248C32.6139 36.3692 32.6139 35.6305 32.1583 35.1749L25.9832 28.9998L32.1583 22.8248C32.6139 22.3692 32.6139 21.6305 32.1583 21.1749C31.7027 20.7193 30.964 20.7193 30.5084 21.1749L23.5084 28.1749C23.0528 28.6305 23.0528 29.3692 23.5084 29.8248L30.5084 36.8248C30.964 37.2804 31.7027 37.2804 32.1583 36.8248Z",fill:"white"})]}),Ar("span",{className:"sr-only",children:"Previous slide"})]})});$S.displayName="CarouselPrevious";var _S=Ne.forwardRef(({className:e,variant:t="secondary",size:r="icon",children:n,...o},i)=>{let{orientation:s,scrollNext:a,canScrollNext:l}=Xd();return G1(Oe,{ref:i,variant:t,size:r,className:B("absolute size-8 rounded-full",s==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!l,onClick:a,...o,children:[n||G1("svg",{width:"58",height:"58",viewBox:"0 0 58 58",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ar("circle",{opacity:"0.2",cx:"29",cy:"29",r:"29",transform:"rotate(-180 29 29)",fill:"#1D1D1F"}),Ar("path",{d:"M25.8417 36.8248C25.3861 36.3692 25.3861 35.6305 25.8417 35.1749L32.0168 28.9998L25.8417 22.8248C25.3861 22.3692 25.3861 21.6305 25.8417 21.1749C26.2973 20.7193 27.036 20.7193 27.4916 21.1749L34.4916 28.1749C34.9472 28.6305 34.9472 29.3692 34.4916 29.8248L27.4916 36.8248C27.036 37.2804 26.2973 37.2804 25.8417 36.8248Z",fill:"white"})]}),Ar("span",{className:"sr-only",children:"Next slide"})]})});_S.displayName="CarouselNext";import{jsx as W1}from"react/jsx-runtime";import*as $n from"react";import*as go from"react";import{jsx as oi}from"react/jsx-runtime";var Qd="Tabs",[Uj,nge]=ze(Qd,[po]),BS=po(),[Gj,S3]=Uj(Qd),zS=go.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:i,orientation:s="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=ri(a),[d,f]=gr({prop:n,onChange:o,defaultProp:i??"",caller:Qd});return oi(Gj,{scope:r,baseId:qt(),value:d,onValueChange:f,orientation:s,dir:u,activationMode:l,children:oi(ee.div,{dir:u,"data-orientation":s,...c,ref:t})})});zS.displayName=Qd;var ZS="TabsList",jS=go.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,i=S3(ZS,r),s=BS(r);return oi(wa,{asChild:!0,...s,orientation:i.orientation,dir:i.dir,loop:n,children:oi(ee.div,{role:"tablist","aria-orientation":i.orientation,...o,ref:t})})});jS.displayName=ZS;var US="TabsTrigger",GS=go.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...i}=e,s=S3(US,r),a=BS(r),l=KS(s.baseId,n),c=YS(s.baseId,n),u=n===s.value;return oi(ba,{asChild:!0,...a,focusable:!o,active:u,children:oi(ee.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...i,ref:t,onMouseDown:q(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?s.onValueChange(n):d.preventDefault()}),onKeyDown:q(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(n)}),onFocus:q(e.onFocus,()=>{let d=s.activationMode!=="manual";!u&&!o&&d&&s.onValueChange(n)})})})});GS.displayName=US;var WS="TabsContent",qS=go.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:o,children:i,...s}=e,a=S3(WS,r),l=KS(a.baseId,n),c=YS(a.baseId,n),u=n===a.value,d=go.useRef(u);return go.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),oi(ft,{present:o||u,children:({present:f})=>oi(ee.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&i})})});qS.displayName=WS;function KS(e,t){return`${e}-trigger-${t}`}function YS(e,t){return`${e}-content-${t}`}var XS=zS,R3=jS,L3=GS,M3=qS;var E3=$n.createContext({align:"left",shape:"square"}),_n=$n.forwardRef(({children:e,align:t="left",shape:r="square",...n},o)=>W1(XS,{ref:o,...n,children:W1(E3.Provider,{value:{align:t,shape:r},children:e})}));_n.displayName="Tabs";var qj=Pe("",{variants:{align:{left:"justify-left",center:"justify-center",right:"justify-end"},shape:{rounded:"rounded-[28px]",square:"rounded-none"}},defaultVariants:{align:"left",shape:"square"}}),Kj=Pe("",{variants:{shape:{rounded:"rounded-[28px]",square:"rounded-none"}},defaultVariants:{shape:"square"}}),Bn=$n.forwardRef(({className:e,...t},r)=>{let{align:n,shape:o}=$n.useContext(E3);return W1(R3,{ref:r,className:B("bg-tabs-list-bg flex w-fit max-w-full overflow-x-auto p-1",qj({align:n,shape:o}),e),style:{scrollbarWidth:"none",msOverflowStyle:"none"},...t})});Bn.displayName=R3.displayName;var zn=$n.forwardRef(({className:e,onClick:t,...r},n)=>{let{shape:o}=$n.useContext(E3),i=s=>{t?.(s);let a=s?.currentTarget,l=s?.currentTarget?.parentElement;if(a&&l){let c=a.offsetLeft,u=a.offsetWidth,d=l.offsetWidth,f=c-d/2+u/2;l.scrollTo({left:f,behavior:"smooth"})}};return W1(L3,{ref:n,className:B("text-info-primary lg-desktop:text-base disabled:text-btn-secondary-disabled lg-desktop:px-[28px] lg-desktop:pt-[15px] lg-desktop:pb-[14px] shrink-0 px-5 pb-2.5 pt-[11px] text-sm font-bold data-[state=active]:bg-white data-[state=active]:text-[#1d1d1d]",e,Kj({shape:o})),onClick:i,...r})});zn.displayName=L3.displayName;var QS=$n.forwardRef(({className:e,...t},r)=>W1(M3,{ref:r,className:B(e),...t}));QS.displayName=M3.displayName;import{jsx as Ir,jsxs as q1}from"react/jsx-runtime";import*as Jd from"react";var Yj=Pe("[&>svg:first-child]:text-foreground relative w-full rounded-lg border px-4 py-3 text-sm [&>:first-child]:absolute [&>svg:first-child+div]:translate-y-[-3px] [&>svg:first-child]:left-4 [&>svg:first-child]:top-2 [&>svg:first-child~*]:pl-7",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg:first-child]:text-destructive"}},defaultVariants:{variant:"default"}}),Xj=()=>Ir("svg",{className:"close absolute right-4 top-2 size-6 cursor-pointer !pl-0",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ir("path",{d:"M15.3452 16.4762L12.1377 13.2687L8.92973 16.4767C8.61712 16.7893 8.11029 16.7891 7.79766 16.4765C7.48505 16.1638 7.4848 15.657 7.79741 15.3444L11.0054 12.1364L7.79791 8.92891C7.48503 8.61603 7.48503 8.10946 7.79765 7.79683C8.11015 7.48433 8.61688 7.48424 8.92973 7.79709L12.1372 11.0046L15.3452 7.79658C15.6577 7.48408 16.1646 7.48421 16.4772 7.79683C16.7899 8.10946 16.79 8.61641 16.4775 8.9289L13.2695 12.1369L16.477 15.3444C16.7899 15.6572 16.7898 16.1639 16.4773 16.4764C16.1647 16.789 15.6581 16.789 15.3452 16.4762L15.3452 16.4762Z",fill:"#1D1D1F"})}),Qj={info:q1("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ir("circle",{cx:"12",cy:"12",r:"10.5",fill:"#00BEFA"}),Ir("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1249 7.13281C13.1249 6.51149 12.6213 6.00781 11.9999 6.00781C11.3786 6.00781 10.8749 6.51149 10.8749 7.13281V13.1328C10.8749 13.7541 11.3786 14.2578 11.9999 14.2578C12.6213 14.2578 13.1249 13.7541 13.1249 13.1328V7.13281ZM13.3499 16.6342C13.3499 15.8886 12.7455 15.2842 11.9999 15.2842C11.2543 15.2842 10.6499 15.8886 10.6499 16.6342C10.6499 17.3798 11.2543 17.9842 11.9999 17.9842C12.7455 17.9842 13.3499 17.3798 13.3499 16.6342Z",fill:"white"})]}),success:q1("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ir("circle",{cx:"12.5",cy:"12.5",r:"10.5",fill:"#30D158"}),Ir("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.3976 8.6772C18.0468 8.32635 17.478 8.32635 17.1271 8.6772L11.5586 14.2457L8.15843 10.8456C7.80758 10.4947 7.23874 10.4947 6.88789 10.8456C6.53704 11.1964 6.53704 11.7653 6.88789 12.1161L10.849 16.0772C10.8632 16.0914 10.8778 16.1051 10.8928 16.1182C10.9028 16.1293 10.9132 16.1402 10.9239 16.1509C11.2748 16.5018 11.8436 16.5018 12.1945 16.1509L18.3976 9.94773C18.7485 9.59688 18.7485 9.02805 18.3976 8.6772Z",fill:"white"})]}),warning:q1("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ir("circle",{cx:"12",cy:"12",r:"10.5",fill:"#FFC24D"}),Ir("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1249 7.13281C13.1249 6.51149 12.6213 6.00781 11.9999 6.00781C11.3786 6.00781 10.8749 6.51149 10.8749 7.13281V13.1328C10.8749 13.7541 11.3786 14.2578 11.9999 14.2578C12.6213 14.2578 13.1249 13.7541 13.1249 13.1328V7.13281ZM13.3499 16.6342C13.3499 15.8886 12.7455 15.2842 11.9999 15.2842C11.2543 15.2842 10.6499 15.8886 10.6499 16.6342C10.6499 17.3798 11.2543 17.9842 11.9999 17.9842C12.7455 17.9842 13.3499 17.3798 13.3499 16.6342Z",fill:"white"})]}),error:q1("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ir("circle",{cx:"12",cy:"12",r:"10.5",fill:"#FF4D4D"}),Ir("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.1249 7.13281C13.1249 6.51149 12.6213 6.00781 11.9999 6.00781C11.3786 6.00781 10.8749 6.51149 10.8749 7.13281V13.1328C10.8749 13.7541 11.3786 14.2578 11.9999 14.2578C12.6213 14.2578 13.1249 13.7541 13.1249 13.1328V7.13281ZM13.3499 16.6342C13.3499 15.8886 12.7455 15.2842 11.9999 15.2842C11.2543 15.2842 10.6499 15.8886 10.6499 16.6342C10.6499 17.3798 11.2543 17.9842 11.9999 17.9842C12.7455 17.9842 13.3499 17.3798 13.3499 16.6342Z",fill:"white"})]})},JS=Jd.forwardRef(({className:e,variant:t,status:r,closable:n=!1,children:o,...i},s)=>{let a=r?Qj[r]:null;return q1("div",{ref:s,role:"alert",className:B(Yj({variant:t}),e),...i,children:[a,o,n&&Ir(Xj,{})]})});JS.displayName="Alert";var eR=Jd.forwardRef(({className:e,...t},r)=>Ir("h5",{ref:r,className:B("mb-1 font-medium leading-none tracking-tight",e),...t}));eR.displayName="AlertTitle";var tR=Jd.forwardRef(({className:e,...t},r)=>Ir("div",{ref:r,className:B("text-sm text-[#86868C] [&_p]:leading-relaxed",e),...t}));tR.displayName="AlertDescription";import{jsx as rR,jsxs as Jj}from"react/jsx-runtime";import eU,{useCallback as nR,useMemo as tU}from"react";var rU=["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"];var nU={domains:["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],deviceSizes:[375,768,1024,1280,1440,1540,1920]},oU=e=>rU.some(t=>e==t),iU=(e="")=>/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(e),sU=eU.forwardRef(({imgClassName:e="",source:t="",quality:r=2,deviceSizes:n=[375,767,1023,1024,1279,1440,1439,1539,1919,1920],className:o,loading:i="lazy",alt:s="",...a},l)=>{let c=p=>(nU?.domains||[]).some(m=>p.includes(m)),u=nR(({src:p,width:m})=>{let h=m;try{let g=new URL(p);if(!oU(g.hostname))return p;let v=g.pathname.split("/").pop()||"";if(iU(v))return p?.split("/")?.map(C=>{if(c(p)&&/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)(\?.*)?/.test(C)&&/_[0-9]{2,4}x/.test(p)===!1){let x=C.split(".");return x.map((w,y)=>y===x.length-2?`${w}_${h<3960?h:3980}x`:w).join(".")}return C}).join("/")}catch{return p}},[]),d=nR(({srcArr:p,width:m})=>{let h=m*r,g=u({src:p[0][0],width:h}),v;return p.forEach(C=>{var x=C[0];C.length>1&&parseInt(C[1],10)>=m&&(v=u({src:x,width:h}))}),rR("source",{srcSet:v||g,media:`(max-width: ${m}px)`},m)},[u,r]),f=tU(()=>{if(typeof t!="string"||!t)return[];let p;try{p=t.replace(/[\r\n]/g,"").replace(/\s\s+/g," ").split(",").map(g=>g.split(" ").filter(Boolean))}catch(g){return console.log(g),[]}let m=n.map(g=>d({srcArr:p,width:g})),h=u({src:p[0][0],width:1920*r});return m.push(rR("img",{src:h,className:`w-full ${e}`,loading:i,alt:s??"",...a},"default")),m},[n,e,u,r,t,d]);return Jj("picture",{ref:l,className:`block overflow-hidden ${o}`,children:[f,a.children]})}),be=sU;import{Fragment as gge,jsx as vge}from"react/jsx-runtime";import*as aU from"react";import{jsx as wge,jsxs as bge}from"react/jsx-runtime";import{useCallback as fU,useState as T3}from"react";function ne(...e){return sx(zs(e))}import{useEffect as cU,useState as uU}from"react";import dU from"react-modal";import{jsx as K1,jsxs as oR}from"react/jsx-runtime";var Pr=({isOpen:e,title:t,className:r="",overlayClassName:n="",scrollClassName:o="",onClose:i,onScrollEnd:s,children:a,useAnimation:l,animationClassName:c,titleClassName:u="",...d})=>{let[f,p]=uU(!1);return cU(()=>{l&&requestAnimationFrame(()=>{p(e??!1)})},[e,l]),oR(dU,{isOpen:e??!1,overlayClassName:ne("fixed inset-0 z-[999] flex items-center justify-center bg-black/70 leading-[1.2] md:items-end",n),className:ne("min-md:max-h-[calc(100vh-96px)] relative flex min-h-[200px] flex-col overflow-hidden rounded-[16px] bg-white outline-none transition-all duration-300 md:h-[88.27vh] md:w-full md:rounded-b-none",f?"":c,r),onRequestClose:i,...d,children:[oR("div",{className:ne("flex w-full shrink-0 items-center justify-between",t?"min-l:px-[32px] h-[70px] border-b border-[#e2e2e2] px-[24px]":"h-[48px] px-[16px]",u),children:[K1("div",{className:"text-[18px] font-bold",children:t}),K1("div",{className:"size-[22px] cursor-pointer",onClick:i,onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.preventDefault(),i?.())},role:"button",tabIndex:0,children:K1("svg",{xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",children:K1("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.8525 5.31015C16.4558 4.91337 15.8125 4.91338 15.4157 5.31015L11.1268 9.5991L6.83815 5.31049C6.44138 4.91372 5.79808 4.91372 5.40131 5.31049C5.00454 5.70726 5.00455 6.35055 5.40131 6.74732L9.68993 11.0359L5.40105 15.3248C5.00428 15.7216 5.00428 16.3649 5.40105 16.7616C5.79782 17.1584 6.44111 17.1584 6.83788 16.7616L11.1268 12.4728L15.416 16.762C15.8128 17.1588 16.456 17.1588 16.8528 16.762C17.2496 16.3652 17.2496 15.7219 16.8528 15.3252L12.5636 11.0359L16.8525 6.74698C17.2493 6.35021 17.2493 5.70692 16.8525 5.31015ZM16.921 6.02856C16.921 6.22992 16.8441 6.43127 16.6905 6.5849L14.465 8.8104L12.2395 11.0359L12.2395 11.0359L16.6905 6.58493C16.8441 6.43129 16.921 6.22993 16.921 6.02856ZM5.34966 6.19087C5.37992 6.3354 5.45115 6.47307 5.56336 6.58528L10.014 11.0359L10.014 11.0359L5.56336 6.58524C5.45116 6.47304 5.37992 6.33539 5.34966 6.19087ZM5.35087 16.2121C5.38193 16.3541 5.45267 16.4891 5.56309 16.5996C5.87037 16.9068 6.36856 16.9068 6.67583 16.5996L11.1268 12.1486L15.578 16.5999C15.8853 16.9072 16.3835 16.9072 16.6908 16.5999C16.8498 16.4409 16.9265 16.2307 16.9209 16.0223C16.9265 16.2307 16.8498 16.4409 16.6908 16.5999C16.3835 16.9072 15.8853 16.9072 15.578 16.5999L11.1268 12.1487L6.67583 16.5996C6.36856 16.9069 5.87037 16.9069 5.56309 16.5996C5.45267 16.4892 5.38192 16.3541 5.35087 16.2121Z",fill:"#333333"})})})]}),K1("div",{className:ne("my-[32px] flex-1 overflow-auto overscroll-contain px-[24px] md:mb-[48px]",!t&&"mt-0","min-l:px-[32px]",o),onScroll:m=>{let h=m.target;h.scrollHeight<=h.clientHeight||h.scrollTop+h.clientHeight>=h.scrollHeight-50&&s&&s(m)},children:a})]})};import{jsx as vo,jsxs as iR}from"react/jsx-runtime";function pU({isOpen:e,onClose:t,copy:r,onSuccess:n}){let{trigger:o,isMutating:i}=sp(),[s,a]=T3(""),[l,c]=T3(!1),[u,d]=T3({icon:"",title:"",description:"",isSuccess:!1}),f=fU(()=>{o({orderName:s},{onSuccess:m=>{if(c(!0),m?.ok)n(),d({icon:r.successIcon,title:r.successTitle||"Success",description:r.successDescription||"Your receipt has been uploaded successfully",isSuccess:!0});else{let h=r.failedReasons.find(g=>g.code===m.code?.toString());d({icon:r.failedIcon,title:r.failedTitle||"Failed",description:h?.description||"Please try again",isSuccess:!1})}}})},[o,s,n,r.successIcon,r.successTitle,r.successDescription,r.failedReasons,r.failedIcon,r.failedTitle]),p=()=>{c(!1),a(""),u.isSuccess&&t()};return iR(Pr,{isOpen:e,onClose:t,className:"w-[540px] md:h-auto",scrollClassName:"mb-[40px] min-l:px-[48px] md:mb-0 md:pb-[24px] md:px-[16px]",titleClassName:"h-[56px]",useAnimation:!0,animationClassName:"md:translate-y-[100vh]",children:[vo(je,{size:"3",children:r.title}),vo(U,{size:"3",className:"mt-[8px] md:mt-[4px]",children:r.description}),vo("input",{placeholder:r.placeholder,className:"mt-[24px] h-[50px] w-full rounded-[2px] border border-[#6D6D6F] pl-[14px] text-[16px] font-bold placeholder:text-[16px] placeholder:font-bold placeholder:text-[#6D6D6F] focus:outline-none focus:ring-0 md:rounded-[4px] md:placeholder:text-[14px]",value:s,onChange:m=>a(m.target.value)}),vo(U,{size:"1",as:"p",className:"mt-[8px] text-[#6D6D6F]",children:r.note}),vo(Oe,{variant:"primary",className:"mt-[24px] w-full",loading:i,onClick:f,children:r.submit}),l&&iR(Pr,{isOpen:l,onClose:p,className:"w-[540px] md:h-auto",scrollClassName:"mb-[40px] min-l:px-[48px] md:mb-0 md:pb-[24px] md:px-[16px] flex flex-col items-center text-center",titleClassName:"h-[56px]",children:[vo(U,{size:"3",className:"size-[64px]",as:"div",html:u.icon}),vo(je,{size:"3",className:"mt-[16px]",children:u.title}),vo(U,{size:"3",className:"mt-[8px] md:mt-[4px]",children:u.description}),vo(Oe,{variant:"primary",className:"mt-[24px]",onClick:p,children:r.gotIt})]})]})}var sR=Ge(ir());import{Fragment as hU,jsx as Co,jsxs as k3}from"react/jsx-runtime";function mU({copy:e}){let{profile:t,openSignInPopup:r,openSignUpPopup:n}=ue(),o=t?Object.keys(t).length!==0:!1,i=t?.first_name?t?.first_name+" "+t?.last_name:t?.email?.split("@")[0],s=a=>{a==="primary"?n():r()};return Co(hU,{children:k3("div",{className:" relative w-full",children:[Co(be,{className:"aspect-h-[804] aspect-w-[1920] md:aspect-h-[660] md:aspect-w-[390] md-l:aspect-h-[660] md-l:aspect-w-[768]",source:`${e.pcImg?.url}, ${e.laptopImg?.url} 1024, ${e.mobileImg?.url} 768`,alt:e.pcImg?.alt,loading:"eager"}),o&&Co("div",{className:"absolute inset-0 ",style:{background:"linear-gradient(180deg, rgba(245, 245, 247, 0) 70.31%, #F5F5F7 100%)"}}),Co(Pt,{className:"l:h-auto !absolute inset-0 mx-auto grid h-full",asChild:!0,children:Co("div",{className:"grid grid-cols-12",children:k3("div",{className:"l:col-span-12 l:justify-start l:pt-[64px] col-span-5 flex h-full flex-col justify-center text-[#1F2021]",children:[Co(je,{as:"h1",size:"5",html:o?e.login.title?.replace("$name",i||""):e.unLogin.title}),Co(U,{size:"3",className:"l:mt-[4px] l-xxl:text-[14px] mt-[16px]",html:o?e.login.description:e.unLogin.description}),!o&&k3("div",{className:(0,sR.default)("mt-[32px] grid w-fit grid-flow-col gap-[12px] l:mt-[24px]",o&&"hidden"),children:[Co(Oe,{variant:"secondary",size:"lg",onClick:()=>{s("primary")},children:e.joinNow}),Co(Oe,{variant:"primary",size:"lg",onClick:()=>{s("secondary")},children:e.loginIn})]})]})})})]})})}import{useState as FG}from"react";function aR(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function A3(e,t){e===void 0&&(e={}),t===void 0&&(t={});let r=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>r.indexOf(n)<0).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:aR(t[n])&&aR(e[n])&&Object.keys(t[n]).length>0&&A3(e[n],t[n])})}var lR={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Kt(){let e=typeof document<"u"?document:{};return A3(e,lR),e}var gU={document:lR,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function Qe(){let e=typeof window<"u"?window:{};return A3(e,gU),e}function cR(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function uR(e){let t=e;Object.keys(t).forEach(r=>{try{t[r]=null}catch{}try{delete t[r]}catch{}})}function gs(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function vs(){return Date.now()}function vU(e){let t=Qe(),r;return t.getComputedStyle&&(r=t.getComputedStyle(e,null)),!r&&e.currentStyle&&(r=e.currentStyle),r||(r=e.style),r}function I3(e,t){t===void 0&&(t="x");let r=Qe(),n,o,i,s=vU(e);return r.WebKitCSSMatrix?(o=s.transform||s.webkitTransform,o.split(",").length>6&&(o=o.split(", ").map(a=>a.replace(",",".")).join(", ")),i=new r.WebKitCSSMatrix(o==="none"?"":o)):(i=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=i.toString().split(",")),t==="x"&&(r.WebKitCSSMatrix?o=i.m41:n.length===16?o=parseFloat(n[12]):o=parseFloat(n[4])),t==="y"&&(r.WebKitCSSMatrix?o=i.m42:n.length===16?o=parseFloat(n[13]):o=parseFloat(n[5])),o||0}function Y1(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function CU(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Cr(){let e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let r=1;r<arguments.length;r+=1){let n=r<0||arguments.length<=r?void 0:arguments[r];if(n!=null&&!CU(n)){let o=Object.keys(Object(n)).filter(i=>t.indexOf(i)<0);for(let i=0,s=o.length;i<s;i+=1){let a=o[i],l=Object.getOwnPropertyDescriptor(n,a);l!==void 0&&l.enumerable&&(Y1(e[a])&&Y1(n[a])?n[a].__swiper__?e[a]=n[a]:Cr(e[a],n[a]):!Y1(e[a])&&Y1(n[a])?(e[a]={},n[a].__swiper__?e[a]=n[a]:Cr(e[a],n[a])):e[a]=n[a])}}}return e}function La(e,t,r){e.style.setProperty(t,r)}function P3(e){let{swiper:t,targetPosition:r,side:n}=e,o=Qe(),i=-t.translate,s=null,a,l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",o.cancelAnimationFrame(t.cssModeFrameID);let c=r>i?"next":"prev",u=(f,p)=>c==="next"&&f>=p||c==="prev"&&f<=p,d=()=>{a=new Date().getTime(),s===null&&(s=a);let f=Math.max(Math.min((a-s)/l,1),0),p=.5-Math.cos(f*Math.PI)/2,m=i+p*(r-i);if(u(m,r)&&(m=r),t.wrapperEl.scrollTo({[n]:m}),u(m,r)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[n]:m})}),o.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=o.requestAnimationFrame(d)};d()}function Dt(e,t){t===void 0&&(t="");let r=Qe(),n=[...e.children];return r.HTMLSlotElement&&e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(o=>o.matches(t)):n}function xU(e,t){let r=[t];for(;r.length>0;){let n=r.shift();if(e===n)return!0;r.push(...n.children,...n.shadowRoot?n.shadowRoot.children:[],...n.assignedElements?n.assignedElements():[])}}function dR(e,t){let r=Qe(),n=t.contains(e);return!n&&r.HTMLSlotElement&&t instanceof HTMLSlotElement&&(n=[...t.assignedElements()].includes(e),n||(n=xU(e,t))),n}function X1(e){try{console.warn(e);return}catch{}}function Cn(e,t){t===void 0&&(t=[]);let r=document.createElement(e);return r.classList.add(...Array.isArray(t)?t:cR(t)),r}function fR(e,t){let r=[];for(;e.previousElementSibling;){let n=e.previousElementSibling;t?n.matches(t)&&r.push(n):r.push(n),e=n}return r}function pR(e,t){let r=[];for(;e.nextElementSibling;){let n=e.nextElementSibling;t?n.matches(t)&&r.push(n):r.push(n),e=n}return r}function xo(e,t){return Qe().getComputedStyle(e,null).getPropertyValue(t)}function Cs(e){let t=e,r;if(t){for(r=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(r+=1);return r}}function Ma(e,t){let r=[],n=e.parentElement;for(;n;)t?n.matches(t)&&r.push(n):r.push(n),n=n.parentElement;return r}function Q1(e,t,r){let n=Qe();return r?e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom")):e.offsetWidth}function Or(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function t0(e,t,r,n){return e.params.createElements&&Object.keys(n).forEach(o=>{if(!r[o]&&r.auto===!0){let i=Dt(e.el,`.${n[o]}`)[0];i||(i=Cn("div",n[o]),i.className=n[o],e.el.append(i)),r[o]=i,t[o]=i}}),r}function ii(e){return e===void 0&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function O3(e){let{swiper:t,extendParams:r,on:n,emit:o}=e,i="swiper-pagination";r({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:C=>C,formatFractionTotal:C=>C,bulletClass:`${i}-bullet`,bulletActiveClass:`${i}-bullet-active`,modifierClass:`${i}-`,currentClass:`${i}-current`,totalClass:`${i}-total`,hiddenClass:`${i}-hidden`,progressbarFillClass:`${i}-progressbar-fill`,progressbarOppositeClass:`${i}-progressbar-opposite`,clickableClass:`${i}-clickable`,lockClass:`${i}-lock`,horizontalClass:`${i}-horizontal`,verticalClass:`${i}-vertical`,paginationDisabledClass:`${i}-disabled`}}),t.pagination={el:null,bullets:[]};let s,a=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&t.pagination.el.length===0}function c(C,x){let{bulletActiveClass:w}=t.params.pagination;C&&(C=C[`${x==="prev"?"previous":"next"}ElementSibling`],C&&(C.classList.add(`${w}-${x}`),C=C[`${x==="prev"?"previous":"next"}ElementSibling`],C&&C.classList.add(`${w}-${x}-${x}`)))}function u(C,x,w){if(C=C%w,x=x%w,x===C+1)return"next";if(x===C-1)return"previous"}function d(C){let x=C.target.closest(ii(t.params.pagination.bulletClass));if(!x)return;C.preventDefault();let w=Cs(x)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===w)return;let y=u(t.realIndex,w,t.slides.length);y==="next"?t.slideNext():y==="previous"?t.slidePrev():t.slideToLoop(w)}else t.slideTo(w)}function f(){let C=t.rtl,x=t.params.pagination;if(l())return;let w=t.pagination.el;w=Or(w);let y,b,R=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,L=t.params.loop?Math.ceil(R/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(b=t.previousRealIndex||0,y=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):typeof t.snapIndex<"u"?(y=t.snapIndex,b=t.previousSnapIndex):(b=t.previousIndex||0,y=t.activeIndex||0),x.type==="bullets"&&t.pagination.bullets&&t.pagination.bullets.length>0){let E=t.pagination.bullets,S,A,k;if(x.dynamicBullets&&(s=Q1(E[0],t.isHorizontal()?"width":"height",!0),w.forEach(I=>{I.style[t.isHorizontal()?"width":"height"]=`${s*(x.dynamicMainBullets+4)}px`}),x.dynamicMainBullets>1&&b!==void 0&&(a+=y-(b||0),a>x.dynamicMainBullets-1?a=x.dynamicMainBullets-1:a<0&&(a=0)),S=Math.max(y-a,0),A=S+(Math.min(E.length,x.dynamicMainBullets)-1),k=(A+S)/2),E.forEach(I=>{let N=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(D=>`${x.bulletActiveClass}${D}`)].map(D=>typeof D=="string"&&D.includes(" ")?D.split(" "):D).flat();I.classList.remove(...N)}),w.length>1)E.forEach(I=>{let N=Cs(I);N===y?I.classList.add(...x.bulletActiveClass.split(" ")):t.isElement&&I.setAttribute("part","bullet"),x.dynamicBullets&&(N>=S&&N<=A&&I.classList.add(...`${x.bulletActiveClass}-main`.split(" ")),N===S&&c(I,"prev"),N===A&&c(I,"next"))});else{let I=E[y];if(I&&I.classList.add(...x.bulletActiveClass.split(" ")),t.isElement&&E.forEach((N,D)=>{N.setAttribute("part",D===y?"bullet-active":"bullet")}),x.dynamicBullets){let N=E[S],D=E[A];for(let F=S;F<=A;F+=1)E[F]&&E[F].classList.add(...`${x.bulletActiveClass}-main`.split(" "));c(N,"prev"),c(D,"next")}}if(x.dynamicBullets){let I=Math.min(E.length,x.dynamicMainBullets+4),N=(s*I-s)/2-k*s,D=C?"right":"left";E.forEach(F=>{F.style[t.isHorizontal()?D:"top"]=`${N}px`})}}w.forEach((E,S)=>{if(x.type==="fraction"&&(E.querySelectorAll(ii(x.currentClass)).forEach(A=>{A.textContent=x.formatFractionCurrent(y+1)}),E.querySelectorAll(ii(x.totalClass)).forEach(A=>{A.textContent=x.formatFractionTotal(L)})),x.type==="progressbar"){let A;x.progressbarOpposite?A=t.isHorizontal()?"vertical":"horizontal":A=t.isHorizontal()?"horizontal":"vertical";let k=(y+1)/L,I=1,N=1;A==="horizontal"?I=k:N=k,E.querySelectorAll(ii(x.progressbarFillClass)).forEach(D=>{D.style.transform=`translate3d(0,0,0) scaleX(${I}) scaleY(${N})`,D.style.transitionDuration=`${t.params.speed}ms`})}x.type==="custom"&&x.renderCustom?(E.innerHTML=x.renderCustom(t,y+1,L),S===0&&o("paginationRender",E)):(S===0&&o("paginationRender",E),o("paginationUpdate",E)),t.params.watchOverflow&&t.enabled&&E.classList[t.isLocked?"add":"remove"](x.lockClass)})}function p(){let C=t.params.pagination;if(l())return;let x=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length,w=t.pagination.el;w=Or(w);let y="";if(C.type==="bullets"){let b=t.params.loop?Math.ceil(x/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&b>x&&(b=x);for(let R=0;R<b;R+=1)C.renderBullet?y+=C.renderBullet.call(t,R,C.bulletClass):y+=`<${C.bulletElement} ${t.isElement?'part="bullet"':""} class="${C.bulletClass}"></${C.bulletElement}>`}C.type==="fraction"&&(C.renderFraction?y=C.renderFraction.call(t,C.currentClass,C.totalClass):y=`<span class="${C.currentClass}"></span> / <span class="${C.totalClass}"></span>`),C.type==="progressbar"&&(C.renderProgressbar?y=C.renderProgressbar.call(t,C.progressbarFillClass):y=`<span class="${C.progressbarFillClass}"></span>`),t.pagination.bullets=[],w.forEach(b=>{C.type!=="custom"&&(b.innerHTML=y||""),C.type==="bullets"&&t.pagination.bullets.push(...b.querySelectorAll(ii(C.bulletClass)))}),C.type!=="custom"&&o("paginationRender",w[0])}function m(){t.params.pagination=t0(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});let C=t.params.pagination;if(!C.el)return;let x;typeof C.el=="string"&&t.isElement&&(x=t.el.querySelector(C.el)),!x&&typeof C.el=="string"&&(x=[...document.querySelectorAll(C.el)]),x||(x=C.el),!(!x||x.length===0)&&(t.params.uniqueNavElements&&typeof C.el=="string"&&Array.isArray(x)&&x.length>1&&(x=[...t.el.querySelectorAll(C.el)],x.length>1&&(x=x.find(w=>Ma(w,".swiper")[0]===t.el))),Array.isArray(x)&&x.length===1&&(x=x[0]),Object.assign(t.pagination,{el:x}),x=Or(x),x.forEach(w=>{C.type==="bullets"&&C.clickable&&w.classList.add(...(C.clickableClass||"").split(" ")),w.classList.add(C.modifierClass+C.type),w.classList.add(t.isHorizontal()?C.horizontalClass:C.verticalClass),C.type==="bullets"&&C.dynamicBullets&&(w.classList.add(`${C.modifierClass}${C.type}-dynamic`),a=0,C.dynamicMainBullets<1&&(C.dynamicMainBullets=1)),C.type==="progressbar"&&C.progressbarOpposite&&w.classList.add(C.progressbarOppositeClass),C.clickable&&w.addEventListener("click",d),t.enabled||w.classList.add(C.lockClass)}))}function h(){let C=t.params.pagination;if(l())return;let x=t.pagination.el;x&&(x=Or(x),x.forEach(w=>{w.classList.remove(C.hiddenClass),w.classList.remove(C.modifierClass+C.type),w.classList.remove(t.isHorizontal()?C.horizontalClass:C.verticalClass),C.clickable&&(w.classList.remove(...(C.clickableClass||"").split(" ")),w.removeEventListener("click",d))})),t.pagination.bullets&&t.pagination.bullets.forEach(w=>w.classList.remove(...C.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!t.pagination||!t.pagination.el)return;let C=t.params.pagination,{el:x}=t.pagination;x=Or(x),x.forEach(w=>{w.classList.remove(C.horizontalClass,C.verticalClass),w.classList.add(t.isHorizontal()?C.horizontalClass:C.verticalClass)})}),n("init",()=>{t.params.pagination.enabled===!1?v():(m(),p(),f())}),n("activeIndexChange",()=>{typeof t.snapIndex>"u"&&f()}),n("snapIndexChange",()=>{f()}),n("snapGridLengthChange",()=>{p(),f()}),n("destroy",()=>{h()}),n("enable disable",()=>{let{el:C}=t.pagination;C&&(C=Or(C),C.forEach(x=>x.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass)))}),n("lock unlock",()=>{f()}),n("click",(C,x)=>{let w=x.target,y=Or(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&y&&y.length>0&&!w.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&w===t.navigation.nextEl||t.navigation.prevEl&&w===t.navigation.prevEl))return;let b=y[0].classList.contains(t.params.pagination.hiddenClass);o(b===!0?"paginationShow":"paginationHide"),y.forEach(R=>R.classList.toggle(t.params.pagination.hiddenClass))}});let g=()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:C}=t.pagination;C&&(C=Or(C),C.forEach(x=>x.classList.remove(t.params.pagination.paginationDisabledClass))),m(),p(),f()},v=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:C}=t.pagination;C&&(C=Or(C),C.forEach(x=>x.classList.add(t.params.pagination.paginationDisabledClass))),h()};Object.assign(t.pagination,{enable:g,disable:v,render:p,update:f,init:m,destroy:h})}function D3(e){let{swiper:t,extendParams:r,on:n}=e;r({grid:{rows:1,fill:"column"}});let o,i,s,a,l=()=>{let h=t.params.spaceBetween;return typeof h=="string"&&h.indexOf("%")>=0?h=parseFloat(h.replace("%",""))/100*t.size:typeof h=="string"&&(h=parseFloat(h)),h},c=h=>{let{slidesPerView:g}=t.params,{rows:v,fill:C}=t.params.grid,x=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:h.length;s=Math.floor(x/v),Math.floor(x/v)===x/v?o=x:o=Math.ceil(x/v)*v,g!=="auto"&&C==="row"&&(o=Math.max(o,g*v)),i=o/v},u=()=>{t.slides&&t.slides.forEach(h=>{h.swiperSlideGridSet&&(h.style.height="",h.style[t.getDirectionLabel("margin-top")]="")})},d=(h,g,v)=>{let{slidesPerGroup:C}=t.params,x=l(),{rows:w,fill:y}=t.params.grid,b=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:v.length,R,L,E;if(y==="row"&&C>1){let S=Math.floor(h/(C*w)),A=h-w*C*S,k=S===0?C:Math.min(Math.ceil((b-S*w*C)/w),C);E=Math.floor(A/k),L=A-E*k+S*C,R=L+E*o/w,g.style.order=R}else y==="column"?(L=Math.floor(h/w),E=h-L*w,(L>s||L===s&&E===w-1)&&(E+=1,E>=w&&(E=0,L+=1))):(E=Math.floor(h/i),L=h-E*i);g.row=E,g.column=L,g.style.height=`calc((100% - ${(w-1)*x}px) / ${w})`,g.style[t.getDirectionLabel("margin-top")]=E!==0?x&&`${x}px`:"",g.swiperSlideGridSet=!0},f=(h,g)=>{let{centeredSlides:v,roundLengths:C}=t.params,x=l(),{rows:w}=t.params.grid;if(t.virtualSize=(h+x)*o,t.virtualSize=Math.ceil(t.virtualSize/w)-x,t.params.cssMode||(t.wrapperEl.style[t.getDirectionLabel("width")]=`${t.virtualSize+x}px`),v){let y=[];for(let b=0;b<g.length;b+=1){let R=g[b];C&&(R=Math.floor(R)),g[b]<t.virtualSize+g[0]&&y.push(R)}g.splice(0,g.length),g.push(...y)}},p=()=>{a=t.params.grid&&t.params.grid.rows>1},m=()=>{let{params:h,el:g}=t,v=h.grid&&h.grid.rows>1;a&&!v?(g.classList.remove(`${h.containerModifierClass}grid`,`${h.containerModifierClass}grid-column`),s=1,t.emitContainerClasses()):!a&&v&&(g.classList.add(`${h.containerModifierClass}grid`),h.grid.fill==="column"&&g.classList.add(`${h.containerModifierClass}grid-column`),t.emitContainerClasses()),a=v};n("init",p),n("update",m),t.grid={initSlides:c,unsetSlides:u,updateSlide:d,updateWrapperSize:f}}import gt,{useEffect as q3,useLayoutEffect as kG,useContext as Awe,createContext as PR,forwardRef as OR,useState as ec,useRef as Zn}from"react";var H3;function wU(){let e=Qe(),t=Kt();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function wR(){return H3||(H3=wU()),H3}var $3;function bU(e){let{userAgent:t}=e===void 0?{}:e,r=wR(),n=Qe(),o=n.navigator.platform,i=t||n.navigator.userAgent,s={ios:!1,android:!1},a=n.screen.width,l=n.screen.height,c=i.match(/(Android);?[\s\/]+([\d.]+)?/),u=i.match(/(iPad).*OS\s([\d_]+)/),d=i.match(/(iPod)(.*OS\s([\d_]+))?/),f=!u&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/),p=o==="Win32",m=o==="MacIntel",h=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!u&&m&&r.touch&&h.indexOf(`${a}x${l}`)>=0&&(u=i.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),m=!1),c&&!p&&(s.os="android",s.android=!0),(u||f||d)&&(s.os="ios",s.ios=!0),s}function bR(e){return e===void 0&&(e={}),$3||($3=bU(e)),$3}var _3;function yU(){let e=Qe(),t=bR(),r=!1;function n(){let a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(n()){let a=String(e.navigator.userAgent);if(a.includes("Version/")){let[l,c]=a.split("Version/")[1].split(" ")[0].split(".").map(u=>Number(u));r=l<16||l===16&&c<2}}let o=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),i=n(),s=i||o&&t.ios;return{isSafari:r||i,needPerspectiveFix:r,need3dFix:s,isWebView:o}}function yR(){return _3||(_3=yU()),_3}function SU(e){let{swiper:t,on:r,emit:n}=e,o=Qe(),i=null,s=null,a=()=>{!t||t.destroyed||!t.initialized||(n("beforeResize"),n("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(i=new ResizeObserver(d=>{s=o.requestAnimationFrame(()=>{let{width:f,height:p}=t,m=f,h=p;d.forEach(g=>{let{contentBoxSize:v,contentRect:C,target:x}=g;x&&x!==t.el||(m=C?C.width:(v[0]||v).inlineSize,h=C?C.height:(v[0]||v).blockSize)}),(m!==f||h!==p)&&a()})}),i.observe(t.el))},c=()=>{s&&o.cancelAnimationFrame(s),i&&i.unobserve&&t.el&&(i.unobserve(t.el),i=null)},u=()=>{!t||t.destroyed||!t.initialized||n("orientationchange")};r("init",()=>{if(t.params.resizeObserver&&typeof o.ResizeObserver<"u"){l();return}o.addEventListener("resize",a),o.addEventListener("orientationchange",u)}),r("destroy",()=>{c(),o.removeEventListener("resize",a),o.removeEventListener("orientationchange",u)})}function RU(e){let{swiper:t,extendParams:r,on:n,emit:o}=e,i=[],s=Qe(),a=function(u,d){d===void 0&&(d={});let f=s.MutationObserver||s.WebkitMutationObserver,p=new f(m=>{if(t.__preventObserver__)return;if(m.length===1){o("observerUpdate",m[0]);return}let h=function(){o("observerUpdate",m[0])};s.requestAnimationFrame?s.requestAnimationFrame(h):s.setTimeout(h,0)});p.observe(u,{attributes:typeof d.attributes>"u"?!0:d.attributes,childList:t.isElement||(typeof d.childList>"u"?!0:d).childList,characterData:typeof d.characterData>"u"?!0:d.characterData}),i.push(p)},l=()=>{if(t.params.observer){if(t.params.observeParents){let u=Ma(t.hostEl);for(let d=0;d<u.length;d+=1)a(u[d])}a(t.hostEl,{childList:t.params.observeSlideChildren}),a(t.wrapperEl,{attributes:!1})}},c=()=>{i.forEach(u=>{u.disconnect()}),i.splice(0,i.length)};r({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",l),n("destroy",c)}var LU={on(e,t,r){let n=this;if(!n.eventsListeners||n.destroyed||typeof t!="function")return n;let o=r?"unshift":"push";return e.split(" ").forEach(i=>{n.eventsListeners[i]||(n.eventsListeners[i]=[]),n.eventsListeners[i][o](t)}),n},once(e,t,r){let n=this;if(!n.eventsListeners||n.destroyed||typeof t!="function")return n;function o(){n.off(e,o),o.__emitterProxy&&delete o.__emitterProxy;for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];t.apply(n,s)}return o.__emitterProxy=t,n.on(e,o,r)},onAny(e,t){let r=this;if(!r.eventsListeners||r.destroyed||typeof e!="function")return r;let n=t?"unshift":"push";return r.eventsAnyListeners.indexOf(e)<0&&r.eventsAnyListeners[n](e),r},offAny(e){let t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;let r=t.eventsAnyListeners.indexOf(e);return r>=0&&t.eventsAnyListeners.splice(r,1),t},off(e,t){let r=this;return!r.eventsListeners||r.destroyed||!r.eventsListeners||e.split(" ").forEach(n=>{typeof t>"u"?r.eventsListeners[n]=[]:r.eventsListeners[n]&&r.eventsListeners[n].forEach((o,i)=>{(o===t||o.__emitterProxy&&o.__emitterProxy===t)&&r.eventsListeners[n].splice(i,1)})}),r},emit(){let e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,r,n;for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return typeof i[0]=="string"||Array.isArray(i[0])?(t=i[0],r=i.slice(1,i.length),n=e):(t=i[0].events,r=i[0].data,n=i[0].context||e),r.unshift(n),(Array.isArray(t)?t:t.split(" ")).forEach(l=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(c=>{c.apply(n,[l,...r])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(c=>{c.apply(n,r)})}),e}};function MU(){let e=this,t,r,n=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=n.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?r=e.params.height:r=n.clientHeight,!(t===0&&e.isHorizontal()||r===0&&e.isVertical())&&(t=t-parseInt(xo(n,"padding-left")||0,10)-parseInt(xo(n,"padding-right")||0,10),r=r-parseInt(xo(n,"padding-top")||0,10)-parseInt(xo(n,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(r)&&(r=0),Object.assign(e,{width:t,height:r,size:e.isHorizontal()?t:r}))}function EU(){let e=this;function t(S,A){return parseFloat(S.getPropertyValue(e.getDirectionLabel(A))||0)}let r=e.params,{wrapperEl:n,slidesEl:o,size:i,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&r.virtual.enabled,c=l?e.virtual.slides.length:e.slides.length,u=Dt(o,`.${e.params.slideClass}, swiper-slide`),d=l?e.virtual.slides.length:u.length,f=[],p=[],m=[],h=r.slidesOffsetBefore;typeof h=="function"&&(h=r.slidesOffsetBefore.call(e));let g=r.slidesOffsetAfter;typeof g=="function"&&(g=r.slidesOffsetAfter.call(e));let v=e.snapGrid.length,C=e.slidesGrid.length,x=r.spaceBetween,w=-h,y=0,b=0;if(typeof i>"u")return;typeof x=="string"&&x.indexOf("%")>=0?x=parseFloat(x.replace("%",""))/100*i:typeof x=="string"&&(x=parseFloat(x)),e.virtualSize=-x,u.forEach(S=>{s?S.style.marginLeft="":S.style.marginRight="",S.style.marginBottom="",S.style.marginTop=""}),r.centeredSlides&&r.cssMode&&(La(n,"--swiper-centered-offset-before",""),La(n,"--swiper-centered-offset-after",""));let R=r.grid&&r.grid.rows>1&&e.grid;R?e.grid.initSlides(u):e.grid&&e.grid.unsetSlides();let L,E=r.slidesPerView==="auto"&&r.breakpoints&&Object.keys(r.breakpoints).filter(S=>typeof r.breakpoints[S].slidesPerView<"u").length>0;for(let S=0;S<d;S+=1){L=0;let A;if(u[S]&&(A=u[S]),R&&e.grid.updateSlide(S,A,u),!(u[S]&&xo(A,"display")==="none")){if(r.slidesPerView==="auto"){E&&(u[S].style[e.getDirectionLabel("width")]="");let k=getComputedStyle(A),I=A.style.transform,N=A.style.webkitTransform;if(I&&(A.style.transform="none"),N&&(A.style.webkitTransform="none"),r.roundLengths)L=e.isHorizontal()?Q1(A,"width",!0):Q1(A,"height",!0);else{let D=t(k,"width"),F=t(k,"padding-left"),H=t(k,"padding-right"),P=t(k,"margin-left"),O=t(k,"margin-right"),M=k.getPropertyValue("box-sizing");if(M&&M==="border-box")L=D+P+O;else{let{clientWidth:Z,offsetWidth:J}=A;L=D+F+H+P+O+(J-Z)}}I&&(A.style.transform=I),N&&(A.style.webkitTransform=N),r.roundLengths&&(L=Math.floor(L))}else L=(i-(r.slidesPerView-1)*x)/r.slidesPerView,r.roundLengths&&(L=Math.floor(L)),u[S]&&(u[S].style[e.getDirectionLabel("width")]=`${L}px`);u[S]&&(u[S].swiperSlideSize=L),m.push(L),r.centeredSlides?(w=w+L/2+y/2+x,y===0&&S!==0&&(w=w-i/2-x),S===0&&(w=w-i/2-x),Math.abs(w)<1/1e3&&(w=0),r.roundLengths&&(w=Math.floor(w)),b%r.slidesPerGroup===0&&f.push(w),p.push(w)):(r.roundLengths&&(w=Math.floor(w)),(b-Math.min(e.params.slidesPerGroupSkip,b))%e.params.slidesPerGroup===0&&f.push(w),p.push(w),w=w+L+x),e.virtualSize+=L+x,y=L,b+=1}}if(e.virtualSize=Math.max(e.virtualSize,i)+g,s&&a&&(r.effect==="slide"||r.effect==="coverflow")&&(n.style.width=`${e.virtualSize+x}px`),r.setWrapperSize&&(n.style[e.getDirectionLabel("width")]=`${e.virtualSize+x}px`),R&&e.grid.updateWrapperSize(L,f),!r.centeredSlides){let S=[];for(let A=0;A<f.length;A+=1){let k=f[A];r.roundLengths&&(k=Math.floor(k)),f[A]<=e.virtualSize-i&&S.push(k)}f=S,Math.floor(e.virtualSize-i)-Math.floor(f[f.length-1])>1&&f.push(e.virtualSize-i)}if(l&&r.loop){let S=m[0]+x;if(r.slidesPerGroup>1){let A=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/r.slidesPerGroup),k=S*r.slidesPerGroup;for(let I=0;I<A;I+=1)f.push(f[f.length-1]+k)}for(let A=0;A<e.virtual.slidesBefore+e.virtual.slidesAfter;A+=1)r.slidesPerGroup===1&&f.push(f[f.length-1]+S),p.push(p[p.length-1]+S),e.virtualSize+=S}if(f.length===0&&(f=[0]),x!==0){let S=e.isHorizontal()&&s?"marginLeft":e.getDirectionLabel("marginRight");u.filter((A,k)=>!r.cssMode||r.loop?!0:k!==u.length-1).forEach(A=>{A.style[S]=`${x}px`})}if(r.centeredSlides&&r.centeredSlidesBounds){let S=0;m.forEach(k=>{S+=k+(x||0)}),S-=x;let A=S>i?S-i:0;f=f.map(k=>k<=0?-h:k>A?A+g:k)}if(r.centerInsufficientSlides){let S=0;m.forEach(k=>{S+=k+(x||0)}),S-=x;let A=(r.slidesOffsetBefore||0)+(r.slidesOffsetAfter||0);if(S+A<i){let k=(i-S-A)/2;f.forEach((I,N)=>{f[N]=I-k}),p.forEach((I,N)=>{p[N]=I+k})}}if(Object.assign(e,{slides:u,snapGrid:f,slidesGrid:p,slidesSizesGrid:m}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){La(n,"--swiper-centered-offset-before",`${-f[0]}px`),La(n,"--swiper-centered-offset-after",`${e.size/2-m[m.length-1]/2}px`);let S=-e.snapGrid[0],A=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(k=>k+S),e.slidesGrid=e.slidesGrid.map(k=>k+A)}if(d!==c&&e.emit("slidesLengthChange"),f.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),p.length!==C&&e.emit("slidesGridLengthChange"),r.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!r.cssMode&&(r.effect==="slide"||r.effect==="fade")){let S=`${r.containerModifierClass}backface-hidden`,A=e.el.classList.contains(S);d<=r.maxBackfaceHiddenSlides?A||e.el.classList.add(S):A&&e.el.classList.remove(S)}}function TU(e){let t=this,r=[],n=t.virtual&&t.params.virtual.enabled,o=0,i;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);let s=a=>n?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{r.push(a)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){let a=t.activeIndex+i;if(a>t.slides.length&&!n)break;r.push(s(a))}else r.push(s(t.activeIndex));for(i=0;i<r.length;i+=1)if(typeof r[i]<"u"){let a=r[i].offsetHeight;o=a>o?a:o}(o||o===0)&&(t.wrapperEl.style.height=`${o}px`)}function kU(){let e=this,t=e.slides,r=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let n=0;n<t.length;n+=1)t[n].swiperSlideOffset=(e.isHorizontal()?t[n].offsetLeft:t[n].offsetTop)-r-e.cssOverflowAdjustment()}var gR=(e,t,r)=>{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)};function AU(e){e===void 0&&(e=this&&this.translate||0);let t=this,r=t.params,{slides:n,rtlTranslate:o,snapGrid:i}=t;if(n.length===0)return;typeof n[0].swiperSlideOffset>"u"&&t.updateSlidesOffset();let s=-e;o&&(s=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=r.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l<n.length;l+=1){let c=n[l],u=c.swiperSlideOffset;r.cssMode&&r.centeredSlides&&(u-=n[0].swiperSlideOffset);let d=(s+(r.centeredSlides?t.minTranslate():0)-u)/(c.swiperSlideSize+a),f=(s-i[0]+(r.centeredSlides?t.minTranslate():0)-u)/(c.swiperSlideSize+a),p=-(s-u),m=p+t.slidesSizesGrid[l],h=p>=0&&p<=t.size-t.slidesSizesGrid[l],g=p>=0&&p<t.size-1||m>1&&m<=t.size||p<=0&&m>=t.size;g&&(t.visibleSlides.push(c),t.visibleSlidesIndexes.push(l)),gR(c,g,r.slideVisibleClass),gR(c,h,r.slideFullyVisibleClass),c.progress=o?-d:d,c.originalProgress=o?-f:f}}function IU(e){let t=this;if(typeof e>"u"){let u=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*u||0}let r=t.params,n=t.maxTranslate()-t.minTranslate(),{progress:o,isBeginning:i,isEnd:s,progressLoop:a}=t,l=i,c=s;if(n===0)o=0,i=!0,s=!0;else{o=(e-t.minTranslate())/n;let u=Math.abs(e-t.minTranslate())<1,d=Math.abs(e-t.maxTranslate())<1;i=u||o<=0,s=d||o>=1,u&&(o=0),d&&(o=1)}if(r.loop){let u=t.getSlideIndexByData(0),d=t.getSlideIndexByData(t.slides.length-1),f=t.slidesGrid[u],p=t.slidesGrid[d],m=t.slidesGrid[t.slidesGrid.length-1],h=Math.abs(e);h>=f?a=(h-f)/m:a=(h+m-p)/m,a>1&&(a-=1)}Object.assign(t,{progress:o,progressLoop:a,isBeginning:i,isEnd:s}),(r.watchSlidesProgress||r.centeredSlides&&r.autoHeight)&&t.updateSlidesProgress(e),i&&!l&&t.emit("reachBeginning toEdge"),s&&!c&&t.emit("reachEnd toEdge"),(l&&!i||c&&!s)&&t.emit("fromEdge"),t.emit("progress",o)}var B3=(e,t,r)=>{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)};function PU(){let e=this,{slides:t,params:r,slidesEl:n,activeIndex:o}=e,i=e.virtual&&r.virtual.enabled,s=e.grid&&r.grid&&r.grid.rows>1,a=d=>Dt(n,`.${r.slideClass}${d}, swiper-slide${d}`)[0],l,c,u;if(i)if(r.loop){let d=o-e.virtual.slidesBefore;d<0&&(d=e.virtual.slides.length+d),d>=e.virtual.slides.length&&(d-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${d}"]`)}else l=a(`[data-swiper-slide-index="${o}"]`);else s?(l=t.find(d=>d.column===o),u=t.find(d=>d.column===o+1),c=t.find(d=>d.column===o-1)):l=t[o];l&&(s||(u=pR(l,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!u&&(u=t[0]),c=fR(l,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!c===0&&(c=t[t.length-1]))),t.forEach(d=>{B3(d,d===l,r.slideActiveClass),B3(d,d===u,r.slideNextClass),B3(d,d===c,r.slidePrevClass)}),e.emitSlidesClasses()}var n0=(e,t)=>{if(!e||e.destroyed||!e.params)return;let r=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,n=t.closest(r());if(n){let o=n.querySelector(`.${e.params.lazyPreloaderClass}`);!o&&e.isElement&&(n.shadowRoot?o=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{n.shadowRoot&&(o=n.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),o&&o.remove())})),o&&o.remove()}},z3=(e,t)=>{if(!e.slides[t])return;let r=e.slides[t].querySelector('[loading="lazy"]');r&&r.removeAttribute("loading")},U3=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext,r=e.slides.length;if(!r||!t||t<0)return;t=Math.min(t,r);let n=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),o=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){let s=o,a=[s-t];a.push(...Array.from({length:t}).map((l,c)=>s+n+c)),e.slides.forEach((l,c)=>{a.includes(l.column)&&z3(e,c)});return}let i=o+n-1;if(e.params.rewind||e.params.loop)for(let s=o-t;s<=i+t;s+=1){let a=(s%r+r)%r;(a<o||a>i)&&z3(e,a)}else for(let s=Math.max(o-t,0);s<=Math.min(i+t,r-1);s+=1)s!==o&&(s>i||s<o)&&z3(e,s)};function OU(e){let{slidesGrid:t,params:r}=e,n=e.rtlTranslate?e.translate:-e.translate,o;for(let i=0;i<t.length;i+=1)typeof t[i+1]<"u"?n>=t[i]&&n<t[i+1]-(t[i+1]-t[i])/2?o=i:n>=t[i]&&n<t[i+1]&&(o=i+1):n>=t[i]&&(o=i);return r.normalizeSlideIndex&&(o<0||typeof o>"u")&&(o=0),o}function DU(e){let t=this,r=t.rtlTranslate?t.translate:-t.translate,{snapGrid:n,params:o,activeIndex:i,realIndex:s,snapIndex:a}=t,l=e,c,u=p=>{let m=p-t.virtual.slidesBefore;return m<0&&(m=t.virtual.slides.length+m),m>=t.virtual.slides.length&&(m-=t.virtual.slides.length),m};if(typeof l>"u"&&(l=OU(t)),n.indexOf(r)>=0)c=n.indexOf(r);else{let p=Math.min(o.slidesPerGroupSkip,l);c=p+Math.floor((l-p)/o.slidesPerGroup)}if(c>=n.length&&(c=n.length-1),l===i&&!t.params.loop){c!==a&&(t.snapIndex=c,t.emit("snapIndexChange"));return}if(l===i&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=u(l);return}let d=t.grid&&o.grid&&o.grid.rows>1,f;if(t.virtual&&o.virtual.enabled&&o.loop)f=u(l);else if(d){let p=t.slides.find(h=>h.column===l),m=parseInt(p.getAttribute("data-swiper-slide-index"),10);Number.isNaN(m)&&(m=Math.max(t.slides.indexOf(p),0)),f=Math.floor(m/o.grid.rows)}else if(t.slides[l]){let p=t.slides[l].getAttribute("data-swiper-slide-index");p?f=parseInt(p,10):f=l}else f=l;Object.assign(t,{previousSnapIndex:a,snapIndex:c,previousRealIndex:s,realIndex:f,previousIndex:i,activeIndex:l}),t.initialized&&U3(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==f&&t.emit("realIndexChange"),t.emit("slideChange"))}function NU(e,t){let r=this,n=r.params,o=e.closest(`.${n.slideClass}, swiper-slide`);!o&&r.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!o&&a.matches&&a.matches(`.${n.slideClass}, swiper-slide`)&&(o=a)});let i=!1,s;if(o){for(let a=0;a<r.slides.length;a+=1)if(r.slides[a]===o){i=!0,s=a;break}}if(o&&i)r.clickedSlide=o,r.virtual&&r.params.virtual.enabled?r.clickedIndex=parseInt(o.getAttribute("data-swiper-slide-index"),10):r.clickedIndex=s;else{r.clickedSlide=void 0,r.clickedIndex=void 0;return}n.slideToClickedSlide&&r.clickedIndex!==void 0&&r.clickedIndex!==r.activeIndex&&r.slideToClickedSlide()}var FU={updateSize:MU,updateSlides:EU,updateAutoHeight:TU,updateSlidesOffset:kU,updateSlidesProgress:AU,updateProgress:IU,updateSlidesClasses:PU,updateActiveIndex:DU,updateClickedSlide:NU};function VU(e){e===void 0&&(e=this.isHorizontal()?"x":"y");let t=this,{params:r,rtlTranslate:n,translate:o,wrapperEl:i}=t;if(r.virtualTranslate)return n?-o:o;if(r.cssMode)return o;let s=I3(i,e);return s+=t.cssOverflowAdjustment(),n&&(s=-s),s||0}function HU(e,t){let r=this,{rtlTranslate:n,params:o,wrapperEl:i,progress:s}=r,a=0,l=0,c=0;r.isHorizontal()?a=n?-e:e:l=e,o.roundLengths&&(a=Math.floor(a),l=Math.floor(l)),r.previousTranslate=r.translate,r.translate=r.isHorizontal()?a:l,o.cssMode?i[r.isHorizontal()?"scrollLeft":"scrollTop"]=r.isHorizontal()?-a:-l:o.virtualTranslate||(r.isHorizontal()?a-=r.cssOverflowAdjustment():l-=r.cssOverflowAdjustment(),i.style.transform=`translate3d(${a}px, ${l}px, ${c}px)`);let u,d=r.maxTranslate()-r.minTranslate();d===0?u=0:u=(e-r.minTranslate())/d,u!==s&&r.updateProgress(e),r.emit("setTranslate",r.translate,t)}function $U(){return-this.snapGrid[0]}function _U(){return-this.snapGrid[this.snapGrid.length-1]}function BU(e,t,r,n,o){e===void 0&&(e=0),t===void 0&&(t=this.params.speed),r===void 0&&(r=!0),n===void 0&&(n=!0);let i=this,{params:s,wrapperEl:a}=i;if(i.animating&&s.preventInteractionOnTransition)return!1;let l=i.minTranslate(),c=i.maxTranslate(),u;if(n&&e>l?u=l:n&&e<c?u=c:u=e,i.updateProgress(u),s.cssMode){let d=i.isHorizontal();if(t===0)a[d?"scrollLeft":"scrollTop"]=-u;else{if(!i.support.smoothScroll)return P3({swiper:i,targetPosition:-u,side:d?"left":"top"}),!0;a.scrollTo({[d?"left":"top"]:-u,behavior:"smooth"})}return!0}return t===0?(i.setTransition(0),i.setTranslate(u),r&&(i.emit("beforeTransitionStart",t,o),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(u),r&&(i.emit("beforeTransitionStart",t,o),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(f){!i||i.destroyed||f.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,i.animating=!1,r&&i.emit("transitionEnd"))}),i.wrapperEl.addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd))),!0}var zU={getTranslate:VU,setTranslate:HU,minTranslate:$U,maxTranslate:_U,translateTo:BU};function ZU(e,t){let r=this;r.params.cssMode||(r.wrapperEl.style.transitionDuration=`${e}ms`,r.wrapperEl.style.transitionDelay=e===0?"0ms":""),r.emit("setTransition",e,t)}function SR(e){let{swiper:t,runCallbacks:r,direction:n,step:o}=e,{activeIndex:i,previousIndex:s}=t,a=n;if(a||(i>s?a="next":i<s?a="prev":a="reset"),t.emit(`transition${o}`),r&&i!==s){if(a==="reset"){t.emit(`slideResetTransition${o}`);return}t.emit(`slideChangeTransition${o}`),a==="next"?t.emit(`slideNextTransition${o}`):t.emit(`slidePrevTransition${o}`)}}function jU(e,t){e===void 0&&(e=!0);let r=this,{params:n}=r;n.cssMode||(n.autoHeight&&r.updateAutoHeight(),SR({swiper:r,runCallbacks:e,direction:t,step:"Start"}))}function UU(e,t){e===void 0&&(e=!0);let r=this,{params:n}=r;r.animating=!1,!n.cssMode&&(r.setTransition(0),SR({swiper:r,runCallbacks:e,direction:t,step:"End"}))}var GU={setTransition:ZU,transitionStart:jU,transitionEnd:UU};function WU(e,t,r,n,o){e===void 0&&(e=0),r===void 0&&(r=!0),typeof e=="string"&&(e=parseInt(e,10));let i=this,s=e;s<0&&(s=0);let{params:a,snapGrid:l,slidesGrid:c,previousIndex:u,activeIndex:d,rtlTranslate:f,wrapperEl:p,enabled:m}=i;if(!m&&!n&&!o||i.destroyed||i.animating&&a.preventInteractionOnTransition)return!1;typeof t>"u"&&(t=i.params.speed);let h=Math.min(i.params.slidesPerGroupSkip,s),g=h+Math.floor((s-h)/i.params.slidesPerGroup);g>=l.length&&(g=l.length-1);let v=-l[g];if(a.normalizeSlideIndex)for(let R=0;R<c.length;R+=1){let L=-Math.floor(v*100),E=Math.floor(c[R]*100),S=Math.floor(c[R+1]*100);typeof c[R+1]<"u"?L>=E&&L<S-(S-E)/2?s=R:L>=E&&L<S&&(s=R+1):L>=E&&(s=R)}if(i.initialized&&s!==d&&(!i.allowSlideNext&&(f?v>i.translate&&v>i.minTranslate():v<i.translate&&v<i.minTranslate())||!i.allowSlidePrev&&v>i.translate&&v>i.maxTranslate()&&(d||0)!==s))return!1;s!==(u||0)&&r&&i.emit("beforeSlideChangeStart"),i.updateProgress(v);let C;s>d?C="next":s<d?C="prev":C="reset";let x=i.virtual&&i.params.virtual.enabled;if(!(x&&o)&&(f&&-v===i.translate||!f&&v===i.translate))return i.updateActiveIndex(s),a.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),a.effect!=="slide"&&i.setTranslate(v),C!=="reset"&&(i.transitionStart(r,C),i.transitionEnd(r,C)),!1;if(a.cssMode){let R=i.isHorizontal(),L=f?v:-v;if(t===0)x&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),x&&!i._cssModeVirtualInitialSet&&i.params.initialSlide>0?(i._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{p[R?"scrollLeft":"scrollTop"]=L})):p[R?"scrollLeft":"scrollTop"]=L,x&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._immediateVirtual=!1});else{if(!i.support.smoothScroll)return P3({swiper:i,targetPosition:L,side:R?"left":"top"}),!0;p.scrollTo({[R?"left":"top"]:L,behavior:"smooth"})}return!0}let b=yR().isSafari;return x&&!o&&b&&i.isElement&&i.virtual.update(!1,!1,s),i.setTransition(t),i.setTranslate(v),i.updateActiveIndex(s),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,n),i.transitionStart(r,C),t===0?i.transitionEnd(r,C):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(L){!i||i.destroyed||L.target===this&&(i.wrapperEl.removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(r,C))}),i.wrapperEl.addEventListener("transitionend",i.onSlideToWrapperTransitionEnd)),!0}function qU(e,t,r,n){e===void 0&&(e=0),r===void 0&&(r=!0),typeof e=="string"&&(e=parseInt(e,10));let o=this;if(o.destroyed)return;typeof t>"u"&&(t=o.params.speed);let i=o.grid&&o.params.grid&&o.params.grid.rows>1,s=e;if(o.params.loop)if(o.virtual&&o.params.virtual.enabled)s=s+o.virtual.slidesBefore;else{let a;if(i){let f=s*o.params.grid.rows;a=o.slides.find(p=>p.getAttribute("data-swiper-slide-index")*1===f).column}else a=o.getSlideIndexByData(s);let l=i?Math.ceil(o.slides.length/o.params.grid.rows):o.slides.length,{centeredSlides:c}=o.params,u=o.params.slidesPerView;u==="auto"?u=o.slidesPerViewDynamic():(u=Math.ceil(parseFloat(o.params.slidesPerView,10)),c&&u%2===0&&(u=u+1));let d=l-a<u;if(c&&(d=d||a<Math.ceil(u/2)),n&&c&&o.params.slidesPerView!=="auto"&&!i&&(d=!1),d){let f=c?a<o.activeIndex?"prev":"next":a-o.activeIndex-1<o.params.slidesPerView?"next":"prev";o.loopFix({direction:f,slideTo:!0,activeSlideIndex:f==="next"?a+1:a-l+1,slideRealIndex:f==="next"?o.realIndex:void 0})}if(i){let f=s*o.params.grid.rows;s=o.slides.find(p=>p.getAttribute("data-swiper-slide-index")*1===f).column}else s=o.getSlideIndexByData(s)}return requestAnimationFrame(()=>{o.slideTo(s,t,r,n)}),o}function KU(e,t,r){t===void 0&&(t=!0);let n=this,{enabled:o,params:i,animating:s}=n;if(!o||n.destroyed)return n;typeof e>"u"&&(e=n.params.speed);let a=i.slidesPerGroup;i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(a=Math.max(n.slidesPerViewDynamic("current",!0),1));let l=n.activeIndex<i.slidesPerGroupSkip?1:a,c=n.virtual&&i.virtual.enabled;if(i.loop){if(s&&!c&&i.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&i.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+l,e,t,r)}),!0}return i.rewind&&n.isEnd?n.slideTo(0,e,t,r):n.slideTo(n.activeIndex+l,e,t,r)}function YU(e,t,r){t===void 0&&(t=!0);let n=this,{params:o,snapGrid:i,slidesGrid:s,rtlTranslate:a,enabled:l,animating:c}=n;if(!l||n.destroyed)return n;typeof e>"u"&&(e=n.params.speed);let u=n.virtual&&o.virtual.enabled;if(o.loop){if(c&&!u&&o.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}let d=a?n.translate:-n.translate;function f(C){return C<0?-Math.floor(Math.abs(C)):Math.floor(C)}let p=f(d),m=i.map(C=>f(C)),h=o.freeMode&&o.freeMode.enabled,g=i[m.indexOf(p)-1];if(typeof g>"u"&&(o.cssMode||h)){let C;i.forEach((x,w)=>{p>=x&&(C=w)}),typeof C<"u"&&(g=h?i[C]:i[C>0?C-1:C])}let v=0;if(typeof g<"u"&&(v=s.indexOf(g),v<0&&(v=n.activeIndex-1),o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(v=v-n.slidesPerViewDynamic("previous",!0)+1,v=Math.max(v,0))),o.rewind&&n.isBeginning){let C=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(C,e,t,r)}else if(o.loop&&n.activeIndex===0&&o.cssMode)return requestAnimationFrame(()=>{n.slideTo(v,e,t,r)}),!0;return n.slideTo(v,e,t,r)}function XU(e,t,r){t===void 0&&(t=!0);let n=this;if(!n.destroyed)return typeof e>"u"&&(e=n.params.speed),n.slideTo(n.activeIndex,e,t,r)}function QU(e,t,r,n){t===void 0&&(t=!0),n===void 0&&(n=.5);let o=this;if(o.destroyed)return;typeof e>"u"&&(e=o.params.speed);let i=o.activeIndex,s=Math.min(o.params.slidesPerGroupSkip,i),a=s+Math.floor((i-s)/o.params.slidesPerGroup),l=o.rtlTranslate?o.translate:-o.translate;if(l>=o.snapGrid[a]){let c=o.snapGrid[a],u=o.snapGrid[a+1];l-c>(u-c)*n&&(i+=o.params.slidesPerGroup)}else{let c=o.snapGrid[a-1],u=o.snapGrid[a];l-c<=(u-c)*n&&(i-=o.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,o.slidesGrid.length-1),o.slideTo(i,e,t,r)}function JU(){let e=this;if(e.destroyed)return;let{params:t,slidesEl:r}=e,n=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView,o=e.clickedIndex,i,s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?o<e.loopedSlides-n/2||o>e.slides.length-e.loopedSlides+n/2?(e.loopFix(),o=e.getSlideIndex(Dt(r,`${s}[data-swiper-slide-index="${i}"]`)[0]),gs(()=>{e.slideTo(o)})):e.slideTo(o):o>e.slides.length-n?(e.loopFix(),o=e.getSlideIndex(Dt(r,`${s}[data-swiper-slide-index="${i}"]`)[0]),gs(()=>{e.slideTo(o)})):e.slideTo(o)}else e.slideTo(o)}var eG={slideTo:WU,slideToLoop:qU,slideNext:KU,slidePrev:YU,slideReset:XU,slideToClosest:QU,slideToClickedSlide:JU};function tG(e,t){let r=this,{params:n,slidesEl:o}=r;if(!n.loop||r.virtual&&r.params.virtual.enabled)return;let i=()=>{Dt(o,`.${n.slideClass}, swiper-slide`).forEach((f,p)=>{f.setAttribute("data-swiper-slide-index",p)})},s=r.grid&&n.grid&&n.grid.rows>1,a=n.slidesPerGroup*(s?n.grid.rows:1),l=r.slides.length%a!==0,c=s&&r.slides.length%n.grid.rows!==0,u=d=>{for(let f=0;f<d;f+=1){let p=r.isElement?Cn("swiper-slide",[n.slideBlankClass]):Cn("div",[n.slideClass,n.slideBlankClass]);r.slidesEl.append(p)}};if(l){if(n.loopAddBlankSlides){let d=a-r.slides.length%a;u(d),r.recalcSlides(),r.updateSlides()}else X1("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");i()}else if(c){if(n.loopAddBlankSlides){let d=n.grid.rows-r.slides.length%n.grid.rows;u(d),r.recalcSlides(),r.updateSlides()}else X1("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");i()}else i();r.loopFix({slideRealIndex:e,direction:n.centeredSlides?void 0:"next",initial:t})}function rG(e){let{slideRealIndex:t,slideTo:r=!0,direction:n,setTranslate:o,activeSlideIndex:i,initial:s,byController:a,byMousewheel:l}=e===void 0?{}:e,c=this;if(!c.params.loop)return;c.emit("beforeLoopFix");let{slides:u,allowSlidePrev:d,allowSlideNext:f,slidesEl:p,params:m}=c,{centeredSlides:h,initialSlide:g}=m;if(c.allowSlidePrev=!0,c.allowSlideNext=!0,c.virtual&&m.virtual.enabled){r&&(!m.centeredSlides&&c.snapIndex===0?c.slideTo(c.virtual.slides.length,0,!1,!0):m.centeredSlides&&c.snapIndex<m.slidesPerView?c.slideTo(c.virtual.slides.length+c.snapIndex,0,!1,!0):c.snapIndex===c.snapGrid.length-1&&c.slideTo(c.virtual.slidesBefore,0,!1,!0)),c.allowSlidePrev=d,c.allowSlideNext=f,c.emit("loopFix");return}let v=m.slidesPerView;v==="auto"?v=c.slidesPerViewDynamic():(v=Math.ceil(parseFloat(m.slidesPerView,10)),h&&v%2===0&&(v=v+1));let C=m.slidesPerGroupAuto?v:m.slidesPerGroup,x=C;x%C!==0&&(x+=C-x%C),x+=m.loopAdditionalSlides,c.loopedSlides=x;let w=c.grid&&m.grid&&m.grid.rows>1;u.length<v+x||c.params.effect==="cards"&&u.length<v+x*2?X1("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):w&&m.grid.fill==="row"&&X1("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");let y=[],b=[],R=w?Math.ceil(u.length/m.grid.rows):u.length,L=s&&R-g<v&&!h,E=L?g:c.activeIndex;typeof i>"u"?i=c.getSlideIndex(u.find(F=>F.classList.contains(m.slideActiveClass))):E=i;let S=n==="next"||!n,A=n==="prev"||!n,k=0,I=0,D=(w?u[i].column:i)+(h&&typeof o>"u"?-v/2+.5:0);if(D<x){k=Math.max(x-D,C);for(let F=0;F<x-D;F+=1){let H=F-Math.floor(F/R)*R;if(w){let P=R-H-1;for(let O=u.length-1;O>=0;O-=1)u[O].column===P&&y.push(O)}else y.push(R-H-1)}}else if(D+v>R-x){I=Math.max(D-(R-x*2),C),L&&(I=Math.max(I,v-R+g+1));for(let F=0;F<I;F+=1){let H=F-Math.floor(F/R)*R;w?u.forEach((P,O)=>{P.column===H&&b.push(O)}):b.push(H)}}if(c.__preventObserver__=!0,requestAnimationFrame(()=>{c.__preventObserver__=!1}),c.params.effect==="cards"&&u.length<v+x*2&&(b.includes(i)&&b.splice(b.indexOf(i),1),y.includes(i)&&y.splice(y.indexOf(i),1)),A&&y.forEach(F=>{u[F].swiperLoopMoveDOM=!0,p.prepend(u[F]),u[F].swiperLoopMoveDOM=!1}),S&&b.forEach(F=>{u[F].swiperLoopMoveDOM=!0,p.append(u[F]),u[F].swiperLoopMoveDOM=!1}),c.recalcSlides(),m.slidesPerView==="auto"?c.updateSlides():w&&(y.length>0&&A||b.length>0&&S)&&c.slides.forEach((F,H)=>{c.grid.updateSlide(H,F,c.slides)}),m.watchSlidesProgress&&c.updateSlidesOffset(),r){if(y.length>0&&A){if(typeof t>"u"){let F=c.slidesGrid[E],P=c.slidesGrid[E+k]-F;l?c.setTranslate(c.translate-P):(c.slideTo(E+Math.ceil(k),0,!1,!0),o&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-P,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-P))}else if(o){let F=w?y.length/m.grid.rows:y.length;c.slideTo(c.activeIndex+F,0,!1,!0),c.touchEventsData.currentTranslate=c.translate}}else if(b.length>0&&S)if(typeof t>"u"){let F=c.slidesGrid[E],P=c.slidesGrid[E-I]-F;l?c.setTranslate(c.translate-P):(c.slideTo(E-I,0,!1,!0),o&&(c.touchEventsData.startTranslate=c.touchEventsData.startTranslate-P,c.touchEventsData.currentTranslate=c.touchEventsData.currentTranslate-P))}else{let F=w?b.length/m.grid.rows:b.length;c.slideTo(c.activeIndex-F,0,!1,!0)}}if(c.allowSlidePrev=d,c.allowSlideNext=f,c.controller&&c.controller.control&&!a){let F={slideRealIndex:t,direction:n,setTranslate:o,activeSlideIndex:i,byController:!0};Array.isArray(c.controller.control)?c.controller.control.forEach(H=>{!H.destroyed&&H.params.loop&&H.loopFix({...F,slideTo:H.params.slidesPerView===m.slidesPerView?r:!1})}):c.controller.control instanceof c.constructor&&c.controller.control.params.loop&&c.controller.control.loopFix({...F,slideTo:c.controller.control.params.slidesPerView===m.slidesPerView?r:!1})}c.emit("loopFix")}function nG(){let e=this,{params:t,slidesEl:r}=e;if(!t.loop||!r||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();let n=[];e.slides.forEach(o=>{let i=typeof o.swiperSlideIndex>"u"?o.getAttribute("data-swiper-slide-index")*1:o.swiperSlideIndex;n[i]=o}),e.slides.forEach(o=>{o.removeAttribute("data-swiper-slide-index")}),n.forEach(o=>{r.append(o)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var oG={loopCreate:tG,loopFix:rG,loopDestroy:nG};function iG(e){let t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;let r=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),r.style.cursor="move",r.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function sG(){let e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var aG={setGrabCursor:iG,unsetGrabCursor:sG};function lG(e,t){t===void 0&&(t=this);function r(n){if(!n||n===Kt()||n===Qe())return null;n.assignedSlot&&(n=n.assignedSlot);let o=n.closest(e);return!o&&!n.getRootNode?null:o||r(n.getRootNode().host)}return r(t)}function vR(e,t,r){let n=Qe(),{params:o}=e,i=o.edgeSwipeDetection,s=o.edgeSwipeThreshold;return i&&(r<=s||r>=n.innerWidth-s)?i==="prevent"?(t.preventDefault(),!0):!1:!0}function cG(e){let t=this,r=Kt(),n=e;n.originalEvent&&(n=n.originalEvent);let o=t.touchEventsData;if(n.type==="pointerdown"){if(o.pointerId!==null&&o.pointerId!==n.pointerId)return;o.pointerId=n.pointerId}else n.type==="touchstart"&&n.targetTouches.length===1&&(o.touchId=n.targetTouches[0].identifier);if(n.type==="touchstart"){vR(t,n,n.targetTouches[0].pageX);return}let{params:i,touches:s,enabled:a}=t;if(!a||!i.simulateTouch&&n.pointerType==="mouse"||t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let l=n.target;if(i.touchEventsTarget==="wrapper"&&!dR(l,t.wrapperEl)||"which"in n&&n.which===3||"button"in n&&n.button>0||o.isTouched&&o.isMoved)return;let c=!!i.noSwipingClass&&i.noSwipingClass!=="",u=n.composedPath?n.composedPath():n.path;c&&n.target&&n.target.shadowRoot&&u&&(l=u[0]);let d=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,f=!!(n.target&&n.target.shadowRoot);if(i.noSwiping&&(f?lG(d,l):l.closest(d))){t.allowClick=!0;return}if(i.swipeHandler&&!l.closest(i.swipeHandler))return;s.currentX=n.pageX,s.currentY=n.pageY;let p=s.currentX,m=s.currentY;if(!vR(t,n,p))return;Object.assign(o,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=p,s.startY=m,o.touchStartTime=vs(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(o.allowThresholdMove=!1);let h=!0;l.matches(o.focusableElements)&&(h=!1,l.nodeName==="SELECT"&&(o.isTouched=!1)),r.activeElement&&r.activeElement.matches(o.focusableElements)&&r.activeElement!==l&&(n.pointerType==="mouse"||n.pointerType!=="mouse"&&!l.matches(o.focusableElements))&&r.activeElement.blur();let g=h&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||g)&&!l.isContentEditable&&n.preventDefault(),i.freeMode&&i.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",n)}function uG(e){let t=Kt(),r=this,n=r.touchEventsData,{params:o,touches:i,rtlTranslate:s,enabled:a}=r;if(!a||!o.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(n.touchId!==null||l.pointerId!==n.pointerId))return;let c;if(l.type==="touchmove"){if(c=[...l.changedTouches].find(b=>b.identifier===n.touchId),!c||c.identifier!==n.touchId)return}else c=l;if(!n.isTouched){n.startMoving&&n.isScrolling&&r.emit("touchMoveOpposite",l);return}let u=c.pageX,d=c.pageY;if(l.preventedByNestedSwiper){i.startX=u,i.startY=d;return}if(!r.allowTouchMove){l.target.matches(n.focusableElements)||(r.allowClick=!1),n.isTouched&&(Object.assign(i,{startX:u,startY:d,currentX:u,currentY:d}),n.touchStartTime=vs());return}if(o.touchReleaseOnEdges&&!o.loop)if(r.isVertical()){if(d<i.startY&&r.translate<=r.maxTranslate()||d>i.startY&&r.translate>=r.minTranslate()){n.isTouched=!1,n.isMoved=!1;return}}else{if(s&&(u>i.startX&&-r.translate<=r.maxTranslate()||u<i.startX&&-r.translate>=r.minTranslate()))return;if(!s&&(u<i.startX&&r.translate<=r.maxTranslate()||u>i.startX&&r.translate>=r.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(n.focusableElements)&&t.activeElement!==l.target&&l.pointerType!=="mouse"&&t.activeElement.blur(),t.activeElement&&l.target===t.activeElement&&l.target.matches(n.focusableElements)){n.isMoved=!0,r.allowClick=!1;return}n.allowTouchCallbacks&&r.emit("touchMove",l),i.previousX=i.currentX,i.previousY=i.currentY,i.currentX=u,i.currentY=d;let f=i.currentX-i.startX,p=i.currentY-i.startY;if(r.params.threshold&&Math.sqrt(f**2+p**2)<r.params.threshold)return;if(typeof n.isScrolling>"u"){let b;r.isHorizontal()&&i.currentY===i.startY||r.isVertical()&&i.currentX===i.startX?n.isScrolling=!1:f*f+p*p>=25&&(b=Math.atan2(Math.abs(p),Math.abs(f))*180/Math.PI,n.isScrolling=r.isHorizontal()?b>o.touchAngle:90-b>o.touchAngle)}if(n.isScrolling&&r.emit("touchMoveOpposite",l),typeof n.startMoving>"u"&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(n.startMoving=!0),n.isScrolling||l.type==="touchmove"&&n.preventTouchMoveFromPointerMove){n.isTouched=!1;return}if(!n.startMoving)return;r.allowClick=!1,!o.cssMode&&l.cancelable&&l.preventDefault(),o.touchMoveStopPropagation&&!o.nested&&l.stopPropagation();let m=r.isHorizontal()?f:p,h=r.isHorizontal()?i.currentX-i.previousX:i.currentY-i.previousY;o.oneWayMovement&&(m=Math.abs(m)*(s?1:-1),h=Math.abs(h)*(s?1:-1)),i.diff=m,m*=o.touchRatio,s&&(m=-m,h=-h);let g=r.touchesDirection;r.swipeDirection=m>0?"prev":"next",r.touchesDirection=h>0?"prev":"next";let v=r.params.loop&&!o.cssMode,C=r.touchesDirection==="next"&&r.allowSlideNext||r.touchesDirection==="prev"&&r.allowSlidePrev;if(!n.isMoved){if(v&&C&&r.loopFix({direction:r.swipeDirection}),n.startTranslate=r.getTranslate(),r.setTransition(0),r.animating){let b=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});r.wrapperEl.dispatchEvent(b)}n.allowMomentumBounce=!1,o.grabCursor&&(r.allowSlideNext===!0||r.allowSlidePrev===!0)&&r.setGrabCursor(!0),r.emit("sliderFirstMove",l)}let x;if(new Date().getTime(),o._loopSwapReset!==!1&&n.isMoved&&n.allowThresholdMove&&g!==r.touchesDirection&&v&&C&&Math.abs(m)>=1){Object.assign(i,{startX:u,startY:d,currentX:u,currentY:d,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,n.startTranslate=n.currentTranslate;return}r.emit("sliderMove",l),n.isMoved=!0,n.currentTranslate=m+n.startTranslate;let w=!0,y=o.resistanceRatio;if(o.touchReleaseOnEdges&&(y=0),m>0?(v&&C&&!x&&n.allowThresholdMove&&n.currentTranslate>(o.centeredSlides?r.minTranslate()-r.slidesSizesGrid[r.activeIndex+1]-(o.slidesPerView!=="auto"&&r.slides.length-o.slidesPerView>=2?r.slidesSizesGrid[r.activeIndex+1]+r.params.spaceBetween:0)-r.params.spaceBetween:r.minTranslate())&&r.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>r.minTranslate()&&(w=!1,o.resistance&&(n.currentTranslate=r.minTranslate()-1+(-r.minTranslate()+n.startTranslate+m)**y))):m<0&&(v&&C&&!x&&n.allowThresholdMove&&n.currentTranslate<(o.centeredSlides?r.maxTranslate()+r.slidesSizesGrid[r.slidesSizesGrid.length-1]+r.params.spaceBetween+(o.slidesPerView!=="auto"&&r.slides.length-o.slidesPerView>=2?r.slidesSizesGrid[r.slidesSizesGrid.length-1]+r.params.spaceBetween:0):r.maxTranslate())&&r.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:r.slides.length-(o.slidesPerView==="auto"?r.slidesPerViewDynamic():Math.ceil(parseFloat(o.slidesPerView,10)))}),n.currentTranslate<r.maxTranslate()&&(w=!1,o.resistance&&(n.currentTranslate=r.maxTranslate()+1-(r.maxTranslate()-n.startTranslate-m)**y))),w&&(l.preventedByNestedSwiper=!0),!r.allowSlideNext&&r.swipeDirection==="next"&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!r.allowSlidePrev&&r.swipeDirection==="prev"&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),!r.allowSlidePrev&&!r.allowSlideNext&&(n.currentTranslate=n.startTranslate),o.threshold>0)if(Math.abs(m)>o.threshold||n.allowThresholdMove){if(!n.allowThresholdMove){n.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,n.currentTranslate=n.startTranslate,i.diff=r.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY;return}}else{n.currentTranslate=n.startTranslate;return}!o.followFinger||o.cssMode||((o.freeMode&&o.freeMode.enabled&&r.freeMode||o.watchSlidesProgress)&&(r.updateActiveIndex(),r.updateSlidesClasses()),o.freeMode&&o.freeMode.enabled&&r.freeMode&&r.freeMode.onTouchMove(),r.updateProgress(n.currentTranslate),r.setTranslate(n.currentTranslate))}function dG(e){let t=this,r=t.touchEventsData,n=e;n.originalEvent&&(n=n.originalEvent);let o;if(n.type==="touchend"||n.type==="touchcancel"){if(o=[...n.changedTouches].find(y=>y.identifier===r.touchId),!o||o.identifier!==r.touchId)return}else{if(r.touchId!==null||n.pointerId!==r.pointerId)return;o=n}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(n.type)&&!(["pointercancel","contextmenu"].includes(n.type)&&(t.browser.isSafari||t.browser.isWebView)))return;r.pointerId=null,r.touchId=null;let{params:s,touches:a,rtlTranslate:l,slidesGrid:c,enabled:u}=t;if(!u||!s.simulateTouch&&n.pointerType==="mouse")return;if(r.allowTouchCallbacks&&t.emit("touchEnd",n),r.allowTouchCallbacks=!1,!r.isTouched){r.isMoved&&s.grabCursor&&t.setGrabCursor(!1),r.isMoved=!1,r.startMoving=!1;return}s.grabCursor&&r.isMoved&&r.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);let d=vs(),f=d-r.touchStartTime;if(t.allowClick){let y=n.path||n.composedPath&&n.composedPath();t.updateClickedSlide(y&&y[0]||n.target,y),t.emit("tap click",n),f<300&&d-r.lastClickTime<300&&t.emit("doubleTap doubleClick",n)}if(r.lastClickTime=vs(),gs(()=>{t.destroyed||(t.allowClick=!0)}),!r.isTouched||!r.isMoved||!t.swipeDirection||a.diff===0&&!r.loopSwapReset||r.currentTranslate===r.startTranslate&&!r.loopSwapReset){r.isTouched=!1,r.isMoved=!1,r.startMoving=!1;return}r.isTouched=!1,r.isMoved=!1,r.startMoving=!1;let p;if(s.followFinger?p=l?t.translate:-t.translate:p=-r.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:p});return}let m=p>=-t.maxTranslate()&&!t.params.loop,h=0,g=t.slidesSizesGrid[0];for(let y=0;y<c.length;y+=y<s.slidesPerGroupSkip?1:s.slidesPerGroup){let b=y<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;typeof c[y+b]<"u"?(m||p>=c[y]&&p<c[y+b])&&(h=y,g=c[y+b]-c[y]):(m||p>=c[y])&&(h=y,g=c[c.length-1]-c[c.length-2])}let v=null,C=null;s.rewind&&(t.isBeginning?C=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(v=0));let x=(p-c[h])/g,w=h<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(f>s.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(x>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?v:h+w):t.slideTo(h)),t.swipeDirection==="prev"&&(x>1-s.longSwipesRatio?t.slideTo(h+w):C!==null&&x<0&&Math.abs(x)>s.longSwipesRatio?t.slideTo(C):t.slideTo(h))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(n.target===t.navigation.nextEl||n.target===t.navigation.prevEl)?n.target===t.navigation.nextEl?t.slideTo(h+w):t.slideTo(h):(t.swipeDirection==="next"&&t.slideTo(v!==null?v:h+w),t.swipeDirection==="prev"&&t.slideTo(C!==null?C:h))}}function CR(){let e=this,{params:t,el:r}=e;if(r&&r.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();let{allowSlideNext:n,allowSlidePrev:o,snapGrid:i}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();let a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=o,e.allowSlideNext=n,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function fG(e){let t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function pG(){let e=this,{wrapperEl:t,rtlTranslate:r,enabled:n}=e;if(!n)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let o,i=e.maxTranslate()-e.minTranslate();i===0?o=0:o=(e.translate-e.minTranslate())/i,o!==e.progress&&e.updateProgress(r?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function mG(e){let t=this;n0(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function hG(){let e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}var RR=(e,t)=>{let r=Kt(),{params:n,el:o,wrapperEl:i,device:s}=e,a=!!n.nested,l=t==="on"?"addEventListener":"removeEventListener",c=t;!o||typeof o=="string"||(r[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),o[l]("touchstart",e.onTouchStart,{passive:!1}),o[l]("pointerdown",e.onTouchStart,{passive:!1}),r[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),r[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),r[l]("touchend",e.onTouchEnd,{passive:!0}),r[l]("pointerup",e.onTouchEnd,{passive:!0}),r[l]("pointercancel",e.onTouchEnd,{passive:!0}),r[l]("touchcancel",e.onTouchEnd,{passive:!0}),r[l]("pointerout",e.onTouchEnd,{passive:!0}),r[l]("pointerleave",e.onTouchEnd,{passive:!0}),r[l]("contextmenu",e.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&o[l]("click",e.onClick,!0),n.cssMode&&i[l]("scroll",e.onScroll),n.updateOnWindowResize?e[c](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",CR,!0):e[c]("observerUpdate",CR,!0),o[l]("load",e.onLoad,{capture:!0}))};function gG(){let e=this,{params:t}=e;e.onTouchStart=cG.bind(e),e.onTouchMove=uG.bind(e),e.onTouchEnd=dG.bind(e),e.onDocumentTouchStart=hG.bind(e),t.cssMode&&(e.onScroll=pG.bind(e)),e.onClick=fG.bind(e),e.onLoad=mG.bind(e),RR(e,"on")}function vG(){RR(this,"off")}var CG={attachEvents:gG,detachEvents:vG},xR=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function xG(){let e=this,{realIndex:t,initialized:r,params:n,el:o}=e,i=n.breakpoints;if(!i||i&&Object.keys(i).length===0)return;let s=Kt(),a=n.breakpointsBase==="window"||!n.breakpointsBase?n.breakpointsBase:"container",l=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?e.el:s.querySelector(n.breakpointsBase),c=e.getBreakpoint(i,a,l);if(!c||e.currentBreakpoint===c)return;let d=(c in i?i[c]:void 0)||e.originalParams,f=xR(e,n),p=xR(e,d),m=e.params.grabCursor,h=d.grabCursor,g=n.enabled;f&&!p?(o.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!f&&p&&(o.classList.add(`${n.containerModifierClass}grid`),(d.grid.fill&&d.grid.fill==="column"||!d.grid.fill&&n.grid.fill==="column")&&o.classList.add(`${n.containerModifierClass}grid-column`),e.emitContainerClasses()),m&&!h?e.unsetGrabCursor():!m&&h&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(b=>{if(typeof d[b]>"u")return;let R=n[b]&&n[b].enabled,L=d[b]&&d[b].enabled;R&&!L&&e[b].disable(),!R&&L&&e[b].enable()});let v=d.direction&&d.direction!==n.direction,C=n.loop&&(d.slidesPerView!==n.slidesPerView||v),x=n.loop;v&&r&&e.changeDirection(),Cr(e.params,d);let w=e.params.enabled,y=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),g&&!w?e.disable():!g&&w&&e.enable(),e.currentBreakpoint=c,e.emit("_beforeBreakpoint",d),r&&(C?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!x&&y?(e.loopCreate(t),e.updateSlides()):x&&!y&&e.loopDestroy()),e.emit("breakpoint",d)}function wG(e,t,r){if(t===void 0&&(t="window"),!e||t==="container"&&!r)return;let n=!1,o=Qe(),i=t==="window"?o.innerHeight:r.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){let l=parseFloat(a.substr(1));return{value:i*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a<s.length;a+=1){let{point:l,value:c}=s[a];t==="window"?o.matchMedia(`(min-width: ${c}px)`).matches&&(n=l):c<=r.clientWidth&&(n=l)}return n||"max"}var bG={setBreakpoint:xG,getBreakpoint:wG};function yG(e,t){let r=[];return e.forEach(n=>{typeof n=="object"?Object.keys(n).forEach(o=>{n[o]&&r.push(t+o)}):typeof n=="string"&&r.push(t+n)}),r}function SG(){let e=this,{classNames:t,params:r,rtl:n,el:o,device:i}=e,s=yG(["initialized",r.direction,{"free-mode":e.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:n},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&r.grid.fill==="column"},{android:i.android},{ios:i.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],r.containerModifierClass);t.push(...s),o.classList.add(...t),e.emitContainerClasses()}function RG(){let e=this,{el:t,classNames:r}=e;!t||typeof t=="string"||(t.classList.remove(...r),e.emitContainerClasses())}var LG={addClasses:SG,removeClasses:RG};function MG(){let e=this,{isLocked:t,params:r}=e,{slidesOffsetBefore:n}=r;if(n){let o=e.slides.length-1,i=e.slidesGrid[o]+e.slidesSizesGrid[o]+n*2;e.isLocked=e.size>i}else e.isLocked=e.snapGrid.length===1;r.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),r.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var EG={checkOverflow:MG},o0={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function TG(e,t){return function(n){n===void 0&&(n={});let o=Object.keys(n)[0],i=n[o];if(typeof i!="object"||i===null){Cr(t,n);return}if(e[o]===!0&&(e[o]={enabled:!0}),o==="navigation"&&e[o]&&e[o].enabled&&!e[o].prevEl&&!e[o].nextEl&&(e[o].auto=!0),["pagination","scrollbar"].indexOf(o)>=0&&e[o]&&e[o].enabled&&!e[o].el&&(e[o].auto=!0),!(o in e&&"enabled"in i)){Cr(t,n);return}typeof e[o]=="object"&&!("enabled"in e[o])&&(e[o].enabled=!0),e[o]||(e[o]={enabled:!1}),Cr(t,n)}}var Z3={eventsEmitter:LU,update:FU,translate:zU,transition:GU,slide:eG,loop:oG,grabCursor:aG,events:CG,breakpoints:bG,checkOverflow:EG,classes:LG},j3={},Ta=class e{constructor(){let t,r;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];o.length===1&&o[0].constructor&&Object.prototype.toString.call(o[0]).slice(8,-1)==="Object"?r=o[0]:[t,r]=o,r||(r={}),r=Cr({},r),t&&!r.el&&(r.el=t);let s=Kt();if(r.el&&typeof r.el=="string"&&s.querySelectorAll(r.el).length>1){let u=[];return s.querySelectorAll(r.el).forEach(d=>{let f=Cr({},r,{el:d});u.push(new e(f))}),u}let a=this;a.__swiper__=!0,a.support=wR(),a.device=bR({userAgent:r.userAgent}),a.browser=yR(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],r.modules&&Array.isArray(r.modules)&&a.modules.push(...r.modules);let l={};a.modules.forEach(u=>{u({params:r,swiper:a,extendParams:TG(r,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});let c=Cr({},o0,l);return a.params=Cr({},c,j3,r),a.originalParams=Cr({},a.params),a.passedParams=Cr({},r),a.params&&a.params.on&&Object.keys(a.params.on).forEach(u=>{a.on(u,a.params.on[u])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){let{slidesEl:r,params:n}=this,o=Dt(r,`.${n.slideClass}, swiper-slide`),i=Cs(o[0]);return Cs(t)-i}getSlideIndexByData(t){return this.getSlideIndex(this.slides.find(r=>r.getAttribute("data-swiper-slide-index")*1===t))}recalcSlides(){let t=this,{slidesEl:r,params:n}=t;t.slides=Dt(r,`.${n.slideClass}, swiper-slide`)}enable(){let t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){let t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,r){let n=this;t=Math.min(Math.max(t,0),1);let o=n.minTranslate(),s=(n.maxTranslate()-o)*t+o;n.translateTo(s,typeof r>"u"?0:r),n.updateActiveIndex(),n.updateSlidesClasses()}emitContainerClasses(){let t=this;if(!t.params._emitClasses||!t.el)return;let r=t.el.className.split(" ").filter(n=>n.indexOf("swiper")===0||n.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",r.join(" "))}getSlideClasses(t){let r=this;return r.destroyed?"":t.className.split(" ").filter(n=>n.indexOf("swiper-slide")===0||n.indexOf(r.params.slideClass)===0).join(" ")}emitSlidesClasses(){let t=this;if(!t.params._emitClasses||!t.el)return;let r=[];t.slides.forEach(n=>{let o=t.getSlideClasses(n);r.push({slideEl:n,classNames:o}),t.emit("_slideClass",n,o)}),t.emit("_slideClasses",r)}slidesPerViewDynamic(t,r){t===void 0&&(t="current"),r===void 0&&(r=!1);let n=this,{params:o,slides:i,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:c}=n,u=1;if(typeof o.slidesPerView=="number")return o.slidesPerView;if(o.centeredSlides){let d=i[c]?Math.ceil(i[c].swiperSlideSize):0,f;for(let p=c+1;p<i.length;p+=1)i[p]&&!f&&(d+=Math.ceil(i[p].swiperSlideSize),u+=1,d>l&&(f=!0));for(let p=c-1;p>=0;p-=1)i[p]&&!f&&(d+=i[p].swiperSlideSize,u+=1,d>l&&(f=!0))}else if(t==="current")for(let d=c+1;d<i.length;d+=1)(r?s[d]+a[d]-s[c]<l:s[d]-s[c]<l)&&(u+=1);else for(let d=c-1;d>=0;d-=1)s[c]-s[d]<l&&(u+=1);return u}update(){let t=this;if(!t||t.destroyed)return;let{snapGrid:r,params:n}=t;n.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(s=>{s.complete&&n0(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function o(){let s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let i;if(n.freeMode&&n.freeMode.enabled&&!n.cssMode)o(),n.autoHeight&&t.updateAutoHeight();else{if((n.slidesPerView==="auto"||n.slidesPerView>1)&&t.isEnd&&!n.centeredSlides){let s=t.virtual&&n.virtual.enabled?t.virtual.slides:t.slides;i=t.slideTo(s.length-1,0,!1,!0)}else i=t.slideTo(t.activeIndex,0,!1,!0);i||o()}n.watchOverflow&&r!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,r){r===void 0&&(r=!0);let n=this,o=n.params.direction;return t||(t=o==="horizontal"?"vertical":"horizontal"),t===o||t!=="horizontal"&&t!=="vertical"||(n.el.classList.remove(`${n.params.containerModifierClass}${o}`),n.el.classList.add(`${n.params.containerModifierClass}${t}`),n.emitContainerClasses(),n.params.direction=t,n.slides.forEach(i=>{t==="vertical"?i.style.width="":i.style.height=""}),n.emit("changeDirection"),r&&n.update()),n}changeLanguageDirection(t){let r=this;r.rtl&&t==="rtl"||!r.rtl&&t==="ltr"||(r.rtl=t==="rtl",r.rtlTranslate=r.params.direction==="horizontal"&&r.rtl,r.rtl?(r.el.classList.add(`${r.params.containerModifierClass}rtl`),r.el.dir="rtl"):(r.el.classList.remove(`${r.params.containerModifierClass}rtl`),r.el.dir="ltr"),r.update())}mount(t){let r=this;if(r.mounted)return!0;let n=t||r.params.el;if(typeof n=="string"&&(n=document.querySelector(n)),!n)return!1;n.swiper=r,n.parentNode&&n.parentNode.host&&n.parentNode.host.nodeName===r.params.swiperElementNodeName.toUpperCase()&&(r.isElement=!0);let o=()=>`.${(r.params.wrapperClass||"").trim().split(" ").join(".")}`,s=n&&n.shadowRoot&&n.shadowRoot.querySelector?n.shadowRoot.querySelector(o()):Dt(n,o())[0];return!s&&r.params.createElements&&(s=Cn("div",r.params.wrapperClass),n.append(s),Dt(n,`.${r.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(r,{el:n,wrapperEl:s,slidesEl:r.isElement&&!n.parentNode.host.slideSlots?n.parentNode.host:s,hostEl:r.isElement?n.parentNode.host:n,mounted:!0,rtl:n.dir.toLowerCase()==="rtl"||xo(n,"direction")==="rtl",rtlTranslate:r.params.direction==="horizontal"&&(n.dir.toLowerCase()==="rtl"||xo(n,"direction")==="rtl"),wrongRTL:xo(s,"display")==="-webkit-box"}),!0}init(t){let r=this;if(r.initialized||r.mount(t)===!1)return r;r.emit("beforeInit"),r.params.breakpoints&&r.setBreakpoint(),r.addClasses(),r.updateSize(),r.updateSlides(),r.params.watchOverflow&&r.checkOverflow(),r.params.grabCursor&&r.enabled&&r.setGrabCursor(),r.params.loop&&r.virtual&&r.params.virtual.enabled?r.slideTo(r.params.initialSlide+r.virtual.slidesBefore,0,r.params.runCallbacksOnInit,!1,!0):r.slideTo(r.params.initialSlide,0,r.params.runCallbacksOnInit,!1,!0),r.params.loop&&r.loopCreate(void 0,!0),r.attachEvents();let o=[...r.el.querySelectorAll('[loading="lazy"]')];return r.isElement&&o.push(...r.hostEl.querySelectorAll('[loading="lazy"]')),o.forEach(i=>{i.complete?n0(r,i):i.addEventListener("load",s=>{n0(r,s.target)})}),U3(r),r.initialized=!0,U3(r),r.emit("init"),r.emit("afterInit"),r}destroy(t,r){t===void 0&&(t=!0),r===void 0&&(r=!0);let n=this,{params:o,el:i,wrapperEl:s,slides:a}=n;return typeof n.params>"u"||n.destroyed||(n.emit("beforeDestroy"),n.initialized=!1,n.detachEvents(),o.loop&&n.loopDestroy(),r&&(n.removeClasses(),i&&typeof i!="string"&&i.removeAttribute("style"),s&&s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(o.slideVisibleClass,o.slideFullyVisibleClass,o.slideActiveClass,o.slideNextClass,o.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(l=>{n.off(l)}),t!==!1&&(n.el&&typeof n.el!="string"&&(n.el.swiper=null),uR(n)),n.destroyed=!0),null}static extendDefaults(t){Cr(j3,t)}static get extendedDefaults(){return j3}static get defaults(){return o0}static installModule(t){e.prototype.__modules__||(e.prototype.__modules__=[]);let r=e.prototype.__modules__;typeof t=="function"&&r.indexOf(t)<0&&r.push(t)}static use(t){return Array.isArray(t)?(t.forEach(r=>e.installModule(r)),e):(e.installModule(t),e)}};Object.keys(Z3).forEach(e=>{Object.keys(Z3[e]).forEach(t=>{Ta.prototype[t]=Z3[e][t]})});Ta.use([SU,RU]);var G3=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function si(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function ai(e,t){let r=["__proto__","constructor","prototype"];Object.keys(t).filter(n=>r.indexOf(n)<0).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:si(t[n])&&si(e[n])&&Object.keys(t[n]).length>0?t[n].__swiper__?e[n]=t[n]:ai(e[n],t[n]):e[n]=t[n]})}function i0(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function s0(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function a0(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function W3(e){e===void 0&&(e="");let t=e.split(" ").map(n=>n.trim()).filter(n=>!!n),r=[];return t.forEach(n=>{r.indexOf(n)<0&&r.push(n)}),r.join(" ")}function LR(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function MR(e){let{swiper:t,slides:r,passedParams:n,changedParams:o,nextEl:i,prevEl:s,scrollbarEl:a,paginationEl:l}=e,c=o.filter(E=>E!=="children"&&E!=="direction"&&E!=="wrapperClass"),{params:u,pagination:d,navigation:f,scrollbar:p,virtual:m,thumbs:h}=t,g,v,C,x,w,y,b,R;o.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&u.thumbs&&(!u.thumbs.swiper||u.thumbs.swiper.destroyed)&&(g=!0),o.includes("controller")&&n.controller&&n.controller.control&&u.controller&&!u.controller.control&&(v=!0),o.includes("pagination")&&n.pagination&&(n.pagination.el||l)&&(u.pagination||u.pagination===!1)&&d&&!d.el&&(C=!0),o.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||a)&&(u.scrollbar||u.scrollbar===!1)&&p&&!p.el&&(x=!0),o.includes("navigation")&&n.navigation&&(n.navigation.prevEl||s)&&(n.navigation.nextEl||i)&&(u.navigation||u.navigation===!1)&&f&&!f.prevEl&&!f.nextEl&&(w=!0);let L=E=>{t[E]&&(t[E].destroy(),E==="navigation"?(t.isElement&&(t[E].prevEl.remove(),t[E].nextEl.remove()),u[E].prevEl=void 0,u[E].nextEl=void 0,t[E].prevEl=void 0,t[E].nextEl=void 0):(t.isElement&&t[E].el.remove(),u[E].el=void 0,t[E].el=void 0))};o.includes("loop")&&t.isElement&&(u.loop&&!n.loop?y=!0:!u.loop&&n.loop?b=!0:R=!0),c.forEach(E=>{if(si(u[E])&&si(n[E]))Object.assign(u[E],n[E]),(E==="navigation"||E==="pagination"||E==="scrollbar")&&"enabled"in n[E]&&!n[E].enabled&&L(E);else{let S=n[E];(S===!0||S===!1)&&(E==="navigation"||E==="pagination"||E==="scrollbar")?S===!1&&L(E):u[E]=n[E]}}),c.includes("controller")&&!v&&t.controller&&t.controller.control&&u.controller&&u.controller.control&&(t.controller.control=u.controller.control),o.includes("children")&&r&&m&&u.virtual.enabled?(m.slides=r,m.update(!0)):o.includes("virtual")&&m&&u.virtual.enabled&&(r&&(m.slides=r),m.update(!0)),o.includes("children")&&r&&u.loop&&(R=!0),g&&h.init()&&h.update(!0),v&&(t.controller.control=u.controller.control),C&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(u.pagination.el=l),d.init(),d.render(),d.update()),x&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(u.scrollbar.el=a),p.init(),p.updateSize(),p.setTranslate()),w&&(t.isElement&&((!i||typeof i=="string")&&(i=document.createElement("div"),i.classList.add("swiper-button-next"),i.innerHTML=t.hostEl.constructor.nextButtonSvg,i.part.add("button-next"),t.el.appendChild(i)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),s.innerHTML=t.hostEl.constructor.prevButtonSvg,s.part.add("button-prev"),t.el.appendChild(s))),i&&(u.navigation.nextEl=i),s&&(u.navigation.prevEl=s),f.init(),f.update()),o.includes("allowSlideNext")&&(t.allowSlideNext=n.allowSlideNext),o.includes("allowSlidePrev")&&(t.allowSlidePrev=n.allowSlidePrev),o.includes("direction")&&t.changeDirection(n.direction,!1),(y||R)&&t.loopDestroy(),(b||R)&&t.loopCreate(),t.update()}function ER(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);let r={on:{}},n={},o={};ai(r,o0),r._emitClasses=!0,r.init=!1;let i={},s=G3.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?si(e[l])?(r[l]={},o[l]={},ai(r[l],e[l]),ai(o[l],e[l])):(r[l]=e[l],o[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?n[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:r.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:i[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{r[l]===!0&&(r[l]={}),r[l]===!1&&delete r[l]}),{params:r,passedParams:o,rest:i,events:n}}function TR(e,t){let{el:r,nextEl:n,prevEl:o,paginationEl:i,scrollbarEl:s,swiper:a}=e;i0(t)&&n&&o&&(a.params.navigation.nextEl=n,a.originalParams.navigation.nextEl=n,a.params.navigation.prevEl=o,a.originalParams.navigation.prevEl=o),s0(t)&&i&&(a.params.pagination.el=i,a.originalParams.pagination.el=i),a0(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(r)}function kR(e,t,r,n,o){let i=[];if(!t)return i;let s=l=>{i.indexOf(l)<0&&i.push(l)};if(r&&n){let l=n.map(o),c=r.map(o);l.join("")!==c.join("")&&s("children"),n.length!==r.length&&s("children")}return G3.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(si(e[l])&&si(t[l])){let c=Object.keys(e[l]),u=Object.keys(t[l]);c.length!==u.length?s(l):(c.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}),u.forEach(d=>{e[l][d]!==t[l][d]&&s(l)}))}else e[l]!==t[l]&&s(l)}),i}var AR=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function l0(){return l0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},l0.apply(this,arguments)}function DR(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function NR(e){let t=[];return gt.Children.toArray(e).forEach(r=>{DR(r)?t.push(r):r.props&&r.props.children&&NR(r.props.children).forEach(n=>t.push(n))}),t}function AG(e){let t=[],r={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return gt.Children.toArray(e).forEach(n=>{if(DR(n))t.push(n);else if(n.props&&n.props.slot&&r[n.props.slot])r[n.props.slot].push(n);else if(n.props&&n.props.children){let o=NR(n.props.children);o.length>0?o.forEach(i=>t.push(i)):r["container-end"].push(n)}else r["container-end"].push(n)}),{slides:t,slots:r}}function IG(e,t,r){if(!r)return null;let n=u=>{let d=u;return u<0?d=t.length+u:d>=t.length&&(d=d-t.length),d},o=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${r.offset}px`}:{top:`${r.offset}px`},{from:i,to:s}=r,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,c=[];for(let u=a;u<l;u+=1)u>=i&&u<=s&&c.push(t[n(u)]);return c.map((u,d)=>gt.cloneElement(u,{swiper:e,style:o,key:u.props.virtualIndex||u.key||`slide-${d}`}))}function tc(e,t){return typeof window>"u"?q3(e,t):kG(e,t)}var IR=PR(null);var PG=PR(null);var K3=OR(function(e,t){let{className:r,tag:n="div",wrapperTag:o="div",children:i,onSwiper:s,...a}=e===void 0?{}:e,l=!1,[c,u]=ec("swiper"),[d,f]=ec(null),[p,m]=ec(!1),h=Zn(!1),g=Zn(null),v=Zn(null),C=Zn(null),x=Zn(null),w=Zn(null),y=Zn(null),b=Zn(null),R=Zn(null),{params:L,passedParams:E,rest:S,events:A}=ER(a),{slides:k,slots:I}=AG(i),N=()=>{m(!p)};Object.assign(L.on,{_containerClasses(O,M){u(M)}});let D=()=>{Object.assign(L.on,A),l=!0;let O={...L};if(delete O.wrapperClass,v.current=new Ta(O),v.current.virtual&&v.current.params.virtual.enabled){v.current.virtual.slides=k;let M={cache:!1,slides:k,renderExternal:f,renderExternalUpdate:!1};ai(v.current.params.virtual,M),ai(v.current.originalParams.virtual,M)}};g.current||D(),v.current&&v.current.on("_beforeBreakpoint",N);let F=()=>{l||!A||!v.current||Object.keys(A).forEach(O=>{v.current.on(O,A[O])})},H=()=>{!A||!v.current||Object.keys(A).forEach(O=>{v.current.off(O,A[O])})};q3(()=>()=>{v.current&&v.current.off("_beforeBreakpoint",N)}),q3(()=>{!h.current&&v.current&&(v.current.emitSlidesClasses(),h.current=!0)}),tc(()=>{if(t&&(t.current=g.current),!!g.current)return v.current.destroyed&&D(),TR({el:g.current,nextEl:w.current,prevEl:y.current,paginationEl:b.current,scrollbarEl:R.current,swiper:v.current},L),s&&!v.current.destroyed&&s(v.current),()=>{v.current&&!v.current.destroyed&&v.current.destroy(!0,!1)}},[]),tc(()=>{F();let O=kR(E,C.current,k,x.current,M=>M.key);return C.current=E,x.current=k,O.length&&v.current&&!v.current.destroyed&&MR({swiper:v.current,slides:k,passedParams:E,changedParams:O,nextEl:w.current,prevEl:y.current,scrollbarEl:R.current,paginationEl:b.current}),()=>{H()}}),tc(()=>{AR(v.current)},[d]);function P(){return L.virtual?IG(v.current,k,d):k.map((O,M)=>gt.cloneElement(O,{swiper:v.current,swiperSlideIndex:M}))}return gt.createElement(n,l0({ref:g,className:W3(`${c}${r?` ${r}`:""}`)},S),gt.createElement(PG.Provider,{value:v.current},I["container-start"],gt.createElement(o,{className:LR(L.wrapperClass)},I["wrapper-start"],P(),I["wrapper-end"]),i0(L)&>.createElement(gt.Fragment,null,gt.createElement("div",{ref:y,className:"swiper-button-prev"}),gt.createElement("div",{ref:w,className:"swiper-button-next"})),a0(L)&>.createElement("div",{ref:R,className:"swiper-scrollbar"}),s0(L)&>.createElement("div",{ref:b,className:"swiper-pagination"}),I["container-end"]))});K3.displayName="Swiper";var Y3=OR(function(e,t){let{tag:r="div",children:n,className:o="",swiper:i,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:c,...u}=e===void 0?{}:e,d=Zn(null),[f,p]=ec("swiper-slide"),[m,h]=ec(!1);function g(w,y,b){y===d.current&&p(b)}tc(()=>{if(typeof c<"u"&&(d.current.swiperSlideIndex=c),t&&(t.current=d.current),!(!d.current||!i)){if(i.destroyed){f!=="swiper-slide"&&p("swiper-slide");return}return i.on("_slideClass",g),()=>{i&&i.off("_slideClass",g)}}}),tc(()=>{i&&d.current&&!i.destroyed&&p(i.getSlideClasses(d.current))},[i]);let v={isActive:f.indexOf("swiper-slide-active")>=0,isVisible:f.indexOf("swiper-slide-visible")>=0,isPrev:f.indexOf("swiper-slide-prev")>=0,isNext:f.indexOf("swiper-slide-next")>=0},C=()=>typeof n=="function"?n(v):n,x=()=>{h(!0)};return gt.createElement(r,l0({ref:d,className:W3(`${f}${o?` ${o}`:""}`),"data-swiper-slide-index":l,onLoad:x},u),s&>.createElement(IR.Provider,{value:v},gt.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},C(),a&&!m&>.createElement("div",{className:"swiper-lazy-preloader"}))),!s&>.createElement(IR.Provider,{value:v},C(),a&&!m&>.createElement("div",{className:"swiper-lazy-preloader"})))});Y3.displayName="SwiperSlide";import{jsx as FR,jsxs as DG}from"react/jsx-runtime";var OG=()=>DG("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-[18px] cursor-pointer [&_svg]:size-full",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:[FR("path",{d:"M9 1.125C11.1744 1.125 13.1441 2.00737 14.5684 3.43164C15.9926 4.85593 16.875 6.8256 16.875 9C16.875 11.1744 15.9926 13.1441 14.5684 14.5684C13.1441 15.9926 11.1744 16.875 9 16.875C6.8256 16.875 4.85593 15.9926 3.43164 14.5684C2.00737 13.1441 1.125 11.1744 1.125 9C1.125 6.8256 2.00738 4.85593 3.43164 3.43164C4.85593 2.00738 6.8256 1.125 9 1.125ZM9 2.625C7.23941 2.625 5.64668 3.33772 4.49219 4.49219C3.33772 5.64668 2.625 7.23941 2.625 9C2.625 10.7606 3.33772 12.3533 4.49219 13.5078C5.64668 14.6623 7.23941 15.375 9 15.375C10.7606 15.375 12.3533 14.6623 13.5078 13.5078C14.6623 12.3533 15.375 10.7606 15.375 9C15.375 7.23941 14.6623 5.64668 13.5078 4.49219C12.3533 3.33772 10.7606 2.625 9 2.625Z",fill:"#6D6D6F"}),FR("path",{d:"M9 11.583C9.51777 11.583 9.9375 12.0027 9.9375 12.5205V12.5596C9.93718 13.0771 9.51757 13.4971 9 13.4971C8.48243 13.4971 8.06282 13.0771 8.0625 12.5596V12.5205C8.0625 12.0027 8.48223 11.583 9 11.583ZM8.99902 4.5C9.51671 4.49959 9.93696 4.91886 9.9375 5.43652L9.94043 9.37109C9.94084 9.88884 9.52165 10.3091 9.00391 10.3096C8.48616 10.31 8.06587 9.89079 8.06543 9.37305L8.0625 5.43848C8.06209 4.92079 8.48136 4.50054 8.99902 4.5Z",fill:"#6D6D6F"})]}),VR=OG;import{jsx as li,jsxs as c0}from"react/jsx-runtime";var NG=({item:e,handleClick:t,isNoteActive:r,index:n})=>li("div",{className:"relative h-full rounded-[16px] border border-white px-[24px] pb-[26px] pt-[24px] md:min-h-[180px] md:p-[16px]",style:{background:"linear-gradient(119.61deg, #FAFAFA 38.58%, #FFFFFF 63.73%, #F9FCFF 89.37%)"},children:c0("div",{className:"flex flex-col",children:[li(be,{className:"mb-[16px] size-[31px] md:absolute md:bottom-[16px] md:right-[16px] md:mb-0",alt:e.icon?.alt,source:e.icon?.url}),c0("div",{className:"flex items-center",children:[li(je,{html:e.text,size:"2",className:"break-all"}),e.note&&c0("div",{role:"button",tabIndex:0,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&o.preventDefault()},className:"relative mb-1 ml-[4px]",onClick:()=>t({item:e,index:n}),children:[li(VR,{}),li("div",{className:ne("absolute -bottom-[12px] left-[32px] z-10 w-[356px] -translate-x-full translate-y-full md:w-[276px]",r?"block":"hidden"),children:c0("div",{className:"relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow",children:[li(U,{as:"p",size:"2",html:e.note,className:"desktop:text-[18px]"}),li("div",{className:"absolute -top-[10px] right-[9px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]"})]})})]})]}),e.tag&&li(U,{as:"div",html:e.tag,className:"mt-[2px] text-[16px] font-bold text-[#6D6D6F]"})]})}),X3=NG;var rn=e=>{if(typeof window>"u"||(window.dataLayer=window?.dataLayer||[],!Array.isArray(window.dataLayer)))return"";try{window?.dataLayer?.push({event_parameters:null}),window?.dataLayer?.push(e||{})}catch(t){console.log("pageGTMEvent error",t)}};import{jsx as ci,jsxs as HR}from"react/jsx-runtime";var VG=({copy:e})=>{let[t,r]=FG(null),{profile:n,gtm:o}=ue(),i=({item:s,index:a})=>{rn({event:"ga4Event",event_name:"lp_button",member_active_status:n?.activated?"active":"not active",event_parameters:{page_group:o.pageGroup,position:e.title,button_name:s.text,info:""}}),t===a?r(null):(r(a),setTimeout(()=>{r(null)},5e3))};return HR(Pt,{id:"benefits",className:"!z-[30] bg-[#F5F5F7]",children:[ci(je,{as:"h2",size:"4",html:e?.title}),ci("div",{className:"mt-[24px] grid grid-cols-2 gap-[16px] l:hidden min-md:grid-cols-3 min-xl:grid-cols-4",children:e.benefits.map((s,a)=>ci(X3,{item:s,handleClick:i,isNoteActive:t===a,index:a},a))}),HR("div",{className:"mt-[24px] hidden l:block",children:[ci(K3,{spaceBetween:16,slidesPerView:2,slidesPerGroup:2,grid:{rows:2,fill:"row"},breakpoints:{768:{slidesPerView:3,slidesPerGroup:3}},wrapperClass:"items-stretch",modules:[D3,O3],pagination:{clickable:!0,el:"#benefits-pagination",renderBullet(s,a){return`<div class='${a} !flex justify-center size-[8px] rounded-full bg-[#D9D9D9] cursor-pointer items-center'>
|
|
227
|
+
</div>`}},children:e.benefits.map((s,a)=>ci(Y3,{className:ne("!h-auto",t===a&&"!z-[100]"),children:ci(X3,{item:s,handleClick:i,isNoteActive:t===a,index:a})},a))}),ci("div",{id:"benefits-pagination",className:`mx-auto mt-[12px] grid !w-fit grid-flow-col [&_.swiper-pagination-bullet-active>div]:!bg-[#151515]
|
|
228
|
+
[&_.swiper-pagination-bullet]:cursor-pointer [&_.swiper-pagination-bullet]:rounded-full`})]}),t&&ci("div",{role:"button",tabIndex:0,className:"fixed inset-0 z-10",onClick:()=>r(null),onKeyDown:s=>s.key==="Escape"&&r(null)})]})};import{useCallback as KW,useState as u7}from"react";import HG from"js-cookie";var jn=new Map([["eu-en","eu"],["eu-de","de"]]);function rc(e=""){let t=!1,r=HG.get("alpcEU");return r===void 0||r===""?["de","eu-de","eu","eu-en","uk","fr","fra"].includes(e)&&(t=!0):Number(r)&&(t=!0),t?"/api/multipass/alpc-eu":"/api/multipass/alpc"}function xn(e=0){return typeof Intl>"u"?e:new Intl.NumberFormat().format(e)}var $R=e=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e),$G=e=>({us:"en-us",uk:"en-gb",ca:"en-ca",au:"en-au",nz:"en-nz",eu:"en-eu",pl:"pl-pl",fr:"fr-fr",de:"de-de",vn:"vi-vn",sg:"en-sg","ae-en":"en-ae",plus:"en-us",cl:"es-cl",es:"es-es",se:"en-se",dk:"en-dk",is:"en-is",no:"en-no",fi:"en-fi"})[e]||"";function _R({amount:e,currencyCode:t,locale:r,maximumFractionDigits:n,minimumFractionDigits:o,removeTrailingZeros:i=!1}){let a=new Intl.NumberFormat($G(r)||r,{style:"currency",currency:t||"USD",minimumFractionDigits:n===0?0:o,maximumFractionDigits:n}).format(e);return["eu-de","eu-en","de","eu"].includes(r)&&(a=a?.toString()?.replace(/[\s]/g,"")),i&&(a=a.replace(/(\.\d*?[1-9])0+\b/,"$1").replace(/\.0+\b/,"").replace(/(\,\d*?[1-9])0+\b/,"$1").replace(/\,0+\b/,"")),a}import{useCallback as FW,useMemo as i7,useState as JR}from"react";import{useCallback as IW,useEffect as PW,useState as n7}from"react";import t7 from"js-cookie";import{useCallback as EW,useRef as f0,useState as r7}from"react";import Ibe from"swr";import{createContext as qG,useContext as KG,useMemo as YG}from"react";import{jsx as XG}from"react/jsx-runtime";import tW from"fetch-ponyfill";import"js-cookie";import vW from"swr";import yW from"swr/mutation";import SW from"js-cookie";var _G=Object.create,zR=Object.defineProperty,BG=Object.getOwnPropertyDescriptor,ZR=Object.getOwnPropertyNames,zG=Object.getPrototypeOf,ZG=Object.prototype.hasOwnProperty,jG=(e,t)=>function(){return t||(0,e[ZR(e)[0]])((t={exports:{}}).exports,t),t.exports},UG=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ZR(t))!ZG.call(e,o)&&o!==r&&zR(e,o,{get:()=>t[o],enumerable:!(n=BG(t,o))||n.enumerable});return e},GG=(e,t,r)=>(r=e!=null?_G(zG(e)):{},UG(t||!e||!e.__esModule?zR(r,"default",{value:e,enumerable:!0}):r,e)),WG=jG({"../../node_modules/.pnpm/lodash.random@3.2.0/node_modules/lodash.random/index.js"(e,t){var r=1/0,n=9007199254740991,o=17976931348623157e292,i=NaN,s="[object Function]",a="[object GeneratorFunction]",l="[object Symbol]",c=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,f=/^0o[0-7]+$/i,p=/^(?:0|[1-9]\d*)$/,m=parseFloat,h=parseInt,g=Object.prototype,v=g.toString,C=Math.floor,x=Math.min,w=Math.random;function y(P,O){return P+C(w()*(O-P+1))}function b(P,O){return O=O??n,!!O&&(typeof P=="number"||p.test(P))&&P>-1&&P%1==0&&P<O}function R(P,O,M){if(!k(M))return!1;var Z=typeof O;return(Z=="number"?E(M)&&b(O,M.length):Z=="string"&&O in M)?L(M[O],P):!1}function L(P,O){return P===O||P!==P&&O!==O}function E(P){return P!=null&&A(P.length)&&!S(P)}function S(P){var O=k(P)?v.call(P):"";return O==s||O==a}function A(P){return typeof P=="number"&&P>-1&&P%1==0&&P<=n}function k(P){var O=typeof P;return!!P&&(O=="object"||O=="function")}function I(P){return!!P&&typeof P=="object"}function N(P){return typeof P=="symbol"||I(P)&&v.call(P)==l}function D(P){if(!P)return P===0?P:0;if(P=F(P),P===r||P===-r){var O=P<0?-1:1;return O*o}return P===P?P:0}function F(P){if(typeof P=="number")return P;if(N(P))return i;if(k(P)){var O=typeof P.valueOf=="function"?P.valueOf():P;P=k(O)?O+"":O}if(typeof P!="string")return P===0?P:+P;P=P.replace(c,"");var M=d.test(P);return M||f.test(P)?h(P.slice(2),M?2:8):u.test(P)?i:+P}function H(P,O,M){if(M&&typeof M!="boolean"&&R(P,O,M)&&(O=M=void 0),M===void 0&&(typeof O=="boolean"?(M=O,O=void 0):typeof P=="boolean"&&(M=P,P=void 0)),P===void 0&&O===void 0?(P=0,O=1):(P=D(P),O===void 0?(O=P,P=0):O=D(O)),P>O){var Z=P;P=O,O=Z}if(M||P%1||O%1){var J=w();return x(P+J*(O-P+m("1e-"+((J+"").length-1))),O)}return y(P,O)}t.exports=H}}),jR=qG(null),cbe=({children:e,siteConfig:t,shopifyConfig:r})=>{let n=YG(()=>{if(!t||!r)throw new Error("No site configuration or shopify configuration found");return{...t,...r}},[t,r]);return XG(jR.Provider,{value:n,children:e})},Se=()=>{let e=KG(jR);if(!e)throw new Error("useShopifyContext must be used within a ShopifyProvider");return e},ube=`
|
|
229
|
+
fragment article on Article {
|
|
230
|
+
id
|
|
231
|
+
handle
|
|
232
|
+
title
|
|
233
|
+
seo {
|
|
234
|
+
...seo
|
|
235
|
+
}
|
|
236
|
+
image {
|
|
237
|
+
...image
|
|
238
|
+
}
|
|
239
|
+
tags
|
|
240
|
+
publishedAt
|
|
241
|
+
content
|
|
242
|
+
contentHtml
|
|
243
|
+
excerpt
|
|
244
|
+
excerptHtml
|
|
245
|
+
authorV2 {
|
|
246
|
+
bio
|
|
247
|
+
email
|
|
248
|
+
firstName
|
|
249
|
+
lastName
|
|
250
|
+
name
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
`,dbe=`
|
|
254
|
+
fragment article on Article {
|
|
255
|
+
id
|
|
256
|
+
handle
|
|
257
|
+
title
|
|
258
|
+
seo {
|
|
259
|
+
...seo
|
|
260
|
+
}
|
|
261
|
+
image {
|
|
262
|
+
...image
|
|
263
|
+
}
|
|
264
|
+
tags
|
|
265
|
+
publishedAt
|
|
266
|
+
excerpt
|
|
267
|
+
excerptHtml
|
|
268
|
+
authorV2 {
|
|
269
|
+
bio
|
|
270
|
+
email
|
|
271
|
+
firstName
|
|
272
|
+
lastName
|
|
273
|
+
name
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
`,fbe=`
|
|
277
|
+
fragment blog on Blog {
|
|
278
|
+
id
|
|
279
|
+
handle
|
|
280
|
+
title
|
|
281
|
+
seo {
|
|
282
|
+
...seo
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
`,pbe=`
|
|
286
|
+
fragment collection on Collection {
|
|
287
|
+
id
|
|
288
|
+
handle
|
|
289
|
+
title
|
|
290
|
+
description
|
|
291
|
+
descriptionHtml
|
|
292
|
+
seo {
|
|
293
|
+
...seo
|
|
294
|
+
}
|
|
295
|
+
image {
|
|
296
|
+
...image
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
`,UR=`
|
|
300
|
+
fragment image on Image {
|
|
301
|
+
url
|
|
302
|
+
altText
|
|
303
|
+
width
|
|
304
|
+
height
|
|
305
|
+
}
|
|
306
|
+
`,GR=`
|
|
307
|
+
fragment metafield on Metafield {
|
|
308
|
+
value
|
|
309
|
+
type
|
|
310
|
+
description
|
|
311
|
+
namespace
|
|
312
|
+
key
|
|
313
|
+
}
|
|
314
|
+
`,mbe=`
|
|
315
|
+
value
|
|
316
|
+
type
|
|
317
|
+
description
|
|
318
|
+
namespace
|
|
319
|
+
key
|
|
320
|
+
`,WR=`
|
|
321
|
+
fragment product on Product {
|
|
322
|
+
id
|
|
323
|
+
handle
|
|
324
|
+
availableForSale
|
|
325
|
+
title
|
|
326
|
+
description
|
|
327
|
+
descriptionHtml
|
|
328
|
+
options {
|
|
329
|
+
id
|
|
330
|
+
name
|
|
331
|
+
values
|
|
332
|
+
}
|
|
333
|
+
productType
|
|
334
|
+
priceRange {
|
|
335
|
+
maxVariantPrice {
|
|
336
|
+
amount
|
|
337
|
+
currencyCode
|
|
338
|
+
}
|
|
339
|
+
minVariantPrice {
|
|
340
|
+
amount
|
|
341
|
+
currencyCode
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
compareAtPriceRange {
|
|
345
|
+
minVariantPrice {
|
|
346
|
+
amount
|
|
347
|
+
currencyCode
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
featuredImage {
|
|
351
|
+
...image
|
|
352
|
+
}
|
|
353
|
+
images(first: 250) {
|
|
354
|
+
nodes {
|
|
355
|
+
...image
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
media(first: 250) {
|
|
359
|
+
nodes {
|
|
360
|
+
id
|
|
361
|
+
mediaContentType
|
|
362
|
+
presentation {
|
|
363
|
+
id
|
|
364
|
+
}
|
|
365
|
+
... on Video {
|
|
366
|
+
id
|
|
367
|
+
sources {
|
|
368
|
+
format
|
|
369
|
+
height
|
|
370
|
+
mimeType
|
|
371
|
+
url
|
|
372
|
+
width
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
... on MediaImage {
|
|
376
|
+
id
|
|
377
|
+
image {
|
|
378
|
+
altText
|
|
379
|
+
url
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
seo {
|
|
385
|
+
...seo
|
|
386
|
+
}
|
|
387
|
+
tags
|
|
388
|
+
updatedAt
|
|
389
|
+
}
|
|
390
|
+
`,qR=`
|
|
391
|
+
fragment seo on SEO {
|
|
392
|
+
description
|
|
393
|
+
title
|
|
394
|
+
}
|
|
395
|
+
`,QG=(e="")=>`
|
|
396
|
+
fragment cart on Cart {
|
|
397
|
+
id
|
|
398
|
+
totalQuantity
|
|
399
|
+
updatedAt
|
|
400
|
+
createdAt
|
|
401
|
+
checkoutUrl
|
|
402
|
+
note
|
|
403
|
+
attributes {
|
|
404
|
+
key
|
|
405
|
+
value
|
|
406
|
+
}
|
|
407
|
+
cost {
|
|
408
|
+
checkoutChargeAmount {
|
|
409
|
+
amount
|
|
410
|
+
currencyCode
|
|
411
|
+
}
|
|
412
|
+
subtotalAmount {
|
|
413
|
+
amount
|
|
414
|
+
currencyCode
|
|
415
|
+
}
|
|
416
|
+
totalAmount {
|
|
417
|
+
amount
|
|
418
|
+
currencyCode
|
|
419
|
+
}
|
|
420
|
+
totalTaxAmount {
|
|
421
|
+
amount
|
|
422
|
+
currencyCode
|
|
423
|
+
}
|
|
424
|
+
totalDutyAmount {
|
|
425
|
+
amount
|
|
426
|
+
currencyCode
|
|
427
|
+
}
|
|
428
|
+
totalAmountEstimated
|
|
429
|
+
totalTaxAmountEstimated
|
|
430
|
+
totalDutyAmountEstimated
|
|
431
|
+
subtotalAmountEstimated
|
|
432
|
+
}
|
|
433
|
+
buyerIdentity {
|
|
434
|
+
email
|
|
435
|
+
customer {
|
|
436
|
+
email
|
|
437
|
+
id
|
|
438
|
+
}
|
|
439
|
+
deliveryAddressPreferences {
|
|
440
|
+
... on MailingAddress {
|
|
441
|
+
address1
|
|
442
|
+
address2
|
|
443
|
+
city
|
|
444
|
+
country
|
|
445
|
+
zip
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
discountCodes {
|
|
450
|
+
applicable
|
|
451
|
+
code
|
|
452
|
+
}
|
|
453
|
+
discountAllocations {
|
|
454
|
+
... on CartCodeDiscountAllocation {
|
|
455
|
+
code
|
|
456
|
+
discountedAmount {
|
|
457
|
+
amount
|
|
458
|
+
currencyCode
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
... on CartAutomaticDiscountAllocation {
|
|
462
|
+
title
|
|
463
|
+
discountedAmount {
|
|
464
|
+
amount
|
|
465
|
+
currencyCode
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
... on CartCustomDiscountAllocation {
|
|
469
|
+
title
|
|
470
|
+
discountedAmount {
|
|
471
|
+
amount
|
|
472
|
+
currencyCode
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
deliveryGroups(first: 10) {
|
|
477
|
+
nodes {
|
|
478
|
+
deliveryAddress {
|
|
479
|
+
address1
|
|
480
|
+
address2
|
|
481
|
+
city
|
|
482
|
+
country
|
|
483
|
+
zip
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
lines(first: 100) {
|
|
488
|
+
edges {
|
|
489
|
+
node {
|
|
490
|
+
id
|
|
491
|
+
quantity
|
|
492
|
+
discountAllocations {
|
|
493
|
+
... on CartCodeDiscountAllocation {
|
|
494
|
+
code
|
|
495
|
+
discountedAmount {
|
|
496
|
+
amount
|
|
497
|
+
currencyCode
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
... on CartAutomaticDiscountAllocation {
|
|
501
|
+
title
|
|
502
|
+
discountedAmount {
|
|
503
|
+
amount
|
|
504
|
+
currencyCode
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
... on CartCustomDiscountAllocation {
|
|
508
|
+
title
|
|
509
|
+
discountedAmount {
|
|
510
|
+
amount
|
|
511
|
+
currencyCode
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
attributes {
|
|
516
|
+
key
|
|
517
|
+
value
|
|
518
|
+
}
|
|
519
|
+
cost {
|
|
520
|
+
amountPerQuantity {
|
|
521
|
+
amount
|
|
522
|
+
currencyCode
|
|
523
|
+
}
|
|
524
|
+
compareAtAmountPerQuantity {
|
|
525
|
+
amount
|
|
526
|
+
currencyCode
|
|
527
|
+
}
|
|
528
|
+
subtotalAmount {
|
|
529
|
+
amount
|
|
530
|
+
currencyCode
|
|
531
|
+
}
|
|
532
|
+
totalAmount {
|
|
533
|
+
amount
|
|
534
|
+
currencyCode
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
merchandise {
|
|
538
|
+
... on ProductVariant {
|
|
539
|
+
id
|
|
540
|
+
sku
|
|
541
|
+
title
|
|
542
|
+
quantityAvailable
|
|
543
|
+
currentlyNotInStock
|
|
544
|
+
availableForSale
|
|
545
|
+
barcode
|
|
546
|
+
weight
|
|
547
|
+
selectedOptions {
|
|
548
|
+
name
|
|
549
|
+
value
|
|
550
|
+
}
|
|
551
|
+
image {
|
|
552
|
+
...image
|
|
553
|
+
}
|
|
554
|
+
price {
|
|
555
|
+
amount
|
|
556
|
+
currencyCode
|
|
557
|
+
}
|
|
558
|
+
compareAtPrice {
|
|
559
|
+
amount
|
|
560
|
+
currencyCode
|
|
561
|
+
}
|
|
562
|
+
metafields(identifiers: [{ namespace: "${e}combo", key: "global" }]) {
|
|
563
|
+
...metafield
|
|
564
|
+
}
|
|
565
|
+
product {
|
|
566
|
+
...product
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
totalQuantity
|
|
574
|
+
}
|
|
575
|
+
${WR}
|
|
576
|
+
${qR}
|
|
577
|
+
${UR}
|
|
578
|
+
${GR}
|
|
579
|
+
`,hbe=`
|
|
580
|
+
fragment pageInfo on PageInfo {
|
|
581
|
+
hasNextPage
|
|
582
|
+
hasPreviousPage
|
|
583
|
+
startCursor
|
|
584
|
+
endCursor
|
|
585
|
+
}
|
|
586
|
+
`,JG=`
|
|
587
|
+
fragment variant on ProductVariant {
|
|
588
|
+
id
|
|
589
|
+
sku
|
|
590
|
+
title
|
|
591
|
+
requiresShipping
|
|
592
|
+
quantityAvailable
|
|
593
|
+
currentlyNotInStock
|
|
594
|
+
availableForSale
|
|
595
|
+
barcode
|
|
596
|
+
quantityAvailable
|
|
597
|
+
weight
|
|
598
|
+
selectedOptions {
|
|
599
|
+
name
|
|
600
|
+
value
|
|
601
|
+
}
|
|
602
|
+
image {
|
|
603
|
+
...image
|
|
604
|
+
}
|
|
605
|
+
price {
|
|
606
|
+
amount
|
|
607
|
+
currencyCode
|
|
608
|
+
}
|
|
609
|
+
compareAtPrice {
|
|
610
|
+
amount
|
|
611
|
+
currencyCode
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
`,gbe=`
|
|
615
|
+
fragment page on Page {
|
|
616
|
+
title
|
|
617
|
+
handle
|
|
618
|
+
body
|
|
619
|
+
bodySummary
|
|
620
|
+
seo {
|
|
621
|
+
title
|
|
622
|
+
description
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
`,eW=e=>`
|
|
626
|
+
query GetProductByHandles(
|
|
627
|
+
$productMetafieldIdentifiers: [HasMetafieldsIdentifier!] = []
|
|
628
|
+
$variantMetafieldIdentifiers: [HasMetafieldsIdentifier!] = []
|
|
629
|
+
) {
|
|
630
|
+
${e.map((t,r)=>`
|
|
631
|
+
product${r}: product(handle: "${t}") {
|
|
632
|
+
...product
|
|
633
|
+
metafields(identifiers: $productMetafieldIdentifiers) {
|
|
634
|
+
...metafield
|
|
635
|
+
}
|
|
636
|
+
variants(first: 250) {
|
|
637
|
+
nodes {
|
|
638
|
+
...variant
|
|
639
|
+
metafields(identifiers: $variantMetafieldIdentifiers) {
|
|
640
|
+
...metafield
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
`)}
|
|
646
|
+
}
|
|
647
|
+
${WR}
|
|
648
|
+
${JG}
|
|
649
|
+
${GR}
|
|
650
|
+
${qR}
|
|
651
|
+
${UR}
|
|
652
|
+
`,rW=class extends Error{constructor({message:e,code:t,errors:r}){let n=e?{message:e,...t?{code:t}:{}}:r[0];super(n.message),this.errors=e?[n]:r,n.code&&(this.code=n.code)}},nW=class extends rW{constructor(e){super(e),this.status=e.status}};function oW(e,t=500){return e=e??[{message:"Failed to fetch Shopify API"}],new nW({errors:e,status:t})}var{fetch:iW}=tW();async function KR({query:e,variables:t,fetchOptions:r,headers:n,config:o}){let{storefrontToken:i,storeDomain:s}=o,a;try{a=await iW(`https://${s}/api/2025-07/graphql.json`,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":i,...n},body:JSON.stringify({...e&&{query:e},...t&&{variables:t}}),...r});let{data:l,errors:c,status:u}=await a.json();if(c?.length)throw new Error(`Status: ${u}, ${a.status}, GraphQL errors: `+c.map(({message:d})=>d).join(", "));return{data:l,status:u,...c&&{errors:c}}}catch(l){throw console.error("fetchGraphqlApi url:",s,a?.status),oW([{message:`status: ${a?.status}, ${l.message}
|
|
653
|
+
Most likely related to an unexpected output. e.g the store might be protected with password or not available.`}],500)}}var wbe=60*5;function sW(e){return e&&typeof e=="string"&&e.includes("/")?e.split("/").pop()?.split("?")?.shift():e}function aW(e={},t=""){return Object.entries(e).reduce((n,[o,i])=>{let s=i;return n[`${o}MetafieldIdentifiers`]=s.filter(a=>a.namespace!==t).map(a=>({namespace:t,key:a.namespace})).concat(s),n},{})}var u0=(e,t)=>e?.reduce((r,n)=>{if(n){let o=n.namespace;if(o.startsWith(`${t}combo`)){o=n.key,r[o]=r[o]||{};let i=Q3(n);i&&Object.entries(i).forEach(([s,a])=>{r[o][s]=r[o][s]??(a?Q3(a):null)})}else r[o]=r[o]||{},r[o][n.key]=n?Q3(n):null}return r},{});function lW(e){try{return JSON.parse(e)}catch{return{}}}var cW=e=>{let t=lW(e)||{};return{parseType:t.type,descContent:t.content||"",status:t.status||"Active"}},Q3=e=>{let t=e?.type&&e?.type.toLowerCase(),{status:r}=cW(e?.description||"");if(r.toLowerCase()!=="active")return null;switch(t){case"json":case"json_string":case"rating":case"volume":case"weight":case"dimension":return JSON.parse(e.value);default:return e?.value||e}},bbe=GG(WG()),uW={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",burgandy:"#800020",burgundy:"#800020",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",spacegrey:"#65737e",spacegray:"#65737e",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"},J3=({amount:e,currencyCode:t})=>e&&t&&{amount:+e,currencyCode:t},dW=e=>!(!e.availableForSale||!e.quantityAvailable&&!e.currentlyNotInStock||e.price?.amount>=999999999e-2),e7=({id:e,name:t,values:r})=>({__typename:"ProductOption",id:e,name:t.toLowerCase(),values:r.map(n=>{let o={label:n};if(t.match(/colou?r/gi)){let i=uW[n.toLowerCase().replace(/ /g,"")];i&&(o={...o,hexColors:[i]})}return o})}),YR=({nodes:e})=>e?.map(t=>({url:t.url,alt:t.altText||""}))||[],XR=({nodes:e})=>e?.map(t=>t)||[];function fW(e,t=""){let{id:r,vendor:n,images:o,media:i,variants:s,handle:a,priceRange:l,options:c,metafields:u,availableForSale:d,...f}=e;return{...f,availableForSale:!!s.nodes.find(p=>!!p.availableForSale),id:r,vendor:n||"",handle:a,path:`/${a}`,slug:a?.replace(/^\/+|\/+$/g,""),price:J3(l?.minVariantPrice),priceRange:l,images:YR(o),media:XR(i),options:c?c.filter(p=>p.name!=="Title").map(p=>e7(p)):[],metafields:u0(u,t)||{}}}var pW=({metafields:e,variantId:t})=>e?.__discountCodeApp?.data?.filter(n=>{let o=String(n.variant_shopify_id)===sW(t),i=(n.ends_at===null||new Date(n.ends_at).getTime()>new Date().getTime())&&(n.starts_at===null||new Date(n.starts_at).getTime()<=new Date().getTime());return o&&i})||[],mW=({nodes:e},t,r="")=>e?.map(n=>{let{id:o,selectedOptions:i,sku:s,price:a,metafields:l,...c}=n,u=u0(l,r),d=pW({metafields:u,variantId:o});return{...c,id:o,sku:s??o,weight:n.weight,price:J3(a),availableForSale:dW(n),options:i.map(({name:f,value:p})=>e7({id:o,name:f,values:[p]})),selectedOptions:i,metafields:u,product:fW(t,r),coupons:d}});function hW(e,t=""){let{id:r,vendor:n,images:o,media:i,variants:s,handle:a,priceRange:l,options:c,metafields:u,availableForSale:d,...f}=e,p=s?mW(s,e,t):[];return{...f,availableForSale:!!p.find(m=>!!m.availableForSale),id:r,vendor:n||"",handle:a,path:`/${a}`,slug:a?.replace(/^\/+|\/+$/g,""),price:J3(l?.minVariantPrice),priceRange:l,images:YR(o),media:XR(i),variants:p,options:c?.length>0?c.filter(m=>m.name!=="Title").map(m=>e7(m)):p.length>1?[{id:"colorOptionsId",name:p?.[0]?.options?.[0]?.name,values:p.map(m=>m.options.map(h=>h.values)).flatMap(m=>m.flat())}]:[],metafields:u0(u,t)||{}}}var gW=async({options:e,config:t})=>{let{handles:r,metafieldIdentifiers:n,metafieldsNamespace:o}=e;if(!r?.length)return[];let i=await KR({query:eW(r),variables:{handles:r,...aW(n,o)},config:t});return Object.values(i.data).filter(s=>!!s).map(s=>hW(s,""))};function d0({handles:e,metafieldIdentifiers:t}){let{storefrontToken:r,storeDomain:n,metafieldsNamespace:o}=Se();return vW(e?.length?{handles:e,metafieldIdentifiers:t}:void 0,async()=>gW({options:{handles:e,metafieldIdentifiers:t,metafieldsNamespace:o},config:{storefrontToken:r,storeDomain:n}}))}var CW=`
|
|
654
|
+
mutation createCart($lines: [CartLineInput!], $discountCodes: [String!], $attributes: [AttributeInput!] = []) {
|
|
655
|
+
cartCreate(input: { lines: $lines, discountCodes: $discountCodes, attributes: $attributes }) {
|
|
656
|
+
cart {
|
|
657
|
+
...cart
|
|
658
|
+
}
|
|
659
|
+
userErrors {
|
|
660
|
+
field
|
|
661
|
+
message
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
${QG}
|
|
666
|
+
`;function xW(e,t=""){let r=e.lines?.edges?.map(s=>BR(s,t)),n=e?.discountAllocations?.reduce((s,a)=>Number(a?.discountedAmount?.amount)+s,0),[o,i]=r?.reduce(([s,a],l)=>[(l?.discountAllocations?.reduce((u,d)=>Number(d?.amount)+u,0)||0)+s,Number(l?.subtotalAmount)+a],[0,0])||[0,0];return{customAttributes:e.attributes,totalLineItemsDiscount:n+o,id:e.id,url:e.checkoutUrl,ready:!0,customerId:e?.buyerIdentity?.customer?.id||"",email:e?.buyerIdentity?.email||"",createdAt:e.createdAt,currency:{code:e.cost?.subtotalAmount?.currencyCode},taxesIncluded:e.cost?.totalTaxAmountEstimated,lineItems:e.lines?.edges?.map(s=>BR(s,t)),subtotalPrice:e.cost?.subtotalAmount?.amount,totalPrice:e.cost?.totalAmount?.amount-(e.cost?.totalTaxAmount?.amount||0),totalTaxAmount:0,lineItemsSubtotalPrice:i,discountCodes:e.discountCodes||[],discountAllocations:e?.discountAllocations?.map(s=>({code:s?.code||s?.title||"",amount:s?.discountedAmount?.amount}))||[]}}function BR({node:{id:e,merchandise:t,quantity:r,discountAllocations:n,attributes:o,cost:i}},s=""){let a=t?.price?.amount,l=t?.product?.title;return{id:e,name:l,quantity:r,variantId:String(t?.id),productId:String(t?.product?.id),totalAmount:i?.totalAmount?.amount,subtotalAmount:i?.subtotalAmount?.amount,discountAllocations:n?.map(c=>({code:c?.code||c?.title||"",amount:c?.discountedAmount?.amount}))||[],customAttributes:o?.map(c=>({key:c?.key||"",value:c?.value||""}))||[],variant:{id:String(t?.id),options:[],price:a,listPrice:t?.compareAtPrice?.amount,sku:t?.sku??"",name:t?.title,requiresShipping:t?.requiresShipping??!1,availableForSale:wW({...t,price:t?.price}),quantityAvailable:t?.quantityAvailable||0,currentlyNotInStock:t?.currentlyNotInStock||!1,metafields:u0(t.metafields,s)},product:t?.product,path:`/${t?.product?.handle}`,discounts:[],options:t?.title=="Default Title"?[]:t?.selectedOptions}}var wW=e=>!(!e.availableForSale||!e.quantityAvailable&&!e.currentlyNotInStock||e.price?.amount>=999999999e-2),bW=async function({options:e,config:t}){let{attributes:r,...n}=e,{data:o}=await KR({query:CW,variables:{attributes:r||[],...n},config:t}),i=o?.cartCreate?.cart;if(i)return xW(i,"")},RW=14,LW=()=>({domain:window.location.host.split(".").reverse().slice(0,2).reverse().join("."),expires:RW}),MW=(e,t)=>{SW.set(e,t,LW())};function QR(){let{storefrontToken:e,storeDomain:t,metafieldsNamespace:r,cartIdCookieName:n}=Se();return yW("createCart",async(o,{arg:i})=>{let s=await bW({options:{...i,metafieldsNamespace:r},config:{storefrontToken:e,storeDomain:t}});return s&&s.id&&MW(n,s.id),s},{throwOnError:!0})}var p0,TW=e=>fetch(rc(e.locale)+e.url,e.fetchOptions).then(async t=>{if(t.status<300)return(await t.json()).data;if(t.status===401&&e.onReAuth){p0||(p0=e.onReAuth());let r=await p0;if(p0=void 0,r)return fetch(rc(e.locale)+e.url,e.fetchOptions).then(async n=>{if(n.status<300)return(await n.json()).data;if(n.status===401){e.onUnAuth&&e.onUnAuth();return}});e.onUnAuth&&e.onUnAuth();return}}),kW=async(e,t)=>{let r=await fetch(`${rc(e)}/cloud/login`,{method:"POST"}),n=await r.json();if(r.status<300&&!t&&n?.data?.code===27004){let o=t7.get("alpcEU");if(Number(o)===1?t7.set("alpcEU","0",{expires:30,domain:".soundcore.com"}):t7.set("alpcEU","1",{expires:30,domain:".soundcore.com"}),r=await fetch(`${rc(e)}/cloud/login`,{method:"POST"}),n=await r.json(),r.status>300)return!1}return!n?.data?.code},AW=(e,t,r={})=>{let n=f0(!1),[o,i]=r7(),[s,a]=r7(!1),l=f0(e),c=f0(t),u=f0(r),d=EW(async(f,p={})=>{if(n.current)return;n.current=!0,a(!0);let m={...u.current,...p},{onSuccess:h,onError:g}=m||{};try{let v=await c.current(l.current,{arg:f});return i(v),a(!1),n.current=!1,h&&h(v),v}catch(v){a(!1),n.current=!1,g&&g(v)}},[]);return{isMutating:s,trigger:d,data:o}};var Un=(e,t)=>{let[r,n]=r7(!1),{removeProfile:o}=ue(),{locale:i=""}=Se(),{url:s,initData:a,headers:l,...c}=e;return AW(s,(d,f)=>TW({url:d,locale:i,fetchOptions:{method:"POST",headers:{"current-language":i,...l},...c,body:JSON.stringify({...a,...f.arg})},onReAuth:async()=>await kW(i,r)?(n(!0),!0):!1,onUnAuth(){o()}}),t)};function OW({page:e,pageSize:t,options:r={}}){let{profile:n,isLoadingProfile:o}=ue(),{brand:i}=Se(),[s,a]=n7([]),[l,c]=n7(0),[u,d]=n7(0),{isMutating:f,trigger:p}=Un({url:"/v1/credit/log",initData:{brand:i}}),m=IW(async()=>{let h={page:e,page_size:t,user_id:n?.user_id,...r};p(h,{onSuccess(g){d(e),c(g?.data?.total),a(s.concat(g?.data?.creditLogs||[]))}})},[s,n,e,t,r,p]);return PW(()=>{o||!n||f||e!==u&&e&&m()},[m,o,f,n,e,u]),{activities:s,isLoading:f,total:l,canNext:l>s.length&&!f}}var ui=OW;import{jsx as o7,jsxs as NW}from"react/jsx-runtime";function DW({className:e}){return NW("div",{className:ne(e),children:[o7("span",{className:"dot"},"dot_1"),o7("span",{className:"dot"},"dot_2"),o7("span",{className:"dot"},"dot_3")]})}var m0=DW;import eL from"dayjs";import{jsx as xr,jsxs as xs}from"react/jsx-runtime";function VW({data:e,...t}){let[r,n]=JR(1),{taskIdToTypeMapping:o}=ue(),i=i7(()=>({page:t.isOpen?r:0,pageSize:1e3}),[t.isOpen,r]),[s,a]=JR(0),l=i7(()=>{let m=[{title:e.allTab,type:0},{title:e.earnedTab,type:1},{title:e.deductedTab,type:2}];return e.expiredTab&&m.push({title:e.expiredTab,type:3}),m},[e]),{activities:c=[],canNext:u,isLoading:d}=ui(i),f=i7(()=>{let m={1:e.activationTask,2:e.updateNameTask,3:e.updatePhoneTask,4:e.updateBirthdayTask,5:e.subscriptionTask,7:e.updateAppNameTask,3e3:e.refundTask,5e3:e.productUnApprovedTask},h={firstPurchase:e.firstPurchaseTask,uploadReceipt:e.uploadReceiptTask,shopping:e.shoppingTask};function g(x){return x.task_type===3&&x.task_sub_type===5e3&&e.productUnApprovedTask?x.task_name.replace("Refund",e.productUnApprovedTask):o?.[String(x.task_rule_id)]?h[o?.[String(x.task_rule_id)]]:m[x.task_sub_type]||x.task_name}let C=c.map(x=>({title:g(x),date:new Date(x.create_time*1e3),value:x.credit,type:x.credit_type,pending_time:x.pending_time,credit_type:x.credit_type,status:x.status}))||[];return s===1?C=C?.filter(x=>x.type===1):s===2?C=C?.filter(x=>x.type===2&&x.status!==3):s===3&&(C=C?.filter(x=>x.type===2&&x.status===3)),C.map(x=>{let{value:w,...y}=x;return x.type===2&&w>0&&(w=-w),{value:w,...y}})},[e.activationTask,e.updateNameTask,e.updatePhoneTask,e.updateBirthdayTask,e.subscriptionTask,e.updateAppNameTask,e.refundTask,e.productUnApprovedTask,e.firstPurchaseTask,e.uploadReceiptTask,e.shoppingTask,c,s,o]),p=FW(()=>{u&&n(r+1)},[r,u]);return xs(Pr,{title:e.title,className:ne("h-[800px] w-[640px]"),useAnimation:!0,animationClassName:"md:translate-y-[100vh]",scrollClassName:"min-l:px-0 md:mb-0 md:px-0",...t,onScrollEnd:p,children:[xr("div",{className:"w-full overflow-x-auto",children:xr(_n,{align:"left",shape:"rounded",value:s.toString(),onValueChange:m=>{a(Number(m))},className:"px-[24px] md:px-[16px]",children:xr(Bn,{children:l.map(m=>xr(zn,{value:m.type.toString(),children:m.title},m.type))})})}),xs("div",{className:"mt-[24px] grid gap-[18px] overflow-auto overscroll-contain px-[24px] md:gap-[12px] md:px-[16px]",children:[d&&xr("div",{className:"flex h-full flex-col items-center justify-center",children:xr(m0,{})}),!f.length&&!d&&xs("div",{className:"flex h-full flex-col items-center justify-center",children:[xr(be,{className:"mb-[16px] h-[120px] w-[160px]",src:e?.emptyListImageUrl}),xr("div",{className:"leading-1.4 text-[16px] font-semibold",children:e?.emptyListLabel})]}),f.map((m,h)=>xs("div",{className:"flex h-fit items-center justify-between rounded-[8px] bg-[#f2f0f1] px-[16px] py-[20px] text-[16px]",children:[xs("div",{className:"grid gap-[6px]",children:[xr("div",{className:"font-bold",children:m.title}),xr("div",{className:"text-[14px] font-semibold text-[#999]",children:eL(m.date).format("YYYY-MM-DD HH:mm").toString()}),!e.pendingTips&&xs("div",{className:`hidden text-[14px] font-semibold text-[#777] ${m.status===2&&m.credit_type===1?"!flex":""}`,children:[xr(U,{html:e.pendingTips}),xr("span",{children:eL.unix(m.pending_time).add(1,"day").format("YYYY-MM-DD")}),e.pendingTips2&&xr(U,{html:e.pendingTips2})]})]}),xs("div",{className:ne("font-bold",m.value>=0||m.credit_type===3?"text-[#52C41A]":"text-[#F84D4F]"),children:[m.value>=0&&"+",m.value]})]},h))]}),!!f.length&&xr("div",{className:"mt-[12px] px-[24px] pb-[24px] text-[14px] font-semibold text-[#999] md:px-[16px]",children:e.tips})]})}var tL=VW;var c7=Ge(ir()),uL=Ge(s7());import WW from"dayjs";import{useCallback as cL,useMemo as di,useState as h0}from"react";var aL=Ge(ir());import{useState as zW}from"react";import{jsx as ka,jsxs as sL}from"react/jsx-runtime";function ZW({info:e,index:t}){let[r,n]=zW(!1);return sL("div",{className:"relative ml-[6px] cursor-pointer",onClick:()=>{n(!r)},role:"button",tabIndex:0,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&o.preventDefault()},onMouseOver:()=>{n(!0)},onFocus:()=>{n(!0)},onMouseLeave:()=>{n(!1)},onBlur:()=>{n(!1)},children:[ka("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",children:ka("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9 18C13.9706 18 18 13.9706 18 9C18 4.02944 13.9706 0 9 0C4.02944 0 0 4.02944 0 9C0 13.9706 4.02944 18 9 18ZM9.765 10.7118H8.316C8.316 9.71658 8.95624 9.11788 9.5487 8.56386C10.0589 8.08679 10.5336 7.64285 10.5336 7.0074C10.5336 6.2766 9.9918 5.9112 9.1854 5.9112C8.3916 5.9112 7.7994 6.327 7.5474 7.0704L6.3 6.3648C6.7788 5.13 7.938 4.5 9.2232 4.5C10.6218 4.5 11.9826 5.3316 11.9826 6.9192C11.9826 7.95842 11.3297 8.58584 10.7324 9.15979C10.2289 9.64359 9.765 10.0894 9.765 10.7118ZM9.9918 12.69C9.9918 13.2066 9.5634 13.635 9.0468 13.635C8.5176 13.635 8.1018 13.2066 8.1018 12.69C8.1018 12.1608 8.5176 11.745 9.0468 11.745C9.5634 11.745 9.9918 12.1608 9.9918 12.69Z",fill:"#999999"})}),sL("div",{className:(0,aL.default)("absolute -right-[14px] hidden min-w-[300px] shadow-[0px_1px_12px_0px_rgba(0,0,0,0.12)]",t===0?"top-[33px]":"bottom-[33px]",r&&"!block"),children:[ka("i",{className:"absolute right-[8px] blur-[12px]",style:t===0?{top:"-9px",borderRight:"16px solid transparent ",borderLeft:"16px solid transparent ",borderBottom:"8px solid rgba(0,0,0,0.12)"}:{bottom:"-9px",borderRight:"16px solid transparent ",borderLeft:"16px solid transparent ",borderTop:"8px solid rgba(0,0,0,0.12)"}}),ka("i",{className:"absolute right-[8px]",style:t===0?{top:"-7px",borderRight:"16px solid transparent ",borderLeft:"16px solid transparent ",borderBottom:"8px solid #fff "}:{bottom:"-7px",borderRight:"16px solid transparent ",borderLeft:"16px solid transparent ",borderTop:"8px solid #fff "}}),ka("p",{className:"relative block rounded-[4px] bg-white px-[14px] py-[12px]",children:ka("span",{className:"block text-left text-[14px] font-semibold leading-[1.4] text-[#333]",children:e})})]})]})}var lL=ZW;import{useCallback as jW,useEffect as UW,useState as a7}from"react";function GW({page:e,pageSize:t,consumeType:r}){let{isLoadingProfile:n,profile:o}=ue(),{brand:i,locale:s,appName:a}=Se(),l=!!o,[c,u]=a7([]),[d,f]=a7(0),[p,m]=a7(0),{isMutating:h,trigger:g}=Un({url:"/v1/credit/log/coupon",initData:{brand:i,country:jn.get(s)||s,app_name:a}});UW(()=>{n||!o||h||e!==p&&e&&g({consume_type:r||1,page:e,page_size:t,user_id:o?.user_id},{onSuccess(C){m(e),f(C?.data?.total),u(c.concat(C?.data?.redeem_logs||[]))}})},[g,c,r,e,t,p,o,n,h]);let v=jW(async()=>{n||!l||!o||h||await g({consume_type:r||1,page:e,page_size:t,user_id:o?.user_id},{onSuccess(C){u(C?.data?.redeem_logs||[])}})},[r,h,n,e,t,o,g]);return{myRewards:c,isLoading:h,total:d,getMyRewards:v,canNext:d>c.length&&!h}}var l7=GW;import{jsx as wr,jsxs as wn}from"react/jsx-runtime";function qW({data:e,...t}){let[r,n]=h0(1),[o,i]=h0(1),[s,a]=h0(1),[l,c]=h0(-1),u=di(()=>{let S=[];return e.couponTab&&S.push({title:e.couponTab,type:1}),e.productTab&&S.push({title:e.productTab,type:2}),S},[e.couponTab,e.productTab]),d=di(()=>({page:t.isOpen?s:0,pageSize:1e3,consumeType:2}),[t.isOpen,s]),f=di(()=>({page:t.isOpen?o:0,pageSize:1e3,consumeType:1}),[t.isOpen,o]),{myRewards:p=[],canNext:m,isLoading:h}=l7(f),{myRewards:g=[],canNext:v,isLoading:C}=l7(d),x=di(()=>r===1?p.map(S=>({title:S.goods_title,value:S.consume_credits,type:0,date:new Date(S.create_time*1e3),couponCode:S.coupon_code,orderNumber:""})):r===2?g.map(S=>{let A=1;return S.fulfillment_status&&S.fulfillment_status!=="null"?S.fulfillment_status==="fulfilled"?A=5:A=4:S.approval_status===1||S.approval_status===3?A=2:S.approval_status===2&&(A=6),{title:S.goods_title,value:S.consume_credits,type:A,date:new Date(S.create_time*1e3),orderNumber:S.order_number,couponCode:""}}):[],[r,g,p]),w=di(()=>r===1?m:r===2?v:!1,[r,m,v]),y=di(()=>({0:e.receivedLabel,1:e.pendingLabel,3:e.failedLabel,2:e.approveSuccessLabel,4:e.unfulfilledLabel,5:e.fulfilledLabel,6:e.failedLabel}),[e]),b=di(()=>({0:"",1:e.pendingTip,3:"",2:e.confirmedTip,4:e.processingTip,5:e.ShippedTip,6:""}),[e]),R=di(()=>({0:"#52C41A",1:"#999",3:"#F84D4F",2:"#999",4:"#999",5:"#999",6:"#F84D4F"}),[]),L=cL(()=>{w&&(r===1?i(o+1):r===2&&a(s+1))},[r,s,o,w]),E=cL((S,A)=>{c(A),(0,uL.default)(S),setTimeout(()=>{c(-1)},2e3)},[]);return wn(Pr,{title:e.title,className:(0,c7.default)("h-[800px] w-[640px]"),useAnimation:!0,animationClassName:"md:translate-y-[100vh]",scrollClassName:"min-l:px-0 md:mb-0 md:px-0",...t,onScrollEnd:L,children:[wr("div",{className:"px-[24px] md:px-[16px]",children:wr(_n,{align:"left",shape:"rounded",value:r.toString(),onValueChange:S=>{n(Number(S))},children:wr(Bn,{children:u.map(S=>wr(zn,{value:S.type.toString(),children:S.title},S.type))})})}),wn("div",{className:"mt-[24px] overflow-auto overscroll-contain px-[24px] md:px-[16px]",children:[!x.length&&!h&&!C&&wn("div",{className:"flex h-full flex-col items-center justify-center",children:[wr(be,{className:"mb-[12px] w-[160px]",src:e?.emptyListImageUrl}),wr("div",{className:"text-[16px] font-semibold leading-[1.4]",children:e?.emptyListLabel})]}),h||C&&wr("div",{className:"flex h-full flex-col items-center justify-center",children:wr(m0,{})}),wr("div",{className:"grid gap-[18px] md:gap-[12px]",children:x.map((S,A)=>wn("div",{className:"grid gap-[8px]",children:[S?.orderNumber&&wn("div",{className:"text-[15px] font-semibold leading-[1.4] text-[#777]",children:[e.orderNumberLabel,": ",S.orderNumber]}),wn("div",{className:"flex items-center justify-between rounded-[8px] bg-[#f7f8f9] px-[16px] py-[20px]",children:[wn("div",{className:"grid gap-[4px]",children:[wr("div",{className:"text-[16px] font-bold leading-[1.4]",children:S.title}),wn("div",{className:"text-[14px] font-semibold text-[#999]",children:[e.valueLabel,": ",S.value," ",e?.pointUnit]}),wn("div",{className:"text-[14px] font-semibold text-[#999]",children:[S?.couponCode?`${e?.code||"Code"}: ${S.couponCode} `:"",S?.couponCode&&wr("span",{className:"cursor-pointer text-[14px] font-semibold text-brand underline",onClick:()=>{E(S.couponCode,A)},role:"button",tabIndex:0,onKeyDown:k=>{(k.key==="Enter"||k.key===" ")&&k.preventDefault()},children:l===A?e?.copied||"COPIED":e?.copy||"COPY"})]})]}),wn("div",{className:"grid gap-[4px] text-right",children:[wn("div",{className:(0,c7.default)("flex items-center justify-end text-[16px] font-bold leading-[1.4]",`text-[${R[S.type]}]`),children:[wr("span",{children:y[S.type]}),b[S.type]&&wr(lL,{info:b[S.type],index:A})]}),wr("div",{className:"text-[14px] font-semibold text-[#999]",children:WW(S.date).format("YYYY-MM-DD HH:mm").toString()})]})]})]},A))})]})]})}var dL=qW;import{jsx as sr,jsxs as Gn}from"react/jsx-runtime";function YW({data:e}){let[t,r]=u7(!1),[n,o]=u7(!1),[i,s]=u7(!1),a=KW(c=>{if(c.type)switch(c.type){case"activities":r(!0);break;case"rewards":o(!0);break}},[]),{creditInfo:l}=ue();return Gn(Pt,{asChild:!0,id:"infoCard",className:"-mb-[86px] -translate-y-[86px] x:-mb-[30px] x:-translate-y-[30px]",children:[Gn("div",{className:ne("mx-auto flex justify-between items-center rounded-[12px] border border-white px-[24px] py-[40px]","l:flex-col","min-l:px-[48px]","min-xl:px-[100px]"),style:{background:"linear-gradient(119.61deg, rgba(250, 250, 250, 0.6) 38.58%, rgba(255, 255, 255, 0.6) 63.73%, rgba(249, 252, 255, 0.6) 89.37%)",backdropFilter:"blur(8px)"},children:[Gn("div",{className:ne("grid grid-cols-2 gap-[24px] font-bold md:grid-cols-1 md:flex-col md:gap-[16px] min-md:items-center"),children:[Gn("div",{className:"mr-[80px] md:mr-[0] md:flex-1 md-xl:mr-[64px]",children:[sr("div",{className:ne("mb-[24px] text-[14px] font-bold l:mb-[6px] xl:text-[16px] min-md:text-[18px] l-xl:mb-[16px]"),children:e.balanceLabel}),Gn("div",{className:"flex items-baseline",children:[sr("div",{className:ne("mr-[8px] text-[36px] font-extrabold","min-md:text-[44px]","min-xl:text-[56px]"),children:l?xn(l.available_credit):0}),sr("div",{className:"text-[16px]",children:e?.pointUnit})]})]}),Gn("div",{className:"w-fit md:flex-1",children:[Gn("div",{className:ne("mb-[24px] flex text-[18px] l:mb-[6px] l:text-[14px] l-xl:mb-[16px]"),children:[sr(U,{className:"text-[14px] font-bold xl:text-[16px] min-md:text-[18px]",html:e.comingSoonLabel}),e.comingSoonTips&&Gn("div",{className:"group relative ml-[4px] flex cursor-pointer items-start",children:[sr(U,{as:"div",html:e?.infoIcon,className:"size-[18px] cursor-pointer [&_svg]:size-full",onClick:()=>{i?s(!1):(s(!0),setTimeout(()=>{s(!1)},5e3))}}),sr("div",{className:ne("absolute -bottom-[12px] -left-[32px] z-10 w-[356px] translate-y-full md:w-[276px]",i?"block":"hidden"),children:Gn("div",{className:"relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow",children:[sr(U,{size:"2",html:e.comingSoonTips,className:"desktop:text-[18px]"}),sr("div",{className:"absolute -top-[10px] left-[40px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]"})]})})]})]}),Gn("div",{className:"flex items-baseline ",children:[sr("div",{className:ne("mr-[8px] text-[36px] font-extrabold","min-l:text-[44px]","min-xl:text-[56px]"),children:l?xn(l.pending_credit):0}),sr("div",{className:"text-[16px]",children:e?.pointUnit})]})]})]}),sr("div",{className:ne("grid w-fit md:w-full l:mt-[32px] l:gap-[12px] min-l:gap-[16px] min-l:pl-[48px] md-l:grid-cols-2"),children:e.buttons?.map((c,u)=>sr(Oe,{variant:u===0?"secondary":"primary",size:"lg",className:"min-w-[156px] laptop:min-w-[189px]",onClick:()=>{a(c)},children:c.text},u))}),e?.myActivities&&sr(tL,{isOpen:t,data:e?.myActivities,onClose:()=>{r(!1)}}),e?.myRewards&&sr(dL,{isOpen:n,data:e?.myRewards,onClose:()=>{o(!1)}})]}),i&&sr("div",{role:"button",tabIndex:0,className:"fixed inset-0 z-10",onClick:()=>s(!1),onKeyDown:c=>c.key==="Escape"&&s(!1)})]})}import*as Aa from"react";function XW({title:e,titleId:t,...r},n){return Aa.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?Aa.createElement("title",{id:t},e):null,Aa.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}var QW=Aa.forwardRef(XW),nc=QW;import*as Ia from"react";function JW({title:e,titleId:t,...r},n){return Ia.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?Ia.createElement("title",{id:t},e):null,Ia.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 15.75 7.5-7.5 7.5 7.5"}))}var eq=Ia.forwardRef(JW),d7=eq;import{createContext as tq}from"react";var g0=tq({});import{useRef as rq}from"react";function fL(e){let t=rq(null);return t.current===null&&(t.current=e()),t.current}import{createContext as nq}from"react";var Pa=nq(null);import{createContext as oq}from"react";var v0=oq({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});import{useContext as iq,useId as sq,useEffect as aq,useCallback as lq}from"react";function pL(e=!0){let t=iq(Pa);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:o}=t,i=sq();aq(()=>{e&&o(i)},[e]);let s=lq(()=>e&&n&&n(i),[i,n,e]);return!r&&n?[!1,s]:[!0]}import{useLayoutEffect as cq,useEffect as uq}from"react";var Oa=typeof window<"u";var mL=Oa?cq:uq;var De=e=>e;var wo=De,bn=De;function ws(e){let t;return()=>(t===void 0&&(t=e()),t)}var Dr=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var tt=e=>e*1e3,Nt=e=>e/1e3;var Da={skipAnimations:!1,useManualTiming:!1};function hL(e){let t=new Set,r=new Set,n=!1,o=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1};function a(c){i.has(c)&&(l.schedule(c),e()),c(s)}let l={schedule:(c,u=!1,d=!1)=>{let p=d&&n?t:r;return u&&i.add(c),p.has(c)||p.add(c),c},cancel:c=>{r.delete(c),i.delete(c)},process:c=>{if(s=c,n){o=!0;return}n=!0,[t,r]=[r,t],t.forEach(a),t.clear(),n=!1,o&&(o=!1,l.process(c))}};return l}var C0=["read","resolveKeyframes","update","preRender","render","postRender"],dq=40;function x0(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},i=()=>r=!0,s=C0.reduce((v,C)=>(v[C]=hL(i),v),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:f}=s,p=()=>{let v=Da.useManualTiming?o.timestamp:performance.now();r=!1,o.delta=n?1e3/60:Math.max(Math.min(v-o.timestamp,dq),1),o.timestamp=v,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(p))},m=()=>{r=!0,n=!0,o.isProcessing||e(p)};return{schedule:C0.reduce((v,C)=>{let x=s[C];return v[C]=(w,y=!1,b=!1)=>(r||m(),x.schedule(w,y,b)),v},{}),cancel:v=>{for(let C=0;C<C0.length;C++)s[C0[C]].cancel(v)},state:o,steps:s}}var{schedule:fe,cancel:Nr,state:rt,steps:w0}=x0(typeof requestAnimationFrame<"u"?requestAnimationFrame:De,!0);import{createContext as fq}from"react";var b0=fq({strict:!1});var gL={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"]},bo={};for(let e in gL)bo[e]={isEnabled:t=>gL[e].some(r=>!!t[r])};function vL(e){for(let t in e)bo[t]={...bo[t],...e[t]}}var pq=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function oc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||pq.has(e)}var yL=e=>!oc(e);function gq(e){e&&(yL=t=>t.startsWith("on")?!oc(t):e(t))}try{gq((bL(),Rk(wL)).default)}catch{}function SL(e,t,r){let n={};for(let o in e)o==="values"&&typeof e.values=="object"||(yL(o)||r===!0&&oc(o)||!t&&!oc(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}function RL(e){if(typeof Proxy>"u")return e;let t=new Map,r=(...n)=>e(...n);return new Proxy(r,{get:(n,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}import{jsxs as Mq,jsx as Eq}from"react/jsx-runtime";import{forwardRef as Tq,useContext as p7}from"react";import{createContext as vq}from"react";var fi=vq({});import{useContext as Cq,useMemo as xq}from"react";function yo(e){return typeof e=="string"||Array.isArray(e)}function pi(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}var y0=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ic=["initial",...y0];function bs(e){return pi(e.animate)||ic.some(t=>yo(e[t]))}function S0(e){return!!(bs(e)||e.variants)}function LL(e,t){if(bs(e)){let{initial:r,animate:n}=e;return{initial:r===!1||yo(r)?r:void 0,animate:yo(n)?n:void 0}}return e.inherit!==!1?t:{}}function EL(e){let{initial:t,animate:r}=LL(e,Cq(fi));return xq(()=>({initial:t,animate:r}),[ML(t),ML(r)])}function ML(e){return Array.isArray(e)?e.join(" "):e}var TL=Symbol.for("motionComponentSymbol");import{useCallback as wq}from"react";function So(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function kL(e,t,r){return wq(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):So(r)&&(r.current=n))},[t])}import{useContext as sc,useRef as f7,useInsertionEffect as Sq,useEffect as Rq}from"react";var Na=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var bq="framerAppearId",R0="data-"+Na(bq);var{schedule:Fa,cancel:JSe}=x0(queueMicrotask,!1);import{createContext as yq}from"react";var L0=yq({});function AL(e,t,r,n,o){var i,s;let{visualElement:a}=sc(fi),l=sc(b0),c=sc(Pa),u=sc(v0).reducedMotion,d=f7(null);n=n||l.renderer,!d.current&&n&&(d.current=n(e,{visualState:t,parent:a,props:r,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));let f=d.current,p=sc(L0);f&&!f.projection&&o&&(f.type==="html"||f.type==="svg")&&Lq(d.current,r,o,p);let m=f7(!1);Sq(()=>{f&&m.current&&f.update(r,c)});let h=r[R0],g=f7(!!h&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,h))&&((s=window.MotionHasOptimisedAnimation)===null||s===void 0?void 0:s.call(window,h)));return mL(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Fa.render(f.render),g.current&&f.animationState&&f.animationState.animateChanges())}),Rq(()=>{f&&(!g.current&&f.animationState&&f.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,h)}),g.current=!1))}),f}function Lq(e,t,r,n){let{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:IL(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:!!s||a&&So(a),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:n,layoutScroll:l,layoutRoot:c})}function IL(e){if(e)return e.options.allowProjection!==!1?e.projection:IL(e.parent)}function PL({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:o}){var i,s;e&&vL(e);function a(c,u){let d,f={...p7(v0),...c,layoutId:kq(c)},{isStatic:p}=f,m=EL(c),h=n(c,p);if(!p&&Oa){Aq(f,e);let g=Iq(f);d=g.MeasureLayout,m.visualElement=AL(o,h,f,t,g.ProjectionNode)}return Mq(fi.Provider,{value:m,children:[d&&m.visualElement?Eq(d,{visualElement:m.visualElement,...f}):null,r(o,c,kL(h,m.visualElement,u),h,p,m.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(s=(i=o.displayName)!==null&&i!==void 0?i:o.name)!==null&&s!==void 0?s:""})`}`;let l=Tq(a);return l[TL]=o,l}function kq({layoutId:e}){let t=p7(g0).id;return t&&e!==void 0?t+"-"+e:e}function Aq(e,t){let r=p7(b0).strict}function Iq(e){let{drag:t,layout:r}=bo;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}var OL=["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 Va(e){return typeof e!="string"||e.includes("-")?!1:!!(OL.indexOf(e)>-1||/[A-Z]/u.test(e))}import{useContext as VL}from"react";function DL(e){let t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function Ha(e,t,r,n){if(typeof t=="function"){let[o,i]=DL(n);t=t(r!==void 0?r:e.custom,o,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,i]=DL(n);t=t(r!==void 0?r:e.custom,o,i)}return t}var ac=e=>Array.isArray(e);var NL=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),FL=e=>ac(e)?e[e.length-1]||0:e;var Ve=e=>!!(e&&e.getVelocity);function $a(e){let t=Ve(e)?e.get():e;return NL(t)?t.toValue():t}function Pq({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:r},n,o,i){let s={latestValues:Oq(n,o,i,e),renderState:t()};return r&&(s.onMount=a=>r({props:n,current:a,...s}),s.onUpdate=a=>r(a)),s}var M0=e=>(t,r)=>{let n=VL(fi),o=VL(Pa),i=()=>Pq(e,t,n,o);return r?i():fL(i)};function Oq(e,t,r,n){let o={},i=n(e,{});for(let f in i)o[f]=$a(i[f]);let{initial:s,animate:a}=e,l=bs(e),c=S0(e);t&&c&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let u=r?r.initial===!1:!1;u=u||s===!1;let d=u?a:s;if(d&&typeof d!="boolean"&&!pi(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=Ha(e,f[p]);if(m){let{transitionEnd:h,transition:g,...v}=m;for(let C in v){let x=v[C];if(Array.isArray(x)){let w=u?x.length-1:0;x=x[w]}x!==null&&(o[C]=x)}for(let C in h)o[C]=h[C]}}}return o}var Wn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],br=new Set(Wn);var HL=e=>t=>typeof t=="string"&&t.startsWith(e),E0=HL("--"),Dq=HL("var(--"),_a=e=>Dq(e)?Nq.test(e.split("/*")[0].trim()):!1,Nq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var T0=(e,t)=>t&&typeof e=="number"?t.transform(e):e;var Ft=(e,t,r)=>r>t?t:r<e?e:r;var qn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ro={...qn,transform:e=>Ft(0,1,e)},lc={...qn,default:1};var cc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Kn=cc("deg"),ar=cc("%"),X=cc("px"),$L=cc("vh"),_L=cc("vw"),m7={...ar,parse:e=>ar.parse(e)/100,transform:e=>ar.transform(e*100)};var BL={borderWidth:X,borderTopWidth:X,borderRightWidth:X,borderBottomWidth:X,borderLeftWidth:X,borderRadius:X,radius:X,borderTopLeftRadius:X,borderTopRightRadius:X,borderBottomRightRadius:X,borderBottomLeftRadius:X,width:X,maxWidth:X,height:X,maxHeight:X,top:X,right:X,bottom:X,left:X,padding:X,paddingTop:X,paddingRight:X,paddingBottom:X,paddingLeft:X,margin:X,marginTop:X,marginRight:X,marginBottom:X,marginLeft:X,backgroundPositionX:X,backgroundPositionY:X};var zL={rotate:Kn,rotateX:Kn,rotateY:Kn,rotateZ:Kn,scale:lc,scaleX:lc,scaleY:lc,scaleZ:lc,skew:Kn,skewX:Kn,skewY:Kn,distance:X,translateX:X,translateY:X,translateZ:X,x:X,y:X,z:X,perspective:X,transformPerspective:X,opacity:Ro,originX:m7,originY:m7,originZ:X};var h7={...qn,transform:Math.round};var Ba={...BL,...zL,zIndex:h7,size:X,fillOpacity:Ro,strokeOpacity:Ro,numOctaves:h7};var Fq={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Vq=Wn.length;function ZL(e,t,r){let n="",o=!0;for(let i=0;i<Vq;i++){let s=Wn[i],a=e[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||r){let c=T0(a,Ba[s]);if(!l){o=!1;let u=Fq[s]||s;n+=`${u}(${c}) `}r&&(t[s]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function za(e,t,r){let{style:n,vars:o,transformOrigin:i}=e,s=!1,a=!1;for(let l in t){let c=t[l];if(br.has(l)){s=!0;continue}else if(E0(l)){o[l]=c;continue}else{let u=T0(c,Ba[l]);l.startsWith("origin")?(a=!0,i[l]=u):n[l]=u}}if(t.transform||(s||r?n.transform=ZL(t,e.transform,r):n.transform&&(n.transform="none")),a){let{originX:l="50%",originY:c="50%",originZ:u=0}=i;n.transformOrigin=`${l} ${c} ${u}`}}var Hq={offset:"stroke-dashoffset",array:"stroke-dasharray"},$q={offset:"strokeDashoffset",array:"strokeDasharray"};function jL(e,t,r=1,n=0,o=!0){e.pathLength=1;let i=o?Hq:$q;e[i.offset]=X.transform(-n);let s=X.transform(t),a=X.transform(r);e[i.array]=`${s} ${a}`}function UL(e,t,r){return typeof e=="string"?e:X.transform(t+r*e)}function GL(e,t,r){let n=UL(t,e.x,e.width),o=UL(r,e.y,e.height);return`${n} ${o}`}function Za(e,{attrX:t,attrY:r,attrScale:n,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(za(e,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(o!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=GL(m,o!==void 0?o:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),r!==void 0&&(f.y=r),n!==void 0&&(f.scale=n),s!==void 0&&jL(f,s,a,l,!1)}var ja=()=>({style:{},transform:{},transformOrigin:{},vars:{}});var k0=()=>({...ja(),attrs:{}});var Ua=e=>typeof e=="string"&&e.toLowerCase()==="svg";function A0(e,{style:t,vars:r},n,o){Object.assign(e.style,t,o&&o.getProjectionStyles(n));for(let i in r)e.style.setProperty(i,r[i])}var I0=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 P0(e,t,r,n){A0(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(I0.has(o)?o:Na(o),t.attrs[o])}var Ga={};function WL(e){Object.assign(Ga,e)}function O0(e,{layout:t,layoutId:r}){return br.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Ga[e]||e==="opacity")}function Wa(e,t,r){var n;let{style:o}=e,i={};for(let s in o)(Ve(o[s])||t.style&&Ve(t.style[s])||O0(s,e)||((n=r?.getValue(s))===null||n===void 0?void 0:n.liveStyle)!==void 0)&&(i[s]=o[s]);return i}function D0(e,t,r){let n=Wa(e,t,r);for(let o in e)if(Ve(e[o])||Ve(t[o])){let i=Wn.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[i]=e[o]}return n}function _q(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var qL=["x","y","width","height","cx","cy","r"],KL={useVisualState:M0({scrapeMotionValuesFromProps:D0,createRenderState:k0,onUpdate:({props:e,prevProps:t,current:r,renderState:n,latestValues:o})=>{if(!r)return;let i=!!e.drag;if(!i){for(let a in o)if(br.has(a)){i=!0;break}}if(!i)return;let s=!t;if(t)for(let a=0;a<qL.length;a++){let l=qL[a];e[l]!==t[l]&&(s=!0)}s&&fe.read(()=>{_q(r,n),fe.render(()=>{Za(n,o,Ua(r.tagName),e.transformTemplate),P0(r,n)})})}})};var YL={useVisualState:M0({scrapeMotionValuesFromProps:Wa,createRenderState:ja})};import{Fragment as Uq,useMemo as Gq,createElement as Wq}from"react";import{useMemo as Bq}from"react";function g7(e,t,r){for(let n in t)!Ve(t[n])&&!O0(n,r)&&(e[n]=t[n])}function zq({transformTemplate:e},t){return Bq(()=>{let r=ja();return za(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Zq(e,t){let r=e.style||{},n={};return g7(n,r,e),Object.assign(n,zq(e,t)),n}function XL(e,t){let r={},n=Zq(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=n,r}import{useMemo as jq}from"react";function QL(e,t,r,n){let o=jq(()=>{let i=k0();return Za(i,t,Ua(n),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){let i={};g7(i,e.style,e),o.style={...i,...o.style}}return o}function JL(e=!1){return(r,n,o,{latestValues:i},s)=>{let l=(Va(r)?QL:XL)(n,i,s,r),c=SL(n,typeof r=="string",e),u=r!==Uq?{...c,...l,ref:o}:{},{children:d}=n,f=Gq(()=>Ve(d)?d.get():d,[d]);return Wq(r,{...u,children:f})}}function eM(e,t){return function(n,{forwardMotionProps:o}={forwardMotionProps:!1}){let s={...Va(n)?KL:YL,preloadedFeatures:e,useRender:JL(o),createVisualElement:t,Component:n};return PL(s)}}function v7(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function mi(e,t,r){let n=e.getProps();return Ha(n,t,r!==void 0?r:n.custom,e)}var C7=ws(()=>window.ScrollTimeline!==void 0);var uc=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t,r){let n=this.animations.map(o=>{if(C7()&&o.attachTimeline)return o.attachTimeline(t);if(typeof r=="function")return r(o)});return()=>{n.forEach((o,i)=>{o&&o(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var dc=class extends uc{then(t,r){return Promise.all(this.animations).then(t).catch(r)}};function hi(e,t){return e?e[t]||e.default||e:void 0}function qa(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function gi(e){return typeof e=="function"}function fc(e,t){e.timeline=t,e.onfinish=null}var Ka=e=>Array.isArray(e)&&typeof e[0]=="number";var w7={linearEasing:void 0};function tM(e,t){let r=ws(e);return()=>{var n;return(n=w7[t])!==null&&n!==void 0?n:r()}}var vi=tM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var pc=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let i=0;i<o;i++)n+=e(Dr(0,o-1,i))+", ";return`linear(${n.substring(0,n.length-2)})`};function F0(e){return!!(typeof e=="function"&&vi()||!e||typeof e=="string"&&(e in N0||vi())||Ka(e)||Array.isArray(e)&&e.every(F0))}var Ya=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,N0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ya([0,.65,.55,1]),circOut:Ya([.55,0,1,.45]),backIn:Ya([.31,.01,.66,-.59]),backOut:Ya([.33,1.53,.69,.99])};function Xa(e,t){if(e)return typeof e=="function"&&vi()?pc(e,t):Ka(e)?Ya(e):Array.isArray(e)?e.map(r=>Xa(r,t)||N0.easeOut):N0[e]}var Fr={x:!1,y:!1};function Qa(){return Fr.x||Fr.y}function b7(e,t,r){var n;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let i=(n=r?.[e])!==null&&n!==void 0?n:o.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function V0(e,t){let r=b7(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function rM(e){return t=>{t.pointerType==="touch"||Qa()||e(t)}}function y7(e,t,r={}){let[n,o,i]=V0(e,r),s=rM(a=>{let{target:l}=a,c=t(a);if(typeof c!="function"||!l)return;let u=rM(d=>{c(d),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,o)});return n.forEach(a=>{a.addEventListener("pointerenter",s,o)}),i}var H0=(e,t)=>t?e===t?!0:H0(e,t.parentElement):!1;var ys=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var qq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function nM(e){return qq.has(e.tagName)||e.tabIndex!==-1}var Ss=new WeakSet;function oM(e){return t=>{t.key==="Enter"&&e(t)}}function S7(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var iM=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=oM(()=>{if(Ss.has(r))return;S7(r,"down");let o=oM(()=>{S7(r,"up")}),i=()=>S7(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",i,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function sM(e){return ys(e)&&!Qa()}function R7(e,t,r={}){let[n,o,i]=V0(e,r),s=a=>{let l=a.currentTarget;if(!sM(a)||Ss.has(l))return;Ss.add(l);let c=t(a),u=(p,m)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),!(!sM(p)||!Ss.has(l))&&(Ss.delete(l),typeof c=="function"&&c(p,{success:m}))},d=p=>{u(p,r.useGlobalTarget||H0(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(a=>{!nM(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(r.useGlobalTarget?window:a).addEventListener("pointerdown",s,o),a.addEventListener("focus",c=>iM(c,o),o)}),i}function L7(e){return e==="x"||e==="y"?Fr[e]?null:(Fr[e]=!0,()=>{Fr[e]=!1}):Fr.x||Fr.y?null:(Fr.x=Fr.y=!0,()=>{Fr.x=Fr.y=!1})}var $0=new Set(["width","height","top","left","right","bottom",...Wn]);var _0;function Yq(){_0=void 0}var Yt={now:()=>(_0===void 0&&Yt.set(rt.isProcessing||Da.useManualTiming?rt.timestamp:performance.now()),_0),set:e=>{_0=e,queueMicrotask(Yq)}};function Ja(e,t){e.indexOf(t)===-1&&e.push(t)}function el(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Ci=class{constructor(){this.subscriptions=[]}add(t){return Ja(this.subscriptions,t),()=>el(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let i=0;i<o;i++){let s=this.subscriptions[i];s&&s(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function B0(e,t){return t?e*(1e3/t):0}var lM=30,Xq=e=>!isNaN(parseFloat(e)),cM={current:void 0},M7=class{constructor(t,r={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(n,o=!0)=>{let i=Yt.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Yt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Xq(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Ci);let n=this.events[t].add(r);return t==="change"?()=>{n(),fe.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return cM.current&&cM.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Yt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>lM)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,lM);return B0(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),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 Lo(e,t){return new M7(e,t)}function Qq(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Lo(r))}function uM(e,t){let r=mi(e,t),{transitionEnd:n={},transition:o={},...i}=r||{};i={...i,...n};for(let s in i){let a=FL(i[s]);Qq(e,s,a)}}function dM(e){return!!(Ve(e)&&e.add)}function mc(e,t){let r=e.getValue("willChange");if(dM(r))return r.add(t)}function z0(e){return e.props[R0]}var Z0={current:!1};var fM=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Jq=1e-7,eK=12;function tK(e,t,r,n,o){let i,s,a=0;do s=t+(r-t)/2,i=fM(s,n,o)-e,i>0?r=s:t=s;while(Math.abs(i)>Jq&&++a<eK);return s}function xi(e,t,r,n){if(e===t&&r===n)return De;let o=i=>tK(i,0,1,e,r);return i=>i===0||i===1?i:fM(o(i),t,n)}var j0=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var U0=e=>t=>1-e(1-t);var E7=xi(.33,1.53,.69,.99),hc=U0(E7),G0=j0(hc);var W0=e=>(e*=2)<1?.5*hc(e):.5*(2-Math.pow(2,-10*(e-1)));var q0=e=>1-Math.sin(Math.acos(e)),K0=U0(q0),Y0=j0(q0);var X0=e=>/^0[^.\s]+$/u.test(e);function pM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||X0(e):!0}var wi=e=>Math.round(e*1e5)/1e5;var tl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function mM(e){return e==null}var hM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var rl=(e,t)=>r=>!!(typeof r=="string"&&hM.test(r)&&r.startsWith(e)||t&&!mM(r)&&Object.prototype.hasOwnProperty.call(r,t)),Q0=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,i,s,a]=n.match(tl);return{[e]:parseFloat(o),[t]:parseFloat(i),[r]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}};var rK=e=>Ft(0,255,e),T7={...qn,transform:e=>Math.round(rK(e))},Yn={test:rl("rgb","red"),parse:Q0("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+T7.transform(e)+", "+T7.transform(t)+", "+T7.transform(r)+", "+wi(Ro.transform(n))+")"};function nK(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var gc={test:rl("#"),parse:nK,transform:Yn.transform};var bi={test:rl("hsl","hue"),parse:Q0("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+ar.transform(wi(t))+", "+ar.transform(wi(r))+", "+wi(Ro.transform(n))+")"};var lt={test:e=>Yn.test(e)||gc.test(e)||bi.test(e),parse:e=>Yn.test(e)?Yn.parse(e):bi.test(e)?bi.parse(e):gc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Yn.transform(e):bi.transform(e)};var gM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function oK(e){var t,r;return isNaN(e)&&typeof e=="string"&&(((t=e.match(tl))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(gM))===null||r===void 0?void 0:r.length)||0)>0}var CM="number",xM="color",iK="var",sK="var(",vM="${}",aK=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rs(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],i=0,a=t.replace(aK,l=>(lt.test(l)?(n.color.push(i),o.push(xM),r.push(lt.parse(l))):l.startsWith(sK)?(n.var.push(i),o.push(iK),r.push(l)):(n.number.push(i),o.push(CM),r.push(parseFloat(l))),++i,vM)).split(vM);return{values:r,split:a,indexes:n,types:o}}function wM(e){return Rs(e).values}function bM(e){let{split:t,types:r}=Rs(e),n=t.length;return o=>{let i="";for(let s=0;s<n;s++)if(i+=t[s],o[s]!==void 0){let a=r[s];a===CM?i+=wi(o[s]):a===xM?i+=lt.transform(o[s]):i+=o[s]}return i}}var lK=e=>typeof e=="number"?0:e;function cK(e){let t=wM(e);return bM(e)(t.map(lK))}var lr={test:oK,parse:wM,createTransformer:bM,getAnimatableNone:cK};var uK=new Set(["brightness","contrast","saturate","opacity"]);function dK(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(tl)||[];if(!n)return e;let o=r.replace(n,""),i=uK.has(t)?1:0;return n!==r&&(i*=100),t+"("+i+o+")"}var fK=/\b([a-z-]*)\(.*?\)/gu,vc={...lr,getAnimatableNone:e=>{let t=e.match(fK);return t?t.map(dK).join(" "):e}};var pK={...Ba,color:lt,backgroundColor:lt,outlineColor:lt,fill:lt,stroke:lt,borderColor:lt,borderTopColor:lt,borderRightColor:lt,borderBottomColor:lt,borderLeftColor:lt,filter:vc,WebkitFilter:vc},nl=e=>pK[e];function J0(e,t){let r=nl(e);return r!==vc&&(r=lr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var mK=new Set(["auto","none","0"]);function yM(e,t,r){let n=0,o;for(;n<e.length&&!o;){let i=e[n];typeof i=="string"&&!mK.has(i)&&Rs(i).values.length&&(o=e[n]),n++}if(o&&r)for(let i of t)e[i]=J0(r,o)}var k7=e=>e===qn||e===X,SM=(e,t)=>parseFloat(e.split(", ")[t]),RM=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;let o=n.match(/^matrix3d\((.+)\)$/u);if(o)return SM(o[1],t);{let i=n.match(/^matrix\((.+)\)$/u);return i?SM(i[1],e):0}},hK=new Set(["x","y","z"]),gK=Wn.filter(e=>!hK.has(e));function LM(e){let t=[];return gK.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var Ls={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:RM(4,13),y:RM(5,14)};Ls.translateX=Ls.x;Ls.translateY=Ls.y;var Ms=new Set,A7=!1,I7=!1;function MM(){if(I7){let e=Array.from(Ms).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=LM(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([i,s])=>{var a;(a=n.getValue(i))===null||a===void 0||a.set(s)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}I7=!1,A7=!1,Ms.forEach(e=>e.complete()),Ms.clear()}function EM(){Ms.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(I7=!0)})}function TM(){EM(),MM()}var yi=class{constructor(t,r,n,o,i,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=i,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ms.add(this),A7||(A7=!0,fe.read(EM),fe.resolveKeyframes(MM))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){let s=o?.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(n&&r){let l=n.readValue(r,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&s===void 0&&o.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Ms.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Ms.delete(this))}resume(){this.isComplete||this.scheduleResolve()}};var e2=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var vK=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function CK(e){let t=vK.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var xK=4;function P7(e,t,r=1){bn(r<=xK,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[n,o]=CK(e);if(!n)return;let i=window.getComputedStyle(t).getPropertyValue(n);if(i){let s=i.trim();return e2(s)?parseFloat(s):s}return _a(o)?P7(o,t,r+1):o}var t2=e=>t=>t.test(e);var kM={test:e=>e==="auto",parse:e=>e};var O7=[qn,X,ar,Kn,_L,$L,kM],D7=e=>O7.find(t2(e));var ol=class extends yi{constructor(t,r,n,o,i){super(t,r,n,o,i,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),_a(c))){let u=P7(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!$0.has(n)||t.length!==2)return;let[o,i]=t,s=D7(o),a=D7(i);if(s!==a)if(k7(s)&&k7(a))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)pM(t[o])&&n.push(o);n.length&&yM(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ls[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){var t;let{element:r,name:n,unresolvedKeyframes:o}=this;if(!r||!r.current)return;let i=r.getValue(n);i&&i.jump(this.measuredOrigin,!1);let s=o.length-1,a=o[s];o[s]=Ls[n](r.measureViewportBox(),window.getComputedStyle(r.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{r.getValue(l).set(c)}),this.resolveNoneKeyframes()}};var N7=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(lr.test(e)||e==="0")&&!e.startsWith("url("));function wK(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function AM(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let i=e[e.length-1],s=N7(o,t),a=N7(i,t);return wo(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!s||!a?!1:wK(e)||(r==="spring"||gi(r))&&n}var bK=e=>e!==null;function Si(e,{repeat:t,repeatType:r="loop"},n){let o=e.filter(bK),i=t&&r!=="loop"&&t%2===1?0:o.length-1;return!i||n===void 0?o[i]:n}var yK=40,il=class{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:i=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Yt.now(),this.options={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:i,repeatType:s,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>yK?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&TM(),this._resolved}onKeyframesResolved(t,r){this.resolvedAt=Yt.now(),this.hasAttemptedResolve=!0;let{name:n,type:o,velocity:i,delay:s,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!AM(t,n,o,i))if(Z0.current||!s){l&&l(Si(t,this.options,r)),a&&a(),this.resolveFinishedPromise();return}else this.options.duration=0;let u=this.initPlayback(t,r);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:r,...u},this.onPostResolved())}onPostResolved(){}then(t,r){return this.currentFinishedPromise.then(t,r)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}};var ye=(e,t,r)=>e+(t-e)*r;function F7(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function IM({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,i=0,s=0;if(!t)o=i=s=r;else{let a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;o=F7(l,a,e+1/3),i=F7(l,a,e),s=F7(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(i*255),blue:Math.round(s*255),alpha:n}}function sl(e,t){return r=>r>0?t:e}var V7=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},SK=[gc,Yn,bi],RK=e=>SK.find(t=>t.test(e));function PM(e){let t=RK(e);if(wo(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let r=t.parse(e);return t===bi&&(r=IM(r)),r}var H7=(e,t)=>{let r=PM(e),n=PM(t);if(!r||!n)return sl(e,t);let o={...r};return i=>(o.red=V7(r.red,n.red,i),o.green=V7(r.green,n.green,i),o.blue=V7(r.blue,n.blue,i),o.alpha=ye(r.alpha,n.alpha,i),Yn.transform(o))};var LK=(e,t)=>r=>t(e(r)),Xn=(...e)=>e.reduce(LK);var r2=new Set(["none","hidden"]);function OM(e,t){return r2.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function MK(e,t){return r=>ye(e,t,r)}function n2(e){return typeof e=="number"?MK:typeof e=="string"?_a(e)?sl:lt.test(e)?H7:kK:Array.isArray(e)?DM:typeof e=="object"?lt.test(e)?H7:EK:sl}function DM(e,t){let r=[...e],n=r.length,o=e.map((i,s)=>n2(i)(i,t[s]));return i=>{for(let s=0;s<n;s++)r[s]=o[s](i);return r}}function EK(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=n2(e[o])(e[o],t[o]));return o=>{for(let i in n)r[i]=n[i](o);return r}}function TK(e,t){var r;let n=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let s=t.types[i],a=e.indexes[s][o[s]],l=(r=e.values[a])!==null&&r!==void 0?r:0;n[i]=l,o[s]++}return n}var kK=(e,t)=>{let r=lr.createTransformer(t),n=Rs(e),o=Rs(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?r2.has(e)&&!o.values.length||r2.has(t)&&!n.values.length?OM(e,t):Xn(DM(TK(n,o),o.values),r):(wo(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),sl(e,t))};function o2(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ye(e,t,r):n2(e)(e,t)}var AK=5;function i2(e,t,r){let n=Math.max(t-AK,0);return B0(r-e(n),t-n)}var $e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var $7=.001;function NM({duration:e=$e.duration,bounce:t=$e.bounce,velocity:r=$e.velocity,mass:n=$e.mass}){let o,i;wo(e<=tt($e.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Ft($e.minDamping,$e.maxDamping,s),e=Ft($e.minDuration,$e.maxDuration,Nt(e)),s<1?(o=c=>{let u=c*s,d=u*e,f=u-r,p=s2(c,s),m=Math.exp(-d);return $7-f/p*m},i=c=>{let d=c*s*e,f=d*r+r,p=Math.pow(s,2)*Math.pow(c,2)*e,m=Math.exp(-d),h=s2(Math.pow(c,2),s);return(-o(c)+$7>0?-1:1)*((f-p)*m)/h}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-$7+u*d},i=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let a=5/e,l=PK(o,i,a);if(e=tt(e),isNaN(l))return{stiffness:$e.stiffness,damping:$e.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:s*2*Math.sqrt(n*c),duration:e}}}var IK=12;function PK(e,t,r){let n=r;for(let o=1;o<IK;o++)n=n-e(n)/t(n);return n}function s2(e,t){return e*Math.sqrt(1-t*t)}var OK=["duration","bounce"],DK=["stiffness","damping","mass"];function FM(e,t){return t.some(r=>e[r]!==void 0)}function NK(e){let t={velocity:$e.velocity,stiffness:$e.stiffness,damping:$e.damping,mass:$e.mass,isResolvedFromDuration:!1,...e};if(!FM(e,DK)&&FM(e,OK))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,i=2*Ft(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:$e.mass,stiffness:o,damping:i}}else{let r=NM(e);t={...t,...r,mass:$e.mass},t.isResolvedFromDuration=!0}return t}function a2(e=$e.visualDuration,t=$e.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,i=r.keyframes[0],s=r.keyframes[r.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=NK({...r,velocity:-Nt(r.velocity||0)}),m=f||0,h=c/(2*Math.sqrt(l*u)),g=s-i,v=Nt(Math.sqrt(l/u)),C=Math.abs(g)<5;n||(n=C?$e.restSpeed.granular:$e.restSpeed.default),o||(o=C?$e.restDelta.granular:$e.restDelta.default);let x;if(h<1){let y=s2(v,h);x=b=>{let R=Math.exp(-h*v*b);return s-R*((m+h*v*g)/y*Math.sin(y*b)+g*Math.cos(y*b))}}else if(h===1)x=y=>s-Math.exp(-v*y)*(g+(m+v*g)*y);else{let y=v*Math.sqrt(h*h-1);x=b=>{let R=Math.exp(-h*v*b),L=Math.min(y*b,300);return s-R*((m+h*v*g)*Math.sinh(L)+y*g*Math.cosh(L))/y}}let w={calculatedDuration:p&&d||null,next:y=>{let b=x(y);if(p)a.done=y>=d;else{let R=0;h<1&&(R=y===0?tt(m):i2(x,y,b));let L=Math.abs(R)<=n,E=Math.abs(s-b)<=o;a.done=L&&E}return a.value=a.done?s:b,a},toString:()=>{let y=Math.min(qa(w),2e4),b=pc(R=>w.next(y*R).value,y,30);return y+"ms "+b}};return w}function _7({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=L=>a!==void 0&&L<a||l!==void 0&&L>l,m=L=>a===void 0?l:l===void 0||Math.abs(a-L)<Math.abs(l-L)?a:l,h=r*t,g=d+h,v=s===void 0?g:s(g);v!==g&&(h=v-d);let C=L=>-h*Math.exp(-L/n),x=L=>v+C(L),w=L=>{let E=C(L),S=x(L);f.done=Math.abs(E)<=c,f.value=f.done?v:S},y,b,R=L=>{p(f.value)&&(y=L,b=a2({keyframes:[f.value,m(f.value)],velocity:i2(x,L,f.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return R(0),{calculatedDuration:null,next:L=>{let E=!1;return!b&&y===void 0&&(E=!0,w(L),R(L)),y!==void 0&&L>=y?b.next(L-y):(!E&&w(L),f)}}}var VM=xi(.42,0,1,1),HM=xi(0,0,.58,1),l2=xi(.42,0,.58,1);var $M=e=>Array.isArray(e)&&typeof e[0]!="number";var _M={linear:De,easeIn:VM,easeInOut:l2,easeOut:HM,circIn:q0,circInOut:Y0,circOut:K0,backIn:hc,backInOut:G0,backOut:E7,anticipate:W0},B7=e=>{if(Ka(e)){bn(e.length===4,"Cubic bezier arrays must contain four numerical values.");let[t,r,n,o]=e;return xi(t,r,n,o)}else if(typeof e=="string")return bn(_M[e]!==void 0,`Invalid easing type '${e}'`),_M[e];return e};function FK(e,t,r){let n=[],o=r||o2,i=e.length-1;for(let s=0;s<i;s++){let a=o(e[s],e[s+1]);if(t){let l=Array.isArray(t)?t[s]||De:t;a=Xn(l,a)}n.push(a)}return n}function BM(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let i=e.length;if(bn(i===t.length,"Both input and output ranges must be the same length"),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());let a=FK(t,n,o),l=a.length,c=u=>{if(s&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=Dr(e[d],e[d+1],u);return a[d](f)};return r?u=>c(Ft(e[0],e[i-1],u)):c}function zM(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=Dr(0,t,n);e.push(ye(r,1,o))}}function ZM(e){let t=[0];return zM(t,e.length-1),t}function jM(e,t){return e.map(r=>r*t)}function VK(e,t){return e.map(()=>t||l2).splice(0,e.length-1)}function Cc({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=$M(n)?n.map(B7):B7(n),i={done:!1,value:t[0]},s=jM(r&&r.length===t.length?r:ZM(t),e),a=BM(s,t,{ease:Array.isArray(o)?o:VK(t,o)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}var UM=e=>{let t=({timestamp:r})=>e(r);return{start:()=>fe.update(t,!0),stop:()=>Nr(t),now:()=>rt.isProcessing?rt.timestamp:Yt.now()}};var HK={decay:_7,inertia:_7,tween:Cc,keyframes:Cc,spring:a2},$K=e=>e/100,Es=class extends il{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();let{onStop:l}=this.options;l&&l()};let{name:r,motionValue:n,element:o,keyframes:i}=this.options,s=o?.KeyframeResolver||yi,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new s(i,a,r,n,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){let{type:r="keyframes",repeat:n=0,repeatDelay:o=0,repeatType:i,velocity:s=0}=this.options,a=gi(r)?r:HK[r]||Cc,l,c;a!==Cc&&typeof t[0]!="number"&&(l=Xn($K,o2(t[0],t[1])),t=[0,100]);let u=a({...this.options,keyframes:t});i==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=qa(u));let{calculatedDuration:d}=u,f=d+o,p=f*(n+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:p}}onPostResolved(){let{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,r=!1){let{resolved:n}=this;if(!n){let{keyframes:L}=this.options;return{done:!0,value:L[L.length-1]}}let{finalKeyframe:o,generator:i,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:d}=n;if(this.startTime===null)return i.next(0);let{delay:f,repeat:p,repeatType:m,repeatDelay:h,onUpdate:g}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),r?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;let v=this.currentTime-f*(this.speed>=0?1:-1),C=this.speed>=0?v<0:v>u;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let x=this.currentTime,w=i;if(p){let L=Math.min(this.currentTime,u)/d,E=Math.floor(L),S=L%1;!S&&L>=1&&(S=1),S===1&&E--,E=Math.min(E,p+1),!!(E%2)&&(m==="reverse"?(S=1-S,h&&(S-=h/d)):m==="mirror"&&(w=s)),x=Ft(0,1,S)*d}let y=C?{done:!1,value:l[0]}:w.next(x);a&&(y.value=a(y.value));let{done:b}=y;!C&&c!==null&&(b=this.speed>=0?this.currentTime>=u:this.currentTime<=0);let R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return R&&o!==void 0&&(y.value=Si(l,this.options,o)),g&&g(y.value),R&&this.finish(),y}get duration(){let{resolved:t}=this;return t?Nt(t.calculatedDuration):0}get time(){return Nt(this.currentTime)}set time(t){t=tt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Nt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;let{driver:t=UM,onPlay:r,startTime:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),r&&r();let o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=n??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";let{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}};var GM=new Set(["opacity","clipPath","filter","transform"]);function WM(e,t,r,{delay:n=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){let c={[t]:r};l&&(c.offset=l);let u=Xa(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:n,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:i+1,direction:s==="reverse"?"alternate":"normal"})}var qM=ws(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));var c2=10,_K=2e4;function BK(e){return gi(e.type)||e.type==="spring"||!F0(e.ease)}function zK(e,t){let r=new Es({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),n={done:!1,value:e[0]},o=[],i=0;for(;!n.done&&i<_K;)n=r.sample(i),o.push(n.value),i+=c2;return{times:void 0,keyframes:o,duration:i-c2,ease:"linear"}}var KM={anticipate:W0,backInOut:G0,circInOut:Y0};function ZK(e){return e in KM}var xc=class extends il{constructor(t){super(t);let{name:r,motionValue:n,element:o,keyframes:i}=this.options;this.resolver=new ol(i,(s,a)=>this.onKeyframesResolved(s,a),r,n,o),this.resolver.scheduleResolve()}initPlayback(t,r){let{duration:n=300,times:o,ease:i,type:s,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof i=="string"&&vi()&&ZK(i)&&(i=KM[i]),BK(this.options)){let{onComplete:d,onUpdate:f,motionValue:p,element:m,...h}=this.options,g=zK(t,h);t=g.keyframes,t.length===1&&(t[1]=t[0]),n=g.duration,o=g.times,i=g.ease,s="keyframes"}let u=WM(a.owner.current,l,t,{...this.options,duration:n,times:o,ease:i});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(fc(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{let{onComplete:d}=this.options;a.set(Si(t,this.options,r)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:o,type:s,ease:i,keyframes:t}}get duration(){let{resolved:t}=this;if(!t)return 0;let{duration:r}=t;return Nt(r)}get time(){let{resolved:t}=this;if(!t)return 0;let{animation:r}=t;return Nt(r.currentTime||0)}set time(t){let{resolved:r}=this;if(!r)return;let{animation:n}=r;n.currentTime=tt(t)}get speed(){let{resolved:t}=this;if(!t)return 1;let{animation:r}=t;return r.playbackRate}set speed(t){let{resolved:r}=this;if(!r)return;let{animation:n}=r;n.playbackRate=t}get state(){let{resolved:t}=this;if(!t)return"idle";let{animation:r}=t;return r.playState}get startTime(){let{resolved:t}=this;if(!t)return null;let{animation:r}=t;return r.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{let{resolved:r}=this;if(!r)return De;let{animation:n}=r;fc(n,t)}return De}play(){if(this.isStopped)return;let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.playState==="finished"&&this.updateFinishedPromise(),r.play()}pause(){let{resolved:t}=this;if(!t)return;let{animation:r}=t;r.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:t}=this;if(!t)return;let{animation:r,keyframes:n,duration:o,type:i,ease:s,times:a}=t;if(r.playState==="idle"||r.playState==="finished")return;if(this.time){let{motionValue:c,onUpdate:u,onComplete:d,element:f,...p}=this.options,m=new Es({...p,keyframes:n,duration:o,type:i,ease:s,times:a,isGenerator:!0}),h=tt(this.time);c.setWithVelocity(m.sample(h-c2).value,m.sample(h).value,c2)}let{onStop:l}=this.options;l&&l(),this.cancel()}complete(){let{resolved:t}=this;t&&t.animation.finish()}cancel(){let{resolved:t}=this;t&&t.animation.cancel()}static supports(t){let{motionValue:r,name:n,repeatDelay:o,repeatType:i,damping:s,type:a}=t;if(!r||!r.owner||!(r.owner.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=r.owner.getProps();return qM()&&n&&GM.has(n)&&!l&&!c&&!o&&i!=="mirror"&&s!==0&&a!=="inertia"}};var jK={type:"spring",stiffness:500,damping:25,restSpeed:10},UK=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),GK={type:"keyframes",duration:.8},WK={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},YM=(e,{keyframes:t})=>t.length>2?GK:br.has(e)?e.startsWith("scale")?UK(t[1]):jK:WK;function XM({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}var al=(e,t,r,n={},o,i)=>s=>{let a=hi(n,e)||{},l=a.delay||n.delay||0,{elapsed:c=0}=n;c=c-tt(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};XM(a)||(u={...u,...YM(e,u)}),u.duration&&(u.duration=tt(u.duration)),u.repeatDelay&&(u.repeatDelay=tt(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(Z0.current||Da.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!i&&t.get()!==void 0){let f=Si(u.keyframes,a);if(f!==void 0)return fe.update(()=>{u.onUpdate(f),u.onComplete()}),new dc([])}return!i&&xc.supports(u)?new xc(u):new Es(u)};function qK({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function u2(e,t,{delay:r=0,transitionOverride:n,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;n&&(s=n);let c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(let d in l){let f=e.getValue(d,(i=e.latestValues[d])!==null&&i!==void 0?i:null),p=l[d];if(p===void 0||u&&qK(u,d))continue;let m={delay:r,...hi(s||{},d)},h=!1;if(window.MotionHandoffAnimation){let v=z0(e);if(v){let C=window.MotionHandoffAnimation(v,d,fe);C!==null&&(m.startTime=C,h=!0)}}mc(e,d),f.start(al(d,f,p,e.shouldReduceMotion&&$0.has(d)?{type:!1}:m,e,h));let g=f.animation;g&&c.push(g)}return a&&Promise.all(c).then(()=>{fe.update(()=>{a&&uM(e,a)})}),c}function d2(e,t,r={}){var n;let o=mi(e,t,r.type==="exit"?(n=e.presenceContext)===null||n===void 0?void 0:n.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(i=r.transitionOverride);let s=o?()=>Promise.all(u2(e,o,r)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{let{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=i;return KK(e,t,u+c,d,f,r)}:()=>Promise.resolve(),{when:l}=i;if(l){let[c,u]=l==="beforeChildren"?[s,a]:[a,s];return c().then(()=>u())}else return Promise.all([s(),a(r.delay)])}function KK(e,t,r=0,n=0,o=1,i){let s=[],a=(e.variantChildren.size-1)*n,l=o===1?(c=0)=>c*n:(c=0)=>a-c*n;return Array.from(e.variantChildren).sort(YK).forEach((c,u)=>{c.notify("AnimationStart",t),s.push(d2(c,t,{...i,delay:r+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(s)}function YK(e,t){return e.sortNodePosition(t)}function QM(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(i=>d2(e,i,r));n=Promise.all(o)}else if(typeof t=="string")n=d2(e,t,r);else{let o=typeof t=="function"?mi(e,t,r.custom):t;n=Promise.all(u2(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}var XK=ic.length;function z7(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?z7(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<XK;r++){let n=ic[r],o=e.props[n];(yo(o)||o===!1)&&(t[n]=o)}return t}var QK=[...y0].reverse(),JK=y0.length;function eY(e){return t=>Promise.all(t.map(({animation:r,options:n})=>QM(e,r,n)))}function eE(e){let t=eY(e),r=JM(),n=!0,o=l=>(c,u)=>{var d;let f=mi(e,u,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){let{transition:p,transitionEnd:m,...h}=f;c={...c,...h,...m}}return c};function i(l){t=l(e)}function s(l){let{props:c}=e,u=z7(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let g=0;g<JK;g++){let v=QK[g],C=r[v],x=c[v]!==void 0?c[v]:u[v],w=yo(x),y=v===l?C.isActive:null;y===!1&&(m=g);let b=x===u[v]&&x!==c[v]&&w;if(b&&n&&e.manuallyAnimateOnMount&&(b=!1),C.protectedKeys={...p},!C.isActive&&y===null||!x&&!C.prevProp||pi(x)||typeof x=="boolean")continue;let R=tY(C.prevProp,x),L=R||v===l&&C.isActive&&!b&&w||g>m&&w,E=!1,S=Array.isArray(x)?x:[x],A=S.reduce(o(v),{});y===!1&&(A={});let{prevResolvedValues:k={}}=C,I={...k,...A},N=H=>{L=!0,f.has(H)&&(E=!0,f.delete(H)),C.needsAnimating[H]=!0;let P=e.getValue(H);P&&(P.liveStyle=!1)};for(let H in I){let P=A[H],O=k[H];if(p.hasOwnProperty(H))continue;let M=!1;ac(P)&&ac(O)?M=!v7(P,O):M=P!==O,M?P!=null?N(H):f.add(H):P!==void 0&&f.has(H)?N(H):C.protectedKeys[H]=!0}C.prevProp=x,C.prevResolvedValues=A,C.isActive&&(p={...p,...A}),n&&e.blockInitialAnimation&&(L=!1),L&&(!(b&&R)||E)&&d.push(...S.map(H=>({animation:H,options:{type:v}})))}if(f.size){let g={};f.forEach(v=>{let C=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=C??null}),d.push({animation:g})}let h=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(h=!1),n=!1,h?t(d):Promise.resolve()}function a(l,c){var u;if(r[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(f=>{var p;return(p=f.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),r[l].isActive=c;let d=s(l);for(let f in r)r[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:i,getState:()=>r,reset:()=>{r=JM(),n=!0}}}function tY(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!v7(t,e):!1}function Ts(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function JM(){return{animate:Ts(!0),whileInView:Ts(),whileHover:Ts(),whileTap:Ts(),whileDrag:Ts(),whileFocus:Ts(),exit:Ts()}}var Rt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var f2=class extends Rt{constructor(t){super(t),t.animationState||(t.animationState=eE(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();pi(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}};var rY=0,p2=class extends Rt{constructor(){super(...arguments),this.id=rY++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;let o=this.node.animationState.setActive("exit",!t);r&&!t&&o.then(()=>r(this.id))}mount(){let{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}};var tE={animation:{Feature:f2},exit:{Feature:p2}};function Mo(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function Eo(e){return{point:{x:e.pageX,y:e.pageY}}}var rE=e=>t=>ys(t)&&e(t,Eo(t));function Ri(e,t,r,n){return Mo(e,t,rE(r),n)}var nE=(e,t)=>Math.abs(e-t);function oE(e,t){let r=nE(e.x,t.x),n=nE(e.y,t.y);return Math.sqrt(r**2+n**2)}var ll=class{constructor(t,r,{transformPagePoint:n,contextWindow:o,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let d=j7(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,p=oE(d.offset,{x:0,y:0})>=3;if(!f&&!p)return;let{point:m}=d,{timestamp:h}=rt;this.history.push({...m,timestamp:h});let{onStart:g,onMove:v}=this.handlers;f||(g&&g(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Z7(f,this.transformPagePoint),fe.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();let{onEnd:p,onSessionEnd:m,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let g=j7(d.type==="pointercancel"?this.lastMoveEventInfo:Z7(f,this.transformPagePoint),this.history);this.startEvent&&p&&p(d,g),m&&m(d,g)},!ys(t))return;this.dragSnapToOrigin=i,this.handlers=r,this.transformPagePoint=n,this.contextWindow=o||window;let s=Eo(t),a=Z7(s,this.transformPagePoint),{point:l}=a,{timestamp:c}=rt;this.history=[{...l,timestamp:c}];let{onSessionStart:u}=r;u&&u(t,j7(a,this.history)),this.removeListeners=Xn(Ri(this.contextWindow,"pointermove",this.handlePointerMove),Ri(this.contextWindow,"pointerup",this.handlePointerUp),Ri(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Nr(this.updatePoint)}};function Z7(e,t){return t?{point:t(e.point)}:e}function iE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function j7({point:e},t){return{point:e,delta:iE(e,sE(t)),offset:iE(e,nY(t)),velocity:oY(t,.1)}}function nY(e){return e[0]}function sE(e){return e[e.length-1]}function oY(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=sE(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>tt(t)));)r--;if(!n)return{x:0,y:0};let i=Nt(o.timestamp-n.timestamp);if(i===0)return{x:0,y:0};let s={x:(o.x-n.x)/i,y:(o.y-n.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}var uE=1e-4,iY=1-uE,sY=1+uE,dE=.01,aY=0-dE,lY=0+dE;function Vt(e){return e.max-e.min}function fE(e,t,r){return Math.abs(e-t)<=r}function aE(e,t,r,n=.5){e.origin=n,e.originPoint=ye(t.min,t.max,e.origin),e.scale=Vt(r)/Vt(t),e.translate=ye(r.min,r.max,e.origin)-e.originPoint,(e.scale>=iY&&e.scale<=sY||isNaN(e.scale))&&(e.scale=1),(e.translate>=aY&&e.translate<=lY||isNaN(e.translate))&&(e.translate=0)}function cl(e,t,r,n){aE(e.x,t.x,r.x,n?n.originX:void 0),aE(e.y,t.y,r.y,n?n.originY:void 0)}function lE(e,t,r){e.min=r.min+t.min,e.max=e.min+Vt(t)}function pE(e,t,r){lE(e.x,t.x,r.x),lE(e.y,t.y,r.y)}function cE(e,t,r){e.min=t.min-r.min,e.max=e.min+Vt(t)}function ul(e,t,r){cE(e.x,t.x,r.x),cE(e.y,t.y,r.y)}function CE(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?ye(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?ye(r,e,n.max):Math.min(e,r)),e}function mE(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function xE(e,{top:t,left:r,bottom:n,right:o}){return{x:mE(e.x,r,o),y:mE(e.y,t,n)}}function hE(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function wE(e,t){return{x:hE(e.x,t.x),y:hE(e.y,t.y)}}function bE(e,t){let r=.5,n=Vt(e),o=Vt(t);return o>n?r=Dr(t.min,t.max-n,e.min):n>o&&(r=Dr(e.min,e.max-o,t.min)),Ft(0,1,r)}function yE(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var m2=.35;function SE(e=m2){return e===!1?e=0:e===!0&&(e=m2),{x:gE(e,"left","right"),y:gE(e,"top","bottom")}}function gE(e,t,r){return{min:vE(e,t),max:vE(e,r)}}function vE(e,t){return typeof e=="number"?e:e[t]||0}var RE=()=>({translate:0,scale:1,origin:0,originPoint:0}),ks=()=>({x:RE(),y:RE()}),LE=()=>({min:0,max:0}),_e=()=>({x:LE(),y:LE()});function yr(e){return[e("x"),e("y")]}function h2({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function ME({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function EE(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function U7(e){return e===void 0||e===1}function g2({scale:e,scaleX:t,scaleY:r}){return!U7(e)||!U7(t)||!U7(r)}function To(e){return g2(e)||G7(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function G7(e){return TE(e.x)||TE(e.y)}function TE(e){return e&&e!=="0%"}function wc(e,t,r){let n=e-r,o=t*n;return r+o}function kE(e,t,r,n,o){return o!==void 0&&(e=wc(e,o,n)),wc(e,r,n)+t}function W7(e,t=0,r=1,n,o){e.min=kE(e.min,t,r,n,o),e.max=kE(e.max,t,r,n,o)}function q7(e,{x:t,y:r}){W7(e.x,t.translate,t.scale,t.originPoint),W7(e.y,r.translate,r.scale,r.originPoint)}var AE=.999999999999,IE=1.0000000000001;function OE(e,t,r,n=!1){let o=r.length;if(!o)return;t.x=t.y=1;let i,s;for(let a=0;a<o;a++){i=r[a],s=i.projectionDelta;let{visualElement:l}=i.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&i.options.layoutScroll&&i.scroll&&i!==i.root&&As(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,q7(e,s)),n&&To(i.latestValues)&&As(e,i.latestValues))}t.x<IE&&t.x>AE&&(t.x=1),t.y<IE&&t.y>AE&&(t.y=1)}function Li(e,t){e.min=e.min+t,e.max=e.max+t}function PE(e,t,r,n,o=.5){let i=ye(e.min,e.max,o);W7(e,t,r,i,n)}function As(e,t){PE(e.x,t.x,t.scaleX,t.scale,t.originX),PE(e.y,t.y,t.scaleY,t.scale,t.originY)}function K7(e,t){return h2(EE(e.getBoundingClientRect(),t))}function DE(e,t,r){let n=K7(e,r),{scroll:o}=t;return o&&(Li(n.x,o.offset.x),Li(n.y,o.offset.y)),n}var v2=({current:e})=>e?e.ownerDocument.defaultView:null;var cY=new WeakMap,x2=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_e(),this.visualElement=t}start(t,{snapToCursor:r=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let o=u=>{let{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(Eo(u).point)},i=(u,d)=>{let{drag:f,dragPropagation:p,onDragStart:m}=this.getProps();if(f&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=L7(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),yr(g=>{let v=this.getAxisMotionValue(g).get()||0;if(ar.test(v)){let{projection:C}=this.visualElement;if(C&&C.layout){let x=C.layout.layoutBox[g];x&&(v=Vt(x)*(parseFloat(v)/100))}}this.originPoint[g]=v}),m&&fe.postRender(()=>m(u,d)),mc(this.visualElement,"transform");let{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(u,d)=>{let{dragPropagation:f,dragDirectionLock:p,onDirectionLock:m,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;let{offset:g}=d;if(p&&this.currentDirection===null){this.currentDirection=uY(g),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",d.point,g),this.updateAxis("y",d.point,g),this.visualElement.render(),h&&h(u,d)},a=(u,d)=>this.stop(u,d),l=()=>yr(u=>{var d;return this.getAnimationState(u)==="paused"&&((d=this.getAxisMotionValue(u).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ll(t,{onSessionStart:o,onStart:i,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:v2(this.visualElement)})}stop(t,r){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:o}=r;this.startAnimation(o);let{onDragEnd:i}=this.getProps();i&&fe.postRender(()=>i(t,r))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!C2(t,o,this.currentDirection))return;let i=this.getAxisMotionValue(t),s=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(s=CE(s,this.constraints[t],this.elastic[t])),i.set(s)}resolveConstraints(){var t;let{dragConstraints:r,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;r&&So(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):r&&o?this.constraints=xE(o.layoutBox,r):this.constraints=!1,this.elastic=SE(n),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&yr(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=yE(o.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!So(t))return!1;let n=t.current;bn(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:o}=this.visualElement;if(!o||!o.layout)return!1;let i=DE(n,o.root,this.visualElement.getTransformPagePoint()),s=wE(o.layout.layoutBox,i);if(r){let a=r(ME(s));this.hasMutatedConstraints=!!a,a&&(s=h2(a))}return s}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:i,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=yr(u=>{if(!C2(u,r,this.currentDirection))return;let d=l&&l[u]||{};s&&(d={min:0,max:0});let f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return mc(this.visualElement,t),n.start(al(t,n,0,r,this.visualElement,!1))}stopAnimation(){yr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){yr(t=>{var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.pause()})}getAnimationState(t){var r;return(r=this.getAxisMotionValue(t).animation)===null||r===void 0?void 0:r.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){yr(r=>{let{drag:n}=this.getProps();if(!C2(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,i=this.getAxisMotionValue(r);if(o&&o.layout){let{min:s,max:a}=o.layout.layoutBox[r];i.set(t[r]-ye(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!So(r)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};yr(s=>{let a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){let l=a.get();o[s]=bE({min:l,max:l},this.constraints[s])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),yr(s=>{if(!C2(s,t,null))return;let a=this.getAxisMotionValue(s),{min:l,max:c}=this.constraints[s];a.set(ye(l,c,o[s]))})}addListeners(){if(!this.visualElement.current)return;cY.set(this.visualElement,this);let t=this.visualElement.current,r=Ri(t,"pointerdown",l=>{let{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),n=()=>{let{dragConstraints:l}=this.getProps();So(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,i=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),fe.read(n);let s=Mo(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(yr(u=>{let d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{s(),r(),i(),a&&a()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:i=!1,dragElastic:s=m2,dragMomentum:a=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:i,dragElastic:s,dragMomentum:a}}};function C2(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function uY(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var w2=class extends Rt{constructor(t){super(t),this.removeGroupControls=De,this.removeListeners=De,this.controls=new x2(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||De}unmount(){this.removeGroupControls(),this.removeListeners()}};var NE=e=>(t,r)=>{e&&fe.postRender(()=>e(t,r))},b2=class extends Rt{constructor(){super(...arguments),this.removePointerDownListener=De}onPointerDown(t){this.session=new ll(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:v2(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:NE(t),onStart:NE(r),onMove:n,onEnd:(i,s)=>{delete this.session,o&&fe.postRender(()=>o(i,s))}}}mount(){this.removePointerDownListener=Ri(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};import{jsx as dY}from"react/jsx-runtime";import{useContext as HE,Component as fY}from"react";var dl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function FE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var fl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(X.test(e))e=parseFloat(e);else return e;let r=FE(e,t.target.x),n=FE(e,t.target.y);return`${r}% ${n}%`}};var VE={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=lr.parse(e);if(o.length>5)return n;let i=lr.createTransformer(e),s=typeof o[0]!="number"?1:0,a=r.x.scale*t.x,l=r.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;let c=ye(a,l,.5);return typeof o[2+s]=="number"&&(o[2+s]/=c),typeof o[3+s]=="number"&&(o[3+s]/=c),i(o)}};var Y7=class extends fY{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:i}=t;WL(pY),i&&(r.group&&r.group.add(i),n&&n.register&&o&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),dl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:i}=this.props,s=n.projection;return s&&(s.isPresent=i,o||t.layoutDependency!==r||r===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?s.promote():s.relegate()||fe.postRender(()=>{let a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Fa.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function y2(e){let[t,r]=pL(),n=HE(g0);return dY(Y7,{...e,layoutGroup:n,switchLayoutGroup:HE(L0),isPresent:t,safeToRemove:r})}var pY={borderRadius:{...fl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:fl,borderTopRightRadius:fl,borderBottomLeftRadius:fl,borderBottomRightRadius:fl,boxShadow:VE};function $E(e,t,r){let n=Ve(e)?e:Lo(e);return n.start(al("",n,t,r)),n.animation}function _E(e){return e instanceof SVGElement&&e.tagName!=="svg"}var BE=(e,t)=>e.depth-t.depth;var S2=class{constructor(){this.children=[],this.isDirty=!1}add(t){Ja(this.children,t),this.isDirty=!0}remove(t){el(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(BE),this.isDirty=!1,this.children.forEach(t)}};function zE(e,t){let r=Yt.now(),n=({timestamp:o})=>{let i=o-r;i>=t&&(Nr(n),e(i-t))};return fe.read(n,!0),()=>Nr(n)}var GE=["TopLeft","TopRight","BottomLeft","BottomRight"],mY=GE.length,ZE=e=>typeof e=="string"?parseFloat(e):e,jE=e=>typeof e=="number"||X.test(e);function WE(e,t,r,n,o,i){o?(e.opacity=ye(0,r.opacity!==void 0?r.opacity:1,hY(n)),e.opacityExit=ye(t.opacity!==void 0?t.opacity:1,0,gY(n))):i&&(e.opacity=ye(t.opacity!==void 0?t.opacity:1,r.opacity!==void 0?r.opacity:1,n));for(let s=0;s<mY;s++){let a=`border${GE[s]}Radius`,l=UE(t,a),c=UE(r,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||jE(l)===jE(c)?(e[a]=Math.max(ye(ZE(l),ZE(c),n),0),(ar.test(c)||ar.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||r.rotate)&&(e.rotate=ye(t.rotate||0,r.rotate||0,n))}function UE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var hY=qE(0,.5,K0),gY=qE(.5,.95,De);function qE(e,t,r){return n=>n<e?0:n>t?1:r(Dr(e,t,n))}function KE(e,t){e.min=t.min,e.max=t.max}function Vr(e,t){KE(e.x,t.x),KE(e.y,t.y)}function X7(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function YE(e,t,r,n,o){return e-=t,e=wc(e,1/r,n),o!==void 0&&(e=wc(e,1/o,n)),e}function vY(e,t=0,r=1,n=.5,o,i=e,s=e){if(ar.test(t)&&(t=parseFloat(t),t=ye(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=ye(i.min,i.max,n);e===i&&(a-=t),e.min=YE(e.min,t,r,a,o),e.max=YE(e.max,t,r,a,o)}function XE(e,t,[r,n,o],i,s){vY(e,t[r],t[n],t[o],t.scale,i,s)}var CY=["x","scaleX","originX"],xY=["y","scaleY","originY"];function Q7(e,t,r,n){XE(e.x,t,CY,r?r.x:void 0,n?n.x:void 0),XE(e.y,t,xY,r?r.y:void 0,n?n.y:void 0)}function QE(e){return e.translate===0&&e.scale===1}function J7(e){return QE(e.x)&&QE(e.y)}function JE(e,t){return e.min===t.min&&e.max===t.max}function tT(e,t){return JE(e.x,t.x)&&JE(e.y,t.y)}function eT(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function e4(e,t){return eT(e.x,t.x)&&eT(e.y,t.y)}function t4(e){return Vt(e.x)/Vt(e.y)}function r4(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var R2=class{constructor(){this.members=[]}add(t){Ja(this.members,t),t.scheduleRender()}remove(t){if(el(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){let i=this.members[o];if(i.isPresent!==!1){n=i;break}}return n?(this.promote(n),!0):!1}promote(t,r){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(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);let{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:n}=t;r.onExitComplete&&r.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 rT(e,t,r){let n="",o=e.x.translate/t.x,i=e.y.translate/t.y,s=r?.z||0;if((o||i||s)&&(n=`translate3d(${o}px, ${i}px, ${s}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:m}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}let a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(n+=`scale(${a}, ${l})`),n||"none"}var Is={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},bc=typeof window<"u"&&window.MotionDebug!==void 0,n4=["","X","Y","Z"],wY={visibility:"hidden"},nT=1e3,bY=0;function o4(e,t,r,n){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function dT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=z0(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",fe,!(o||i))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&dT(n)}function L2({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(s={},a=t?.()){this.id=bY++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,bc&&(Is.totalNodes=Is.resolvedTargetDeltas=Is.recalculatedProjection=0),this.nodes.forEach(RY),this.nodes.forEach(kY),this.nodes.forEach(AY),this.nodes.forEach(LY),bc&&window.MotionDebug.record(Is)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new S2)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Ci),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){let l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=_E(s),this.instance=s;let{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let d,f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=zE(f,250),dl.hasAnimatedSinceResize&&(dl.hasAnimatedSinceResize=!1,this.nodes.forEach(iT))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:p,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||NY,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),C=!this.targetLayout||!e4(this.targetLayout,m)||p,x=!f&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||f&&(C||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,x);let w={...hi(h,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w)}else f||iT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Nr(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(IY),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){let d=this.path[u];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;let c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(oT);return}this.isUpdating||this.nodes.forEach(EY),this.isUpdating=!1,this.nodes.forEach(TY),this.nodes.forEach(yY),this.nodes.forEach(SY),this.clearAllSnapshots();let a=Yt.now();rt.delta=Ft(0,1e3/60,a-rt.timestamp),rt.timestamp=a,rt.isProcessing=!0,w0.update.process(rt),w0.preRender.process(rt),w0.render.process(rt),rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Fa.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(MY),this.sharedNodes.forEach(PY)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,fe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){fe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_e(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a){let l=n(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!J7(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;s&&(a||To(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let a=this.measurePageBox(),l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),FY(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var s;let{visualElement:a}=this.options;if(!a)return _e();let l=a.measureViewportBox();if(!(((s=this.scroll)===null||s===void 0?void 0:s.wasRoot)||this.path.some(VY))){let{scroll:u}=this.root;u&&(Li(l.x,u.offset.x),Li(l.y,u.offset.y))}return l}removeElementScroll(s){var a;let l=_e();if(Vr(l,s),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){let u=this.path[c],{scroll:d,options:f}=u;u!==this.root&&d&&f.layoutScroll&&(d.wasRoot&&Vr(l,s),Li(l.x,d.offset.x),Li(l.y,d.offset.y))}return l}applyTransform(s,a=!1){let l=_e();Vr(l,s);for(let c=0;c<this.path.length;c++){let u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&As(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),To(u.latestValues)&&As(l,u.latestValues)}return To(this.latestValues)&&As(l,this.latestValues),l}removeTransform(s){let a=_e();Vr(a,s);for(let l=0;l<this.path.length;l++){let c=this.path[l];if(!c.instance||!To(c.latestValues))continue;g2(c.latestValues)&&c.updateSnapshot();let u=_e(),d=c.measurePageBox();Vr(u,d),Q7(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return To(this.latestValues)&&Q7(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;let l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);let c=!!this.resumingFrom||this!==l;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=rt.timestamp,!this.targetDelta&&!this.relativeTarget){let p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_e(),this.relativeTargetOrigin=_e(),ul(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),Vr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=_e(),this.targetWithTransforms=_e()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),pE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Vr(this.target,this.layout.layoutBox),q7(this.target,this.targetDelta)):Vr(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=_e(),this.relativeTargetOrigin=_e(),ul(this.relativeTargetOrigin,this.target,p.target),Vr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}bc&&Is.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||g2(this.parent.latestValues)||G7(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;let a=this.getLead(),l=!!this.resumingFrom||this!==a,c=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===rt.timestamp&&(c=!1),c)return;let{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;Vr(this.layoutCorrected,this.layout.layoutBox);let f=this.treeScale.x,p=this.treeScale.y;OE(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=_e());let{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(X7(this.prevProjectionDelta.x,this.projectionDelta.x),X7(this.prevProjectionDelta.y,this.projectionDelta.y)),cl(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==p||!r4(this.projectionDelta.x,this.prevProjectionDelta.x)||!r4(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),bc&&Is.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),s){let l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ks(),this.projectionDelta=ks(),this.projectionDeltaWithTransform=ks()}setAnimationOrigin(s,a=!1){let l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=ks();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;let f=_e(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=p!==m,g=this.getStack(),v=!g||g.members.length<=1,C=!!(h&&!v&&this.options.crossfade===!0&&!this.path.some(DY));this.animationProgress=0;let x;this.mixTargetDelta=w=>{let y=w/1e3;sT(d.x,s.x,y),sT(d.y,s.y,y),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ul(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),OY(this.relativeTarget,this.relativeTargetOrigin,f,y),x&&tT(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=_e()),Vr(x,this.relativeTarget)),h&&(this.animationValues=u,WE(u,c,this.latestValues,y,C,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=y},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Nr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=fe.update(()=>{dl.hasAnimatedSinceResize=!0,this.currentAnimation=$E(0,nT,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.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);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(nT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:a,target:l,layout:c,latestValues:u}=s;if(!(!a||!l||!c)){if(this!==s&&this.layout&&c&&fT(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||_e();let d=Vt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;let f=Vt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Vr(a,l),As(a,u),cl(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new R2),this.sharedNodes.get(s).add(a);let c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){var s;let{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;let{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){let c=this.getStack();c&&c.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let a=!1,{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;let c={};l.z&&o4("z",s,c,this.animationValues);for(let u=0;u<n4.length;u++)o4(`rotate${n4[u]}`,s,c,this.animationValues),o4(`skew${n4[u]}`,s,c,this.animationValues);s.render();for(let u in c)s.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return wY;let c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=$a(s?.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;let d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){let h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=$a(s?.pointerEvents)||""),this.hasProjected&&!To(this.latestValues)&&(h.transform=u?u({},""):"none",this.hasProjected=!1),h}let f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),c.transform=rT(this.projectionDeltaWithTransform,this.treeScale,f),u&&(c.transform=u(f,c.transform));let{x:p,y:m}=this.projectionDelta;c.transformOrigin=`${p.origin*100}% ${m.origin*100}% 0`,d.animationValues?c.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:c.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(let h in Ga){if(f[h]===void 0)continue;let{correct:g,applyTo:v}=Ga[h],C=c.transform==="none"?f[h]:g(f[h],d);if(v){let x=v.length;for(let w=0;w<x;w++)c[v[w]]=C}else c[h]=C}return this.options.layoutId&&(c.pointerEvents=d===this?$a(s?.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(oT),this.root.sharedNodes.clear()}}}function yY(e){e.updateLayout()}function SY(e){var t;let r=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&r&&e.hasListeners("didUpdate")){let{layoutBox:n,measuredBox:o}=e.layout,{animationType:i}=e.options,s=r.source!==e.layout.source;i==="size"?yr(d=>{let f=s?r.measuredBox[d]:r.layoutBox[d],p=Vt(f);f.min=n[d].min,f.max=f.min+p}):fT(i,r.layoutBox,n)&&yr(d=>{let f=s?r.measuredBox[d]:r.layoutBox[d],p=Vt(n[d]);f.max=f.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+p)});let a=ks();cl(a,n,r.layoutBox);let l=ks();s?cl(l,e.applyTransform(o,!0),r.measuredBox):cl(l,n,r.layoutBox);let c=!J7(a),u=!1;if(!e.resumeFrom){let d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){let{snapshot:f,layout:p}=d;if(f&&p){let m=_e();ul(m,r.layoutBox,f.layoutBox);let h=_e();ul(h,n,p.layoutBox),e4(m,h)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:n,snapshot:r,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){let{onExitComplete:n}=e.options;n&&n()}e.options.transition=void 0}function RY(e){bc&&Is.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function LY(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function MY(e){e.clearSnapshot()}function oT(e){e.clearMeasurements()}function EY(e){e.isLayoutDirty=!1}function TY(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function iT(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function kY(e){e.resolveTargetDelta()}function AY(e){e.calcProjection()}function IY(e){e.resetSkewAndRotation()}function PY(e){e.removeLeadSnapshot()}function sT(e,t,r){e.translate=ye(t.translate,0,r),e.scale=ye(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function aT(e,t,r,n){e.min=ye(t.min,r.min,n),e.max=ye(t.max,r.max,n)}function OY(e,t,r,n){aT(e.x,t.x,r.x,n),aT(e.y,t.y,r.y,n)}function DY(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var NY={duration:.45,ease:[.4,0,.1,1]},lT=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),cT=lT("applewebkit/")&&!lT("chrome/")?Math.round:De;function uT(e){e.min=cT(e.min),e.max=cT(e.max)}function FY(e){uT(e.x),uT(e.y)}function fT(e,t,r){return e==="position"||e==="preserve-aspect"&&!fE(t4(t),t4(r),.2)}function VY(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}var pT=L2({attachResizeListener:(e,t)=>Mo(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var i4={current:void 0},M2=L2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!i4.current){let e=new pT({});e.mount(window),e.setOptions({layoutScroll:!0}),i4.current=e}return i4.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var mT={pan:{Feature:b2},drag:{Feature:w2,ProjectionNode:M2,MeasureLayout:y2}};function hT(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,i=n[o];i&&fe.postRender(()=>i(t,Eo(t)))}var E2=class extends Rt{mount(){let{current:t}=this.node;t&&(this.unmount=y7(t,r=>(hT(this.node,r,"Start"),n=>hT(this.node,n,"End"))))}unmount(){}};var T2=class extends Rt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xn(Mo(this.node.current,"focus",()=>this.onFocus()),Mo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function gT(e,t,r){let{props:n}=e;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),i=n[o];i&&fe.postRender(()=>i(t,Eo(t)))}var k2=class extends Rt{mount(){let{current:t}=this.node;t&&(this.unmount=R7(t,r=>(gT(this.node,r,"Start"),(n,{success:o})=>gT(this.node,n,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var a4=new WeakMap,s4=new WeakMap,HY=e=>{let t=a4.get(e.target);t&&t(e)},$Y=e=>{e.forEach(HY)};function _Y({root:e,...t}){let r=e||document;s4.has(r)||s4.set(r,{});let n=s4.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver($Y,{root:e,...t})),n[o]}function vT(e,t,r){let n=_Y(t);return a4.set(e,r),n.observe(e),()=>{a4.delete(e),n.unobserve(e)}}var BY={some:0,all:1},A2=class extends Rt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:i}=t,s={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:BY[o]},a=l=>{let{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return vT(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(zY(t,r))&&this.startObserver()}unmount(){}};function zY({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var CT={inView:{Feature:A2},tap:{Feature:k2},focus:{Feature:T2},hover:{Feature:E2}};var xT={layout:{ProjectionNode:M2,MeasureLayout:y2}};import{Fragment as UY}from"react";var yc={current:null},I2={current:!1};function wT(){if(I2.current=!0,!!Oa)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>yc.current=e.matches;e.addListener(t),t()}else yc.current=!1}var ZY=[...O7,lt,lr],bT=e=>ZY.find(t2(e));var l4=new WeakMap;function yT(e,t,r){for(let n in t){let o=t[n],i=r[n];if(Ve(o))e.addValue(n,o);else if(Ve(i))e.addValue(n,Lo(o,{owner:e}));else if(i!==o)if(e.hasValue(n)){let s=e.getValue(n);s.liveStyle===!0?s.jump(o):s.hasAnimated||s.set(o)}else{let s=e.getStaticValue(n);e.addValue(n,Lo(s!==void 0?s:o,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var ST=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],P2=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,blockInitialAnimation:i,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=yi,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let p=Yt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,fe.render(this.render,!1,!0))};let{latestValues:l,renderState:c,onUpdate:u}=s;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!i,this.isControllingVariants=bs(r),this.isVariantNode=S0(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:d,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(let p in f){let m=f[p];l[p]!==void 0&&Ve(m)&&m.set(l[p],!1)}}mount(t){this.current=t,l4.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((r,n)=>this.bindToMotionValue(n,r)),I2.current||wT(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:yc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){l4.delete(this.current),this.projection&&this.projection.unmount(),Nr(this.notifyUpdate),Nr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let n=br.has(t),o=r.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&fe.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=r.on("renderRequest",this.scheduleRender),s;window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),i(),s&&s(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in bo){let r=bo[t];if(!r)continue;let{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(this)),this.features[t]){let i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_e()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<ST.length;n++){let o=ST[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let i="on"+o,s=t[i];s&&(this.propEventSubscriptions[o]=this.on(o,s))}this.prevMotionValues=yT(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let n=this.values.get(t);r!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Lo(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){var n;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(e2(o)||X0(o))?o=parseFloat(o):!bT(o)&&lr.test(r)&&(o=J0(t,r)),this.setBaseTarget(t,Ve(o)?o.get():o)),Ve(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;let{initial:n}=this.props,o;if(typeof n=="string"||typeof n=="object"){let s=Ha(this.props,n,(r=this.presenceContext)===null||r===void 0?void 0:r.custom);s&&(o=s[t])}if(n&&o!==void 0)return o;let i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ve(i)?i:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Ci),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}};var pl=class extends P2{constructor(){super(...arguments),this.KeyframeResolver=ol}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Ve(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function jY(e){return window.getComputedStyle(e)}var O2=class extends pl{constructor(){super(...arguments),this.type="html",this.renderInstance=A0}readValueFromInstance(t,r){if(br.has(r)){let n=nl(r);return n&&n.default||0}else{let n=jY(t),o=(E0(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return K7(t,r)}build(t,r,n){za(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return Wa(t,r,n)}};var D2=class extends pl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=_e}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(br.has(r)){let n=nl(r);return n&&n.default||0}return r=I0.has(r)?r:Na(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return D0(t,r,n)}build(t,r,n){Za(t,r,this.isSVGTag,n.transformTemplate)}renderInstance(t,r,n,o){P0(t,r,n,o)}mount(t){this.isSVGTag=Ua(t.tagName),super.mount(t)}};var RT=(e,t)=>Va(e)?new D2(t):new O2(t,{allowProjection:e!==UY});var LT=eM({...tE,...CT,...mT,...xT},RT);var Sc=RL(LT);import{useMemo as QY,useState as JY}from"react";import{useMemo as OT}from"react";import{useMemo as MT}from"react";var GY=()=>{let{taskIdToTypeMapping:e}=ue(),t=MT(()=>({page:1,pageSize:50}),[]),{activities:r}=ui(t);return MT(()=>r?.some(o=>{let i=Object.keys(e||{}).find(s=>e?.[s]==="uploadReceipt");return o.task_rule_id===Number(i)}),[r,e])},ET=GY;import{useMemo as TT}from"react";var kT=()=>{let{taskIdToTypeMapping:e}=ue(),t=TT(()=>({page:1,pageSize:50}),[]),{activities:r}=ui(t);return TT(()=>r?.some(o=>{let i=Object.keys(e||{}).find(s=>e?.[s]==="firstPurchase");return o.task_rule_id===Number(i)}),[r,e])};import{useMemo as IT}from"react";import{useCallback as WY,useEffect as qY,useRef as KY,useState as YY}from"react";function XY(e){let t=KY(!1),[r,n]=YY(),{locale:o}=Se(),i=WY(async()=>{if(e&&!t.current){t.current=!0;try{let s=await m1({method:"GET",url:"/api/multipass/account/subscriptions",body:{email:e},action:"login",locale:o,headers:{},type:""});s&&n(s)}catch(s){console.error(s)}finally{t.current=!1}}},[e,o,t]);return qY(()=>{i()},[i]),{subscriptionData:r}}var AT=XY;var PT=()=>{let{profile:e}=ue(),{brand:t}=Se(),r=IT(()=>({page:1,pageSize:50}),[]),{activities:n}=ui(r),{subscriptionData:o}=AT(e?.email);return IT(()=>o?.preference?o.preference.some(a=>a.brand===t&&a.subscribe)?!0:n?.some(a=>a.task_sub_type===5):!1,[o,n])};var DT=({copy:e,subscribe:t,uploadReceipt:r,activate:n,gaParameters:o})=>{let{openSignUpPopup:i,gtm:s,profile:a}=ue(),l=PT(),c=kT(),u=ET(),{appName:d}=Se(),f=OT(()=>(a?.first_name||a?.last_name)&&a?.phone_number&&a?.dob,[a]);return OT(()=>{let p=({buttonName:m,id:h,callback:g})=>{rn({event:"ga4Event",event_name:"lp_button",member_active_status:a?.activated?"active":"not active",event_parameters:{page_group:s.pageGroup,position:o?.position||e.title,button_name:m,info:h}}),g()};return{actions:{activate:{finished:a?.activated,notLogin:{buttonLabel:e?.joinNow,handleClick:()=>p({buttonName:e?.joinNow,callback:i,id:"activate"})},notFinished:{buttonLabel:e?.activate,handleClick:()=>p({buttonName:e?.activate,callback:()=>n.openAuthCodePopup(),id:"activate"})},completed:{buttonLabel:e?.completed}},subscribe:{finished:l,notLogin:{buttonLabel:e?.joinNow,handleClick:()=>p({buttonName:e?.joinNow,callback:i,id:"subscribe"})},notFinished:{buttonLabel:e?.subscribe,handleClick:()=>p({buttonName:e?.subscribe,callback:()=>t.openSubscribePopup(),id:"subscribe"})},completed:{buttonLabel:e?.completed}},completeProfile:{finished:f,notLogin:{buttonLabel:e?.joinNow,handleClick:()=>p({buttonName:e?.joinNow,callback:i,id:"completeProfile"})},notFinished:{buttonLabel:e?.completeProfile,link:`/account/profile?app=${d}`,handleClick:()=>p({buttonName:e?.completeProfile,callback:()=>{},id:"completeProfile"})},completed:{buttonLabel:e?.completed}},firstPurchase:{finished:c,notLogin:{buttonLabel:e?.makeFirstPurchase,handleClick:()=>p({buttonName:e?.makeFirstPurchase,callback:i,id:"firstPurchase"})},notFinished:{buttonLabel:e?.makeFirstPurchase,link:e?.goShopLink,handleClick:()=>p({buttonName:e?.makeFirstPurchase,callback:()=>{},id:"firstPurchase"})},completed:{buttonLabel:e?.completed}},uploadReceipt:{finished:u,notLogin:{buttonLabel:e?.joinNow,handleClick:()=>p({buttonName:e?.joinNow,callback:i,id:"uploadReceipt"})},notFinished:{buttonLabel:e?.uploadReceipt,handleClick:()=>p({buttonName:e?.uploadReceipt,callback:()=>r.openUploadReceiptPopup(),id:"uploadReceipt"})},completed:{buttonLabel:e?.completed}},shop:{finished:!1,notLogin:{buttonLabel:e?.joinNow,handleClick:()=>p({buttonName:e?.joinNow,callback:i,id:"shop"})},notFinished:{buttonLabel:e?.shopNow,link:e?.goShopLink,handleClick:()=>p({buttonName:e?.shopNow,callback:()=>{},id:"shop"})},completed:{buttonLabel:e?.completed}}}}},[a?.activated,e?.joinNow,e?.activate,e?.completed,e?.subscribe,e?.completeProfile,e?.makeFirstPurchase,e?.uploadReceipt,e?.shopNow,e.title,e?.goShopLink,l,f,c,u,o?.position,i])};import{Fragment as tX,jsx as Lt,jsxs as ko}from"react/jsx-runtime";var eX=({copy:e,activate:t,subscribe:r,uploadReceipt:n,classNames:o})=>{let[i,s]=JY(!1),{profile:a}=ue(),l=!!a,{actions:c}=DT({copy:e,activate:t,subscribe:r,uploadReceipt:n}),u=QY(()=>{let d=e.list.map(f=>{if(!c[f.id])return;let{finished:p,notLogin:m,notFinished:h,completed:g}=c[f.id],v="",C,x;return l?p?(v=g.buttonLabel,C=void 0):(v=h.buttonLabel,C=h.handleClick,x=h.link):(v=m.buttonLabel,C=m.handleClick),{...f,buttonLabel:v,handleClick:C,finished:p,link:x}}).filter(Boolean);return l?d.sort((f,p)=>f?.finished&&!p?.finished?1:!f?.finished&&p?.finished?-1:0):d},[c,e.list,l]);return Lt(Pt,{id:"ways-to-get-credits",className:" bg-[#F5F5F7] [&>div]:l:!px-0",children:ko("div",{className:"rounded-[16px] bg-[#1D1D1F] py-[64px] px-[140px] text-white md:px-[16px] l:rounded-none md-l:px-[32px] l-xl:px-[77px]",children:[Lt(je,{as:"h2",size:4,html:e?.title,className:"text-center l:pl-[16px] l:text-left"}),ko("div",{className:"mt-[64px] flex items-center justify-between md:mt-[64px] l:mt-[24px] l:flex-col-reverse l:items-start md-l:mt-[32px]",children:[ko("div",{className:"pl-[16px] l:mt-[40px] desktop:pl-[24px] lg-desktop:pl-[32px]",children:[Lt(je,{size:3,as:"h3",html:e.subtitle,className:o?.subtitle}),ko("div",{className:"mt-[8px] flex items-center",children:[e.creditsIcon?.url&&Lt(be,{className:"size-[48px] mr-[8px] stroke-brand xl:size-[30px] [&_path]:stroke-brand",source:e.creditsIcon.url,alt:e.creditsIcon.alt||"credits"}),Lt(je,{html:e.equalCredits,size:4,as:"h3",className:ne("mt-2 text-white md:text-[24px]",o?.equalCreditsText)})]})]}),Lt(be,{className:"w-full laptop:w-[50%]",source:e.mainImage?.url})]}),ko("div",{className:"relative",children:[ko(Sc.div,{className:ne("relative mt-[64px] grid grid-cols-3 gap-[16px] overflow-hidden md:mt-[16px] md:grid-cols-1 l:gap-[12px] min-md:!h-auto md-l:mt-[32px] md-l:grid-cols-2"),initial:{height:512},animate:{height:i?"auto":512},transition:{duration:.3},onAnimationComplete:()=>{if(!i&&window.screen.width<768){let d=document.getElementById("ways-to-get-credits");d&&d.scrollIntoView({behavior:"smooth",block:"end"})}},children:[u.map(d=>ko("div",{className:"flex min-h-[160px] flex-col justify-between rounded-[16px] bg-white p-[16px] text-[#1D1D1F] desktop:min-h-[192px] desktop:p-[24px] lg-desktop:min-h-[240px] lg-desktop:p-[32px]",children:[ko("div",{children:[Lt(je,{as:"h4",html:d.title,size:2,className:"text-pretty"}),ko("div",{className:"mt-[4px] flex items-center",children:[Lt(be,{className:"size-[24px] xl:size-[18px] [&_path]:size-full",source:"https://cdn.shopify.com/s/files/1/0511/6346/3874/files/20250902-153351.png?v=1756798450"}),Lt(U,{as:"p",html:d.credits,size:2,className:"ml-[4px] mt-[6px] lg-desktop:text-[18px]"})]})]}),d.handleClick&&!(d.id==="uploadReceipt"&&n.isSuccess)&&!(d.id==="activate"&&t.isSuccess)&&!(d.id==="subscribe"&&r.isSuccess)?Lt(Oe,{as:d.link?"a":"button",...d.link&&{href:d.link},...d.handleClick&&{onClick:d.handleClick},variant:"primary",loading:d.id==="activate"&&t.isSendingActivateEmail,size:"lg",className:"mt-[24px] w-fit",children:d.buttonLabel}):Lt(Oe,{variant:"primary",size:"lg",className:"mt-[24px] w-fit",disabled:!0,children:d.buttonLabel})]},d.id)),!i&&Lt("div",{className:"absolute inset-0 min-md:hidden",style:{background:"linear-gradient(180deg, rgba(29, 29, 31, 0) 66.37%, #1D1D1F 100%"}})]}),i?Lt("button",{className:"mx-auto mt-[12px] block w-fit min-md:hidden",onClick:()=>{s(!1)},children:Lt(d7,{className:"size-[40px] rounded-full bg-[#FFFFFF33] p-[8px]"})}):Lt(tX,{children:Lt("div",{className:"absolute bottom-0 flex w-full translate-y-1/2 justify-center min-md:hidden",children:Lt("button",{className:"w-fit",onClick:()=>s(!i),children:Lt(nc,{className:"size-[40px] rounded-full bg-[#FFFFFF33] p-[8px]"})})})})]})]})})};import{useMemo as VT,useState as oX}from"react";import{useEffect as rX,useState as nX}from"react";import{jsx as Rc,jsxs as NT}from"react/jsx-runtime";var FT=({index:e,question:t,answer:r,showDots:n,itemRightIconRender:o,defaultExpended:i=!1})=>{let[s,a]=nX(i);return rX(()=>{e==0&&a(!0),t||a(!0)},[e,t]),NT("div",{className:ne("relative mx-0 border-b-[1px] border-[#e4e5e6] py-[24px] l:py-[16px]"),children:[NT("div",{className:"relative flex items-center",onClick:()=>{a(!s)},role:"button",tabIndex:0,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&l.preventDefault()},children:[Rc(je,{html:t,as:"h3",className:ne(n?'before:absolute before:left-[-15px] before:top-[8px] before:h-[6px] before:w-[6px] before:rounded-[50%] before:bg-[#000] before:content-[""]':"","relative block flex-1 cursor-pointer pr-[10px] text-[18px] font-bold text-[#1D1D1F] l:text-[16px]")}),o?o({expanded:s}):Rc(nc,{className:ne("size-[16px] shrink-0 cursor-pointer stroke-[2.5px] transition-all",s?"rotate-180":"")})]}),Rc(Sc.div,{initial:!1,animate:{height:s?"auto":0},className:"overflow-hidden [&_td]:border [&_td]:border-[#333] [&_td]:px-[8px] [&_td]:py-[4px]",children:r?.toString()?.includes("https://www.youtube.com")?Rc(U,{as:"div",className:ne("mt-[8px]"),"data-ratio":"16:9","data-content":r,html:r?.toString()}):Rc(U,{as:"div",html:r?.toString(),className:ne("mt-[8px] text-[16px] font-bold leading-[1.5] text-[#3D3D3F] l:text-[14px] [&_a]:text-brand [&_a]:underline")})})]},e)};import{jsx as Ao,jsxs as sX}from"react/jsx-runtime";var iX=({copy:e})=>{let{title:t,items:r,subTitle:n=""}=e||{},o=VT(()=>Array.from(new Set(r?.map?.(l=>l.category_name).filter(l=>!!l))),[r]),[i,s]=oX(o[0]?.toString()||""),a=VT(()=>r?o.length?r.filter(l=>l?.category_name===i):r:[],[r,o.length,i]);return sX(Pt,{className:"bg-[#F5F5F7]",id:"faq",children:[t&&Ao(je,{as:"h2",size:"4",html:e?.title}),n&&Ao("div",{className:"mt-[8px] flex flex-row",children:Ao(U,{size:"4",as:"p",html:n,className:"flex-1"})}),Ao(_n,{align:"left",shape:"rounded",className:"mt-[24px]",value:i.toString(),onValueChange:l=>{s(l)},children:Ao(Bn,{children:o.map((l,c)=>Ao(zn,{value:l?.toString()||"",children:l},c))})}),Ao("div",{className:ne("mt-[24px] flex flex-col overflow-auto pt-0"),children:a?.map((l,c)=>Ao(FT,{index:c,defaultExpended:r.length===1,question:l.question,answer:l.answer,showDots:!1},c))}),e.learnMore?.link&&e.learnMore?.label&&Ao("a",{href:e.learnMore?.link,target:"_blank",className:"mt-[64px] block w-full text-center text-[18px] font-bold text-brand hover:underline l:text-[16px]",children:e.learnMore?.label})]})};import{useMemo as hX,useState as gX}from"react";import{useMemo as F2}from"react";import aX from"swr/mutation";var N2=(e={})=>{let{locale:t,appName:r,brand:n}=Se();return Un({url:"/v1/credit/redeem/coupon",initData:{brand:n,country:jn.get(t)||t,app_name:r}},e)};var HT=()=>{let{trigger:e}=N2(),{profile:t}=ue(),{trigger:r}=QR();return aX("redeemAndBuy",async(n,{arg:o})=>{let i=await e({user_id:t?.user_id,rule_id:o.redeemId});if(i&&i?.data?.coupon_code){let s=await r({discountCodes:[i.data.coupon_code],lines:[{merchandiseId:String(o.productVariant.id),quantity:o.quantity||1}]});return s?.url?{success:!0,url:s.url}:{success:!1,error:"Create cart failed"}}else return{success:!1,error:"Redeem failed"}})};import{jsx as Qn,jsxs as Lc}from"react/jsx-runtime";function lX({copy:e,itemData:t,setRules:r,className:n,authCodeActivate:o}){let{creditInfo:i,profile:s,openSignUpPopup:a,gtm:{pageGroup:l}}=ue(),{trigger:c,isMutating:u}=HT(),d=F2(()=>!!s,[s?.activated]),f=F2(()=>d&&s?.activated&&t.alpcData?.consumeCredits>Number(i?.available_credit||0),[d,s?.activated,t.alpcData?.consumeCredits,i?.available_credit]),p=F2(()=>!!(t.alpcData?.remainingInventory<=0&&t.alpcData?.isLimited||!t.productVariant?.availableForSale||f),[t.alpcData?.remainingInventory,t.alpcData?.isLimited,t.productVariant?.availableForSale,f]),m=()=>{if(!d)a();else if(!s?.activated&&!(o.isSendingActivateEmail||o.isSuccess))o.openAuthCodePopup(),o.setOnSuccess(async()=>{let{success:g,url:v,error:C}=await c({productVariant:t?.productVariant,redeemId:t?.config?.redeemId});g?window.open(v,"_blank"):console.error(C)});else{try{c({productVariant:t?.productVariant,redeemId:t?.config?.redeemId})}catch{}rn({event:"ga4Event",event_name:"lp_button",member_active_status:s?.activated?"active":"not active",event_parameters:{page_group:l,position:e.title,button_name:h,info:t?.alpcData?.id?.toString()}})}},h=F2(()=>t.productVariant?.availableForSale?d?e.btnRedeem:e.unlockRewards:e?.soldOut||"Sold Out",[d,t.productVariant?.availableForSale,e.btnRedeem,e.unlockRewards,e?.soldOut]);return Lc("div",{className:ne("flex flex-col items-center rounded-[16px] bg-[#EAEAEC] p-[24px] md:rounded-[12px] md:px-[8px] xl:py-[16px] md-xl:px-[16px]",n),children:[Qn("div",{className:ne("relative mx-auto h-[224px] w-fit l:h-[120px] l-xxl:h-[138px]"),children:Qn(be,{className:"mx-auto h-full w-auto",imgClassName:"h-full object-contain",source:t?.config?.image?.url||t?.productVariant?.metafields?.global?.transparentImg||t?.productVariant?.image?.url})}),Lc("div",{className:ne("mt-[22px] w-full l:mt-[8px]"),children:[Qn(U,{html:t?.product?.title,title:t.config?.title||t.alpcData?.title||t.product?.title,size:2,className:"line-clamp-2 h-[58px] text-[24px] leading-[1.2] l:line-clamp-3 l:h-[56px] l:text-[16px] l-xxl:h-[48px] l-xxl:text-[20px]"}),t?.config?.rules?.split("<br>")?.length>0&&Qn("button",{type:"button",onClick:()=>{r(t?.config?.rules?.split("<br>")),rn({event:"ga4Event",event_name:"lp_button",member_active_status:s?.activated?"active":"not active",event_parameters:{page_group:l,position:e.title,button_name:e?.ruleLabel,info:t?.alpcData?.id?.toString()}})},className:"mt-[8px] text-[16px] font-bold underline xxl:text-[14px]",tabIndex:0,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&g.preventDefault()},children:e?.ruleLabel}),Lc("div",{className:"mt-[24px] flex items-center l:mt-[12px] laptop:text-[16px] lg-desktop:text-[18px]",children:[Qn(be,{className:"size-[20px]",source:"https://cdn.shopify.com/s/files/1/0511/6346/3874/files/icon_hire_purchase.png?v=1757496783"}),Qn(U,{html:`${xn(t?.alpcData?.consumeCredits)} + ${t?.config?.price}`,size:2,as:"p",className:"ml-[4px] text-[28px] font-bold leading-[1.2] md:text-[18px] l-xxl:text-[24px] md-l:text-[20px] "})]}),Lc("div",{className:"group relative w-full",children:[Qn(Oe,{disabled:p,variant:"primary",size:"lg",className:"mt-[8px] md:px-[10px] l:w-full",loading:u,onClick:()=>{m()},title:f?"Insufficient credit":h,children:h}),Qn("div",{className:ne("absolute -bottom-[20px] left-0 z-10 w-[300px] translate-y-full opacity-0 transition-opacity group-hover:opacity-100 md:-bottom-[14px] md:w-[160px]",f?"block":"hidden"),children:Lc("div",{className:"relative rounded-[10px] bg-[#6D6D6F] p-[16px] text-[14px] font-medium text-white shadow md:px-[10px] md:py-[8px]",children:[Qn(U,{as:"p",size:"2",html:e?.insufficientCredits,className:"text-[14px]"}),Qn("div",{className:"absolute -top-[10px] left-[48px] mb-2 size-[16px] origin-top-left rotate-45 transform rounded-[2px] bg-[#6D6D6F]"})]})})]})]})]})}var $T=lX;import{useCallback as cX,useEffect as uX,useState as dX}from"react";function fX(){let e="",{profile:t,isLoadingProfile:r}=ue(),{locale:n,brand:o}=Se();n==="pl"?e="eu":e=n;let[i,s]=dX([]),{isMutating:a,trigger:l}=Un({url:"/v1/credit/consume_credit_rules",initData:{brand:o,page:1,page_size:20,country:(jn.get(e)||e)?.toUpperCase(),task_target:1}}),c=cX(()=>{let u=`consume_credit_rules-${e}`,d=localStorage?.getItem(u);if(d){try{let f=JSON.parse(d);if(f.expire>Date.now()&&f.consume_credit_rules.length){s(f.consume_credit_rules);return}}catch{}localStorage?.removeItem(u)}l({user_id:t?.user_id},{onSuccess(f){let p=f.data.consume_credit_rules||[],m=p.filter(v=>v.consume_type==1)||[],h=p.filter(v=>v.consume_type==2)||[];m=m.sort((v,C)=>v.consume_credits-C.consume_credits),h=h.sort((v,C)=>v.consume_credits-C.consume_credits);let g=m.concat(h);s(g),localStorage?.setItem(`consume_credit_rules-${e}`,JSON.stringify({expire:Date.now()+10*60*1e3,consume_credit_rules:g}))}})},[t,l,e]);return uX(()=>{r||c()},[c,r]),{listLoading:a,redeemableList:i,getRedeemableList:c}}var V2=fX;import{useMemo as pX}from"react";import{jsx as Mc}from"react/jsx-runtime";function mX({rules:e,className:t,ruleClassName:r,...n}){let o=pX(()=>typeof e=="string"?Mc(U,{className:ne("text-[16px] font-semibold",r),html:e}):Mc("ul",{className:"ml-4 text-[16px]",children:e?.map((i,s)=>Mc("li",{className:ne("mb-[10px] list-disc"),children:Mc(U,{as:"div",className:ne("text-[16px] font-semibold leading-[1.4] text-[#777777]",r),html:i})},s))}),[r,e]);return Mc(Pr,{className:ne("max-h-[90vh] w-[640px]",t),...n,children:o})}var H2=mX;import{jsx as $2,jsxs as CX}from"react/jsx-runtime";var vX=({copy:e,className:t="",hideTitle:r=!1,cardClassName:n,authCodeActivate:o})=>{let[i,s]=gX(),{redeemableList:a}=V2(),l="us",c=[],{data:u}=d0({locale:l,handles:e?.list?.map(f=>f.products?.[0]?.handle)||[],metafieldIdentifiers:{variant:c}}),d=hX(()=>u?.map(f=>{let p=e.list.find(h=>h.products?.[0]?.handle===f.handle),m=a.find(h=>h.id?.toString()===p?.redeemId?.toString());return{product:f,productVariant:f.variants?.find(h=>h.sku===p?.products?.[0]?.sku)||f.variants?.[0],alpcData:{id:m?.id,consumeCredits:m?.consume_credits,remainingInventory:m?.remaining_inventory,isLimited:m?.is_limited,consumeType:m?.consume_type,title:m?.name,desc:m?.note},config:p}}),[u,e.list,a]);return console.log("list",d),CX(Pt,{className:ne("bg-[#F5F5F5]",t),children:[!r&&$2(je,{as:"h2",size:"4",html:e.title}),$2("div",{className:"relative mt-[24px] grid grid-cols-4 gap-[16px] md:grid-cols-2 md-xl:grid-cols-3",children:d?.map((f,p)=>$2($T,{copy:e,itemData:f,setRules:s,className:n,currencyCode:u?.[0]?.price.currencyCode||"USD",authCodeActivate:o},p))}),i&&$2(H2,{overlayClassName:"md:px-[16px] md:items-center",className:"md:h-fit md:rounded-b-[16px]",isOpen:i.length>0,onClose:()=>s([]),titleClassName:"border-b-transparent h-[56px]",rules:i,scrollClassName:"md:mt-[8px] md:mb-[24px] md:pt-0",title:e?.ruleLabel,ruleClassName:"text-[#1d1d1f] font-bold"})]})};var K2=Ge(ir());import{useCallback as fQ,useMemo as mk,useState as m4}from"react";var _2=Ge(ir());import{useCallback as RX,useEffect as LX,useState as c4}from"react";var _T=Ge(s7());import{useCallback as xX,useEffect as wX,useRef as bX,useState as yX}from"react";var SX=()=>{let e=bX(),[t,r]=yX(!1),n=xX(o=>{(0,_T.default)(o),e.current&&clearTimeout(e.current),r(!0),e.current=setTimeout(()=>{r(!1)},2e3)},[]);return wX(()=>()=>{e.current&&clearTimeout(e.current)},[]),{copy:n,copied:t}},BT=SX;import{Fragment as zT,jsx as Ht,jsxs as nn}from"react/jsx-runtime";function MX({item:e,copy:t,onError:r,...n}){let{locale:o}=Se(),[i,s]=c4(),[a,l]=c4(),[c,u]=c4(!1),{copy:d,copied:f}=BT(),{profile:p,fetchCreditInfo:m}=ue(),{isMutating:h,trigger:g}=N2({onSuccess(C){if(!C){l(t.redeemModal.commonError);return}if(C?.data?.success)s(C.data.coupon_code),m(p?.user_id);else{let x;C.code===180009?(x=t.redeemModal.redeemLimitError,u(!0)):C.code===180007?(x=t.redeemModal.inventoryNotEnough,u(!0)):C.code===180005?(x=t.redeemModal.creditsNotEnough,u(!0),m(p?.user_id)):C.code===180011&&(x=t.redeemModal.crossSiteError,u(!0)),l(x||t.redeemModal.commonError||""),r&&r(C.code)}},onError(C){l(C.message||t.redeemModal.commonError)}}),v=RX(async()=>{l(""),g({user_id:p?.user_id,rule_id:Number(e.alpc?.id)})},[e,p,g]);return LX(()=>{n.isOpen||(u(!1),l(""))},[n.isOpen]),nn(Pr,{...n,className:"w-[540px] md:h-auto",scrollClassName:"mb-[40px] min-l:px-0 md:mb-[24px] px-0",titleClassName:"h-[56px] bg-[#F5F5F7]",children:[nn("div",{className:(0,_2.default)("max-h-[500px] overflow-y-auto bg-[#F5F5F7] px-[48px] pb-[24px] md:max-h-[400px] md:px-[16px]"),children:[nn("div",{className:"relative mx-auto h-[164px] w-[324px]",children:[t?.imageMapping?.coupon?.url&&Ht(be,{source:t?.imageMapping?.coupon?.url,className:"h-full [&_img]:h-full"}),Ht("div",{className:"absolute bottom-[8px] left-[16px] font-extrabold text-white",children:e.config.value?nn("div",{className:"flex items-end gap-[4px]",children:[Ht(U,{className:"text-[64px] font-bold leading-none",html:e.config.value.toString()}),Ht(U,{className:"text-[24px] font-bold leading-[2]",html:t?.off})]}):Ht(U,{size:3,html:e.alpc?.title})})]}),i?nn("div",{className:"mt-[30px] flex items-center justify-center md:mt-[18px]",children:[Ht("div",{className:"mr-[10px] text-[24px] font-bold leading-[1.4] md:leading-[1.2]",children:i}),Ht("div",{className:(0,_2.default)("cursor-pointer text-[16px] font-bold leading-[1.2] underline md:text-[14px]",f?"pointer-events-none":"pointer-events-auto"),onClick:()=>{d(i)},role:"button",tabIndex:0,onKeyDown:C=>{(C.key==="Enter"||C.key===" ")&&C.preventDefault()},children:f?t?.copied:t?.copy})]}):nn(U,{as:"p",className:(0,_2.default)("mt-[30px] text-center text-[24px] font-bold leading-[1.2] md:mt-[18px] md:text-[20px] md:leading-[1.2]"),children:[xn(e.alpc?.consumeCredits)," ",t?.pointUnit]}),!i&&e.config?.rules?.length>0&&nn("div",{className:"mt-[18px] w-full text-[16px] font-bold leading-[1.4] text-[#6D6D6F] md:mt-[12px] md:text-[14px]",children:[nn("div",{className:"mb-[4px]",children:[t?.ruleLabel,":"]}),Ht("ul",{className:"ml-4 grid grid-flow-row gap-[4px]",children:e.config?.rules?.map((C,x)=>Ht("li",{className:"list-disc",children:Ht(U,{html:C})},x))})]})]}),nn("div",{className:"bg-white px-[48px] pt-[24px] text-center md:px-[16px]",children:[i&&!h?nn(zT,{children:[nn("div",{className:"flex flex-col",children:[Ht(U,{className:"mb-[4px] text-[24px] font-bold leading-[1.2] md:text-[20px]",html:t.redeemModal.coupon.successTitle}),Ht(U,{className:"text-[16px] font-bold leading-[1.4] text-[#6D6D6F] md:text-[14px]",html:t.redeemModal.coupon.successDesc})]}),Ht(Oe,{variant:"primary",size:"lg",className:"mt-[16px] w-full",onClick:()=>{window.location.href=t.redeemModal.coupon.successButtonUrl||`/${o}`,n.onClose&&n.onClose()},disabled:c,children:t.redeemModal.coupon.successButton})]}):nn(zT,{children:[Ht(U,{className:"block text-[24px] font-bold leading-[1.2] md:text-[20px] md:leading-[1.2]",html:t.redeemModal.confirmTitle}),Ht(Oe,{loading:h,variant:"primary",size:"lg",className:"mt-[16px] w-full",onClick:v,disabled:c,children:t.redeemModal.confirmButton})]}),a&&Ht("div",{className:"mx-auto max-w-full py-[12px] text-center",children:Ht(U,{className:"text-[14px] font-semibold text-[#1F2021]",html:a})})]})]})}var ZT=MX;var p4=Ge(ir());import{useCallback as aQ,useEffect as lQ,useMemo as cQ,useState as G2}from"react";import{useEffect as EX,useState as jT}from"react";function TX({shopifyStoreDomain:e}){let{locale:t=""}=Se(),[r,n]=jT(!1),[o,i]=jT([]);return EX(()=>{(async()=>{n(!0);try{let l=await(await fetch(`/api/multipass/rainbowbridge/uc/shop/shipping_zones?shop=${e}`)).json(),c=[],u=new Set;l.data.data.forEach(d=>{d.countries.forEach(f=>{u.has(f.code)||(u.add(f.code),c.push(f))})}),c=c.sort((d,f)=>d.code.localeCompare(f.code)),console.log("fetch shipsToCountries",c),i(c)}catch(a){i([]),console.error(a)}finally{n(!1)}})()},[t]),{isLoading:r,countries:o}}var B2=TX;import{useCallback as kX,useMemo as AX,useState as IX}from"react";var PX=/[&%*<>^#;-]/,OX=/[&^*%<>;,?]/,DX=/[^a-zA-Z0-9\s]/,NX=/^\d+(\s+\d+)*$/,FX=/(Packstation|Postfiliale)/gi,VX=/(P(\.)?\s*?O(\.)?\s*?box|Post(al)?(\s*)?(Office(\s*))?Box)/gi,HX={minLength:(e,t)=>e?.length>0&&e?.length<t?.length,maxLength:(e,t)=>e?.length>t?.length,isUSSpecialCharacters:e=>PX.test(e),isEUSpecialCharacters:e=>OX.test(e),isSC:e=>DX.test(e),isPureDigital:e=>NX.test(e),isPackstation:e=>FX.test(e),isPobox:e=>VX.test(e)},$X={us:{nameRules:["isUSSpecialCharacters"],addressRules:{address1:["isPobox","isUSSpecialCharacters","minLength","maxLength","isPureDigital"],address2:["isPobox","isUSSpecialCharacters","maxLength","isPureDigital"]},addressLengths:{min:4,max:32}},"eu-en":{nameRules:["isEUSpecialCharacters"],addressRules:{address1:["isPobox","isEUSpecialCharacters","minLength","maxLength","isPureDigital","isPackstation"],address2:["isPobox","isEUSpecialCharacters","maxLength","isPackstation"]},addressLengths:{min:3,max:70}},uk:{nameRules:["isEUSpecialCharacters"],addressRules:{address1:["isPobox","isEUSpecialCharacters","minLength","maxLength","isPureDigital"],address2:["isPobox","isEUSpecialCharacters","maxLength"]},addressLengths:{min:3,max:35}},"eu-de":{nameRules:["isEUSpecialCharacters"],addressRules:{address1:["isPobox","isEUSpecialCharacters","minLength","maxLength","isPureDigital","isPackstation"],address2:["isPobox","isPackstation","isEUSpecialCharacters","maxLength"]},addressLengths:{min:3,max:35}},ca:{nameRules:["isUSSpecialCharacters"],addressRules:{address1:["isPobox","maxLength"],address2:["isPobox","maxLength"]},addressLengths:{max:35}}},_X={uk:{rules:["isEUSpecialCharacters","minLength","maxLength"],lengths:{min:2,max:35}},"eu-en":{rules:["isEUSpecialCharacters","minLength","maxLength"],lengths:{min:2,max:35}},"eu-de":{rules:["isEUSpecialCharacters","minLength","maxLength"],lengths:{min:2,max:35}},ca:{rules:["minLength","maxLength"],lengths:{min:2,max:15}}},UT=({address:e,validatorInfo:t,formData:r,errorLabel:n})=>{let{locale:o}=Se(),[i,s]=IX([]),a=AX(()=>{let{city_rules:c={},name_rules:u={},address1_rules:d,address2_rules:f,POboxErr:p,packstationErr:m}=t||{},h=$X[o],g=_X[o],v=[...r.map(y=>({key:y.key,required:y.required,error:n.require||"This field is required"})),{key:"email",error:n.email||"Invalid email format",validator(y){return!$R(y)}},{key:"first_name",required:!0,error:n.require||"First name is required"},{key:"last_name",required:!0,error:n.require||"Last name is required"},{key:"name",error:u.maxLengthErr||n.require||"Name is too long",validator:y=>y?.length>=31}],C=g?g.rules.map(y=>{let b={key:"city",rule:y,error:""};return y==="minLength"?(b.params={length:g.lengths.min},b.error=c.minLengthErr||n.require||"City is too short"):y==="maxLength"?(b.params={length:g.lengths.max},b.error=c.maxLengthErr||n.require||"City is too long"):y==="isEUSpecialCharacters"&&(b.error=c.characterErr||n.require||"Invalid characters in city"),b}):[],x=h?.nameRules.map(y=>({key:"first_name",rule:y,error:u.characterErr})).concat(h?.nameRules.map(y=>({key:"last_name",rule:y,error:u.characterErr}))||[])||[],w=h?Object.entries(h.addressRules).flatMap(([y,b])=>b.map(R=>{let L={key:y,rule:R,error:""},E=y==="address1"?d:f;return R==="isPobox"?L.error=p||n.require||"PO Box not allowed":R==="isPackstation"?L.error=m||n.require||"Packstation not allowed":R==="isUSSpecialCharacters"||R==="isEUSpecialCharacters"?L.error=E?.characterErr||n.require||"Invalid characters":R==="minLength"?(L.params={length:"min"in h.addressLengths?h.addressLengths.min:0},L.error=E?.minLengthErr||n.require||"Address is too short"):R==="maxLength"?(L.params={length:h.addressLengths.max},L.error=E?.maxLengthErr||n.require||"Address is too long"):R==="isPureDigital"&&(L.error=E?.pureDigitalErr||n.require||"Address cannot be only numbers"),L})):[];return[...v,...C,...x,...w]},[o,t,r,n]);return{validate:kX(({force:c,ignoreKeys:u})=>{let d=[];return a.forEach(({key:f,rule:p,params:m,required:h,error:g,validator:v})=>{let C=p?HX[p]:void 0,x,w=e[f];u?.includes(f)||w===void 0&&!c||d.find(y=>y.key==f)||(h&&!w?x=g:v?x=v(w,f,e):C&&(x=C(w,m)),x&&d.push({key:f,message:typeof x=="string"?x:g}))}),s(d),!!d.length},[e,a]),errors:i}};var GT=(e={})=>{let{storeDomain:t,locale:r,appName:n,brand:o}=Se();return Un({url:"/v1/credit/exchange/goods",initData:{quantity:1,brand:o,country:(jn.get(r||"")||r)?.toUpperCase(),domain:t,app_name:n}},e)};import{jsx as WT,jsxs as BX}from"react/jsx-runtime";var qT=({errorInfo:e})=>BX("div",{className:"mx-auto max-w-[404px] text-[16px] text-black/40",children:[WT(be,{className:"mx-auto mb-[12px] h-[140px] w-[220px]",source:e.imageUrl}),WT(U,{as:"div",className:"mt-[16px] text-center",html:e.message})]});var KT=Ge(ir());import{jsx as Ps,jsxs as Xt}from"react/jsx-runtime";var z2=({item:e,copy:t})=>{let{locale:r}=Se();return Xt("div",{className:"flex w-full items-center justify-center md:items-start md:justify-start",children:[Ps(be,{className:"mr-[16px] size-[100px] shrink-0 md:mr-[12px] md:hidden md:size-[44px] [&_img]:h-full [&_img]:w-auto [&_img]:object-contain",source:e.variant.image?.url||e.product?.images[0]?.url,alt:e.product.title}),Xt("div",{className:"md:flex md:flex-col",children:[Xt("div",{className:"md:flex md:items-center",children:[Ps(be,{className:"mr-[16px] size-[100px] shrink-0 md:mr-[12px] md:size-[44px] min-md:hidden [&_img]:h-full [&_img]:w-auto [&_img]:object-contain",source:e.variant.image?.url||e.product?.images[0]?.url,alt:e.product.title}),Ps("div",{className:"flex-1 text-[16px] font-bold leading-[1.4] min-l:!hidden",title:e.product.title,children:e.product.title})]}),Xt("div",{className:"mt-[16px] md:mt-[12px]",children:[Ps("div",{className:"mb-[12px] line-clamp-1 text-[16px] font-bold l:!hidden",title:e.product.title,children:e.product.title}),Xt("div",{className:"flex font-semibold leading-[1.4] md:flex-col",children:[Xt("div",{className:"mr-[40px] text-[15px] font-bold text-[#777] md:mr-0 md:text-[12px]",children:[Xt("div",{className:"mb-[8px] flex items-center md:mb-[4px]",children:[Xt("span",{children:[t.redeemModal.product.variantLabel,": "]}),Ps("span",{className:"ml-1",children:e.variant.title||""})]}),Xt("div",{className:"mb-[8px] flex items-center md:mb-[4px]",children:[Xt("span",{children:[t.redeemModal.product.shippingFeeLabel,": "]}),Ps("span",{className:"ml-1",children:_R({amount:0,currencyCode:e.product.price?.currencyCode,locale:r||"us"})})]})]}),Xt("div",{className:"text-[15px] font-bold text-[#777] md:text-[12px]",children:[Xt("div",{className:"mb-[8px] flex items-center md:mb-[4px]",children:[Xt("span",{children:[t.redeemModal.product.quantityLabel,": "]}),Ps("span",{className:"ml-1",children:"1"})]}),Xt("div",{className:"l:flex l:items-center l:justify-between",children:[Xt("span",{children:[t.redeemModal.product.totalPriceLabel,": "]}),Xt("span",{className:"ml-1",children:[e.alpc?.consumeCredits," ",t?.pointUnit]})]})]})]})]})]})]})};import{jsx as Os,jsxs as zX}from"react/jsx-runtime";var YT=({copy:e,shippingProduct:t,loading:r,address:n,disabled:o,onClose:i,item:s})=>Os("div",{className:(0,KT.default)("max-h-[500px] overflow-y-auto px-[48px] pb-[24px] md:max-h-[400px] md:px-[16px]"),children:zX("div",{className:"flex flex-col items-center",children:[Os("div",{className:"mb-[16px] grid grid-flow-row gap-y-[4px] md:mb-[12px]",children:e.redeemModal.product.successDesc.map((a,l)=>Os(U,{className:"text-[18px] font-bold leading-[1.4] md:text-[14px]",html:a},l))}),t&&Os(U,{className:"mb-5 text-[16px] font-bold",html:t}),Os("div",{className:"flex w-full items-center rounded-[16px] bg-[#F5F5F7] p-[16px]",children:Os(z2,{item:s,copy:e})}),Os(Oe,{loading:r||!n,variant:"primary",className:"mx-auto mt-[16px] w-[444px] md:mt-[12px] md:w-full",onClick:i,disabled:o,children:e.redeemModal.product.paymentButton})]})});var lk=Ge(ir());var f4=Ge(ir());import{useCallback as eQ,useEffect as tQ,useMemo as sk,useState as rQ}from"react";import{useEffect as ZX,useRef as jX}from"react";function UX(e){let t=jX(null);return ZX(()=>{let r=n=>{let o=t?.current;!o||o.contains(n.target)||e(n)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t]),t}var Z2=UX;var Ec=Ge(ir());import{useEffect as GX,useState as XT}from"react";import{jsx as Ds,jsxs as QT}from"react/jsx-runtime";function JT({countries:e,loading:t,className:r,value:n,onChange:o}){let[i,s]=XT(!1),[a,l]=XT(""),c=Z2(()=>{s(!1)});return GX(()=>{let u=e.filter(d=>d.code===n);u.length&&l(u[0].name)},[l,e,n]),QT("div",{className:"relative",children:[Ds("select",{className:(0,Ec.default)("!h-[50px] pr-[45px] min-l:hidden",r),style:{WebkitTextFillColor:"black"},disabled:t,value:n,onChange:u=>{o(u.target.value)},children:e.map(u=>Ds("option",{value:u.code,children:u.name},u.code))}),Ds("div",{className:(0,Ec.default)("absolute left-0 top-0 hidden !h-[50px] rounded-[2px] pr-[45px] text-[16px] font-bold focus:!border-[#6D6D6F] min-l:!block",r),onClick:()=>{s(!0)},role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&u.preventDefault()},children:a}),Ds(be,{source:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/country-select.png?v=1692202500",imgClassName:"pointer-events-none absolute right-0 top-0 bottom-0 !w-[45px] object-cover",alt:"arrow"}),Ds("div",{ref:c,className:(0,Ec.default)("absolute left-0 top-[58px] z-30 max-h-[334px] w-full cursor-pointer overflow-auto rounded-[4px] bg-white shadow-[0px_1px_12px_0px_rgba(0,0,0,0.12)]",{"!hidden":!i}),children:Ds("ul",{className:"py-[6px]",children:e.map(u=>QT("li",{value:u.code,className:(0,Ec.default)("relative px-[14px] py-[17px] text-[16px] font-bold leading-[1] transition hover:bg-[#EAEAEC]",{"!bg-[#EAEAEC]":u.code===n}),children:[Ds("button",{className:"absolute left-0 top-0 z-1 size-full opacity-0",value:u.code,onClick:()=>{l(u.name),s(!1),o(u.code)}}),u.name]},u.code))})})]})}import{jsx as u4,jsxs as WX}from"react/jsx-runtime";var ek=({error:e,children:t,label:r,required:n})=>WX("div",{children:[r&&u4(U,{html:n?`${r} *`:r,className:"text-[16px] font-bold"}),u4("div",{className:"mt-[8px] h-[50px] w-full text-[14px] font-semibold",children:t}),e&&typeof e=="string"&&u4(U,{as:"div",html:e,className:"mt-[8px] text-[16px] font-bold text-[#FF4D4D]"})]});var tk=Ge(ir());import{useCallback as d4,useEffect as qX,useState as KX}from"react";import{jsx as YX}from"react/jsx-runtime";function rk({className:e,error:t,value:r,placeholder:n,disabled:o,onChange:i,onBlur:s}){let[a,l]=KX(!1);qX(()=>{r&&l(!0)},[r]);let c=d4(f=>{let p=f.currentTarget.value;p&&l(!!p),i(f)},[i]),u=d4(f=>{l(!!f.currentTarget.value),s&&s()},[s]),d=d4(()=>{l(!0)},[]);return YX("input",{className:(0,tk.default)("w-full rounded-[2px] border border-[#6D6D6F] p-[14px] text-[16px] font-bold placeholder:text-[16px] placeholder:font-bold placeholder:text-[#6D6D6F] focus:outline-none focus:ring-0",e,t&&"border-[#FF4D4D]"),value:r,placeholder:n,disabled:o,onChange:c,onBlur:u,onFocus:d})}var Tc=Ge(ir());import{useEffect as XX,useMemo as QX,useState as nk}from"react";import{Fragment as JX,jsx as Io,jsxs as ok}from"react/jsx-runtime";function ik({states:e,stateName:t="",stateCode:r="",className:n="",onChange:o}){let[i,s]=nk(!1),[a,l]=nk(""),c=Z2(()=>{s(!1)}),u=QX(()=>{let d=e.find(f=>r?f.code===r:f.name===t);return d?[d?.id,d?.name,d?.code].join(","):""},[e,r,t]);return XX(()=>{let d=e.filter(f=>[f.id,f.name,f.code].join(",")===u);d.length&&l(d[0].name)},[l,e,u]),Io("div",{className:"relative h-full",children:e.length?ok(JX,{children:[Io("select",{className:(0,Tc.default)("h-[52px] pr-[45px] min-l:hidden",n),value:u,style:{WebkitTextFillColor:u?"black":"#666"},onChange:d=>{let[,f,p]=d.target.value.split(",");o(p,f)},children:e.map(d=>Io("option",{value:[d.id,d.name,d.code].join(","),children:d.name},d.id))}),Io("div",{className:(0,Tc.default)("absolute left-0 top-0 hidden h-[52px] pr-[45px] min-l:!block",n),onClick:()=>{s(!0)},role:"button",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&d.preventDefault()},children:a}),Io(be,{source:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/country-select.png?v=1692202500",className:"pointer-events-none absolute right-0 top-1/2 h-[45px] !w-[45px] -translate-y-1/2 object-cover",alt:"arrow"}),Io("div",{ref:c,className:(0,Tc.default)("absolute left-0 top-[58px] z-30 max-h-[334px] w-full cursor-pointer overflow-auto rounded-[4px] bg-white shadow-[0px_1px_12px_0px_rgba(0,0,0,0.12)]",{"!hidden":!i}),children:Io("ul",{className:"py-[6px]",children:e.map(d=>ok("li",{value:[d.id,d.name,d.code].join(","),className:(0,Tc.default)("relative px-[14px] py-[17px] text-[16px] font-semibold leading-[1] transition hover:bg-[#F7F8F9]",{"!bg-[#e8e8e8]":[d.id,d.name,d.code].join(",")===u}),children:[Io("button",{className:"absolute left-0 top-0 z-1 size-full opacity-0",value:[d.id,d.name,d.code].join(","),onClick:()=>{l(d.name),s(!1),o(d.code,d.name)}}),d.name]},d.id))})})]}):Io("input",{className:n,value:t,style:{WebkitTextFillColor:"black"},onChange:d=>{o("",d.target.value)}})})}import{jsx as ml,jsxs as nQ}from"react/jsx-runtime";var ak=({countries:e,countriesLoading:t,form:r,validate:n,errors:o,onChange:i})=>{let{profile:s,customer:a}=ue(),{locale:l}=Se(),[c,u]=rQ(),d=sk(()=>e.find(h=>h.code===c?.country)?.provinces||[],[c,e]),f=sk(()=>r?.flat().find(h=>h.type==="state")?.key,[r]),p=eQ(()=>{if(a?.defaultAddress)return{name:(a?.defaultAddress.firstName||"")+" "+(a?.defaultAddress.lastName||""),first_name:a?.defaultAddress.firstName,last_name:a?.defaultAddress.lastName,address1:a?.defaultAddress.address1,address2:a?.defaultAddress.address2,city:a?.defaultAddress.city,phone:a?.defaultAddress.phone,country:a?.defaultAddress.countryCodeV2,province:a?.defaultAddress.province,province_code:a?.defaultAddress.provinceCode,email:a?.email||s?.email,zip:a?.defaultAddress.zip};{let m=jn.get(l)||l;return m==="UK"&&(m="GB"),m==="EU"&&(m="NL"),{email:s?.email,country:m}}},[a,s?.email,l]);return console.log("customer",a),tQ(()=>{if(a){let m=p();u(m),i(m)}},[a,p]),c?ml("div",{className:"grid gap-[20px]",children:r&&r.map((m,h)=>ml("div",{className:"item-center -mx-[6px] flex",children:m.map((g,v)=>{let C=o.find(w=>w.key===g.key)?.message,x=(0,f4.default)("h-full w-full appearance-none rounded-[2px] border bg-white px-[14px] py-[17px] leading-[1] outline-none placeholder:text-[#999] autofill:shadow-white focus:border-brand disabled:pointer-events-none disabled:text-[#999] disabled:bg-[#F7F8F9] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",C?"!border-[#F84D4F]":"border-[#d8d8d8]");return g.type==="state"&&!d.length?null:ml("div",{className:(0,f4.default)("mx-[6px] flex-1"),children:nQ(ek,{error:C,required:g.required,label:g.label,children:[g.type==="country"&&ml(JT,{className:x,countries:e,loading:t,value:c.country,onChange:w=>{c.country!==w&&(c.province="",c.province_code=""),c.country=w,u({...c}),i(c)}}),g.type==="state"&&ml(ik,{className:x,states:d,stateCode:c.province_code,stateName:c.province,onChange:(w,y)=>{c.province_code=w,c.province=y,u({...c}),i(c)}}),g.type!=="state"&&g.type!=="country"&&ml(rk,{placeholder:g.label,className:x,error:C,value:c[g.key],required:g.required,disabled:g.type==="email",onChange:w=>{let y=w.target.value;c[g.key]=y,u({...c}),i(c)},onBlur:()=>{n({ignoreKeys:d.length&&f?[f]:[]})}})]})},v)})},h))}):null};import{jsx as hl,jsxs as j2}from"react/jsx-runtime";var ck=({copy:e,shippingAddress:t,setAddress:r,validateAddress:n,validateErrors:o,shippingProduct:i,loading:s,address:a,disabled:l,handlePayment:c,item:u})=>{let{storeDomain:d}=Se(),{countries:f=[],isLoading:p}=B2({shopifyStoreDomain:d});return j2("div",{className:"relative",children:[hl("div",{className:(0,lk.default)("max-h-[500px] overflow-y-auto px-[48px] pb-[24px] md:max-h-[400px] md:px-[16px]"),children:j2("div",{children:[t&&hl(U,{className:"mb-5 text-[16px] font-bold",html:t}),hl(ak,{onChange:r,validate:n,errors:o,form:e.redeemModal.product.addressForm,countries:f,countriesLoading:p})]})}),j2("div",{className:"sticky bottom-0 flex flex-col items-center justify-center bg-white px-[48px] py-[24px] l:px-[16px]",children:[j2("div",{className:"flex w-full items-center rounded-[16px] bg-[#F5F5F7] p-[16px]",children:[i&&hl(U,{className:"mb-5 text-[16px] font-bold",html:i}),hl(z2,{item:u,copy:e})]}),hl(Oe,{loading:s||!a,variant:"primary",className:"mx-auto mt-[16px] w-[444px] md:mt-[12px] md:w-full",onClick:c,disabled:l,children:e.redeemModal.product.paymentButton})]})]})};var U2=Ge(ir());import{Fragment as oQ,useMemo as iQ}from"react";import{Fragment as sQ,jsx as $t,jsxs as Jn}from"react/jsx-runtime";var uk=({copy:e,item:t,loading:r,disabled:n,setStatus:o})=>{let i=iQ(()=>t.config.rules?.length?t.config.rules:[...t.config.desc?.split("<br>")||[],...e.redeemModal.product.rules||[]],[t.config.rules,t.config.desc,e.redeemModal.product.rules]);return console.log("item",t),Jn("div",{className:"flex flex-col",children:[$t("div",{className:(0,U2.default)("max-h-[500px] overflow-y-auto bg-[#F5F5F7] px-[48px] pb-[24px] md:max-h-[400px] md:px-[16px]"),children:Jn(sQ,{children:[Jn("div",{className:"relative mx-auto h-[164px] w-fit",children:[$t(be,{source:t.config?.type==="product"?t.product.images[0]?.url:e?.imageMapping[t.config.type]?.url||t.config.image?.url,className:"h-full w-auto [&_img]:h-full [&_img]:w-auto [&_img]:object-contain"}),$t("div",{className:"absolute bottom-[8px] left-[16px] font-extrabold text-white",children:t.config.value&&Jn("div",{className:"flex items-end gap-[4px]",children:[$t(U,{className:"text-[64px] font-bold leading-none",html:t.config.value.toString()}),$t(U,{className:"text-[24px] font-bold leading-[2]",html:t.config.type==="coupon"?e?.off:e?.giftCardLabel})]})})]}),Jn("div",{className:"mt-[30px] md:mt-[18px]",children:[t.config.type==="product"&&$t("div",{className:(0,U2.default)("mb-[4px] text-center text-[24px] font-bold leading-[1.2] md:text-[20px] md:leading-[1.2]"),children:t.config.title}),Jn(U,{as:"p",className:(0,U2.default)(" text-center text-[24px] font-bold leading-[1.2] md:text-[20px] md:leading-[1.2]"),children:[xn(t.alpc?.consumeCredits)," ",e?.pointUnit]})]}),Jn("div",{className:"mt-[16px] w-full text-[14px] font-semibold text-[#777] md:mt-[12px]",children:[$t("div",{className:"text-[16px] font-bold leading-[1.4]",children:e.redeemModal.product.stepTitle}),$t("div",{className:"mt-[4px] flex items-center justify-center",children:e.redeemModal.product.steps?.map((s,a)=>Jn(oQ,{children:[Jn("div",{className:"flex w-[76px] flex-col items-center text-center md:h-[94px] min-l:w-[130px]",children:[$t(be,{source:s.imageUrl,className:"mb-[4px] h-[58px] w-[58px]"}),$t("div",{className:"min-h-[34px] text-[14px] font-bold text-[#777] md:min-h-[28px] md:text-[12px]",children:s.title})]}),a!==e.redeemModal.product.steps.length-1&&$t(be,{source:"https://cdn.shopify.com/s/files/1/0517/6767/3016/files/step-arrow.png?v=1690458150",className:"mb-[20px] h-[10px] w-[20px] md:mb-[30px] md:h-[5px] md:w-[12px]"})]},a))}),$t("div",{className:"overflow-auto",children:i?.length&&$t("ul",{className:"ml-[18px] mt-[16px] grid grid-flow-row gap-[4px] text-[16px] font-bold leading-[1.4] text-[#6D6D6F] md:mt-[12px]",children:i.map((s,a)=>$t("li",{className:"list-disc",children:$t(U,{as:"div",html:s,className:"font-bold"})},a))})})]})]})}),Jn("div",{className:"flex-1 bg-white px-[48px] py-[24px] text-center md:px-[16px]",children:[$t(U,{as:"p",className:"block text-[24px] font-bold leading-[1.2] md:text-[20px] md:leading-[1.2]",html:e.redeemModal.confirmTitle}),$t(Oe,{loading:r,disabled:n,variant:"primary",size:"lg",className:"mt-[16px] w-full md:mt-[12px]",onClick:()=>{o("address")},children:e.redeemModal.confirmButton})]})]})};import{jsx as W2,jsxs as dQ}from"react/jsx-runtime";function uQ({item:e,copy:t,onError:r,...n}){let{fetchCreditInfo:o,profile:i}=ue(),{storeDomain:s,locale:a}=Se(),{validatorInfo:l}=t,{shippingAddress:c,shippingProduct:u}=t.redeemModal.product,[d,f]=G2("init"),[p,m]=G2(),[h,g]=G2({code:0,message:"",imageUrl:""}),[v,C]=G2(!1),{countries:x=[],isLoading:w}=B2({shopifyStoreDomain:s}),{isMutating:y,trigger:b}=GT({onSuccess(A){if(!A){f("error"),g({code:0,imageUrl:t.redeemModal.errorImageUrl||"",message:t.redeemModal.commonError||""});return}if(A?.code===0)o(i?.user_id),f("success");else{let k,I;A.code===180009?(k=t.redeemModal.redeemLimitError,C(!0)):A.code===180007?(k=t.redeemModal.inventoryNotEnough,C(!0),I=t.redeemModal.inventoryNotEnough):A.code===180005?(k=t.redeemModal.creditsNotEnough,C(!0),o(i?.user_id)):A.code===180011&&(k=t.redeemModal.crossSiteError,C(!0)),f("error"),g({code:A.code,imageUrl:I||t.redeemModal.errorImageUrl||"",message:k||t.redeemModal.commonError||""}),r&&r(A.code)}},onError(A){f("error"),g({code:0,imageUrl:t.redeemModal.errorImageUrl||"",message:t.redeemModal.commonError||""})}}),R=cQ(()=>t?.redeemModal.product.form?.flat().find(k=>k.type==="state")?.key,[t?.redeemModal.product.form]),{validate:L,errors:E}=UT({address:p,validatorInfo:l,formData:t?.redeemModal.product.form?.flat()||[],errorLabel:{require:t.redeemModal.product.required,email:t.redeemModal.product.invalidEmail}}),S=aQ(async()=>{let A=[];if(R&&((x.find(N=>N.code===p.country)?.provinces||[]).length||A.push(R)),L({force:!0,ignoreKeys:A}))return;console.log("address",p);let k={...p};k.name&&delete k.name,k.country==="UK"&&(k.country="GB"),b({address:btoa(JSON.stringify(k)),rule_id:Number(e.alpc?.id)})},[e,b,R,L,p,x]);return lQ(()=>{n.isOpen||(C(!1),g({code:0,message:"",imageUrl:""}))},[n.isOpen,a]),dQ(Pr,{...n,className:(0,p4.default)("w-[540px] md:h-auto min-md:max-h-[calc(100vh-40px)]",d!=="init"&&"w-[740px] md:w-full"),scrollClassName:"mb-0 min-l:px-0 md:mb-0 px-0",titleClassName:(0,p4.default)("h-[56px]",d==="init"&&"bg-[#F5F5F7]"),title:d==="address"?"Order Confirmation":"",children:[d==="error"&&W2(qT,{errorInfo:h}),d==="success"&&W2(YT,{copy:t,shippingProduct:u,loading:y,address:p,disabled:v,onClose:n.onClose,item:e}),d==="address"&&W2(ck,{copy:t,shippingAddress:c,setAddress:m,validateAddress:L,validateErrors:E,shippingProduct:u,loading:y,address:p,disabled:v,handlePayment:S,item:e}),d==="init"&&W2(uk,{item:e,copy:t,loading:y,disabled:v,setStatus:f})]})}var dk=uQ;var q2=Ge(ir());import{useMemo as fk}from"react";import{jsx as on,jsxs as gl}from"react/jsx-runtime";function pk({copy:e,className:t,item:r,onRulesOpen:n,onRedeem:o}){let{creditInfo:i,profile:s,gtm:{pageGroup:a}}=ue(),l=Object.keys(s||{}).length>0,c=fk(()=>!!(r.alpc?.remainingInventory<=0&&r.alpc?.isLimited||r.alpc?.consumeType===2&&!r.variant?.availableForSale||l&&s?.activated&&r.alpc?.consumeCredits>Number(i?.available_credit||0)),[r.alpc?.remainingInventory,r.alpc?.isLimited,r.alpc?.consumeType,r.alpc?.consumeCredits,l,s?.activated,i?.available_credit,r.variant?.availableForSale]),u=fk(()=>l?r.alpc?.consumeType===2?r.variant?.availableForSale?e.btnRedeem:e?.soldOut||"Sold Out":e.btnRedeem:e.unlockRewards,[l,r.alpc?.consumeType,r.variant?.availableForSale,e.btnRedeem,e.unlockRewards,e?.soldOut]);return gl("div",{className:(0,q2.default)("flex flex-col items-center rounded-[16px] bg-[#EAEAEC] p-[24px] md:rounded-[12px] md:px-[8px] xl:py-[16px] md-xl:px-[16px]",t),children:[r.config?.type!=="product"?gl("div",{className:"relative mx-auto my-[30px] h-[164px] md:my-0 md:h-[66px] l-xxl:h-[138px] md-l:h-[80px]",children:[on(be,{source:e?.imageMapping[r.config?.type]?.url,className:"h-full [&_img]:h-full [&_img]:w-auto [&_img]:object-contain"}),on("div",{className:"absolute bottom-[8px] left-[16px] font-extrabold text-white md:bottom-[2px] md:left-[5px]",children:r.config?.value?gl("div",{className:"flex items-end",children:[on(U,{className:"text-[64px] font-bold leading-none md:text-[20px] l-xxl:text-[40px] md-l:text-[22px]",html:r.config?.value}),on(U,{className:"ml-[4px] text-[24px] font-bold leading-[2] md:ml-[2px] l:text-[12px] xxl:leading-[1.4] l-xxl:text-[20px]",html:r.config?.type==="giftCard"?e?.giftCardLabel:e?.off})]}):on(U,{size:3,html:r.config?.title||r.alpc?.title})})]}):on("div",{className:(0,q2.default)("relative mx-auto h-[224px] w-fit md:my-[10px] l:h-[120px] l-xxl:h-[138px]"),children:on(be,{className:"h-full w-auto [&_img]:h-full [&_img]:object-contain",source:r.config?.image?.url||r.product.images?.[0]?.url})}),gl("div",{className:(0,q2.default)("mt-[22px] flex w-full flex-1 flex-col justify-between"),children:[on(U,{html:r.config?.title||r.alpc?.title,title:r.config?.title||r.alpc?.title,size:2,className:"text-[24px] font-bold leading-[1.2] l:text-[16px] l-xxl:text-[20px]"}),r.config?.rules?.length>0&&on("button",{type:"button",onClick:()=>{n(r.config?.rules||[]),rn({event:"ga4Event",event_name:"lp_button",member_active_status:s?.activated?"active":"not active",event_parameters:{page_group:a,position:e.title,button_name:e?.ruleLabel,info:r.alpc?.id?.toString()}})},className:"mt-[8px] w-fit text-[16px] font-bold underline md:text-[14px] l:mt-0",tabIndex:0,onKeyDown:d=>{(d.key==="Enter"||d.key===" ")&&d.preventDefault()},children:e?.ruleLabel}),gl("div",{children:[gl("div",{className:"mt-[24px] flex items-center l:mt-[12px] l-xl:mt-[16px]",children:[on(be,{className:"size-[20px]",source:"https://cdn.shopify.com/s/files/1/0511/6346/3874/files/icon_hire_purchase.png?v=1757496783"}),on(U,{html:`${xn(r.alpc?.consumeCredits)}`,size:2,as:"p",className:"ml-[4px] text-[28px] font-bold leading-[1.2] md:text-[18px] l-xxl:text-[24px] md-l:text-[20px] "})]}),on(Oe,{disabled:c,variant:"primary",size:"lg",className:"mt-[8px] md:px-[8px] l:w-full",onClick:()=>{o(r),rn({event:"ga4Event",event_name:"lp_button",member_active_status:s?.activated?"active":"not active",event_parameters:{page_group:a,position:e.title,button_name:u,info:r.alpc?.id?.toString()}})},children:u})]})]})]})}import{jsx as Po,jsxs as mQ}from"react/jsx-runtime";function pQ({copy:e,className:t="",tabClassName:r="",hideTitle:n=!1,cardClassName:o,activate:i}){let{profile:s,openSignUpPopup:a,gtm:{pageGroup:l}}=ue(),c=Object.keys(s||{}).length>0,[u,d]=m4(e.list[0].label),[f,p]=m4(void 0),[m,h]=m4(),{listLoading:g,redeemableList:v,getRedeemableList:C}=V2(),x=mk(()=>v.map(L=>({id:L.id.toString(),title:L.name,consumeCredits:L.consume_credits,remainingInventory:L.remaining_inventory,isLimited:!!L.is_limited,consumeType:L.consume_type,handle:L.sku_handle,sku:L.goods_sku,image:L.goods_url})),[e.list,u,v]),w=x.map(L=>L.handle),{data:y}=d0({handles:w}),b=mk(()=>e.list.find(E=>E.label===u)?.list.filter(E=>x.some(S=>S.id===E.id)).map(E=>{let S=x.find(I=>I.id===E.id),A=y?.find(I=>I.handle===S?.handle),k=A?.variants.find(I=>I.sku===S?.sku);return S?.consumeType===2&&(!A||!k)?null:{alpc:x.find(I=>I.id===E.id),config:E,product:A,variant:k}}).filter(E=>E!==null),[x,y]),R=fQ(L=>{L===180007&&C()},[C]);return console.log("popRedeemData",f),mQ(Pt,{className:(0,K2.default)("relative bg-[#F5F5F7]",t),children:[!n&&Po(je,{as:"h2",size:"4",html:e.title}),Po(_n,{shape:"rounded",align:"left",className:(0,K2.default)("sticky top-0 z-20 py-[24px] md:justify-center",r),value:u.toString(),onValueChange:L=>{d(L),rn({event:"ga4Event",event_name:"lp_navigation",event_parameters:{navigation:L,page_group:l}})},children:Po(Bn,{children:e.list.map(L=>Po(zn,{value:L.label,children:L.label},L.label))})}),!!x?.length&&!g&&Po("div",{className:(0,K2.default)("relative grid grid-cols-4 gap-[16px] md:grid-cols-2 md:gap-[12px] md-xl:grid-cols-3"),children:b?.map(L=>Po(pk,{copy:e,item:L,onRedeem:E=>{c?!s?.activated&&!i.isSuccess?(i.openAuthCodePopup(),i.setOnSuccess(()=>{p(E)})):p(E):a()},onRulesOpen:h,className:o},L?.alpc?.id))}),f?.alpc?.consumeType===1&&e?.redeemModal?.coupon&&f&&Po(ZT,{isOpen:!!f,item:f,copy:e,onError:R,onClose:()=>{p(void 0)}}),f?.alpc?.consumeType===2&&e?.redeemModal&&f&&Po(dk,{isOpen:!!f,item:f,copy:e,onError:R,onClose:()=>{p(void 0)}}),m&&Po(H2,{overlayClassName:"md:px-[16px] md:items-center",className:"md:h-fit md:rounded-b-[16px]",isOpen:m.length>0,onClose:()=>h([]),titleClassName:"border-b-transparent h-[56px]",rules:m,scrollClassName:"md:mt-[8px] md:mb-[24px] md:pt-0",title:e?.ruleLabel,ruleClassName:"text-[#1d1d1f] font-bold"})]})}export{vt as ActionExecutionMessage,c$ as Chat,mU as CreditsBanner,VG as CreditsBenefits,vX as CreditsCash,iX as CreditsFaq,YW as CreditsInfoCard,m$ as CreditsProvider,pQ as CreditsRedeemList,pU as CreditsUploadReceiptModal,eX as CreditsWaysToGetCredits,ot as Role,cbe as ShopifyProvider,Te as TextMessage,ube as articleFragment,dbe as articleWithoutContentFragment,fbe as blogFragment,QG as cartFragment,pbe as collectionFragment,gW as getProductsByHandles,eW as getProductsByHandlesQuery,UR as imageFragment,GR as metafieldFragment,mbe as metafieldFragmentStr,gbe as pageFragment,hbe as pageInfoFragment,WR as productFragment,qR as seoFragment,zr as useCopilotAction,cn as useCopilotChat,Tl as useCopilotReadable,QR as useCreateCartMutation,ue as useCreditsContext,sp as useCreditsUploadReceipt,d0 as useProductsByHandles,Se as useShopifyContext,JG as variantFragment};
|
|
667
|
+
/*! Bundled license information:
|
|
668
|
+
|
|
669
|
+
is-buffer/index.js:
|
|
670
|
+
(*!
|
|
671
|
+
* Determine if an object is a Buffer
|
|
672
|
+
*
|
|
673
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
674
|
+
* @license MIT
|
|
675
|
+
*)
|
|
676
|
+
|
|
677
|
+
react-is/cjs/react-is.production.min.js:
|
|
678
|
+
(**
|
|
679
|
+
* @license React
|
|
680
|
+
* react-is.production.min.js
|
|
681
|
+
*
|
|
682
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
683
|
+
*
|
|
684
|
+
* This source code is licensed under the MIT license found in the
|
|
685
|
+
* LICENSE file in the root directory of this source tree.
|
|
686
|
+
*)
|
|
687
|
+
|
|
688
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
689
|
+
(**
|
|
690
|
+
* @license React
|
|
691
|
+
* use-sync-external-store-shim.production.js
|
|
692
|
+
*
|
|
693
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
694
|
+
*
|
|
695
|
+
* This source code is licensed under the MIT license found in the
|
|
696
|
+
* LICENSE file in the root directory of this source tree.
|
|
697
|
+
*)
|
|
698
|
+
|
|
699
|
+
classnames/index.js:
|
|
700
|
+
(*!
|
|
701
|
+
Copyright (c) 2018 Jed Watson.
|
|
702
|
+
Licensed under the MIT License (MIT), see
|
|
703
|
+
http://jedwatson.github.io/classnames
|
|
704
|
+
*)
|
|
705
|
+
*/
|
|
2
706
|
//# sourceMappingURL=index.js.map
|