@fungi.computer/shed 0.7.4 → 0.7.6

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.
@@ -92,7 +92,7 @@ Example:
92
92
  For tests, pass a Ghostty instance directly:
93
93
  import { Ghostty, Terminal } from "ghostty-web";
94
94
  const ghostty = await Ghostty.load();
95
- const term = new Terminal({ ghostty });`)}var US;function WS(){return US??=wle.load(),US}var Ule=[``,`bold `,`italic `,`bold italic `];async function GS(e,t){await Promise.all(Ule.map(n=>document.fonts.load(`${n}${String(e)}px ${t}`)))}var Wle=L({path:Og,entries:Ng(L({name:Og,type:Ig([`file`,`directory`,`symlink`]),size:kg,modifiedAt:kg})),nextOffset:Lg(kg)}),Gle=bS(`computer.list`,1,qo(()=>xS({list:CS(SS(eo().transform(e=>bg(Wle)(e))))}))),KS=Fg([L({state:Ig([`running`,`sleeping`,`starting`,`start_failed`])}),L({state:wg(`queued`),position:kg.pipe(zg(Yg()),zg(Kg(0)))})]),qS=L({enabled:Ag,effective:Ag,blockedBy:Lg(Ig([`team`,`global`]))}),Kle=L({computerId:e_,name:e_,runtime:KS,backends:Ng(L({id:e_,kind:Ig([`platform-container`,`on-box-vm`,`local`]),status:Ig([`ready`,`queued`,`online`,`offline`]),queuePosition:Lg(kg.pipe(zg(Yg()),zg(Kg(0)))),hostId:Lg(Og),hostLabel:Lg(Og),folderLabel:Lg(Og),detachable:Ag})),internet:qS});bS(`computer.instrument.read`,1,qo(()=>xS({read:CS(SS(eo().transform(e=>bg(Kle)(e))))}))),bS(`computer.instrument.control`,1,qo(()=>xS({start:CS(SS(eo().transform(e=>bg(KS)(e)))),setInternetAccess:CS(SS(eo().transform(e=>bg(qS)(e)))),detachLocal:CS(SS(eo().transform(e=>bg(L({detached:Ag}))(e))))})));var JS=Fg([L({ports:Ng(L({port:kg.pipe(zg(Yg()),zg(Jg({minimum:1,maximum:65535}))),previewUrl:e_,openMode:Ig([`inline`,`external-only`]),expiresAt:kg.pipe(zg(Yg()),zg(Kg(0)))})).pipe(zg(Qg(64)))}),L({error:wg(`port_previews_not_configured`)})]),YS=L({port:kg.annotate({message:`Use a port from 1 to 65535.`}).check(Yg({message:`Use a port from 1 to 65535.`}),Jg({minimum:1,maximum:65535},{message:`Use a port from 1 to 65535.`})),exposed:Ag}),qle=L({port:kg.pipe(zg(Yg()),zg(Jg({minimum:1,maximum:65535}))),removed:Ag}),XS=bS(`computer.ports`,2,qo(()=>xS({list:CS(SS(eo().transform(e=>bg(JS)(e)))),expose:CS(SS(eo().transform(e=>bg(YS)(e)))),unexpose:CS(SS(eo().transform(e=>bg(qle)(e))))})));async function Jle(e){let t=bg(JS)(await e.require(XS).list());if(`error`in t)return t;for(let{previewUrl:e,expiresAt:n}of t.ports){let t=new URL(e);if(t.protocol!==`https:`||t.username||t.password||n<=Date.now())throw Error(`Computer preview URL is invalid`)}return t}var Yle=Ig([`synced`,`pending`,`unknown`]),ZS=L({port:Lg(YS.fields.port),id:e_,command:e_,cwd:Lg(Og),startedAt:kg.pipe(zg(Yg()),zg(qg(0))),state:Ig([`running`,`exited`,`uncertain`]),exitCode:Lg(kg.pipe(zg(Yg()))),sync:Yle,endedAt:Lg(kg.pipe(zg(Yg()),zg(qg(0)))),endedReason:Lg(wg(`idle-sleep`))}),Xle=L({processes:Ng(ZS)}),Zle=L({process:ZS,signalled:Ag}),Qle=L({process:ZS,lines:Ng(Og.pipe(zg(Qg(2e3)))).pipe(zg(Qg(200))),truncated:Ag});L({requestId:e_.pipe(zg(Qg(256))),command:e_.pipe(zg(Qg(16384))),cwd:Sg(Og),port:Sg(YS.fields.port)});var QS=bS(`computer.processes`,1,qo(()=>xS({start:CS(SS(eo().transform(e=>bg(ZS)(e)))),list:CS(SS(eo().transform(e=>bg(Xle)(e)))),kill:CS(SS(eo().transform(e=>bg(Zle)(e)))),logs:CS(SS(eo().transform(e=>bg(Qle)(e))))})));function $le(e){let t=Hre(e);return t.action===`setup`?{reason:`no-runtime`,message:`No Computer is running to answer this yet.`,action:`setup`}:t.action===`grant`?{reason:`not-granted`,message:`This App needs permission to see this Computer.`,action:`grant`}:{reason:`failed`,message:t.message,action:`retry`}}var eue=bS(`computer.readFile`,1,qo(()=>xS({open:CS(xS({response:CS(ns(Response)),close:wS}))}))),tue=bS(`computer.writeFile`,3,qo(()=>xS({open:CS(xS({write:wS,close:wS})),mkdir:wS,replace:CS(SS(eo().transform(e=>bg(nue)(e))))}))),nue=Fg([L({kind:wg(`replaced`),path:e_,bytes:kg.pipe(zg(Yg()),zg(qg(0)))}),L({kind:wg(`conflict`)})]),$S=L({computerName:e_.pipe(zg(Qg(256))),teamName:e_.pipe(zg(Qg(256))),modelDoor:e_.pipe(zg(Qg(256))),uptimeSeconds:kg.pipe(zg(Yg()),zg(qg(0))),version:e_.pipe(zg(Qg(64)))}),eC=bS(`computer.terminal`,2,qo(()=>xS({open:CS(xS({information:CS(SS(eo().transform(e=>bg($S)(e)))),output:CS(ns(ReadableStream).transform(e=>e.pipeThrough(new TransformStream({transform(e,t){t.enqueue(ns(Uint8Array).parse(e))}})))),input:CS(ns(WritableStream)),resize:wS,close:wS}))})));async function rue(e,t,n={}){n.signal?.throwIfAborted();let r=await e.require(eC).open(t),i,a=()=>i===void 0?(n.signal?.removeEventListener(`abort`,o),i=Promise.resolve().then(async()=>{try{await r.close()}finally{r[Symbol.dispose]()}}),i):i,o=()=>{a().catch(e=>{nv(`computer.terminal.abort-close`,e)})};n.signal?.addEventListener(`abort`,o,{once:!0});try{let[e,t,o]=await Promise.all([r.output(),r.input(),r.information()]);n.signal?.throwIfAborted();let s=e,c=t;return{information:bg($S)(o),output:s,input:c,resize:async e=>{if(n.signal?.throwIfAborted(),i!==void 0)throw Error(`Computer terminal is closed`);await r.resize(e)},close:a}}catch(e){throw await a().catch(e=>{nv(`computer.terminal.open-cleanup`,e)}),e}}function tC(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function iue(...e){return t=>{let n=!1,r=e.map(e=>{let r=tC(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():tC(e[t],null)}}}}function aue(...e){return I.useCallback(iue(...e),e)}function oue(e){let t=I.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];rC(r)&&typeof iC==`function`&&(r=iC(r._payload)),I.Children.forEach(r,e=>{if(due(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;rC(n)&&typeof iC==`function`&&(n=iC(n._payload)),a=cue(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=I.cloneElement(a,void 0,s):!o&&I.Children.count(r)===1&&I.isValidElement(r)&&(a=r);let c=a?uue(a):void 0,l=aue(n,c);if(!a){if(r||r===0)throw Error(o?hue(e):mue(e));return r}let u=lue(i,a.props??{});return a.type!==I.Fragment&&(u.ref=n?l:c),I.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var nC=oue(`Slot`),sue=Symbol.for(`radix.slottable`),cue=(e,t)=>{if(`child`in e.props){let t=e.props.child;return I.isValidElement(t)?I.cloneElement(t,void 0,e.props.children(t.props.children)):null}return I.isValidElement(t)?t:null};function lue(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function uue(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function due(e){return I.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===sue}var fue=Symbol.for(`react.lazy`);function rC(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===fue&&`_payload`in e&&pue(e._payload)}function pue(e){return typeof e==`object`&&!!e&&`then`in e}var mue=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,hue=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,iC=I.use,gue=Object.freeze({alphaIntercept:-9,alphaSlope:19,blurStdDeviation:1.5}),_ue=Object.freeze({background:`#eff1f5`,foreground:`#4c4f69`,cursor:`#4c4f69`,cursorAccent:`#eff1f5`,surface:`#ccd0da`,selectionBackground:`#4c4f69`,selectionForeground:`#eff1f5`,primary:`#f98284`,accent:`#ea76cb`,success:`#40a02b`,info:`oklch(58% 0.158 241.966)`,warning:`#df8e1d`,error:`#d20f39`,black:`#5c5f77`,red:`#d20f39`,green:`#40a02b`,yellow:`#df8e1d`,blue:`#1e66f5`,magenta:`#ea76cb`,cyan:`#179299`,white:`#4c4f69`,brightBlack:`#6c6f85`,brightRed:`#d20f39`,brightGreen:`#40a02b`,brightYellow:`#df8e1d`,brightBlue:`#1e66f5`,brightMagenta:`#8839ef`,brightCyan:`#04a5e5`,brightWhite:`#4c4f69`}),vue=Object.freeze({background:`#1e1e2e`,foreground:`#cdd6f4`,cursor:`#cdd6f4`,cursorAccent:`#1e1e2e`,surface:`#45475a`,selectionBackground:`#cdd6f4`,selectionForeground:`#1e1e2e`,primary:`#f98284`,accent:`#f5c2e7`,success:`#a6e3a1`,info:`#89b4fa`,warning:`#f9e2af`,error:`#f38ba8`,black:`#45475a`,red:`#f38ba8`,green:`#a6e3a1`,yellow:`#f9e2af`,blue:`#89b4fa`,magenta:`#f5c2e7`,cyan:`#94e2d5`,white:`#cdd6f4`,brightBlack:`#585b70`,brightRed:`#f38ba8`,brightGreen:`#a6e3a1`,brightYellow:`#f9e2af`,brightBlue:`#89b4fa`,brightMagenta:`#cba6f7`,brightCyan:`#89dceb`,brightWhite:`#cdd6f4`}),yue=Object.freeze({background:`#fbfbfa`,foreground:`#1a1b1e`,cursor:`#1a1b1e`,cursorAccent:`#fbfbfa`,surface:`#e6e6e1`,selectionBackground:`#1a1b1e`,selectionForeground:`#fbfbfa`,primary:`#e5534b`,accent:`#e5534b`,success:`#2f7a3e`,info:`#2659c4`,warning:`#9a6200`,error:`#c4383a`,black:`#5c5f66`,red:`#c4383a`,green:`#2f7a3e`,yellow:`#9a6200`,blue:`#2659c4`,magenta:`#933a88`,cyan:`#0f7079`,white:`#1a1b1e`,brightBlack:`#6b6f76`,brightRed:`#c4383a`,brightGreen:`#2f7a3e`,brightYellow:`#9a6200`,brightBlue:`#2659c4`,brightMagenta:`#933a88`,brightCyan:`#0f7079`,brightWhite:`#1a1b1e`}),bue=Object.freeze({background:`#0e0f11`,foreground:`#e3e3df`,cursor:`#e3e3df`,cursorAccent:`#0e0f11`,surface:`#26292e`,selectionBackground:`#e3e3df`,selectionForeground:`#0e0f11`,primary:`#ff7b6b`,accent:`#ff7b6b`,success:`#8fd19e`,info:`#8ab4f8`,warning:`#e7c27a`,error:`#ff8a80`,black:`#9a9ea6`,red:`#ff8a80`,green:`#8fd19e`,yellow:`#e7c27a`,blue:`#8ab4f8`,magenta:`#dba6e8`,cyan:`#7fd3d3`,white:`#e3e3df`,brightBlack:`#7d828b`,brightRed:`#ff8a80`,brightGreen:`#8fd19e`,brightYellow:`#e7c27a`,brightBlue:`#8ab4f8`,brightMagenta:`#dba6e8`,brightCyan:`#7fd3d3`,brightWhite:`#e3e3df`});function aC(e){switch(e.trim()){case`readout`:return yue;case`readout-night`:return bue;case`latte`:return _ue;case`mocha`:return vue;default:return}}var xue=Object.freeze([`2xs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`]);Object.freeze(`--stipe-font-synthesis.--stipe-surface-frame-width.--stipe-surface-frame-image.--stipe-surface-molding-contrast.--stipe-shadow-raised.--stipe-shadow-inset.--stipe-shadow-edge.--stipe-display-gasket-face.--stipe-display-texture-image.--stipe-display-text-shadow.--stipe-canvas.--stipe-surface.--stipe-surface-raised.--stipe-surface-selected.--stipe-fg-muted.--stipe-linework.--stipe-hairline.--stipe-hairline-quiet.--stipe-figure-ink.--stipe-density-compact.--stipe-density-comfortable.--stipe-motion-spring.--stipe-motion-squish.--stipe-motion-fast.--stipe-motion-normal.--stipe-motion-slow.--stipe-motion-ease.--stipe-motion-ease-exit.--stipe-motion-bounce.--stipe-motion-spring-duration.--stipe-motion-stretch.--stipe-motion-distance.--stipe-motion-stagger.--stipe-motion-blur.--stipe-motion-shake.--stipe-motion-steps.--stipe-motion-fuse.--stipe-press-depth.--stipe-press-scale.--stipe-layer-desktop.--stipe-layer-windows.--stipe-layer-chrome.--stipe-layer-popover.--stipe-layer-dialog.--stipe-layer-toast.--stipe-layer-tooltip.--stipe-overlay-shadow-outset.--stipe-icon-size-sm.--stipe-icon-size-md.--stipe-icon-size-lg.--stipe-icon-stroke.--stipe-card-rim.--stipe-card-rim-edge.--stipe-card-face.--stipe-card-panel.--stipe-card-ink.--stipe-card-ink-muted.--stipe-card-accent.--stipe-card-shadow.--stipe-card-foil-highlight.--stipe-card-foil-warm.--stipe-card-foil-cool.--stipe-avatar-shadow.--stipe-art-coral.--stipe-art-blue.--stipe-art-mint.--stipe-art-grape.--stipe-art-yellow.--stipe-art-cream.--stipe-art-ink.--stipe-art-inkcap.--stipe-art-graphite.--stipe-sketch-ink`.split(`.`));function oC(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=oC(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Sue(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=oC(e))&&(r&&(r+=` `),r+=t);return r}var sC=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,cC=Sue,Cue=(e,t)=>n=>{if(t?.variants==null)return cC(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=sC(t)||sC(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return cC(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},lC=Object.defineProperty,wue=((e,t)=>{let n={};for(var r in e)lC(n,r,{get:e[r],enumerable:!0});return t||lC(n,Symbol.toStringTag,{value:`Module`}),n})({isAny:()=>pC,isAnyNonArbitrary:()=>Rue,isArbitraryFamilyName:()=>Gue,isArbitraryImage:()=>que,isArbitraryLength:()=>Hue,isArbitraryNumber:()=>Uue,isArbitraryPosition:()=>Kue,isArbitraryShadow:()=>Jue,isArbitrarySize:()=>Vue,isArbitraryValue:()=>wC,isArbitraryVariable:()=>TC,isArbitraryVariableFamilyName:()=>Xue,isArbitraryVariableImage:()=>$ue,isArbitraryVariableLength:()=>Yue,isArbitraryVariablePosition:()=>Zue,isArbitraryVariableShadow:()=>ede,isArbitraryVariableSize:()=>Que,isArbitraryVariableWeight:()=>tde,isArbitraryWeight:()=>Wue,isFraction:()=>jue,isInteger:()=>Mue,isNamedContainerQuery:()=>zue,isNumber:()=>fC,isPercent:()=>Nue,isTshirtSize:()=>Pue}),uC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tue=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Eue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Due=/\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$/,Oue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Aue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jue=e=>Tue.test(e),fC=e=>!!e&&!Number.isNaN(Number(e)),Mue=e=>!!e&&Number.isInteger(Number(e)),Nue=e=>e.endsWith(`%`)&&fC(e.slice(0,-1)),Pue=e=>Eue.test(e),pC=()=>!0,Fue=e=>Due.test(e)&&!Oue.test(e),mC=()=>!1,Iue=e=>kue.test(e),Lue=e=>Aue.test(e),Rue=e=>!wC(e)&&!TC(e),zue=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),hC=(e,t,n)=>{let r=uC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},gC=(e,t,n=!1)=>{let r=dC.exec(e);return r?r[1]?t(r[1]):n:!1},_C=e=>e===`position`||e===`percentage`,vC=e=>e===`image`||e===`url`,yC=e=>e===`length`||e===`size`||e===`bg-size`,bC=e=>e===`length`,Bue=e=>e===`number`,xC=e=>e===`family-name`,SC=e=>e===`number`||e===`weight`,CC=e=>e===`shadow`,Vue=e=>hC(e,yC,mC),wC=e=>uC.test(e),Hue=e=>hC(e,bC,Fue),Uue=e=>hC(e,Bue,fC),Wue=e=>hC(e,SC,pC),Gue=e=>hC(e,xC,mC),Kue=e=>hC(e,_C,mC),que=e=>hC(e,vC,Lue),Jue=e=>hC(e,CC,Iue),TC=e=>dC.test(e),Yue=e=>gC(e,bC),Xue=e=>gC(e,xC),Zue=e=>gC(e,_C),Que=e=>gC(e,yC),$ue=e=>gC(e,vC),ede=e=>gC(e,CC,!0),tde=e=>gC(e,SC,!0),EC=(e,t)=>{let n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]==`string`},nde=e=>typeof e==`function`&&e.isThemeGetter===!0,rde=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),ide=(e,t)=>{let n=rde(e);t.prefix!==void 0&&(n.prefix=t.prefix);let r=(e,t)=>{if(t)for(let n in t)t[n]!==void 0&&(e[n]=t[n])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));let a=(e,t)=>{if(t)for(let n in t){let r=t[n];r&&(e[n]=(e[n]??[]).concat(r))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},DC={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},ade=25,ode=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),OC=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},kC=(e,t)=>{if(typeof t==`function`){let n=e.fnName.get(t);return n===void 0&&(n=`$c`+e.fnName.size,e.fnName.set(t,n),e.impls[n]=t),OC(e,n,t)}let n=t.$v,r=wue[n];if(DC[n]===void 0||!r)throw Error(`cn: unknown validator "${n}"`);return OC(e,n,r)},AC=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),sde=(e,t)=>e.theme[t]??[],cde=(e,t,n)=>{let r=AC(),i=(e,t)=>{for(let n of t.split(`-`)){let t=e.nextPart.get(n);t||(t=AC(),e.nextPart.set(n,t)),e=t}return e},a=(n,r,o)=>{if(typeof n==`string`){let e=n===``?r:i(r,n);e.classGroupId=o;return}if(typeof n==`function`){if(nde(n)){for(let t of n(e.theme))a(t,r,o);return}(r.validators??=[]).push({validatorId:kC(t,n),groupId:o});return}if(EC(n,`$t`)){for(let t of sde(e,n.$t))a(t,r,o);return}if(EC(n,`$v`)){(r.validators??=[]).push({validatorId:kC(t,n),groupId:o});return}for(let[e,t]of Object.entries(n)){let n=i(r,e);for(let e of t)a(e,n,o)}};for(let[t,i]of Object.entries(e.classGroups)){let e=n(t);for(let t of i)a(t,r,e)}return r},lde=e=>{let t=ode(),n=[],r=new Map,i=e=>{let t=r.get(e);return t===void 0&&(t=n.length,n.push(e),r.set(e,t)),t},a=cde(e,t,i),o=e=>{if(e.validators)return!1;for(let t of e.nextPart.values())if(!o(t))return!1;return!0},s=(e,t,n)=>{e.classGroupId>=0&&n.push({tail:t,gid:e.classGroupId});for(let[r,i]of e.nextPart)s(i,t+`-`+r,n)},c=e=>{for(let[t,n]of[...e.nextPart])o(n)?(s(n,t,e.lit),e.nextPart.delete(t)):c(n)};c(a);let l=[{edges:new Map,groupId:-1,vlist:-1}],u=()=>(l.push({edges:new Map,groupId:-1,vlist:-1}),l.length-1),d=[],f=new Map,p=e=>{let t=e.map(e=>e.validatorId+`:`+e.groupId).join(`,`),n=f.get(t);return n===void 0&&(n=d.length,d.push(e.map(e=>[e.validatorId,e.groupId])),f.set(t,n)),n},m=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e),i=l[n].edges.get(r);i===void 0&&(i=u(),l[n].edges.set(r,i)),n=i}return n},h=[],g=(e,t,n)=>{e.classGroupId>=0&&(l[t].groupId=e.classGroupId),e.validators&&(l[t].vlist=p(e.validators));for(let{tail:n,gid:r}of e.lit)h.push({anchor:t,tail:n,gid:r});for(let[r,i]of e.nextPart){let e=t;if(!n){let n=l[t].edges.get(45);n===void 0&&(n=u(),l[t].edges.set(45,n)),e=n}let a=m(e,r);g(i,a,!1)}};g(a,0,!0);let _=new Set(h.map(e=>e.anchor)),v=e=>l[e].groupId>=0||l[e].vlist>=0||_.has(e),y=new Map,b=[],x=e=>{let t=b.length;y.set(e,t);let n={edges:[],groupId:l[e].groupId,vlist:l[e].vlist};b.push(n);let r=[...l[e].edges.entries()].sort((e,t)=>e[0]-t[0]);for(let[e,t]of r){let r=String.fromCharCode(e),i=t;for(;l[i].edges.size===1&&!v(i);){let[[e,t]]=l[i].edges.entries();r+=String.fromCharCode(e),i=t}n.edges.push({label:r,oldTarget:i})}for(let e of n.edges)x(e.oldTarget);return t};x(0);let S=b.length,C=0;for(let e of b)C+=e.edges.length;let w=new Int32Array(S),T=new Int32Array(C),E=``,D=new Int32Array(S),O=new Int32Array(S),k=[];{let e=0;for(let t=0;t<S;t++){let n=b[t];w[t]=n.edges.length;for(let t of n.edges)T[e]=t.label.length,E+=t.label,k.push(y.get(t.oldTarget)),e++;D[t]=n.groupId,O[t]=n.vlist}}{let e=new Int32Array(S);for(let t=S-1;t>=0;t--){let n=1,r=t+1;for(let i=0;i<w[t];i++)n+=e[r],r+=e[r];e[t]=n}let t=0;for(let n=0;n<S;n++){let r=n+1;for(let i=0;i<w[n];i++){if(r!==k[t])throw Error(`cn compiler: edge target mismatch at ${t}`);r+=e[r],t++}}}for(let e of h)e.anchor=y.get(e.anchor);{let e=new Int32Array(d.length).fill(-1),t=[];for(let n=0;n<S;n++){let r=O[n];r>=0&&(e[r]===-1&&(e[r]=t.length,t.push(d[r])),O[n]=e[r])}d.length=0,d.push(...t)}let A=0;for(let e of d)A+=e.length;let j=new Int32Array(A),M=new Int32Array(A);{let e=0;for(let t of d)for(let[n,r]of t)j[e]=n,M[e]=r,e++}h.sort((e,t)=>e.anchor-t.anchor||e.gid-t.gid||(e.tail<t.tail?-1:1));let N=[];for(let e of h){let t=N[N.length-1];t&&t.anchor===e.anchor&&t.gid===e.gid?t.tails.push(e.tail):N.push({anchor:e.anchor,gid:e.gid,tails:[e.tail],set:-1})}let P=new Map,ee=[];for(let e of N){let t=e.tails.join(` `),n=P.get(t);n===void 0&&(n=ee.length,P.set(t,n),ee.push(e.tails)),e.set=n}for(let e of ee.flat())if(e.includes(`|`)||e.includes(` `))throw Error(`cn compiler: tail contains delimiter: `+e);let te=new Set(ee.flat()).size;N.sort((e,t)=>e.anchor-t.anchor||e.set-t.set);for(let t of Object.values(e.conflictingClassGroups))for(let e of t)i(e);for(let t of Object.values(e.conflictingClassGroupModifiers))for(let e of t)i(e);for(let t of e.postfixLookupClassGroups??[])i(t);let ne=n.length,F=new Int32Array(ne).fill(-1),re=0,ie=e=>(F[e]===-1&&(F[e]=re++),F[e]);for(let e=0;e<M.length;e++)M[e]=ie(M[e]);for(let e of N)e.gid=ie(e.gid);for(let e=0;e<D.length;e++)D[e]>=0&&(D[e]=ie(D[e]));for(let e=0;e<ne;e++)F[e]===-1&&(F[e]=re++);let ae=Array(ne);for(let e=0;e<ne;e++)ae[F[e]]=n[e];let oe=[],se=[],ce=[],le=[],ue=[];for(let t=0;t<ne;t++){let n=ae[t],i=(e.conflictingClassGroups[n]??[]).map(e=>F[r.get(e)]),a=(e.conflictingClassGroupModifiers[n]??[]).map(e=>F[r.get(e)]);i.length&&(oe.push(t),se.push(i.length),ce.push(...i));for(let e of a)le.push(t),ue.push(e)}let de=(e.postfixLookupClassGroups??[]).map(e=>F[r.get(e)]),fe=[],pe=new Int32Array(j.length);for(let e=0;e<j.length;e++){let n=t.names[j[e]],r=DC[n];if(r!==void 0)pe[e]=r;else{let t=fe.indexOf(n);t===-1&&(t=fe.length,fe.push(n)),pe[e]=ade+t}}let me=new Map,he=[],ge=[],_e=[];{let e=0;for(let t of d){let n=[];for(let r=0;r<t.length;r++)n.push(pe[e++]);let r=n.join(`,`),i=me.get(r);i===void 0&&(i=he.length,me.set(r,i),he.push(n.length),ge.push(...n)),_e.push(i)}}let ve={};for(let e of fe)ve[e]=t.classifierFns.get(e);return{G:ne,customNames:fe,impls:ve,edgeCounts:w,edgeLabelLen:T,labelText:E,edgeTargetActual:k,nodeGroup:D,nodeVlist:O,nodeCount:S,totalEdges:C,patCounts:he,patOps:ge,listPat:_e,vlistGroup:M,litEntries:h,sets:ee,attachments:N,uniqueTailCount:te,adjGid:oe,adjCnt:se,adjTgt:ce,patGid:le,patTgt:ue,postfixLookup:de,orderSensitiveModifiers:e.orderSensitiveModifiers.join(` `),prefix:e.prefix}},jC=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},ude=e=>{let t=lde(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n),o=``,s=new Int32Array(t.uniqueTailCount*2);{let e=new Map,n=0,c=0;for(let l of t.attachments)for(let u of t.sets[l.set]){let t=e.get(u);t===void 0&&(t=n++,e.set(u,t),s[t*2]=o.length,s[t*2+1]=u.length,o+=u),r[c]=l.anchor,i[c]=l.gid,a[c]=t,c++}}return{tables:{GROUP_COUNT:t.G,edgeStart:jC(t.edgeCounts),labelStart:jC(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:jC(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:s,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:jC(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},dde=`line`in Error(),MC=-1,NC=-1,PC=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},FC=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15|0},fde=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,ee=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ee=!1)}let te=1;for(;te<m.length*2;)te<<=1;let ne=new Int32Array(te).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(PC(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&te-1;for(;ne[n]!==-1;)n=n+1&te-1;ne[n]=e}let F=(e,t,n,r)=>{let i=(PC(t,n,r)^Math.imul(e,2654435761)|0)&te-1,a=r-n;for(;;){let r=ne[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&te-1}},re=n.cacheSize??8192,ie=n.prefix??e.prefix??``,ae=ie===``?``:ie+`:`,oe=ae.length,se=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ce=/\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$/,le=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,de=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=0,pe=-1,me=-1,he=-1,ge=-1,_e=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ve=e=>/\s/.test(String.fromCharCode(e)),ye=(e,t,n)=>{if(fe=0,pe=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)fe=1;else if(r===40&&i===41)fe=2;else return;he=t+1,ge=n-1;let a=t+1;if(_e(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!_e(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(pe=t+1,me=a,he=a+1)}},be=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},xe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Se=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ce=e=>!!e&&!Number.isNaN(Number(e)),we=(e,t,n)=>{if(n-t<11||!be(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&be(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&be(e,t+10,t+18,`-normal/`)},Te=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Ee=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),De=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Oe=(e,t,n,r)=>{if(e>=10){if(e>=25)return se[e-25](t.slice(n,r));let i=e-10;if(fe!==Te[i])return!1;if(pe>=0){for(let e of Ee[i])if(be(t,pe,me,e))return!0;return!1}switch(De[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(he,ge);return ce.test(e)&&!le.test(e)}case 3:return Ce(t.slice(he,ge));case 4:return de.test(t.slice(he,ge));default:return ue.test(t.slice(he,ge))}}switch(e){case 0:return!0;case 1:return fe===0;case 2:return fe===1;case 3:return fe===2;case 4:return xe.test(t.slice(n,r));case 5:return Ce(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&Ce(t.slice(n,r-1));case 8:return Se.test(t.slice(n,r));default:return we(t,n,r)}},ke=new Set(typeof E==`string`?E.split(` `):E),Ae=(e,t,n,r,i,a)=>{let o=PC(t,n,r)^(i?2654435769:0)|0,s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},je=new Map,Me=new Map,Ne=2,Pe=4096,Fe=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||ke.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Me.get(s);return c===void 0&&Me.set(s,c=Ne++),c},Ie=new Map,Le=r,Re=r+4096,ze=()=>Le++,Be=2097152,Ve=8192,He=new Int32Array(Ve),Ue=Array(Ve).fill(null),We=new Int32Array(Ve),Ge=new Int32Array(Ve),Ke=new Uint8Array(Ve),qe=0,Je=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ue[e]!==null){if(Ue[e|1]===null)c=e|1;else if(!(qe++&3))c=e|qe>>2&1;else return}Ue[c]=t.slice(n,r),He[c]=i,We[c]=a,Ge[c]=o,Ke[c]=s},Ye=()=>Ue.fill(null),Xe=256,Ze=[new Int32Array(Xe),new Int32Array(Xe),new Int32Array(Xe),new Int32Array(Xe)],[Qe,$e,et,tt]=Ze,nt=new Uint8Array(Xe),rt=new Uint8Array(Xe),it=()=>{Xe*=2,Ze=Ze.map(e=>{let t=new Int32Array(Xe);return t.set(e),t}),[Qe,$e,et,tt]=Ze;let e=new Uint8Array(Xe);e.set(nt),nt=e,rt=new Uint8Array(Xe)},at=64,ot=new Int32Array(at),st=new Int32Array(at),ct=new Int32Array(r),lt=2048,ut=21,dt=new Float64Array(lt),ft=new Int32Array(lt),pt=0,mt=(e,t)=>{if(e===0&&t<r)return ct[t]===pt?1:(ct[t]=pt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>ut;for(;ft[i]===pt;){if(dt[i]===n)return 1;i=i+1&lt-1}return dt[i]=n,ft[i]=pt,0},ht=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?MC:Ae(Ie,e,t+1,r,0,ze)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=st[t];if(r>n)continue;let i=ot[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(ee===!1||t!==91&&t!==40){let t=F(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;ye(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(Oe(d[t],e,r,n))return p[h+t]}return MC},gt=e=>{let t=e.length,n=0,c=0,u=!1;(Ne>Pe||je.size>Pe)&&(je=new Map,Me=new Map,Ne=2,Ye()),Le>Re&&(Ie=new Map,Le=r,Ye());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&ve(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&ve(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Xe&&it();let _=n++;Qe[_]=p,$e[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(He[y]===v&&Ue[y]!==null&&Ue[y].length===g?t=y:He[y|1]===v&&Ue[y|1]!==null&&Ue[y|1].length===g&&(t=y|1),t>=0){let n=Ue[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){et[_]=We[t],tt[_]=Ge[t],nt[_]=Ke[t];continue}}}let b=p;if(oe!==0){if(h-p<=oe||!e.startsWith(ae,p)){et[_]=MC,Je(y,e,p,h,v,MC,0,0);continue}b=p+oe}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,ee=0,te=0,ne=-1,F=0;(l[0]>=0||N[0]===1)&&(ot[0]=0,st[0]=M,F=1);let re=NC,ie=0;for(let t=M;t<D;t++)if(t===A&&(re=ee<te?NC:P,ie=F),P!==NC){let n=e.charCodeAt(t),r=-1;if(ee<te)o.charCodeAt(ee)===n?(ee++,ee===te&&(r=P=ne)):P=NC;else{let e=i[P],t=i[P+1],c=NC;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ee=e+1,te=a[i+1],ne=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(F===at){at*=2;let e=new Int32Array(at);e.set(ot),ot=e;let t=new Int32Array(at);t.set(st),st=t}ot[F]=r,st[F]=t+2,F++}}A===D&&(re=ee<te?NC:P,ie=F);let se=ee<te?NC:P,ce,le=!1;if(A>=0){if(le=!0,ce=ht(e,E,A,re,ie),ce!==MC&&ce<r&&j[ce]){let t=ht(e,E,D,se,F);t!==MC&&t!==ce&&(ce=t,le=!1)}else ce===MC&&(ce=ht(e,E,D,se,F),le=!1)}else ce=ht(e,E,D,se,F);let ue=0,de=0;ce===MC?et[_]=MC:(de=+!!le,ue=b>=C?+!!O:Ae(je,e,b,C,+!!O,e=>Fe(e,O)),et[_]=ce,nt[_]=de,tt[_]=ue),Je(y,e,p,h,v,ce,ue,de)}if(n===0)return``;if(n===1)return Qe[0]===0&&$e[0]===t?e:e.slice(Qe[0],$e[0]);if(n*k>lt){for(;n*k>lt;)lt<<=1,ut--;dt=new Float64Array(lt),ft=new Int32Array(lt)}if(Ne>=Be||Le>=Be)throw Error(`cn: too many distinct classes in one merge`);pt=pt+1|0,pt===0&&(ct.fill(0),ft.fill(0),pt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=et[e];if(t===MC){rt[e]=1;continue}let n=tt[e];if(mt(n,t)===1){rt[e]=0,f=!0;continue}if(rt[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)mt(n,x[e]);if(nt[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&mt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!rt[m]){m++;continue}let t=Qe[m],r=$e[m],i=m+1;for(;i<n&&rt[i]&&Qe[i]===r+1&&e.charCodeAt(r)===32;)r=$e[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},_t=16384,vt=new Int32Array(_t*2),yt=0,bt=1,xt=Object.create(null),St=Object.create(null),Ct=new Map,wt=new Map,Tt=0,Et=0,Dt=()=>{yt^=_t,bt=bt+1|0,Et=0},Ot=e=>{let t=xt[e];if(t!==void 0)return t;let n=FC(e,0,e.length),r=(n&16383)+yt,i=vt[r]===(n^bt)||vt[r^_t]===(n^bt-1);return i&&(t=St[e],t!==void 0)?(xt[e]=t,t):(t=gt(e),i?(xt[e]=t,++Tt>re&&(Tt=0,St=xt,xt=Object.create(null),Dt())):(vt[r]=n^bt,++Et>_t&&Dt()),t)},kt=e=>{let t=Ct.get(e);if(t!==void 0)return t;let n=FC(e,0,e.length),r=(n&16383)+yt,i=vt[r]===(n^bt)||vt[r^_t]===(n^bt-1);return i&&(t=wt.get(e),t!==void 0)?(Ct.set(e,t),t):(t=gt(e),i?(Ct.set(e,t),++Tt>re&&(Tt=0,wt=Ct,Ct=new Map,Dt())):(vt[r]=n^bt,++Et>_t&&Dt()),t)},At=e=>{let t=FC(e,0,e.length),n=(t&16383)+yt;return vt[n]===(t^bt)||vt[n^_t]===(t^bt-1)||(vt[n]=t^bt,++Et>_t&&Dt(),!1)},jt=re===0?gt:dde?e=>{let t=Ct.get(e);return t===void 0?kt(e):t}:Ot;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?jt(arguments[0]):jt(mde.apply(null,arguments))},mergeString:jt,seenBefore:re===0?()=>!1:At,mergeUncached:gt}},IC=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:IC(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},pde=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:IC(i,t);a&&(n&&(n+=` `),n+=a)}return n},mde=function(){return pde(arguments,!1)},hde=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},l=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},u=(t,c)=>{let u=t.length,d=s===null?null:s.n;if(!c){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let f=``,p=-1,m=0,h=!1;for(let e=0;e<u;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=IC(n,!0),!n)continue;h=!0}p<0&&(f=n,p=e),m++}}if(m===0)return``;if(m===1)return e(f);if(h){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let g=i.get(f);g===void 0&&(g=a.get(f),g!==void 0&&i.set(f,g));let _=null;if(g!==void 0)outer:for(let e=0;e<g.length;e++){let n=g[e];if(n.t!==m)continue;let r=n.a,i=1;for(let e=p+1;e<u;e++){let n=t[e];if(n&&n!==r[i++])continue outer}_=n;break}if(_===null){let s=f,c=[f];for(let e=p+1;e<u;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);_={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},g===void 0&&i.set(f,g=[]),g.length>=256&&g.shift(),g.push(_),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==_&&(s.n=_),s=_,_.r},d=t=>Array.isArray(t)?u(t.slice(),!1):e(IC(t,!0));return function(t,n,r){let i=arguments.length;if((i|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&c(i,t,n,r))return s=i,i.r;if(e!==i&&c(e,t,n,r))return e.r}return u([t,n,r],!0)}if(i===1)return typeof t==`string`?e(t):d(t);let a=s;if(a!==null){let e=a.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<i;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(a!==e){let e=a.a,t=0,n=!0;for(let r=0;r<i;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===a.t)return a.r}}let o=[];for(let e=0;e<i;e++)o.push(arguments[e]);return u(o,!0)}},gde=`{"theme":{"animate":[{"$v":"isAny"}],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]},"columns-auto"],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],"box":[{"box":["border","content"]}],"display":["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],"sr":["sr-only","not-sr-only"],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"inline":[{"$t":"container"}]}],"min-inline-size":[{"min-inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"min-inline":[{"$t":"container"}]}],"max-inline-size":[{"max-inline":["none",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"max-inline":[{"$t":"container"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},"max-h-none"],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"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":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":[{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"whitespace":[{"whitespace":["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],"break":[{"break":["normal","words","all","keep"]}],"wrap":[{"wrap":["break-word","anywhere","normal"]}],"hyphens":[{"hyphens":["none","manual","auto"]}],"content":[{"content":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]},"bg-conic"],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]},"shadow-inner"],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{"mask":["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{"closest":["side","corner"],"farthest":["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"color-scheme":[{"scheme":["normal","dark","light","light-dark","only-dark","only-light"]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],"resize":[{"resize":["none","","y","x"]}],"scroll-behavior":[{"scroll":["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"conflictingClassGroups":{"container-named":["container-type"],"overflow":["overflow-x","overflow-y"],"overscroll":["overscroll-x","overscroll-y"],"inset":["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],"px":["pr","pl"],"py":["pt","pb"],"m":["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],"translate":["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}`,LC=()=>JSON.parse(gde),_de=e=>`classGroups`in e&&`theme`in e&&`conflictingClassGroups`in e,vde=e=>e===void 0?{config:LC()}:typeof e==`function`?{config:e(LC())}:_de(e)?{config:e}:{config:ide(LC(),e),cacheSize:e.cacheSize},yde=e=>{let{config:t,cacheSize:n}=vde(e),{tables:r,validatorImpls:i,prefix:a}=ude(t);return fde(r,i,{cacheSize:n,prefix:a})},RC=(e=>{let t=null,n=()=>t??=yde(e);return hde(e=>n().mergeString(e),{seenBefore:e=>n().seenBefore(e),mergeUncached:e=>n().mergeUncached(e)})})({extend:{theme:{spacing:[...xue]}}}),zC=Object.freeze({reduced:!1,squish:90,fast:120,normal:180,slow:280,springDuration:320,bounce:.3,stretch:.28,distance:4,stagger:24,blur:0,shake:3,steps:0,fuse:1,pressDepth:.5,pressScale:1,ease:`cubic-bezier(0.2, 0, 0, 1)`,easeExit:`cubic-bezier(0.4, 0, 1, 1)`}),BC=`(prefers-reduced-motion: reduce)`;function VC(e){let t=e.ownerDocument.defaultView;if(!t)return zC;let n=t.getComputedStyle(e),r=(e,t)=>{let r=n.getPropertyValue(e).trim(),i=Number.parseFloat(r);return Number.isFinite(i)?Math.max(0,i):t},i=(e,t)=>{let i=n.getPropertyValue(e).trim();return r(e,t)*(i.endsWith(`s`)&&!i.endsWith(`ms`)?1e3:1)},a=t.matchMedia?.(BC).matches??!1,o=(e,t)=>a?120:i(`--stipe-motion-${e}`,t),s=(e,t)=>a?0:r(`--stipe-motion-${e}`,t);return{reduced:a,squish:o(`squish`,zC.squish),fast:o(`fast`,zC.fast),normal:o(`normal`,zC.normal),slow:o(`slow`,zC.slow),springDuration:o(`spring-duration`,zC.springDuration),bounce:Math.min(1,s(`bounce`,zC.bounce)),stretch:s(`stretch`,zC.stretch),distance:s(`distance`,zC.distance),stagger:a?0:i(`--stipe-motion-stagger`,zC.stagger),blur:s(`blur`,zC.blur),shake:s(`shake`,zC.shake),steps:Math.floor(s(`steps`,zC.steps)),fuse:r(`--stipe-motion-fuse`,zC.fuse),pressDepth:a?0:r(`--stipe-press-depth`,zC.pressDepth),pressScale:a?1:r(`--stipe-press-scale`,zC.pressScale),ease:n.getPropertyValue(`--stipe-motion-ease`).trim()||zC.ease,easeExit:n.getPropertyValue(`--stipe-motion-ease-exit`).trim()||zC.easeExit}}function HC(e){let[t,n]=(0,I.useState)(()=>({...zC,reduced:!0}));return(0,I.useLayoutEffect)(()=>{let t=e.current,r=t?.ownerDocument.defaultView;if(!t||!r)return;let i=()=>{let e=VC(t);n(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};i();let a=new r.MutationObserver(i);for(let e=t;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`data-theme`,`class`,`style`]});let o=r.matchMedia?.(BC);return o?.addEventListener(`change`,i),()=>{a.disconnect(),o?.removeEventListener(`change`,i)}},[e]),t}function UC(e,t){return e.reduced?0:Math.round(t*e.normal/zC.normal)}function bde(e,t){if(e.reduced)return 0;let n=t*e.bounce/zC.bounce;return Math.min(.9,Math.max(0,n))}function xde(e,t){return e.reduced?0:Math.round(t*e.springDuration/zC.springDuration)}function WC(e,t){return e.steps>0?`steps(${String(e.steps)}, end)`:t}function GC(e){return`animate`in e}var KC=globalThis;function Sde(){return KC.matchMedia?.(BC).matches??!1}function Cde(e){let t=KC.matchMedia?.(BC);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function wde(){return!0}function qC(){return(0,I.useSyncExternalStore)(Cde,Sde,wde)}var JC=(0,I.forwardRef)(function({asChild:e=!1,className:t,...n},r){let i=RC(`absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]`,t);return e?(0,R.jsx)(nC,{...n,className:i,ref:r}):(0,R.jsx)(`span`,{...n,className:i,ref:r})}),YC=typeof window<`u`,XC=YC?window:null,ZC=YC?document:null,QC={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},$C={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},ew={NONE:0,AUTO:1,FORCE:2},tw={replace:0,none:1,blend:2},nw=Symbol(),rw=Symbol(),iw=Symbol(),aw=Symbol(),Tde=Symbol(),ow=1e-11,sw=0xe8d4a51000,cw=1e3,lw=[],uw=(()=>{let e=new Map;return e.set(`x`,`translateX`),e.set(`y`,`translateY`),e.set(`z`,`translateZ`),e})(),dw=[`perspective`,`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`],Ede=dw.reduce((e,t)=>({...e,[t]:t+`(`}),{}),fw=()=>{},Dde=e=>e,Ode=/\)\s*[-.\d]/,kde=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,Ade=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,jde=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,Mde=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,Nde=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,pw=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,Pde=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,mw=/([a-z])([A-Z])/g,hw=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,gw={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:cw,delay:0,loopDelay:0,ease:`out(2)`,composition:tw.replace,modifier:Dde,onBegin:fw,onBeforeUpdate:fw,onUpdate:fw,onLoop:fw,onPause:fw,onComplete:fw,onRender:fw},_w={current:null,root:ZC},vw={defaults:gw,precision:4,timeScale:1,tickThreshold:200,editor:null},yw={version:`4.5.0`,engine:null};YC&&(XC.AnimeJS||=[],XC.AnimeJS.push(yw));var bw=e=>e.replace(mw,`$1-$2`).toLowerCase(),xw=(e,t)=>e.indexOf(t)===0,Sw=Date.now,Cw=Array.isArray,ww=e=>e&&e.constructor===Object,Fde=e=>typeof e==`number`&&!isNaN(e),Tw=e=>typeof e==`string`,Ew=e=>typeof e==`function`,Dw=e=>e===void 0,Ow=e=>Dw(e)||e===null,kw=e=>YC&&e instanceof SVGElement,Aw=e=>kde.test(e),jw=e=>xw(e,`rgb`),Mw=e=>xw(e,`hsl`),Ide=e=>Aw(e)||(jw(e)||Mw(e))&&(e[e.length-1]===`)`||!Ode.test(e)),Nw=e=>!vw.defaults.hasOwnProperty(e),Lde=[`opacity`,`rotate`,`overflow`,`color`],Rde=(e,t)=>{if(Lde.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===`scale`){let t=e.parentNode;return t&&t.tagName===`filter`}return!0}},Pw=Math.pow,Fw=Math.sqrt,Iw=Math.sin,Lw=Math.cos,Rw=Math.abs,zw=Math.exp,zde=Math.ceil,Bw=Math.floor,Bde=Math.asin,Vw=Math.PI,Hw=Math.round,Uw=(e,t,n)=>e<t?t:e>n?n:e,Ww=(e,t)=>{if(t<0)return e;if(!t)return Hw(e);let n=10**t;return Hw(e*n)/n},Gw=(e,t,n)=>n===1?t:n===0?e:e+(t-e)*n,Kw=e=>e===1/0?sw:e===-1/0?-sw:e,qw=e=>e<=1e-11?ow:Kw(Ww(e,11)),Jw=e=>Cw(e)?[...e]:e,Vde=(e,t)=>{let n={...e};for(let r in t){let i=e[r];n[r]=Dw(i)?t[r]:i}return n},Yw=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._head,o=i;for(n&&(a=e._tail,o=r);a;){let e=a[o];t(a),a=e}},Xw=(e,t,n=`_prev`,r=`_next`)=>{let i=t[n],a=t[r];i?i[r]=a:e._head=a,a?a[n]=i:e._tail=i,t[n]=null,t[r]=null},Zw=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._tail;for(;a&&n&&n(a,t);)a=a[r];let o=a?a[i]:e._head;a?a[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=a,t[i]=o},Hde=(e,t,n)=>{let r=e.style.transform;if(r){let i=e[aw],a=0,o=r.length,s;for(;a<o;){for(;a<o&&r.charCodeAt(a)===32;)a++;if(a>=o)break;let e=a;for(;a<o&&r.charCodeAt(a)!==40;)a++;if(a>=o)break;let t=r.substring(e,a),n=1,c=a+1,l=-1,u=-1;for(a++;a<o&&n>0;){let e=r.charCodeAt(a);e===40?n++:e===41?n--:e===44&&n===1&&(l===-1?l=a:u===-1&&(u=a)),a++}let d=a-1;t===`translate`||t===`translate3d`?(l===-1?i.translateX=r.substring(c,d).trim():(i.translateX=r.substring(c,l).trim(),u===-1?i.translateY=r.substring(l+1,d).trim():(i.translateY=r.substring(l+1,u).trim(),i.translateZ=r.substring(u+1,d).trim())),s=r.substring(c,d)):t===`scale`||t===`scale3d`?l===-1?i.scale=r.substring(c,d).trim():(i.scaleX=r.substring(c,l).trim(),u===-1?i.scaleY=r.substring(l+1,d).trim():(i.scaleY=r.substring(l+1,u).trim(),i.scaleZ=r.substring(u+1,d).trim())):i[t]=r.substring(c,d)}if(t===`translate3d`&&s)return n&&(n[t]=s),s;let c=i[t];if(!Dw(c))return n&&(n[t]=c),c}return t===`translate3d`?`0px, 0px, 0px`:t===`rotate3d`?`0, 0, 0, 0deg`:xw(t,`scale`)?`1`:xw(t,`rotate`)||xw(t,`skew`)?`0deg`:`0px`},Qw=e=>{let t=``;for(let n=0,r=dw.length;n<r;n++){let r=dw[n],i=e[r];if(i!==void 0){if(r===`translateX`){let r=e.translateY;if(r!==void 0){let a=e.translateZ;a===void 0?(t+=`translate(${i},${r}) `,n+=1):(t+=`translate3d(${i},${r},${a}) `,n+=2);continue}}if(r===`scaleX`&&e.scale===void 0){let r=e.scaleY;if(r!==void 0){let a=e.scaleZ;a===void 0?(t+=`scale(${i},${r}) `,n+=1):(t+=`scale3d(${i},${r},${a}) `,n+=2);continue}}t+=`${Ede[r]}${i}) `}r===`rotateZ`&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},$w=[];function eT(e,t){if(!e)return null;let n=$w.length;outer:for(let r=0;r<n;r++){let n=$w[r];if(n.detect&&!n.detect(e))continue;let i=n.targetAdapters;for(let n=0,r=i.length;n<r;n++){let r=i[n];if(r.detect(e)){let n=r.props[t];if(n&&(!n.gate||n.gate(e)))return n;break outer}}}for(let r=0;r<n;r++){let n=$w[r];if(n.detect&&!n.detect(e))continue;let i=n.propertyResolvers;for(let n=0,r=i.length;n<r;n++){let r=i[n](e,t);if(r)return r}}return null}var Ude=e=>{let t=Ade.exec(e)||jde.exec(e),n=Dw(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]},Wde=e=>{let t=e.length,n=t===4||t===5;return[+(`0x`+e[1]+e[n?1:2]),+(`0x`+e[n?2:3]+e[n?2:4]),+(`0x`+e[n?3:5]+e[n?3:6]),t===5||t===9?+((`0x`+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]},tT=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),Gde=e=>{let t=Mde.exec(e)||Nde.exec(e),n=t[1]/360,r=t[2]/100,i=t[3]/100,a=Dw(t[4])?1:+t[4],o,s,c;if(r===0)o=s=c=i;else{let e=i<.5?i*(1+r):i+r-i*r,t=2*i-e;o=Ww(tT(t,e,n+1/3)*255,0),s=Ww(tT(t,e,n)*255,0),c=Ww(tT(t,e,n-1/3)*255,0)}return[o,s,c,a]},Kde=e=>jw(e)?Ude(e):Aw(e)?Wde(e):Mw(e)?Gde(e):[0,0,0,1],nT=(e,t)=>Dw(e)?t:e,rT=(e,t)=>{let n=e.match(hw),r=t[rw]?t:document.documentElement,i=getComputedStyle(r)?.getPropertyValue(n[1]);return(!i||i.trim()===``)&&n[2]&&(i=n[2].trim()),i||0},iT=(e,t,n,r,i,a)=>{if(Ew(e)){if(!i){let i=e(t,n,r,a);return isNaN(+i)?i||0:+i}let o=()=>{let i=e(t,n,r,a);return isNaN(+i)?i||0:+i};return i.func=o,o()}if(Tw(e)&&xw(e,`var(`)){if(!i)return rT(e,t);let n=()=>rT(e,t);return i.func=n,n()}return e},aT=(e,t)=>e[rw]?e[iw]&&Rde(e,t)?QC.ATTRIBUTE:dw.includes(t)||uw.get(t)?QC.TRANSFORM:xw(t,`--`)?QC.CSS_VAR:t in e.style?QC.CSS:t in e?QC.OBJECT:QC.ATTRIBUTE:QC.OBJECT,oT=(e,t,n)=>{let r=e.style[t];r&&n&&(n[t]=r);let i=r||getComputedStyle(e[Tde]||e).getPropertyValue(t);return i===`auto`?`0`:i},sT=(e,t,n,r)=>{let i=Dw(n)?aT(e,t):n,a=eT(e,t);if(a){let n=a.get(e);return n&&r&&(r[t]=n),n??0}if(i===QC.OBJECT){let n=e[t];return n&&r&&(r[t]=n),n||0}if(i===QC.ATTRIBUTE){let n=e.getAttribute(t);return n&&r&&(r[t]=n),n}return i===QC.TRANSFORM?Hde(e,t,r):i===QC.CSS_VAR?oT(e,t,r).trimStart():oT(e,t,r)},cT=(e,t,n)=>n===`-`?e-t:n===`+`?e+t:e*t,lT=()=>({t:$C.NUMBER,n:0,u:null,o:null,d:null,s:null}),uT=(e,t)=>{if(t.t=$C.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;let n=+e;if(!isNaN(n))return t.n=n,t;let r=e;r[1]===`=`&&(t.o=r[0],r=r.slice(2));let i=!r.includes(` `)&&Pde.exec(r);if(i)return t.t=$C.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(Ide(r))return t.t=$C.COLOR,t.d=Kde(r),t;{let e=r.match(pw);return t.t=$C.COMPLEX,t.d=e?e.map(Number):[],t.s=r.split(pw)||[],t}},dT=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=Jw(e._toNumbers),t.s=Jw(e._strings),t),fT=lT(),pT=(e,t,n)=>{let r=e._modifier,i=e._fromNumbers,a=e._toNumbers,o=e._strings,s=o[0];for(let c=0,l=a.length;c<l;c++){let l=r(Ww(Gw(i[c],a[c],t),n)),u=o[c+1];s+=`${u?l+u:l}`,e._numbers[c]=l}return s},mT=(e,t,n,r,i)=>{let a=e.parent,o=e.duration,s=e.completed,c=e.iterationDuration,l=e.iterationCount,u=e._currentIteration,d=e._loopDelay,f=e._reversed,p=e._alternate,m=e._hasChildren,h=e._delay,g=e._currentTime,_=h+c,v=t-h,y=Uw(g,-h,o),b=Uw(v,-h,o),x=v-g,S=b>0,C=b>=o,w=o<=ow,T=i===ew.FORCE,E=0,D=v,O=0;if(l>1){let t=c+(C?0:d),n=~~(b/t);e._currentIteration=Uw(n,0,l),C&&e._currentIteration--,E=e._currentIteration%2,D=b-n*t||0}let k=f^(p&&E),A=e._ease,j=C?k?0:o:k?c-D:D;A&&(j=c*A(j/c)||0);let M=(a?a.backwards:v<g)?!k:!!k;if(e._currentTime=v,e._iterationTime=j,e.backwards=M,S&&!e.began?(e.began=!0,!n&&!(a&&(M||!a.began))&&e.onBegin(e)):v<=0&&(e.began=!1),!n&&!m&&S&&e._currentIteration!==u&&e.onLoop(e),T||i===ew.AUTO&&(t>=(a&&h>0?0:h)&&t<=_||t<=h&&y>h||t>=_&&y!==o)||j>=_&&y!==o||j<=h&&y>0&&!C||t<=y&&y===o&&s||C&&!s&&w){if(S&&(e.computeDeltaTime(y),n||e.onBeforeUpdate(e)),!m){let t=T||(M?x*-1:x)>=vw.tickThreshold,i=Ww(e._offset+(a?a._offset:0)+h+j,12),o=e._head,s,c,l,u,d=0;for(;o;){let e=o._composition,n=o._currentTime,a=o._changeDuration,f=o._absoluteStartTime+o._changeDuration,p=o._nextRep,m=o._prevRep,h=e!==tw.none,g=m?m._absoluteStartTime+m._changeDuration:0,_=m&&m.parent!==o.parent,v=!p||p._isOverridden?f:p.parent===o.parent?f+p._delay:p._absoluteStartTime<p._absoluteUpdateStartTime?p._absoluteStartTime:p._absoluteUpdateStartTime;if((t||(n!==a||i<=v||m&&!_&&(!p||p.parent!==o.parent))&&(n!==0||i>=o._absoluteStartTime||_&&!o._hasFromValue&&!m._isOverridden&&i>=g||p&&!p._isOverridden&&p.parent===o.parent&&p._currentTime!==0&&j<p._startTime))&&(!m||_||j>=o._startTime)&&(!h||!o._isOverridden&&(!o._isOverlapped||i<=f)&&(!p||p._isOverridden||i<=v)&&(!m||m._isOverridden||(_?i>=o._absoluteStartTime||!o._hasFromValue&&i>=g:i>=g+o._delay)))){let t=o._currentTime=Uw(j-o._startTime,0,a),n=o._ease(t/o._updateDuration),i=o._modifier,f=o._valueType,p=o._tweenType,m=p===QC.OBJECT,g=f===$C.NUMBER,_=g&&m||n===0||n===1?-1:vw.precision,v,y;if(g)v=y=i(Ww(Gw(o._fromNumber,o._toNumber,n),_));else if(f===$C.UNIT)y=i(Ww(Gw(o._fromNumber,o._toNumber,n),_)),v=`${y}${o._unit}`;else if(f===$C.COLOR){let e=o._numbers,t=o._fromNumbers,a=o._toNumbers,s=1-n,c=t[0],l=t[1],u=t[2],d=a[0],f=a[1],p=a[2];e[0]=i(Math.sqrt(c*c*s+d*d*n)),e[1]=i(Math.sqrt(l*l*s+f*f*n)),e[2]=i(Math.sqrt(u*u*s+p*p*n)),e[3]=i(Gw(t[3],a[3],n)),(!o._setter||r)&&(v=`rgba(${Ww(e[0],0)},${Ww(e[1],0)},${Ww(e[2],0)},${e[3]})`)}else f===$C.COMPLEX&&(v=pT(o,n,_));if(h&&(o._number=y),!r&&e!==tw.blend){let e=o.property;s=o.target,o._setter?o._setter(s,y,o):m?s[e]=v:p===QC.ATTRIBUTE?s.setAttribute(e,v):(c=s.style,p===QC.TRANSFORM?(s!==l&&(l=s,u=s[aw]),u[e]=v,d=1):p===QC.CSS?c[e]=v:p===QC.CSS_VAR&&c.setProperty(e,v)),S&&(O=1)}else o._value=v}else n&&m&&!_&&j<o._startTime&&(o._currentTime=0);d&&o._renderTransforms&&(c.transform=Qw(u),d=0),o=o._next}!n&&O&&e.onRender(e)}!n&&S&&e.onUpdate(e)}return a&&w?!n&&(a.began&&!M&&v>0&&!s||M&&v<=1e-11&&s)&&(e.onComplete(e),e.completed=!M):S&&C?l===1/0?e._startTime+=e.duration:e._currentIteration>=l-1&&(e.paused=!0,!s&&!m&&(e.completed=!0,!n&&!(a&&(M||!a.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,O},hT=(e,t,n,r,i)=>{let a=e._currentIteration;if(mT(e,t,n,r,i),e._hasChildren){let o=e,s=o.backwards,c=r?t:o._iterationTime,l=Sw(),u=0,d=!0;if(!r&&o._currentIteration!==a){let e=o.iterationDuration;Yw(o,t=>{if(!s)!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&mT(t,e,n,1,ew.FORCE),t.began=!1,t.completed=!1;else{let r=t.duration,i=t._offset+t._delay,a=i+r;!n&&r<=1e-11&&(!i||a===e)&&t.onComplete(t)}}),n||o.onLoop(o)}Yw(o,e=>{let t=Ww((c-e._offset)*e._speed,12);if(s&&t>e._delay+e.duration)return;let a=e._fps<o._fps?e.requestTick(l):i;u+=mT(e,t,n,r,a),!e.completed&&d&&(d=!1)},s),!n&&u&&o.onRender(o),(d||s)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,n||(o.onComplete(o),o._resolve(o))))}},gT={},_T=(e,t,n)=>{if(n===QC.TRANSFORM)return uw.get(e)||e;if(n===QC.CSS||n===QC.ATTRIBUTE&&kw(t)&&e in t.style){let t=gT[e];if(t)return t;{let t=e&&bw(e);return gT[e]=t,t}}return e},vT=(e,t=!1)=>{if(e._hasChildren)Yw(e,e=>vT(e,t),!0);else{let n=e;n.pause(),Yw(n,e=>{let r=e.property,i=e.target,a=e._tweenType,o=e._inlineValue,s=Ow(o)||o===``;if(e._setter){if(!t&&!s){if(uT(o,fT),fT.d){let t=fT.d,n=e._numbers;for(let e=0,r=t.length;e<r;e++)n[e]=t[e]}else e._number=fT.n;e._setter(e.target,e._number,e)}}else if(a===QC.OBJECT)!t&&!s&&(i[r]=o);else if(i[rw]){if(a===QC.ATTRIBUTE)t||(s?i.removeAttribute(r):i.setAttribute(r,o));else{let t=i.style;if(a===QC.TRANSFORM){let n=i[aw];s?delete n[r]:n[r]=o,e._renderTransforms&&(Object.keys(n).length?t.transform=Qw(n):t.removeProperty(`transform`))}else s?t.removeProperty(bw(r)):t[r]=o}}i[rw]&&n._tail===e&&n.targets.forEach(e=>{e.getAttribute&&e.getAttribute(`style`)===``&&e.removeAttribute(`style`)})})}return e},yT=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=cw/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){let t=+e,n=t<1e-11?ow:t,r=cw/n;n>gw.frameRate&&(gw.frameRate=n),this._fps=n,this._frameDuration=r}get speed(){return this._speed}set speed(e){let t=+e;this._speed=t<1e-11?ow:t}requestTick(e){let t=this._frameDuration,n=e-this._lastTickTime,r=t*.25;return n+(r<4?r:4)<t?ew.NONE:(this._lastTickTime=n>=t?e-n%t:e,ew.AUTO)}computeDeltaTime(e){let t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},bT={animation:null,update:fw},xT=e=>{let t=bT.animation;return t||(t={duration:ow,computeDeltaTime:fw,_offset:0,_delay:0,_head:null,_tail:null},bT.animation=t,bT.update=()=>{e.forEach(e=>{for(let t in e){let n=e[t],r=n._head;if(r){let e=r._valueType,t=e===$C.COMPLEX||e===$C.COLOR?Jw(r._fromNumbers):null,i=r._fromNumber,a=n._tail;for(;a&&a!==r;){if(t)for(let e=0,n=a._numbers.length;e<n;e++)t[e]+=a._numbers[e];else i+=a._number;a=a._prevAdd}r._toNumber=i,r._toNumbers=t}}}),mT(t,1,1,0,ew.FORCE)}),t},ST=YC?requestAnimationFrame:setImmediate,CT=YC?cancelAnimationFrame:clearImmediate,wT=class extends yT{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=gw,this.paused=!0,this.reqId=0}update(){let e=this._currentTime=Sw();if(this.requestTick(e)){this.computeDeltaTime(e);let t=this._speed,n=this._fps,r=this._head;for(;r;){let i=r._next;r.paused?(Xw(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):hT(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):ew.AUTO),r=i}bT.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(Sw()),this.reqId=ST(ET)),this}pause(){if(this.reqId)return this.paused=!0,DT()}resume(){if(this.paused)return this.paused=!1,Yw(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(vw.timeScale===1?1:cw)}set speed(e){let t=e*vw.timeScale;this._speed!==t&&(this._speed=t,Yw(this,e=>e.speed=e._speed))}get timeUnit(){return vw.timeScale===1?`ms`:`s`}set timeUnit(e){let t=.001,n=e===`s`,r=n?t:1;if(vw.timeScale!==r){vw.timeScale=r,vw.tickThreshold=200*r;let e=n?t:cw;this.defaults.duration*=e,this._speed*=e}}get precision(){return vw.precision}set precision(e){vw.precision=e}},TT=(()=>{let e=new wT(Sw());return YC&&(yw.engine=e,ZC.addEventListener(`visibilitychange`,()=>{e.pauseOnDocumentHidden&&(ZC.hidden?e.pause():e.resume())})),e})(),ET=()=>{TT._head?(TT.reqId=ST(ET),TT.update()):TT.reqId=0},DT=()=>(CT(TT.reqId),TT.reqId=0,TT),OT={_rep:new WeakMap,_add:new Map},kT=(e,t,n=`_rep`)=>{let r=OT[n],i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},qde=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,AT=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=ow,e._currentTime=ow},jT=(e,t)=>{let n=e._composition;if(n===tw.replace){let n=e._absoluteStartTime;Zw(t,e,qde,`_prevRep`,`_nextRep`);let r=e._prevRep;if(r){let t=r.parent,i=r._absoluteEndTime;if(e.parent.id!==t.id&&t.iterationCount>1&&i+(t.duration-t.iterationDuration)>n){AT(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)AT(e),e=e._prevRep}let a=e._absoluteUpdateStartTime;if(i>a){let e=r._startTime,t=Ww(a-(i-(e+r._updateDuration))-e,12);r._changeDuration=t,r._currentTime=t,r._isOverlapped=1,t<1e-11&&AT(r)}let o=e.parent.parent;if(!o||o!==t.parent){let e=!0;if(Yw(t,t=>{t._isOverlapped||(e=!1)}),e){let e=t.parent;if(e){let n=!0;Yw(e,e=>{e!==t&&Yw(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}}else if(n===tw.blend){let t=kT(e.target,e.property,`_add`),n=xT(OT._add),r=t._head;r||(r={...e},r._composition=tw.replace,r._updateDuration=ow,r._startTime=0,r._numbers=Jw(e._fromNumbers),r._number=0,r._next=null,r._prev=null,Zw(t,r),Zw(n,r));let i=e._toNumber;if(e._fromNumber=r._fromNumber-i,e._toNumber=0,e._numbers=Jw(e._fromNumbers),e._number=0,r._fromNumber=i,e._toNumbers.length){let t=Jw(e._toNumbers);t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}Zw(t,e,null,`_prevAdd`,`_nextAdd`)}return e},Jde=e=>{let t=e._composition;if(t!==tw.none){let n=e.target,r=e.property,i=OT._rep.get(n)[r];if(Xw(i,e,`_prevRep`,`_nextRep`),t===tw.blend){let t=OT._add,i=t.get(n);if(!i)return;let a=i[r],o=bT.animation;Xw(a,e,`_prevAdd`,`_nextAdd`);let s=a._head;if(s&&s===a._tail){Xw(a,s,`_prevAdd`,`_nextAdd`),Xw(o,s);let e=!0;for(let t in i)if(i[t]._head){e=!1;break}e&&t.delete(n)}}}return e},MT=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),NT=e=>e._cancelled?(e._hasChildren?Yw(e,NT):Yw(e,e=>{e._composition!==tw.none&&jT(e,kT(e.target,e.property))}),e._cancelled=0,e):e,PT=0,Yde=(e,t)=>e._priority>t._priority,Xde=class extends yT{constructor(e={},t=null,n=0){super(0),++PT;let{id:r,delay:i,duration:a,reversed:o,alternate:s,loop:c,loopDelay:l,autoplay:u,frameRate:d,playbackRate:f,priority:p,onComplete:m,onLoop:h,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:y}=e;_w.current&&_w.current.register(this);let b=t?0:TT._lastTickTime,x=t?t.defaults:vw.defaults,S=Ew(i)||Dw(i)?x.delay:+i,C=Ew(a)||Dw(a)?1/0:+a,w=nT(c,x.loop),T=nT(l,x.loopDelay),E=w===!0||w===1/0||w<0?1/0:w+1,D=0;t?D=n:(TT.reqId||TT.requestTick(Sw()),D=(TT._lastTickTime-TT._startTime)*vw.timeScale),this.id=Dw(r)?PT:r,this.parent=t,this.duration=Kw((C+T)*E-T)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||x.onBegin,this.onBeforeUpdate=v||x.onBeforeUpdate,this.onUpdate=y||x.onUpdate,this.onLoop=h||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=C,this.iterationCount=E,this._autoplay=!t&&nT(u,x.autoplay),this._offset=D,this._delay=S,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=fw,this._running=!1,this._reversed=+nT(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=nT(s,x.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=nT(d,x.frameRate),this._speed=nT(f,x.playbackRate),this._priority=+nT(p,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Uw(Ww(this._currentTime,vw.precision),-this._delay,this.duration)}set currentTime(e){let t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return Uw(Ww(this._iterationTime,vw.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Uw(Ww(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Uw(Ww(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){let t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Uw(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return NT(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,hT(this,0,1,~~e,ew.FORCE),MT(this),this._hasChildren&&Yw(this,MT),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&hT(this,this.duration,1,~~e,ew.FORCE),this.reset(e);let t=this._autoplay;return t===!0?this.resume():t&&!Dw(t.linked)&&t.link(this),this}resetTime(){let e=1/(this._speed*TT._speed);return this._startTime=Sw()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?hT(this,ow,0,0,ew.FORCE):(this._running||=(Zw(TT,this,Yde),TT._hasChildren=!0,!0),this.resetTime(),this._startTime-=12,TT.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,n=0){NT(this),this.completed=!1;let r=this.paused;return this.paused=!0,hT(this,e+this._delay,~~t,~~n,ew.AUTO),r?this:this.resume()}alternate(){let e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?Bw(sw/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Yw(this,e=>e.cancel(),!0):Yw(this,Jde),this._cancelled=1,this.pause()}stretch(e){let t=this.duration,n=qw(e);if(t===n)return this;let r=e/t,i=e<=ow;return this.duration=i?ow:n,this.iterationDuration=i?ow:qw(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){hT(this,0,1,0,ew.AUTO);let e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=fw){let t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=fw};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}};function FT(e){let t=Tw(e)?_w.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function Zde(e){if(Ow(e))return[];if(!YC)return Cw(e)&&e.flat(1/0)||[e];if(Cw(e)){let t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!Ow(r)){let e=FT(r);if(e)for(let t=0,r=e.length;t<r;t++){let r=e[t];if(!Ow(r)){let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}let t=FT(e);return t?Array.from(t):[e]}function Qde(e){let t=Zde(e),n=t.length;for(let e=0;e<n;e++){let n=t[e];if(!n[nw]){n[nw]=!0;let e=kw(n);(n.nodeType||e)&&(n[rw]=!0,n[iw]=e,n[aw]={})}}return t}var IT={deg:1,rad:180/Vw,turn:360},LT={},RT=(e,t,n,r=!1)=>{let i=t.u,a=t.n;if(t.t===$C.UNIT&&i===n)return t;let o=a+i+n,s=LT[o];if(!Dw(s)&&!r)t.n=s;else{let r;if(i in IT)r=a*IT[i]/IT[n];else{let t=e.cloneNode(),o=e.parentNode,s=o&&o!==ZC?o:ZC.body;s.appendChild(t);let c=t.style;c.width=100+i;let l=t.offsetWidth||100;c.width=100+n;let u=l/(t.offsetWidth||100);s.removeChild(t),r=u*a}t.n=r,LT[o]=r}return t.t,$C.UNIT,t.u=n,t},zT=e=>e,BT=(e=1.68)=>t=>Pw(t,+e),VT={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},$de=Vw/2,HT=Vw*2,UT={"":BT,Quad:BT(2),Cubic:BT(3),Quart:BT(4),Quint:BT(5),Sine:e=>1-Lw(e*$de),Circ:e=>1-Fw(1-e*e),Expo:e=>e?Pw(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=Pw(2,--n))-1)/11;);return 1/Pw(4,3-n)-7.5625*Pw((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{let n=Uw(+e,1,10),r=Uw(+t,ow,2),i=r/HT*Bde(1/n),a=HT/r;return e=>e===0||e===1?e:-n*Pw(2,-10*(1-e))*Iw((1-e-i)*a)}},WT=(()=>{let e={linear:zT,none:zT};for(let t in VT)for(let n in UT){let r=UT[n],i=VT[t];e[t+n]=n===``||n===`Back`||n===`Elastic`?(e,t)=>i(r(e,t)):i(r)}return e})(),GT={linear:zT,none:zT},efe=e=>{if(GT[e])return GT[e];if(e.indexOf(`(`)<=-1){let t=VT[e]||e.includes(`Back`)||e.includes(`Elastic`)?WT[e]():WT[e];return t?GT[e]=t:zT}{let t=e.slice(0,-1).split(`(`),n=WT[t[0]];return n?GT[e]=n(...t[1].split(`,`)):zT}},KT=[`steps(`,`irregular(`,`linear(`,`cubicBezier(`],qT=e=>{if(Tw(e)){for(let t=0,n=KT.length;t<n;t++)if(xw(e,KT[t]))return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``),zT}return Ew(e)?e:Tw(e)?efe(e):zT},JT=lT(),YT=lT(),XT={},ZT={func:null},QT={func:null},$T=[null],eE=[null,null],tE={to:null},tfe=0,nE=0,rE,iE,nfe=(e,t)=>{let n={};if(Cw(e)){let t=[].concat(...e.map(e=>Object.keys(e))).filter(Nw);for(let r=0,i=t.length;r<i;r++){let i=t[r];n[i]=e.map(e=>{let t={};for(let n in e){let r=e[n];Nw(n)?n===i&&(t.to=r):t[n]=r}return t})}}else{let r=nT(t.duration,vw.defaults.duration);Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o).forEach(e=>{let t=e.o,i=e.p;for(let e in i)if(Nw(e)){let a=n[e];a||=n[e]=[];let o=t*r,s=a.length,c=a[s-1],l={to:i[e]},u=0;for(let e=0;e<s;e++)u+=a[e].duration;s===1&&(l.from=c.to),i.ease&&(l.ease=i.ease),l.duration=o-(s?u:0),a.push(l)}return e});for(let e in n){let t=n[e],r;for(let e=0,n=t.length;e<n;e++){let n=t[e],i=n.ease;n.ease=r||void 0,r=i}t[0].duration||t.shift()}}return n},rfe=class extends Xde{constructor(e,t,n,r,i=!1,a=0,o){super(t,n,r),this._head,this._tail,++nE;let s=Qde(e),c=s.length,l=t.keyframes,u=l?Vde(nfe(l,t),t):t,{id:d,delay:f,duration:p,ease:m,playbackEase:h,modifier:g,composition:_,onRender:v}=u,y=n?n.defaults:vw.defaults,b=nT(m,y.ease),x=nT(h,y.playbackEase),S=x?qT(x):null,C=!Dw(b.ease),w=C?b.ease:nT(m,S?`linear`:y.ease),T=C?b.settlingDuration:nT(p,y.duration),E=nT(f,y.delay),D=g||y.modifier,O=Dw(_)&&c>=1e3?tw.none:Dw(_)?y.composition:_,k=this._offset+(n?n._offset:0);C&&(b.parent=this);let A=NaN,j=NaN,M=0,N=0;for(let e=0;e<c;e++){let t=s[e],r=a||e,c=o||s,l=NaN,d=NaN;for(let e in u)if(Nw(e)){let a=aT(t,e),o=eT(t,e),s=_T(e,t,a),f=u[e],p=Cw(f);if(i&&!p&&(eE[0]=f,eE[1]=f,f=eE),p){let e=f.length,t=!ww(f[0]);e===2&&t?(tE.to=f,$T[0]=tE,rE=$T):e>2&&t?(rE=[],f.forEach((e,t)=>{t?t===1?(eE[1]=e,rE.push(eE)):rE.push(e):eE[0]=e})):rE=f}else $T[0]=f,rE=$T;let m=null,h=null,g=NaN,_=0,v=0;for(let e=rE.length;v<e;v++){let i=rE[v];ww(i)?iE=i:(tE.to=i,iE=tE),ZT.func=null,QT.func=null;let l=iT(nT(iE.composition,O),t,r,c,null,null),u=Fde(l)?l:tw[l];!m&&u!==tw.none&&(m=kT(t,s));let d=m?m._tail:null,f=n&&d&&d.parent.parent===n?d:h,p=iT(iE.to,t,r,c,ZT,f),y;ww(p)&&!Dw(p.to)?(iE=p,y=p.to):y=p;let b=iT(iE.from,t,r,c,QT,f),x=iE.ease||w,S=iT(x,t,r,c,null,f),C=Ew(S)||Tw(S)?S:x,A=!Dw(C)&&!Dw(C.ease),j=A?C.ease:C,P=A?C.settlingDuration:iT(nT(iE.duration,e>1?iT(T,t,r,c,null,f)/e:T),t,r,c,null,f),ee=iT(nT(iE.delay,v?0:E),t,r,c,null,f),te=iE.modifier||D,ne=!Dw(b),F=!Dw(y),re=Cw(y),ie=re||ne&&F,ae=h?_:0,oe=h?_+ee:ee,se=Ww(k+oe,12),ce=Ww(k+ae,12);!N&&(ne||re)&&(N=1);let le=h;if(u!==tw.none){let e=m._head;for(;e&&e._absoluteStartTime<=se;)if(e._isOverridden||(le=e),e=e._nextRep,e&&e._absoluteStartTime>=se)for(;e;)AT(e),e=e._nextRep}if(ie){uT(re?iT(y[0],t,r,c,QT,f):b,JT),uT(re?iT(y[1],t,r,c,ZT,f):y,YT);let e=sT(t,s,a,XT);JT.t===$C.NUMBER&&(le?le._valueType===$C.UNIT&&(JT.t=$C.UNIT,JT.u=le._unit):(uT(e,fT),fT.t===$C.UNIT&&(JT.t=$C.UNIT,JT.u=fT.u)))}else F?uT(y,YT):h?dT(h,YT):uT(n&&le&&le.parent.parent===n?le._value:sT(t,s,a,XT),YT),ne?uT(b,JT):h?dT(h,JT):uT(n&&le&&le.parent.parent===n?le._value:sT(t,s,a,XT),JT);if(JT.o&&(JT.n=cT(le?le._toNumber:uT(sT(t,s,a,XT),fT).n,JT.n,JT.o)),YT.o&&(YT.n=cT(JT.n,YT.n,YT.o)),JT.t!==YT.t){if(JT.t===$C.COMPLEX||YT.t===$C.COMPLEX){let e=JT.t===$C.COMPLEX?JT:YT,t=JT.t===$C.COMPLEX?YT:JT;t.t=$C.COMPLEX,t.s=Jw(e.s),t.d=e.d.map(()=>t.n)}else if(JT.t===$C.UNIT||YT.t===$C.UNIT){let e=JT.t===$C.UNIT?JT:YT,t=JT.t===$C.UNIT?YT:JT;t.t=$C.UNIT,t.u=e.u}else if(JT.t===$C.COLOR||YT.t===$C.COLOR){let e=JT.t===$C.COLOR?JT:YT,t=JT.t===$C.COLOR?YT:JT;t.t=$C.COLOR,t.d=e.d.map(()=>0)}}if(JT.u!==YT.u){let e=YT.u?JT:YT;e=RT(t,e,YT.u?YT.u:JT.u,!1)}if(YT.d&&JT.d&&YT.d.length!==JT.d.length){let e=JT.d.length>YT.d.length?JT:YT,t=e===JT?YT:JT;t.d=e.d.map((e,n)=>Dw(t.d[n])?0:t.d[n]),t.s=Jw(e.s)}let ue=Ww(+P||1e-11,12),de=XT[s];Ow(de)||(XT[s]=null);let fe=o?o.set:null;_=Ww(oe+ue,12);let pe=JT.d,me=YT.d,he=YT.s,ge={parent:this,id:tfe++,property:s,target:t,_value:null,_toFunc:ZT.func,_fromFunc:QT.func,_ease:qT(j),_fromNumbers:pe?Jw(pe):lw,_toNumbers:me?Jw(me):lw,_strings:he?Jw(he):lw,_fromNumber:JT.n,_toNumber:YT.n,_numbers:pe?Jw(pe):lw,_number:JT.n,_unit:YT.u,_modifier:te,_currentTime:0,_startTime:oe,_delay:+ee,_updateDuration:ue,_changeDuration:ue,_absoluteStartTime:se,_absoluteUpdateStartTime:ce,_absoluteEndTime:Ww(k+_,12),_hasFromValue:ne||re?1:0,_tweenType:a,_setter:fe,_valueType:YT.t,_composition:u,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:de,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};u!==tw.none&&jT(ge,m);let _e=ge._valueType;if(_e===$C.COMPLEX)ge._value=pT(ge,1,-1);else if(_e===$C.UNIT)ge._value=`${te(ge._toNumber)}${ge._unit}`;else if(_e===$C.COLOR){let e=YT.d;ge._value=`rgba(${Ww(e[0],0)},${Ww(e[1],0)},${Ww(e[2],0)},${e[3]})`}else ge._value=te(ge._toNumber);isNaN(g)&&(g=ge._startTime),h=ge,M++,Zw(this,ge)}(isNaN(j)||g<j)&&(j=g),(isNaN(A)||_>A)&&(A=_),a===QC.TRANSFORM&&(l=M-v,d=M)}if(!isNaN(l)){let e=0;Yw(this,t=>{e>=l&&e<d&&(t._renderTransforms=1,t._composition===tw.blend&&Yw(bT.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}c||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),j?(Yw(this,e=>{e._startTime-e._delay||(e._delay-=j),e._startTime-=j}),A-=j):j=0,A||(A=ow,this.iterationCount=0),this.targets=s,this.id=Dw(d)?nE:d,this.duration=A===1e-11?ow:Kw((A+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=v||y.onRender,this._ease=S,this._delay=j,this.iterationDuration=A,!this._autoplay&&N&&this.onRender(this)}stretch(e){let t=this.duration;if(t===qw(e))return this;let n=e/t;return Yw(this,e=>{e._updateDuration=qw(e._updateDuration*n),e._changeDuration=qw(e._changeDuration*n),e._currentTime*=n,e._delay*=n,e._startTime*=n,e._absoluteStartTime*=n,e._absoluteUpdateStartTime*=n,e._absoluteEndTime*=n}),super.stretch(e)}refresh(){return Yw(this,e=>{let t=e._toFunc,n=e._fromFunc;(t||n)&&(n?(uT(n(),JT),JT.u!==e._unit&&e.target[rw]&&RT(e.target,JT,e._unit,!0),e._fromNumbers=Jw(JT.d),e._fromNumber=JT.n):t&&(uT(sT(e.target,e.property,e._tweenType),fT),e._fromNumbers=Jw(fT.d),e._fromNumber=fT.n),t&&(uT(t(),YT),e._toNumbers=Jw(YT.d),e._strings=Jw(YT.s),e._toNumber=YT.o?cT(e._fromNumber,YT.n,YT.o):YT.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),vT(this)}then(e){return super.then(e)}},aE=(e,t)=>vw.editor?vw.editor.addAnimation(e,t):new rfe(e,t,null,0,!1).init(),oE=cw*10,ife=class{constructor(e={}){let t=!Dw(e.bounce)||!Dw(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/cw,this.maxIterations=this.maxDuration/this.timeStep/cw,this.bn=Uw(nT(e.bounce,.5),-1,1),this.pd=Uw(nT(e.duration,628),10*vw.timeScale,oE*vw.timeScale),this.m=Uw(nT(e.mass,1),1,oE),this.s=Uw(nT(e.stiffness,100),ow,oE),this.d=Uw(nT(e.damping,10),ow,oE),this.v=Uw(nT(e.velocity,0),-oE,oE),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||fw,t&&this.calculateSDFromBD(),this.compute(),this.ease=e=>{let t=e*this.settlingDuration,n=this.completed,r=this.pd;return t>=r&&!n&&(this.completed=!0,this.onComplete(this.parent)),t<r&&n&&(this.completed=!1),e===0||e===1?e:this.solve(e*this.solverDuration)}}solve(e){let{zeta:t,w0:n,wd:r,b:i}=this,a=e;return a=t<1?zw(-a*t*n)*(1*Lw(r*a)+i*Iw(r*a)):t===1?(1+i*a)*zw(-a*n):((1+i)*zw((-t*n+r)*a)+(1-i)*zw((-t*n-r)*a))/2,1-a}calculateSDFromBD(){let e=vw.timeScale===1?this.pd/cw:this.pd;this.m=1,this.v=0,this.s=Pw(2*Vw/e,2),this.d=this.bn>=0?(1-this.bn)*4*Vw/e:4*Vw/(e*(1+this.bn)),this.s=Ww(Uw(this.s,ow,oE),3),this.d=Ww(Uw(this.d,ow,300),3)}calculateBDFromSD(){let e=2*Vw/Fw(this.s);this.pd=e*(vw.timeScale===1?cw:1),this.bn=this.d/(2*Fw(this.s))<=1?1-this.d*e/(4*Vw):4*Vw/(this.d*e)-1,this.bn=Ww(Uw(this.bn,-1,1),3),this.pd=Ww(Uw(this.pd,10*vw.timeScale,oE*vw.timeScale),3)}compute(){let{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:i,d:a,s:o,v:s}=this,c=this.w0=Uw(Fw(o/i),ow,cw),l=this.zeta=a/(2*Fw(o*i));l<1?(this.wd=c*Fw(1-l*l),this.b=(l*c+-s)/this.wd):l===1?(this.wd=0,this.b=-s+c):(this.wd=c*Fw(l*l-1),this.b=(l*c+-s)/this.wd);let u=0,d=0,f=0;for(;d<=e&&f<=t;)Rw(1-this.solve(u))<n?d++:d=0,this.solverDuration=u,u+=r,f++;this.settlingDuration=Ww(this.solverDuration*cw,0)*vw.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=Uw(nT(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=Uw(nT(e,1),10*vw.timeScale,oE*vw.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=Uw(nT(e,100),ow,oE),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=Uw(nT(e,10),ow,oE),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=Uw(nT(e,1),1,oE),this.compute()}get velocity(){return this.v}set velocity(e){this.v=Uw(nT(e,0),-oE,oE),this.compute()}},afe=e=>new ife(e),sE=(e=10,t)=>{let n=t?zde:Bw;return t=>n(Uw(t,0,1)*e)*(1/e)},cE=(0,I.forwardRef)(function({id:e,transform:t},n){return(0,R.jsxs)(`radialGradient`,{ref:n,id:e,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`-1.6`,r:`5.6`,gradientTransform:t,children:[(0,R.jsx)(`stop`,{offset:`0`,stopColor:`color-mix(in oklab, var(--color-white) calc(var(--depth) * 50%), currentColor)`}),(0,R.jsx)(`stop`,{offset:`1`,stopColor:`currentColor`})]})});function lE({id:e}){return(0,R.jsx)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,R.jsx)(`feDropShadow`,{dx:`0`,dy:`1.5`,stdDeviation:`1`,floodColor:`currentColor`,style:{floodOpacity:`calc(var(--depth) * 0.6)`}})})}function uE({id:e}){return(0,R.jsxs)(`filter`,{id:e,x:`-10%`,y:`-10%`,width:`120%`,height:`120%`,colorInterpolationFilters:`sRGB`,children:[(0,R.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.3`,result:`soft-edge`}),(0,R.jsx)(`feOffset`,{in:`soft-edge`,dx:`0.25`,dy:`0.45`,result:`lower-edge`}),(0,R.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`lower-edge`,operator:`out`,result:`inner-shadow`}),(0,R.jsx)(`feFlood`,{floodColor:`var(--color-black)`,floodOpacity:`calc(var(--depth) * 0.28)`}),(0,R.jsx)(`feComposite`,{in2:`inner-shadow`,operator:`in`,result:`shade`}),(0,R.jsx)(`feOffset`,{in:`soft-edge`,dx:`-0.2`,dy:`-0.35`,result:`upper-edge`}),(0,R.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`upper-edge`,operator:`out`,result:`inner-highlight`}),(0,R.jsx)(`feFlood`,{floodColor:`var(--color-white)`,floodOpacity:`calc(var(--depth) * 0.7)`}),(0,R.jsx)(`feComposite`,{in2:`inner-highlight`,operator:`in`,result:`highlight`}),(0,R.jsxs)(`feMerge`,{children:[(0,R.jsx)(`feMergeNode`,{in:`SourceGraphic`}),(0,R.jsx)(`feMergeNode`,{in:`shade`}),(0,R.jsx)(`feMergeNode`,{in:`highlight`})]})]})}var dE=Object.freeze({alphaIntercept:-8,alphaSlope:18,blurStdDeviation:2});function fE({id:e,values:t=gue}){return(0,R.jsxs)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,R.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:t.blurStdDeviation,result:`blur`}),(0,R.jsx)(`feColorMatrix`,{in:`blur`,values:`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${String(t.alphaSlope)} ${String(t.alphaIntercept)}`,result:`gooey`}),(0,R.jsx)(`feComposite`,{in:`SourceGraphic`,in2:`gooey`,operator:`atop`})]})}function pE(e,t){let n=e.ownerDocument,r=!0,i=()=>{t(r&&!n.hidden)},a=globalThis,o=`IntersectionObserver`in globalThis&&a.IntersectionObserver?new a.IntersectionObserver(t=>{let n=t.find(t=>t.target===e);n&&(r=n.isIntersecting,i())}):void 0;return o?.observe(e),n.addEventListener(`visibilitychange`,i),i(),()=>{o?.disconnect(),n.removeEventListener(`visibilitychange`,i)}}function mE(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function hE(e,t){let n=Math.max(0,Math.min(1,(t-(e-1)*.085)/.68));return Math.sin(n*Math.PI)**2}function gE(e,t,n){let r=n*Math.PI*2,i=t*2.1,a=Math.sin(r*2+i)*.15,o={rx:4*(1+a),ry:4/(1+a)};if(e===`line`){let e=7.5+4*Math.cos(r+(t===2?-.45:0));return{cx:(t-1)*e,cy:Math.sin(r+i)*.7,...o}}if(e===`square`){let e=4.7+2.7*Math.cos(r);return{cx:(t%2?1:-1)*e,cy:(t<2?-1:1)*e,...o}}if(e===`donut`){let e=mE(n/.66)*Math.PI*2,o=Math.min(e,t*Math.PI/8)-Math.PI/2,s=mE((n-.79)/.21),c=8+Math.sin(r*2+i)*.35*Math.sin(n*Math.PI);return{cx:Math.cos(o)*c*(1-s),cy:Math.sin(o)*c*(1-s)-8*s,rx:3.6*(1+a*Math.sin(n*Math.PI)),ry:3.6/(1+a*Math.sin(n*Math.PI))}}if(e===`bloom`){if(t===0){let e=[1,2,3,4].reduce((e,t)=>e+hE(t,n),0),t=Math.sqrt(49-e*4);return{cx:Math.sin(r)*.4,cy:Math.sin(r*2)*.4,rx:t*(1+a),ry:t/(1+a)}}let e=hE(t,n),i=(t-1)*Math.PI/2-Math.PI/4+Math.sin(r)*.22;return{cx:Math.cos(i)*14*e,cy:Math.sin(i)*14*e,rx:3.2*(1+a),ry:3.2/(1+a)}}return{cx:Math.sin(r+i)*6+Math.sin(r*3+i)*2.5,cy:Math.cos(r*2+i)*6,...o}}var ofe={line:1700,square:1900,donut:3e3,wander:4600,bloom:2800},sfe=2;function cfe({variant:e,pace:t=`working`}){let n=`caps-loader-${(0,I.useId)().replaceAll(`:`,``)}`,r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=HC(i),{reduced:o}=a,s=e===`donut`?16:e===`bloom`?5:e===`square`?4:3;return(0,I.useLayoutEffect)(()=>{if(!r.current||!i.current||o&&t===`idle`)return;let n=o?[aE(r.current,{opacity:[.55,1],duration:a.slow*10,ease:`inOutSine`,alternate:!0,loop:!0})]:[...r.current.querySelectorAll(`ellipse`)].map((n,r)=>aE(n,{keyframes:Array.from({length:48},(n,i)=>({...gE(e,r,(i+1)/48),duration:UC(a,ofe[e]*(t===`idle`?sfe:1))/48})),ease:`linear`,loop:!0})),s=pE(i.current,e=>{for(let t of n)e?t.resume():t.pause()});return()=>{s();for(let e of n)e.revert()}},[e,t,o,a]),(0,R.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,focusable:`false`,viewBox:e===`line`?`-20 -10 40 20`:`-20 -20 40 40`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(fE,{id:n,values:dE}),(0,R.jsx)(cE,{id:`${n}-surface`,transform:e===`line`?`matrix(3.4 0 0 1.4 0 0)`:`matrix(3 0 0 3 0 0)`}),(0,R.jsx)(lE,{id:`${n}-shadow`}),(0,R.jsx)(`mask`,{id:`${n}-mask`,maskUnits:`userSpaceOnUse`,x:`-20`,y:`-20`,width:`40`,height:`40`,style:{maskType:`alpha`},children:(0,R.jsx)(`g`,{ref:r,fill:`currentColor`,filter:`url(#${n})`,children:Array.from({length:s},(t,n)=>(0,R.jsx)(`ellipse`,{...gE(e,n,0)},n))})})]}),(0,R.jsx)(`g`,{filter:`url(#${n}-shadow)`,children:(0,R.jsx)(`rect`,{x:`-20`,y:`-20`,width:`40`,height:`40`,fill:`url(#${n}-surface)`,mask:`url(#${n}-mask)`})})]})}var lfe={sm:`caps-loader-sm`,md:`caps-loader-md`,lg:`caps-loader-lg`,fill:`caps-loader-fill`},ufe={neutral:`text-base-content`,accent:`text-accent`,primary:`text-primary`,success:`text-success`,current:`text-current`},_E=(0,I.forwardRef)(function({"aria-label":e,"aria-labelledby":t,className:n,decorative:r=!1,label:i=`Loading`,size:a=`md`,variant:o=`line`,pace:s=`working`,tone:c=`neutral`,...l},u){let d=`${(0,I.useId)()}-label`,f=!r&&e===void 0&&t===void 0;return(0,R.jsxs)(`span`,{...l,"aria-label":r?void 0:e,"aria-hidden":r||void 0,"aria-labelledby":r?void 0:t??(e===void 0?d:void 0),className:RC(`caps-loader`,lfe[a],ufe[c],n),"data-variant":o,"data-pace":s,role:r?void 0:`status`,ref:u,children:[(0,R.jsx)(cfe,{variant:o,pace:s}),f?(0,R.jsx)(JC,{id:d,children:i}):null]})}),vE=`disabled:bg-base-200 disabled:text-base-content disabled:outline-1 disabled:outline-solid disabled:outline-base-content/25 aria-disabled:bg-base-200 aria-disabled:text-base-content aria-disabled:outline-1 aria-disabled:outline-solid aria-disabled:outline-base-content/25`,dfe=Cue(`btn caps-button disabled:pointer-events-none`,{variants:{variant:{primary:`btn-primary caps-button-filled`,secondary:`btn-secondary caps-button-filled`,accent:`btn-accent caps-button-filled`,destructive:`btn-error caps-button-filled`,outline:`btn-outline ${vE}`,ghost:`btn-ghost`,"ghost-destructive":`btn-ghost caps-button-ghost-destructive`,link:`btn-link ${vE}`},size:{xs:`btn-xs`,sm:`btn-sm`,default:`btn-md`,lg:`btn-lg`,icon:`btn-square btn-md`,menubar:`caps-button-menubar`}},defaultVariants:{variant:`primary`,size:`default`}}),yE=(0,I.forwardRef)(function({asChild:e=!1,children:t,className:n,disabled:r,loading:i=!1,result:a,resultLabel:o,onResultEnd:s,size:c=`default`,variant:l=`primary`,...u},d){let f=RC(dfe({size:c,variant:l}),n),p=(0,I.useRef)(a).current,m=(0,I.useRef)(null);return(0,I.useImperativeHandle)(d,()=>m.current),ffe(m,i,a),e?(0,R.jsx)(nC,{...u,"aria-busy":i?!0:u[`aria-busy`],"aria-disabled":r===!0||i?!0:void 0,className:f,ref:m,children:t}):(0,R.jsx)(`button`,{...u,"aria-busy":i?!0:u[`aria-busy`],className:f,disabled:r===!0||i,ref:m,type:u.type??`button`,children:a===void 0&&o===void 0?(0,R.jsxs)(R.Fragment,{children:[i?(0,R.jsx)(_E,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,t]}):(0,R.jsx)(gfe,{label:o,loading:i,onResultEnd:s,result:a,settled:p,children:t})})});function ffe(e,t,n){let r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=(0,I.useRef)(null);(0,I.useLayoutEffect)(()=>{let o=e.current;if(!o)return;let s=JSON.stringify([t,n??null,o.textContent]),c=s!==i.current;i.current=s;let l=a.current;if(!c&&l)return;let u=l?o.offsetWidth:r.current;l&&(a.current=null,l.cancel(),o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`));let d=o.offsetWidth;if(r.current=d>0?d:null,!c||u===null||d===0||Math.abs(u-d)<1||!GC(o))return;let f=VC(o);if(f.reduced)return;let p=o.animate([{width:`${String(u)}px`},{width:`${String(d)}px`}],{duration:f.normal,easing:WC(f,f.ease)});a.current=p,o.style.overflow=`clip`,o.style.whiteSpace=`nowrap`;let m=()=>{a.current===p&&(a.current=null,o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`))};p.onfinish=m,p.oncancel=m})}var pfe=1100;function mfe(e,t){let n=t.bounce/.3,r=1+.05*Math.min(1.4,.4+n),i=1-.02*Math.min(1.4,n);return e.animate([{transform:`scale(1)`},{transform:`scale(${String(r)})`,offset:.35},{transform:`scale(${String(i)})`,offset:.7},{transform:`scale(1)`}],{duration:t.springDuration,easing:WC(t,`ease-out`)})}function hfe(e,t){let n=t.shake;return e.animate([{transform:`none`},{transform:`translateX(${String(-n)}px)`},{transform:`translateX(${String(n)}px)`},{transform:`translateX(${String(-n*.6)}px)`},{transform:`translateX(${String(n*.3)}px)`},{transform:`none`}],{duration:t.slow*1.3,easing:WC(t,`linear`)})}function bE(e,t,n){let r=n.distance+2,i=`blur(${String(n.blur)}px)`;return[e.animate([{opacity:1,transform:`none`,filter:`blur(0px)`},{opacity:0,transform:`translateY(${String(-r)}px)`,filter:i}],{duration:n.fast,easing:WC(n,n.ease)}),t.animate([{opacity:0,transform:`translateY(${String(r)}px)`,filter:i},{opacity:1,transform:`none`,filter:`blur(0px)`}],{duration:n.normal,easing:WC(n,n.ease),fill:`backwards`})]}function gfe({children:e,label:t,loading:n,onResultEnd:r,result:i,settled:a}){let o=(0,I.useRef)(null),s=qC(),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1);c&&!u&&d(!0);let f=(0,I.useRef)(a),p=(0,I.useRef)(r);(0,I.useEffect)(()=>{p.current=r},[r]),(0,I.useLayoutEffect)(()=>{let e=f.current;if(f.current=i,i===e)return;if(i===`done`){l(!0);let e=setTimeout(()=>{p.current?p.current():l(!1)},pfe);return()=>{clearTimeout(e)}}l(!1);let t=o.current;if(i!==`failed`||!t||!GC(t))return;let n=VC(t);if(n.shake<=0)return;let r=hfe(t,n);return()=>{r.cancel()}},[i,s]);let m=(0,I.useRef)(c);return(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e||m.current===c)return;m.current=c;let t=e.querySelector(`[data-face="label"]`),n=e.querySelector(`[data-face="result"]`);if(!t||!n||!GC(e)){c||d(!1);return}let r=VC(e),i=c?bE(t,n,r):bE(n,t,r);if(c||i[0]?.addEventListener(`finish`,()=>{d(!1)}),c&&!r.reduced){i.push(mfe(e.closest(`button`)??e,r));let t=n.querySelector(`path`);t&&i.push(t.animate([{strokeDashoffset:1},{strokeDashoffset:0}],{duration:r.normal*1.4,delay:r.fast/2,easing:WC(r,r.ease),fill:`backwards`}))}return()=>{for(let e of i)e.cancel()}},[c,s]),(0,R.jsxs)(`span`,{ref:o,className:`caps-button-faces`,"data-showing":c?`result`:`label`,children:[(0,R.jsxs)(`span`,{className:`caps-button-face`,"data-face":`label`,"aria-hidden":c?!0:void 0,children:[n||c?(0,R.jsx)(_E,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,e]}),u?(0,R.jsxs)(`span`,{className:`caps-button-face`,"data-face":`result`,"aria-hidden":!c||void 0,children:[(0,R.jsx)(`svg`,{className:`caps-button-check`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,R.jsx)(`path`,{d:`M4.5 12.5 9.5 17.5 19.5 6.5`,pathLength:1})}),t===void 0?e:t]}):null]})}var xE=new Map([[`0`,[`###`,`#.#`,`#.#`,`#.#`,`###`]],[`1`,[`.#.`,`##.`,`.#.`,`.#.`,`###`]],[`2`,[`###`,`..#`,`###`,`#..`,`###`]],[`3`,[`###`,`..#`,`.##`,`..#`,`###`]],[`4`,[`#.#`,`#.#`,`###`,`..#`,`..#`]],[`5`,[`###`,`#..`,`###`,`..#`,`###`]],[`6`,[`###`,`#..`,`###`,`#.#`,`###`]],[`7`,[`###`,`..#`,`.#.`,`.#.`,`.#.`]],[`8`,[`###`,`#.#`,`###`,`#.#`,`###`]],[`9`,[`###`,`#.#`,`###`,`..#`,`###`]],[`:`,[`.`,`#`,`.`,`#`,`.`]],[`.`,[`.`,`.`,`.`,`.`,`#`]],[`+`,[`...`,`.#.`,`###`,`.#.`,`...`]],[`-`,[`...`,`...`,`###`,`...`,`...`]],[`/`,[`..#`,`..#`,`.#.`,`#..`,`#..`]],[`×`,[`...`,`#.#`,`.#.`,`#.#`,`...`]],[`%`,[`#.#`,`..#`,`.#.`,`#..`,`#.#`]],[` `,[`.`,`.`,`.`,`.`,`.`]]]),_fe=[`.`,`.`,`.`,`.`,`.`],vfe=Object.freeze([...xE.keys()]);function yfe(e,t=0,n=!1){if(!Number.isFinite(e))throw RangeError(`PixelNumber needs a finite number`);let r=String(Math.trunc(Math.abs(e))).padStart(t,`0`),i=String(Math.abs(e)).split(`.`)[1];return SE(`${e<0?`-`:n&&e>0?`+`:``}${r}${i?`.${i}`:``}`)}function SE(e){for(let t of e)if(!xE.has(t))throw RangeError(`PixelNumber cannot draw "${t}"; use digits and ${vfe.filter(e=>!/\d/.test(e)).join(` `)}`);return e}function CE(e,t){let n=new Set,r=t;for(let i of e){let e=xE.get(i)??_fe;e.forEach((e,i)=>{for(let a=0;a<e.length;a++)e.charAt(a)===`#`&&n.add(`${String(r+a)},${String(i+t)}`)}),r+=(e.at(0)?.length??1)+1}return{lit:n,width:Math.max(1,r-1-t)+t*2}}function wE(e){let t=new Set;for(let n of e){let[r=0,i=0]=n.split(`,`).map(Number);for(let n=-1;n<=1;n++)for(let a=-1;a<=1;a++){let o=`${String(r+a)},${String(i+n)}`;e.has(o)||t.add(o)}}return t}function TE(e,t,n){let r=[];for(let i=0;i<n;i++){let n=-1;for(let a=0;a<=t;a++){let t=e.has(`${String(a)},${String(i)}`);t&&n<0&&(n=a),!t&&n>=0&&(r.push([n,i,a-n]),n=-1)}}return r}function EE({runs:e,className:t}){return(0,R.jsx)(`g`,{className:t,children:e.map(([e,t,n])=>(0,R.jsx)(`rect`,{x:e,y:t,width:n,height:1},`${String(e)}-${String(t)}`))})}var DE=(0,I.forwardRef)(function({value:e,text:t,pad:n,signed:r,size:i=`md`,tone:a=`current`,outline:o=!1,className:s,...c},l){if(t===void 0&&e===void 0)throw TypeError(`PixelNumber needs a value or text`);let u=t===void 0?yfe(e??NaN,n,r):SE(t),d=+!!o,{lit:f,width:p}=CE(u,d),m=5+d*2,h=OE[i];return(0,R.jsxs)(`span`,{...c,ref:l,className:RC(`caps-pixel-number`,s),"data-size":i,"data-tone":a,"data-outline":o,children:[(0,R.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,viewBox:`0 0 ${String(p)} ${String(m)}`,width:p*h,height:m*h,children:[o?(0,R.jsx)(EE,{className:`caps-pixel-number-outline`,runs:TE(wE(f),p,m)}):null,(0,R.jsx)(EE,{className:`caps-pixel-number-face`,runs:TE(f,p,m)})]}),(0,R.jsx)(`span`,{className:`sr-only`,children:u})]})}),OE={sm:2,md:3,lg:4,xl:6},kE=Object.freeze({ease:`linear`,duration:0});function AE(e,t){let n=xde(e,t.duration);return n<=0?kE:e.steps>0?{ease:sE(e.steps),duration:n}:{ease:afe({bounce:bde(e,t.bounce),duration:n}),duration:n}}function jE(e,t){let n=UC(e,t.duration);return{ease:e.steps>0?sE(e.steps):t.ease,duration:n}}var ME={dot:{y:-4,height:8,cy:0},pill:{y:-16,height:32,cy:0},bang:{y:-16,height:20,cy:12}};function NE({className:e,glyph:t,motion:n}){let r=`caps-status-${(0,I.useId)().replaceAll(`:`,``)}`,i=(0,I.useRef)(null),a=(0,I.useRef)(null),o=(0,I.useRef)(null),s=(0,I.useRef)(null),c=(0,I.useRef)(null),l=(0,I.useRef)(null),u=(0,I.useRef)(ME[t]).current,d=(0,I.useRef)(t===`dot`?1:4).current,f=(0,I.useRef)(+(t===`bang`)).current,p=(0,I.useRef)(t),m=HC(s),{reduced:h}=m;return(0,I.useLayoutEffect)(()=>{if(!i.current||!a.current||!c.current||!l.current)return;let e=ME[t],n=h||p.current===t;p.current=t;let r=VC(i.current),o=n?{duration:0}:AE(r,{bounce:.3,duration:360}),s=aE(i.current,{y:e.y,height:e.height,...o}),u=aE(a.current,{cy:e.cy,...n?{duration:0}:{delay:UC(r,35),...AE(r,{bounce:.3,duration:420})}}),d=aE(c.current,{gradientTransform:`matrix(1 0 0 ${t===`dot`?`1`:`4`} 0 0)`,...o}),f=aE(l.current,{opacity:+(t===`bang`),...n?kE:jE(r,{ease:`inOutSine`,duration:220})});return()=>{s.cancel(),u.cancel(),d.cancel(),f.cancel()}},[t,h]),(0,I.useLayoutEffect)(()=>{if(!o.current||!s.current||h||n===`none`)return;let e=n===`pulse`?aE(o.current,{opacity:[1,.45],...jE(m,{ease:`inOutSine`,duration:750}),alternate:!0,loop:!0}):aE(o.current,{keyframes:{"0%":{translateY:0,scaleX:1,scaleY:1},"18%":{translateY:.25,scaleX:1.1,scaleY:.91},"42%":{translateY:-1.3,scaleX:.94,scaleY:1.06},"62%":{translateY:-1.65,scaleX:1,scaleY:1},"82%":{translateY:.15,scaleX:1.06,scaleY:.95},"100%":{translateY:0,scaleX:1,scaleY:1}},...jE(m,{ease:`inOutSine`,duration:1e3}),loop:!0}),t=pE(s.current,t=>{t?e.resume():e.pause()});return()=>{t(),e.revert()}},[n,h,m]),(0,R.jsxs)(`svg`,{ref:s,"aria-hidden":`true`,className:`caps-status-bead ${e??``}`,width:`8`,height:`8`,viewBox:`-4 -4 8 8`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(fE,{id:r,values:dE}),(0,R.jsx)(cE,{ref:c,id:`${r}-surface`,transform:`matrix(1 0 0 ${String(d)} 0 0)`}),(0,R.jsxs)(`radialGradient`,{id:`${r}-drop-light`,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`10.4`,r:`5.6`,children:[(0,R.jsx)(`stop`,{offset:`0`,stopColor:`var(--color-white)`,style:{stopOpacity:`calc(var(--depth) * 0.5)`}}),(0,R.jsx)(`stop`,{offset:`1`,stopColor:`var(--color-white)`,stopOpacity:`0`})]}),(0,R.jsx)(lE,{id:`${r}-shadow`}),(0,R.jsx)(`mask`,{id:`${r}-silhouette`,maskUnits:`userSpaceOnUse`,x:`-12`,y:`-24`,width:`24`,height:`48`,style:{maskType:`alpha`},children:(0,R.jsxs)(`g`,{fill:`var(--color-white)`,filter:`url(#${r})`,children:[(0,R.jsx)(`rect`,{ref:i,x:`-4`,y:u.y,width:`8`,height:u.height,rx:`4`}),(0,R.jsx)(`circle`,{ref:a,cx:`0`,cy:u.cy,r:`4`})]})})]}),(0,R.jsx)(`g`,{ref:o,filter:`url(#${r}-shadow)`,children:(0,R.jsxs)(`g`,{mask:`url(#${r}-silhouette)`,children:[(0,R.jsx)(`rect`,{x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-surface)`}),(0,R.jsx)(`rect`,{ref:l,x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-drop-light)`,opacity:f})]})})]})}var PE=.28;function FE(e,t){switch(e){case`ring`:return{dashes:1,track:0,arc:0,sweep:0,disc:0,tick:0,cross:0};case`arc`:return{dashes:0,track:1,arc:1,sweep:t===void 0?PE:Math.min(1,Math.max(0,t)),disc:0,tick:0,cross:0};case`check`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:1,cross:0};case`cross`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:0,cross:1}}}var IE=7.25;function LE({className:e,glyph:t,progress:n}){let r=`caps-status-mark-${(0,I.useId)().replaceAll(`:`,``)}`,i=(0,I.useRef)(null),a=(0,I.useRef)(null),o=(0,I.useRef)(null),s=(0,I.useRef)(null),c=(0,I.useRef)(null),l=(0,I.useRef)(null),u=(0,I.useRef)(null),d=(0,I.useRef)(null),f=(0,I.useRef)(FE(t,n)).current,p=(0,I.useRef)(t),m=qC();(0,I.useLayoutEffect)(()=>{let e=i.current,r=a.current,c=o.current,f=s.current,h=l.current,g=u.current,_=d.current;if(!e||!r||!c||!f||!h||!g||!_)return;let v=FE(t,n),y=p.current;p.current=t;let b=VC(e),x=m||y===t&&t!==`arc`,S=x?m?{ease:b.ease,duration:b.fast}:kE:jE(b,{ease:`outQuad`,duration:160}),C=(t===`check`||t===`cross`)&&!x,w=jE(b,{ease:`inOutSine`,duration:220}),T=[aE(r,{opacity:v.dashes,...S}),aE(c,{opacity:v.track*.28,...S}),aE(f,{opacity:v.arc,"stroke-dasharray":`${String(v.sweep)} 1`,...x?m?kE:S:w}),aE(h,{r:v.disc*IE,...C?{delay:w.duration*.7,...AE(b,{bounce:.35,duration:360})}:m?kE:jE(b,{ease:`inCubic`,duration:140})}),aE(g,{"stroke-dashoffset":1-v.tick,...C&&v.tick>0?{delay:w.duration*.7+b.fast,...jE(b,{ease:`outCubic`,duration:240})}:kE}),aE(_,{"stroke-dashoffset":1-v.cross,...C&&v.cross>0?{delay:w.duration*.7+b.fast,...jE(b,{ease:`outCubic`,duration:240})}:kE})];return t===`cross`&&C&&b.shake>0&&T.push(aE(e,{translateX:[0,-b.shake,b.shake,-b.shake/2,0],delay:w.duration+b.fast,...jE(b,{ease:`linear`,duration:300})})),()=>{for(let e of T)e.cancel()}},[t,n,m]);let h=t===`arc`&&n===void 0&&!m;return(0,I.useLayoutEffect)(()=>{if(!h||!c.current||!i.current)return;let e=VC(i.current),t=aE(c.current,{rotate:[0,360],...jE(e,{ease:`linear`,duration:900}),loop:!0}),n=pE(i.current,e=>{e?t.resume():t.pause()});return()=>{n(),t.revert()}},[h]),(0,R.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,className:`caps-status-mark ${e??``}`,viewBox:`0 0 16 16`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(cE,{id:`${r}-surface`,transform:`matrix(1.6 0 0 1.6 8 8)`}),(0,R.jsxs)(`mask`,{id:`${r}-knock`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`16`,height:`16`,children:[(0,R.jsx)(`rect`,{width:`16`,height:`16`,fill:`var(--color-white)`}),(0,R.jsx)(`path`,{ref:u,d:`M4.9 8.3 7.1 10.5 11.2 5.9`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.tick}),(0,R.jsx)(`path`,{ref:d,d:`M5.4 5.4 10.6 10.6 M10.6 5.4 5.4 10.6`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.cross})]})]}),(0,R.jsx)(`circle`,{ref:a,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`1.7 2.2`,opacity:f.dashes}),(0,R.jsx)(`circle`,{ref:o,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,opacity:f.track*.28}),(0,R.jsx)(`g`,{ref:c,className:`caps-status-mark-spin`,children:(0,R.jsx)(`circle`,{ref:s,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`${String(f.sweep)} 1`,transform:`rotate(-90 8 8)`,opacity:f.arc})}),(0,R.jsx)(`circle`,{ref:l,cx:`8`,cy:`8`,r:f.disc*IE,fill:`url(#${r}-surface)`,mask:`url(#${r}-knock)`})]})}var RE=new Set([`ring`,`arc`,`check`,`cross`]);function zE(e){return RE.has(e)}var BE={neutral:`text-base-content`,primary:`text-primary`,secondary:`text-secondary`,accent:`text-accent`,success:`text-success`,info:`text-info`,warning:`text-warning`,error:`text-error`},VE=(0,I.forwardRef)(function({className:e,label:t,glyph:n=`dot`,motion:r=`none`,tone:i=`neutral`,size:a=`default`,appearance:o=`plain`,progress:s,...c},l){return(0,R.jsxs)(`span`,{...c,className:RC(`caps-status`,a===`compact`&&`caps-status-compact`,o===`chip`&&`caps-status-chip`,e),"data-tone":o===`chip`?i:void 0,"data-glyph":n,"data-motion":r,ref:l,children:[zE(n)?(0,R.jsx)(LE,{className:BE[i],glyph:n,progress:s}):(0,R.jsx)(NE,{className:BE[i],glyph:n,motion:r}),t===void 0?null:(0,R.jsx)(`span`,{children:t})]})});function HE({icon:e,caption:t}){return(0,R.jsxs)(`span`,{className:`caps-icon-choice-mark`,"aria-hidden":`true`,children:[(0,R.jsx)(`span`,{className:`caps-icon-choice-art`,children:e}),t?(0,R.jsx)(`span`,{className:`caps-icon-choice-caption`,children:t}):null,(0,R.jsx)(`span`,{className:`caps-icon-choice-lamp`})]})}var UE=(0,I.forwardRef)(function({label:e,icon:t,caption:n,on:r,stateLabels:i=[`on`,`off`],className:a,...o},s){return(0,R.jsxs)(`span`,{...o,className:RC(`caps-icon-lamp`,a),"data-on":r,ref:s,children:[(0,R.jsx)(HE,{icon:t,caption:n}),(0,R.jsxs)(`span`,{className:`sr-only`,children:[e,`: `,r?i[0]:i[1]]})]})}),WE=(0,I.forwardRef)(function({items:e,stateLabels:t,className:n,...r},i){return(0,R.jsx)(`ul`,{...r,className:RC(`caps-icon-lamps`,n),ref:i,children:e.map(({id:e,...n})=>(0,R.jsx)(`li`,{children:(0,R.jsx)(UE,{...n,...t===void 0?{}:{stateLabels:t}})},e))})}),GE=(0,I.forwardRef)(function({className:e,size:t=`md`,depth:n=`shallow`,placement:r=`standalone`,...i},a){return(0,R.jsx)(`div`,{...i,ref:a,"data-surface-size":t,"data-surface-depth":n,"data-surface-placement":r,className:RC(`caps-surface`,e)})}),KE=(0,I.forwardRef)(function({className:e,...t},n){return(0,R.jsx)(`div`,{...t,ref:n,className:RC(`caps-screen`,e)})}),qE=(0,I.forwardRef)(function({children:e,className:t,depth:n=`deep`,fit:r=`content`,density:i=`normal`,...a},o){let s=r===`fill`;return(0,R.jsx)(GE,{...a,className:RC(t,s&&`flex min-h-0 flex-1`),depth:n,ref:o,children:(0,R.jsx)(`div`,{className:RC(`caps-display-gasket`,s&&`flex min-h-0 min-w-0 flex-1`),"data-display-density":i,children:(0,R.jsx)(KE,{className:RC(s&&`flex min-h-0 min-w-0 flex-1 overflow-hidden`),children:e})})})}),bfe=(0,I.forwardRef)(function({className:e,icon:t,status:n,title:r,...i},a){return(0,R.jsxs)(`header`,{...i,className:RC(`caps-screen-header`,e),ref:a,children:[t?(0,R.jsx)(`span`,{className:`caps-screen-header-icon`,"aria-hidden":`true`,children:t}):null,(0,R.jsx)(`span`,{className:`caps-screen-header-title`,children:r}),n?(0,R.jsx)(`span`,{className:`caps-screen-header-status`,children:n}):null]})}),xfe=(0,I.forwardRef)(function({appearance:e,className:t,...n},r){return(0,R.jsx)(`div`,{...n,className:RC(`caps-screen-cells`,t),"data-appearance":e===`compact`?e:void 0,ref:r})}),JE=(0,I.forwardRef)(function({children:e,className:t,legend:n,readout:r,icon:i,appearance:a,wide:o=!1,...s},c){return(0,R.jsxs)(`div`,{...s,className:RC(`caps-screen-cell`,t),"data-wide":o||void 0,"data-appearance":a===`compact`?a:void 0,ref:c,children:[i?(0,R.jsx)(`span`,{className:`caps-screen-cell-icon`,children:i}):null,n?(0,R.jsx)(`span`,{className:`caps-screen-cell-legend`,children:n}):null,r?(0,R.jsx)(`span`,{className:`caps-screen-cell-readout`,children:r}):null,a===`compact`?(0,R.jsx)(`div`,{className:`caps-screen-cell-controls`,children:e}):e]})}),YE={coral:`var(--stipe-art-coral, #ff6558)`,blue:`var(--stipe-art-blue, #43a6f2)`,mint:`var(--stipe-art-mint, #63cfaa)`,grape:`var(--stipe-art-grape, #a66cc1)`,yellow:`var(--stipe-art-yellow, #ffd05d)`,cream:`var(--stipe-art-cream, #fff4de)`,ink:`var(--stipe-art-ink, #242c28)`,graphite:`var(--stipe-art-graphite, #49423f)`,inkcap:`var(--stipe-art-inkcap, #80499d)`},XE=`light-dark(var(--stipe-sketch-ink, #242c28), var(--stipe-art-cream, #fff4de))`,Sfe=`var(--color-base-100, light-dark(#fff4de, #242c28))`;function ZE({transform:e,fill:t=XE}){return(0,R.jsx)(`path`,{transform:e,style:{fill:t},d:`M-1.264-9.479C-2.098-8.643-1.802-1.057-.907-.332.47.782 1.6-.446 1.618-3.075 1.623-3.888 1.691-5.398 1.77-6.429 1.979-9.202 1.596-10 .055-10-.588-10-.843-9.9-1.264-9.479Z`})}function Cfe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(ZE,{transform:`translate(25.4 19.8) rotate(-39) scale(.95 .76)`}),(0,R.jsx)(ZE,{transform:`translate(32.1 17.8) scale(.96 .95)`}),(0,R.jsx)(ZE,{transform:`translate(38.8 19.9) rotate(39) scale(.95 .77)`})]})}function wfe(){return(0,R.jsxs)(`g`,{style:{fill:YE.blue},children:[(0,R.jsx)(`path`,{d:`M10.574 .604C9.804 1.375 9.867-.885 9.961 22.81 10.054 47.202 9.722 45.378 14.193 45.94 25.813 47.399 38.465 52.211 44.662 57.532 47.653 60.097 48.082 59.411 47.967 52.242L47.734 19.335C47.734 17.523 47.13 16.616 45.964 15.076 40.604 8.018 30.127 2.767 16.804 .462 13.045-.184 11.326-.148 10.574 .604Z`}),(0,R.jsx)(`path`,{d:`M81.571 .746C71.063 2.665 62.221 6.713 56.562 12.199 54.242 14.45 52 17.356 52.115 19.335L52.033 52.628C51.927 59.934 51.979 59.994 55.74 57.091 62.423 51.931 71.272 48.541 84.103 46.221 90.625 45.039 89.967 47.631 90.145 22.432 90.326-3.079 91.148-1 81.571 .746Z`}),(0,R.jsx)(`path`,{d:`M1.906 12.692C.1 13.42 .151 12.804 .151 33.825 .151 54.097 .163 54.302 1.447 55.498 2.71 56.674 3.384 56.81 7.937 56.816 20.943 56.834 30.647 58.293 38.776 61.45 45.964 64.242 46.435 61.924 39.526 57.773 32.296 53.429 26.656 51.544 14.943 49.553 5.958 48.027 6.535 49.414 6.408 29.003 6.32 14.74 6.263 13.103 5.816 12.764 5.254 12.335 2.9 12.293 1.906 12.692Z`}),(0,R.jsx)(`path`,{d:`M94.326 12.858C93.656 13.326 93.656 13.326 93.653 28.492 93.653 48.882 93.997 48.063 84.743 49.556 73.574 51.36 64.45 54.695 57.801 59.405 54.082 62.039 55.384 63.864 59.722 62.1 68.897 58.372 76.363 57.115 90.03 56.994 100.405 56.903 99.489 58.976 99.773 34.976 100.018 14.142 100.006 13.958 98.399 12.979 97.236 12.269 95.251 12.208 94.326 12.858Z`})]})}function QE(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M-8.572-25.123C-21.412-23.39-33.235-17.39-44.235-7.027-51.235-.433-51.251 .358-44.524 6.749-20.77 29.316 10.23 31.893 36.364 13.487 41.043 10.187 48.193 3.551 49.235 1.524 50.358-.642 49.471-2.102 43.738-7.497 29.257-21.128 9.968-27.631-8.572-25.123Z`}),(0,R.jsx)(`path`,{style:{fill:YE.ink},d:`M-6.225-16.807C-17.727-13.267-21.176 4.433-12.08 13.257-1.118 23.898 16.829 16.102 17.032 .604 17.209-12.412 6.219-20.642-6.225-16.807Z`})]})}function Tfe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{style:{fill:YE.mint},d:`M540 342C520 340 497 355 477 374C450 399 440 421 456 444C465 458 480 462 492 464C503 466 500 477 494 486C487 500 508 496 522 478L530 468C557 468 578 464 591 451C601 442 599 429 585 427C572 425 556 432 547 418C538 403 550 390 568 385C579 382 589 380 584 368C576 352 557 341 540 342Z`}),(0,R.jsx)(`path`,{style:{fill:YE.coral},d:`M589 396C614 380 659 381 683 392C709 404 721 428 710 451C704 464 693 472 685 479C680 487 684 498 689 503C695 514 684 513 675 507C667 502 662 497 657 491C637 496 610 495 594 486C584 480 583 469 595 464C607 460 622 454 622 441C622 428 612 423 597 420C580 417 578 407 589 396Z`})]})}function $E({fill:e}){return(0,R.jsx)(`path`,{style:{fill:e},d:`M44.648 .288C26.645 1.615 13.263 8.266 5.942 19.529-4.299 35.277-.917 57.684 13.224 67.784 16.958 70.452 16.936 71.742 13.064 77.665 11.28 80.391 10.895 81.565 11.341 82.914 13.163 88.435 25.022 86.396 36.307 78.62L38.681 76.986 41.294 77.335C45.371 77.878 59.645 77.789 64.125 77.191 89.213 73.837 100.562 61.427 99.92 38.044 99.18 11.1 79.587-2.285 44.648 .288Z`})}function eD({onFigure:e=!1}){return(0,R.jsxs)(`g`,{style:{fill:e?Sfe:YE.ink},children:[(0,R.jsx)(`rect`,{x:`-15`,y:`-11`,width:`10`,height:`22`,rx:`5`}),(0,R.jsx)(`rect`,{x:`5`,y:`-11`,width:`10`,height:`22`,rx:`5`})]})}function Efe(){return(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M18.125 .621C.039 1.574-2.575 4.791 2.264 20.133 17.454 68.284 77.345 69.396 96.119 21.875 100.749 10.154 100.318 4.348 94.605 1.513 91.981 .21 37.878-.421 18.125 .621Z`})}function Dfe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{style:{fill:YE.yellow},d:`M31.42 5.279C29.108 5.983 28.068 6.993 25.817 10.732 24.033 13.687 24.027 13.762 25.58 14.265 30.375 15.821 36.711 20.506 39.938 24.885 42.077 27.788 41.835 27.806 45.281 24.463 48.633 21.213 49.164 20.185 48.982 17.325 48.812 14.643 48.174 13.872 42.68 9.741 36.737 5.273 34.439 4.361 31.42 5.279Z`}),(0,R.jsx)(`path`,{style:{fill:YE.yellow},d:`M22.538 16.207C22.093 16.652 19.732 20.231 13.309 30.196 10.737 34.188 10.723 33.911 13.589 35.351 16.461 36.798 19.778 39.28 21.825 41.523L22.6 42.37Q23.34 43.186 24.05 42.538L24.711 41.933C31.278 35.937 38.928 28.484 38.928 28.083 38.928 24.656 24.521 14.219 22.538 16.207Z`}),(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M8.89 38.053C8.203 39.566 6.598 44.473 6.598 45.056 6.598 45.137 6.887 45.125 7.236 45.036 9.655 44.404 13.526 47.475 13.526 50.027 13.526 51.132 13.361 51.164 16.187 49.49 21.421 46.387 21.966 45.665 20.575 43.659 19.002 41.387 14.975 38.238 11.909 36.881 9.799 35.949 9.854 35.926 8.89 38.053Z`}),(0,R.jsx)(`path`,{style:{fill:YE.graphite},d:`M6.598 45.056C5.732 46.866 5.155 49.464 6.309 50.907 8.041 53.505 10.928 52.639 13.526 50.907 13.526 48.021 9.978 44.404 7.236 45.036Z`})]})}function Ofe(){return(0,R.jsx)(`path`,{style:{fill:YE.coral},d:`M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z`})}function tD({transform:e}){return(0,R.jsx)(`path`,{style:{fill:YE.mint},transform:e,d:`M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z`})}function kfe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{fillRule:`evenodd`,style:{fill:XE},d:`M25.3 17.69C14.8 19.34 10.66 20.18 9.05 20.99 5.51 22.78 4.2 27.21 6.71 28.9 7.47 29.42 8.48 29.4 10.25 28.84 12.41 28.15 12.56 27.57 11.02 25.85 10 24.71 10.53 23.62 11.79 24.27 13.9 25.36 15.02 28.98 15.63 36.66 16.18 43.48 17.33 47.43 19.69 50.49 22.76 54.48 27.69 55.73 30.31 53.19 33 50.57 31.24 46.04 28.44 48.38 26.29 50.17 26.16 47.08 28.3 45.14 29.61 43.95 30.78 43.58 38.92 41.75 39.45 41.63 39.41 41.52 38.39 40.01 36.87 37.78 36.04 35.22 34.72 28.69 33.37 22 32.04 19.3 29.5 18.07 28.69 17.68 26.59 17.49 25.3 17.69M24.11 26.51C18.61 27.67 18.16 27.82 17.98 28.55 17.64 29.91 18.54 30.44 20.51 30.05 25.4 29.08 30.11 28.03 30.49 27.83 31.65 27.23 31 25.33 29.66 25.4 29.5 25.4 27 25.91 24.11 26.51M29.2 31.42C28.64 31.54 26.23 32.07 23.85 32.58 20.01 33.41 19.48 33.57 19.15 33.96 18.67 34.5 18.66 35.05 19.12 35.63 19.61 36.26 19.86 36.23 26.05 34.88 29.05 34.23 31.53 33.7 31.57 33.7 31.82 33.7 32.34 32.88 32.34 32.5 32.34 31.25 31.37 30.92 29.2 31.42M29.79 37.19C28.81 37.41 26.45 37.94 24.53 38.37 22.62 38.8 20.84 39.23 20.58 39.33 19.61 39.71 19.35 40.62 19.98 41.41 20.48 42.05 21 41.99 27.59 40.5 33.85 39.09 34.21 38.91 33.45 37.44 33.02 36.61 32.51 36.58 29.79 37.19M45.41 41.95C44.89 42.09 41.61 42.89 38.12 43.73 30.94 45.45 29.81 45.84 31.05 46.15 33.2 46.69 34.11 50.18 32.77 52.76 32.23 53.79 32.23 54.03 32.76 54.16 33.34 54.31 45.35 51.3 46.72 50.67 50.19 49.06 51.76 45.01 49.79 42.76 48.8 41.64 47.46 41.39 45.41 41.95`}),(0,R.jsx)(`path`,{style:{fill:YE.grape},d:`M48.21 10.15C47.92 10.41 47.5 11.27 46.96 12.74 45.52 16.61 45.24 16.99 43.01 18.15 39.18 20.15 39.05 20.99 42.28 22.73 45.37 24.39 45.68 24.79 47.12 28.95 48.3 32.32 49.28 32.2 50.65 28.52 52.23 24.25 52.26 24.22 55.2 22.56 57.53 21.24 57.79 21 57.79 20.16 57.79 19.49 57.55 19.31 55.01 18.06 52.16 16.66 52.2 16.72 50.31 11.56 49.7 9.89 49.03 9.44 48.21 10.15M32.59 13.92C31.78 14.73 32.28 15.89 33.58 16.22 35.07 16.6 36.19 17.1 37.17 17.84 38.42 18.77 39.23 18.86 39.79 18.15 39.99 17.9 40.15 17.53 40.15 17.32 40.15 15.29 33.99 12.52 32.59 13.92M42.48 34.38C40.96 35.96 40.65 36.88 41.39 37.57 42.2 38.33 43.36 37.74 44.55 35.95 45.2 34.97 45.22 34.35 44.62 33.88 43.89 33.31 43.41 33.42 42.48 34.38`}),(0,R.jsx)(`path`,{style:{fill:YE.yellow},d:`M40.75 25.96C39.69 27.07 38.11 30.69 38.11 31.98 38.11 32.66 38.55 33.19 39.12 33.19 39.8 33.19 40.24 32.73 40.58 31.66 40.95 30.46 41.65 29.09 42.42 28.01 43.77 26.14 42.29 24.32 40.75 25.96M54.85 27.67C54.71 27.81 54.47 28.32 54.31 28.82 53.67 30.76 53.19 31.37 51.67 32.13 50.25 32.85 50.34 33.36 52.04 34.21 53.25 34.82 53.57 35.23 54.24 37.01 54.98 38.98 55.47 39.08 56.03 37.37 56.7 35.32 57.08 34.81 58.64 33.87 60.18 32.95 60.14 32.65 58.38 31.78 57.02 31.11 56.68 30.66 56.02 28.65 55.69 27.64 55.25 27.27 54.85 27.67`})]})}function Afe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{fillRule:`evenodd`,style:{fill:XE},d:`M42.24 14.07C41.52 14.24 40.53 14.54 35.06 16.26 33.33 16.8 31.2 17.47 30.34 17.74 29.47 18.01 27.86 18.52 26.75 18.88 25.64 19.23 24.03 19.74 23.16 20.01 20.16 20.94 19.45 21.4 18.97 22.71 18.71 23.44 18.45 26.33 17.83 35.41 17.64 38.25 17.44 41.03 17.41 41.58 17.32 42.77 17.24 42.69 18.79 42.84L20.01 42.95 21.98 39.97C24.69 35.88 24.85 35.82 27.05 37.9 27.9 38.7 28.43 39.08 28.61 39.02 28.76 38.96 28.91 38.91 28.94 38.91 28.98 38.91 29.38 38.38 29.84 37.73 30.3 37.08 31.47 35.48 32.43 34.17 33.4 32.86 34.86 30.85 35.67 29.71 36.49 28.56 37.5 27.29 37.91 26.88 39.73 25.07 41.01 26.43 43.32 32.67 43.76 33.84 44.3 35.28 44.52 35.86 44.74 36.44 44.97 37.28 45.04 37.74 45.19 38.71 45.17 38.71 46.63 38.03 47.69 37.53 47.77 37.46 47.68 37.02 47.58 36.52 46.97 30.64 46.79 28.41 46.73 27.69 46.62 26.43 46.53 25.61 46.44 24.79 46.24 22.87 46.09 21.32 45.61 16.44 45.5 15.66 45.22 15.12 44.72 14.15 43.59 13.76 42.24 14.07M29.38 22.45C26.04 23.47 24.49 27.62 26.6 29.91 29.17 32.7 34.15 30.16 34.16 26.05 34.16 23.38 31.9 21.68 29.38 22.45M46.7 41.5C39.3 44.23 28.33 46.04 20.1 45.88L17.21 45.82 17.16 46.88C17.08 48.22 17.33 49.03 18.01 49.68 18.73 50.37 19.73 50.35 23.77 49.53 25.46 49.19 29.12 48.47 31.91 47.93 46.31 45.14 46.9 44.99 47.57 43.91 47.95 43.3 48.25 41.29 47.99 41.15 47.91 41.11 47.33 41.26 46.7 41.5`}),(0,R.jsx)(`path`,{style:{fill:YE.coral},d:`M29.72 22.45C25.84 23.34 24.28 28.36 27.25 30.42 29.34 31.88 32.91 30.43 33.83 27.75 34.92 24.55 32.75 21.76 29.72 22.45`}),(0,R.jsx)(`path`,{style:{fill:YE.mint},d:`M12.96 14.29C12.87 14.41 12.7 15.03 12.58 15.68 12.37 16.82 11.59 18.26 11.18 18.26 11.08 18.26 10.88 18.46 10.72 18.7 10.36 19.25 10.59 19.58 11.45 19.74 12.18 19.88 13.08 20.63 13.54 21.49 14.23 22.76 14.75 22.53 15.15 20.79 15.39 19.71 15.51 19.51 16.4 18.66 17.54 17.58 17.51 17.36 16.18 16.85 15.16 16.47 14.84 16.19 14.14 15.1 13.56 14.2 13.22 13.96 12.96 14.29M49.04 24.13C48.56 24.86 48.91 25.31 50.59 26.09 53.89 27.64 54.85 29.82 53.45 32.6 52.01 35.43 46.84 38.54 40.51 40.39 39.73 40.62 38.88 40.89 38.62 40.99 37.24 41.52 30.85 42.64 27.54 42.93 20.72 43.52 13.63 42.49 10.57 40.46 5.81 37.3 7.51 32.32 14.74 28.24 15.84 27.61 16.17 27.1 15.9 26.4 15.66 25.78 15.35 25.84 13.19 26.94 6 30.61 2.97 35.32 4.95 39.74 7.86 46.21 22.78 47.8 40.05 43.46 51.97 40.47 58.57 36.38 59.47 31.43 60.09 27.97 57.74 25.34 52.93 24.12 50.6 23.53 49.43 23.54 49.04 24.13`}),(0,R.jsx)(`path`,{style:{fill:YE.grape},d:`M34.82 8.91C33.48 10.04 34.21 12.14 35.94 12.14 37.29 12.14 38.18 10.99 37.77 9.77 37.36 8.53 35.81 8.08 34.82 8.91M53.15 43.16C53 43.28 52.74 43.86 52.57 44.45 52.18 45.78 51.76 46.32 50.64 46.93 49.52 47.53 49.45 47.89 50.33 48.34 51.34 48.85 52.24 49.95 52.56 51.04 53.13 53.01 53.6 53 54.21 50.99 54.61 49.69 55.13 48.93 55.91 48.54 57.17 47.91 57.23 47.51 56.15 46.96 55.23 46.49 54.67 45.76 54.23 44.44 53.8 43.15 53.54 42.84 53.15 43.16M24.18 53.18C22.45 53.9 22.87 56.59 24.71 56.59 26.79 56.59 27.2 53.67 25.2 53.09 24.89 53.01 24.51 53.04 24.18 53.18`}),(0,R.jsx)(`path`,{style:{fill:YE.yellow},d:`M51.76 11.04C51.21 12.77 50.56 13.61 49.24 14.34 48.6 14.69 48.72 15.07 49.59 15.48 50.54 15.93 51.11 16.69 51.62 18.22 52.06 19.57 52.26 19.54 52.79 18.08 53.29 16.69 53.87 15.91 54.86 15.31 55.76 14.77 55.77 14.48 54.92 14.02 53.91 13.46 53.5 12.99 52.89 11.66 52.23 10.21 52.06 10.12 51.76 11.04M11.06 48.22C10.99 48.35 10.71 48.88 10.46 49.41 9.95 50.48 9.45 50.99 8.59 51.33 7.89 51.61 7.85 52.1 8.52 52.37 9.51 52.79 10.3 53.85 10.89 55.58 11.09 56.18 11.48 55.88 11.87 54.84 12.24 53.87 13.33 52.56 13.79 52.56 14 52.56 14.5 52.06 14.5 51.85 14.5 51.77 14.19 51.54 13.81 51.34 12.98 50.92 12.36 50.14 11.93 48.99 11.6 48.09 11.31 47.83 11.06 48.22`})]})}function jfe(){return(0,R.jsxs)(`g`,{transform:`translate(2 8) scale(.114) translate(-125 -122)`,children:[(0,R.jsx)(`path`,{style:{fill:YE.coral},d:`M278 155 482 123C517 117 527 135 530 167L542 309Q543 329 561 341L631 404Q649 419 646 444 645 465 623 472L407 521Q374 531 345 519L156 436Q115 418 128 375L221 191Q238 163 278 155Z`}),(0,R.jsx)(`path`,{style:{fill:YE.ink},d:`M317 183 461 161Q493 155 497 188L504 288Q508 320 478 326L318 356Q289 362 286 331L281 226Q278 194 317 183Z`}),(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M304 386 553 340Q562 337 570 346L631 404Q649 419 646 444Q645 448 629 452L411 483Q382 492 367 474Z`}),(0,R.jsxs)(`g`,{style:{fill:YE.cream},children:[(0,R.jsx)(`rect`,{x:`319`,y:`236`,width:`26`,height:`59`,rx:`13`}),(0,R.jsx)(`rect`,{x:`364`,y:`229`,width:`26`,height:`59`,rx:`13`})]}),(0,R.jsxs)(`g`,{style:{fill:YE.ink},transform:`rotate(-11 470 411)`,children:[(0,R.jsx)(`rect`,{x:`369`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`444`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`518`,y:`380`,width:`57`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`392`,y:`421`,width:`58`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`462`,y:`421`,width:`65`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`539`,y:`421`,width:`58`,height:`25`,rx:`13`})]})]})}function Mfe(){return(0,R.jsxs)(`g`,{transform:`translate(3 10) scale(.114) translate(-760 -140)`,children:[(0,R.jsx)(`path`,{style:{fill:YE.blue},d:`M1226 153C1257 153 1273 195 1267 231Q1263 265 1237 268L1176 270V215C1176 178 1195 153 1226 153Z`}),(0,R.jsx)(`path`,{style:{fill:YE.blue},d:`M824 376Q908 372 871 400C842 427 866 442 902 450L1113 480Q1188 479 1199 392C1207 447 1204 497 1163 511Q1134 521 1097 516C1055 510 991 507 957 507S869 511 826 512C781 513 758 483 760 441Q760 385 824 376Z`}),(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M824 376 857 184Q864 133 911 141C1039 169 1124 151 1226 153Q1179 159 1184 241L1199 377C1202 434 1174 482 1117 480L902 450C864 445 849 429 871 400Q908 372 824 376Z`}),(0,R.jsxs)(`g`,{style:{fill:YE.coral},children:[(0,R.jsx)(`path`,{d:`M982 198C1008 190 1030 197 1028 220L1023 265Q1020 295 1000 279C981 261 951 223 963 210Q970 202 982 198Z`}),(0,R.jsx)(`path`,{d:`M1063 220C1077 215 1100 237 1102 251Q1107 267 1084 282L1063 295Q1037 307 1040 278L1045 245Q1049 224 1063 220Z`}),(0,R.jsx)(`path`,{d:`M911 252C925 240 939 254 957 269L978 291Q995 311 961 316C938 318 907 316 898 308Q884 296 911 252Z`}),(0,R.jsx)(`path`,{d:`M1106 289Q1127 281 1134 304C1142 327 1146 352 1125 350Q1097 348 1073 335C1051 324 1072 311 1084 302Z`}),(0,R.jsx)(`path`,{d:`M927 338C946 334 972 334 985 343Q1004 353 984 384C970 408 957 418 940 403C922 389 896 356 913 345Z`}),(0,R.jsx)(`path`,{d:`M1010 375Q1025 363 1037 384C1049 407 1064 438 1044 442Q1025 448 1002 436C984 428 991 410 997 393Z`}),(0,R.jsx)(`path`,{d:`M1068 357C1084 359 1110 376 1120 389Q1130 402 1107 419C1090 432 1082 418 1073 401C1062 383 1043 355 1068 357Z`}),(0,R.jsx)(`path`,{d:`M1018 311C1037 312 1050 334 1034 343C1018 351 998 337 1005 320Q1009 311 1018 311Z`})]})]})}function Nfe(){return(0,R.jsxs)(`g`,{transform:`translate(2 7) scale(.11) translate(-1380 -96)`,children:[(0,R.jsx)(`path`,{style:{fill:YE.inkcap},d:`M1384 276C1394 238 1445 200 1497 158C1547 119 1604 97 1647 97C1690 97 1720 109 1745 138C1772 170 1791 184 1833 194C1870 201 1919 220 1922 257C1923 307 1891 339 1853 336C1801 335 1767 299 1701 294C1666 291 1620 294 1642 303Q1670 307 1675 333C1681 367 1697 389 1717 413C1735 434 1738 443 1719 464C1700 485 1692 502 1686 520Q1682 541 1653 541L1626 541Q1598 541 1594 519C1590 495 1578 474 1563 458C1545 440 1544 429 1559 410C1585 377 1608 337 1572 326C1554 320 1529 333 1506 340C1461 356 1428 357 1402 340Q1371 319 1384 276Z`}),(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M1634 362Q1641 346 1649 362C1660 390 1676 404 1705 424Q1721 435 1704 453C1685 475 1677 490 1671 513Q1670 526 1653 525L1626 525Q1611 525 1610 513C1606 492 1592 465 1575 449Q1562 437 1577 424C1604 404 1620 390 1634 362Z`}),(0,R.jsx)(`path`,{style:{fill:YE.inkcap},d:`M1634 456A18 18 0 1 1 1648 456V492Q1648 500 1641 500T1634 492Z`}),(0,R.jsx)(`path`,{style:{fill:YE.inkcap},d:`M1780 391Q1786 386 1793 396C1810 420 1828 444 1827 467C1826 508 1768 510 1753 480C1741 456 1762 413 1780 391Z`})]})}var{coral:nD,blue:rD,mint:iD,grape:aD,yellow:oD,cream:sD,ink:cD}=YE,Pfe={bonsai:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:`none`,stroke:iD,strokeWidth:`3.7`,strokeLinecap:`round`,d:`M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2`}),(0,R.jsx)(`path`,{fill:iD,d:`M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z`}),(0,R.jsx)(`circle`,{fill:rD,cx:`31.5`,cy:`10.7`,r:`4.8`}),(0,R.jsx)(`circle`,{fill:aD,cx:`16.6`,cy:`18.3`,r:`4.6`}),(0,R.jsx)(`circle`,{fill:oD,cx:`47.9`,cy:`17.7`,r:`4.6`}),(0,R.jsx)(`circle`,{fill:oD,cx:`12.8`,cy:`31.5`,r:`4.6`}),(0,R.jsx)(`circle`,{fill:rD,cx:`50.9`,cy:`32.1`,r:`4.6`}),(0,R.jsx)(`path`,{fill:nD,d:`M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z`}),(0,R.jsx)(`rect`,{fill:nD,x:`14`,y:`43`,width:`35.5`,height:`4.6`,rx:`2.3`})]}),computer:(0,R.jsx)(jfe,{}),prints:(0,R.jsx)(Mfe,{}),inkcap:(0,R.jsx)(Nfe,{}),vishnu:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{style:{fill:nD},d:`M6 37C6 21 17.5 9 32 9s26 12 26 28c0 2.2-1.8 4-4 4H10c-2.2 0-4-1.8-4-4Z`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`19`,cy:`25`,r:`4`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`33`,cy:`19.5`,r:`4.8`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`46`,cy:`28`,r:`3.4`}),(0,R.jsx)(`rect`,{style:{fill:rD},x:`13`,y:`39`,width:`38`,height:`18`,rx:`9`}),(0,R.jsx)(`rect`,{style:{fill:sD},x:`18.5`,y:`46.2`,width:`10`,height:`3.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{style:{fill:sD},x:`21.7`,y:`43`,width:`3.6`,height:`10`,rx:`1.8`}),(0,R.jsx)(`circle`,{style:{fill:oD},cx:`39`,cy:`50.5`,r:`2.7`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`45`,cy:`45.5`,r:`2.7`})]}),generateText:(0,R.jsx)(kfe,{}),generateMedia:(0,R.jsx)(Afe,{}),buyApps:(0,R.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,R.jsx)(`circle`,{fill:oD,cx:`32`,cy:`20`,r:`12`}),(0,R.jsx)(`circle`,{stroke:sD,strokeWidth:`4`,cx:`32`,cy:`20`,r:`6`}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(15.5 12) rotate(-60) scale(1.1 .85)`}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(48.5 12) rotate(60) scale(1.1 .85)`}),(0,R.jsx)(`path`,{fill:rD,d:`M10 35H54L50 53Q49 58 44 58H20Q15 58 14 53Z`}),(0,R.jsx)(`rect`,{fill:nD,x:`5`,y:`27`,width:`54`,height:`10`,rx:`5`}),(0,R.jsxs)(`g`,{fill:sD,children:[(0,R.jsx)(`rect`,{x:`20`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,R.jsx)(`rect`,{x:`29.5`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,R.jsx)(`rect`,{x:`39`,y:`41`,width:`5`,height:`11`,rx:`2.5`})]})]}),browseBazaar:(0,R.jsxs)(`g`,{transform:`rotate(-5 32 32)`,children:[(0,R.jsx)(`rect`,{fill:rD,x:`10`,y:`14`,width:`44`,height:`38`,rx:`6`}),(0,R.jsx)(`rect`,{fill:rD,x:`5`,y:`47`,width:`54`,height:`12`,rx:`6`}),(0,R.jsx)(`rect`,{fill:sD,x:`12`,y:`50.5`,width:`40`,height:`4.5`,rx:`2.25`}),(0,R.jsx)(`rect`,{fill:nD,x:`2`,y:`4`,width:`60`,height:`9`,rx:`4.5`}),(0,R.jsx)(`path`,{fill:nD,d:`M3 9H14.6V18A5.8 5.8 0 0 1 3 18Z`}),(0,R.jsx)(`path`,{fill:sD,d:`M14.6 9H26.2V18A5.8 5.8 0 0 1 14.6 18Z`}),(0,R.jsx)(`path`,{fill:nD,d:`M26.2 9H37.8V18A5.8 5.8 0 0 1 26.2 18Z`}),(0,R.jsx)(`path`,{fill:sD,d:`M37.8 9H49.4V18A5.8 5.8 0 0 1 37.8 18Z`}),(0,R.jsx)(`path`,{fill:nD,d:`M49.4 9H61V18A5.8 5.8 0 0 1 49.4 18Z`}),(0,R.jsx)(`g`,{transform:`translate(32 36.5) scale(.34)`,children:(0,R.jsx)(QE,{})})]}),agent:(0,R.jsxs)(`g`,{transform:`translate(32 33) scale(2.02) translate(-47.2 -41.8)`,children:[(0,R.jsx)(`path`,{fill:rD,d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,R.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,R.jsx)(eD,{})})]}),list:(0,R.jsxs)(`g`,{transform:`rotate(-7 32 32)`,children:[(0,R.jsx)(`path`,{style:{fill:rD},d:`M12 13Q6 13 6 19V50Q6 57 13 57H47Q53 57 53 50V20Q53 13 47 13Z`}),(0,R.jsx)(`path`,{style:{fill:sD},d:`M19 7H39Q42 7 44 9L55 20Q57 22 57 26V44Q57 50 51 50H19Q13 50 13 44V13Q13 7 19 7Z`}),(0,R.jsx)(`path`,{style:{fill:nD},d:`M39 7V18Q39 24 45 24H57Q57 22 55 20L44 9Q42 7 39 7Z`}),(0,R.jsxs)(`g`,{style:{fill:nD},children:[(0,R.jsx)(`circle`,{cx:`22`,cy:`21`,r:`3`}),(0,R.jsx)(`circle`,{cx:`22`,cy:`31`,r:`3`}),(0,R.jsx)(`circle`,{cx:`22`,cy:`41`,r:`3`})]}),(0,R.jsx)(`path`,{style:{stroke:rD},strokeWidth:`5`,strokeLinecap:`round`,d:`M31 21H32M31 31H46M31 41H42`})]}),chat:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`g`,{transform:`translate(3 11) scale(.22) translate(-449 -327)`,children:(0,R.jsx)(Tfe,{})}),(0,R.jsx)(ZE,{transform:`translate(38.2 18) rotate(16) scale(.95 .6)`}),(0,R.jsx)(ZE,{transform:`translate(44.4 20.5) rotate(47) scale(.95 .6)`})]}),read:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`g`,{transform:`translate(4 20.5) scale(.56)`,children:(0,R.jsx)(wfe,{})}),(0,R.jsx)(`g`,{transform:`translate(32 38.6) scale(.3164)`,children:(0,R.jsx)(QE,{})}),(0,R.jsx)(Cfe,{})]}),readConversations:(0,R.jsxs)(`g`,{transform:`translate(32 32) scale(.9) translate(-32 -32)`,children:[(0,R.jsx)(`g`,{transform:`translate(4 7.88) scale(.56)`,children:(0,R.jsx)($E,{fill:rD})}),(0,R.jsx)(`g`,{transform:`translate(32.2 30.3) scale(.352)`,children:(0,R.jsx)(QE,{})})]}),listAgents:(0,R.jsxs)(`g`,{transform:`translate(32 32) scale(1.04) translate(-32 -32)`,children:[(0,R.jsx)(`path`,{style:{fill:XE},d:`M32.059 10.146C23.878 10.646 18.949 14.844 18.925 21.331 18.912 24.856 20.167 27.259 22.274 27.74 24.437 28.233 26.097 29.061 27.481 30.337 28.275 31.068 28.328 31.096 29.352 31.306 31.161 31.677 31.653 32.094 32.115 33.651 32.392 34.582 32.557 34.868 32.915 35.041 33.919 35.523 35.864 33.733 36.539 31.706L36.775 30.997 38.008 30.681C42.663 29.489 45.29 26.142 45.468 21.176 45.734 13.784 40.673 9.62 32.059 10.146Z`}),(0,R.jsx)(`g`,{transform:`translate(32.4 21.2) scale(.39)`,children:(0,R.jsx)(eD,{onFigure:!0})}),(0,R.jsx)(`path`,{style:{fill:nD},d:`M14.375 27.586C8.014 28.591 4.363 32.396 4.355 38.027 4.347 43.93 8.071 47.469 15.239 48.368L16.828 48.568 17.873 49.568C19.854 51.464 22.469 52.496 23.691 51.864 24.384 51.506 24.431 51.044 23.924 49.606 23.337 47.943 23.479 47.492 24.749 46.977 32.756 43.73 32.643 31.899 24.573 28.49 22.238 27.504 17.535 27.087 14.375 27.586Z`}),(0,R.jsx)(`g`,{transform:`translate(17.6 37.7) scale(.38 .36)`,children:(0,R.jsx)(eD,{})}),(0,R.jsx)(`path`,{style:{fill:rD},d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,R.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,R.jsx)(eD,{})})]}),createAgents:(0,R.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,R.jsx)(`path`,{style:{fill:XE},d:`M20.436 24.499C13.35 25.216 7.504 28.799 5.442 33.687 3.114 39.208 4.438 45.791 8.593 49.358 10.446 50.949 10.34 50.831 10.34 51.301 10.34 51.796 10.106 52.294 9.281 53.558 7.191 56.76 12.108 56.905 16.701 53.777 17.517 53.221 17.715 53.135 18.015 53.201 20.013 53.639 25.739 53.051 28.595 52.113 35.47 49.857 39.129 44.162 37.83 37.738C37 31 33 26 26.717 24.428L24.075 24.413C22.623 24.405 20.985 24.444 20.436 24.499Z`}),(0,R.jsx)(`g`,{transform:`translate(21.9 40) scale(.46 .43)`,children:(0,R.jsx)(eD,{onFigure:!0})}),(0,R.jsx)(`path`,{style:{fill:iD},d:`M37.987 15.734C32.277 16.627 28.675 20.713 28.92 26.022 29.062 29.118 30.627 31.606 33.331 33.036 34.675 33.747 34.761 34.018 34.237 35.923 33.376 39.051 36.878 38.551 39.174 35.218 39.574 34.637 39.65 34.583 40.058 34.583 46.203 34.583 50.414 30.91 50.424 25.543 50.435 18.989 44.932 14.649 37.987 15.734Z`}),(0,R.jsx)(`g`,{transform:`translate(38.9 24.9) scale(.31)`,children:(0,R.jsx)(eD,{})}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(48.1 15.7) rotate(31) scale(1.25 .85)`}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(52.2 19.8) rotate(70) scale(1.25 .85)`})]}),sendPrompts:(0,R.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,R.jsx)(`g`,{transform:`translate(4 13.2) scale(.412 .436)`,children:(0,R.jsx)($E,{fill:nD})}),(0,R.jsx)(`g`,{transform:`translate(17.1 28.7) scale(.19)`,children:(0,R.jsx)(Efe,{})}),(0,R.jsx)(ZE,{fill:iD,transform:`translate(48.1 26.4) rotate(65) scale(1.7 1.28)`}),(0,R.jsx)(ZE,{fill:iD,transform:`translate(48.4 33.8) rotate(110) scale(1.7 1.28)`})]}),write:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Dfe,{}),(0,R.jsx)(Ofe,{})]}),run:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{style:{fill:rD},x:`6`,y:`9`,width:`52`,height:`43`,rx:`7`}),(0,R.jsx)(`path`,{style:{stroke:sD},strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m17 22 9 8-9 8m17 0h12`})]}),stop:(0,R.jsx)(`rect`,{style:{fill:nD},x:`12`,y:`12`,width:`40`,height:`40`,rx:`9`}),connected:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:`none`,style:{stroke:rD},strokeWidth:`12`,strokeLinecap:`round`,d:`M34 37Q43 21 26 20H18Q3 20 6 37q2 10 15 9`}),(0,R.jsx)(`path`,{fill:`none`,style:{stroke:nD},strokeWidth:`12`,strokeLinecap:`round`,d:`M29 33Q20 50 38 53h8q16-1 12-17-2-11-14-10`}),(0,R.jsx)(`path`,{style:{stroke:oD},strokeWidth:`4`,strokeLinecap:`round`,d:`m27 4 2 6m10-5-2 7m12 0-5 4`})]}),working:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`ellipse`,{style:{fill:iD},cx:`23`,cy:`14`,rx:`13`,ry:`8`,transform:`rotate(-30 23 14)`}),(0,R.jsx)(`ellipse`,{style:{fill:oD},cx:`48`,cy:`36`,rx:`13`,ry:`8`,transform:`rotate(35 48 36)`}),(0,R.jsx)(`ellipse`,{style:{fill:aD},cx:`22`,cy:`48`,rx:`13`,ry:`8`,transform:`rotate(45 22 48)`}),(0,R.jsx)(`path`,{fill:`none`,style:{stroke:XE},strokeWidth:`3`,strokeLinecap:`round`,d:`M42 8q13 2 13 13M43 55q-5 5-12 4M5 39q-5-9 1-17`})]}),complete:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{style:{fill:iD},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,R.jsx)(`path`,{fill:`none`,style:{stroke:cD},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m23 29 7 7 13-15`}),(0,R.jsx)(`path`,{style:{stroke:XE},strokeWidth:`3`,strokeLinecap:`round`,d:`m4 8 5 6m48-4 5-5M2 24l6 1`})]}),installApps:(0,R.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,R.jsx)(`rect`,{style:{fill:rD},x:`9`,y:`26`,width:`46`,height:`32`,rx:`10`}),(0,R.jsx)(`rect`,{style:{fill:sD},x:`17`,y:`33`,width:`30`,height:`18`,rx:`5`}),(0,R.jsx)(`path`,{style:{fill:iD},d:`M22 38h8v8h-8z`}),(0,R.jsx)(`path`,{style:{fill:aD},d:`M34 38h8v8h-8z`}),(0,R.jsx)(`path`,{style:{stroke:nD},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M32 4v17m-8-7 8 8 8-8`})]}),restricted:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:`none`,style:{stroke:nD},strokeWidth:`9`,strokeLinecap:`round`,d:`M16 23V19q0-17 16-17t16 17v4`}),(0,R.jsx)(`rect`,{style:{fill:nD},x:`8`,y:`26`,width:`48`,height:`36`,rx:`9`}),(0,R.jsx)(`path`,{style:{fill:sD},d:`M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z`})]}),error:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{style:{fill:nD},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,R.jsx)(`path`,{fill:`none`,style:{stroke:sD},strokeWidth:`7`,strokeLinecap:`round`,d:`M32 18v15`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`32`,cy:`45`,r:`4`})]}),trellis:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`g`,{fill:oD,children:[(0,R.jsx)(`rect`,{x:`17.25`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,R.jsx)(`rect`,{x:`42.95`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,R.jsx)(`rect`,{x:`30.4`,y:`18`,width:`3.2`,height:`26`}),(0,R.jsx)(`rect`,{x:`14.8`,y:`15.75`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,R.jsx)(`rect`,{x:`14.8`,y:`28.85`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,R.jsx)(`rect`,{x:`14.8`,y:`42.55`,width:`34.4`,height:`3.1`,rx:`1.55`})]}),(0,R.jsx)(`path`,{fill:`none`,stroke:iD,strokeWidth:`3`,strokeLinecap:`round`,d:`M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8`}),(0,R.jsx)(`path`,{fill:`none`,stroke:iD,strokeWidth:`3`,strokeLinecap:`round`,d:`M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2`}),(0,R.jsx)(tD,{transform:`translate(32.1 14.1) rotate(45) scale(0.45 0.86)`}),(0,R.jsx)(tD,{transform:`translate(32.2 14.7) rotate(-60) scale(0.42 0.58)`}),(0,R.jsx)(tD,{transform:`translate(34.8 28.3) rotate(65) scale(0.38 0.8)`}),(0,R.jsx)(tD,{transform:`translate(28.2 33.1) rotate(-51) scale(0.5 0.57)`}),(0,R.jsx)(tD,{transform:`translate(28.6 53.3) rotate(-48) scale(0.47 0.6)`}),(0,R.jsx)(`circle`,{fill:nD,cx:`31.9`,cy:`18.8`,r:`4`}),(0,R.jsx)(`circle`,{fill:rD,cx:`32`,cy:`32.3`,r:`4`}),(0,R.jsx)(`circle`,{fill:aD,cx:`32`,cy:`44.2`,r:`4`})]}),games:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:rD,d:`M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`26.8`,cy:`37.9`,rx:`9.1`,ry:`5.6`}),(0,R.jsx)(`ellipse`,{fill:cD,cx:`27`,cy:`37.6`,rx:`4.7`,ry:`2.2`}),(0,R.jsx)(`path`,{fill:cD,d:`M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z`}),(0,R.jsx)(`circle`,{fill:nD,cx:`27.1`,cy:`18.3`,r:`12.4`}),(0,R.jsx)(`circle`,{fill:sD,cx:`22.6`,cy:`14.3`,r:`3.05`}),(0,R.jsx)(`ellipse`,{fill:oD,cx:`45.1`,cy:`37.2`,rx:`5.6`,ry:`3.95`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`40.1`,cy:`46.6`,rx:`6.2`,ry:`4.4`})]}),oyster:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:aD,d:`M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z`}),(0,R.jsx)(`circle`,{fill:sD,cx:`34.9`,cy:`41.9`,r:`11.3`}),(0,R.jsxs)(`g`,{fill:cD,children:[(0,R.jsx)(`rect`,{x:`29.9`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`}),(0,R.jsx)(`rect`,{x:`36.7`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`})]}),(0,R.jsx)(`path`,{fill:aD,d:`M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z`}),(0,R.jsx)(`path`,{fill:`none`,stroke:oD,strokeWidth:`3`,strokeLinecap:`round`,d:`M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1`})]}),tourtois:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{fill:sD,x:`11.07`,y:`35.73`,width:`26.8`,height:`9.7`,rx:`3.25`,transform:`rotate(-5 24.47 40.58)`}),(0,R.jsx)(`path`,{fill:oD,d:`M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z`}),(0,R.jsx)(`path`,{fill:nD,d:`M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z`}),(0,R.jsx)(`path`,{fill:rD,d:`M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z`}),(0,R.jsx)(`path`,{fill:sD,d:`M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z`}),(0,R.jsxs)(`g`,{fill:sD,children:[(0,R.jsx)(`circle`,{cx:`14.7`,cy:`18.45`,r:`1`}),(0,R.jsx)(`circle`,{cx:`17.6`,cy:`17.65`,r:`1`}),(0,R.jsx)(`circle`,{cx:`20.5`,cy:`16.85`,r:`1`}),(0,R.jsx)(`circle`,{cx:`17.9`,cy:`22.2`,r:`1`}),(0,R.jsx)(`circle`,{cx:`21`,cy:`21.5`,r:`1`}),(0,R.jsx)(`circle`,{cx:`24.1`,cy:`20.75`,r:`1`}),(0,R.jsx)(`circle`,{cx:`28.2`,cy:`25.3`,r:`1`})]}),(0,R.jsx)(`circle`,{fill:nD,cx:`21.7`,cy:`26.6`,r:`1`}),(0,R.jsx)(`circle`,{fill:oD,cx:`24.9`,cy:`25.9`,r:`1.05`}),(0,R.jsxs)(`g`,{fill:iD,children:[(0,R.jsx)(`ellipse`,{cx:`8.8`,cy:`36.6`,rx:`3.6`,ry:`1.9`,transform:`rotate(22 8.8 36.6)`}),(0,R.jsx)(`path`,{d:`M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5L12 41Z`}),(0,R.jsx)(`path`,{d:`M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z`})]}),(0,R.jsx)(`ellipse`,{fill:iD,cx:`46.4`,cy:`30.6`,rx:`8.1`,ry:`8.3`}),(0,R.jsxs)(`g`,{fill:cD,children:[(0,R.jsx)(`rect`,{x:`45.05`,y:`26.95`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 46.2 29.3)`}),(0,R.jsx)(`rect`,{x:`49.25`,y:`26.4`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 50.4 28.7)`})]}),(0,R.jsx)(`path`,{fill:nD,d:`M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z`,transform:`rotate(-8 48.9 33.5)`}),(0,R.jsx)(`path`,{fill:`none`,stroke:oD,strokeWidth:`3`,strokeLinecap:`round`,d:`M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7`})]}),allApps:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{fill:nD,x:`7`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 18.6 18.6)`}),(0,R.jsx)(`rect`,{fill:rD,x:`33.9`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 45.5 18.6)`}),(0,R.jsx)(`rect`,{fill:iD,x:`7`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 18.6 45.5)`}),(0,R.jsx)(`rect`,{fill:oD,x:`33.9`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 45.5 45.5)`})]}),search:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:`none`,stroke:rD,strokeWidth:`6.5`,d:`M37 37.5 43 43.5`}),(0,R.jsx)(`path`,{fill:`none`,stroke:nD,strokeWidth:`12.6`,strokeLinecap:`round`,d:`M44.2 43.8 51.4 51.8`}),(0,R.jsx)(`path`,{fill:`none`,stroke:oD,strokeWidth:`3`,strokeLinecap:`round`,d:`M47.2 42.4 52.8 47.8`}),(0,R.jsx)(`ellipse`,{fill:rD,cx:`25.6`,cy:`24.6`,rx:`19.25`,ry:`18.6`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`25.2`,cy:`24.1`,rx:`14.2`,ry:`13.6`})]}),browser:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{fill:nD,x:`5.9`,y:`6.15`,width:`52.2`,height:`51.7`,rx:`5.5`}),(0,R.jsx)(`path`,{fill:sD,d:`M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z`}),(0,R.jsx)(`circle`,{fill:oD,cx:`12.2`,cy:`11.9`,r:`1.95`}),(0,R.jsx)(`circle`,{fill:rD,cx:`18.6`,cy:`11.9`,r:`1.95`}),(0,R.jsx)(`circle`,{fill:aD,cx:`25.1`,cy:`11.9`,r:`1.95`}),(0,R.jsx)(`circle`,{fill:iD,cx:`32`,cy:`34.9`,r:`14.5`}),(0,R.jsxs)(`g`,{fill:`none`,stroke:sD,strokeWidth:`3`,children:[(0,R.jsx)(`ellipse`,{cx:`32`,cy:`34.9`,rx:`7.7`,ry:`13.3`}),(0,R.jsx)(`path`,{d:`M17.5 34.9H46.5`})]})]}),internet:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`ellipse`,{fill:`none`,stroke:oD,strokeWidth:`4.4`,cx:`32.2`,cy:`30.2`,rx:`25.6`,ry:`8.1`,transform:`rotate(-20.8 32.2 30.2)`}),(0,R.jsx)(`circle`,{fill:rD,cx:`32`,cy:`32`,r:`21.1`}),(0,R.jsxs)(`g`,{fill:`none`,stroke:sD,strokeWidth:`3`,children:[(0,R.jsx)(`ellipse`,{cx:`32`,cy:`31.8`,rx:`12.2`,ry:`18.7`}),(0,R.jsx)(`path`,{d:`M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39`})]}),(0,R.jsx)(`path`,{fill:`none`,stroke:oD,strokeWidth:`4.4`,d:`M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2`,transform:`rotate(-20.8 32.2 30.2)`})]}),members:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`circle`,{fill:rD,cx:`41.9`,cy:`22.85`,r:`12.2`}),(0,R.jsx)(`path`,{fill:rD,d:`M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z`}),(0,R.jsx)(`circle`,{fill:nD,cx:`22.95`,cy:`27.6`,r:`12.85`}),(0,R.jsx)(`path`,{fill:nD,d:`M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z`}),(0,R.jsxs)(`g`,{fill:cD,children:[(0,R.jsx)(`circle`,{cx:`18.3`,cy:`28`,r:`1.6`}),(0,R.jsx)(`circle`,{cx:`27.9`,cy:`28`,r:`1.6`}),(0,R.jsx)(`circle`,{cx:`39.1`,cy:`23.05`,r:`1.55`}),(0,R.jsx)(`circle`,{cx:`47.25`,cy:`23.05`,r:`1.55`})]})]}),sell:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:oD,d:`M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`21.9`,cy:`40.8`,rx:`13.2`,ry:`3.6`}),(0,R.jsxs)(`g`,{transform:`rotate(-3 22.5 30) translate(0.5 0)`,children:[(0,R.jsx)(`path`,{fill:oD,d:`M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`23.7`,cy:`26.55`,rx:`13.05`,ry:`4.4`})]}),(0,R.jsxs)(`g`,{transform:`translate(46.3 40.3) rotate(-25)`,children:[(0,R.jsx)(`path`,{fill:nD,d:`M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z`}),(0,R.jsx)(`circle`,{fill:sD,cx:`0`,cy:`-10.7`,r:`2.2`})]}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(38.2 18.6) scale(1.1 .86)`}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(42.8 21.2) rotate(45) scale(1.1 .85)`})]}),schedule:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{fill:sD,x:`6`,y:`11`,width:`47.6`,height:`44`,rx:`6`}),(0,R.jsx)(`path`,{fill:nD,d:`M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z`}),(0,R.jsxs)(`g`,{fill:sD,children:[(0,R.jsx)(`circle`,{cx:`16.1`,cy:`16.15`,r:`3.4`}),(0,R.jsx)(`circle`,{cx:`43.4`,cy:`16.15`,r:`3.4`})]}),(0,R.jsxs)(`g`,{fill:rD,children:[(0,R.jsx)(`rect`,{x:`13.6`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`}),(0,R.jsx)(`rect`,{x:`40.9`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`})]}),(0,R.jsxs)(`g`,{fill:iD,children:[(0,R.jsx)(`rect`,{x:`11.1`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`20.7`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`30.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`20.7`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`30.4`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`11.1`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`30.4`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,R.jsxs)(`g`,{fill:aD,children:[(0,R.jsx)(`rect`,{x:`40.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`11.1`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`20.7`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,R.jsx)(`circle`,{fill:oD,cx:`45.5`,cy:`45.6`,r:`12.2`}),(0,R.jsx)(`path`,{fill:`none`,stroke:cD,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M45.1 39.3V46.2L51.3 49.8`}),(0,R.jsx)(`circle`,{fill:cD,cx:`45.1`,cy:`46.2`,r:`2.5`})]}),loop:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{style:{stroke:nD},strokeWidth:`6`,strokeLinecap:`round`,d:`M47.5 14.5C43 11 37.5 9 32 9 19.5 9 9 19.5 9 32S19.5 55 32 55 55 44.5 55 32`}),(0,R.jsx)(`path`,{style:{fill:nD},d:`M53.5 21.5Q54.5 20 55 22L58 33Q58.5 35 56.5 34.5L48.5 32.5Q47 32 48 30.5Z`}),(0,R.jsx)(`g`,{transform:`translate(18 21) scale(.28)`,children:(0,R.jsx)($E,{fill:rD})}),(0,R.jsxs)(`g`,{style:{fill:sD},children:[(0,R.jsx)(`rect`,{x:`25`,y:`27.5`,width:`14`,height:`3`,rx:`1.5`}),(0,R.jsx)(`rect`,{x:`25`,y:`33.5`,width:`9`,height:`3`,rx:`1.5`})]})]}),fungi:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`ellipse`,{fill:sD,cx:`33.5`,cy:`43.6`,rx:`18.6`,ry:`14.4`,transform:`rotate(-6 33.5 43.6)`}),(0,R.jsx)(`path`,{fill:nD,d:`M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z`}),(0,R.jsxs)(`g`,{fill:sD,children:[(0,R.jsx)(`ellipse`,{cx:`29`,cy:`15.7`,rx:`8.7`,ry:`6.3`,transform:`rotate(-15.5 29 15.7)`}),(0,R.jsx)(`ellipse`,{cx:`50.8`,cy:`20.1`,rx:`6.5`,ry:`3.5`,transform:`rotate(51.6 50.8 20.1)`}),(0,R.jsx)(`ellipse`,{cx:`13`,cy:`26.8`,rx:`4.2`,ry:`3.3`,transform:`rotate(-54.5 13 26.8)`})]}),(0,R.jsxs)(`g`,{fill:cD,transform:`translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)`,children:[(0,R.jsx)(`rect`,{x:`31.85`,y:`35.9`,width:`3.75`,height:`5.25`,rx:`1.85`}),(0,R.jsx)(`path`,{d:`M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z`}),(0,R.jsx)(`path`,{d:`M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z`})]})]})};function lD({name:e,size:t}){return(0,R.jsx)(`svg`,{viewBox:`0 0 64 64`,width:t,height:t,fill:`none`,stroke:`none`,"aria-hidden":`true`,focusable:`false`,"data-sigil":e,children:Pfe[e]})}var Ffe=[{id:`list`,label:`List files`,contract:Gle},{id:`read`,label:`Read files`,contract:eue},{id:`write`,label:`Write files`,contract:tue},{id:`run`,label:`Run commands`,contract:eC}],Ife={loading:`Loading`,unavailable:`Unavailable`,error:`Refresh failed`};function Lfe({app:e,terminal:t=null,processes:n,ports:r}){let[i,a]=(0,I.useState)(!1),[o,s]=(0,I.useState)(!1),c=async()=>{if(e){a(!0),s(!1);try{await e.ui.requestAppPermissions({})}catch{s(!0)}finally{a(!1)}}};return{id:`access`,label:`Access`,title:`Computer access`,content:(0,R.jsxs)(`div`,{className:`shed-instrument`,children:[(0,R.jsxs)(qE,{size:`sm`,children:[(0,R.jsx)(bfe,{icon:(0,R.jsx)(lD,{name:`computer`}),title:t?.name??`Selected Computer`,status:t?(0,R.jsx)(VE,{size:`compact`,label:`Terminal ${t.state}`,tone:t.state===`open`?`success`:t.state===`failed`?`error`:`neutral`}):null}),(0,R.jsxs)(xfe,{children:[(0,R.jsx)(JE,{legend:`Shed may`,wide:!0,children:(0,R.jsx)(WE,{"aria-label":`Shed may`,stateLabels:[`allowed`,`not allowed`],items:Ffe.map(({id:t,label:n,contract:r})=>({id:t,label:n,caption:t,icon:(0,R.jsx)(lD,{name:t}),on:e?.capabilities.has(r)===!0}))})}),(0,R.jsx)(uD,{label:`Processes`,value:n}),(0,R.jsx)(uD,{label:`Ports open`,value:r})]})]}),e?(0,R.jsx)(`div`,{className:`shed-instrument-keys`,children:(0,R.jsx)(yE,{size:`sm`,variant:`ghost`,disabled:i,onClick:()=>void c(),children:i?`Opening permissions…`:`App permissions…`})}):null,o?(0,R.jsx)(`p`,{role:`alert`,className:`shed-instrument-detail`,children:`Could not open App permissions. Try again.`}):null]})}}function uD({label:e,value:t}){return(0,R.jsx)(JE,{legend:e,role:`group`,"aria-label":e,children:t.kind===`loaded`?(0,R.jsx)(DE,{value:t.count,pad:2,size:`md`}):(0,R.jsx)(`span`,{className:`shed-instrument-note`,children:Ife[t.kind]})})}var Rfe={2:`h2`,3:`h3`,4:`h4`};function zfe(e,t){let{reduced:n}=t,r=e&&!n,i=UC(t,600),[a,o]=(0,I.useState)(r);return(0,I.useEffect)(()=>{if(o(r),!r)return;let e=globalThis.setTimeout(()=>{o(!1)},i);return()=>{globalThis.clearTimeout(e)}},[r,i]),a}var Bfe=(0,R.jsx)(_E,{decorative:!0,pace:`idle`,size:`md`,tone:`primary`,variant:`wander`}),dD=(0,I.forwardRef)(function({actions:e,secondaryAction:t,className:n,description:r,headingLevel:i=2,primaryAction:a,suggestions:o,thinking:s=!1,title:c,visual:l,renderVisual:u,variant:d=`plain`,...f},p){let m=(0,I.useId)(),h=(0,I.useRef)(null),g=HC(h),_=zfe(d===`speech`,g)&&!s,v=Rfe[i],y=l??(d===`panel`?`blobs`:void 0),b=u?u({speaking:_,thinking:s}):y===`blobs`?Bfe:y,x=`${m}-reason`,S=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(v,{ref:h,className:`empty-state-title`,id:f[`aria-labelledby`]?void 0:m,children:c}),(0,R.jsx)(`p`,{children:r}),a?(0,R.jsxs)(`div`,{className:`empty-state-primary`,children:[(0,R.jsxs)(`div`,{className:`empty-state-action-row`,children:[(0,R.jsx)(yE,{"aria-describedby":a.disabled&&a.disabledReason?x:void 0,disabled:a.disabled,loading:a.pending===!0,onClick:a.onSelect,variant:`primary`,children:a.label}),t]}),a.disabled&&a.disabledReason?(0,R.jsx)(`span`,{className:`empty-state-reason`,id:x,children:a.disabledReason}):null]}):null,o&&o.length>0?(0,R.jsx)(`ul`,{"aria-label":`Try one of these`,className:`empty-state-suggestions`,children:o.map((e,t)=>(0,R.jsx)(`li`,{children:(0,R.jsx)(yE,{disabled:e.disabled,loading:e.pending===!0,size:`sm`,variant:`outline`,onClick:e.onSelect,children:e.label})},`${String(t)}:${e.label}`))}):null,e?(0,R.jsx)(`div`,{className:`empty-state-actions`,children:e}):null]});return(0,R.jsxs)(`section`,{...f,"aria-labelledby":f[`aria-labelledby`]??m,className:RC(`empty-state`,d!==`plain`&&`empty-state-${d}`,n),ref:p,children:[b?(0,R.jsx)(`div`,{"aria-hidden":`true`,className:`empty-state-visual`,children:b}):null,d===`speech`?(0,R.jsx)(`div`,{className:`empty-state-bubble`,children:S}):S]})}),Vfe=(0,I.forwardRef)(function({className:e,orientation:t,variant:n=`grip`,value:r,min:i,max:a,onValueChange:o,onKeyDown:s,...c},l){return(0,R.jsx)(`div`,{...c,ref:l,className:RC(`caps-resize-handle`,e),"data-resize-variant":n,role:`separator`,"aria-orientation":t,"aria-valuemin":Math.round(i),"aria-valuemax":Math.round(a),"aria-valuenow":Math.round(r),tabIndex:c.tabIndex??0,onKeyDown:e=>{if(s?.(e),e.defaultPrevented)return;if(e.key===`Home`||e.key===`End`){e.preventDefault(),o(e.key===`Home`?i:a);return}let n=t===`horizontal`?e.key===`ArrowUp`?-32:e.key===`ArrowDown`?32:null:e.key===`ArrowLeft`?-32:e.key===`ArrowRight`?32:null;n!==null&&(e.preventDefault(),o(Math.min(a,Math.max(i,r+n))))},children:(0,R.jsx)(`span`,{className:`caps-resize-grip`,"aria-hidden":`true`})})});function fD(e){return`init`in e}function pD(e){return typeof e.write==`function`}function Hfe(e){return!!e.onMount}function mD(e){return`v`in e||`e`in e}function hD(e){if(`e`in e)throw e.e;return e.v}function gD(e){return typeof e?.then==`function`}function Ufe(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function _D(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function vD(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function Wfe(e){return!!e.INTERNAL_onInit}var Gfe=(e,t,n,...r)=>n.read(...r),Kfe=(e,t,n,...r)=>n.write(...r),qfe=(e,t,n)=>n.INTERNAL_onInit(t),Jfe=(e,t,n,r)=>n.onMount?.call(n,r),Yfe=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),Wfe(n)&&s(e,t,n)}return a},Xfe=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},Zfe=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of vD(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},Qfe=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(mD(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},T=r=>{var i;if(r===n){let n=u(e,t,r);if(!mD(n)){if(fD(r))g(e,t,r,r.init);else throw Error(`no atom init`)}return hD(n)}let o=p(e,t,r);try{return hD(o)}finally{S.delete(r),y.d.set(r,o.n),gD(y.v)&&_D(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},E,D,O={get signal(){return E||=new AbortController,E.signal},get setSelf(){return!D&&pD(n)&&(D=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),D}},k=y.n,A=o.get(n)===k;try{let i=l(e,t,n,T,O);if(g(e,t,n,i),gD(i)){_(e,t,i,()=>E?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){if(Ufe(e))throw e;return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==k&&A&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},$fe=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of vD(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},epe=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>hD(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!fD(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},tpe=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},npe=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),pD(n)&&Hfe(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},rpe=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},ipe=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(gD(r))for(let a of o.d.keys())_D(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,gD(c)&&a(e,t,c))},ape=(e,t,n)=>{let r=e[14];return hD(r(e,t,n))},ope=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},spe=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},cpe=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},lpe=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},upe=new WeakMap;function dpe(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Gfe,Kfe,qfe,Jfe,Yfe,Xfe,Zfe,Qfe,$fe,epe,tpe,npe,rpe,ipe,ape,ope,spe,void 0,new WeakMap,cpe,lpe,[0]].map((t,n)=>e[n]||t);upe.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var fpe=0;function ppe(e,t){let n=`atom${++fpe}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=mpe,r.write=hpe),t&&(r.write=t),r}function mpe(e){return e(this)}function hpe(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}function gpe(){return dpe()}var yD=ppe({frames:new Map,order:[],tiles:[],minima:new Map,participating:new Set,mainSize:void 0,zoomed:null,gesture:null,restore:new Map}),bD=(e,t,n)=>Math.min(Math.max(e,t),n),xD=(e,t,n)=>{let r=bD(e.width,n.width,Math.max(n.width,t.width)),i=bD(e.height,n.height,Math.max(n.height,t.height));return{width:r,height:i,x:bD(e.x,0,Math.max(0,t.width-r)),y:bD(e.y,0,Math.max(0,t.height-i))}},SD=(e,t,n)=>{let r=t.width/2,i=t.height/2;return xD(e===`left`?{x:0,y:0,width:r,height:t.height}:e===`right`?{x:r,y:0,width:r,height:t.height}:e===`top-left`?{x:0,y:0,width:r,height:i}:e===`top-right`?{x:r,y:0,width:r,height:i}:e===`bottom-left`?{x:0,y:i,width:r,height:i}:{x:r,y:i,width:r,height:i},t,n)},_pe=()=>{let e=gpe(),t=()=>e.get(yD),n=0,r=r=>{n+=1,e.set(yD,r(t()))},i=(e,t,n)=>{r(r=>{let i=new Map(r.frames);return i.set(e,t),{...r,frames:i,participating:new Set(r.participating).add(e),tiles:r.tiles.includes(e)?r.tiles:[...r.tiles,e],minima:new Map(r.minima).set(e,n),order:r.order.includes(e)?r.order:[...r.order.filter(e=>e!==r.zoomed),e,...r.zoomed?[r.zoomed]:[]]}})},a=e=>t().frames.has(e),o=(e,n)=>{let r=t().gesture;return r?.kind===`frame`&&r.id===e&&r.pointerId===n};return{get version(){return n},get frames(){return t().frames},get order(){return t().order},get tiles(){return t().tiles},get minima(){return t().minima},get participating(){return t().participating},get mainSize(){return t().mainSize},get zoomed(){return t().zoomed},get gesture(){return t().gesture},get restore(){return t().restore},subscribe:t=>e.sub(yD,t),register:i,setParticipation:(e,n)=>{t().frames.has(e)&&r(t=>{if(t.participating.has(e)===n)return t;let r=new Set(t.participating);n?r.add(e):r.delete(e);let i=n?t.tiles.includes(e)?t.tiles:[...t.tiles,e]:t.tiles.filter(t=>t!==e),a=n?t.order.includes(e)?t.order:[...t.order,e]:t.order.filter(t=>t!==e);return{...t,participating:r,tiles:i,order:a,zoomed:n||t.zoomed!==e?t.zoomed:null,gesture:!n&&t.gesture?.kind===`frame`&&t.gesture.id===e?null:t.gesture}})},setMinima:(e,n)=>{let i=t().minima.get(e);!i||i.width===n.width&&i.height===n.height||r(t=>({...t,minima:new Map(t.minima).set(e,n)}))},unregister:e=>{r(t=>{if(!t.frames.has(e))return t;let n=new Map(t.frames);n.delete(e);let r=new Map(t.restore);r.delete(e);let i=t.order.filter(t=>t!==e),a=t.tiles.filter(t=>t!==e),o=new Map(t.minima);o.delete(e);let s=new Set(t.participating);s.delete(e);let c=t.gesture?.kind===`frame`&&t.gesture.id===e?null:t.gesture;return{...t,frames:n,restore:r,order:i,tiles:a,minima:o,participating:s,gesture:c,zoomed:t.zoomed===e?null:t.zoomed}})},begin:(e,n)=>{!a(e)||!t().participating.has(e)||r(t=>({...t,gesture:{kind:`frame`,id:e,pointerId:n,start:t.frames.get(e)??{x:0,y:0,width:0,height:0}},order:[...t.order.filter(t=>t!==e),e]}))},move:(e,n,i,s,c,l=null)=>{a(e)&&t().participating.has(e)&&o(e,n)&&r(t=>({...t,frames:new Map(t.frames).set(e,xD(i,s,c)),gesture:t.gesture?.kind===`frame`?{...t.gesture,snap:l?{side:l,frame:SD(l,s,c)}:null}:t.gesture}))},end:(e,t)=>{o(e,t)&&r(t=>{let n=t.gesture;return n?.kind!==`frame`||!n.snap?{...t,gesture:null}:{...t,frames:new Map(t.frames).set(e,n.snap.frame),restore:new Map(t.restore).set(e,t.restore.get(e)??n.start),gesture:null}})},cancel:(e,n)=>{let i=t().gesture;i?.kind===`frame`&&i.id===e&&i.pointerId===n&&r(t=>{let n=new Map(t.frames);return n.set(e,i.start),{...t,frames:n,gesture:null}})},snap:(e,n,i,o)=>{!a(e)||!t().participating.has(e)||r(t=>{let r=new Map(t.restore);r.set(e,t.frames.get(e)??SD(n,i,o));let a=new Map(t.frames);return a.set(e,SD(n,i,o)),{...t,frames:a,restore:r,order:[...t.order.filter(t=>t!==e),e]}})},restoreFrame:(e,n,i)=>{!a(e)||!t().participating.has(e)||r(t=>{let r=t.restore.get(e);if(!r)return t;let a=new Map(t.frames);a.set(e,xD(r,n,i));let o=new Map(t.restore);return o.delete(e),{...t,frames:a,restore:o}})},focus:e=>{a(e)&&r(t=>({...t,order:[...t.order.filter(t=>t!==e),e],zoomed:t.zoomed===null?null:e}))},swap:(e,n)=>{!a(e)||!a(n)||!t().participating.has(e)||!t().participating.has(n)||r(t=>({...t,tiles:t.tiles.map(t=>t===e?n:t===n?e:t)}))},zoom:e=>{e!==null&&(!a(e)||!t().participating.has(e))||r(t=>({...t,zoomed:e,order:e===null?t.order:[...t.order.filter(t=>t!==e),e]}))},resizeMain:e=>{r(t=>({...t,mainSize:e}))},beginDivider:e=>!t().gesture&&(r(t=>({...t,gesture:{kind:`divider`,pointerId:e,start:t.mainSize}})),!0),finishDivider:(e,n)=>{let i=t().gesture;i?.kind===`divider`&&i.pointerId===e&&r(e=>({...e,gesture:null,mainSize:n?i.start:e.mainSize}))},destroy:()=>{r(e=>({...e,gesture:null,restore:new Map}))}}};function vpe(e,t,n,r,i){let a=i.layout??`main-left`;if(a===`columns`||a===`rows`||a===`grid`)return ype(e,t,n,r,i,a);if(a===`main-top`){let a=CD(e,new Map([...t].map(([e,t])=>[e,{width:t.height,height:t.width}])),n,{width:r.height,height:r.width},i);return{frames:new Map([...a.frames].map(([e,t])=>[e,{x:t.y,y:t.x,width:t.height,height:t.width}])),tabGroups:a.tabGroups,divider:a.divider&&{...a.divider,axis:`y`}}}return CD(e,t,n,r,i)}function ype(e,t,n,r,i,a){let o=new Map,s=[];if(!e.length)return{frames:o,tabGroups:s,divider:null};let c=Math.max(0,i.gap??8),l=e.reduce((e,n)=>({width:Math.max(e.width,t.get(n)?.width??0),height:Math.max(e.height,t.get(n)?.height??0)}),{width:0,height:0}),u=(t,n)=>n+c===0?e.length:Math.min(e.length,Math.max(1,Math.floor((t+c)/(n+c)))),d=u(r.width,l.width),f=u(r.height,l.height),p=l.width>r.width||l.height>r.height?1:a===`columns`?d:a===`rows`?f:Math.min(e.length,d*f),m=a===`columns`?p:a===`rows`?1:Math.min(d,Math.max(Math.ceil(Math.sqrt(p)),Math.ceil(p/f))),h=Math.ceil(p/m),g=(r.width-c*(m-1))/m,_=(r.height-c*(h-1))/h;for(let t=0;t<p;t++){let r=e.slice(t,t===p-1?void 0:t+1),i=r.length===1?r[0]:[...n].reverse().find(e=>r.includes(e))??r[0];i&&o.set(i,{x:t%m*(g+c),y:Math.floor(t/m)*(_+c),width:g,height:_}),r.length>1&&s.push(r)}return{frames:o,tabGroups:s,divider:null}}function CD(e,t,n,r,i){let a=new Map,o=[],s={x:0,y:0,...r},[c,...l]=e,u=(e,t)=>{let r=[...n].reverse().find(t=>e.includes(t))??e[0];r&&a.set(r,t),e.length>1&&o.push(e)};if(!c)return{frames:a,tabGroups:o,divider:null};if(!l.length)return a.set(c,s),{frames:a,tabGroups:o,divider:null};let d=Math.max(0,i.gap??8),f=t.get(c)?.width??0,p=Math.max(...l.map(e=>t.get(e)?.width??0)),m=r.width-d-p;if(f>m)return u([...e],s),{frames:a,tabGroups:o,divider:null};let h=Math.min(m,Math.max(f,i.mainSize??r.width/2)),g={axis:`x`,position:h,min:f,max:m};a.set(c,{...s,width:h});let _={...s,x:h+d,width:r.width-h-d},v=l.map(e=>t.get(e)?.height??0).reduce((e,t)=>e+t,0)+d*(l.length-1);if(v>r.height)u(l,_);else{let e=(r.height-v)/l.length,n=0;for(let r of l){let i=(t.get(r)?.height??0)+e;a.set(r,{..._,y:n,height:i}),n+=i+d}}return{frames:a,tabGroups:o,divider:g}}function wD(e,t=!0,n){let r=(0,I.useRef)(e);r.current=e;let i=(0,I.useRef)(null);return(0,I.useEffect)(()=>(t||i.current?.release(!0),()=>i.current?.release(!0)),[t]),(0,I.useEffect)(()=>{let e=()=>{i.current?.release(!0)};return n?.addEventListener(`abort`,e),()=>{n?.removeEventListener(`abort`,e)}},[n]),{onPointerDown:e=>{if(!t||n?.aborted||i.current||e.pointerType===`mouse`&&e.button!==0)return;let{currentTarget:a,pointerId:o}=e;if(a.setPointerCapture(o),!r.current.begin(e)){a.releasePointerCapture(o);return}let s=r.current.end,c=()=>{l(!0)},l=e=>{a.removeEventListener(`lostpointercapture`,c),i.current=null,s(e),a.hasPointerCapture(o)&&a.releasePointerCapture(o)};i.current={id:o,element:a,x:e.clientX,y:e.clientY,release:l},a.addEventListener(`lostpointercapture`,c)},onPointerMove:e=>{let t=i.current;t?.id===e.pointerId&&(r.current.move(e.clientX-t.x,e.clientY-t.y,e),t.x=e.clientX,t.y=e.clientY)},onPointerUp:e=>{i.current?.id===e.pointerId&&i.current.release(!1)},onPointerCancel:e=>{i.current?.id===e.pointerId&&i.current.release(!0)}}}function bpe(e,t){return e.x<20?e.y<20?`top-left`:e.y>t.height-20?`bottom-left`:`left`:e.x>t.width-20?e.y<20?`top-right`:e.y>t.height-20?`bottom-right`:`right`:null}var TD=(0,I.createContext)(null);function xpe({bounds:e,tiling:t,containerRef:n,children:r}){let i=(0,I.useMemo)(_pe,[]);(0,I.useSyncExternalStore)(i.subscribe,()=>i.version,()=>i.version),(0,I.useEffect)(()=>()=>{i.destroy()},[i]);let a={...t};i.mainSize!==void 0&&(a.mainSize=i.mainSize);let o=t?vpe(i.tiles,i.minima,i.order,e,a):{frames:new Map([...i.frames].filter(([e])=>i.participating.has(e)).map(([t,n])=>[t,xD(n,e,i.minima.get(t)??{width:0,height:0})])),tabGroups:[],divider:null};return i.zoomed&&i.participating.has(i.zoomed)&&(o.frames=new Map([[i.zoomed,{x:0,y:0,...e}]]),o.divider=null,o.tabGroups=[]),(0,R.jsx)(TD.Provider,{value:{state:i,bounds:e,tiled:t!==void 0,arrangement:o,containerRef:n},children:r})}function ED(){let e=(0,I.useContext)(TD);if(!e)throw Error(`Maosaico hooks must be used within MaosaicoRoot`);return e}function Spe(){let{state:e,arrangement:t,tiled:n,bounds:r}=ED(),i=e.tiles,a=(0,I.useRef)({pointer:0,position:0}),o=t.divider,s=wD({begin:t=>!o||!e.beginDivider(t.pointerId)?!1:(a.current={pointer:t.pointerId,position:o.position},!0),move:(t,n)=>{o&&(a.current.position=Math.min(o.max,Math.max(o.min,a.current.position+(o.axis===`x`?t:n))),e.resizeMain(a.current.position))},end:t=>{e.finishDivider(a.current.pointer,t)}},o!==null);return{bounds:r,stackingStyle:{zIndex:e.order.length},mode:n?`tiled`:`floating`,order:i,interacting:e.gesture!==null,snapPreview:!n&&!e.zoomed&&e.gesture?.kind===`frame`?e.gesture.snap??null:null,activeId:e.order.at(-1)??null,zoomedId:e.zoomed,tabGroups:t.tabGroups,divider:o&&{...o,props:s},focus:e.focus,swap:e.swap,zoom:e.zoom,resizeMain:t=>{o&&e.resizeMain(Math.min(o.max,Math.max(o.min,t)))}}}function Cpe(e,t={}){let{state:n,bounds:r,tiled:i,arrangement:a,containerRef:o}=ED();(0,I.useLayoutEffect)(()=>(n.register(e.id,e.frame,e.minima),()=>{n.unregister(e.id)}),[n,e.id]),(0,I.useEffect)(()=>{n.setMinima(e.id,e.minima)},[n,e.id,e.minima.width,e.minima.height]);let s=t.participating??!0;(0,I.useLayoutEffect)(()=>{n.setParticipation(e.id,s)},[n,e.id,s]);let c=(0,I.useRef)(0),l=wD({begin:t=>!n.frames.has(e.id)||n.gesture?!1:(c.current=t.pointerId,n.begin(e.id,t.pointerId),!0),move:(i,a,s)=>{let l=o?.current?.getBoundingClientRect(),u=l&&t.kind!==`resize`?bpe({x:s.clientX-l.left,y:s.clientY-l.top},r):null,d=xD(n.frames.get(e.id)??e.frame,r,e.minima);n.move(e.id,c.current,t.kind===`resize`?{...d,width:d.width+i,height:d.height+a}:{...d,x:d.x+i,y:d.y+a},r,e.minima,u)},end:t=>{t?n.cancel(e.id,c.current):n.end(e.id,c.current)}},s&&!i&&!n.zoomed);return{frame:a.frames.get(e.id)??n.frames.get(e.id)??e.frame,stackingStyle:{zIndex:Math.max(0,n.order.indexOf(e.id))},visible:a.frames.has(e.id),active:s&&n.order.at(-1)===e.id,props:l,focus:()=>{s&&n.focus(e.id)},snap:t=>{s&&!i&&n.snap(e.id,t,r,e.minima)},restore:()=>{s&&!i&&n.restoreFrame(e.id,r,e.minima)}}}var wpe=(0,I.createContext)(null);(0,I.forwardRef)(function({layer:e,style:t,children:n,...r},i){let a=(0,I.useContext)(wpe),o=a?.update,s=a?.roots.get(`dialog`),[c,l]=(0,I.useState)(!1);(0,I.useEffect)(()=>{if(!s)return;let e=()=>{l(Array.from(s.querySelectorAll(`*`)).some(e=>{let t=e.getBoundingClientRect();return t.width>0&&t.height>0}))};e();let t=new MutationObserver(e);return t.observe(s,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[s]);let u=(0,I.useRef)(null);(0,I.useImperativeHandle)(i,()=>u.current);let d=(0,I.useCallback)(t=>{u.current=t,o?.(e,t)},[o,e]);return(0,I.createElement)(`div`,{...r,ref:d,onFocusCapture:t=>{e===`windows`&&t.target instanceof Node&&t.currentTarget.contains(t.target)&&a?.dismiss?.(),r.onFocusCapture?.(t)},"data-maosaico-layer":e,inert:e===`windows`&&c?``:void 0,style:{position:`relative`,...t,isolation:`isolate`,zIndex:`var(--stipe-layer-${e})`}},n)});var Tpe=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),DD=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Epe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Dpe=(0,I.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,I.createElement)(`svg`,{ref:c,...Epe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:DD(`lucide`,i),...s},[...o.map(([e,t])=>(0,I.createElement)(e,t)),...Array.isArray(a)?a:[a]])),OD=(e,t)=>{let n=(0,I.forwardRef)(({className:n,...r},i)=>(0,I.createElement)(Dpe,{ref:i,iconNode:t,className:DD(`lucide-${Tpe(e)}`,n),...r}));return n.displayName=`${e}`,n},kD=OD(`ArrowUpRight`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Ope=OD(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),AD=OD(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),kpe=OD(`Earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ape=OD(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),jpe=OD(`Eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Mpe=OD(`FileImage`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Npe=OD(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Ppe=OD(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),jD=OD(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Fpe=OD(`RotateCcw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),MD=OD(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ipe={xs:`size-3`,sm:`size-[var(--stipe-icon-size-sm)]`,md:`size-[var(--stipe-icon-size-md)]`,lg:`size-[var(--stipe-icon-size-lg)]`},ND=(0,I.forwardRef)(function({active:e=!1,icon:t,iconSize:n=`xs`,className:r,reveal:i=!1,size:a=`xs`,tone:o=`default`,variant:s=`ghost`,...c},l){let u=a===`responsive`;return(0,R.jsx)(yE,{...c,resultLabel:c.result===void 0?void 0:null,ref:l,size:u?`sm`:a,variant:s,className:RC(`caps-icon-button btn-circle`,u&&`caps-icon-button-responsive md:btn-xs`,e&&`text-accent`,i&&`scale-0 transition-transform group-hover:scale-100 focus-visible:scale-100`,o===`destructive`&&`hover:text-error`,r),children:(0,R.jsx)(`span`,{"aria-hidden":`true`,className:RC(`inline-flex shrink-0 [&>svg]:size-full [&>svg]:[stroke-width:var(--stipe-icon-stroke)]`,Ipe[n]),children:t})})}),Lpe=(0,I.forwardRef)(function({className:e,...t},n){return(0,R.jsx)(`div`,{...t,ref:n,className:RC(`caps-popover-anchor`,e)})}),Rpe=(0,I.forwardRef)(function({className:e,open:t,side:n=`top`,...r},i){return t?(0,R.jsx)(`div`,{...r,ref:i,className:RC(`caps-popover`,e),"data-side":n}):null});(0,I.forwardRef)(function({active:e,className:t,onMouseDown:n,...r},i){return(0,R.jsx)(`div`,{role:`option`,"aria-selected":e,...r,ref:i,className:RC(`caps-popover-option`,t),"data-active":e,onMouseDown:e=>{e.preventDefault(),n?.(e)}})});function zpe({items:e,openId:t,onOpenChange:n,leading:r,trailing:i,renderTrigger:a,placement:o=`housing`,align:s=`end`,hostInset:c,className:l,...u}){let d=(0,I.useId)(),f=(0,I.useRef)(null),p=(0,I.useRef)(null),m=(0,I.useRef)(new Map),h=e.find(e=>e.id===t&&!e.disabled),g=h?.id,_=()=>{g&&m.current.get(g)?.focus(),n(null)};return(0,I.useEffect)(()=>{g&&p.current?.focus()},[g]),(0,I.useEffect)(()=>{c===void 0?f.current?.style.removeProperty(`--caps-status-tray-host-inset`):f.current?.style.setProperty(`--caps-status-tray-host-inset`,`${String(Math.max(0,c))}px`)},[c]),(0,I.useEffect)(()=>{if(!g)return;let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),m.current.get(g)?.focus(),n(null))},t=e=>{e.target instanceof Node&&!f.current?.contains(e.target)&&n(null)};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t)}},[g,n]),(0,R.jsxs)(Lpe,{...u,ref:f,className:RC(`caps-status-tray`,l),"data-placement":o,"data-align":s,children:[h?(0,R.jsxs)(Rpe,{open:!0,ref:p,tabIndex:-1,side:`top`,id:`${d}-${h.id}`,role:`dialog`,"aria-labelledby":`${d}-title`,className:`caps-status-tray-panel`,"data-status-tray-panel":h.id,children:[(0,R.jsxs)(`div`,{className:`caps-status-tray-head`,children:[h.tone?(0,R.jsx)(VE,{size:`compact`,tone:h.tone,glyph:h.glyph??`dot`}):null,(0,R.jsx)(`span`,{id:`${d}-title`,className:`caps-status-tray-title`,children:h.title??h.label}),h.actions,(0,R.jsx)(ND,{"aria-label":`Close tray`,icon:(0,R.jsx)(MD,{"aria-hidden":`true`}),onClick:_})]}),(0,R.jsx)(`div`,{className:`caps-status-tray-body`,children:h.content})]}):null,o===`host`?null:(0,R.jsxs)(`div`,{className:`caps-status-tray-row`,children:[r,(0,R.jsx)(`div`,{className:`caps-status-tray-chips`,children:e.map(e=>{let r={ref:t=>{t?m.current.set(e.id,t):m.current.delete(e.id)},type:`button`,className:a?void 0:`caps-status-tray-chip`,"aria-expanded":g===e.id,"aria-controls":g===e.id?`${d}-${e.id}`:void 0,"aria-label":e.accessibleLabel,disabled:e.disabled,title:e.disabled?e.accessibleLabel:void 0,"aria-haspopup":`dialog`,"data-status-tray-chip":e.id,onClick:()=>{n(t===e.id?null:e.id)},children:(0,R.jsxs)(R.Fragment,{children:[e.tone?(0,R.jsx)(VE,{size:`compact`,glyph:e.glyph??`dot`,motion:e.motion??`none`,tone:e.tone}):null,(0,R.jsx)(`span`,{className:`caps-status-tray-label`,children:e.label}),e.count!==void 0&&e.count>0?(0,R.jsx)(`span`,{className:`caps-status-tray-count`,children:e.count}):null]})};return(0,R.jsxs)(I.Fragment,{children:[a?a(r):(0,R.jsx)(`button`,{...r}),e.after]},e.id)})}),i]})]})}function Bpe({children:e,className:t,...n}){return(0,R.jsx)(`div`,{...n,className:RC(`caps-status-tray-list`,t),children:e})}function PD({icon:e,primary:t,secondary:n,actions:r,className:i,...a}){return(0,R.jsxs)(`div`,{...a,className:RC(`caps-status-tray-item`,i),children:[e?(0,R.jsx)(`span`,{className:`caps-status-tray-icon`,children:e}):null,(0,R.jsxs)(`span`,{className:`caps-status-tray-text`,children:[(0,R.jsx)(`span`,{className:`caps-status-tray-primary`,children:t}),n?(0,R.jsx)(`span`,{className:`caps-status-tray-secondary`,children:n}):null]}),r?(0,R.jsx)(`span`,{className:`caps-status-tray-actions`,children:r}):null]})}function FD({children:e=`All caught up.`,title:t}){return(0,R.jsxs)(`div`,{className:`caps-status-tray-note`,children:[t?(0,R.jsx)(`strong`,{className:`caps-status-tray-note-title`,children:t}):null,(0,R.jsx)(`p`,{children:e})]})}function Vpe({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function ID(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var LD=[],RD=0,{link:zD,unlink:Hpe,propagate:Upe,checkDirty:BD,shallowPropagate:VD}=Vpe({update(e){return e._update()},notify(e){LD[UD++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,qD(e))}}),HD=0,UD=0,WD,GD=0;function KD(e){try{++GD,e()}finally{--GD||JD()}}function qD(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Hpe(n,e)}function JD(){if(!(GD>0)){for(;HD<UD;){let e=LD[HD];LD[HD++]=void 0,e.notify()}HD=0,UD=0}}function YD(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return WD!==void 0&&zD(i,WD,RD),i._snapshot},subscribe(e){let t=ID(e),n={current:!1},r=Wpe(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=WD,o=t?.compare??Object.is;if(n)WD=i,++RD,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{WD=a,n&&(i.flags&=-5),qD(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&BD(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&VD(e)}}else e&32&&(i.flags=e&-33);return WD!==void 0&&zD(i,WD,RD),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Upe(e),VD(e),JD())}},i}function Wpe(e){let t=()=>{let t=WD;WD=n,++RD,n.depsTail=void 0,n.flags=6;try{return e()}finally{WD=t,n.flags&=-5,qD(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&BD(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,qD(this)}};return t(),n}var XD=class{constructor(e,t){this.atom=YD(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(ID(e))}},Gpe=class{constructor(e){this.atom=YD(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(ID(e))}};function ZD(e,t){return typeof e==`function`?new Gpe(e):t?new XD(e,t):new XD(e)}var Kpe=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function qpe(e,t){return new Kpe(e,t).maybeExecute}var Jpe=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},QD=new class extends Jpe{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function $D(e,t){return typeof e==`function`?e(t):e}function eO(e,t){return oO(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function tO(e,t,n){let r=oO(t);function i(e){if(!r.length)return $D(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function Ype(e,t){let n=oO(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var nO=46,rO=91,iO=93,aO=48,Xpe=57;function oO(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===rO),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===nO||s===rO||s===iO){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==aO),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==iO&&(a!==-1||s!==iO)&&(a!==s||s!==nO&&s!==rO)&&n.push(``);r=o+1,i=!0}else(s<aO||s>Xpe)&&(i=!1);a=s}return n.length||n.push(``),n}function Zpe(e){return!(Array.isArray(e)&&e.length===0)}function sO(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function cO(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var lO=e=>!!e&&typeof e==`object`&&`fields`in e;function uO(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!uO(e[i],t[i]))return!1;return!0}var dO=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},fO=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function pO(e,t){return e==null?t:{...e,...t}}for(var mO=256,hO=[],gO;mO--;)hO[mO]=(mO+256).toString(16).substring(1);function _O(){let e=0,t,n=``;if(!gO||mO+16>256){for(gO=Array(256),e=256;e--;)gO[e]=256*Math.random()|0;e=0,mO=0}for(;e<16;e++)t=gO[mO+e],n+=e===6?hO[t&15|64]:e===8?hO[t&63|128]:hO[t],e&1&&e>1&&e<11&&(n+=`-`);return mO++,n}var Qpe=qpe(e=>QD.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function vO(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=vO(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,vO(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(vO(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=vO(e[n]));return t}function yO(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var bO=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function $pe(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var xO=(e,t)=>{let n=$pe(e,t);return{form:n,fields:n}},SO={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:xO(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:xO(r.issues,e)}},CO=e=>!!e&&`~standard`in e,wO={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function TO(e){function t(t){let n=e.getFieldMeta(t)??wO;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>wO;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function EO(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var DO=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{Qpe(this)}),t=QD.on(`request-form-state`,e=>{e.payload.id===this._formId&&QD.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=QD.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=QD.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),QD.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return QD.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!uO(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!uO(e.defaultState,t.defaultState)&&!this.state.isTouched;if(!(!n&&!r)){if(KD(()=>{this.baseStore.setState(()=>EO(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=TO(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}QD.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=tO(t,e.instance.name,e.instance.options.defaultValue))}),EO({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return KD(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return KD(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=sO(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||bO}),r=!1,i={};return KD(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=OO(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=kO(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??wO,r=a?.[e],{newErrorValue:s,newSource:c}=dO({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=wO)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=kO(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=kO(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=cO(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||bO});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=kO(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=OO(r);s&&(i=i?{...i,...s}:s);let c=kO(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??wO,r=i?.[e],{newErrorValue:a,newSource:o}=dO({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=wO)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),KD(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),QD.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),QD.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}KD(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),KD(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),QD.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),QD.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>eO(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:$D(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=wO,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;KD(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:tO(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t!==n&&t.startsWith(n)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=Ype(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),TO(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],pO(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),TO(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),pO(r,{dontValidate:!0})),TO(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),pO(n,{dontValidate:!0})),TO(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return tO(tO(e,`${t}`,i),`${n}`,r)},pO(r,{dontValidate:!0})),TO(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},pO(r,{dontValidate:!0})),TO(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],pO(t,{dontValidate:!0})),TO(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=eO(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:wO},values:i===void 0?t.values:tO(t.values,e,i)}})},this.setErrorMap=e=>{KD(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(lO(t)){let{formError:e,fieldErrors:r}=OO(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>SO.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>SO.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??_O(),this._devtoolsSubmissionOverride=!1;let t=EO({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(!(n===void 0||!lO(n)))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=ZD(t);let n;this.fieldMetaDerived=ZD(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=eO(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!Zpe(u),f=!o.isDirty,p=uO(l,this.getFieldInfo(a)?.instance?.options.defaultValue??eO(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=ZD(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!yO(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&yO(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];(!y||y.__srcErrorMap!==g)&&(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=ZD(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&lO(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&uO(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return CO(e.validate)?SO[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function OO(e){return e?lO(e)?{formError:OO(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function kO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var AO=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...wO,isTouched:e.fieldMetaBase[this.name]?.isTouched??wO.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??wO.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??wO.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(uO(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,pO(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,pO(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,pO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,pO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,pO(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,pO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,pO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,pO(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=sO(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||bO}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=sO(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||bO});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;KD(()=>{let e=(e,n)=>{let r=MO(n.cause),a=n.validate?jO(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=fO({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=MO(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=cO(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||bO}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=cO(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||bO});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));KD(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=MO(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=jO(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=fO({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),KD(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>yO(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[MO(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[MO(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)a.get(t)&&!t.options.asyncAlways||c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>SO.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>SO.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)yO(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=ZD(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...wO,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!uO(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return CO(e.validate)?SO[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function jO(e){if(e)return e}function MO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function NO(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function eme(e){return{...wO,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var PO=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??NO({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(uO(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...wO,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??NO({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;IO(t)&&(n=t.group,r=t.fields);let i=FO(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:NO({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,pO(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof AO&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&yO(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=dO({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=wO)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=sO(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||bO}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=sO(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||bO});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;KD(()=>{let t=(t,r)=>{let i=RO(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&IO(s)&&(c=s.group,l=s.fields);let u=FO(c),d=n[i],{newErrorValue:f,newSource:p}=fO({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=RO(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=cO(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||bO}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=cO(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||bO});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=RO(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&IO(o)&&(l=o.group,u=o.fields);let d=FO(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=fO({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return KD(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>yO(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[RO(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>yO(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),KD(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid()){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}KD(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),KD(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=ZD(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??eme(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!uO(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(CO(e.validate)){let t=SO[e.type](e.value,e.validate);return e.type===`validate`?LO(t):t.then(LO)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function FO(e){if(e)return e}function IO(e){return!!e&&typeof e==`object`&&`fields`in e}function LO(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function RO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function tme(e,t){if(!t)return;let n=Object.assign({},e,{state:vO(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return KD(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var nme=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),zO=o(((e,t)=>{t.exports=nme()})),rme=o((e=>{var t=u(),n=zO();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),BO=o(((e,t)=>{t.exports=rme()}))();function ime(e,t){return e===t}function VO(e,t=e=>e,n){let r=n?.compare??ime,i=(0,I.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,I.useCallback)(()=>e.get(),[e]);return(0,BO.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var HO=typeof window<`u`?I.useLayoutEffect:I.useEffect;function UO(e){let[t,n]=(0,I.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,I.useState)(()=>new AO({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new AO({...e}),i(a),n({form:e.form,name:e.name}));let o=VO(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=VO(a.store,e=>e.meta.isTouched),c=VO(a.store,e=>e.meta.isBlurred),l=VO(a.store,e=>e.meta.isDirty),u=VO(a.store,e=>e.meta.errorMap),d=VO(a.store,e=>e.meta.errorSourceMap),f=VO(a.store,e=>e.meta.isValidating),p=(0,I.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return HO(a.mount,[a]),HO(()=>{a.update(e)}),p}var ame=(({children:e,...t})=>{let n=UO(t),r=(0,I.useMemo)(()=>$D(e,n),[e,n]);return(0,R.jsx)(R.Fragment,{children:r})});function ome(){return(0,I.useState)(()=>_O())[0]}var sme=I,cme=`18.3.1`.split(`.`)[0]===`17`?ome:sme.useId;function lme(e){let[t,n]=(0,I.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,I.useState)(()=>new PO({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new PO({...e})),n({form:e.form,name:e.name}));let a=VO(r.store,e=>e.value),o=VO(r.store,e=>e.meta.isTouched),s=VO(r.store,e=>e.meta.isBlurred),c=VO(r.store,e=>e.meta.isDirty),l=VO(r.store,e=>e.meta.errorMap),u=VO(r.store,e=>e.meta.errorSourceMap),d=VO(r.store,e=>e.meta.isValidating),f=VO(r.store,e=>e.meta.isSubmitting),p=VO(r.store,e=>e.meta.isSubmitted),m=VO(r.store,e=>e.meta.submissionAttempts),h=VO(r.store,e=>e.meta.isSubmitSuccessful),g=VO(r.store,e=>e.meta.canSubmit),_=VO(r.store,e=>e.meta.isValid),v=VO(r.store,e=>e.meta.isFieldsValid),y=VO(r.store,e=>e.meta.isFieldsValidating),b=VO(r.store,e=>e.meta.isGroupValid),x=(0,I.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:_,isFieldsValid:v,isFieldsValidating:y,isGroupValid:b}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b]);return HO(r.mount,[r]),HO(()=>{r.update(e)}),x}var ume=(({children:e,...t})=>{let n=lme(t),r=(0,I.useMemo)(()=>$D(e,n),[e,n]);return(0,R.jsx)(R.Fragment,{children:r})});function dme({form:e,selector:t=e=>e,children:n}){let r=VO(e.store,t);return(0,R.jsx)(R.Fragment,{children:$D(n,r)})}function fme(e){let t=cme(),[n,r]=(0,I.useState)(e?.formId),[i,a]=(0,I.useState)(()=>new DO({...e,formId:e?.formId??t}));if(n!==e?.formId){let n=e?.formId??t;a(new DO({...e,formId:n})),r(n)}let o=(0,I.useMemo)(()=>{let e={...i,handleSubmit:((...e)=>i._handleSubmit(...e)),get formId(){return i._formId},get state(){return i.store.state}};return e.Field=function(e){return(0,R.jsx)(ame,{...e,form:i})},e.FormGroup=function(e){return(0,R.jsx)(ume,{...e,form:i})},e.Subscribe=function(e){return(0,R.jsx)(dme,{form:i,selector:e.selector,children:e.children})},e},[i]);HO(i.mount,[]),HO(()=>{i.update(e)});let s=(0,I.useRef)(!1);return HO(()=>{s.current&&e?.transform&&tme(i,e.transform)},[i,e?.transform]),HO(()=>{s.current=!0}),o}var pme=vg(Og),mme=vg(L({message:Og}));function hme(e){for(let t of e.errors){let e=Uu(nee(ree(mme(t),e=>e.message),()=>pme(t)));if(e!==void 0&&e.length>0)return e}}var gme=(0,I.forwardRef)(function({children:e,className:t,optional:n,required:r,...i},a){return(0,R.jsxs)(`label`,{...i,className:RC(`label caps-label cursor-pointer justify-start gap-sm text-sm font-semibold text-base-content`,t),ref:a,children:[e,r?(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`text-error`,children:`*`}):null,n&&!r?(0,R.jsx)(`span`,{className:`caps-label-optional`,children:`Optional`}):null]})}),WO=(0,I.forwardRef)(function({children:e,className:t,...n},r){return(0,R.jsx)(`div`,{...n,className:RC(`caps-input-group join flex w-full items-stretch [&>*]:join-item [&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>.btn]:shrink-0 [&>.input]:min-w-0 [&>.input]:flex-1 [&>.select]:min-w-0 [&>.select]:flex-1`,t),ref:r,children:I.Children.map(e,e=>(0,I.isValidElement)(e)?(0,I.cloneElement)(e,{className:RC(`join-item caps-input-group-control`,e.props.className)}):e)})}),GO=(0,I.forwardRef)(function({className:e,...t},n){return(0,R.jsx)(`div`,{...t,className:RC(`join-item flex items-center border border-base-300 bg-base-200 px-md text-sm text-base-content`,e),ref:n})});function _me(e){let t=e.parentElement;if(!t||e.previousElementSibling===null)return 0;let n=getComputedStyle(t);if(!(n.display.includes(`grid`)||n.display.includes(`flex`)&&n.flexDirection.startsWith(`column`)))return 0;let r=Number.parseFloat(n.rowGap);return Number.isFinite(r)?r:0}(0,I.forwardRef)(function({show:e,appear:t=!1,children:n,className:r,...i},a){let o=(0,I.useRef)(null);(0,I.useImperativeHandle)(a,()=>o.current);let s=qC(),[c,l]=(0,I.useState)(e),u=(0,I.useRef)(!0);return e&&!c&&l(!0),(0,I.useLayoutEffect)(()=>{let n=o.current,r=u.current;if(u.current=!1,!n||r&&!t)return;if(!GC(n)){e||l(!1);return}let i=VC(n),a=`translateY(${String(i.distance)}px)`,c=WC(i,i.ease),d=n.getBoundingClientRect().height,f=_me(n),p=(e,t)=>{n.style.overflow=`clip`;let r=e=>({height:`${String(e)}px`,marginBlockStart:`${String(e===0?-f:0)}px`}),a=n.animate([r(e),r(t)],{duration:i.normal,easing:c}),o=()=>{n.style.removeProperty(`overflow`)};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a};if(e){let e=[n.animate([{opacity:0,transform:a},{opacity:1,transform:`none`}],{duration:i.normal,easing:c})];return!s&&d>0&&e.push(p(0,d)),()=>{for(let t of e)t.cancel()}}let m=n.animate([{opacity:1,transform:`none`},{opacity:0,transform:a}],{duration:i.fast,easing:WC(i,i.easeExit),fill:`forwards`}),h=!s&&d>0?p(d,0):m;return h!==m&&h.effect?.updateTiming({fill:`forwards`}),h.addEventListener(`finish`,()=>{l(!1)}),()=>{m.cancel(),h.cancel()}},[e,t,s]),c?(0,R.jsx)(`div`,{...i,ref:o,className:RC(`caps-presence`,r),"data-present":e,"aria-hidden":!e||void 0,children:n}):null});var vme=(0,I.forwardRef)(function({open:e,children:t,className:n,...r},i){return(0,R.jsx)(`div`,{...r,ref:i,className:RC(`caps-collapse`,n),"data-open":e,"aria-hidden":!e||void 0,children:(0,R.jsx)(`div`,{className:`caps-collapse-clip`,children:t})})});(0,I.forwardRef)(function({swapKey:e,anchor:t=`start`,children:n,className:r,...i},a){let o=(0,I.useRef)(null);(0,I.useImperativeHandle)(a,()=>o.current);let s=qC(),[c,l]=(0,I.useState)({key:e,content:n}),[u,d]=(0,I.useState)([]);c.key===e?c.content!==n&&l({key:e,content:n}):(d([...u.filter(t=>t.key!==e&&t.key!==c.key),c]),l({key:e,content:n}));let f=(0,I.useRef)(null);return(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e||!(`ResizeObserver`in globalThis))return;f.current=e.getBoundingClientRect();let t=new ResizeObserver(()=>{e.getAnimations().length===0&&(f.current=e.getBoundingClientRect())});return t.observe(e),()=>{t.disconnect()}},[]),(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=[...e.querySelectorAll(`:scope > [data-swap-leaving]`)],n=e.querySelector(`:scope > [data-swap-current]`);if(n===null||t.length===0)return;if(!GC(e)){d([]);return}let r=f.current,i=e.getBoundingClientRect(),a=VC(e),c=[n.animate([{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(a.distance/2)}px)`},{opacity:1,filter:`blur(0px)`,transform:`none`}],{duration:a.normal,easing:WC(a,a.ease)})];for(let e of t){let t=e.animate([{opacity:1,filter:`blur(0px)`,transform:`none`},{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(-a.distance/2)}px)`}],{duration:a.fast,easing:WC(a,a.easeExit),fill:`forwards`}),n=e.dataset.swapLeaving;t.onfinish=()=>{d(e=>e.filter(e=>e.key!==n))},c.push(t)}let l=r!==null&&(Math.abs(r.height-i.height)>.5||Math.abs(r.width-i.width)>.5);return!s&&l&&c.push(e.animate([{width:`${String(r.width)}px`,height:`${String(r.height)}px`},{width:`${String(i.width)}px`,height:`${String(i.height)}px`}],{duration:a.normal,easing:WC(a,a.ease)})),()=>{for(let e of c)e.cancel()}},[e,s]),(0,R.jsx)(`div`,{...i,ref:o,className:RC(`caps-swap`,r),"data-anchor":t,children:[...u.map(e=>(0,R.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-leaving":e.key,"aria-hidden":`true`,children:e.content},e.key)),(0,R.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-current":``,children:n},e)]})});function KO({children:e,...t}){let[n,r]=(0,I.useState)(e);return e&&e!==n&&r(e),(0,R.jsx)(vme,{...t,className:RC(`caps-field-error-reveal`,t.className),open:!!e,children:(0,R.jsx)(`div`,{className:`caps-field-error`,role:`alert`,"aria-hidden":!e,children:n})})}function yme({children:e,divider:t=!0,error:n,layout:r=`end`,status:i,...a}){return(0,R.jsxs)(`footer`,{...a,className:RC(`caps-form-footer`,a.className),"data-divider":t,"data-layout":r,children:[(0,R.jsx)(KO,{children:n}),(0,R.jsxs)(`div`,{className:`caps-form-footer-row`,children:[i?(0,R.jsx)(`div`,{className:`caps-form-footer-status`,role:`status`,children:i}):null,(0,R.jsx)(`div`,{className:`caps-form-footer-actions`,children:e})]})]})}var bme=(0,I.forwardRef)(function({busy:e=!1,children:t,className:n,layout:r,...i},a){return(0,R.jsx)(`form`,{...i,"aria-busy":e||void 0,className:RC(`caps-form`,n),"data-layout":r,ref:a,children:(0,R.jsx)(`fieldset`,{className:`caps-form-body`,disabled:e,children:t})})}),xme={2:`h2`,3:`h3`,4:`h4`},Sme=(0,I.forwardRef)(function({children:e,className:t,description:n,layout:r,level:i=3,title:a,...o},s){let c=(0,I.useId)(),l=xme[i];return(0,R.jsxs)(`section`,{...o,"aria-labelledby":`${c}-title`,className:RC(`caps-form-section`,t),"data-layout":r,ref:s,children:[(0,R.jsxs)(`header`,{className:`caps-form-section-copy`,children:[(0,R.jsx)(l,{className:`caps-form-section-title`,id:`${c}-title`,children:a}),n?(0,R.jsx)(`p`,{className:`caps-form-section-description`,children:n}):null]}),(0,R.jsx)(`div`,{className:`caps-form-section-fields`,children:e})]})}),qO=(0,I.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,layout:a,legend:o,legendTitle:s,...c},l){let u=(0,I.useId)(),d=[n?`${u}-description`:c[`aria-describedby`],r?`${u}-error`:null].filter(Boolean).join(` `)||void 0;return(0,R.jsxs)(`fieldset`,{...c,"aria-describedby":d,"aria-invalid":r?!0:c[`aria-invalid`],className:RC(`caps-fieldset`,t),"data-layout":a,ref:l,children:[(0,R.jsxs)(`legend`,{className:`caps-fieldset-legend`,title:s,children:[i?(0,R.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}):null,o]}),n?(0,R.jsx)(`p`,{className:`caps-fieldset-description`,id:`${u}-description`,children:n}):null,(0,R.jsx)(`div`,{className:`caps-fieldset-fields`,children:e}),r===void 0?null:(0,R.jsx)(KO,{id:`${u}-error`,children:r})]})});function Cme(e){let t=[];return I.Children.forEach(e.props.children,e=>{(0,I.isValidElement)(e)&&e.type!==GO&&t.push(e)}),t[0]??null}var JO=(0,I.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,label:a,labelTitle:o,optional:s,orientation:c=`vertical`,readout:l=!1,required:u,...d},f){let p=(0,I.useId)(),m=(0,I.isValidElement)(e)?e:null,h=m?.type===WO,g=h?Cme(m):m,_=g?.props.id??p,v=`${_}-description`,y=`${_}-error`,b=[g?.props[`aria-describedby`],n?v:null,r?y:null].filter(Boolean).join(` `)||void 0,x=u===!0||g?.props.required,S=r?!0:g?.props[`aria-invalid`],C=u===!0||g?.props[`aria-required`],w={id:_};x!==void 0&&(w.required=x),b!==void 0&&(w[`aria-describedby`]=b),S!==void 0&&(w[`aria-invalid`]=S),C!==void 0&&(w[`aria-required`]=C);let T=m&&g&&!l?h?(0,I.cloneElement)(m,void 0,I.Children.map(m.props.children,e=>e===g?(0,I.cloneElement)(g,w):e)):(0,I.cloneElement)(m,w):e,E=a?(0,R.jsx)(gme,{htmlFor:l?void 0:_,title:o,className:c===`inline`?`font-normal`:void 0,...u===void 0?{}:{required:u},...s===void 0?{}:{optional:s},children:a}):null,D=a||n?(0,R.jsxs)(`div`,{className:`caps-field-copy`,children:[E,n?(0,R.jsx)(`p`,{className:`caps-field-description`,id:v,children:n}):null]}):null,O=i?(0,R.jsxs)(`div`,{className:`caps-field-lead`,children:[(0,R.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}),D]}):D;return(0,R.jsxs)(`div`,{...d,className:RC(`caps-field`,t),"data-orientation":c,ref:f,children:[c===`horizontal`?(0,R.jsxs)(`div`,{className:`caps-field-row`,children:[O,T]}):c===`inline`?(0,R.jsxs)(`div`,{className:`caps-field-row`,children:[T,O]}):(0,R.jsxs)(R.Fragment,{children:[O,T]}),(0,R.jsx)(KO,{id:y,children:r})]})});function wme(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}var YO=`M 9.86 38.14 A 20 20 0 1 1 38.14 38.14`,Tme=6,Eme=new Map([[`ArrowUp`,1],[`ArrowDown`,-1],[`PageUp`,10],[`PageDown`,-10]]),Dme=(0,I.forwardRef)(function({className:e,decrementLabel:t=`Decrease`,defaultValue:n=null,disabled:r,incrementLabel:i=`Increase`,invalid:a,max:o,min:s,onBlur:c,onKeyDown:l,onValueChange:u,step:d=1,unit:f,value:p,wrap:m=!1,...h},g){let[_,v]=(0,I.useState)(n),[y,b]=(0,I.useState)(null),x=p===void 0?_:p,S=wme(d),C=e=>{let t=Number(e.toFixed(S));return s!==void 0&&t<s?s:o!==void 0&&t>o?o:t},w=e=>{let t=e===null?null:C(e);v(t),b(null),t!==x&&u?.(t)},T=()=>{if(y===null)return;let e=Number(y);w(y.trim()===``||!Number.isFinite(e)?null:e)},E=e=>{let t=(x??s??0)+e*d;if(m&&s!==void 0&&o!==void 0){if(t>o){w(s);return}if(t<s){w(o);return}}w(t)},D=s!==void 0&&x!==null&&x<=s,O=o!==void 0&&x!==null&&x>=o,k=r===!0,A=(0,I.useRef)(null),j=s!==void 0&&o!==void 0&&o>s?((x??s)-s)/(o-s):null,M=e=>{k||(e.currentTarget.setPointerCapture(e.pointerId),A.current={y:e.clientY,value:x??s??0})},N=e=>{if(!A.current)return;let t=Math.trunc((A.current.y-e.clientY)/Tme),n=C(A.current.value+t*d);n!==x&&w(n)},P=()=>{A.current=null};return(0,R.jsxs)(`span`,{className:RC(`caps-number-field`,e),"data-at-max":O||void 0,"data-at-min":D||void 0,"data-disabled":k||void 0,"data-wrap":m||void 0,children:[j===null?null:(0,R.jsxs)(`svg`,{className:`caps-number-field-dial`,viewBox:`0 0 48 48`,"aria-hidden":`true`,focusable:`false`,onPointerDown:M,onPointerMove:N,onPointerUp:P,onPointerCancel:P,children:[(0,R.jsx)(`path`,{className:`caps-number-field-dial-track`,d:YO,pathLength:100}),(0,R.jsx)(`path`,{className:`caps-number-field-dial-level`,d:YO,pathLength:100,strokeDasharray:`${String(Math.max(.5,j*100))} 100`})]}),(0,R.jsx)(yE,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-decrement`,"aria-label":t,"aria-controls":h.id,tabIndex:-1,disabled:k||D&&!m,onClick:()=>{E(-1)},children:(0,R.jsx)(Npe,{"aria-hidden":`true`})}),(0,R.jsxs)(`span`,{className:`caps-number-field-readout`,children:[(0,R.jsx)(`input`,{...h,"aria-invalid":a?!0:h[`aria-invalid`]===!1?void 0:h[`aria-invalid`],className:`input caps-input caps-number-field-input`,disabled:r,inputMode:h.inputMode??(S>0?`decimal`:`numeric`),max:o,min:s,onBlur:e=>{T(),c?.(e)},onChange:e=>{b(e.target.value)},onKeyDown:e=>{if(l?.(e),e.defaultPrevented)return;let t=Eme.get(e.key);t===void 0?e.key===`Home`&&s!==void 0?(e.preventDefault(),w(s)):e.key===`End`&&o!==void 0?(e.preventDefault(),w(o)):e.key===`Enter`&&T():(e.preventDefault(),E(t))},ref:g,step:d,type:`number`,value:y??(x===null?``:String(x))}),f?(0,R.jsx)(`span`,{className:`caps-number-field-unit`,"aria-hidden":`true`,children:f}):null]}),(0,R.jsx)(yE,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-increment`,"aria-label":i,"aria-controls":h.id,tabIndex:-1,disabled:k||O&&!m,onClick:()=>{E(1)},children:(0,R.jsx)(Ppe,{"aria-hidden":`true`})})]})}),Ome={neutral:`progress-neutral`,primary:`progress-primary`,secondary:`progress-secondary`,accent:`progress-accent`,success:`progress-success`,info:`progress-info`,warning:`progress-warning`,error:`progress-error`},XO=(0,I.forwardRef)(function({className:e,tone:t=`primary`,...n},r){return(0,R.jsx)(`progress`,{...n,"data-complete":n.value!==void 0&&Number(n.value)>=Number(n.max??1)?`true`:void 0,className:RC(`progress caps-gooey-motion caps-gooey-progress w-full`,Ome[t],e),ref:r})});(0,I.forwardRef)(function({label:e,value:t,max:n,tone:r=`info`,className:i,...a},o){return(0,R.jsxs)(`div`,{...a,ref:o,className:RC(`caps-game-meter`,i),children:[(0,R.jsxs)(`div`,{className:`caps-game-meter-readout`,children:[(0,R.jsx)(`span`,{children:e}),(0,R.jsxs)(`span`,{className:`caps-game-meter-value`,children:[t,` / `,n]})]}),(0,R.jsx)(XO,{"aria-label":e,value:t,max:n,tone:r})]})});function kme({className:e,items:t,onCancel:n,onRemove:r,onRetry:i,rowClassName:a}){return t.length?(0,R.jsx)(`div`,{"aria-live":`polite`,className:`caps-upload-queue flex w-full min-w-0 flex-col gap-sm ${e??``}`,"data-upload-rows":!0,children:t.map(e=>(0,R.jsx)(jme,{item:e,onCancel:n,onRemove:r,onRetry:i,...a===void 0?{}:{rowClassName:a}},e.id))}):null}function ZO({action:e,id:t,onAction:n,retry:r=!1}){return e?(0,R.jsx)(ND,{"aria-label":e.accessibleLabel,title:e.label,variant:`ghost`,size:`xs`,className:`motion-reduce:transition-none`,icon:r?(0,R.jsx)(Fpe,{}):(0,R.jsx)(MD,{}),onClick:()=>void n(t),type:`button`}):null}function Ame({item:e}){return(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsx)(`span`,{className:`block min-w-0 truncate`,title:e.name,children:e.name}),(0,R.jsx)(`div`,{className:`caps-upload-details`,children:(0,R.jsxs)(`span`,{"aria-live":e.alert?`assertive`:void 0,className:`caps-upload-status min-w-0 break-words`,"data-upload-status":!0,role:e.alert?`alert`:void 0,children:[e.alert??e.statusLabel,` `,e.progressLabel]})})]})}function jme({item:e,onCancel:t,onRemove:n,onRetry:r,rowClassName:i}){return(0,R.jsxs)(`div`,{className:`caps-upload-row grid w-full min-w-0 max-w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-sm p-sm text-xs ${i??``}`,children:[e.preview.kind===`image`?(0,R.jsx)(`img`,{alt:``,className:`caps-upload-preview mask mask-squircle size-8 shrink-0 object-cover`,src:e.preview.url}):(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`caps-upload-preview mask mask-squircle flex size-8 shrink-0 items-center justify-center bg-base-300`,children:(0,R.jsx)(Mpe,{className:`size-4`})}),(0,R.jsx)(Ame,{item:e}),(0,R.jsx)(Mme,{actions:e.actions,id:e.id,onCancel:t,onRemove:n,onRetry:r}),(0,R.jsx)(XO,{"aria-label":`${e.name} progress`,className:`caps-upload-progress`,tone:e.alert?`error`:e.progress===100?`success`:`accent`,max:100,value:e.progress??(e.alert?0:void 0)})]})}function Mme({actions:e,id:t,onCancel:n,onRemove:r,onRetry:i}){return(0,R.jsxs)(`div`,{className:`caps-upload-actions flex min-w-0 flex-wrap justify-end gap-xs`,children:[(0,R.jsx)(ZO,{action:e.retry,id:t,onAction:i,retry:!0}),(0,R.jsx)(ZO,{action:e.cancel,id:t,onAction:n}),(0,R.jsx)(ZO,{action:e.remove,id:t,onAction:r})]})}var QO={unchecked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,checked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,mixed:`M3.4 6 L6 6 L8.6 6`},Nme={blurStdDeviation:.22,alphaSlope:18,alphaIntercept:-8};function Pme({state:e}){let t=`caps-checkbox-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(e).current,i=(0,I.useRef)(e),a=qC();return(0,I.useLayoutEffect)(()=>{if(!n.current)return;let t=e!==`unchecked`,r=i.current!==`unchecked`,o=a||i.current===e;i.current=e;let s=VC(n.current),c=jE(s,{ease:`inCubic`,duration:160}),l=aE(n.current,{d:{to:QO[e],...o?kE:jE(s,{ease:`outCubic`,duration:200})},"stroke-dashoffset":{to:+!t,...o?kE:t?jE(s,{ease:`inOutSine`,duration:260}):c},"stroke-width":o?{to:t?2.4:0,duration:0}:t&&!r?[{to:2.2,...jE(s,{ease:`outCubic`,duration:65})},{to:2.4,delay:UC(s,120),...AE(s,{bounce:.35,duration:220})}]:{to:t?2.4:0,...c}});return()=>{l.cancel()}},[e,a]),(0,R.jsxs)(`svg`,{className:`caps-checkbox-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(cE,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,R.jsx)(lE,{id:`${t}-shadow`}),(0,R.jsx)(uE,{id:`${t}-inset`}),(0,R.jsx)(fE,{id:`${t}-goo`,values:Nme}),(0,R.jsxs)(`filter`,{id:`${t}-relief`,x:`-25%`,y:`-25%`,width:`150%`,height:`150%`,colorInterpolationFilters:`sRGB`,children:[(0,R.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.28`,result:`relief`}),(0,R.jsx)(`feSpecularLighting`,{in:`relief`,surfaceScale:`1.2`,specularConstant:`0.55`,specularExponent:`18`,lightingColor:`color-mix(in srgb, var(--color-white) calc(var(--depth) * 100%), var(--color-black))`,result:`light`,children:(0,R.jsx)(`feDistantLight`,{azimuth:`225`,elevation:`55`})}),(0,R.jsx)(`feComposite`,{in:`light`,in2:`SourceAlpha`,operator:`in`,result:`clipped-light`}),(0,R.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`clipped-light`,mode:`screen`})]}),(0,R.jsx)(`mask`,{id:`${t}-contour`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`12`,height:`12`,style:{maskType:`alpha`},children:(0,R.jsx)(`path`,{ref:n,d:QO[r],fill:`none`,stroke:`var(--color-white)`,strokeWidth:r===`unchecked`?0:2.4,pathLength:`1`,strokeDasharray:`1`,strokeDashoffset:+(r===`unchecked`),strokeLinecap:`round`,strokeLinejoin:`round`,filter:e===`mixed`?void 0:`url(#${t}-goo)`})}),(0,R.jsx)(`clipPath`,{id:`${t}-well`,children:(0,R.jsx)(`rect`,{x:`1`,y:`1`,width:`10`,height:`10`,rx:`2.5`})})]}),(0,R.jsx)(`rect`,{className:`caps-checkbox-track`,x:`0.5`,y:`0.5`,width:`11`,height:`11`,rx:`3`,filter:`url(#${t}-inset)`}),(0,R.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,R.jsx)(`g`,{filter:`url(#${t}-shadow)`,children:(0,R.jsx)(`g`,{filter:`url(#${t}-relief)`,children:(0,R.jsx)(`g`,{mask:`url(#${t}-contour)`,children:(0,R.jsx)(`rect`,{x:`0`,y:`0`,width:`12`,height:`12`,fill:`url(#${t}-surface)`})})})})})]})}var $O=(0,I.forwardRef)(function({className:e,appearance:t,indicator:n,invalid:r,indeterminate:i=!1,checked:a,defaultChecked:o=!1,onChange:s,...c},l){let u=(0,I.useRef)(null),[d,f]=(0,I.useState)(o),p=a??d,m=i?`mixed`:p?`checked`:`unchecked`;return(0,I.useImperativeHandle)(l,()=>{if(!u.current)throw Error(`Checkbox input is not mounted`);return u.current},[]),(0,I.useLayoutEffect)(()=>{u.current&&(u.current.indeterminate=i)},[i]),(0,I.useEffect)(()=>{let e=u.current?.form;if(!e||a!==void 0)return;let t=e=>{queueMicrotask(()=>{!e.defaultPrevented&&u.current&&f(o)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[a,o,c.form]),(0,R.jsxs)(`span`,{className:`caps-checkbox`,"data-appearance":t===`compact`?t:void 0,"data-state":m,"data-custom-indicator":n!==void 0||void 0,children:[(0,R.jsx)(`input`,{...c,checked:p,"aria-checked":i?`mixed`:p,"aria-invalid":r?!0:c[`aria-invalid`]===!1?void 0:c[`aria-invalid`],className:RC(`caps-checkbox-input`,e),onChange:e=>{a===void 0&&f(e.target.checked),s?.(e),e.currentTarget.indeterminate=i},ref:u,type:`checkbox`}),n===void 0?(0,R.jsx)(Pme,{state:m}):n]})}),Fme=cle({keyCode:ule(229)});function Ime(e){return e.nativeEvent.isComposing||ke(Fme,e.nativeEvent).success}var ek={};function tk(e,t){let n=I.useRef(ek);return n.current===ek&&(n.current=e(t)),n}var nk=[],rk=void 0;function Lme(){return rk}function Rme(e){nk.push(e)}function ik(e){let t=(t,n)=>{let r=tk(Bme).current,i;try{rk=r;for(let e of nk)e.before(r);i=e(t,n);for(let e of nk)e.after(r);r.didInitialize=!0}finally{rk=void 0}return i};return t.displayName=e.displayName||e.name,t}function zme(e){return I.forwardRef(ik(e))}function Bme(){return{didInitialize:!1}}function ak(){}var Vme=Object.freeze([]),ok=Object.freeze({});function sk(e){I.useEffect(e,Vme)}var ck=0,lk=class e{static create(){return new e}currentId=ck;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ck,t()},e)}isStarted(){return this.currentId!==ck}clear=()=>{this.currentId!==ck&&(clearTimeout(this.currentId),this.currentId=ck)};disposeEffect=()=>this.clear};function uk(){let e=tk(lk.create).current;return sk(e.disposeEffect),e}var dk=typeof document<`u`?I.useLayoutEffect:()=>{};function Hme(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Ume,platform:Wme,maxTouchPoints:Gme}=Hme(),fk=Ume.toLowerCase(),pk=Wme.toLowerCase(),mk=/^i(os$|p)/.test(pk)||pk===`macintel`&&Gme>1,hk=`android`,gk=pk===hk||fk.includes(hk),Kme=!mk&&pk.startsWith(`mac`);pk.startsWith(`win`),!gk&&/^(linux|chrome os)/.test(pk);var qme=Kme||mk,_k=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!_k&&fk.includes(`firefox`),!_k&&fk.includes(`chrom`);var Jme=qme,Yme=/jsdom|happydom/.test(fk);function Xme(e){e.preventDefault(),e.stopPropagation()}function Zme(e){return`nativeEvent`in e}function vk(e){return e.pointerType===``&&e.isTrusted?!0:gk&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function yk(e){return Yme?!1:!gk&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(gk||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function bk(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Qme(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function xk(){return typeof window<`u`}function Sk(e){return Tk(e)?(e.nodeName||``).toLowerCase():`#document`}function Ck(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wk(e){return((Tk(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Tk(e){return xk()?e instanceof Node||e instanceof Ck(e).Node:!1}function Ek(e){return xk()?e instanceof Element||e instanceof Ck(e).Element:!1}function Dk(e){return xk()?e instanceof HTMLElement||e instanceof Ck(e).HTMLElement:!1}function Ok(e){return!xk()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ck(e).ShadowRoot}function kk(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Bk(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ak(e){return/^(table|td|th)$/.test(Sk(e))}function jk(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Mk=/transform|translate|scale|rotate|perspective|filter/,Nk=/paint|layout|strict|content/,Pk=e=>!!e&&e!==`none`,Fk;function Ik(e){let t=Ek(e)?Bk(e):e;return Pk(t.transform)||Pk(t.translate)||Pk(t.scale)||Pk(t.rotate)||Pk(t.perspective)||!Rk()&&(Pk(t.backdropFilter)||Pk(t.filter))||Mk.test(t.willChange||``)||Nk.test(t.contain||``)}function Lk(e){let t=Hk(e);for(;Dk(t)&&!zk(t);){if(Ik(t))return t;if(jk(t))return null;t=Hk(t)}return null}function Rk(){return Fk??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Fk}function zk(e){return/^(html|body|#document)$/.test(Sk(e))}function Bk(e){return Ck(e).getComputedStyle(e)}function Vk(e){return Ek(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hk(e){if(Sk(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ok(e)&&e.host||wk(e);return Ok(t)?t.host:t}function Uk(e){let t=Hk(e);return zk(t)?(e.ownerDocument||e).body:Dk(t)&&kk(t)?t:Uk(t)}function Wk(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Uk(e),i=r===e.ownerDocument?.body,a=Ck(r);if(i){let e=Gk(a);return t.concat(a,a.visualViewport||[],kk(r)?r:[],e&&n?Wk(e):[])}return t.concat(r,Wk(r,[],n))}function Gk(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kk(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function qk(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ok(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Jk(e,t){let n=e;for(;n;){if(Ek(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Ok(n)?n.host:null)}return null}function Yk(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Xk=`data-base-ui-focusable`,Zk=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Qk=`data-starting-style`,$k=`data-ending-style`,eA={[Qk]:``},tA={[$k]:``},nA={transitionStatus(e){return e===`starting`?eA:e===`ending`?tA:null}},rA=`data-open`,iA=`data-closed`,aA=`data-anchor-hidden`,oA=`data-popup-open`,sA=`data-pressed`,cA={[oA]:``},lA={[oA]:``,[sA]:``},uA={[rA]:``},dA={[iA]:``},fA={[aA]:``},pA={open(e){return e?cA:null}},mA={open(e){return e?lA:null}},hA={open(e){return e?uA:dA},anchorHidden(e){return e?fA:null}},gA={...hA,...nA},_A=`data-trigger-disabled`;function vA(e,t){if(!Ek(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(_A);for(let[,e]of t.entries())if(qk(e,n))return!e.hasAttribute(_A);return!1}function yA(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function bA(e){return e.matches(`html,body`)}function xA(e){return Dk(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function SA(e){return Jk(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Zk}`)!=null}function CA(e){return e?e.getAttribute(`role`)===`combobox`&&xA(e):!1}function wA(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function TA(e,t){return t!=null&&!bk(t)?0:typeof e==`function`?e():e}function EA(e,t,n){let r=TA(e,n);return typeof r==`number`?r:r?.[t]}function DA(e){return typeof e==`function`?e():e}function OA(e,t){return t||e===`click`||e===`mousedown`}function kA(e){return e?.includes(`mouse`)&&e!==`mousedown`}function AA(e,t,n,r){let i=!1,a=!1,o=r??ok;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var jA=`none`,MA=`trigger-press`,NA=`trigger-hover`,PA=`outside-press`,FA=`focus-out`,IA=`escape-key`,LA=`imperative-action`;function RA(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function zA(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function BA(e,t,n,r){let i=tk(HA).current;return UA(i,e,t,n,r)&&GA(i,[e,t,n,r]),i.callback}function VA(e){let t=tk(HA).current;return WA(t,e)&&GA(t,e),t.callback}function HA(){return{callback:null,cleanup:null,refs:[]}}function UA(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function WA(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function GA(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function KA(e){let t=tk(qA,e).current;return t.next=e,dk(t.effect),t}function qA(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var JA={...I},YA=JA.useInsertionEffect,XA=YA&&YA!==JA.useLayoutEffect?YA:e=>e();function ZA(e){let t=tk(QA).current;return t.next=e,XA(t.effect),t.trampoline}function QA(){let e={next:void 0,callback:$A,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function $A(){}var ej=null;globalThis.requestAnimationFrame;var tj=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},nj=class e{static create(){return new e}static request(e){return tj.request(e)}static cancel(e){return tj.cancel(e)}currentId=ej;request(e){this.cancel(),this.currentId=tj.request(()=>{this.currentId=ej,e()})}cancel=()=>{this.currentId!==ej&&(tj.cancel(this.currentId),this.currentId=ej)};disposeEffect=()=>this.cancel};function rj(){let e=tk(nj.create).current;return sk(e.disposeEffect),e}function ij(e){return e?.ownerDocument||document}var aj={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},$me={...aj,position:`fixed`,margin:0,top:0,left:0};({...aj});var oj=I.forwardRef(function(e,t){let[n,r]=I.useState();dk(()=>{Jme&&_k&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,R.jsx)(`span`,{...e,ref:t,style:$me,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),sj=Math.min,cj=Math.max,lj=Math.round,uj=Math.floor,dj=e=>({x:e,y:e}),ehe={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function fj(e,t,n){return cj(e,sj(t,n))}function pj(e,t){return typeof e==`function`?e(t):e}function mj(e){return e.split(`-`)[0]}function hj(e){return e.split(`-`)[1]}function gj(e){return e===`x`?`y`:`x`}function _j(e){return e===`y`?`height`:`width`}function vj(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function yj(e){return gj(vj(e))}function the(e,t,n){n===void 0&&(n=!1);let r=hj(e),i=yj(e),a=_j(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Cj(o)),[o,Cj(o)]}function nhe(e){let t=Cj(e);return[bj(e),t,bj(t)]}function bj(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var xj=[`left`,`right`],Sj=[`right`,`left`],rhe=[`top`,`bottom`],ihe=[`bottom`,`top`];function ahe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Sj:xj:t?xj:Sj;case`left`:case`right`:return t?rhe:ihe;default:return[]}}function ohe(e,t,n,r){let i=hj(e),a=ahe(mj(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(bj)))),a}function Cj(e){let t=mj(e);return ehe[t]+e.slice(t.length)}function she(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function wj(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:she(e)}function Tj(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function che(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Ej(e,t=e?Bk(e):null){return!e||!e.isConnected||!t||che(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var lhe=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function uhe(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Ok(n)?n.host:null}function Dj(e){for(let t of Array.from(e.children))if(Sk(t)===`summary`)return t;return null}function dhe(e,t){let n=Dj(t);return!!n&&(e===n||qk(n,e))}function Oj(e){let t=e?Sk(e):``;return e!=null&&e.matches(lhe)&&(t!==`summary`||e.parentElement!=null&&Sk(e.parentElement)===`details`&&Dj(e.parentElement)===e)&&(t!==`details`||Dj(e)==null)&&(t!==`input`||e.type!==`hidden`)}function kj(e){if(!Oj(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=uhe(t)){let n=t!==e,r=Sk(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Sk(t)===`details`&&!t.open&&!dhe(e,t)||t.hasAttribute(`hidden`)||!r&&!fhe(t,n))return!1}return!0}function fhe(e,t){let n=Bk(e);return t?n.display!==`none`:Ej(e,n)}function Aj(e){let t=e.tabIndex;if(t<0){let t=Sk(e);if(t===`details`||t===`audio`||t===`video`||Dk(e)&&e.isContentEditable)return 0}return t}function jj(e){if(Sk(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Mj(e,t){let n=jj(e);if(!n)return!0;let r=t.find(e=>{let t=jj(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=jj(e);return t?.name===n.name&&t.form===n.form})===n}function Nj(e){if(Dk(e)&&Sk(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Dk(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Pj(e,t){Nj(e).forEach(e=>{Oj(e)&&t.push(e),Pj(e,t)})}function Fj(e,t,n){Nj(e).forEach(e=>{Dk(e)&&e.matches(t)&&n.push(e),Fj(e,t,n)})}function Ij(e){return kj(e)&&Aj(e)>=0}function Lj(e){let t=[];return Pj(e,t),t.filter(kj)}function Rj(e){let t=Lj(e);return t.filter(e=>Aj(e)>=0&&Mj(e,t))}function zj(e,t){let n=Rj(e),r=n.length;if(r===0)return;let i=Kk(ij(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Bj(e){return zj(ij(e).body,1)||e}function Vj(e){return zj(ij(e).body,-1)||e}function phe(e,t,n){if(!e)return null;let r=[];Pj(ij(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(kj);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!qk(n,o)&&Ij(o)&&Mj(o,a))return o}return r[i]}function Hj(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!qk(n,r)}function mhe(e){Rj(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Uj(e){let t=[];Fj(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Wj(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Wj(e,t.id,n)])}function Gj(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Kj(e){return`data-base-ui-${e}`}var qj=0;function Jj(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(qj);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),ak;let o=requestAnimationFrame(a);return qj=o,()=>{qj===o&&(cancelAnimationFrame(o),qj=0)}}var Yj=`data-base-ui-inert`,Xj=new WeakMap,Zj=new WeakSet,Qj=new WeakMap,$j=0;function eM(e){return e?Ok(e)?e.host:eM(e.parentNode):null}var tM=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=eM(t);return e.contains(n)?n:null}).filter(e=>e!=null),nM=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},rM=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Sk(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function hhe(e,t,n,{mark:r=!0}){let i=tM(t,e),a=r?rM(t,nM(i),new Set(i)):[],o=[],s=[];if(n){let e=tM(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);rM(t,nM(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Xj.get(e)||0)+1;Xj.set(e,r),o.push(e),r===1&&n&&Zj.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Qj.get(e)||0)+1;Qj.set(e,t),s.push(e),t===1&&e.setAttribute(Yj,``)}),$j+=1,()=>{o.forEach(e=>{let t=(Xj.get(e)||0)-1;Xj.set(e,t),t||(Zj.has(e)||e.removeAttribute(`aria-hidden`),Zj.delete(e))}),r&&s.forEach(e=>{let t=(Qj.get(e)||0)-1;Qj.set(e,t),t||e.removeAttribute(Yj)}),--$j,$j||(Xj=new WeakMap,Zj=new WeakSet,Qj=new WeakMap)}}function iM(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=ij(e[0]).body;return hhe(e,i,n,{mark:r})}function aM(){let[,e]=I.useState({});return I.useCallback(()=>{e({})},[])}var oM=0;function ghe(e,t=`mui`){let n=I.useRef(void 0),r=aM(),i=e??n.current;return I.useEffect(()=>{n.current??(oM+=1,n.current=`${t}-${oM}`,e??r())},[e,t,r]),i}var sM=JA.useId;function cM(e,t){if(sM!==void 0){let n=sM();return e??(t?`${t}-${n}`:n)}return ghe(e,t)}var _he=18;function lM(e){return _he>=e}function uM(e){if(!I.isValidElement(e))return null;let t=e,n=t.props;return(lM(19)?n?.ref:t.ref)??null}function dM(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function vhe(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function yhe(e,t){return typeof e==`function`?e(t):e}function bhe(e,t){return typeof e==`function`?e(t):e}var fM={};function pM(e,t,n,r,i){if(!n&&!r&&!i&&!e)return mM(t);let a=mM(e);return t&&(a=hM(a,t)),n&&(a=hM(a,n)),r&&(a=hM(a,r)),i&&(a=hM(a,i)),a}function xhe(e){if(e.length===0)return fM;if(e.length===1)return mM(e[0]);let t=mM(e[0]);for(let n=1;n<e.length;n+=1)t=hM(t,e[n]);return t}function mM(e){return _M(e)?{...e(fM)}:She(e)}function hM(e,t){return _M(t)?t(e):Che(e,t)}function She(e){let t={...e};for(let e in t){let n=t[e];gM(e,n)&&(t[e]=vM(n))}return t}function Che(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=dM(e.style,r);break;case`className`:e[n]=bM(e.className,r);break;default:e[n]=gM(n,r)?whe(e[n],r):r}}return e}function gM(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function _M(e){return typeof e==`function`}function whe(e,t){return t?e?(...n)=>{let r=n[0];if(xM(r)){let i=r;yM(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:vM(t):e}function vM(e){return e&&((...t)=>{let n=t[0];return xM(n)&&yM(n),e(...t)})}function yM(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function bM(e,t){return t?e?t+` `+e:t:e}function xM(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function SM(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Ohe(r));let i=The(t,n,r);if(n.enabled===!1)return null;let a=n.state??ok;return khe(e,r,i,a)}function The(e,t,n){let{className:r,style:i}=e,{state:a=ok,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?yhe(r,a):void 0,d=l?bhe(i,a):void 0,f=l?vhe(a,c):ok,p=l&&s?Ehe(s):void 0,m=l?dM(f,p)??{}:ok;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?VA([m.ref,uM(n),...o]):BA(m.ref,uM(n),o):BA(null,null)),l?(u!==void 0&&(m.className=bM(m.className,u)),d!==void 0&&(m.style=dM(m.style,d)),m):ok}function Ehe(e){return Array.isArray(e)?xhe(e):pM(void 0,e)}var Dhe=Symbol.for(`react.lazy`);function Ohe(e){if(e?.$$typeof!==Dhe)return e;let t=I.Children.toArray(e)[0];return I.isValidElement(t)?t:e}function khe(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=pM(n,t.props);return e.ref=n.ref,I.cloneElement(t,e)}return Ahe(e,n)}function Ahe(e,t){return e===`button`?(0,I.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,I.createElement)(`img`,{alt:``,...t,key:t.key}):I.createElement(e,t)}var jhe={style:{transition:`none`}},Mhe=`data-base-ui-click-trigger`,Nhe={fallbackAxisSide:`end`},Phe={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},CM=c(tv(),1),wM=I.createContext(null),TM=()=>I.useContext(wM),Fhe=Kj(`portal`);function Ihe(e={}){let{ref:t,container:n,componentProps:r=ok,elementProps:i}=e,a=cM(),o=TM()?.portalNode,[s,c]=I.useState(null),[l,u]=I.useState(null),d=ZA(e=>{e!==null&&u(e)}),f=I.useRef(null);dk(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Tk(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=SM(`div`,r,{ref:[t,d],props:[{id:a,[Fhe]:``},i]}),m=s&&p?CM.createPortal(p,s):null;return{node:l,nodeId:I.isValidElement(p)?p.props.id:void 0,subtree:m}}var Lhe=I.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Ihe({container:o,ref:t,componentProps:e,elementProps:c}),f=I.useRef(null),p=I.useRef(null),m=I.useRef(null),h=I.useRef(null),[g,_]=I.useState(null),v=I.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;I.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Hj(e)&&(e.type===`focusin`?v.current&&=(Uj(l),!1):(mhe(l),v.current=!0))}return zA(RA(l,`focusin`,e,!0),RA(l,`focusout`,e,!0))},[l,y]),dk(()=>{!l||b!==!0||!v.current||(Uj(l),v.current=!1)},[b,l]);let S=I.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,R.jsxs)(I.Fragment,{children:[d,(0,R.jsxs)(wM.Provider,{value:S,children:[x&&l&&(0,R.jsx)(oj,{"data-type":`outside`,ref:f,onFocus:e=>{Hj(e,l)?m.current?.focus():Vj(g?g.domReference:null)?.focus()}}),x&&l&&(0,R.jsx)(`span`,{role:s,"aria-owns":u,style:Phe}),l&&CM.createPortal(a,l),x&&l&&(0,R.jsx)(oj,{"data-type":`outside`,ref:p,onFocus:e=>{Hj(e,l)?h.current?.focus():(Bj(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,AA(`focus-out`,e.nativeEvent)))}})]})]})});function EM(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Rhe=class{nodesRef={current:[]};events=EM();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},DM=I.createContext(null),OM=I.createContext(null),kM=()=>I.useContext(DM)?.id||null,AM=e=>{let t=I.useContext(OM);return e??t};function zhe(e){let t=cM(),n=AM(e),r=kM();return dk(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Bhe(e){let{children:t,id:n}=e,r=kM();return(0,R.jsx)(DM.Provider,{value:I.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Vhe(e){let{children:t,externalTree:n}=e,r=tk(()=>n??new Rhe).current;return(0,R.jsx)(OM.Provider,{value:r,children:t})}function jM(e){return e==null?e:`current`in e?e.current:e}function Hhe(e,t){let n=Ck(Yk(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(vk(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Uhe=20,MM=[];function NM(){MM=MM.filter(e=>e.deref()?.isConnected)}function PM(e){NM(),e&&Sk(e)!==`body`&&(MM.push(new WeakRef(e)),MM.length>Uhe&&(MM=MM.slice(-20)))}function FM(){return NM(),MM[MM.length-1]?.deref()}function Whe(e){return e?Ij(e)?e:Rj(e)[0]||e:null}function IM(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Lj(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ij(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Ghe(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=ZA(()=>b.current.floatingContext?.nodeId),S=i===!1,C=CA(_)&&S,w=KA(i),T=KA(a),E=KA(o),D=KA(u),O=KA(g),k=AM(m),A=TM(),j=I.useRef(!1),M=I.useRef(!1),N=I.useRef(!1),P=I.useRef(null),ee=I.useRef(``),te=I.useRef(``),ne=I.useRef(null),F=I.useRef(null),re=BA(ne,p,A?.beforeInsideRef),ie=BA(F,A?.afterInsideRef),ae=uk(),oe=uk(),se=rj(),ce=A!=null,le=wA(v),ue=ZA((e=le)=>e?Rj(e):[]),de=ZA(()=>h?.().filter(e=>e!=null)??[]);I.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&qk(le,Kk(ij(le)))&&ue().length===0&&!C&&Xme(e)}return RA(ij(le),`keydown`,e)},[r,le,c,C,ue]),I.useEffect(()=>{if(r||!g)return;let e=ij(le);function t(){N.current=!1}function n(e){let t=Yk(e),n=de(),r=qk(v,t)||qk(_,t)||qk(A?.portalNode,t)||n.some(e=>e===t||qk(e,t));N.current=!r,te.current=e.pointerType||`keyboard`,Jk(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,oe.start(0,()=>{M.current=!1}))}function i(){te.current=`keyboard`}return zA(RA(e,`pointerdown`,n,!0),RA(e,`pointerup`,t,!0),RA(e,`pointercancel`,t,!0),RA(e,`keydown`,i,!0),t)},[r,v,_,le,g,A,oe,de]),I.useEffect(()=>{if(r||!l)return;let e=ij(le);function n(){M.current=!0,oe.start(0,()=>{M.current=!1})}function i(e){let t=Yk(e);Ij(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=Yk(n);c&&r==null&&a!=null&&qk(v,a)&&PM(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=de(),p=r?.hasAttribute(Kj(`focus-guard`))&&[ne.current,F.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,jM(f),jM(d)].includes(r),m=!(qk(_,r)||qk(v,r)||qk(r,v)||qk(A?.portalNode,r)||u.some(e=>e===r||qk(e,r))||l.hasMatchingElement(e=>qk(e,r))||p||k&&(Wj(k.nodesRef.current,o).find(e=>qk(e.context?.elements.floating,r)||qk(e.context?.elements.domReference,r))||Gj(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,wA(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&le&&IM(le),s&&i!==_&&!Ej(a)&&Kk(e)===e.body){if(Dk(le)&&(le.focus(),s===`popup`)){se.request(()=>{le.focus()});return}let e=ue(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||le;Dk(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!M.current&&(C||r!==FM())&&(j.current=!0,t.setOpen(!1,AA(FA,n)))})}function o(){N.current||(b.current.insideReactTree=!0,ae.start(0,()=>{b.current.insideReactTree=!1}))}let u=Dk(_)?_:null;if(!(!v&&!u))return zA(u&&RA(u,`focusout`,a),u&&RA(u,`pointerdown`,n),v&&RA(v,`focusin`,i),v&&RA(v,`focusout`,a),v&&A&&RA(v,`focusout`,o,!0))},[r,_,v,le,c,k,A,t,l,s,ue,C,x,b,ae,oe,se,d,f,de]),I.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${Kj(`portal`)}]`)||[]),t=(k?Gj(k.nodesRef.current,x()):[]).find(e=>CA(e.context?.elements.domReference||null))?.context?.elements.domReference,n=iM([v,...e,ne.current,F.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...de(),t,jM(f),jM(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=iM([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,de]),dk(()=>{if(!g||r||!Dk(le))return;ee.current=``,te.current=``;let e=ij(le),t=Kk(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||qk(le,t))return;let i=null,a=()=>(i??=ue(le),i[0]||le),o;o=r===!0||r===null?a():jM(r),o||=a();let s=qk(le,Kk(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&vk(c);Jj(o,{sync:l,preventScroll:o===le,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Kk(e);return!(t!==o&&qk(le,t))}})})},[r,g,le,ue,w,D,O,b]);let fe=I.useRef(null);dk(()=>{if(r||!le){fe.current=null;return}fe.current&&=(fe.current.cancelled=!0,null);let e=ij(le),t=Kk(e),n=D.current==null;PM(t);function i(e){if(e.open||(ee.current=Hhe(e.nativeEvent,te.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Kj(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(vk(e.nativeEvent)||yk(e.nativeEvent))j.current=!1;else{let e=!1;ij(le).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&Sk(t)!==`body`?t:null,s=n?o||a:a||o;return s||=FM()||null,typeof i==`boolean`?s:jM(i)||s||null}return()=>{y.off(`openchange`,i);let t=Kk(e),n=de(),r=qk(v,t)||n.some(e=>e===t||qk(e,t))||k&&Wj(k.nodesRef.current,x(),!1).some(e=>qk(e.context?.elements.floating,t)),o=T.current,s=ee.current,c=a(s),l={cancelled:!1};fe.current=l,queueMicrotask(()=>{fe.current===l&&(fe.current=null);let n=Whe(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&Dk(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,le,T,E,D,y,k,_,x,de]),dk(()=>{if(!_k||g||!v)return;let e=Kk(ij(v));!Dk(e)||!xA(e)||qk(v,e)&&e.blur()},[g,v]),dk(()=>{if(!(r||!A))return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),dk(()=>{if(!(r||!le))return IM(le),()=>{queueMicrotask(NM)}},[r,le]);let pe=!r&&(!c||!C)&&(ce||c);return(0,R.jsxs)(I.Fragment,{children:[pe&&(0,R.jsx)(oj,{"data-type":`inside`,ref:re,onFocus:e=>{if(c){let e=ue();Jj(e[e.length-1])}else A?.portalNode&&(j.current=!1,Hj(e,A.portalNode)?Bj(_)?.focus():jM(f??A.beforeOutsideRef)?.focus())}}),n,pe&&(0,R.jsx)(oj,{"data-type":`inside`,ref:ie,onFocus:e=>{c?Jj(ue()[0]):A?.portalNode&&(l&&(j.current=!0),Hj(e,A.portalNode)?Vj(_)?.focus():jM(d??A.afterOutsideRef)?.focus())}})]})}function Khe(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=MA}=t,l=e.context.dataRef,u=I.useRef(void 0),d=rj(),f=uk(),p=I.useMemo(()=>{function t(t,n,r,i){let a=AA(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=bk(e.pointerType,!0)&&yk(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||bk(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=Yk(s),p=xA(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;if(r===`mousedown`&&o){u.current=void 0;return}bk(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return I.useMemo(()=>n?{reference:p}:ok,[n,p])}function qhe(){return!1}function Jhe(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Yhe(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=qhe,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=AM(c),m=ZA(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=ZA(()=>a),{escapeKey:v,outsidePress:y}=Jhe(s),b=I.useRef(!1),x=I.useRef(!1),S=I.useRef(!1),C=I.useRef(!1),w=I.useRef(!1),T=I.useRef(``),E=I.useRef(null),D=uk(),O=uk(),k=uk(),A=ZA(()=>{O.clear(),d.current.insideReactTree=!1}),j=ZA(e=>{let t=d.current.floatingContext?.nodeId;return(p?Wj(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=ZA(t=>yA(t,e.select(`floatingElement`))||yA(t,e.select(`domReferenceElement`))),N=ZA(t=>{o()&&e.setOpen(!1,AA(MA,t.nativeEvent))}),P=ZA(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=Zme(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=AA(IA,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),ee=ZA(()=>{d.current.insideReactTree=!0,O.start(0,A)}),te=ZA(t=>{if(!l||!n||t.button!==0)return;let r=Yk(t.nativeEvent);qk(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),ne=ZA(e=>{!l||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});I.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),I.useEffect(()=>A,[A]),I.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new lk,i=ij(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(_k?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&Wj(p.nodesRef.current,t).some(t=>yA(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=Yk(n),i=`[${Kj(`inert`)}]`,a=Ek(r)?r.getRootNode():null,o=Array.from((Ok(a)?a:ij(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>qk(e,r))))return;let c=Ek(r)?r:null;for(;c&&!zk(c);){let e=Hk(c);if(zk(e)||!Ek(e))break;c=e}if(!(o.length&&Ek(r)&&!bA(r)&&!qk(r,e.select(`floatingElement`))&&o.every(e=>!qk(c,e)))){if(Dk(r)&&!(`touches`in n)){let e=zk(r),t=Bk(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!vk(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,AA(PA,n)),A())}}}function ee(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||M(t)||N(t)}function te(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function ne(e,t){let n=Yk(e);if(!n)return;let r=RA(n,e.type,()=>{t(e),r()})}function F(e){T.current=`touch`,ne(e,te)}function re(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&ne(e,e=>{e.type===`pointerdown`?ee(e):N(e)})}function ie(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;if(c(),f()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!O(e)){if(n){s();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,A())}}}function ae(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function oe(e){ne(e,ae)}function se(e){f()!==`sloppy`||!E.current||M(e)||(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function ce(e){ne(e,se)}let le=zA(r&&zA(RA(i,`keydown`,P),RA(i,`compositionstart`,a),RA(i,`compositionend`,o)),g&&zA(RA(i,`click`,re,!0),RA(i,`pointerdown`,re,!0),RA(i,`pointerup`,ie,!0),RA(i,`pointercancel`,ie,!0),RA(i,`mousedown`,re,!0),RA(i,`mouseup`,ie,!0),RA(i,`touchstart`,F,{capture:!0,passive:!0}),RA(i,`touchmove`,oe,{capture:!0,passive:!0}),RA(i,`touchend`,ce,{capture:!0,passive:!0})));return()=>{le(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let F=I.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),re=I.useMemo(()=>({onKeyDown:P,onPointerDown:ne,onMouseDown:ne,onClickCapture:ee,onMouseDownCapture(e){ee(),te(e)},onPointerDownCapture(e){ee(),te(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[P,ee,te,ne]);return I.useMemo(()=>n?{reference:F,floating:re,trigger:F}:{},[n,F,re])}function Xhe(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var LM=Xhe(`https://base-ui.com/production-error`,`Base UI`);function Zhe(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),dk(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Ek(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Qhe(e,t=!1,n=!1,r=!1){let[i,a]=I.useState(e&&t?`idle`:void 0),[o,s]=I.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),dk(()=>{if(!e&&o&&i!==`ending`&&n){let e=nj.request(()=>{a(`ending`)});return()=>{nj.cancel(e)}}},[e,o,i,n]),dk(()=>{if(!e||t||i===void 0)return;let n=nj.request(()=>{a(void 0)});return()=>{nj.cancel(n)}},[t,e,i]),dk(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=nj.request(()=>{a(`idle`)});return()=>{nj.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function RM(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var zM=null;function $he(e){if(!zM){let e=[];zM=e,queueMicrotask(()=>{zM=null,CM.flushSync(()=>{for(let t of e)t()})})}zM.push(e)}function BM(e,t=!1,n=!1){let r=rj();return ZA((i,a=null)=>{r.cancel();let o=jM(e);if(o==null)return;let s=o,c=()=>{if(!n){CM.flushSync(i);return}$he(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(RM(s).map(e=>e.finished.then(ak))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(RM(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=Qk;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function VM(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=ZA(a),s=BM(r,n,i);I.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function ege(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=ZA(i),{mounted:c,setMounted:l,transitionStatus:u}=Qhe(t,!1,!1,o),d=!t&&r;dk(()=>{t&&s(!1)},[t,s]);let f=I.useRef(c),p=I.useRef(!1),m=aM(),h=()=>{f.current=!1,l(!1),a()};dk(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=ZA(()=>{if(f.current){if(t){p.current=!0,m();return}h()}});return VM({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var tge={tabIndex:-1,[Xk]:``};function nge(e){return t=>t!==`touch`||e.current}function rge(e,t=!1){let n=cM(),r=kM()!=null,i=tk(()=>e(n,r)).current;return Zhe({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function ige({handle:e,store:t}){return dk(()=>e.attachStore(t),[e,t]),null}function HM(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function age(e,t){let n=I.useRef(null);return ZA(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),HM(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),HM(t))})}function oge(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function sge(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function cge(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=age(e,n),o=ZA(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=ZA(e=>{a(e),e&&o(e)});return dk(()=>(s(t.current),()=>s(null)),[s,t,n,e]),dk(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function lge(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=I.useRef(null),i=e.useState(`open`);dk(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=AA(jA);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function uge(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=ege({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return tk(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function dge(e,t){e.useSyncedValues(t),dk(()=>()=>{e.update({activeTriggerProps:ok,inactiveTriggerProps:ok,popupProps:ok})},[e])}function fge(e,t){dk(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),dk(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var pge=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},UM=zO(),mge=lM(19)?gge:_ge;function WM(e,t,n,r,i){return mge(e,t,n,r,i)}function hge(e,t,n,r,i){let a=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,UM.useSyncExternalStore)(e.subscribe,a,a)}Rme({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,UM.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function gge(e,t,n,r,i){let a=Lme();if(!a)return hge(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function _ge(e,t,n,r,i){return(0,BO.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var vge=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return WM(this,e,t,n,r)}},GM=class extends vge{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){I.useDebugValue(e);let n=this;dk(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;dk(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;dk(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){I.useDebugValue(e);let n=this,r=t!==void 0;dk(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return I.useDebugValue(e),WM(this,this.selectors[e],t,n,r)}useContextCallback(e,t){I.useDebugValue(e);let n=ZA(t??ak);this.context[e]=n}useStateSetter(e){let t=I.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},yge={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},bge=class extends GM{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:EM(),nested:n,triggerElements:i},yge),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Qme(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function xge(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new bge({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ok,inactiveTriggerProps:ok,popupProps:ok}}var KM=e=>e.triggerIdProp??e.activeTriggerId,qM=e=>e.openProp??e.open,JM=e=>(e.popupElement?.id??e.floatingId)||void 0;function YM(e,t){return t!==void 0&&qM(e)&&KM(e)===t}function Sge(e,t){return YM(e,t)?!0:t!==void 0&&qM(e)&&KM(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var XM={open:qM,mounted:e=>e.mounted,transitionStatus:e=>qM(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:KM,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:JM,isTriggerActive:(e,t)=>t!==void 0&&KM(e)===t,isOpenedByTrigger:(e,t)=>YM(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&KM(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Sge(e,t)?JM(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Cge(e){let t=I.useCallback(t=>e===void 0?ak:e.subscribeStore(t),[e]),n=I.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,UM.useSyncExternalStore)(t,n,()=>e?.serverStore)}var wge=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new lk;restTimeout=new lk;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},ZM=new WeakMap;function QM(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&ZM.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),ZM.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function $M(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=ZM.get(n);a&&a!==e&&QM(a),QM(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,ZM.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function eN(e){let t=e.context.dataRef.current,n=tk(()=>t.hoverInteractionState??wge.create()).current;return t.hoverInteractionState||=n,sk(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Tge(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=AM(),u=kM(),d=eN(e),f=uk(),p=ZA(()=>OA(c.current.openEvent?.type,d.interactedInside)),m=ZA(()=>kA(c.current.openEvent?.type)),h=ZA(()=>{QM(d)});dk(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),I.useEffect(()=>h,[h]),dk(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Ek(s)&&o){let e=s,t=o,n=ij(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??Jk(e,`[data-rootownerid]`)??n.body;return $M(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),I.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Wj(l.nodesRef.current,u).length>0)}function a(t){let n=EA(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,AA(NA,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=Yk(e);if(!SA(t)){d.interactedInside=!1;return}d.interactedInside=Jk(t,`[aria-haspopup]`)!=null}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(vA(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&Ek(o)&&Wj(l.nodesRef.current,r,!1).some(e=>qk(e.context?.elements.floating,o)))){if(d.handler){d.handler(n);return}h(),m()&&!p()&&a(n)}}function v(n){!l||!u||t()||f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,AA(NA,n)),l.events.emit(`floating.closed`,n)})}let y=o;return zA(y&&RA(y,`mouseenter`,g),y&&RA(y,`mouseleave`,_),y&&RA(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Ege={current:null};function Dge(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Ege,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=AM(l),v=eN(e),y=I.useRef(!1),b=KA(i),x=KA(r),S=KA(o),C=KA(n),w=KA(p),T=KA(f),E=ZA(()=>OA(h.current.openEvent?.type,v.interactedInside)),D=ZA(()=>w.current?.()!==!1),O=ZA((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!qk(t,n);if(!Ek(r))return!1;let a=r;return i.hasMatchingElement(e=>qk(e,a))&&(!t||!qk(t,a))}),k=ZA(()=>{v.handler&&=(ij(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=ZA(()=>{QM(v)});return u&&(v.handleCloseOptions=i?.__options),I.useEffect(()=>k,[k]),I.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===NA,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),I.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=EA(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,AA(NA,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,AA(NA,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Ek(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!bk(v.pointerType))return;let n=DA(S.current),r=EA(x.current,`open`,v.pointerType),i=Yk(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Ek(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(qk(t,i)){c=t;break}}Ek(o)&&Ek(s)&&!e.context.triggerElements.hasElement(o)&&qk(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&Ek(c)&&Ek(s)&&qk(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,AA(NA,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,AA(NA,t,c))}):g&&D()&&e.setOpen(!0,AA(NA,t,c)))}function o(n){if(E()){A();return}k();let r=ij(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!vA(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n);return}(v.pointerType!==`touch`||!qk(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){qk(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?RA(r,`mouseout`,l):void 0;return s?zA(RA(r,`mousemove`,i,{once:!0}),RA(r,`mouseenter`,i),RA(r,`mouseleave`,o),f):zA(RA(r,`mouseenter`,i),RA(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),I.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!bk(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;$M(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=DA(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,AA(NA,n,r))}v.pointerType===`touch`?CM.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}var tN=.1,Oge=tN*tN,nN=.5;function rN(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function iN(e,t,n,r,i,a,o,s,c,l){let u=!1;return rN(e,t,n,r,i,a)&&(u=!u),rN(e,t,i,a,o,s)&&(u=!u),rN(e,t,o,s,c,l)&&(u=!u),rN(e,t,c,l,n,r)&&(u=!u),u}function kge(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function aN(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Age(e={}){let{blockPointerEvents:t=!1}=e,n=new lk,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Oge;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Yk(r),g=r.type===`mouseleave`,_=qk(u,h),v=qk(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Ek(r.relatedTarget)&&qk(u,r.relatedTarget))return;function y(){return!!(s&&Wj(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=aN(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=aN(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=aN(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=aN(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!kge(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?nN/2:nN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+nN+1,o=C||T?S.bottom-nN:S.top,s=C?T?S.bottom-nN:S.top:S.bottom-nN;M=iN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?nN/2:nN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-nN,o=C||T?S.top+nN:S.bottom,s=C?T?S.top+nN:S.bottom:S.top+nN;M=iN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?nN/2:nN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+nN+1,o=w||E?S.right-nN:S.left,s=w?E?S.right-nN:S.left:S.right-nN;M=iN(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?nN/2:nN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-nN,o=w||E?S.left+nN:S.right,s=w?E?S.left+nN:S.right:S.left+nN;M=iN(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function oN(e,t,n){let{reference:r,floating:i}=e,a=vj(t),o=yj(t),s=_j(o),c=mj(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=hj(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function jge(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=pj(t,e),p=wj(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Tj(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Tj(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Mge=50,Nge=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:jge},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=oN(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Mge&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=oN(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Pge=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=pj(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=mj(r),_=vj(o),v=mj(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Cj(o)]:nhe(o)),x=p!==`none`;!d&&x&&b.push(...ohe(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=the(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===vj(t)||T.every(e=>vj(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=vj(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},sN=new Set([`left`,`top`]);async function Fge(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mj(n),s=hj(n),c=vj(n)===`y`,l=sN.has(o)?-1:1,u=a&&c?-1:1,d=pj(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 s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ige=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Fge(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Lge=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=pj(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=vj(i),p=gj(f),m=u[p],h=u[f],g=(e,t)=>fj(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Rge=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pj(e,t),u={x:n,y:r},d=vj(i),f=gj(d),p=u[f],m=u[d],h=pj(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=sN.has(mj(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},zge=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=pj(e,t),c=await i.detectOverflow(t,s),l=mj(n),u=hj(n),d=vj(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=sj(p-c[m],g),y=sj(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*cj(c.left,c.right):S=p-2*cj(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function cN(e){let t=Bk(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Dk(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=lj(n)!==a||lj(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function lN(e){return Ek(e)?e:e.contextElement}function uN(e){let t=lN(e);if(!Dk(t))return dj(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=cN(t),o=(a?lj(n.width):n.width)/r,s=(a?lj(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Bge=dj(0);function dN(e){let t=Ck(e);return!Rk()||!t.visualViewport?Bge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vge(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ck(e)}function fN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=lN(e),o=dj(1);t&&(r?Ek(r)&&(o=uN(r)):o=uN(e));let s=Vge(a,n,r)?dN(a):dj(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ck(a),t=Ek(r)?Ck(r):r,n=e,i=Gk(n);for(;i&&t!==n;){let e=uN(i),t=i.getBoundingClientRect(),r=Bk(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ck(i),i=Gk(n)}}return Tj({width:u,height:d,x:c,y:l})}function pN(e,t){let n=Vk(e).scrollLeft;return t?t.left+n:fN(wk(e)).left+n}function mN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-pN(e,n),y:n.top+t.scrollTop}}function Hge(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=wk(r),s=t?jk(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=dj(1),u=dj(0),d=Dk(r);if((d||!a)&&((Sk(r)!==`body`||kk(o))&&(c=Vk(r)),d)){let e=fN(r);l=uN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?mN(o,c):dj(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Uge(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Wge(e){let t=Vk(e),n=e.ownerDocument.body,r=cj(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=cj(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+pN(e),o=-t.scrollTop;return Bk(n).direction===`rtl`&&(a+=cj(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Gge=25;function Kge(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ck(e),a=wk(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Rk()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(pN(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Gge&&(s-=o)}return{width:s,height:c,x:l,y:u}}function qge(e,t){let n=fN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=uN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function hN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Kge(e,n,t);else if(t===`document`)r=Wge(wk(e));else if(Ek(t))r=qge(t,n);else{let n=dN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Tj(r)}function Jge(e,t){let n=t.get(e);if(n)return n;let r=Wk(e,[],!1).filter(e=>Ek(e)&&Sk(e)!==`body`),i=null,a=Bk(e).position===`fixed`,o=a?Hk(e):e;for(;Ek(o)&&!zk(o);){let e=Bk(o),t=Ik(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Hk(o)}return t.set(e,r),r}function Yge(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?jk(t)?[]:Jge(t,this._c):[].concat(n),r],o=hN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=hN(t,a[e],i);s=cj(n.top,s),c=sj(n.right,c),l=sj(n.bottom,l),u=cj(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Xge(e){let{width:t,height:n}=cN(e);return{width:t,height:n}}function Zge(e,t,n){let r=Dk(t),i=wk(t),a=n===`fixed`,o=fN(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=dj(0);if((r||!a)&&((Sk(t)!==`body`||kk(i))&&(s=Vk(t)),r)){let e=fN(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=pN(i));let l=i&&!r&&!a?mN(i,s):dj(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function gN(e){return Bk(e).position===`static`}function _N(e,t){if(!Dk(e)||Bk(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return wk(e)===n&&(n=n.ownerDocument.body),n}function vN(e,t){let n=Ck(e);if(jk(e))return n;if(!Dk(e)){let t=Hk(e);for(;t&&!zk(t);){if(Ek(t)&&!gN(t))return t;t=Hk(t)}return n}let r=_N(e,t);for(;r&&Ak(r)&&gN(r);)r=_N(r,t);return r&&zk(r)&&gN(r)&&!Ik(r)?n:r||Lk(e)||n}var Qge=async function(e){let t=this.getOffsetParent||vN,n=this.getDimensions,r=await n(e.floating);return{reference:Zge(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $ge(e){return Bk(e).direction===`rtl`}var e_e={convertOffsetParentRelativeRectToViewportRelativeRect:Hge,getDocumentElement:wk,getClippingRect:Yge,getOffsetParent:vN,getElementRects:Qge,getClientRects:Uge,getDimensions:Xge,getScale:uN,isElement:Ek,isRTL:$ge};function yN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function t_e(e,t,n){let r=null,i,a=wk(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=uj(d),h=uj(a.clientWidth-(u+f)),g=uj(a.clientHeight-(d+p)),_=uj(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:cj(0,sj(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!yN(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ck(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function bN(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=lN(e),u=i||a?[...l?Wk(l):[],...t?Wk(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?t_e(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?fN(e):null;c&&g();function g(){let t=fN(e);h&&!yN(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var n_e=Ige,r_e=Lge,i_e=Pge,a_e=zge,o_e=Rge,s_e=(e,t,n)=>{let r=new Map,i=n??{},a={...e_e,...i.platform,_c:r};return Nge(e,t,{...i,platform:a})},xN=typeof document<`u`?I.useLayoutEffect:function(){};function SN(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 n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!SN(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!SN(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function CN(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wN(e,t){let n=CN(e);return Math.round(t*n)/n}function TN(e){let t=I.useRef(e);return xN(()=>{t.current=e}),t}function c_e(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=I.useState(r);SN(f,r)||p(r);let[m,h]=I.useState(null),[g,_]=I.useState(null),v=I.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=I.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=I.useRef(null),C=I.useRef(null),w=I.useRef(u),T=c!=null,E=TN(c),D=TN(i),O=TN(l),k=I.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),s_e(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!SN(w.current,t)&&(w.current=t,CM.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);xN(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=I.useRef(!1);xN(()=>(A.current=!0,()=>{A.current=!1}),[]),xN(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=I.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=I.useMemo(()=>({reference:b,floating:x}),[b,x]),N=I.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=wN(M.floating,u.x),r=wN(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...CN(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return I.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var l_e=(e,t)=>{let n=n_e(e);return{name:n.name,fn:n.fn,options:[e,t]}},u_e=(e,t)=>{let n=r_e(e);return{name:n.name,fn:n.fn,options:[e,t]}},d_e=(e,t)=>({fn:o_e(e).fn,options:[e,t]}),f_e=(e,t)=>{let n=i_e(e);return{name:n.name,fn:n.fn,options:[e,t]}},p_e=(e,t)=>{let n=a_e(e);return{name:n.name,fn:n.fn,options:[e,t]}},EN=I.createContext(void 0);function DN(e){let t=I.useContext(EN);if(t===void 0&&!e)throw Error(LM(47));return t}var m_e={...XM,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!XM.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&XM.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>XM.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},h_e=class extends GM{constructor(e,t,n){let r=new pge;super(g_e(e,r,t,n),__e(r),m_e)}setOpen=(e,t)=>{let n=t.reason===NA,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=sge(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=oge(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),CM.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function g_e(e,t,n,r=!1){let i={...xge(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function __e(e){return{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:I.createRef(),beforeTriggerFocusGuardRef:I.createRef(),beforeContentFocusGuardRef:I.createRef(),stickIfOpenTimeout:new lk,stickIfOpen:!0,triggerElements:e}}var ON=ik(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=y_e(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),fge(u,d),lge(u);let{forceUnmount:m}=uge(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),I.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),I.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,AA(LA))}),[m,u]);let h=d||f||s!=null;return(0,R.jsxs)(EN.Provider,{value:u,children:[s&&(0,R.jsx)(ige,{handle:s,store:u}),h&&(0,R.jsx)(b_e,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function v_e(e){return DN(!0)?(0,R.jsx)(ON,{props:e}):(0,R.jsx)(Vhe,{children:(0,R.jsx)(ON,{props:e})})}function y_e(e,t){let n=rge((e,n)=>new h_e(t,e,n));return I.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function b_e({store:e,modal:t}){let n=Yhe(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return dge(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var x_e=I.createContext(void 0);function S_e(e=!1){let t=I.useContext(x_e);if(t===void 0&&!e)throw Error(LM(16));return t}function C_e(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:I.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function kN(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Ck(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function w_e(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=I.useRef(null),s=S_e(!0),c=a??s!==void 0,{props:l}=C_e({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=I.useCallback(()=>{let e=o.current;AN(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return dk(u,[u]),{getButtonProps:I.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return pM({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(yM(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=AN(r),s=!i&&T_e(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),kN(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),kN(r,e)))},onKeyUp(e){if(!t){if(yM(e),a?.(e),e.target===e.currentTarget&&i&&c&&AN(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),kN(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:ZA(e=>{o.current=e,u()})}}function AN(e){return Dk(e)&&e.tagName===`BUTTON`}function T_e(e){return Dk(e)&&e.tagName===`A`&&!!e.href}function E_e(e){return cM(e,`base-ui`)}function D_e(e,t){function n(n,r,i){let a=n.currentTarget;CM.flushSync(()=>{e.setOpen(!1,AA(FA,n.nativeEvent,a))}),phe(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Hj(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function O_e(e){let t=I.useRef(``),n=I.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:I.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function k_e(e,t){let{onClick:n,onPointerDown:r}=O_e(ZA((n,r)=>{(typeof e==`function`?e():e)||t(r||(mk?`touch`:``))}));return I.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}var A_e=zme(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=DN(!0),h=Cge(s)??m;if(!h)throw Error(LM(74));let g=E_e(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=I.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=cge(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=Dge(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:Age(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=Khe(v,{stickIfOpen:ZA(()=>h.context.stickIfOpen)}),k=k_e(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=w_e({disabled:a,native:o}),N={open(e){return w?mA.open(e):pA.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:ee}=D_e(h,x),te=SM(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[Mhe]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),ne=(0,R.jsx)(I.Fragment,{children:te},g);return E?(0,R.jsxs)(I.Fragment,{children:[(0,R.jsx)(oj,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),ne,(0,R.jsx)(oj,{ref:h.context.triggerFocusTargetRef,onFocus:ee})]}):ne}),jN=I.createContext(void 0);function j_e(){let e=I.useContext(jN);if(e===void 0)throw Error(LM(45));return e}var M_e=I.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return DN().useState(`mounted`)||n?(0,R.jsx)(jN.Provider,{value:n,children:(0,R.jsx)(Lhe,{ref:t,...r})}):null});function N_e(e){return lM(19)?e:e?`true`:void 0}var MN=I.createContext(void 0);function P_e(){let e=I.useContext(MN);if(!e)throw Error(LM(46));return e}function F_e(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=I.useState(null),d=I.useRef(null),f=AM(n),p=I.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=c_e({...e,elements:{...p,...l&&{reference:l}}}),h=I.useCallback(e=>{let t=Ek(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=I.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=I.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=I.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return dk(()=>{o&&(d.current=o)},[o]),dk(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),I.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var I_e=I.createContext(void 0);function L_e(){return I.useContext(I_e)?.direction??`ltr`}var R_e=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=pj(e,t)||{};if(l==null)return{};let d=wj(u),f={x:n,y:r},p=yj(i),m=_j(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=fj(D,k,O),j=!c.arrow&&hj(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),z_e=(e,t)=>{let{name:n,fn:r}=R_e(e);return{name:n,fn:r,options:[e,t]}},B_e={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},V_e={sideX:`left`,sideY:`top`},H_e=`--available-width`,U_e=`--available-height`,W_e=`--anchor-width`,G_e=`--anchor-height`,K_e=`--transform-origin`,NN=H_e,PN=U_e;function FN(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function IN(e,t,n){let{rects:r,placement:i}=e;return{side:FN(t,mj(i),n),align:hj(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function q_e(e){return J_e(e,F_e)}function J_e(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=ZA(O),A=O?k:n,j=KA(n),M=KA(g),N=L_e()===`rtl`,[P,ee]=I.useState(null);!g&&P!==null&&ee(null);let te=x===`placement`,ne=P?mj(P):null,F=P&&te?hj(P)||`center`:null,re=ne||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],ie=F||o,ae=ie===`center`?re:`${re}-${ie}`,oe=l;typeof oe==`number`?oe={top:oe,right:oe,bottom:oe,left:oe}:oe&&={top:oe.top||0,right:oe.right||0,bottom:oe.bottom||0,left:oe.left||0};let se=+(i===`bottom`),ce=+(i===`top`),le=+(i===`right`),ue=+(i===`left`),de={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:oe},fe=I.useRef(null),pe=KA(a),me=KA(s),he=typeof a==`function`?0:a,ge=typeof s==`function`?0:s,_e=[];p&&_e.push(p),_e.push(l_e(e=>{let t=IN(e,i,N),n=typeof pe.current==`function`?pe.current(t):pe.current,r=typeof me.current==`function`?me.current(t):me.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[he,ge,N,i]));let ve=w===`none`&&C!==`shift`,ye=!ve&&(u||E||C===`shift`),be=C===`none`?null:f_e({...de,padding:{top:oe.top+1+se,right:oe.right+1+ue,bottom:oe.bottom+1+ce,left:oe.left+1+le},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),xe=ve?null:u_e({...de,rootBoundary:D,mainAxis:w!==`none`,crossAxis:ye,limiter:u||E?void 0:d_e(e=>{if(!fe.current)return{};let{width:t,height:n}=fe.current.getBoundingClientRect(),r=vj(mj(e.placement)),i=r===`y`?t:n,a=r===`y`?oe.left+oe.right:oe.top+oe.bottom;return{offset:i/2+a/2}})},[de,u,E,D,oe,w]);C===`shift`||w===`shift`||ie===`center`?_e.push(xe,be):_e.push(be,xe),_e.push(p_e({...de,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(NN,`${t}px`),i.setProperty(PN,`${n}px`);let a=Ck(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(W_e,`${u}px`),i.setProperty(G_e,`${d}px`)}}),z_e(e=>({element:fe.current||ij(e.elements.floating).createElement(`div`),padding:fe.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=mj(r),u=hj(r),d=vj(l)===`y`,f=fe.current,p=typeof a==`function`?a(IN(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return ye&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(K_e,d?`${m} ${h}`:`${h} ${m}`),{}}},B_e,b),dk(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let Se=I.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:Ce,elements:we,x:Te,y:Ee,middlewareData:De,update:Oe,placement:ke,context:Ae,isPositioned:je,floatingStyles:Me}=t({rootContext:h,open:m?g:void 0,placement:ae,middleware:_e,strategy:r,whileElementsMounted:m?void 0:(...e)=>bN(...e,Se),nodeId:y,externalTree:S}),{sideX:Ne,sideY:Pe}=De.adaptiveOrigin||V_e,Fe=je?r:`fixed`,Ie=I.useMemo(()=>{let e;return e=je?b?{position:Fe,[Ne]:Te,[Pe]:Ee}:{...Me,position:Fe}:{position:Fe,top:0,left:0},e[NN]=`100vw`,e[PN]=`100vh`,je||(e.opacity=0),e},[b,Fe,Ne,Te,Pe,Ee,Me,je]),Le=I.useRef(null);dk(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(LN(t)?t.current:t)||null;n!==Le.current&&(Ce.setPositionReference(n),Le.current=n)},[g,Ce,A,j]),I.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&LN(e)&&e.current!==Le.current&&(Ce.setPositionReference(e.current),Le.current=e.current)},[g,Ce,A,j]),I.useEffect(()=>{if(m&&g&&we.reference&&we.floating)return bN(we.reference,we.floating,Oe,Se)},[m,g,we,Oe,Se]);let Re=mj(ke),ze=FN(i,Re,N),Be=hj(ke)||`center`,Ve=!!De.hide?.referenceHidden;dk(()=>{x&&g&&je&&(Re!==re||te&&Be!==ie)&&ee(ke)},[x,te,g,je,ke,Re,Be,re,ie]);let He=I.useMemo(()=>({position:`absolute`,top:De.arrow?.y,left:De.arrow?.x}),[De.arrow]),Ue=De.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:Ie,arrowStyles:He,arrowRef:fe,arrowUncentered:Ue,side:ze,align:Be,physicalSide:Re,anchorHidden:Ve,refs:Ce,context:Ae,isPositioned:je,update:Oe}),[Ie,He,fe,Ue,ze,Be,Re,Ve,Ce,Ae,je,Oe])}function LN(e){return e!=null&&`current`in e}var Y_e=I.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,R.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function X_e(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=I.useRef(null),o=I.useRef(null),s=BM(r);dk(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),dk(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}function RN(e){return e===`starting`?jhe:ok}function Z_e(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),SM(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},RN(r),i],stateAttributesMapping:hA})}var zN={},BN={},VN=``;function HN(e,t){return kk(e)?e:t}function UN(e,t,n){return/hidden|clip/.test(e.getComputedStyle(HN(t,n)).overflowY)}function Q_e(e){if(typeof document>`u`)return!1;let t=ij(e);return Ck(t).innerWidth-t.documentElement.clientWidth>0}function $_e(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=ij(e),n=t.documentElement,r=t.body,i=HN(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function eve(e){let t=ij(e),n=t.documentElement,r=t.body,i=HN(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function tve(e){let t=ij(e),n=t.documentElement,r=t.body,i=Ck(n),a=0,o=0,s=!1,c=nj.create();if(_k&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,zN={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},VN=n.style.scrollBehavior,BN={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=HN(n,r);if(s=$_e(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,zN),Object.assign(r.style,BN),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=VN)}function d(){u(),c.request(l)}l();let f=RA(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var nve=new class{lockCount=0;restore=null;timeoutLock=lk.create();timeoutUnlock=lk.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=ij(e),n=t.documentElement,r=t.body,i=Ck(n);if(UN(i,n,r)){let t=new i.MutationObserver(()=>{UN(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=mk||!Q_e(e);this.restore=a?eve(e):tve(e)}};function rve(e=!0,t=null){dk(()=>{if(e)return nve.acquire(t)},[e,t])}var ive=20;function ave(e,t,n,r){let[i,a]=I.useState(!1);dk(()=>{if(!e||!t||n==null){a(!1);return}let r=ij(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-ive)},[e,t,n]),rve(e&&(!t||i),r)}var ove=I.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Nhe,..._}=e,v=DN(),y=j_e(),b=zhe(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=q_e({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});X_e({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;ave(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=Z_e(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,R.jsxs)(MN.Provider,{value:j,children:[S&&M&&(0,R.jsx)(Y_e,{inert:N_e(!C),cutout:T}),(0,R.jsx)(Bhe,{id:b,children:P})]})}),sve=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),cve=I.createContext(void 0);function lve(e){let t=I.useContext(cve);if(t===void 0&&!e)throw Error(LM(69));return t}var uve=I.createContext(void 0);function dve(){let[e,t]=I.useState(0),n=ZA(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:I.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var fve=I.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=DN(),l=P_e(),u=lve(!0)!=null,{context:d,hasClosePart:f}=dve(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);VM({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),Tge(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?nge(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=SM(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...tge,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&sve.has(e.key)&&e.stopPropagation()}},RN(g),s],stateAttributesMapping:gA});return(0,R.jsx)(Ghe,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:Dk(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,R.jsx)(uve.Provider,{value:d,children:M})})}),WN=`data-glide-stand-in`;function GN(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left+e.scrollLeft-e.clientLeft,y:r.top-n.top+e.scrollTop-e.clientTop,width:r.width,height:r.height}}function KN(e){return{transform:`translate(${String(e.x)}px, ${String(e.y)}px)`,width:`${String(e.width)}px`,height:`${String(e.height)}px`}}function pve(e){let t=(0,I.useRef)(null);return(0,I.useCallback)(n=>{t.current?.(),t.current=n?mve(n,e):null},[e])}function mve(e,t){if(!GC(e))return()=>void 0;let n=e.ownerDocument,r=e.querySelector(t),i=r?GN(e,r):null,a=null,o=null,s=new Set,c=()=>{for(let e of s)e.removeAttribute(WN);s.clear(),a&&(a.hidden=!0),o=null},l=()=>{if(a)return a;let t=n.createElement(`span`);return t.className=`caps-glide`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t),e.classList.add(`caps-glide-host`),getComputedStyle(e).position===`static`&&e.classList.add(`caps-glide-anchor`),a=t,t},u=(t,n)=>{let r=VC(e),u=GN(e,t),d=o&&a?GN(e,a):i;if(i=u,o?.cancel(),c(),r.reduced||d===null||Math.abs(d.y-u.y)<1&&Math.abs(d.x-u.x)<1)return;t.setAttribute(WN,`measure`);let f=getComputedStyle(t),p=f.backgroundColor,m=f.borderRadius;for(let e of[t,n])e&&(e.setAttribute(WN,``),s.add(e));let h=l();h.hidden=!1,h.style.backgroundColor=p,h.style.borderRadius=m;let g=h.animate([KN(d),KN(u)],{duration:r.normal,easing:WC(r,r.ease),fill:`forwards`});o=g,g.addEventListener(`finish`,()=>{o===g&&c()})},d=()=>{let n=e.querySelector(t);if(n===r)return;let i=r;r=n,n&&u(n,i)},f=new MutationObserver(d);return f.observe(e,{subtree:!0,attributes:!0,attributeFilter:[`data-highlighted`,`data-active`,`data-navigation`,`aria-selected`]}),e.addEventListener(`pointerover`,d),e.addEventListener(`pointerout`,d),()=>{f.disconnect(),e.removeEventListener(`pointerover`,d),e.removeEventListener(`pointerout`,d),o?.cancel(),c(),a?.remove()}}var hve=(0,I.createContext)(void 0),gve=(0,I.createContext)(null);function _ve(e){let t=(0,I.useContext)(gve);return t===null?Object.hasOwn(globalThis,`document`)?document.body:null:t[e]}function vve(e){let t=(0,I.useContext)(hve),n=(0,I.useRef)(e);n.current=e,(0,I.useEffect)(()=>t?.(()=>{n.current()}),[t])}var qN=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,R.jsx)(`input`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:RC(`input caps-input w-full`,e),ref:r})});(0,I.forwardRef)(function({leading:e,className:t,...n},r){return(0,R.jsxs)(`span`,{className:`caps-search-input`,"data-leading":e?`true`:void 0,children:[e?(0,R.jsx)(`span`,{className:`caps-search-leading`,"aria-hidden":`true`,children:e}):null,(0,R.jsx)(qN,{...n,type:`search`,className:t,ref:r})]})});function yve({getKey:e,isDisabled:t=()=>!1,items:n}){let r=(0,I.useMemo)(()=>{let r=n.map(e);if(r.some(e=>!e))throw Error(`Selectable items require non-empty keys`);if(new Set(r).size!==r.length)throw Error(`Selectable items require unique keys`);return n.filter(e=>!t(e))},[e,t,n]),[i,a]=(0,I.useState)(null);(0,I.useEffect)(()=>{i!==null&&!r.some(t=>e(t)===i)&&a(null)},[i,r,e]);let o=r.find(t=>e(t)===i),s=o?r.findIndex(t=>e(t)===i):-1;return{activeIndex:s,activeItem:o,activeKey:i,enabledItems:r,move:(t,n)=>{if(r.length===0)return;let i=n?n===`start`?0:r.length-1:s<0?t>0?0:r.length-1:(s+t+r.length)%r.length,o=r[i];o&&a(e(o))},setActiveKey:a}}var bve=(0,I.forwardRef)(function({children:e,className:t,type:n=`button`,...r},i){return(0,R.jsxs)(`button`,{...r,ref:i,type:n,className:RC(`select caps-select caps-combobox-trigger w-full`,t),children:[(0,R.jsx)(`span`,{children:e}),(0,R.jsx)(AD,{className:`caps-select-chevron`,"aria-hidden":`true`})]})});function xve({defaultOpen:e,defaultValue:t,getKey:n,getSearchText:r,groupBy:i,id:a,isDisabled:o,items:s,onOpenChange:c,onCommit:l,multiple:u,controlledOpen:d,controlledKeys:f,trigger:p}){let m=`${a}-listbox`,[h,g]=(0,I.useState)(``),[_,v]=(0,I.useState)(!1),[y,b]=(0,I.useState)(t),[x,S]=(0,I.useState)(e),C=f??(y===null?[]:[y]),w=p?d??x:!0,T=(0,I.useMemo)(()=>{let e=h.trim().toLowerCase();return e?s.filter(t=>r(t).toLowerCase().includes(e)):s},[r,s,h]),E=yve({getKey:n,isDisabled:o,items:T});(0,I.useEffect)(()=>{if(E.activeKey!==null)return;let e=E.enabledItems.find(e=>C.includes(n(e)))??E.enabledItems[0];e&&E.setActiveKey(n(e))},[E.activeKey,E.enabledItems,E.setActiveKey,n,C]);let D=e=>{v(!1),e||g(``),d===void 0&&S(e),c?.(e)},O=e=>`${m}-option-${encodeURIComponent(e)}`,k=e=>{let t=n(e);f===void 0&&b(t),l(e),p&&!u&&D(!1)},A=e=>{v(!0),g(e.target.value),E.setActiveKey(null)},j=e=>{if(Ime(e))return;let t;switch(e.key){case`ArrowDown`:t=[1,void 0];break;case`ArrowUp`:t=[-1,void 0];break;case`End`:t=[1,`end`];break;case`Home`:t=[-1,`start`]}t?(v(!0),e.preventDefault(),E.move(t[0],t[1])):e.key===`Enter`&&E.activeItem&&(e.preventDefault(),k(E.activeItem))},M=(0,I.useMemo)(()=>{if(!i)return[{label:``,items:T}];let e=new Map;for(let t of T){let n=i(t),r=e.get(n);r?r.push(t):e.set(n,[t])}return[...e].map(([e,t])=>({label:e,items:t}))},[T,i]);return{keyboardNavigation:_,onPointerMove:()=>{v(!1)},activeKey:E.activeKey,activeItem:E.activeItem,groups:M,inputValue:h,listboxId:m,onInputChange:A,onInputKeyDown:j,optionId:O,open:w,commit:k,selectedKeys:C,setOpen:D}}function Sve(e){let{"aria-describedby":t,"aria-invalid":n,"aria-label":r,"aria-labelledby":i,"aria-required":a,activeTone:o=`neutral`,container:s,contentClassName:c,defaultOpen:l=!1,defaultValue:u=null,emptyMessage:d=`No matches`,getKey:f,getLabel:p,getSearchText:m=p,groupBy:h,id:g,inputProps:_,inputRef:v,isDisabled:y=()=>!1,items:b,onOpenChange:x,onValueChange:S,multiple:C,open:w,placeholder:T=`Search…`,renderItem:E,rootRef:D,trigger:O,triggerRef:k,value:A,...j}=e,M=e=>{let t=f(e);if(C){let e=A.includes(t)?A.filter(e=>e!==t):[...A,t];S?.(e,b.filter(t=>e.includes(f(t))))}else S?.(t,e)},N;C?N=A:A!==void 0&&(N=A===null?[]:[A]);let P=(0,I.useId)(),ee=O?.props??_,te=g??ee?.id??P,ne={id:te,"aria-describedby":[t,ee?.[`aria-describedby`]].filter(Boolean).join(` `)||void 0,"aria-invalid":n??ee?.[`aria-invalid`],"aria-label":ee?.[`aria-label`]??r,"aria-labelledby":ee?.[`aria-labelledby`]??i,"aria-required":a??ee?.[`aria-required`]},{keyboardNavigation:F,onPointerMove:re,activeItem:ie,activeKey:ae,commit:oe,groups:se,inputValue:ce,listboxId:le,onInputChange:ue,onInputKeyDown:de,open:fe,optionId:pe,selectedKeys:me,setOpen:he}=xve({defaultOpen:l,defaultValue:u,getKey:f,getSearchText:m,groupBy:h,id:te,isDisabled:y,items:b,onOpenChange:x,onCommit:M,multiple:C??!1,controlledOpen:w,controlledKeys:N,trigger:O});vve(()=>{O&&he(!1)});let ge=_ve(`popover`),_e=s===void 0?ge:s,ve=pve(`.caps-combobox-option[data-active="true"]:not(:disabled), [data-navigation="pointer"] .caps-combobox-option:hover:not(:disabled)`),ye=(0,R.jsx)(qN,{..._,...O?{}:ne,"aria-activedescendant":ie?pe(f(ie)):void 0,"aria-autocomplete":`list`,"aria-controls":le,"aria-expanded":!0,className:RC(`input-sm`,_?.className),id:O?_?.id??`${te}-input`:te,onChange:e=>{_?.onChange?.(e),ue(e)},onKeyDown:e=>{_?.onKeyDown?.(e),e.defaultPrevented||de(e)},placeholder:_?.placeholder??T,ref:v,role:`combobox`,value:ce}),be=(0,R.jsx)(`div`,{id:le,ref:ve,className:`caps-combobox-list`,"data-navigation":F?`keyboard`:`pointer`,onPointerMove:re,role:`listbox`,"aria-multiselectable":C??void 0,children:se.every(e=>e.items.length===0)?(0,R.jsx)(`div`,{className:`px-md py-md text-sm text-base-content`,children:d}):se.map(e=>(0,R.jsxs)(`div`,{"aria-label":e.label||void 0,role:e.label?`group`:void 0,children:[e.label?(0,R.jsx)(`div`,{className:`px-md pb-xs pt-sm text-xs text-base-content uppercase tracking-wider`,children:e.label}):null,e.items.map(e=>{let t=f(e),n=y(e),r=ae===t,i={active:r,disabled:n,selected:me.includes(t)};return(0,R.jsxs)(`button`,{"aria-disabled":n||void 0,"aria-selected":i.selected,className:`caps-combobox-option`,"data-active":r&&F,disabled:n,id:pe(t),onClick:()=>{oe(e)},onMouseDown:e=>{e.preventDefault()},role:`option`,tabIndex:-1,type:`button`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`caps-combobox-check`,children:i.selected?(0,R.jsx)(Ope,{}):null}),E?.(e,r,i)??p(e)]},t)})]},e.label))});return O?(0,R.jsx)(`div`,{...j,className:RC(j.className),ref:D,children:(0,R.jsxs)(v_e,{modal:!0,onOpenChange:he,open:fe,children:[(0,R.jsx)(A_e,{...ne,"aria-haspopup":`dialog`,className:`btn`,ref:k,render:O}),_e===null?null:(0,R.jsx)(M_e,{container:_e,children:(0,R.jsx)(ove,{align:`start`,side:`bottom`,sideOffset:4,children:(0,R.jsxs)(fve,{"data-active-tone":o,className:RC(`min-w-40 rounded-box border border-base-300 bg-base-100 p-xs shadow-lg outline-none caps-combobox-panel caps-combobox-popup`,c),children:[(0,R.jsx)(`div`,{className:`caps-combobox-search`,children:ye}),be]})})})]})}):(0,R.jsx)(`div`,{...j,className:RC(j.className),ref:D,children:(0,R.jsxs)(`div`,{className:RC(`caps-combobox-panel`,c),"data-active-tone":o,children:[(0,R.jsx)(`div`,{className:`caps-combobox-search`,children:ye}),be]})})}var Cve=(0,I.forwardRef)(function({label:e,icon:t,caption:n,appearance:r,className:i,...a},o){return(0,R.jsx)(`label`,{className:`caps-icon-choice`,"data-appearance":r===`compact`?r:void 0,children:(0,R.jsx)($O,{...a,appearance:r??`default`,"aria-label":e,className:RC(`caps-icon-choice-input`,i),indicator:(0,R.jsx)(HE,{icon:t,caption:n}),ref:o})})}),wve=(0,I.forwardRef)(function({label:e,icon:t,hint:n,className:r,...i},a){let o=(0,I.useId)(),s=[i[`aria-describedby`],n?o:null].filter(Boolean).join(` `)||void 0;return(0,R.jsx)(`label`,{className:`caps-check-key`,children:(0,R.jsx)($O,{...i,"aria-label":e,"aria-describedby":s,className:RC(`caps-check-key-input`,r),indicator:(0,R.jsxs)(`span`,{className:`caps-check-key-face`,"aria-hidden":`true`,children:[t?(0,R.jsx)(`span`,{className:`caps-check-key-icon`,children:t}):null,(0,R.jsxs)(`span`,{className:`caps-check-key-copy`,children:[(0,R.jsx)(`span`,{className:`caps-check-key-label`,children:e}),n?(0,R.jsx)(`span`,{className:`caps-check-key-hint`,id:o,children:n}):null]}),(0,R.jsx)(`span`,{className:`caps-check-key-lamp`})]}),ref:a})})});function Tve({className:e,...t}){return(0,R.jsx)(`div`,{...t,className:RC(`caps-check-keys`,e)})}function Eve({checked:e}){let t=`caps-radio-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(e).current,i=(0,I.useRef)(e),a=(0,I.useRef)(null),o=HC(a),{reduced:s}=o;return(0,I.useLayoutEffect)(()=>{if(!n.current)return;let t=s||i.current===e;i.current=e;let r=e?4:0,a=jE(o,{ease:`outCubic`,duration:75}),c=e?AE(o,{bounce:.65,duration:300}):jE(o,{ease:`inCubic`,duration:100}),l=aE(n.current,t?{rx:r,ry:r,cy:6,duration:0}:{rx:[{to:e?3.5:4.15,...a},{to:r,...c}],ry:[{to:e?4.5:3.85,...a},{to:r,...c}],cy:[{to:e?5.85:6.1,...a},{to:6,...c}]});return()=>{l.cancel()}},[e,s,o]),(0,R.jsxs)(`svg`,{ref:a,className:`caps-radio-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(cE,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,R.jsx)(lE,{id:`${t}-shadow`}),(0,R.jsx)(uE,{id:`${t}-inset`}),(0,R.jsx)(`clipPath`,{id:`${t}-well`,children:(0,R.jsx)(`circle`,{cx:`6`,cy:`6`,r:`5`})})]}),(0,R.jsx)(`circle`,{className:`caps-radio-track`,cx:`6`,cy:`6`,r:`5.5`,filter:`url(#${t}-inset)`}),(0,R.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,R.jsx)(`ellipse`,{ref:n,cx:`6`,cy:`6`,rx:r?4:0,ry:r?4:0,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var JN=(0,I.createContext)(null),Dve=(0,I.forwardRef)(function({children:e,className:t,defaultValue:n,disabled:r=!1,name:i,onValueChange:a,orientation:o=`vertical`,value:s,...c},l){let u=(0,I.useId)(),d=(0,I.useRef)(null);(0,I.useImperativeHandle)(l,()=>{if(!d.current)throw Error(`RadioGroup is not mounted`);return d.current},[]);let f=i??`radio-group-${u}`,[p,m]=(0,I.useState)(n),h=s??p;return(0,I.useEffect)(()=>{let e=d.current?.form;if(!e||s!==void 0)return;let t=e=>{queueMicrotask(()=>{e.defaultPrevented||m(n)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[s,n,c.form]),(0,R.jsx)(JN.Provider,{value:{disabled:r,name:f,onValueChange:e=>{s===void 0&&m(e),a?.(e)},value:h},children:(0,R.jsx)(`fieldset`,{...c,className:RC(`flex gap-md`,o===`horizontal`?`flex-row flex-wrap`:`flex-col`,t),disabled:r,role:c.role??`radiogroup`,ref:d,children:e})})}),YN=(0,I.forwardRef)(function({className:e,indicator:t,onChange:n,onClick:r,value:i,...a},o){let s=(0,I.useContext)(JN);if(!s)throw Error(`RadioGroupItem must be used inside <RadioGroup>`);let c=s.value===i,l=e=>{n?.(e),e.target.checked&&s.onValueChange?.(i)};return(0,R.jsxs)(`span`,{className:`caps-radio`,"data-checked":c,"data-custom-indicator":t!==void 0||void 0,children:[(0,R.jsx)(`input`,{...a,"aria-checked":c,checked:c,className:RC(`caps-radio-input`,e),disabled:s.disabled||a.disabled,name:s.name,onChange:l,onClick:r,ref:o,type:`radio`,value:i}),t===void 0?(0,R.jsx)(Eve,{checked:c}):t]})}),Ove=(0,I.forwardRef)(function({description:e,id:t,meta:n,title:r,...i},a){let o=(0,I.useContext)(JN),s=(0,I.useId)(),c=t??s,l=o?.value===i.value,u=o?.disabled===!0||i.disabled===!0;return(0,R.jsxs)(`label`,{className:`caps-choice-card`,"data-checked":l,"data-disabled":u||void 0,htmlFor:c,children:[(0,R.jsx)(YN,{...i,"aria-describedby":e?`${c}-description`:void 0,"aria-labelledby":`${c}-title`,id:c,ref:a}),(0,R.jsxs)(`span`,{className:`caps-choice-card-copy`,children:[(0,R.jsx)(`span`,{className:`caps-choice-card-title`,id:`${c}-title`,children:r}),e?(0,R.jsx)(`span`,{className:`caps-choice-card-description`,id:`${c}-description`,children:e}):null]}),n?(0,R.jsx)(`span`,{className:`caps-choice-card-meta`,children:n}):null]})}),kve=(0,I.forwardRef)(function({label:e,icon:t,caption:n,art:r=`dim`,className:i,...a},o){return(0,R.jsx)(`label`,{className:`caps-icon-choice`,"data-art":r===`color`?r:void 0,children:(0,R.jsx)(YN,{...a,"aria-label":e,className:RC(`caps-icon-choice-input`,i),indicator:(0,R.jsx)(HE,{icon:t,caption:n}),ref:o})})});(0,I.forwardRef)(function({label:e,color:t,className:n,...r},i){return(0,R.jsx)(`label`,{className:`caps-icon-choice`,"data-art":`color`,"data-swatch":``,title:e,children:(0,R.jsx)(YN,{...r,"aria-label":e,className:RC(`caps-icon-choice-input`,n),indicator:(0,R.jsx)(HE,{icon:(0,R.jsx)(`span`,{className:`caps-swatch-dot`,style:{backgroundColor:t}})}),ref:i})})});var Ave=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,R.jsxs)(`span`,{className:`caps-select-shell`,children:[(0,R.jsx)(`select`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:RC(`select select-bordered caps-select w-full`,t&&`select-error`,e),ref:r}),!n.multiple&&(!n.size||n.size<=1)?(0,R.jsx)(AD,{className:`caps-select-chevron`,"aria-hidden":`true`}):null]})});function jve({checked:e}){let t=`caps-switch-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(null),i=(0,I.useRef)(e).current,a=(0,I.useRef)(e),o=qC();return(0,I.useLayoutEffect)(()=>{if(!n.current||!r.current)return;let t=o||a.current===e;a.current=e;let i=e?16:8,s=VC(n.current),c=AE(s,{bounce:.25,duration:440}),l=jE(s,{ease:`inOutSine`,duration:100}),u=aE(n.current,t?{x:2,y:2,width:i,height:8,duration:0}:{x:[{to:e?2.5:1.5,...l},{to:2,...c}],y:[{to:1.5,...l},{to:2,...c}],height:[{to:9,...l},{to:8,...c}],width:[{to:e?7:16.5,...l},{to:i,...c}]}),d=aE(r.current,{gradientTransform:e?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`,...t?{duration:0}:{delay:l.duration,...c}});return()=>{u.cancel(),d.cancel()}},[e,o]),(0,R.jsxs)(`svg`,{className:`caps-switch-visual`,width:`40`,height:`24`,viewBox:`0 0 20 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(cE,{ref:r,id:`${t}-surface`,transform:i?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`}),(0,R.jsx)(lE,{id:`${t}-shadow`}),(0,R.jsx)(uE,{id:`${t}-inset`}),(0,R.jsx)(`clipPath`,{id:`${t}-track`,children:(0,R.jsx)(`rect`,{x:`1`,y:`1`,width:`18`,height:`10`,rx:`5`})})]}),(0,R.jsx)(`rect`,{className:`caps-switch-track`,filter:`url(#${t}-inset)`,x:`0.5`,y:`0.5`,width:`19`,height:`11`,rx:`5.5`}),(0,R.jsx)(`g`,{clipPath:`url(#${t}-track)`,children:(0,R.jsx)(`rect`,{ref:n,x:`2`,y:`2`,width:i?16:8,height:`8`,rx:`4`,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var Mve=(0,I.forwardRef)(function({className:e,checked:t,defaultChecked:n=!1,onChange:r,onCheckedChange:i,...a},o){let s=(0,I.useRef)(null),[c,l]=(0,I.useState)(n),u=t??c;return(0,I.useImperativeHandle)(o,()=>{if(!s.current)throw Error(`Switch input is not mounted`);return s.current},[]),(0,I.useEffect)(()=>{let e=s.current?.form;if(!e||t!==void 0)return;let r=e=>{queueMicrotask(()=>{!e.defaultPrevented&&s.current&&l(n)})};return e.addEventListener(`reset`,r),()=>{e.removeEventListener(`reset`,r)}},[t,n,a.form]),(0,R.jsxs)(`span`,{className:`caps-switch`,"data-checked":u,children:[(0,R.jsx)(`input`,{...a,checked:u,className:RC(`caps-switch-input`,e),onChange:e=>{t===void 0&&l(e.target.checked),r?.(e),i?.(e.target.checked)},ref:s,role:`switch`,type:`checkbox`}),(0,R.jsx)(jve,{checked:u})]})}),Nve=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,R.jsx)(`textarea`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:RC(`textarea textarea-bordered w-full`,t&&`textarea-error`,e),ref:r})}),Pve=vg(Og),Fve=vg(Ag),Ive=vg(Lg(Wg)),Lve=vg(Ng(Og)),XN=Ng(Hg(File)),Rve=vg(XN),ZN=Fg([Og,Wg,Ag,Eg,Dg,Ng(Og),XN]),zve=vg(ZN),QN=e=>Vu(Pve(e.state.value),()=>``),$N=e=>Vu(Fve(e.state.value),()=>!1),Bve=e=>Vu(Ive(e.state.value),()=>null),Vve=e=>Vu(Lve(e.state.value),()=>[]),Hve=e=>Vu(Rve(e.state.value),()=>[]),Uve=e=>Vu(zve(e.state.value),()=>null);function Wve({field:e,spec:t,locked:n,...r}){let[i,a]=(0,I.useState)(!1);return(0,R.jsxs)(WO,{children:[(0,R.jsx)(qN,{...r,name:t.name,disabled:n,type:i?`text`:`password`,autoComplete:`off`,spellCheck:!1,className:`caps-field-secret`,placeholder:t.placeholder,readOnly:t.readOnly,value:QN(e),onBlur:e.handleBlur,onChange:t=>{e.handleChange(t.currentTarget.value)}}),(0,R.jsx)(yE,{type:`button`,variant:`outline`,size:`icon`,"aria-label":i?`Hide`:`Show`,"aria-pressed":i,disabled:n,onClick:()=>{a(e=>!e)},children:i?(0,R.jsx)(Ape,{"aria-hidden":`true`}):(0,R.jsx)(jpe,{"aria-hidden":`true`})})]})}var Gve={text:`text`,email:`email`,url:`url`,tel:`tel`};function Kve({spec:e,field:t,locked:n,...r}){let i=Hve(t),a=n||e.readOnly===!0,o=(0,I.useRef)(null);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-sm`,children:[(0,R.jsx)(JC,{asChild:!0,children:(0,R.jsx)(`input`,{...r,ref:o,type:`file`,tabIndex:-1,required:r.required===!0&&i.length===0,name:e.name,accept:e.accept,multiple:e.multiple,disabled:a,onBlur:t.handleBlur,onChange:e=>{t.handleChange(Array.from(e.currentTarget.files??[])),e.currentTarget.value=``}})}),(0,R.jsx)(yE,{type:`button`,variant:`outline`,"aria-label":`Choose files for ${e.label}`,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],disabled:a,onBlur:t.handleBlur,onClick:()=>{o.current?.click()},children:`Choose files`}),(0,R.jsx)(kme,{items:i.map((e,t)=>({id:String(t),name:e.name,preview:{kind:`file`},progress:0,progressLabel:`${String(e.size)} bytes`,statusLabel:`Selected`,actions:a?{}:{remove:{label:`Remove`,accessibleLabel:`Remove ${e.name}`}}})),onRemove:e=>{t.handleChange(i.filter((t,n)=>String(n)!==e))},onCancel:()=>void 0,onRetry:()=>void 0})]})}function qve({spec:e,field:t,locked:n,...r}){let i=e=>{t.handleChange(e)},a={...r,name:e.name,disabled:n,onBlur:t.handleBlur};switch(e.kind){case`text`:case`email`:case`url`:case`tel`:return(0,R.jsx)(qN,{...a,type:Gve[e.kind],inputMode:e.kind===`text`?void 0:e.kind,autoComplete:e.autoComplete,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:QN(t),onChange:e=>{i(e.currentTarget.value)}});case`textarea`:return(0,R.jsx)(Nve,{...a,rows:e.rows??3,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:QN(t),onChange:e=>{i(e.currentTarget.value)}});case`secret`:return(0,R.jsx)(Wve,{...r,field:t,spec:e,locked:n});case`money`:return(0,R.jsxs)(WO,{children:[(0,R.jsx)(GO,{className:`caps-field-currency`,children:e.currency??`USD`}),(0,R.jsx)(qN,{...a,inputMode:`decimal`,autoComplete:`off`,className:`caps-field-amount`,placeholder:e.placeholder??`0.00`,readOnly:e.readOnly,value:QN(t),onChange:e=>{i(e.currentTarget.value)}})]});case`date`:return(0,R.jsx)(qN,{...a,type:`date`,readOnly:e.readOnly,value:QN(t),onChange:e=>{i(e.currentTarget.value)}});case`number`:return(0,R.jsx)(Dme,{...a,...e.min===void 0?{}:{min:e.min},...e.max===void 0?{}:{max:e.max},...e.step===void 0?{}:{step:e.step},...e.unit===void 0?{}:{unit:e.unit},...e.wrap===void 0?{}:{wrap:e.wrap},disabled:n||e.readOnly===!0,decrementLabel:`Decrease ${e.label}`,incrementLabel:`Increase ${e.label}`,value:Bve(t),onValueChange:e=>{t.handleChange(e)}});case`select`:return(0,R.jsxs)(Ave,{...a,value:QN(t),onChange:e=>{i(e.currentTarget.value)},children:[e.placeholder===void 0?null:(0,R.jsx)(`option`,{value:``,disabled:!0,children:e.placeholder}),e.options.map(e=>(0,R.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]});case`combobox`:return(0,R.jsx)(Sve,{id:r.id??e.name,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],"aria-required":r[`aria-required`],items:e.options,getKey:e=>e.value,getLabel:e=>e.label,isDisabled:t=>t.disabled||n||e.readOnly===!0,value:QN(t),...e.placeholder===void 0?{}:{placeholder:e.placeholder},trigger:(0,R.jsx)(bve,{name:e.name,disabled:n||e.readOnly===!0,onBlur:t.handleBlur,children:e.options.find(e=>e.value===QN(t))?.label??e.placeholder??`Choose…`}),inputProps:{"aria-label":`Search ${e.label}`,disabled:n||e.readOnly===!0},onValueChange:e=>{i(e??``),t.handleBlur()}});case`file`:return(0,R.jsx)(Kve,{...r,spec:e,field:t,locked:n});case`checkbox`:return(0,R.jsx)($O,{...a,disabled:n||e.readOnly===!0,checked:$N(t),onChange:e=>{t.handleChange(e.currentTarget.checked)}});case`switch`:return(0,R.jsx)(Mve,{...a,disabled:n||e.readOnly===!0,checked:$N(t),onCheckedChange:e=>{t.handleChange(e)}});case`radio`:case`icon-radio`:case`checkboxes`:case`icon-checkboxes`:return null}}var Jve=new Set([`radio`,`icon-radio`,`checkboxes`,`icon-checkboxes`]);function Yve({spec:e,field:t,locked:n,error:r,layout:i}){let a=n||e.readOnly===!0,o=e.label;if(e.kind===`checkboxes`||e.kind===`icon-checkboxes`){let n=Vve(t),s=(e,r)=>{t.handleChange(r?[...n,e]:n.filter(t=>t!==e))};return(0,R.jsx)(qO,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:e.kind===`icon-checkboxes`?(0,R.jsx)(`div`,{className:`caps-field-icon-choices`,children:e.options.map(r=>(0,R.jsx)(Cve,{name:e.name,value:r.value,label:r.label,...r.caption===void 0?{}:{caption:r.caption},icon:r.icon,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))}):(0,R.jsx)(Tve,{children:e.options.map(r=>(0,R.jsx)(wve,{name:e.name,value:r.value,label:r.label,icon:r.icon,hint:r.description,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))})})}let s=e.options.some(e=>e.description!==void 0||e.meta!==void 0);return(0,R.jsx)(qO,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:(0,R.jsx)(Dve,{name:e.name,"aria-label":o,value:QN(t),onValueChange:e=>{t.handleChange(e),t.handleBlur()},orientation:e.kind===`icon-radio`||s?`horizontal`:`vertical`,children:e.options.map(t=>e.kind===`icon-radio`?(0,R.jsx)(kve,{value:t.value,label:t.label,...t.caption===void 0?{}:{caption:t.caption},icon:t.icon,disabled:t.disabled},t.value):s?(0,R.jsx)(Ove,{value:t.value,title:t.label,description:t.description,meta:t.meta,disabled:t.disabled},t.value):(0,R.jsx)(JO,{label:t.label,orientation:`inline`,children:(0,R.jsx)(YN,{value:t.value,disabled:t.disabled})},t.value))})})}function Xve({spec:e,field:t,locked:n,error:r,render:i,...a}){return i({name:e.name,label:e.label,help:e.help,value:Uve(t),onChange:e=>{t.handleChange(e)},onBlur:t.handleBlur,error:r,disabled:n,id:a.id??e.name,"aria-describedby":a[`aria-describedby`],"aria-invalid":r!==void 0})}function Zve({form:e,spec:t,locked:n,layout:r}){let i=UO({form:e,name:t.name}),a=VO(e.store,e=>e.submissionAttempts>0),o=i.state.meta.isBlurred||a?hme(i.state.meta):void 0;if(t.render===void 0&&Jve.has(t.kind))return(0,R.jsx)(Yve,{spec:t,field:i,locked:n,error:o,layout:r});let s=r===`columns`?t.kind===`switch`||t.kind===`checkbox`?`horizontal`:`vertical`:t.kind===`checkbox`?`inline`:(t.layout??(t.kind===`switch`?`row`:`stacked`))===`row`?`horizontal`:`vertical`;return(0,R.jsx)(JO,{label:t.label,...r===`columns`?{labelTitle:t.label}:{},description:t.help,icon:t.icon,orientation:s,error:o,...t.required===void 0?{}:{required:t.required},...t.optional===void 0?{}:{optional:t.optional},children:t.render===void 0?(0,R.jsx)(qve,{spec:t,field:i,locked:n}):(0,R.jsx)(Xve,{spec:t,field:i,locked:n,error:o,render:t.render})})}var Qve=vg(Mg(Og,ZN));function eP({form:e,spec:t,locked:n,layout:r}){let i=t.when;return VO(e.store,e=>i===void 0||i(Vu(Qve(e.values),()=>({}))))?(0,R.jsx)(Zve,{form:e,spec:t,locked:n,layout:r}):null}function $ve({form:e,section:t,locked:n,layout:r}){let i=t.fields.map(t=>(0,R.jsx)(eP,{form:e,spec:t,locked:n,layout:r},t.name));return t.title===void 0?i:(0,R.jsx)(Sme,{title:t.title,description:t.description,layout:r,children:i})}function tP({model:e,names:t,disabled:n=!1,layout:r}){let i=e.form;return t===void 0?e.description.sections.map(e=>(0,R.jsx)($ve,{form:i,section:e,locked:n,layout:r},e.id??``)):t.map(t=>{let a=e.description.fields.find(e=>e.name===t);return a===void 0?null:(0,R.jsx)(eP,{form:i,spec:a,locked:n,layout:r},t)})}var nP=class{annotation;constructor(e){this.annotation=e}},eye=class{sections;constructor(e){this.sections=e}},rP=`caps/form`,iP=0;function aP(e){iP+=1;let t={[`${rP}:${String(iP)}`]:new nP(e)};return e.label!==void 0&&(t.title=e.label),e.help!==void 0&&(t.description=e.help),t}Og.annotate(aP({kind:`secret`})).pipe(Bg(`Secret`));var oP=e=>{let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)};function tye(e){return Object.values(e??{}).reduce((e,t)=>t instanceof nP?{...e,...t.annotation}:e,{})}function sP(e){return e.reduce((e,t)=>({...e,...tye(t)}),{})}function cP(e){let t=e?.[rP];return t instanceof eye?t.sections:{}}var lP=vg(Og);function uP(e){if(xm(e))return tee(lP(e.literal),{onNone:()=>null,onSome:e=>[e]});if(!Tm(e))return null;let t=[];for(let n of e.types){if(ym(n))continue;let e=uP(n);if(e===null)return null;t.push(...e)}return t}function dP(e){if(bm(e))return{type:`string`,literals:[]};if(vne(e))return{type:`number`,nullable:!1};if(yne(e))return{type:`boolean`};let t=uP(e);if(t!==null)return{type:`string`,literals:t};if(Cm(e)){let[t]=e.rest;if(t===void 0)return null;if(bm(t))return{type:`strings`,literals:[]};let n=uP(t);return n===null?null:{type:`strings`,literals:n}}if(Tm(e)){let t=e.types.filter(e=>!ym(e)&&!vm(e)),n=e.types.some(e=>vm(e)),[r]=t;if(t.length!==1||r===void 0)return null;let i=dP(r);return i?.type===`number`?{type:`number`,nullable:n}:n?null:i}return null}function nye(e){let t=e.ast;if(!wm(t))throw Error(`A schema form needs a Schema.Struct.`);return{fields:t.propertySignatures.map(e=>{let t=String(e.name),n=Rh(e.type),r=sP([e.type.annotations,...(e.type.checks??[]).map(e=>e.annotations)]),i=r.kind===`file`?{type:`files`}:dP(n);if(i===null)throw Error(`Schema field "${t}" has no form control. Annotate it with field({ render }) or a kind.`);return{name:t,valueType:i,optional:e.type.context?.isOptional===!0,annotation:r,title:$ne(e.type),description:ere(e.type)}}),sections:cP(Qne(t))}}function fP(e){let t=e,n=!1,r=!1;for(;;)if(t instanceof Oo)n=!0,t=t.unwrap();else if(t instanceof Mo)r=!0,t=t.unwrap();else if(t instanceof Po)t=t.unwrap();else if(t instanceof Ho)t=t.in;else return{node:t,optional:n,nullable:r}}function pP(e){if(e instanceof fo){let t=e.options.map(e=>pP(e));return t.some(e=>e===null)?null:t.flatMap(e=>e??[])}let t=e instanceof So?e.options:e instanceof wo?[...e.values]:null;if(t===null)return null;let n=t.map(e=>lP(e));return n.every(eee)?n.map(e=>e.value):null}function rye(e){let{node:t,nullable:n}=fP(e);if(t instanceof xa)return{type:`string`,literals:[]};if(t instanceof Ga)return{type:`number`,nullable:n};if(t instanceof Ya)return{type:`boolean`};let r=pP(t);if(r!==null)return{type:`string`,literals:r};if(t instanceof ao){let e=fP(t.element).node;if(e instanceof xa)return{type:`strings`,literals:[]};let n=pP(e);return n===null?null:{type:`strings`,literals:n}}return null}function mP(e){let t=[e];for(;;){let e=t[t.length-1];if(e===void 0)break;let n=e instanceof Oo||e instanceof Mo||e instanceof Po?e.unwrap():e instanceof Ho?e.in:e;if(n===e)break;t.push(n)}return t.reverse().map(e=>lr.get(e))}function hP(e){return mP(e).reduce((e,t)=>({...e,...t}),{})}function iye(e){return Object.entries(e.shape)}function aye(e){let t=fP(e).node;if(!(t instanceof so))throw Error(`A schema form needs a z.object.`);return{fields:iye(t).map(([e,t])=>{let n=sP(mP(t)),r=n.kind===`file`?{type:`files`}:rye(t);if(r===null)throw Error(`Schema field "${e}" has no form control. Annotate it with field({ render }) or a kind.`);let i=hP(t);return{name:e,valueType:r,optional:fP(t).optional,annotation:n,title:i.title,description:i.description}}),sections:cP(hP(e))}}function oye(e,t){let n=t.options??{};return(e.length>0?e:Object.keys(n)).map(e=>{let t=n[e],r=t===void 0?{}:t instanceof Object?t:{label:t};return{value:e,label:r.label??oP(e),description:r.description,meta:r.meta,icon:r.icon,caption:r.caption,disabled:r.disabled===!0}})}function sye(e,t){let n=t.some(e=>e.icon!==void 0);switch(e.type){case`boolean`:return`switch`;case`number`:return`number`;case`strings`:return n?`icon-checkboxes`:`checkboxes`;case`files`:return`file`;case`string`:return t.length===0?`text`:t.length>12?`combobox`:n?`icon-radio`:t.some(e=>e.description!==void 0||e.meta!==void 0)||t.length<=3?`radio`:`select`}}function cye(e,t){switch(e.type){case`boolean`:return!1;case`number`:return e.nullable?null:0;case`strings`:case`files`:return[];case`string`:return t[0]?.value??``}}function lye(e){let t=e instanceof ya?aye(e):nye(e),n=t.fields.map((e,t)=>{let{kind:n,...r}=e.annotation,i=oye(e.valueType.type===`string`||e.valueType.type===`strings`?e.valueType.literals:[],e.annotation),a=r.help??e.description;return{...r,name:e.name,label:r.label??e.title??oP(e.name),help:a,kind:n??sye(e.valueType,i),options:i,optionalInSchema:e.optional,index:t}}),r={};t.fields.forEach((e,t)=>{let i=n[t];i&&(r[e.name]=cye(e.valueType,i.options))});let i=e=>e.order??e.index,a=e=>e.section!==void 0&&Object.hasOwn(t.sections,e.section)?e.section:null,o=e=>n.filter(t=>a(t)===e).sort((e,t)=>i(e)-i(t)),s=Object.entries(t.sections).map(([e,t])=>({id:e,title:t.title,description:t.description,fields:o(e)}));return{fields:n,sections:[{id:null,title:void 0,description:void 0,fields:o(null)},...s].filter(e=>e.fields.length>0),defaults:r}}function gP(e){let t=e instanceof ya?e:hg(e);return{"~standard":{...t[`~standard`],validate:e=>{let n=t[`~standard`].validate(e);return n instanceof Promise?n.then(e=>_P(e)):_P(n)}}}}function _P(e){return e.issues===void 0?e:{issues:e.issues.map(e=>e.path===void 0?e:{...e,path:e.path.slice(0,1)})}}var vP=`onServer`;function yP(e){let t=e.querySelector(`[aria-invalid="true"]`),n=t?.matches(`input, select, textarea, button, [tabindex]`)?t:t?.querySelector(`input, select, textarea, button`);return n?.focus(),n!=null}function uye(e){if(yP(e))return()=>void 0;let t=new MutationObserver(()=>{yP(e)&&t.disconnect()});return t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-invalid`]}),()=>{t.disconnect()}}function dye(e){return e.state.meta.errorMap.onServer!==void 0}function fye(e){e.setMeta(e=>({...e,errorMap:{...e.errorMap,[vP]:void 0}}))}function pye(e,t,n){e.setFieldMeta(t,e=>({...e,isBlurred:!0,errorMap:{...e.errorMap,[vP]:n}}))}function bP(e){let[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(e.defaultValues),[s,c]=(0,I.useState)(null);uO(a,e.defaultValues)||(o(e.defaultValues),c(null));let{schema:l}=e,u=(0,I.useMemo)(()=>lye(l),[l]),d=(0,I.useMemo)(()=>gP(l),[l]),f=fme({defaultValues:s??a,validators:{onChange:d,onSubmit:d},listeners:{onChange:({fieldApi:e})=>{n(null),i(null),dye(e)&&fye(e)}},onSubmit:async({value:t,formApi:r})=>{n(null),i(null);let a=await gP(l)[`~standard`].validate(t);if(a.issues){n(a.issues[0]?.message??`Check the form and try again.`);return}let o;try{o=await e.onSubmit(a.value,t)??{kind:`saved`}}catch(t){console.error(`SchemaForm submit failed`,t),n(e.failure??`Couldn't save changes. Try again.`);return}if(o.kind===`refused`){n(o.error??null);let e=r;for(let[t,n]of Object.entries(o.fields??{}))n!==void 0&&n.length>0&&pye(e,t,n);return}let s=o.values??t;c(s),r.reset(s),i(o.message??`Saved`),e.onSaved?.(s)}});return{description:u,form:f,error:t,saved:r,discard:()=>{n(null),i(null),f.reset()},submit:()=>f.handleSubmit()}}function xP(e){return{dirty:VO(e.form.store,e=>!e.isDefaultValue),submitting:VO(e.form.store,e=>e.isSubmitting),canSubmit:VO(e.form.store,e=>e.canSubmit)}}function SP({model:e,submitLabel:t=`Save changes`,discardLabel:n,onCancel:r,cancelLabel:i,allowClean:a,layout:o,footer:s,children:c,disabled:l=!1,...u}){let{submitting:d}=xP(e),f=(0,I.useRef)(null),p=(0,I.useRef)(()=>void 0);return(0,I.useEffect)(()=>()=>{p.current()},[]),(0,R.jsxs)(bme,{...u,ref:f,layout:o,busy:d,noValidate:!0,onSubmit:t=>{t.preventDefault(),e.form.state.isSubmitting||e.submit().then(()=>{p.current();let t=f.current;t!==null&&!e.form.state.isValid&&(p.current=uye(t))})},children:[c??(0,R.jsx)(tP,{model:e,disabled:l,layout:o}),s===void 0?(0,R.jsx)(hye,{model:e,label:t,discardLabel:r===void 0?n:void 0,onCancel:r,cancelLabel:i,allowClean:a??r!==void 0,divider:r===void 0}):s]})}function mye({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i,...a}){let o=bP({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i});return(0,R.jsx)(SP,{...a,model:o})}function CP(e){return`model`in e?(0,R.jsx)(SP,{...e}):(0,R.jsx)(mye,{...e})}function hye({model:e,label:t,discardLabel:n,onCancel:r,cancelLabel:i=`Cancel`,allowClean:a=!1,dirtyLabel:o=`Unsaved changes`,buttonProps:s,...c}){let{dirty:l,submitting:u}=xP(e),d=u?null:e.saved&&!l?(0,R.jsx)(VE,{tone:`success`,size:`compact`,label:e.saved}):l?(0,R.jsx)(VE,{tone:`neutral`,size:`compact`,label:o}):null;return(0,R.jsxs)(yme,{...c,error:e.error,status:d,children:[r?(0,R.jsx)(yE,{type:`button`,variant:`ghost`,disabled:u,onClick:r,children:i}):n&&l?(0,R.jsx)(yE,{type:`button`,variant:`ghost`,disabled:u,onClick:e.discard,children:n}):null,(0,R.jsx)(yE,{...s,type:`submit`,loading:u,disabled:u||!l&&!a,title:!l&&!a?`No changes to save`:void 0,children:t})]})}var wP=new Set([`Enter`,` `]),gye=(0,I.forwardRef)(function({children:e,onConfirm:t,holdMs:n=900,holdHint:r=`Press and hold to confirm.`,className:i,disabled:a,loading:o=!1,result:s,resultLabel:c,onBlur:l,onKeyDown:u,onKeyUp:d,onPointerDown:f,onPointerUp:p,onPointerLeave:m,onPointerCancel:h,...g},_){let v=(0,I.useRef)(null),y=(0,I.useRef)(null),b=(0,I.useRef)(null),x=(0,I.useRef)(null),S=(0,I.useRef)(t),C=(0,I.useId)();(0,I.useEffect)(()=>{S.current=t},[t]),(0,I.useEffect)(()=>()=>{y.current?.cancel(),b.current!==null&&clearTimeout(b.current)},[]);let w=()=>{y.current=null,b.current=null,x.current=null,S.current();let e=v.current;if(!e||!GC(e))return;let t=VC(e);e.animate([{opacity:1},{opacity:0}],{duration:t.normal,easing:WC(t,t.easeExit)})},T=e=>{let t=v.current;if(a===!0||o||!t||y.current||b.current)return;if(x.current=e,!GC(t)){b.current=setTimeout(w,n);return}let r=VC(t),i=t.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:n,easing:r.reduced?`steps(3, end)`:WC(r,`cubic-bezier(0.3, 0, 0.7, 1)`)});i.addEventListener(`finish`,w),y.current=i},E=e=>{if(e!==void 0&&x.current!==e)return;x.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);let t=y.current,n=v.current;if(!t||!n)return;y.current=null;let r=getComputedStyle(n).transform;t.cancel();let i=VC(n);n.animate([{transform:r===`none`?`scaleY(0)`:r},{transform:`scaleY(0)`}],{duration:i.fast,easing:WC(i,i.ease)})};return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(yE,{...g,ref:_,disabled:a,loading:o,result:s,resultLabel:c??(s===void 0?void 0:e),"aria-describedby":C,className:RC(`caps-hold-button`,i),onBlur:e=>{E(),l?.(e)},onPointerDown:e=>{f?.(e),e.button===0&&T(e.pointerId)},onPointerUp:e=>{p?.(e),E(e.pointerId)},onPointerLeave:e=>{m?.(e),E(e.pointerId)},onPointerCancel:e=>{h?.(e),E(e.pointerId)},onKeyDown:e=>{u?.(e),e.key===`Escape`&&E(),wP.has(e.key)&&(e.preventDefault(),e.repeat||T(`key`))},onKeyUp:e=>{d?.(e),wP.has(e.key)&&(e.preventDefault(),E(`key`))},children:[(0,R.jsx)(`span`,{ref:v,"aria-hidden":`true`,className:`caps-hold-fill`}),e]}),(0,R.jsx)(JC,{id:C,children:r})]})}),TP=(0,I.forwardRef)(function({className:e,...t},n){return(0,R.jsx)(`code`,{...t,className:RC(`caps-inline-code`,e),ref:n})}),_ye={neutral:`alert-neutral`,primary:`alert-primary`,secondary:`alert-secondary`,accent:`alert-accent`,success:`alert-success`,info:`alert-info`,warning:`alert-warning`,error:`alert-error`},EP=(0,I.forwardRef)(function({action:e,children:t,className:n,description:r,title:i,tone:a=`neutral`,...o},s){return(0,R.jsxs)(`div`,{...o,className:RC(`alert caps-alert`,_ye[a],n),"data-tone":a,role:o.role??`alert`,ref:s,children:[(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i?(0,R.jsx)(`h3`,{className:`font-semibold`,children:i}):null,r?(0,R.jsx)(`p`,{className:`text-sm`,children:r}):null,t]}),e?(0,R.jsx)(`div`,{className:`shrink-0`,children:e}):null]})}),vye=8e3,DP=(0,I.forwardRef)(function({className:e,detail:t,framed:n=!0,icon:r,message:i,onRetry:a,size:o=`md`,slowAfterMs:s=vye,variant:c=`line`,...l},u){let[d,f]=(0,I.useState)(!1);return(0,I.useEffect)(()=>{if(f(!1),!Number.isFinite(s))return;let e=globalThis.setTimeout(()=>{f(!0)},s);return()=>{globalThis.clearTimeout(e)}},[s,i]),(0,R.jsxs)(`div`,{...l,className:RC(`caps-loading-state`,e),"data-framed":n?void 0:`false`,"data-icon":r?``:void 0,"data-size":o,"data-slow":d||void 0,ref:u,role:`status`,children:[r?(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`caps-loading-state-icon`,children:r}):null,(0,R.jsx)(_E,{decorative:!0,size:o,variant:c}),(0,R.jsxs)(`span`,{className:`caps-loading-state-copy`,children:[(0,R.jsx)(`span`,{children:i}),t?(0,R.jsx)(`span`,{className:`caps-loading-state-detail`,children:t}):null,d?(0,R.jsx)(`span`,{className:`caps-loading-state-detail`,children:`Still working…`}):null]}),d&&a?(0,R.jsx)(yE,{className:`caps-loading-state-retry`,size:`sm`,variant:`outline`,onClick:a,children:`Retry`}):null]})}),OP=(0,I.forwardRef)(function({className:e,count:t,density:n=`row`,dismissAriaLabel:r,dismissLabel:i=`Dismiss`,message:a,onDismiss:o,onRetry:s,retryAriaLabel:c,retryLabel:l=`Retry`,role:u=`status`,...d},f){return(0,R.jsxs)(`div`,{...d,className:RC(`caps-failure-line`,e),"data-density":n,ref:f,role:u,children:[(0,R.jsx)(VE,{glyph:`dot`,tone:`error`}),(0,R.jsxs)(`span`,{className:`caps-failure-line-copy`,children:[(0,R.jsx)(`span`,{children:a}),t!==void 0&&t>1?(0,R.jsxs)(`span`,{className:`caps-failure-line-count`,children:[`Failed `,t,` times`]}):null]}),s||o?(0,R.jsxs)(`span`,{className:`caps-failure-line-actions`,children:[s?(0,R.jsx)(yE,{"aria-label":c,size:`sm`,variant:`outline`,onClick:s,children:l}):null,o?(0,R.jsx)(yE,{"aria-label":r,size:`sm`,variant:`ghost`,onClick:o,children:i}):null]}):null]})}),kP=`data-reorder-key`;function yye(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{element:t,top:r.top-n.top+e.scrollTop,left:r.left-n.left+e.scrollLeft,width:r.width,height:r.height}}function bye(e,t,n){e.forEach((e,r)=>{e.animate(t.reduced?[{opacity:0},{opacity:1}]:[{opacity:0,transform:`translateY(${String(t.distance)}px)`},{opacity:1,transform:`none`}],{duration:t.normal,delay:n+r*t.stagger,easing:WC(t,t.ease),fill:`backwards`})})}function xye(e,t,n){let r=t.element.cloneNode(!0);if(!(r instanceof HTMLElement))return;r.removeAttribute(kP),r.removeAttribute(`id`),r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`inert`,``),Object.assign(r.style,{position:`absolute`,top:`${String(t.top-e.clientTop)}px`,left:`${String(t.left-e.clientLeft)}px`,width:`${String(t.width)}px`,height:`${String(t.height)}px`,margin:`0`,pointerEvents:`none`});let i=getComputedStyle(e).position!==`static`;i||(e.style.position=`relative`),e.append(r);let a=r.animate(n.reduced?[{opacity:1},{opacity:0}]:[{opacity:1,transform:`none`},{opacity:0,transform:`translateY(${String(-n.distance)}px)`}],{duration:n.fast,easing:WC(n,n.easeExit),fill:`forwards`}),o=()=>{r.remove(),!i&&e.querySelector(`:scope > [inert]`)===null&&e.style.removeProperty(`position`)};a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o)}function Sye(e,t,n,r){let i=e.style.overflow;e.style.overflow=`clip`;let a=e.animate([{height:`${String(t)}px`},{height:`${String(n)}px`}],r),o=()=>{e.style.overflow=i};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a}function Cye(e,t){let n=(0,I.useRef)(null),r=(0,I.useRef)(0),i=(0,I.useRef)(null),a=t.join(`\0`);(0,I.useLayoutEffect)(()=>{let o=e.current;if(o===null){n.current=null;return}let s=n.current,c=s?.order!==a,l=i.current?o.getBoundingClientRect().height:r.current;c&&(i.current?.cancel(),i.current=null);let u=c?o.getBoundingClientRect().height:r.current;r.current=u;let d=new Map;for(let e of o.querySelectorAll(`:scope [${kP}]`)){let t=e.getAttribute(kP);if(t===null)continue;let n=s?.rows.get(t);d.set(t,!c&&n?.element===e?n:yye(o,e))}let f=new Set(t);if(n.current={order:a,keys:f,rows:d},s===null||!c||!GC(o))return;let p=VC(o),m=[...s.rows].filter(([e,t])=>!f.has(e)&&!t.element.isConnected),h={duration:p.slow,delay:m.length>0?p.fast:0,easing:WC(p,p.ease),fill:`backwards`},g=[],_=[];for(let[e,t]of d){let n=s.rows.get(e);if(n===void 0){s.keys.has(e)||g.push(t.element);continue}let r=n.left-t.left,i=n.top-t.top;(r!==0||i!==0)&&(_.push(t.element),!(p.reduced||p.slow<=0)&&t.element.animate([{transform:`translate(${String(r)}px, ${String(i)}px)`},{transform:`none`}],h))}if(p.reduced)for(let e of _)e.animate([{opacity:.3},{opacity:1}],{duration:p.fast,easing:p.ease});else for(let[,e]of m)xye(o,e,p);if(bye(g,p,_.length>0&&!p.reduced?p.fast:0),!p.reduced&&Math.abs(l-u)>.5){let e=Sye(o,l,u,h);i.current=e,e.addEventListener(`finish`,()=>{i.current===e&&(i.current=null)})}})}var AP=(0,I.createContext)(null);function jP(){let e=(0,I.useContext)(AP);if(!e)throw Error(`Shed data requires a workspace provider`);return e}function MP({label:e,order:t,children:n,listRoot:r}){let i=(0,I.useRef)(null),a=r??i;return Cye(a,t),(0,R.jsx)(`div`,{ref:a,children:(0,R.jsx)(Bpe,{role:`list`,"aria-label":e,children:n})})}var wye=L({command:e_.pipe(zg(Qg(16384))).annotate(aP({label:`Command`,required:!0,placeholder:`pnpm dev`})),port:Lg(YS.fields.port).annotate(aP({label:`Port (optional)`,help:`Web server preview only.`,min:1,max:65535,render:e=>(0,R.jsx)(qN,{name:e.name,id:e.id,type:`number`,inputMode:`numeric`,placeholder:`5173`,min:1,max:65535,step:1,value:e.value??``,disabled:e.disabled,"aria-describedby":e[`aria-describedby`],"aria-invalid":e[`aria-invalid`],onBlur:()=>{e.onBlur()},onChange:t=>{let n=t.currentTarget;e.onChange(n.value===``?null:n.valueAsNumber)}})}))}),Tye=[{command:`pwd`,label:`Folder`,port:null},{command:`ls`,label:`Files`,port:null},{command:`echo hello`,label:`Hello`,port:null}];function NP({openPreview:e,processNavigation:t}){let{ports:{items:n},processes:{items:r,loading:i,error:a,fix:o,refresh:s,actions:c,stop:l,start:u,output:d,unavailableReason:f}}=jP(),p=(0,I.useRef)(null),m=(0,I.useRef)(null),h=(0,I.useRef)(null),g=(0,I.useRef)(null),_=(0,I.useRef)(0),[v,y]=(0,I.useState)(null),b=e=>{Date.now()-_.current<900&&y(e)},x=(0,I.useRef)(null);(0,I.useEffect)(()=>{if(!t||x.current===t.requestId||!p.current)return;let e=[...p.current.querySelectorAll(`[${kP}]`)].find(e=>e.getAttribute(kP)===t.processId);e&&(e.focus(),x.current=t.requestId)},[t,r]);let S=d?.processId??null,C=d?.data!==null;(0,I.useEffect)(()=>{S!==null&&C&&h.current?.scrollIntoView({block:`start`})},[S,C]);let w=d?.data?.lines.length??0,T=d?.data?.process.state===`running`;(0,I.useEffect)(()=>{let e=m.current;T&&e&&(e.scrollTop=e.scrollHeight)},[T,w]);let E=bP({schema:wye,defaultValues:{command:``,port:null},onSubmit:async({command:e,port:t})=>await u?.(t===null?{command:e}:{command:e,port:t})?{kind:`saved`}:{kind:`refused`,fields:{command:`Couldn’t confirm the process start. Try again.`}}}),D=r!==null||i||a!==null?i&&r===null?(0,R.jsx)(DP,{message:`Loading command history`,size:`sm`,framed:!1}):a!==null&&r===null?(0,R.jsx)(`div`,{className:`px-2 pb-3`,children:(0,R.jsx)(EP,{tone:a.reason===`failed`?`error`:`warning`,role:`status`,title:`Can't run commands`,description:a.message,action:o===void 0?void 0:(0,R.jsx)(yE,{size:`xs`,variant:`outline`,onClick:()=>void o(),children:a.action===`grant`?`Allow access`:`Try again`})})}):r===null||r.length===0?(0,R.jsx)(`div`,{className:`px-2 pb-3`,children:(0,R.jsx)(dD,{variant:`quiet`,visual:`blobs`,headingLevel:3,title:`Your first command starts here`,description:`Choose a starter above, then press Start. Output and past commands stay here.`})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`-mx-1`,children:(0,R.jsx)(MP,{label:`Computer process inventory`,order:r.map(({id:e})=>e),listRoot:p,children:r.map(t=>{let r=c?.get(t.id),i=t.state===`running`?n?.find(e=>e.port===t.port):void 0,a,o;t.state===`running`?(a=`success`,o=`Running`):t.state===`uncertain`?(a=`warning`,o=`Status unknown`):t.endedReason===`idle-sleep`?(a=`warning`,o=`Stopped when the Computer went to sleep`):t.exitCode===null?(a=`warning`,o=`Ended · exit not recorded`):(a=t.exitCode===0?`success`:`error`,o=`Exit ${String(t.exitCode)}`);let s=t.state===`exited`&&t.sync===`pending`;return(0,R.jsx)(PD,{[kP]:t.id,role:`listitem`,"data-process-state":t.state,"data-process-sync":t.sync,className:`py-2`,tabIndex:-1,primary:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(TP,{className:`block truncate`,"data-process-command":!0,children:t.command}),(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-xs font-normal`,children:[(0,R.jsx)(VE,{size:`compact`,tone:a,className:a===`error`?`text-error`:void 0,label:r===`stopping`?`Stopping`:o}),t.port===null?null:(0,R.jsxs)(`span`,{"data-process-port":!0,children:[`Port `,t.port]})]}),r===`failed`?(0,R.jsxs)(`span`,{role:`status`,className:`block whitespace-normal text-xs font-normal text-error`,children:[`Couldn't stop `,t.command,`. Try again.`]}):(0,R.jsxs)(R.Fragment,{children:[v===t.id?(0,R.jsx)(`span`,{role:`status`,className:`block text-xs font-normal text-(--stipe-fg-muted)`,children:`Hold to stop`}):null,s?(0,R.jsx)(`span`,{className:`block truncate text-xs font-normal text-(--stipe-fg-muted)`,children:`Changes still copying to your files`}):null,t.cwd===null?null:(0,R.jsx)(`span`,{className:`block truncate text-xs font-normal text-(--stipe-fg-muted)`,children:t.cwd})]})]}),actions:(0,R.jsxs)(R.Fragment,{children:[d?(0,R.jsx)(yE,{size:`sm`,variant:`ghost`,"aria-label":`Show output of ${t.command}`,onClick:()=>{d.select(t.id)},children:`Output`}):null,i?(0,R.jsxs)(yE,{size:`sm`,variant:`ghost`,"aria-label":`Open preview of port ${String(i.port)}`,onClick:()=>{e(i)},children:[(0,R.jsx)(kD,{size:14,"aria-hidden":`true`}),` Open`]}):null,t.state===`running`&&l?(0,R.jsx)(gye,{holdHint:`A stopped process cannot be resumed. Press and hold to stop it.`,size:`sm`,variant:`ghost`,className:`hover:text-error`,disabled:r===`stopping`,"aria-label":`Stop process ${t.command}`,onPointerDown:()=>{_.current=Date.now(),y(null)},onPointerUp:()=>{b(t.id)},onConfirm:()=>{y(null),l(t.id)},children:r===`stopping`?`Stopping…`:`Stop`}):null]})},t.id)})})}),i?(0,R.jsx)(DP,{message:`Refreshing processes…`,size:`sm`,framed:!1}):null,a===null?null:(0,R.jsx)(OP,{message:`Couldn't refresh processes. The list may be out of date.`,onRetry:s?()=>void s():void 0})]}):(0,R.jsx)(FD,{title:`Processes can't be listed yet`,children:`Allow Computer access to see and run commands.`});return(0,R.jsxs)(`div`,{className:`space-y-5 p-4 sm:p-6`,ref:g,children:[f?(0,R.jsx)(`p`,{role:`status`,className:`px-2 pt-3 text-sm`,children:f}):null,u&&(a===null||a.reason===`failed`)?(0,R.jsx)(E.form.Subscribe,{selector:e=>e.isSubmitting,children:e=>(0,R.jsxs)(`div`,{children:[(0,R.jsx)(CP,{model:E,"aria-label":`Start a process`,className:`space-y-3`,disabled:e||f!==void 0,footer:null,children:(0,R.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,R.jsx)(tP,{model:E,disabled:e||f!==void 0}),(0,R.jsx)(yE,{className:`sm:col-span-2 sm:justify-self-start`,type:`submit`,variant:`primary`,loading:e,disabled:e||f!==void 0,onClick:()=>{E.form.setFieldMeta(`command`,e=>({...e,errorMap:{...e.errorMap,onServer:void 0}}))},children:`Start`})]})}),(0,R.jsx)(`ul`,{"aria-label":`Try one of these`,className:`m-0 mt-3 flex list-none flex-wrap gap-2 p-0`,children:Tye.map(t=>(0,R.jsx)(`li`,{children:(0,R.jsxs)(yE,{size:`sm`,variant:`outline`,disabled:e||f!==void 0,title:t.command,onClick:()=>{E.form.setFieldValue(`command`,t.command),E.form.setFieldValue(`port`,t.port),g.current?.querySelector(`input[name="command"]`)?.focus()},children:[t.label,` `,(0,R.jsx)(TP,{children:t.command})]})},t.command))})]})}):null,d?.processId?(0,R.jsxs)(`section`,{ref:h,"aria-label":`Process output`,className:`space-y-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(`span`,{className:`min-w-0 break-words font-mono text-sm font-semibold`,children:d.data?.process.command??`Process output`}),(0,R.jsx)(yE,{size:`xs`,variant:`ghost`,onClick:()=>{d.select(null)},children:`Close output`})]}),d.failed?(0,R.jsx)(OP,{message:`Couldn't read command output.`,onRetry:()=>void d.retry()}):d.loading?(0,R.jsx)(DP,{size:`sm`,message:`Loading output`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(KE,{children:(0,R.jsx)(`pre`,{ref:m,className:`max-h-48 overflow-auto whitespace-pre-wrap break-all p-3 text-xs`,children:d.data?.lines.length===0?d.data.process.state===`exited`?`Finished without output.`:`No output yet.`:d.data?.lines.join(`
95
+ const term = new Terminal({ ghostty });`)}var US;function WS(){return US??=wle.load(),US}var Ule=[``,`bold `,`italic `,`bold italic `];async function GS(e,t){await Promise.all(Ule.map(n=>document.fonts.load(`${n}${String(e)}px ${t}`)))}var Wle=L({path:Og,entries:Ng(L({name:Og,type:Ig([`file`,`directory`,`symlink`]),size:kg,modifiedAt:kg})),nextOffset:Lg(kg)}),Gle=bS(`computer.list`,1,qo(()=>xS({list:CS(SS(eo().transform(e=>bg(Wle)(e))))}))),KS=Fg([L({state:Ig([`running`,`sleeping`,`starting`,`start_failed`])}),L({state:wg(`queued`),position:kg.pipe(zg(Yg()),zg(Kg(0)))})]),qS=L({enabled:Ag,effective:Ag,blockedBy:Lg(Ig([`team`,`global`]))}),Kle=L({computerId:e_,name:e_,runtime:KS,backends:Ng(L({id:e_,kind:Ig([`platform-container`,`on-box-vm`,`local`]),status:Ig([`ready`,`queued`,`online`,`offline`]),queuePosition:Lg(kg.pipe(zg(Yg()),zg(Kg(0)))),hostId:Lg(Og),hostLabel:Lg(Og),folderLabel:Lg(Og),detachable:Ag})),internet:qS});bS(`computer.instrument.read`,1,qo(()=>xS({read:CS(SS(eo().transform(e=>bg(Kle)(e))))}))),bS(`computer.instrument.control`,1,qo(()=>xS({start:CS(SS(eo().transform(e=>bg(KS)(e)))),setInternetAccess:CS(SS(eo().transform(e=>bg(qS)(e)))),detachLocal:CS(SS(eo().transform(e=>bg(L({detached:Ag}))(e))))})));var JS=Fg([L({ports:Ng(L({port:kg.pipe(zg(Yg()),zg(Jg({minimum:1,maximum:65535}))),previewUrl:e_,openMode:Ig([`inline`,`external-only`]),expiresAt:kg.pipe(zg(Yg()),zg(Kg(0)))})).pipe(zg(Qg(64)))}),L({error:wg(`port_previews_not_configured`)})]),YS=L({port:kg.annotate({message:`Use a port from 1 to 65535.`}).check(Yg({message:`Use a port from 1 to 65535.`}),Jg({minimum:1,maximum:65535},{message:`Use a port from 1 to 65535.`})),exposed:Ag}),qle=L({port:kg.pipe(zg(Yg()),zg(Jg({minimum:1,maximum:65535}))),removed:Ag}),XS=bS(`computer.ports`,2,qo(()=>xS({list:CS(SS(eo().transform(e=>bg(JS)(e)))),expose:CS(SS(eo().transform(e=>bg(YS)(e)))),unexpose:CS(SS(eo().transform(e=>bg(qle)(e))))})));async function Jle(e){let t=bg(JS)(await e.require(XS).list());if(`error`in t)return t;for(let{previewUrl:e,expiresAt:n}of t.ports){let t=new URL(e);if(t.protocol!==`https:`||t.username||t.password||n<=Date.now())throw Error(`Computer preview URL is invalid`)}return t}var Yle=Ig([`synced`,`pending`,`unknown`]),ZS=L({port:Lg(YS.fields.port),id:e_,command:e_,cwd:Lg(Og),startedAt:kg.pipe(zg(Yg()),zg(qg(0))),state:Ig([`running`,`exited`,`uncertain`]),exitCode:Lg(kg.pipe(zg(Yg()))),sync:Yle,endedAt:Lg(kg.pipe(zg(Yg()),zg(qg(0)))),endedReason:Lg(wg(`idle-sleep`))}),Xle=L({processes:Ng(ZS)}),Zle=L({process:ZS,signalled:Ag}),Qle=L({process:ZS,lines:Ng(Og.pipe(zg(Qg(2e3)))).pipe(zg(Qg(200))),truncated:Ag});L({requestId:e_.pipe(zg(Qg(256))),command:e_.pipe(zg(Qg(16384))),cwd:Sg(Og),port:Sg(YS.fields.port)});var QS=bS(`computer.processes`,1,qo(()=>xS({start:CS(SS(eo().transform(e=>bg(ZS)(e)))),list:CS(SS(eo().transform(e=>bg(Xle)(e)))),kill:CS(SS(eo().transform(e=>bg(Zle)(e)))),logs:CS(SS(eo().transform(e=>bg(Qle)(e))))})));function $le(e){let t=Hre(e);return t.action===`setup`?{reason:`no-runtime`,message:`No Computer is running to answer this yet.`,action:`setup`}:t.action===`grant`?{reason:`not-granted`,message:`This App needs permission to see this Computer.`,action:`grant`}:{reason:`failed`,message:t.message,action:`retry`}}var eue=bS(`computer.readFile`,1,qo(()=>xS({open:CS(xS({response:CS(ns(Response)),close:wS}))}))),tue=bS(`computer.writeFile`,3,qo(()=>xS({open:CS(xS({write:wS,close:wS})),mkdir:wS,replace:CS(SS(eo().transform(e=>bg(nue)(e))))}))),nue=Fg([L({kind:wg(`replaced`),path:e_,bytes:kg.pipe(zg(Yg()),zg(qg(0)))}),L({kind:wg(`conflict`)})]),$S=L({computerName:e_.pipe(zg(Qg(256))),teamName:e_.pipe(zg(Qg(256))),modelDoor:e_.pipe(zg(Qg(256))),uptimeSeconds:kg.pipe(zg(Yg()),zg(qg(0))),version:e_.pipe(zg(Qg(64)))}),eC=bS(`computer.terminal`,2,qo(()=>xS({open:CS(xS({information:CS(SS(eo().transform(e=>bg($S)(e)))),output:CS(ns(ReadableStream).transform(e=>e.pipeThrough(new TransformStream({transform(e,t){t.enqueue(ns(Uint8Array).parse(e))}})))),input:CS(ns(WritableStream)),resize:wS,close:wS}))})));async function rue(e,t,n={}){n.signal?.throwIfAborted();let r=await e.require(eC).open(t),i,a=()=>i===void 0?(n.signal?.removeEventListener(`abort`,o),i=Promise.resolve().then(async()=>{try{await r.close()}finally{r[Symbol.dispose]()}}),i):i,o=()=>{a().catch(e=>{nv(`computer.terminal.abort-close`,e)})};n.signal?.addEventListener(`abort`,o,{once:!0});try{let[e,t,o]=await Promise.all([r.output(),r.input(),r.information()]);n.signal?.throwIfAborted();let s=e,c=t;return{information:bg($S)(o),output:s,input:c,resize:async e=>{if(n.signal?.throwIfAborted(),i!==void 0)throw Error(`Computer terminal is closed`);await r.resize(e)},close:a}}catch(e){throw await a().catch(e=>{nv(`computer.terminal.open-cleanup`,e)}),e}}function tC(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function iue(...e){return t=>{let n=!1,r=e.map(e=>{let r=tC(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():tC(e[t],null)}}}}function aue(...e){return I.useCallback(iue(...e),e)}function oue(e){let t=I.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];rC(r)&&typeof iC==`function`&&(r=iC(r._payload)),I.Children.forEach(r,e=>{if(due(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;rC(n)&&typeof iC==`function`&&(n=iC(n._payload)),a=cue(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=I.cloneElement(a,void 0,s):!o&&I.Children.count(r)===1&&I.isValidElement(r)&&(a=r);let c=a?uue(a):void 0,l=aue(n,c);if(!a){if(r||r===0)throw Error(o?hue(e):mue(e));return r}let u=lue(i,a.props??{});return a.type!==I.Fragment&&(u.ref=n?l:c),I.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var nC=oue(`Slot`),sue=Symbol.for(`radix.slottable`),cue=(e,t)=>{if(`child`in e.props){let t=e.props.child;return I.isValidElement(t)?I.cloneElement(t,void 0,e.props.children(t.props.children)):null}return I.isValidElement(t)?t:null};function lue(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function uue(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function due(e){return I.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===sue}var fue=Symbol.for(`react.lazy`);function rC(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===fue&&`_payload`in e&&pue(e._payload)}function pue(e){return typeof e==`object`&&!!e&&`then`in e}var mue=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,hue=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,iC=I.use,gue=Object.freeze({alphaIntercept:-9,alphaSlope:19,blurStdDeviation:1.5}),_ue=Object.freeze({background:`#eff1f5`,foreground:`#4c4f69`,cursor:`#4c4f69`,cursorAccent:`#eff1f5`,surface:`#ccd0da`,selectionBackground:`#4c4f69`,selectionForeground:`#eff1f5`,primary:`#f98284`,accent:`#ea76cb`,success:`#40a02b`,info:`oklch(58% 0.158 241.966)`,warning:`#df8e1d`,error:`#d20f39`,black:`#5c5f77`,red:`#d20f39`,green:`#40a02b`,yellow:`#df8e1d`,blue:`#1e66f5`,magenta:`#ea76cb`,cyan:`#179299`,white:`#4c4f69`,brightBlack:`#6c6f85`,brightRed:`#d20f39`,brightGreen:`#40a02b`,brightYellow:`#df8e1d`,brightBlue:`#1e66f5`,brightMagenta:`#8839ef`,brightCyan:`#04a5e5`,brightWhite:`#4c4f69`}),vue=Object.freeze({background:`#1e1e2e`,foreground:`#cdd6f4`,cursor:`#cdd6f4`,cursorAccent:`#1e1e2e`,surface:`#45475a`,selectionBackground:`#cdd6f4`,selectionForeground:`#1e1e2e`,primary:`#f98284`,accent:`#f5c2e7`,success:`#a6e3a1`,info:`#89b4fa`,warning:`#f9e2af`,error:`#f38ba8`,black:`#45475a`,red:`#f38ba8`,green:`#a6e3a1`,yellow:`#f9e2af`,blue:`#89b4fa`,magenta:`#f5c2e7`,cyan:`#94e2d5`,white:`#cdd6f4`,brightBlack:`#585b70`,brightRed:`#f38ba8`,brightGreen:`#a6e3a1`,brightYellow:`#f9e2af`,brightBlue:`#89b4fa`,brightMagenta:`#cba6f7`,brightCyan:`#89dceb`,brightWhite:`#cdd6f4`}),yue=Object.freeze({background:`#fbfbfa`,foreground:`#1a1b1e`,cursor:`#1a1b1e`,cursorAccent:`#fbfbfa`,surface:`#e6e6e1`,selectionBackground:`#1a1b1e`,selectionForeground:`#fbfbfa`,primary:`#e5534b`,accent:`#e5534b`,success:`#2f7a3e`,info:`#2659c4`,warning:`#9a6200`,error:`#c4383a`,black:`#5c5f66`,red:`#c4383a`,green:`#2f7a3e`,yellow:`#9a6200`,blue:`#2659c4`,magenta:`#933a88`,cyan:`#0f7079`,white:`#1a1b1e`,brightBlack:`#6b6f76`,brightRed:`#c4383a`,brightGreen:`#2f7a3e`,brightYellow:`#9a6200`,brightBlue:`#2659c4`,brightMagenta:`#933a88`,brightCyan:`#0f7079`,brightWhite:`#1a1b1e`}),bue=Object.freeze({background:`#0e0f11`,foreground:`#e3e3df`,cursor:`#e3e3df`,cursorAccent:`#0e0f11`,surface:`#26292e`,selectionBackground:`#e3e3df`,selectionForeground:`#0e0f11`,primary:`#ff7b6b`,accent:`#ff7b6b`,success:`#8fd19e`,info:`#8ab4f8`,warning:`#e7c27a`,error:`#ff8a80`,black:`#9a9ea6`,red:`#ff8a80`,green:`#8fd19e`,yellow:`#e7c27a`,blue:`#8ab4f8`,magenta:`#dba6e8`,cyan:`#7fd3d3`,white:`#e3e3df`,brightBlack:`#7d828b`,brightRed:`#ff8a80`,brightGreen:`#8fd19e`,brightYellow:`#e7c27a`,brightBlue:`#8ab4f8`,brightMagenta:`#dba6e8`,brightCyan:`#7fd3d3`,brightWhite:`#e3e3df`});function aC(e){switch(e.trim()){case`readout`:return yue;case`readout-night`:return bue;case`latte`:return _ue;case`mocha`:return vue;default:return}}var xue=Object.freeze([`2xs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`]);Object.freeze(`--stipe-font-synthesis.--stipe-surface-frame-width.--stipe-surface-frame-image.--stipe-surface-molding-contrast.--stipe-shadow-raised.--stipe-shadow-inset.--stipe-shadow-edge.--stipe-display-gasket-face.--stipe-display-texture-image.--stipe-display-text-shadow.--stipe-canvas.--stipe-surface.--stipe-surface-raised.--stipe-surface-selected.--stipe-fg-muted.--stipe-linework.--stipe-hairline.--stipe-hairline-quiet.--stipe-figure-ink.--stipe-density-compact.--stipe-density-comfortable.--stipe-motion-spring.--stipe-motion-squish.--stipe-motion-fast.--stipe-motion-normal.--stipe-motion-slow.--stipe-motion-ease.--stipe-motion-ease-exit.--stipe-motion-bounce.--stipe-motion-spring-duration.--stipe-motion-stretch.--stipe-motion-distance.--stipe-motion-stagger.--stipe-motion-blur.--stipe-motion-shake.--stipe-motion-steps.--stipe-motion-fuse.--stipe-press-depth.--stipe-press-scale.--stipe-layer-desktop.--stipe-layer-windows.--stipe-layer-chrome.--stipe-layer-popover.--stipe-layer-dialog.--stipe-layer-toast.--stipe-layer-tooltip.--stipe-overlay-shadow-outset.--stipe-icon-size-sm.--stipe-icon-size-md.--stipe-icon-size-lg.--stipe-icon-stroke.--stipe-card-rim.--stipe-card-rim-edge.--stipe-card-face.--stipe-card-panel.--stipe-card-ink.--stipe-card-ink-muted.--stipe-card-accent.--stipe-card-shadow.--stipe-card-foil-highlight.--stipe-card-foil-warm.--stipe-card-foil-cool.--stipe-avatar-shadow.--stipe-art-coral.--stipe-art-blue.--stipe-art-mint.--stipe-art-grape.--stipe-art-yellow.--stipe-art-cream.--stipe-art-ink.--stipe-art-inkcap.--stipe-art-graphite.--stipe-sketch-ink`.split(`.`));function oC(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=oC(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Sue(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=oC(e))&&(r&&(r+=` `),r+=t);return r}var sC=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,cC=Sue,Cue=(e,t)=>n=>{if(t?.variants==null)return cC(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=sC(t)||sC(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return cC(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},lC=Object.defineProperty,wue=((e,t)=>{let n={};for(var r in e)lC(n,r,{get:e[r],enumerable:!0});return t||lC(n,Symbol.toStringTag,{value:`Module`}),n})({isAny:()=>pC,isAnyNonArbitrary:()=>Rue,isArbitraryFamilyName:()=>Gue,isArbitraryImage:()=>que,isArbitraryLength:()=>Hue,isArbitraryNumber:()=>Uue,isArbitraryPosition:()=>Kue,isArbitraryShadow:()=>Jue,isArbitrarySize:()=>Vue,isArbitraryValue:()=>wC,isArbitraryVariable:()=>TC,isArbitraryVariableFamilyName:()=>Xue,isArbitraryVariableImage:()=>$ue,isArbitraryVariableLength:()=>Yue,isArbitraryVariablePosition:()=>Zue,isArbitraryVariableShadow:()=>ede,isArbitraryVariableSize:()=>Que,isArbitraryVariableWeight:()=>tde,isArbitraryWeight:()=>Wue,isFraction:()=>jue,isInteger:()=>Mue,isNamedContainerQuery:()=>zue,isNumber:()=>fC,isPercent:()=>Nue,isTshirtSize:()=>Pue}),uC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tue=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Eue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Due=/\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$/,Oue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,kue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Aue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jue=e=>Tue.test(e),fC=e=>!!e&&!Number.isNaN(Number(e)),Mue=e=>!!e&&Number.isInteger(Number(e)),Nue=e=>e.endsWith(`%`)&&fC(e.slice(0,-1)),Pue=e=>Eue.test(e),pC=()=>!0,Fue=e=>Due.test(e)&&!Oue.test(e),mC=()=>!1,Iue=e=>kue.test(e),Lue=e=>Aue.test(e),Rue=e=>!wC(e)&&!TC(e),zue=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),hC=(e,t,n)=>{let r=uC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},gC=(e,t,n=!1)=>{let r=dC.exec(e);return r?r[1]?t(r[1]):n:!1},_C=e=>e===`position`||e===`percentage`,vC=e=>e===`image`||e===`url`,yC=e=>e===`length`||e===`size`||e===`bg-size`,bC=e=>e===`length`,Bue=e=>e===`number`,xC=e=>e===`family-name`,SC=e=>e===`number`||e===`weight`,CC=e=>e===`shadow`,Vue=e=>hC(e,yC,mC),wC=e=>uC.test(e),Hue=e=>hC(e,bC,Fue),Uue=e=>hC(e,Bue,fC),Wue=e=>hC(e,SC,pC),Gue=e=>hC(e,xC,mC),Kue=e=>hC(e,_C,mC),que=e=>hC(e,vC,Lue),Jue=e=>hC(e,CC,Iue),TC=e=>dC.test(e),Yue=e=>gC(e,bC),Xue=e=>gC(e,xC),Zue=e=>gC(e,_C),Que=e=>gC(e,yC),$ue=e=>gC(e,vC),ede=e=>gC(e,CC,!0),tde=e=>gC(e,SC,!0),EC=(e,t)=>{let n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]==`string`},nde=e=>typeof e==`function`&&e.isThemeGetter===!0,rde=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),ide=(e,t)=>{let n=rde(e);t.prefix!==void 0&&(n.prefix=t.prefix);let r=(e,t)=>{if(t)for(let n in t)t[n]!==void 0&&(e[n]=t[n])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));let a=(e,t)=>{if(t)for(let n in t){let r=t[n];r&&(e[n]=(e[n]??[]).concat(r))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},DC={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},ade=25,ode=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),OC=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},kC=(e,t)=>{if(typeof t==`function`){let n=e.fnName.get(t);return n===void 0&&(n=`$c`+e.fnName.size,e.fnName.set(t,n),e.impls[n]=t),OC(e,n,t)}let n=t.$v,r=wue[n];if(DC[n]===void 0||!r)throw Error(`cn: unknown validator "${n}"`);return OC(e,n,r)},AC=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),sde=(e,t)=>e.theme[t]??[],cde=(e,t,n)=>{let r=AC(),i=(e,t)=>{for(let n of t.split(`-`)){let t=e.nextPart.get(n);t||(t=AC(),e.nextPart.set(n,t)),e=t}return e},a=(n,r,o)=>{if(typeof n==`string`){let e=n===``?r:i(r,n);e.classGroupId=o;return}if(typeof n==`function`){if(nde(n)){for(let t of n(e.theme))a(t,r,o);return}(r.validators??=[]).push({validatorId:kC(t,n),groupId:o});return}if(EC(n,`$t`)){for(let t of sde(e,n.$t))a(t,r,o);return}if(EC(n,`$v`)){(r.validators??=[]).push({validatorId:kC(t,n),groupId:o});return}for(let[e,t]of Object.entries(n)){let n=i(r,e);for(let e of t)a(e,n,o)}};for(let[t,i]of Object.entries(e.classGroups)){let e=n(t);for(let t of i)a(t,r,e)}return r},lde=e=>{let t=ode(),n=[],r=new Map,i=e=>{let t=r.get(e);return t===void 0&&(t=n.length,n.push(e),r.set(e,t)),t},a=cde(e,t,i),o=e=>{if(e.validators)return!1;for(let t of e.nextPart.values())if(!o(t))return!1;return!0},s=(e,t,n)=>{e.classGroupId>=0&&n.push({tail:t,gid:e.classGroupId});for(let[r,i]of e.nextPart)s(i,t+`-`+r,n)},c=e=>{for(let[t,n]of[...e.nextPart])o(n)?(s(n,t,e.lit),e.nextPart.delete(t)):c(n)};c(a);let l=[{edges:new Map,groupId:-1,vlist:-1}],u=()=>(l.push({edges:new Map,groupId:-1,vlist:-1}),l.length-1),d=[],f=new Map,p=e=>{let t=e.map(e=>e.validatorId+`:`+e.groupId).join(`,`),n=f.get(t);return n===void 0&&(n=d.length,d.push(e.map(e=>[e.validatorId,e.groupId])),f.set(t,n)),n},m=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e),i=l[n].edges.get(r);i===void 0&&(i=u(),l[n].edges.set(r,i)),n=i}return n},h=[],g=(e,t,n)=>{e.classGroupId>=0&&(l[t].groupId=e.classGroupId),e.validators&&(l[t].vlist=p(e.validators));for(let{tail:n,gid:r}of e.lit)h.push({anchor:t,tail:n,gid:r});for(let[r,i]of e.nextPart){let e=t;if(!n){let n=l[t].edges.get(45);n===void 0&&(n=u(),l[t].edges.set(45,n)),e=n}let a=m(e,r);g(i,a,!1)}};g(a,0,!0);let _=new Set(h.map(e=>e.anchor)),v=e=>l[e].groupId>=0||l[e].vlist>=0||_.has(e),y=new Map,b=[],x=e=>{let t=b.length;y.set(e,t);let n={edges:[],groupId:l[e].groupId,vlist:l[e].vlist};b.push(n);let r=[...l[e].edges.entries()].sort((e,t)=>e[0]-t[0]);for(let[e,t]of r){let r=String.fromCharCode(e),i=t;for(;l[i].edges.size===1&&!v(i);){let[[e,t]]=l[i].edges.entries();r+=String.fromCharCode(e),i=t}n.edges.push({label:r,oldTarget:i})}for(let e of n.edges)x(e.oldTarget);return t};x(0);let S=b.length,C=0;for(let e of b)C+=e.edges.length;let w=new Int32Array(S),T=new Int32Array(C),E=``,D=new Int32Array(S),O=new Int32Array(S),k=[];{let e=0;for(let t=0;t<S;t++){let n=b[t];w[t]=n.edges.length;for(let t of n.edges)T[e]=t.label.length,E+=t.label,k.push(y.get(t.oldTarget)),e++;D[t]=n.groupId,O[t]=n.vlist}}{let e=new Int32Array(S);for(let t=S-1;t>=0;t--){let n=1,r=t+1;for(let i=0;i<w[t];i++)n+=e[r],r+=e[r];e[t]=n}let t=0;for(let n=0;n<S;n++){let r=n+1;for(let i=0;i<w[n];i++){if(r!==k[t])throw Error(`cn compiler: edge target mismatch at ${t}`);r+=e[r],t++}}}for(let e of h)e.anchor=y.get(e.anchor);{let e=new Int32Array(d.length).fill(-1),t=[];for(let n=0;n<S;n++){let r=O[n];r>=0&&(e[r]===-1&&(e[r]=t.length,t.push(d[r])),O[n]=e[r])}d.length=0,d.push(...t)}let A=0;for(let e of d)A+=e.length;let j=new Int32Array(A),M=new Int32Array(A);{let e=0;for(let t of d)for(let[n,r]of t)j[e]=n,M[e]=r,e++}h.sort((e,t)=>e.anchor-t.anchor||e.gid-t.gid||(e.tail<t.tail?-1:1));let N=[];for(let e of h){let t=N[N.length-1];t&&t.anchor===e.anchor&&t.gid===e.gid?t.tails.push(e.tail):N.push({anchor:e.anchor,gid:e.gid,tails:[e.tail],set:-1})}let P=new Map,ee=[];for(let e of N){let t=e.tails.join(` `),n=P.get(t);n===void 0&&(n=ee.length,P.set(t,n),ee.push(e.tails)),e.set=n}for(let e of ee.flat())if(e.includes(`|`)||e.includes(` `))throw Error(`cn compiler: tail contains delimiter: `+e);let te=new Set(ee.flat()).size;N.sort((e,t)=>e.anchor-t.anchor||e.set-t.set);for(let t of Object.values(e.conflictingClassGroups))for(let e of t)i(e);for(let t of Object.values(e.conflictingClassGroupModifiers))for(let e of t)i(e);for(let t of e.postfixLookupClassGroups??[])i(t);let ne=n.length,F=new Int32Array(ne).fill(-1),re=0,ie=e=>(F[e]===-1&&(F[e]=re++),F[e]);for(let e=0;e<M.length;e++)M[e]=ie(M[e]);for(let e of N)e.gid=ie(e.gid);for(let e=0;e<D.length;e++)D[e]>=0&&(D[e]=ie(D[e]));for(let e=0;e<ne;e++)F[e]===-1&&(F[e]=re++);let ae=Array(ne);for(let e=0;e<ne;e++)ae[F[e]]=n[e];let oe=[],se=[],ce=[],le=[],ue=[];for(let t=0;t<ne;t++){let n=ae[t],i=(e.conflictingClassGroups[n]??[]).map(e=>F[r.get(e)]),a=(e.conflictingClassGroupModifiers[n]??[]).map(e=>F[r.get(e)]);i.length&&(oe.push(t),se.push(i.length),ce.push(...i));for(let e of a)le.push(t),ue.push(e)}let de=(e.postfixLookupClassGroups??[]).map(e=>F[r.get(e)]),fe=[],pe=new Int32Array(j.length);for(let e=0;e<j.length;e++){let n=t.names[j[e]],r=DC[n];if(r!==void 0)pe[e]=r;else{let t=fe.indexOf(n);t===-1&&(t=fe.length,fe.push(n)),pe[e]=ade+t}}let me=new Map,he=[],ge=[],_e=[];{let e=0;for(let t of d){let n=[];for(let r=0;r<t.length;r++)n.push(pe[e++]);let r=n.join(`,`),i=me.get(r);i===void 0&&(i=he.length,me.set(r,i),he.push(n.length),ge.push(...n)),_e.push(i)}}let ve={};for(let e of fe)ve[e]=t.classifierFns.get(e);return{G:ne,customNames:fe,impls:ve,edgeCounts:w,edgeLabelLen:T,labelText:E,edgeTargetActual:k,nodeGroup:D,nodeVlist:O,nodeCount:S,totalEdges:C,patCounts:he,patOps:ge,listPat:_e,vlistGroup:M,litEntries:h,sets:ee,attachments:N,uniqueTailCount:te,adjGid:oe,adjCnt:se,adjTgt:ce,patGid:le,patTgt:ue,postfixLookup:de,orderSensitiveModifiers:e.orderSensitiveModifiers.join(` `),prefix:e.prefix}},jC=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},ude=e=>{let t=lde(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n),o=``,s=new Int32Array(t.uniqueTailCount*2);{let e=new Map,n=0,c=0;for(let l of t.attachments)for(let u of t.sets[l.set]){let t=e.get(u);t===void 0&&(t=n++,e.set(u,t),s[t*2]=o.length,s[t*2+1]=u.length,o+=u),r[c]=l.anchor,i[c]=l.gid,a[c]=t,c++}}return{tables:{GROUP_COUNT:t.G,edgeStart:jC(t.edgeCounts),labelStart:jC(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:jC(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:s,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:jC(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},dde=`line`in Error(),MC=-1,NC=-1,PC=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},FC=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15|0},fde=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,ee=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(ee=!1)}let te=1;for(;te<m.length*2;)te<<=1;let ne=new Int32Array(te).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(PC(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&te-1;for(;ne[n]!==-1;)n=n+1&te-1;ne[n]=e}let F=(e,t,n,r)=>{let i=(PC(t,n,r)^Math.imul(e,2654435761)|0)&te-1,a=r-n;for(;;){let r=ne[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&te-1}},re=n.cacheSize??8192,ie=n.prefix??e.prefix??``,ae=ie===``?``:ie+`:`,oe=ae.length,se=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ce=/\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$/,le=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,de=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fe=0,pe=-1,me=-1,he=-1,ge=-1,_e=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ve=e=>/\s/.test(String.fromCharCode(e)),ye=(e,t,n)=>{if(fe=0,pe=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)fe=1;else if(r===40&&i===41)fe=2;else return;he=t+1,ge=n-1;let a=t+1;if(_e(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!_e(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(pe=t+1,me=a,he=a+1)}},be=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},xe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Se=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ce=e=>!!e&&!Number.isNaN(Number(e)),we=(e,t,n)=>{if(n-t<11||!be(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&be(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&be(e,t+10,t+18,`-normal/`)},Te=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Ee=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),De=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],Oe=(e,t,n,r)=>{if(e>=10){if(e>=25)return se[e-25](t.slice(n,r));let i=e-10;if(fe!==Te[i])return!1;if(pe>=0){for(let e of Ee[i])if(be(t,pe,me,e))return!0;return!1}switch(De[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(he,ge);return ce.test(e)&&!le.test(e)}case 3:return Ce(t.slice(he,ge));case 4:return de.test(t.slice(he,ge));default:return ue.test(t.slice(he,ge))}}switch(e){case 0:return!0;case 1:return fe===0;case 2:return fe===1;case 3:return fe===2;case 4:return xe.test(t.slice(n,r));case 5:return Ce(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&Ce(t.slice(n,r-1));case 8:return Se.test(t.slice(n,r));default:return we(t,n,r)}},ke=new Set(typeof E==`string`?E.split(` `):E),Ae=(e,t,n,r,i,a)=>{let o=PC(t,n,r)^(i?2654435769:0)|0,s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},je=new Map,Me=new Map,Ne=2,Pe=4096,Fe=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||ke.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Me.get(s);return c===void 0&&Me.set(s,c=Ne++),c},Ie=new Map,Le=r,Re=r+4096,ze=()=>Le++,Be=2097152,Ve=8192,He=new Int32Array(Ve),Ue=Array(Ve).fill(null),We=new Int32Array(Ve),Ge=new Int32Array(Ve),Ke=new Uint8Array(Ve),qe=0,Je=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ue[e]!==null){if(Ue[e|1]===null)c=e|1;else if(!(qe++&3))c=e|qe>>2&1;else return}Ue[c]=t.slice(n,r),He[c]=i,We[c]=a,Ge[c]=o,Ke[c]=s},Ye=()=>Ue.fill(null),Xe=256,Ze=[new Int32Array(Xe),new Int32Array(Xe),new Int32Array(Xe),new Int32Array(Xe)],[Qe,$e,et,tt]=Ze,nt=new Uint8Array(Xe),rt=new Uint8Array(Xe),it=()=>{Xe*=2,Ze=Ze.map(e=>{let t=new Int32Array(Xe);return t.set(e),t}),[Qe,$e,et,tt]=Ze;let e=new Uint8Array(Xe);e.set(nt),nt=e,rt=new Uint8Array(Xe)},at=64,ot=new Int32Array(at),st=new Int32Array(at),ct=new Int32Array(r),lt=2048,ut=21,dt=new Float64Array(lt),ft=new Int32Array(lt),pt=0,mt=(e,t)=>{if(e===0&&t<r)return ct[t]===pt?1:(ct[t]=pt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>ut;for(;ft[i]===pt;){if(dt[i]===n)return 1;i=i+1&lt-1}return dt[i]=n,ft[i]=pt,0},ht=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?MC:Ae(Ie,e,t+1,r,0,ze)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=st[t];if(r>n)continue;let i=ot[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(ee===!1||t!==91&&t!==40){let t=F(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;ye(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(Oe(d[t],e,r,n))return p[h+t]}return MC},gt=e=>{let t=e.length,n=0,c=0,u=!1;(Ne>Pe||je.size>Pe)&&(je=new Map,Me=new Map,Ne=2,Ye()),Le>Re&&(Ie=new Map,Le=r,Ye());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&ve(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&ve(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Xe&&it();let _=n++;Qe[_]=p,$e[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(He[y]===v&&Ue[y]!==null&&Ue[y].length===g?t=y:He[y|1]===v&&Ue[y|1]!==null&&Ue[y|1].length===g&&(t=y|1),t>=0){let n=Ue[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){et[_]=We[t],tt[_]=Ge[t],nt[_]=Ke[t];continue}}}let b=p;if(oe!==0){if(h-p<=oe||!e.startsWith(ae,p)){et[_]=MC,Je(y,e,p,h,v,MC,0,0);continue}b=p+oe}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,ee=0,te=0,ne=-1,F=0;(l[0]>=0||N[0]===1)&&(ot[0]=0,st[0]=M,F=1);let re=NC,ie=0;for(let t=M;t<D;t++)if(t===A&&(re=ee<te?NC:P,ie=F),P!==NC){let n=e.charCodeAt(t),r=-1;if(ee<te)o.charCodeAt(ee)===n?(ee++,ee===te&&(r=P=ne)):P=NC;else{let e=i[P],t=i[P+1],c=NC;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(ee=e+1,te=a[i+1],ne=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(F===at){at*=2;let e=new Int32Array(at);e.set(ot),ot=e;let t=new Int32Array(at);t.set(st),st=t}ot[F]=r,st[F]=t+2,F++}}A===D&&(re=ee<te?NC:P,ie=F);let se=ee<te?NC:P,ce,le=!1;if(A>=0){if(le=!0,ce=ht(e,E,A,re,ie),ce!==MC&&ce<r&&j[ce]){let t=ht(e,E,D,se,F);t!==MC&&t!==ce&&(ce=t,le=!1)}else ce===MC&&(ce=ht(e,E,D,se,F),le=!1)}else ce=ht(e,E,D,se,F);let ue=0,de=0;ce===MC?et[_]=MC:(de=+!!le,ue=b>=C?+!!O:Ae(je,e,b,C,+!!O,e=>Fe(e,O)),et[_]=ce,nt[_]=de,tt[_]=ue),Je(y,e,p,h,v,ce,ue,de)}if(n===0)return``;if(n===1)return Qe[0]===0&&$e[0]===t?e:e.slice(Qe[0],$e[0]);if(n*k>lt){for(;n*k>lt;)lt<<=1,ut--;dt=new Float64Array(lt),ft=new Int32Array(lt)}if(Ne>=Be||Le>=Be)throw Error(`cn: too many distinct classes in one merge`);pt=pt+1|0,pt===0&&(ct.fill(0),ft.fill(0),pt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=et[e];if(t===MC){rt[e]=1;continue}let n=tt[e];if(mt(n,t)===1){rt[e]=0,f=!0;continue}if(rt[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)mt(n,x[e]);if(nt[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&mt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!rt[m]){m++;continue}let t=Qe[m],r=$e[m],i=m+1;for(;i<n&&rt[i]&&Qe[i]===r+1&&e.charCodeAt(r)===32;)r=$e[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},_t=16384,vt=new Int32Array(_t*2),yt=0,bt=1,xt=Object.create(null),St=Object.create(null),Ct=new Map,wt=new Map,Tt=0,Et=0,Dt=()=>{yt^=_t,bt=bt+1|0,Et=0},Ot=e=>{let t=xt[e];if(t!==void 0)return t;let n=FC(e,0,e.length),r=(n&16383)+yt,i=vt[r]===(n^bt)||vt[r^_t]===(n^bt-1);return i&&(t=St[e],t!==void 0)?(xt[e]=t,t):(t=gt(e),i?(xt[e]=t,++Tt>re&&(Tt=0,St=xt,xt=Object.create(null),Dt())):(vt[r]=n^bt,++Et>_t&&Dt()),t)},kt=e=>{let t=Ct.get(e);if(t!==void 0)return t;let n=FC(e,0,e.length),r=(n&16383)+yt,i=vt[r]===(n^bt)||vt[r^_t]===(n^bt-1);return i&&(t=wt.get(e),t!==void 0)?(Ct.set(e,t),t):(t=gt(e),i?(Ct.set(e,t),++Tt>re&&(Tt=0,wt=Ct,Ct=new Map,Dt())):(vt[r]=n^bt,++Et>_t&&Dt()),t)},At=e=>{let t=FC(e,0,e.length),n=(t&16383)+yt;return vt[n]===(t^bt)||vt[n^_t]===(t^bt-1)||(vt[n]=t^bt,++Et>_t&&Dt(),!1)},jt=re===0?gt:dde?e=>{let t=Ct.get(e);return t===void 0?kt(e):t}:Ot;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?jt(arguments[0]):jt(mde.apply(null,arguments))},mergeString:jt,seenBefore:re===0?()=>!1:At,mergeUncached:gt}},IC=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:IC(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},pde=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:IC(i,t);a&&(n&&(n+=` `),n+=a)}return n},mde=function(){return pde(arguments,!1)},hde=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},l=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},u=(t,c)=>{let u=t.length,d=s===null?null:s.n;if(!c){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let f=``,p=-1,m=0,h=!1;for(let e=0;e<u;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=IC(n,!0),!n)continue;h=!0}p<0&&(f=n,p=e),m++}}if(m===0)return``;if(m===1)return e(f);if(h){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let g=i.get(f);g===void 0&&(g=a.get(f),g!==void 0&&i.set(f,g));let _=null;if(g!==void 0)outer:for(let e=0;e<g.length;e++){let n=g[e];if(n.t!==m)continue;let r=n.a,i=1;for(let e=p+1;e<u;e++){let n=t[e];if(n&&n!==r[i++])continue outer}_=n;break}if(_===null){let s=f,c=[f];for(let e=p+1;e<u;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);_={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},g===void 0&&i.set(f,g=[]),g.length>=256&&g.shift(),g.push(_),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==_&&(s.n=_),s=_,_.r},d=t=>Array.isArray(t)?u(t.slice(),!1):e(IC(t,!0));return function(t,n,r){let i=arguments.length;if((i|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&c(i,t,n,r))return s=i,i.r;if(e!==i&&c(e,t,n,r))return e.r}return u([t,n,r],!0)}if(i===1)return typeof t==`string`?e(t):d(t);let a=s;if(a!==null){let e=a.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<i;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(a!==e){let e=a.a,t=0,n=!0;for(let r=0;r<i;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===a.t)return a.r}}let o=[];for(let e=0;e<i;e++)o.push(arguments[e]);return u(o,!0)}},gde=`{"theme":{"animate":[{"$v":"isAny"}],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]},"columns-auto"],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],"box":[{"box":["border","content"]}],"display":["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],"sr":["sr-only","not-sr-only"],"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":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"inline":[{"$t":"container"}]}],"min-inline-size":[{"min-inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"min-inline":[{"$t":"container"}]}],"max-inline-size":[{"max-inline":["none",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"max-inline":[{"$t":"container"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},"max-h-none"],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"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":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":[{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"whitespace":[{"whitespace":["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],"break":[{"break":["normal","words","all","keep"]}],"wrap":[{"wrap":["break-word","anywhere","normal"]}],"hyphens":[{"hyphens":["none","manual","auto"]}],"content":[{"content":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]},"bg-conic"],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]},"shadow-inner"],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{"mask":["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{"closest":["side","corner"],"farthest":["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"color-scheme":[{"scheme":["normal","dark","light","light-dark","only-dark","only-light"]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],"resize":[{"resize":["none","","y","x"]}],"scroll-behavior":[{"scroll":["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"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",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"conflictingClassGroups":{"container-named":["container-type"],"overflow":["overflow-x","overflow-y"],"overscroll":["overscroll-x","overscroll-y"],"inset":["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],"px":["pr","pl"],"py":["pt","pb"],"m":["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],"translate":["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}`,LC=()=>JSON.parse(gde),_de=e=>`classGroups`in e&&`theme`in e&&`conflictingClassGroups`in e,vde=e=>e===void 0?{config:LC()}:typeof e==`function`?{config:e(LC())}:_de(e)?{config:e}:{config:ide(LC(),e),cacheSize:e.cacheSize},yde=e=>{let{config:t,cacheSize:n}=vde(e),{tables:r,validatorImpls:i,prefix:a}=ude(t);return fde(r,i,{cacheSize:n,prefix:a})},RC=(e=>{let t=null,n=()=>t??=yde(e);return hde(e=>n().mergeString(e),{seenBefore:e=>n().seenBefore(e),mergeUncached:e=>n().mergeUncached(e)})})({extend:{theme:{spacing:[...xue]}}}),zC=Object.freeze({reduced:!1,squish:90,fast:120,normal:180,slow:280,springDuration:320,bounce:.3,stretch:.28,distance:4,stagger:24,blur:0,shake:3,steps:0,fuse:1,pressDepth:.5,pressScale:1,ease:`cubic-bezier(0.2, 0, 0, 1)`,easeExit:`cubic-bezier(0.4, 0, 1, 1)`}),BC=`(prefers-reduced-motion: reduce)`;function VC(e){let t=e.ownerDocument.defaultView;if(!t)return zC;let n=t.getComputedStyle(e),r=(e,t)=>{let r=n.getPropertyValue(e).trim(),i=Number.parseFloat(r);return Number.isFinite(i)?Math.max(0,i):t},i=(e,t)=>{let i=n.getPropertyValue(e).trim();return r(e,t)*(i.endsWith(`s`)&&!i.endsWith(`ms`)?1e3:1)},a=t.matchMedia?.(BC).matches??!1,o=(e,t)=>a?120:i(`--stipe-motion-${e}`,t),s=(e,t)=>a?0:r(`--stipe-motion-${e}`,t);return{reduced:a,squish:o(`squish`,zC.squish),fast:o(`fast`,zC.fast),normal:o(`normal`,zC.normal),slow:o(`slow`,zC.slow),springDuration:o(`spring-duration`,zC.springDuration),bounce:Math.min(1,s(`bounce`,zC.bounce)),stretch:s(`stretch`,zC.stretch),distance:s(`distance`,zC.distance),stagger:a?0:i(`--stipe-motion-stagger`,zC.stagger),blur:s(`blur`,zC.blur),shake:s(`shake`,zC.shake),steps:Math.floor(s(`steps`,zC.steps)),fuse:r(`--stipe-motion-fuse`,zC.fuse),pressDepth:a?0:r(`--stipe-press-depth`,zC.pressDepth),pressScale:a?1:r(`--stipe-press-scale`,zC.pressScale),ease:n.getPropertyValue(`--stipe-motion-ease`).trim()||zC.ease,easeExit:n.getPropertyValue(`--stipe-motion-ease-exit`).trim()||zC.easeExit}}function HC(e){let[t,n]=(0,I.useState)(()=>({...zC,reduced:!0}));return(0,I.useLayoutEffect)(()=>{let t=e.current,r=t?.ownerDocument.defaultView;if(!t||!r)return;let i=()=>{let e=VC(t);n(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};i();let a=new r.MutationObserver(i);for(let e=t;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`data-theme`,`class`,`style`]});let o=r.matchMedia?.(BC);return o?.addEventListener(`change`,i),()=>{a.disconnect(),o?.removeEventListener(`change`,i)}},[e]),t}function UC(e,t){return e.reduced?0:Math.round(t*e.normal/zC.normal)}function bde(e,t){if(e.reduced)return 0;let n=t*e.bounce/zC.bounce;return Math.min(.9,Math.max(0,n))}function xde(e,t){return e.reduced?0:Math.round(t*e.springDuration/zC.springDuration)}function WC(e,t){return e.steps>0?`steps(${String(e.steps)}, end)`:t}function GC(e){return`animate`in e}var KC=globalThis;function Sde(){return KC.matchMedia?.(BC).matches??!1}function Cde(e){let t=KC.matchMedia?.(BC);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function wde(){return!0}function qC(){return(0,I.useSyncExternalStore)(Cde,Sde,wde)}var JC=(0,I.forwardRef)(function({asChild:e=!1,className:t,...n},r){let i=RC(`absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]`,t);return e?(0,R.jsx)(nC,{...n,className:i,ref:r}):(0,R.jsx)(`span`,{...n,className:i,ref:r})}),YC=typeof window<`u`,XC=YC?window:null,ZC=YC?document:null,QC={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},$C={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},ew={NONE:0,AUTO:1,FORCE:2},tw={replace:0,none:1,blend:2},nw=Symbol(),rw=Symbol(),iw=Symbol(),aw=Symbol(),Tde=Symbol(),ow=1e-11,sw=0xe8d4a51000,cw=1e3,lw=[],uw=(()=>{let e=new Map;return e.set(`x`,`translateX`),e.set(`y`,`translateY`),e.set(`z`,`translateZ`),e})(),dw=[`perspective`,`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`],Ede=dw.reduce((e,t)=>({...e,[t]:t+`(`}),{}),fw=()=>{},Dde=e=>e,Ode=/\)\s*[-.\d]/,kde=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,Ade=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,jde=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,Mde=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,Nde=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,pw=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,Pde=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,mw=/([a-z])([A-Z])/g,hw=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,gw={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:cw,delay:0,loopDelay:0,ease:`out(2)`,composition:tw.replace,modifier:Dde,onBegin:fw,onBeforeUpdate:fw,onUpdate:fw,onLoop:fw,onPause:fw,onComplete:fw,onRender:fw},_w={current:null,root:ZC},vw={defaults:gw,precision:4,timeScale:1,tickThreshold:200,editor:null},yw={version:`4.5.0`,engine:null};YC&&(XC.AnimeJS||=[],XC.AnimeJS.push(yw));var bw=e=>e.replace(mw,`$1-$2`).toLowerCase(),xw=(e,t)=>e.indexOf(t)===0,Sw=Date.now,Cw=Array.isArray,ww=e=>e&&e.constructor===Object,Fde=e=>typeof e==`number`&&!isNaN(e),Tw=e=>typeof e==`string`,Ew=e=>typeof e==`function`,Dw=e=>e===void 0,Ow=e=>Dw(e)||e===null,kw=e=>YC&&e instanceof SVGElement,Aw=e=>kde.test(e),jw=e=>xw(e,`rgb`),Mw=e=>xw(e,`hsl`),Ide=e=>Aw(e)||(jw(e)||Mw(e))&&(e[e.length-1]===`)`||!Ode.test(e)),Nw=e=>!vw.defaults.hasOwnProperty(e),Lde=[`opacity`,`rotate`,`overflow`,`color`],Rde=(e,t)=>{if(Lde.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===`scale`){let t=e.parentNode;return t&&t.tagName===`filter`}return!0}},Pw=Math.pow,Fw=Math.sqrt,Iw=Math.sin,Lw=Math.cos,Rw=Math.abs,zw=Math.exp,zde=Math.ceil,Bw=Math.floor,Bde=Math.asin,Vw=Math.PI,Hw=Math.round,Uw=(e,t,n)=>e<t?t:e>n?n:e,Ww=(e,t)=>{if(t<0)return e;if(!t)return Hw(e);let n=10**t;return Hw(e*n)/n},Gw=(e,t,n)=>n===1?t:n===0?e:e+(t-e)*n,Kw=e=>e===1/0?sw:e===-1/0?-sw:e,qw=e=>e<=1e-11?ow:Kw(Ww(e,11)),Jw=e=>Cw(e)?[...e]:e,Vde=(e,t)=>{let n={...e};for(let r in t){let i=e[r];n[r]=Dw(i)?t[r]:i}return n},Yw=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._head,o=i;for(n&&(a=e._tail,o=r);a;){let e=a[o];t(a),a=e}},Xw=(e,t,n=`_prev`,r=`_next`)=>{let i=t[n],a=t[r];i?i[r]=a:e._head=a,a?a[n]=i:e._tail=i,t[n]=null,t[r]=null},Zw=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._tail;for(;a&&n&&n(a,t);)a=a[r];let o=a?a[i]:e._head;a?a[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=a,t[i]=o},Hde=(e,t,n)=>{let r=e.style.transform;if(r){let i=e[aw],a=0,o=r.length,s;for(;a<o;){for(;a<o&&r.charCodeAt(a)===32;)a++;if(a>=o)break;let e=a;for(;a<o&&r.charCodeAt(a)!==40;)a++;if(a>=o)break;let t=r.substring(e,a),n=1,c=a+1,l=-1,u=-1;for(a++;a<o&&n>0;){let e=r.charCodeAt(a);e===40?n++:e===41?n--:e===44&&n===1&&(l===-1?l=a:u===-1&&(u=a)),a++}let d=a-1;t===`translate`||t===`translate3d`?(l===-1?i.translateX=r.substring(c,d).trim():(i.translateX=r.substring(c,l).trim(),u===-1?i.translateY=r.substring(l+1,d).trim():(i.translateY=r.substring(l+1,u).trim(),i.translateZ=r.substring(u+1,d).trim())),s=r.substring(c,d)):t===`scale`||t===`scale3d`?l===-1?i.scale=r.substring(c,d).trim():(i.scaleX=r.substring(c,l).trim(),u===-1?i.scaleY=r.substring(l+1,d).trim():(i.scaleY=r.substring(l+1,u).trim(),i.scaleZ=r.substring(u+1,d).trim())):i[t]=r.substring(c,d)}if(t===`translate3d`&&s)return n&&(n[t]=s),s;let c=i[t];if(!Dw(c))return n&&(n[t]=c),c}return t===`translate3d`?`0px, 0px, 0px`:t===`rotate3d`?`0, 0, 0, 0deg`:xw(t,`scale`)?`1`:xw(t,`rotate`)||xw(t,`skew`)?`0deg`:`0px`},Qw=e=>{let t=``;for(let n=0,r=dw.length;n<r;n++){let r=dw[n],i=e[r];if(i!==void 0){if(r===`translateX`){let r=e.translateY;if(r!==void 0){let a=e.translateZ;a===void 0?(t+=`translate(${i},${r}) `,n+=1):(t+=`translate3d(${i},${r},${a}) `,n+=2);continue}}if(r===`scaleX`&&e.scale===void 0){let r=e.scaleY;if(r!==void 0){let a=e.scaleZ;a===void 0?(t+=`scale(${i},${r}) `,n+=1):(t+=`scale3d(${i},${r},${a}) `,n+=2);continue}}t+=`${Ede[r]}${i}) `}r===`rotateZ`&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},$w=[];function eT(e,t){if(!e)return null;let n=$w.length;outer:for(let r=0;r<n;r++){let n=$w[r];if(n.detect&&!n.detect(e))continue;let i=n.targetAdapters;for(let n=0,r=i.length;n<r;n++){let r=i[n];if(r.detect(e)){let n=r.props[t];if(n&&(!n.gate||n.gate(e)))return n;break outer}}}for(let r=0;r<n;r++){let n=$w[r];if(n.detect&&!n.detect(e))continue;let i=n.propertyResolvers;for(let n=0,r=i.length;n<r;n++){let r=i[n](e,t);if(r)return r}}return null}var Ude=e=>{let t=Ade.exec(e)||jde.exec(e),n=Dw(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]},Wde=e=>{let t=e.length,n=t===4||t===5;return[+(`0x`+e[1]+e[n?1:2]),+(`0x`+e[n?2:3]+e[n?2:4]),+(`0x`+e[n?3:5]+e[n?3:6]),t===5||t===9?+((`0x`+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]},tT=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),Gde=e=>{let t=Mde.exec(e)||Nde.exec(e),n=t[1]/360,r=t[2]/100,i=t[3]/100,a=Dw(t[4])?1:+t[4],o,s,c;if(r===0)o=s=c=i;else{let e=i<.5?i*(1+r):i+r-i*r,t=2*i-e;o=Ww(tT(t,e,n+1/3)*255,0),s=Ww(tT(t,e,n)*255,0),c=Ww(tT(t,e,n-1/3)*255,0)}return[o,s,c,a]},Kde=e=>jw(e)?Ude(e):Aw(e)?Wde(e):Mw(e)?Gde(e):[0,0,0,1],nT=(e,t)=>Dw(e)?t:e,rT=(e,t)=>{let n=e.match(hw),r=t[rw]?t:document.documentElement,i=getComputedStyle(r)?.getPropertyValue(n[1]);return(!i||i.trim()===``)&&n[2]&&(i=n[2].trim()),i||0},iT=(e,t,n,r,i,a)=>{if(Ew(e)){if(!i){let i=e(t,n,r,a);return isNaN(+i)?i||0:+i}let o=()=>{let i=e(t,n,r,a);return isNaN(+i)?i||0:+i};return i.func=o,o()}if(Tw(e)&&xw(e,`var(`)){if(!i)return rT(e,t);let n=()=>rT(e,t);return i.func=n,n()}return e},aT=(e,t)=>e[rw]?e[iw]&&Rde(e,t)?QC.ATTRIBUTE:dw.includes(t)||uw.get(t)?QC.TRANSFORM:xw(t,`--`)?QC.CSS_VAR:t in e.style?QC.CSS:t in e?QC.OBJECT:QC.ATTRIBUTE:QC.OBJECT,oT=(e,t,n)=>{let r=e.style[t];r&&n&&(n[t]=r);let i=r||getComputedStyle(e[Tde]||e).getPropertyValue(t);return i===`auto`?`0`:i},sT=(e,t,n,r)=>{let i=Dw(n)?aT(e,t):n,a=eT(e,t);if(a){let n=a.get(e);return n&&r&&(r[t]=n),n??0}if(i===QC.OBJECT){let n=e[t];return n&&r&&(r[t]=n),n||0}if(i===QC.ATTRIBUTE){let n=e.getAttribute(t);return n&&r&&(r[t]=n),n}return i===QC.TRANSFORM?Hde(e,t,r):i===QC.CSS_VAR?oT(e,t,r).trimStart():oT(e,t,r)},cT=(e,t,n)=>n===`-`?e-t:n===`+`?e+t:e*t,lT=()=>({t:$C.NUMBER,n:0,u:null,o:null,d:null,s:null}),uT=(e,t)=>{if(t.t=$C.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;let n=+e;if(!isNaN(n))return t.n=n,t;let r=e;r[1]===`=`&&(t.o=r[0],r=r.slice(2));let i=!r.includes(` `)&&Pde.exec(r);if(i)return t.t=$C.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(Ide(r))return t.t=$C.COLOR,t.d=Kde(r),t;{let e=r.match(pw);return t.t=$C.COMPLEX,t.d=e?e.map(Number):[],t.s=r.split(pw)||[],t}},dT=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=Jw(e._toNumbers),t.s=Jw(e._strings),t),fT=lT(),pT=(e,t,n)=>{let r=e._modifier,i=e._fromNumbers,a=e._toNumbers,o=e._strings,s=o[0];for(let c=0,l=a.length;c<l;c++){let l=r(Ww(Gw(i[c],a[c],t),n)),u=o[c+1];s+=`${u?l+u:l}`,e._numbers[c]=l}return s},mT=(e,t,n,r,i)=>{let a=e.parent,o=e.duration,s=e.completed,c=e.iterationDuration,l=e.iterationCount,u=e._currentIteration,d=e._loopDelay,f=e._reversed,p=e._alternate,m=e._hasChildren,h=e._delay,g=e._currentTime,_=h+c,v=t-h,y=Uw(g,-h,o),b=Uw(v,-h,o),x=v-g,S=b>0,C=b>=o,w=o<=ow,T=i===ew.FORCE,E=0,D=v,O=0;if(l>1){let t=c+(C?0:d),n=~~(b/t);e._currentIteration=Uw(n,0,l),C&&e._currentIteration--,E=e._currentIteration%2,D=b-n*t||0}let k=f^(p&&E),A=e._ease,j=C?k?0:o:k?c-D:D;A&&(j=c*A(j/c)||0);let M=(a?a.backwards:v<g)?!k:!!k;if(e._currentTime=v,e._iterationTime=j,e.backwards=M,S&&!e.began?(e.began=!0,!n&&!(a&&(M||!a.began))&&e.onBegin(e)):v<=0&&(e.began=!1),!n&&!m&&S&&e._currentIteration!==u&&e.onLoop(e),T||i===ew.AUTO&&(t>=(a&&h>0?0:h)&&t<=_||t<=h&&y>h||t>=_&&y!==o)||j>=_&&y!==o||j<=h&&y>0&&!C||t<=y&&y===o&&s||C&&!s&&w){if(S&&(e.computeDeltaTime(y),n||e.onBeforeUpdate(e)),!m){let t=T||(M?x*-1:x)>=vw.tickThreshold,i=Ww(e._offset+(a?a._offset:0)+h+j,12),o=e._head,s,c,l,u,d=0;for(;o;){let e=o._composition,n=o._currentTime,a=o._changeDuration,f=o._absoluteStartTime+o._changeDuration,p=o._nextRep,m=o._prevRep,h=e!==tw.none,g=m?m._absoluteStartTime+m._changeDuration:0,_=m&&m.parent!==o.parent,v=!p||p._isOverridden?f:p.parent===o.parent?f+p._delay:p._absoluteStartTime<p._absoluteUpdateStartTime?p._absoluteStartTime:p._absoluteUpdateStartTime;if((t||(n!==a||i<=v||m&&!_&&(!p||p.parent!==o.parent))&&(n!==0||i>=o._absoluteStartTime||_&&!o._hasFromValue&&!m._isOverridden&&i>=g||p&&!p._isOverridden&&p.parent===o.parent&&p._currentTime!==0&&j<p._startTime))&&(!m||_||j>=o._startTime)&&(!h||!o._isOverridden&&(!o._isOverlapped||i<=f)&&(!p||p._isOverridden||i<=v)&&(!m||m._isOverridden||(_?i>=o._absoluteStartTime||!o._hasFromValue&&i>=g:i>=g+o._delay)))){let t=o._currentTime=Uw(j-o._startTime,0,a),n=o._ease(t/o._updateDuration),i=o._modifier,f=o._valueType,p=o._tweenType,m=p===QC.OBJECT,g=f===$C.NUMBER,_=g&&m||n===0||n===1?-1:vw.precision,v,y;if(g)v=y=i(Ww(Gw(o._fromNumber,o._toNumber,n),_));else if(f===$C.UNIT)y=i(Ww(Gw(o._fromNumber,o._toNumber,n),_)),v=`${y}${o._unit}`;else if(f===$C.COLOR){let e=o._numbers,t=o._fromNumbers,a=o._toNumbers,s=1-n,c=t[0],l=t[1],u=t[2],d=a[0],f=a[1],p=a[2];e[0]=i(Math.sqrt(c*c*s+d*d*n)),e[1]=i(Math.sqrt(l*l*s+f*f*n)),e[2]=i(Math.sqrt(u*u*s+p*p*n)),e[3]=i(Gw(t[3],a[3],n)),(!o._setter||r)&&(v=`rgba(${Ww(e[0],0)},${Ww(e[1],0)},${Ww(e[2],0)},${e[3]})`)}else f===$C.COMPLEX&&(v=pT(o,n,_));if(h&&(o._number=y),!r&&e!==tw.blend){let e=o.property;s=o.target,o._setter?o._setter(s,y,o):m?s[e]=v:p===QC.ATTRIBUTE?s.setAttribute(e,v):(c=s.style,p===QC.TRANSFORM?(s!==l&&(l=s,u=s[aw]),u[e]=v,d=1):p===QC.CSS?c[e]=v:p===QC.CSS_VAR&&c.setProperty(e,v)),S&&(O=1)}else o._value=v}else n&&m&&!_&&j<o._startTime&&(o._currentTime=0);d&&o._renderTransforms&&(c.transform=Qw(u),d=0),o=o._next}!n&&O&&e.onRender(e)}!n&&S&&e.onUpdate(e)}return a&&w?!n&&(a.began&&!M&&v>0&&!s||M&&v<=1e-11&&s)&&(e.onComplete(e),e.completed=!M):S&&C?l===1/0?e._startTime+=e.duration:e._currentIteration>=l-1&&(e.paused=!0,!s&&!m&&(e.completed=!0,!n&&!(a&&(M||!a.began))&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,O},hT=(e,t,n,r,i)=>{let a=e._currentIteration;if(mT(e,t,n,r,i),e._hasChildren){let o=e,s=o.backwards,c=r?t:o._iterationTime,l=Sw(),u=0,d=!0;if(!r&&o._currentIteration!==a){let e=o.iterationDuration;Yw(o,t=>{if(!s)!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&mT(t,e,n,1,ew.FORCE),t.began=!1,t.completed=!1;else{let r=t.duration,i=t._offset+t._delay,a=i+r;!n&&r<=1e-11&&(!i||a===e)&&t.onComplete(t)}}),n||o.onLoop(o)}Yw(o,e=>{let t=Ww((c-e._offset)*e._speed,12);if(s&&t>e._delay+e.duration)return;let a=e._fps<o._fps?e.requestTick(l):i;u+=mT(e,t,n,r,a),!e.completed&&d&&(d=!1)},s),!n&&u&&o.onRender(o),(d||s)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,n||(o.onComplete(o),o._resolve(o))))}},gT={},_T=(e,t,n)=>{if(n===QC.TRANSFORM)return uw.get(e)||e;if(n===QC.CSS||n===QC.ATTRIBUTE&&kw(t)&&e in t.style){let t=gT[e];if(t)return t;{let t=e&&bw(e);return gT[e]=t,t}}return e},vT=(e,t=!1)=>{if(e._hasChildren)Yw(e,e=>vT(e,t),!0);else{let n=e;n.pause(),Yw(n,e=>{let r=e.property,i=e.target,a=e._tweenType,o=e._inlineValue,s=Ow(o)||o===``;if(e._setter){if(!t&&!s){if(uT(o,fT),fT.d){let t=fT.d,n=e._numbers;for(let e=0,r=t.length;e<r;e++)n[e]=t[e]}else e._number=fT.n;e._setter(e.target,e._number,e)}}else if(a===QC.OBJECT)!t&&!s&&(i[r]=o);else if(i[rw]){if(a===QC.ATTRIBUTE)t||(s?i.removeAttribute(r):i.setAttribute(r,o));else{let t=i.style;if(a===QC.TRANSFORM){let n=i[aw];s?delete n[r]:n[r]=o,e._renderTransforms&&(Object.keys(n).length?t.transform=Qw(n):t.removeProperty(`transform`))}else s?t.removeProperty(bw(r)):t[r]=o}}i[rw]&&n._tail===e&&n.targets.forEach(e=>{e.getAttribute&&e.getAttribute(`style`)===``&&e.removeAttribute(`style`)})})}return e},yT=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=cw/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){let t=+e,n=t<1e-11?ow:t,r=cw/n;n>gw.frameRate&&(gw.frameRate=n),this._fps=n,this._frameDuration=r}get speed(){return this._speed}set speed(e){let t=+e;this._speed=t<1e-11?ow:t}requestTick(e){let t=this._frameDuration,n=e-this._lastTickTime,r=t*.25;return n+(r<4?r:4)<t?ew.NONE:(this._lastTickTime=n>=t?e-n%t:e,ew.AUTO)}computeDeltaTime(e){let t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},bT={animation:null,update:fw},xT=e=>{let t=bT.animation;return t||(t={duration:ow,computeDeltaTime:fw,_offset:0,_delay:0,_head:null,_tail:null},bT.animation=t,bT.update=()=>{e.forEach(e=>{for(let t in e){let n=e[t],r=n._head;if(r){let e=r._valueType,t=e===$C.COMPLEX||e===$C.COLOR?Jw(r._fromNumbers):null,i=r._fromNumber,a=n._tail;for(;a&&a!==r;){if(t)for(let e=0,n=a._numbers.length;e<n;e++)t[e]+=a._numbers[e];else i+=a._number;a=a._prevAdd}r._toNumber=i,r._toNumbers=t}}}),mT(t,1,1,0,ew.FORCE)}),t},ST=YC?requestAnimationFrame:setImmediate,CT=YC?cancelAnimationFrame:clearImmediate,wT=class extends yT{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=gw,this.paused=!0,this.reqId=0}update(){let e=this._currentTime=Sw();if(this.requestTick(e)){this.computeDeltaTime(e);let t=this._speed,n=this._fps,r=this._head;for(;r;){let i=r._next;r.paused?(Xw(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):hT(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):ew.AUTO),r=i}bT.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(Sw()),this.reqId=ST(ET)),this}pause(){if(this.reqId)return this.paused=!0,DT()}resume(){if(this.paused)return this.paused=!1,Yw(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(vw.timeScale===1?1:cw)}set speed(e){let t=e*vw.timeScale;this._speed!==t&&(this._speed=t,Yw(this,e=>e.speed=e._speed))}get timeUnit(){return vw.timeScale===1?`ms`:`s`}set timeUnit(e){let t=.001,n=e===`s`,r=n?t:1;if(vw.timeScale!==r){vw.timeScale=r,vw.tickThreshold=200*r;let e=n?t:cw;this.defaults.duration*=e,this._speed*=e}}get precision(){return vw.precision}set precision(e){vw.precision=e}},TT=(()=>{let e=new wT(Sw());return YC&&(yw.engine=e,ZC.addEventListener(`visibilitychange`,()=>{e.pauseOnDocumentHidden&&(ZC.hidden?e.pause():e.resume())})),e})(),ET=()=>{TT._head?(TT.reqId=ST(ET),TT.update()):TT.reqId=0},DT=()=>(CT(TT.reqId),TT.reqId=0,TT),OT={_rep:new WeakMap,_add:new Map},kT=(e,t,n=`_rep`)=>{let r=OT[n],i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},qde=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,AT=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=ow,e._currentTime=ow},jT=(e,t)=>{let n=e._composition;if(n===tw.replace){let n=e._absoluteStartTime;Zw(t,e,qde,`_prevRep`,`_nextRep`);let r=e._prevRep;if(r){let t=r.parent,i=r._absoluteEndTime;if(e.parent.id!==t.id&&t.iterationCount>1&&i+(t.duration-t.iterationDuration)>n){AT(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)AT(e),e=e._prevRep}let a=e._absoluteUpdateStartTime;if(i>a){let e=r._startTime,t=Ww(a-(i-(e+r._updateDuration))-e,12);r._changeDuration=t,r._currentTime=t,r._isOverlapped=1,t<1e-11&&AT(r)}let o=e.parent.parent;if(!o||o!==t.parent){let e=!0;if(Yw(t,t=>{t._isOverlapped||(e=!1)}),e){let e=t.parent;if(e){let n=!0;Yw(e,e=>{e!==t&&Yw(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}}else if(n===tw.blend){let t=kT(e.target,e.property,`_add`),n=xT(OT._add),r=t._head;r||(r={...e},r._composition=tw.replace,r._updateDuration=ow,r._startTime=0,r._numbers=Jw(e._fromNumbers),r._number=0,r._next=null,r._prev=null,Zw(t,r),Zw(n,r));let i=e._toNumber;if(e._fromNumber=r._fromNumber-i,e._toNumber=0,e._numbers=Jw(e._fromNumbers),e._number=0,r._fromNumber=i,e._toNumbers.length){let t=Jw(e._toNumbers);t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}Zw(t,e,null,`_prevAdd`,`_nextAdd`)}return e},Jde=e=>{let t=e._composition;if(t!==tw.none){let n=e.target,r=e.property,i=OT._rep.get(n)[r];if(Xw(i,e,`_prevRep`,`_nextRep`),t===tw.blend){let t=OT._add,i=t.get(n);if(!i)return;let a=i[r],o=bT.animation;Xw(a,e,`_prevAdd`,`_nextAdd`);let s=a._head;if(s&&s===a._tail){Xw(a,s,`_prevAdd`,`_nextAdd`),Xw(o,s);let e=!0;for(let t in i)if(i[t]._head){e=!1;break}e&&t.delete(n)}}}return e},MT=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),NT=e=>e._cancelled?(e._hasChildren?Yw(e,NT):Yw(e,e=>{e._composition!==tw.none&&jT(e,kT(e.target,e.property))}),e._cancelled=0,e):e,PT=0,Yde=(e,t)=>e._priority>t._priority,Xde=class extends yT{constructor(e={},t=null,n=0){super(0),++PT;let{id:r,delay:i,duration:a,reversed:o,alternate:s,loop:c,loopDelay:l,autoplay:u,frameRate:d,playbackRate:f,priority:p,onComplete:m,onLoop:h,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:y}=e;_w.current&&_w.current.register(this);let b=t?0:TT._lastTickTime,x=t?t.defaults:vw.defaults,S=Ew(i)||Dw(i)?x.delay:+i,C=Ew(a)||Dw(a)?1/0:+a,w=nT(c,x.loop),T=nT(l,x.loopDelay),E=w===!0||w===1/0||w<0?1/0:w+1,D=0;t?D=n:(TT.reqId||TT.requestTick(Sw()),D=(TT._lastTickTime-TT._startTime)*vw.timeScale),this.id=Dw(r)?PT:r,this.parent=t,this.duration=Kw((C+T)*E-T)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||x.onBegin,this.onBeforeUpdate=v||x.onBeforeUpdate,this.onUpdate=y||x.onUpdate,this.onLoop=h||x.onLoop,this.onPause=g||x.onPause,this.onComplete=m||x.onComplete,this.iterationDuration=C,this.iterationCount=E,this._autoplay=!t&&nT(u,x.autoplay),this._offset=D,this._delay=S,this._loopDelay=T,this._iterationTime=0,this._currentIteration=0,this._resolve=fw,this._running=!1,this._reversed=+nT(o,x.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=nT(s,x.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=nT(d,x.frameRate),this._speed=nT(f,x.playbackRate),this._priority=+nT(p,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return Uw(Ww(this._currentTime,vw.precision),-this._delay,this.duration)}set currentTime(e){let t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return Uw(Ww(this._iterationTime,vw.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return Uw(Ww(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return Uw(Ww(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){let t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*Uw(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return NT(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,hT(this,0,1,~~e,ew.FORCE),MT(this),this._hasChildren&&Yw(this,MT),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&hT(this,this.duration,1,~~e,ew.FORCE),this.reset(e);let t=this._autoplay;return t===!0?this.resume():t&&!Dw(t.linked)&&t.link(this),this}resetTime(){let e=1/(this._speed*TT._speed);return this._startTime=Sw()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?hT(this,ow,0,0,ew.FORCE):(this._running||=(Zw(TT,this,Yde),TT._hasChildren=!0,!0),this.resetTime(),this._startTime-=12,TT.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,n=0){NT(this),this.completed=!1;let r=this.paused;return this.paused=!0,hT(this,e+this._delay,~~t,~~n,ew.AUTO),r?this:this.resume()}alternate(){let e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?Bw(sw/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?Yw(this,e=>e.cancel(),!0):Yw(this,Jde),this._cancelled=1,this.pause()}stretch(e){let t=this.duration,n=qw(e);if(t===n)return this;let r=e/t,i=e<=ow;return this.duration=i?ow:n,this.iterationDuration=i?ow:qw(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){hT(this,0,1,0,ew.AUTO);let e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=fw){let t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=fw};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}};function FT(e){let t=Tw(e)?_w.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function Zde(e){if(Ow(e))return[];if(!YC)return Cw(e)&&e.flat(1/0)||[e];if(Cw(e)){let t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!Ow(r)){let e=FT(r);if(e)for(let t=0,r=e.length;t<r;t++){let r=e[t];if(!Ow(r)){let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}let t=FT(e);return t?Array.from(t):[e]}function Qde(e){let t=Zde(e),n=t.length;for(let e=0;e<n;e++){let n=t[e];if(!n[nw]){n[nw]=!0;let e=kw(n);(n.nodeType||e)&&(n[rw]=!0,n[iw]=e,n[aw]={})}}return t}var IT={deg:1,rad:180/Vw,turn:360},LT={},RT=(e,t,n,r=!1)=>{let i=t.u,a=t.n;if(t.t===$C.UNIT&&i===n)return t;let o=a+i+n,s=LT[o];if(!Dw(s)&&!r)t.n=s;else{let r;if(i in IT)r=a*IT[i]/IT[n];else{let t=e.cloneNode(),o=e.parentNode,s=o&&o!==ZC?o:ZC.body;s.appendChild(t);let c=t.style;c.width=100+i;let l=t.offsetWidth||100;c.width=100+n;let u=l/(t.offsetWidth||100);s.removeChild(t),r=u*a}t.n=r,LT[o]=r}return t.t,$C.UNIT,t.u=n,t},zT=e=>e,BT=(e=1.68)=>t=>Pw(t,+e),VT={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},$de=Vw/2,HT=Vw*2,UT={"":BT,Quad:BT(2),Cubic:BT(3),Quart:BT(4),Quint:BT(5),Sine:e=>1-Lw(e*$de),Circ:e=>1-Fw(1-e*e),Expo:e=>e?Pw(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=Pw(2,--n))-1)/11;);return 1/Pw(4,3-n)-7.5625*Pw((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{let n=Uw(+e,1,10),r=Uw(+t,ow,2),i=r/HT*Bde(1/n),a=HT/r;return e=>e===0||e===1?e:-n*Pw(2,-10*(1-e))*Iw((1-e-i)*a)}},WT=(()=>{let e={linear:zT,none:zT};for(let t in VT)for(let n in UT){let r=UT[n],i=VT[t];e[t+n]=n===``||n===`Back`||n===`Elastic`?(e,t)=>i(r(e,t)):i(r)}return e})(),GT={linear:zT,none:zT},efe=e=>{if(GT[e])return GT[e];if(e.indexOf(`(`)<=-1){let t=VT[e]||e.includes(`Back`)||e.includes(`Elastic`)?WT[e]():WT[e];return t?GT[e]=t:zT}{let t=e.slice(0,-1).split(`(`),n=WT[t[0]];return n?GT[e]=n(...t[1].split(`,`)):zT}},KT=[`steps(`,`irregular(`,`linear(`,`cubicBezier(`],qT=e=>{if(Tw(e)){for(let t=0,n=KT.length;t<n;t++)if(xw(e,KT[t]))return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``),zT}return Ew(e)?e:Tw(e)?efe(e):zT},JT=lT(),YT=lT(),XT={},ZT={func:null},QT={func:null},$T=[null],eE=[null,null],tE={to:null},tfe=0,nE=0,rE,iE,nfe=(e,t)=>{let n={};if(Cw(e)){let t=[].concat(...e.map(e=>Object.keys(e))).filter(Nw);for(let r=0,i=t.length;r<i;r++){let i=t[r];n[i]=e.map(e=>{let t={};for(let n in e){let r=e[n];Nw(n)?n===i&&(t.to=r):t[n]=r}return t})}}else{let r=nT(t.duration,vw.defaults.duration);Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o).forEach(e=>{let t=e.o,i=e.p;for(let e in i)if(Nw(e)){let a=n[e];a||=n[e]=[];let o=t*r,s=a.length,c=a[s-1],l={to:i[e]},u=0;for(let e=0;e<s;e++)u+=a[e].duration;s===1&&(l.from=c.to),i.ease&&(l.ease=i.ease),l.duration=o-(s?u:0),a.push(l)}return e});for(let e in n){let t=n[e],r;for(let e=0,n=t.length;e<n;e++){let n=t[e],i=n.ease;n.ease=r||void 0,r=i}t[0].duration||t.shift()}}return n},rfe=class extends Xde{constructor(e,t,n,r,i=!1,a=0,o){super(t,n,r),this._head,this._tail,++nE;let s=Qde(e),c=s.length,l=t.keyframes,u=l?Vde(nfe(l,t),t):t,{id:d,delay:f,duration:p,ease:m,playbackEase:h,modifier:g,composition:_,onRender:v}=u,y=n?n.defaults:vw.defaults,b=nT(m,y.ease),x=nT(h,y.playbackEase),S=x?qT(x):null,C=!Dw(b.ease),w=C?b.ease:nT(m,S?`linear`:y.ease),T=C?b.settlingDuration:nT(p,y.duration),E=nT(f,y.delay),D=g||y.modifier,O=Dw(_)&&c>=1e3?tw.none:Dw(_)?y.composition:_,k=this._offset+(n?n._offset:0);C&&(b.parent=this);let A=NaN,j=NaN,M=0,N=0;for(let e=0;e<c;e++){let t=s[e],r=a||e,c=o||s,l=NaN,d=NaN;for(let e in u)if(Nw(e)){let a=aT(t,e),o=eT(t,e),s=_T(e,t,a),f=u[e],p=Cw(f);if(i&&!p&&(eE[0]=f,eE[1]=f,f=eE),p){let e=f.length,t=!ww(f[0]);e===2&&t?(tE.to=f,$T[0]=tE,rE=$T):e>2&&t?(rE=[],f.forEach((e,t)=>{t?t===1?(eE[1]=e,rE.push(eE)):rE.push(e):eE[0]=e})):rE=f}else $T[0]=f,rE=$T;let m=null,h=null,g=NaN,_=0,v=0;for(let e=rE.length;v<e;v++){let i=rE[v];ww(i)?iE=i:(tE.to=i,iE=tE),ZT.func=null,QT.func=null;let l=iT(nT(iE.composition,O),t,r,c,null,null),u=Fde(l)?l:tw[l];!m&&u!==tw.none&&(m=kT(t,s));let d=m?m._tail:null,f=n&&d&&d.parent.parent===n?d:h,p=iT(iE.to,t,r,c,ZT,f),y;ww(p)&&!Dw(p.to)?(iE=p,y=p.to):y=p;let b=iT(iE.from,t,r,c,QT,f),x=iE.ease||w,S=iT(x,t,r,c,null,f),C=Ew(S)||Tw(S)?S:x,A=!Dw(C)&&!Dw(C.ease),j=A?C.ease:C,P=A?C.settlingDuration:iT(nT(iE.duration,e>1?iT(T,t,r,c,null,f)/e:T),t,r,c,null,f),ee=iT(nT(iE.delay,v?0:E),t,r,c,null,f),te=iE.modifier||D,ne=!Dw(b),F=!Dw(y),re=Cw(y),ie=re||ne&&F,ae=h?_:0,oe=h?_+ee:ee,se=Ww(k+oe,12),ce=Ww(k+ae,12);!N&&(ne||re)&&(N=1);let le=h;if(u!==tw.none){let e=m._head;for(;e&&e._absoluteStartTime<=se;)if(e._isOverridden||(le=e),e=e._nextRep,e&&e._absoluteStartTime>=se)for(;e;)AT(e),e=e._nextRep}if(ie){uT(re?iT(y[0],t,r,c,QT,f):b,JT),uT(re?iT(y[1],t,r,c,ZT,f):y,YT);let e=sT(t,s,a,XT);JT.t===$C.NUMBER&&(le?le._valueType===$C.UNIT&&(JT.t=$C.UNIT,JT.u=le._unit):(uT(e,fT),fT.t===$C.UNIT&&(JT.t=$C.UNIT,JT.u=fT.u)))}else F?uT(y,YT):h?dT(h,YT):uT(n&&le&&le.parent.parent===n?le._value:sT(t,s,a,XT),YT),ne?uT(b,JT):h?dT(h,JT):uT(n&&le&&le.parent.parent===n?le._value:sT(t,s,a,XT),JT);if(JT.o&&(JT.n=cT(le?le._toNumber:uT(sT(t,s,a,XT),fT).n,JT.n,JT.o)),YT.o&&(YT.n=cT(JT.n,YT.n,YT.o)),JT.t!==YT.t){if(JT.t===$C.COMPLEX||YT.t===$C.COMPLEX){let e=JT.t===$C.COMPLEX?JT:YT,t=JT.t===$C.COMPLEX?YT:JT;t.t=$C.COMPLEX,t.s=Jw(e.s),t.d=e.d.map(()=>t.n)}else if(JT.t===$C.UNIT||YT.t===$C.UNIT){let e=JT.t===$C.UNIT?JT:YT,t=JT.t===$C.UNIT?YT:JT;t.t=$C.UNIT,t.u=e.u}else if(JT.t===$C.COLOR||YT.t===$C.COLOR){let e=JT.t===$C.COLOR?JT:YT,t=JT.t===$C.COLOR?YT:JT;t.t=$C.COLOR,t.d=e.d.map(()=>0)}}if(JT.u!==YT.u){let e=YT.u?JT:YT;e=RT(t,e,YT.u?YT.u:JT.u,!1)}if(YT.d&&JT.d&&YT.d.length!==JT.d.length){let e=JT.d.length>YT.d.length?JT:YT,t=e===JT?YT:JT;t.d=e.d.map((e,n)=>Dw(t.d[n])?0:t.d[n]),t.s=Jw(e.s)}let ue=Ww(+P||1e-11,12),de=XT[s];Ow(de)||(XT[s]=null);let fe=o?o.set:null;_=Ww(oe+ue,12);let pe=JT.d,me=YT.d,he=YT.s,ge={parent:this,id:tfe++,property:s,target:t,_value:null,_toFunc:ZT.func,_fromFunc:QT.func,_ease:qT(j),_fromNumbers:pe?Jw(pe):lw,_toNumbers:me?Jw(me):lw,_strings:he?Jw(he):lw,_fromNumber:JT.n,_toNumber:YT.n,_numbers:pe?Jw(pe):lw,_number:JT.n,_unit:YT.u,_modifier:te,_currentTime:0,_startTime:oe,_delay:+ee,_updateDuration:ue,_changeDuration:ue,_absoluteStartTime:se,_absoluteUpdateStartTime:ce,_absoluteEndTime:Ww(k+_,12),_hasFromValue:ne||re?1:0,_tweenType:a,_setter:fe,_valueType:YT.t,_composition:u,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:de,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};u!==tw.none&&jT(ge,m);let _e=ge._valueType;if(_e===$C.COMPLEX)ge._value=pT(ge,1,-1);else if(_e===$C.UNIT)ge._value=`${te(ge._toNumber)}${ge._unit}`;else if(_e===$C.COLOR){let e=YT.d;ge._value=`rgba(${Ww(e[0],0)},${Ww(e[1],0)},${Ww(e[2],0)},${e[3]})`}else ge._value=te(ge._toNumber);isNaN(g)&&(g=ge._startTime),h=ge,M++,Zw(this,ge)}(isNaN(j)||g<j)&&(j=g),(isNaN(A)||_>A)&&(A=_),a===QC.TRANSFORM&&(l=M-v,d=M)}if(!isNaN(l)){let e=0;Yw(this,t=>{e>=l&&e<d&&(t._renderTransforms=1,t._composition===tw.blend&&Yw(bT.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}c||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),j?(Yw(this,e=>{e._startTime-e._delay||(e._delay-=j),e._startTime-=j}),A-=j):j=0,A||(A=ow,this.iterationCount=0),this.targets=s,this.id=Dw(d)?nE:d,this.duration=A===1e-11?ow:Kw((A+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=v||y.onRender,this._ease=S,this._delay=j,this.iterationDuration=A,!this._autoplay&&N&&this.onRender(this)}stretch(e){let t=this.duration;if(t===qw(e))return this;let n=e/t;return Yw(this,e=>{e._updateDuration=qw(e._updateDuration*n),e._changeDuration=qw(e._changeDuration*n),e._currentTime*=n,e._delay*=n,e._startTime*=n,e._absoluteStartTime*=n,e._absoluteUpdateStartTime*=n,e._absoluteEndTime*=n}),super.stretch(e)}refresh(){return Yw(this,e=>{let t=e._toFunc,n=e._fromFunc;(t||n)&&(n?(uT(n(),JT),JT.u!==e._unit&&e.target[rw]&&RT(e.target,JT,e._unit,!0),e._fromNumbers=Jw(JT.d),e._fromNumber=JT.n):t&&(uT(sT(e.target,e.property,e._tweenType),fT),e._fromNumbers=Jw(fT.d),e._fromNumber=fT.n),t&&(uT(t(),YT),e._toNumbers=Jw(YT.d),e._strings=Jw(YT.s),e._toNumber=YT.o?cT(e._fromNumber,YT.n,YT.o):YT.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),vT(this)}then(e){return super.then(e)}},aE=(e,t)=>vw.editor?vw.editor.addAnimation(e,t):new rfe(e,t,null,0,!1).init(),oE=cw*10,ife=class{constructor(e={}){let t=!Dw(e.bounce)||!Dw(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/cw,this.maxIterations=this.maxDuration/this.timeStep/cw,this.bn=Uw(nT(e.bounce,.5),-1,1),this.pd=Uw(nT(e.duration,628),10*vw.timeScale,oE*vw.timeScale),this.m=Uw(nT(e.mass,1),1,oE),this.s=Uw(nT(e.stiffness,100),ow,oE),this.d=Uw(nT(e.damping,10),ow,oE),this.v=Uw(nT(e.velocity,0),-oE,oE),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||fw,t&&this.calculateSDFromBD(),this.compute(),this.ease=e=>{let t=e*this.settlingDuration,n=this.completed,r=this.pd;return t>=r&&!n&&(this.completed=!0,this.onComplete(this.parent)),t<r&&n&&(this.completed=!1),e===0||e===1?e:this.solve(e*this.solverDuration)}}solve(e){let{zeta:t,w0:n,wd:r,b:i}=this,a=e;return a=t<1?zw(-a*t*n)*(1*Lw(r*a)+i*Iw(r*a)):t===1?(1+i*a)*zw(-a*n):((1+i)*zw((-t*n+r)*a)+(1-i)*zw((-t*n-r)*a))/2,1-a}calculateSDFromBD(){let e=vw.timeScale===1?this.pd/cw:this.pd;this.m=1,this.v=0,this.s=Pw(2*Vw/e,2),this.d=this.bn>=0?(1-this.bn)*4*Vw/e:4*Vw/(e*(1+this.bn)),this.s=Ww(Uw(this.s,ow,oE),3),this.d=Ww(Uw(this.d,ow,300),3)}calculateBDFromSD(){let e=2*Vw/Fw(this.s);this.pd=e*(vw.timeScale===1?cw:1),this.bn=this.d/(2*Fw(this.s))<=1?1-this.d*e/(4*Vw):4*Vw/(this.d*e)-1,this.bn=Ww(Uw(this.bn,-1,1),3),this.pd=Ww(Uw(this.pd,10*vw.timeScale,oE*vw.timeScale),3)}compute(){let{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:i,d:a,s:o,v:s}=this,c=this.w0=Uw(Fw(o/i),ow,cw),l=this.zeta=a/(2*Fw(o*i));l<1?(this.wd=c*Fw(1-l*l),this.b=(l*c+-s)/this.wd):l===1?(this.wd=0,this.b=-s+c):(this.wd=c*Fw(l*l-1),this.b=(l*c+-s)/this.wd);let u=0,d=0,f=0;for(;d<=e&&f<=t;)Rw(1-this.solve(u))<n?d++:d=0,this.solverDuration=u,u+=r,f++;this.settlingDuration=Ww(this.solverDuration*cw,0)*vw.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=Uw(nT(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=Uw(nT(e,1),10*vw.timeScale,oE*vw.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=Uw(nT(e,100),ow,oE),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=Uw(nT(e,10),ow,oE),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=Uw(nT(e,1),1,oE),this.compute()}get velocity(){return this.v}set velocity(e){this.v=Uw(nT(e,0),-oE,oE),this.compute()}},afe=e=>new ife(e),sE=(e=10,t)=>{let n=t?zde:Bw;return t=>n(Uw(t,0,1)*e)*(1/e)},cE=(0,I.forwardRef)(function({id:e,transform:t},n){return(0,R.jsxs)(`radialGradient`,{ref:n,id:e,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`-1.6`,r:`5.6`,gradientTransform:t,children:[(0,R.jsx)(`stop`,{offset:`0`,stopColor:`color-mix(in oklab, var(--color-white) calc(var(--depth) * 50%), currentColor)`}),(0,R.jsx)(`stop`,{offset:`1`,stopColor:`currentColor`})]})});function lE({id:e}){return(0,R.jsx)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,R.jsx)(`feDropShadow`,{dx:`0`,dy:`1.5`,stdDeviation:`1`,floodColor:`currentColor`,style:{floodOpacity:`calc(var(--depth) * 0.6)`}})})}function uE({id:e}){return(0,R.jsxs)(`filter`,{id:e,x:`-10%`,y:`-10%`,width:`120%`,height:`120%`,colorInterpolationFilters:`sRGB`,children:[(0,R.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.3`,result:`soft-edge`}),(0,R.jsx)(`feOffset`,{in:`soft-edge`,dx:`0.25`,dy:`0.45`,result:`lower-edge`}),(0,R.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`lower-edge`,operator:`out`,result:`inner-shadow`}),(0,R.jsx)(`feFlood`,{floodColor:`var(--color-black)`,floodOpacity:`calc(var(--depth) * 0.28)`}),(0,R.jsx)(`feComposite`,{in2:`inner-shadow`,operator:`in`,result:`shade`}),(0,R.jsx)(`feOffset`,{in:`soft-edge`,dx:`-0.2`,dy:`-0.35`,result:`upper-edge`}),(0,R.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`upper-edge`,operator:`out`,result:`inner-highlight`}),(0,R.jsx)(`feFlood`,{floodColor:`var(--color-white)`,floodOpacity:`calc(var(--depth) * 0.7)`}),(0,R.jsx)(`feComposite`,{in2:`inner-highlight`,operator:`in`,result:`highlight`}),(0,R.jsxs)(`feMerge`,{children:[(0,R.jsx)(`feMergeNode`,{in:`SourceGraphic`}),(0,R.jsx)(`feMergeNode`,{in:`shade`}),(0,R.jsx)(`feMergeNode`,{in:`highlight`})]})]})}var dE=Object.freeze({alphaIntercept:-8,alphaSlope:18,blurStdDeviation:2});function fE({id:e,values:t=gue}){return(0,R.jsxs)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,R.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:t.blurStdDeviation,result:`blur`}),(0,R.jsx)(`feColorMatrix`,{in:`blur`,values:`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${String(t.alphaSlope)} ${String(t.alphaIntercept)}`,result:`gooey`}),(0,R.jsx)(`feComposite`,{in:`SourceGraphic`,in2:`gooey`,operator:`atop`})]})}function pE(e,t){let n=e.ownerDocument,r=!0,i=()=>{t(r&&!n.hidden)},a=globalThis,o=`IntersectionObserver`in globalThis&&a.IntersectionObserver?new a.IntersectionObserver(t=>{let n=t.find(t=>t.target===e);n&&(r=n.isIntersecting,i())}):void 0;return o?.observe(e),n.addEventListener(`visibilitychange`,i),i(),()=>{o?.disconnect(),n.removeEventListener(`visibilitychange`,i)}}function mE(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function hE(e,t){let n=Math.max(0,Math.min(1,(t-(e-1)*.085)/.68));return Math.sin(n*Math.PI)**2}function gE(e,t,n){let r=n*Math.PI*2,i=t*2.1,a=Math.sin(r*2+i)*.15,o={rx:4*(1+a),ry:4/(1+a)};if(e===`line`){let e=7.5+4*Math.cos(r+(t===2?-.45:0));return{cx:(t-1)*e,cy:Math.sin(r+i)*.7,...o}}if(e===`square`){let e=4.7+2.7*Math.cos(r);return{cx:(t%2?1:-1)*e,cy:(t<2?-1:1)*e,...o}}if(e===`donut`){let e=mE(n/.66)*Math.PI*2,o=Math.min(e,t*Math.PI/8)-Math.PI/2,s=mE((n-.79)/.21),c=8+Math.sin(r*2+i)*.35*Math.sin(n*Math.PI);return{cx:Math.cos(o)*c*(1-s),cy:Math.sin(o)*c*(1-s)-8*s,rx:3.6*(1+a*Math.sin(n*Math.PI)),ry:3.6/(1+a*Math.sin(n*Math.PI))}}if(e===`bloom`){if(t===0){let e=[1,2,3,4].reduce((e,t)=>e+hE(t,n),0),t=Math.sqrt(49-e*4);return{cx:Math.sin(r)*.4,cy:Math.sin(r*2)*.4,rx:t*(1+a),ry:t/(1+a)}}let e=hE(t,n),i=(t-1)*Math.PI/2-Math.PI/4+Math.sin(r)*.22;return{cx:Math.cos(i)*14*e,cy:Math.sin(i)*14*e,rx:3.2*(1+a),ry:3.2/(1+a)}}return{cx:Math.sin(r+i)*6+Math.sin(r*3+i)*2.5,cy:Math.cos(r*2+i)*6,...o}}var ofe={line:1700,square:1900,donut:3e3,wander:4600,bloom:2800},sfe=2;function cfe({variant:e,pace:t=`working`}){let n=`caps-loader-${(0,I.useId)().replaceAll(`:`,``)}`,r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=HC(i),{reduced:o}=a,s=e===`donut`?16:e===`bloom`?5:e===`square`?4:3;return(0,I.useLayoutEffect)(()=>{if(!r.current||!i.current||o&&t===`idle`)return;let n=o?[aE(r.current,{opacity:[.55,1],duration:a.slow*10,ease:`inOutSine`,alternate:!0,loop:!0})]:[...r.current.querySelectorAll(`ellipse`)].map((n,r)=>aE(n,{keyframes:Array.from({length:48},(n,i)=>({...gE(e,r,(i+1)/48),duration:UC(a,ofe[e]*(t===`idle`?sfe:1))/48})),ease:`linear`,loop:!0})),s=pE(i.current,e=>{for(let t of n)e?t.resume():t.pause()});return()=>{s();for(let e of n)e.revert()}},[e,t,o,a]),(0,R.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,focusable:`false`,viewBox:e===`line`?`-20 -10 40 20`:`-20 -20 40 40`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(fE,{id:n,values:dE}),(0,R.jsx)(cE,{id:`${n}-surface`,transform:e===`line`?`matrix(3.4 0 0 1.4 0 0)`:`matrix(3 0 0 3 0 0)`}),(0,R.jsx)(lE,{id:`${n}-shadow`}),(0,R.jsx)(`mask`,{id:`${n}-mask`,maskUnits:`userSpaceOnUse`,x:`-20`,y:`-20`,width:`40`,height:`40`,style:{maskType:`alpha`},children:(0,R.jsx)(`g`,{ref:r,fill:`currentColor`,filter:`url(#${n})`,children:Array.from({length:s},(t,n)=>(0,R.jsx)(`ellipse`,{...gE(e,n,0)},n))})})]}),(0,R.jsx)(`g`,{filter:`url(#${n}-shadow)`,children:(0,R.jsx)(`rect`,{x:`-20`,y:`-20`,width:`40`,height:`40`,fill:`url(#${n}-surface)`,mask:`url(#${n}-mask)`})})]})}var lfe={sm:`caps-loader-sm`,md:`caps-loader-md`,lg:`caps-loader-lg`,fill:`caps-loader-fill`},ufe={neutral:`text-base-content`,accent:`text-accent`,primary:`text-primary`,success:`text-success`,current:`text-current`},_E=(0,I.forwardRef)(function({"aria-label":e,"aria-labelledby":t,className:n,decorative:r=!1,label:i=`Loading`,size:a=`md`,variant:o=`line`,pace:s=`working`,tone:c=`neutral`,...l},u){let d=`${(0,I.useId)()}-label`,f=!r&&e===void 0&&t===void 0;return(0,R.jsxs)(`span`,{...l,"aria-label":r?void 0:e,"aria-hidden":r||void 0,"aria-labelledby":r?void 0:t??(e===void 0?d:void 0),className:RC(`caps-loader`,lfe[a],ufe[c],n),"data-variant":o,"data-pace":s,role:r?void 0:`status`,ref:u,children:[(0,R.jsx)(cfe,{variant:o,pace:s}),f?(0,R.jsx)(JC,{id:d,children:i}):null]})}),vE=`disabled:bg-base-200 disabled:text-base-content disabled:outline-1 disabled:outline-solid disabled:outline-base-content/25 aria-disabled:bg-base-200 aria-disabled:text-base-content aria-disabled:outline-1 aria-disabled:outline-solid aria-disabled:outline-base-content/25`,dfe=Cue(`btn caps-button disabled:pointer-events-none`,{variants:{variant:{primary:`btn-primary caps-button-filled`,secondary:`btn-secondary caps-button-filled`,accent:`btn-accent caps-button-filled`,destructive:`btn-error caps-button-filled`,outline:`btn-outline ${vE}`,ghost:`btn-ghost`,"ghost-destructive":`btn-ghost caps-button-ghost-destructive`,link:`btn-link ${vE}`},size:{xs:`btn-xs`,sm:`btn-sm`,default:`btn-md`,lg:`btn-lg`,icon:`btn-square btn-md`,menubar:`caps-button-menubar`}},defaultVariants:{variant:`primary`,size:`default`}}),yE=(0,I.forwardRef)(function({asChild:e=!1,children:t,className:n,disabled:r,loading:i=!1,result:a,resultLabel:o,onResultEnd:s,size:c=`default`,variant:l=`primary`,...u},d){let f=RC(dfe({size:c,variant:l}),n),p=(0,I.useRef)(a).current,m=(0,I.useRef)(null);return(0,I.useImperativeHandle)(d,()=>m.current),ffe(m,i,a),e?(0,R.jsx)(nC,{...u,"aria-busy":i?!0:u[`aria-busy`],"aria-disabled":r===!0||i?!0:void 0,className:f,ref:m,children:t}):(0,R.jsx)(`button`,{...u,"aria-busy":i?!0:u[`aria-busy`],className:f,disabled:r===!0||i,ref:m,type:u.type??`button`,children:a===void 0&&o===void 0?(0,R.jsxs)(R.Fragment,{children:[i?(0,R.jsx)(_E,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,t]}):(0,R.jsx)(gfe,{label:o,loading:i,onResultEnd:s,result:a,settled:p,children:t})})});function ffe(e,t,n){let r=(0,I.useRef)(null),i=(0,I.useRef)(null),a=(0,I.useRef)(null);(0,I.useLayoutEffect)(()=>{let o=e.current;if(!o)return;let s=JSON.stringify([t,n??null,o.textContent]),c=s!==i.current;i.current=s;let l=a.current;if(!c&&l)return;let u=l?o.offsetWidth:r.current;l&&(a.current=null,l.cancel(),o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`));let d=o.offsetWidth;if(r.current=d>0?d:null,!c||u===null||d===0||Math.abs(u-d)<1||!GC(o))return;let f=VC(o);if(f.reduced)return;let p=o.animate([{width:`${String(u)}px`},{width:`${String(d)}px`}],{duration:f.normal,easing:WC(f,f.ease)});a.current=p,o.style.overflow=`clip`,o.style.whiteSpace=`nowrap`;let m=()=>{a.current===p&&(a.current=null,o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`))};p.onfinish=m,p.oncancel=m})}var pfe=1100;function mfe(e,t){let n=t.bounce/.3,r=1+.05*Math.min(1.4,.4+n),i=1-.02*Math.min(1.4,n);return e.animate([{transform:`scale(1)`},{transform:`scale(${String(r)})`,offset:.35},{transform:`scale(${String(i)})`,offset:.7},{transform:`scale(1)`}],{duration:t.springDuration,easing:WC(t,`ease-out`)})}function hfe(e,t){let n=t.shake;return e.animate([{transform:`none`},{transform:`translateX(${String(-n)}px)`},{transform:`translateX(${String(n)}px)`},{transform:`translateX(${String(-n*.6)}px)`},{transform:`translateX(${String(n*.3)}px)`},{transform:`none`}],{duration:t.slow*1.3,easing:WC(t,`linear`)})}function bE(e,t,n){let r=n.distance+2,i=`blur(${String(n.blur)}px)`;return[e.animate([{opacity:1,transform:`none`,filter:`blur(0px)`},{opacity:0,transform:`translateY(${String(-r)}px)`,filter:i}],{duration:n.fast,easing:WC(n,n.ease)}),t.animate([{opacity:0,transform:`translateY(${String(r)}px)`,filter:i},{opacity:1,transform:`none`,filter:`blur(0px)`}],{duration:n.normal,easing:WC(n,n.ease),fill:`backwards`})]}function gfe({children:e,label:t,loading:n,onResultEnd:r,result:i,settled:a}){let o=(0,I.useRef)(null),s=qC(),[c,l]=(0,I.useState)(!1),[u,d]=(0,I.useState)(!1);c&&!u&&d(!0);let f=(0,I.useRef)(a),p=(0,I.useRef)(r);(0,I.useEffect)(()=>{p.current=r},[r]),(0,I.useLayoutEffect)(()=>{let e=f.current;if(f.current=i,i===e)return;if(i===`done`){l(!0);let e=setTimeout(()=>{p.current?p.current():l(!1)},pfe);return()=>{clearTimeout(e)}}l(!1);let t=o.current;if(i!==`failed`||!t||!GC(t))return;let n=VC(t);if(n.shake<=0)return;let r=hfe(t,n);return()=>{r.cancel()}},[i,s]);let m=(0,I.useRef)(c);return(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e||m.current===c)return;m.current=c;let t=e.querySelector(`[data-face="label"]`),n=e.querySelector(`[data-face="result"]`);if(!t||!n||!GC(e)){c||d(!1);return}let r=VC(e),i=c?bE(t,n,r):bE(n,t,r);if(c||i[0]?.addEventListener(`finish`,()=>{d(!1)}),c&&!r.reduced){i.push(mfe(e.closest(`button`)??e,r));let t=n.querySelector(`path`);t&&i.push(t.animate([{strokeDashoffset:1},{strokeDashoffset:0}],{duration:r.normal*1.4,delay:r.fast/2,easing:WC(r,r.ease),fill:`backwards`}))}return()=>{for(let e of i)e.cancel()}},[c,s]),(0,R.jsxs)(`span`,{ref:o,className:`caps-button-faces`,"data-showing":c?`result`:`label`,children:[(0,R.jsxs)(`span`,{className:`caps-button-face`,"data-face":`label`,"aria-hidden":c?!0:void 0,children:[n||c?(0,R.jsx)(_E,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,e]}),u?(0,R.jsxs)(`span`,{className:`caps-button-face`,"data-face":`result`,"aria-hidden":!c||void 0,children:[(0,R.jsx)(`svg`,{className:`caps-button-check`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,R.jsx)(`path`,{d:`M4.5 12.5 9.5 17.5 19.5 6.5`,pathLength:1})}),t===void 0?e:t]}):null]})}var xE=new Map([[`0`,[`###`,`#.#`,`#.#`,`#.#`,`###`]],[`1`,[`.#.`,`##.`,`.#.`,`.#.`,`###`]],[`2`,[`###`,`..#`,`###`,`#..`,`###`]],[`3`,[`###`,`..#`,`.##`,`..#`,`###`]],[`4`,[`#.#`,`#.#`,`###`,`..#`,`..#`]],[`5`,[`###`,`#..`,`###`,`..#`,`###`]],[`6`,[`###`,`#..`,`###`,`#.#`,`###`]],[`7`,[`###`,`..#`,`.#.`,`.#.`,`.#.`]],[`8`,[`###`,`#.#`,`###`,`#.#`,`###`]],[`9`,[`###`,`#.#`,`###`,`..#`,`###`]],[`:`,[`.`,`#`,`.`,`#`,`.`]],[`.`,[`.`,`.`,`.`,`.`,`#`]],[`+`,[`...`,`.#.`,`###`,`.#.`,`...`]],[`-`,[`...`,`...`,`###`,`...`,`...`]],[`/`,[`..#`,`..#`,`.#.`,`#..`,`#..`]],[`×`,[`...`,`#.#`,`.#.`,`#.#`,`...`]],[`%`,[`#.#`,`..#`,`.#.`,`#..`,`#.#`]],[` `,[`.`,`.`,`.`,`.`,`.`]]]),_fe=[`.`,`.`,`.`,`.`,`.`],vfe=Object.freeze([...xE.keys()]);function yfe(e,t=0,n=!1){if(!Number.isFinite(e))throw RangeError(`PixelNumber needs a finite number`);let r=String(Math.trunc(Math.abs(e))).padStart(t,`0`),i=String(Math.abs(e)).split(`.`)[1];return SE(`${e<0?`-`:n&&e>0?`+`:``}${r}${i?`.${i}`:``}`)}function SE(e){for(let t of e)if(!xE.has(t))throw RangeError(`PixelNumber cannot draw "${t}"; use digits and ${vfe.filter(e=>!/\d/.test(e)).join(` `)}`);return e}function CE(e,t){let n=new Set,r=t;for(let i of e){let e=xE.get(i)??_fe;e.forEach((e,i)=>{for(let a=0;a<e.length;a++)e.charAt(a)===`#`&&n.add(`${String(r+a)},${String(i+t)}`)}),r+=(e.at(0)?.length??1)+1}return{lit:n,width:Math.max(1,r-1-t)+t*2}}function wE(e){let t=new Set;for(let n of e){let[r=0,i=0]=n.split(`,`).map(Number);for(let n=-1;n<=1;n++)for(let a=-1;a<=1;a++){let o=`${String(r+a)},${String(i+n)}`;e.has(o)||t.add(o)}}return t}function TE(e,t,n){let r=[];for(let i=0;i<n;i++){let n=-1;for(let a=0;a<=t;a++){let t=e.has(`${String(a)},${String(i)}`);t&&n<0&&(n=a),!t&&n>=0&&(r.push([n,i,a-n]),n=-1)}}return r}function EE({runs:e,className:t}){return(0,R.jsx)(`g`,{className:t,children:e.map(([e,t,n])=>(0,R.jsx)(`rect`,{x:e,y:t,width:n,height:1},`${String(e)}-${String(t)}`))})}var DE=(0,I.forwardRef)(function({value:e,text:t,pad:n,signed:r,size:i=`md`,tone:a=`current`,outline:o=!1,className:s,...c},l){if(t===void 0&&e===void 0)throw TypeError(`PixelNumber needs a value or text`);let u=t===void 0?yfe(e??NaN,n,r):SE(t),d=+!!o,{lit:f,width:p}=CE(u,d),m=5+d*2,h=OE[i];return(0,R.jsxs)(`span`,{...c,ref:l,className:RC(`caps-pixel-number`,s),"data-size":i,"data-tone":a,"data-outline":o,children:[(0,R.jsxs)(`svg`,{"aria-hidden":`true`,focusable:`false`,viewBox:`0 0 ${String(p)} ${String(m)}`,width:p*h,height:m*h,children:[o?(0,R.jsx)(EE,{className:`caps-pixel-number-outline`,runs:TE(wE(f),p,m)}):null,(0,R.jsx)(EE,{className:`caps-pixel-number-face`,runs:TE(f,p,m)})]}),(0,R.jsx)(`span`,{className:`sr-only`,children:u})]})}),OE={sm:2,md:3,lg:4,xl:6},kE=Object.freeze({ease:`linear`,duration:0});function AE(e,t){let n=xde(e,t.duration);return n<=0?kE:e.steps>0?{ease:sE(e.steps),duration:n}:{ease:afe({bounce:bde(e,t.bounce),duration:n}),duration:n}}function jE(e,t){let n=UC(e,t.duration);return{ease:e.steps>0?sE(e.steps):t.ease,duration:n}}var ME={dot:{y:-4,height:8,cy:0},pill:{y:-16,height:32,cy:0},bang:{y:-16,height:20,cy:12}};function NE({className:e,glyph:t,motion:n}){let r=`caps-status-${(0,I.useId)().replaceAll(`:`,``)}`,i=(0,I.useRef)(null),a=(0,I.useRef)(null),o=(0,I.useRef)(null),s=(0,I.useRef)(null),c=(0,I.useRef)(null),l=(0,I.useRef)(null),u=(0,I.useRef)(ME[t]).current,d=(0,I.useRef)(t===`dot`?1:4).current,f=(0,I.useRef)(+(t===`bang`)).current,p=(0,I.useRef)(t),m=HC(s),{reduced:h}=m;return(0,I.useLayoutEffect)(()=>{if(!i.current||!a.current||!c.current||!l.current)return;let e=ME[t],n=h||p.current===t;p.current=t;let r=VC(i.current),o=n?{duration:0}:AE(r,{bounce:.3,duration:360}),s=aE(i.current,{y:e.y,height:e.height,...o}),u=aE(a.current,{cy:e.cy,...n?{duration:0}:{delay:UC(r,35),...AE(r,{bounce:.3,duration:420})}}),d=aE(c.current,{gradientTransform:`matrix(1 0 0 ${t===`dot`?`1`:`4`} 0 0)`,...o}),f=aE(l.current,{opacity:+(t===`bang`),...n?kE:jE(r,{ease:`inOutSine`,duration:220})});return()=>{s.cancel(),u.cancel(),d.cancel(),f.cancel()}},[t,h]),(0,I.useLayoutEffect)(()=>{if(!o.current||!s.current||h||n===`none`)return;let e=n===`pulse`?aE(o.current,{opacity:[1,.45],...jE(m,{ease:`inOutSine`,duration:750}),alternate:!0,loop:!0}):aE(o.current,{keyframes:{"0%":{translateY:0,scaleX:1,scaleY:1},"18%":{translateY:.25,scaleX:1.1,scaleY:.91},"42%":{translateY:-1.3,scaleX:.94,scaleY:1.06},"62%":{translateY:-1.65,scaleX:1,scaleY:1},"82%":{translateY:.15,scaleX:1.06,scaleY:.95},"100%":{translateY:0,scaleX:1,scaleY:1}},...jE(m,{ease:`inOutSine`,duration:1e3}),loop:!0}),t=pE(s.current,t=>{t?e.resume():e.pause()});return()=>{t(),e.revert()}},[n,h,m]),(0,R.jsxs)(`svg`,{ref:s,"aria-hidden":`true`,className:`caps-status-bead ${e??``}`,width:`8`,height:`8`,viewBox:`-4 -4 8 8`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(fE,{id:r,values:dE}),(0,R.jsx)(cE,{ref:c,id:`${r}-surface`,transform:`matrix(1 0 0 ${String(d)} 0 0)`}),(0,R.jsxs)(`radialGradient`,{id:`${r}-drop-light`,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`10.4`,r:`5.6`,children:[(0,R.jsx)(`stop`,{offset:`0`,stopColor:`var(--color-white)`,style:{stopOpacity:`calc(var(--depth) * 0.5)`}}),(0,R.jsx)(`stop`,{offset:`1`,stopColor:`var(--color-white)`,stopOpacity:`0`})]}),(0,R.jsx)(lE,{id:`${r}-shadow`}),(0,R.jsx)(`mask`,{id:`${r}-silhouette`,maskUnits:`userSpaceOnUse`,x:`-12`,y:`-24`,width:`24`,height:`48`,style:{maskType:`alpha`},children:(0,R.jsxs)(`g`,{fill:`var(--color-white)`,filter:`url(#${r})`,children:[(0,R.jsx)(`rect`,{ref:i,x:`-4`,y:u.y,width:`8`,height:u.height,rx:`4`}),(0,R.jsx)(`circle`,{ref:a,cx:`0`,cy:u.cy,r:`4`})]})})]}),(0,R.jsx)(`g`,{ref:o,filter:`url(#${r}-shadow)`,children:(0,R.jsxs)(`g`,{mask:`url(#${r}-silhouette)`,children:[(0,R.jsx)(`rect`,{x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-surface)`}),(0,R.jsx)(`rect`,{ref:l,x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-drop-light)`,opacity:f})]})})]})}var PE=.28;function FE(e,t){switch(e){case`ring`:return{dashes:1,track:0,arc:0,sweep:0,disc:0,tick:0,cross:0};case`arc`:return{dashes:0,track:1,arc:1,sweep:t===void 0?PE:Math.min(1,Math.max(0,t)),disc:0,tick:0,cross:0};case`check`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:1,cross:0};case`cross`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:0,cross:1}}}var IE=7.25;function LE({className:e,glyph:t,progress:n}){let r=`caps-status-mark-${(0,I.useId)().replaceAll(`:`,``)}`,i=(0,I.useRef)(null),a=(0,I.useRef)(null),o=(0,I.useRef)(null),s=(0,I.useRef)(null),c=(0,I.useRef)(null),l=(0,I.useRef)(null),u=(0,I.useRef)(null),d=(0,I.useRef)(null),f=(0,I.useRef)(FE(t,n)).current,p=(0,I.useRef)(t),m=qC();(0,I.useLayoutEffect)(()=>{let e=i.current,r=a.current,c=o.current,f=s.current,h=l.current,g=u.current,_=d.current;if(!e||!r||!c||!f||!h||!g||!_)return;let v=FE(t,n),y=p.current;p.current=t;let b=VC(e),x=m||y===t&&t!==`arc`,S=x?m?{ease:b.ease,duration:b.fast}:kE:jE(b,{ease:`outQuad`,duration:160}),C=(t===`check`||t===`cross`)&&!x,w=jE(b,{ease:`inOutSine`,duration:220}),T=[aE(r,{opacity:v.dashes,...S}),aE(c,{opacity:v.track*.28,...S}),aE(f,{opacity:v.arc,"stroke-dasharray":`${String(v.sweep)} 1`,...x?m?kE:S:w}),aE(h,{r:v.disc*IE,...C?{delay:w.duration*.7,...AE(b,{bounce:.35,duration:360})}:m?kE:jE(b,{ease:`inCubic`,duration:140})}),aE(g,{"stroke-dashoffset":1-v.tick,...C&&v.tick>0?{delay:w.duration*.7+b.fast,...jE(b,{ease:`outCubic`,duration:240})}:kE}),aE(_,{"stroke-dashoffset":1-v.cross,...C&&v.cross>0?{delay:w.duration*.7+b.fast,...jE(b,{ease:`outCubic`,duration:240})}:kE})];return t===`cross`&&C&&b.shake>0&&T.push(aE(e,{translateX:[0,-b.shake,b.shake,-b.shake/2,0],delay:w.duration+b.fast,...jE(b,{ease:`linear`,duration:300})})),()=>{for(let e of T)e.cancel()}},[t,n,m]);let h=t===`arc`&&n===void 0&&!m;return(0,I.useLayoutEffect)(()=>{if(!h||!c.current||!i.current)return;let e=VC(i.current),t=aE(c.current,{rotate:[0,360],...jE(e,{ease:`linear`,duration:900}),loop:!0}),n=pE(i.current,e=>{e?t.resume():t.pause()});return()=>{n(),t.revert()}},[h]),(0,R.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,className:`caps-status-mark ${e??``}`,viewBox:`0 0 16 16`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(cE,{id:`${r}-surface`,transform:`matrix(1.6 0 0 1.6 8 8)`}),(0,R.jsxs)(`mask`,{id:`${r}-knock`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`16`,height:`16`,children:[(0,R.jsx)(`rect`,{width:`16`,height:`16`,fill:`var(--color-white)`}),(0,R.jsx)(`path`,{ref:u,d:`M4.9 8.3 7.1 10.5 11.2 5.9`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.tick}),(0,R.jsx)(`path`,{ref:d,d:`M5.4 5.4 10.6 10.6 M10.6 5.4 5.4 10.6`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.cross})]})]}),(0,R.jsx)(`circle`,{ref:a,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`1.7 2.2`,opacity:f.dashes}),(0,R.jsx)(`circle`,{ref:o,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,opacity:f.track*.28}),(0,R.jsx)(`g`,{ref:c,className:`caps-status-mark-spin`,children:(0,R.jsx)(`circle`,{ref:s,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`${String(f.sweep)} 1`,transform:`rotate(-90 8 8)`,opacity:f.arc})}),(0,R.jsx)(`circle`,{ref:l,cx:`8`,cy:`8`,r:f.disc*IE,fill:`url(#${r}-surface)`,mask:`url(#${r}-knock)`})]})}var RE=new Set([`ring`,`arc`,`check`,`cross`]);function zE(e){return RE.has(e)}var BE={neutral:`text-base-content`,primary:`text-primary`,secondary:`text-secondary`,accent:`text-accent`,success:`text-success`,info:`text-info`,warning:`text-warning`,error:`text-error`},VE=(0,I.forwardRef)(function({className:e,label:t,glyph:n=`dot`,motion:r=`none`,tone:i=`neutral`,size:a=`default`,appearance:o=`plain`,progress:s,...c},l){return(0,R.jsxs)(`span`,{...c,className:RC(`caps-status`,a===`compact`&&`caps-status-compact`,o===`chip`&&`caps-status-chip`,e),"data-tone":o===`chip`?i:void 0,"data-glyph":n,"data-motion":r,ref:l,children:[zE(n)?(0,R.jsx)(LE,{className:BE[i],glyph:n,progress:s}):(0,R.jsx)(NE,{className:BE[i],glyph:n,motion:r}),t===void 0?null:(0,R.jsx)(`span`,{children:t})]})});function HE({icon:e,caption:t}){return(0,R.jsxs)(`span`,{className:`caps-icon-choice-mark`,"aria-hidden":`true`,children:[(0,R.jsx)(`span`,{className:`caps-icon-choice-art`,children:e}),t?(0,R.jsx)(`span`,{className:`caps-icon-choice-caption`,children:t}):null,(0,R.jsx)(`span`,{className:`caps-icon-choice-lamp`})]})}var UE=(0,I.forwardRef)(function({label:e,icon:t,caption:n,on:r,stateLabels:i=[`on`,`off`],className:a,...o},s){return(0,R.jsxs)(`span`,{...o,className:RC(`caps-icon-lamp`,a),"data-on":r,ref:s,children:[(0,R.jsx)(HE,{icon:t,caption:n}),(0,R.jsxs)(`span`,{className:`sr-only`,children:[e,`: `,r?i[0]:i[1]]})]})}),WE=(0,I.forwardRef)(function({items:e,stateLabels:t,className:n,...r},i){return(0,R.jsx)(`ul`,{...r,className:RC(`caps-icon-lamps`,n),ref:i,children:e.map(({id:e,...n})=>(0,R.jsx)(`li`,{children:(0,R.jsx)(UE,{...n,...t===void 0?{}:{stateLabels:t}})},e))})}),GE=(0,I.forwardRef)(function({className:e,size:t=`md`,depth:n=`shallow`,placement:r=`standalone`,...i},a){return(0,R.jsx)(`div`,{...i,ref:a,"data-surface-size":t,"data-surface-depth":n,"data-surface-placement":r,className:RC(`caps-surface`,e)})}),KE=(0,I.forwardRef)(function({className:e,...t},n){return(0,R.jsx)(`div`,{...t,ref:n,className:RC(`caps-screen`,e)})}),qE=(0,I.forwardRef)(function({children:e,className:t,depth:n=`deep`,fit:r=`content`,density:i=`normal`,...a},o){let s=r===`fill`;return(0,R.jsx)(GE,{...a,className:RC(t,s&&`flex min-h-0 flex-1`),depth:n,ref:o,children:(0,R.jsx)(`div`,{className:RC(`caps-display-gasket`,s&&`flex min-h-0 min-w-0 flex-1`),"data-display-density":i,children:(0,R.jsx)(KE,{className:RC(s&&`flex min-h-0 min-w-0 flex-1 overflow-hidden`),children:e})})})}),bfe=(0,I.forwardRef)(function({className:e,icon:t,status:n,title:r,...i},a){return(0,R.jsxs)(`header`,{...i,className:RC(`caps-screen-header`,e),ref:a,children:[t?(0,R.jsx)(`span`,{className:`caps-screen-header-icon`,"aria-hidden":`true`,children:t}):null,(0,R.jsx)(`span`,{className:`caps-screen-header-title`,children:r}),n?(0,R.jsx)(`span`,{className:`caps-screen-header-status`,children:n}):null]})}),xfe=(0,I.forwardRef)(function({appearance:e,className:t,...n},r){return(0,R.jsx)(`div`,{...n,className:RC(`caps-screen-cells`,t),"data-appearance":e===`compact`?e:void 0,ref:r})}),JE=(0,I.forwardRef)(function({children:e,className:t,legend:n,readout:r,icon:i,appearance:a,wide:o=!1,...s},c){return(0,R.jsxs)(`div`,{...s,className:RC(`caps-screen-cell`,t),"data-wide":o||void 0,"data-appearance":a===`compact`?a:void 0,ref:c,children:[i?(0,R.jsx)(`span`,{className:`caps-screen-cell-icon`,children:i}):null,n?(0,R.jsx)(`span`,{className:`caps-screen-cell-legend`,children:n}):null,r?(0,R.jsx)(`span`,{className:`caps-screen-cell-readout`,children:r}):null,a===`compact`?(0,R.jsx)(`div`,{className:`caps-screen-cell-controls`,children:e}):e]})}),YE={coral:`var(--stipe-art-coral, #ff6558)`,blue:`var(--stipe-art-blue, #43a6f2)`,mint:`var(--stipe-art-mint, #63cfaa)`,grape:`var(--stipe-art-grape, #a66cc1)`,yellow:`var(--stipe-art-yellow, #ffd05d)`,cream:`var(--stipe-art-cream, #fff4de)`,ink:`var(--stipe-art-ink, #242c28)`,graphite:`var(--stipe-art-graphite, #49423f)`,inkcap:`var(--stipe-art-inkcap, #80499d)`},XE=`light-dark(var(--stipe-sketch-ink, #242c28), var(--stipe-art-cream, #fff4de))`,Sfe=`var(--color-base-100, light-dark(#fff4de, #242c28))`;function ZE({transform:e,fill:t=XE}){return(0,R.jsx)(`path`,{transform:e,style:{fill:t},d:`M-1.264-9.479C-2.098-8.643-1.802-1.057-.907-.332.47.782 1.6-.446 1.618-3.075 1.623-3.888 1.691-5.398 1.77-6.429 1.979-9.202 1.596-10 .055-10-.588-10-.843-9.9-1.264-9.479Z`})}function Cfe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(ZE,{transform:`translate(25.4 19.8) rotate(-39) scale(.95 .76)`}),(0,R.jsx)(ZE,{transform:`translate(32.1 17.8) scale(.96 .95)`}),(0,R.jsx)(ZE,{transform:`translate(38.8 19.9) rotate(39) scale(.95 .77)`})]})}function wfe(){return(0,R.jsxs)(`g`,{style:{fill:YE.blue},children:[(0,R.jsx)(`path`,{d:`M10.574 .604C9.804 1.375 9.867-.885 9.961 22.81 10.054 47.202 9.722 45.378 14.193 45.94 25.813 47.399 38.465 52.211 44.662 57.532 47.653 60.097 48.082 59.411 47.967 52.242L47.734 19.335C47.734 17.523 47.13 16.616 45.964 15.076 40.604 8.018 30.127 2.767 16.804 .462 13.045-.184 11.326-.148 10.574 .604Z`}),(0,R.jsx)(`path`,{d:`M81.571 .746C71.063 2.665 62.221 6.713 56.562 12.199 54.242 14.45 52 17.356 52.115 19.335L52.033 52.628C51.927 59.934 51.979 59.994 55.74 57.091 62.423 51.931 71.272 48.541 84.103 46.221 90.625 45.039 89.967 47.631 90.145 22.432 90.326-3.079 91.148-1 81.571 .746Z`}),(0,R.jsx)(`path`,{d:`M1.906 12.692C.1 13.42 .151 12.804 .151 33.825 .151 54.097 .163 54.302 1.447 55.498 2.71 56.674 3.384 56.81 7.937 56.816 20.943 56.834 30.647 58.293 38.776 61.45 45.964 64.242 46.435 61.924 39.526 57.773 32.296 53.429 26.656 51.544 14.943 49.553 5.958 48.027 6.535 49.414 6.408 29.003 6.32 14.74 6.263 13.103 5.816 12.764 5.254 12.335 2.9 12.293 1.906 12.692Z`}),(0,R.jsx)(`path`,{d:`M94.326 12.858C93.656 13.326 93.656 13.326 93.653 28.492 93.653 48.882 93.997 48.063 84.743 49.556 73.574 51.36 64.45 54.695 57.801 59.405 54.082 62.039 55.384 63.864 59.722 62.1 68.897 58.372 76.363 57.115 90.03 56.994 100.405 56.903 99.489 58.976 99.773 34.976 100.018 14.142 100.006 13.958 98.399 12.979 97.236 12.269 95.251 12.208 94.326 12.858Z`})]})}function QE(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M-8.572-25.123C-21.412-23.39-33.235-17.39-44.235-7.027-51.235-.433-51.251 .358-44.524 6.749-20.77 29.316 10.23 31.893 36.364 13.487 41.043 10.187 48.193 3.551 49.235 1.524 50.358-.642 49.471-2.102 43.738-7.497 29.257-21.128 9.968-27.631-8.572-25.123Z`}),(0,R.jsx)(`path`,{style:{fill:YE.ink},d:`M-6.225-16.807C-17.727-13.267-21.176 4.433-12.08 13.257-1.118 23.898 16.829 16.102 17.032 .604 17.209-12.412 6.219-20.642-6.225-16.807Z`})]})}function Tfe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{style:{fill:YE.mint},d:`M540 342C520 340 497 355 477 374C450 399 440 421 456 444C465 458 480 462 492 464C503 466 500 477 494 486C487 500 508 496 522 478L530 468C557 468 578 464 591 451C601 442 599 429 585 427C572 425 556 432 547 418C538 403 550 390 568 385C579 382 589 380 584 368C576 352 557 341 540 342Z`}),(0,R.jsx)(`path`,{style:{fill:YE.coral},d:`M589 396C614 380 659 381 683 392C709 404 721 428 710 451C704 464 693 472 685 479C680 487 684 498 689 503C695 514 684 513 675 507C667 502 662 497 657 491C637 496 610 495 594 486C584 480 583 469 595 464C607 460 622 454 622 441C622 428 612 423 597 420C580 417 578 407 589 396Z`})]})}function $E({fill:e}){return(0,R.jsx)(`path`,{style:{fill:e},d:`M44.648 .288C26.645 1.615 13.263 8.266 5.942 19.529-4.299 35.277-.917 57.684 13.224 67.784 16.958 70.452 16.936 71.742 13.064 77.665 11.28 80.391 10.895 81.565 11.341 82.914 13.163 88.435 25.022 86.396 36.307 78.62L38.681 76.986 41.294 77.335C45.371 77.878 59.645 77.789 64.125 77.191 89.213 73.837 100.562 61.427 99.92 38.044 99.18 11.1 79.587-2.285 44.648 .288Z`})}function eD({onFigure:e=!1}){return(0,R.jsxs)(`g`,{style:{fill:e?Sfe:YE.ink},children:[(0,R.jsx)(`rect`,{x:`-15`,y:`-11`,width:`10`,height:`22`,rx:`5`}),(0,R.jsx)(`rect`,{x:`5`,y:`-11`,width:`10`,height:`22`,rx:`5`})]})}function Efe(){return(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M18.125 .621C.039 1.574-2.575 4.791 2.264 20.133 17.454 68.284 77.345 69.396 96.119 21.875 100.749 10.154 100.318 4.348 94.605 1.513 91.981 .21 37.878-.421 18.125 .621Z`})}function Dfe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{style:{fill:YE.yellow},d:`M31.42 5.279C29.108 5.983 28.068 6.993 25.817 10.732 24.033 13.687 24.027 13.762 25.58 14.265 30.375 15.821 36.711 20.506 39.938 24.885 42.077 27.788 41.835 27.806 45.281 24.463 48.633 21.213 49.164 20.185 48.982 17.325 48.812 14.643 48.174 13.872 42.68 9.741 36.737 5.273 34.439 4.361 31.42 5.279Z`}),(0,R.jsx)(`path`,{style:{fill:YE.yellow},d:`M22.538 16.207C22.093 16.652 19.732 20.231 13.309 30.196 10.737 34.188 10.723 33.911 13.589 35.351 16.461 36.798 19.778 39.28 21.825 41.523L22.6 42.37Q23.34 43.186 24.05 42.538L24.711 41.933C31.278 35.937 38.928 28.484 38.928 28.083 38.928 24.656 24.521 14.219 22.538 16.207Z`}),(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M8.89 38.053C8.203 39.566 6.598 44.473 6.598 45.056 6.598 45.137 6.887 45.125 7.236 45.036 9.655 44.404 13.526 47.475 13.526 50.027 13.526 51.132 13.361 51.164 16.187 49.49 21.421 46.387 21.966 45.665 20.575 43.659 19.002 41.387 14.975 38.238 11.909 36.881 9.799 35.949 9.854 35.926 8.89 38.053Z`}),(0,R.jsx)(`path`,{style:{fill:YE.graphite},d:`M6.598 45.056C5.732 46.866 5.155 49.464 6.309 50.907 8.041 53.505 10.928 52.639 13.526 50.907 13.526 48.021 9.978 44.404 7.236 45.036Z`})]})}function Ofe(){return(0,R.jsx)(`path`,{style:{fill:YE.coral},d:`M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z`})}function tD({transform:e}){return(0,R.jsx)(`path`,{style:{fill:YE.mint},transform:e,d:`M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z`})}function kfe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{fillRule:`evenodd`,style:{fill:XE},d:`M25.3 17.69C14.8 19.34 10.66 20.18 9.05 20.99 5.51 22.78 4.2 27.21 6.71 28.9 7.47 29.42 8.48 29.4 10.25 28.84 12.41 28.15 12.56 27.57 11.02 25.85 10 24.71 10.53 23.62 11.79 24.27 13.9 25.36 15.02 28.98 15.63 36.66 16.18 43.48 17.33 47.43 19.69 50.49 22.76 54.48 27.69 55.73 30.31 53.19 33 50.57 31.24 46.04 28.44 48.38 26.29 50.17 26.16 47.08 28.3 45.14 29.61 43.95 30.78 43.58 38.92 41.75 39.45 41.63 39.41 41.52 38.39 40.01 36.87 37.78 36.04 35.22 34.72 28.69 33.37 22 32.04 19.3 29.5 18.07 28.69 17.68 26.59 17.49 25.3 17.69M24.11 26.51C18.61 27.67 18.16 27.82 17.98 28.55 17.64 29.91 18.54 30.44 20.51 30.05 25.4 29.08 30.11 28.03 30.49 27.83 31.65 27.23 31 25.33 29.66 25.4 29.5 25.4 27 25.91 24.11 26.51M29.2 31.42C28.64 31.54 26.23 32.07 23.85 32.58 20.01 33.41 19.48 33.57 19.15 33.96 18.67 34.5 18.66 35.05 19.12 35.63 19.61 36.26 19.86 36.23 26.05 34.88 29.05 34.23 31.53 33.7 31.57 33.7 31.82 33.7 32.34 32.88 32.34 32.5 32.34 31.25 31.37 30.92 29.2 31.42M29.79 37.19C28.81 37.41 26.45 37.94 24.53 38.37 22.62 38.8 20.84 39.23 20.58 39.33 19.61 39.71 19.35 40.62 19.98 41.41 20.48 42.05 21 41.99 27.59 40.5 33.85 39.09 34.21 38.91 33.45 37.44 33.02 36.61 32.51 36.58 29.79 37.19M45.41 41.95C44.89 42.09 41.61 42.89 38.12 43.73 30.94 45.45 29.81 45.84 31.05 46.15 33.2 46.69 34.11 50.18 32.77 52.76 32.23 53.79 32.23 54.03 32.76 54.16 33.34 54.31 45.35 51.3 46.72 50.67 50.19 49.06 51.76 45.01 49.79 42.76 48.8 41.64 47.46 41.39 45.41 41.95`}),(0,R.jsx)(`path`,{style:{fill:YE.grape},d:`M48.21 10.15C47.92 10.41 47.5 11.27 46.96 12.74 45.52 16.61 45.24 16.99 43.01 18.15 39.18 20.15 39.05 20.99 42.28 22.73 45.37 24.39 45.68 24.79 47.12 28.95 48.3 32.32 49.28 32.2 50.65 28.52 52.23 24.25 52.26 24.22 55.2 22.56 57.53 21.24 57.79 21 57.79 20.16 57.79 19.49 57.55 19.31 55.01 18.06 52.16 16.66 52.2 16.72 50.31 11.56 49.7 9.89 49.03 9.44 48.21 10.15M32.59 13.92C31.78 14.73 32.28 15.89 33.58 16.22 35.07 16.6 36.19 17.1 37.17 17.84 38.42 18.77 39.23 18.86 39.79 18.15 39.99 17.9 40.15 17.53 40.15 17.32 40.15 15.29 33.99 12.52 32.59 13.92M42.48 34.38C40.96 35.96 40.65 36.88 41.39 37.57 42.2 38.33 43.36 37.74 44.55 35.95 45.2 34.97 45.22 34.35 44.62 33.88 43.89 33.31 43.41 33.42 42.48 34.38`}),(0,R.jsx)(`path`,{style:{fill:YE.yellow},d:`M40.75 25.96C39.69 27.07 38.11 30.69 38.11 31.98 38.11 32.66 38.55 33.19 39.12 33.19 39.8 33.19 40.24 32.73 40.58 31.66 40.95 30.46 41.65 29.09 42.42 28.01 43.77 26.14 42.29 24.32 40.75 25.96M54.85 27.67C54.71 27.81 54.47 28.32 54.31 28.82 53.67 30.76 53.19 31.37 51.67 32.13 50.25 32.85 50.34 33.36 52.04 34.21 53.25 34.82 53.57 35.23 54.24 37.01 54.98 38.98 55.47 39.08 56.03 37.37 56.7 35.32 57.08 34.81 58.64 33.87 60.18 32.95 60.14 32.65 58.38 31.78 57.02 31.11 56.68 30.66 56.02 28.65 55.69 27.64 55.25 27.27 54.85 27.67`})]})}function Afe(){return(0,R.jsxs)(`g`,{children:[(0,R.jsx)(`path`,{fillRule:`evenodd`,style:{fill:XE},d:`M42.24 14.07C41.52 14.24 40.53 14.54 35.06 16.26 33.33 16.8 31.2 17.47 30.34 17.74 29.47 18.01 27.86 18.52 26.75 18.88 25.64 19.23 24.03 19.74 23.16 20.01 20.16 20.94 19.45 21.4 18.97 22.71 18.71 23.44 18.45 26.33 17.83 35.41 17.64 38.25 17.44 41.03 17.41 41.58 17.32 42.77 17.24 42.69 18.79 42.84L20.01 42.95 21.98 39.97C24.69 35.88 24.85 35.82 27.05 37.9 27.9 38.7 28.43 39.08 28.61 39.02 28.76 38.96 28.91 38.91 28.94 38.91 28.98 38.91 29.38 38.38 29.84 37.73 30.3 37.08 31.47 35.48 32.43 34.17 33.4 32.86 34.86 30.85 35.67 29.71 36.49 28.56 37.5 27.29 37.91 26.88 39.73 25.07 41.01 26.43 43.32 32.67 43.76 33.84 44.3 35.28 44.52 35.86 44.74 36.44 44.97 37.28 45.04 37.74 45.19 38.71 45.17 38.71 46.63 38.03 47.69 37.53 47.77 37.46 47.68 37.02 47.58 36.52 46.97 30.64 46.79 28.41 46.73 27.69 46.62 26.43 46.53 25.61 46.44 24.79 46.24 22.87 46.09 21.32 45.61 16.44 45.5 15.66 45.22 15.12 44.72 14.15 43.59 13.76 42.24 14.07M29.38 22.45C26.04 23.47 24.49 27.62 26.6 29.91 29.17 32.7 34.15 30.16 34.16 26.05 34.16 23.38 31.9 21.68 29.38 22.45M46.7 41.5C39.3 44.23 28.33 46.04 20.1 45.88L17.21 45.82 17.16 46.88C17.08 48.22 17.33 49.03 18.01 49.68 18.73 50.37 19.73 50.35 23.77 49.53 25.46 49.19 29.12 48.47 31.91 47.93 46.31 45.14 46.9 44.99 47.57 43.91 47.95 43.3 48.25 41.29 47.99 41.15 47.91 41.11 47.33 41.26 46.7 41.5`}),(0,R.jsx)(`path`,{style:{fill:YE.coral},d:`M29.72 22.45C25.84 23.34 24.28 28.36 27.25 30.42 29.34 31.88 32.91 30.43 33.83 27.75 34.92 24.55 32.75 21.76 29.72 22.45`}),(0,R.jsx)(`path`,{style:{fill:YE.mint},d:`M12.96 14.29C12.87 14.41 12.7 15.03 12.58 15.68 12.37 16.82 11.59 18.26 11.18 18.26 11.08 18.26 10.88 18.46 10.72 18.7 10.36 19.25 10.59 19.58 11.45 19.74 12.18 19.88 13.08 20.63 13.54 21.49 14.23 22.76 14.75 22.53 15.15 20.79 15.39 19.71 15.51 19.51 16.4 18.66 17.54 17.58 17.51 17.36 16.18 16.85 15.16 16.47 14.84 16.19 14.14 15.1 13.56 14.2 13.22 13.96 12.96 14.29M49.04 24.13C48.56 24.86 48.91 25.31 50.59 26.09 53.89 27.64 54.85 29.82 53.45 32.6 52.01 35.43 46.84 38.54 40.51 40.39 39.73 40.62 38.88 40.89 38.62 40.99 37.24 41.52 30.85 42.64 27.54 42.93 20.72 43.52 13.63 42.49 10.57 40.46 5.81 37.3 7.51 32.32 14.74 28.24 15.84 27.61 16.17 27.1 15.9 26.4 15.66 25.78 15.35 25.84 13.19 26.94 6 30.61 2.97 35.32 4.95 39.74 7.86 46.21 22.78 47.8 40.05 43.46 51.97 40.47 58.57 36.38 59.47 31.43 60.09 27.97 57.74 25.34 52.93 24.12 50.6 23.53 49.43 23.54 49.04 24.13`}),(0,R.jsx)(`path`,{style:{fill:YE.grape},d:`M34.82 8.91C33.48 10.04 34.21 12.14 35.94 12.14 37.29 12.14 38.18 10.99 37.77 9.77 37.36 8.53 35.81 8.08 34.82 8.91M53.15 43.16C53 43.28 52.74 43.86 52.57 44.45 52.18 45.78 51.76 46.32 50.64 46.93 49.52 47.53 49.45 47.89 50.33 48.34 51.34 48.85 52.24 49.95 52.56 51.04 53.13 53.01 53.6 53 54.21 50.99 54.61 49.69 55.13 48.93 55.91 48.54 57.17 47.91 57.23 47.51 56.15 46.96 55.23 46.49 54.67 45.76 54.23 44.44 53.8 43.15 53.54 42.84 53.15 43.16M24.18 53.18C22.45 53.9 22.87 56.59 24.71 56.59 26.79 56.59 27.2 53.67 25.2 53.09 24.89 53.01 24.51 53.04 24.18 53.18`}),(0,R.jsx)(`path`,{style:{fill:YE.yellow},d:`M51.76 11.04C51.21 12.77 50.56 13.61 49.24 14.34 48.6 14.69 48.72 15.07 49.59 15.48 50.54 15.93 51.11 16.69 51.62 18.22 52.06 19.57 52.26 19.54 52.79 18.08 53.29 16.69 53.87 15.91 54.86 15.31 55.76 14.77 55.77 14.48 54.92 14.02 53.91 13.46 53.5 12.99 52.89 11.66 52.23 10.21 52.06 10.12 51.76 11.04M11.06 48.22C10.99 48.35 10.71 48.88 10.46 49.41 9.95 50.48 9.45 50.99 8.59 51.33 7.89 51.61 7.85 52.1 8.52 52.37 9.51 52.79 10.3 53.85 10.89 55.58 11.09 56.18 11.48 55.88 11.87 54.84 12.24 53.87 13.33 52.56 13.79 52.56 14 52.56 14.5 52.06 14.5 51.85 14.5 51.77 14.19 51.54 13.81 51.34 12.98 50.92 12.36 50.14 11.93 48.99 11.6 48.09 11.31 47.83 11.06 48.22`})]})}function jfe(){return(0,R.jsxs)(`g`,{transform:`translate(2 8) scale(.114) translate(-125 -122)`,children:[(0,R.jsx)(`path`,{style:{fill:YE.coral},d:`M278 155 482 123C517 117 527 135 530 167L542 309Q543 329 561 341L631 404Q649 419 646 444 645 465 623 472L407 521Q374 531 345 519L156 436Q115 418 128 375L221 191Q238 163 278 155Z`}),(0,R.jsx)(`path`,{style:{fill:YE.ink},d:`M317 183 461 161Q493 155 497 188L504 288Q508 320 478 326L318 356Q289 362 286 331L281 226Q278 194 317 183Z`}),(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M304 386 553 340Q562 337 570 346L631 404Q649 419 646 444Q645 448 629 452L411 483Q382 492 367 474Z`}),(0,R.jsxs)(`g`,{style:{fill:YE.cream},children:[(0,R.jsx)(`rect`,{x:`319`,y:`236`,width:`26`,height:`59`,rx:`13`}),(0,R.jsx)(`rect`,{x:`364`,y:`229`,width:`26`,height:`59`,rx:`13`})]}),(0,R.jsxs)(`g`,{style:{fill:YE.ink},transform:`rotate(-11 470 411)`,children:[(0,R.jsx)(`rect`,{x:`369`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`444`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`518`,y:`380`,width:`57`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`392`,y:`421`,width:`58`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`462`,y:`421`,width:`65`,height:`25`,rx:`13`}),(0,R.jsx)(`rect`,{x:`539`,y:`421`,width:`58`,height:`25`,rx:`13`})]})]})}function Mfe(){return(0,R.jsxs)(`g`,{transform:`translate(3 10) scale(.114) translate(-760 -140)`,children:[(0,R.jsx)(`path`,{style:{fill:YE.blue},d:`M1226 153C1257 153 1273 195 1267 231Q1263 265 1237 268L1176 270V215C1176 178 1195 153 1226 153Z`}),(0,R.jsx)(`path`,{style:{fill:YE.blue},d:`M824 376Q908 372 871 400C842 427 866 442 902 450L1113 480Q1188 479 1199 392C1207 447 1204 497 1163 511Q1134 521 1097 516C1055 510 991 507 957 507S869 511 826 512C781 513 758 483 760 441Q760 385 824 376Z`}),(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M824 376 857 184Q864 133 911 141C1039 169 1124 151 1226 153Q1179 159 1184 241L1199 377C1202 434 1174 482 1117 480L902 450C864 445 849 429 871 400Q908 372 824 376Z`}),(0,R.jsxs)(`g`,{style:{fill:YE.coral},children:[(0,R.jsx)(`path`,{d:`M982 198C1008 190 1030 197 1028 220L1023 265Q1020 295 1000 279C981 261 951 223 963 210Q970 202 982 198Z`}),(0,R.jsx)(`path`,{d:`M1063 220C1077 215 1100 237 1102 251Q1107 267 1084 282L1063 295Q1037 307 1040 278L1045 245Q1049 224 1063 220Z`}),(0,R.jsx)(`path`,{d:`M911 252C925 240 939 254 957 269L978 291Q995 311 961 316C938 318 907 316 898 308Q884 296 911 252Z`}),(0,R.jsx)(`path`,{d:`M1106 289Q1127 281 1134 304C1142 327 1146 352 1125 350Q1097 348 1073 335C1051 324 1072 311 1084 302Z`}),(0,R.jsx)(`path`,{d:`M927 338C946 334 972 334 985 343Q1004 353 984 384C970 408 957 418 940 403C922 389 896 356 913 345Z`}),(0,R.jsx)(`path`,{d:`M1010 375Q1025 363 1037 384C1049 407 1064 438 1044 442Q1025 448 1002 436C984 428 991 410 997 393Z`}),(0,R.jsx)(`path`,{d:`M1068 357C1084 359 1110 376 1120 389Q1130 402 1107 419C1090 432 1082 418 1073 401C1062 383 1043 355 1068 357Z`}),(0,R.jsx)(`path`,{d:`M1018 311C1037 312 1050 334 1034 343C1018 351 998 337 1005 320Q1009 311 1018 311Z`})]})]})}function Nfe(){return(0,R.jsxs)(`g`,{transform:`translate(2 7) scale(.11) translate(-1380 -96)`,children:[(0,R.jsx)(`path`,{style:{fill:YE.inkcap},d:`M1384 276C1394 238 1445 200 1497 158C1547 119 1604 97 1647 97C1690 97 1720 109 1745 138C1772 170 1791 184 1833 194C1870 201 1919 220 1922 257C1923 307 1891 339 1853 336C1801 335 1767 299 1701 294C1666 291 1620 294 1642 303Q1670 307 1675 333C1681 367 1697 389 1717 413C1735 434 1738 443 1719 464C1700 485 1692 502 1686 520Q1682 541 1653 541L1626 541Q1598 541 1594 519C1590 495 1578 474 1563 458C1545 440 1544 429 1559 410C1585 377 1608 337 1572 326C1554 320 1529 333 1506 340C1461 356 1428 357 1402 340Q1371 319 1384 276Z`}),(0,R.jsx)(`path`,{style:{fill:YE.cream},d:`M1634 362Q1641 346 1649 362C1660 390 1676 404 1705 424Q1721 435 1704 453C1685 475 1677 490 1671 513Q1670 526 1653 525L1626 525Q1611 525 1610 513C1606 492 1592 465 1575 449Q1562 437 1577 424C1604 404 1620 390 1634 362Z`}),(0,R.jsx)(`path`,{style:{fill:YE.inkcap},d:`M1634 456A18 18 0 1 1 1648 456V492Q1648 500 1641 500T1634 492Z`}),(0,R.jsx)(`path`,{style:{fill:YE.inkcap},d:`M1780 391Q1786 386 1793 396C1810 420 1828 444 1827 467C1826 508 1768 510 1753 480C1741 456 1762 413 1780 391Z`})]})}var{coral:nD,blue:rD,mint:iD,grape:aD,yellow:oD,cream:sD,ink:cD}=YE,Pfe={bonsai:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:`none`,stroke:iD,strokeWidth:`3.7`,strokeLinecap:`round`,d:`M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2`}),(0,R.jsx)(`path`,{fill:iD,d:`M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z`}),(0,R.jsx)(`circle`,{fill:rD,cx:`31.5`,cy:`10.7`,r:`4.8`}),(0,R.jsx)(`circle`,{fill:aD,cx:`16.6`,cy:`18.3`,r:`4.6`}),(0,R.jsx)(`circle`,{fill:oD,cx:`47.9`,cy:`17.7`,r:`4.6`}),(0,R.jsx)(`circle`,{fill:oD,cx:`12.8`,cy:`31.5`,r:`4.6`}),(0,R.jsx)(`circle`,{fill:rD,cx:`50.9`,cy:`32.1`,r:`4.6`}),(0,R.jsx)(`path`,{fill:nD,d:`M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z`}),(0,R.jsx)(`rect`,{fill:nD,x:`14`,y:`43`,width:`35.5`,height:`4.6`,rx:`2.3`})]}),computer:(0,R.jsx)(jfe,{}),prints:(0,R.jsx)(Mfe,{}),inkcap:(0,R.jsx)(Nfe,{}),vishnu:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{style:{fill:nD},d:`M6 37C6 21 17.5 9 32 9s26 12 26 28c0 2.2-1.8 4-4 4H10c-2.2 0-4-1.8-4-4Z`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`19`,cy:`25`,r:`4`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`33`,cy:`19.5`,r:`4.8`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`46`,cy:`28`,r:`3.4`}),(0,R.jsx)(`rect`,{style:{fill:rD},x:`13`,y:`39`,width:`38`,height:`18`,rx:`9`}),(0,R.jsx)(`rect`,{style:{fill:sD},x:`18.5`,y:`46.2`,width:`10`,height:`3.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{style:{fill:sD},x:`21.7`,y:`43`,width:`3.6`,height:`10`,rx:`1.8`}),(0,R.jsx)(`circle`,{style:{fill:oD},cx:`39`,cy:`50.5`,r:`2.7`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`45`,cy:`45.5`,r:`2.7`})]}),generateText:(0,R.jsx)(kfe,{}),generateMedia:(0,R.jsx)(Afe,{}),buyApps:(0,R.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,R.jsx)(`circle`,{fill:oD,cx:`32`,cy:`20`,r:`12`}),(0,R.jsx)(`circle`,{stroke:sD,strokeWidth:`4`,cx:`32`,cy:`20`,r:`6`}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(15.5 12) rotate(-60) scale(1.1 .85)`}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(48.5 12) rotate(60) scale(1.1 .85)`}),(0,R.jsx)(`path`,{fill:rD,d:`M10 35H54L50 53Q49 58 44 58H20Q15 58 14 53Z`}),(0,R.jsx)(`rect`,{fill:nD,x:`5`,y:`27`,width:`54`,height:`10`,rx:`5`}),(0,R.jsxs)(`g`,{fill:sD,children:[(0,R.jsx)(`rect`,{x:`20`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,R.jsx)(`rect`,{x:`29.5`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,R.jsx)(`rect`,{x:`39`,y:`41`,width:`5`,height:`11`,rx:`2.5`})]})]}),browseBazaar:(0,R.jsxs)(`g`,{transform:`rotate(-5 32 32)`,children:[(0,R.jsx)(`rect`,{fill:rD,x:`10`,y:`14`,width:`44`,height:`38`,rx:`6`}),(0,R.jsx)(`rect`,{fill:rD,x:`5`,y:`47`,width:`54`,height:`12`,rx:`6`}),(0,R.jsx)(`rect`,{fill:sD,x:`12`,y:`50.5`,width:`40`,height:`4.5`,rx:`2.25`}),(0,R.jsx)(`rect`,{fill:nD,x:`2`,y:`4`,width:`60`,height:`9`,rx:`4.5`}),(0,R.jsx)(`path`,{fill:nD,d:`M3 9H14.6V18A5.8 5.8 0 0 1 3 18Z`}),(0,R.jsx)(`path`,{fill:sD,d:`M14.6 9H26.2V18A5.8 5.8 0 0 1 14.6 18Z`}),(0,R.jsx)(`path`,{fill:nD,d:`M26.2 9H37.8V18A5.8 5.8 0 0 1 26.2 18Z`}),(0,R.jsx)(`path`,{fill:sD,d:`M37.8 9H49.4V18A5.8 5.8 0 0 1 37.8 18Z`}),(0,R.jsx)(`path`,{fill:nD,d:`M49.4 9H61V18A5.8 5.8 0 0 1 49.4 18Z`}),(0,R.jsx)(`g`,{transform:`translate(32 36.5) scale(.34)`,children:(0,R.jsx)(QE,{})})]}),agent:(0,R.jsxs)(`g`,{transform:`translate(32 33) scale(2.02) translate(-47.2 -41.8)`,children:[(0,R.jsx)(`path`,{fill:rD,d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,R.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,R.jsx)(eD,{})})]}),list:(0,R.jsxs)(`g`,{transform:`rotate(-7 32 32)`,children:[(0,R.jsx)(`path`,{style:{fill:rD},d:`M12 13Q6 13 6 19V50Q6 57 13 57H47Q53 57 53 50V20Q53 13 47 13Z`}),(0,R.jsx)(`path`,{style:{fill:sD},d:`M19 7H39Q42 7 44 9L55 20Q57 22 57 26V44Q57 50 51 50H19Q13 50 13 44V13Q13 7 19 7Z`}),(0,R.jsx)(`path`,{style:{fill:nD},d:`M39 7V18Q39 24 45 24H57Q57 22 55 20L44 9Q42 7 39 7Z`}),(0,R.jsxs)(`g`,{style:{fill:nD},children:[(0,R.jsx)(`circle`,{cx:`22`,cy:`21`,r:`3`}),(0,R.jsx)(`circle`,{cx:`22`,cy:`31`,r:`3`}),(0,R.jsx)(`circle`,{cx:`22`,cy:`41`,r:`3`})]}),(0,R.jsx)(`path`,{style:{stroke:rD},strokeWidth:`5`,strokeLinecap:`round`,d:`M31 21H32M31 31H46M31 41H42`})]}),chat:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`g`,{transform:`translate(3 11) scale(.22) translate(-449 -327)`,children:(0,R.jsx)(Tfe,{})}),(0,R.jsx)(ZE,{transform:`translate(38.2 18) rotate(16) scale(.95 .6)`}),(0,R.jsx)(ZE,{transform:`translate(44.4 20.5) rotate(47) scale(.95 .6)`})]}),read:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`g`,{transform:`translate(4 20.5) scale(.56)`,children:(0,R.jsx)(wfe,{})}),(0,R.jsx)(`g`,{transform:`translate(32 38.6) scale(.3164)`,children:(0,R.jsx)(QE,{})}),(0,R.jsx)(Cfe,{})]}),readConversations:(0,R.jsxs)(`g`,{transform:`translate(32 32) scale(.9) translate(-32 -32)`,children:[(0,R.jsx)(`g`,{transform:`translate(4 7.88) scale(.56)`,children:(0,R.jsx)($E,{fill:rD})}),(0,R.jsx)(`g`,{transform:`translate(32.2 30.3) scale(.352)`,children:(0,R.jsx)(QE,{})})]}),listAgents:(0,R.jsxs)(`g`,{transform:`translate(32 32) scale(1.04) translate(-32 -32)`,children:[(0,R.jsx)(`path`,{style:{fill:XE},d:`M32.059 10.146C23.878 10.646 18.949 14.844 18.925 21.331 18.912 24.856 20.167 27.259 22.274 27.74 24.437 28.233 26.097 29.061 27.481 30.337 28.275 31.068 28.328 31.096 29.352 31.306 31.161 31.677 31.653 32.094 32.115 33.651 32.392 34.582 32.557 34.868 32.915 35.041 33.919 35.523 35.864 33.733 36.539 31.706L36.775 30.997 38.008 30.681C42.663 29.489 45.29 26.142 45.468 21.176 45.734 13.784 40.673 9.62 32.059 10.146Z`}),(0,R.jsx)(`g`,{transform:`translate(32.4 21.2) scale(.39)`,children:(0,R.jsx)(eD,{onFigure:!0})}),(0,R.jsx)(`path`,{style:{fill:nD},d:`M14.375 27.586C8.014 28.591 4.363 32.396 4.355 38.027 4.347 43.93 8.071 47.469 15.239 48.368L16.828 48.568 17.873 49.568C19.854 51.464 22.469 52.496 23.691 51.864 24.384 51.506 24.431 51.044 23.924 49.606 23.337 47.943 23.479 47.492 24.749 46.977 32.756 43.73 32.643 31.899 24.573 28.49 22.238 27.504 17.535 27.087 14.375 27.586Z`}),(0,R.jsx)(`g`,{transform:`translate(17.6 37.7) scale(.38 .36)`,children:(0,R.jsx)(eD,{})}),(0,R.jsx)(`path`,{style:{fill:rD},d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,R.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,R.jsx)(eD,{})})]}),createAgents:(0,R.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,R.jsx)(`path`,{style:{fill:XE},d:`M20.436 24.499C13.35 25.216 7.504 28.799 5.442 33.687 3.114 39.208 4.438 45.791 8.593 49.358 10.446 50.949 10.34 50.831 10.34 51.301 10.34 51.796 10.106 52.294 9.281 53.558 7.191 56.76 12.108 56.905 16.701 53.777 17.517 53.221 17.715 53.135 18.015 53.201 20.013 53.639 25.739 53.051 28.595 52.113 35.47 49.857 39.129 44.162 37.83 37.738C37 31 33 26 26.717 24.428L24.075 24.413C22.623 24.405 20.985 24.444 20.436 24.499Z`}),(0,R.jsx)(`g`,{transform:`translate(21.9 40) scale(.46 .43)`,children:(0,R.jsx)(eD,{onFigure:!0})}),(0,R.jsx)(`path`,{style:{fill:iD},d:`M37.987 15.734C32.277 16.627 28.675 20.713 28.92 26.022 29.062 29.118 30.627 31.606 33.331 33.036 34.675 33.747 34.761 34.018 34.237 35.923 33.376 39.051 36.878 38.551 39.174 35.218 39.574 34.637 39.65 34.583 40.058 34.583 46.203 34.583 50.414 30.91 50.424 25.543 50.435 18.989 44.932 14.649 37.987 15.734Z`}),(0,R.jsx)(`g`,{transform:`translate(38.9 24.9) scale(.31)`,children:(0,R.jsx)(eD,{})}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(48.1 15.7) rotate(31) scale(1.25 .85)`}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(52.2 19.8) rotate(70) scale(1.25 .85)`})]}),sendPrompts:(0,R.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,R.jsx)(`g`,{transform:`translate(4 13.2) scale(.412 .436)`,children:(0,R.jsx)($E,{fill:nD})}),(0,R.jsx)(`g`,{transform:`translate(17.1 28.7) scale(.19)`,children:(0,R.jsx)(Efe,{})}),(0,R.jsx)(ZE,{fill:iD,transform:`translate(48.1 26.4) rotate(65) scale(1.7 1.28)`}),(0,R.jsx)(ZE,{fill:iD,transform:`translate(48.4 33.8) rotate(110) scale(1.7 1.28)`})]}),write:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Dfe,{}),(0,R.jsx)(Ofe,{})]}),run:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{style:{fill:rD},x:`6`,y:`9`,width:`52`,height:`43`,rx:`7`}),(0,R.jsx)(`path`,{style:{stroke:sD},strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m17 22 9 8-9 8m17 0h12`})]}),stop:(0,R.jsx)(`rect`,{style:{fill:nD},x:`12`,y:`12`,width:`40`,height:`40`,rx:`9`}),connected:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:`none`,style:{stroke:rD},strokeWidth:`12`,strokeLinecap:`round`,d:`M34 37Q43 21 26 20H18Q3 20 6 37q2 10 15 9`}),(0,R.jsx)(`path`,{fill:`none`,style:{stroke:nD},strokeWidth:`12`,strokeLinecap:`round`,d:`M29 33Q20 50 38 53h8q16-1 12-17-2-11-14-10`}),(0,R.jsx)(`path`,{style:{stroke:oD},strokeWidth:`4`,strokeLinecap:`round`,d:`m27 4 2 6m10-5-2 7m12 0-5 4`})]}),working:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`ellipse`,{style:{fill:iD},cx:`23`,cy:`14`,rx:`13`,ry:`8`,transform:`rotate(-30 23 14)`}),(0,R.jsx)(`ellipse`,{style:{fill:oD},cx:`48`,cy:`36`,rx:`13`,ry:`8`,transform:`rotate(35 48 36)`}),(0,R.jsx)(`ellipse`,{style:{fill:aD},cx:`22`,cy:`48`,rx:`13`,ry:`8`,transform:`rotate(45 22 48)`}),(0,R.jsx)(`path`,{fill:`none`,style:{stroke:XE},strokeWidth:`3`,strokeLinecap:`round`,d:`M42 8q13 2 13 13M43 55q-5 5-12 4M5 39q-5-9 1-17`})]}),complete:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{style:{fill:iD},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,R.jsx)(`path`,{fill:`none`,style:{stroke:cD},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m23 29 7 7 13-15`}),(0,R.jsx)(`path`,{style:{stroke:XE},strokeWidth:`3`,strokeLinecap:`round`,d:`m4 8 5 6m48-4 5-5M2 24l6 1`})]}),installApps:(0,R.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,R.jsx)(`rect`,{style:{fill:rD},x:`9`,y:`26`,width:`46`,height:`32`,rx:`10`}),(0,R.jsx)(`rect`,{style:{fill:sD},x:`17`,y:`33`,width:`30`,height:`18`,rx:`5`}),(0,R.jsx)(`path`,{style:{fill:iD},d:`M22 38h8v8h-8z`}),(0,R.jsx)(`path`,{style:{fill:aD},d:`M34 38h8v8h-8z`}),(0,R.jsx)(`path`,{style:{stroke:nD},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M32 4v17m-8-7 8 8 8-8`})]}),restricted:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:`none`,style:{stroke:nD},strokeWidth:`9`,strokeLinecap:`round`,d:`M16 23V19q0-17 16-17t16 17v4`}),(0,R.jsx)(`rect`,{style:{fill:nD},x:`8`,y:`26`,width:`48`,height:`36`,rx:`9`}),(0,R.jsx)(`path`,{style:{fill:sD},d:`M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z`})]}),error:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{style:{fill:nD},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,R.jsx)(`path`,{fill:`none`,style:{stroke:sD},strokeWidth:`7`,strokeLinecap:`round`,d:`M32 18v15`}),(0,R.jsx)(`circle`,{style:{fill:sD},cx:`32`,cy:`45`,r:`4`})]}),trellis:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(`g`,{fill:oD,children:[(0,R.jsx)(`rect`,{x:`17.25`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,R.jsx)(`rect`,{x:`42.95`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,R.jsx)(`rect`,{x:`30.4`,y:`18`,width:`3.2`,height:`26`}),(0,R.jsx)(`rect`,{x:`14.8`,y:`15.75`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,R.jsx)(`rect`,{x:`14.8`,y:`28.85`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,R.jsx)(`rect`,{x:`14.8`,y:`42.55`,width:`34.4`,height:`3.1`,rx:`1.55`})]}),(0,R.jsx)(`path`,{fill:`none`,stroke:iD,strokeWidth:`3`,strokeLinecap:`round`,d:`M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8`}),(0,R.jsx)(`path`,{fill:`none`,stroke:iD,strokeWidth:`3`,strokeLinecap:`round`,d:`M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2`}),(0,R.jsx)(tD,{transform:`translate(32.1 14.1) rotate(45) scale(0.45 0.86)`}),(0,R.jsx)(tD,{transform:`translate(32.2 14.7) rotate(-60) scale(0.42 0.58)`}),(0,R.jsx)(tD,{transform:`translate(34.8 28.3) rotate(65) scale(0.38 0.8)`}),(0,R.jsx)(tD,{transform:`translate(28.2 33.1) rotate(-51) scale(0.5 0.57)`}),(0,R.jsx)(tD,{transform:`translate(28.6 53.3) rotate(-48) scale(0.47 0.6)`}),(0,R.jsx)(`circle`,{fill:nD,cx:`31.9`,cy:`18.8`,r:`4`}),(0,R.jsx)(`circle`,{fill:rD,cx:`32`,cy:`32.3`,r:`4`}),(0,R.jsx)(`circle`,{fill:aD,cx:`32`,cy:`44.2`,r:`4`})]}),games:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:rD,d:`M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`26.8`,cy:`37.9`,rx:`9.1`,ry:`5.6`}),(0,R.jsx)(`ellipse`,{fill:cD,cx:`27`,cy:`37.6`,rx:`4.7`,ry:`2.2`}),(0,R.jsx)(`path`,{fill:cD,d:`M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z`}),(0,R.jsx)(`circle`,{fill:nD,cx:`27.1`,cy:`18.3`,r:`12.4`}),(0,R.jsx)(`circle`,{fill:sD,cx:`22.6`,cy:`14.3`,r:`3.05`}),(0,R.jsx)(`ellipse`,{fill:oD,cx:`45.1`,cy:`37.2`,rx:`5.6`,ry:`3.95`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`40.1`,cy:`46.6`,rx:`6.2`,ry:`4.4`})]}),oyster:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:aD,d:`M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z`}),(0,R.jsx)(`circle`,{fill:sD,cx:`34.9`,cy:`41.9`,r:`11.3`}),(0,R.jsxs)(`g`,{fill:cD,children:[(0,R.jsx)(`rect`,{x:`29.9`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`}),(0,R.jsx)(`rect`,{x:`36.7`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`})]}),(0,R.jsx)(`path`,{fill:aD,d:`M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z`}),(0,R.jsx)(`path`,{fill:`none`,stroke:oD,strokeWidth:`3`,strokeLinecap:`round`,d:`M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1`})]}),tourtois:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{fill:sD,x:`11.07`,y:`35.73`,width:`26.8`,height:`9.7`,rx:`3.25`,transform:`rotate(-5 24.47 40.58)`}),(0,R.jsx)(`path`,{fill:oD,d:`M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z`}),(0,R.jsx)(`path`,{fill:nD,d:`M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z`}),(0,R.jsx)(`path`,{fill:rD,d:`M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z`}),(0,R.jsx)(`path`,{fill:sD,d:`M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z`}),(0,R.jsxs)(`g`,{fill:sD,children:[(0,R.jsx)(`circle`,{cx:`14.7`,cy:`18.45`,r:`1`}),(0,R.jsx)(`circle`,{cx:`17.6`,cy:`17.65`,r:`1`}),(0,R.jsx)(`circle`,{cx:`20.5`,cy:`16.85`,r:`1`}),(0,R.jsx)(`circle`,{cx:`17.9`,cy:`22.2`,r:`1`}),(0,R.jsx)(`circle`,{cx:`21`,cy:`21.5`,r:`1`}),(0,R.jsx)(`circle`,{cx:`24.1`,cy:`20.75`,r:`1`}),(0,R.jsx)(`circle`,{cx:`28.2`,cy:`25.3`,r:`1`})]}),(0,R.jsx)(`circle`,{fill:nD,cx:`21.7`,cy:`26.6`,r:`1`}),(0,R.jsx)(`circle`,{fill:oD,cx:`24.9`,cy:`25.9`,r:`1.05`}),(0,R.jsxs)(`g`,{fill:iD,children:[(0,R.jsx)(`ellipse`,{cx:`8.8`,cy:`36.6`,rx:`3.6`,ry:`1.9`,transform:`rotate(22 8.8 36.6)`}),(0,R.jsx)(`path`,{d:`M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5L12 41Z`}),(0,R.jsx)(`path`,{d:`M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z`})]}),(0,R.jsx)(`ellipse`,{fill:iD,cx:`46.4`,cy:`30.6`,rx:`8.1`,ry:`8.3`}),(0,R.jsxs)(`g`,{fill:cD,children:[(0,R.jsx)(`rect`,{x:`45.05`,y:`26.95`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 46.2 29.3)`}),(0,R.jsx)(`rect`,{x:`49.25`,y:`26.4`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 50.4 28.7)`})]}),(0,R.jsx)(`path`,{fill:nD,d:`M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z`,transform:`rotate(-8 48.9 33.5)`}),(0,R.jsx)(`path`,{fill:`none`,stroke:oD,strokeWidth:`3`,strokeLinecap:`round`,d:`M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7`})]}),allApps:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{fill:nD,x:`7`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 18.6 18.6)`}),(0,R.jsx)(`rect`,{fill:rD,x:`33.9`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 45.5 18.6)`}),(0,R.jsx)(`rect`,{fill:iD,x:`7`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 18.6 45.5)`}),(0,R.jsx)(`rect`,{fill:oD,x:`33.9`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 45.5 45.5)`})]}),search:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:`none`,stroke:rD,strokeWidth:`6.5`,d:`M37 37.5 43 43.5`}),(0,R.jsx)(`path`,{fill:`none`,stroke:nD,strokeWidth:`12.6`,strokeLinecap:`round`,d:`M44.2 43.8 51.4 51.8`}),(0,R.jsx)(`path`,{fill:`none`,stroke:oD,strokeWidth:`3`,strokeLinecap:`round`,d:`M47.2 42.4 52.8 47.8`}),(0,R.jsx)(`ellipse`,{fill:rD,cx:`25.6`,cy:`24.6`,rx:`19.25`,ry:`18.6`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`25.2`,cy:`24.1`,rx:`14.2`,ry:`13.6`})]}),browser:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{fill:nD,x:`5.9`,y:`6.15`,width:`52.2`,height:`51.7`,rx:`5.5`}),(0,R.jsx)(`path`,{fill:sD,d:`M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z`}),(0,R.jsx)(`circle`,{fill:oD,cx:`12.2`,cy:`11.9`,r:`1.95`}),(0,R.jsx)(`circle`,{fill:rD,cx:`18.6`,cy:`11.9`,r:`1.95`}),(0,R.jsx)(`circle`,{fill:aD,cx:`25.1`,cy:`11.9`,r:`1.95`}),(0,R.jsx)(`circle`,{fill:iD,cx:`32`,cy:`34.9`,r:`14.5`}),(0,R.jsxs)(`g`,{fill:`none`,stroke:sD,strokeWidth:`3`,children:[(0,R.jsx)(`ellipse`,{cx:`32`,cy:`34.9`,rx:`7.7`,ry:`13.3`}),(0,R.jsx)(`path`,{d:`M17.5 34.9H46.5`})]})]}),internet:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`ellipse`,{fill:`none`,stroke:oD,strokeWidth:`4.4`,cx:`32.2`,cy:`30.2`,rx:`25.6`,ry:`8.1`,transform:`rotate(-20.8 32.2 30.2)`}),(0,R.jsx)(`circle`,{fill:rD,cx:`32`,cy:`32`,r:`21.1`}),(0,R.jsxs)(`g`,{fill:`none`,stroke:sD,strokeWidth:`3`,children:[(0,R.jsx)(`ellipse`,{cx:`32`,cy:`31.8`,rx:`12.2`,ry:`18.7`}),(0,R.jsx)(`path`,{d:`M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39`})]}),(0,R.jsx)(`path`,{fill:`none`,stroke:oD,strokeWidth:`4.4`,d:`M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2`,transform:`rotate(-20.8 32.2 30.2)`})]}),members:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`circle`,{fill:rD,cx:`41.9`,cy:`22.85`,r:`12.2`}),(0,R.jsx)(`path`,{fill:rD,d:`M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z`}),(0,R.jsx)(`circle`,{fill:nD,cx:`22.95`,cy:`27.6`,r:`12.85`}),(0,R.jsx)(`path`,{fill:nD,d:`M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z`}),(0,R.jsxs)(`g`,{fill:cD,children:[(0,R.jsx)(`circle`,{cx:`18.3`,cy:`28`,r:`1.6`}),(0,R.jsx)(`circle`,{cx:`27.9`,cy:`28`,r:`1.6`}),(0,R.jsx)(`circle`,{cx:`39.1`,cy:`23.05`,r:`1.55`}),(0,R.jsx)(`circle`,{cx:`47.25`,cy:`23.05`,r:`1.55`})]})]}),sell:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{fill:oD,d:`M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`21.9`,cy:`40.8`,rx:`13.2`,ry:`3.6`}),(0,R.jsxs)(`g`,{transform:`rotate(-3 22.5 30) translate(0.5 0)`,children:[(0,R.jsx)(`path`,{fill:oD,d:`M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z`}),(0,R.jsx)(`ellipse`,{fill:sD,cx:`23.7`,cy:`26.55`,rx:`13.05`,ry:`4.4`})]}),(0,R.jsxs)(`g`,{transform:`translate(46.3 40.3) rotate(-25)`,children:[(0,R.jsx)(`path`,{fill:nD,d:`M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z`}),(0,R.jsx)(`circle`,{fill:sD,cx:`0`,cy:`-10.7`,r:`2.2`})]}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(38.2 18.6) scale(1.1 .86)`}),(0,R.jsx)(ZE,{fill:oD,transform:`translate(42.8 21.2) rotate(45) scale(1.1 .85)`})]}),schedule:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`rect`,{fill:sD,x:`6`,y:`11`,width:`47.6`,height:`44`,rx:`6`}),(0,R.jsx)(`path`,{fill:nD,d:`M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z`}),(0,R.jsxs)(`g`,{fill:sD,children:[(0,R.jsx)(`circle`,{cx:`16.1`,cy:`16.15`,r:`3.4`}),(0,R.jsx)(`circle`,{cx:`43.4`,cy:`16.15`,r:`3.4`})]}),(0,R.jsxs)(`g`,{fill:rD,children:[(0,R.jsx)(`rect`,{x:`13.6`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`}),(0,R.jsx)(`rect`,{x:`40.9`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`})]}),(0,R.jsxs)(`g`,{fill:iD,children:[(0,R.jsx)(`rect`,{x:`11.1`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`20.7`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`30.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`20.7`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`30.4`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`11.1`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`30.4`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,R.jsxs)(`g`,{fill:aD,children:[(0,R.jsx)(`rect`,{x:`40.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`11.1`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,R.jsx)(`rect`,{x:`20.7`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,R.jsx)(`circle`,{fill:oD,cx:`45.5`,cy:`45.6`,r:`12.2`}),(0,R.jsx)(`path`,{fill:`none`,stroke:cD,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M45.1 39.3V46.2L51.3 49.8`}),(0,R.jsx)(`circle`,{fill:cD,cx:`45.1`,cy:`46.2`,r:`2.5`})]}),loop:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`path`,{style:{stroke:nD},strokeWidth:`6`,strokeLinecap:`round`,d:`M47.5 14.5C43 11 37.5 9 32 9 19.5 9 9 19.5 9 32S19.5 55 32 55 55 44.5 55 32`}),(0,R.jsx)(`path`,{style:{fill:nD},d:`M53.5 21.5Q54.5 20 55 22L58 33Q58.5 35 56.5 34.5L48.5 32.5Q47 32 48 30.5Z`}),(0,R.jsx)(`g`,{transform:`translate(18 21) scale(.28)`,children:(0,R.jsx)($E,{fill:rD})}),(0,R.jsxs)(`g`,{style:{fill:sD},children:[(0,R.jsx)(`rect`,{x:`25`,y:`27.5`,width:`14`,height:`3`,rx:`1.5`}),(0,R.jsx)(`rect`,{x:`25`,y:`33.5`,width:`9`,height:`3`,rx:`1.5`})]})]}),fungi:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`ellipse`,{fill:sD,cx:`33.5`,cy:`43.6`,rx:`18.6`,ry:`14.4`,transform:`rotate(-6 33.5 43.6)`}),(0,R.jsx)(`path`,{fill:nD,d:`M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z`}),(0,R.jsxs)(`g`,{fill:sD,children:[(0,R.jsx)(`ellipse`,{cx:`29`,cy:`15.7`,rx:`8.7`,ry:`6.3`,transform:`rotate(-15.5 29 15.7)`}),(0,R.jsx)(`ellipse`,{cx:`50.8`,cy:`20.1`,rx:`6.5`,ry:`3.5`,transform:`rotate(51.6 50.8 20.1)`}),(0,R.jsx)(`ellipse`,{cx:`13`,cy:`26.8`,rx:`4.2`,ry:`3.3`,transform:`rotate(-54.5 13 26.8)`})]}),(0,R.jsxs)(`g`,{fill:cD,transform:`translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)`,children:[(0,R.jsx)(`rect`,{x:`31.85`,y:`35.9`,width:`3.75`,height:`5.25`,rx:`1.85`}),(0,R.jsx)(`path`,{d:`M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z`}),(0,R.jsx)(`path`,{d:`M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z`})]})]})};function lD({name:e,size:t}){return(0,R.jsx)(`svg`,{viewBox:`0 0 64 64`,width:t,height:t,fill:`none`,stroke:`none`,"aria-hidden":`true`,focusable:`false`,"data-sigil":e,children:Pfe[e]})}var Ffe=[{id:`list`,label:`List files`,contract:Gle},{id:`read`,label:`Read files`,contract:eue},{id:`write`,label:`Write files`,contract:tue},{id:`run`,label:`Run commands`,contract:eC}],Ife={loading:`Loading`,unavailable:`Unavailable`,error:`Refresh failed`};function Lfe({app:e,terminal:t=null,processes:n,ports:r}){let[i,a]=(0,I.useState)(!1),[o,s]=(0,I.useState)(!1),c=async()=>{if(e){a(!0),s(!1);try{await e.ui.requestAppPermissions({})}catch{s(!0)}finally{a(!1)}}};return{id:`access`,label:`Access`,title:`Computer access`,content:(0,R.jsxs)(`div`,{className:`shed-instrument`,children:[(0,R.jsxs)(qE,{size:`sm`,children:[(0,R.jsx)(bfe,{icon:(0,R.jsx)(lD,{name:`computer`}),title:t?.name??`Selected Computer`,status:t?(0,R.jsx)(VE,{size:`compact`,label:`Terminal ${t.state}`,tone:t.state===`open`?`success`:t.state===`failed`?`error`:`neutral`}):null}),(0,R.jsxs)(xfe,{children:[(0,R.jsx)(JE,{legend:`Shed may`,wide:!0,children:(0,R.jsx)(WE,{"aria-label":`Shed may`,stateLabels:[`allowed`,`not allowed`],items:Ffe.map(({id:t,label:n,contract:r})=>({id:t,label:n,caption:t,icon:(0,R.jsx)(lD,{name:t}),on:e?.capabilities.has(r)===!0}))})}),(0,R.jsx)(uD,{label:`Processes`,value:n}),(0,R.jsx)(uD,{label:`Ports open`,value:r})]})]}),e?(0,R.jsx)(`div`,{className:`shed-instrument-keys`,children:(0,R.jsx)(yE,{size:`sm`,variant:`ghost`,disabled:i,onClick:()=>void c(),children:i?`Opening permissions…`:`App permissions…`})}):null,o?(0,R.jsx)(`p`,{role:`alert`,className:`shed-instrument-detail`,children:`Could not open App permissions. Try again.`}):null]})}}function uD({label:e,value:t}){return(0,R.jsx)(JE,{legend:e,role:`group`,"aria-label":e,children:t.kind===`loaded`?(0,R.jsx)(DE,{value:t.count,pad:2,size:`md`}):(0,R.jsx)(`span`,{className:`shed-instrument-note`,children:Ife[t.kind]})})}var Rfe={2:`h2`,3:`h3`,4:`h4`};function zfe(e,t){let{reduced:n}=t,r=e&&!n,i=UC(t,600),[a,o]=(0,I.useState)(r);return(0,I.useEffect)(()=>{if(o(r),!r)return;let e=globalThis.setTimeout(()=>{o(!1)},i);return()=>{globalThis.clearTimeout(e)}},[r,i]),a}var Bfe=(0,R.jsx)(_E,{decorative:!0,pace:`idle`,size:`md`,tone:`primary`,variant:`wander`}),dD=(0,I.forwardRef)(function({actions:e,secondaryAction:t,className:n,description:r,headingLevel:i=2,primaryAction:a,suggestions:o,thinking:s=!1,title:c,visual:l,renderVisual:u,variant:d=`plain`,...f},p){let m=(0,I.useId)(),h=(0,I.useRef)(null),g=HC(h),_=zfe(d===`speech`,g)&&!s,v=Rfe[i],y=l??(d===`panel`?`blobs`:void 0),b=u?u({speaking:_,thinking:s}):y===`blobs`?Bfe:y,x=`${m}-reason`,S=(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(v,{ref:h,className:`empty-state-title`,id:f[`aria-labelledby`]?void 0:m,children:c}),(0,R.jsx)(`p`,{children:r}),a?(0,R.jsxs)(`div`,{className:`empty-state-primary`,children:[(0,R.jsxs)(`div`,{className:`empty-state-action-row`,children:[(0,R.jsx)(yE,{"aria-describedby":a.disabled&&a.disabledReason?x:void 0,disabled:a.disabled,loading:a.pending===!0,onClick:a.onSelect,variant:`primary`,children:a.label}),t]}),a.disabled&&a.disabledReason?(0,R.jsx)(`span`,{className:`empty-state-reason`,id:x,children:a.disabledReason}):null]}):null,o&&o.length>0?(0,R.jsx)(`ul`,{"aria-label":`Try one of these`,className:`empty-state-suggestions`,children:o.map((e,t)=>(0,R.jsx)(`li`,{children:(0,R.jsx)(yE,{disabled:e.disabled,loading:e.pending===!0,size:`sm`,variant:`outline`,onClick:e.onSelect,children:e.label})},`${String(t)}:${e.label}`))}):null,e?(0,R.jsx)(`div`,{className:`empty-state-actions`,children:e}):null]});return(0,R.jsxs)(`section`,{...f,"aria-labelledby":f[`aria-labelledby`]??m,className:RC(`empty-state`,d!==`plain`&&`empty-state-${d}`,n),ref:p,children:[b?(0,R.jsx)(`div`,{"aria-hidden":`true`,className:`empty-state-visual`,children:b}):null,d===`speech`?(0,R.jsx)(`div`,{className:`empty-state-bubble`,children:S}):S]})}),Vfe=(0,I.forwardRef)(function({className:e,orientation:t,variant:n=`grip`,value:r,min:i,max:a,onValueChange:o,onKeyDown:s,...c},l){return(0,R.jsx)(`div`,{...c,ref:l,className:RC(`caps-resize-handle`,e),"data-resize-variant":n,role:`separator`,"aria-orientation":t,"aria-valuemin":Math.round(i),"aria-valuemax":Math.round(a),"aria-valuenow":Math.round(r),tabIndex:c.tabIndex??0,onKeyDown:e=>{if(s?.(e),e.defaultPrevented)return;if(e.key===`Home`||e.key===`End`){e.preventDefault(),o(e.key===`Home`?i:a);return}let n=t===`horizontal`?e.key===`ArrowUp`?-32:e.key===`ArrowDown`?32:null:e.key===`ArrowLeft`?-32:e.key===`ArrowRight`?32:null;n!==null&&(e.preventDefault(),o(Math.min(a,Math.max(i,r+n))))},children:(0,R.jsx)(`span`,{className:`caps-resize-grip`,"aria-hidden":`true`})})});function fD(e){return`init`in e}function pD(e){return typeof e.write==`function`}function Hfe(e){return!!e.onMount}function mD(e){return`v`in e||`e`in e}function hD(e){if(`e`in e)throw e.e;return e.v}function gD(e){return typeof e?.then==`function`}function Ufe(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function _D(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function vD(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function Wfe(e){return!!e.INTERNAL_onInit}var Gfe=(e,t,n,...r)=>n.read(...r),Kfe=(e,t,n,...r)=>n.write(...r),qfe=(e,t,n)=>n.INTERNAL_onInit(t),Jfe=(e,t,n,r)=>n.onMount?.call(n,r),Yfe=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),Wfe(n)&&s(e,t,n)}return a},Xfe=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},Zfe=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of vD(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},Qfe=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(mD(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},T=r=>{var i;if(r===n){let n=u(e,t,r);if(!mD(n)){if(fD(r))g(e,t,r,r.init);else throw Error(`no atom init`)}return hD(n)}let o=p(e,t,r);try{return hD(o)}finally{S.delete(r),y.d.set(r,o.n),gD(y.v)&&_D(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},E,D,O={get signal(){return E||=new AbortController,E.signal},get setSelf(){return!D&&pD(n)&&(D=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),D}},k=y.n,A=o.get(n)===k;try{let i=l(e,t,n,T,O);if(g(e,t,n,i),gD(i)){_(e,t,i,()=>E?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){if(Ufe(e))throw e;return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==k&&A&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},$fe=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of vD(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},epe=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>hD(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!fD(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},tpe=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},npe=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),pD(n)&&Hfe(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},rpe=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},ipe=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(gD(r))for(let a of o.d.keys())_D(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,gD(c)&&a(e,t,c))},ape=(e,t,n)=>{let r=e[14];return hD(r(e,t,n))},ope=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},spe=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},cpe=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},lpe=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},upe=new WeakMap;function dpe(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},Gfe,Kfe,qfe,Jfe,Yfe,Xfe,Zfe,Qfe,$fe,epe,tpe,npe,rpe,ipe,ape,ope,spe,void 0,new WeakMap,cpe,lpe,[0]].map((t,n)=>e[n]||t);upe.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var fpe=0;function ppe(e,t){let n=`atom${++fpe}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=mpe,r.write=hpe),t&&(r.write=t),r}function mpe(e){return e(this)}function hpe(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}function gpe(){return dpe()}var yD=ppe({frames:new Map,order:[],tiles:[],minima:new Map,participating:new Set,mainSize:void 0,zoomed:null,gesture:null,restore:new Map}),bD=(e,t,n)=>Math.min(Math.max(e,t),n),xD=(e,t,n)=>{let r=bD(e.width,n.width,Math.max(n.width,t.width)),i=bD(e.height,n.height,Math.max(n.height,t.height));return{width:r,height:i,x:bD(e.x,0,Math.max(0,t.width-r)),y:bD(e.y,0,Math.max(0,t.height-i))}},SD=(e,t,n)=>{let r=t.width/2,i=t.height/2;return xD(e===`left`?{x:0,y:0,width:r,height:t.height}:e===`right`?{x:r,y:0,width:r,height:t.height}:e===`top-left`?{x:0,y:0,width:r,height:i}:e===`top-right`?{x:r,y:0,width:r,height:i}:e===`bottom-left`?{x:0,y:i,width:r,height:i}:{x:r,y:i,width:r,height:i},t,n)},_pe=()=>{let e=gpe(),t=()=>e.get(yD),n=0,r=r=>{n+=1,e.set(yD,r(t()))},i=(e,t,n)=>{r(r=>{let i=new Map(r.frames);return i.set(e,t),{...r,frames:i,participating:new Set(r.participating).add(e),tiles:r.tiles.includes(e)?r.tiles:[...r.tiles,e],minima:new Map(r.minima).set(e,n),order:r.order.includes(e)?r.order:[...r.order.filter(e=>e!==r.zoomed),e,...r.zoomed?[r.zoomed]:[]]}})},a=e=>t().frames.has(e),o=(e,n)=>{let r=t().gesture;return r?.kind===`frame`&&r.id===e&&r.pointerId===n};return{get version(){return n},get frames(){return t().frames},get order(){return t().order},get tiles(){return t().tiles},get minima(){return t().minima},get participating(){return t().participating},get mainSize(){return t().mainSize},get zoomed(){return t().zoomed},get gesture(){return t().gesture},get restore(){return t().restore},subscribe:t=>e.sub(yD,t),register:i,setParticipation:(e,n)=>{t().frames.has(e)&&r(t=>{if(t.participating.has(e)===n)return t;let r=new Set(t.participating);n?r.add(e):r.delete(e);let i=n?t.tiles.includes(e)?t.tiles:[...t.tiles,e]:t.tiles.filter(t=>t!==e),a=n?t.order.includes(e)?t.order:[...t.order,e]:t.order.filter(t=>t!==e);return{...t,participating:r,tiles:i,order:a,zoomed:n||t.zoomed!==e?t.zoomed:null,gesture:!n&&t.gesture?.kind===`frame`&&t.gesture.id===e?null:t.gesture}})},setMinima:(e,n)=>{let i=t().minima.get(e);!i||i.width===n.width&&i.height===n.height||r(t=>({...t,minima:new Map(t.minima).set(e,n)}))},unregister:e=>{r(t=>{if(!t.frames.has(e))return t;let n=new Map(t.frames);n.delete(e);let r=new Map(t.restore);r.delete(e);let i=t.order.filter(t=>t!==e),a=t.tiles.filter(t=>t!==e),o=new Map(t.minima);o.delete(e);let s=new Set(t.participating);s.delete(e);let c=t.gesture?.kind===`frame`&&t.gesture.id===e?null:t.gesture;return{...t,frames:n,restore:r,order:i,tiles:a,minima:o,participating:s,gesture:c,zoomed:t.zoomed===e?null:t.zoomed}})},begin:(e,n)=>{!a(e)||!t().participating.has(e)||r(t=>({...t,gesture:{kind:`frame`,id:e,pointerId:n,start:t.frames.get(e)??{x:0,y:0,width:0,height:0}},order:[...t.order.filter(t=>t!==e),e]}))},move:(e,n,i,s,c,l=null)=>{a(e)&&t().participating.has(e)&&o(e,n)&&r(t=>({...t,frames:new Map(t.frames).set(e,xD(i,s,c)),gesture:t.gesture?.kind===`frame`?{...t.gesture,snap:l?{side:l,frame:SD(l,s,c)}:null}:t.gesture}))},end:(e,t)=>{o(e,t)&&r(t=>{let n=t.gesture;return n?.kind!==`frame`||!n.snap?{...t,gesture:null}:{...t,frames:new Map(t.frames).set(e,n.snap.frame),restore:new Map(t.restore).set(e,t.restore.get(e)??n.start),gesture:null}})},cancel:(e,n)=>{let i=t().gesture;i?.kind===`frame`&&i.id===e&&i.pointerId===n&&r(t=>{let n=new Map(t.frames);return n.set(e,i.start),{...t,frames:n,gesture:null}})},snap:(e,n,i,o)=>{!a(e)||!t().participating.has(e)||r(t=>{let r=new Map(t.restore);r.set(e,t.frames.get(e)??SD(n,i,o));let a=new Map(t.frames);return a.set(e,SD(n,i,o)),{...t,frames:a,restore:r,order:[...t.order.filter(t=>t!==e),e]}})},restoreFrame:(e,n,i)=>{!a(e)||!t().participating.has(e)||r(t=>{let r=t.restore.get(e);if(!r)return t;let a=new Map(t.frames);a.set(e,xD(r,n,i));let o=new Map(t.restore);return o.delete(e),{...t,frames:a,restore:o}})},focus:e=>{a(e)&&r(t=>({...t,order:[...t.order.filter(t=>t!==e),e],zoomed:t.zoomed===null?null:e}))},swap:(e,n)=>{!a(e)||!a(n)||!t().participating.has(e)||!t().participating.has(n)||r(t=>({...t,tiles:t.tiles.map(t=>t===e?n:t===n?e:t)}))},zoom:e=>{e!==null&&(!a(e)||!t().participating.has(e))||r(t=>({...t,zoomed:e,order:e===null?t.order:[...t.order.filter(t=>t!==e),e]}))},resizeMain:e=>{r(t=>({...t,mainSize:e}))},beginDivider:e=>!t().gesture&&(r(t=>({...t,gesture:{kind:`divider`,pointerId:e,start:t.mainSize}})),!0),finishDivider:(e,n)=>{let i=t().gesture;i?.kind===`divider`&&i.pointerId===e&&r(e=>({...e,gesture:null,mainSize:n?i.start:e.mainSize}))},destroy:()=>{r(e=>({...e,gesture:null,restore:new Map}))}}};function vpe(e,t,n,r,i){let a=i.layout??`main-left`;if(a===`columns`||a===`rows`||a===`grid`)return ype(e,t,n,r,i,a);if(a===`main-top`){let a=CD(e,new Map([...t].map(([e,t])=>[e,{width:t.height,height:t.width}])),n,{width:r.height,height:r.width},i);return{frames:new Map([...a.frames].map(([e,t])=>[e,{x:t.y,y:t.x,width:t.height,height:t.width}])),tabGroups:a.tabGroups,divider:a.divider&&{...a.divider,axis:`y`}}}return CD(e,t,n,r,i)}function ype(e,t,n,r,i,a){let o=new Map,s=[];if(!e.length)return{frames:o,tabGroups:s,divider:null};let c=Math.max(0,i.gap??8),l=e.reduce((e,n)=>({width:Math.max(e.width,t.get(n)?.width??0),height:Math.max(e.height,t.get(n)?.height??0)}),{width:0,height:0}),u=(t,n)=>n+c===0?e.length:Math.min(e.length,Math.max(1,Math.floor((t+c)/(n+c)))),d=u(r.width,l.width),f=u(r.height,l.height),p=l.width>r.width||l.height>r.height?1:a===`columns`?d:a===`rows`?f:Math.min(e.length,d*f),m=a===`columns`?p:a===`rows`?1:Math.min(d,Math.max(Math.ceil(Math.sqrt(p)),Math.ceil(p/f))),h=Math.ceil(p/m),g=(r.width-c*(m-1))/m,_=(r.height-c*(h-1))/h;for(let t=0;t<p;t++){let r=e.slice(t,t===p-1?void 0:t+1),i=r.length===1?r[0]:[...n].reverse().find(e=>r.includes(e))??r[0];i&&o.set(i,{x:t%m*(g+c),y:Math.floor(t/m)*(_+c),width:g,height:_}),r.length>1&&s.push(r)}return{frames:o,tabGroups:s,divider:null}}function CD(e,t,n,r,i){let a=new Map,o=[],s={x:0,y:0,...r},[c,...l]=e,u=(e,t)=>{let r=[...n].reverse().find(t=>e.includes(t))??e[0];r&&a.set(r,t),e.length>1&&o.push(e)};if(!c)return{frames:a,tabGroups:o,divider:null};if(!l.length)return a.set(c,s),{frames:a,tabGroups:o,divider:null};let d=Math.max(0,i.gap??8),f=t.get(c)?.width??0,p=Math.max(...l.map(e=>t.get(e)?.width??0)),m=r.width-d-p;if(f>m)return u([...e],s),{frames:a,tabGroups:o,divider:null};let h=Math.min(m,Math.max(f,i.mainSize??r.width/2)),g={axis:`x`,position:h,min:f,max:m};a.set(c,{...s,width:h});let _={...s,x:h+d,width:r.width-h-d},v=l.map(e=>t.get(e)?.height??0).reduce((e,t)=>e+t,0)+d*(l.length-1);if(v>r.height)u(l,_);else{let e=(r.height-v)/l.length,n=0;for(let r of l){let i=(t.get(r)?.height??0)+e;a.set(r,{..._,y:n,height:i}),n+=i+d}}return{frames:a,tabGroups:o,divider:g}}function wD(e,t=!0,n){let r=(0,I.useRef)(e);r.current=e;let i=(0,I.useRef)(null);return(0,I.useEffect)(()=>(t||i.current?.release(!0),()=>i.current?.release(!0)),[t]),(0,I.useEffect)(()=>{let e=()=>{i.current?.release(!0)};return n?.addEventListener(`abort`,e),()=>{n?.removeEventListener(`abort`,e)}},[n]),{onPointerDown:e=>{if(!t||n?.aborted||i.current||e.pointerType===`mouse`&&e.button!==0)return;let{currentTarget:a,pointerId:o}=e;if(a.setPointerCapture(o),!r.current.begin(e)){a.releasePointerCapture(o);return}let s=r.current.end,c=()=>{l(!0)},l=e=>{a.removeEventListener(`lostpointercapture`,c),i.current=null,s(e),a.hasPointerCapture(o)&&a.releasePointerCapture(o)};i.current={id:o,element:a,x:e.clientX,y:e.clientY,release:l},a.addEventListener(`lostpointercapture`,c)},onPointerMove:e=>{let t=i.current;t?.id===e.pointerId&&(r.current.move(e.clientX-t.x,e.clientY-t.y,e),t.x=e.clientX,t.y=e.clientY)},onPointerUp:e=>{i.current?.id===e.pointerId&&i.current.release(!1)},onPointerCancel:e=>{i.current?.id===e.pointerId&&i.current.release(!0)}}}function bpe(e,t){return e.x<20?e.y<20?`top-left`:e.y>t.height-20?`bottom-left`:`left`:e.x>t.width-20?e.y<20?`top-right`:e.y>t.height-20?`bottom-right`:`right`:null}var TD=(0,I.createContext)(null);function xpe({bounds:e,tiling:t,containerRef:n,children:r}){let i=(0,I.useMemo)(_pe,[]);(0,I.useSyncExternalStore)(i.subscribe,()=>i.version,()=>i.version),(0,I.useEffect)(()=>()=>{i.destroy()},[i]);let a={...t};i.mainSize!==void 0&&(a.mainSize=i.mainSize);let o=t?vpe(i.tiles,i.minima,i.order,e,a):{frames:new Map([...i.frames].filter(([e])=>i.participating.has(e)).map(([t,n])=>[t,xD(n,e,i.minima.get(t)??{width:0,height:0})])),tabGroups:[],divider:null};return i.zoomed&&i.participating.has(i.zoomed)&&(o.frames=new Map([[i.zoomed,{x:0,y:0,...e}]]),o.divider=null,o.tabGroups=[]),(0,R.jsx)(TD.Provider,{value:{state:i,bounds:e,tiled:t!==void 0,arrangement:o,containerRef:n},children:r})}function ED(){let e=(0,I.useContext)(TD);if(!e)throw Error(`Maosaico hooks must be used within MaosaicoRoot`);return e}function Spe(){let{state:e,arrangement:t,tiled:n,bounds:r}=ED(),i=e.tiles,a=(0,I.useRef)({pointer:0,position:0}),o=t.divider,s=wD({begin:t=>!o||!e.beginDivider(t.pointerId)?!1:(a.current={pointer:t.pointerId,position:o.position},!0),move:(t,n)=>{o&&(a.current.position=Math.min(o.max,Math.max(o.min,a.current.position+(o.axis===`x`?t:n))),e.resizeMain(a.current.position))},end:t=>{e.finishDivider(a.current.pointer,t)}},o!==null);return{bounds:r,stackingStyle:{zIndex:e.order.length},mode:n?`tiled`:`floating`,order:i,interacting:e.gesture!==null,snapPreview:!n&&!e.zoomed&&e.gesture?.kind===`frame`?e.gesture.snap??null:null,activeId:e.order.at(-1)??null,zoomedId:e.zoomed,tabGroups:t.tabGroups,divider:o&&{...o,props:s},focus:e.focus,swap:e.swap,zoom:e.zoom,resizeMain:t=>{o&&e.resizeMain(Math.min(o.max,Math.max(o.min,t)))}}}function Cpe(e,t={}){let{state:n,bounds:r,tiled:i,arrangement:a,containerRef:o}=ED();(0,I.useLayoutEffect)(()=>(n.register(e.id,e.frame,e.minima),()=>{n.unregister(e.id)}),[n,e.id]),(0,I.useEffect)(()=>{n.setMinima(e.id,e.minima)},[n,e.id,e.minima.width,e.minima.height]);let s=t.participating??!0;(0,I.useLayoutEffect)(()=>{n.setParticipation(e.id,s)},[n,e.id,s]);let c=(0,I.useRef)(0),l=wD({begin:t=>!n.frames.has(e.id)||n.gesture?!1:(c.current=t.pointerId,n.begin(e.id,t.pointerId),!0),move:(i,a,s)=>{let l=o?.current?.getBoundingClientRect(),u=l&&t.kind!==`resize`?bpe({x:s.clientX-l.left,y:s.clientY-l.top},r):null,d=xD(n.frames.get(e.id)??e.frame,r,e.minima);n.move(e.id,c.current,t.kind===`resize`?{...d,width:d.width+i,height:d.height+a}:{...d,x:d.x+i,y:d.y+a},r,e.minima,u)},end:t=>{t?n.cancel(e.id,c.current):n.end(e.id,c.current)}},s&&!i&&!n.zoomed);return{frame:a.frames.get(e.id)??n.frames.get(e.id)??e.frame,stackingStyle:{zIndex:Math.max(0,n.order.indexOf(e.id))},visible:a.frames.has(e.id),active:s&&n.order.at(-1)===e.id,props:l,focus:()=>{s&&n.focus(e.id)},snap:t=>{s&&!i&&n.snap(e.id,t,r,e.minima)},restore:()=>{s&&!i&&n.restoreFrame(e.id,r,e.minima)}}}var wpe=(0,I.createContext)(null);(0,I.forwardRef)(function({layer:e,style:t,children:n,...r},i){let a=(0,I.useContext)(wpe),o=a?.update,s=a?.roots.get(`dialog`),[c,l]=(0,I.useState)(!1);(0,I.useEffect)(()=>{if(!s)return;let e=()=>{l(Array.from(s.querySelectorAll(`*`)).some(e=>{let t=e.getBoundingClientRect();return t.width>0&&t.height>0}))};e();let t=new MutationObserver(e);return t.observe(s,{childList:!0,subtree:!0,attributes:!0}),()=>{t.disconnect()}},[s]);let u=(0,I.useRef)(null);(0,I.useImperativeHandle)(i,()=>u.current);let d=(0,I.useCallback)(t=>{u.current=t,o?.(e,t)},[o,e]);return(0,I.createElement)(`div`,{...r,ref:d,onFocusCapture:t=>{e===`windows`&&t.target instanceof Node&&t.currentTarget.contains(t.target)&&a?.dismiss?.(),r.onFocusCapture?.(t)},"data-maosaico-layer":e,inert:e===`windows`&&c?``:void 0,style:{position:`relative`,...t,isolation:`isolate`,zIndex:`var(--stipe-layer-${e})`}},n)});var Tpe=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),DD=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Epe={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},Dpe=(0,I.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,I.createElement)(`svg`,{ref:c,...Epe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:DD(`lucide`,i),...s},[...o.map(([e,t])=>(0,I.createElement)(e,t)),...Array.isArray(a)?a:[a]])),OD=(e,t)=>{let n=(0,I.forwardRef)(({className:n,...r},i)=>(0,I.createElement)(Dpe,{ref:i,iconNode:t,className:DD(`lucide-${Tpe(e)}`,n),...r}));return n.displayName=`${e}`,n},kD=OD(`ArrowUpRight`,[[`path`,{d:`M7 7h10v10`,key:`1tivn9`}],[`path`,{d:`M7 17 17 7`,key:`1vkiza`}]]),Ope=OD(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),AD=OD(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),kpe=OD(`Earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),Ape=OD(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),jpe=OD(`Eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Mpe=OD(`FileImage`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Npe=OD(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Ppe=OD(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),jD=OD(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Fpe=OD(`RotateCcw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),MD=OD(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),Ipe={xs:`size-3`,sm:`size-[var(--stipe-icon-size-sm)]`,md:`size-[var(--stipe-icon-size-md)]`,lg:`size-[var(--stipe-icon-size-lg)]`},ND=(0,I.forwardRef)(function({active:e=!1,icon:t,iconSize:n=`xs`,className:r,reveal:i=!1,size:a=`xs`,tone:o=`default`,variant:s=`ghost`,...c},l){let u=a===`responsive`;return(0,R.jsx)(yE,{...c,resultLabel:c.result===void 0?void 0:null,ref:l,size:u?`sm`:a,variant:s,className:RC(`caps-icon-button btn-circle`,u&&`caps-icon-button-responsive md:btn-xs`,e&&`text-accent`,i&&`scale-0 transition-transform group-hover:scale-100 focus-visible:scale-100`,o===`destructive`&&`hover:text-error`,r),children:(0,R.jsx)(`span`,{"aria-hidden":`true`,className:RC(`inline-flex shrink-0 [&>svg]:size-full [&>svg]:[stroke-width:var(--stipe-icon-stroke)]`,Ipe[n]),children:t})})}),Lpe=(0,I.forwardRef)(function({className:e,...t},n){return(0,R.jsx)(`div`,{...t,ref:n,className:RC(`caps-popover-anchor`,e)})}),Rpe=(0,I.forwardRef)(function({className:e,open:t,side:n=`top`,...r},i){return t?(0,R.jsx)(`div`,{...r,ref:i,className:RC(`caps-popover`,e),"data-side":n}):null});(0,I.forwardRef)(function({active:e,className:t,onMouseDown:n,...r},i){return(0,R.jsx)(`div`,{role:`option`,"aria-selected":e,...r,ref:i,className:RC(`caps-popover-option`,t),"data-active":e,onMouseDown:e=>{e.preventDefault(),n?.(e)}})});function zpe({items:e,openId:t,onOpenChange:n,leading:r,trailing:i,renderTrigger:a,placement:o=`housing`,align:s=`end`,hostInset:c,className:l,...u}){let d=(0,I.useId)(),f=(0,I.useRef)(null),p=(0,I.useRef)(null),m=(0,I.useRef)(new Map),h=e.find(e=>e.id===t&&!e.disabled),g=h?.id,_=()=>{g&&m.current.get(g)?.focus(),n(null)};return(0,I.useEffect)(()=>{g&&p.current?.focus()},[g]),(0,I.useEffect)(()=>{c===void 0?f.current?.style.removeProperty(`--caps-status-tray-host-inset`):f.current?.style.setProperty(`--caps-status-tray-host-inset`,`${String(Math.max(0,c))}px`)},[c]),(0,I.useEffect)(()=>{if(!g)return;let e=e=>{e.key!==`Escape`||e.defaultPrevented||(e.preventDefault(),m.current.get(g)?.focus(),n(null))},t=e=>{!(e.target instanceof Node)||f.current?.contains(e.target)||f.current?.querySelector(`[aria-haspopup="menu"][aria-expanded="true"]`)||n(null)};return document.addEventListener(`keydown`,e),document.addEventListener(`pointerdown`,t,!0),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`pointerdown`,t,!0)}},[g,n]),(0,R.jsxs)(Lpe,{...u,ref:f,className:RC(`caps-status-tray`,l),"data-placement":o,"data-align":s,children:[h?(0,R.jsxs)(Rpe,{open:!0,ref:p,tabIndex:-1,side:`top`,id:`${d}-${h.id}`,role:`dialog`,"aria-labelledby":`${d}-title`,className:`caps-status-tray-panel`,"data-status-tray-panel":h.id,children:[(0,R.jsxs)(`div`,{className:`caps-status-tray-head`,children:[h.tone?(0,R.jsx)(VE,{size:`compact`,tone:h.tone,glyph:h.glyph??`dot`}):null,(0,R.jsx)(`span`,{id:`${d}-title`,className:`caps-status-tray-title`,children:h.title??h.label}),h.actions,(0,R.jsx)(ND,{"aria-label":`Close tray`,icon:(0,R.jsx)(MD,{"aria-hidden":`true`}),onClick:_})]}),(0,R.jsx)(`div`,{className:`caps-status-tray-body`,children:h.content})]}):null,o===`host`?null:(0,R.jsxs)(`div`,{className:`caps-status-tray-row`,children:[r,(0,R.jsx)(`div`,{className:`caps-status-tray-chips`,children:e.map(e=>{let r={ref:t=>{t?m.current.set(e.id,t):m.current.delete(e.id)},type:`button`,className:a?void 0:`caps-status-tray-chip`,"aria-expanded":g===e.id,"aria-controls":g===e.id?`${d}-${e.id}`:void 0,"aria-label":e.accessibleLabel,disabled:e.disabled,title:e.disabled?e.accessibleLabel:void 0,"aria-haspopup":`dialog`,"data-status-tray-chip":e.id,onClick:()=>{n(t===e.id?null:e.id)},children:(0,R.jsxs)(R.Fragment,{children:[e.tone?(0,R.jsx)(VE,{size:`compact`,glyph:e.glyph??`dot`,motion:e.motion??`none`,tone:e.tone}):null,(0,R.jsx)(`span`,{className:`caps-status-tray-label`,children:e.label}),e.count!==void 0&&e.count>0?(0,R.jsx)(`span`,{className:`caps-status-tray-count`,children:e.count}):null]})};return(0,R.jsxs)(I.Fragment,{children:[a?a(r):(0,R.jsx)(`button`,{...r}),e.after]},e.id)})}),i]})]})}function Bpe({children:e,className:t,...n}){return(0,R.jsx)(`div`,{...n,className:RC(`caps-status-tray-list`,t),children:e})}function PD({icon:e,primary:t,secondary:n,actions:r,className:i,...a}){return(0,R.jsxs)(`div`,{...a,className:RC(`caps-status-tray-item`,i),children:[e?(0,R.jsx)(`span`,{className:`caps-status-tray-icon`,children:e}):null,(0,R.jsxs)(`span`,{className:`caps-status-tray-text`,children:[(0,R.jsx)(`span`,{className:`caps-status-tray-primary`,children:t}),n?(0,R.jsx)(`span`,{className:`caps-status-tray-secondary`,children:n}):null]}),r?(0,R.jsx)(`span`,{className:`caps-status-tray-actions`,children:r}):null]})}function FD({children:e=`All caught up.`,title:t}){return(0,R.jsxs)(`div`,{className:`caps-status-tray-note`,children:[t?(0,R.jsx)(`strong`,{className:`caps-status-tray-note-title`,children:t}):null,(0,R.jsx)(`p`,{children:e})]})}function Vpe({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function ID(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var LD=[],RD=0,{link:zD,unlink:Hpe,propagate:Upe,checkDirty:BD,shallowPropagate:VD}=Vpe({update(e){return e._update()},notify(e){LD[UD++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,qD(e))}}),HD=0,UD=0,WD,GD=0;function KD(e){try{++GD,e()}finally{--GD||JD()}}function qD(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Hpe(n,e)}function JD(){if(!(GD>0)){for(;HD<UD;){let e=LD[HD];LD[HD++]=void 0,e.notify()}HD=0,UD=0}}function YD(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return WD!==void 0&&zD(i,WD,RD),i._snapshot},subscribe(e){let t=ID(e),n={current:!1},r=Wpe(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=WD,o=t?.compare??Object.is;if(n)WD=i,++RD,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{WD=a,n&&(i.flags&=-5),qD(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&BD(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&VD(e)}}else e&32&&(i.flags=e&-33);return WD!==void 0&&zD(i,WD,RD),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Upe(e),VD(e),JD())}},i}function Wpe(e){let t=()=>{let t=WD;WD=n,++RD,n.depsTail=void 0,n.flags=6;try{return e()}finally{WD=t,n.flags&=-5,qD(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&BD(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,qD(this)}};return t(),n}var XD=class{constructor(e,t){this.atom=YD(e),this.get=this.get.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),t&&(this.actions=t(this))}setState(e){this.atom.set(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(ID(e))}},Gpe=class{constructor(e){this.atom=YD(e)}get state(){return this.atom.get()}get(){return this.state}subscribe(e){return this.atom.subscribe(ID(e))}};function ZD(e,t){return typeof e==`function`?new Gpe(e):t?new XD(e,t):new XD(e)}var Kpe=class{constructor(e,t){this.fn=e,this.options=t,this.lastExecutionTime=0,this.isPending=!1,this.maybeExecute=(...e)=>{let t=Date.now()-this.lastExecutionTime;if(this.options.leading&&t>=this.options.wait)this.execute(...e);else if(this.lastArgs=e,!this.timeoutId&&this.options.trailing){let e=this.options.wait-t;this.isPending=!0,this.timeoutId=setTimeout(()=>{this.lastArgs!==void 0&&this.execute(...this.lastArgs)},e)}},this.execute=(...e)=>{this.fn(...e),this.options.onExecute?.(e,this),this.lastExecutionTime=Date.now(),this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.flush=()=>{this.isPending&&this.lastArgs&&this.execute(...this.lastArgs)},this.cancel=()=>{this.clearTimeout(),this.lastArgs=void 0,this.isPending=!1},this.clearTimeout=()=>{this.timeoutId&&=(clearTimeout(this.timeoutId),void 0)},this.options.leading===void 0&&this.options.trailing===void 0&&(this.options.leading=!0,this.options.trailing=!0)}};function qpe(e,t){return new Kpe(e,t).maybeExecute}var Jpe=class{#e=!0;#t;#n;#r;#i;#a;#o;#s;#c=0;#l=5;#u=!1;#d=!1;#f=null;#p=()=>{this.debugLog(`Connected to event bus`),this.#a=!0,this.#u=!1,this.debugLog(`Emitting queued events`,this.#i),this.#i.forEach(e=>this.emitEventToBus(e)),this.#i=[],this.stopConnectLoop(),this.#n().removeEventListener(`tanstack-connect-success`,this.#p)};#m=()=>{if(this.#c<this.#l){this.#c++,this.dispatchCustomEvent(`tanstack-connect`,{});return}this.#n().removeEventListener(`tanstack-connect`,this.#m),this.#d=!0,this.debugLog(`Max retries reached, giving up on connection`),this.stopConnectLoop()};#h=()=>{this.#u||(this.#u=!0,this.#n().addEventListener(`tanstack-connect-success`,this.#p),this.#m())};constructor({pluginId:e,debug:t=!1,enabled:n=!0,reconnectEveryMs:r=300}){this.#t=e,this.#e=n,this.#n=this.getGlobalTarget,this.#r=t,this.debugLog(` Initializing event subscription for plugin`,this.#t),this.#i=[],this.#a=!1,this.#d=!1,this.#o=null,this.#s=r}startConnectLoop(){this.#o!==null||this.#a||(this.debugLog(`Starting connect loop (every ${this.#s}ms)`),this.#o=setInterval(this.#m,this.#s))}stopConnectLoop(){this.#u=!1,this.#o!==null&&(clearInterval(this.#o),this.#o=null,this.#i=[],this.debugLog(`Stopped connect loop`))}debugLog(...e){this.#r&&console.log(`🌴 [tanstack-devtools:${this.#t}-plugin]`,...e)}getGlobalTarget(){if(typeof globalThis<`u`&&globalThis.__TANSTACK_EVENT_TARGET__)return this.debugLog(`Using global event target`),globalThis.__TANSTACK_EVENT_TARGET__;if(typeof window<`u`&&window.addEventListener!==void 0)return this.debugLog(`Using window as event target`),window;let e=typeof EventTarget<`u`?new EventTarget:void 0;return e===void 0||e.addEventListener===void 0?(this.debugLog(`No event mechanism available, running in non-web environment`),{addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!1}):(this.debugLog(`Using new EventTarget as fallback`),e)}getPluginId(){return this.#t}dispatchCustomEventShim(e,t){try{let n=new Event(e,{detail:t});this.#n().dispatchEvent(n)}catch{this.debugLog(`Failed to dispatch shim event`)}}dispatchCustomEvent(e,t){try{this.#n().dispatchEvent(new CustomEvent(e,{detail:t}))}catch{this.dispatchCustomEventShim(e,t)}}emitEventToBus(e){this.debugLog(`Emitting event to client bus`,e),this.dispatchCustomEvent(`tanstack-dispatch-event`,e)}createEventPayload(e,t){return{type:`${this.#t}:${e}`,payload:t,pluginId:this.#t}}emit(e,t){if(!this.#e){this.debugLog(`Event bus client is disabled, not emitting event`,e,t);return}if(this.#f&&(this.debugLog(`Emitting event to internal event target`,e,t),this.#f.dispatchEvent(new CustomEvent(`${this.#t}:${e}`,{detail:this.createEventPayload(e,t)}))),this.#d){this.debugLog(`Previously failed to connect, not emitting to bus`);return}if(!this.#a){this.debugLog(`Bus not available, will be pushed as soon as connected`),this.#i.push(this.createEventPayload(e,t)),typeof CustomEvent<`u`&&!this.#u&&(this.#h(),this.startConnectLoop());return}return this.emitEventToBus(this.createEventPayload(e,t))}on(e,t,n){let r=n?.withEventTarget??!1,i=`${this.#t}:${e}`;if(r&&(this.#f||=new EventTarget,this.#f.addEventListener(i,e=>{t(e.detail)})),!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`,i),()=>{};let a=e=>{this.debugLog(`Received event from bus`,e.detail),t(e.detail)};return this.#n().addEventListener(i,a),this.debugLog(`Registered event to bus`,i),()=>{r&&this.#f?.removeEventListener(i,a),this.#n().removeEventListener(i,a)}}onAll(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}onAllPluginEvents(e){if(!this.#e)return this.debugLog(`Event bus client is disabled, not registering event`),()=>{};let t=t=>{let n=t.detail;this.#t&&n.pluginId!==this.#t||e(n)};return this.#n().addEventListener(`tanstack-devtools-global`,t),()=>this.#n().removeEventListener(`tanstack-devtools-global`,t)}},QD=new class extends Jpe{constructor(){super({pluginId:`form-devtools`,reconnectEveryMs:1e3})}};function $D(e,t){return typeof e==`function`?e(t):e}function eO(e,t){return oO(t).reduce((e,t)=>{if(e===null)return null;if(e!==void 0)return e[t]},e)}function tO(e,t,n){let r=oO(t);function i(e){if(!r.length)return $D(n,e);let t=r.shift();if(typeof t==`string`||typeof t==`number`&&!Array.isArray(e))return typeof e==`object`?(e===null&&(e={}),{...e,[t]:i(e[t])}):{[t]:i()};if(Array.isArray(e)&&typeof t==`number`){let n=e.slice(0,t);return[...n.length?n:Array(t),i(e[t]),...e.slice(t+1)]}return[...Array(t),i()]}return i(e)}function Ype(e,t){let n=oO(t);function r(e){if(!e)return;if(n.length===1){let t=n[0];if(Array.isArray(e)&&typeof t==`number`)return e.filter((e,n)=>n!==t);let{[t]:r,...i}=e;return i}let t=n.shift();if((typeof t==`string`||typeof t==`number`&&!Array.isArray(e))&&typeof e==`object`)return{...e,[t]:r(e[t])};if(typeof t==`number`&&Array.isArray(e)){if(t>=e.length)return e;let n=e.slice(0,t);return[...n.length?n:Array(t),r(e[t]),...e.slice(t+1)]}throw Error(`It seems we have created an infinite loop in deleteBy. `)}return r(e)}var nO=46,rO=91,iO=93,aO=48,Xpe=57;function oO(e){if(Array.isArray(e))return[...e];if(typeof e!=`string`)throw Error(`Path must be a string.`);let t=e.length,n=[],r=+(t>0&&e.charCodeAt(0)===rO),i=!0,a=-1;for(let o=r;o<=t;o++){let s=o<t?e.charCodeAt(o):-1;if(o===t||s===nO||s===rO||s===iO){let t=o-r;if(t>0){let a=i&&(t===1||e.charCodeAt(r)!==aO),s=e.slice(r,o);if(a){let e=parseInt(s,10);t<=15||String(e)===s?n.push(e):n.push(s)}else n.push(s)}else a!==iO&&(a!==-1||s!==iO)&&(a!==s||s!==nO&&s!==rO)&&n.push(``);r=o+1,i=!0}else(s<aO||s>Xpe)&&(i=!1);a=s}return n.length||n.push(``),n}function Zpe(e){return!(Array.isArray(e)&&e.length===0)}function sO(e,t){return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!1},runValidation:e=>e.validators.filter(Boolean).map(e=>({cause:e.cause,validate:e.fn}))})}function cO(e,t){let{asyncDebounceMs:n}=t,{onBlurAsyncDebounceMs:r,onChangeAsyncDebounceMs:i,onDynamicAsyncDebounceMs:a}=t.validators||{},o=n??0;return t.validationLogic({form:t.form,group:t.group,validators:t.validators,event:{type:e,fieldName:t.fieldName,async:!0},runValidation:t=>t.validators.filter(Boolean).map(t=>{let n=t?.cause||e,s=o;switch(n){case`change`:s=i??o;break;case`blur`:s=r??o;break;case`dynamic`:s=a??o;break;case`submit`:s=0}return e===`submit`&&(s=0),{cause:n,validate:t.fn,debounceMs:s}})})}var lO=e=>!!e&&typeof e==`object`&&`fields`in e;function uO(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||n.length===0&&!Array.isArray(e)&&!Array.isArray(t)&&(Object.getPrototypeOf(e)!==Object.prototype||Object.getPrototypeOf(t)!==Object.prototype))return!1;for(let i of n)if(!r.includes(i)||!uO(e[i],t[i]))return!1;return!0}var dO=({newFormValidatorError:e,isPreviousErrorFromFormValidator:t,previousErrorValue:n})=>e?{newErrorValue:e,newSource:`form`}:t?{newErrorValue:void 0,newSource:void 0}:n?{newErrorValue:n,newSource:`field`}:{newErrorValue:void 0,newSource:void 0},fO=({formLevelError:e,fieldLevelError:t})=>t?{newErrorValue:t,newSource:`field`}:e?{newErrorValue:e,newSource:`form`}:{newErrorValue:void 0,newSource:void 0};function pO(e,t){return e==null?t:{...e,...t}}for(var mO=256,hO=[],gO;mO--;)hO[mO]=(mO+256).toString(16).substring(1);function _O(){let e=0,t,n=``;if(!gO||mO+16>256){for(gO=Array(256),e=256;e--;)gO[e]=256*Math.random()|0;e=0,mO=0}for(;e<16;e++)t=gO[mO+e],n+=e===6?hO[t&15|64]:e===8?hO[t&63|128]:hO[t],e&1&&e>1&&e<11&&(n+=`-`);return mO++,n}var Qpe=qpe(e=>QD.emit(`form-state`,{id:e.formId,state:e.store.state}),{wait:300});function vO(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e.getTime());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++)t[n]=vO(e[n]);return t}if(e instanceof Map){let t=new Map;return e.forEach((e,n)=>{t.set(n,vO(e))}),t}if(e instanceof Set){let t=new Set;return e.forEach(e=>{t.add(vO(e))}),t}let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=vO(e[n]));return t}function yO(e,t){return t===e||t.startsWith(`${e}.`)||t.startsWith(`${e}[`)}var bO=e=>{if(!e.validators)return e.runValidation({validators:[],form:e.form});let t=e.event.async,n=t?void 0:{fn:e.validators.onMount,cause:`mount`},r={fn:t?e.validators.onChangeAsync:e.validators.onChange,cause:`change`},i={fn:t?e.validators.onBlurAsync:e.validators.onBlur,cause:`blur`},a={fn:t?e.validators.onSubmitAsync:e.validators.onSubmit,cause:`submit`},o=t?void 0:{fn:()=>void 0,cause:`server`};switch(e.event.type){case`mount`:return e.runValidation({validators:[n],form:e.form});case`submit`:return e.runValidation({validators:[r,i,a,o],form:e.form});case`server`:return e.runValidation({validators:[],form:e.form});case`blur`:return e.runValidation({validators:[i,o],form:e.form});case`change`:return e.runValidation({validators:[r,o],form:e.form});default:throw Error(`Unknown validation event type: ${e.event.type}`)}};function $pe(e,t){let n=new Map;for(let r of e){let e=r.path??[],i=t,a=``;for(let t=0;t<e.length;t++){let n=e[t];if(n===void 0)continue;let r=typeof n==`object`?n.key:n,o=Number(r);a+=Array.isArray(i)&&!Number.isNaN(o)?`[${o}]`:(t>0?`.`:``)+String(r),i=typeof i==`object`&&i?i[r]:void 0}n.set(a,(n.get(a)??[]).concat(r))}return Object.fromEntries(n)}var xO=(e,t)=>{let n=$pe(e,t);return{form:n,fields:n}},SO={validate({value:e,validationSource:t},n){let r=n[`~standard`].validate(e);if(r instanceof Promise)throw Error(`async function passed to sync validator`);if(r.issues)return t===`field`?r.issues:xO(r.issues,e)},async validateAsync({value:e,validationSource:t},n){let r=await n[`~standard`].validate(e);if(r.issues)return t===`field`?r.issues:xO(r.issues,e)}},CO=e=>!!e&&`~standard`in e,wO={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,isValid:!0,isDefaultValue:!0,errors:[],errorMap:{},errorSourceMap:{},_arrayVersion:0,_pendingValidationsCount:0};function TO(e){function t(t){let n=e.getFieldMeta(t)??wO;e.setFieldMeta(t,{...n,_arrayVersion:(n._arrayVersion||0)+1})}function n(n,r,i){t(n);let a=s(n,r,`move`,i),c=Math.min(r,i),u=Math.max(r,i);for(let e=c;e<=u;e++)a.push(o(n,e));let d=Object.keys(e.fieldInfo).reduce((t,i)=>(i.startsWith(o(n,r))&&t.set(i,e.getFieldMeta(i)),t),new Map);l(a,r<i?`up`:`down`),Object.keys(e.fieldInfo).filter(e=>e.startsWith(o(n,i))).forEach(t=>{let a=t.replace(o(n,i),o(n,r)),s=d.get(a);s&&e.setFieldMeta(t,s)})}function r(e,n){t(e),l(s(e,n,`remove`),`up`)}function i(n,r,i){t(n),s(n,r,`swap`,i).forEach(t=>{if(!t.toString().startsWith(o(n,r)))return;let a=t.toString().replace(o(n,r),o(n,i)),[s,c]=[e.getFieldMeta(t),e.getFieldMeta(a)];s&&e.setFieldMeta(a,s),c&&e.setFieldMeta(t,c)})}function a(n,r){t(n);let i=s(n,r,`insert`);l(i,`down`),i.forEach(t=>{t.toString().startsWith(o(n,r))&&e.setFieldMeta(t,u())})}function o(e,t){return`${e}[${t}]`}function s(t,n,r,i){let a=[o(t,n)];switch(r){case`swap`:a.push(o(t,i));break;case`move`:{let[e,r]=[Math.min(n,i),Math.max(n,i)];for(let n=e;n<=r;n++)a.push(o(t,n));break}default:{let r=e.getFieldValue(t),i=Array.isArray(r)?r.length:0;for(let e=n+1;e<i;e++)a.push(o(t,e));break}}return Object.keys(e.fieldInfo).filter(e=>a.some(t=>e.startsWith(t)))}function c(e,t){return e.replace(/\[(\d+)\]/,(e,n)=>{let r=parseInt(n,10);return`[${t===`up`?r+1:Math.max(0,r-1)}]`})}function l(t,n){(n===`up`?t:[...t].reverse()).forEach(t=>{let r=c(t.toString(),n),i=e.getFieldMeta(r);i?e.setFieldMeta(t,i):e.setFieldMeta(t,u())})}let u=()=>wO;return{bumpArrayVersion:t,handleArrayMove:n,handleArrayRemove:r,handleArraySwap:i,handleArrayInsert:a}}function EO(e){return{values:e.values??{},errorMap:e.errorMap??{},fieldMetaBase:e.fieldMetaBase??{},formGroupStateBase:e.formGroupStateBase??{},isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}}}var DO=class{constructor(e){this.options={},this.fieldInfo={},this.formGroupApis=new Set,this.mount=()=>{let e=this.store.subscribe(()=>{Qpe(this)}),t=QD.on(`request-form-state`,e=>{e.payload.id===this._formId&&QD.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}),n=QD.on(`request-form-reset`,e=>{e.payload.id===this._formId&&this.reset()}),r=QD.on(`request-form-force-submit`,e=>{e.payload.id===this._formId&&(this._devtoolsSubmissionOverride=!0,this.handleSubmit(),this._devtoolsSubmissionOverride=!1)}),i=()=>{r(),n(),t(),e.unsubscribe(),QD.emit(`form-unmounted`,{id:this._formId})};this.options.listeners?.onMount?.({formApi:this});let{onMount:a}=this.options.validators||{};return QD.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options}),a&&this.validateSync(`mount`),i},this.update=e=>{if(!e)return;let t=this.options;this.options=e;let n=e.defaultValues&&!uO(e.defaultValues,t.defaultValues)&&!this.state.isTouched,r=!uO(e.defaultState,t.defaultState)&&!this.state.isTouched;if(!(!n&&!r)){if(KD(()=>{this.baseStore.setState(()=>EO(Object.assign({},this.state,r?e.defaultState:{},n?{values:e.defaultValues}:{})))}),n){let e=TO(this);for(let t of Object.keys(this.fieldInfo))Array.isArray(this.getFieldValue(t))&&e.bumpArrayVersion(t)}QD.emit(`form-api`,{id:this._formId,state:this.store.state,options:this.options})}},this.reset=(e,t)=>{let{fieldMeta:n}=this.state,r=this.resetFieldMeta(n);e&&!t?.keepDefaultValues&&(this.options={...this.options,defaultValues:e}),this.baseStore.setState(()=>{let t=e??this.options.defaultValues??this.options.defaultState?.values;return e||Object.values(this.fieldInfo).forEach(e=>{e.instance&&e.instance.options.defaultValue!==void 0&&(t=tO(t,e.instance.name,e.instance.options.defaultValue))}),EO({...this.options.defaultState,values:t,fieldMetaBase:r})})},this.validateAllFields=async e=>{let t=[];return KD(()=>{Object.values(this.fieldInfo).forEach(n=>{if(!n.instance)return;let r=n.instance;t.push(Promise.resolve().then(()=>r.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.instance.store.state.meta.isTouched||n.instance.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null,a=[`${e}[${t}]`];for(let n=t+1;n<=(i??0);n++)a.push(`${e}[${n}]`);let o=Object.keys(this.fieldInfo).filter(e=>a.some(t=>e.startsWith(t))),s=[];return KD(()=>{o.forEach(e=>{s.push(Promise.resolve().then(()=>this.validateField(e,n)))})}),(await Promise.all(s)).flat()},this.validateField=(e,t)=>{let n=this.fieldInfo[e]?.instance;if(!n){let{hasErrored:n}=this.validateSync(t);return n&&!this.options.asyncAlways?this.getFieldMeta(e)?.errors??[]:this.validateAsync(t).then(()=>this.getFieldMeta(e)?.errors??[])}return n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0})),n.validate(t)},this.validateSync=(e,t)=>{let n=sO(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||bO}),r=!1,i={};return KD(()=>{for(let e of n){if(!e.validate)continue;let{formError:n,fieldErrors:a}=OO(this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`},type:`validate`})),o=kO(e.cause),s=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(a||{})]);t?.filterFieldNames&&(s=new Set([...s].filter(t.filterFieldNames)));for(let e of s){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!a?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??wO,r=a?.[e],{newErrorValue:s,newSource:c}=dO({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[o]===`form`,previousErrorValue:t?.[o]});c===`form`&&(i[e]={...i[e],[o]:r}),t?.[o]!==s&&this.setFieldMeta(e,(e=wO)=>({...e,errorMap:{...e.errorMap,[o]:s},errorSourceMap:{...e.errorSourceMap,[o]:c}}))}t?.dontUpdateFormErrorMap||this.state.errorMap?.[o]!==n&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:n}})),(n||a)&&(r=!0)}if(t?.dontUpdateFormErrorMap)return;let a=kO(`submit`);this.state.errorMap?.[a]&&e!==`submit`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[a]:void 0}}));let o=kO(`server`);this.state.errorMap?.[o]&&e!==`server`&&!r&&this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[o]:void 0}}))}),{hasErrored:r,fieldsErrorMap:i}},this.validateAsync=async(e,t)=>{let n=cO(e,{...this.options,form:this,group:t?.group,validationLogic:this.options.validationLogic||bO});this.state.isFormValidating||this.baseStore.setState(e=>({...e,isFormValidating:!0}));let r=[],i;for(let e of n){if(!e.validate)continue;let n=kO(e.cause);this.state.validationMetaMap[n]?.lastAbortController.abort();let a=new AbortController;this.state.validationMetaMap[n]={lastAbortController:a},r.push(new Promise(async n=>{let r;try{r=await new Promise((t,n)=>{setTimeout(async()=>{if(a.signal.aborted)return t(void 0);try{t(await this.runValidator({validate:e.validate,value:{value:this.state.values,formApi:this,validationSource:`form`,signal:a.signal},type:`validateAsync`}))}catch(e){n(e)}},e.debounceMs)})}catch(e){r=e}let{formError:o,fieldErrors:s}=OO(r);s&&(i=i?{...i,...s}:s);let c=kO(e.cause),l=new Set([...Object.keys(this.state.fieldMeta),...Object.keys(i||{})]),u=Array.from(l);t?.filterFieldNames&&(u=u.filter(t.filterFieldNames));for(let e of u){if(this.baseStore.state.fieldMetaBase[e]===void 0&&!i?.[e])continue;let{errorMap:t,errorSourceMap:n}=this.getFieldMeta(e)??wO,r=i?.[e],{newErrorValue:a,newSource:o}=dO({newFormValidatorError:r,isPreviousErrorFromFormValidator:n?.[c]===`form`,previousErrorValue:t?.[c]});t?.[c]!==a&&this.setFieldMeta(e,(e=wO)=>({...e,errorMap:{...e.errorMap,[c]:a},errorSourceMap:{...e.errorSourceMap,[c]:o}}))}t?.dontUpdateFormErrorMap||this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[c]:o}})),n(i?{fieldErrors:i,errorMapKey:c}:void 0)}))}let a=[],o={};if(r.length){a=await Promise.all(r);for(let e of a)if(e?.fieldErrors){let{errorMapKey:t}=e;for(let[n,r]of Object.entries(e.fieldErrors))o[n]={...o[n]||{},[t]:r}}}return this.baseStore.setState(e=>({...e,isFormValidating:!1})),o},this.validate=(e,t)=>{let{hasErrored:n,fieldsErrorMap:r}=this.validateSync(e,t);return n&&!this.options.asyncAlways?r:this.validateAsync(e,t)},this._handleSubmit=async e=>{this.baseStore.setState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),KD(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance&&(e.instance.store.state.meta.isTouched||e.instance.setMeta(e=>({...e,isTouched:!0})))})});let t=e??this.options.onSubmitMeta;if(!this.state.canSubmit&&!this._devtoolsSubmissionOverride&&this.baseStore.state.submissionAttempts<=1){this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t});return}this.baseStore.setState(e=>({...e,isSubmitting:!0}));let n=()=>{this.baseStore.setState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.state.isFieldsValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),QD.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validateAllFields`,errors:Object.values(this.state.fieldMeta).map(e=>e.errors).flat()});return}if(await this.validate(`submit`),!this.state.isValid){n(),this.options.onSubmitInvalid?.({value:this.state.values,formApi:this,meta:t}),QD.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`validate`,errors:this.state.errors});return}KD(()=>{Object.values(this.fieldInfo).forEach(e=>{e.instance?.triggerOnSubmitListener()})}),this.options.listeners?.onSubmit?.({formApi:this,meta:t});try{await this.options.onSubmit?.({value:this.state.values,formApi:this,meta:t}),KD(()=>{this.baseStore.setState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),QD.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!0}),n()})}catch(e){throw this.baseStore.setState(e=>({...e,isSubmitSuccessful:!1})),QD.emit(`form-submission`,{id:this._formId,submissionAttempt:this.state.submissionAttempts,successful:!1,stage:`inflight`,onError:e}),n(),e}},this.getFieldValue=e=>eO(this.state.values,e),this.getFieldMeta=e=>this.state.fieldMeta[e],this.getFormGroupMeta=e=>this.formGroupMetaDerived.state[e],this.getFieldInfo=e=>this.fieldInfo[e]||={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.setFieldMeta=(e,t)=>{this.baseStore.setState(n=>({...n,fieldMetaBase:{...n.fieldMetaBase,[e]:$D(t,n.fieldMetaBase[e])}}))},this.resetFieldMeta=e=>Object.keys(e).reduce((e,t)=>{let n=t;return e[n]=wO,e},{}),this.setFieldValue=(e,t,n)=>{let r=n?.dontUpdateMeta??!1,i=n?.dontRunListeners??!1,a=n?.dontValidate??!1;KD(()=>{r||this.setFieldMeta(e,e=>({...e,isTouched:!0,isDirty:!0,errorMap:{...e?.errorMap,onMount:void 0}})),this.baseStore.setState(n=>({...n,values:tO(n.values,e,t)}))}),i||this.getFieldInfo(e).instance?.triggerOnChangeListener(),a||this.validateField(e,`change`)},this.deleteField=e=>{let t=[...Object.keys(this.fieldInfo).filter(t=>{let n=e.toString();return t!==n&&t.startsWith(n)}),e];this.baseStore.setState(e=>{let n={...e};return t.forEach(e=>{n.values=Ype(n.values,e),delete this.fieldInfo[e],delete n.fieldMetaBase[e]}),n})},this.pushFieldValue=(e,t,n)=>{this.setFieldValue(e,e=>[...Array.isArray(e)?e:[],t],n),TO(this).bumpArrayVersion(e)},this.insertFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>[...e.slice(0,t),n,...e.slice(t)],pO(r,{dontValidate:!0}));let i=r?.dontValidate??!1;i||await this.validateField(e,`change`),TO(this).handleArrayInsert(e,t),i||await this.validateArrayFieldsStartingFrom(e,t,`change`)},this.replaceFieldValue=async(e,t,n,r)=>{this.setFieldValue(e,e=>e.map((e,r)=>r===t?n:e),pO(r,{dontValidate:!0})),TO(this).bumpArrayVersion(e),(r?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.removeFieldValue=async(e,t,n)=>{let r=this.getFieldValue(e),i=Array.isArray(r)?Math.max(r.length-1,0):null;if(this.setFieldValue(e,e=>e.filter((e,n)=>n!==t),pO(n,{dontValidate:!0})),TO(this).handleArrayRemove(e,t),i!==null){let t=`${e}[${i}]`;this.deleteField(t)}(n?.dontValidate??!1)||(await this.validateField(e,`change`),await this.validateArrayFieldsStartingFrom(e,t,`change`))},this.swapFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=e[t],i=e[n];return tO(tO(e,`${t}`,i),`${n}`,r)},pO(r,{dontValidate:!0})),TO(this).handleArraySwap(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.moveFieldValues=(e,t,n,r)=>{this.setFieldValue(e,e=>{let r=[...e];return r.splice(n,0,r.splice(t,1)[0]),r},pO(r,{dontValidate:!0})),TO(this).handleArrayMove(e,t,n),(r?.dontValidate??!1)||(this.validateField(e,`change`),this.validateField(`${e}[${t}]`,`change`),this.validateField(`${e}[${n}]`,`change`))},this.clearFieldValues=(e,t)=>{let n=this.getFieldValue(e),r=Array.isArray(n)?Math.max(n.length-1,0):null;if(this.setFieldValue(e,[],pO(t,{dontValidate:!0})),TO(this).bumpArrayVersion(e),r!==null)for(let t=0;t<=r;t++){let n=`${e}[${t}]`;this.deleteField(n)}(t?.dontValidate??!1)||this.validateField(e,`change`)},this.resetField=e=>{this.baseStore.setState(t=>{let n=this.getFieldInfo(e).instance?.options.defaultValue,r=eO(this.options.defaultValues,e),i=n??r;return{...t,fieldMetaBase:{...t.fieldMetaBase,[e]:wO},values:i===void 0?t.values:tO(t.values,e,i)}})},this.setErrorMap=e=>{KD(()=>{Object.entries(e).forEach(([e,t])=>{let n=e;if(lO(t)){let{formError:e,fieldErrors:r}=OO(t);for(let e of Object.keys(this.fieldInfo))this.getFieldMeta(e)&&this.setFieldMeta(e,t=>({...t,errorMap:{...t.errorMap,[n]:r?.[e]},errorSourceMap:{...t.errorSourceMap,[n]:`form`}}));this.baseStore.setState(t=>({...t,errorMap:{...t.errorMap,[n]:e}}))}else this.baseStore.setState(e=>({...e,errorMap:{...e.errorMap,[n]:t}}))})})},this.getAllErrors=()=>({form:{errors:this.state.errors,errorMap:this.state.errorMap},fields:Object.entries(this.state.fieldMeta).reduce((e,[t,n])=>(Object.keys(n).length&&n.errors.length&&(e[t]={errors:n.errors,errorMap:n.errorMap}),e),{})}),this.parseValuesWithSchema=e=>SO.validate({value:this.state.values,validationSource:`form`},e),this.parseValuesWithSchemaAsync=e=>SO.validateAsync({value:this.state.values,validationSource:`form`},e),this.timeoutIds={validations:{},listeners:{},formListeners:{}},this._formId=e?.formId??_O(),this._devtoolsSubmissionOverride=!1;let t=EO({...e?.defaultState,values:e?.defaultValues??e?.defaultState?.values});if(e?.transform){t=e.transform({state:t}).state;for(let e of Object.keys(t.errorMap)){let n=t.errorMap[e];if(!(n===void 0||!lO(n)))for(let r of Object.keys(n.fields)){let i=n.fields[r];if(i===void 0)continue;let a=t.fieldMetaBase[r];t.fieldMetaBase[r]={isTouched:!1,isValidating:!1,isBlurred:!1,isDirty:!1,_arrayVersion:0,_pendingValidationsCount:0,...a??{},errorSourceMap:{...a?.errorSourceMap??{},onChange:`form`},errorMap:{...a?.errorMap??{},[e]:i}}}}}this.baseStore=ZD(t);let n;this.fieldMetaDerived=ZD(e=>{let t=this.baseStore.get(),r=0,i={};for(let a of Object.keys(t.fieldMetaBase)){let o=t.fieldMetaBase[a],s=n?.fieldMetaBase[a],c=e?.[a],l=eO(t.values,a),u=c?.errors;if(!s||o.errorMap!==s.errorMap){u=Object.values(o.errorMap??{}).filter(e=>e!==void 0);let e=this.getFieldInfo(a)?.instance;(!e||!e.options.disableErrorFlat)&&(u=u.flat(1))}let d=!Zpe(u),f=!o.isDirty,p=uO(l,this.getFieldInfo(a)?.instance?.options.defaultValue??eO(this.options.defaultValues,a));if(c&&c.isPristine===f&&c.isValid===d&&c.isDefaultValue===p&&c.errors===u&&o===s){i[a]=c,r++;continue}i[a]={...o,errors:u??[],isPristine:f,isValid:d,isDefaultValue:p}}return Object.keys(t.fieldMetaBase).length?e&&r===Object.keys(t.fieldMetaBase).length?e:(n=this.baseStore.get(),i):i}),this.formGroupMetaDerived=ZD(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),r={};for(let i of this.formGroupApis){let a=i.name,o=t.formGroupStateBase[a]??{isSubmitted:!1,isSubmitting:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1},s=n[a],c=!1,l=!0,u=!1,d=!1,f=!0,p=!1;for(let e in n){if(e===a||!yO(a,e))continue;let t=n[e];t&&(t.isValidating&&(c=!0),t.isValid||(l=!1),t.isTouched&&(u=!0),t.isBlurred&&(d=!0),t.isDefaultValue||(f=!1),t.isDirty&&(p=!0))}let m=!p,h=!!c||o.isValidating,g=s?.errorMap??{},_=s?.errorSourceMap??{},v=!!(g.onMount||Object.entries(n).some(([e,t])=>t&&e!==a&&yO(a,e)&&t.errorMap.onMount)),y=e?.[a],b=y?.errors??[];(!y||y.__srcErrorMap!==g)&&(b=Object.values(g).reduce((e,t)=>{if(t===void 0)return e;if(t&&typeof t==`object`&&`fields`in t){let n=t.group;return n!==void 0&&e.push(n),e}return e.push(t),e},[]));let x=b.length===0,S=l&&x,C=i.options.canSubmitWhenInvalid??!1,w=o.submissionAttempts===0&&!u&&!v||!h&&!o.isSubmitting&&S||C;if(y&&y.errorMap===g&&y.errorSourceMap===_&&y.errors===b&&y.isFieldsValidating===c&&y.isFieldsValid===l&&y.isGroupValid===x&&y.isValid===S&&y.canSubmit===w&&y.isTouched===u&&y.isBlurred===d&&y.isPristine===m&&y.isDefaultValue===f&&y.isDirty===p&&y.isValidating===h&&y.isSubmitting===o.isSubmitting&&y.isSubmitted===o.isSubmitted&&y.submissionAttempts===o.submissionAttempts&&y.isSubmitSuccessful===o.isSubmitSuccessful){r[a]=y;continue}let T={...o,errorMap:g,errorSourceMap:_,_arrayVersion:s?._arrayVersion??0,isTouched:u,isBlurred:d,isDirty:p,isPristine:m,isDefaultValue:f,isValid:S,errors:b,isValidating:h,isFieldsValidating:c,isFieldsValid:l,isGroupValid:x,canSubmit:w};Object.defineProperty(T,"__srcErrorMap",{value:g,enumerable:!1,configurable:!0}),r[a]=T}return r});let r;this.store=ZD(e=>{let t=this.baseStore.get(),n=this.fieldMetaDerived.get(),i=Object.values(n).filter(Boolean),a=i.some(e=>e.isValidating),o=i.every(e=>e.isValid),s=i.some(e=>e.isTouched),c=i.some(e=>e.isBlurred),l=i.every(e=>e.isDefaultValue),u=s&&t.errorMap?.onMount,d=i.some(e=>e.isDirty),f=!d,p=!!(t.errorMap?.onMount||i.some(e=>e?.errorMap?.onMount)),m=!!a,h=e?.errors??[];(!r||t.errorMap!==r.errorMap)&&(h=Object.values(t.errorMap).reduce((e,t)=>t===void 0?e:t&&lO(t)?(e.push(t.form),e):(e.push(t),e),[]));let g=h.length===0,_=o&&g,v=this.options.canSubmitWhenInvalid??!1,y=t.submissionAttempts===0&&!s&&!p||!m&&!t.isSubmitting&&_||v,b=t.errorMap;if(u&&(h=h.filter(e=>e!==t.errorMap.onMount),b=Object.assign(b,{onMount:void 0})),e&&r&&e.errorMap===b&&e.fieldMeta===this.fieldMetaDerived.state&&e.errors===h&&e.isFieldsValidating===a&&e.isFieldsValid===o&&e.isFormValid===g&&e.isValid===_&&e.canSubmit===y&&e.isTouched===s&&e.isBlurred===c&&e.isPristine===f&&e.isDefaultValue===l&&e.isDirty===d&&uO(r,t))return e;let x={...t,errorMap:b,fieldMeta:this.fieldMetaDerived.state,errors:h,isFieldsValidating:a,isFieldsValid:o,isFormValid:g,isValid:_,canSubmit:y,isTouched:s,isBlurred:c,isPristine:f,isDefaultValue:l,isDirty:d};return r=this.baseStore.get(),x}),this.handleSubmit=this.handleSubmit.bind(this),this.update(e||{})}get state(){return this.store.state}get formId(){return this._formId}runValidator(e){return CO(e.validate)?SO[e.type](e.value,e.validate):e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function OO(e){return e?lO(e)?{formError:OO(e.form).formError,fieldErrors:e.fields}:{formError:e}:{formError:void 0}}function kO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}var AO=class e{constructor(t){this.options={},this.mount=()=>{this.options.defaultValue!==void 0&&!this.getMeta().isTouched&&this.form.setFieldValue(this.name,this.options.defaultValue,{dontUpdateMeta:!0});let e=this.getInfo();e.instance=this,this.update(this.options);let{onMount:t}=this.options.validators||{};if(t){let e=this.runValidator({validate:t,value:{value:this.state.value,fieldApi:this,validationSource:`field`},type:`validate`});e&&this.setMeta(t=>({...t,errorMap:{...t?.errorMap,onMount:e},errorSourceMap:{...t?.errorSourceMap,onMount:`field`}}))}return this.options.listeners?.onMount?.({value:this.state.value,fieldApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);let e=this.form.fieldInfo[this.name];if(e&&e.instance===this){for(let[t,n]of Object.entries(e.validationMetaMap))n?.lastAbortController.abort(),e.validationMetaMap[t]=void 0;this.form.baseStore.setState(e=>({...e,fieldMetaBase:{...e.fieldMetaBase,[this.name]:{...wO,isTouched:e.fieldMetaBase[this.name]?.isTouched??wO.isTouched,isBlurred:e.fieldMetaBase[this.name]?.isBlurred??wO.isBlurred,isDirty:e.fieldMetaBase[this.name]?.isDirty??wO.isDirty}}})),e.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,fieldApi:this}),this.form.options.listeners?.onFieldUnmount?.({formApi:this.form,fieldApi:this})}}},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(uO(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,this.state.meta)},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,pO(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(e,t)=>{this.form.pushFieldValue(this.name,e,pO(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.insertValue=(e,t,n)=>{this.form.insertFieldValue(this.name,e,t,pO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.replaceValue=(e,t,n)=>{this.form.replaceFieldValue(this.name,e,t,pO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.removeValue=(e,t)=>{this.form.removeFieldValue(this.name,e,pO(t,{dontRunListeners:!0})),t?.dontRunListeners||this.triggerOnChangeListener()},this.swapValues=(e,t,n)=>{this.form.swapFieldValues(this.name,e,t,pO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.moveValue=(e,t,n)=>{this.form.moveFieldValues(this.name,e,t,pO(n,{dontRunListeners:!0})),n?.dontRunListeners||this.triggerOnChangeListener()},this.clearValues=e=>{this.form.clearFieldValues(this.name,pO(e,{dontRunListeners:!0})),e?.dontRunListeners||this.triggerOnChangeListener()},this.getLinkedFields=t=>{let n=Object.values(this.form.fieldInfo),r=[];for(let i of n){if(!i.instance||!(i.instance instanceof e))continue;let{onChangeListenTo:n,onBlurListenTo:a}=i.instance.options.validators||{};t===`change`&&n?.includes(this.name)&&r.push(i.instance),t===`blur`&&a?.includes(this.name)&&r.push(i.instance)}return r},this.validateSync=(e,t)=>{let n=sO(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||bO}),r=this.getLinkedFields(e).reduce((t,n)=>{let r=sO(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||bO});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),i=!1;KD(()=>{let e=(e,n)=>{let r=MO(n.cause),a=n.validate?jO(e.runValidator({validate:n.validate,value:{value:e.store.state.value,validationSource:`field`,fieldApi:e},type:`validate`})):void 0,o=t[r],{newErrorValue:s,newSource:c}=fO({formLevelError:o,fieldLevelError:a});e.state.meta.errorMap?.[r]!==s&&e.setMeta(e=>({...e,errorMap:{...e.errorMap,[r]:s},errorSourceMap:{...e.errorSourceMap,[r]:c}})),s&&(i=!0)};for(let t of n)e(this,t);for(let t of r)t.validate&&e(t.field,t)});let a=MO(`submit`);return this.state.meta.errorMap?.[a]&&e!==`submit`&&!i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[a]:void 0},errorSourceMap:{...e.errorSourceMap,[a]:void 0}})),{hasErrored:i}},this.validateAsync=async(e,t)=>{let n=cO(e,{...this.options,form:this.form,fieldName:this.name,validationLogic:this.form.options.validationLogic||bO}),r=await t,i=this.getLinkedFields(e).reduce((t,n)=>{let r=cO(e,{...n.options,form:n.form,fieldName:n.name,validationLogic:n.form.options.validationLogic||bO});return r.forEach(e=>{e.field=n}),t.concat(r)},[]),a=[],o=[],s=n.some(e=>e.validate),c=Array.from(new Set(i.filter(e=>e.validate).map(e=>e.field)));KD(()=>{s&&this.startValidation();for(let e of c)e.startValidation()});let l=(e,t,n)=>{let i=MO(t.cause),a=e.getInfo();a.validationMetaMap[i]?.lastAbortController.abort();let o=new AbortController;a.validationMetaMap[i]={lastAbortController:o},n.push(new Promise(async n=>{let a;try{a=await new Promise((n,r)=>{e.timeoutIds.validations[t.cause]&&(clearTimeout(e.timeoutIds.validations[t.cause]),e.endValidation()),e.timeoutIds.validations[t.cause]=setTimeout(async()=>{if(o.signal.aborted)return n(void 0);try{n(await this.runValidator({validate:t.validate,value:{value:e.store.state.value,fieldApi:e,signal:o.signal,validationSource:`field`},type:`validateAsync`}))}catch(e){r(e)}},t.debounceMs)})}catch(e){a=e}if(o.signal.aborted)return n(void 0);let s=jO(a),c=r[e.name]?.[i],{newErrorValue:l,newSource:u}=fO({formLevelError:c,fieldLevelError:s});if(e.getInfo().instance!==e)return n(void 0);e.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:l},errorSourceMap:{...e.errorSourceMap,[i]:u}})),n(l)}))};for(let e of n)e.validate&&l(this,e,a);for(let e of i)e.validate&&l(e.field,e,o);let u=[];return(a.length||o.length)&&(u=await Promise.all(a),await Promise.all(o)),KD(()=>{s&&this.endValidation();for(let e of c)e.endValidation()}),u.filter(Boolean)},this.validate=(e,t)=>{if(!this.state.meta.isTouched)return[];let n=t?.skipGroupValidation?[]:Array.from(this.form.formGroupApis).filter(e=>this.name.startsWith(e.name)),r=(t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e)).fieldsErrorMap[this.name]??{};if(!t?.skipFormValidation)for(let t of n){if(t.state.meta.submissionAttempts===0)continue;let{fieldsErrorMap:n}=this.form.validateSync(e,{group:t,dontUpdateFormErrorMap:!0,filterFieldNames:e=>yO(t.name,e)});r={...r,...n[this.name]??{}}}let{hasErrored:i}=this.validateSync(e,r),a=new WeakMap;for(let t of n){let{hasErrored:n}=t.validateSync(e,{},{skipRelatedFieldValidation:!0});a.set(t,n)}if(i&&!this.options.asyncAlways){this.getInfo().validationMetaMap[MO(e)]?.lastAbortController.abort();let t=[];for(let r of n)r.getInfo().validationMetaMap[MO(e)]?.lastAbortController.abort(),t.push(r.state.meta.errors);return[...this.state.meta.errors,...t.flat()]}let o=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e),s=this.validateAsync(e,o),c=[];for(let t of n)a.get(t)&&!t.options.asyncAlways||c.push(t.validateAsync(e,o,{skipRelatedFieldValidation:!0}));return c.length===0?s:Promise.all([s,...c]).then(e=>e.flat())},this.handleChange=e=>{this.setValue(e)},this.handleBlur=()=>{this.state.meta.isTouched||this.setMeta(e=>({...e,isTouched:!0})),this.state.meta.isBlurred||this.setMeta(e=>({...e,isBlurred:!0})),this.validate(`blur`),this.triggerOnBlurListener()},this.setErrorMap=e=>{this.setMeta(t=>({...t,errorMap:{...t.errorMap,...e}}))},this.parseValueWithSchema=e=>SO.validate({value:this.state.value,validationSource:`field`},e),this.parseValueWithSchemaAsync=e=>SO.validateAsync({value:this.state.value,validationSource:`field`},e),this.triggerOnBlurListener=()=>{let e=this.form.options.listeners?.onBlurDebounceMs;e&&e>0?(this.timeoutIds.formListeners.blur&&clearTimeout(this.timeoutIds.formListeners.blur),this.timeoutIds.formListeners.blur=setTimeout(()=>{this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onBlur?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onBlurDebounceMs;t&&t>0?(this.timeoutIds.listeners.blur&&clearTimeout(this.timeoutIds.listeners.blur),this.timeoutIds.listeners.blur=setTimeout(()=>{this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onBlur?.({value:this.state.value,fieldApi:this})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this})},e)):this.form.options.listeners?.onChange?.({formApi:this.form,fieldApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,fieldApi:this});for(let e of this.form.formGroupApis)yO(e.name,this.name)&&e.triggerOnChangeListener()},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,fieldApi:this})},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.store=ZD(e=>{this.form.store.get();let n=this.form.getFieldMeta(this.name)??{...wO,...t.defaultMeta},r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!uO(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}})}get state(){return this.store.state}runValidator(e){return CO(e.validate)?SO[e.type](e.value,e.validate):e.validate(e.value)}startValidation(){this.setMeta(e=>{let t=e._pendingValidationsCount+1;return{...e,_pendingValidationsCount:t,isValidating:t>0&&!e.isValidating||e.isValidating}})}endValidation(){this.setMeta(e=>{let t=Math.max(0,e._pendingValidationsCount-1);return{...e,_pendingValidationsCount:t,isValidating:t===0&&e.isValidating?!1:e.isValidating}})}};function jO(e){if(e)return e}function MO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function NO(e){return{isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,isSubmitSuccessful:e.isSubmitSuccessful??!1}}function eme(e){return{...wO,...e,errors:[],isPristine:!0,isValid:!0,isDefaultValue:!0,isFieldsValidating:!1,isFieldsValid:!0,isGroupValid:!0,canSubmit:!0,isSubmitting:!1,isSubmitted:!1,isValidating:!1,submissionAttempts:0,isSubmitSuccessful:!1}}var PO=class e{constructor(t){this.options={},this.setFormGroupState=e=>{this.form.baseStore.setState(t=>{let n=t.formGroupStateBase[this.name]??NO({});return{...t,formGroupStateBase:{...t.formGroupStateBase,[this.name]:e(n)}}})},this._lastDistributedFieldNames={},this.update=e=>{this.options=e,this.name=e.name,!this.state.meta.isTouched&&this.options.defaultValue!==void 0&&(uO(this.form.getFieldValue(this.name),e.defaultValue)||this.form.setFieldValue(this.name,e.defaultValue,{dontUpdateMeta:!0,dontValidate:!0,dontRunListeners:!0})),this.form.getFieldMeta(this.name)||this.form.setFieldMeta(this.name,{...wO,...this.options.defaultMeta})},this.mount=()=>{this.update(this.options),this.form.formGroupApis.add(this),this.fieldInfo.instance=this,this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:e.formGroupStateBase[this.name]??NO({...this.options.defaultState})}}));let{onMount:e}=this.options.validators||{};if(e){let t=this.runValidator({validate:e,value:{value:this.state.value,groupApi:this,validationSource:`form`},type:`validate`}),n=t,r;IO(t)&&(n=t.group,r=t.fields);let i=FO(n);i&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,onMount:i},errorSourceMap:{...e.errorSourceMap,onMount:`field`}})),this.distributeFieldErrors(`onMount`,r)}return this.options.listeners?.onMount?.({value:this.state.value,groupApi:this}),()=>{for(let[e,t]of Object.entries(this.timeoutIds.validations))t&&(clearTimeout(t),this.timeoutIds.validations[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.listeners))t&&(clearTimeout(t),this.timeoutIds.listeners[e]=null);for(let[e,t]of Object.entries(this.timeoutIds.formListeners))t&&(clearTimeout(t),this.timeoutIds.formListeners[e]=null);if(this.fieldInfo.instance===this){for(let[e,t]of Object.entries(this.fieldInfo.validationMetaMap))t?.lastAbortController.abort(),this.fieldInfo.validationMetaMap[e]=void 0;this.form.formGroupApis.delete(this),this.form.baseStore.setState(e=>({...e,formGroupStateBase:{...e.formGroupStateBase,[this.name]:NO({})}})),this.fieldInfo.instance=null,this.options.listeners?.onUnmount?.({value:this.state.value,groupApi:this})}}},this.setValue=(e,t)=>{this.form.setFieldValue(this.name,e,pO(t,{dontRunListeners:!0,dontValidate:!0})),t?.dontRunListeners||this.triggerOnChangeListener(),t?.dontValidate||this.validate(`change`)},this.getMeta=()=>this.store.state.meta,this.setMeta=e=>this.form.setFieldMeta(this.name,e),this.getInfo=()=>this.fieldInfo,this.getRelatedFields=()=>{let e=Object.values(this.form.fieldInfo),t=[];for(let n of e)n.instance&&n.instance instanceof AO&&n.instance.name.startsWith(this.name)&&t.push(n.instance);return t},this.getRelatedFieldMetasDerived=()=>{let e=Object.entries(this.form.fieldMetaDerived.state),t=[];for(let[n,r]of e)n!==this.name&&yO(this.name,n)&&t.push({...r,name:n});return t},this.buildChildFieldName=e=>e===``?this.name:e.startsWith(`[`)?`${this.name}${e}`:`${this.name}.${e}`,this.distributeFieldErrors=(e,t)=>{let n=this._lastDistributedFieldNames[e]??new Set,r=new Set;if(t)for(let[e,n]of Object.entries(t))n!=null&&n!==!1&&r.add(this.buildChildFieldName(e));let i=new Set([...n,...r]),a=!1;for(let n of i){let r=n.startsWith(this.name+`[`)?n.slice(this.name.length):n.slice(this.name.length+1),i=t?.[r],o=this.form.getFieldMeta(n);if(!o&&!i)continue;let s=o?.errorMap[e],{newErrorValue:c,newSource:l}=dO({newFormValidatorError:i,isPreviousErrorFromFormValidator:o?.errorSourceMap[e]===`form`,previousErrorValue:s});c&&(a=!0),(s!==c||o?.errorSourceMap[e]!==l)&&this.form.setFieldMeta(n,(t=wO)=>({...t,errorMap:{...t.errorMap,[e]:c},errorSourceMap:{...t.errorSourceMap,[e]:l}}))}return this._lastDistributedFieldNames[e]=r,a},this.validateSync=(t,n,r={})=>{let i=sO(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||bO}),a=(r.skipRelatedFieldValidation?[]:this.getRelatedFields()).reduce((e,n)=>{let r=sO(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||bO});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),o=!1;KD(()=>{let t=(t,r)=>{let i=RO(r.cause),a=t===this,s;r.validate&&(s=t.runValidator({validate:r.validate,value:{value:t.store.state.value,validationSource:a?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validate`}));let c=s,l;a&&IO(s)&&(c=s.group,l=s.fields);let u=FO(c),d=n[i],{newErrorValue:f,newSource:p}=fO({formLevelError:d,fieldLevelError:u});t.state.meta.errorMap?.[i]!==f&&t.setMeta(e=>({...e,errorMap:{...e.errorMap,[i]:f},errorSourceMap:{...e.errorSourceMap,[i]:p}})),f&&(o=!0),a&&this.distributeFieldErrors(i,l)&&(o=!0)};for(let e of i)t(this,e);for(let e of a)e.validate&&t(e.field,e)});let s=RO(`submit`);return this.state.meta.errorMap?.[s]&&t!==`submit`&&!o&&this.setMeta(e=>({...e,errorMap:{...e.errorMap,[s]:void 0},errorSourceMap:{...e.errorSourceMap,[s]:void 0}})),{hasErrored:o}},this.validateAsync=async(t,n,r={})=>{let i=cO(t,{...this.options,form:this.form,group:this,validationLogic:this.options.validationLogic||this.form.options.validationLogic||bO}),a=await n,o=r.skipRelatedFieldValidation?[]:this.getRelatedFields(),s=o.reduce((e,n)=>{let r=cO(t,{...n.options,form:n.form,validationLogic:n.form.options.validationLogic||bO});return r.forEach(e=>{e.field=n}),e.concat(r)},[]),c=[],l=[],u=i.some(e=>e.validate)||s.some(e=>e.validate);if(u){this.state.meta.isValidating||this.setMeta(e=>({...e,isValidating:!0}));for(let e of o)e.setMeta(e=>({...e,isValidating:!0}))}let d=(t,n,r)=>{let i=RO(n.cause),o=t.getInfo();o.validationMetaMap[i]?.lastAbortController.abort();let s=new AbortController;o.validationMetaMap[i]={lastAbortController:s};let c=t===this;r.push(new Promise(async r=>{let o;try{o=await new Promise((r,i)=>{t.timeoutIds.validations[n.cause]&&clearTimeout(t.timeoutIds.validations[n.cause]),t.timeoutIds.validations[n.cause]=setTimeout(async()=>{if(s.signal.aborted)return r(void 0);try{r(await this.runValidator({validate:n.validate,value:{value:t.store.state.value,signal:s.signal,validationSource:c?`form`:`field`,...t instanceof e?{groupApi:t}:{fieldApi:t}},type:`validateAsync`}))}catch(e){i(e)}},n.debounceMs)})}catch(e){o=e}if(s.signal.aborted)return r(void 0);let l=o,u;c&&IO(o)&&(l=o.group,u=o.fields);let d=FO(l),f=a[t.name]?.[i],{newErrorValue:p,newSource:m}=fO({formLevelError:f,fieldLevelError:d});if(t.getInfo().instance!==t)return r(void 0);t.setMeta(e=>({...e,errorMap:{...e?.errorMap,[i]:p},errorSourceMap:{...e.errorSourceMap,[i]:m}})),c&&this.distributeFieldErrors(i,u),r(p)}))};for(let e of i)e.validate&&d(this,e,c);for(let e of s)e.validate&&d(e.field,e,l);let f=[];if((c.length||l.length)&&(f=await Promise.all(c),await Promise.all(l)),u){this.setMeta(e=>({...e,isValidating:!1}));for(let e of o)e.setMeta(e=>({...e,isValidating:!1}))}return f.filter(Boolean)},this.validateAllFields=async e=>{let t=[];return KD(()=>{Object.values(this.getRelatedFields()).forEach(n=>{t.push(Promise.resolve().then(()=>n.validate(e,{skipFormValidation:!0,skipGroupValidation:!0}))),n.store.state.meta.isTouched||n.setMeta(e=>({...e,isTouched:!0}))})}),(await Promise.all(t)).flat()},this.validateArrayFieldsStartingFrom=(e,t,n)=>this.form.validateArrayFieldsStartingFrom(e,t,n),this.validateField=(e,t)=>this.form.validateField(e,t),this.getFieldValue=e=>this.form.getFieldValue(e),this.getFieldMeta=e=>this.form.getFieldMeta(e),this.setFieldMeta=(e,t)=>this.form.setFieldMeta(e,t),this.setFieldValue=(e,t)=>this.form.setFieldValue(e,t),this.deleteField=e=>this.form.deleteField(e),this.pushFieldValue=(e,t)=>this.form.pushFieldValue(e,t),this.insertFieldValue=(e,t,n)=>this.form.insertFieldValue(e,t,n),this.replaceFieldValue=(e,t,n)=>this.form.replaceFieldValue(e,t,n),this.swapFieldValues=(e,t,n)=>this.form.swapFieldValues(e,t,n),this.moveFieldValues=(e,t,n)=>this.form.moveFieldValues(e,t,n),this.clearFieldValues=e=>this.form.clearFieldValues(e),this.resetField=e=>this.form.resetField(e),this.removeFieldValue=(e,t)=>this.form.removeFieldValue(e,t),this.areRelatedFieldsValid=()=>Object.values(this.getRelatedFields()).every(e=>e.state.meta.isValid),this.validate=(e,t)=>{let{fieldsErrorMap:n}=t?.skipFormValidation?{fieldsErrorMap:{}}:this.form.validateSync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>yO(this.name,e)}),{hasErrored:r}=this.validateSync(e,n[this.name]??{},{skipRelatedFieldValidation:t?.skipRelatedFieldValidation});if(r&&!this.options.asyncAlways)return this.getInfo().validationMetaMap[RO(e)]?.lastAbortController.abort(),this.state.meta.errors;let i=t?.skipFormValidation?Promise.resolve({}):this.form.validateAsync(e,{dontUpdateFormErrorMap:!0,filterFieldNames:e=>yO(this.name,e)});return this.validateAsync(e,i,{skipRelatedFieldValidation:t?.skipRelatedFieldValidation})},this.triggerOnChangeListener=()=>{let e=this.form.options.listeners?.onChangeGroupDebounceMs;e&&e>0?(this.timeoutIds.formListeners.change&&clearTimeout(this.timeoutIds.formListeners.change),this.timeoutIds.formListeners.change=setTimeout(()=>{this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this})},e)):this.form.options.listeners?.onChangeGroup?.({formApi:this.form,groupApi:this});let t=this.options.listeners?.onChangeDebounceMs;t&&t>0?(this.timeoutIds.listeners.change&&clearTimeout(this.timeoutIds.listeners.change),this.timeoutIds.listeners.change=setTimeout(()=>{this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},t)):this.options.listeners?.onChange?.({value:this.state.value,groupApi:this})},this.triggerOnSubmitListener=()=>{this.options.listeners?.onSubmit?.({value:this.state.value,groupApi:this})},this._handleSubmit=async e=>{this.setFormGroupState(e=>({...e,isSubmitted:!1,submissionAttempts:e.submissionAttempts+1,isSubmitSuccessful:!1})),KD(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.state.meta.isTouched||e.setMeta(e=>({...e,isTouched:!0}))})});let t=e??this.options.onSubmitMeta;this.setFormGroupState(e=>({...e,isSubmitting:!0}));let n=()=>{this.setFormGroupState(e=>({...e,isSubmitting:!1}))};if(await this.validateAllFields(`submit`),!this.areRelatedFieldsValid()){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}if(await this.validate(`submit`,{skipRelatedFieldValidation:!0}),!this.areRelatedFieldsValid()||!this.state.meta.isValid){n(),this.options.onGroupSubmitInvalid?.({value:this.state.value,groupApi:this,meta:t});return}KD(()=>{Object.values(this.getRelatedFields()).forEach(e=>{e.options.listeners?.onGroupSubmit?.({value:e.state.value,fieldApi:e})})}),this.options.listeners?.onSubmit?.({groupApi:this,value:this.state.value});try{await this.options.onGroupSubmit?.({value:this.state.value,groupApi:this,meta:t}),KD(()=>{this.setFormGroupState(e=>({...e,isSubmitted:!0,isSubmitSuccessful:!0})),n()})}catch(e){throw this.setFormGroupState(e=>({...e,isSubmitSuccessful:!1})),n(),e}},this.form=t.form,this.name=t.name,this.options=t,this.timeoutIds={validations:{},listeners:{},formListeners:{}},this.fieldInfo={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0,onDynamic:void 0}},this.store=ZD(e=>{this.form.formGroupMetaDerived.get(),this.form.baseStore.get();let n=this.form.getFormGroupMeta(this.name)??eme(t.defaultMeta),r=this.form.getFieldValue(this.name);return!n.isTouched&&r===void 0&&this.options.defaultValue!==void 0&&!uO(r,this.options.defaultValue)&&(r=this.options.defaultValue),e&&e.value===r&&e.meta===n?e:{value:r,meta:n}}),this.handleSubmit=this.handleSubmit.bind(this)}get state(){return this.store.state}runValidator(e){if(CO(e.validate)){let t=SO[e.type](e.value,e.validate);return e.type===`validate`?LO(t):t.then(LO)}return e.validate(e.value)}handleSubmit(e){return this._handleSubmit(e)}};function FO(e){if(e)return e}function IO(e){return!!e&&typeof e==`object`&&`fields`in e}function LO(e){if(!e||typeof e!=`object`||!(`form`in e)&&!(`fields`in e))return e;let{form:t,fields:n,...r}=e;return{...r,group:t,fields:n}}function RO(e){switch(e){case`submit`:return`onSubmit`;case`blur`:return`onBlur`;case`mount`:return`onMount`;case`server`:return`onServer`;case`dynamic`:return`onDynamic`;default:return`onChange`}}function tme(e,t){if(!t)return;let n=Object.assign({},e,{state:vO(e.state)});t(n),n.fieldInfo!==e.fieldInfo&&(e.fieldInfo=n.fieldInfo),n.options!==e.options&&(e.options=n.options);let r=Object.keys({values:null,validationMetaMap:null,fieldMetaBase:null,formGroupStateBase:null,isSubmitting:null,isSubmitted:null,isValidating:null,submissionAttempts:null,isSubmitSuccessful:null,_force_re_eval:null}).reduce((t,r)=>(e.state[r]!==n.state[r]&&(t[r]=n.state[r]),t),{});return KD(()=>{Object.keys(r).length&&e.baseStore.setState(e=>({...e,...r})),n.state.errorMap!==e.state.errorMap&&e.setErrorMap(n.state.errorMap)}),n}var nme=o((e=>{var t=u();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),zO=o(((e,t)=>{t.exports=nme()})),rme=o((e=>{var t=u(),n=zO();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),BO=o(((e,t)=>{t.exports=rme()}))();function ime(e,t){return e===t}function VO(e,t=e=>e,n){let r=n?.compare??ime,i=(0,I.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,I.useCallback)(()=>e.get(),[e]);return(0,BO.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var HO=typeof window<`u`?I.useLayoutEffect:I.useEffect;function UO(e){let[t,n]=(0,I.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,I.useState)(()=>new AO({...e})),a=r;(t.form!==e.form||t.name!==e.name)&&(a=new AO({...e}),i(a),n({form:e.form,name:e.name}));let o=VO(a.store,e.mode===`array`?e=>e.meta._arrayVersion||0:e=>e.value),s=VO(a.store,e=>e.meta.isTouched),c=VO(a.store,e=>e.meta.isBlurred),l=VO(a.store,e=>e.meta.isDirty),u=VO(a.store,e=>e.meta.errorMap),d=VO(a.store,e=>e.meta.errorSourceMap),f=VO(a.store,e=>e.meta.isValidating),p=(0,I.useMemo)(()=>({...a,get state(){return{value:e.mode===`array`?a.state.value:o,get meta(){return{...a.state.meta,isTouched:s,isBlurred:c,isDirty:l,errorMap:u,errorSourceMap:d,isValidating:f}}}}}),[a,e.mode,o,s,c,l,u,d,f]);return HO(a.mount,[a]),HO(()=>{a.update(e)}),p}var ame=(({children:e,...t})=>{let n=UO(t),r=(0,I.useMemo)(()=>$D(e,n),[e,n]);return(0,R.jsx)(R.Fragment,{children:r})});function ome(){return(0,I.useState)(()=>_O())[0]}var sme=I,cme=`18.3.1`.split(`.`)[0]===`17`?ome:sme.useId;function lme(e){let[t,n]=(0,I.useState)(()=>({form:e.form,name:e.name})),[r,i]=(0,I.useState)(()=>new PO({...e}));(t.form!==e.form||t.name!==e.name)&&(i(new PO({...e})),n({form:e.form,name:e.name}));let a=VO(r.store,e=>e.value),o=VO(r.store,e=>e.meta.isTouched),s=VO(r.store,e=>e.meta.isBlurred),c=VO(r.store,e=>e.meta.isDirty),l=VO(r.store,e=>e.meta.errorMap),u=VO(r.store,e=>e.meta.errorSourceMap),d=VO(r.store,e=>e.meta.isValidating),f=VO(r.store,e=>e.meta.isSubmitting),p=VO(r.store,e=>e.meta.isSubmitted),m=VO(r.store,e=>e.meta.submissionAttempts),h=VO(r.store,e=>e.meta.isSubmitSuccessful),g=VO(r.store,e=>e.meta.canSubmit),_=VO(r.store,e=>e.meta.isValid),v=VO(r.store,e=>e.meta.isFieldsValid),y=VO(r.store,e=>e.meta.isFieldsValidating),b=VO(r.store,e=>e.meta.isGroupValid),x=(0,I.useMemo)(()=>({...r,handleSubmit:((...e)=>r._handleSubmit(...e)),get state(){return{...r.state,value:a,get meta(){return{...r.state.meta,isTouched:o,isBlurred:s,isDirty:c,errorMap:l,errorSourceMap:u,isValidating:d,isSubmitting:f,isSubmitted:p,submissionAttempts:m,isSubmitSuccessful:h,canSubmit:g,isValid:_,isFieldsValid:v,isFieldsValidating:y,isGroupValid:b}}}}}),[r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b]);return HO(r.mount,[r]),HO(()=>{r.update(e)}),x}var ume=(({children:e,...t})=>{let n=lme(t),r=(0,I.useMemo)(()=>$D(e,n),[e,n]);return(0,R.jsx)(R.Fragment,{children:r})});function dme({form:e,selector:t=e=>e,children:n}){let r=VO(e.store,t);return(0,R.jsx)(R.Fragment,{children:$D(n,r)})}function fme(e){let t=cme(),[n,r]=(0,I.useState)(e?.formId),[i,a]=(0,I.useState)(()=>new DO({...e,formId:e?.formId??t}));if(n!==e?.formId){let n=e?.formId??t;a(new DO({...e,formId:n})),r(n)}let o=(0,I.useMemo)(()=>{let e={...i,handleSubmit:((...e)=>i._handleSubmit(...e)),get formId(){return i._formId},get state(){return i.store.state}};return e.Field=function(e){return(0,R.jsx)(ame,{...e,form:i})},e.FormGroup=function(e){return(0,R.jsx)(ume,{...e,form:i})},e.Subscribe=function(e){return(0,R.jsx)(dme,{form:i,selector:e.selector,children:e.children})},e},[i]);HO(i.mount,[]),HO(()=>{i.update(e)});let s=(0,I.useRef)(!1);return HO(()=>{s.current&&e?.transform&&tme(i,e.transform)},[i,e?.transform]),HO(()=>{s.current=!0}),o}var pme=vg(Og),mme=vg(L({message:Og}));function hme(e){for(let t of e.errors){let e=Uu(nee(ree(mme(t),e=>e.message),()=>pme(t)));if(e!==void 0&&e.length>0)return e}}var gme=(0,I.forwardRef)(function({children:e,className:t,optional:n,required:r,...i},a){return(0,R.jsxs)(`label`,{...i,className:RC(`label caps-label cursor-pointer justify-start gap-sm text-sm font-semibold text-base-content`,t),ref:a,children:[e,r?(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`text-error`,children:`*`}):null,n&&!r?(0,R.jsx)(`span`,{className:`caps-label-optional`,children:`Optional`}):null]})}),WO=(0,I.forwardRef)(function({children:e,className:t,...n},r){return(0,R.jsx)(`div`,{...n,className:RC(`caps-input-group join flex w-full items-stretch [&>*]:join-item [&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>.btn]:shrink-0 [&>.input]:min-w-0 [&>.input]:flex-1 [&>.select]:min-w-0 [&>.select]:flex-1`,t),ref:r,children:I.Children.map(e,e=>(0,I.isValidElement)(e)?(0,I.cloneElement)(e,{className:RC(`join-item caps-input-group-control`,e.props.className)}):e)})}),GO=(0,I.forwardRef)(function({className:e,...t},n){return(0,R.jsx)(`div`,{...t,className:RC(`join-item flex items-center border border-base-300 bg-base-200 px-md text-sm text-base-content`,e),ref:n})});function _me(e){let t=e.parentElement;if(!t||e.previousElementSibling===null)return 0;let n=getComputedStyle(t);if(!(n.display.includes(`grid`)||n.display.includes(`flex`)&&n.flexDirection.startsWith(`column`)))return 0;let r=Number.parseFloat(n.rowGap);return Number.isFinite(r)?r:0}(0,I.forwardRef)(function({show:e,appear:t=!1,children:n,className:r,...i},a){let o=(0,I.useRef)(null);(0,I.useImperativeHandle)(a,()=>o.current);let s=qC(),[c,l]=(0,I.useState)(e),u=(0,I.useRef)(!0);return e&&!c&&l(!0),(0,I.useLayoutEffect)(()=>{let n=o.current,r=u.current;if(u.current=!1,!n||r&&!t)return;if(!GC(n)){e||l(!1);return}let i=VC(n),a=`translateY(${String(i.distance)}px)`,c=WC(i,i.ease),d=n.getBoundingClientRect().height,f=_me(n),p=(e,t)=>{n.style.overflow=`clip`;let r=e=>({height:`${String(e)}px`,marginBlockStart:`${String(e===0?-f:0)}px`}),a=n.animate([r(e),r(t)],{duration:i.normal,easing:c}),o=()=>{n.style.removeProperty(`overflow`)};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a};if(e){let e=[n.animate([{opacity:0,transform:a},{opacity:1,transform:`none`}],{duration:i.normal,easing:c})];return!s&&d>0&&e.push(p(0,d)),()=>{for(let t of e)t.cancel()}}let m=n.animate([{opacity:1,transform:`none`},{opacity:0,transform:a}],{duration:i.fast,easing:WC(i,i.easeExit),fill:`forwards`}),h=!s&&d>0?p(d,0):m;return h!==m&&h.effect?.updateTiming({fill:`forwards`}),h.addEventListener(`finish`,()=>{l(!1)}),()=>{m.cancel(),h.cancel()}},[e,t,s]),c?(0,R.jsx)(`div`,{...i,ref:o,className:RC(`caps-presence`,r),"data-present":e,"aria-hidden":!e||void 0,children:n}):null});var vme=(0,I.forwardRef)(function({open:e,children:t,className:n,...r},i){return(0,R.jsx)(`div`,{...r,ref:i,className:RC(`caps-collapse`,n),"data-open":e,"aria-hidden":!e||void 0,children:(0,R.jsx)(`div`,{className:`caps-collapse-clip`,children:t})})});(0,I.forwardRef)(function({swapKey:e,anchor:t=`start`,children:n,className:r,...i},a){let o=(0,I.useRef)(null);(0,I.useImperativeHandle)(a,()=>o.current);let s=qC(),[c,l]=(0,I.useState)({key:e,content:n}),[u,d]=(0,I.useState)([]);c.key===e?c.content!==n&&l({key:e,content:n}):(d([...u.filter(t=>t.key!==e&&t.key!==c.key),c]),l({key:e,content:n}));let f=(0,I.useRef)(null);return(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e||!(`ResizeObserver`in globalThis))return;f.current=e.getBoundingClientRect();let t=new ResizeObserver(()=>{e.getAnimations().length===0&&(f.current=e.getBoundingClientRect())});return t.observe(e),()=>{t.disconnect()}},[]),(0,I.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=[...e.querySelectorAll(`:scope > [data-swap-leaving]`)],n=e.querySelector(`:scope > [data-swap-current]`);if(n===null||t.length===0)return;if(!GC(e)){d([]);return}let r=f.current,i=e.getBoundingClientRect(),a=VC(e),c=[n.animate([{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(a.distance/2)}px)`},{opacity:1,filter:`blur(0px)`,transform:`none`}],{duration:a.normal,easing:WC(a,a.ease)})];for(let e of t){let t=e.animate([{opacity:1,filter:`blur(0px)`,transform:`none`},{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(-a.distance/2)}px)`}],{duration:a.fast,easing:WC(a,a.easeExit),fill:`forwards`}),n=e.dataset.swapLeaving;t.onfinish=()=>{d(e=>e.filter(e=>e.key!==n))},c.push(t)}let l=r!==null&&(Math.abs(r.height-i.height)>.5||Math.abs(r.width-i.width)>.5);return!s&&l&&c.push(e.animate([{width:`${String(r.width)}px`,height:`${String(r.height)}px`},{width:`${String(i.width)}px`,height:`${String(i.height)}px`}],{duration:a.normal,easing:WC(a,a.ease)})),()=>{for(let e of c)e.cancel()}},[e,s]),(0,R.jsx)(`div`,{...i,ref:o,className:RC(`caps-swap`,r),"data-anchor":t,children:[...u.map(e=>(0,R.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-leaving":e.key,"aria-hidden":`true`,children:e.content},e.key)),(0,R.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-current":``,children:n},e)]})});function KO({children:e,...t}){let[n,r]=(0,I.useState)(e);return e&&e!==n&&r(e),(0,R.jsx)(vme,{...t,className:RC(`caps-field-error-reveal`,t.className),open:!!e,children:(0,R.jsx)(`div`,{className:`caps-field-error`,role:`alert`,"aria-hidden":!e,children:n})})}function yme({children:e,divider:t=!0,error:n,layout:r=`end`,status:i,...a}){return(0,R.jsxs)(`footer`,{...a,className:RC(`caps-form-footer`,a.className),"data-divider":t,"data-layout":r,children:[(0,R.jsx)(KO,{children:n}),(0,R.jsxs)(`div`,{className:`caps-form-footer-row`,children:[i?(0,R.jsx)(`div`,{className:`caps-form-footer-status`,role:`status`,children:i}):null,(0,R.jsx)(`div`,{className:`caps-form-footer-actions`,children:e})]})]})}var bme=(0,I.forwardRef)(function({busy:e=!1,children:t,className:n,layout:r,...i},a){return(0,R.jsx)(`form`,{...i,"aria-busy":e||void 0,className:RC(`caps-form`,n),"data-layout":r,ref:a,children:(0,R.jsx)(`fieldset`,{className:`caps-form-body`,disabled:e,children:t})})}),xme={2:`h2`,3:`h3`,4:`h4`},Sme=(0,I.forwardRef)(function({children:e,className:t,description:n,layout:r,level:i=3,title:a,...o},s){let c=(0,I.useId)(),l=xme[i];return(0,R.jsxs)(`section`,{...o,"aria-labelledby":`${c}-title`,className:RC(`caps-form-section`,t),"data-layout":r,ref:s,children:[(0,R.jsxs)(`header`,{className:`caps-form-section-copy`,children:[(0,R.jsx)(l,{className:`caps-form-section-title`,id:`${c}-title`,children:a}),n?(0,R.jsx)(`p`,{className:`caps-form-section-description`,children:n}):null]}),(0,R.jsx)(`div`,{className:`caps-form-section-fields`,children:e})]})}),qO=(0,I.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,layout:a,legend:o,legendTitle:s,...c},l){let u=(0,I.useId)(),d=[n?`${u}-description`:c[`aria-describedby`],r?`${u}-error`:null].filter(Boolean).join(` `)||void 0;return(0,R.jsxs)(`fieldset`,{...c,"aria-describedby":d,"aria-invalid":r?!0:c[`aria-invalid`],className:RC(`caps-fieldset`,t),"data-layout":a,ref:l,children:[(0,R.jsxs)(`legend`,{className:`caps-fieldset-legend`,title:s,children:[i?(0,R.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}):null,o]}),n?(0,R.jsx)(`p`,{className:`caps-fieldset-description`,id:`${u}-description`,children:n}):null,(0,R.jsx)(`div`,{className:`caps-fieldset-fields`,children:e}),r===void 0?null:(0,R.jsx)(KO,{id:`${u}-error`,children:r})]})});function Cme(e){let t=[];return I.Children.forEach(e.props.children,e=>{(0,I.isValidElement)(e)&&e.type!==GO&&t.push(e)}),t[0]??null}var JO=(0,I.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,label:a,labelTitle:o,optional:s,orientation:c=`vertical`,readout:l=!1,required:u,...d},f){let p=(0,I.useId)(),m=(0,I.isValidElement)(e)?e:null,h=m?.type===WO,g=h?Cme(m):m,_=g?.props.id??p,v=`${_}-description`,y=`${_}-error`,b=[g?.props[`aria-describedby`],n?v:null,r?y:null].filter(Boolean).join(` `)||void 0,x=u===!0||g?.props.required,S=r?!0:g?.props[`aria-invalid`],C=u===!0||g?.props[`aria-required`],w={id:_};x!==void 0&&(w.required=x),b!==void 0&&(w[`aria-describedby`]=b),S!==void 0&&(w[`aria-invalid`]=S),C!==void 0&&(w[`aria-required`]=C);let T=m&&g&&!l?h?(0,I.cloneElement)(m,void 0,I.Children.map(m.props.children,e=>e===g?(0,I.cloneElement)(g,w):e)):(0,I.cloneElement)(m,w):e,E=a?(0,R.jsx)(gme,{htmlFor:l?void 0:_,title:o,className:c===`inline`?`font-normal`:void 0,...u===void 0?{}:{required:u},...s===void 0?{}:{optional:s},children:a}):null,D=a||n?(0,R.jsxs)(`div`,{className:`caps-field-copy`,children:[E,n?(0,R.jsx)(`p`,{className:`caps-field-description`,id:v,children:n}):null]}):null,O=i?(0,R.jsxs)(`div`,{className:`caps-field-lead`,children:[(0,R.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}),D]}):D;return(0,R.jsxs)(`div`,{...d,className:RC(`caps-field`,t),"data-orientation":c,ref:f,children:[c===`horizontal`?(0,R.jsxs)(`div`,{className:`caps-field-row`,children:[O,T]}):c===`inline`?(0,R.jsxs)(`div`,{className:`caps-field-row`,children:[T,O]}):(0,R.jsxs)(R.Fragment,{children:[O,T]}),(0,R.jsx)(KO,{id:y,children:r})]})});function wme(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}var YO=`M 9.86 38.14 A 20 20 0 1 1 38.14 38.14`,Tme=6,Eme=new Map([[`ArrowUp`,1],[`ArrowDown`,-1],[`PageUp`,10],[`PageDown`,-10]]),Dme=(0,I.forwardRef)(function({className:e,decrementLabel:t=`Decrease`,defaultValue:n=null,disabled:r,incrementLabel:i=`Increase`,invalid:a,max:o,min:s,onBlur:c,onKeyDown:l,onValueChange:u,step:d=1,unit:f,value:p,wrap:m=!1,...h},g){let[_,v]=(0,I.useState)(n),[y,b]=(0,I.useState)(null),x=p===void 0?_:p,S=wme(d),C=e=>{let t=Number(e.toFixed(S));return s!==void 0&&t<s?s:o!==void 0&&t>o?o:t},w=e=>{let t=e===null?null:C(e);v(t),b(null),t!==x&&u?.(t)},T=()=>{if(y===null)return;let e=Number(y);w(y.trim()===``||!Number.isFinite(e)?null:e)},E=e=>{let t=(x??s??0)+e*d;if(m&&s!==void 0&&o!==void 0){if(t>o){w(s);return}if(t<s){w(o);return}}w(t)},D=s!==void 0&&x!==null&&x<=s,O=o!==void 0&&x!==null&&x>=o,k=r===!0,A=(0,I.useRef)(null),j=s!==void 0&&o!==void 0&&o>s?((x??s)-s)/(o-s):null,M=e=>{k||(e.currentTarget.setPointerCapture(e.pointerId),A.current={y:e.clientY,value:x??s??0})},N=e=>{if(!A.current)return;let t=Math.trunc((A.current.y-e.clientY)/Tme),n=C(A.current.value+t*d);n!==x&&w(n)},P=()=>{A.current=null};return(0,R.jsxs)(`span`,{className:RC(`caps-number-field`,e),"data-at-max":O||void 0,"data-at-min":D||void 0,"data-disabled":k||void 0,"data-wrap":m||void 0,children:[j===null?null:(0,R.jsxs)(`svg`,{className:`caps-number-field-dial`,viewBox:`0 0 48 48`,"aria-hidden":`true`,focusable:`false`,onPointerDown:M,onPointerMove:N,onPointerUp:P,onPointerCancel:P,children:[(0,R.jsx)(`path`,{className:`caps-number-field-dial-track`,d:YO,pathLength:100}),(0,R.jsx)(`path`,{className:`caps-number-field-dial-level`,d:YO,pathLength:100,strokeDasharray:`${String(Math.max(.5,j*100))} 100`})]}),(0,R.jsx)(yE,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-decrement`,"aria-label":t,"aria-controls":h.id,tabIndex:-1,disabled:k||D&&!m,onClick:()=>{E(-1)},children:(0,R.jsx)(Npe,{"aria-hidden":`true`})}),(0,R.jsxs)(`span`,{className:`caps-number-field-readout`,children:[(0,R.jsx)(`input`,{...h,"aria-invalid":a?!0:h[`aria-invalid`]===!1?void 0:h[`aria-invalid`],className:`input caps-input caps-number-field-input`,disabled:r,inputMode:h.inputMode??(S>0?`decimal`:`numeric`),max:o,min:s,onBlur:e=>{T(),c?.(e)},onChange:e=>{b(e.target.value)},onKeyDown:e=>{if(l?.(e),e.defaultPrevented)return;let t=Eme.get(e.key);t===void 0?e.key===`Home`&&s!==void 0?(e.preventDefault(),w(s)):e.key===`End`&&o!==void 0?(e.preventDefault(),w(o)):e.key===`Enter`&&T():(e.preventDefault(),E(t))},ref:g,step:d,type:`number`,value:y??(x===null?``:String(x))}),f?(0,R.jsx)(`span`,{className:`caps-number-field-unit`,"aria-hidden":`true`,children:f}):null]}),(0,R.jsx)(yE,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-increment`,"aria-label":i,"aria-controls":h.id,tabIndex:-1,disabled:k||O&&!m,onClick:()=>{E(1)},children:(0,R.jsx)(Ppe,{"aria-hidden":`true`})})]})}),Ome={neutral:`progress-neutral`,primary:`progress-primary`,secondary:`progress-secondary`,accent:`progress-accent`,success:`progress-success`,info:`progress-info`,warning:`progress-warning`,error:`progress-error`},XO=(0,I.forwardRef)(function({className:e,tone:t=`primary`,...n},r){return(0,R.jsx)(`progress`,{...n,"data-complete":n.value!==void 0&&Number(n.value)>=Number(n.max??1)?`true`:void 0,className:RC(`progress caps-gooey-motion caps-gooey-progress w-full`,Ome[t],e),ref:r})});(0,I.forwardRef)(function({label:e,value:t,max:n,tone:r=`info`,className:i,...a},o){return(0,R.jsxs)(`div`,{...a,ref:o,className:RC(`caps-game-meter`,i),children:[(0,R.jsxs)(`div`,{className:`caps-game-meter-readout`,children:[(0,R.jsx)(`span`,{children:e}),(0,R.jsxs)(`span`,{className:`caps-game-meter-value`,children:[t,` / `,n]})]}),(0,R.jsx)(XO,{"aria-label":e,value:t,max:n,tone:r})]})});function kme({className:e,items:t,onCancel:n,onRemove:r,onRetry:i,rowClassName:a}){return t.length?(0,R.jsx)(`div`,{"aria-live":`polite`,className:`caps-upload-queue flex w-full min-w-0 flex-col gap-sm ${e??``}`,"data-upload-rows":!0,children:t.map(e=>(0,R.jsx)(jme,{item:e,onCancel:n,onRemove:r,onRetry:i,...a===void 0?{}:{rowClassName:a}},e.id))}):null}function ZO({action:e,id:t,onAction:n,retry:r=!1}){return e?(0,R.jsx)(ND,{"aria-label":e.accessibleLabel,title:e.label,variant:`ghost`,size:`xs`,className:`motion-reduce:transition-none`,icon:r?(0,R.jsx)(Fpe,{}):(0,R.jsx)(MD,{}),onClick:()=>void n(t),type:`button`}):null}function Ame({item:e}){return(0,R.jsxs)(`div`,{className:`min-w-0`,children:[(0,R.jsx)(`span`,{className:`block min-w-0 truncate`,title:e.name,children:e.name}),(0,R.jsx)(`div`,{className:`caps-upload-details`,children:(0,R.jsxs)(`span`,{"aria-live":e.alert?`assertive`:void 0,className:`caps-upload-status min-w-0 break-words`,"data-upload-status":!0,role:e.alert?`alert`:void 0,children:[e.alert??e.statusLabel,` `,e.progressLabel]})})]})}function jme({item:e,onCancel:t,onRemove:n,onRetry:r,rowClassName:i}){return(0,R.jsxs)(`div`,{className:`caps-upload-row grid w-full min-w-0 max-w-full grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-sm p-sm text-xs ${i??``}`,children:[e.preview.kind===`image`?(0,R.jsx)(`img`,{alt:``,className:`caps-upload-preview mask mask-squircle size-8 shrink-0 object-cover`,src:e.preview.url}):(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`caps-upload-preview mask mask-squircle flex size-8 shrink-0 items-center justify-center bg-base-300`,children:(0,R.jsx)(Mpe,{className:`size-4`})}),(0,R.jsx)(Ame,{item:e}),(0,R.jsx)(Mme,{actions:e.actions,id:e.id,onCancel:t,onRemove:n,onRetry:r}),(0,R.jsx)(XO,{"aria-label":`${e.name} progress`,className:`caps-upload-progress`,tone:e.alert?`error`:e.progress===100?`success`:`accent`,max:100,value:e.progress??(e.alert?0:void 0)})]})}function Mme({actions:e,id:t,onCancel:n,onRemove:r,onRetry:i}){return(0,R.jsxs)(`div`,{className:`caps-upload-actions flex min-w-0 flex-wrap justify-end gap-xs`,children:[(0,R.jsx)(ZO,{action:e.retry,id:t,onAction:i,retry:!0}),(0,R.jsx)(ZO,{action:e.cancel,id:t,onAction:n}),(0,R.jsx)(ZO,{action:e.remove,id:t,onAction:r})]})}var QO={unchecked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,checked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,mixed:`M3.4 6 L6 6 L8.6 6`},Nme={blurStdDeviation:.22,alphaSlope:18,alphaIntercept:-8};function Pme({state:e}){let t=`caps-checkbox-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(e).current,i=(0,I.useRef)(e),a=qC();return(0,I.useLayoutEffect)(()=>{if(!n.current)return;let t=e!==`unchecked`,r=i.current!==`unchecked`,o=a||i.current===e;i.current=e;let s=VC(n.current),c=jE(s,{ease:`inCubic`,duration:160}),l=aE(n.current,{d:{to:QO[e],...o?kE:jE(s,{ease:`outCubic`,duration:200})},"stroke-dashoffset":{to:+!t,...o?kE:t?jE(s,{ease:`inOutSine`,duration:260}):c},"stroke-width":o?{to:t?2.4:0,duration:0}:t&&!r?[{to:2.2,...jE(s,{ease:`outCubic`,duration:65})},{to:2.4,delay:UC(s,120),...AE(s,{bounce:.35,duration:220})}]:{to:t?2.4:0,...c}});return()=>{l.cancel()}},[e,a]),(0,R.jsxs)(`svg`,{className:`caps-checkbox-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(cE,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,R.jsx)(lE,{id:`${t}-shadow`}),(0,R.jsx)(uE,{id:`${t}-inset`}),(0,R.jsx)(fE,{id:`${t}-goo`,values:Nme}),(0,R.jsxs)(`filter`,{id:`${t}-relief`,x:`-25%`,y:`-25%`,width:`150%`,height:`150%`,colorInterpolationFilters:`sRGB`,children:[(0,R.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.28`,result:`relief`}),(0,R.jsx)(`feSpecularLighting`,{in:`relief`,surfaceScale:`1.2`,specularConstant:`0.55`,specularExponent:`18`,lightingColor:`color-mix(in srgb, var(--color-white) calc(var(--depth) * 100%), var(--color-black))`,result:`light`,children:(0,R.jsx)(`feDistantLight`,{azimuth:`225`,elevation:`55`})}),(0,R.jsx)(`feComposite`,{in:`light`,in2:`SourceAlpha`,operator:`in`,result:`clipped-light`}),(0,R.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`clipped-light`,mode:`screen`})]}),(0,R.jsx)(`mask`,{id:`${t}-contour`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`12`,height:`12`,style:{maskType:`alpha`},children:(0,R.jsx)(`path`,{ref:n,d:QO[r],fill:`none`,stroke:`var(--color-white)`,strokeWidth:r===`unchecked`?0:2.4,pathLength:`1`,strokeDasharray:`1`,strokeDashoffset:+(r===`unchecked`),strokeLinecap:`round`,strokeLinejoin:`round`,filter:e===`mixed`?void 0:`url(#${t}-goo)`})}),(0,R.jsx)(`clipPath`,{id:`${t}-well`,children:(0,R.jsx)(`rect`,{x:`1`,y:`1`,width:`10`,height:`10`,rx:`2.5`})})]}),(0,R.jsx)(`rect`,{className:`caps-checkbox-track`,x:`0.5`,y:`0.5`,width:`11`,height:`11`,rx:`3`,filter:`url(#${t}-inset)`}),(0,R.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,R.jsx)(`g`,{filter:`url(#${t}-shadow)`,children:(0,R.jsx)(`g`,{filter:`url(#${t}-relief)`,children:(0,R.jsx)(`g`,{mask:`url(#${t}-contour)`,children:(0,R.jsx)(`rect`,{x:`0`,y:`0`,width:`12`,height:`12`,fill:`url(#${t}-surface)`})})})})})]})}var $O=(0,I.forwardRef)(function({className:e,appearance:t,indicator:n,invalid:r,indeterminate:i=!1,checked:a,defaultChecked:o=!1,onChange:s,...c},l){let u=(0,I.useRef)(null),[d,f]=(0,I.useState)(o),p=a??d,m=i?`mixed`:p?`checked`:`unchecked`;return(0,I.useImperativeHandle)(l,()=>{if(!u.current)throw Error(`Checkbox input is not mounted`);return u.current},[]),(0,I.useLayoutEffect)(()=>{u.current&&(u.current.indeterminate=i)},[i]),(0,I.useEffect)(()=>{let e=u.current?.form;if(!e||a!==void 0)return;let t=e=>{queueMicrotask(()=>{!e.defaultPrevented&&u.current&&f(o)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[a,o,c.form]),(0,R.jsxs)(`span`,{className:`caps-checkbox`,"data-appearance":t===`compact`?t:void 0,"data-state":m,"data-custom-indicator":n!==void 0||void 0,children:[(0,R.jsx)(`input`,{...c,checked:p,"aria-checked":i?`mixed`:p,"aria-invalid":r?!0:c[`aria-invalid`]===!1?void 0:c[`aria-invalid`],className:RC(`caps-checkbox-input`,e),onChange:e=>{a===void 0&&f(e.target.checked),s?.(e),e.currentTarget.indeterminate=i},ref:u,type:`checkbox`}),n===void 0?(0,R.jsx)(Pme,{state:m}):n]})}),Fme=cle({keyCode:ule(229)});function Ime(e){return e.nativeEvent.isComposing||ke(Fme,e.nativeEvent).success}var ek={};function tk(e,t){let n=I.useRef(ek);return n.current===ek&&(n.current=e(t)),n}var nk=[],rk=void 0;function Lme(){return rk}function Rme(e){nk.push(e)}function ik(e){let t=(t,n)=>{let r=tk(Bme).current,i;try{rk=r;for(let e of nk)e.before(r);i=e(t,n);for(let e of nk)e.after(r);r.didInitialize=!0}finally{rk=void 0}return i};return t.displayName=e.displayName||e.name,t}function zme(e){return I.forwardRef(ik(e))}function Bme(){return{didInitialize:!1}}function ak(){}var Vme=Object.freeze([]),ok=Object.freeze({});function sk(e){I.useEffect(e,Vme)}var ck=0,lk=class e{static create(){return new e}currentId=ck;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ck,t()},e)}isStarted(){return this.currentId!==ck}clear=()=>{this.currentId!==ck&&(clearTimeout(this.currentId),this.currentId=ck)};disposeEffect=()=>this.clear};function uk(){let e=tk(lk.create).current;return sk(e.disposeEffect),e}var dk=typeof document<`u`?I.useLayoutEffect:()=>{};function Hme(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Ume,platform:Wme,maxTouchPoints:Gme}=Hme(),fk=Ume.toLowerCase(),pk=Wme.toLowerCase(),mk=/^i(os$|p)/.test(pk)||pk===`macintel`&&Gme>1,hk=`android`,gk=pk===hk||fk.includes(hk),Kme=!mk&&pk.startsWith(`mac`);pk.startsWith(`win`),!gk&&/^(linux|chrome os)/.test(pk);var qme=Kme||mk,_k=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!_k&&fk.includes(`firefox`),!_k&&fk.includes(`chrom`);var Jme=qme,Yme=/jsdom|happydom/.test(fk);function Xme(e){e.preventDefault(),e.stopPropagation()}function Zme(e){return`nativeEvent`in e}function vk(e){return e.pointerType===``&&e.isTrusted?!0:gk&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function yk(e){return Yme?!1:!gk&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(gk||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function bk(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Qme(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function xk(){return typeof window<`u`}function Sk(e){return Tk(e)?(e.nodeName||``).toLowerCase():`#document`}function Ck(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wk(e){return((Tk(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Tk(e){return xk()?e instanceof Node||e instanceof Ck(e).Node:!1}function Ek(e){return xk()?e instanceof Element||e instanceof Ck(e).Element:!1}function Dk(e){return xk()?e instanceof HTMLElement||e instanceof Ck(e).HTMLElement:!1}function Ok(e){return!xk()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ck(e).ShadowRoot}function kk(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Bk(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ak(e){return/^(table|td|th)$/.test(Sk(e))}function jk(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Mk=/transform|translate|scale|rotate|perspective|filter/,Nk=/paint|layout|strict|content/,Pk=e=>!!e&&e!==`none`,Fk;function Ik(e){let t=Ek(e)?Bk(e):e;return Pk(t.transform)||Pk(t.translate)||Pk(t.scale)||Pk(t.rotate)||Pk(t.perspective)||!Rk()&&(Pk(t.backdropFilter)||Pk(t.filter))||Mk.test(t.willChange||``)||Nk.test(t.contain||``)}function Lk(e){let t=Hk(e);for(;Dk(t)&&!zk(t);){if(Ik(t))return t;if(jk(t))return null;t=Hk(t)}return null}function Rk(){return Fk??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Fk}function zk(e){return/^(html|body|#document)$/.test(Sk(e))}function Bk(e){return Ck(e).getComputedStyle(e)}function Vk(e){return Ek(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Hk(e){if(Sk(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Ok(e)&&e.host||wk(e);return Ok(t)?t.host:t}function Uk(e){let t=Hk(e);return zk(t)?(e.ownerDocument||e).body:Dk(t)&&kk(t)?t:Uk(t)}function Wk(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Uk(e),i=r===e.ownerDocument?.body,a=Ck(r);if(i){let e=Gk(a);return t.concat(a,a.visualViewport||[],kk(r)?r:[],e&&n?Wk(e):[])}return t.concat(r,Wk(r,[],n))}function Gk(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Kk(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function qk(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&Ok(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Jk(e,t){let n=e;for(;n;){if(Ek(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(Ok(n)?n.host:null)}return null}function Yk(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var Xk=`data-base-ui-focusable`,Zk=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Qk=`data-starting-style`,$k=`data-ending-style`,eA={[Qk]:``},tA={[$k]:``},nA={transitionStatus(e){return e===`starting`?eA:e===`ending`?tA:null}},rA=`data-open`,iA=`data-closed`,aA=`data-anchor-hidden`,oA=`data-popup-open`,sA=`data-pressed`,cA={[oA]:``},lA={[oA]:``,[sA]:``},uA={[rA]:``},dA={[iA]:``},fA={[aA]:``},pA={open(e){return e?cA:null}},mA={open(e){return e?lA:null}},hA={open(e){return e?uA:dA},anchorHidden(e){return e?fA:null}},gA={...hA,...nA},_A=`data-trigger-disabled`;function vA(e,t){if(!Ek(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(_A);for(let[,e]of t.entries())if(qk(e,n))return!e.hasAttribute(_A);return!1}function yA(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function bA(e){return e.matches(`html,body`)}function xA(e){return Dk(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function SA(e){return Jk(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Zk}`)!=null}function CA(e){return e?e.getAttribute(`role`)===`combobox`&&xA(e):!1}function wA(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function TA(e,t){return t!=null&&!bk(t)?0:typeof e==`function`?e():e}function EA(e,t,n){let r=TA(e,n);return typeof r==`number`?r:r?.[t]}function DA(e){return typeof e==`function`?e():e}function OA(e,t){return t||e===`click`||e===`mousedown`}function kA(e){return e?.includes(`mouse`)&&e!==`mousedown`}function AA(e,t,n,r){let i=!1,a=!1,o=r??ok;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var jA=`none`,MA=`trigger-press`,NA=`trigger-hover`,PA=`outside-press`,FA=`focus-out`,IA=`escape-key`,LA=`imperative-action`;function RA(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function zA(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function BA(e,t,n,r){let i=tk(HA).current;return UA(i,e,t,n,r)&&GA(i,[e,t,n,r]),i.callback}function VA(e){let t=tk(HA).current;return WA(t,e)&&GA(t,e),t.callback}function HA(){return{callback:null,cleanup:null,refs:[]}}function UA(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function WA(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function GA(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}function KA(e){let t=tk(qA,e).current;return t.next=e,dk(t.effect),t}function qA(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var JA={...I},YA=JA.useInsertionEffect,XA=YA&&YA!==JA.useLayoutEffect?YA:e=>e();function ZA(e){let t=tk(QA).current;return t.next=e,XA(t.effect),t.trampoline}function QA(){let e={next:void 0,callback:$A,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function $A(){}var ej=null;globalThis.requestAnimationFrame;var tj=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},nj=class e{static create(){return new e}static request(e){return tj.request(e)}static cancel(e){return tj.cancel(e)}currentId=ej;request(e){this.cancel(),this.currentId=tj.request(()=>{this.currentId=ej,e()})}cancel=()=>{this.currentId!==ej&&(tj.cancel(this.currentId),this.currentId=ej)};disposeEffect=()=>this.cancel};function rj(){let e=tk(nj.create).current;return sk(e.disposeEffect),e}function ij(e){return e?.ownerDocument||document}var aj={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},$me={...aj,position:`fixed`,margin:0,top:0,left:0};({...aj});var oj=I.forwardRef(function(e,t){let[n,r]=I.useState();dk(()=>{Jme&&_k&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,R.jsx)(`span`,{...e,ref:t,style:$me,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})}),sj=Math.min,cj=Math.max,lj=Math.round,uj=Math.floor,dj=e=>({x:e,y:e}),ehe={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function fj(e,t,n){return cj(e,sj(t,n))}function pj(e,t){return typeof e==`function`?e(t):e}function mj(e){return e.split(`-`)[0]}function hj(e){return e.split(`-`)[1]}function gj(e){return e===`x`?`y`:`x`}function _j(e){return e===`y`?`height`:`width`}function vj(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function yj(e){return gj(vj(e))}function the(e,t,n){n===void 0&&(n=!1);let r=hj(e),i=yj(e),a=_j(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Cj(o)),[o,Cj(o)]}function nhe(e){let t=Cj(e);return[bj(e),t,bj(t)]}function bj(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var xj=[`left`,`right`],Sj=[`right`,`left`],rhe=[`top`,`bottom`],ihe=[`bottom`,`top`];function ahe(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Sj:xj:t?xj:Sj;case`left`:case`right`:return t?rhe:ihe;default:return[]}}function ohe(e,t,n,r){let i=hj(e),a=ahe(mj(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(bj)))),a}function Cj(e){let t=mj(e);return ehe[t]+e.slice(t.length)}function she(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function wj(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:she(e)}function Tj(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function che(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Ej(e,t=e?Bk(e):null){return!e||!e.isConnected||!t||che(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var lhe=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function uhe(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return Ok(n)?n.host:null}function Dj(e){for(let t of Array.from(e.children))if(Sk(t)===`summary`)return t;return null}function dhe(e,t){let n=Dj(t);return!!n&&(e===n||qk(n,e))}function Oj(e){let t=e?Sk(e):``;return e!=null&&e.matches(lhe)&&(t!==`summary`||e.parentElement!=null&&Sk(e.parentElement)===`details`&&Dj(e.parentElement)===e)&&(t!==`details`||Dj(e)==null)&&(t!==`input`||e.type!==`hidden`)}function kj(e){if(!Oj(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=uhe(t)){let n=t!==e,r=Sk(t)===`slot`;if(t.hasAttribute(`inert`)||n&&Sk(t)===`details`&&!t.open&&!dhe(e,t)||t.hasAttribute(`hidden`)||!r&&!fhe(t,n))return!1}return!0}function fhe(e,t){let n=Bk(e);return t?n.display!==`none`:Ej(e,n)}function Aj(e){let t=e.tabIndex;if(t<0){let t=Sk(e);if(t===`details`||t===`audio`||t===`video`||Dk(e)&&e.isContentEditable)return 0}return t}function jj(e){if(Sk(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Mj(e,t){let n=jj(e);if(!n)return!0;let r=t.find(e=>{let t=jj(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=jj(e);return t?.name===n.name&&t.form===n.form})===n}function Nj(e){if(Dk(e)&&Sk(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Dk(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Pj(e,t){Nj(e).forEach(e=>{Oj(e)&&t.push(e),Pj(e,t)})}function Fj(e,t,n){Nj(e).forEach(e=>{Dk(e)&&e.matches(t)&&n.push(e),Fj(e,t,n)})}function Ij(e){return kj(e)&&Aj(e)>=0}function Lj(e){let t=[];return Pj(e,t),t.filter(kj)}function Rj(e){let t=Lj(e);return t.filter(e=>Aj(e)>=0&&Mj(e,t))}function zj(e,t){let n=Rj(e),r=n.length;if(r===0)return;let i=Kk(ij(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Bj(e){return zj(ij(e).body,1)||e}function Vj(e){return zj(ij(e).body,-1)||e}function phe(e,t,n){if(!e)return null;let r=[];Pj(ij(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(kj);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!qk(n,o)&&Ij(o)&&Mj(o,a))return o}return r[i]}function Hj(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!qk(n,r)}function mhe(e){Rj(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Uj(e){let t=[];Fj(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Wj(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Wj(e,t.id,n)])}function Gj(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Kj(e){return`data-base-ui-${e}`}var qj=0;function Jj(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(qj);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),ak;let o=requestAnimationFrame(a);return qj=o,()=>{qj===o&&(cancelAnimationFrame(o),qj=0)}}var Yj=`data-base-ui-inert`,Xj=new WeakMap,Zj=new WeakSet,Qj=new WeakMap,$j=0;function eM(e){return e?Ok(e)?e.host:eM(e.parentNode):null}var tM=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=eM(t);return e.contains(n)?n:null}).filter(e=>e!=null),nM=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},rM=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{Sk(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function hhe(e,t,n,{mark:r=!0}){let i=tM(t,e),a=r?rM(t,nM(i),new Set(i)):[],o=[],s=[];if(n){let e=tM(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);rM(t,nM(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Xj.get(e)||0)+1;Xj.set(e,r),o.push(e),r===1&&n&&Zj.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Qj.get(e)||0)+1;Qj.set(e,t),s.push(e),t===1&&e.setAttribute(Yj,``)}),$j+=1,()=>{o.forEach(e=>{let t=(Xj.get(e)||0)-1;Xj.set(e,t),t||(Zj.has(e)||e.removeAttribute(`aria-hidden`),Zj.delete(e))}),r&&s.forEach(e=>{let t=(Qj.get(e)||0)-1;Qj.set(e,t),t||e.removeAttribute(Yj)}),--$j,$j||(Xj=new WeakMap,Zj=new WeakSet,Qj=new WeakMap)}}function iM(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=ij(e[0]).body;return hhe(e,i,n,{mark:r})}function aM(){let[,e]=I.useState({});return I.useCallback(()=>{e({})},[])}var oM=0;function ghe(e,t=`mui`){let n=I.useRef(void 0),r=aM(),i=e??n.current;return I.useEffect(()=>{n.current??(oM+=1,n.current=`${t}-${oM}`,e??r())},[e,t,r]),i}var sM=JA.useId;function cM(e,t){if(sM!==void 0){let n=sM();return e??(t?`${t}-${n}`:n)}return ghe(e,t)}var _he=18;function lM(e){return _he>=e}function uM(e){if(!I.isValidElement(e))return null;let t=e,n=t.props;return(lM(19)?n?.ref:t.ref)??null}function dM(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function vhe(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function yhe(e,t){return typeof e==`function`?e(t):e}function bhe(e,t){return typeof e==`function`?e(t):e}var fM={};function pM(e,t,n,r,i){if(!n&&!r&&!i&&!e)return mM(t);let a=mM(e);return t&&(a=hM(a,t)),n&&(a=hM(a,n)),r&&(a=hM(a,r)),i&&(a=hM(a,i)),a}function xhe(e){if(e.length===0)return fM;if(e.length===1)return mM(e[0]);let t=mM(e[0]);for(let n=1;n<e.length;n+=1)t=hM(t,e[n]);return t}function mM(e){return _M(e)?{...e(fM)}:She(e)}function hM(e,t){return _M(t)?t(e):Che(e,t)}function She(e){let t={...e};for(let e in t){let n=t[e];gM(e,n)&&(t[e]=vM(n))}return t}function Che(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=dM(e.style,r);break;case`className`:e[n]=bM(e.className,r);break;default:e[n]=gM(n,r)?whe(e[n],r):r}}return e}function gM(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function _M(e){return typeof e==`function`}function whe(e,t){return t?e?(...n)=>{let r=n[0];if(xM(r)){let i=r;yM(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:vM(t):e}function vM(e){return e&&((...t)=>{let n=t[0];return xM(n)&&yM(n),e(...t)})}function yM(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function bM(e,t){return t?e?t+` `+e:t:e}function xM(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function SM(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=Ohe(r));let i=The(t,n,r);if(n.enabled===!1)return null;let a=n.state??ok;return khe(e,r,i,a)}function The(e,t,n){let{className:r,style:i}=e,{state:a=ok,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?yhe(r,a):void 0,d=l?bhe(i,a):void 0,f=l?vhe(a,c):ok,p=l&&s?Ehe(s):void 0,m=l?dM(f,p)??{}:ok;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?VA([m.ref,uM(n),...o]):BA(m.ref,uM(n),o):BA(null,null)),l?(u!==void 0&&(m.className=bM(m.className,u)),d!==void 0&&(m.style=dM(m.style,d)),m):ok}function Ehe(e){return Array.isArray(e)?xhe(e):pM(void 0,e)}var Dhe=Symbol.for(`react.lazy`);function Ohe(e){if(e?.$$typeof!==Dhe)return e;let t=I.Children.toArray(e)[0];return I.isValidElement(t)?t:e}function khe(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=pM(n,t.props);return e.ref=n.ref,I.cloneElement(t,e)}return Ahe(e,n)}function Ahe(e,t){return e===`button`?(0,I.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,I.createElement)(`img`,{alt:``,...t,key:t.key}):I.createElement(e,t)}var jhe={style:{transition:`none`}},Mhe=`data-base-ui-click-trigger`,Nhe={fallbackAxisSide:`end`},Phe={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},CM=c(tv(),1),wM=I.createContext(null),TM=()=>I.useContext(wM),Fhe=Kj(`portal`);function Ihe(e={}){let{ref:t,container:n,componentProps:r=ok,elementProps:i}=e,a=cM(),o=TM()?.portalNode,[s,c]=I.useState(null),[l,u]=I.useState(null),d=ZA(e=>{e!==null&&u(e)}),f=I.useRef(null);dk(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(Tk(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=SM(`div`,r,{ref:[t,d],props:[{id:a,[Fhe]:``},i]}),m=s&&p?CM.createPortal(p,s):null;return{node:l,nodeId:I.isValidElement(p)?p.props.id:void 0,subtree:m}}var Lhe=I.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=Ihe({container:o,ref:t,componentProps:e,elementProps:c}),f=I.useRef(null),p=I.useRef(null),m=I.useRef(null),h=I.useRef(null),[g,_]=I.useState(null),v=I.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;I.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Hj(e)&&(e.type===`focusin`?v.current&&=(Uj(l),!1):(mhe(l),v.current=!0))}return zA(RA(l,`focusin`,e,!0),RA(l,`focusout`,e,!0))},[l,y]),dk(()=>{!l||b!==!0||!v.current||(Uj(l),v.current=!1)},[b,l]);let S=I.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,R.jsxs)(I.Fragment,{children:[d,(0,R.jsxs)(wM.Provider,{value:S,children:[x&&l&&(0,R.jsx)(oj,{"data-type":`outside`,ref:f,onFocus:e=>{Hj(e,l)?m.current?.focus():Vj(g?g.domReference:null)?.focus()}}),x&&l&&(0,R.jsx)(`span`,{role:s,"aria-owns":u,style:Phe}),l&&CM.createPortal(a,l),x&&l&&(0,R.jsx)(oj,{"data-type":`outside`,ref:p,onFocus:e=>{Hj(e,l)?h.current?.focus():(Bj(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,AA(`focus-out`,e.nativeEvent)))}})]})]})});function EM(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Rhe=class{nodesRef={current:[]};events=EM();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},DM=I.createContext(null),OM=I.createContext(null),kM=()=>I.useContext(DM)?.id||null,AM=e=>{let t=I.useContext(OM);return e??t};function zhe(e){let t=cM(),n=AM(e),r=kM();return dk(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Bhe(e){let{children:t,id:n}=e,r=kM();return(0,R.jsx)(DM.Provider,{value:I.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Vhe(e){let{children:t,externalTree:n}=e,r=tk(()=>n??new Rhe).current;return(0,R.jsx)(OM.Provider,{value:r,children:t})}function jM(e){return e==null?e:`current`in e?e.current:e}function Hhe(e,t){let n=Ck(Yk(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(vk(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var Uhe=20,MM=[];function NM(){MM=MM.filter(e=>e.deref()?.isConnected)}function PM(e){NM(),e&&Sk(e)!==`body`&&(MM.push(new WeakRef(e)),MM.length>Uhe&&(MM=MM.slice(-20)))}function FM(){return NM(),MM[MM.length-1]?.deref()}function Whe(e){return e?Ij(e)?e:Rj(e)[0]||e:null}function IM(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Lj(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ij(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function Ghe(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=ZA(()=>b.current.floatingContext?.nodeId),S=i===!1,C=CA(_)&&S,w=KA(i),T=KA(a),E=KA(o),D=KA(u),O=KA(g),k=AM(m),A=TM(),j=I.useRef(!1),M=I.useRef(!1),N=I.useRef(!1),P=I.useRef(null),ee=I.useRef(``),te=I.useRef(``),ne=I.useRef(null),F=I.useRef(null),re=BA(ne,p,A?.beforeInsideRef),ie=BA(F,A?.afterInsideRef),ae=uk(),oe=uk(),se=rj(),ce=A!=null,le=wA(v),ue=ZA((e=le)=>e?Rj(e):[]),de=ZA(()=>h?.().filter(e=>e!=null)??[]);I.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&qk(le,Kk(ij(le)))&&ue().length===0&&!C&&Xme(e)}return RA(ij(le),`keydown`,e)},[r,le,c,C,ue]),I.useEffect(()=>{if(r||!g)return;let e=ij(le);function t(){N.current=!1}function n(e){let t=Yk(e),n=de(),r=qk(v,t)||qk(_,t)||qk(A?.portalNode,t)||n.some(e=>e===t||qk(e,t));N.current=!r,te.current=e.pointerType||`keyboard`,Jk(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,oe.start(0,()=>{M.current=!1}))}function i(){te.current=`keyboard`}return zA(RA(e,`pointerdown`,n,!0),RA(e,`pointerup`,t,!0),RA(e,`pointercancel`,t,!0),RA(e,`keydown`,i,!0),t)},[r,v,_,le,g,A,oe,de]),I.useEffect(()=>{if(r||!l)return;let e=ij(le);function n(){M.current=!0,oe.start(0,()=>{M.current=!1})}function i(e){let t=Yk(e);Ij(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=Yk(n);c&&r==null&&a!=null&&qk(v,a)&&PM(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=de(),p=r?.hasAttribute(Kj(`focus-guard`))&&[ne.current,F.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,jM(f),jM(d)].includes(r),m=!(qk(_,r)||qk(v,r)||qk(r,v)||qk(A?.portalNode,r)||u.some(e=>e===r||qk(e,r))||l.hasMatchingElement(e=>qk(e,r))||p||k&&(Wj(k.nodesRef.current,o).find(e=>qk(e.context?.elements.floating,r)||qk(e.context?.elements.domReference,r))||Gj(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,wA(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&le&&IM(le),s&&i!==_&&!Ej(a)&&Kk(e)===e.body){if(Dk(le)&&(le.focus(),s===`popup`)){se.request(()=>{le.focus()});return}let e=ue(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||le;Dk(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!M.current&&(C||r!==FM())&&(j.current=!0,t.setOpen(!1,AA(FA,n)))})}function o(){N.current||(b.current.insideReactTree=!0,ae.start(0,()=>{b.current.insideReactTree=!1}))}let u=Dk(_)?_:null;if(!(!v&&!u))return zA(u&&RA(u,`focusout`,a),u&&RA(u,`pointerdown`,n),v&&RA(v,`focusin`,i),v&&RA(v,`focusout`,a),v&&A&&RA(v,`focusout`,o,!0))},[r,_,v,le,c,k,A,t,l,s,ue,C,x,b,ae,oe,se,d,f,de]),I.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${Kj(`portal`)}]`)||[]),t=(k?Gj(k.nodesRef.current,x()):[]).find(e=>CA(e.context?.elements.domReference||null))?.context?.elements.domReference,n=iM([v,...e,ne.current,F.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...de(),t,jM(f),jM(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=iM([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,de]),dk(()=>{if(!g||r||!Dk(le))return;ee.current=``,te.current=``;let e=ij(le),t=Kk(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||qk(le,t))return;let i=null,a=()=>(i??=ue(le),i[0]||le),o;o=r===!0||r===null?a():jM(r),o||=a();let s=qk(le,Kk(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&vk(c);Jj(o,{sync:l,preventScroll:o===le,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Kk(e);return!(t!==o&&qk(le,t))}})})},[r,g,le,ue,w,D,O,b]);let fe=I.useRef(null);dk(()=>{if(r||!le){fe.current=null;return}fe.current&&=(fe.current.cancelled=!0,null);let e=ij(le),t=Kk(e),n=D.current==null;PM(t);function i(e){if(e.open||(ee.current=Hhe(e.nativeEvent,te.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Kj(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(vk(e.nativeEvent)||yk(e.nativeEvent))j.current=!1;else{let e=!1;ij(le).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&Sk(t)!==`body`?t:null,s=n?o||a:a||o;return s||=FM()||null,typeof i==`boolean`?s:jM(i)||s||null}return()=>{y.off(`openchange`,i);let t=Kk(e),n=de(),r=qk(v,t)||n.some(e=>e===t||qk(e,t))||k&&Wj(k.nodesRef.current,x(),!1).some(e=>qk(e.context?.elements.floating,t)),o=T.current,s=ee.current,c=a(s),l={cancelled:!1};fe.current=l,queueMicrotask(()=>{fe.current===l&&(fe.current=null);let n=Whe(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&Dk(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,le,T,E,D,y,k,_,x,de]),dk(()=>{if(!_k||g||!v)return;let e=Kk(ij(v));!Dk(e)||!xA(e)||qk(v,e)&&e.blur()},[g,v]),dk(()=>{if(!(r||!A))return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),dk(()=>{if(!(r||!le))return IM(le),()=>{queueMicrotask(NM)}},[r,le]);let pe=!r&&(!c||!C)&&(ce||c);return(0,R.jsxs)(I.Fragment,{children:[pe&&(0,R.jsx)(oj,{"data-type":`inside`,ref:re,onFocus:e=>{if(c){let e=ue();Jj(e[e.length-1])}else A?.portalNode&&(j.current=!1,Hj(e,A.portalNode)?Bj(_)?.focus():jM(f??A.beforeOutsideRef)?.focus())}}),n,pe&&(0,R.jsx)(oj,{"data-type":`inside`,ref:ie,onFocus:e=>{c?Jj(ue()[0]):A?.portalNode&&(l&&(j.current=!0),Hj(e,A.portalNode)?Vj(_)?.focus():jM(d??A.afterOutsideRef)?.focus())}})]})}function Khe(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=MA}=t,l=e.context.dataRef,u=I.useRef(void 0),d=rj(),f=uk(),p=I.useMemo(()=>{function t(t,n,r,i){let a=AA(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=bk(e.pointerType,!0)&&yk(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||bk(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=Yk(s),p=xA(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;if(r===`mousedown`&&o){u.current=void 0;return}bk(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return I.useMemo(()=>n?{reference:p}:ok,[n,p])}function qhe(){return!1}function Jhe(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Yhe(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=qhe,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=AM(c),m=ZA(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=ZA(()=>a),{escapeKey:v,outsidePress:y}=Jhe(s),b=I.useRef(!1),x=I.useRef(!1),S=I.useRef(!1),C=I.useRef(!1),w=I.useRef(!1),T=I.useRef(``),E=I.useRef(null),D=uk(),O=uk(),k=uk(),A=ZA(()=>{O.clear(),d.current.insideReactTree=!1}),j=ZA(e=>{let t=d.current.floatingContext?.nodeId;return(p?Wj(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=ZA(t=>yA(t,e.select(`floatingElement`))||yA(t,e.select(`domReferenceElement`))),N=ZA(t=>{o()&&e.setOpen(!1,AA(MA,t.nativeEvent))}),P=ZA(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=Zme(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=AA(IA,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),ee=ZA(()=>{d.current.insideReactTree=!0,O.start(0,A)}),te=ZA(t=>{if(!l||!n||t.button!==0)return;let r=Yk(t.nativeEvent);qk(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),ne=ZA(e=>{!l||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});I.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),I.useEffect(()=>A,[A]),I.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new lk,i=ij(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(_k?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&Wj(p.nodesRef.current,t).some(t=>yA(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=Yk(n),i=`[${Kj(`inert`)}]`,a=Ek(r)?r.getRootNode():null,o=Array.from((Ok(a)?a:ij(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>qk(e,r))))return;let c=Ek(r)?r:null;for(;c&&!zk(c);){let e=Hk(c);if(zk(e)||!Ek(e))break;c=e}if(!(o.length&&Ek(r)&&!bA(r)&&!qk(r,e.select(`floatingElement`))&&o.every(e=>!qk(c,e)))){if(Dk(r)&&!(`touches`in n)){let e=zk(r),t=Bk(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!vk(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||j(`__outsidePressBubbles`)||(e.setOpen(!1,AA(PA,n)),A())}}}function ee(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||M(t)||N(t)}function te(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function ne(e,t){let n=Yk(e);if(!n)return;let r=RA(n,e.type,()=>{t(e),r()})}function F(e){T.current=`touch`,ne(e,te)}function re(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),!(e.type===`mousedown`&&E.current&&!E.current.dismissOnMouseDown)&&ne(e,e=>{e.type===`pointerdown`?ee(e):N(e)})}function ie(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;if(c(),f()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!O(e)){if(n){s();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,A())}}}function ae(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function oe(e){ne(e,ae)}function se(e){f()!==`sloppy`||!E.current||M(e)||(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function ce(e){ne(e,se)}let le=zA(r&&zA(RA(i,`keydown`,P),RA(i,`compositionstart`,a),RA(i,`compositionend`,o)),g&&zA(RA(i,`click`,re,!0),RA(i,`pointerdown`,re,!0),RA(i,`pointerup`,ie,!0),RA(i,`pointercancel`,ie,!0),RA(i,`mousedown`,re,!0),RA(i,`mouseup`,ie,!0),RA(i,`touchstart`,F,{capture:!0,passive:!0}),RA(i,`touchmove`,oe,{capture:!0,passive:!0}),RA(i,`touchend`,ce,{capture:!0,passive:!0})));return()=>{le(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let F=I.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),re=I.useMemo(()=>({onKeyDown:P,onPointerDown:ne,onMouseDown:ne,onClickCapture:ee,onMouseDownCapture(e){ee(),te(e)},onPointerDownCapture(e){ee(),te(e)},onMouseUpCapture:ee,onTouchEndCapture:ee,onTouchMoveCapture:ee}),[P,ee,te,ne]);return I.useMemo(()=>n?{reference:F,floating:re,trigger:F}:{},[n,F,re])}function Xhe(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var LM=Xhe(`https://base-ui.com/production-error`,`Base UI`);function Zhe(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),dk(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};Ek(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function Qhe(e,t=!1,n=!1,r=!1){let[i,a]=I.useState(e&&t?`idle`:void 0),[o,s]=I.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),dk(()=>{if(!e&&o&&i!==`ending`&&n){let e=nj.request(()=>{a(`ending`)});return()=>{nj.cancel(e)}}},[e,o,i,n]),dk(()=>{if(!e||t||i===void 0)return;let n=nj.request(()=>{a(void 0)});return()=>{nj.cancel(n)}},[t,e,i]),dk(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=nj.request(()=>{a(`idle`)});return()=>{nj.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function RM(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var zM=null;function $he(e){if(!zM){let e=[];zM=e,queueMicrotask(()=>{zM=null,CM.flushSync(()=>{for(let t of e)t()})})}zM.push(e)}function BM(e,t=!1,n=!1){let r=rj();return ZA((i,a=null)=>{r.cancel();let o=jM(e);if(o==null)return;let s=o,c=()=>{if(!n){CM.flushSync(i);return}$he(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(RM(s).map(e=>e.finished.then(ak))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(RM(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=Qk;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function VM(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=ZA(a),s=BM(r,n,i);I.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}function ege(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=ZA(i),{mounted:c,setMounted:l,transitionStatus:u}=Qhe(t,!1,!1,o),d=!t&&r;dk(()=>{t&&s(!1)},[t,s]);let f=I.useRef(c),p=I.useRef(!1),m=aM(),h=()=>{f.current=!1,l(!1),a()};dk(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=ZA(()=>{if(f.current){if(t){p.current=!0,m();return}h()}});return VM({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var tge={tabIndex:-1,[Xk]:``};function nge(e){return t=>t!==`touch`||e.current}function rge(e,t=!1){let n=cM(),r=kM()!=null,i=tk(()=>e(n,r)).current;return Zhe({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function ige({handle:e,store:t}){return dk(()=>e.attachStore(t),[e,t]),null}function HM(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function age(e,t){let n=I.useRef(null);return ZA(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),HM(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),HM(t))})}function oge(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function sge(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function cge(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=age(e,n),o=ZA(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=ZA(e=>{a(e),e&&o(e)});return dk(()=>(s(t.current),()=>s(null)),[s,t,n,e]),dk(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function lge(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=I.useRef(null),i=e.useState(`open`);dk(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=AA(jA);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function uge(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=ege({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return tk(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function dge(e,t){e.useSyncedValues(t),dk(()=>()=>{e.update({activeTriggerProps:ok,inactiveTriggerProps:ok,popupProps:ok})},[e])}function fge(e,t){dk(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),dk(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var pge=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},UM=zO(),mge=lM(19)?gge:_ge;function WM(e,t,n,r,i){return mge(e,t,n,r,i)}function hge(e,t,n,r,i){let a=I.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,UM.useSyncExternalStore)(e.subscribe,a,a)}Rme({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,UM.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function gge(e,t,n,r,i){let a=Lme();if(!a)return hge(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function _ge(e,t,n,r,i){return(0,BO.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var vge=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return WM(this,e,t,n,r)}},GM=class extends vge{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){I.useDebugValue(e);let n=this;dk(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;dk(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;dk(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){I.useDebugValue(e);let n=this,r=t!==void 0;dk(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return I.useDebugValue(e),WM(this,this.selectors[e],t,n,r)}useContextCallback(e,t){I.useDebugValue(e);let n=ZA(t??ak);this.context[e]=n}useStateSetter(e){let t=I.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},yge={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},bge=class extends GM{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:EM(),nested:n,triggerElements:i},yge),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Qme(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function xge(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new bge({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:ok,inactiveTriggerProps:ok,popupProps:ok}}var KM=e=>e.triggerIdProp??e.activeTriggerId,qM=e=>e.openProp??e.open,JM=e=>(e.popupElement?.id??e.floatingId)||void 0;function YM(e,t){return t!==void 0&&qM(e)&&KM(e)===t}function Sge(e,t){return YM(e,t)?!0:t!==void 0&&qM(e)&&KM(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var XM={open:qM,mounted:e=>e.mounted,transitionStatus:e=>qM(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:KM,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:JM,isTriggerActive:(e,t)=>t!==void 0&&KM(e)===t,isOpenedByTrigger:(e,t)=>YM(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&KM(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Sge(e,t)?JM(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Cge(e){let t=I.useCallback(t=>e===void 0?ak:e.subscribeStore(t),[e]),n=I.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,UM.useSyncExternalStore)(t,n,()=>e?.serverStore)}var wge=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new lk;restTimeout=new lk;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},ZM=new WeakMap;function QM(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&ZM.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),ZM.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function $M(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=ZM.get(n);a&&a!==e&&QM(a),QM(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,ZM.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function eN(e){let t=e.context.dataRef.current,n=tk(()=>t.hoverInteractionState??wge.create()).current;return t.hoverInteractionState||=n,sk(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function Tge(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=AM(),u=kM(),d=eN(e),f=uk(),p=ZA(()=>OA(c.current.openEvent?.type,d.interactedInside)),m=ZA(()=>kA(c.current.openEvent?.type)),h=ZA(()=>{QM(d)});dk(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),I.useEffect(()=>h,[h]),dk(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&Ek(s)&&o){let e=s,t=o,n=ij(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??Jk(e,`[data-rootownerid]`)??n.body;return $M(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),I.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&Wj(l.nodesRef.current,u).length>0)}function a(t){let n=EA(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,AA(NA,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=Yk(e);if(!SA(t)){d.interactedInside=!1;return}d.interactedInside=Jk(t,`[aria-haspopup]`)!=null}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(vA(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;if(!(l&&r&&Ek(o)&&Wj(l.nodesRef.current,r,!1).some(e=>qk(e.context?.elements.floating,o)))){if(d.handler){d.handler(n);return}h(),m()&&!p()&&a(n)}}function v(n){!l||!u||t()||f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,AA(NA,n)),l.events.emit(`floating.closed`,n)})}let y=o;return zA(y&&RA(y,`mouseenter`,g),y&&RA(y,`mouseleave`,_),y&&RA(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var Ege={current:null};function Dge(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=Ege,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=AM(l),v=eN(e),y=I.useRef(!1),b=KA(i),x=KA(r),S=KA(o),C=KA(n),w=KA(p),T=KA(f),E=ZA(()=>OA(h.current.openEvent?.type,v.interactedInside)),D=ZA(()=>w.current?.()!==!1),O=ZA((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!qk(t,n);if(!Ek(r))return!1;let a=r;return i.hasMatchingElement(e=>qk(e,a))&&(!t||!qk(t,a))}),k=ZA(()=>{v.handler&&=(ij(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=ZA(()=>{QM(v)});return u&&(v.handleCloseOptions=i?.__options),I.useEffect(()=>k,[k]),I.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===NA,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),I.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=EA(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,AA(NA,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,AA(NA,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!Ek(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!bk(v.pointerType))return;let n=DA(S.current),r=EA(x.current,`open`,v.pointerType),i=Yk(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(Ek(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(qk(t,i)){c=t;break}}Ek(o)&&Ek(s)&&!e.context.triggerElements.hasElement(o)&&qk(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&Ek(c)&&Ek(s)&&qk(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){D()&&e.setOpen(!0,AA(NA,t,c));return}m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,AA(NA,t,c))}):g&&D()&&e.setOpen(!0,AA(NA,t,c)))}function o(n){if(E()){A();return}k();let r=ij(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!vA(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n);return}(v.pointerType!==`touch`||!qk(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){qk(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?RA(r,`mouseout`,l):void 0;return s?zA(RA(r,`mousemove`,i,{once:!0}),RA(r,`mouseenter`,i),RA(r,`mouseleave`,o),f):zA(RA(r,`mouseenter`,i),RA(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),I.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!bk(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;$M(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=DA(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,AA(NA,n,r))}v.pointerType===`touch`?CM.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}var tN=.1,Oge=tN*tN,nN=.5;function rN(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function iN(e,t,n,r,i,a,o,s,c,l){let u=!1;return rN(e,t,n,r,i,a)&&(u=!u),rN(e,t,i,a,o,s)&&(u=!u),rN(e,t,o,s,c,l)&&(u=!u),rN(e,t,c,l,n,r)&&(u=!u),u}function kge(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function aN(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function Age(e={}){let{blockPointerEvents:t=!1}=e,n=new lk,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Oge;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Yk(r),g=r.type===`mouseleave`,_=qk(u,h),v=qk(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Ek(r.relatedTarget)&&qk(u,r.relatedTarget))return;function y(){return!!(s&&Wj(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=aN(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=aN(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=aN(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=aN(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!kge(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?nN/2:nN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+nN+1,o=C||T?S.bottom-nN:S.top,s=C?T?S.bottom-nN:S.top:S.bottom-nN;M=iN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?nN/2:nN*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-nN,o=C||T?S.top+nN:S.bottom,s=C?T?S.top+nN:S.bottom:S.top+nN;M=iN(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?nN/2:nN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+nN+1,o=w||E?S.right-nN:S.left,s=w?E?S.right-nN:S.left:S.right-nN;M=iN(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?nN/2:nN*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-nN,o=w||E?S.left+nN:S.right,s=w?E?S.left+nN:S.right:S.left+nN;M=iN(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function oN(e,t,n){let{reference:r,floating:i}=e,a=vj(t),o=yj(t),s=_j(o),c=mj(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=hj(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function jge(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=pj(t,e),p=wj(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Tj(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Tj(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Mge=50,Nge=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:jge},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=oN(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Mge&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=oN(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Pge=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=pj(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=mj(r),_=vj(o),v=mj(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Cj(o)]:nhe(o)),x=p!==`none`;!d&&x&&b.push(...ohe(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=the(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===vj(t)||T.every(e=>vj(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=vj(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},sN=new Set([`left`,`top`]);async function Fge(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=mj(n),s=hj(n),c=vj(n)===`y`,l=sN.has(o)?-1:1,u=a&&c?-1:1,d=pj(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 s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Ige=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Fge(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Lge=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=pj(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=vj(i),p=gj(f),m=u[p],h=u[f],g=(e,t)=>fj(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Rge=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=pj(e,t),u={x:n,y:r},d=vj(i),f=gj(d),p=u[f],m=u[d],h=pj(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=sN.has(mj(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},zge=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=pj(e,t),c=await i.detectOverflow(t,s),l=mj(n),u=hj(n),d=vj(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=sj(p-c[m],g),y=sj(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*cj(c.left,c.right):S=p-2*cj(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function cN(e){let t=Bk(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Dk(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=lj(n)!==a||lj(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function lN(e){return Ek(e)?e:e.contextElement}function uN(e){let t=lN(e);if(!Dk(t))return dj(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=cN(t),o=(a?lj(n.width):n.width)/r,s=(a?lj(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Bge=dj(0);function dN(e){let t=Ck(e);return!Rk()||!t.visualViewport?Bge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vge(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ck(e)}function fN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=lN(e),o=dj(1);t&&(r?Ek(r)&&(o=uN(r)):o=uN(e));let s=Vge(a,n,r)?dN(a):dj(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ck(a),t=Ek(r)?Ck(r):r,n=e,i=Gk(n);for(;i&&t!==n;){let e=uN(i),t=i.getBoundingClientRect(),r=Bk(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ck(i),i=Gk(n)}}return Tj({width:u,height:d,x:c,y:l})}function pN(e,t){let n=Vk(e).scrollLeft;return t?t.left+n:fN(wk(e)).left+n}function mN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-pN(e,n),y:n.top+t.scrollTop}}function Hge(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=wk(r),s=t?jk(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=dj(1),u=dj(0),d=Dk(r);if((d||!a)&&((Sk(r)!==`body`||kk(o))&&(c=Vk(r)),d)){let e=fN(r);l=uN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?mN(o,c):dj(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Uge(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Wge(e){let t=Vk(e),n=e.ownerDocument.body,r=cj(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=cj(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+pN(e),o=-t.scrollTop;return Bk(n).direction===`rtl`&&(a+=cj(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Gge=25;function Kge(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ck(e),a=wk(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Rk()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(pN(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Gge&&(s-=o)}return{width:s,height:c,x:l,y:u}}function qge(e,t){let n=fN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=uN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function hN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Kge(e,n,t);else if(t===`document`)r=Wge(wk(e));else if(Ek(t))r=qge(t,n);else{let n=dN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Tj(r)}function Jge(e,t){let n=t.get(e);if(n)return n;let r=Wk(e,[],!1).filter(e=>Ek(e)&&Sk(e)!==`body`),i=null,a=Bk(e).position===`fixed`,o=a?Hk(e):e;for(;Ek(o)&&!zk(o);){let e=Bk(o),t=Ik(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Hk(o)}return t.set(e,r),r}function Yge(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?jk(t)?[]:Jge(t,this._c):[].concat(n),r],o=hN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=hN(t,a[e],i);s=cj(n.top,s),c=sj(n.right,c),l=sj(n.bottom,l),u=cj(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Xge(e){let{width:t,height:n}=cN(e);return{width:t,height:n}}function Zge(e,t,n){let r=Dk(t),i=wk(t),a=n===`fixed`,o=fN(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=dj(0);if((r||!a)&&((Sk(t)!==`body`||kk(i))&&(s=Vk(t)),r)){let e=fN(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=pN(i));let l=i&&!r&&!a?mN(i,s):dj(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function gN(e){return Bk(e).position===`static`}function _N(e,t){if(!Dk(e)||Bk(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return wk(e)===n&&(n=n.ownerDocument.body),n}function vN(e,t){let n=Ck(e);if(jk(e))return n;if(!Dk(e)){let t=Hk(e);for(;t&&!zk(t);){if(Ek(t)&&!gN(t))return t;t=Hk(t)}return n}let r=_N(e,t);for(;r&&Ak(r)&&gN(r);)r=_N(r,t);return r&&zk(r)&&gN(r)&&!Ik(r)?n:r||Lk(e)||n}var Qge=async function(e){let t=this.getOffsetParent||vN,n=this.getDimensions,r=await n(e.floating);return{reference:Zge(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function $ge(e){return Bk(e).direction===`rtl`}var e_e={convertOffsetParentRelativeRectToViewportRelativeRect:Hge,getDocumentElement:wk,getClippingRect:Yge,getOffsetParent:vN,getElementRects:Qge,getClientRects:Uge,getDimensions:Xge,getScale:uN,isElement:Ek,isRTL:$ge};function yN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function t_e(e,t,n){let r=null,i,a=wk(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=uj(d),h=uj(a.clientWidth-(u+f)),g=uj(a.clientHeight-(d+p)),_=uj(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:cj(0,sj(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!yN(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ck(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function bN(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=lN(e),u=i||a?[...l?Wk(l):[],...t?Wk(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?t_e(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?fN(e):null;c&&g();function g(){let t=fN(e);h&&!yN(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var n_e=Ige,r_e=Lge,i_e=Pge,a_e=zge,o_e=Rge,s_e=(e,t,n)=>{let r=new Map,i=n??{},a={...e_e,...i.platform,_c:r};return Nge(e,t,{...i,platform:a})},xN=typeof document<`u`?I.useLayoutEffect:function(){};function SN(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 n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!SN(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!SN(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function CN(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wN(e,t){let n=CN(e);return Math.round(t*n)/n}function TN(e){let t=I.useRef(e);return xN(()=>{t.current=e}),t}function c_e(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=I.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=I.useState(r);SN(f,r)||p(r);let[m,h]=I.useState(null),[g,_]=I.useState(null),v=I.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=I.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=I.useRef(null),C=I.useRef(null),w=I.useRef(u),T=c!=null,E=TN(c),D=TN(i),O=TN(l),k=I.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),s_e(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!SN(w.current,t)&&(w.current=t,CM.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);xN(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=I.useRef(!1);xN(()=>(A.current=!0,()=>{A.current=!1}),[]),xN(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=I.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=I.useMemo(()=>({reference:b,floating:x}),[b,x]),N=I.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=wN(M.floating,u.x),r=wN(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...CN(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return I.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var l_e=(e,t)=>{let n=n_e(e);return{name:n.name,fn:n.fn,options:[e,t]}},u_e=(e,t)=>{let n=r_e(e);return{name:n.name,fn:n.fn,options:[e,t]}},d_e=(e,t)=>({fn:o_e(e).fn,options:[e,t]}),f_e=(e,t)=>{let n=i_e(e);return{name:n.name,fn:n.fn,options:[e,t]}},p_e=(e,t)=>{let n=a_e(e);return{name:n.name,fn:n.fn,options:[e,t]}},EN=I.createContext(void 0);function DN(e){let t=I.useContext(EN);if(t===void 0&&!e)throw Error(LM(47));return t}var m_e={...XM,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!XM.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&XM.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>XM.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},h_e=class extends GM{constructor(e,t,n){let r=new pge;super(g_e(e,r,t,n),__e(r),m_e)}setOpen=(e,t)=>{let n=t.reason===NA,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=sge(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=oge(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),CM.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function g_e(e,t,n,r=!1){let i={...xge(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function __e(e){return{popupRef:I.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:I.createRef(),beforeTriggerFocusGuardRef:I.createRef(),beforeContentFocusGuardRef:I.createRef(),stickIfOpenTimeout:new lk,stickIfOpen:!0,triggerElements:e}}var ON=ik(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=y_e(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),fge(u,d),lge(u);let{forceUnmount:m}=uge(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),I.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),I.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,AA(LA))}),[m,u]);let h=d||f||s!=null;return(0,R.jsxs)(EN.Provider,{value:u,children:[s&&(0,R.jsx)(ige,{handle:s,store:u}),h&&(0,R.jsx)(b_e,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function v_e(e){return DN(!0)?(0,R.jsx)(ON,{props:e}):(0,R.jsx)(Vhe,{children:(0,R.jsx)(ON,{props:e})})}function y_e(e,t){let n=rge((e,n)=>new h_e(t,e,n));return I.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function b_e({store:e,modal:t}){let n=Yhe(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return dge(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}var x_e=I.createContext(void 0);function S_e(e=!1){let t=I.useContext(x_e);if(t===void 0&&!e)throw Error(LM(16));return t}function C_e(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:I.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function kN(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(Ck(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function w_e(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=I.useRef(null),s=S_e(!0),c=a??s!==void 0,{props:l}=C_e({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=I.useCallback(()=>{let e=o.current;AN(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return dk(u,[u]),{getButtonProps:I.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return pM({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(yM(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=AN(r),s=!i&&T_e(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),kN(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),kN(r,e)))},onKeyUp(e){if(!t){if(yM(e),a?.(e),e.target===e.currentTarget&&i&&c&&AN(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),kN(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:ZA(e=>{o.current=e,u()})}}function AN(e){return Dk(e)&&e.tagName===`BUTTON`}function T_e(e){return Dk(e)&&e.tagName===`A`&&!!e.href}function E_e(e){return cM(e,`base-ui`)}function D_e(e,t){function n(n,r,i){let a=n.currentTarget;CM.flushSync(()=>{e.setOpen(!1,AA(FA,n.nativeEvent,a))}),phe(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&Hj(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}function O_e(e){let t=I.useRef(``),n=I.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:I.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function k_e(e,t){let{onClick:n,onPointerDown:r}=O_e(ZA((n,r)=>{(typeof e==`function`?e():e)||t(r||(mk?`touch`:``))}));return I.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}var A_e=zme(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=DN(!0),h=Cge(s)??m;if(!h)throw Error(LM(74));let g=E_e(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=I.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=cge(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=Dge(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:Age(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=Khe(v,{stickIfOpen:ZA(()=>h.context.stickIfOpen)}),k=k_e(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=w_e({disabled:a,native:o}),N={open(e){return w?mA.open(e):pA.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:ee}=D_e(h,x),te=SM(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[Mhe]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),ne=(0,R.jsx)(I.Fragment,{children:te},g);return E?(0,R.jsxs)(I.Fragment,{children:[(0,R.jsx)(oj,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),ne,(0,R.jsx)(oj,{ref:h.context.triggerFocusTargetRef,onFocus:ee})]}):ne}),jN=I.createContext(void 0);function j_e(){let e=I.useContext(jN);if(e===void 0)throw Error(LM(45));return e}var M_e=I.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return DN().useState(`mounted`)||n?(0,R.jsx)(jN.Provider,{value:n,children:(0,R.jsx)(Lhe,{ref:t,...r})}):null});function N_e(e){return lM(19)?e:e?`true`:void 0}var MN=I.createContext(void 0);function P_e(){let e=I.useContext(MN);if(!e)throw Error(LM(46));return e}function F_e(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=I.useState(null),d=I.useRef(null),f=AM(n),p=I.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=c_e({...e,elements:{...p,...l&&{reference:l}}}),h=I.useCallback(e=>{let t=Ek(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=I.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=I.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=I.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return dk(()=>{o&&(d.current=o)},[o]),dk(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),I.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var I_e=I.createContext(void 0);function L_e(){return I.useContext(I_e)?.direction??`ltr`}var R_e=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=pj(e,t)||{};if(l==null)return{};let d=wj(u),f={x:n,y:r},p=yj(i),m=_j(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=fj(D,k,O),j=!c.arrow&&hj(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),z_e=(e,t)=>{let{name:n,fn:r}=R_e(e);return{name:n,fn:r,options:[e,t]}},B_e={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},V_e={sideX:`left`,sideY:`top`},H_e=`--available-width`,U_e=`--available-height`,W_e=`--anchor-width`,G_e=`--anchor-height`,K_e=`--transform-origin`,NN=H_e,PN=U_e;function FN(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function IN(e,t,n){let{rects:r,placement:i}=e;return{side:FN(t,mj(i),n),align:hj(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function q_e(e){return J_e(e,F_e)}function J_e(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=ZA(O),A=O?k:n,j=KA(n),M=KA(g),N=L_e()===`rtl`,[P,ee]=I.useState(null);!g&&P!==null&&ee(null);let te=x===`placement`,ne=P?mj(P):null,F=P&&te?hj(P)||`center`:null,re=ne||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],ie=F||o,ae=ie===`center`?re:`${re}-${ie}`,oe=l;typeof oe==`number`?oe={top:oe,right:oe,bottom:oe,left:oe}:oe&&={top:oe.top||0,right:oe.right||0,bottom:oe.bottom||0,left:oe.left||0};let se=+(i===`bottom`),ce=+(i===`top`),le=+(i===`right`),ue=+(i===`left`),de={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:oe},fe=I.useRef(null),pe=KA(a),me=KA(s),he=typeof a==`function`?0:a,ge=typeof s==`function`?0:s,_e=[];p&&_e.push(p),_e.push(l_e(e=>{let t=IN(e,i,N),n=typeof pe.current==`function`?pe.current(t):pe.current,r=typeof me.current==`function`?me.current(t):me.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[he,ge,N,i]));let ve=w===`none`&&C!==`shift`,ye=!ve&&(u||E||C===`shift`),be=C===`none`?null:f_e({...de,padding:{top:oe.top+1+se,right:oe.right+1+ue,bottom:oe.bottom+1+ce,left:oe.left+1+le},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),xe=ve?null:u_e({...de,rootBoundary:D,mainAxis:w!==`none`,crossAxis:ye,limiter:u||E?void 0:d_e(e=>{if(!fe.current)return{};let{width:t,height:n}=fe.current.getBoundingClientRect(),r=vj(mj(e.placement)),i=r===`y`?t:n,a=r===`y`?oe.left+oe.right:oe.top+oe.bottom;return{offset:i/2+a/2}})},[de,u,E,D,oe,w]);C===`shift`||w===`shift`||ie===`center`?_e.push(xe,be):_e.push(be,xe),_e.push(p_e({...de,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(NN,`${t}px`),i.setProperty(PN,`${n}px`);let a=Ck(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(W_e,`${u}px`),i.setProperty(G_e,`${d}px`)}}),z_e(e=>({element:fe.current||ij(e.elements.floating).createElement(`div`),padding:fe.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=mj(r),u=hj(r),d=vj(l)===`y`,f=fe.current,p=typeof a==`function`?a(IN(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return ye&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(K_e,d?`${m} ${h}`:`${h} ${m}`),{}}},B_e,b),dk(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let Se=I.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:Ce,elements:we,x:Te,y:Ee,middlewareData:De,update:Oe,placement:ke,context:Ae,isPositioned:je,floatingStyles:Me}=t({rootContext:h,open:m?g:void 0,placement:ae,middleware:_e,strategy:r,whileElementsMounted:m?void 0:(...e)=>bN(...e,Se),nodeId:y,externalTree:S}),{sideX:Ne,sideY:Pe}=De.adaptiveOrigin||V_e,Fe=je?r:`fixed`,Ie=I.useMemo(()=>{let e;return e=je?b?{position:Fe,[Ne]:Te,[Pe]:Ee}:{...Me,position:Fe}:{position:Fe,top:0,left:0},e[NN]=`100vw`,e[PN]=`100vh`,je||(e.opacity=0),e},[b,Fe,Ne,Te,Pe,Ee,Me,je]),Le=I.useRef(null);dk(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(LN(t)?t.current:t)||null;n!==Le.current&&(Ce.setPositionReference(n),Le.current=n)},[g,Ce,A,j]),I.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&LN(e)&&e.current!==Le.current&&(Ce.setPositionReference(e.current),Le.current=e.current)},[g,Ce,A,j]),I.useEffect(()=>{if(m&&g&&we.reference&&we.floating)return bN(we.reference,we.floating,Oe,Se)},[m,g,we,Oe,Se]);let Re=mj(ke),ze=FN(i,Re,N),Be=hj(ke)||`center`,Ve=!!De.hide?.referenceHidden;dk(()=>{x&&g&&je&&(Re!==re||te&&Be!==ie)&&ee(ke)},[x,te,g,je,ke,Re,Be,re,ie]);let He=I.useMemo(()=>({position:`absolute`,top:De.arrow?.y,left:De.arrow?.x}),[De.arrow]),Ue=De.arrow?.centerOffset!==0;return I.useMemo(()=>({positionerStyles:Ie,arrowStyles:He,arrowRef:fe,arrowUncentered:Ue,side:ze,align:Be,physicalSide:Re,anchorHidden:Ve,refs:Ce,context:Ae,isPositioned:je,update:Oe}),[Ie,He,fe,Ue,ze,Be,Re,Ve,Ce,Ae,je,Oe])}function LN(e){return e!=null&&`current`in e}var Y_e=I.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,R.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function X_e(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=I.useRef(null),o=I.useRef(null),s=BM(r);dk(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),dk(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}function RN(e){return e===`starting`?jhe:ok}function Z_e(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),SM(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},RN(r),i],stateAttributesMapping:hA})}var zN={},BN={},VN=``;function HN(e,t){return kk(e)?e:t}function UN(e,t,n){return/hidden|clip/.test(e.getComputedStyle(HN(t,n)).overflowY)}function Q_e(e){if(typeof document>`u`)return!1;let t=ij(e);return Ck(t).innerWidth-t.documentElement.clientWidth>0}function $_e(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=ij(e),n=t.documentElement,r=t.body,i=HN(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function eve(e){let t=ij(e),n=t.documentElement,r=t.body,i=HN(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function tve(e){let t=ij(e),n=t.documentElement,r=t.body,i=Ck(n),a=0,o=0,s=!1,c=nj.create();if(_k&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,zN={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},VN=n.style.scrollBehavior,BN={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=HN(n,r);if(s=$_e(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,zN),Object.assign(r.style,BN),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=VN)}function d(){u(),c.request(l)}l();let f=RA(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var nve=new class{lockCount=0;restore=null;timeoutLock=lk.create();timeoutUnlock=lk.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=ij(e),n=t.documentElement,r=t.body,i=Ck(n);if(UN(i,n,r)){let t=new i.MutationObserver(()=>{UN(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=mk||!Q_e(e);this.restore=a?eve(e):tve(e)}};function rve(e=!0,t=null){dk(()=>{if(e)return nve.acquire(t)},[e,t])}var ive=20;function ave(e,t,n,r){let[i,a]=I.useState(!1);dk(()=>{if(!e||!t||n==null){a(!1);return}let r=ij(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-ive)},[e,t,n]),rve(e&&(!t||i),r)}var ove=I.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=Nhe,..._}=e,v=DN(),y=j_e(),b=zhe(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=q_e({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});X_e({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;ave(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=Z_e(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,R.jsxs)(MN.Provider,{value:j,children:[S&&M&&(0,R.jsx)(Y_e,{inert:N_e(!C),cutout:T}),(0,R.jsx)(Bhe,{id:b,children:P})]})}),sve=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]),cve=I.createContext(void 0);function lve(e){let t=I.useContext(cve);if(t===void 0&&!e)throw Error(LM(69));return t}var uve=I.createContext(void 0);function dve(){let[e,t]=I.useState(0),n=ZA(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:I.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var fve=I.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=DN(),l=P_e(),u=lve(!0)!=null,{context:d,hasClosePart:f}=dve(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);VM({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),Tge(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?nge(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=SM(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...tge,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&sve.has(e.key)&&e.stopPropagation()}},RN(g),s],stateAttributesMapping:gA});return(0,R.jsx)(Ghe,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:Dk(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,R.jsx)(uve.Provider,{value:d,children:M})})}),WN=`data-glide-stand-in`;function GN(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left+e.scrollLeft-e.clientLeft,y:r.top-n.top+e.scrollTop-e.clientTop,width:r.width,height:r.height}}function KN(e){return{transform:`translate(${String(e.x)}px, ${String(e.y)}px)`,width:`${String(e.width)}px`,height:`${String(e.height)}px`}}function pve(e){let t=(0,I.useRef)(null);return(0,I.useCallback)(n=>{t.current?.(),t.current=n?mve(n,e):null},[e])}function mve(e,t){if(!GC(e))return()=>void 0;let n=e.ownerDocument,r=e.querySelector(t),i=r?GN(e,r):null,a=null,o=null,s=new Set,c=()=>{for(let e of s)e.removeAttribute(WN);s.clear(),a&&(a.hidden=!0),o=null},l=()=>{if(a)return a;let t=n.createElement(`span`);return t.className=`caps-glide`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t),e.classList.add(`caps-glide-host`),getComputedStyle(e).position===`static`&&e.classList.add(`caps-glide-anchor`),a=t,t},u=(t,n)=>{let r=VC(e),u=GN(e,t),d=o&&a?GN(e,a):i;if(i=u,o?.cancel(),c(),r.reduced||d===null||Math.abs(d.y-u.y)<1&&Math.abs(d.x-u.x)<1)return;t.setAttribute(WN,`measure`);let f=getComputedStyle(t),p=f.backgroundColor,m=f.borderRadius;for(let e of[t,n])e&&(e.setAttribute(WN,``),s.add(e));let h=l();h.hidden=!1,h.style.backgroundColor=p,h.style.borderRadius=m;let g=h.animate([KN(d),KN(u)],{duration:r.normal,easing:WC(r,r.ease),fill:`forwards`});o=g,g.addEventListener(`finish`,()=>{o===g&&c()})},d=()=>{let n=e.querySelector(t);if(n===r)return;let i=r;r=n,n&&u(n,i)},f=new MutationObserver(d);return f.observe(e,{subtree:!0,attributes:!0,attributeFilter:[`data-highlighted`,`data-active`,`data-navigation`,`aria-selected`]}),e.addEventListener(`pointerover`,d),e.addEventListener(`pointerout`,d),()=>{f.disconnect(),e.removeEventListener(`pointerover`,d),e.removeEventListener(`pointerout`,d),o?.cancel(),c(),a?.remove()}}var hve=(0,I.createContext)(void 0),gve=(0,I.createContext)(null);function _ve(e){let t=(0,I.useContext)(gve);return t===null?Object.hasOwn(globalThis,`document`)?document.body:null:t[e]}function vve(e){let t=(0,I.useContext)(hve),n=(0,I.useRef)(e);n.current=e,(0,I.useEffect)(()=>t?.(()=>{n.current()}),[t])}var qN=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,R.jsx)(`input`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:RC(`input caps-input w-full`,e),ref:r})});(0,I.forwardRef)(function({leading:e,className:t,...n},r){return(0,R.jsxs)(`span`,{className:`caps-search-input`,"data-leading":e?`true`:void 0,children:[e?(0,R.jsx)(`span`,{className:`caps-search-leading`,"aria-hidden":`true`,children:e}):null,(0,R.jsx)(qN,{...n,type:`search`,className:t,ref:r})]})});function yve({getKey:e,isDisabled:t=()=>!1,items:n}){let r=(0,I.useMemo)(()=>{let r=n.map(e);if(r.some(e=>!e))throw Error(`Selectable items require non-empty keys`);if(new Set(r).size!==r.length)throw Error(`Selectable items require unique keys`);return n.filter(e=>!t(e))},[e,t,n]),[i,a]=(0,I.useState)(null);(0,I.useEffect)(()=>{i!==null&&!r.some(t=>e(t)===i)&&a(null)},[i,r,e]);let o=r.find(t=>e(t)===i),s=o?r.findIndex(t=>e(t)===i):-1;return{activeIndex:s,activeItem:o,activeKey:i,enabledItems:r,move:(t,n)=>{if(r.length===0)return;let i=n?n===`start`?0:r.length-1:s<0?t>0?0:r.length-1:(s+t+r.length)%r.length,o=r[i];o&&a(e(o))},setActiveKey:a}}var bve=(0,I.forwardRef)(function({children:e,className:t,type:n=`button`,...r},i){return(0,R.jsxs)(`button`,{...r,ref:i,type:n,className:RC(`select caps-select caps-combobox-trigger w-full`,t),children:[(0,R.jsx)(`span`,{children:e}),(0,R.jsx)(AD,{className:`caps-select-chevron`,"aria-hidden":`true`})]})});function xve({defaultOpen:e,defaultValue:t,getKey:n,getSearchText:r,groupBy:i,id:a,isDisabled:o,items:s,onOpenChange:c,onCommit:l,multiple:u,controlledOpen:d,controlledKeys:f,trigger:p}){let m=`${a}-listbox`,[h,g]=(0,I.useState)(``),[_,v]=(0,I.useState)(!1),[y,b]=(0,I.useState)(t),[x,S]=(0,I.useState)(e),C=f??(y===null?[]:[y]),w=p?d??x:!0,T=(0,I.useMemo)(()=>{let e=h.trim().toLowerCase();return e?s.filter(t=>r(t).toLowerCase().includes(e)):s},[r,s,h]),E=yve({getKey:n,isDisabled:o,items:T});(0,I.useEffect)(()=>{if(E.activeKey!==null)return;let e=E.enabledItems.find(e=>C.includes(n(e)))??E.enabledItems[0];e&&E.setActiveKey(n(e))},[E.activeKey,E.enabledItems,E.setActiveKey,n,C]);let D=e=>{v(!1),e||g(``),d===void 0&&S(e),c?.(e)},O=e=>`${m}-option-${encodeURIComponent(e)}`,k=e=>{let t=n(e);f===void 0&&b(t),l(e),p&&!u&&D(!1)},A=e=>{v(!0),g(e.target.value),E.setActiveKey(null)},j=e=>{if(Ime(e))return;let t;switch(e.key){case`ArrowDown`:t=[1,void 0];break;case`ArrowUp`:t=[-1,void 0];break;case`End`:t=[1,`end`];break;case`Home`:t=[-1,`start`]}t?(v(!0),e.preventDefault(),E.move(t[0],t[1])):e.key===`Enter`&&E.activeItem&&(e.preventDefault(),k(E.activeItem))},M=(0,I.useMemo)(()=>{if(!i)return[{label:``,items:T}];let e=new Map;for(let t of T){let n=i(t),r=e.get(n);r?r.push(t):e.set(n,[t])}return[...e].map(([e,t])=>({label:e,items:t}))},[T,i]);return{keyboardNavigation:_,onPointerMove:()=>{v(!1)},activeKey:E.activeKey,activeItem:E.activeItem,groups:M,inputValue:h,listboxId:m,onInputChange:A,onInputKeyDown:j,optionId:O,open:w,commit:k,selectedKeys:C,setOpen:D}}function Sve(e){let{"aria-describedby":t,"aria-invalid":n,"aria-label":r,"aria-labelledby":i,"aria-required":a,activeTone:o=`neutral`,container:s,contentClassName:c,defaultOpen:l=!1,defaultValue:u=null,emptyMessage:d=`No matches`,getKey:f,getLabel:p,getSearchText:m=p,groupBy:h,id:g,inputProps:_,inputRef:v,isDisabled:y=()=>!1,items:b,onOpenChange:x,onValueChange:S,multiple:C,open:w,placeholder:T=`Search…`,renderItem:E,rootRef:D,trigger:O,triggerRef:k,value:A,...j}=e,M=e=>{let t=f(e);if(C){let e=A.includes(t)?A.filter(e=>e!==t):[...A,t];S?.(e,b.filter(t=>e.includes(f(t))))}else S?.(t,e)},N;C?N=A:A!==void 0&&(N=A===null?[]:[A]);let P=(0,I.useId)(),ee=O?.props??_,te=g??ee?.id??P,ne={id:te,"aria-describedby":[t,ee?.[`aria-describedby`]].filter(Boolean).join(` `)||void 0,"aria-invalid":n??ee?.[`aria-invalid`],"aria-label":ee?.[`aria-label`]??r,"aria-labelledby":ee?.[`aria-labelledby`]??i,"aria-required":a??ee?.[`aria-required`]},{keyboardNavigation:F,onPointerMove:re,activeItem:ie,activeKey:ae,commit:oe,groups:se,inputValue:ce,listboxId:le,onInputChange:ue,onInputKeyDown:de,open:fe,optionId:pe,selectedKeys:me,setOpen:he}=xve({defaultOpen:l,defaultValue:u,getKey:f,getSearchText:m,groupBy:h,id:te,isDisabled:y,items:b,onOpenChange:x,onCommit:M,multiple:C??!1,controlledOpen:w,controlledKeys:N,trigger:O});vve(()=>{O&&he(!1)});let ge=_ve(`popover`),_e=s===void 0?ge:s,ve=pve(`.caps-combobox-option[data-active="true"]:not(:disabled), [data-navigation="pointer"] .caps-combobox-option:hover:not(:disabled)`),ye=(0,R.jsx)(qN,{..._,...O?{}:ne,"aria-activedescendant":ie?pe(f(ie)):void 0,"aria-autocomplete":`list`,"aria-controls":le,"aria-expanded":!0,className:RC(`input-sm`,_?.className),id:O?_?.id??`${te}-input`:te,onChange:e=>{_?.onChange?.(e),ue(e)},onKeyDown:e=>{_?.onKeyDown?.(e),e.defaultPrevented||de(e)},placeholder:_?.placeholder??T,ref:v,role:`combobox`,value:ce}),be=(0,R.jsx)(`div`,{id:le,ref:ve,className:`caps-combobox-list`,"data-navigation":F?`keyboard`:`pointer`,onPointerMove:re,role:`listbox`,"aria-multiselectable":C??void 0,children:se.every(e=>e.items.length===0)?(0,R.jsx)(`div`,{className:`px-md py-md text-sm text-base-content`,children:d}):se.map(e=>(0,R.jsxs)(`div`,{"aria-label":e.label||void 0,role:e.label?`group`:void 0,children:[e.label?(0,R.jsx)(`div`,{className:`px-md pb-xs pt-sm text-xs text-base-content uppercase tracking-wider`,children:e.label}):null,e.items.map(e=>{let t=f(e),n=y(e),r=ae===t,i={active:r,disabled:n,selected:me.includes(t)};return(0,R.jsxs)(`button`,{"aria-disabled":n||void 0,"aria-selected":i.selected,className:`caps-combobox-option`,"data-active":r&&F,disabled:n,id:pe(t),onClick:()=>{oe(e)},onMouseDown:e=>{e.preventDefault()},role:`option`,tabIndex:-1,type:`button`,children:[(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`caps-combobox-check`,children:i.selected?(0,R.jsx)(Ope,{}):null}),E?.(e,r,i)??p(e)]},t)})]},e.label))});return O?(0,R.jsx)(`div`,{...j,className:RC(j.className),ref:D,children:(0,R.jsxs)(v_e,{modal:!0,onOpenChange:he,open:fe,children:[(0,R.jsx)(A_e,{...ne,"aria-haspopup":`dialog`,className:`btn`,ref:k,render:O}),_e===null?null:(0,R.jsx)(M_e,{container:_e,children:(0,R.jsx)(ove,{align:`start`,side:`bottom`,sideOffset:4,children:(0,R.jsxs)(fve,{"data-active-tone":o,className:RC(`min-w-40 rounded-box border border-base-300 bg-base-100 p-xs shadow-lg outline-none caps-combobox-panel caps-combobox-popup`,c),children:[(0,R.jsx)(`div`,{className:`caps-combobox-search`,children:ye}),be]})})})]})}):(0,R.jsx)(`div`,{...j,className:RC(j.className),ref:D,children:(0,R.jsxs)(`div`,{className:RC(`caps-combobox-panel`,c),"data-active-tone":o,children:[(0,R.jsx)(`div`,{className:`caps-combobox-search`,children:ye}),be]})})}var Cve=(0,I.forwardRef)(function({label:e,icon:t,caption:n,appearance:r,className:i,...a},o){return(0,R.jsx)(`label`,{className:`caps-icon-choice`,"data-appearance":r===`compact`?r:void 0,children:(0,R.jsx)($O,{...a,appearance:r??`default`,"aria-label":e,className:RC(`caps-icon-choice-input`,i),indicator:(0,R.jsx)(HE,{icon:t,caption:n}),ref:o})})}),wve=(0,I.forwardRef)(function({label:e,icon:t,hint:n,className:r,...i},a){let o=(0,I.useId)(),s=[i[`aria-describedby`],n?o:null].filter(Boolean).join(` `)||void 0;return(0,R.jsx)(`label`,{className:`caps-check-key`,children:(0,R.jsx)($O,{...i,"aria-label":e,"aria-describedby":s,className:RC(`caps-check-key-input`,r),indicator:(0,R.jsxs)(`span`,{className:`caps-check-key-face`,"aria-hidden":`true`,children:[t?(0,R.jsx)(`span`,{className:`caps-check-key-icon`,children:t}):null,(0,R.jsxs)(`span`,{className:`caps-check-key-copy`,children:[(0,R.jsx)(`span`,{className:`caps-check-key-label`,children:e}),n?(0,R.jsx)(`span`,{className:`caps-check-key-hint`,id:o,children:n}):null]}),(0,R.jsx)(`span`,{className:`caps-check-key-lamp`})]}),ref:a})})});function Tve({className:e,...t}){return(0,R.jsx)(`div`,{...t,className:RC(`caps-check-keys`,e)})}function Eve({checked:e}){let t=`caps-radio-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(e).current,i=(0,I.useRef)(e),a=(0,I.useRef)(null),o=HC(a),{reduced:s}=o;return(0,I.useLayoutEffect)(()=>{if(!n.current)return;let t=s||i.current===e;i.current=e;let r=e?4:0,a=jE(o,{ease:`outCubic`,duration:75}),c=e?AE(o,{bounce:.65,duration:300}):jE(o,{ease:`inCubic`,duration:100}),l=aE(n.current,t?{rx:r,ry:r,cy:6,duration:0}:{rx:[{to:e?3.5:4.15,...a},{to:r,...c}],ry:[{to:e?4.5:3.85,...a},{to:r,...c}],cy:[{to:e?5.85:6.1,...a},{to:6,...c}]});return()=>{l.cancel()}},[e,s,o]),(0,R.jsxs)(`svg`,{ref:a,className:`caps-radio-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(cE,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,R.jsx)(lE,{id:`${t}-shadow`}),(0,R.jsx)(uE,{id:`${t}-inset`}),(0,R.jsx)(`clipPath`,{id:`${t}-well`,children:(0,R.jsx)(`circle`,{cx:`6`,cy:`6`,r:`5`})})]}),(0,R.jsx)(`circle`,{className:`caps-radio-track`,cx:`6`,cy:`6`,r:`5.5`,filter:`url(#${t}-inset)`}),(0,R.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,R.jsx)(`ellipse`,{ref:n,cx:`6`,cy:`6`,rx:r?4:0,ry:r?4:0,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var JN=(0,I.createContext)(null),Dve=(0,I.forwardRef)(function({children:e,className:t,defaultValue:n,disabled:r=!1,name:i,onValueChange:a,orientation:o=`vertical`,value:s,...c},l){let u=(0,I.useId)(),d=(0,I.useRef)(null);(0,I.useImperativeHandle)(l,()=>{if(!d.current)throw Error(`RadioGroup is not mounted`);return d.current},[]);let f=i??`radio-group-${u}`,[p,m]=(0,I.useState)(n),h=s??p;return(0,I.useEffect)(()=>{let e=d.current?.form;if(!e||s!==void 0)return;let t=e=>{queueMicrotask(()=>{e.defaultPrevented||m(n)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[s,n,c.form]),(0,R.jsx)(JN.Provider,{value:{disabled:r,name:f,onValueChange:e=>{s===void 0&&m(e),a?.(e)},value:h},children:(0,R.jsx)(`fieldset`,{...c,className:RC(`flex gap-md`,o===`horizontal`?`flex-row flex-wrap`:`flex-col`,t),disabled:r,role:c.role??`radiogroup`,ref:d,children:e})})}),YN=(0,I.forwardRef)(function({className:e,indicator:t,onChange:n,onClick:r,value:i,...a},o){let s=(0,I.useContext)(JN);if(!s)throw Error(`RadioGroupItem must be used inside <RadioGroup>`);let c=s.value===i,l=e=>{n?.(e),e.target.checked&&s.onValueChange?.(i)};return(0,R.jsxs)(`span`,{className:`caps-radio`,"data-checked":c,"data-custom-indicator":t!==void 0||void 0,children:[(0,R.jsx)(`input`,{...a,"aria-checked":c,checked:c,className:RC(`caps-radio-input`,e),disabled:s.disabled||a.disabled,name:s.name,onChange:l,onClick:r,ref:o,type:`radio`,value:i}),t===void 0?(0,R.jsx)(Eve,{checked:c}):t]})}),Ove=(0,I.forwardRef)(function({description:e,id:t,meta:n,title:r,...i},a){let o=(0,I.useContext)(JN),s=(0,I.useId)(),c=t??s,l=o?.value===i.value,u=o?.disabled===!0||i.disabled===!0;return(0,R.jsxs)(`label`,{className:`caps-choice-card`,"data-checked":l,"data-disabled":u||void 0,htmlFor:c,children:[(0,R.jsx)(YN,{...i,"aria-describedby":e?`${c}-description`:void 0,"aria-labelledby":`${c}-title`,id:c,ref:a}),(0,R.jsxs)(`span`,{className:`caps-choice-card-copy`,children:[(0,R.jsx)(`span`,{className:`caps-choice-card-title`,id:`${c}-title`,children:r}),e?(0,R.jsx)(`span`,{className:`caps-choice-card-description`,id:`${c}-description`,children:e}):null]}),n?(0,R.jsx)(`span`,{className:`caps-choice-card-meta`,children:n}):null]})}),kve=(0,I.forwardRef)(function({label:e,icon:t,caption:n,art:r=`dim`,className:i,...a},o){return(0,R.jsx)(`label`,{className:`caps-icon-choice`,"data-art":r===`color`?r:void 0,children:(0,R.jsx)(YN,{...a,"aria-label":e,className:RC(`caps-icon-choice-input`,i),indicator:(0,R.jsx)(HE,{icon:t,caption:n}),ref:o})})});(0,I.forwardRef)(function({label:e,color:t,className:n,...r},i){return(0,R.jsx)(`label`,{className:`caps-icon-choice`,"data-art":`color`,"data-swatch":``,title:e,children:(0,R.jsx)(YN,{...r,"aria-label":e,className:RC(`caps-icon-choice-input`,n),indicator:(0,R.jsx)(HE,{icon:(0,R.jsx)(`span`,{className:`caps-swatch-dot`,style:{backgroundColor:t}})}),ref:i})})});var Ave=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,R.jsxs)(`span`,{className:`caps-select-shell`,children:[(0,R.jsx)(`select`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:RC(`select select-bordered caps-select w-full`,t&&`select-error`,e),ref:r}),!n.multiple&&(!n.size||n.size<=1)?(0,R.jsx)(AD,{className:`caps-select-chevron`,"aria-hidden":`true`}):null]})});function jve({checked:e}){let t=`caps-switch-${(0,I.useId)().replaceAll(`:`,``)}`,n=(0,I.useRef)(null),r=(0,I.useRef)(null),i=(0,I.useRef)(e).current,a=(0,I.useRef)(e),o=qC();return(0,I.useLayoutEffect)(()=>{if(!n.current||!r.current)return;let t=o||a.current===e;a.current=e;let i=e?16:8,s=VC(n.current),c=AE(s,{bounce:.25,duration:440}),l=jE(s,{ease:`inOutSine`,duration:100}),u=aE(n.current,t?{x:2,y:2,width:i,height:8,duration:0}:{x:[{to:e?2.5:1.5,...l},{to:2,...c}],y:[{to:1.5,...l},{to:2,...c}],height:[{to:9,...l},{to:8,...c}],width:[{to:e?7:16.5,...l},{to:i,...c}]}),d=aE(r.current,{gradientTransform:e?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`,...t?{duration:0}:{delay:l.duration,...c}});return()=>{u.cancel(),d.cancel()}},[e,o]),(0,R.jsxs)(`svg`,{className:`caps-switch-visual`,width:`40`,height:`24`,viewBox:`0 0 20 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,R.jsxs)(`defs`,{children:[(0,R.jsx)(cE,{ref:r,id:`${t}-surface`,transform:i?`matrix(2 0 0 1 10 6)`:`matrix(1 0 0 1 6 6)`}),(0,R.jsx)(lE,{id:`${t}-shadow`}),(0,R.jsx)(uE,{id:`${t}-inset`}),(0,R.jsx)(`clipPath`,{id:`${t}-track`,children:(0,R.jsx)(`rect`,{x:`1`,y:`1`,width:`18`,height:`10`,rx:`5`})})]}),(0,R.jsx)(`rect`,{className:`caps-switch-track`,filter:`url(#${t}-inset)`,x:`0.5`,y:`0.5`,width:`19`,height:`11`,rx:`5.5`}),(0,R.jsx)(`g`,{clipPath:`url(#${t}-track)`,children:(0,R.jsx)(`rect`,{ref:n,x:`2`,y:`2`,width:i?16:8,height:`8`,rx:`4`,fill:`url(#${t}-surface)`,filter:`url(#${t}-shadow)`})})]})}var Mve=(0,I.forwardRef)(function({className:e,checked:t,defaultChecked:n=!1,onChange:r,onCheckedChange:i,...a},o){let s=(0,I.useRef)(null),[c,l]=(0,I.useState)(n),u=t??c;return(0,I.useImperativeHandle)(o,()=>{if(!s.current)throw Error(`Switch input is not mounted`);return s.current},[]),(0,I.useEffect)(()=>{let e=s.current?.form;if(!e||t!==void 0)return;let r=e=>{queueMicrotask(()=>{!e.defaultPrevented&&s.current&&l(n)})};return e.addEventListener(`reset`,r),()=>{e.removeEventListener(`reset`,r)}},[t,n,a.form]),(0,R.jsxs)(`span`,{className:`caps-switch`,"data-checked":u,children:[(0,R.jsx)(`input`,{...a,checked:u,className:RC(`caps-switch-input`,e),onChange:e=>{t===void 0&&l(e.target.checked),r?.(e),i?.(e.target.checked)},ref:s,role:`switch`,type:`checkbox`}),(0,R.jsx)(jve,{checked:u})]})}),Nve=(0,I.forwardRef)(function({className:e,invalid:t,...n},r){return(0,R.jsx)(`textarea`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:RC(`textarea textarea-bordered w-full`,t&&`textarea-error`,e),ref:r})}),Pve=vg(Og),Fve=vg(Ag),Ive=vg(Lg(Wg)),Lve=vg(Ng(Og)),XN=Ng(Hg(File)),Rve=vg(XN),ZN=Fg([Og,Wg,Ag,Eg,Dg,Ng(Og),XN]),zve=vg(ZN),QN=e=>Vu(Pve(e.state.value),()=>``),$N=e=>Vu(Fve(e.state.value),()=>!1),Bve=e=>Vu(Ive(e.state.value),()=>null),Vve=e=>Vu(Lve(e.state.value),()=>[]),Hve=e=>Vu(Rve(e.state.value),()=>[]),Uve=e=>Vu(zve(e.state.value),()=>null);function Wve({field:e,spec:t,locked:n,...r}){let[i,a]=(0,I.useState)(!1);return(0,R.jsxs)(WO,{children:[(0,R.jsx)(qN,{...r,name:t.name,disabled:n,type:i?`text`:`password`,autoComplete:`off`,spellCheck:!1,className:`caps-field-secret`,placeholder:t.placeholder,readOnly:t.readOnly,value:QN(e),onBlur:e.handleBlur,onChange:t=>{e.handleChange(t.currentTarget.value)}}),(0,R.jsx)(yE,{type:`button`,variant:`outline`,size:`icon`,"aria-label":i?`Hide`:`Show`,"aria-pressed":i,disabled:n,onClick:()=>{a(e=>!e)},children:i?(0,R.jsx)(Ape,{"aria-hidden":`true`}):(0,R.jsx)(jpe,{"aria-hidden":`true`})})]})}var Gve={text:`text`,email:`email`,url:`url`,tel:`tel`};function Kve({spec:e,field:t,locked:n,...r}){let i=Hve(t),a=n||e.readOnly===!0,o=(0,I.useRef)(null);return(0,R.jsxs)(`div`,{className:`flex flex-col gap-sm`,children:[(0,R.jsx)(JC,{asChild:!0,children:(0,R.jsx)(`input`,{...r,ref:o,type:`file`,tabIndex:-1,required:r.required===!0&&i.length===0,name:e.name,accept:e.accept,multiple:e.multiple,disabled:a,onBlur:t.handleBlur,onChange:e=>{t.handleChange(Array.from(e.currentTarget.files??[])),e.currentTarget.value=``}})}),(0,R.jsx)(yE,{type:`button`,variant:`outline`,"aria-label":`Choose files for ${e.label}`,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],disabled:a,onBlur:t.handleBlur,onClick:()=>{o.current?.click()},children:`Choose files`}),(0,R.jsx)(kme,{items:i.map((e,t)=>({id:String(t),name:e.name,preview:{kind:`file`},progress:0,progressLabel:`${String(e.size)} bytes`,statusLabel:`Selected`,actions:a?{}:{remove:{label:`Remove`,accessibleLabel:`Remove ${e.name}`}}})),onRemove:e=>{t.handleChange(i.filter((t,n)=>String(n)!==e))},onCancel:()=>void 0,onRetry:()=>void 0})]})}function qve({spec:e,field:t,locked:n,...r}){let i=e=>{t.handleChange(e)},a={...r,name:e.name,disabled:n,onBlur:t.handleBlur};switch(e.kind){case`text`:case`email`:case`url`:case`tel`:return(0,R.jsx)(qN,{...a,type:Gve[e.kind],inputMode:e.kind===`text`?void 0:e.kind,autoComplete:e.autoComplete,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:QN(t),onChange:e=>{i(e.currentTarget.value)}});case`textarea`:return(0,R.jsx)(Nve,{...a,rows:e.rows??3,placeholder:e.placeholder,maxLength:e.maxLength,readOnly:e.readOnly,value:QN(t),onChange:e=>{i(e.currentTarget.value)}});case`secret`:return(0,R.jsx)(Wve,{...r,field:t,spec:e,locked:n});case`money`:return(0,R.jsxs)(WO,{children:[(0,R.jsx)(GO,{className:`caps-field-currency`,children:e.currency??`USD`}),(0,R.jsx)(qN,{...a,inputMode:`decimal`,autoComplete:`off`,className:`caps-field-amount`,placeholder:e.placeholder??`0.00`,readOnly:e.readOnly,value:QN(t),onChange:e=>{i(e.currentTarget.value)}})]});case`date`:return(0,R.jsx)(qN,{...a,type:`date`,readOnly:e.readOnly,value:QN(t),onChange:e=>{i(e.currentTarget.value)}});case`number`:return(0,R.jsx)(Dme,{...a,...e.min===void 0?{}:{min:e.min},...e.max===void 0?{}:{max:e.max},...e.step===void 0?{}:{step:e.step},...e.unit===void 0?{}:{unit:e.unit},...e.wrap===void 0?{}:{wrap:e.wrap},disabled:n||e.readOnly===!0,decrementLabel:`Decrease ${e.label}`,incrementLabel:`Increase ${e.label}`,value:Bve(t),onValueChange:e=>{t.handleChange(e)}});case`select`:return(0,R.jsxs)(Ave,{...a,value:QN(t),onChange:e=>{i(e.currentTarget.value)},children:[e.placeholder===void 0?null:(0,R.jsx)(`option`,{value:``,disabled:!0,children:e.placeholder}),e.options.map(e=>(0,R.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.value))]});case`combobox`:return(0,R.jsx)(Sve,{id:r.id??e.name,"aria-describedby":r[`aria-describedby`],"aria-invalid":r[`aria-invalid`],"aria-required":r[`aria-required`],items:e.options,getKey:e=>e.value,getLabel:e=>e.label,isDisabled:t=>t.disabled||n||e.readOnly===!0,value:QN(t),...e.placeholder===void 0?{}:{placeholder:e.placeholder},trigger:(0,R.jsx)(bve,{name:e.name,disabled:n||e.readOnly===!0,onBlur:t.handleBlur,children:e.options.find(e=>e.value===QN(t))?.label??e.placeholder??`Choose…`}),inputProps:{"aria-label":`Search ${e.label}`,disabled:n||e.readOnly===!0},onValueChange:e=>{i(e??``),t.handleBlur()}});case`file`:return(0,R.jsx)(Kve,{...r,spec:e,field:t,locked:n});case`checkbox`:return(0,R.jsx)($O,{...a,disabled:n||e.readOnly===!0,checked:$N(t),onChange:e=>{t.handleChange(e.currentTarget.checked)}});case`switch`:return(0,R.jsx)(Mve,{...a,disabled:n||e.readOnly===!0,checked:$N(t),onCheckedChange:e=>{t.handleChange(e)}});case`radio`:case`icon-radio`:case`checkboxes`:case`icon-checkboxes`:return null}}var Jve=new Set([`radio`,`icon-radio`,`checkboxes`,`icon-checkboxes`]);function Yve({spec:e,field:t,locked:n,error:r,layout:i}){let a=n||e.readOnly===!0,o=e.label;if(e.kind===`checkboxes`||e.kind===`icon-checkboxes`){let n=Vve(t),s=(e,r)=>{t.handleChange(r?[...n,e]:n.filter(t=>t!==e))};return(0,R.jsx)(qO,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:e.kind===`icon-checkboxes`?(0,R.jsx)(`div`,{className:`caps-field-icon-choices`,children:e.options.map(r=>(0,R.jsx)(Cve,{name:e.name,value:r.value,label:r.label,...r.caption===void 0?{}:{caption:r.caption},icon:r.icon,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))}):(0,R.jsx)(Tve,{children:e.options.map(r=>(0,R.jsx)(wve,{name:e.name,value:r.value,label:r.label,icon:r.icon,hint:r.description,disabled:r.disabled,checked:n.includes(r.value),onBlur:t.handleBlur,onChange:e=>{s(r.value,e.currentTarget.checked)}},r.value))})})}let s=e.options.some(e=>e.description!==void 0||e.meta!==void 0);return(0,R.jsx)(qO,{legend:o,icon:e.icon,layout:i,...i===`columns`?{legendTitle:o}:{},description:e.help,disabled:a,error:r??null,children:(0,R.jsx)(Dve,{name:e.name,"aria-label":o,value:QN(t),onValueChange:e=>{t.handleChange(e),t.handleBlur()},orientation:e.kind===`icon-radio`||s?`horizontal`:`vertical`,children:e.options.map(t=>e.kind===`icon-radio`?(0,R.jsx)(kve,{value:t.value,label:t.label,...t.caption===void 0?{}:{caption:t.caption},icon:t.icon,disabled:t.disabled},t.value):s?(0,R.jsx)(Ove,{value:t.value,title:t.label,description:t.description,meta:t.meta,disabled:t.disabled},t.value):(0,R.jsx)(JO,{label:t.label,orientation:`inline`,children:(0,R.jsx)(YN,{value:t.value,disabled:t.disabled})},t.value))})})}function Xve({spec:e,field:t,locked:n,error:r,render:i,...a}){return i({name:e.name,label:e.label,help:e.help,value:Uve(t),onChange:e=>{t.handleChange(e)},onBlur:t.handleBlur,error:r,disabled:n,id:a.id??e.name,"aria-describedby":a[`aria-describedby`],"aria-invalid":r!==void 0})}function Zve({form:e,spec:t,locked:n,layout:r}){let i=UO({form:e,name:t.name}),a=VO(e.store,e=>e.submissionAttempts>0),o=i.state.meta.isBlurred||a?hme(i.state.meta):void 0;if(t.render===void 0&&Jve.has(t.kind))return(0,R.jsx)(Yve,{spec:t,field:i,locked:n,error:o,layout:r});let s=r===`columns`?t.kind===`switch`||t.kind===`checkbox`?`horizontal`:`vertical`:t.kind===`checkbox`?`inline`:(t.layout??(t.kind===`switch`?`row`:`stacked`))===`row`?`horizontal`:`vertical`;return(0,R.jsx)(JO,{label:t.label,...r===`columns`?{labelTitle:t.label}:{},description:t.help,icon:t.icon,orientation:s,error:o,...t.required===void 0?{}:{required:t.required},...t.optional===void 0?{}:{optional:t.optional},children:t.render===void 0?(0,R.jsx)(qve,{spec:t,field:i,locked:n}):(0,R.jsx)(Xve,{spec:t,field:i,locked:n,error:o,render:t.render})})}var Qve=vg(Mg(Og,ZN));function eP({form:e,spec:t,locked:n,layout:r}){let i=t.when;return VO(e.store,e=>i===void 0||i(Vu(Qve(e.values),()=>({}))))?(0,R.jsx)(Zve,{form:e,spec:t,locked:n,layout:r}):null}function $ve({form:e,section:t,locked:n,layout:r}){let i=t.fields.map(t=>(0,R.jsx)(eP,{form:e,spec:t,locked:n,layout:r},t.name));return t.title===void 0?i:(0,R.jsx)(Sme,{title:t.title,description:t.description,layout:r,children:i})}function tP({model:e,names:t,disabled:n=!1,layout:r}){let i=e.form;return t===void 0?e.description.sections.map(e=>(0,R.jsx)($ve,{form:i,section:e,locked:n,layout:r},e.id??``)):t.map(t=>{let a=e.description.fields.find(e=>e.name===t);return a===void 0?null:(0,R.jsx)(eP,{form:i,spec:a,locked:n,layout:r},t)})}var nP=class{annotation;constructor(e){this.annotation=e}},eye=class{sections;constructor(e){this.sections=e}},rP=`caps/form`,iP=0;function aP(e){iP+=1;let t={[`${rP}:${String(iP)}`]:new nP(e)};return e.label!==void 0&&(t.title=e.label),e.help!==void 0&&(t.description=e.help),t}Og.annotate(aP({kind:`secret`})).pipe(Bg(`Secret`));var oP=e=>{let t=e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]+/g,` `).toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)};function tye(e){return Object.values(e??{}).reduce((e,t)=>t instanceof nP?{...e,...t.annotation}:e,{})}function sP(e){return e.reduce((e,t)=>({...e,...tye(t)}),{})}function cP(e){let t=e?.[rP];return t instanceof eye?t.sections:{}}var lP=vg(Og);function uP(e){if(xm(e))return tee(lP(e.literal),{onNone:()=>null,onSome:e=>[e]});if(!Tm(e))return null;let t=[];for(let n of e.types){if(ym(n))continue;let e=uP(n);if(e===null)return null;t.push(...e)}return t}function dP(e){if(bm(e))return{type:`string`,literals:[]};if(vne(e))return{type:`number`,nullable:!1};if(yne(e))return{type:`boolean`};let t=uP(e);if(t!==null)return{type:`string`,literals:t};if(Cm(e)){let[t]=e.rest;if(t===void 0)return null;if(bm(t))return{type:`strings`,literals:[]};let n=uP(t);return n===null?null:{type:`strings`,literals:n}}if(Tm(e)){let t=e.types.filter(e=>!ym(e)&&!vm(e)),n=e.types.some(e=>vm(e)),[r]=t;if(t.length!==1||r===void 0)return null;let i=dP(r);return i?.type===`number`?{type:`number`,nullable:n}:n?null:i}return null}function nye(e){let t=e.ast;if(!wm(t))throw Error(`A schema form needs a Schema.Struct.`);return{fields:t.propertySignatures.map(e=>{let t=String(e.name),n=Rh(e.type),r=sP([e.type.annotations,...(e.type.checks??[]).map(e=>e.annotations)]),i=r.kind===`file`?{type:`files`}:dP(n);if(i===null)throw Error(`Schema field "${t}" has no form control. Annotate it with field({ render }) or a kind.`);return{name:t,valueType:i,optional:e.type.context?.isOptional===!0,annotation:r,title:$ne(e.type),description:ere(e.type)}}),sections:cP(Qne(t))}}function fP(e){let t=e,n=!1,r=!1;for(;;)if(t instanceof Oo)n=!0,t=t.unwrap();else if(t instanceof Mo)r=!0,t=t.unwrap();else if(t instanceof Po)t=t.unwrap();else if(t instanceof Ho)t=t.in;else return{node:t,optional:n,nullable:r}}function pP(e){if(e instanceof fo){let t=e.options.map(e=>pP(e));return t.some(e=>e===null)?null:t.flatMap(e=>e??[])}let t=e instanceof So?e.options:e instanceof wo?[...e.values]:null;if(t===null)return null;let n=t.map(e=>lP(e));return n.every(eee)?n.map(e=>e.value):null}function rye(e){let{node:t,nullable:n}=fP(e);if(t instanceof xa)return{type:`string`,literals:[]};if(t instanceof Ga)return{type:`number`,nullable:n};if(t instanceof Ya)return{type:`boolean`};let r=pP(t);if(r!==null)return{type:`string`,literals:r};if(t instanceof ao){let e=fP(t.element).node;if(e instanceof xa)return{type:`strings`,literals:[]};let n=pP(e);return n===null?null:{type:`strings`,literals:n}}return null}function mP(e){let t=[e];for(;;){let e=t[t.length-1];if(e===void 0)break;let n=e instanceof Oo||e instanceof Mo||e instanceof Po?e.unwrap():e instanceof Ho?e.in:e;if(n===e)break;t.push(n)}return t.reverse().map(e=>lr.get(e))}function hP(e){return mP(e).reduce((e,t)=>({...e,...t}),{})}function iye(e){return Object.entries(e.shape)}function aye(e){let t=fP(e).node;if(!(t instanceof so))throw Error(`A schema form needs a z.object.`);return{fields:iye(t).map(([e,t])=>{let n=sP(mP(t)),r=n.kind===`file`?{type:`files`}:rye(t);if(r===null)throw Error(`Schema field "${e}" has no form control. Annotate it with field({ render }) or a kind.`);let i=hP(t);return{name:e,valueType:r,optional:fP(t).optional,annotation:n,title:i.title,description:i.description}}),sections:cP(hP(e))}}function oye(e,t){let n=t.options??{};return(e.length>0?e:Object.keys(n)).map(e=>{let t=n[e],r=t===void 0?{}:t instanceof Object?t:{label:t};return{value:e,label:r.label??oP(e),description:r.description,meta:r.meta,icon:r.icon,caption:r.caption,disabled:r.disabled===!0}})}function sye(e,t){let n=t.some(e=>e.icon!==void 0);switch(e.type){case`boolean`:return`switch`;case`number`:return`number`;case`strings`:return n?`icon-checkboxes`:`checkboxes`;case`files`:return`file`;case`string`:return t.length===0?`text`:t.length>12?`combobox`:n?`icon-radio`:t.some(e=>e.description!==void 0||e.meta!==void 0)||t.length<=3?`radio`:`select`}}function cye(e,t){switch(e.type){case`boolean`:return!1;case`number`:return e.nullable?null:0;case`strings`:case`files`:return[];case`string`:return t[0]?.value??``}}function lye(e){let t=e instanceof ya?aye(e):nye(e),n=t.fields.map((e,t)=>{let{kind:n,...r}=e.annotation,i=oye(e.valueType.type===`string`||e.valueType.type===`strings`?e.valueType.literals:[],e.annotation),a=r.help??e.description;return{...r,name:e.name,label:r.label??e.title??oP(e.name),help:a,kind:n??sye(e.valueType,i),options:i,optionalInSchema:e.optional,index:t}}),r={};t.fields.forEach((e,t)=>{let i=n[t];i&&(r[e.name]=cye(e.valueType,i.options))});let i=e=>e.order??e.index,a=e=>e.section!==void 0&&Object.hasOwn(t.sections,e.section)?e.section:null,o=e=>n.filter(t=>a(t)===e).sort((e,t)=>i(e)-i(t)),s=Object.entries(t.sections).map(([e,t])=>({id:e,title:t.title,description:t.description,fields:o(e)}));return{fields:n,sections:[{id:null,title:void 0,description:void 0,fields:o(null)},...s].filter(e=>e.fields.length>0),defaults:r}}function gP(e){let t=e instanceof ya?e:hg(e);return{"~standard":{...t[`~standard`],validate:e=>{let n=t[`~standard`].validate(e);return n instanceof Promise?n.then(e=>_P(e)):_P(n)}}}}function _P(e){return e.issues===void 0?e:{issues:e.issues.map(e=>e.path===void 0?e:{...e,path:e.path.slice(0,1)})}}var vP=`onServer`;function yP(e){let t=e.querySelector(`[aria-invalid="true"]`),n=t?.matches(`input, select, textarea, button, [tabindex]`)?t:t?.querySelector(`input, select, textarea, button`);return n?.focus(),n!=null}function uye(e){if(yP(e))return()=>void 0;let t=new MutationObserver(()=>{yP(e)&&t.disconnect()});return t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`aria-invalid`]}),()=>{t.disconnect()}}function dye(e){return e.state.meta.errorMap.onServer!==void 0}function fye(e){e.setMeta(e=>({...e,errorMap:{...e.errorMap,[vP]:void 0}}))}function pye(e,t,n){e.setFieldMeta(t,e=>({...e,isBlurred:!0,errorMap:{...e.errorMap,[vP]:n}}))}function bP(e){let[t,n]=(0,I.useState)(null),[r,i]=(0,I.useState)(null),[a,o]=(0,I.useState)(e.defaultValues),[s,c]=(0,I.useState)(null);uO(a,e.defaultValues)||(o(e.defaultValues),c(null));let{schema:l}=e,u=(0,I.useMemo)(()=>lye(l),[l]),d=(0,I.useMemo)(()=>gP(l),[l]),f=fme({defaultValues:s??a,validators:{onChange:d,onSubmit:d},listeners:{onChange:({fieldApi:e})=>{n(null),i(null),dye(e)&&fye(e)}},onSubmit:async({value:t,formApi:r})=>{n(null),i(null);let a=await gP(l)[`~standard`].validate(t);if(a.issues){n(a.issues[0]?.message??`Check the form and try again.`);return}let o;try{o=await e.onSubmit(a.value,t)??{kind:`saved`}}catch(t){console.error(`SchemaForm submit failed`,t),n(e.failure??`Couldn't save changes. Try again.`);return}if(o.kind===`refused`){n(o.error??null);let e=r;for(let[t,n]of Object.entries(o.fields??{}))n!==void 0&&n.length>0&&pye(e,t,n);return}let s=o.values??t;c(s),r.reset(s),i(o.message??`Saved`),e.onSaved?.(s)}});return{description:u,form:f,error:t,saved:r,discard:()=>{n(null),i(null),f.reset()},submit:()=>f.handleSubmit()}}function xP(e){return{dirty:VO(e.form.store,e=>!e.isDefaultValue),submitting:VO(e.form.store,e=>e.isSubmitting),canSubmit:VO(e.form.store,e=>e.canSubmit)}}function SP({model:e,submitLabel:t=`Save changes`,discardLabel:n,onCancel:r,cancelLabel:i,allowClean:a,layout:o,footer:s,children:c,disabled:l=!1,...u}){let{submitting:d}=xP(e),f=(0,I.useRef)(null),p=(0,I.useRef)(()=>void 0);return(0,I.useEffect)(()=>()=>{p.current()},[]),(0,R.jsxs)(bme,{...u,ref:f,layout:o,busy:d,noValidate:!0,onSubmit:t=>{t.preventDefault(),e.form.state.isSubmitting||e.submit().then(()=>{p.current();let t=f.current;t!==null&&!e.form.state.isValid&&(p.current=uye(t))})},children:[c??(0,R.jsx)(tP,{model:e,disabled:l,layout:o}),s===void 0?(0,R.jsx)(hye,{model:e,label:t,discardLabel:r===void 0?n:void 0,onCancel:r,cancelLabel:i,allowClean:a??r!==void 0,divider:r===void 0}):s]})}function mye({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i,...a}){let o=bP({schema:e,defaultValues:t,onSubmit:n,onSaved:r,failure:i});return(0,R.jsx)(SP,{...a,model:o})}function CP(e){return`model`in e?(0,R.jsx)(SP,{...e}):(0,R.jsx)(mye,{...e})}function hye({model:e,label:t,discardLabel:n,onCancel:r,cancelLabel:i=`Cancel`,allowClean:a=!1,dirtyLabel:o=`Unsaved changes`,buttonProps:s,...c}){let{dirty:l,submitting:u}=xP(e),d=u?null:e.saved&&!l?(0,R.jsx)(VE,{tone:`success`,size:`compact`,label:e.saved}):l?(0,R.jsx)(VE,{tone:`neutral`,size:`compact`,label:o}):null;return(0,R.jsxs)(yme,{...c,error:e.error,status:d,children:[r?(0,R.jsx)(yE,{type:`button`,variant:`ghost`,disabled:u,onClick:r,children:i}):n&&l?(0,R.jsx)(yE,{type:`button`,variant:`ghost`,disabled:u,onClick:e.discard,children:n}):null,(0,R.jsx)(yE,{...s,type:`submit`,loading:u,disabled:u||!l&&!a,title:!l&&!a?`No changes to save`:void 0,children:t})]})}var wP=new Set([`Enter`,` `]),gye=(0,I.forwardRef)(function({children:e,onConfirm:t,holdMs:n=900,holdHint:r=`Press and hold to confirm.`,className:i,disabled:a,loading:o=!1,result:s,resultLabel:c,onBlur:l,onKeyDown:u,onKeyUp:d,onPointerDown:f,onPointerUp:p,onPointerLeave:m,onPointerCancel:h,...g},_){let v=(0,I.useRef)(null),y=(0,I.useRef)(null),b=(0,I.useRef)(null),x=(0,I.useRef)(null),S=(0,I.useRef)(t),C=(0,I.useId)();(0,I.useEffect)(()=>{S.current=t},[t]),(0,I.useEffect)(()=>()=>{y.current?.cancel(),b.current!==null&&clearTimeout(b.current)},[]);let w=()=>{y.current=null,b.current=null,x.current=null,S.current();let e=v.current;if(!e||!GC(e))return;let t=VC(e);e.animate([{opacity:1},{opacity:0}],{duration:t.normal,easing:WC(t,t.easeExit)})},T=e=>{let t=v.current;if(a===!0||o||!t||y.current||b.current)return;if(x.current=e,!GC(t)){b.current=setTimeout(w,n);return}let r=VC(t),i=t.animate([{transform:`scaleY(0)`},{transform:`scaleY(1)`}],{duration:n,easing:r.reduced?`steps(3, end)`:WC(r,`cubic-bezier(0.3, 0, 0.7, 1)`)});i.addEventListener(`finish`,w),y.current=i},E=e=>{if(e!==void 0&&x.current!==e)return;x.current=null,b.current!==null&&(clearTimeout(b.current),b.current=null);let t=y.current,n=v.current;if(!t||!n)return;y.current=null;let r=getComputedStyle(n).transform;t.cancel();let i=VC(n);n.animate([{transform:r===`none`?`scaleY(0)`:r},{transform:`scaleY(0)`}],{duration:i.fast,easing:WC(i,i.ease)})};return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(yE,{...g,ref:_,disabled:a,loading:o,result:s,resultLabel:c??(s===void 0?void 0:e),"aria-describedby":C,className:RC(`caps-hold-button`,i),onBlur:e=>{E(),l?.(e)},onPointerDown:e=>{f?.(e),e.button===0&&T(e.pointerId)},onPointerUp:e=>{p?.(e),E(e.pointerId)},onPointerLeave:e=>{m?.(e),E(e.pointerId)},onPointerCancel:e=>{h?.(e),E(e.pointerId)},onKeyDown:e=>{u?.(e),e.key===`Escape`&&E(),wP.has(e.key)&&(e.preventDefault(),e.repeat||T(`key`))},onKeyUp:e=>{d?.(e),wP.has(e.key)&&(e.preventDefault(),E(`key`))},children:[(0,R.jsx)(`span`,{ref:v,"aria-hidden":`true`,className:`caps-hold-fill`}),e]}),(0,R.jsx)(JC,{id:C,children:r})]})}),TP=(0,I.forwardRef)(function({className:e,...t},n){return(0,R.jsx)(`code`,{...t,className:RC(`caps-inline-code`,e),ref:n})}),_ye={neutral:`alert-neutral`,primary:`alert-primary`,secondary:`alert-secondary`,accent:`alert-accent`,success:`alert-success`,info:`alert-info`,warning:`alert-warning`,error:`alert-error`},EP=(0,I.forwardRef)(function({action:e,children:t,className:n,description:r,title:i,tone:a=`neutral`,...o},s){return(0,R.jsxs)(`div`,{...o,className:RC(`alert caps-alert`,_ye[a],n),"data-tone":a,role:o.role??`alert`,ref:s,children:[(0,R.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i?(0,R.jsx)(`h3`,{className:`font-semibold`,children:i}):null,r?(0,R.jsx)(`p`,{className:`text-sm`,children:r}):null,t]}),e?(0,R.jsx)(`div`,{className:`shrink-0`,children:e}):null]})}),vye=8e3,DP=(0,I.forwardRef)(function({className:e,detail:t,framed:n=!0,icon:r,message:i,onRetry:a,size:o=`md`,slowAfterMs:s=vye,variant:c=`line`,...l},u){let[d,f]=(0,I.useState)(!1);return(0,I.useEffect)(()=>{if(f(!1),!Number.isFinite(s))return;let e=globalThis.setTimeout(()=>{f(!0)},s);return()=>{globalThis.clearTimeout(e)}},[s,i]),(0,R.jsxs)(`div`,{...l,className:RC(`caps-loading-state`,e),"data-framed":n?void 0:`false`,"data-icon":r?``:void 0,"data-size":o,"data-slow":d||void 0,ref:u,role:`status`,children:[r?(0,R.jsx)(`span`,{"aria-hidden":`true`,className:`caps-loading-state-icon`,children:r}):null,(0,R.jsx)(_E,{decorative:!0,size:o,variant:c}),(0,R.jsxs)(`span`,{className:`caps-loading-state-copy`,children:[(0,R.jsx)(`span`,{children:i}),t?(0,R.jsx)(`span`,{className:`caps-loading-state-detail`,children:t}):null,d?(0,R.jsx)(`span`,{className:`caps-loading-state-detail`,children:`Still working…`}):null]}),d&&a?(0,R.jsx)(yE,{className:`caps-loading-state-retry`,size:`sm`,variant:`outline`,onClick:a,children:`Retry`}):null]})}),OP=(0,I.forwardRef)(function({className:e,count:t,density:n=`row`,dismissAriaLabel:r,dismissLabel:i=`Dismiss`,message:a,onDismiss:o,onRetry:s,retryAriaLabel:c,retryLabel:l=`Retry`,role:u=`status`,...d},f){return(0,R.jsxs)(`div`,{...d,className:RC(`caps-failure-line`,e),"data-density":n,ref:f,role:u,children:[(0,R.jsx)(VE,{glyph:`dot`,tone:`error`}),(0,R.jsxs)(`span`,{className:`caps-failure-line-copy`,children:[(0,R.jsx)(`span`,{children:a}),t!==void 0&&t>1?(0,R.jsxs)(`span`,{className:`caps-failure-line-count`,children:[`Failed `,t,` times`]}):null]}),s||o?(0,R.jsxs)(`span`,{className:`caps-failure-line-actions`,children:[s?(0,R.jsx)(yE,{"aria-label":c,size:`sm`,variant:`outline`,onClick:s,children:l}):null,o?(0,R.jsx)(yE,{"aria-label":r,size:`sm`,variant:`ghost`,onClick:o,children:i}):null]}):null]})}),kP=`data-reorder-key`;function yye(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{element:t,top:r.top-n.top+e.scrollTop,left:r.left-n.left+e.scrollLeft,width:r.width,height:r.height}}function bye(e,t,n){e.forEach((e,r)=>{e.animate(t.reduced?[{opacity:0},{opacity:1}]:[{opacity:0,transform:`translateY(${String(t.distance)}px)`},{opacity:1,transform:`none`}],{duration:t.normal,delay:n+r*t.stagger,easing:WC(t,t.ease),fill:`backwards`})})}function xye(e,t,n){let r=t.element.cloneNode(!0);if(!(r instanceof HTMLElement))return;r.removeAttribute(kP),r.removeAttribute(`id`),r.setAttribute(`aria-hidden`,`true`),r.setAttribute(`inert`,``),Object.assign(r.style,{position:`absolute`,top:`${String(t.top-e.clientTop)}px`,left:`${String(t.left-e.clientLeft)}px`,width:`${String(t.width)}px`,height:`${String(t.height)}px`,margin:`0`,pointerEvents:`none`});let i=getComputedStyle(e).position!==`static`;i||(e.style.position=`relative`),e.append(r);let a=r.animate(n.reduced?[{opacity:1},{opacity:0}]:[{opacity:1,transform:`none`},{opacity:0,transform:`translateY(${String(-n.distance)}px)`}],{duration:n.fast,easing:WC(n,n.easeExit),fill:`forwards`}),o=()=>{r.remove(),!i&&e.querySelector(`:scope > [inert]`)===null&&e.style.removeProperty(`position`)};a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o)}function Sye(e,t,n,r){let i=e.style.overflow;e.style.overflow=`clip`;let a=e.animate([{height:`${String(t)}px`},{height:`${String(n)}px`}],r),o=()=>{e.style.overflow=i};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a}function Cye(e,t){let n=(0,I.useRef)(null),r=(0,I.useRef)(0),i=(0,I.useRef)(null),a=t.join(`\0`);(0,I.useLayoutEffect)(()=>{let o=e.current;if(o===null){n.current=null;return}let s=n.current,c=s?.order!==a,l=i.current?o.getBoundingClientRect().height:r.current;c&&(i.current?.cancel(),i.current=null);let u=c?o.getBoundingClientRect().height:r.current;r.current=u;let d=new Map;for(let e of o.querySelectorAll(`:scope [${kP}]`)){let t=e.getAttribute(kP);if(t===null)continue;let n=s?.rows.get(t);d.set(t,!c&&n?.element===e?n:yye(o,e))}let f=new Set(t);if(n.current={order:a,keys:f,rows:d},s===null||!c||!GC(o))return;let p=VC(o),m=[...s.rows].filter(([e,t])=>!f.has(e)&&!t.element.isConnected),h={duration:p.slow,delay:m.length>0?p.fast:0,easing:WC(p,p.ease),fill:`backwards`},g=[],_=[];for(let[e,t]of d){let n=s.rows.get(e);if(n===void 0){s.keys.has(e)||g.push(t.element);continue}let r=n.left-t.left,i=n.top-t.top;(r!==0||i!==0)&&(_.push(t.element),!(p.reduced||p.slow<=0)&&t.element.animate([{transform:`translate(${String(r)}px, ${String(i)}px)`},{transform:`none`}],h))}if(p.reduced)for(let e of _)e.animate([{opacity:.3},{opacity:1}],{duration:p.fast,easing:p.ease});else for(let[,e]of m)xye(o,e,p);if(bye(g,p,_.length>0&&!p.reduced?p.fast:0),!p.reduced&&Math.abs(l-u)>.5){let e=Sye(o,l,u,h);i.current=e,e.addEventListener(`finish`,()=>{i.current===e&&(i.current=null)})}})}var AP=(0,I.createContext)(null);function jP(){let e=(0,I.useContext)(AP);if(!e)throw Error(`Shed data requires a workspace provider`);return e}function MP({label:e,order:t,children:n,listRoot:r}){let i=(0,I.useRef)(null),a=r??i;return Cye(a,t),(0,R.jsx)(`div`,{ref:a,children:(0,R.jsx)(Bpe,{role:`list`,"aria-label":e,children:n})})}var wye=L({command:e_.pipe(zg(Qg(16384))).annotate(aP({label:`Command`,required:!0,placeholder:`pnpm dev`})),port:Lg(YS.fields.port).annotate(aP({label:`Port (optional)`,help:`Web server preview only.`,min:1,max:65535,render:e=>(0,R.jsx)(qN,{name:e.name,id:e.id,type:`number`,inputMode:`numeric`,placeholder:`5173`,min:1,max:65535,step:1,value:e.value??``,disabled:e.disabled,"aria-describedby":e[`aria-describedby`],"aria-invalid":e[`aria-invalid`],onBlur:()=>{e.onBlur()},onChange:t=>{let n=t.currentTarget;e.onChange(n.value===``?null:n.valueAsNumber)}})}))}),Tye=[{command:`pwd`,label:`Folder`,port:null},{command:`ls`,label:`Files`,port:null},{command:`echo hello`,label:`Hello`,port:null}];function NP({openPreview:e,processNavigation:t}){let{ports:{items:n},processes:{items:r,loading:i,error:a,fix:o,refresh:s,actions:c,stop:l,start:u,output:d,unavailableReason:f}}=jP(),p=(0,I.useRef)(null),m=(0,I.useRef)(null),h=(0,I.useRef)(null),g=(0,I.useRef)(null),_=(0,I.useRef)(0),[v,y]=(0,I.useState)(null),b=e=>{Date.now()-_.current<900&&y(e)},x=(0,I.useRef)(null);(0,I.useEffect)(()=>{if(!t||x.current===t.requestId||!p.current)return;let e=[...p.current.querySelectorAll(`[${kP}]`)].find(e=>e.getAttribute(kP)===t.processId);e&&(e.focus(),x.current=t.requestId)},[t,r]);let S=d?.processId??null,C=d?.data!==null;(0,I.useEffect)(()=>{S!==null&&C&&h.current?.scrollIntoView({block:`start`})},[S,C]);let w=d?.data?.lines.length??0,T=d?.data?.process.state===`running`;(0,I.useEffect)(()=>{let e=m.current;T&&e&&(e.scrollTop=e.scrollHeight)},[T,w]);let E=bP({schema:wye,defaultValues:{command:``,port:null},onSubmit:async({command:e,port:t})=>await u?.(t===null?{command:e}:{command:e,port:t})?{kind:`saved`}:{kind:`refused`,fields:{command:`Couldn’t confirm the process start. Try again.`}}}),D=r!==null||i||a!==null?i&&r===null?(0,R.jsx)(DP,{message:`Loading command history`,size:`sm`,framed:!1}):a!==null&&r===null?(0,R.jsx)(`div`,{className:`px-2 pb-3`,children:(0,R.jsx)(EP,{tone:a.reason===`failed`?`error`:`warning`,role:`status`,title:`Can't run commands`,description:a.message,action:o===void 0?void 0:(0,R.jsx)(yE,{size:`xs`,variant:`outline`,onClick:()=>void o(),children:a.action===`grant`?`Allow access`:`Try again`})})}):r===null||r.length===0?(0,R.jsx)(`div`,{className:`px-2 pb-3`,children:(0,R.jsx)(dD,{variant:`quiet`,visual:`blobs`,headingLevel:3,title:`Your first command starts here`,description:`Choose a starter above, then press Start. Output and past commands stay here.`})}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`div`,{className:`-mx-1`,children:(0,R.jsx)(MP,{label:`Computer process inventory`,order:r.map(({id:e})=>e),listRoot:p,children:r.map(t=>{let r=c?.get(t.id),i=t.state===`running`?n?.find(e=>e.port===t.port):void 0,a,o;t.state===`running`?(a=`success`,o=`Running`):t.state===`uncertain`?(a=`warning`,o=`Status unknown`):t.endedReason===`idle-sleep`?(a=`warning`,o=`Stopped when the Computer went to sleep`):t.exitCode===null?(a=`warning`,o=`Ended · exit not recorded`):(a=t.exitCode===0?`success`:`error`,o=`Exit ${String(t.exitCode)}`);let s=t.state===`exited`&&t.sync===`pending`;return(0,R.jsx)(PD,{[kP]:t.id,role:`listitem`,"data-process-state":t.state,"data-process-sync":t.sync,className:`py-2`,tabIndex:-1,primary:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(TP,{className:`block truncate`,"data-process-command":!0,children:t.command}),(0,R.jsxs)(`span`,{className:`flex items-center gap-2 text-xs font-normal`,children:[(0,R.jsx)(VE,{size:`compact`,tone:a,className:a===`error`?`text-error`:void 0,label:r===`stopping`?`Stopping`:o}),t.port===null?null:(0,R.jsxs)(`span`,{"data-process-port":!0,children:[`Port `,t.port]})]}),r===`failed`?(0,R.jsxs)(`span`,{role:`status`,className:`block whitespace-normal text-xs font-normal text-error`,children:[`Couldn't stop `,t.command,`. Try again.`]}):(0,R.jsxs)(R.Fragment,{children:[v===t.id?(0,R.jsx)(`span`,{role:`status`,className:`block text-xs font-normal text-(--stipe-fg-muted)`,children:`Hold to stop`}):null,s?(0,R.jsx)(`span`,{className:`block truncate text-xs font-normal text-(--stipe-fg-muted)`,children:`Changes still copying to your files`}):null,t.cwd===null?null:(0,R.jsx)(`span`,{className:`block truncate text-xs font-normal text-(--stipe-fg-muted)`,children:t.cwd})]})]}),actions:(0,R.jsxs)(R.Fragment,{children:[d?(0,R.jsx)(yE,{size:`sm`,variant:`ghost`,"aria-label":`Show output of ${t.command}`,onClick:()=>{d.select(t.id)},children:`Output`}):null,i?(0,R.jsxs)(yE,{size:`sm`,variant:`ghost`,"aria-label":`Open preview of port ${String(i.port)}`,onClick:()=>{e(i)},children:[(0,R.jsx)(kD,{size:14,"aria-hidden":`true`}),` Open`]}):null,t.state===`running`&&l?(0,R.jsx)(gye,{holdHint:`A stopped process cannot be resumed. Press and hold to stop it.`,size:`sm`,variant:`ghost`,className:`hover:text-error`,disabled:r===`stopping`,"aria-label":`Stop process ${t.command}`,onPointerDown:()=>{_.current=Date.now(),y(null)},onPointerUp:()=>{b(t.id)},onConfirm:()=>{y(null),l(t.id)},children:r===`stopping`?`Stopping…`:`Stop`}):null]})},t.id)})})}),i?(0,R.jsx)(DP,{message:`Refreshing processes…`,size:`sm`,framed:!1}):null,a===null?null:(0,R.jsx)(OP,{message:`Couldn't refresh processes. The list may be out of date.`,onRetry:s?()=>void s():void 0})]}):(0,R.jsx)(FD,{title:`Processes can't be listed yet`,children:`Allow Computer access to see and run commands.`});return(0,R.jsxs)(`div`,{className:`space-y-5 p-4 sm:p-6`,ref:g,children:[f?(0,R.jsx)(`p`,{role:`status`,className:`px-2 pt-3 text-sm`,children:f}):null,u&&(a===null||a.reason===`failed`)?(0,R.jsx)(E.form.Subscribe,{selector:e=>e.isSubmitting,children:e=>(0,R.jsxs)(`div`,{children:[(0,R.jsx)(CP,{model:E,"aria-label":`Start a process`,className:`space-y-3`,disabled:e||f!==void 0,footer:null,children:(0,R.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,R.jsx)(tP,{model:E,disabled:e||f!==void 0}),(0,R.jsx)(yE,{className:`sm:col-span-2 sm:justify-self-start`,type:`submit`,variant:`primary`,loading:e,disabled:e||f!==void 0,onClick:()=>{E.form.setFieldMeta(`command`,e=>({...e,errorMap:{...e.errorMap,onServer:void 0}}))},children:`Start`})]})}),(0,R.jsx)(`ul`,{"aria-label":`Try one of these`,className:`m-0 mt-3 flex list-none flex-wrap gap-2 p-0`,children:Tye.map(t=>(0,R.jsx)(`li`,{children:(0,R.jsxs)(yE,{size:`sm`,variant:`outline`,disabled:e||f!==void 0,title:t.command,onClick:()=>{E.form.setFieldValue(`command`,t.command),E.form.setFieldValue(`port`,t.port),g.current?.querySelector(`input[name="command"]`)?.focus()},children:[t.label,` `,(0,R.jsx)(TP,{children:t.command})]})},t.command))})]})}):null,d?.processId?(0,R.jsxs)(`section`,{ref:h,"aria-label":`Process output`,className:`space-y-3`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,R.jsx)(`span`,{className:`min-w-0 break-words font-mono text-sm font-semibold`,children:d.data?.process.command??`Process output`}),(0,R.jsx)(yE,{size:`xs`,variant:`ghost`,onClick:()=>{d.select(null)},children:`Close output`})]}),d.failed?(0,R.jsx)(OP,{message:`Couldn't read command output.`,onRetry:()=>void d.retry()}):d.loading?(0,R.jsx)(DP,{size:`sm`,message:`Loading output`}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(KE,{children:(0,R.jsx)(`pre`,{ref:m,className:`max-h-48 overflow-auto whitespace-pre-wrap break-all p-3 text-xs`,children:d.data?.lines.length===0?d.data.process.state===`exited`?`Finished without output.`:`No output yet.`:d.data?.lines.join(`
96
96
  `)})}),d.data?.process.state===`running`?(0,R.jsx)(`p`,{role:`status`,className:`text-xs`,children:`Updating while it runs`}):null,d.data?.process.endedReason===`idle-sleep`?(0,R.jsx)(`p`,{className:`text-xs`,children:`Stopped when the Computer went to sleep.`}):null,d.data?.process.exitCode==null?null:(0,R.jsxs)(`p`,{className:`text-xs`,children:[`Exit `,d.data.process.exitCode]}),d.data?.truncated?(0,R.jsx)(`p`,{className:`text-xs`,children:`Showing the most recent output.`}):null]})]}):null,(0,R.jsxs)(`section`,{"aria-label":`Process history`,className:`space-y-3`,children:[(0,R.jsx)(`h2`,{className:`text-sm font-semibold`,children:`History`}),D]})]})}function Eye(e){return NP(e)}var Dye=vg(ZS.fields.id);function Oye(e,t){let n=d_(),r=e?.context.get().computerId??null,[i,a]=(0,I.useState)(null),o=i!==null&&i.computerId===r?i.id:null,s=Z_({...OS(e,QS,DS.of(e,`process-output`,o),e=>{if(o===null)throw Error(`Choose a process to read its output`);return e.logs(o)}),enabled:o!==null&&e?.context.get().computerId!=null&&e.capabilities.has(QS),refetchInterval:e=>t&&o!==null&&e.state.data?.process.state!==`exited`?2e3:!1}),c={processId:o,data:s.data??null,loading:s.isPending,failed:s.isError,retry:async()=>{await s.refetch()},select:e=>{a(e===null?null:{computerId:r,id:e})}},l=e?.context.get().computerId!=null&&e.capabilities.has(QS),u=DS.of(e,`processes`),d=Z_({...OS(e,QS,u,e=>e.list()),enabled:l,refetchInterval:t?1e4:!1}),f=l?e.capabilities.require(QS):null,p=ev({mutationKey:u,mutationFn:e=>{if(!f)throw new r_(`Processes are not granted`,{code:`CAPABILITY_DENIED`,retryable:!1});return f.kill(e)},onSettled:()=>n.invalidateQueries({queryKey:u,exact:!0})}),m=(0,I.useRef)(null),h=ev({mutationKey:DS.of(e,`process-start`),mutationFn:e=>{if(!f)throw new r_(`Processes are not granted`,{code:`CAPABILITY_DENIED`,retryable:!1});return f.start(e)},onSettled:()=>Promise.all([n.invalidateQueries({queryKey:u,exact:!0}),n.invalidateQueries({queryKey:DS.of(e,`ports`),exact:!0})])});async function g(e){let t=JSON.stringify(e),n=m.current?.input===t?m.current:{input:t,requestId:xce()};m.current=n;try{let t=await h.mutateAsync({...e,requestId:n.requestId});return a({computerId:r,id:t.id}),m.current===n&&(m.current=null),!0}catch(e){return console.error(`Shed process start failed`,Op(e)),!1}}let _=$_({filters:{mutationKey:u,exact:!0},select:({state:e})=>({id:Hu(Dye(e.variables)),status:e.status})}),v=new Map;for(let{id:e,status:t}of _)e!==null&&(t===`pending`?v.set(e,`stopping`):t===`error`?v.set(e,`failed`):v.delete(e));return{query:d,stop:p,actions:v,enabled:l,startCommand:g,output:c}}var kye=vg(L({port:YS.fields.port,expose:Ag}));function Aye(e,t){let n=d_(),r=e?.context.get().computerId!=null&&e.capabilities.has(XS),i=DS.of(e,`ports`),a=Z_({...OS(e,XS,i,()=>{if(!e)throw new r_(`No App connection`,{code:`DISCONNECTED`,retryable:!0});return Jle(e.capabilities)}),enabled:r,refetchInterval:e=>t&&!(e.state.data&&`error`in e.state.data)?1e4:!1}),o=r?e.capabilities.require(XS):null,s=ev({mutationKey:i,mutationFn:async({port:e,expose:t})=>{if(!o)throw new r_(`Ports are not granted`,{code:`CAPABILITY_DENIED`,retryable:!1});t?await o.expose(e):await o.unexpose(e)},onSettled:()=>n.invalidateQueries({queryKey:i,exact:!0})}),c=$_({filters:{mutationKey:i,exact:!0},select:({state:e})=>({change:Hu(kye(e.variables)),status:e.status})}),l=new Map;for(let{change:e,status:t}of c)e&&(t===`pending`||t===`error`?l.set(e.port,{expose:e.expose,status:t===`pending`?`pending`:`failed`}):l.delete(e.port));return{query:a,enabled:r,status:r?a.isPending?`loading`:a.isError?`error`:`error`in a.data?`not-configured`:a.isFetching?`loading`:`loaded`:`unavailable`,actions:l,ports:r&&a.data&&`ports`in a.data?a.data.ports:null,change:async(e,t)=>{try{return await s.mutateAsync({port:e,expose:t}),!0}catch{return!1}}}}function jye({available:e,cause:t,className:n,fix:r,need:i,secondary:a,variant:o,visual:s,waitingFor:c=`setup`,...l}){let u=r.pending===!0,d=u?`Waiting for ${c}…`:r.label,f=e?(0,R.jsxs)(R.Fragment,{children:[t,` `,(0,R.jsx)(`span`,{className:`caps-setup-notice-available`,children:e})]}):t;return o===`panel`?(0,R.jsx)(dD,{...l,actions:a?(0,R.jsx)(yE,{size:`sm`,variant:`ghost`,onClick:a.onSelect,children:a.label}):void 0,className:RC(`caps-setup-notice`,n),"data-variant":`panel`,description:f,primaryAction:{label:d,onSelect:r.onSelect,pending:u},title:i,variant:`panel`,visual:s??(0,R.jsx)(VE,{className:`caps-setup-notice-dot`,glyph:`dot`,tone:`warning`})}):(0,R.jsx)(`div`,{className:`caps-setup-notice-frame`,children:(0,R.jsx)(EP,{...l,action:(0,R.jsxs)(`span`,{className:`caps-setup-notice-actions`,children:[a?(0,R.jsx)(yE,{size:`sm`,variant:`ghost`,onClick:a.onSelect,children:a.label}):null,(0,R.jsx)(yE,{loading:u,size:`sm`,variant:`outline`,onClick:r.onSelect,children:d})]}),className:RC(`caps-setup-notice`,n),"data-variant":o,description:f,role:`status`,title:(0,R.jsxs)(`span`,{className:`caps-setup-notice-title`,children:[(0,R.jsx)(VE,{glyph:`dot`,tone:`warning`}),i]}),tone:`warning`})})}function PP(e,t){console.error(JSON.stringify({source:`shed`,operation:e,failureKind:t instanceof Error?t.name:`NonErrorThrown`}),Op(t))}var FP=o((e=>{(function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function n(e){return i(o(e),arguments)}function r(e,t){return n.apply(null,[e].concat(t||[]))}function i(e,r){var i=1,a=e.length,o,s=``,c,l,u,d,f,p,m,h;for(c=0;c<a;c++)if(typeof e[c]==`string`)s+=e[c];else if(typeof e[c]==`object`){if(u=e[c],u.keys)for(o=r[i],l=0;l<u.keys.length;l++){if(o==null)throw Error(n(`[sprintf] Cannot access property "%s" of undefined value "%s"`,u.keys[l],u.keys[l-1]));o=o[u.keys[l]]}else o=u.param_no?r[u.param_no]:r[i++];if(t.not_type.test(u.type)&&t.not_primitive.test(u.type)&&o instanceof Function&&(o=o()),t.numeric_arg.test(u.type)&&typeof o!=`number`&&isNaN(o))throw TypeError(n(`[sprintf] expecting number but found %T`,o));switch(t.number.test(u.type)&&(m=o>=0),u.type){case`b`:o=parseInt(o,10).toString(2);break;case`c`:o=String.fromCharCode(parseInt(o,10));break;case`d`:case`i`:o=parseInt(o,10);break;case`j`:o=JSON.stringify(o,null,u.width?parseInt(u.width):0);break;case`e`:o=u.precision?parseFloat(o).toExponential(u.precision):parseFloat(o).toExponential();break;case`f`:o=u.precision?parseFloat(o).toFixed(u.precision):parseFloat(o);break;case`g`:o=u.precision?String(Number(o.toPrecision(u.precision))):parseFloat(o);break;case`o`:o=(parseInt(o,10)>>>0).toString(8);break;case`s`:o=String(o),o=u.precision?o.substring(0,u.precision):o;break;case`t`:o=String(!!o),o=u.precision?o.substring(0,u.precision):o;break;case`T`:o=Object.prototype.toString.call(o).slice(8,-1).toLowerCase(),o=u.precision?o.substring(0,u.precision):o;break;case`u`:o=parseInt(o,10)>>>0;break;case`v`:o=o.valueOf(),o=u.precision?o.substring(0,u.precision):o;break;case`x`:o=(parseInt(o,10)>>>0).toString(16);break;case`X`:o=(parseInt(o,10)>>>0).toString(16).toUpperCase()}t.json.test(u.type)?s+=o:(t.number.test(u.type)&&(!m||u.sign)?(h=m?`+`:`-`,o=o.toString().replace(t.sign,``)):h=``,f=u.pad_char?u.pad_char===`0`?`0`:u.pad_char.charAt(1):` `,p=u.width-(h+o).length,d=u.width&&p>0?f.repeat(p):``,s+=u.align?h+o+d:f===`0`?h+d+o:d+h+o)}return s}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var n=e,r,i=[],o=0;n;){if((r=t.text.exec(n))!==null)i.push(r[0]);else if((r=t.modulo.exec(n))!==null)i.push(`%`);else if((r=t.placeholder.exec(n))!==null){if(r[2]){o|=1;var s=[],c=r[2],l=[];if((l=t.key.exec(c))!==null)for(s.push(l[1]);(c=c.substring(l[0].length))!==``;)if((l=t.key_access.exec(c))!==null)s.push(l[1]);else if((l=t.index_access.exec(c))!==null)s.push(l[1]);else throw SyntaxError(`[sprintf] failed to parse named argument key`);else throw SyntaxError(`[sprintf] failed to parse named argument key`);r[2]=s}else o|=2;if(o===3)throw Error(`[sprintf] mixing positional and named placeholders is not (yet) supported`);i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}else throw SyntaxError(`[sprintf] unexpected placeholder`);n=n.substring(r[0].length)}return a[e]=i}e!==void 0&&(e.sprintf=n,e.vsprintf=r),typeof window<`u`&&(window.sprintf=n,window.vsprintf=r,typeof define==`function`&&define.amd&&define(function(){return{sprintf:n,vsprintf:r}}))})()}))(),IP=(e,t,n)=>{let r=e instanceof RegExp?LP(e,n):e,i=t instanceof RegExp?LP(t,n):t,a=r!==null&&i!=null&&Mye(r,i,n);return a&&{start:a[0],end:a[1],pre:n.slice(0,a[0]),body:n.slice(a[0]+r.length,a[1]),post:n.slice(a[1]+i.length)}},LP=(e,t)=>{let n=t.match(e);return n?n[0]:null},Mye=(e,t,n)=>{let r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],a=n.length;u>=0&&!s;){if(u===c)r.push(u),c=n.indexOf(e,u+1);else if(r.length===1){let e=r.pop();e!==void 0&&(s=[e,l])}else i=r.pop(),i!==void 0&&i<a&&(a=i,o=l),l=n.indexOf(t,u+1);u=c<l&&c>=0?c:l}r.length&&o!==void 0&&(s=[a,o])}return s},RP=`\0SLASH`+Math.random()+`\0`,zP=`\0OPEN`+Math.random()+`\0`,BP=`\0CLOSE`+Math.random()+`\0`,VP=`\0COMMA`+Math.random()+`\0`,HP=`\0PERIOD`+Math.random()+`\0`,Nye=new RegExp(RP,`g`),Pye=new RegExp(zP,`g`),Fye=new RegExp(BP,`g`),Iye=new RegExp(VP,`g`),Lye=new RegExp(HP,`g`),Rye=/\\\\/g,zye=/\\{/g,Bye=/\\}/g,Vye=/\\,/g,Hye=/\\\./g,Uye=1e5,Wye=4e6;function UP(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function Gye(e){return e.replace(Rye,RP).replace(zye,zP).replace(Bye,BP).replace(Vye,VP).replace(Hye,HP)}function Kye(e){return e.replace(Nye,`\\`).replace(Pye,`{`).replace(Fye,`}`).replace(Iye,`,`).replace(Lye,`.`)}function WP(e){if(!e)return[``];let t=[],n=IP(`{`,`}`,e);if(!n)return e.split(`,`);let{pre:r,body:i,post:a}=n,o=r.split(`,`);o[o.length-1]+=`{`+i+`}`;let s=WP(a);return a.length&&(o[o.length-1]+=s.shift(),o.push.apply(o,s)),t.push.apply(t,o),t}function qye(e,t={}){if(!e)return[];let{max:n=Uye,maxLength:r=Wye}=t;return e.slice(0,2)===`{}`&&(e=`\\{\\}`+e.slice(2)),KP(Gye(e),n,r,!0).map(Kye)}function Jye(e){return`{`+e+`}`}function Yye(e){return/^-?0\d/.test(e)}function Xye(e,t){return e<=t}function Zye(e,t){return e>=t}function GP(e,t,n,r,i,a){let o=[],s=0;for(let c=0;c<e.length;c++)for(let l=0;l<n.length;l++){if(o.length>=r)return o;let u=e[c]+t+n[l];if(!(a&&!u)){if(s+u.length>i)return o;o.push(u),s+=u.length}}return o}function Qye(e,t,n,r){let i=e.split(/\.\./),a=[];if(i[0]===void 0||i[1]===void 0)return a;let o=UP(i[0]),s=UP(i[1]),c=Math.max(i[0].length,i[1].length),l=i.length===3&&i[2]!==void 0?Math.max(Math.abs(UP(i[2])),1):1,u=Xye;s<o&&(l*=-1,u=Zye);let d=i.some(Yye),f=0;for(let e=o;u(e,s)&&a.length<n;e+=l){let n;if(t)n=String.fromCharCode(e),n===`\\`&&(n=``);else if(n=String(e),d){let t=c-n.length;if(t>0){let r=Array(t+1).join(`0`);n=e<0?`-`+r+n.slice(1):r+n}}if(f+n.length>r)break;a.push(n),f+=n.length}return a}function KP(e,t,n,r){let i=[``],a=!1,o=!0;for(;;){let s=IP(`{`,`}`,e);if(!s)return GP(i,e,[``],t,n,a);let c=s.pre;if(/\$$/.test(c)){if(i=GP(i,c+`{`+s.body+`}`,[``],t,n,a&&!s.post.length),o=!1,!s.post.length)break;e=s.post;continue}let l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),u=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),d=l||u,f=s.body.indexOf(`,`)>=0;if(!d&&!f){if(s.post.match(/,(?!,).*\}/)){e=s.pre+`{`+s.body+BP+s.post,r=!0;continue}return GP(i,c+`{`+s.body+`}`+s.post,[``],t,n,a)}o&&=(a=r&&!d,!1);let p;if(d)p=Qye(s.body,u,t,n);else{let r=WP(s.body);if(r.length===1&&r[0]!==void 0&&(r=KP(r[0],t,n,!1).map(Jye),r.length===1)){if(i=GP(i,c+r[0],[``],t,n,a&&!s.post.length),!s.post.length)break;e=s.post;continue}let o=a&&!s.post.length&&!c;for(let e=0;o&&e<i.length;e++)i[e]&&(o=!1);p=[];let l=0;outer:for(let e=0;e<r.length;e++){let i=KP(r[e],t,n,!1);for(let e=0;e<i.length;e++){let r=i[e];if(!(o&&!r)){if(p.length>=t||l+r.length>n)break outer;p.push(r),l+=r.length}}}}if(i=GP(i,c,p,t,n,a&&!s.post.length),!s.post.length)break;e=s.post}return i}var $ye=65536,qP=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>$ye)throw TypeError(`pattern is too long`)},ebe={"[:alnum:]":[`\\p{L}\\p{Nl}\\p{Nd}`,!0],"[:alpha:]":[`\\p{L}\\p{Nl}`,!0],"[:ascii:]":[`\\x00-\\x7f`,!1],"[:blank:]":[`\\p{Zs}\\t`,!0],"[:cntrl:]":[`\\p{Cc}`,!0],"[:digit:]":[`\\p{Nd}`,!0],"[:graph:]":[`\\p{Z}\\p{C}`,!0,!0],"[:lower:]":[`\\p{Ll}`,!0],"[:print:]":[`\\p{C}`,!0],"[:punct:]":[`\\p{P}`,!0],"[:space:]":[`\\p{Z}\\t\\r\\n\\v\\f`,!0],"[:upper:]":[`\\p{Lu}`,!0],"[:word:]":[`\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}`,!0],"[:xdigit:]":[`A-Fa-f0-9`,!1]},JP=e=>e.replace(/[[\]\\-]/g,`\\$&`),tbe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),YP=e=>e.join(``),nbe=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;WHILE:for(;a<e.length;){let t=e.charAt(a);if((t===`!`||t===`^`)&&a===n+1){l=!0,a++;continue}if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t===`\\`&&!c){c=!0,a++;continue}if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(ebe))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue WHILE}}if(c=!1,d){t>d?r.push(JP(d)+`-`+JP(t)):t===d&&r.push(JP(t)),d=``,a++;continue}if(e.startsWith(`-]`,a+1)){r.push(JP(t+`-`)),a+=2;continue}if(e.startsWith(`-`,a+1)){d=t,a+=2;continue}r.push(JP(t)),a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[tbe(r[0].length===2?r[0].slice(-1):r[0]),!1,u-n,!1];let f=`[`+(l?`^`:``)+YP(r)+`]`,p=`[`+(l?``:`^`)+YP(i)+`]`;return[r.length&&i.length?`(`+f+`|`+p+`)`:r.length?f:p,s,u-n,!0]},XP=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!0}={})=>n?t?e.replace(/\[([^/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\])\]/g,`$1$2`).replace(/\\([^/])/g,`$1`):t?e.replace(/\[([^/\\{}])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^/\\{}])\]/g,`$1$2`).replace(/\\([^/{}])/g,`$1`),ZP,rbe=new Set([`!`,`?`,`+`,`*`,`@`]),QP=e=>rbe.has(e),$P=e=>QP(e.type),ibe=new Map([[`!`,[`@`]],[`?`,[`?`,`@`]],[`@`,[`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`]]]),abe=new Map([[`!`,[`?`]],[`@`,[`?`]],[`+`,[`?`,`*`]]]),obe=new Map([[`!`,[`?`,`@`]],[`?`,[`?`,`@`]],[`@`,[`?`,`@`]],[`*`,[`*`,`+`,`?`,`@`]],[`+`,[`+`,`@`,`?`,`*`]]]),eF=new Map([[`!`,new Map([[`!`,`@`]])],[`?`,new Map([[`*`,`*`],[`+`,`*`]])],[`@`,new Map([[`!`,`!`],[`?`,`?`],[`@`,`@`],[`*`,`*`],[`+`,`+`]])],[`+`,new Map([[`?`,`*`],[`*`,`*`]])]]),sbe=`(?!(?:^|/)\\.\\.?(?:$|/))`,tF=`(?!\\.)`,cbe=new Set([`[`,`.`]),lbe=new Set([`..`,`.`]),ube=new Set(`().*{}+?[]^$\\!`),dbe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),fbe=`[^/]`,pbe=`[^/]*?`,nF=`[^/]+?`,mbe=0,rF=class{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;id=++mbe;get depth(){return(this.#i?.depth??-1)+1}[Symbol.for(`nodejs.util.inspect.custom`)](){return{"@@type":`AST`,id:this.id,type:this.type,root:this.#e.id,parent:this.#i?.id,depth:this.depth,partsLength:this.#r.length,parts:this.#r}}constructor(e,t,n={}){this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e===`!`&&!this.#e.#s&&this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.#l=this.type?this.type+`(`+this.#r.map(e=>String(e)).join(`|`)+`)`:this.#r.map(e=>String(e)).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;this.toString(),this.#s=!0;let e;for(;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(...e){for(let t of e)if(t!==``){if(typeof t!=`string`&&!(t instanceof ZP&&t.#i===this))throw Error(`invalid part: `+t);this.#r.push(t)}}toJSON(){let e=this.type===null?this.#r.slice().map(e=>typeof e==`string`?e:e.toJSON()):[this.type,...this.#r.map(e=>e.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let e=this.#i;for(let t=0;t<this.#a;t++){let n=e.#r[t];if(!(n instanceof ZP&&n.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(e){let t=new ZP(this.type,e);for(let e of this.#r)t.copyIn(e);return t}static#f(e,t,n,r,i){let a=r.maxExtglobRecursion??2,o=!1,s=!1,c=-1,l=!1;if(t.type===null){let u=n,d=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,d+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),d+=n;continue}if(n===`[`){s=!0,c=u,l=!1,d+=n;continue}if(!r.noext&&QP(n)&&e.charAt(u)===`(`&&i<=a){t.push(d),d=``;let a=new ZP(n,t);u=ZP.#f(e,a,u,r,i+1),t.push(a);continue}d+=n}return t.push(d),u}let u=n+1,d=new ZP(null,t),f=[],p=``;for(;u<e.length;){let n=e.charAt(u++);if(o||n===`\\`){o=!o,p+=n;continue}if(s){u===c+1?(n===`^`||n===`!`)&&(l=!0):n===`]`&&!(u===c+2&&l)&&(s=!1),p+=n;continue}if(n===`[`){s=!0,c=u,l=!1,p+=n;continue}if(!r.noext&&QP(n)&&e.charAt(u)===`(`&&(i<=a||t&&t.#h(n))){let a=t&&t.#h(n)?0:1;d.push(p),p=``;let o=new ZP(n,d);d.push(o),u=ZP.#f(e,o,u,r,i+a);continue}if(n===`|`){d.push(p),p=``,f.push(d),d=new ZP(null,t);continue}if(n===`)`)return p===``&&t.#r.length===0&&(t.#u=!0),d.push(p),p=``,t.push(...f,d),u;p+=n}return t.type=null,t.#t=void 0,t.#r=[e.substring(n-1)],u}#p(e){return this.#m(e,abe)}#m(e,t=ibe){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null)return!1;let n=e.#r[0];return!n||typeof n!=`object`||n.type===null?!1:this.#h(n.type,t)}#h(e,t=obe){return!!t.get(this.type)?.includes(e)}#g(e,t){let n=e.#r[0],r=new ZP(null,n,this.options);r.#r.push(``),n.push(r),this.#_(e,t)}#_(e,t){let n=e.#r[0];this.#r.splice(t,1,...n.#r);for(let e of n.#r)typeof e==`object`&&(e.#i=this);this.#l=void 0}#v(e){return!!eF.get(this.type)?.has(e)}#y(e){if(!e||typeof e!=`object`||e.type!==null||e.#r.length!==1||this.type===null||this.#r.length!==1)return!1;let t=e.#r[0];return!t||typeof t!=`object`||t.type===null?!1:this.#v(t.type)}#b(e){let t=eF.get(this.type),n=e.#r[0],r=t?.get(n.type);if(!r)return!1;this.#r=n.#r;for(let e of this.#r)typeof e==`object`&&(e.#i=this);this.type=r,this.#l=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new ZP(null,void 0,t);return ZP.#f(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(e){let t=e??!!this.#c.dot;if(this.#e===this&&(this.#x(),this.#d()),!$P(this)){let n=this.isStart()&&this.isEnd()&&!this.#r.some(e=>typeof e!=`string`),r=this.#r.map(t=>{let[r,i,a,o]=typeof t==`string`?ZP.#C(t,this.#t,n):t.toRegExpSource(e);return this.#t=this.#t||a,this.#n=this.#n||o,r}).join(``),i=``;if(this.isStart()&&typeof this.#r[0]==`string`&&!(this.#r.length===1&&lbe.has(this.#r[0]))){let n=cbe,a=t&&n.has(r.charAt(0))||r.startsWith(`\\.`)&&n.has(r.charAt(2))||r.startsWith(`\\.\\.`)&&n.has(r.charAt(4)),o=!t&&!e&&n.has(r.charAt(0));i=a?sbe:o?tF:``}let a=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(a=`(?:$|\\/)`),[i+r+a,XP(r),this.#t=!!this.#t,this.#n]}let n=this.type===`*`||this.type===`+`,r=this.type===`!`?`(?:(?!(?:`:`(?:`,i=this.#S(t);if(this.isStart()&&this.isEnd()&&!i&&this.type!==`!`){let e=this.toString(),t=this;return t.#r=[e],t.type=null,t.#t=void 0,[e,XP(this.toString()),!1,!1]}let a=!n||e||t?``:this.#S(!0);a===i&&(a=``),a&&(i=`(?:${i})(?:${a})*?`);let o=``;if(this.type===`!`&&this.#u)o=(this.isStart()&&!t?tF:``)+nF;else{let n=this.type===`!`?`))`+(this.isStart()&&!t&&!e?tF:``)+`[^/]*?)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&a?`)`:this.type===`*`&&a?`)?`:`)${this.type}`;o=r+i+n}return[o,XP(i),this.#t=!!this.#t,this.#n]}#x(){if($P(this)){let e=0,t=!1;do{t=!0;for(let e=0;e<this.#r.length;e++){let n=this.#r[e];typeof n==`object`&&(n.#x(),this.#m(n)?(t=!1,this.#_(n,e)):this.#p(n)?(t=!1,this.#g(n,e)):this.#y(n)&&(t=!1,this.#b(n)))}}while(!t&&++e<10)}else for(let e of this.#r)typeof e==`object`&&e.#x();this.#l=void 0}#S(e){return this.#r.map(t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n}).filter(e=>!(this.isStart()&&this.isEnd())||!!e).join(`|`)}static#C(e,t,n=!1){let r=!1,i=``,a=!1,o=!1;for(let s=0;s<e.length;s++){let c=e.charAt(s);if(r){r=!1,i+=(ube.has(c)?`\\`:``)+c;continue}if(c===`*`){if(o)continue;o=!0,i+=n&&/^[*]+$/.test(e)?nF:pbe,t=!0;continue}if(o=!1,c===`\\`){s===e.length-1?i+=`\\\\`:r=!0;continue}if(c===`[`){let[n,r,o,c]=nbe(e,s);if(o){i+=n,a||=r,s+=o-1,t||=c;continue}}if(c===`?`){i+=fbe,t=!0;continue}i+=dbe(c)}return[i,XP(e),!!t,a]}};ZP=rF;var hbe=(e,{windowsPathsNoEscape:t=!1,magicalBraces:n=!1}={})=>n?t?e.replace(/[?*()[\]{}]/g,`[$&]`):e.replace(/[?*()[\]\\{}]/g,`\\$&`):t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`),iF=(e,t,n={})=>(qP(t),!n.nocomment&&t.charAt(0)===`#`?!1:new pF(t,n).match(e)),gbe=/^\*+([^+@!?*[(]*)$/,_be=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),vbe=e=>t=>t.endsWith(e),ybe=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),bbe=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),xbe=/^\*+\.\*+$/,Sbe=e=>!e.startsWith(`.`)&&e.includes(`.`),Cbe=e=>e!==`.`&&e!==`..`&&e.includes(`.`),wbe=/^\.\*+$/,Tbe=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),Ebe=/^\*+$/,Dbe=e=>e.length!==0&&!e.startsWith(`.`),Obe=e=>e.length!==0&&e!==`.`&&e!==`..`,kbe=/^\?+([^+@!?*[(]*)?$/,Abe=([e,t=``])=>{let n=aF([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},jbe=([e,t=``])=>{let n=oF([e]);return t?(t=t.toLowerCase(),e=>n(e)&&e.toLowerCase().endsWith(t)):n},Mbe=([e,t=``])=>{let n=oF([e]);return t?e=>n(e)&&e.endsWith(t):n},Nbe=([e,t=``])=>{let n=aF([e]);return t?e=>n(e)&&e.endsWith(t):n},aF=([e])=>{let t=e.length;return e=>e.length===t&&!e.startsWith(`.`)},oF=([e])=>{let t=e.length;return e=>e.length===t&&e!==`.`&&e!==`..`},sF=typeof process==`object`&&process?{}.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`,cF={win32:{sep:`\\`},posix:{sep:`/`}};iF.sep=sF===`win32`?cF.win32.sep:cF.posix.sep;var lF=Symbol(`globstar **`);iF.GLOBSTAR=lF;var Pbe=`[^/]*?`,Fbe=`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`,Ibe=`(?:(?!(?:\\/|^)\\.).)*?`;iF.filter=(e,t={})=>n=>iF(n,e,t);var uF=(e,t={})=>Object.assign({},e,t);iF.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return iF;let t=iF;return Object.assign((n,r,i={})=>t(n,r,uF(e,i)),{Minimatch:class extends t.Minimatch{constructor(t,n={}){super(t,uF(e,n))}static defaults(n){return t.defaults(uF(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n,r={}){super(t,n,uF(e,r))}static fromGlob(n,r={}){return t.AST.fromGlob(n,uF(e,r))}},unescape:(n,r={})=>t.unescape(n,uF(e,r)),escape:(n,r={})=>t.escape(n,uF(e,r)),filter:(n,r={})=>t.filter(n,uF(e,r)),defaults:n=>t.defaults(uF(e,n)),makeRe:(n,r={})=>t.makeRe(n,uF(e,r)),braceExpand:(n,r={})=>t.braceExpand(n,uF(e,r)),match:(n,r,i={})=>t.match(n,r,uF(e,i)),sep:t.sep,GLOBSTAR:lF})};var dF=(e,t={})=>(qP(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:qye(e,{max:t.braceExpandMax}));iF.braceExpand=dF,iF.makeRe=(e,t={})=>new pF(e,t).makeRe(),iF.match=(e,t,n={})=>{let r=new pF(t,n);return e=e.filter(e=>r.match(e)),r.options.nonull&&!e.length&&e.push(t),e};var fF=/[?*]|[+@!]\(.*?\)|\[|\]/,Lbe=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`),pF=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){qP(e),t||={},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||sF,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!!(this.isWindows&&this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...e)=>console.error(...e)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(e=>this.slashSplit(e));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=e[0]===``&&e[1]===``&&(e[2]===`?`||!fF.test(e[2]))&&!fF.test(e[3]),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map(e=>this.parse(e))];if(n)return[e[0],...e.slice(1).map(e=>this.parse(e))]}return e.map(e=>this.parse(e))});if(this.debug(this.pattern,r),this.set=r.filter(e=>e.indexOf(!1)===-1),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t of e)for(let e=0;e<t.length;e++)t[e]===`**`&&(t[e]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e})}levelOneOptimize(e){return e.map(e=>(e=e.reduce((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)},[]),e.length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];(n!==1||r!==``||e[0]!==``)&&(r===`.`||r===``)&&(t=!0,e.splice(n,1),n--)}e[0]===`.`&&e.length===2&&(e[1]===`.`||e[1]===``)&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];(e!==1||r!==``||n[0]!==``)&&(r===`.`||r===``)&&(t=!0,n.splice(e,1),e--)}n[0]===`.`&&n.length===2&&(n[1]===`.`||n[1]===``)&&(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(e=>e.length)}partsMatch(e,t,n=!1){let r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]===`*`&&t[i]&&(this.options.dot||!t[i].startsWith(`.`))&&t[i]!==`**`){if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}else if(t[i]===`*`&&e[r]&&(this.options.dot||!e[r].startsWith(`.`))&&e[r]!==`**`){if(o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else return!1;return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,i=0;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),a=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),o=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),s=!o&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3]),c=a?3:n?0:void 0,l=s?3:o?0:void 0;if(typeof c==`number`&&typeof l==`number`){let[n,a]=[e[c],t[l]];n.toLowerCase()===a.toLowerCase()&&(t[l]=n,i=l,r=c)}}let{optimizationLevel:a=1}=this.options;return a>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(lF)?this.#e(e,t,n,r,i):this.#n(e,t,n,r,i)}#e(e,t,n,r,i){let a=t.indexOf(lF,i),o=t.lastIndexOf(lF),[s,c,l]=n?[t.slice(i,a),t.slice(a+1),[]]:[t.slice(i,a),t.slice(a+1,o),t.slice(o+1)];if(s.length){let t=e.slice(r,r+s.length);if(!this.#n(t,s,n,0,0))return!1;r+=s.length,i+=s.length}let u=0;if(l.length){if(l.length+r>e.length)return!1;let t=e.length-l.length;if(this.#n(e,l,n,t,0))u=l.length;else{if(e[e.length-1]!==``||r+l.length===e.length||(t--,!this.#n(e,l,n,t,0)))return!1;u=l.length+1}}if(!c.length){let t=!!u;for(let n=r;n<e.length-u;n++){let r=String(e[n]);if(t=!0,r===`.`||r===`..`||!this.options.dot&&r.startsWith(`.`))return!1}return n||t}let d=[[[],0]],f=d[0],p=0,m=[0];for(let e of c)e===lF?(m.push(p),f=[[],0],d.push(f)):(f[0].push(e),p++);let h=d.length-1,g=e.length-u;for(let e of d)e[1]=g-(m[h--]+e[0].length);return!!this.#t(e,d,r,0,n,0,!!u)}#t(e,t,n,r,i,a,o){let s=t[r];if(!s){for(let t=n;t<e.length;t++){o=!0;let n=e[t];if(n===`.`||n===`..`||!this.options.dot&&n.startsWith(`.`))return!1}return o}let[c,l]=s;for(;n<=l;){if(this.#n(e.slice(0,n+c.length),c,i,n,0)&&a<this.maxGlobstarRecursion){let s=this.#t(e,t,n+c.length,r+1,i,a+1,o);if(s!==!1)return s}let s=e[n];if(s===`.`||s===`..`||!this.options.dot&&s.startsWith(`.`))return!1;n++}return i||null}#n(e,t,n,r,i){let a,o,s,c;for(a=r,o=i,c=e.length,s=t.length;a<c&&o<s;a++,o++){this.debug(`matchOne loop`);let n=t[o],r=e[a];if(this.debug(t,n,r),n===!1||n===lF)return!1;let i;if(typeof n==`string`?(i=r===n,this.debug(`string match`,n,r,i)):(i=n.test(r),this.debug(`pattern match`,n,r,i)),!i)return!1}if(a===c&&o===s)return!0;if(a===c)return n;if(o===s)return a===c-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return dF(this.pattern,this.options)}parse(e){qP(e);let t=this.options;if(e===`**`)return lF;if(e===``)return``;let n,r=null;(n=e.match(Ebe))?r=t.dot?Obe:Dbe:(n=e.match(gbe))?r=(t.nocase?t.dot?bbe:ybe:t.dot?vbe:_be)(n[1]):(n=e.match(kbe))?r=(t.nocase?t.dot?jbe:Abe:t.dot?Mbe:Nbe)(n):(n=e.match(xbe))?r=t.dot?Cbe:Sbe:(n=e.match(wbe))&&(r=Tbe);let i=rF.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,"test",{value:r}),i}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?Pbe:t.dot?Fbe:Ibe,r=new Set(t.nocase?[`i`]:[]),i=e.map(e=>{let t=e.map(e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?Lbe(e):e===lF?lF:e._src});t.forEach((e,r)=>{let i=t[r+1],a=t[r-1];e===lF&&a!==lF&&(a===void 0?i!==void 0&&i!==lF?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|\\/`+n+`)?`:i!==lF&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=lF))});let i=t.filter(e=>e!==lF);if(this.partial&&i.length>=1){let e=[];for(let t=1;t<=i.length;t++)e.push(i.slice(0,t).join(`/`));return`(?:`+e.join(`|`)+`)`}return i.join(`/`)}).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.partial&&(i=`^(?:\\/|`+a+i.slice(1,-1)+o+`)$`),this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].join(``))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split(`/`):this.isWindows&&/^\/\/[^/]+/.test(e)?[``,...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug(`match`,e,this.pattern),this.comment)return!1;if(this.empty)return e===``;if(e===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e of i){let i=r;if(n.matchBase&&e.length===1&&(i=[a]),this.matchOne(i,e,t))return n.flipNegate?!0:!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return iF.defaults(e).Minimatch}};iF.AST=rF,iF.Minimatch=pF,iF.escape=hbe,iF.unescape=XP;var mF=4,hF=0,gF=1,Rbe=2;function _F(e){let t=e.length;for(;--t>=0;)e[t]=0}var vF=29,yF=256,bF=286,xF=30,SF=19,CF=573,wF=15,TF=16,zbe=7,EF=256,Bbe=16,Vbe=17,Hbe=18,DF=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),OF=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Ube=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),kF=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Wbe=512,AF=Array(576);_F(AF);var jF=Array(xF*2);_F(jF);var MF=Array(Wbe);_F(MF);var NF=Array(256);_F(NF);var PF=Array(vF);_F(PF);var FF=Array(xF);_F(FF);var IF=class{constructor(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}},LF,RF,zF,BF=class{constructor(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}},VF=e=>e<256?MF[e]:MF[256+(e>>>7)],HF=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},UF=(e,t,n)=>{e.bi_valid>TF-n?(e.bi_buf|=t<<e.bi_valid&65535,HF(e,e.bi_buf),e.bi_buf=t>>TF-e.bi_valid,e.bi_valid+=n-TF):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},WF=(e,t,n)=>{UF(e,n[t*2],n[t*2+1])},GF=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},Gbe=e=>{e.bi_valid===16?(HF(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},Kbe=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=wF;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<CF;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},KF=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=wF;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=GF(r[t]++,t))}},qbe=()=>{let e,t,n,r,i,a=Array(16);for(n=0,r=0;r<vF-1;r++)for(PF[r]=n,e=0;e<1<<DF[r];e++)NF[n++]=r;for(NF[n-1]=r,i=0,r=0;r<16;r++)for(FF[r]=i,e=0;e<1<<OF[r];e++)MF[i++]=r;for(i>>=7;r<xF;r++)for(FF[r]=i<<7,e=0;e<1<<OF[r]-7;e++)MF[256+i++]=r;for(t=0;t<=wF;t++)a[t]=0;for(e=0;e<=143;)AF[e*2+1]=8,e++,a[8]++;for(;e<=255;)AF[e*2+1]=9,e++,a[9]++;for(;e<=279;)AF[e*2+1]=7,e++,a[7]++;for(;e<=287;)AF[e*2+1]=8,e++,a[8]++;for(KF(AF,287,a),e=0;e<xF;e++)jF[e*2+1]=5,jF[e*2]=GF(e,5);LF=new IF(AF,DF,257,bF,wF),RF=new IF(jF,OF,0,xF,wF),zF=new IF([],Ube,0,SF,zbe)},qF=e=>{let t;for(t=0;t<bF;t++)e.dyn_ltree[t*2]=0;for(t=0;t<xF;t++)e.dyn_dtree[t*2]=0;for(t=0;t<SF;t++)e.bl_tree[t*2]=0;e.dyn_ltree[EF*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},JF=e=>{e.bi_valid>8?HF(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},YF=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},XF=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&YF(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!YF(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},ZF=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?WF(e,i,t):(o=NF[i],WF(e,o+yF+1,t),s=DF[o],s!==0&&(i-=PF[o],UF(e,i,s)),r--,o=VF(r),WF(e,o,n),s=OF[o],s!==0&&(r-=FF[o],UF(e,r,s)));while(a<e.sym_next);WF(e,EF,t)},QF=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=CF,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)XF(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],XF(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,XF(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Kbe(e,t),KF(n,c,e.bl_count)},$F=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},eI=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do WF(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(WF(e,Vbe,e.bl_tree),UF(e,s-3,3)):(WF(e,Hbe,e.bl_tree),UF(e,s-11,7)):(a!==i&&(WF(e,a,e.bl_tree),s--),WF(e,Bbe,e.bl_tree),UF(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},Jbe=e=>{let t;for($F(e,e.dyn_ltree,e.l_desc.max_code),$F(e,e.dyn_dtree,e.d_desc.max_code),QF(e,e.bl_desc),t=18;t>=3&&e.bl_tree[kF[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},Ybe=(e,t,n,r)=>{let i;for(UF(e,t-257,5),UF(e,n-1,5),UF(e,r-4,4),i=0;i<r;i++)UF(e,e.bl_tree[kF[i]*2+1],3);eI(e,e.dyn_ltree,t-1),eI(e,e.dyn_dtree,n-1)},Xbe=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return hF;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return gF;for(n=32;n<yF;n++)if(e.dyn_ltree[n*2]!==0)return gF;return hF},Zbe=!1,Qbe=e=>{Zbe||=(qbe(),!0),e.l_desc=new BF(e.dyn_ltree,LF),e.d_desc=new BF(e.dyn_dtree,RF),e.bl_desc=new BF(e.bl_tree,zF),e.bi_buf=0,e.bi_valid=0,qF(e)},tI=(e,t,n,r)=>{UF(e,0+ +!!r,3),JF(e),HF(e,n),HF(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},$be=e=>{UF(e,2,3),WF(e,EF,AF),Gbe(e)},exe=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===Rbe&&(e.strm.data_type=Xbe(e)),QF(e,e.l_desc),QF(e,e.d_desc),o=Jbe(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,(a<=i||e.strategy===mF)&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?tI(e,t,n,r):e.strategy===mF||a===i?(UF(e,2+ +!!r,3),ZF(e,AF,jF)):(UF(e,4+ +!!r,3),Ybe(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),ZF(e,e.dyn_ltree,e.dyn_dtree)),qF(e),r&&JF(e)},nI=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(NF[n]+yF+1)*2]++,e.dyn_dtree[VF(t)*2]++),e.sym_next===e.sym_end),rI=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0},txe=(()=>{let e=new Uint32Array(2048),t;for(let n=0;n<256;n++){t=n;for(let e=0;e<8;e++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}for(let n=0;n<256;n++){t=e[n];for(let r=256;r<2048;r+=256)t=e[t&255]^t>>>8,e[r+n]=t}return e})(),iI=(e,t,n,r)=>{let i=txe,a=r+n,o=r;e^=-1;for(let n=a-7;o<n;o+=8)e^=t[o]|t[o+1]<<8|t[o+2]<<16|t[o+3]<<24,e=i[1792+(e&255)]^i[1536+(e>>>8&255)]^i[1280+(e>>>16&255)]^i[1024+(e>>>24)]^i[768+t[o+4]]^i[512+t[o+5]]^i[256+t[o+6]]^i[t[o+7]];for(;o<a;o++)e=e>>>8^i[(e^t[o])&255];return e^-1},aI={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`},nxe=9,rxe=573,oI=3,sI=258,cI=262,ixe=32,lI=42,uI=57,dI=69,fI=73,pI=91,mI=103,hI=113,gI=666,_I=1,vI=2,yI=3,bI=4,axe=3,xI=(e,t)=>(e.msg=aI[t],t),SI=e=>e*2-(e>4?9:0),CI=e=>{let t=e.length;for(;--t>=0;)e[t]=0},oxe=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},wI=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,TI=(e,t)=>{let n;if(e.legacy_hash)n=e.ins_h=wI(e,e.ins_h,e.window[t+oI-1]);else{let r=e.window,i=r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24;n=e.ins_h=Math.imul(i,66521)+66521>>>16&e.hash_mask}let r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},EI=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},DI=(e,t)=>{exe(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,EI(e.strm)},OI=(e,t)=>{e.pending_buf[e.pending++]=t},kI=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},AI=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=rI(e.adler,t,i,n):e.state.wrap===2&&(e.adler=iI(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},jI=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-cI?e.strstart-(e.w_size-cI):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+sI,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,l[i+o]===m&&l[i+o-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=sI-(f-r),r=f-sI,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},MI=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-cI)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),oxe(e),r+=t),e.strm.avail_in===0)break;if(n=AI(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,!e.legacy_hash){if(e.lookahead+e.insert>oI)for(i=e.strstart-e.insert;e.insert&&(TI(e,i),i++,e.insert--,!(e.lookahead+e.insert<=oI)););}else if(e.lookahead+e.insert>=oI)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=wI(e,e.ins_h,e.window[i+1]);e.insert&&(TI(e,i),i++,e.insert--,!(e.lookahead+e.insert<oI)););}while(e.lookahead<cI&&e.strm.avail_in!==0)},NI=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==4||t===0||r!==i+e.strm.avail_in)))break;o=+(t===4&&r===i+e.strm.avail_in),tI(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,EI(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(AI(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?bI:t!==0&&t!==4&&e.strm.avail_in===0&&e.strstart===e.block_start?vI:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(AI(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===4)&&t!==0&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===4&&e.strm.avail_in===0&&r===i),tI(e,e.block_start,r,o),e.block_start+=r,EI(e.strm)),o?yI:_I)},PI=(e,t)=>{let n,r;for(;;){if(e.lookahead<cI){if(MI(e),e.lookahead<cI&&t===0)return _I;if(e.lookahead===0)break}if(n=0,e.lookahead>=oI&&(n=TI(e,e.strstart)),n!==0&&e.strstart-n<=e.w_size-cI&&(e.match_length=jI(e,n)),e.match_length>=oI){if(r=nI(e,e.strstart-e.match_start,e.match_length-oI),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=oI){e.match_length--;do e.strstart++,n=TI(e,e.strstart);while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=wI(e,e.ins_h,e.window[e.strstart+1]))}else r=nI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(DI(e,!1),e.strm.avail_out===0))return _I}return e.insert=e.strstart<oI-1?e.strstart:oI-1,t===4?(DI(e,!0),e.strm.avail_out===0?yI:bI):e.sym_next&&(DI(e,!1),e.strm.avail_out===0)?_I:vI},FI=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<cI){if(MI(e),e.lookahead<cI&&t===0)return _I;if(e.lookahead===0)break}if(n=0,e.lookahead>=oI&&(n=TI(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=oI-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-cI&&(e.match_length=jI(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===oI&&e.strstart-e.match_start>4096)&&(e.match_length=oI-1)),e.prev_length>=oI&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-oI,r=nI(e,e.strstart-1-e.prev_match,e.prev_length-oI),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(n=TI(e,e.strstart));while(--e.prev_length!==0);if(e.match_available=0,e.match_length=oI-1,e.strstart++,r&&(DI(e,!1),e.strm.avail_out===0))return _I}else if(e.match_available){if(r=nI(e,0,e.window[e.strstart-1]),r&&DI(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return _I}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=nI(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<oI-1?e.strstart:oI-1,t===4?(DI(e,!0),e.strm.avail_out===0?yI:bI):e.sym_next&&(DI(e,!1),e.strm.avail_out===0)?_I:vI},sxe=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=sI){if(MI(e),e.lookahead<=sI&&t===0)return _I;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=oI&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+sI;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=sI-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=oI?(n=nI(e,1,e.match_length-oI),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=nI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(DI(e,!1),e.strm.avail_out===0))return _I}return e.insert=0,t===4?(DI(e,!0),e.strm.avail_out===0?yI:bI):e.sym_next&&(DI(e,!1),e.strm.avail_out===0)?_I:vI},cxe=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(MI(e),e.lookahead===0)){if(t===0)return _I;break}if(e.match_length=0,n=nI(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(DI(e,!1),e.strm.avail_out===0))return _I}return e.insert=0,t===4?(DI(e,!0),e.strm.avail_out===0?yI:bI):e.sym_next&&(DI(e,!1),e.strm.avail_out===0)?_I:vI},II=class{constructor(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}},LI=[new II(0,0,0,0,NI),new II(4,4,8,4,PI),new II(4,5,16,8,PI),new II(4,6,32,32,PI),new II(4,4,16,16,FI),new II(8,16,32,32,FI),new II(8,16,128,128,FI),new II(8,32,128,256,FI),new II(32,128,258,1024,FI),new II(32,258,258,4096,FI)],lxe=e=>{e.window_size=2*e.w_size,CI(e.head),e.max_lazy_match=LI[e.level].max_lazy,e.good_match=LI[e.level].good_length,e.nice_match=LI[e.level].nice_length,e.max_chain_length=LI[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=oI-1,e.match_available=0,e.ins_h=0},uxe=class{constructor(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(rxe*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),CI(this.dyn_ltree),CI(this.dyn_dtree),CI(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),CI(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),CI(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}},RI=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.status!==lI&&t.status!==uI&&t.status!==dI&&t.status!==fI&&t.status!==pI&&t.status!==mI&&t.status!==hI&&t.status!==gI)},dxe=e=>{if(RI(e))return xI(e,-2);e.total_in=e.total_out=0,e.data_type=2;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?uI:t.wrap?lI:hI,e.adler=t.wrap===2?0:1,t.last_flush=-2,Qbe(t),0},fxe=e=>{let t=dxe(e);return t===0&&lxe(e.state),t},pxe=(e,t,n,r,i,a,o)=>{if(!e)return-2;let s=1;if(t===-1&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),i<1||i>nxe||n!==8||r<8||r>15||t<0||t>9||a<0||a>4||r===8&&s!==1)return xI(e,-2);r===8&&(r=9);let c=new uxe;return e.state=c,c.strm=e,c.status=lI,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.legacy_hash=+!!o,c.hash_bits=i+7,!c.legacy_hash&&c.hash_bits<15&&(c.hash_bits=15),c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+oI-1)/oI),c.window=new Uint8Array(c.w_size*2),c.head=new Uint16Array(c.hash_size),c.prev=new Uint16Array(c.w_size),c.lit_bufsize=1<<i+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new Uint8Array(c.pending_buf_size),c.sym_buf=c.lit_bufsize,c.sym_end=(c.lit_bufsize-1)*3,c.level=t,c.strategy=a,c.method=n,fxe(e)},mxe=(e,t)=>{if(RI(e)||t>5||t<0)return e?xI(e,-2):-2;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===gI&&t!==4)return xI(e,e.avail_out===0?-5:-2);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(EI(e),e.avail_out===0)return n.last_flush=-1,0}else if(e.avail_in===0&&SI(t)<=SI(r)&&t!==4)return xI(e,-5);if(n.status===gI&&e.avail_in!==0)return xI(e,-5);if(n.status===lI&&n.wrap===0&&(n.status=hI),n.status===lI){let t=8+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=2||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=ixe),t+=31-t%31,kI(n,t),n.strstart!==0&&(kI(n,e.adler>>>16),kI(n,e.adler&65535)),e.adler=1,n.status=hI,EI(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===uI){if(e.adler=0,OI(n,31),OI(n,139),OI(n,8),n.gzhead)OI(n,+!!n.gzhead.text+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),OI(n,n.gzhead.time&255),OI(n,n.gzhead.time>>8&255),OI(n,n.gzhead.time>>16&255),OI(n,n.gzhead.time>>24&255),OI(n,n.level===9?2:n.strategy>=2||n.level<2?4:0),OI(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(OI(n,n.gzhead.extra.length&255),OI(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=iI(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=dI;else if(OI(n,0),OI(n,0),OI(n,0),OI(n,0),OI(n,0),OI(n,n.level===9?2:n.strategy>=2||n.level<2?4:0),OI(n,axe),n.status=hI,EI(e),n.pending!==0)return n.last_flush=-1,0}if(n.status===dI){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=iI(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,EI(e),n.pending!==0)return n.last_flush=-1,0;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=iI(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=fI}if(n.status===fI){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=iI(e.adler,n.pending_buf,n.pending-t,t)),EI(e),n.pending!==0)return n.last_flush=-1,0;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,OI(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=iI(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=pI}if(n.status===pI){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=iI(e.adler,n.pending_buf,n.pending-t,t)),EI(e),n.pending!==0)return n.last_flush=-1,0;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,OI(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=iI(e.adler,n.pending_buf,n.pending-t,t))}n.status=mI}if(n.status===mI){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(EI(e),n.pending!==0))return n.last_flush=-1,0;OI(n,e.adler&255),OI(n,e.adler>>8&255),e.adler=0}if(n.status=hI,EI(e),n.pending!==0)return n.last_flush=-1,0}if(e.avail_in!==0||n.lookahead!==0||t!==0&&n.status!==gI){let r=n.level===0?NI(n,t):n.strategy===2?cxe(n,t):n.strategy===3?sxe(n,t):LI[n.level].func(n,t);if((r===yI||r===bI)&&(n.status=gI),r===_I||r===yI)return e.avail_out===0&&(n.last_flush=-1),0;if(r===vI&&(t===1?$be(n):t!==5&&(tI(n,0,0,!1),t===3&&(CI(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),EI(e),e.avail_out===0))return n.last_flush=-1,0}return t===4?n.wrap<=0?1:(n.wrap===2?(OI(n,e.adler&255),OI(n,e.adler>>8&255),OI(n,e.adler>>16&255),OI(n,e.adler>>24&255),OI(n,e.total_in&255),OI(n,e.total_in>>8&255),OI(n,e.total_in>>16&255),OI(n,e.total_in>>24&255)):(kI(n,e.adler>>>16),kI(n,e.adler&65535)),EI(e),n.wrap>0&&(n.wrap=-n.wrap),+(n.pending===0)):0},hxe=e=>{if(RI(e))return-2;let t=e.state.status;return e.state=null,t===hI?xI(e,-3):0},gxe=(e,t)=>{let n=t.length;if(RI(e))return-2;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==lI||r.lookahead)return-2;if(i===1&&(e.adler=rI(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(CI(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,MI(r);r.lookahead>=oI;){let e=r.strstart,t=r.lookahead-(oI-1);do TI(r,e),e++;while(--t);r.strstart=e,r.lookahead=oI-1,MI(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=oI-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,0},zI=16209,_xe=16191;function vxe(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=E.dmax,c=E.wsize,l=E.whave,u=E.wnext,d=E.window,f=E.hold,p=E.bits,m=E.lencode,h=E.distcode,g=(1<<E.lenbits)-1,_=(1<<E.distbits)-1;top:do{p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=m[f&g];dolen:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y===0)T[i++]=v&65535;else if(y&16){b=v&65535,y&=15,y&&(p<y&&(f+=w[n++]<<p,p+=8),b+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=h[f&_];dodist:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y&16){if(x=v&65535,y&=15,p<y&&(f+=w[n++]<<p,p+=8,p<y&&(f+=w[n++]<<p,p+=8)),x+=f&(1<<y)-1,x>s){e.msg=`invalid distance too far back`,E.mode=zI;break top}if(f>>>=y,p-=y,y=i-a,x>y){if(y=x-y,y>l&&E.sane){e.msg=`invalid distance too far back`,E.mode=zI;break top}if(S=0,C=d,u===0){if(S+=c-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}else if(u<y){if(S+=c+u-y,y-=u,y<b){b-=y;do T[i++]=d[S++];while(--y);if(S=0,u<b){y=u,b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}}else if(S+=u-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}for(;b>2;)T[i++]=C[S++],T[i++]=C[S++],T[i++]=C[S++],b-=3;b&&(T[i++]=C[S++],b>1&&(T[i++]=C[S++]))}else{S=i-x;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}}else if(y&64){e.msg=`invalid distance code`,E.mode=zI;break top}else{v=h[(v&65535)+(f&(1<<y)-1)];continue dodist}break}}else if(!(y&64)){v=m[(v&65535)+(f&(1<<y)-1)];continue dolen}else if(y&32){E.mode=_xe;break top}else{e.msg=`invalid literal/length code`,E.mode=zI;break top}break}}while(n<r&&i<o);b=p>>3,n-=b,p-=b<<3,f&=(1<<p)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?5+(r-n):5-(n-r),e.avail_out=i<o?257+(o-i):257-(i-o),E.hold=f,E.bits=p}var BI=15,VI=852,HI=592,UI=0,WI=1,GI=2,yxe=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),bxe=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),xxe=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Sxe=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),KI=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,k,A,j;for(l=0;l<=BI;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=BI;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=BI;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===UI||f!==1))return-1;for(D[1]=0,l=1;l<BI;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===UI?(w=O=o,T=20):e===WI?(w=yxe,O=bxe,T=257):(w=xxe,O=Sxe,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===WI&&_>VI||e===GI&&_>HI)return 1;for(;;){k=l-h,o[u]+1<T?(A=0,j=o[u]):o[u]>=T?(A=O[o[u]-T],j=w[o[u]-T]):(A=96,j=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=k<<24|A<<16|j|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===WI&&_>VI||e===GI&&_>HI)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0},Cxe=0,qI=1,JI=2,YI=16180,XI=16181,ZI=16182,QI=16183,$I=16184,eL=16185,tL=16186,nL=16187,rL=16188,iL=16189,aL=16190,oL=16191,sL=16192,cL=16193,lL=16194,uL=16195,dL=16196,fL=16197,pL=16198,mL=16199,hL=16200,gL=16201,_L=16202,vL=16203,yL=16204,bL=16205,xL=16206,SL=16207,CL=16208,wL=16209,TL=16210,EL=16211,wxe=852,Txe=592,DL=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24),Exe=class{constructor(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}},OL=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.mode<YI||t.mode>EL)},Dxe=e=>{if(OL(e))return-2;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=t.wrap&1),t.mode=YI,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(wxe),t.distcode=t.distdyn=new Int32Array(Txe),t.sane=1,t.back=-1,0},kL=e=>{if(OL(e))return-2;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Dxe(e)},Oxe=(e,t)=>{let n;if(OL(e))return-2;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?-2:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,kL(e))},kxe=(e,t)=>{if(!e)return-2;let n=new Exe;e.state=n,n.strm=e,n.window=null,n.mode=YI;let r=Oxe(e,t);return r!==0&&(e.state=null),r},AL=!0,jL,ML,Axe=e=>{if(AL){jL=new Int32Array(512),ML=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(KI(qI,e.lens,0,288,jL,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;KI(JI,e.lens,0,32,ML,0,e.work,{bits:5}),AL=!1}e.lencode=jL,e.lenbits=9,e.distcode=ML,e.distbits=5},NL=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.window=new Uint8Array(1<<a.wbits)),a.wsize===0&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},PL=(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(OL(e)||!e.output||!e.input&&e.avail_in!==0)return-2;n=e.state,n.mode===oL&&(n.mode=sL),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=0;inf_leave:for(;;)switch(n.mode){case YI:if(n.wrap===0){n.mode=sL;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=iI(n.check,T,2,0),l=0,u=0,n.mode=XI;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=wL;break}if((l&15)!=8){e.msg=`unknown compression method`,n.mode=wL;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=wL;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?iL:oL,l=0,u=0;break;case XI:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!=8){e.msg=`unknown compression method`,n.mode=wL;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=wL;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=iI(n.check,T,2,0)),l=0,u=0,n.mode=ZI;case ZI:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l>>>0),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=iI(n.check,T,4,0)),l=0,u=0,n.mode=QI;case QI:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=iI(n.check,T,2,0)),l=0,u=0,n.mode=$I;case $I:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=iI(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=eL;case eL:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=iI(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=tL;case tL:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C),n.length++);while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=iI(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=nL;case nL:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C),n.length++);while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=iI(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=rL;case rL:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=wL;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=oL;break;case iL:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=DL(l),l=0,u=0,n.mode=aL;case aL:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,2;e.adler=n.check=1,n.mode=oL;case oL:if(t===5||t===6)break inf_leave;case sL:if(n.last){l>>>=u&7,u-=u&7,n.mode=xL;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=cL;break;case 1:if(Axe(n),n.mode=mL,t===6){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=dL;break;case 3:e.msg=`invalid block type`,n.mode=wL}l>>>=2,u-=2;break;case cL:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=wL;break}if(n.length=l&65535,l=0,u=0,n.mode=lL,t===6)break inf_leave;case lL:n.mode=uL;case uL:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=oL;break;case dL:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=wL;break}n.have=0,n.mode=fL;case fL:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=KI(Cxe,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=wL;break}n.have=0,n.mode=pL;case pL:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=wL;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=wL;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===wL)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=wL;break}if(n.lenbits=9,E={bits:n.lenbits},w=KI(qI,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=wL;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=KI(JI,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=wL;break}if(n.mode=mL,t===6)break inf_leave;case mL:n.mode=hL;case hL:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,vxe(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===oL&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=bL;break}if(v&32){n.back=-1,n.mode=oL;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=wL;break}n.extra=v&15,n.mode=gL;case gL:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=_L;case _L:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=wL;break}n.offset=y,n.extra=v&15,n.mode=vL;case vL:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=wL;break}n.mode=yL;case yL:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=wL;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=hL);break;case bL:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=hL;break;case xL:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?iI(n.check,i,f,o-f):rI(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:DL(l))!==n.check){e.msg=`incorrect data check`,n.mode=wL;break}l=0,u=0}n.mode=SL;case SL:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=wL;break}l=0,u=0}n.mode=CL;case CL:w=1;break inf_leave;case wL:w=-3;break inf_leave;case TL:return-4;case EL:default:return-2}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<wL&&(n.mode<xL||t!==4))&&NL(e,e.output,e.next_out,f-e.avail_out)?(n.mode=TL,-4):(d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?iI(n.check,i,f,e.next_out-f):rI(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===oL?128:0)+(n.mode===mL||n.mode===lL?256:0),(d===0&&f===0||t===4)&&w===0&&(w=-5),w)},FL=e=>{if(OL(e))return-2;let t=e.state;return t.window&&=null,e.state=null,0},IL=(e,t)=>{let n=t.length,r,i,a;return OL(e)||(r=e.state,r.wrap!==0&&r.mode!==aL)?-2:r.mode===aL&&(i=1,i=rI(i,t,n,0),i!==r.check)?-3:(a=NL(e,t,n,n),a?(r.mode=TL,-4):(r.havedict=1,0))},LL=class{constructor(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},RL=e=>{let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),n=0;for(let r of e)t.set(r,n),n+=r.length;return t},zL=Object.prototype.toString,jxe={level:-1,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,raw:!1,gzip:!1,legacyHash:!1,dictionary:new Uint8Array},Mxe=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},jxe,e);let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.started=!1,this.chunks=[],this.result=new Uint8Array,this.strm=new LL,this.strm.avail_out=0;let n=pxe(this.strm,t.level,8,t.windowBits,t.memLevel,t.strategy,t.legacyHash);if(n!==0)throw Error(aI[n]);zL.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(r.length){if(t.gzip)throw Error(`dictionary is not supported with gzip`);if(n=gxe(this.strm,r),n!==0)throw Error(aI[n])}}push(e,t=!1){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=typeof t==`number`?t:t===!0?4:0,n.input=typeof e==`string`?new TextEncoder().encode(e):zL.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length,this.started||(this.started=!0,this.onStart(n));;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===2||a===3)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=mxe(n,a),i===-2)break;if(i===1){n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=hxe(this.strm);break}if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)return!0}return this.err=i,this.msg=n.msg||aI[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=RL(this.chunks)),this.chunks=[]}},BL=Object.prototype.toString,Nxe={chunkSize:65536,windowBits:15,raw:!1,dictionary:new Uint8Array},Pxe=class{options;err;msg;ended;started;chunks;strm;result;constructor(e={}){this.options=Object.assign({},Nxe,e);let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!e.windowBits&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.started=!1,this.chunks=[],this.result=new Uint8Array,this.strm=new LL,this.strm.avail_out=0;let n=kxe(this.strm,t.windowBits);if(n!==0)throw Error(aI[n]);BL.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary));let r=t.dictionary;if(t.raw&&r.length&&(n=IL(this.strm,r),n!==0))throw Error(aI[n])}push(e,t=!1){let n=this.strm,r=this.options.chunkSize,i,a,o;if(this.ended)return this.err===0;for(a=typeof t==`number`?t:t===!0?4:0,n.input=BL.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length,this.started||(this.started=!0,this.onStart(n));;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=PL(n,a),i===2){let e=this.options.dictionary;e.length&&(i=IL(n,e),i===0?i=PL(n,a):i===-3&&(i=2))}for(;n.avail_in>0&&i===1&&n.state.wrap&2&&n.state.flags!==0&&n.input[n.next_in]!==0;)kL(n),i=PL(n,a);if(i===-2||i===-3||i===2||i===-4)break;if(o=n.avail_out,n.next_out&&(n.avail_out===0||i===1||a>0)&&(this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out)),n.avail_out=0,n.next_out=0),i!==0&&i!==-5||o!==0){if(i===1){i=FL(this.strm);break}if(n.avail_in===0){if(a===4){i=FL(this.strm),i===0&&(i=-5);break}return!0}}}return this.err=i,this.msg=n.msg||aI[i],this.ended=!0,this.onEnd(i),i===0}onStart(e){}onData(e){this.chunks.push(e)}onEnd(e){e===0&&(this.result=RL(this.chunks)),this.chunks=[]}};function VL(e,t,n){let r=0,i=e.onData;if(e.onData=function(e){if(e.byteLength>n-r)throw Error(`gzip output exceeds limit (${n} bytes)`);r+=e.byteLength,i.call(this,e)},!e.push(t,!0)||e.err||e.result===void 0)throw Error(e.msg||`Invalid or incomplete gzip stream`);return e.result}function HL(e){if(!Number.isSafeInteger(e)||e<=0)throw Error(`gzip output limit must be a positive safe integer`);return Math.min(e,65536)}function UL(e,t){return VL(new Pxe({windowBits:31,chunkSize:HL(t)}),e,t)}function Fxe(e,t,n){return VL(new Mxe({gzip:!0,level:n,chunkSize:HL(t)}),e,t)}var WL=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends WL{};function GL(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function KL(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function qL(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function JL(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function YL(e,t){return qL(e,t,``)}function XL(e,t){return JL(e,t,``)}function ZL(e,t){return t.slice(0,Ixe(e,t))}function Ixe(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function QL(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function $L(e,t){if(t)return tR(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function eR(e,t){if(t)return tR(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function tR(e,t){if(!t)return[eR(e),$L(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=QL(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var nR=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,Lxe=RegExp(`[${nR}]+|\\s+|[^${nR}]`,`ug`);new class extends WL{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=QL(e,r)}else n=e.match(Lxe)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&rR(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&rR(n,i,r,null,t.intlSegmenter),e}};function rR(e,t,n,r,i){if(t&&n){let[a,o]=tR(t.value,i),[s,c]=tR(n.value,i);if(e){let r=GL(a,s);e.value=JL(e.value,s,r),t.value=YL(t.value,r),n.value=YL(n.value,r)}if(r){let e=KL(o,c);r.value=qL(r.value,c,e),t.value=XL(t.value,e),n.value=XL(n.value,e)}}else if(n){if(e){let e=eR(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=eR(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=eR(r.value,i),[a,o]=tR(t.value,i),s=GL(n,a);t.value=YL(t.value,s);let c=KL(YL(n,s),o);t.value=XL(t.value,c),r.value=qL(r.value,n,c),e.value=JL(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=eR(r.value,i),n=ZL($L(t.value,i),e);t.value=XL(t.value,n)}else if(e){let n=ZL($L(e.value,i),eR(t.value,i));t.value=YL(t.value,n)}}new class extends WL{tokenize(e){let t=RegExp(`(\\r?\\n)|[${nR}]+|[^\\S\\n\\r]+|[^${nR}]`,`ug`);return e.match(t)||[]}};var Rxe=new class extends WL{constructor(){super(...arguments),this.tokenize=aR}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
97
97
  `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
98
98
  `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`