intlayer-editor 9.6.0 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/intlayer-editor.mjs +26 -6
- package/client/dist/assets/CodeBlockShiki-B-OcGOY1.js +2 -0
- package/client/dist/assets/MarkDownRender-BzY_8i9Z.js +1 -0
- package/client/dist/assets/MarkDownRender-CIkPpFUW.js +25 -0
- package/client/dist/assets/MarkdownEditor-BpbsoP4E.js +161 -0
- package/client/dist/assets/{astro-JHDYjn39.js → astro-BZ97kZFP.js} +1 -1
- package/client/dist/assets/codeTransformer-aP9a_qk2.js +9 -0
- package/client/dist/assets/compat-r4Owm_RW.js +1 -0
- package/client/dist/assets/css-BGIxQoYs.js +1 -0
- package/client/dist/assets/css-DUjzNfgv.js +1 -0
- package/client/dist/assets/dist-DRjLHkdX.js +11 -0
- package/client/dist/assets/extractUrlFromSitemap-Chj1JVpo.js +1 -0
- package/client/dist/assets/{html-B2cKP6UN.js → html-DSw1lh5G.js} +1 -1
- package/client/dist/assets/html-WQKKblVZ.js +1 -0
- package/client/dist/assets/index-C5SpC4ap.css +2 -0
- package/client/dist/assets/index-CmQV7Z_A.js +105 -0
- package/client/dist/assets/shikiBundle-BIG1bVgc.js +12 -0
- package/client/dist/assets/{svelte-tEuLYt3E.js → svelte-CdeT-Ich.js} +1 -1
- package/client/dist/assets/{vue-Bg0byEaI.js → vue-BqdMUtqy.js} +1 -1
- package/client/dist/index.html +3 -6
- package/package.json +27 -27
- package/server/dist/controllers/auth.controller.cjs +80 -0
- package/server/dist/controllers/auth.controller.cjs.map +1 -0
- package/server/dist/controllers/auth.controller.d.ts +36 -0
- package/server/dist/controllers/auth.controller.mjs +76 -0
- package/server/dist/controllers/auth.controller.mjs.map +1 -0
- package/server/dist/controllers/configuration.controller.cjs +5 -1
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/configuration.controller.mjs +5 -1
- package/server/dist/controllers/configuration.controller.mjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.cjs +2 -1
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.mjs +2 -1
- package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
- package/server/dist/index.cjs +41 -13
- package/server/dist/index.cjs.map +1 -1
- package/server/dist/index.mjs +45 -17
- package/server/dist/index.mjs.map +1 -1
- package/server/dist/routes/auth.routes.cjs +35 -0
- package/server/dist/routes/auth.routes.cjs.map +1 -0
- package/server/dist/routes/auth.routes.d.ts +22 -0
- package/server/dist/routes/auth.routes.mjs +33 -0
- package/server/dist/routes/auth.routes.mjs.map +1 -0
- package/server/dist/services/editorAuth.service.cjs +143 -0
- package/server/dist/services/editorAuth.service.cjs.map +1 -0
- package/server/dist/services/editorAuth.service.d.ts +43 -0
- package/server/dist/services/editorAuth.service.mjs +137 -0
- package/server/dist/services/editorAuth.service.mjs.map +1 -0
- package/server/dist/utils/checkPortAvailability.cjs +38 -12
- package/server/dist/utils/checkPortAvailability.cjs.map +1 -1
- package/server/dist/utils/checkPortAvailability.d.ts +14 -1
- package/server/dist/utils/checkPortAvailability.mjs +38 -13
- package/server/dist/utils/checkPortAvailability.mjs.map +1 -1
- package/client/dist/assets/CodeBlockShiki-DtgHBhf-.js +0 -2
- package/client/dist/assets/MarkDownRender-B5rc5xdv.js +0 -25
- package/client/dist/assets/MarkDownRender-BJfBvDXr.js +0 -1
- package/client/dist/assets/MarkdownEditor-CKaCMWJN.js +0 -160
- package/client/dist/assets/codeTransformer-DVPQQcdP.js +0 -9
- package/client/dist/assets/css-CdtkT07m.js +0 -1
- package/client/dist/assets/css-LbU1hoFO.js +0 -1
- package/client/dist/assets/dist-BHukwvnD.js +0 -11
- package/client/dist/assets/dist-CcmWBeAo.js +0 -1
- package/client/dist/assets/dynamic-BG2syiTL.js +0 -41
- package/client/dist/assets/html-DYtkB_T1.js +0 -1
- package/client/dist/assets/index-BtBJMAbp.js +0 -59
- package/client/dist/assets/index-D82ZIHVs.css +0 -2
- package/client/dist/assets/react-Cvdyeg_0.js +0 -1
- package/client/dist/assets/rolldown-runtime-hePW80VL.js +0 -1
- package/client/dist/assets/shikiBundle-vOk0aVqf.js +0 -12
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-BzY_8i9Z.js","assets/MarkDownRender-CIkPpFUW.js","assets/compat-r4Owm_RW.js","assets/MarkdownEditor-BpbsoP4E.js","assets/shikiBundle-BIG1bVgc.js","assets/dist-DRjLHkdX.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{A as e,B as t,C as n,D as r,E as i,F as a,L as o,M as s,N as c,O as l,P as u,R as d,S as f,T as p,_ as m,a as h,b as g,c as _,d as v,f as y,g as b,h as x,i as S,j as C,m as w,n as T,o as E,p as D,r as O,s as k,t as A,u as j,v as M,w as N,x as P,y as F}from"./compat-r4Owm_RW.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),p(),u();var I=0;Array.isArray;function L(e,t,n,r,i,a){t||={};var s,c,l=t;if(`ref`in l&&typeof e!=`function`)for(c in l={},t)c==`ref`?s=t[c]:l[c]=t[c];var u={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--I,__i:-1,__u:0};return(i||a)&&(u.__source=i,u.__self=a),o.vnode&&o.vnode(u),u}D();var R=C(!0),ee=()=>l(R);D();var z=`data-theme`,te=`(prefers-color-scheme: dark)`,B=typeof window>`u`,ne=`(function (storageKey, themeAttribute, darkMediaQuery) {
|
|
3
|
+
var storedTheme = null;
|
|
4
|
+
try {
|
|
5
|
+
storedTheme = localStorage.getItem(storageKey);
|
|
6
|
+
} catch (error) {
|
|
7
|
+
/* Storage can throw (private mode, blocked cookies) — fall back to the OS. */
|
|
8
|
+
}
|
|
9
|
+
var theme =
|
|
10
|
+
storedTheme === 'light' || storedTheme === 'dark'
|
|
11
|
+
? storedTheme
|
|
12
|
+
: window.matchMedia(darkMediaQuery).matches
|
|
13
|
+
? 'dark'
|
|
14
|
+
: 'light';
|
|
15
|
+
var element = document.documentElement;
|
|
16
|
+
element.setAttribute(themeAttribute, theme);
|
|
17
|
+
element.style.colorScheme = theme;
|
|
18
|
+
})`,re=e=>`${ne}(${JSON.stringify(e)},${JSON.stringify(z)},${JSON.stringify(te)})`,ie=e=>{try{let t=localStorage.getItem(e);if(t===`light`||t===`dark`||t===`system`)return t}catch{}return`system`},ae=e=>{let t=document.createElement(`style`);return e&&t.setAttribute(`nonce`,e),t.appendChild(document.createTextNode(`*,*::before,*::after{transition:none!important}`)),document.head.appendChild(t),()=>{getComputedStyle(document.body).getPropertyValue(`transition`),t.remove()}},oe=B?M:F,se=C(void 0),ce=({storageKey:e=`theme`,nonce:t,hasBootstrapScript:r=!0,forcedTheme:a,children:o})=>{let[s,c]=N(`system`),[l,u]=N(void 0),d=a??(s===`system`?l:s);oe(()=>{let t=window.matchMedia(te);c(ie(e)),u(t.matches?`dark`:`light`);let n=e=>u(e.matches?`dark`:`light`),r=t=>{t.key===e&&c(ie(e))};return t.addEventListener(`change`,n),window.addEventListener(`storage`,r),()=>{t.removeEventListener(`change`,n),window.removeEventListener(`storage`,r)}},[e]),oe(()=>{if(!d)return;let e=document.documentElement;if(e.getAttribute(z)===d)return;let n=ae(t);e.setAttribute(z,d),e.style.colorScheme=d,n()},[d,t]);let f=i(t=>{c(t);try{localStorage.setItem(e,t)}catch{}},[e]),p=n(()=>({theme:s,resolvedTheme:d,setTheme:f}),[s,d,f]);return L(se.Provider,{value:p,children:[r&&L(`script`,{suppressHydrationWarning:!0,nonce:B?t:``,dangerouslySetInnerHTML:{__html:re(e)}}),o]})},le=({children:e,...t})=>l(se)?L(d,{children:e}):L(ce,{...t,children:e});D();var ue=1,de=9e5,fe=0,pe=()=>(fe=(fe+1)%(2**53-1),fe.toString()),me=new Map,he=e=>{if(me.has(e))return;let t=setTimeout(()=>{me.delete(e),ye({type:`REMOVE_TOAST`,toastId:e})},de);me.set(e,t)},ge=(e,t)=>{switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,ue)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?he(n):e.toasts.forEach(e=>{he(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},_e=[],ve={toasts:[]},ye=e=>{ve=ge(ve,e),_e.forEach(e=>{e(ve)})},be=({...e})=>{let t=pe(),n=e=>ye({type:`UPDATE_TOAST`,toast:{...e,id:t}}),r=()=>ye({type:`DISMISS_TOAST`,toastId:t});return ye({type:`ADD_TOAST`,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}},xe=()=>{let[e,t]=N(ve);return M(()=>(_e.push(t),()=>{let e=_e.indexOf(t);e>-1&&_e.splice(e,1)}),[e]),{...e,toast:be,dismiss:e=>ye({type:`DISMISS_TOAST`,toastId:e})}};D();var Se=C(void 0),Ce=e=>{let t=l(Se);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},we=({client:e,children:t})=>(M(()=>(e.mount(),()=>{e.unmount()}),[e]),L(Se.Provider,{value:e,children:t})),Te={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ee=new class{#e=Te;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function De(e){setTimeout(e,0)}var Oe=typeof window>`u`||`Deno`in globalThis;function ke(){}function Ae(e,t){return typeof e==`function`?e(t):e}function je(e){return typeof e==`number`&&e>=0&&e!==1/0}function Me(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ne(e,t){return typeof e==`function`?e(t):e}function Pe(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Ie(o,t.options))return!1}else if(!Re(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Fe(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Le(t.options.mutationKey)!==Le(a))return!1}else if(!Re(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Ie(e,t){return(t?.queryKeyHashFn||Le)(e)}function Le(e){return JSON.stringify(e,(e,t)=>Ue(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Re(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Re(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Re(e[r],t[r]))return!1;return!0}return!1}var ze=Object.prototype.hasOwnProperty;function Be(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=He(e)&&He(t);if(!r&&!(Ue(e)&&Ue(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ze.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Be(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Ve(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function He(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ue(e){if(!We(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!We(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function We(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ge(e){return new Promise(t=>{Ee.setTimeout(t,e)})}function Ke(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Be(e,t)}function qe(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Je(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ye=Symbol();function Xe(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ye?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ze(e,t){return typeof e==`function`?e(...t):!!e}function Qe(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var $e=()=>Oe,et=()=>$e(),tt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},nt=new class extends tt{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function rt(e){let t;if(e.then(e=>(t=e,e),ke)?.catch?.(ke),t!==void 0)return{data:t}}function it(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function at(e,t,n){let r=e.promise?.then(t).catch(e=>n?.(e)===!1?Promise.reject(e):Promise.reject(Error(`redacted`)));return r?.catch(ke),r}function ot(e,t,n){return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t?t(e.state.data):e.state.data}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status===`pending`&&{promise:at(e,t,n)},...e.meta&&{meta:e.meta},...e.queryType&&{queryType:e.queryType}}}function st(e){return e.state.isPaused}function ct(e){return e.state.status===`success`}function lt(e,t={}){let n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??st,r=e.getMutationCache().getAll().flatMap(e=>n(e)?[it(e)]:[]),i=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??ct,a=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors,o=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData;return{mutations:r,queries:e.getQueryCache().getAll().flatMap(e=>i(e)?[ot(e,o,a)]:[])}}function ut(e,t,n){let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData;t.mutations?.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),t.queries?.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l,queryType:u})=>{let d=c?rt(c):void 0,f=r.data===void 0?d?.data:r.data,p=f===void 0?f:a?a(f):f,m=i.get(o),h=m?.state.status===`pending`,g=m?.state.fetchStatus===`fetching`;if(m){let e=d&&l>m.state.dataUpdatedAt;if(r.dataUpdatedAt>m.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;m.setState({...t,data:p,...r.status===`pending`&&p!==void 0&&{status:`success`,dataUpdatedAt:l,...!g&&{fetchStatus:`idle`}}})}}else m=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s,_type:u},{...r,data:p,fetchStatus:`idle`,status:r.status===`pending`&&p!==void 0?`success`:r.status,...r.status===`pending`&&p!==void 0&&{dataUpdatedAt:l}});c&&!d&&!h&&!g&&l>m.state.dataUpdatedAt&&m.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(ke)})}var dt=De;function ft(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=dt,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var pt=ft(),mt=new class extends tt{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function ht(e){return Math.min(1e3*2**e,3e4)}function gt(e){return(e??`online`)!==`online`||mt.isOnline()}var _t=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function vt(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(ke);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new _t(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>nt.isFocused()&&(e.networkMode===`always`||mt.isOnline())&&e.canRun(),p=()=>gt(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(et()?0:3),a=e.retryDelay??ht,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),Ge(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var yt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),je(this.gcTime)&&(this.#e=Ee.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(et()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Ee.clearTimeout(this.#e),this.#e=void 0)}};function bt(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Qe(e,()=>t.signal,()=>n=!0)},u=Xe(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Je:qe;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?St:xt,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:xt(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function xt(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function St(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ct=class extends yt{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Et(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Et(this.options);e.data!==void 0&&(this.setState(Tt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ke(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(ke).catch(ke):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Ne(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ye||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Ne(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Me(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Xe(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?bt(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=vt({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof _t&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof _t){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...wt(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Tt(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),pt.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function wt(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:gt(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Tt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Et(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Dt=class extends tt{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),kt(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return At(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return At(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Ne(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ve(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&jt(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Ne(this.options.enabled,this.#t)!==Ne(t.enabled,this.#t)||Ne(this.options.staleTime,this.#t)!==Ne(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Ne(this.options.enabled,this.#t)!==Ne(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ve(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ke)),t}#h(e){return!et()&&Ne(this.options.enabled,this.#t)!==!1&&je(e)}#g(){this.#b();let e=Ne(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=Me(this.#r.dataUpdatedAt,e)+1;this.#u=Ee.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Ne(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=Ee.setInterval(()=>{(this.options.refetchIntervalInBackground||nt.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Ee.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Ee.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&kt(e,t),o=i&&jt(e,n,t,r);(a||o)&&(l={...l,...wt(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Ke(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Ke(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:Mt(e,t),refetch:this.refetch,isEnabled:Ne(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Ve(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();pt.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Ot(e,t){return Ne(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Ne(t.retryOnMount,e)!==!1)}function kt(e,t){return Ot(e,t)||e.state.data!==void 0&&At(e,t,t.refetchOnMount)}function At(e,t,n){if(Ne(t.enabled,e)!==!1&&Ne(t.staleTime,e)!==`static`){let r=Ne(n,e);return r===`always`||r!==!1&&Mt(e,t)}return!1}function jt(e,t,n,r){return(e!==t||Ne(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Mt(e,n)}function Mt(e,t){return Ne(t.enabled,e)!==!1&&e.isStaleByTime(Ne(t.staleTime,e))}var Nt=class extends yt{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Pt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=vt({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),pt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Pt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ft=class extends tt{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Nt({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=It(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=It(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=It(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=It(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){pt.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Fe(t,e))}findAll(e={}){return this.getAll().filter(t=>Fe(e,t))}notify(e){pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return pt.batch(()=>Promise.all(e.map(e=>e.continue().catch(ke))))}};function It(e){return e.options.scope?.id}var Lt=class extends tt{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Ve(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Le(t.mutationKey)!==Le(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??Pt();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){pt.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Rt=class extends tt{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Ie(r,t),a=this.get(i);return a||(a=new Ct({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){pt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Pe(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Pe(e,t)):t}notify(e){pt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){pt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){pt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},zt=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Rt,this.#t=e.mutationCache||new Ft,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=nt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=mt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ne(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Ae(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return pt.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;pt.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return pt.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=pt.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(ke).catch(ke)}invalidateQueries(e,t={}){return pt.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=pt.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ke)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(ke)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Ne(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Ne(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ke).catch(ke)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ke).catch(ke)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return mt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(Le(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{Re(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(Le(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{Re(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Ie(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Ye&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};D();var Bt=C(!1),Vt=()=>l(Bt),Ht=Bt.Provider;D();function Ut(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Wt=C(Ut()),Gt=()=>l(Wt);D();var Kt=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?Ze(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},qt=e=>{M(()=>{e.clearReset()},[e])},Jt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Ze(n,[e.error,r])),Yt=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Xt=(e,t)=>e?.suspense&&t.isPending,Zt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});D();function Qt(e,t,n){let r=Vt(),a=Gt(),o=Ce(n),s=o.defaultQueryOptions(e),c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=r?`isRestoring`:l?`optimistic`:void 0,Yt(s),Kt(s,a,c),qt(a);let[u]=N(()=>new t(o,s)),d=u.getOptimisticResult(s),f=!r&&l;if(k(i(e=>{let t=f?u.subscribe(pt.batchCalls(e)):ke;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),M(()=>{u.setOptions(s)},[s,u]),Xt(s,d))throw Zt(s,u,a);if(Jt({result:d,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw d.error;return s.notifyOnChangeProps?d:u.trackResult(d)}function $t(e,t){return Qt(e,Dt,t)}D();function en(e,t){let n=Ce(t),[r]=N(()=>new Lt(n,e));M(()=>{r.setOptions(e)},[r,e]);let a=k(i(e=>r.subscribe(pt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=i((...e)=>{r.mutate(e[0],e[1]).catch(ke)},[r]);if(a.error&&Ze(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}function tn(){}function nn(e,{interval:t=1e3,onError:n=tn}={}){if(typeof e!=`function`)throw Error(`argument is not function.`);let r=0,i=null,a=!1,o=!1;return async(...s)=>{if(i=s,!o){for(o=!0;a;)await new Promise(e=>Ee.setTimeout(e,t));for(;Date.now()<r;)await new Promise(e=>Ee.setTimeout(e,r-Date.now()));o=!1,a=!0;try{await e(...i)}catch(e){try{n(e)}catch{}}r=Date.now()+t,a=!1}}}var rn=({storage:e,key:t=`REACT_QUERY_OFFLINE_CACHE`,throttleTime:n=1e3,serialize:r=JSON.stringify,deserialize:i=JSON.parse,retry:a})=>{if(e){let o=async n=>{try{let i=await r(n);await e.setItem(t,i);return}catch(e){return e}};return{persistClient:nn(async e=>{let t=e,n=await o(t),r=0;for(;n&&t;)r++,t=await a?.({persistedClient:t,error:n,errorCount:r}),t&&(n=await o(t))},{interval:n}),restoreClient:async()=>{let n=await e.getItem(t);if(n)return await i(n)},removeClient:()=>e.removeItem(t)}}return{persistClient:tn,restoreClient:()=>Promise.resolve(void 0),removeClient:tn}},an=[`added`,`removed`,`updated`];function on(e){return an.includes(e)}async function sn({queryClient:e,persister:t,maxAge:n=864e5,buster:r=``,hydrateOptions:i}){try{let a=await t.restoreClient();if(a){if(a.timestamp){let o=Date.now()-a.timestamp>n,s=a.buster!==r;if(o||s)return t.removeClient();ut(e,a.clientState,i)}else return t.removeClient()}}catch(e){throw await t.removeClient(),e}}async function cn({queryClient:e,persister:t,buster:n=``,dehydrateOptions:r}){let i={buster:n,timestamp:Date.now(),clientState:lt(e,r)};await t.persistClient(i)}function ln(e){let t=e.queryClient.getQueryCache().subscribe(t=>{on(t.type)&&cn(e)}),n=e.queryClient.getMutationCache().subscribe(t=>{on(t.type)&&cn(e)});return()=>{t(),n()}}D();var un=({children:e,persistOptions:t,onSuccess:n,onError:r,...i})=>{let[a,o]=N(!0),s=P({persistOptions:t,onSuccess:n,onError:r}),c=P(!1);return M(()=>{s.current={persistOptions:t,onSuccess:n,onError:r}}),M(()=>{let e={...s.current.persistOptions,queryClient:i.client};return c.current||(c.current=!0,sn(e).then(()=>s.current.onSuccess?.()).catch(()=>s.current.onError?.()).finally(()=>{o(!1)})),a?void 0:ln(e)},[i.client,a]),L(we,{...i,children:L(Ht,{value:a,children:e})})};D();var dn=864e5,fn=`v1`;if(typeof window>`u`){let e=e=>{typeof e==`object`&&e&&`unref`in e&&typeof e.unref==`function`&&e.unref()};Ee.setTimeoutProvider({setTimeout:(t,n)=>{let r=setTimeout(t,n);return e(r),r},clearTimeout:e=>clearTimeout(e),setInterval:(t,n)=>{let r=setInterval(t,n);return e(r),r},clearInterval:e=>clearInterval(e)})}var pn={queries:{retry:1,staleTime:3e4,gcTime:dn,refetchOnMount:!0,refetchOnWindowFocus:!1,refetchOnReconnect:!1},mutations:{retry:0}},mn=rn({storage:typeof window<`u`?{getItem:e=>Promise.resolve(window.localStorage.getItem(e)),setItem:(e,t)=>Promise.resolve(window.localStorage.setItem(e,t)),removeItem:e=>Promise.resolve(window.localStorage.removeItem(e))}:{getItem:()=>Promise.resolve(null),setItem:()=>Promise.resolve(),removeItem:()=>Promise.resolve()},key:`intlayer-rq-cache`}),hn=e=>e.split(`_`).join(` `),gn=e=>{if(!e||typeof e!=`object`)return;let t=Object.values(e).flat().filter(e=>typeof e==`string`);return t.length>0?t.join(` `):void 0},_n=()=>{let{toast:e}=xe();return{onError:t=>{[(()=>{try{if(typeof t==`string`)return JSON.parse(t);if(t instanceof Error)return JSON.parse(t.message)}catch{}return t})()].flat().forEach(t=>{let n=t?.error??t;if(n?.code===`RATE_LIMIT_EXCEEDED_UNAUTHENTICATED`){e({title:n.message,variant:`error`});return}e({title:hn(n?.title??t?.title??`Error`),description:gn(n?.errors)??n?.message??t?.message??String(n??`An error occurred`),variant:`error`})})},onSuccess:t=>{t?.error&&e({title:hn(t.error.title??t.error.code??`Error`),description:gn(t.error.errors)??t.error.message??t.error.code??`An error occurred`,variant:`error`}),t?.message&&e({title:t.message,description:t.description,variant:`success`})}}},vn=({children:e,client:t})=>{let{onError:n,onSuccess:r}=_n(),i=P({onSuccess:r,onError:n});i.current={onSuccess:r,onError:n};let a=P(t??null);a.current||=new zt({defaultOptions:pn,mutationCache:new Ft});let o=P(!1);if(!o.current){o.current=!0;let e=a.current.getMutationCache(),t=e.config.onSuccess,n=e.config.onError;e.config.onSuccess=(e,n,r,a,o)=>{t?.(e,n,r,a,o),i.current.onSuccess?.(e,n,r,a,o)},e.config.onError=(e,t,r,a,o)=>{n?.(e,t,r,a,o),i.current.onError?.(e,t,r,a,o)},e.config.onSettled=(e,t,n,r,i)=>{i.meta?.invalidateQueries&&i.meta.invalidateQueries.forEach(e=>{a.current?.invalidateQueries({queryKey:e})}),i.meta?.resetQueries&&i.meta.resetQueries.forEach(e=>{a.current?.resetQueries({queryKey:e})})}}return t||typeof window>`u`?L(we,{client:a.current,children:e}):L(un,{client:a.current,persistOptions:{persister:mn,maxAge:dn,buster:fn,dehydrateOptions:{shouldDehydrateQuery:e=>e.state.status===`success`}},children:e})},yn={locales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],requiredLocales:[`en`,`en-GB`,`fr`,`es`,`de`,`ja`,`ko`,`zh`,`it`,`pt`,`hi`,`ar`,`ru`],strictMode:`strict`,defaultLocale:`en`},bn={mode:`prefix-no-default`,storage:{cookies:[{name:`INTLAYER_LOCALE`,attributes:{path:`/`}}],headers:[{name:`x-intlayer-locale`}]},basePath:``},xn={editorURL:`http://localhost:8000`,cmsURL:`https://app.intlayer.org`,backendURL:`https://back.intlayer.org`,port:8e3,enabled:!1,dictionaryPriorityStrategy:`local_first`,liveSync:!1,liveSyncPort:4e3,liveSyncURL:`http://localhost:4000`},Sn=`modulepreload`,Cn=function(e){return`/`+e},wn={},Tn=function(e){return e.pathname.endsWith(`.css`)},En=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},i=function(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)},a,o=document.querySelector(`meta[property=csp-nonce]`),s=o?.nonce||o?.getAttribute(`nonce`);r=e(t.map(e=>{e=Cn(e,n);let t=i(e);if(t.href in wn)return;wn[t.href]=!0;let r=Tn(t);if(a===void 0){a={all:new Set,styles:new Set};let e=document.getElementsByTagName(`link`);for(let t=e.length-1;t>=0;t--){let n=e[t];a.all.add(n.href),n.rel===`stylesheet`&&a.styles.add(n.href)}}if((r?a.styles:a.all).has(t.href))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Sn,r||(o.as=`script`),o.crossOrigin=``,o.href=t.href,s&&o.setAttribute(`nonce`,s),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Dn=e=>{if(typeof e==`number`)return Date.now()+e*1e3;if(typeof e==`string`){let t=Date.parse(e);return Number.isNaN(t)?void 0:t}},On=(e,t,n)=>{let r=[`${e}=${encodeURIComponent(t)}`];n.path&&r.push(`Path=${n.path}`),n.domain&&r.push(`Domain=${n.domain}`);let i=Dn(n.expires);return i!==void 0&&r.push(`Expires=${new Date(i).toUTCString()}`),n.secure&&r.push(`Secure`),n.sameSite&&r.push(`SameSite=${n.sameSite}`),r.join(`; `)},kn={}.INTLAYER_ROUTING_STORAGE_COOKIES===`false`;({}).INTLAYER_ROUTING_STORAGE_HEADERS;var An={getCookie:e=>document.cookie.split(`;`).find(t=>t.trim().startsWith(`${e}=`))?.split(`=`)[1],getLocaleStorage:e=>localStorage.getItem(e),getSessionStorage:e=>sessionStorage.getItem(e),isCookieEnabled:!0,setCookieStore:(e,t,n)=>cookieStore.set({name:e,value:t,path:n.path,domain:n.domain,expires:n.expires,sameSite:n.sameSite}),setCookieString:(e,t)=>{document.cookie=t},setSessionStorage:(e,t)=>sessionStorage.setItem(e,t),setLocaleStorage:(e,t)=>localStorage.setItem(e,t)},jn=(e=An)=>{let{locales:t}=yn;if(e?.isCookieEnabled===!1)return;let n=e=>!!e&&t.includes(e);if(!kn)for(let t=0;t<(bn.storage.cookies??[]).length;t++)try{let r=e?.getCookie?.(bn.storage.cookies[t].name);if(n(r))return r}catch{}},Mn=!1,Nn,Pn=()=>typeof window>`u`?jn(An):(Mn||=(Nn=jn(An),!0),Nn),Fn=(e,t)=>{if(t?.isCookieEnabled!==!1&&(Mn=!1,!kn&&bn.storage.cookies))for(let n=0;n<bn.storage.cookies.length;n++){let{name:r,attributes:i}=bn.storage.cookies[n];try{t?.setCookieStore&&t.setCookieStore(r,e,{...i,expires:Dn(i.expires)})}catch{try{t?.setCookieString&&t.setCookieString(r,On(r,e,i))}catch{}}}},In=e=>{let t=globalThis;return t[e]??=new Set,t[e]},Ln=()=>In(Symbol.for(`intlayer.ambientLocaleResolvers`)),Rn=()=>{for(let e of Ln())try{let t=e();if(t)return t}catch{}},zn=e=>e??Rn()??(typeof window>`u`?void 0:Pn())??yn.defaultLocale,Bn=50,Vn=new Map,Hn={DisplayNames:class{of(e){return e}},ListFormat:class{format(e){return Array.from(e).join(`, `)}formatToParts(e){return Array.from(e).flatMap((e,t)=>t===0?[{type:`element`,value:e}]:[{type:`literal`,value:`, `},{type:`element`,value:e}])}},Segmenter:class{segment(e){let t=0;return Array.from(e).map(e=>{let n=t;return t+=e.length,{segment:e,index:n}})}}},Un=e=>{let t=Intl[e];return typeof t==`function`?t:Hn[e]};function Wn(e,t,n){let r=zn(t),i=`${r}|${n?JSON.stringify(n):``}`,a=e,o=Vn.get(a);o||(o=new Map,Vn.set(a,o));let s=o.get(i);if(!s){let t=typeof e==`string`?Un(e):e;if(typeof t!=`function`)throw Error(`[intlayer] \`Intl.${String(e)}\` is not available in this JavaScript engine and has no fallback. Load the matching polyfill before formatting.`);o.size>Bn&&o.clear(),s=new t(r,n),o.set(i,s)}return s}var Gn={Collator:function(e,t){return Wn(`Collator`,e,t)},DateTimeFormat:function(e,t){return Wn(`DateTimeFormat`,e,t)},DisplayNames:function(e,t){return Wn(`DisplayNames`,e,t)},ListFormat:function(e,t){return Wn(`ListFormat`,e,t)},NumberFormat:function(e,t){return Wn(`NumberFormat`,e,t)},PluralRules:function(e,t){return Wn(`PluralRules`,e,t)},RelativeTimeFormat:function(e,t){return Wn(`RelativeTimeFormat`,e,t)},Segmenter:function(e,t){return Wn(`Segmenter`,e,t)}},Kn=e=>typeof e==`object`&&e?.key!==void 0&&e?.props!==void 0,qn=e=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(e),Jn=new Map,Yn=(e,t)=>Object.create(new Proxy(e,{get:(e,t,n)=>{if(typeof t!=`string`||t===`constructor`||t in e)return Reflect.get(e,t,n);let{value:r}=n;if(r==null)return;let i=Object(r)[t];return typeof i==`function`?i.bind(r):i},has:(e,n)=>n in e||typeof n==`string`&&n!==`constructor`&&t!==null&&n in t}),{toString:{value(){return String(this.value??``)}},valueOf:{value(){return this.value}},[Symbol.toPrimitive]:{value(){return this.value??``}}}),Xn=(e,t=Object.prototype)=>{let n=typeof e,r=e==null?null:n===`object`||n===`function`?Object.getPrototypeOf(e):n,i=Jn.get(t);i||(i=new Map,Jn.set(t,i));let a=i.get(r);return a||(a=Yn(t,r===null?null:Object.getPrototypeOf(Object(e))),i.set(r,a)),a},Zn=(e,t)=>e.every((e,n)=>t[n]&&t[n].key===e.key&&t[n].type===e.type);u();var Qn=({children:e,value:t,additionalProps:n})=>Object.setPrototypeOf({...c(e)?e:a(d,{},e),value:t,...n},Xn(t)),$n=new WeakMap,er=0,tr=e=>{if(!e)return`base`;let t=$n.get(e);if(t)return t;er+=1;let n=`p${er}`;return $n.set(e,n),n},nr=256,rr=new WeakMap,ir=e=>typeof e==`object`&&!!e,ar=(e,t,n)=>`${e}_${t}_${tr(n)}`,or=(e,t)=>{if(!ir(e))return{hit:!1};let n=rr.get(e);return n?.has(t)?{hit:!0,content:n.get(t)}:{hit:!1}},sr=(e,t,n)=>{if(!ir(e))return n;let r=rr.get(e);return r||(r=new Map,rr.set(e,r)),r.size>=nr&&r.clear(),r.set(t,n),n},cr=(e,t)=>{let n=Object.keys(e),r=n[n.length-1];return e[`${t}`]??e.fallback??e[r]},lr=`translation`,ur=`enumeration`,dr=`plural`,fr=`condition`,pr=`insertion`,mr=`file`,hr=`object`,gr=`array`,_r=`nested`,vr=`reactNode`,yr=`preactNode`,br=`solidNode`,xr=`markdown`,Sr=`html`,Cr=`text`,wr=`number`,Tr=`boolean`,Er=`gender`,Dr=`select`,Or=`null`,kr=`unknown`,Ar=(e,t,n)=>({...e,children:t,keyPath:[...e.keyPath,n]}),jr=(e,t)=>{for(let n of t.plugins??[])if(n.canHandle(e))return n.transform(e,t,jr);if(typeof e!=`object`||!e||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0)return e;if(Array.isArray(e))return e.map((e,n)=>jr(e,Ar(t,e,{type:gr,key:n})));let n={};for(let r in e){let i={type:hr,key:r};if(t.eager){n[r]=jr(e[r],Ar(t,e[r],i));continue}Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get:function(){let n=jr(e[r],Ar(t,e[r],i));return Object.defineProperty(this,r,{value:n,enumerable:!0,configurable:!0}),n}})}return n},Mr=(e,t)=>e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString()),Nr=e=>{if(typeof e!=`object`||!e||typeof e.then==`function`||e.$$typeof!==void 0||e.__v_isVNode!==void 0||e._isVNode!==void 0||e.isJSX!==void 0)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Array.isArray(e)},Pr=(e,t)=>{if(e===void 0)return t;if(t===void 0||Array.isArray(e)||!Nr(e)||!Nr(t))return e;let n=e;for(let r of Object.keys(t)){let i=t[r];if(r===`__proto__`||r===`constructor`||i===void 0)continue;let a=e[r],o=a===void 0?i:typeof a==`object`?Pr(a,i):a;o!==a&&(n===e&&(n={...e}),n[r]=o)}return n},Fr=(e,t,n)=>{let r=t=>e[t],i=r(t);if(typeof i==`string`)return i;let a=[t,t.split(`-`)[0],n,n?.split(`-`)[0]],o=[];for(let e=0;e<a.length;e++){let t=a[e];if(!t||a.indexOf(t)<e)continue;let n=r(t);if(n!==void 0){if(typeof n==`string`){if(o.length===0)return n;continue}o.push(n)}}if(o.length!==0)return o.length===1||Array.isArray(o[0])?o[0]:o.reduce((e,t)=>Pr(e,t))},Ir=e=>{if(typeof e!=`object`||!e||!(`nodeType`in e))return!1;let{nodeType:t}=e;return!1},Lr=e=>{if(typeof e==`string`)return e;if(Ir(e))return e.nodeType===`html`?e[Sr]:e[xr]},Rr=(e,t)=>{if(typeof e==`string`)return t;if(Ir(e)){let n=e.nodeType===`html`?Sr:xr;return{...e,[n]:t}}return e},zr=(e,t,n,r,i)=>{let a=Rr(e,Mr(Lr(e),t));return i(a,{...n,plugins:r,children:a})},Br={id:`fallback-plugin`,canHandle:()=>!1,transform:e=>e},Vr=e=>{if(typeof e!=`function`)return!1;let{value:t}=e;return t===void 0||typeof t==`function`},Hr=(e,t)=>({}).INTLAYER_NODE_TYPE_TRANSLATION===`false`?Br:{id:`translation-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`translation`,transform:(n,r,i)=>{let a=Fr(n.translation??{},e,t);return i(a,{...r,children:a,keyPath:[...r.keyPath,{type:lr,key:e}]})}},Ur=Br,Wr=e=>Br,Gr={}.INTLAYER_NODE_TYPE_CONDITION===`false`?Br:{id:`condition-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`condition`,transform:(e,t,n)=>{let r=e[fr],i={};for(let e in r){let a=r[e];i[e]=n(a,{...t,children:a,keyPath:[...t.keyPath,{type:fr,key:e}]})}return e=>{let t=typeof e==`boolean`?e:e.value,n=cr(i,t);return Vr(n)&&typeof e==`object`?n(e):n}}},Kr={}.INTLAYER_NODE_TYPE_INSERTION===`false`?Br:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:pr}],i=e[pr],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||Ir(e),transform:(e,n,r)=>{if(Ir(e))return i=>zr(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=Mr(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return Yr(i,n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]}))}},qr=[ur,fr,dr,Er,Dr],Jr=(e,t,n,r=!1)=>{let i=e?.nodeType;if(typeof t!=`function`||!i||!qr.includes(i))return t;let a=i===`plural`||i===`enumeration`;return e=>{if(typeof e==`object`&&e)return t({...n,...e});if(a)return t({...n,count:e});let i=t(e);return!r&&Vr(i)?i(n):i}},Yr=(e,t)=>typeof t==`function`&&qr.includes(e?.nodeType??``)?n=>Jr(e,t,n):t,Xr=Br,Zr=Br,Qr=e=>Br,$r=Br,ei=(e,t=!0)=>[Hr(e??yn.defaultLocale,t?yn.defaultLocale:void 0),Ur,Wr(e??yn.defaultLocale),Gr,Kr,Qr(e??yn.defaultLocale),$r,Xr,Zr].filter(e=>e!==Br),ti=(e,t,n=[])=>jr(e,{...t,plugins:n}),ni=new WeakSet,ri=(e,t,n)=>{let{locale:r,selector:i}={locale:t,selector:void 0},a=zn(r),o=ar(a,``,n),s=or(e,o);if(s.hit)return s.content;let c=n??ei(a),l=e,u=e=>{let t={dictionaryKey:e.key,dictionaryPath:e.filePath,keyPath:[],plugins:c,nestedDictionaries:e.nestedDictionaries,eager:!ni.has(e)};ni.add(e);try{return ti(e.content,t,c)}finally{t.eager&&ni.delete(e)}};return l===null?sr(e,o,null):Array.isArray(l)?sr(e,o,l.map(u)):sr(e,o,u(l))},ii=`https://back.intlayer.org`,ai=[`en`],oi=`x-intlayer-locale`;u(),D();var si=null,ci=null,li={id:`intlayer-node-plugin`,canHandle:e=>typeof e==`bigint`||typeof e==`string`||typeof e==`number`,transform:(e,t)=>Qn({value:t.children,children:t.children})},ui=Br,di=e=>e!=null&&typeof e!=`string`&&typeof e!=`number`&&typeof e!=`boolean`,fi=(e,t)=>{if(!Object.values(t).some(di))return e.replace(/\{\{\s*(.*?)\s*\}\}/g,(e,n)=>(t[n.trim()]??``).toString());let n=[],r=0,i=/\{\{\s*(.*?)\s*\}\}/g,o=i.exec(e);for(;o!==null;){o.index>r&&n.push(e.substring(r,o.index));let a=o[1]?.trim(),s=a&&t[a];s!=null&&n.push(typeof s==`number`?String(s):s),r=o.index+o[0].length,o=i.exec(e)}return r<e.length&&n.push(e.substring(r)),a(d,null,...n.map((e,t)=>a(d,{key:t},e)))},pi={}.INTLAYER_NODE_TYPE_INSERTION===`false`?Br:{id:`insertion-plugin`,canHandle:e=>typeof e==`object`&&e?.nodeType===`insertion`,transform:(e,t,n)=>{let r=[...t.keyPath,{type:pr}],i=e[pr],a={id:`insertion-string-plugin`,canHandle:e=>typeof e==`string`||Ir(e),transform:(e,n,r)=>{if(Ir(e))return i=>zr(e,i,n,t.plugins,r);let i=r(e,{...n,children:e,plugins:[...(t.plugins??[]).filter(e=>e.id!==`intlayer-node-plugin`)]});return e=>{let a=fi(i,e);return r(a,{...n,plugins:t.plugins,children:a})}}};return Yr(i,n(i,{...t,children:i,keyPath:r,plugins:[a,...t.plugins??[]]}))}};y(()=>si.then(e=>({default:e.MarkdownRendererPlugin}))),y(()=>si.then(e=>({default:e.MarkdownMetadataRenderer})));var mi=Br;y(()=>ci.then(e=>({default:e})));var hi=Br,gi=new Map,_i=(e,t=!0)=>{let n=zn(e),r=`${n}_${t}`;if(gi.has(r))return gi.get(r);let i=[li,Hr(n,t?yn.defaultLocale:void 0),Ur,Wr(n),Gr,Qr(n),$r,Xr,Zr,ui,pi,mi,hi].filter(e=>e!==Br);return gi.set(r,i),i},vi=(e,t)=>ri(e,t,_i(typeof t==`object`&&t?t.locale:t)),yi=Pn,bi=(e,t)=>Fn(e,{...An,isCookieEnabled:t}),xi=()=>{typeof window<`u`&&(window.intlayer={enabled:!0})},Si=e=>{if(!e||typeof e!=`string`)return``;let t=e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`);return t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()},Ci=(e,t=yn?.locales)=>{let n=qn(e),r=e;e?.endsWith(`/`)&&(r=e.slice(0,-1));let i=n?new URL(r):new URL(r,`http://e.com`),a=i.pathname;a.startsWith(`/`)||(i.pathname=`/${a}`);{let e=a.split(`/`),n=e[1];t?.includes(n)&&(e.splice(1,1),i.pathname=e.join(`/`)??`/`)}return n?i.toString():i.toString().replace(`http://e.com`,``)},wi=(e,t,n)=>(n??bn?.rewrite,e),Ti=(e={})=>({...e,defaultLocale:e.defaultLocale??yn?.defaultLocale??`en`,mode:e.mode??bn?.mode??`prefix-no-default`,locales:e.locales??yn?.locales??ai,rewrite:e.rewrite??bn?.rewrite,domains:e.domains??bn?.domains}),Ei=(e,t)=>!!e&&(t??yn.locales).includes(e),Di=(e,t={})=>{let{defaultLocale:n,mode:r,locales:i,domains:a}=Ti(t);return!e||!Ei(e,i)?{prefix:``,localePrefix:void 0}:r===`prefix-all`||r===`prefix-no-default`&&n!==e?{prefix:`${e}/`,localePrefix:e}:{prefix:``,localePrefix:void 0}},Oi=(e,t,n)=>({path:e,isRewritten:!1}),ki=(e,t=yn?.defaultLocale,n={})=>{let{defaultLocale:r,mode:i,locales:a,rewrite:o,domains:s}=Ti(n),c=Ci(e,a),l=new URL(c,`http://e.com`),u=Oi(wi(l.pathname,void 0,void 0),t,void 0).path,{prefix:d}=Di(t,{defaultLocale:r,mode:i,locales:a,domains:s}),f=`/${d}${u}`.replace(/\/+/g,`/`);return f.length>1&&f.endsWith(`/`)&&(f=f.slice(0,-1)),`${f}${l.search}${l.hash}`},Ai=(e,t=yn?.defaultLocale,n={})=>{let{domains:r,currentDomain:i}=Ti(n),a=qn(e),o=a?new URL(e):new URL(e,`http://e.com`);return`${a?`${o.protocol}//${o.host}`:``}${ki(`${o.pathname}${o.search}${o.hash}`,t,n)}`},ji=(e,t=yn?.locales,n=yn?.defaultLocale)=>{if(t?.includes(e))return e;let r=[e].flat(),i=e=>e.trim().toLowerCase();try{for(let e of r){let n=i(e),r=t.find(e=>i(e)===n);if(r)return r;let[a]=n.split(`-`),o=t.find(e=>i(e).split(`-`)[0]===a);if(o)return o}}catch{}return n},Mi=[`Arab`,`Hebr`,`Thaa`,`Syrc`,`Mand`,`Adlm`,`Rohg`,`Nkoo`],Ni=e=>{if(!e)return`ltr`;try{let t=new Intl.Locale(e);if(`getTextInfo`in t)return t.getTextInfo().direction;if(`textInfo`in t)return t.textInfo.direction;let n=t.maximize();return Mi.includes(n.script??``)?`rtl`:`ltr`}catch{return`ltr`}},Pi=(e,t=e)=>new Gn.DisplayNames(t,{type:`language`}).of(e)??`Unknown locale`;u(),p();var Fi=C({get locale(){return yi()??yn?.defaultLocale},setLocale:()=>null}),Ii=({locale:e,defaultLocale:t,variant:r,children:a,setLocale:o,isCookieEnabled:s})=>{let{defaultLocale:c,locales:l}=yn??{},[u,d]=N(()=>e??yi()??t??c);M(()=>{xi()},[]);let f=e??u,p=i(e=>{if(f.toString()!==e.toString()){if(!l?.map(String).includes(e)){console.error(`Locale ${e} is not available`);return}d(e),bi(e,s??!0)}},[f,l,s]),m=o??p,h=ji(f),g=n(()=>({locale:h,setLocale:m,variant:r,isCookieEnabled:s}),[h,m,r,s]);return L(Fi.Provider,{value:g,children:a})},Li=(e,t,n)=>{let r=e,i=null,a=[];if(t.length===0)return n;try{for(let e=0;e<t.length;e++){let o=t[e];if(i=r,(o?.type===`object`||o?.type===`array`)&&(a=[o.key],(!r[o.key]||typeof r[o.key]!=`object`)&&(r[o.key]={}),r=r[o.key]),(o?.type===`translation`||o?.type===`enumeration`||o?.type===`plural`||o?.type===`gender`||o?.type===`select`)&&(a=[o.type,o.key],(!r[o.type]||typeof r[o.type]!=`object`)&&(r[o.type]={}),(!r[o.type][o.key]||typeof r[o.type][o.key]!=`object`)&&(r[o.type][o.key]={}),r=r[o.type][o.key]),(o?.type===`enumeration`||o?.type===`plural`||o?.type===`condition`)&&o.type!==`enumeration`&&o.type!==`plural`&&(a=[o.type,o.key],r=r[o.type][o.key]),(o?.type===`markdown`||o?.type===`html`||o?.type===`insertion`)&&(a=[o.type],r[o.type]??(r[o.type]=``),r=r[o.type]),o?.type===`file`&&(a=[`content`],r=r.content),e===t.length-1&&i&&a.length>0){let e=i;for(let t of a.slice(0,-1))e=e[t];let t=a[a.length-1];if(n===void 0){if(Array.isArray(e)){let n=Number(t);!Number.isNaN(n)&&n>=0&&n<e.length&&e.splice(n,1)}else delete e[t]}else e[t]=n}}return e}catch(r){return console.error(`Cannot edit dictionary by key path`,{dictionaryContent:e,keyPath:t,newValue:n},r),e}},Ri=(e,t,n)=>{let r=structuredClone(e);for(let e of t)n&&r?.nodeType===`translation`&&(r=r?.[lr]?.[n]),(e.type===`object`||e.type===`array`)&&(r=r?.[e.key]),(e.type===`translation`||e.type===`condition`||e.type===`enumeration`||e.type===`plural`||e.type===`gender`||e.type===`select`)&&(r=r?.[e.type]?.[e.key]),(e.type===`markdown`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(r=r?.[e.type]);return r},zi=(e,t,n)=>{let r=structuredClone(n);switch(e){case lr:return{nodeType:lr,[lr]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case ur:return{nodeType:ur,[ur]:{1:r??``}};case dr:return{nodeType:dr,[dr]:{one:r??``,other:r??``}};case fr:return{nodeType:fr,[fr]:{true:r??``,false:r??``}};case Er:return{nodeType:Er,[Er]:{male:r??``,female:r??``,fallback:r??``}};case Dr:return{nodeType:Dr,[Dr]:{case1:r??``,fallback:r??``}};case pr:return{nodeType:pr,[pr]:{insertion:r??``}};case _r:return{nodeType:_r,[_r]:{dictionaryKey:``}};case xr:return{nodeType:xr,[xr]:r??``};case Sr:return{nodeType:Sr,[Sr]:r??``,customComponents:[]};case mr:return{nodeType:mr,[mr]:r??``};case hr:return{newKey:r??``};case gr:return[r??``];case Cr:return r??``;case wr:return r??0;case Tr:return r??!0;default:return r??``}},Bi=e=>{if(typeof e==`string`)return``;if(typeof e==`number`)return 0;if(typeof e==`boolean`)return!0;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`select`||t.nodeType===`html`?Bi(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?Bi(n):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(Bi);let t=Object.entries(e).map(([e,t])=>[e,Bi(t)]);return Object.fromEntries(t)},Vi=e=>{if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`markdown`||t.nodeType===`html`?n:t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`select`||t.nodeType===`file`?n[Object.keys(n)[0]]:t.nodeType===`nested`?void 0:n}return!e||typeof e!=`object`?e:Array.isArray(e)?e[0]:e},Hi=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,Ui={[lr]:!0,[ur]:!0,[dr]:!0,[fr]:!0,[pr]:!0,[mr]:!0,[hr]:!0,[gr]:!0,[_r]:!0,[vr]:!0,[yr]:!0,[br]:!0,[xr]:!0,[Sr]:!0,[Cr]:!0,[wr]:!0,[Tr]:!0,[Er]:!0,[Dr]:!0,[Or]:!0,[kr]:!0},Wi=e=>Object.hasOwn(Ui,e),Gi=e=>{if(typeof e==`string`)return Cr;if(Hi(e)){let t=e.nodeType;return Wi(t)?t:kr}return Array.isArray(e)?gr:Kn(e)?vr:typeof e==`number`?wr:typeof e==`boolean`?Tr:e&&typeof e==`object`?hr:e===null?Or:kr},Ki=(e,t,n)=>{let r=e,i=null,a=null;for(let e of n)i=r,(e.type===`object`||e.type===`array`)&&(a=e.key,r=r[e.key]),(e.type===`translation`||e.type===`enumeration`||e.type===`plural`||e.type===`condition`||e.type===`gender`||e.type===`select`)&&(a=e.type,r=r[e.type][e.key]),(e.type===`markdown`||e.type===`reactNode`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(a=e.type,r=r[e.type]);if(i&&a!==null){if(Array.isArray(i))i[a]=r;else{let e={};for(let n of Object.keys(i))n===a&&t!==void 0?e[t]=r:e[n]=i[n];Object.keys(i).forEach(e=>{delete i[e]}),Object.assign(i,e)}}return e};p();var qi=(e,t)=>{let{locale:r,variant:i}=l(Fi)??{},a=t??r,o=a;return n(()=>vi(e,a),[e.key,o])};p();var{defaultLocale:Ji,locales:Yi}=yn??{},Xi=({isCookieEnabled:e,onLocaleChange:t}={})=>{let{locale:n,setLocale:r,isCookieEnabled:i}=l(Fi)??{};return{locale:n,defaultLocale:Ji,availableLocales:Yi,setLocale:n=>{if(!Yi?.map(String).includes(n)){console.error(`Locale ${n} is not available`);return}r(n),bi(n,e??i??!0),t?.(n)}}},Zi=2048,Qi=8192,$i=2048,ea=1024,ta=2048,na=-2128831035,ra=16777619,ia=Array.isArray,aa=e=>{if(!e)return``;if(typeof e==`string`)return e;if(typeof e==`number`)return``+e;let t=``;if(ia(e)){let n=e.length;for(let r=0;r<n;r++){let n=e[r];if(!n)continue;let i=typeof n==`string`?n:aa(n);i&&(t&&(t+=` `),t+=i)}return t}if(typeof e==`object`)for(let n in e)e[n]&&(t&&(t+=` `),t+=n);return t},oa=(e,t)=>{let n=[];for(let r=0;r<e;r++)n.push(t);return n},sa=`line`in Error(),ca=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,la=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ua=/\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$/,da=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,fa=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pa=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ma=Number,ha=Number.isNaN,ga=Number.isInteger,_a=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,va=(e,t,n)=>{let r=e.length;if(r<3||e.charCodeAt(0)!==t||e.charCodeAt(r-1)!==n)return-1;let i=0;if(_a(e.charCodeAt(1))){let t=2;for(;t<r-1;){let n=e.charCodeAt(t);if(_a(n)||n===45)t++;else break}t<r-2&&e.charCodeAt(t)===58&&(i=t)}for(let t=1;t<r-1;t++){let n=e.charCodeAt(t);if(n===10||n===13||n===8232||n===8233)return-1}return i},ya=null,ba=-1,xa=``,Sa=``,Ca=e=>{if(e===ya)return;ya=e;let t=va(e,91,93);ba=t,t>0?(xa=e.slice(1,t),Sa=e.slice(t+1,e.length-1)):t===0&&(Sa=e.slice(1,-1))},wa=null,Ta=-1,Ea=``,Da=e=>{if(e===wa)return;wa=e;let t=va(e,40,41);Ta=t,t>0&&(Ea=e.slice(1,t))},Oa=e=>ca.test(e),V=e=>!!e&&!ha(ma(e)),ka=e=>!!e&&ga(ma(e)),Aa=e=>e.endsWith(`%`)&&V(e.slice(0,-1)),ja=e=>la.test(e),Ma=()=>!0,Na=e=>ua.test(e)&&!da.test(e),Pa=()=>!1,Fa=e=>fa.test(e),Ia=e=>pa.test(e),La=e=>!H(e)&&!U(e),Ra=e=>{let t=e.length;return e.startsWith(`@container`)&&(t>11&&e.charCodeAt(10)===47||t>16&&e.charCodeAt(11)===115&&e.startsWith(`-size/`,10)||t>18&&e.charCodeAt(11)===110&&e.startsWith(`-normal/`,10))},za=e=>eo(e,io,Pa),H=e=>(Ca(e),ba>=0),Ba=e=>eo(e,ao,Na),Va=e=>eo(e,oo,V),Ha=e=>eo(e,co,Ma),Ua=e=>eo(e,so,Pa),Wa=e=>eo(e,no,Pa),Ga=e=>eo(e,ro,Ia),Ka=e=>eo(e,lo,Fa),U=e=>(Da(e),Ta>=0),qa=e=>to(e,ao),Ja=e=>to(e,so),Ya=e=>to(e,no),Xa=e=>to(e,io),Za=e=>to(e,ro),Qa=e=>to(e,lo,!0),$a=e=>to(e,co,!0),eo=(e,t,n)=>(Ca(e),ba<0?!1:ba>0?t(xa):n(Sa)),to=(e,t,n=!1)=>(Da(e),Ta<0?!1:Ta>0?t(Ea):n),no=e=>e===`position`||e===`percentage`,ro=e=>e===`image`||e===`url`,io=e=>e===`length`||e===`size`||e===`bg-size`,ao=e=>e===`length`,oo=e=>e===`number`,so=e=>e===`family-name`,co=e=>e===`number`||e===`weight`,lo=e=>e===`shadow`,uo=new Map([[H,1],[za,1],[Ba,1],[Va,1],[Ha,1],[Ua,1],[Wa,1],[Ga,1],[Ka,1],[U,2],[qa,2],[Ja,2],[Ya,2],[Xa,2],[Za,2],[Qa,2],[$a,2],[Oa,4],[V,4],[ka,4],[Aa,4],[ja,4],[Ra,4],[Ma,7],[La,7]]),fo=(e,t)=>({classGroupId:e,validator:t,shapeMask:uo.get(t)??7}),po=()=>({nextPart:new Map,validators:null,classGroupId:void 0}),mo=[],ho=e=>{let{theme:t,classGroups:n}=e,r=po();for(let e in n)go(n[e],r,e,t);return r},go=(e,t,n,r)=>{for(let i=0;i<e.length;i++)_o(e[i],t,n,r)},_o=(e,t,n,r)=>{if(typeof e==`string`){vo(e,t,n);return}if(typeof e==`function`){yo(e,t,n);return}if(So(e)){go(r[e.themeGroupId]||mo,t,n,r);return}bo(e,t,n,r)},vo=(e,t,n)=>{let r=e===``?t:xo(t,e);r.classGroupId=n},yo=(e,t,n)=>{t.validators===null&&(t.validators=[]),t.validators.push(fo(n,e))},bo=(e,t,n,r)=>{let i=Object.entries(e);for(let e=0;e<i.length;e++){let[a,o]=i[e];go(o,xo(t,a),n,r)}},xo=(e,t)=>{let n=e,r=t.split(`-`);for(let e=0;e<r.length;e++){let t=r[e],i=n.nextPart.get(t);i||(i=po(),n.nextPart.set(t,i)),n=i}return n},So=e=>`themeGroupId`in e&&typeof e.themeGroupId==`string`,Co=(e,t)=>{let n=e.length,r=t.length,i=Array(n+r);for(let t=0;t<n;t++)i[t]=e[t];for(let e=0;e<r;e++)i[n+e]=t[e];return i},wo=[],To=e=>{let t=ho(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e,i=e=>{let n=e.length;if(n!==0&&e.charCodeAt(0)===91&&e.charCodeAt(n-1)===93)return Oo(e);let r=e.split(`-`);return Do(r,+(r.length>1&&e.charCodeAt(0)===45),t)},a=(e,t)=>{let i=n[e];if(t){let t=r[e];if(t)return i?Co(i,t):t}return i||Eo},o=new Map,s=e=>{o.has(e)||o.set(e,o.size)};for(let t in e.classGroups)s(t);for(let e in n){s(e);for(let t of n[e])s(t)}for(let e in r){s(e);for(let t of r[e])s(t)}let c=o.size,l=e=>{if(e.length===0)return wo;let t=[];for(let n=0;n<e.length;n++)t.push(o.get(e[n]));return t},u=oa(c,wo),d=oa(c,wo),f=oa(c,``);for(let[e,t]of o)f[t]=e,u[t]=l(a(e,!1)),d[t]=l(a(e,!0));return{getClassGroupId:i,groupIndexes:o,groupCount:c,groupNames:f,conflictRowsBase:u,conflictRowsPostfix:d}},Eo=[],Do=(e,t,n)=>{if(t===e.length)return n.classGroupId;let r=n.nextPart.get(e[t]);if(r){let n=Do(e,t+1,r);if(n)return n}let i=n.validators;if(i===null)return;let a=t===0?e.join(`-`):e.slice(t).join(`-`),o=4,s=a.length;if(s>2){let e=a.charCodeAt(0);e===91&&a.charCodeAt(s-1)===93?o=1:e===40&&a.charCodeAt(s-1)===41&&(o=2)}for(let e=0;e<i.length;e++){let t=i[e];if((t.shapeMask&o)!==0&&t.validator(a))return t.classGroupId}},Oo=e=>{let t=e.slice(1,-1),n=t.indexOf(`:`);if(n===-1)return;let r=t.slice(0,n);return r?`arbitrary..`+r:void 0},ko=(e,t,n,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:void 0}),Ao=[];Object.freeze(Ao);var jo=e=>{let t=null,n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e.charCodeAt(s);if(n===0&&r===0){if(o===58){(t??=[]).push(e.slice(i,s)),i=s+1;continue}if(o===47){a=s;continue}}o===91?n++:o===93?n--:o===40?r++:o===41&&r--}let s=t===null?e:e.slice(i),c=s,l=!1,u=s.length;u!==0&&(s.charCodeAt(u-1)===33?(c=s.slice(0,-1),l=!0):s.charCodeAt(0)===33&&(c=s.slice(1),l=!0));let d=a&&a>i?a-i:void 0;return ko(t===null?Ao:t,l,c,d)},Mo=e=>{let t=new Set(e.orderSensitiveModifiers),n=(e,t)=>{e.sort();for(let n=0;n<e.length;n++)t.push(e[n])};return e=>{let r=[],i=[];for(let a=0;a<e.length;a++){let o=e[a],s=o.length!==0&&o.charCodeAt(0)===91,c=t.has(o);s||c?(i.length>0&&(n(i,r),i=[]),r.push(o)):i.push(o)}return i.length>0&&n(i,r),r}},No=(e,t,n)=>{if(n-t<13)return e.slice(t,n);let r=``;for(let i=t;i<n;i++)r+=e[i];return r},Po={classId:-1,conflictStart:0,conflictEnd:0},Fo=e=>{let t=Mo(e),n=Io(e),{getClassGroupId:r,groupIndexes:i,groupCount:a,groupNames:o,conflictRowsBase:s,conflictRowsPostfix:c}=To(e),l=new Int32Array(256),u=0,d=new Int32Array(64),f=new Int32Array(64),p=new Int32Array(64),m=$i,h=m-1,g=h,_=oa($i,null),v=oa($i,null),y=new Int32Array($i*4),b=new Int32Array($i*4),x=0,S=0,C=()=>{let e=_,t=y,n=m;m=n*2,h=m-1,_=oa(m,null),y=new Int32Array(m*4);for(let r=0;r<n;r++){let n=e[r];if(n===null)continue;let i=r<<2,a=t[i],o=a&h;for(;_[o]!==null;)o=o+1&h;_[o]=n;let s=o<<2;y[s]=a,y[s+1]=t[i+1],y[s+2]=t[i+2],y[s+3]=t[i+3]}},w=()=>{if(m<16384||m<32768&&S>m>>2){S=0,C();return}S=0;let e=v,t=b;v=_,b=y,g=h,e.length===m?(e.fill(null),_=e,y=t):(_=oa(m,null),y=new Int32Array(m*4)),x=0},T=()=>{m=$i,h=m-1,g=h,_=oa($i,null),v=oa($i,null),y=new Int32Array($i*4),b=new Int32Array($i*4),x=0,S=0},E=(e,t,n,r)=>{let i=n-t,a=r&h,o;for(;(o=_[a])!==null;){if(y[a<<2]===r&&o.length===i){let n=0;for(;n<i&&o.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===i)return o}a=a+1&h}let s=r&g;for(;(o=v[s])!==null;){if(b[s<<2]===r&&o.length===i){let n=0;for(;n<i&&o.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===i)return o}s=s+1&g}return null},D=!1,O=0,k=e=>{let t=e.length,n=-1,r=0,i=0,a=0;D=!1;for(let o=0;o<=t;o++){let s=o<t?e.charCodeAt(o):32;if(s===32||s>=9&&s<=13){if(s!==32&&(D=!0),n!==-1){if(r===d.length){let e=r*2,t=new Int32Array(e);t.set(d),d=t;let n=new Int32Array(e);n.set(f),f=n;let i=new Int32Array(e);i.set(p),p=i}d[r]=n,f[r]=o,p[r]=i,r++,a+=o-n,n=-1}}else n===-1&&(n=o,i=na),i=Math.imul(i^s,ra)}return O=a,r},A=new Map,j=new Map,M=new Map,N=0,P=e=>{let t=A.get(e);if(t===void 0&&(t=N++,A.set(e,t),t>=l.length)){let e=new Int32Array(l.length*2);e.set(l),l=e}return t},F=e=>{let t=j.get(e);return t===void 0&&(t=j.size,j.set(e,t)),t},I=new Int32Array(1024),L=0,R=new Map,ee=(e,t,n)=>{let r=i.get(e);if(r===void 0)return{classId:P(t+e),conflictStart:0,conflictEnd:0};let l=F(t)*a,u=M.get(l+r);u===void 0&&(u=P(t+e),M.set(l+r,u));let d=n?c[r]:s[r],f=d.length;if(f===0)return{classId:u,conflictStart:0,conflictEnd:0};let p=(l+r)*2+ +!!n,m=R.get(p);if(m===void 0){if(L+f>I.length){let e=I.length*2;for(;e<L+f;)e*=2;let t=new Int32Array(e);t.set(I),I=t}m=L;for(let e=0;e<f;e++){let n=d[e],r=M.get(l+n);r===void 0&&(r=P(t+o[n]),M.set(l+n,r)),I[m+e]=r}L=m+f,R.set(p,m)}return{classId:u,conflictStart:m,conflictEnd:m+f}},z=e=>{let i=e.length,a=!0;for(let t=0;t<i;t++){let n=e.charCodeAt(t);if(n===58||n===47||n===91||n===40||n===33){a=!1;break}}if(a){let t=r(e);return t?ee(t,``,!1):Po}let{isExternal:o,modifiers:s,hasImportantModifier:c,baseClassName:l,maybePostfixModifierPosition:u}=jo(e);if(o)return Po;let d=!!u,f;if(d){f=r(l.substring(0,u));let e=f&&n[f]?r(l):void 0;e&&e!==f&&(f=e,d=!1)}else f=r(l);if(!f){if(!d||(f=r(l),!f))return Po;d=!1}let p=s.length===0?``:s.length===1?s[0]:t(s).join(`:`),m=c?p+`!`:p;return ee(f,m,d)},te=oa(ea,null),B=new Int32Array(ea),ne=0,re=0,ie=0,ae=0,oe=(e,t)=>{let n=0,r=0,i=0,a=na;for(let e=0;e<t;e++){let t=f[e];t<0||(n++,r+=t-d[e],i=e,a=Math.imul(a^p[e],ra))}if(ie=n,ae=i,n===1||(ne=a&1023,re=a,B[ne]!==a))return null;let o=te[ne];if(o===null||o.length!==r+n-1)return null;let s=0;for(let n=0;n<t;n++){let t=f[n];if(t<0)continue;s!==0&&s++;let r=d[n];for(let n=r;n<t;n++)if(o.charCodeAt(s++)!==e.charCodeAt(n))return null}return o},se=e=>{te[ne]=e,B[ne]=re},ce=new Int32Array,le=new Map,ue=new Map,de=0,fe=new Set,pe=new Set,me=e=>e.indexOf(`[`)===-1||fe.has(e)||pe.has(e)?!0:(fe.add(e),fe.size>2048&&(pe=fe,fe=new Set),!1),he=e=>{let t=k(e);if(D)return ce;let n=new Int32Array(2+t*6);n[0]=t,n[1]=+(O+t-1===e.length);for(let r=0;r<t;r++){let t=d[r],i=f[r],a=i-t,o=p[r],s=0,c=0,l=0,u=!1,C=o&h,T;for(;(T=_[C])!==null;){if(y[C<<2]===o&&T.length===a){let n=0;for(;n<a&&T.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===a){let e=C<<2;s=y[e+1],c=y[e+2],l=y[e+3],u=!0;break}}C=C+1&h}if(!u){let n=o&g,r;for(;(r=v[n])!==null;){if(b[n<<2]===o&&r.length===a){let i=0;for(;i<a&&r.charCodeAt(i)===e.charCodeAt(t+i);)i++;if(i===a){let e=n<<2;s=b[e+1],c=b[e+2],l=b[e+3],_[C]=r;let t=C<<2;y[t]=o,y[t+1]=s,y[t+2]=c,y[t+3]=l,S++,++x>m>>1&&w(),u=!0;break}}n=n+1&g}}if(!u){let n=No(e,t,i),r=z(n);s=r.classId,c=r.conflictStart,l=r.conflictEnd,_[C]=n;let a=C<<2;y[a]=o,y[a+1]=s,y[a+2]=c,y[a+3]=l,++x>m>>1&&w()}let E=2+r*6;n[E]=t,n[E+1]=i,n[E+2]=o,n[E+3]=s,n[E+4]=c,n[E+5]=l}return n},ge=oa(16,ce),_e=new Int32Array(16),ve=()=>{A.clear(),j.clear(),M.clear(),R.clear(),L=0,N=0,le=new Map,ue=new Map,de=0,T()},ye=e=>{let t=k(e);if(t===1){let t=d[0],n=f[0];return t===0&&n===e.length?e:e.slice(t,n)}if(t===0)return``;N>16384&&ve(),u=u+1|0,u===0&&(u=1);let n=u,r=!1;for(let i=t-1;i>=0;--i){let t=d[i],a=f[i],o=a-t,s=p[i],c=sa&&o>=12,u=s&h,C;for(;(C=_[u])!==null;){if(y[u<<2]===s&&C.length===o){if(c){if(e.startsWith(C,t))break}else{let n=0;for(;n<o&&C.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===o)break}}u=u+1&h}if(C!==null){let e=u<<2,t=y[e+1];if(t===-1)continue;if(l[t]===n){f[i]=-a,r=!0;continue}l[t]=n;let o=y[e+3];for(let t=y[e+2];t<o;t++)l[I[t]]=n;continue}let T,E,D;{let n=s&g,r;for(;(r=v[n])!==null;){if(b[n<<2]===s&&r.length===o){if(c){if(e.startsWith(r,t))break}else{let n=0;for(;n<o&&r.charCodeAt(n)===e.charCodeAt(t+n);)n++;if(n===o)break}}n=n+1&g}if(r!==null){C=r;let e=n<<2;T=b[e+1],E=b[e+2],D=b[e+3],S++}else{C=No(e,t,a);let n=z(C);T=n.classId,E=n.conflictStart,D=n.conflictEnd}_[u]=C;let i=u<<2;y[i]=s,y[i+1]=T,y[i+2]=E,y[i+3]=D,++x>m>>1&&w()}if(T!==-1){if(l[T]===n){f[i]=-a,r=!0;continue}l[T]=n;for(let e=E;e<D;e++)l[I[e]]=n}}if(!r&&!D&&e.length===O+t-1)return e;let i=oe(e,t);if(i!==null)return i;if(ie===1){let t=d[ae],n=f[ae],r=E(e,t,n,p[ae]);return r===null?e.slice(t,n):r}let a=``;if(!D){let n=-1,r=0;for(let i=0;i<t;i++){let t=f[i];if(t<0)continue;let o=d[i];n===-1?n=o:o!==r+1&&(a&&(a+=` `),a+=e.slice(n,r),n=o),r=t}return n!==-1&&(a&&(a+=` `),a+=e.slice(n,r)),se(a),a}for(let n=0;n<t;n++){let t=f[n];t<0||(a&&(a+=` `),a+=e.slice(d[n],t))}return se(a),a};return{mergeClassList:ye,mergePreparedParts:(e,t,n)=>{if(N>16384&&ve(),t>_e.length){let e=_e.length;for(;e<t;)e*=2;_e=new Int32Array(e),ge=oa(e,ce)}let r=0,i=!0;for(let a=0;a<t;a++){let t=e[a],o=le.get(t);if(o===void 0&&(o=ue.get(t),o===void 0?(o=he(t),me(t)&&(le.set(t,o),++de>2048&&(de=0,ue=le,le=new Map))):le.set(t,o)),o===ce)return ye(n);ge[a]=o,r+=o[0],o[1]===0&&(i=!1)}let a=0;for(let n=0;n<t;n++)_e[n]=a,a+=e[n].length+1;if(r===0)return``;if(r===1)for(let e=0;e<t;e++){let t=ge[e];if(t[0]===1){let r=_e[e]+t[2],i=_e[e]+t[3];return r===0&&i===n.length?n:n.slice(r,i)}}if(r>d.length){let e=d.length;for(;e<r;)e*=2;let t=new Int32Array(e);t.set(d),d=t;let n=new Int32Array(e);n.set(f),f=n;let i=new Int32Array(e);i.set(p),p=i}u=u+1|0,u===0&&(u=1);let o=u,s=!1,c=r-1;for(let e=t-1;e>=0;e--){let t=ge[e],n=_e[e];for(let e=t[0]-1;e>=0;e--){let r=2+e*6;d[c]=n+t[r];let i=n+t[r+1];p[c]=t[r+2];let a=t[r+3];if(a===-1)f[c]=i;else if(l[a]===o)f[c]=-i,s=!0;else{l[a]=o;let e=t[r+5];for(let n=t[r+4];n<e;n++)l[I[n]]=o;f[c]=i}c--}}if(!s&&i)return n;let m=oe(n,r);if(m!==null)return m;if(ie===1)return n.slice(d[ae],f[ae]);let h=``,g=-1,_=0;for(let e=0;e<r;e++){let t=f[e];if(t<0)continue;let r=d[e];g===-1?g=r:r!==_+1&&(h&&(h+=` `),h+=n.slice(g,_),g=r),_=t}return g!==-1&&(h&&(h+=` `),h+=n.slice(g,_)),se(h),h}}},Io=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},Lo=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Ro(n))&&(i&&(i+=` `),i+=r);return i},Ro=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++){let i=e[r];i&&(t=Ro(i))&&(n&&(n+=` `),n+=t)}return n},zo=e=>{let t=e=>(_(),t(e)),n=(e,t,r)=>(_(),n(e,t,r)),r=Object.create(null),i=Object.create(null),a=0,o=0,s=Zi,c=Zi*2,l=8191,u=4096,d=new Uint8Array(Qi),f=new Uint8Array(Qi),p=0,m=()=>{a=0,o=0,i=r,r=Object.create(null)},h=()=>{s*=2,c=s*2;let e=(l+1)*2;l=e-1,u=e>>1,d=new Uint8Array(e),f=new Uint8Array(e),p=0},g=[],_=()=>{let r=Fo(e());t=r.mergeClassList,n=r.mergePreparedParts},v=(e,t)=>{let n=e.length;if(n>0){let r=n*61+e.charCodeAt(0)*131+e.charCodeAt(n-1)*31+e.charCodeAt(n>>1)*7&l;if(d[r]===0&&f[r]===0){if(d[r]=1,++p>=u){p=0;let e=f;f=d,e.fill(0),d=e}return t}}return r[e]=t,++a>s?s<8192?h():m():a+o>c&&m(),t},y=(e,t)=>(r[e]=t,++o+a>c&&m(),t),b=e=>{let n=i[e];return n===void 0?v(e,t(e)):y(e,n)},x=e=>{let t=r[e];return t===void 0?b(e):t},S=(e,t,a)=>{let o=r[e];return o===void 0?(o=i[e],o===void 0?(g[0]=t,g[1]=a,v(e,n(g,2,e))):y(e,o)):o},C=(e,t,a,o)=>{let s=r[e];return s===void 0?(s=i[e],s===void 0?(g[0]=t,g[1]=a,g[2]=o,v(e,n(g,3,e))):y(e,s)):s},w=e=>{let t=r[e];if(t!==void 0)return t;let n=i[e];if(n!==void 0)return y(e,n)},T=(e,t,r)=>v(e,n(t,r,e)),E=(...e)=>x(Lo(...e));return E.mergeString=x,E.peekString=w,E.mergeParts2=S,E.mergeParts3=C,E.mergeParts=T,E},Bo=e=>({themeGroupId:e}),Vo=zo(()=>{let e=Bo(`color`),t=Bo(`font`),n=Bo(`text`),r=Bo(`font-weight`),i=Bo(`tracking`),a=Bo(`leading`),o=Bo(`breakpoint`),s=Bo(`container`),c=Bo(`spacing`),l=Bo(`radius`),u=Bo(`shadow`),d=Bo(`inset-shadow`),f=Bo(`text-shadow`),p=Bo(`drop-shadow`),m=Bo(`blur`),h=Bo(`perspective`),g=Bo(`aspect`),_=Bo(`ease`),v=Bo(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),U,H],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[U,H,c],T=()=>[Oa,`full`,`auto`,...w()],E=()=>[ka,`none`,`subgrid`,U,H],D=()=>[`auto`,{span:[`full`,ka,U,H]},ka,U,H],O=()=>[ka,`auto`,U,H],k=()=>[`auto`,`min`,`max`,`fr`,U,H],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Oa,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[s,Oa,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Oa,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,U,H],L=()=>[...b(),Ya,Wa,{position:[U,H]}],R=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ee=()=>[`auto`,`cover`,`contain`,Xa,za,{size:[U,H]}],z=()=>[Aa,qa,Ba],te=()=>[``,`none`,`full`,l,U,H],B=()=>[``,V,qa,Ba],ne=()=>[`solid`,`dashed`,`dotted`,`double`],re=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ie=()=>[V,Aa,Ya,Wa],ae=()=>[``,`none`,m,U,H],oe=()=>[`none`,V,U,H],se=()=>[`none`,V,U,H],ce=()=>[V,U,H],le=()=>[Oa,`full`,...w()];return{theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ja],breakpoint:[ja],color:[Ma],container:[ja],"drop-shadow":[ja],ease:[`in`,`out`,`in-out`],font:[La],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ja],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ja],shadow:[ja],spacing:[`px`,V],text:[ja],"text-shadow":[ja],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Oa,H,U,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,U,H]}],"container-named":[Ra],columns:[{columns:[V,`auto`,H,U,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ka,`auto`,U,H]}],basis:[{basis:[Oa,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[V,Oa,`auto`,`initial`,`none`,H]}],grow:[{grow:[``,V,U,H]}],shrink:[{shrink:[``,V,U,H]}],order:[{order:[ka,`first`,`last`,`none`,U,H]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,qa,Ba]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,$a,Ha]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Aa,H]}],"font-family":[{font:[Ja,Ua,t]}],"font-features":[{"font-features":[H]}],"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:[i,U,H]}],"line-clamp":[{"line-clamp":[V,`none`,U,Va]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,U,H]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,U,H]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...ne(),`wavy`]}],"text-decoration-thickness":[{decoration:[V,`from-font`,`auto`,U,Ba]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[V,`auto`,U,H]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[ka,U,H]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,U,H]}],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`,U,H]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:ee()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ka,U,H],radial:[``,U,H],conic:[``,ka,U,H]},Za,Ga]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:z()}],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:te()}],"rounded-s":[{"rounded-s":te()}],"rounded-e":[{"rounded-e":te()}],"rounded-t":[{"rounded-t":te()}],"rounded-r":[{"rounded-r":te()}],"rounded-b":[{"rounded-b":te()}],"rounded-l":[{"rounded-l":te()}],"rounded-ss":[{"rounded-ss":te()}],"rounded-se":[{"rounded-se":te()}],"rounded-ee":[{"rounded-ee":te()}],"rounded-es":[{"rounded-es":te()}],"rounded-tl":[{"rounded-tl":te()}],"rounded-tr":[{"rounded-tr":te()}],"rounded-br":[{"rounded-br":te()}],"rounded-bl":[{"rounded-bl":te()}],"border-w":[{border:B()}],"border-w-x":[{"border-x":B()}],"border-w-y":[{"border-y":B()}],"border-w-s":[{"border-s":B()}],"border-w-e":[{"border-e":B()}],"border-w-bs":[{"border-bs":B()}],"border-w-be":[{"border-be":B()}],"border-w-t":[{"border-t":B()}],"border-w-r":[{"border-r":B()}],"border-w-b":[{"border-b":B()}],"border-w-l":[{"border-l":B()}],"divide-x":[{"divide-x":B()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":B()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...ne(),`hidden`,`none`]}],"divide-style":[{divide:[...ne(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ne(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[V,U,H]}],"outline-w":[{outline:[``,V,qa,Ba]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Qa,Ka]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Qa,Ka]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:B()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[V,Ba]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":B()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Qa,Ka]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[V,U,H]}],"mix-blend":[{"mix-blend":[...re(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":re()}],"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]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[U,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[V]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:ee()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,U,H]}],filter:[{filter:[``,`none`,U,H]}],blur:[{blur:ae()}],brightness:[{brightness:[V,U,H]}],contrast:[{contrast:[V,U,H]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Qa,Ka]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,V,U,H]}],"hue-rotate":[{"hue-rotate":[V,U,H]}],invert:[{invert:[``,V,U,H]}],saturate:[{saturate:[V,U,H]}],sepia:[{sepia:[``,V,U,H]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,U,H]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[V,U,H]}],"backdrop-contrast":[{"backdrop-contrast":[V,U,H]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,V,U,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[V,U,H]}],"backdrop-invert":[{"backdrop-invert":[``,V,U,H]}],"backdrop-opacity":[{"backdrop-opacity":[V,U,H]}],"backdrop-saturate":[{"backdrop-saturate":[V,U,H]}],"backdrop-sepia":[{"backdrop-sepia":[``,V,U,H]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,U,H]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[V,`initial`,U,H]}],ease:[{ease:[`linear`,`initial`,_,U,H]}],delay:[{delay:[V,U,H]}],animate:[{animate:[`none`,v,U,H]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,U,H]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[U,H,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],zoom:[{zoom:[ka,U,H]}],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"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`,U,H]}],"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":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,U,H]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[V,qa,Ba,Va]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},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`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}}),Ho=e=>{let t=e[0],n=t>>1,r=1;for(let t=0;t<n;t++)r+=e[r]+3;e.copyWithin(1,r),e.length-=r-1,e[0]=t-n},Uo=[0],W=(e=>{let t=e.mergeString,n=e.mergeParts2,r=e.mergeParts3,i=e.mergeParts,a=e.peekString,o=new Map,s=new Map,c=0,l=new Int32Array(ta).fill(-1),u=oa(ta,``),d=oa(ta,Uo),f=new Int32Array(ta),p=0,m=0,h=(e,t,n,r)=>{u[r]=e,d[r]=t,f[r]=n,l[p]=r,p=r},g=(e,t,n)=>{let r=m;return m=r+1&2047,l[r]=-1,h(e,t,n,r),r},_=new Set,v=new Set,y=[],b=e=>e.indexOf(`[`)===-1||_.has(e)||v.has(e)?!0:(_.add(e),_.size>500&&(v=_,_=new Set),!1),x=e=>{let t=o.get(e);if(t!==void 0)return t;let n=s.get(e);return n!==void 0&&o.set(e,n),n},S=e=>{c+=e,c>2048&&(c=0,s=o,o=new Map)},C=(e,t)=>(t===void 0?(t=[0],o.set(e,t)):t[0]>=96&&Ho(t),t),w=e=>{for(let t=0,n=e.length;t<n;t++){let n=e[t];n&&typeof n!=`string`&&(e[t]=aa(n))}return I(e,!0)},T=(e,t,n)=>{let r=0;for(let e=n,i=t.length;e<i;e++){let n=t[e];n&&(y[r++]=n)}return i(e,y,r)},E=(e,t,r)=>{let i=e+` `+t,a=n(i,e,t);if(b(i)){let n=C(t,r);n.push(1,e,a,g(t,n,n.length)),n[0]+=1,S(3)}return a},D=(e,n)=>typeof e==`string`&&e!==``?n?A(e,aa(n)):t(e):e?A(aa(e),n):n?t(typeof n==`string`?n:aa(n)):``,O=(e,t)=>{if(t){let n=l[p];if(n!==-1&&u[n]===t){let t=d[n],r=f[n];if(t[r]===1&&t[r+1]===e&&typeof e==`string`&&e!==``)return p=n,t[r+2]}}if(typeof e==`string`&&e!==``&&typeof t==`string`&&t!==``){let n=x(t);if(n!==void 0)for(let r=1,i=n.length;r<i;){let i=n[r];if(i===1&&n[r+1]===e)return h(t,n,r,n[r+3]),n[r+2];r+=i+3}return E(e,t,n)}return D(e,t)},k=(e,n)=>!n&&typeof e==`string`&&e!==``?t(e):O(e,n),A=sa?k:O,j=(e,t,n,i)=>{let a=e+` `+t+` `+n,o=r(a,e,t,n);if(b(a)){let r=C(n,i);r.push(2,e,t,o,g(n,r,r.length)),r[0]+=1,S(4)}return o},M=(e,n,r)=>typeof e==`string`&&e!==``?typeof n==`string`&&n!==``?r?P(e,n,aa(r)):A(e,n):n?P(e,aa(n),r):r?typeof r==`string`?A(e,r):A(e,aa(r)):t(e):e?P(aa(e),n,r):A(n,r),N=(e,n,r)=>{if(r){let t=l[p];if(t!==-1&&u[t]===r){let r=d[t],i=f[t];if(r[i]===2&&r[i+2]===n&&r[i+1]===e&&typeof e==`string`&&e!==``&&typeof n==`string`&&n!==``)return p=t,r[i+3]}}else if(!n&&typeof e==`string`&&e!==``)return t(e);if(typeof e==`string`&&e!==``&&typeof n==`string`&&n!==``&&typeof r==`string`&&r!==``){let t=x(r);if(t!==void 0)for(let i=1,a=t.length;i<a;){let a=t[i];if(a===2&&t[i+2]===n&&t[i+1]===e)return h(r,t,i,t[i+4]),t[i+3];i+=a+3}return j(e,n,r,t)}return M(e,n,r)},P=sa?(e,n,r)=>{if(typeof e==`string`&&e!==``){if(!r){if(!n)return t(e);if(typeof n==`string`)return k(e,n)}else if(!n&&typeof r==`string`)return k(e,r)}return N(e,n,r)}:N,F=(e,t,n,r,i,o,s)=>{let c=e.length,l=t;for(let t=n+1;t<c;t++){let n=e[t];n&&(l+=` `+n)}let u=a(l);if(u===void 0&&(u=T(l,e,n)),b(l)){let t=C(r,s),a=t.length;t.push(o);for(let r=n;r<i;r++){let n=e[r];n&&t.push(n)}t.push(u,g(r,t,a)),t[0]+=1,S(o+2)}return u},I=(e,n)=>{let r=e.length,i=``,a=``,o=-1,s=-1,c=0,m=!0;for(let t=0;t<r;t++){let n=e[t];if(n){if(typeof n!=`string`){m=!1;break}o===-1&&(i=n,o=t),a=n,s=t,c++}}if(m){if(c===0)return``;if(c===1)return t(i);let r=c-1;if(n){let t=l[p];if(t!==-1&&u[t]===a){let n=d[t],i=f[t];if(n[i]===r){let a=i+r,c=!0;for(let t=s-1;t>=o;t--){let r=e[t];if(r&&r!==n[a--]){c=!1;break}}if(c)return p=t,n[i+r+1]}}}let m=x(a);if(m!==void 0)for(let t=1,n=m.length;t<n;){let n=m[t];if(n===r){let r=t+n,i=!0;for(let t=s-1;t>=o;t--){let n=e[t];if(n&&n!==m[r--]){i=!1;break}}if(i)return h(a,m,t,m[t+n+2]),m[t+n+1]}t+=n+3}return F(e,i,o,a,s,r,m)}return w(e)};return function(){let e=arguments[0],n=arguments.length;if(n===1)return t(typeof e==`string`?e:aa(e));if(n===2)return A(e,arguments[1]);if(n===3)return P(e,arguments[1],arguments[2]);let r=n-1,i=arguments[r];for(;!i&&r>0;)i=arguments[--r];let a=l[p];if(a!==-1&&u[a]===i){let e=d[a],t=f[a],i=e[t];if(typeof i==`number`&&i!==0&&i<n){let n=t+i,o=!0;for(let i=r-1;i>=0;i--){let r=arguments[i];if(r){if(n===t||r!==e[n]||typeof r!=`string`){o=!1;break}n--}}if(o&&n===t)return p=a,e[t+i+1]}}let o=Array(n);for(let e=0;e<n;e++)o[e]=arguments[e];return I(o,!1)}})(Vo),Wo=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Go(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Wo(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Ko=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},qo=e=>{let t=Ko(e);return t.charAt(0).toUpperCase()+t.slice(1)},Jo=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Yo={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Xo(e){return e!=null}function Zo(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Yo.width,a=e.size??e.height??Yo.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Jo(...c):Jo(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Yo[`stroke-width`])*Number(e.size??e.width??Yo.width)/Number(t.size??t.width??Yo.width):t.strokeWidth??Yo[`stroke-width`];return[`svg`,{...Object.entries(Yo).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Xo(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Xo(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Xo(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Qo(e,t={}){return Zo(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var $o=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1};D();var es=C({}),ts=()=>l(es);D();var ns=w(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:o,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=ts()??{},b=!!l||$o(f),[x,S,C=[]]=Qo(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:o??g,nonScalingStroke:s??_,className:Jo(y,c),hasA11yProp:b,attributes:f});return a(x,{ref:p,...S},[...C.map(([e,t])=>a(e,t)),...Array.isArray(l)?l:[l]])});D();function rs(e,t=[],n=[]){let r=typeof e==`string`?Go(e,t,n):e,i=w(({className:e,...t},n)=>a(ns,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=qo(r.name)),i}var is={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};is.node;var as=rs(is),os={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};os.node;var ss=rs(os),cs={name:`arrow-up-from-line`,size:24,node:[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]};cs.node;var ls=rs(cs),us={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};us.node;var ds=rs(us),fs={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};fs.node;var ps=rs(fs),ms={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};ms.node;var hs=rs(ms),gs={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};gs.node;var _s=rs(gs),vs={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};vs.node;var ys=rs(vs),bs={name:`chevrons-up-down`,size:24,node:[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]};bs.node;var xs=rs(bs),Ss={name:`copy-check`,size:24,node:[[`path`,{d:`m12 15 2 2 4-4`,key:`2c609p`}],[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};Ss.node;var Cs=rs(Ss),ws={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};ws.node;var Ts=rs(ws),Es={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};Es.node;var Ds=rs(Es),Os={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Os.node;var ks=rs(Os),As={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};As.node;var js=rs(As),Ms={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};Ms.node;var Ns=rs(Ms),Ps={name:`log-in`,size:24,node:[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]};Ps.node;var Fs=rs(Ps),Is={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};Is.node;var Ls=rs(Is),Rs={name:`move-right`,size:24,node:[[`path`,{d:`M18 8L22 12L18 16`,key:`1r0oui`}],[`path`,{d:`M2 12H22`,key:`1m8cig`}]]};Rs.node;var zs=rs(Rs),Bs={name:`move-vertical`,size:24,node:[[`path`,{d:`M12 2v20`,key:`t6zp3m`}],[`path`,{d:`m8 18 4 4 4-4`,key:`bh5tu3`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}]]};Bs.node;var Vs=rs(Bs),Hs={name:`pencil-ruler`,size:24,node:[[`path`,{d:`M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13`,key:`orapub`}],[`path`,{d:`m8 6 2-2`,key:`115y1s`}],[`path`,{d:`m18 16 2-2`,key:`ee94s4`}],[`path`,{d:`m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17`,key:`cfq27r`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Hs.node;var Us=rs(Hs),Ws={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Ws.node;var Gs=rs(Ws),Ks={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Ks.node;var qs=rs(Ks),Js={name:`rotate-ccw`,size:24,node:[[`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`}]]};Js.node;var Ys=rs(Js),Xs={name:`rotate-cw`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]};Xs.node;var Zs=rs(Xs),Qs={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]};Qs.node;var $s=rs(Qs),ec={name:`scan-search`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`path`,{d:`m16 16-1.9-1.9`,key:`1dq9hf`}]]};ec.node;var tc=rs(ec),nc={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};nc.node;var rc=rs(nc),ic={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};ic.node;var ac=rs(ic),oc={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};oc.node;var sc=rs(oc),cc={name:`wand-sparkles`,size:24,node:[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]],aliases:[`wand-2`]};cc.node;var lc=rs(cc),uc={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};uc.node;var dc=rs(uc);function fc(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=fc(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function pc(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=fc(e))&&(r&&(r+=` `),r+=t);return r}var mc=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,hc=pc,gc=(e,t)=>n=>{if(t?.variants==null)return hc(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=mc(t)||mc(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 hc(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)},_c=Object.defineProperty,vc=(e,t)=>_c(e,`name`,{value:t,configurable:!0}),yc=!!(typeof window<`u`&&window.document&&window.document.createElement);function bc(e,t,{checkForDefaultPrevented:n=!0}={}){return vc(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}vc(bc,`composeEventHandlers`);function xc(e){if(!yc)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}vc(xc,`getOwnerWindow`);function Sc(e){if(!yc)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}vc(Sc,`getOwnerDocument`);function Cc(e,t=!1){let{activeElement:n}=Sc(e);if(!n?.nodeName)return null;if(wc(n)&&n.contentDocument)return Cc(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=Sc(n).getElementById(e);if(t)return t}}return n}vc(Cc,`getActiveElement`);function wc(e){return e.tagName===`IFRAME`}vc(wc,`isFrame`),D();var Tc=Object.defineProperty,Ec=(e,t)=>Tc(e,`name`,{value:t,configurable:!0});function Dc(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ec(Dc,`setRef`);function Oc(...e){return t=>{let n=!1,r=e.map(e=>{let r=Dc(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():Dc(e[t],null)}}}}Ec(Oc,`composeRefs`);function kc(...e){return i(Oc(...e),e)}Ec(kc,`useComposedRefs`),D();var Ac=Object.defineProperty,jc=(e,t)=>Ac(e,`name`,{value:t,configurable:!0});function Mc(e,t){let r=C(t);r.displayName=e+`Context`;let i=jc(e=>{let{children:t,...i}=e,a=n(()=>i,Object.values(i));return L(r.Provider,{value:a,children:t})},`Provider`);i.displayName=e+`Provider`;function a(n,i={}){let{optional:a=!1}=i,o=l(r);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${n}\` must be used within \`${e}\``)}return jc(a,`useContext`),[i,a]}jc(Mc,`createContext`);function Nc(e,t=[]){let r=[];function i(t,i){let a=C(i);a.displayName=t+`Context`;let o=r.length;r=[...r,i];let s=jc(t=>{let{scope:r,children:i,...s}=t,c=r?.[e]?.[o]||a,l=n(()=>s,Object.values(s));return L(c.Provider,{value:l,children:i})},`Provider`);s.displayName=t+`Provider`;function c(n,r,s={}){let{optional:c=!1}=s,u=r?.[e]?.[o]||a,d=l(u);if(d)return d;if(i!==void 0)return i;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return jc(c,`useContext`),[s,c]}jc(i,`createContext`);let a=jc(()=>{let t=r.map(e=>C(e));return jc(function(r){let i=r?.[e]||t;return n(()=>({[`__scope${e}`]:{...r,[e]:i}}),[r,i])},`useScope`)},`createScope`);return a.scopeName=e,[i,Pc(a,...t)]}jc(Nc,`createContextScope`);function Pc(...e){let t=e[0];if(e.length===1)return t;let r=jc(()=>{let r=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return jc(function(e){let i=r.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return n(()=>({[`__scope${t.scopeName}`]:i}),[i])},`useComposedScopes`)},`createScope`);return r.scopeName=t.scopeName,r}jc(Pc,`composeContextScopes`),D();var Fc=Object.defineProperty,Ic=(e,t)=>Fc(e,`name`,{value:t,configurable:!0});function Lc(e){let t=w((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];Kc(r)&&typeof Xc==`function`&&(r=Xc(r._payload)),T.forEach(r,e=>{if(Wc(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;Kc(n)&&typeof Xc==`function`&&(n=Xc(n._payload)),a=Vc(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=v(a,void 0,s):!o&&T.count(r)===1&&x(r)&&(a=r);let c=a?Uc(a):void 0,l=kc(n,c);if(!a){if(r||r===0)throw Error(o?Yc(e):Jc(e));return r}let u=Hc(i,a.props??{});return a.type!==d&&(u.ref=n?l:c),v(a,u)});return t.displayName=`${e}.Slot`,t}Ic(Lc,`createSlot`);var Rc=Lc(`Slot`),zc=Symbol.for(`radix.slottable`);function Bc(e){let t=Ic(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=zc,t}Ic(Bc,`createSlottable`);var Vc=Ic((e,t)=>{if(`child`in e.props){let t=e.props.child;return x(t)?v(t,void 0,e.props.children(t.props.children)):null}return x(t)?t:null},`getSlottableElementFromSlottable`);function Hc(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}}Ic(Hc,`mergeProps`);function Uc(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)}Ic(Uc,`getElementRef`);function Wc(e){return x(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===zc}Ic(Wc,`isSlottable`);var Gc=Symbol.for(`react.lazy`);function Kc(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Gc&&`_payload`in e&&qc(e._payload)}Ic(Kc,`isLazyComponent`);function qc(e){return typeof e==`object`&&!!e&&`then`in e}Ic(qc,`isPromiseLike`);var Jc=Ic(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Yc=Ic(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Xc=j.use;D();var Zc=Object.defineProperty,Qc=(e,t)=>Zc(e,`name`,{value:t,configurable:!0});function $c(e){let t=e+`CollectionProvider`,[n,r]=Nc(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=Qc(e=>{let{scope:t,children:n}=e,r=P(null),i=P(new Map).current;return L(a,{scope:t,itemMap:i,collectionRef:r,children:n})},`CollectionProvider`);s.displayName=t;let c=e+`CollectionSlot`,l=Lc(c),u=w((e,t)=>{let{scope:n,children:r}=e,i=kc(t,o(c,n).collectionRef);return L(l,{ref:i,children:r})});u.displayName=c;let d=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=Lc(d),m=w((e,t)=>{let{scope:n,children:r,...i}=e,a=P(null),s=kc(t,a),c=o(d,n);return M(()=>(c.itemMap.set(a,{ref:a,...i}),()=>void c.itemMap.delete(a))),L(p,{[f]:``,ref:s,children:r})});m.displayName=d;function h(t){let n=o(e+`CollectionConsumer`,t);return i(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Qc(h,`useCollection`),[{Provider:s,Slot:u,ItemSlot:m},h,r]}Qc($c,`createCollection`);var el=new WeakMap,tl=class e extends Map{static{Qc(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],el.set(this,!0)}set(e,t){return el.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=il(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=nl(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=nl(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return nl(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function nl(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=rl(e,t);return n===-1?void 0:e[n]}Qc(nl,`at`);function rl(e,t){let n=e.length,r=il(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Qc(rl,`toSafeIndex`);function il(e){return e!==e||e===0?0:Math.trunc(e)}Qc(il,`toSafeInteger`);function al(e){let t=e+`CollectionProvider`,[n,r]=Nc(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new tl,setItemMap:Qc(()=>void 0,`setItemMap`)}),o=Qc(({state:e,...t})=>e?L(c,{...t,state:e}):L(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Qc(e=>{let t=h();return L(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Qc(e=>{let{scope:t,children:n,state:r}=e,a=P(null),[o,s]=N(null),c=kc(a,s),[l,u]=r;return M(()=>{if(!o)return;let e=ll(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),L(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=Lc(l),d=w((e,t)=>{let{scope:n,children:r}=e,i=kc(t,a(l,n).collectionRef);return L(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=Lc(f),m=w((e,t)=>{let{scope:n,children:r,...i}=e,o=P(null),[s,c]=N(null),l=kc(t,o,c),{setItemMap:u}=a(f,n),d=P(i);ol(d.current,i)||(d.current=i);let m=d.current;return M(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(cl):(t.set(s,{...e,element:s}),t.toSorted(cl)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new tl(e)))}},[s,m,u]),L(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return N(new tl)}Qc(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Qc(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}Qc(al,`createCollection`);function ol(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Qc(ol,`shallowEqual`);function sl(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Qc(sl,`isElementPreceding`);function cl(e,t){return!e[1].element||!t[1].element?0:sl(e[1].element,t[1].element)?-1:1}Qc(cl,`sortByDocumentPosition`);function ll(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Qc(ll,`getChildListObserver`),D();var ul=Object.defineProperty,dl=(e,t)=>ul(e,`name`,{value:t,configurable:!0}),fl=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Lc(`Primitive.${t}`),r=w((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),L(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pl(e,t){e&&b(()=>e.dispatchEvent(t))}dl(pl,`dispatchDiscreteCustomEvent`),D();var ml=Object.defineProperty,hl=(e,t)=>ml(e,`name`,{value:t,configurable:!0});function gl(e){let t=P(e);return M(()=>{t.current=e}),n(()=>((...e)=>t.current?.(...e)),[])}hl(gl,`useCallbackRef`),D();var _l=Object.defineProperty,vl=(e,t)=>_l(e,`name`,{value:t,configurable:!0}),yl=`dismissableLayer.update`,bl=`dismissableLayer.pointerDownOutside`,xl=`dismissableLayer.focusOutside`,Sl,Cl=C({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),wl=w(vl(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:u,...d}=e,f=l(Cl),[p,m]=N(null),h=p?.ownerDocument??globalThis?.document,[,g]=N({}),_=kc(t,m),v=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),b=y?v.indexOf(y):-1,x=p?v.indexOf(p):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,C=x>=b,w=P(!1),T=Ol(e=>{o?.(e),c?.(e),e.defaultPrevented||u?.()},{ownerDocument:h,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:w,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:i(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return C&&!t},[f.branches,C])}),E=kl(e=>{if(r&&w.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(s?.(e),c?.(e),e.defaultPrevented||u?.())},h),D=p?x===v.length-1:!1,O=gl(e=>{e.key===`Escape`&&(a?.(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))});return M(()=>{if(D)return h.addEventListener(`keydown`,O,{capture:!0}),()=>h.removeEventListener(`keydown`,O,{capture:!0})},[h,D,O]),M(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Sl=h.body.style.pointerEvents,h.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),Al(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(h.body.style.pointerEvents=Sl))}},[p,h,n,f]),M(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),Al())},[p,f]),M(()=>{let e=vl(()=>g({}),`handleUpdate`);return document.addEventListener(yl,e),()=>document.removeEventListener(yl,e)},[]),L(fl.div,{...d,ref:_,style:{pointerEvents:S?C?`auto`:`none`:void 0,...e.style},onFocusCapture:bc(e.onFocusCapture,E.onFocusCapture),onBlurCapture:bc(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:bc(e.onPointerDownCapture,T.onPointerDownCapture)})},`DismissableLayer`)),Tl=w(vl(function(e,t){let n=l(Cl),r=P(null),i=kc(t,r);return M(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),L(fl.div,{...e,ref:i})},`DismissableLayerBranch`));function El(){let e=l(Cl),[t,n]=N(null);return M(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}vl(El,`useDismissableLayerSurface`);var Dl=vl(()=>!0,`IS_TRUE`);function Ol(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Dl}=t,s=gl(e),c=P(!1),l=P(!1),u=P(new Map),d=P(()=>{});return M(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}vl(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}vl(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}vl(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}vl(p,`handleInteractionBubble`);let m=vl(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||jl(bl,s,p,{discrete:!0})};if(vl(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:vl(()=>c.current=!0,`onPointerDownCapture`)}}vl(Ol,`usePointerDownOutside`);function kl(e,t=globalThis?.document){let n=gl(e),r=P(!1);return M(()=>{let e=vl(e=>{e.target&&!r.current&&jl(xl,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:vl(()=>r.current=!0,`onFocusCapture`),onBlurCapture:vl(()=>r.current=!1,`onBlurCapture`)}}vl(kl,`useFocusOutside`);function Al(){let e=new CustomEvent(yl);document.dispatchEvent(e)}vl(Al,`dispatchUpdate`);function jl(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?pl(i,a):i.dispatchEvent(a)}vl(jl,`handleAndDispatchCustomEvent`);var Ml=wl,Nl=Tl;D();var Pl=globalThis?.document?F:()=>{};D();var Fl=Object.defineProperty,Il=w(((e,t)=>Fl(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=N(!1);Pl(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?E(L(fl.div,{...r,ref:t}),o):null},`Portal`));D();var Ll=Object.defineProperty,Rl=(e,t)=>Ll(e,`name`,{value:t,configurable:!0});function zl(e,t){return f((e,n)=>t[e][n]??e,e)}Rl(zl,`useStateMachine`);var Bl=Rl(e=>{let{present:t,children:n}=e,r=Vl(t),i=typeof n==`function`?n({present:r.isPresent}):T.only(n),a=Ul(r.ref,Gl(i));return typeof n==`function`||r.isPresent?v(i,{ref:a}):null},`Presence`);function Vl(e){let[t,n]=N(),r=P(null),a=P(e),o=P(`none`),s=P(void 0),[c,l]=zl(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return M(()=>{c===`mounted`?(o.current=s.current??Wl(r.current),s.current=void 0):o.current=`none`},[c]),Pl(()=>{let t=r.current,n=a.current;if(n!==e){let r=o.current,i=Wl(t);e?(s.current=i,l(`MOUNT`)):i===`none`||t?.display===`none`?l(`UNMOUNT`):l(n&&r!==i?`ANIMATION_OUT`:`UNMOUNT`),a.current=e}},[e,l]),Pl(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,i=Rl(i=>{let o=Wl(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&o&&(l(`ANIMATION_END`),!a.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Rl(e=>{e.target===t&&(o.current=Wl(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,i),t.addEventListener(`animationend`,i),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,i),t.removeEventListener(`animationend`,i)}}l(`ANIMATION_END`)},[t,l]),{isPresent:[`mounted`,`unmountSuspended`].includes(c),ref:i(e=>{if(e){let t=getComputedStyle(e);r.current=t,s.current=Wl(t)}else r.current=null;n(e)},[])}}Rl(Vl,`usePresence`);function Hl(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Rl(Hl,`setRef`);function Ul(...e){let t=P(e);return t.current=e,i(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Hl(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Hl(n[e],null)}}},[])}Rl(Ul,`useStableComposedRefs`);function Wl(e){return e?.animationName||`none`}Rl(Wl,`getAnimationName`);function Gl(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)}Rl(Gl,`getElementRef`),D();var Kl=Object.defineProperty,ql=(e,t)=>Kl(e,`name`,{value:t,configurable:!0}),Jl=j.useEffectEvent,Yl=j.useInsertionEffect;function Xl(e){if(typeof Jl==`function`)return Jl(e);let t=P(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Yl==`function`?Yl(()=>{t.current=e}):Pl(()=>{t.current=e}),n(()=>((...e)=>t.current?.(...e)),[])}ql(Xl,`useEffectEvent`),D();var Zl=Object.defineProperty,Ql=(e,t)=>Zl(e,`name`,{value:t,configurable:!0}),$l=j.useInsertionEffect||Pl;function eu({prop:e,defaultProp:t,onChange:n=Ql(()=>{},`onChange`),caller:r}){let[a,o,s]=tu({defaultProp:t,onChange:n}),c=e!==void 0;return[c?e:a,i(t=>{if(c){let n=nu(t)?t(e):t;n!==e&&s.current?.(n)}else o(t)},[c,e,o,s])]}Ql(eu,`useControllableState`);function tu({defaultProp:e,onChange:t}){let[n,r]=N(e),i=P(n),a=P(t);return $l(()=>{a.current=t},[t]),M(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Ql(tu,`useUncontrolledState`);function nu(e){return typeof e==`function`}Ql(nu,`isFunction`);var ru=Symbol(`RADIX:SYNC_STATE`);function iu(e,t,r,i){let{prop:a,defaultProp:o,onChange:s,caller:c}=t,l=a!==void 0,u=Xl(s),d=[{...r,state:o}];i&&d.push(i);let[p,m]=f((t,n)=>{if(n.type===ru)return{...t,state:n.state};let r=e(t,n);return l&&!Object.is(r.state,t.state)&&u(r.state),r},...d),h=p.state,g=P(h);M(()=>{g.current!==h&&(g.current=h,l||u(h))},[h,g,l]);let _=n(()=>a===void 0?p:{...p,state:a},[p,a]);return M(()=>{l&&!Object.is(a,p.state)&&m({type:ru,state:a})},[a,p.state,l]),[_,m]}Ql(iu,`useControllableStateReducer`),D();var au=Object.defineProperty,ou=(e,t)=>au(e,`name`,{value:t,configurable:!0}),su=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),cu=w(ou(function(e,t){return L(fl.span,{...e,ref:t,style:{...su,...e.style}})},`VisuallyHidden`)),lu=t({Action:()=>rd,Close:()=>id,Description:()=>nd,Provider:()=>Qu,Root:()=>ed,Title:()=>td,Toast:()=>Nu,ToastAction:()=>Vu,ToastClose:()=>Uu,ToastDescription:()=>zu,ToastProvider:()=>bu,ToastTitle:()=>Ru,ToastViewport:()=>Tu,Viewport:()=>$u,createToastScope:()=>_u});D();var uu=Object.defineProperty,du=(e,t)=>uu(e,`name`,{value:t,configurable:!0}),fu=`ToastProvider`,[pu,mu,hu]=$c(`Toast`),[gu,_u]=Nc(`Toast`,[hu]),[vu,yu]=gu(fu),bu=du(e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:a=`right`,swipeThreshold:o=50,announcerContainer:s,children:c}=e,[l,u]=N(null),[d,f]=N(0),p=P(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${fu}\`. Expected non-empty \`string\`.`),L(pu.Provider,{scope:t,children:L(vu,{scope:t,label:n,duration:r,swipeDirection:a,swipeThreshold:o,toastCount:d,viewport:l,onViewportChange:u,onToastAdd:i(()=>f(e=>e+1),[]),onToastRemove:i(()=>f(e=>e-1),[]),isClosePausedRef:p,announcerContainer:s,children:c})})},`ToastProvider`),xu=`ToastViewport`,Su=[`F8`],Cu=`toast.viewportPause`,wu=`toast.viewportResume`,Tu=w(du(function(e,t){let{__scopeToast:n,hotkey:r=Su,label:a=`Notifications ({hotkey})`,...o}=e,s=yu(xu,n),c=mu(n),l=P(null),u=P(null),d=P(null),f=P(null),p=kc(t,f,s.onViewportChange),m=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),h=s.toastCount>0;M(()=>{let e=du(e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&f.current?.focus()},`handleKeyDown`);return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),M(()=>{let e=l.current,t=f.current;if(h&&e&&t){let n=du(()=>{if(!s.isClosePausedRef.current){let e=new CustomEvent(Cu);t.dispatchEvent(e),s.isClosePausedRef.current=!0}},`handlePause`),r=du(()=>{if(s.isClosePausedRef.current){let e=new CustomEvent(wu);t.dispatchEvent(e),s.isClosePausedRef.current=!1}},`handleResume`),i=du(t=>{e.contains(t.relatedTarget)||r()},`handleFocusOutResume`),a=du(()=>{e.contains(document.activeElement)||r()},`handlePointerLeaveResume`);return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[h,s.isClosePausedRef]);let g=i(({tabbingDirection:e})=>{let t=c().map(t=>{let n=t.ref.current,r=[n,...Xu(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[c]);return M(()=>{let e=f.current;if(e){let t=du(t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){u.current?.focus();return}let i=g({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Zu(i.slice(a+1))?t.preventDefault():r?u.current?.focus():d.current?.focus()}},`handleKeyDown`);return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[c,g]),L(Nl,{ref:l,role:`region`,"aria-label":a.replace(`{hotkey}`,m),tabIndex:-1,style:{pointerEvents:h?void 0:`none`},children:[h&&L(Du,{ref:u,onFocusFromOutsideViewport:()=>{Zu(g({tabbingDirection:`forwards`}))}}),L(pu.Slot,{scope:n,children:L(fl.ol,{tabIndex:-1,...o,ref:p})}),h&&L(Du,{ref:d,onFocusFromOutsideViewport:()=>{Zu(g({tabbingDirection:`backwards`}))}})]})},`ToastViewport`)),Eu=`ToastFocusProxy`,Du=w(du(function(e,t){let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=yu(Eu,n);return L(cu,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})},`ToastFocusProxy`)),Ou=`Toast`,ku=`toast.swipeStart`,Au=`toast.swipeMove`,ju=`toast.swipeCancel`,Mu=`toast.swipeEnd`,Nu=w(du(function(e,t){let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=eu({prop:r,defaultProp:i??!0,onChange:a,caller:Ou});return L(Bl,{present:n||s,children:L(Iu,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:gl(e.onPause),onResume:gl(e.onResume),onSwipeStart:bc(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:bc(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:bc(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:bc(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})},`Toast`)),[Pu,Fu]=gu(Ou,{onClose(){}}),Iu=w(du(function(e,t){let{__scopeToast:r,type:a=`foreground`,duration:o,open:s,onClose:c,onEscapeKeyDown:l,onPause:u,onResume:f,onSwipeStart:p,onSwipeMove:m,onSwipeCancel:h,onSwipeEnd:g,..._}=e,v=yu(Ou,r),y=mu(r),[b,x]=N(null),S=kc(t,x),C=P(null),w=P(null),T=o||v.duration,D=P(0),O=P(T),k=P(0),{onToastAdd:A,onToastRemove:j}=v,F=gl(()=>{b?.contains(document.activeElement)&&v.viewport?.focus(),c()}),I=i(e=>{e&&e!==1/0&&(window.clearTimeout(k.current),D.current=new Date().getTime(),k.current=window.setTimeout(F,e))},[F]);M(()=>{let e=v.viewport;if(e){let t=du(()=>{I(O.current),f?.()},`handleResume`),n=du(()=>{let e=new Date().getTime()-D.current;O.current-=e,window.clearTimeout(k.current),u?.()},`handlePause`);return e.addEventListener(Cu,n),e.addEventListener(wu,t),()=>{e.removeEventListener(Cu,n),e.removeEventListener(wu,t)}}},[v.viewport,T,u,f,I]),M(()=>{s&&!v.isClosePausedRef.current&&I(T)},[s,T,v.isClosePausedRef,I]),M(()=>()=>{window.clearTimeout(k.current)},[]),M(()=>(A(),()=>j()),[A,j]);let R=n(()=>b?Gu(b):null,[b]);return v.viewport?L(d,{children:[R&&L(Lu,{__scopeToast:r,role:`status`,"aria-live":a===`foreground`?`assertive`:`polite`,children:R}),L(Pu,{scope:r,onClose:F,children:E(L(pu.ItemSlot,{scope:r,children:L(Ml,{asChild:!0,onEscapeKeyDown:bc(l,e=>{y().some(t=>t.ref.current?.contains(e.target))||F()}),children:L(fl.li,{tabIndex:0,"data-state":s?`open`:`closed`,"data-swipe-direction":v.swipeDirection,..._,ref:S,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:bc(e.onKeyDown,e=>{e.key===`Escape`&&(l?.(e.nativeEvent),e.nativeEvent.defaultPrevented||F())}),onPointerDown:bc(e.onPointerDown,e=>{e.button===0&&(C.current={x:e.clientX,y:e.clientY})}),onPointerMove:bc(e.onPointerMove,e=>{if(!C.current)return;let t=e.clientX-C.current.x,n=e.clientY-C.current.y,r=!!w.current,i=[`left`,`right`].includes(v.swipeDirection),a=[`left`,`up`].includes(v.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},u={originalEvent:e,delta:l};r?(w.current=l,Ku(Au,m,u,{discrete:!1})):qu(l,v.swipeDirection,c)?(w.current=l,Ku(ku,p,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(C.current=null)}),onPointerUp:bc(e.onPointerUp,e=>{let t=w.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),w.current=null,C.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};qu(t,v.swipeDirection,v.swipeThreshold)?Ku(Mu,g,r,{discrete:!0}):Ku(ju,h,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null},`ToastImpl`)),Lu=du(e=>{let{__scopeToast:t,children:n,...r}=e,i=yu(Ou,t),[a,o]=N(!1),[s,c]=N(!1);return Ju(()=>o(!0)),M(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:L(Il,{asChild:!0,container:i.announcerContainer||void 0,children:L(cu,{...r,children:a&&L(d,{children:[i.label,` `,n]})})})},`ToastAnnounce`),Ru=w(du(function(e,t){let{__scopeToast:n,...r}=e;return L(fl.div,{...r,ref:t})},`ToastTitle`)),zu=w(du(function(e,t){let{__scopeToast:n,...r}=e;return L(fl.div,{...r,ref:t})},`ToastDescription`)),Bu=`ToastAction`,Vu=w(du(function(e,t){let{altText:n,...r}=e;return n.trim()?L(Wu,{altText:n,asChild:!0,children:L(Uu,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Bu}\`. Expected non-empty \`string\`.`),null)},`ToastAction`)),Hu=`ToastClose`,Uu=w(du(function(e,t){let{__scopeToast:n,...r}=e,i=Fu(Hu,n);return L(Wu,{asChild:!0,children:L(fl.button,{type:`button`,...r,ref:t,onClick:bc(e.onClick,i.onClose)})})},`ToastClose`)),Wu=w(du(function(e,t){let{__scopeToast:n,altText:r,...i}=e;return L(fl.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})},`ToastAnnounceExclude`));function Gu(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Yu(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n){if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Gu(e))}}}),t}du(Gu,`getAnnounceTextContent`);function Ku(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?pl(i,a):i.dispatchEvent(a)}du(Ku,`handleAndDispatchCustomEvent`);var qu=du((e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n},`isDeltaInDirection`);function Ju(e=()=>{}){let t=gl(e);Pl(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}du(Ju,`useNextFrame`);function Yu(e){return e.nodeType===e.ELEMENT_NODE}du(Yu,`isHTMLElement`);function Xu(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:du(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}du(Xu,`getTabbableCandidates`);function Zu(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}du(Zu,`focusFirst`);var Qu=bu,$u=Tu,ed=Nu,td=Ru,nd=zu,rd=Vu,id=Uu,ad=lu,od=({className:e,...t})=>L($u,{className:W(`fixed top-0 z-100 flex max-h-screen w-full flex-col-reverse p-4 sm:inset-e-0 sm:top-auto sm:bottom-0 sm:flex-col md:max-w-105`,e),...t}),sd=gc(`group data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-xl p-4 pe-6 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all [corner-shape:squircle] data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[state=closed]:animate-out data-[state=open]:animate-in data-[swipe=end]:animate-out data-[swipe=move]:transition-none supports-[corner-shape:squircle]:rounded-3xl`,{variants:{variant:{error:`bg-error/40 text-foreground`,success:`bg-success/30 text-foreground`,default:`bg-card/80 text-foreground`}},defaultVariants:{variant:`default`}}),cd=({className:e,variant:t,...n})=>L(ed,{className:W(sd({variant:t}),e),...n}),ld=({className:e,...t})=>L(id,{className:W(`absolute inset-e-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground/80 focus:opacity-100 focus:outline-hidden focus:ring-1 group-hover:opacity-100 group-[.error]:text-red-300 group-[.error]:focus:ring-red-400 group-[.error]:focus:ring-offset-red-600 group-[.error]:hover:text-red-50`,e),"toast-close":``,...t,children:L(dc,{className:`size-5`})}),ud=({className:e,...t})=>L(td,{className:W(`font-semibold text-sm [&+div]:text-xs`,e),...t}),dd=({className:e,...t})=>L(nd,{className:W(`overflow-scroll text-sm opacity-90`,e),...t}),fd=()=>{let{toasts:e}=xe();return L(ad.Provider,{children:[e.map(({id:e,title:t,description:n,action:r,...i})=>L(cd,{...i,children:[L(`div`,{className:`grid gap-1`,children:[t&&L(ud,{children:t}),n&&L(dd,{children:n})]}),r,L(ld,{})]},e)),L(od,{})]})};D();var pd=C({});D();function md(e){let t=P(null);return t.current===null&&(t.current=e()),t.current}var hd=typeof window<`u`;D();var gd=hd?F:M;D();var _d=C(null);function vd(e,t){e.indexOf(t)===-1&&e.push(t)}function yd(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var bd=(e,t,n)=>n>t?t:n<e?e:n,xd={},Sd=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Cd=e=>typeof e==`object`&&!!e,wd=e=>/^0[^.\s]+$/u.test(e);function Td(e){let t;return()=>(t===void 0&&(t=e()),t)}var Ed=e=>e,Dd=(...e)=>e.reduce((e,t)=>n=>t(e(n))),Od=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},kd=class{constructor(){this.subscriptions=[]}add(e){return vd(this.subscriptions,e),()=>this.remove(e)}remove(e){yd(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r){if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},Ad=e=>e*1e3,jd=e=>e/1e3,Md=(e,t)=>t?1e3/t*e:0,Nd=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Pd=1e-7,Fd=12;function Id(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Nd(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Pd&&++s<Fd);return o}function Ld(e,t,n,r){if(e===t&&n===r)return Ed;let i=t=>Id(t,0,1,e,n);return e=>e===0||e===1?e:Nd(i(e),t,r)}var Rd=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zd=e=>t=>1-e(1-t),Bd=Ld(.33,1.53,.69,.99),Vd=zd(Bd),Hd=Rd(Vd),Ud=e=>e>=1?1:(e*=2)<1?.5*Vd(e):.5*(2-2**(-10*(e-1))),Wd=e=>1-Math.sin(Math.acos(e)),Gd=zd(Wd),Kd=Rd(Wd),qd=Ld(.42,0,1,1),Jd=Ld(0,0,.58,1),Yd=Ld(.42,0,.58,1),Xd=e=>Array.isArray(e)&&typeof e[0]!=`number`,Zd=e=>Array.isArray(e)&&typeof e[0]==`number`,Qd={linear:Ed,easeIn:qd,easeInOut:Yd,easeOut:Jd,circIn:Wd,circInOut:Kd,circOut:Gd,backIn:Vd,backInOut:Hd,backOut:Bd,anticipate:Ud},$d=e=>typeof e==`string`,ef=e=>{if(Zd(e)){e.length;let[t,n,r,i]=e;return Ld(t,n,r,i)}return $d(e)?(Qd[e],`${e}`,Qd[e]):e},tf={delta:0,timestamp:0,isProcessing:!1},nf;function rf(){nf=void 0}var af={now:()=>(nf===void 0&&af.set(tf.isProcessing||xd.useManualTiming?tf.timestamp:performance.now()),nf),set:e=>{nf=e,queueMicrotask(rf)}},of=e=>Math.round(e*1e5)/1e5,sf=e=>t=>typeof t==`string`&&t.startsWith(e),cf=sf(`--`),lf=sf(`var(--`),uf=e=>lf(e)?df.test(e.split(`/*`)[0].trim()):!1,df=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ff(e){return typeof e==`string`&&e.split(`/*`)[0].includes(`var(--`)}var pf={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},mf={...pf,transform:e=>bd(0,1,e)},hf={...pf,default:1},gf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _f(e){return e==null}var vf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,yf=(e,t)=>n=>!!(typeof n==`string`&&vf.test(n)&&n.startsWith(e)||t&&!_f(n)&&Object.prototype.hasOwnProperty.call(n,t)),bf=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(gf);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},xf=e=>bd(0,255,e),Sf={...pf,transform:e=>Math.round(xf(e))},Cf={test:yf(`rgb`,`red`),parse:bf(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Sf.transform(e)+`, `+Sf.transform(t)+`, `+Sf.transform(n)+`, `+of(mf.transform(r))+`)`};function wf(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Tf={test:yf(`#`),parse:wf,transform:Cf.transform},Ef=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Df=Ef(`deg`),Of=Ef(`%`),G=Ef(`px`),kf=Ef(`vh`),Af=Ef(`vw`),jf={...Of,parse:e=>Of.parse(e)/100,transform:e=>Of.transform(e*100)},Mf={test:yf(`hsl`,`hue`),parse:bf(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Of.transform(of(t))+`, `+Of.transform(of(n))+`, `+of(mf.transform(r))+`)`},Nf={test:e=>Cf.test(e)||Tf.test(e)||Mf.test(e),parse:e=>Cf.test(e)?Cf.parse(e):Mf.test(e)?Mf.parse(e):Tf.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Cf.transform(e):Mf.transform(e),getAnimatableNone:e=>{let t=Nf.parse(e);return t.alpha=0,Nf.transform(t)}},Pf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Ff=new RegExp(gf.source),If=new RegExp(Pf.source,`i`);function Lf(e){return isNaN(e)&&typeof e==`string`&&(Ff.test(e)||If.test(e))}var Rf=`number`,zf=`color`,Bf=`var`,Vf=`var(`,Hf="${}",Uf=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Wf(e){let t=e.toString();return Ff.test(t)||If.test(t)}function Gf(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(Uf,e=>(Nf.test(e)?(r.color.push(a),i.push(zf),n.push(Nf.parse(e))):e.startsWith(Vf)?(r.var.push(a),i.push(Bf),n.push(e)):(r.number.push(a),i.push(Rf),n.push(parseFloat(e))),++a,Hf)).split(Hf),indexes:r,types:i}}function Kf(e){return Gf(e).values}function qf({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];i+=e===Rf?of(r[a]):e===zf?Nf.transform(r[a]):r[a]}return i}}function Jf(e){return qf(Gf(e))}var Yf=e=>typeof e==`number`?0:Nf.test(e)?Nf.getAnimatableNone(e):e,Xf=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:Yf(e);function Zf(e){let t=Gf(e);return qf(t)(t.values.map((e,n)=>Xf(e,t.split[n])))}var Qf={test:Lf,parse:Kf,createTransformer:Jf,getAnimatableNone:Zf};function $f(e,t,n){return 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}function ep({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=$f(s,r,e+1/3),a=$f(s,r,e),o=$f(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function tp(e,t){return n=>n>0?t:e}var np=(e,t,n)=>e+(t-e)*n,rp=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},ip=[Tf,Cf,Mf],ap=e=>ip.find(t=>t.test(e));function op(e){let t=ap(e);if(!t)return`${e}`,!1;let n=t.parse(e);return t===Mf&&(n=ep(n)),n}var sp=(e,t)=>{let n=op(e),r=op(t);if(!n||!r)return tp(e,t);let i={...n};return e=>(i.red=rp(n.red,r.red,e),i.green=rp(n.green,r.green,e),i.blue=rp(n.blue,r.blue,e),i.alpha=np(n.alpha,r.alpha,e),Cf.transform(i))},cp=new Set([`none`,`hidden`]);function lp(e,t){return cp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function up(e,t){return n=>np(e,t,n)}function dp(e){return typeof e==`number`?up:typeof e==`string`?uf(e)?tp:Nf.test(e)?sp:hp:Array.isArray(e)?fp:typeof e==`object`?Nf.test(e)?sp:pp:tp}function fp(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>dp(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function pp(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=dp(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function mp(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var hp=(e,t)=>{let n=Qf.createTransformer(t),r=Gf(e),i=Gf(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?cp.has(e)&&!i.values.length||cp.has(t)&&!r.values.length?lp(e,t):Dd(fp(mp(r,i),i.values),n):(`${e}${t}`,tp(e,t))},gp=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function _p(e,t){let n=gp.exec(e);if(!n)return;let r=gp.exec(t);if(!r||n[2]!==r[2])return;let i=n[2],a=parseFloat(n[1]),o=parseFloat(r[1]);return e=>of(np(a,o,e))+i}function vp(e,t,n){if(typeof e==`number`&&typeof t==`number`&&typeof n==`number`)return np(e,t,n);if(typeof e==`string`&&typeof t==`string`){let n=_p(e,t);if(n)return n}return dp(e)(e,t)}var yp=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function bp(e){let t=new Set,n=new Set,r=!1,i=!1,a=new Set,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(n.add(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var xp=40;function Sp(e,t,n={delta:0,timestamp:0,isProcessing:!1}){let r=!1,i=!0,a=()=>r=!0,o=yp.reduce((e,t)=>(e[t]=bp(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=xd.useManualTiming,o=a?n.timestamp:performance.now();r=!1,a||(n.delta=i?1e3/60:Math.max(Math.min(o-n.timestamp,xp),1)),n.timestamp=o,n.isProcessing=!0,s.process(n),c.process(n),l.process(n),u.process(n),d.process(n),f.process(n),p.process(n),m.process(n),n.isProcessing=!1,r&&t&&(i=!1,e(h))},g=()=>{r=!0,i=!0,n.isProcessing||e(h)};return{schedule:yp.reduce((e,t)=>{let n=o[t];return e[t]=(e,t=!1,i=!1)=>(r||g(),n.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<yp.length;t++)o[yp[t]].cancel(e)},state:n,steps:o}}var{schedule:Cp,cancel:wp,steps:Tp}=Sp(typeof requestAnimationFrame<`u`?requestAnimationFrame:Ed,!0,tf),Ep=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>Cp.update(t,e),stop:()=>wp(t),now:()=>tf.isProcessing?tf.timestamp:af.now()}},Dp=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Op=2e4;function kp(e,t=50,n=Op,r){let i=0,a=e.next(i);for(r?.push(a.value);!a.done&&i<n;)i+=t,a=e.next(i),r?.push(a.value);return i>=n?1/0:i}function Ap(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(kp(r),Op);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:jd(i)}}var jp={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},Mp=e=>e<0?1/Math.max(1+e,jp.minDamping):Math.max(1-e,jp.minDamping);function Np(e,t){if(!(e>1))return 1;let n=Math.sqrt(e*e-1),r=e-n,i=e+n,a=2*n*Math.exp(-t)*(1+t);return Ip(e=>i*Math.exp(-r*e)-r*Math.exp(-i*e)-a,e=>Math.exp(-i*e)-Math.exp(-r*e),t)/t}function Pp(e,t){return e*Math.sqrt(1-t*t)}var Fp=12;function Ip(e,t,n){let r=n;for(let n=1;n<Fp;n++)r-=e(r)/t(r);return r}var Lp=.001;function Rp({duration:e=jp.duration,bounce:t=jp.bounce}){let n,r;jp.maxDuration;let i=Mp(t);e=bd(jp.minDuration,jp.maxDuration,jd(e)),i<1?(n=t=>{let n=t*i,r=n*e,a=Pp(t,i),o=Math.exp(-r);return Lp-n/a*o},r=t=>{let r=t*i*e,a=i*i*t*t*e,o=Math.exp(-r),s=Pp(t*t,i);return(-n(t)+Lp>0?-1:1)*-a*o/s}):(n=t=>-.001+Math.exp(-t*e)*(t*e+1),r=t=>Math.exp(-t*e)*(-t*(e*e)));let a=5/e,o=Ip(n,r,a),s=o*Np(i,o*e),c=s*s;return{stiffness:c,damping:i*2*Math.sqrt(c),duration:Ad(e)}}var zp=(e,t)=>(t?e>=0:e>0)&&e<1/0;function Bp(e,t){if(zp(e,t))return e}function Vp(e){let t=Bp(e.stiffness),n=Bp(e.damping,!0),r=Bp(e.mass),i={...e,stiffness:t??jp.stiffness,damping:n??jp.damping,mass:r??jp.mass,isResolvedFromDuration:!1,isTimeDefined:(t??n??r)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(i.isTimeDefined){if(e.visualDuration){let t=Mp(e.bounce||0),n=2*Math.PI/(e.visualDuration*1.2)*Np(t,2*Math.PI/1.2);i.stiffness=n*n,i.damping=2*t*Math.sqrt(i.stiffness)}else Object.assign(i,Rp(i)),i.isResolvedFromDuration=!0;(!zp(i.stiffness)||!zp(i.damping,!0))&&(i.stiffness=jp.stiffness,i.damping=jp.damping)}return i}function Hp(e=jp.visualDuration,t=jp.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},r=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:o,damping:s,mass:c,duration:l,isResolvedFromDuration:u,isTimeDefined:d}=Vp({...n}),f=e=>d?0:-jd(e),p=s/(2*Math.sqrt(o*c)),m=jd(Math.sqrt(o/c)),h=p*m,g={target:i,delta:i-r,velocity:f(n.velocity||0)||0,restSpeed:0,restDelta:0},_=()=>{let e=Math.abs(g.delta)<5;g.restSpeed=n.restSpeed||(e?jp.restSpeed.granular:jp.restSpeed.default),g.restDelta=n.restDelta||(e?jp.restDelta.granular:jp.restDelta.default)};_();let v,y,b;if(p<1){let e=Pp(m,p),t={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};b=()=>{t.A=(g.velocity+h*g.delta)/e,t.sinC=h*t.A+g.delta*e,t.cosC=h*g.delta-t.A*e};let n=n=>{n!==t.t&&(t.t=n,t.env=Math.exp(-h*n),t.sin=Math.sin(e*n),t.cos=Math.cos(e*n))};v=e=>(n(e),g.target-t.env*(t.A*t.sin+g.delta*t.cos)),y=e=>(n(e),t.env*(t.sinC*t.sin+t.cosC*t.cos))}else if(p===1){v=e=>g.target-Math.exp(-m*e)*(g.delta+(g.velocity+m*g.delta)*e);let e={C:0};b=()=>{e.C=g.velocity+m*g.delta},y=t=>Math.exp(-m*t)*(m*e.C*t-g.velocity)}else{let e=m*Math.sqrt(p*p-1),t=h-e,n=h+e,r=d?1/0:300/e,i=(e,t)=>Math.exp(t>r?-e*r-h*(t-r):-e*t),a={S:0,F:0};b=()=>{let t=(g.velocity+h*g.delta)/e;a.S=(g.delta+t)/2,a.F=(g.delta-t)/2},v=e=>g.target-a.S*i(t,e)-a.F*i(n,e),y=e=>t*a.S*i(t,e)+n*a.F*i(n,e)}b();let x=u&&l||null,S={calculatedDuration:x,retarget:(e,t)=>{g.target=e[e.length-1],g.delta=g.target-e[0],g.velocity=f(t),n.restSpeed&&n.restDelta||_(),S.calculatedDuration=x,a.done=!1,b()},velocity:e=>Ad(y(e)),next:e=>{let t=v(e);if(u)a.done=e>=l;else{let n=Ad(y(e));a.done=Math.abs(n)<=g.restSpeed&&Math.abs(g.target-t)<=g.restDelta}return a.value=a.done?g.target:t,a},toString:()=>{let e=Math.min(kp(S),Op),t=Dp(t=>S.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return S}Hp.applyToOptions=e=>{let t=Ap(e,100,Hp);return e.ease=t.ease,e.duration=Ad(t.duration),e.type=`keyframes`,e};function Up({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>e<s||e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>{let t=v(e);f.done=Math.abs(t)<=l,f.value=f.done?_:_+t},b,x,S=e=>{p(f.value)&&(b=e,x=Hp({keyframes:[f.value,m(f.value)],velocity:-v(e)/r*1e3,damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return S(0),{calculatedDuration:null,next:e=>{let t=!1;return!x&&b===void 0&&(t=!0,y(e),S(e)),b!==void 0&&e>=b?x.next(e-b):(!t&&y(e),f)}}}function Wp(e,t,n){let r=[],i=n||xd.mix||vp,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=Dd(Array.isArray(t)?t[n]||Ed:t,a)),r.push(a)}return r}function Gp(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=Wp(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=Od(e[r],e[r+1],n);return s[r](i)};return n?t=>l(bd(e[0],e[a-1],t)):l}function Kp(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=Od(0,t,r);e.push(np(n,1,i))}}function qp(e){let t=[0];return Kp(t,e.length-1),t}function Jp(e,t){return e.map(e=>e*t)}function Yp(e,t){return e.map(()=>t||Yd).splice(0,e.length-1)}function Xp({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=Xd(r)?r.map(ef):ef(r)||Yd,a={done:!1,value:t[0]};if(t.length===2&&!Array.isArray(i)&&(!n||n.length!==2||n[0]===0&&n[1]===1)){let[n,r]=t,o=n===r?void 0:(xd.mix||vp)(n,r);return{calculatedDuration:e,next:t=>(a.value=o?o(i(e>0?bd(0,1,t/e):1)):r,a.done=t>=e,a)}}let o=Gp(Jp(n&&n.length===t.length?n:qp(t),e),t,{ease:Array.isArray(i)?i:Yp(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var Zp=5;function Qp(e,t,n){let r=Math.max(t-Zp,0);return Md(n-e(r),t-r)}function $p(e,t,n=0){return t<=0?n:e.velocity?e.velocity(t):Qp(t=>e.next(t).value,t,e.next(t).value)}var em=e=>e!==null;function tm(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(em),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var nm={decay:Up,inertia:Up,tween:Xp,keyframes:Xp,spring:Hp};function rm(e){typeof e.type==`string`&&(e.type=nm[e.type])}function im(e,t){return{kind:e,animation:t,timestamp:af.now(),frameTimestamp:tf.timestamp,frameIsProcessing:tf.isProcessing}}function am(e,t,n){let r=globalThis.__MOTION_INSPECT__;if(r)try{r({...im(`animation-start`,e),options:n?{...t,...n}:t})}catch{}}function om(e,t){let n=globalThis.__MOTION_INSPECT__;if(n)try{n({...im(`layout-animation-start`,e),node:t})}catch{}}var sm=class{constructor(){this.isResolved=!1}get finished(){return this._finished||=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e}),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,t){return this.finished.then(e,t)}},cm=e=>e/100,lm=class extends sm{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==af.now()&&this.tick(af.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),am(this,this.options)}initAnimation(){let{options:e}=this;rm(e);let{type:t=Xp,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||Xp;s!==Xp&&typeof o[0]!=`number`&&(this.mixKeyframes=Dd(cm,vp(o[0],o[1])),o=[0,100]);let c=s(o===e.keyframes?e:{...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=kp(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.currentTime=this.holdTime===null?t:this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),_=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let v=this.currentTime,y=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(y=a)),v=bd(0,1,n)*o}let b;_?(this.delayState.value=l[0],b=this.delayState):b=y.next(v),i&&!_&&(b.value=i(b.value));let{done:x}=b;!_&&s!==null&&(x=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&p!==Up&&(b.value=tm(l,this.options,h,this.speed)),m&&m(b.value),S&&this.finish(),b}then(e,t){return this.finished.then(e,t)}get duration(){return jd(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+jd(e)}get time(){return jd(this.currentTime)}set time(e){e=Ad(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return $p(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(af.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=jd(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Ep,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(af.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}},um=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function dm(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(gf)||[];if(!r)return e;let i=n.replace(r,``),a=+!!um.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var fm=/\b([a-z-]*)\(.*?\)/gu,pm={...Qf,getAnimatableNone:e=>{let t=e.match(fm);return t?t.map(dm).join(` `):e}},mm={...Qf,getAnimatableNone:e=>{let t=Qf.parse(e);return Qf.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},hm={...pf,transform:Math.round},gm={borderWidth:G,borderTopWidth:G,borderRightWidth:G,borderBottomWidth:G,borderLeftWidth:G,borderRadius:G,borderTopLeftRadius:G,borderTopRightRadius:G,borderBottomRightRadius:G,borderBottomLeftRadius:G,width:G,maxWidth:G,height:G,maxHeight:G,top:G,right:G,bottom:G,left:G,inset:G,insetBlock:G,insetBlockStart:G,insetBlockEnd:G,insetInline:G,insetInlineStart:G,insetInlineEnd:G,padding:G,paddingTop:G,paddingRight:G,paddingBottom:G,paddingLeft:G,paddingBlock:G,paddingBlockStart:G,paddingBlockEnd:G,paddingInline:G,paddingInlineStart:G,paddingInlineEnd:G,margin:G,marginTop:G,marginRight:G,marginBottom:G,marginLeft:G,marginBlock:G,marginBlockStart:G,marginBlockEnd:G,marginInline:G,marginInlineStart:G,marginInlineEnd:G,fontSize:G,backgroundPositionX:G,backgroundPositionY:G,rotate:Df,pathRotation:Df,rotateX:Df,rotateY:Df,rotateZ:Df,scale:hf,scaleX:hf,scaleY:hf,scaleZ:hf,skew:Df,skewX:Df,skewY:Df,distance:G,translateX:G,translateY:G,translateZ:G,x:G,y:G,z:G,perspective:G,transformPerspective:G,opacity:mf,originX:jf,originY:jf,originZ:G,zIndex:hm,fillOpacity:mf,strokeOpacity:mf,numOctaves:hm},_m={...gm,color:Nf,backgroundColor:Nf,outlineColor:Nf,fill:Nf,stroke:Nf,borderColor:Nf,borderTopColor:Nf,borderRightColor:Nf,borderBottomColor:Nf,borderLeftColor:Nf,filter:pm,WebkitFilter:pm,mask:mm,WebkitMask:mm},vm=e=>_m[e],ym=new Set([pm,mm]);function bm(e,t){let n=vm(e);return ym.has(n)||(n=Qf),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function xm(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var Sm=e=>e*180/Math.PI,Cm=e=>Tm(Sm(Math.atan2(e[1],e[0]))),wm={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Cm,rotateZ:Cm,skewX:e=>Sm(Math.atan(e[1])),skewY:e=>Sm(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Tm=e=>(e%=360,e<0&&(e+=360),e),Em=Cm,Dm=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Om=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),km={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Dm,scaleY:Om,scale:e=>(Dm(e)+Om(e))/2,rotateX:e=>Tm(Sm(Math.atan2(e[6],e[5]))),rotateY:e=>Tm(Sm(Math.atan2(-e[2],e[0]))),rotateZ:Em,rotate:Em,skewX:e=>Sm(Math.atan(e[4])),skewY:e=>Sm(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Am(e){return+!!e.includes(`scale`)}function jm(e,t){if(!e||e===`none`)return Am(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=km,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=wm,i=t}if(!i)return Am(t);let a=r[t],o=i[1].split(`,`).map(Nm);return typeof a==`function`?a(o):o[a]}var Mm=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return jm(n,t)};function Nm(e){return parseFloat(e.trim())}var Pm=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Fm=new Set([...Pm,`pathRotation`]),Im=e=>e===pf||e===G,Lm=new Set([`x`,`y`,`z`]),Rm=Pm.filter(e=>!Lm.has(e));function zm(e){let t=[];return Rm.forEach(n=>{let r=e.getValue(n);if(r!==void 0){let e=r.get(),i=+!!n.startsWith(`scale`);if(e===i)return;t.push([n,e]),r.set(i)}}),t}var Bm=new Set([`bottom`,`right`]);function Vm(e,t,n,r,i,a){let o=parseFloat(e);if(!isNaN(o))return o;let{min:s,max:c}=t()[n],l=c-s;return a===`border-box`?l:l-parseFloat(r)-parseFloat(i)}var Hm={width:({width:e,paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r},i)=>Vm(e,i,`x`,t,n,r),height:({height:e,paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r},i)=>Vm(e,i,`y`,t,n,r),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{let{y:n}=t();return parseFloat(e)+(n.max-n.min)},right:({left:e},t)=>{let{x:n}=t();return parseFloat(e)+(n.max-n.min)},x:({transform:e})=>jm(e,`x`),y:({transform:e})=>jm(e,`y`)};Hm.translateX=Hm.x,Hm.translateY=Hm.y;var Um=new Set,Wm=!1,Gm=!1,Km=!1;function qm(){if(Gm){let e=[],t=new Set,n=new Set;Um.forEach(r=>{r.needsMeasurement&&(e.push(r),t.add(r.element),Bm.has(r.name)&&n.add(r.element))});let r=new Map;n.forEach(e=>{let t=zm(e);t.length&&(r.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=r.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Gm=!1,Wm=!1,Um.forEach(e=>e.complete(Km)),Um.clear()}function Jm(){Um.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Gm=!0)})}function Ym(){Km=!0,Jm(),qm(),Km=!1}function Xm(e,t,n){if(typeof e==`string`){if(Sd(e)||wd(e))return parseFloat(e);if(!Qf.test(e)&&Qf.test(n))return bm(t,n)}return e??void 0}var Zm=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(Um.add(this),Wm||(Wm=!0,Cp.read(Jm),Cp.resolveKeyframes(qm))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=Xm(n.readValue(t,a),t,a);r!==void 0&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}xm(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Um.delete(this)}cancel(){this.state===`scheduled`&&(Um.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Qm=e=>e.startsWith(`--`);function $m(e,t,n){Qm(t)?e.style.setProperty(t,n):e.style[t]=n}var eh={};function th(e,t){let n=Td(e);return()=>eh[t]??n()}var nh=th(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),rh=th(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),ih=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ah={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:ih([0,.65,.55,1]),circOut:ih([.55,0,1,.45]),backIn:ih([.31,.01,.66,-.59]),backOut:ih([.33,1.53,.69,.99])};function oh(e,t){if(e)return typeof e==`function`?rh()?Dp(e,t):`ease-out`:Zd(e)?ih(e):Array.isArray(e)?e.map(e=>oh(e,t)||ah.easeOut):ah[e]}function sh(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=oh(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function ch(e){return typeof e==`function`&&`applyToOptions`in e}function lh({type:e,...t}){return ch(e)&&rh()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var uh=class extends sm{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=lh(e);this.animation=sh(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=tm(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),$m(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()},am(this,e,c)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e!==`idle`&&e!==`finished`&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return jd(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+jd(e)}get time(){return jd(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Ad(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:t,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&nh()?(this.animation.timeline=e,t?.(this.animation),Ed):n(this)}},dh={anticipate:Ud,backInOut:Hd,circInOut:Kd};function fh(e){return e in dh}function ph(e){typeof e.ease==`string`&&fh(e.ease)&&(e.ease=dh[e.ease])}var mh=10,hh=class extends uh{constructor(e){ph(e),rm(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new lm({...a,autoplay:!1}),s=Math.max(mh,af.now()-this.startTime),c=bd(0,mh,s-mh),l=o.sample(s).value,{name:u}=this.options;i&&u&&$m(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},gh=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Qf.test(e)||e===`0`)&&!e.startsWith(`url(`));function _h(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function vh(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=gh(i,t),s=gh(a,t);return!o||!s?(o!==s&&`${t}${i}${a}${o?a:i}`,!1):_h(e)||(n===`spring`||ch(n))&&r}function yh(e){e.duration=0,e.type=`keyframes`}var bh=new Set([`opacity`,`clipPath`,`filter`,`transform`,`backgroundColor`]),xh=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Sh(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&xh.test(e[t]))return!0;return!1}var Ch=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),wh=Td(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function Th(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!n||!(bh.has(n)||Ch.has(n)))return!1;let c=t?.owner?.current;if(!(c instanceof HTMLElement)&&!(c instanceof SVGElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return wh()&&(bh.has(n)||Ch.has(n)&&Sh(s))&&(n!==`transform`||!u)&&!l&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var Eh=40,Dh=class extends sm{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=af.now();let{keyframes:t,name:n,motionValue:r,element:i}=e,a=e;a.autoplay??=!0,a.delay??=0,a.type??=`keyframes`,a.repeat??=0,a.repeatDelay??=0,a.repeatType??=`loop`;let o=i?.KeyframeResolver||Zm;this.keyframeResolver=new o(t,(e,t,n)=>this.onKeyframesResolved(e,t,a,!n),n,r,i),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=af.now();let u=!0;vh(e,i,a,o)||(u=!1,(xd.instantAnimations||!s)&&l?.(tm(e,n,t)),e[0]=e[e.length-1],yh(n),n.repeat=0);let d=r?this.resolvedAt&&this.resolvedAt-this.createdAt>Eh?this.resolvedAt:this.createdAt:void 0,{onComplete:f}=n;n.startTime??=d,n.finalKeyframe=t,n.keyframes=e,n.onComplete=()=>{f?.(),this.notifyFinished()};let p=u&&!c&&Th(n),m;if(p){n.element=n.motionValue?.owner?.current;try{m=new hh(n)}catch{m=new lm(n)}}else m=new lm(n);this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this._animation.finished:super.finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Ym()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function Oh(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var kh=30,Ah=e=>!isNaN(parseFloat(e)),jh={current:void 0},Mh=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=af.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=af.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Ah(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){var n;return e===`change`?this.onChangeSubscribe(t):((n=this.events)[e]||(n[e]=new kd)).add(t)}onChangeSubscribe(e){let{events:t}=this;return!t.change&&!this.changeSubscriber?this.changeSubscriber=e:(t.change||(t.change=new kd,t.change.add(this.changeSubscriber),this.changeSubscriber=void 0),t.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:t.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){Cp.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){let{current:e,changeSubscriber:t}=this;t?t(e):this.events.change?.notify(e)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return jh.current&&jh.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=af.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>kh)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,kh);return Md(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0;let n=!1,r;r=e(()=>{n=!0,this.events.animationComplete?.notify(),this.animation===r&&this.clearAnimation(),t()}),n||(this.animation=r),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Nh(e,t){return new Mh(e,t)}function Ph(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Fh(e,t){let n=e?.[t]??e?.default??e;return n===e?n:Ph(n,e)}var Ih={type:`spring`,stiffness:500,damping:25,restSpeed:10},Lh=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Rh={type:`keyframes`,duration:.8},zh={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Bh=(e,{keyframes:t})=>t.length>2?Rh:Fm.has(e)?e.startsWith(`scale`)?Lh(t[1]):Ih:zh,Vh=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Hh(e){for(let t in e)if(!Vh.has(t))return!0;return!1}var Uh=(e,t,n,r={},i,a)=>o=>{let s=Fh(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=Ad(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};Hh(s)||Object.assign(u,Bh(e,u)),u.duration&&=Ad(u.duration),u.repeatDelay&&=Ad(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(yh(u),u.delay===0&&(d=!0)),(xd.instantAnimations||xd.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,yh(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=tm(u.keyframes,s);if(e!==void 0){Cp.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new lm(u):new Dh(u)},Wh=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Gh(e){let t=Wh.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Kh(e,t,n=1){`${e}`;let[r,i]=Gh(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Sd(e)?parseFloat(e):e}return uf(i)?Kh(i,t,n+1):i}function qh(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Jh(e,t,n,r){let i=t=>typeof t==`function`?t(n===void 0?e.custom:n,...qh(r)):t;return t=i(t),typeof t==`string`&&(t=e.variants&&e.variants[t]),i(t)}function Yh(e,t,n){return Jh(e.getProps(),t,n,e)}var Xh=(e,t)=>t===`exit`?e.presenceContext?.custom:void 0,Zh=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Pm]),Qh=e=>Array.isArray(e);function $h(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Nh(n))}function eg(e){return Qh(e)?e[e.length-1]||0:e}function tg(e,t){let{transitionEnd:n={},transition:r={},...i}=Yh(e,t)||{};i={...i,...n};for(let t in i)$h(e,t,eg(i[t]))}var ng=e=>!!(e&&e.getVelocity);function rg(e){return!!(ng(e)&&e.add)}function ig(e,t){let n=e.getValue(`willChange`);if(rg(n))return n.add(t);if(!n&&xd.WillChange){let n=new xd.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function ag(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var og=`data-`+ag(`framerAppearId`);function sg(e){return e.props[og]}var cg=typeof window<`u`;function lg({protectedKeys:e,needsAnimating:t},n){let r=n in e&&!t[n];return t[n]=!1,r}function ug(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?Ph(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState?.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&lg(f,t))continue;let o={delay:n,...Fh(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){Cp.update(()=>r.set(i));continue}let p=!1;if(cg&&window.MotionHandoffAnimation){let n=sg(e);if(n){let e=window.MotionHandoffAnimation(n,t,Cp);e!==null&&(o.startTime=e,p=!0)}}ig(e,t);let m=l??e.shouldReduceMotion;r.start(Uh(t,r,i,m&&Zh.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>Cp.update(()=>{o&&tg(e,o)});d.length?Promise.all(d).then(t):t()}return d}function dg(e,t,n={}){let r=Yh(e,t,Xh(e,n.type)),i=n.transitionOverride||(r?.transition??(e.getDefaultTransition()||{})),a=()=>Promise.all(r?ug(e,r,n):[]),o=(r=0)=>{let{variantChildren:a}=e,{delayChildren:o=0,staggerChildren:s,staggerDirection:c}=i,l=[];return a?.forEach(e=>{e.notify(`AnimationStart`,t),l.push(dg(e,t,{...n,delay:r+(typeof o==`function`?0:o)+Oh(a,e,o,s,c)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(l)},{when:s}=i;return s?s===`beforeChildren`?a().then(()=>o()):o().then(a):Promise.all([a(),o(n.delay)])}function fg(e,t,n={}){return e.notify(`AnimationStart`,t),(Array.isArray(t)?Promise.all(t.map(t=>dg(e,t,n))):typeof t==`string`?dg(e,t,n):Promise.all(ug(e,Yh(e,t,n.custom),n))).then(()=>{e.notify(`AnimationComplete`,t)})}var pg={test:e=>e===`auto`,parse:e=>e},mg=e=>t=>t.test(e),hg=[pf,G,Of,Df,Af,kf,pg],gg=e=>hg.find(mg(e));function _g(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||wd(e)}var vg=new Set([`auto`,`none`,`0`]);function yg(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!vg.has(t)&&Wf(t)&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]!==i&&(e[r]=bm(n,i))}var bg=class extends Zm{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),uf(r))){let i=Kh(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Zh.has(n)||e.length!==2)return;let[r,i]=e;if(typeof r==`number`&&typeof i==`number`)return;let a=gg(r),o=gg(i);if(ff(r)!==ff(i)&&Hm[n]){this.needsMeasurement=!0;return}if(a!==o){if(Im(a)&&Im(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else Hm[n]&&(this.needsMeasurement=!0)}}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||_g(e[t]))&&n.push(t);n.length&&yg(e,n,t)}measure(){let{element:e,name:t}=this;return Hm[t](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&this.motionValue?.jump(r,!1)}measureEndState(){let{element:e,unresolvedKeyframes:t}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);let n=t.length-1,r=t[n];t[n]=this.measure(),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},xg=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function Sg(e){return Cd(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}function Cg(e){return Cd(e)&&`ownerSVGElement`in e}var wg=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function Tg(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var Eg={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Dg=Pm.length;function Og(e,t,n){let r=``,i=!0;for(let a=0;a<Dg;a++){let o=Pm[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=wg(s,gm[o]);if(!c){i=!1;let t=Eg[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${wg(a,gm.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function kg(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Fm.has(e)){o=!0;continue}if(cf(e)){i[e]=n;continue}{let t=wg(n,gm[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Og(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var Ag={offset:`stroke-dashoffset`,array:`stroke-dasharray`},jg={offset:`strokeDashoffset`,array:`strokeDasharray`};function Mg(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?Ag:jg;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var Ng=[`transform`,`opacity`,`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function Pg(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(kg(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;for(let e of Ng)d[e]!==void 0&&(f[e]=d[e],delete d[e]);(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox),t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&Mg(d,i,a,o,!1)}function Fg({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ig({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Lg(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Rg(e){return e===void 0||e===1}function zg({scale:e,scaleX:t,scaleY:n}){return!Rg(e)||!Rg(t)||!Rg(n)}function Bg(e){return zg(e)||Vg(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Vg(e){return Hg(e.x)||Hg(e.y)}function Hg(e){return e&&e!==`0%`}function Ug(e,t,n){return n+t*(e-n)}function Wg(e,t,n,r,i){return i!==void 0&&(e=Ug(e,i,r)),Ug(e,n,r)+t}function Gg(e,t=0,n=1,r,i){e.min=Wg(e.min,t,n,r,i),e.max=Wg(e.max,t,n,r,i)}function Kg(e,{x:t,y:n}){Gg(e.x,t.translate,t.scale,t.originPoint),Gg(e.y,n.translate,n.scale,n.originPoint)}var qg=.999999999999,Jg=1.0000000000001;function Yg(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(Xg(e.x,-a.scroll.offset.x),Xg(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,Kg(e,o)),r&&Bg(a.latestValues)&&$g(e,a.latestValues,a.layout?.layoutBox))}t.x<Jg&&t.x>qg&&(t.x=1),t.y<Jg&&t.y>qg&&(t.y=1)}function Xg(e,t){e.min+=t,e.max+=t}function Zg(e,t,n,r,i=.5){Gg(e,t,n,np(e.min,e.max,i),r)}function Qg(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function $g(e,t,n){let r=n??e;Zg(e.x,Qg(t.x,r.x),t.scaleX,t.scale,t.originX),Zg(e.y,Qg(t.y,r.y),t.scaleY,t.scale,t.originY)}function e_(e,t){return Fg(Lg(e.getBoundingClientRect(),t))}function t_(e,t,n){let r=e_(e,n),{scroll:i}=t;return i&&(Xg(r.x,i.offset.x),Xg(r.y,i.offset.y)),r}var{schedule:n_,cancel:r_}=Sp(queueMicrotask,!1),i_={x:!1,y:!1};function a_(){return i_.x||i_.y}function o_(e){return e===`x`||e===`y`?i_[e]?null:(i_[e]=!0,()=>{i_[e]=!1}):i_.x||i_.y?null:(i_.x=i_.y=!0,()=>{i_.x=i_.y=!1})}function s_(e,t){let n=Tg(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function c_(e){return!(e.pointerType===`touch`||a_())}function l_(e,t,n={}){let[r,i,a]=s_(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!c_(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var u_=(e,t)=>t?e===t||u_(e,t.parentElement):!1,d_=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,f_=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function p_(e){return f_.has(e.tagName)||e.isContentEditable===!0}var m_=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function h_(e){return m_.has(e.tagName)||e.isContentEditable===!0}var g_=new WeakSet;function __(e){return t=>{t.key===`Enter`&&e(t)}}function v_(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var y_=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=__(()=>{if(g_.has(n))return;v_(n,`down`);let e=__(()=>{v_(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>v_(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function b_(e){return d_(e)&&!a_()}var x_=new WeakSet;function S_(e,t,n={}){let[r,i,a]=s_(e,n),o=e=>{let r=e.currentTarget;if(!b_(e)||x_.has(e))return;g_.add(r),n.stopPropagation&&x_.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),g_.has(r)&&g_.delete(r),b_(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||u_(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),Sg(e)&&(e.addEventListener(`focus`,e=>y_(e,i)),!p_(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}var C_=new WeakMap,w_,T_=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Cg(r)&&`getBBox`in r?r.getBBox()[t]:r[n],E_=T_(`inline`,`width`,`offsetWidth`),D_=T_(`block`,`height`,`offsetHeight`);function O_({target:e,borderBoxSize:t}){C_.get(e)?.forEach(n=>{n(e,{get width(){return E_(e,t)},get height(){return D_(e,t)}})})}function k_(e){e.forEach(O_)}function A_(){typeof ResizeObserver<`u`&&(w_=new ResizeObserver(k_))}function j_(e,t){w_||A_();let n=Tg(e);return n.forEach(e=>{let n=C_.get(e);n||(n=new Set,C_.set(e,n)),n.add(t),w_?.observe(e)}),()=>{n.forEach(e=>{let n=C_.get(e);n?.delete(t),n?.size||w_?.unobserve(e)})}}var M_=new Set,N_;function P_(){N_=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};M_.forEach(t=>t(e))},window.addEventListener(`resize`,N_)}function F_(e){return M_.add(e),N_||P_(),()=>{M_.delete(e),!M_.size&&typeof N_==`function`&&(window.removeEventListener(`resize`,N_),N_=void 0)}}function I_(e,t){return typeof e==`function`?F_(e):j_(e,t)}var L_={value:null,addProjectionMetrics:null};function R_(e){return Cg(e)&&e.tagName===`svg`}var z_=e=>typeof e==`number`?e:parseFloat(e),B_=()=>({translate:0,scale:1,origin:0,originPoint:0}),V_=()=>({x:B_(),y:B_()}),H_=()=>({min:0,max:0}),U_=()=>({x:H_(),y:H_()}),W_=new WeakMap;function G_(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function K_(e){return typeof e==`string`||Array.isArray(e)}var q_=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],J_=[`initial`,...q_];function Y_(e){if(G_(e.animate))return!0;for(let t=0;t<J_.length;t++)if(K_(e[J_[t]]))return!0;return!1}function X_(e){return!!(Y_(e)||e.variants)}function Z_(e,t,n){for(let r in t){let i=t[r],a=n[r];if(ng(i))e.addValue(r,i);else if(ng(a))e.addValue(r,Nh(i,{owner:e}));else if(a!==i){if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Nh(t===void 0?i:t,{owner:e}))}}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var Q_={current:null},$_={current:!1},ev=typeof window<`u`;function tv(){if($_.current=!0,ev){if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>Q_.current=e.matches;e.addEventListener(`change`,t),t()}else Q_.current=!1}}var nv=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],rv={};function iv(e){rv=e}function av(){return rv}var ov=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Zm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=af.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Cp.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=Y_(t),this.isVariantNode=X_(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&ng(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];if(this.current=e,W_.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let e=this;do e=e.props.inherit!==!1&&e.parent;while(e&&!e.isVariantNode);if(e){let{variantChildren:t}=e;t.add(this),this.removeFromVariantTree=()=>t.delete(this)}}this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:($_.current||tv(),this.shouldReduceMotion=Q_.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),wp(this.notifyUpdate),wp(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&bh.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new uh({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:Ad(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=Fm.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&Cp.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in rv){let t=rv[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):U_()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<nv.length;t++){let n=nv[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=Z_(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,t){let n=this.values.get(e);if(t!==n){n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t);let r=t.get();r!==void 0&&(this.latestValues[e]=r)}}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Nh(t??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Sd(n)||wd(n))?n=parseFloat(n):typeof n!=`number`&&!Qf.test(n)&&Qf.test(t)&&(n=bm(e,t)),this.setBaseTarget(e,ng(n)?n.get():n)),ng(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}on(e,t){return this.events[e]||(this.events[e]=new kd),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){n_.render(this.render)}},sv=class extends ov{constructor(){super(...arguments),this.KeyframeResolver=bg}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;ng(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},cv=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function lv(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}var uv={};function dv(e,{layout:t,layoutId:n}){return Fm.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!uv[e]||e===`opacity`)}function fv(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(ng(r[t])||i&&ng(i[t])||dv(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function pv(e){return window.getComputedStyle(e)}var mv=class extends sv{constructor(){super(...arguments),this.type=`html`,this.renderInstance=lv}mount(e){e.style,super.mount(e)}readValueFromInstance(e,t){if(Fm.has(t))return this.projection?.isProjecting?Am(t):Mm(e,t);{let n=pv(e),r=(cf(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return e_(e,t)}build(e,t,n){kg(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return fv(e,t,n)}},hv=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),gv=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function _v(e,t,n,r){lv(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(hv.has(n)?n:ag(n),t.attrs[n])}function vv(e,t,n){let r=fv(e,t,n);for(let n in e)if(ng(e[n])||ng(t[n])){let t=Pm.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var yv=class extends sv{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=U_}getBaseTargetFromProps(e,t){return Fm.has(t)?super.getBaseTargetFromProps(e,t)??Am(t):e[t]}getDefaultValue(e){return Fm.has(e)?this.latestValues[e]??Am(e):void 0}readValueFromInstance(e,t){if(Fm.has(t)){let e=vm(t);return e&&e.default||0}if(Ng.includes(t)){let n=getComputedStyle(e)[t];if(typeof n==`string`&&n)return n.trim()}return t=hv.has(t)?t:ag(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return vv(e,t,n)}build(e,t,n){Pg(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){_v(e,t,n,r)}mount(e){this.isSVGTag=gv(e.tagName),super.mount(e)}};function bv(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var xv=[...q_].reverse();function Sv(e){let t=t=>Promise.all(t.map(({animation:t,options:n})=>fg(e,t,n))),n=wv(),r=!0,i=!1;function a(a){let{props:o,parent:s,manuallyAnimateOnMount:c}=e,l=r||i,u=[],d=new Set,f={},p=1/0,m=e;do m=m.props.inherit!==!1&&m.parent;while(m&&!m.isControllingVariants);if(xv.forEach((t,r)=>{let i=n[t],h=o[t],g=m&&m.props[t],_=h===void 0?K_(g)||g===!1?g:void 0:h,v=K_(_),y=t===a?i.isActive:null;y===!1&&(p=r);let b=v&&h===void 0&&!(l&&c);if(i.protectedKeys={...f},!i.isActive&&y===null||!_&&!i.prevProp||G_(_)||typeof _==`boolean`)return;if(t===`exit`&&i.isActive&&y!==!0){f={...f,...i.prevResolvedValues};return}let x=Cv(i.prevProp,_),S=x||v&&(y&&!b||r>p),C=!1,w=Array.isArray(_)?_:[_],T={};if(y!==!1)for(let n of w){let{transition:r,transitionEnd:i,...a}=Yh(e,n,Xh(e,t))||{};T={...T,...a,...i}}let{prevResolvedValues:E}=i;for(let t in{...E,...T}){if(t in f)continue;let n=T[t],r=E[t],a=Array.isArray(n)&&Array.isArray(r)?!bv(n,r)||x:n!==r;if(a&&n==null)d.add(t);else if(a||n!==void 0&&d.has(t)){S=!0,d.delete(t)&&(C=!0),i.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)}else i.protectedKeys[t]=!0}if(i.prevProp=_,i.prevResolvedValues=T,i.isActive&&(f={...f,...T}),S&&(!(b&&x)||C))for(let n of w){let r={type:t};if(typeof n==`string`&&l&&c&&s?.enteringChildren){let t=Yh(s,n)?.transition?.delayChildren;r.delay=Oh(s.enteringChildren,e,t)}u.push({animation:n,options:r})}}),d.size){let{initial:t}=o,n={},r=typeof t!=`boolean`&&Yh(e,Array.isArray(t)?t[0]:t,e.presenceContext?.custom);r&&r.transition&&(n.transition=r.transition),d.forEach(i=>{let a=e.getValue(i);a&&(a.liveStyle=!0);let s=r&&!Array.isArray(t)?r[i]:void 0,c=e.getBaseTargetFromProps(o,i);n[i]=(s===void 0?c!==void 0&&!ng(c)?c:e.initialValues[i]===void 0?e.baseTarget[i]:void 0:s)??null}),u.push({animation:n})}let h=l&&e.blockInitialAnimation||r&&!c&&(o.initial===!1||o.initial===o.animate);return r=i=!1,!h&&u.length?t(u):Promise.resolve()}function o(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=a(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:a,setActive:o,setAnimateFunction:n=>{t=n(e)},getState:()=>n,reset:()=>{n=wv(),i=!0}}}function Cv(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!bv(t,e):!1}function wv(){let e={};for(let t of q_)e[t]={isActive:t===`animate`,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return e}function Tv(e,t){e.min=t.min,e.max=t.max}function Ev(e,t){Tv(e.x,t.x),Tv(e.y,t.y)}function Dv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Ov=.9999,kv=1.0001,Av=-.01,jv=.01;function Mv(e){return e.max-e.min}function Nv(e,t,n){return Math.abs(e-t)<=n}function Pv(e,t,n,r=.5){e.origin=r,e.originPoint=np(t.min,t.max,e.origin),e.scale=Mv(n)/Mv(t),e.translate=np(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Ov&&e.scale<=kv||isNaN(e.scale))&&(e.scale=1),(e.translate>=Av&&e.translate<=jv||isNaN(e.translate))&&(e.translate=0)}function Fv(e,t,n,r){Pv(e.x,t.x,n.x,r?r.originX:void 0),Pv(e.y,t.y,n.y,r?r.originY:void 0)}function Iv(e,t,n,r=0){e.min=(r?np(n.min,n.max,r):n.min)+t.min,e.max=e.min+Mv(t)}function Lv(e,t,n,r){Iv(e.x,t.x,n.x,r?.x),Iv(e.y,t.y,n.y,r?.y)}function Rv(e,t,n,r=0){let i=r?np(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Mv(t)}function zv(e,t,n,r){Rv(e.x,t.x,n.x,r?.x),Rv(e.y,t.y,n.y,r?.y)}function Bv(e,t,n,r,i){return e-=t,e=Ug(e,1/n,r),i!==void 0&&(e=Ug(e,1/i,r)),e}function Vv(e,t=0,n=1,r=.5,i,a=e,o=e){if(Of.test(t)&&(t=parseFloat(t),t=np(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=np(a.min,a.max,r);e===a&&(s-=t),e.min=Bv(e.min,t,n,s,i),e.max=Bv(e.max,t,n,s,i)}function Hv(e,t,[n,r,i],a,o){Vv(e,t[n],t[r],t[i],t.scale,a,o)}var Uv=[`x`,`scaleX`,`originX`],Wv=[`y`,`scaleY`,`originY`];function Gv(e,t,n,r){Hv(e.x,t,Uv,n?n.x:void 0,r?r.x:void 0),Hv(e.y,t,Wv,n?n.y:void 0,r?r.y:void 0)}function Kv(e){return e.translate===0&&e.scale===1}function qv(e){return Kv(e.x)&&Kv(e.y)}function Jv(e,t){return e.min===t.min&&e.max===t.max}function Yv(e,t){return Jv(e.x,t.x)&&Jv(e.y,t.y)}function Xv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Zv(e,t){return Xv(e.x,t.x)&&Xv(e.y,t.y)}function Qv(e){return Mv(e.x)/Mv(e.y)}function $v(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function ey(e){return[e(`x`),e(`y`)]}function ty(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ny={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`){if(G.test(e))e=parseFloat(e);else return e}return`${ty(e,t.target.x)}% ${ty(e,t.target.y)}%`}},ry={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Qf.parse(e);if(i.length>5)return r;let a=Qf.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=np(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}};function iy(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var ay=xg.length,oy=e=>typeof e==`number`||G.test(e);function sy(e,t,n,r,i,a){i?(e.opacity=np(0,n.opacity??1,ly(r)),e.opacityExit=np(t.opacity??1,0,uy(r))):a&&(e.opacity=np(t.opacity??1,n.opacity??1,r));for(let i=0;i<ay;i++){let a=xg[i],o=cy(t,a),s=cy(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||oy(o)===oy(s)?(e[a]=Math.max(np(z_(o),z_(s),r),0),(Of.test(s)||Of.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=np(t.rotate||0,n.rotate||0,r))}function cy(e,t){return e[t]===void 0?e.borderRadius:e[t]}var ly=dy(0,.5,Gd),uy=dy(.5,.95,Ed);function dy(e,t,n){return r=>r<e?0:r>t?1:n(Od(e,t,r))}function fy(e,t,n){let r=ng(e)?e:Nh(e);return r.start(Uh(``,r,t,n)),r.animation}function py(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var my=(e,t)=>e.depth-t.depth,hy=class{constructor(){this.children=[],this.isDirty=!1}add(e){vd(this.children,e),this.isDirty=!0}remove(e){yd(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(my),this.isDirty=!1,this.children.forEach(e)}};function gy(e,t){let n=af.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(wp(r),e(a-t))};return Cp.setup(r,!0),()=>wp(r)}function _y(e){return ng(e)?e.get():e}var vy=class{constructor(){this.members=[]}add(e){vd(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(yd(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(yd(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},yy={borderRadius:{...ny,applyTo:[...xg]},borderTopLeftRadius:ny,borderTopRightRadius:ny,borderBottomLeftRadius:ny,borderBottomRightRadius:ny,boxShadow:ry},by={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(uv,{...yy,...uv});var xy={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Sy=[``,`X`,`Y`,`Z`],Cy=1e3,wy=0;function Ty(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ey(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=sg(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,Cp,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ey(r)}function Dy({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=wy++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,L_.value&&(xy.nodes=xy.calculatedTargetDeltas=xy.calculatedProjections=0),this.nodes.forEach(Ay),this.nodes.forEach(By),this.nodes.forEach(Vy),this.nodes.forEach(jy),L_.addProjectionMetrics&&L_.addProjectionMetrics(xy)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new hy)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new kd),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Cg(t)&&!R_(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;Cp.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=gy(i,250),by.hasAnimatedSinceResize&&(by.hasAnimatedSinceResize=!1,this.nodes.forEach(zy)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||Jy,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Zv(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Fh(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||zy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),wp(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Hy),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ey(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Py),this.nodes.forEach(Ny);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Fy);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Iy),this.nodes.forEach(Ly),this.nodes.forEach(Ry),this.nodes.forEach(Oy),this.nodes.forEach(ky)):this.nodes.forEach(Fy),this.clearAllSnapshots();let e=af.now();tf.delta=bd(0,1e3/60,e-tf.timestamp),tf.timestamp=e,tf.isProcessing=!0,Tp.update.process(tf),Tp.preRender.process(tf),Tp.render.process(tf),tf.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,n_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(My),this.sharedNodes.forEach(Uy)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Cp.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Cp.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),this.snapshot&&!Mv(this.snapshot.measuredBox.x)&&!Mv(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected||=U_(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!qv(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Bg(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Qy(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return U_();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(eb))){let{scroll:e}=this.root;e&&(Xg(t.x,e.offset.x),Xg(t.y,e.offset.y))}return t}removeElementScroll(e){let t=U_();if(Ev(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Ev(t,e),Xg(t.x,i.offset.x),Xg(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||U_();Ev(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(Xg(r.x,-n.scroll.offset.x),Xg(r.y,-n.scroll.offset.y)),Bg(n.latestValues)&&$g(r,n.latestValues,n.layout?.layoutBox)}return Bg(this.latestValues)&&$g(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=U_();Ev(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Bg(n.latestValues))continue;let r;n.instance&&(zg(n.latestValues)&&n.updateSnapshot(),r=U_(),Ev(r,n.measurePageBox())),Gv(t,n.latestValues,n.snapshot?.layoutBox,r)}return Bg(this.latestValues)&&Gv(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==tf.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=tf.timestamp;let a=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target=U_(),this.targetWithTransforms=U_()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Lv(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Ev(this.target,this.layout.layoutBox),Kg(this.target,this.targetDelta)):Ev(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),L_.value&&xy.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||zg(this.parent.latestValues)||Vg(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=U_(),this.relativeTargetOrigin=U_(),zv(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Ev(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===tf.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Ev(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Yg(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=U_());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Dv(this.prevProjectionDelta.x,this.projectionDelta.x),Dv(this.prevProjectionDelta.y,this.projectionDelta.y)),Fv(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!$v(this.projectionDelta.x,this.prevProjectionDelta.x)||!$v(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),L_.value&&xy.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=V_(),this.projectionDelta=V_(),this.projectionDeltaWithTransform=V_()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=V_();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=U_(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!(!c||u||this.options.crossfade!==!0||this.path.some(qy));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=np(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=np(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Wy(o.x,e.x,n),Wy(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zv(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ky(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Yv(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=U_(),Ev(f,this.relativeTarget)),c&&(this.animationValues=a,sy(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(wp(this.pendingAnimation),void 0),this.pendingAnimation=Cp.update(()=>{by.hasAnimatedSinceResize=!0,this.motionValue||=Nh(0),this.motionValue.jump(0,!1),this.currentAnimation=fy(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),om(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Cy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,layout:n,latestValues:r}=e,{target:i}=e;if(t&&i&&n){if(this!==e&&this.layout&&n&&$y(this.options.animationType,this.layout.layoutBox,n.layoutBox)){i=this.target||U_();let t=Mv(this.layout.layoutBox.x);i.x.min=e.target.x.min,i.x.max=i.x.min+t;let n=Mv(this.layout.layoutBox.y);i.y.min=e.target.y.min,i.y.max=i.y.min+n}Ev(t,i),$g(t,r),Fv(this.projectionDeltaWithTransform,this.layoutCorrected,t,r)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new vy),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&Ty(`z`,e,r,this.animationValues);for(let t=0;t<Sy.length;t++)Ty(`rotate${Sy[t]}`,e,r,this.animationValues),Ty(`skew${Sy[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=_y(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=_y(t?.pointerEvents)||``),this.hasProjected&&!Bg(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=iy(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,e.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in uv){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=uv[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?_y(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Ny),this.root.sharedNodes.clear()}}}function Oy(e){e.updateLayout()}function ky(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)ey(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Mv(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;Tv(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else $y(i,t.layoutBox,n)&&ey(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Mv(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=V_();Fv(o,n,t.layoutBox);let s=V_();a?Fv(s,e.applyTransform(r,!0),t.measuredBox):Fv(s,n,t.layoutBox);let c=!qv(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=U_();zv(s,t.layoutBox,i.layoutBox,o);let c=U_();zv(c,n,a.layoutBox,o),Zv(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ay(e){L_.value&&xy.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function jy(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function My(e){e.clearSnapshot()}function Ny(e){e.clearMeasurements()}function Py(e){e.isLayoutDirty=!0,e.updateLayout()}function Fy(e){e.isLayoutDirty=!1}function Iy(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function Ly(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function Ry(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function zy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function By(e){e.resolveTargetDelta()}function Vy(e){e.calcProjection()}function Hy(e){e.resetSkewAndRotation()}function Uy(e){e.removeLeadSnapshot()}function Wy(e,t,n){e.translate=np(t.translate,0,n),e.scale=np(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Gy(e,t,n,r){e.min=np(t.min,n.min,r),e.max=np(t.max,n.max,r)}function Ky(e,t,n,r){Gy(e.x,t.x,n.x,r),Gy(e.y,t.y,n.y,r)}function qy(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Jy={duration:.45,ease:[.4,0,.1,1]},Yy=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Xy=Yy(`applewebkit/`)&&!Yy(`chrome/`)?Math.round:Ed;function Zy(e){e.min=Xy(e.min),e.max=Xy(e.max)}function Qy(e){Zy(e.x),Zy(e.y)}function $y(e,t,n){return e===`position`||e===`preserve-aspect`&&!Nv(Qv(t),Qv(n),.2)}function eb(e){return e!==e.root&&e.scroll?.wasRoot}var tb=Dy({attachResizeListener:(e,t)=>py(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),nb={current:void 0},rb=Dy({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!nb.current){let e=new tb({});e.mount(window),e.setOptions({layoutScroll:!0}),nb.current=e}return nb.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`});D();var ib=C({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});D();function ab(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ob(...e){return t=>{let n=!1,r=e.map(e=>{let r=ab(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():ab(e[t],null)}}}}function sb(...e){return i(ob(...e),e)}D();var cb=class extends s{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(Sg(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=Sg(e)&&e.offsetWidth||0,r=Sg(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function lb({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=g(),s=P(null),c=P({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:u}=l(ib),d=sb(s,a===!1?void 0:e.props?.ref??e?.ref);return h(()=>{let{width:e,height:l,top:d,left:f,right:p,bottom:m,direction:h}=c.current;if(t||a===!1||!s.current||!e||!l)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${f}`:g?`left: ${f}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${d}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);u&&(y.nonce=u);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
19
|
+
[data-motion-pop-id="${o}"] {
|
|
20
|
+
position: absolute !important;
|
|
21
|
+
width: ${e}px !important;
|
|
22
|
+
height: ${l}px !important;
|
|
23
|
+
${_}px !important;
|
|
24
|
+
${v}px !important;
|
|
25
|
+
}
|
|
26
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),L(cb,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:v(e,{ref:d})})}D();var ub=({children:e,initial:t,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:o,mode:s,anchorX:c,anchorY:l,root:u})=>{let d=md(db),f=g(),p=P(r),m=P(i);gd(()=>{p.current=r,m.current=i});let h=!0,_=n(()=>(h=!1,{id:f,initial:t,isPresent:r,custom:a,onExitComplete:e=>{d.set(e,!0);for(let e of d.values())if(!e)return;i&&i()},register:e=>(d.set(e,!1),()=>{d.delete(e),!p.current&&!d.size&&m.current?.()})}),[r,d,i]);return o&&h&&(_={..._}),n(()=>{d.forEach((e,t)=>d.set(t,!1))},[r]),M(()=>{!r&&!d.size&&i&&i()},[r]),e=L(lb,{pop:s===`popLayout`,isPresent:r,anchorX:c,anchorY:l,root:u,children:e}),L(_d.Provider,{value:_,children:e})};function db(){return new Map}D();function fb(e=!0){let t=l(_d);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:a}=t,o=g();M(()=>{if(e)return a(o)},[e]);let s=i(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,s]:[!0]}D();var pb=e=>e.key||``;function mb(e){let t=[];return T.forEach(e,e=>{x(e)&&t.push(e)}),t}D();var hb=({children:e,custom:t,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o=`sync`,propagate:s=!1,anchorX:c=`left`,anchorY:u=`top`,root:f})=>{let[p,m]=fb(s),h=n(()=>mb(e),[e]),g=s&&!p?[]:h.map(pb),_=P(!0),v=md(()=>new Map),y=P(new Set),[b,x]=N(h),[S,C]=N(h);gd(()=>{s&&!p&&!S.length&&m?.()},[p,s,S.length,m]),gd(()=>{_.current=!1;for(let e=0;e<S.length;e++){let t=pb(S[e]);g.includes(t)?(v.delete(t),y.current.delete(t)):v.get(t)!==!0&&v.set(t,!1)}},[S,g.length,g.join(`-`)]);let w=[];if(h!==b){let e=[...h],t=0;for(let n of S){let r=g.indexOf(pb(n));r===-1?(e.splice(t++,0,n),w.push(n)):t=r+w.length+1}return w.every(e=>v.get(pb(e)))?e=h:o===`wait`&&(e=w),C(mb(e)),x(h),null}let{forceRender:T}=l(pd);return L(d,{children:S.map(e=>{let n=pb(e),l=s&&!p?!1:h===S||g.includes(n);return L(ub,{isPresent:l,initial:!_.current||r?void 0:!1,custom:t,presenceAffectsLayout:a,mode:o,root:f,onExitComplete:l?void 0:()=>{if(y.current.has(n))return;if(v.has(n))y.current.add(n),v.set(n,!0);else return;let e=!0;v.forEach(t=>{t||(e=!1)}),e&&(T?.(),x([]),s&&m?.(),i&&i())},anchorX:c,anchorY:u,children:e},n)})})};D();var gb=C({strict:!1}),_b={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},vb=!1;function yb(){if(vb)return;let e={};for(let t in _b)e[t]={isEnabled:e=>_b[t].some(t=>!!e[t])};iv(e),vb=!0}function bb(){return yb(),av()}function xb(e){let t=bb();for(let n in e)t[n]={...t[n],...e[n]};iv(t)}D();function Sb({children:e,features:t,strict:n=!1}){let[,r]=N(!Cb(t)),i=P(void 0);if(!Cb(t)){let{renderer:e,...n}=t;i.current=e,xb(n)}return M(()=>{Cb(t)&&t().then(({renderer:e,...t})=>{xb(t),i.current=e,r(!0)})},[]),L(gb.Provider,{value:{renderer:i.current,strict:n},children:e})}function Cb(e){return typeof e==`function`}D();var wb=C({});function Tb(e,t){if(Y_(e)){let{initial:t,animate:n}=e;return{initial:t===!1||K_(t)?t:void 0,animate:K_(n)?n:void 0}}return e.inherit===!1?{}:t}D();function Eb(e){let{initial:t,animate:r}=Tb(e,l(wb));return n(()=>({initial:t,animate:r}),[Db(t),Db(r)])}function Db(e){return Array.isArray(e)?e.join(` `):e}var Ob=()=>({style:{},transform:{},transformOrigin:{},vars:{}});D();function kb(e,t,n){for(let r in t)!ng(t[r])&&!dv(r,n)&&(e[r]=t[r])}function Ab({transformTemplate:e},t){return n(()=>{let n=Ob();return kg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function jb(e,t){let n=e.style||{},r={};return kb(r,n,e),Object.assign(r,Ab(e,t)),r}function Mb(e,t){let n={},r=jb(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Nb=()=>({...Ob(),attrs:{}});D();function Pb(e,t,r,i){let a=n(()=>{let n=Nb();return Pg(n,t,gv(i),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};kb(t,e.style,e),a.style={...t,...a.style}}return a}var Fb=new Set(`animate.exit.variants.initial.style.values.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Ib(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Fb.has(e)}function Lb(e,t){return e.startsWith(`on`)?!Ib(e):t?.(e)??!Ib(e)}function Rb(e,t,n,r){let i={};for(let a in e)(a!==`values`||typeof e.values!=`object`)&&(ng(e[a])||(Lb(a,r)||n===!0&&Ib(a)||!t&&!Ib(a)||e.draggable&&a.startsWith(`onDrag`))&&(i[a]=e[a]));return i}var zb=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Bb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(zb.indexOf(e)>-1||/[A-Z]/u.test(e))}D();function Vb(e,t,r,{latestValues:i},o,s=!1,c,l){let u=(c??Bb(e)?Pb:Mb)(t,i,o,e),f=Rb(t,typeof e==`string`,s,l),p=e===d?{}:{...f,...u,ref:r},{children:m}=t,h=n(()=>ng(m)?m.get():m,[m]);return a(e,{...p,children:h})}D();function Hb({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ub(n,r,i,e),renderState:t()}}function Ub(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=_y(a[e]);let{initial:o,animate:s}=e,c=Y_(e),l=X_(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!G_(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Jh(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Wb=e=>(t,n)=>{let r=l(wb),i=l(_d),a=()=>Hb(e,t,r,i);return n?a():md(a)},Gb=Wb({scrapeMotionValuesFromProps:fv,createRenderState:Ob}),Kb=Wb({scrapeMotionValuesFromProps:vv,createRenderState:Nb}),qb=Symbol.for(`motionComponentSymbol`);D();function Jb(e,t,n){let r=P(n);h(()=>{r.current=n});let a=P(null);return i(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let i=r.current;if(typeof i==`function`){if(n){let e=i(n);typeof e==`function`&&(a.current=e)}else a.current?(a.current(),a.current=null):i(n)}else i&&(i.current=n)},[t])}D();var Yb=C({});function Xb(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}D();function Zb(e,t,n,r,i,a){let{visualElement:o}=l(wb),s=l(gb),c=l(_d),u=l(ib),d=u.reducedMotion,f=u.skipAnimations,p=P(null),m=P(!1);r||=s.renderer,!p.current&&r&&(p.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:a}),m.current&&p.current&&(p.current.manuallyAnimateOnMount=!0));let g=p.current,_=l(Yb);g&&!g.projection&&i&&(g.type===`html`||g.type===`svg`)&&Qb(p.current,n,i,_);let v=P(!1);h(()=>{g&&v.current&&g.update(n,c)});let y=n[og],b=P(!!y&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return gd(()=>{m.current&&g&&(g.animationState?.animateChanges(),g.enteringChildren=void 0)},[]),gd(()=>{m.current=!0,g&&(v.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),b.current&&g.animationState&&g.animationState.animateChanges())}),M(()=>{g&&(!b.current&&g.animationState&&g.animationState.animateChanges(),b.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),!1),g.enteringChildren=void 0)}),g}function Qb(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:$b(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Xb(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function $b(e){if(e)return e.options.allowProjection===!1?$b(e.parent):e.projection}D();function ex(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&xb(r);let a=n?n===`svg`:Bb(e),o=a?Kb:Gb;function s(n,s){let c,u={...l(ib),...n,layoutId:tx(n)},{isStatic:d,isValidProp:f}=u,p=Eb(n),m=o(n,d);if(!d&&typeof window<`u`){nx(u,r);let t=rx(u);c=t.MeasureLayout,p.visualElement=Zb(e,m,u,i,t.ProjectionNode,a)}return L(wb.Provider,{value:p,children:[c&&p.visualElement?L(c,{visualElement:p.visualElement,...u}):null,Vb(e,n,Jb(m,p.visualElement,s),m,d,t,a,f)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=w(s);return c[qb]=e,c}function tx({layoutId:e}){let t=l(pd).id;return t&&e!==void 0?t+`-`+e:e}function nx(e,t){l(gb).strict}function rx(e){let{drag:t,layout:n}=bb();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function ix(e,t){if(typeof Proxy>`u`)return ex;let n=new Map,r=(n,r)=>ex(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,ex(a,void 0,e,t)),n.get(a))})}var ax=ix();D();var ox=(e,t)=>t.isSVG??Bb(e)?new yv(t):new mv(t,{allowProjection:e!==d}),sx=class extends cv{constructor(e){super(e),e.animationState||=Sv(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();G_(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},cx=0,lx={animation:{Feature:sx},exit:{Feature:class extends cv{constructor(){super(...arguments),this.id=cx++}update(){let{presenceContext:e,prevPresenceContext:t,animationState:n}=this.node;if(!e||!n)return;let{isPresent:r,onExitComplete:i}=e,a=t?.isPresent;if(r===a)return;if(r&&a===!1){if(this.exit===!0){let{initial:e}=this.node.getProps();if(e&&!Array.isArray(e)){let{transition:t,transitionEnd:n,...r}=Yh(this.node,e)||{};for(let e in r)this.node.getValue(e)?.jump(r[e])}this.node.blockInitialAnimation=!1,n.reset(),n.animateChanges()}else n.setActive(`exit`,!1);this.exit=void 0;return}let o=this.exit=n.setActive(`exit`,!r);i&&!r&&o.then(()=>{this.exit===o&&(this.exit=!0,i(this.id))})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function ux(e){return{point:{x:e.pageX,y:e.pageY}}}var dx=e=>t=>d_(t)&&e(t,ux(t));function fx(e,t,n,r){return py(e,t,dx(n),r)}var px=({current:e})=>e?e.ownerDocument.defaultView:null,mx=(e,t)=>Math.abs(e-t);function hx(e,t){let n=mx(e.x,t.x),r=mx(e.y,t.y);return Math.sqrt(n**2+r**2)}var gx=new Set([`auto`,`scroll`]),_x=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=vx(this.lastRawMoveEventInfo,this.transformPagePoint));let e=bx(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=hx(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e;this.history.push({...r,timestamp:af.now()});let{onStart:i,onMove:a}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),a&&a(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=vx(t,this.transformPagePoint),this.hasPendingMove=!0,Cp.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.hasPendingMove&&this.updatePoint(),this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=bx(e.type===`pointercancel`?this.lastMoveEventInfo:vx(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!d_(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=vx(ux(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=tf;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,bx(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=Dd(fx(this.contextWindow,`pointermove`,this.handlePointerMove,d),fx(this.contextWindow,`pointerup`,this.handlePointerUp,d),fx(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(gx.has(e.overflowX)||gx.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};(i.x!==0||i.y!==0)&&(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),Cp.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),wp(this.updatePoint)}};function vx(e,t){return t?{point:t(e.point)}:e}function yx(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bx({point:e},t){return{point:e,delta:yx(e,Sx(t)),offset:yx(e,xx(t)),velocity:Cx(t,.1)}}function xx(e){return e[0]}function Sx(e){return e[e.length-1]}function Cx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Sx(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ad(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>Ad(t)*2&&(r=e[1]);let a=jd(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function wx(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?np(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?np(n,e,r.max):Math.min(e,n)),e}function Tx(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function Ex(e,{top:t,left:n,bottom:r,right:i}){return{x:Tx(e.x,n,i),y:Tx(e.y,t,r)}}function Dx(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Ox(e,t){return{x:Dx(e.x,t.x),y:Dx(e.y,t.y)}}function kx(e,t){let n=.5,r=Mv(e),i=Mv(t);return i>r?n=Od(t.min,t.max-r,e.min):r>i&&(n=Od(e.min,e.max-i,t.min)),bd(0,1,n)}function Ax(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var jx=.35;function Mx(e=jx){return e===!1?e=0:e===!0&&(e=jx),{x:Nx(e,`left`,`right`),y:Nx(e,`top`,`bottom`)}}function Nx(e,t,n){return{min:Px(e,t),max:Px(e,n)}}function Px(e,t){return typeof e==`number`?e:e[t]||0}var Fx=new WeakMap,Ix=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=U_(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(e),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=o_(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ey(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Of.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Mv(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&Cp.update(()=>i(e,t),!1,!0),ig(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Bx(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&Cp.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new _x(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:px(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&Cp.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!zx(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=wx(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Xb(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?Ex(n.layoutBox,e):!1,this.elastic=Mx(t),r!==this.constraints&&!Xb(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&ey(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=Ax(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Xb(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=t_(n,r.root,this.visualElement.getTransformPagePoint()),a=Ox(r.layout.layoutBox,i);if(t){let e=t(Ig(a));this.hasMutatedConstraints=!!e,e&&(a=Fg(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=ey(o=>{if(!zx(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return ig(this.visualElement,e),n.start(Uh(e,n,0,t,this.visualElement,!1))}stopAnimation(){ey(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:t}){let{drag:n}=this.getProps(),r={x:e,y:t},i=this.visualElement.getTransformPagePoint()?.(r)||r,a=this.visualElement.measureViewportBox();ey(e=>{if(!zx(e,n,this.currentDirection))return;let t=this.getAxisMotionValue(e),{min:r,max:o}=a[e];t.set((t.get()||0)+i[e]-np(r,o,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Xb(t)||!n||!this.constraints)return;this.stopAnimation();let r=this.constraints,i={x:0,y:0};ey(e=>{let t=this.getAxisMotionValue(e).get();i[e]=kx({min:t,max:t},r[e])});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),ey(t=>{let n=this.getAxisMotionValue(t);if(!zx(t,e,null)||!n.get())return;let{min:r,max:a}=this.constraints[t];n.set(np(r,a,i[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Fx.set(this.visualElement,this);let e=this.visualElement.current,t=fx(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&h_(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Xb(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=Rx(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Cp.read(r);let o=py(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(ey(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=jx,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Lx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function Rx(e,t,n){let r=I_(e,Lx(n)),i=I_(t,Lx(n));return()=>{r(),i()}}function zx(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Bx(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Vx=class extends cv{constructor(e){super(e),this.removeGroupControls=Ed,this.removeListeners=Ed,this.controls=new Ix(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ed}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},Hx=e=>(t,n)=>{e&&Cp.update(()=>e(t,n),!1,!0)},Ux=class extends cv{constructor(){super(...arguments),this.removePointerDownListener=Ed}onPointerDown(e){this.session=new _x(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:px(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Hx(e),onStart:Hx(t),onMove:Hx(n),onEnd:(e,t)=>{delete this.session,r&&Cp.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=fx(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};D();var Wx=!1,Gx=class extends s{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),Wx&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),by.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),Wx=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||Cp.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),n_.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Wx=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Kx(e){let[t,n]=fb(),r=l(pd);return L(Gx,{...e,layoutGroup:r,switchLayoutGroup:l(Yb),isPresent:t,safeToRemove:n})}var qx={pan:{Feature:Ux},drag:{Feature:Vx,ProjectionNode:rb,MeasureLayout:Kx}};function Jx(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&Cp.postRender(()=>i(t,ux(t)))}var Yx=class extends cv{mount(){let{current:e}=this.node;e&&(this.unmount=l_(e,(e,t)=>(Jx(this.node,t,`Start`),e=>Jx(this.node,e,`End`))))}unmount(){}},Xx=class extends cv{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}e&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=Dd(py(this.node.current,`focus`,()=>this.onFocus()),py(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Zx(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&Cp.postRender(()=>i(t,ux(t)))}var Qx=class extends cv{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=S_(e,(e,t)=>(Zx(this.node,t,`Start`),(e,{success:t})=>Zx(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},$x=new WeakMap,eS=new WeakMap,tS=e=>{let t=$x.get(e.target);t&&t(e)},nS=e=>{e.forEach(tS)};function rS({root:e,...t}){let n=e||document;eS.has(n)||eS.set(n,{});let r=eS.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(nS,{root:e,...t})),r[i]}function iS(e,t,n){let r=rS(t);return $x.set(e,n),r.observe(e),()=>{$x.delete(e),r.unobserve(e)}}var aS={some:0,all:1},oS=class extends cv{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:aS[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=iS(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(sS(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function sS({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var cS={inView:{Feature:oS},tap:{Feature:Qx},focus:{Feature:Xx},hover:{Feature:Yx}},lS={layout:{ProjectionNode:rb,MeasureLayout:Kx}},uS=ix({...lx,...cS,...qx,...lS},ox),dS={renderer:ox,...lx,...cS},fS=({children:e})=>L(Sb,{features:dS,children:e});D();var pS=C(null),mS=({value:e,children:t})=>L(pS.Provider,{value:e,children:t}),hS=()=>l(pS),gS=()=>typeof process>`u`?void 0:{}.INTLAYER_BACKEND_INTERNAL_URL?.trim()||void 0,_S=(e,t=xn.backendURL)=>{let n=gS();if(!n||!t)return e;try{let r=new URL(e),i=new URL(t).origin;if(r.origin!==i)return e;let a=new URL(n);return r.protocol=a.protocol,r.host=a.host,r.toString()}catch{return e}},vS=class extends Error{status;code;data;constructor(e,t){super(e),this.name=`FetcherError`,this.status=t.status,this.code=t.code,this.data=t.data}},yS={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},bS=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),xS=e=>e.reduce((e,t)=>{let n=e??{},r=bS(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),K=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=xS([yS,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=xS([yS.headers,...t.map(e=>e.headers)]),s=xS(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=xS(t.map(e=>e.body));i=o?.[`Content-Type`]===`application/x-www-form-urlencoded`?new URLSearchParams(e).toString():JSON.stringify(e)}Object.entries(s).length>0&&(r=`?${new URLSearchParams(s).toString()}`);let l={...a,headers:o,body:i,signal:n},u=_S(`${e}${r}`),d=await fetch(u,l);if(!d.ok){let e=await d.json().catch(()=>void 0);throw new vS(JSON.stringify(e?.error)??`An error occurred`,{status:d.status,code:e?.error?.code,data:e?.error})}return await d.json()},SS=(e,t,n,r)=>{let i=n.replace(/:([A-Za-z0-9_]+)/g,(e,t)=>{let i=r?.[t];if(i===void 0)throw Error(`Missing route param "${t}" for ${n}`);return encodeURIComponent(i)});return`${e}${t}${i===`/`?``:i}`},q=(e,t,n,...[r])=>SS(e,t.prefix,n.path,r),CS={prefix:`/oauth2`},wS={getOAuth2AccessToken:{method:`POST`,path:`/token`},extendOAuth2Token:{method:`POST`,path:`/token/extend`}},TS={prefix:`/api/cli-session`},ES={createCliSessionToken:{method:`POST`,path:`/`},getCliSessionMe:{method:`GET`,path:`/me`}},DS=(e={},t)=>{let n=t?.editor?.backendURL??xn.backendURL??`https://back.intlayer.org`,{clientId:r,clientSecret:i}=t?.editor??{};return{getOAuth2AccessToken:async(e={})=>await K(q(n,CS,wS.getOAuth2AccessToken),{},e,{method:wS.getOAuth2AccessToken.method,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:r,client_secret:i}}),createCliSessionToken:async(t={})=>await K(q(n,TS,ES.createCliSessionToken),e,t,{method:ES.createCliSessionToken.method}),getCliSessionMe:async(t={})=>await K(q(n,TS,ES.getCliSessionMe),e,t,{method:ES.getCliSessionMe.method})}};function OS(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function kS(e,t,n=`.`,r){if(!OS(t))return kS(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:OS(a)&&OS(i[t])?kS(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function AS(e){return(...t)=>t.reduce((t,n)=>kS(t,n,``,e),{})}var jS=AS(),MS={prefix:`/api/ai`},NS={customQuery:{method:`POST`,path:`/`},translateJSON:{method:`POST`,path:`/translate/json`},auditContentDeclaration:{method:`POST`,path:`/audit/dictionary`},auditContentDeclarationField:{method:`POST`,path:`/audit/dictionary/field`},auditContentDeclarationMetadata:{method:`POST`,path:`/audit/dictionary/metadata`},auditTag:{method:`POST`,path:`/audit/tag`},ask:{method:`POST`,path:`/ask`},chat:{method:`POST`,path:`/chat`},autocomplete:{method:`POST`,path:`/autocomplete`},getDiscussions:{method:`GET`,path:`/discussions`},getAIStats:{method:`GET`,path:`/stats`}},PS=(e={},t)=>{let n=t?.editor?.backendURL??xn.backendURL??`https://back.intlayer.org`;return{customQuery:async(t,r={})=>await K(q(n,MS,NS.customQuery),e,r,{method:NS.customQuery.method,body:t}),translateJSON:async(t,r={})=>await K(q(n,MS,NS.translateJSON),e,r,{method:NS.translateJSON.method,body:t}),auditContentDeclaration:async(t,r={})=>await K(q(n,MS,NS.auditContentDeclaration),e,r,{method:NS.auditContentDeclaration.method,body:t}),auditContentDeclarationField:async(t,r={})=>await K(q(n,MS,NS.auditContentDeclarationField),e,r,{method:NS.auditContentDeclarationField.method,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await K(q(n,MS,NS.auditContentDeclarationMetadata),e,r,{method:NS.auditContentDeclarationMetadata.method,body:t}),auditTag:async(t,r={})=>await K(q(n,MS,NS.auditTag),e,r,{method:NS.auditTag.method,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(q(n,MS,NS.ask),{method:NS.ask.method,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
|
|
27
|
+
`);u=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in askDocQuestion:`,e),e}},chat:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,onAction:o,...s}=t,c=new AbortController;try{let t=await fetch(q(n,MS,NS.chat),{method:NS.chat.method,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...s,...e.body,...r.body}),signal:c.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let l=t.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
|
|
28
|
+
`);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));t.chunk&&i?.(t.chunk),t.action&&o?.(t.action),t.done&&t.response&&a?.(t.response)}catch(e){console.error(`Failed to parse SSE data:`,e)}}}catch(e){throw console.error(`Error in chat:`,e),e}},autocomplete:async(t,r={})=>await K(q(n,MS,NS.autocomplete),e,r,{method:NS.autocomplete.method,body:t}),getDiscussions:async(t,r={})=>await K(q(n,MS,NS.getDiscussions),e,r,{method:NS.getDiscussions.method,params:t}),getAIStats:async(t={})=>await K(q(n,MS,NS.getAIStats),e,t,{method:NS.getAIStats.method})}},FS={prefix:`/api/dictionary`},IS={getDictionaries:{method:`GET`,path:`/`},getDictionariesKeys:{method:`GET`,path:`/keys`},getDictionariesUpdateTimestamp:{method:`GET`,path:`/update`},getDictionariesByKeys:{method:`GET`,path:`/by-keys`},getDictionary:{method:`GET`,path:`/:dictionaryKey`},addDictionary:{method:`POST`,path:`/`},pushDictionaries:{method:`PATCH`,path:`/`},updateDictionary:{method:`PUT`,path:`/:dictionaryId`},deleteDictionary:{method:`DELETE`,path:`/:dictionaryId`}},LS=(e={},t)=>{let n=t?.editor?.backendURL??xn.backendURL??`https://back.intlayer.org`;return{getDictionaries:async(t,r={})=>await K(q(n,FS,IS.getDictionaries),e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await K(q(n,FS,IS.getDictionariesKeys),e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await K(q(n,FS,IS.getDictionariesUpdateTimestamp),e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await K(q(n,FS,IS.getDictionary,{dictionaryKey:t}),e,i,{params:r?{version:r.toString()}:void 0}),getDictionariesByKeys:async(t,r,i={})=>await K(q(n,FS,IS.getDictionariesByKeys),e,i,{cache:`no-store`,params:{keys:t.join(`,`),version:r?.toString()}}),pushDictionaries:async(t,r={})=>await K(q(n,FS,IS.pushDictionaries),e,r,{method:IS.pushDictionaries.method,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await K(q(n,FS,IS.addDictionary),e,r,{method:IS.addDictionary.method,body:t}),updateDictionary:async(t,r={})=>await K(q(n,FS,IS.updateDictionary,{dictionaryId:String(t.id)}),e,r,{method:IS.updateDictionary.method,body:t}),deleteDictionary:async(t,r={})=>await K(q(n,FS,IS.deleteDictionary,{dictionaryId:String(t)}),e,r,{method:IS.deleteDictionary.method})}},RS=(e={},t)=>{let n=`${t?.editor?.editorURL??xn.editorURL}/api`;return{getDictionaries:async(t={})=>(await K(`${n}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await K(`${n}/config`,e,t)).data,writeDictionary:async(t,r={})=>await K(`${n}/dictionary`,e,r,{method:`POST`,body:t})}},zS={prefix:`/api/project`},J={getProjects:{method:`GET`,path:`/`},getProjectInsights:{method:`GET`,path:`/insights`},addProject:{method:`POST`,path:`/`},updateProject:{method:`PUT`,path:`/`},updateProjectMembers:{method:`PUT`,path:`/members`},pushProjectConfiguration:{method:`PUT`,path:`/configuration`},deleteProject:{method:`DELETE`,path:`/`},selectProject:{method:`PUT`,path:`/:projectId`},unselectProject:{method:`POST`,path:`/logout`},addNewAccessKey:{method:`POST`,path:`/access_key`},refreshAccessKey:{method:`PATCH`,path:`/access_key`},deleteAccessKey:{method:`DELETE`,path:`/access_key`},triggerBuild:{method:`POST`,path:`/build`},triggerWebhook:{method:`POST`,path:`/webhook`},getCIConfiguration:{method:`GET`,path:`/ci`},pushCIConfiguration:{method:`POST`,path:`/ci`},deleteProjectByIdAdmin:{method:`DELETE`,path:`/:projectId/admin`},updateMemberAccess:{method:`PUT`,path:`/member/:userId/access`}},BS=(e={},t)=>{let n=t?.editor?.backendURL??xn.backendURL??`https://back.intlayer.org`;return{getProjects:async(t,r={})=>await K(q(n,zS,J.getProjects),e,r,{cache:`no-store`,method:J.getProjects.method,params:t}),getProjectInsights:async(t={})=>await K(q(n,zS,J.getProjectInsights),e,t,{cache:`no-store`,method:J.getProjectInsights.method}),addProject:async(t,r={})=>await K(q(n,zS,J.addProject),e,r,{method:J.addProject.method,body:t}),updateProject:async(t,r={})=>await K(q(n,zS,J.updateProject),e,r,{method:J.updateProject.method,body:t}),updateProjectMembers:async(t,r={})=>await K(q(n,zS,J.updateProjectMembers),e,r,{method:J.updateProjectMembers.method,body:t}),pushProjectConfiguration:async(t,r={})=>await K(q(n,zS,J.pushProjectConfiguration),e,r,{method:J.pushProjectConfiguration.method,body:t}),deleteProject:async(t={})=>await K(q(n,zS,J.deleteProject),e,t,{method:J.deleteProject.method}),deleteProjectByIdAdmin:async(t,r={})=>K(q(n,zS,J.deleteProjectByIdAdmin,{projectId:t}),e,r,{method:J.deleteProjectByIdAdmin.method}),selectProject:async(t,r={})=>await K(q(n,zS,J.selectProject,{projectId:String(t)}),e,r,{method:J.selectProject.method}),unselectProject:async(t={})=>await K(q(n,zS,J.unselectProject),e,t,{method:J.unselectProject.method}),addNewAccessKey:async(t,r={})=>await K(q(n,zS,J.addNewAccessKey),e,r,{method:J.addNewAccessKey.method,body:t}),deleteAccessKey:async(t,r={})=>await K(q(n,zS,J.deleteAccessKey),e,r,{method:J.deleteAccessKey.method,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await K(q(n,zS,J.refreshAccessKey),e,r,{method:J.refreshAccessKey.method,body:{clientId:t}}),triggerBuild:async(t={})=>await K(q(n,zS,J.triggerBuild),e,t,{method:J.triggerBuild.method}),triggerWebhook:async(t,r={})=>await K(q(n,zS,J.triggerWebhook),e,r,{method:J.triggerWebhook.method,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await K(q(n,zS,J.getCIConfiguration),e,t,{method:J.getCIConfiguration.method}),pushCIConfig:async(t={})=>await K(q(n,zS,J.pushCIConfiguration),e,t,{method:J.pushCIConfiguration.method}),updateMemberAccess:async(t,r,i={})=>await K(q(n,zS,J.updateMemberAccess,{userId:t}),e,i,{method:J.updateMemberAccess.method,body:r})}},VS={prefix:`/api/tag`},HS={getTags:{method:`GET`,path:`/`},addTag:{method:`POST`,path:`/`},updateTag:{method:`PUT`,path:`/:tagId`},deleteTag:{method:`DELETE`,path:`/:tagId`}},US=(e={},t)=>{let n=t?.editor?.backendURL??xn.backendURL??`https://back.intlayer.org`;return{getTags:async(t,r={})=>await K(q(n,VS,HS.getTags),e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await K(q(n,VS,HS.addTag),e,r,{method:HS.addTag.method,body:t}),updateTag:async(t,r,i={})=>await K(q(n,VS,HS.updateTag,{tagId:String(t)}),e,i,{method:HS.updateTag.method,body:r}),deleteTag:async(t,r={})=>await K(q(n,VS,HS.deleteTag,{tagId:String(t)}),e,r,{method:HS.deleteTag.method})}};function WS(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var GS=WS({CHALLENGE_NOT_FOUND:`Challenge not found`,YOU_ARE_NOT_ALLOWED_TO_REGISTER_THIS_PASSKEY:`You are not allowed to register this passkey`,FAILED_TO_VERIFY_REGISTRATION:`Failed to verify registration`,PASSKEY_NOT_FOUND:`Passkey not found`,AUTHENTICATION_FAILED:`Authentication failed`,UNABLE_TO_CREATE_SESSION:`Unable to create session`,USER_NOT_FOUND:`User not found`,FAILED_TO_UPDATE_PASSKEY:`Failed to update passkey`,PREVIOUSLY_REGISTERED:`Previously registered`,REGISTRATION_CANCELLED:`Registration cancelled`,AUTH_CANCELLED:`Auth cancelled`,UNKNOWN_ERROR:`Unknown error`,SESSION_REQUIRED:`Passkey registration requires an authenticated session`,RESOLVE_USER_REQUIRED:`Passkey registration requires either an authenticated session or a resolveUser callback when requireSession is false`,RESOLVED_USER_INVALID:`Resolved user is invalid`}),KS=`1.7.7`;function qS(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function JS(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function YS(){return XS.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var XS={stubThis:e=>e};function ZS(e){let{id:t}=e;return{...e,id:JS(t),transports:e.transports}}function QS(e){return e===`localhost`||/^((xn--[a-z0-9-]+|[a-z0-9]+(-[a-z0-9]+)*)\.)+([a-z]{2,}|xn--[a-z0-9-]+)$/i.test(e)}var $S=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=r??n.name,this.code=t}};function eC({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new $S({message:`Registration ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`ConstraintError`){if(n.authenticatorSelection?.requireResidentKey===!0)return new $S({message:`Discoverable credentials were required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT`,cause:e});if(t.mediation===`conditional`&&n.authenticatorSelection?.userVerification===`required`)return new $S({message:`User verification was required during automatic registration but it could not be performed`,code:`ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE`,cause:e});if(n.authenticatorSelection?.userVerification===`required`)return new $S({message:`User verification was required but no available authenticator supported it`,code:`ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT`,cause:e})}else if(e.name===`InvalidStateError`)return new $S({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new $S({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`NotSupportedError`)return n.pubKeyCredParams.filter(e=>e.type===`public-key`).length===0?new $S({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new $S({message:`No available authenticator supported any of the specified pubKeyCredParams algorithms`,code:`ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!QS(t))return new $S({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new $S({message:`The RP ID "${n.rp.id}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`TypeError`){if(n.user.id.byteLength<1||n.user.id.byteLength>64)return new $S({message:`User ID was not between 1 and 64 characters`,code:`ERROR_INVALID_USER_ID_LENGTH`,cause:e})}else if(e.name===`UnknownError`)return new $S({message:`The authenticator was unable to process the specified options, or could not create a new credential`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}var tC=new class{constructor(){Object.defineProperty(this,"controller",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},nC=[`cross-platform`,`platform`];function rC(e){if(e&&!(nC.indexOf(e)<0))return e}async function iC(e){!e.optionsJSON&&e.challenge&&(console.warn(`startRegistration() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useAutoRegister:n=!1}=e;if(!YS())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:JS(t.challenge),user:{...t.user,id:JS(t.user.id)},excludeCredentials:t.excludeCredentials?.map(ZS)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=tC.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw eC({error:e,options:i})}if(!a)throw Error(`Registration was not completed`);let{id:o,rawId:s,response:c,type:l}=a,u;typeof c.getTransports==`function`&&(u=c.getTransports());let d;if(typeof c.getPublicKeyAlgorithm==`function`)try{d=c.getPublicKeyAlgorithm()}catch(e){aC(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=qS(e))}catch(e){aC(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=qS(c.getAuthenticatorData())}catch(e){aC(`getAuthenticatorData()`,e)}return{id:o,rawId:qS(s),response:{attestationObject:qS(c.attestationObject),clientDataJSON:qS(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:rC(a.authenticatorAttachment)}}function aC(e,t){console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.\n`,t)}function oC(){if(!YS())return sC.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?sC.stubThis(new Promise(e=>e(!1))):sC.stubThis(e.isConditionalMediationAvailable())}var sC={stubThis:e=>e};function cC({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new $S({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new $S({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!QS(t))return new $S({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new $S({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new $S({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function lC(e){!e.optionsJSON&&e.challenge&&(console.warn(`startAuthentication() was not called correctly. It will try to continue with the provided options, but this call should be refactored to use the expected call structure instead. See https://simplewebauthn.dev/docs/packages/browser#typeerror-cannot-read-properties-of-undefined-reading-challenge for more information.`),e={optionsJSON:e});let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!YS())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(ZS));let a={...t,challenge:JS(t.challenge),allowCredentials:i},o={};if(n){if(!await oC())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=tC.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw cC({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=qS(u.userHandle)),{id:c,rawId:qS(l),response:{authenticatorData:qS(u.authenticatorData),clientDataJSON:qS(u.clientDataJSON),signature:qS(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:rC(s.authenticatorAttachment)}}var uC=`1.7.7`,dC=Symbol.for(`better-auth:broadcast-channel`),fC=()=>Math.floor(Date.now()/1e3),pC=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(typeof window<`u`)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:fC()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event===`session`&&t?.data&&this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function mC(e=`better-auth.message`){return globalThis[dC]||(globalThis[dC]=new pC(e)),globalThis[dC]}var hC=[],gC=0,_C=null,vC=4,yC=globalThis.nanostoresGlobal||={epoch:0},bC=()=>{let e;for(gC=0;gC<hC.length;gC+=vC)try{hC[gC](hC[gC+1].value,hC[gC+2],hC[gC+3])}catch(t){e=t}if(hC.length=0,e)throw e},xC=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=gC+vC;t<hC.length;)hC[t]===e?hC.splice(t,vC):t+=vC;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){yC.epoch++;let i=!hC.length&&!0;for(let i of t)_C?.has(i)||(_C?.add(i),hC.push(i,n,e,r));i&&bC()},off(){},set(e){let t=n.value;n.eq(t,e)||(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},SC=2,CC=5,wC=6,TC=10,EC=(e,t,n,r)=>(e.events=e.events||{},e.events[n+TC]||(e.events[n+TC]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+TC](),delete e.events[n+TC])}),DC=(e,t)=>EC(e,t,SC,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),OC=1e3,kC=(e,t)=>EC(e,n=>{let r=t(n);r&&e.events[wC].push(r)},CC,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[wC]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[wC])t();e.events[wC]=[]}},OC)},()=>{e.listen=n,e.off=r}});function AC(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function jC(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!jC(e[n],t[n]))return!1;return!0}if(AC(e)&&AC(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!jC(e[r],t[r]))return!1;return!0}return!1}function MC(e,t){return DC(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var NC=Symbol.for(`better-auth:focus-manager`),PC=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function FC(){return globalThis[NC]||(globalThis[NC]=new PC),globalThis[NC]}var IC=Symbol.for(`better-auth:online-manager`),LC=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function RC(){return globalThis[IC]||(globalThis[IC]=new LC),globalThis[IC]}var zC={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},BC=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,VC={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},HC=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function UC(e){return e instanceof Date&&!isNaN(e.getTime())}function WC(e){let t=HC.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return UC(f)?f:null}function GC(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in VC)return VC[s];if(!BC.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(zC).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=WC(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function KC(e,t={strict:!0}){return GC(e,t)}var qC=Symbol.for(`better-auth:auth-query`);function JC(e){let t=xC(e);return Object.defineProperty(t,qC,{value:!0}),t}var YC=()=>typeof window>`u`;function XC(e,t){return jC(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}var ZC=(e,t,n,r)=>{let i=JC({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>o(e)});kC(i,()=>MC(i,XC));let a=0,o=async e=>{let o=++a;return new Promise(s=>{let c=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...c,query:{...c?.query,...e?.query},async onSuccess(e){if(o===a){let t=i.get(),n=t.data!=null&&e.data!=null&&jC(t.data,e.data)?t.data:e.data;i.set({data:n,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}await c?.onSuccess?.(e)},async onError(e){let{request:t}=e,n=typeof t.retry==`number`?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(!(n&&r<n)){if(o===a){let t=e.error.status===401;i.set({error:e.error,data:t?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}await c?.onError?.(e)}},async onRequest(e){if(o===a){let e=i.get();i.set({isPending:e.data===null,data:e.data,error:null,isRefetching:!0,refetch:i.value.refetch})}await c?.onRequest?.(e)}}).catch(e=>{o===a&&i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{s(void 0)})})};e=Array.isArray(e)?e:[e];let s=!1,c=!1,l=!1,u=()=>{if(s){l=!0;return}s=!0,o().finally(()=>{s=!1;let e=l&&c;l=!1,e&&u()})};return kC(i,()=>{if(YC())return;c=!0;let t=!1,n,r=e.map(e=>e.listen(()=>{t?o():(t=!0,clearTimeout(n),u())}));return n=setTimeout(()=>{t=!0,u()},0),()=>{c=!1;for(let e of r)e();clearTimeout(n)}}),i},QC=()=>Math.floor(Date.now()/1e3),$C=5;function ew(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||RC().isOnline,u=e=>{if(l()){if(e?.event===`storage`){t();return}if(e?.event===`poll`){c.lastSessionRequest=QC(),t();return}if(e?.event===`visibilitychange`){if(QC()-c.lastSessionRequest<$C)return;c.lastSessionRequest=QC(),t();return}t()}},d=e=>{mC().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=mC().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=FC().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=RC().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=mC().setup(),c.cleanupFocusSetup=FC().setup(),c.cleanupOnlineSetup=RC().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var tw=Object.create(null),nw=e=>({}),rw=new Proxy(tw,{get(e,t){return nw()[t]??tw[t]},has(e,t){return t in nw()||t in tw},set(e,t,n){let r=nw(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=nw(!0);return delete n[t],!0},ownKeys(){let e=nw(!0);return Object.keys(e)}});rw.NODE_ENV;function iw(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return iw(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return iw(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return iw(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return iw(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return iw(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return iw(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return iw(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function aw(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function ow(e){let t=e.split(`
|
|
29
|
+
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
30
|
+
at `))}function sw(e,t){class n extends e{#e;constructor(...e){if(aw()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=ow(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var cw={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};sw(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:cw[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var lw=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},uw=47;function dw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===uw;)t--;return t===e.length?e:e.slice(0,t)}function fw(e){try{return(dw(new URL(e).pathname)||`/`)!==`/`}catch{throw new lw(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function pw(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new lw(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof lw?t:new lw(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function mw(e,t=`/api/auth`){if(pw(e),fw(e))return e;let n=dw(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function hw(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function gw(e,t,n,r,i){if(e)return mw(e,t);if(r!==!1){let e=rw.BETTER_AUTH_URL||rw.NEXT_PUBLIC_BETTER_AUTH_URL||rw.PUBLIC_BETTER_AUTH_URL||rw.NUXT_PUBLIC_BETTER_AUTH_URL||rw.NUXT_PUBLIC_AUTH_URL||(rw.BASE_URL===`/`?void 0:rw.BASE_URL);if(e)return mw(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&hw(o,`proto`)&&hw(a,`host`))try{return mw(`${o}://${a}`,t)}catch{}if(n){let e=_w(n.url);if(!e)throw new lw(`Could not get origin from request. Please provide a valid base URL.`);return mw(e,t)}if(typeof window<`u`&&window.location)return mw(window.location.origin,t)}function _w(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var vw=[`javascript:`,`data:`,`vbscript:`];function yw(e){let t;try{t=new URL(e)}catch{return!0}return!vw.includes(t.protocol)}var bw={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&yw(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},xw=()=>typeof window>`u`,Sw=OC;function Cw(e,t){if(typeof window>`u`)return;let n=e.get();n.data===null&&t!==null&&e.set({...n,data:t,error:null,isPending:!1})}function ww(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function Tw(e){return!e||e.session===null&&e.user===null?null:e}function Ew(e,t){return jC(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function Dw(e,t){let n=xC(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=JC({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});MC(s,Ew);let c=async(t,n)=>{let r=s.value;if(s.set({...r,isPending:r.data===null,isRefetching:!0,error:null,refetch:o}),t.aborted)return`aborted`;try{let r=await e(`/get-session`,{method:`GET`,query:n?.query,signal:t});if(t.aborted)return`aborted`;let{data:i,error:a}=ww(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=ww(n))}catch{if(t.aborted)return`aborted`;c=`stale`}if(a){let e=s.value,t=a?.status===401;return s.set({data:t?null:e.data,error:a,isPending:!1,isRefetching:!1,refetch:o}),`failed`}let l=Tw(i),u=s.value,d=u.data!=null&&l!=null&&jC(u.data,l)?u.data:l;return s.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:o}),c}catch(e){if(t.aborted)return`aborted`;let n=s.value;return s.set({data:n.data,error:e,isPending:!1,isRefetching:!1,refetch:o}),`failed`}},l=()=>{let e=s.value.data?.session?.expiresAt,t=e instanceof Date?e.getTime():1/0;return Math.min(Date.now()+Sw,t)},u=e=>{i=0,r?.cancel();let t=new AbortController,n={cancel:()=>t.abort(),promise:Promise.resolve().then(()=>t.signal.aborted?`aborted`:c(t.signal,e)),revision:a};r=n;let o=e=>{r===n&&(r=void 0,e===`fresh`&&n.revision===a&&(i=l()))};return n.promise.then(o,()=>o(`failed`)),n.promise.then(()=>void 0)},d=()=>r?.revision===a?r.promise.then(()=>void 0):Date.now()<i?Promise.resolve():u(),f=()=>{};return kC(s,()=>{let e;xw()||(e=setTimeout(()=>{d()},0));let r=ew({fetchSession:u,shouldPollSession:()=>s.value.data!=null,sessionSignal:n,options:t});return r.init(),f=r.broadcastSessionUpdate,()=>{e&&clearTimeout(e),r.cleanup()}}),{session:s,$sessionSignal:n,broadcastSessionUpdate:e=>f(e)}}var Ow=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},kw=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let t=await i.init?.call(i,e.toString(),n);n=t.options||n,e=t.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},Aw=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},jw=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function Mw(e){if(typeof e==`number`)return new Aw({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new Aw(e);case`exponential`:return new jw(e);default:throw Error(`Invalid retry strategy`)}}var Nw=[`get`,`post`,`put`,`patch`,`delete`];function Pw(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return Nw.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var Fw=e=>e===`.`||e===`..`,Iw=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function Lw(e,t){let n=t.get(e);if(n===void 0)return Iw(e);if(Fw(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function Rw(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``,{path:o}=Pw(e);o!==e&&(e=`/${o}`),a.endsWith(`/`)||(a+=`/`);let[s,c]=e.replace(a,``).split(`?`),l=new URLSearchParams(c);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)l.append(e,n);continue}else n=JSON.stringify(t);l.set(e,n)}let u=new Map;if(r){if(Array.isArray(r)){let e=s.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];u.set(n,String(e))}}else for(let[e,t]of Object.entries(r))u.set(`:${e}`,String(t))}s=s.split(`/`).map(e=>Lw(e,u)).join(`/`),s=s.replace(/^\/+/,``);let d=l.toString();return d=d.length>0?`?${d}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${s}${d}`,a):`${a}${s}${d}`}var zw=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},Bw=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Vw(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return Bw.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function Hw(e){try{return JSON.parse(e),!0}catch{return!1}}function Uw(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function Ww(e){try{return JSON.parse(e)}catch{return e}}function Gw(e){return typeof e==`function`}function Kw(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&Gw(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&Gw(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function qw(...e){let t={};for(let n of e)if(n){if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}}return t}async function Jw(e){let t=new Headers(qw(e?.headers,await zw(e)));if(!t.has(`content-type`)){let n=Yw(e?.body);n&&t.set(`content-type`,n)}return t}function Yw(e){return Uw(e)?`application/json`:null}function Xw(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function Zw(e,t){let{body:n}=e;return n?!Uw(n)||typeof n==`string`?n:Xw(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function Qw(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=Pw(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function $w(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var eT=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function tT(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new eT(n.issues);return n.value}function nT(e){"@babel/helpers - typeof";return nT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},nT(e)}function rT(e,t){if(nT(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(nT(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function iT(e){var t=rT(e,`string`);return nT(t)==`symbol`?t:t+``}function aT(e,t,n){return(t=iT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function oT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function sT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?oT(Object(n),!0).forEach(function(t){aT(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oT(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var cT=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await kw(e,t),o=Kw(a),s=new AbortController,c=a.signal??s.signal,l=Rw(i,a),u=await Jw(a),d=Zw(a,u),f=Qw(i,a),p=sT(sT({},a),{},{url:l,headers:u,body:d,method:f,signal:c});for(let e of r.onRequest)if(e){let t=await e(p);typeof t==`object`&&t&&Object.assign(p,t)}(`pipeTo`in p&&typeof p.pipeTo==`function`||typeof(t==null||(n=t.body)==null?void 0:n.pipe)==`function`)&&(`duplex`in p||(p.duplex=`half`));let{clearTimeout:m}=$w(a,s),h=await o(p.url,p);m();let g={response:h,request:p};for(let e of r.onResponse)if(e){var _;let n=await e(sT(sT({},g),{},{response:t!=null&&(_=t.hookOptions)!=null&&_.cloneResponse?h.clone():h}));n instanceof Response?h=n:typeof n==`object`&&n&&(h=n.response)}if(h.ok){if(p.method===`HEAD`)return{data:``,error:null};let e=Vw(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??Ww)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await tT(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e(sT(sT({},n),{},{response:t!=null&&(v=t.hookOptions)!=null&&v.cloneResponse?h.clone():h}))}return t?.throw?n.data:{data:n.data,error:null}}let y=t?.jsonParser??Ww,b=await h.text(),x=Hw(b),S=x?await y(b):null,C={response:h,responseText:b,request:p,error:sT(sT({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var w;await e(sT(sT({},C),{},{response:t!=null&&(w=t.hookOptions)!=null&&w.cloneResponse?h.clone():h}))}if(t?.retry){let n=Mw(t.retry),i=t.retryAttempt??0;if(await n.shouldAttemptRetry(i,h)){for(let e of r.onRetry)e&&await e(g);let a=n.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await cT(e,sT(sT({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new Ow(h.status,h.statusText,x?S:b);return{data:null,error:sT(sT({},S),{},{status:h.status,statusText:h.statusText})}},lT=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=sT(sT({},n),e.query!==void 0&&{query:sT(sT({},e.query),n?.query)}),a=((r=e.plugins)==null||(r=r.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1))==null?void 0:r.schema)||e.schema;if(a){let r=t;a.config?.prefix&&r.startsWith(a.config.prefix)&&(r=r.replace(a.config.prefix,``),a.config.baseURL&&(t=t.replace(a.config.prefix,a.config.baseURL))),a.config?.baseURL&&r.startsWith(a.config.baseURL)&&(r=r.replace(a.config.baseURL,``)),r.startsWith(`/`)&&r.charAt(1)===`@`&&(r=r.substring(1));let o=a.schema[r];if(o){let{method:a,path:s}=Pw(r);a&&(t=t.slice(0,t.length-r.length)+s);let c=n?.headers;if(o.headers&&!n?.disableValidation){let e={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((t,n)=>{e[n.toLowerCase()]=t});else if(typeof n.headers==`object`)for(let[t,r]of Object.entries(n.headers))r!=null&&(e[t.toLowerCase()]=r)}let t=await tT(o.headers,e),r={};for(let[e,n]of Object.entries(t))r[e.toLowerCase()]=n;c=r}let l=o.method??a;if(i=sT(sT(sT(sT({},i),l!==void 0&&{method:l}),o.output!==void 0&&{output:o.output}),c!==void 0&&{headers:c}),!n?.disableValidation){if(o.query&&(i.query=await tT(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=sT({},e.query);for(let e of Object.keys(t))n?.query&&Object.prototype.hasOwnProperty.call(n.query,e)&&(t[e]=n.query[e]);i.query=sT(sT({},t),i.query)}i=sT(sT({},i),{},{body:o.input?await tT(o.input,n?.body):n?.body,params:o.params?await tT(o.params,n?.params):n?.params})}return{url:t,options:i}}}return sT({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),uT=e=>{async function t(t,n){let r=sT(sT(sT({},e),n),{},{headers:qw(e?.headers,n?.headers),plugins:[...e?.plugins||[],lT(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await cT(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await cT(t,r)}return t},dT=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},fT=e=>e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`,pT=(e,t)=>{let n=`credentials`in Request.prototype,r=gw(e?.baseURL,e?.basePath,void 0,t)??dT(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=uT({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?KC(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[bw],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=Dw(d,e),h=!1,g=e=>{h||e===null||(h=!0,Cw(p,e))},_=e?.plugins||[],v={},y={$sessionSignal:f,session:p},b={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},x=[{signal:`$sessionSignal`,matcher:fT,callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of _)e.getAtoms&&Object.assign(y,e.getAtoms?.(d)),e.pathMethods&&Object.assign(b,e.pathMethods),e.atomListeners&&x.push(...e.atomListeners);let S={notify:e=>{y[e].set(!y[e].get())},listen:(e,t)=>{y[e].subscribe(t)},atoms:y};for(let t of _)t.getActions&&(v=jS(t.getActions?.(d,S,e)??{},v));return{get baseURL(){return r},pluginsActions:v,pluginsAtoms:y,pluginPathMethods:b,atomListeners:x,hydrateSession:g,$sessionSignal:f,$fetch:d,$store:S}};function mT(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function hT(e){return e.charAt(0).toUpperCase()+e.slice(1)}var gT=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,_T=/['\u2019]/g;function vT(e){return e.replace(_T,``).match(gT)??[]}function yT(e){return vT(e).map(e=>e.toLowerCase()).join(`-`)}function bT(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function xT(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||mT(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(yT).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=bT(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function ST(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,atomListeners:o,$store:s}=pT(e),c={};for(let[e,t]of Object.entries(r))c[`use${hT(e)}`]=t;return xT({...n,...c,hydrateSession:i,$fetch:a,$store:s},a,t,r,o)}var CT=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s;try{s=await lC({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof $S?e.code:`AUTH_CANCELLED`,message:GS.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}try{let{clientExtensionResults:a,...o}=s,c=await e(`/passkey/verify-authentication`,{body:{response:o},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...c,webauthn:{response:s,clientExtensionResults:a}}:c}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:GS.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}}},passkey:{addPasskey:async(r,i)=>{let a=await e(`/passkey/generate-register-options`,{method:`GET`,query:{...r?.authenticatorAttachment&&{authenticatorAttachment:r.authenticatorAttachment},...r?.name&&{name:r.name},...r?.context&&{context:r.context}},throw:!1});if(!a.data)return a;try{let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s=await iC({optionsJSON:{...a.data,extensions:o},useAutoRegister:r?.useAutoRegister}),{clientExtensionResults:c,...l}=s,u=await e(`/passkey/verify-registration`,{...r?.fetchOptions,...i,body:{response:l,name:r?.name,...r?.createSession&&{createSession:!0}},method:`POST`,throw:!1});return u.data?(t.set(Math.random()),u.data.session&&n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...u,webauthn:{response:s,clientExtensionResults:c}}:u):u}catch(e){return e instanceof $S?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:GS.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:GS.REGISTRATION_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:e.code,message:e.message,status:400,statusText:`BAD_REQUEST`}}:{data:null,error:{code:`UNKNOWN_ERROR`,message:e instanceof Error?e.message:GS.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),wT=()=>{let e=xC();return{id:`passkey`,version:KS,$InferServerPlugin:{},getActions:(t,n)=>CT(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:ZC(e,`/passkey/list-user-passkeys`,t,{method:`GET`}),$listPasskeys:e}},pathMethods:{"/passkey/register":`POST`,"/passkey/authenticate":`POST`},atomListeners:[{matcher(e){return e===`/passkey/verify-registration`||e===`/passkey/delete-passkey`||e===`/passkey/update-passkey`||e===`/sign-out`},signal:`$listPasskeys`},{matcher:e=>e===`/passkey/verify-authentication`,signal:`$sessionSignal`}],$ERROR_CODES:GS}},TT=`1.7.7`,ET=e=>({id:`sso-client`,version:TT,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}});function DT(e){if(e.indexOf(`%`)===-1)return e;try{return decodeURIComponent(e)}catch{return e}}var OT=/^[\x21\x23-\x27\x2A\x2B\x2D\x2E\x30-\x39\x41-\x5A\x5E\x5F\x60\x61-\x7A\x7C\x7E]+$/,kT=/^[\x20\x21\x23-\x3A\x3C-\x5B\x5D-\x7E]*$/;function AT(e){return e.length<2||!e.startsWith(`"`)||!e.endsWith(`"`)?e:e.slice(1,-1)}function jT(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==32&&n!==9)break;t++}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==32&&t!==9)break;n--}return t===0&&n===e.length?e:e.slice(t,n)}function MT(e){let t=new Map;if(e.length<2)return t;for(let n of e.split(`;`)){let e=n.indexOf(`=`);if(e===-1)continue;let r=jT(n.slice(0,e)),i=AT(jT(n.slice(e+1)));OT.test(r)&&kT.test(i)&&t.set(r,DT(i))}return t}function NT(e){return typeof document>`u`?null:MT(document.cookie).get(e)??null}var PT=(e={})=>{let t=e.cookieName||`better-auth.last_used_login_method`;return{id:`last-login-method-client`,version:uC,getActions(){return{getLastUsedLoginMethod:()=>NT(t),clearLastUsedLoginMethod:()=>{if(typeof document<`u`){let n=e.domain?` domain=${e.domain};`:``;document.cookie=`${t}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;${n}`}},isLastUsedLoginMethod:e=>NT(t)===e}}}},FT=()=>({id:`magic-link`,version:uC,$InferServerPlugin:{}}),IT=WS({INVALID_SESSION_TOKEN:`Invalid session token`}),LT=()=>({id:`multi-session`,version:uC,$InferServerPlugin:{},atomListeners:[{matcher(e){return e===`/multi-session/set-active`},signal:`$sessionSignal`}],$ERROR_CODES:IT}),RT=WS({OTP_NOT_ENABLED:`OTP not enabled`,OTP_NOT_CONFIGURED:`OTP is not available`,OTP_HAS_EXPIRED:`OTP has expired`,TOTP_NOT_ENABLED:`TOTP not enabled`,TOTP_ALREADY_ENABLED:`TOTP is already enabled`,TOTP_NOT_CONFIGURED:`TOTP is not available`,TWO_FACTOR_NOT_ENABLED:`Two factor isn't enabled`,BACKUP_CODES_NOT_ENABLED:`Backup codes aren't enabled`,INVALID_BACKUP_CODE:`Invalid backup code`,INVALID_CODE:`Invalid code`,TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:`Too many attempts. Please request a new code.`,ACCOUNT_TEMPORARILY_LOCKED:`Too many failed verification attempts. Your account is temporarily locked. Please try again later.`,INVALID_TWO_FACTOR_COOKIE:`Invalid two factor cookie`}),zT=e=>({id:`two-factor`,version:uC,$InferServerPlugin:{},atomListeners:[{matcher:e=>e.startsWith(`/two-factor/`),signal:`$sessionSignal`}],pathMethods:{"/two-factor/disable":`POST`,"/two-factor/enable":`POST`,"/two-factor/send-otp":`POST`,"/two-factor/generate-backup-codes":`POST`,"/two-factor/get-totp-uri":`POST`,"/two-factor/verify-totp":`POST`,"/two-factor/verify-otp":`POST`,"/two-factor/verify-backup-code":`POST`},fetchPlugins:[{id:`two-factor`,name:`two-factor`,hooks:{async onSuccess(t){if(t.data?.twoFactorRedirect){if(e?.onTwoFactorRedirect){await e.onTwoFactorRedirect({twoFactorMethods:t.data.twoFactorMethods});return}e?.twoFactorPage&&typeof window<`u`&&yw(e.twoFactorPage)&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:RT}),BT=e=>ST({baseURL:_S(e,e),withCredentials:!0,plugins:[zT({onTwoFactorRedirect:()=>{let e=new URLSearchParams(window.location.search).get(`redirect_url`),t=e?`/auth/2fa?redirect_url=${encodeURIComponent(e)}`:`/auth/2fa`;window.location.href=t}}),wT(),FT(),ET(),LT(),PT()]}),VT=e=>{let t=e?.editor?.backendURL??xn?.backendURL;t||(t=ii,console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=BT(t);return{getAuthClient:()=>n,signInEmail:async(...e)=>n.signIn.email(...e),signUpEmail:async(...e)=>n.signUp.email(...e),signOut:async(...e)=>n.signOut(...e),signInSocial:async(...e)=>n.signIn.social(...e),linkSocial:async(...e)=>n.linkSocial(...e),changePasswordSession:async(...e)=>n.changePassword(...e),requestPasswordResetSession:async(...e)=>n.requestPasswordReset(...e),resetPassword:async(...e)=>n.resetPassword(...e),verifyEmailSession:async(...e)=>n.verifyEmail(...e),getSession:async(...e)=>n.getSession(...e),forgetPassword:async(...e)=>n.requestPasswordReset(...e),sendVerificationEmail:async(...e)=>n.sendVerificationEmail(...e),changeEmail:async(...e)=>n.changeEmail(...e),deleteUser:async(...e)=>n.deleteUser(...e),revokeSession:async(...e)=>n.revokeSession(...e),revokeSessions:async(...e)=>n.revokeSessions(...e),revokeOtherSessions:async(...e)=>n.revokeOtherSessions(...e),listAccounts:async(...e)=>n.listAccounts(...e),unlinkAccount:async(...e)=>n.unlinkAccount(...e),refreshToken:async(...e)=>n.refreshToken(...e),getAccessToken:async(...e)=>n.getAccessToken(...e),accountInfo:async(...e)=>n.accountInfo(...e),updateUser:async(...e)=>n.updateUser(...e),listSessions:async(...e)=>n.listSessions(...e),enableTwoFactor:async(...e)=>n.twoFactor.enable(...e),disableTwoFactor:async(...e)=>n.twoFactor.disable(...e),verifyTotp:async(...e)=>n.twoFactor.verifyTotp(...e),verifyBackupCode:async(...e)=>n.twoFactor.verifyBackupCode(...e),addPasskey:async(...e)=>n.passkey.addPasskey(...e),signInPasskey:async(...e)=>n.signIn.passkey(...e),deletePasskey:async(...e)=>n.passkey.deletePasskey(...e),listPasskeys:async()=>n.$fetch(`/passkey/list-user-passkeys`,{method:`GET`}),signInMagicLink:async(...e)=>n.signIn.magicLink(...e),signInSSO:async(...e)=>n.signIn.sso(...e),registerSSO:async(...e)=>n.sso.register(...e),listSSOProviders:async()=>({data:(await n.sso.providers())?.data?.providers??[]}),deleteSSOProvider:async e=>n.sso.deleteProvider({providerId:e.providerId}),listDeviceSessions:async(...e)=>n.multiSession.listDeviceSessions(...e),revokeDeviceSession:async(...e)=>n.multiSession.revoke(...e),setActiveSession:async(...e)=>n.multiSession.setActive(...e)}};D();var HT=C(null),UT=({children:e,manager:t})=>L(HT.Provider,{value:t,children:e}),WT=()=>l(HT);D();var GT=()=>{let e=WT(),[t,n]=N(e?.localeDictionaries.value??{});return M(()=>{if(!e)return;let t=e=>n(e.detail??{});return e.localeDictionaries.addEventListener(`change`,t),()=>e.localeDictionaries.removeEventListener(`change`,t)},[e]),{localeDictionaries:t,setLocaleDictionaries:i(t=>e?.localeDictionaries.set(t),[e]),setLocaleDictionary:i(t=>e?.setLocaleDictionary(t),[e])}},KT=()=>{let{setLocaleDictionaries:e,setLocaleDictionary:t}=GT();return{setLocaleDictionaries:e,setLocaleDictionary:t}};D();var qT=(e,t)=>{let n=WT(),[r,i]=N(t);return M(()=>n?.messenger.subscribe(`${e}/post`,e=>i(()=>e)),[n,e]),r},JT=function(e){return e.INTLAYER_CLIENT_READY=`INTLAYER_CLIENT_READY`,e.INTLAYER_ARE_YOU_THERE=`INTLAYER_ARE_YOU_THERE`,e.INTLAYER_EDITOR_ACTIVATE=`INTLAYER_EDITOR_ACTIVATE`,e.INTLAYER_EDITOR_ENABLED=`INTLAYER_EDITOR_ENABLED`,e.INTLAYER_CONFIGURATION=`INTLAYER_CONFIGURATION`,e.INTLAYER_CURRENT_LOCALE=`INTLAYER_CURRENT_LOCALE`,e.INTLAYER_URL_CHANGE=`INTLAYER_URL_CHANGE`,e.INTLAYER_LOCALE_CHANGE_REQUESTED=`INTLAYER_LOCALE_CHANGE_REQUESTED`,e.INTLAYER_LOCALE_DICTIONARIES_CHANGED=`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,e.INTLAYER_DISTANT_DICTIONARIES_CHANGED=`INTLAYER_DISTANT_DICTIONARIES_CHANGED`,e.INTLAYER_HOVERED_CONTENT_CHANGED=`INTLAYER_HOVERED_CONTENT_CHANGED`,e.INTLAYER_FOCUSED_CONTENT_CHANGED=`INTLAYER_FOCUSED_CONTENT_CHANGED`,e.INTLAYER_EDITED_CONTENT_CHANGED=`INTLAYER_EDITED_CONTENT_CHANGED`,e.INTLAYER_IFRAME_CLICKED=`INTLAYER_IFRAME_CLICKED`,e.INTLAYER_DISPLAYED_DICTIONARY_KEYS=`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,e.INTLAYER_HOST_THEME_CHANGED=`INTLAYER_HOST_THEME_CHANGED`,e}({}),YT=`__intlayer_editor_manager__`,XT=`__intlayer_editor_manager_events__`,ZT=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[XT]||(e[XT]=new EventTarget),e[XT]},QT=()=>typeof window>`u`?null:window[YT]??null,$T=e=>{if(typeof window<`u`){let t=window;t[YT]=e}ZT().dispatchEvent(new CustomEvent(`change`,{detail:e}))},eE=e=>{let t=ZT(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},tE=.3,nE=e=>e.parentElement??e.getRootNode().host??null,rE=e=>{let t=e.transform&&e.transform!==`none`?new DOMMatrixReadOnly(e.transform).m42:0,n=Number.parseFloat(e.translate?.split(` `)[1]??``);return t+(Number.isNaN(n)?0:n)},iE=e=>{let t=0;for(let n=e;n;n=nE(n)){let e=getComputedStyle(n);Number.parseFloat(e.opacity)<1&&(t+=rE(e))}return t},aE=new Map,oE=(e,t)=>{let n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_DISCONNECTED?!0:!!(n&Node.DOCUMENT_POSITION_FOLLOWING)},sE=()=>{let e=null;for(let t of aE.keys())t.isConnected&&(!e||!oE(t,e))&&(e=t);let t=e?aE.get(e):void 0;aE.clear(),t?.()},cE=(e,t)=>{aE.size===0&&queueMicrotask(sE),aE.set(e,t)},lE=typeof HTMLElement<`u`?HTMLElement:class{},uE=class extends lE{_keyPathJson=`[]`;_dictionaryKey=``;_editorEnabled=!1;_isInIframe=!1;_isSelected=!1;_editedValue=void 0;_renderState=null;_selector=null;_unsubManager=null;_unsubManagerState=null;static get observedAttributes(){return[`key-path`,`dictionary-key`]}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=`:host { display: contents; }`,e.appendChild(t)}attributeChangedCallback(e,t,n){e===`key-path`?this._keyPathJson=n??`[]`:this._dictionaryKey=n??``;let r=QT();r&&this._updateEditedValue(r)}connectedCallback(){typeof window<`u`&&(this._isInIframe=window.self!==window.top),this._subscribeToManager(),this._render()}disconnectedCallback(){this._unsubManager?.(),this._unsubManager=null,this._unsubManagerState?.(),this._unsubManagerState=null}_getRawKeyPath(){try{return JSON.parse(this._keyPathJson)}catch{return[]}}_getFilteredKeyPath(){return this._getRawKeyPath().filter(e=>e.type!==lr)}_updateEditedValue(e){let t=this._getFilteredKeyPath();if(!this._dictionaryKey||t.length===0){this._editedValue=void 0,this._render();return}let n=this._getRawKeyPath(),r=n[n.length-1]?.type;if(r===`markdown`||r===`html`||r===`insertion`||r===`file`){this._editedValue=void 0,this._render();return}let i=e.getContentValue(this._dictionaryKey,t);if(typeof i==`object`&&i&&i.nodeType===`translation`){let t=e.currentLocale.value;i=t?i[lr][t]:void 0}this._editedValue=i,this._render()}_updateIsSelected(e){if(!e){this._isSelected=!1,aE.delete(this),this._updateSelectorAttr();return}let t=this._getFilteredKeyPath(),n=this._isSelected;this._isSelected=e.dictionaryKey===this._dictionaryKey&&(e.keyPath?.length??0)>0&&Zn(e.keyPath??[],t),this._updateSelectorAttr(),this._isSelected&&!n?cE(this,()=>this._scrollIntoViewIfNeeded()):this._isSelected||aE.delete(this)}_scrollIntoViewIfNeeded(){let e=this._selector?.shadowRoot?.querySelector(`.wrapper`);if(!e)return;let t=e.getBoundingClientRect(),n=t.top-iE(e),r=n+t.height;n>=0&&r<=window.innerHeight&&!this._isCoveredAt((t.left+t.right)/2,n+1)||window.scrollBy({top:n-window.innerHeight*tE,behavior:`smooth`})}_isCoveredAt(e,t){let n=this.getRootNode();if(typeof n.elementFromPoint!=`function`)return!1;let r=n.elementFromPoint(e,t);return!!r&&!this.contains(r)}_updateSelectorAttr(){this._selector&&(this._isSelected?this._selector.setAttribute(`is-selecting`,``):this._selector.removeAttribute(`is-selecting`))}_subscribeToManager(){let e=QT();e&&this._setupManagerSubscriptions(e),this._unsubManager=eE(e=>{this._unsubManagerState?.(),this._unsubManagerState=null,e?this._setupManagerSubscriptions(e):(this._editorEnabled=!1,this._isSelected=!1,this._editedValue=void 0,this._render())})}_setupManagerSubscriptions(e){this._editorEnabled=e.editorEnabled.value??!1,this._updateIsSelected(e.focusedContent.value),this._updateEditedValue(e);let t=e=>{this._editorEnabled=e.detail,this._render()},n=e=>{this._updateIsSelected(e.detail)},r=()=>{this._updateEditedValue(e)};e.editorEnabled.addEventListener(`change`,t),e.focusedContent.addEventListener(`change`,n),e.editedContent.addEventListener(`change`,r),this._unsubManagerState=()=>{e.editorEnabled.removeEventListener(`change`,t),e.focusedContent.removeEventListener(`change`,n),e.editedContent.removeEventListener(`change`,r)}}_handlePress(e){e.stopPropagation();let t=QT();t&&t.focusedContent.set({dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),QT()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),QT()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,null)}_render(){let e=this._isInIframe&&this._editorEnabled,t=this._editedValue,n=e?typeof t==`string`||typeof t==`number`||typeof t==`boolean`?`wrapped-text`:`wrapped-slot`:`simple`;if(this._renderState!==n){this._rebuildContent(n);return}n!==`simple`&&this._selector&&(this._updateSelectorAttr(),n===`wrapped-text`&&this._selector.firstChild?.nodeType===Node.TEXT_NODE&&(this._selector.firstChild.data=String(t)))}_rebuildContent(e){let t=this.shadowRoot;for(;t.childNodes.length>1;)t.removeChild(t.lastChild);if(this._selector=null,e===`simple`)t.appendChild(document.createElement(`slot`));else{let n=document.createElement(`intlayer-content-selector`);this._selector=n,this._isSelected&&n.setAttribute(`is-selecting`,``),n.addEventListener(`intlayer:press`,e=>this._handlePress(e)),n.addEventListener(`intlayer:hover`,e=>this._handleHover(e)),n.addEventListener(`intlayer:unhover`,e=>this._handleUnhover(e)),e===`wrapped-text`?n.appendChild(document.createTextNode(String(this._editedValue))):n.appendChild(document.createElement(`slot`)),t.appendChild(n)}this._renderState=e}},dE=()=>{typeof customElements<`u`&&(customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,uE))},fE=new WeakSet,pE=e=>{fE.add(e)},mE=e=>fE.has(e),hE=[`a[href]`,`button`,`input`,`select`,`textarea`,`label`,`summary`,`option`,`video[controls]`,`audio[controls]`,`[contenteditable=""]`,`[contenteditable="true"]`,`[onclick]`,...[`button`,`link`,`checkbox`,`radio`,`switch`,`tab`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`combobox`,`slider`,`spinbutton`,`textbox`].map(e=>`[role="${e}"]`)].join(`,`),gE=`intlayer-`,_E=e=>{if(e.localName.startsWith(gE))return!0;let t=e.getRootNode();return t instanceof ShadowRoot&&t.host.localName.startsWith(gE)},vE=e=>{let t=e.composedPath().filter(e=>e instanceof Element),n=t.findLastIndex(_E);return t.some((e,t)=>_E(e)?!1:e.matches(hE)?!0:t>n&&getComputedStyle(e).cursor===`pointer`)},yE=250,bE=`
|
|
31
|
+
:host {
|
|
32
|
+
display: contents;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.wrapper {
|
|
36
|
+
display: inline-block;
|
|
37
|
+
cursor: pointer;
|
|
38
|
+
user-select: none;
|
|
39
|
+
border-radius: 0.375rem;
|
|
40
|
+
outline-width: 2px;
|
|
41
|
+
outline-offset: 4px;
|
|
42
|
+
outline-style: solid;
|
|
43
|
+
outline-color: transparent;
|
|
44
|
+
transition: all 100ms 50ms ease-in-out;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.wrapper[data-active] {
|
|
48
|
+
outline-color: inherit;
|
|
49
|
+
}
|
|
50
|
+
`,xE=typeof HTMLElement<`u`?HTMLElement:class{},SE=class extends xE{_isSelecting=!1;_pressDuration=yE;_isHovered=!1;_isSelectingState=!1;_wrapper;_pressTimer=null;_clickOutsideHandler=null;static get observedAttributes(){return[`is-selecting`,`press-duration`]}get isSelecting(){return this._isSelecting}set isSelecting(e){this._isSelecting=e,this._updateActiveState()}get pressDuration(){return this._pressDuration}set pressDuration(e){this._pressDuration=e}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=bE,e.appendChild(t);let n=document.createElement(`span`);n.className=`wrapper`,n.setAttribute(`role`,`button`),n.setAttribute(`tabindex`,`0`),n.appendChild(document.createElement(`slot`)),e.appendChild(n),this._wrapper=n,n.addEventListener(`mousedown`,()=>this._handleMouseDown()),n.addEventListener(`mouseup`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseleave`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`mouseenter`,()=>this._handleMouseEnter()),n.addEventListener(`click`,e=>this._handleClick(e)),n.addEventListener(`touchstart`,()=>this._handleMouseDown()),n.addEventListener(`touchend`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`touchcancel`,()=>this._handleMouseUpOrLeave()),n.addEventListener(`blur`,()=>this._handleBlur())}attributeChangedCallback(e,t,n){e===`is-selecting`?(this._isSelecting=n!==null,this._updateActiveState()):e===`press-duration`&&(this._pressDuration=n===null?yE:parseInt(n,10))}connectedCallback(){this._clickOutsideHandler=e=>{e.composedPath().includes(this)||(this._isSelectingState=!1,this._dispatch(`intlayer:click-outside`),this._updateActiveState())},document.addEventListener(`mousedown`,this._clickOutsideHandler)}disconnectedCallback(){this._clickOutsideHandler&&=(document.removeEventListener(`mousedown`,this._clickOutsideHandler),null),this._clearPressTimer()}_updateActiveState(){this._isSelecting||this._isSelectingState||this._isHovered?this._wrapper.setAttribute(`data-active`,``):this._wrapper.removeAttribute(`data-active`)}_clearPressTimer(){this._pressTimer!==null&&(clearTimeout(this._pressTimer),this._pressTimer=null)}_dispatch(e){this.dispatchEvent(new CustomEvent(e,{bubbles:!0,composed:!0}))}_select(){this._clearPressTimer(),this._isSelectingState=!0,this._updateActiveState(),this._dispatch(`intlayer:press`)}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>this._select(),this._pressDuration)}_handleMouseEnter(){this._isHovered=!0,this._updateActiveState(),this._dispatch(`intlayer:hover`)}_handleMouseUpOrLeave(){this._isHovered&&(this._isHovered=!1,this._dispatch(`intlayer:unhover`)),this._clearPressTimer(),this._updateActiveState()}_handleClick(e){if(mE(e))return;let t=e.metaKey||e.ctrlKey;if(this._isSelecting||this._isSelectingState||t){e.preventDefault(),e.stopPropagation(),t&&this._select();return}vE(e)||(pE(e),this._select())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},CE=()=>{typeof customElements<`u`&&(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,SE),dE())},wE=(e,t)=>{try{let n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;let i=n.pathname.replace(/\/$/,``),a=r.pathname.replace(/\/$/,``);return i===``||a===``||i===a}catch(n){return console.error(`Invalid URL(s)`,n,{url1:e,url2:t}),!1}},TE=()=>Math.random().toString(36).slice(2),EE=class{senderId;_config;_subscribers=new Map;_windowHandler=null;_seenMessageIds=new Set;_warnedRejectedOrigins=new Set;constructor(e){this._config=e,this.senderId=TE()}start(){typeof window<`u`&&(this._windowHandler||(this._windowHandler=e=>{this._handleMessage(e)},window.addEventListener(`message`,this._windowHandler)))}stop(){this._windowHandler&&=(window.removeEventListener(`message`,this._windowHandler),null)}send(e,t){let n={type:e,data:t,senderId:this.senderId,messageId:TE()};for(let e of this._config.allowedOrigins)e&&this._config.postMessageFn(n,e)}subscribe(e,t){return this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(t),()=>{this._subscribers.get(e)?.delete(t)}}_handleMessage(e){let t=e.data;if(!t||typeof t!=`object`)return;let{type:n,data:r,senderId:i,messageId:a}=t;if(!n||typeof n!=`string`||i===this.senderId)return;if(a){if(this._seenMessageIds.has(a))return;this._seenMessageIds.add(a),this._seenMessageIds.size>200&&this._seenMessageIds.clear()}let{allowedOrigins:o}=this._config;if(!(!o||o.length===0||o.includes(`*`)||o.filter(e=>!!e&&e!==``).some(t=>wE(t,e.origin)))){n.startsWith(`INTLAYER`)&&!this._warnedRejectedOrigins.has(e.origin)&&(this._warnedRejectedOrigins.add(e.origin),console.warn(`[intlayer] Ignored editor message "${n}" from origin "${e.origin}" — not in allowed origins [${o.join(`, `)}]. Check the editor.editorURL / editor.cmsURL configuration.`));return}let s=this._subscribers.get(n);if(s)for(let e of s)e(r,i)}},DE=class extends EventTarget{_value;_key;_messenger;_options;_unsubscribers=[];constructor(e,t,n={}){super(),this._key=e,this._messenger=t,this._options={emit:n.emit??!0,receive:n.receive??!0},n.initialValue!==void 0&&(this._value=n.initialValue)}get value(){return this._value}set(e){let t=typeof e==`function`?e(this._value):e;this._value=t,this.dispatchEvent(new CustomEvent(`change`,{detail:t})),this._options.emit&&this._messenger.send(`${this._key}/post`,t)}start(){if(this._options.receive){let e=this._messenger.subscribe(`${this._key}/post`,e=>{this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e}))});this._unsubscribers.push(e)}if(this._options.emit){let e=this._messenger.subscribe(`${this._key}/get`,(e,t)=>{t!==this._messenger.senderId&&this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)});this._unsubscribers.push(e)}this._options.receive&&this._value===void 0&&this._messenger.send(`${this._key}/get`)}stop(){for(let e of this._unsubscribers)e();this._unsubscribers.length=0}postCurrentValue(){this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)}},OE=()=>{for(let e of[`mousedown`,`click`])window.dispatchEvent(new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window}))},kE=class{_messenger;_clickHandler=null;_unsubscribeMerge=null;constructor(e){this._messenger=e}startInterceptor(){typeof window<`u`&&(this._clickHandler=e=>{mE(e)||this._messenger.send(`INTLAYER_IFRAME_CLICKED`)},window.addEventListener(`click`,this._clickHandler))}startMerger(){this._unsubscribeMerge=this._messenger.subscribe(`INTLAYER_IFRAME_CLICKED`,OE)}stopInterceptor(){this._clickHandler&&=(window.removeEventListener(`click`,this._clickHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},AE=e=>{let t=`__intlayer_shared_${e}__`,n=()=>{let e={isSet:!1,value:void 0,eventTarget:new EventTarget};if(typeof window>`u`)return e;let n=window;return n[t]??=e,n[t]};return{get:()=>{let e=n();return e.isSet?e.value:void 0},set:(e,t)=>{let r=n();r.isSet=!0,r.value=e,r.eventTarget.dispatchEvent(new CustomEvent(`change`,{detail:{value:e,sourceId:t}}))},subscribe:e=>{let{eventTarget:t}=n(),r=t=>{let{value:n,sourceId:r}=t.detail;e(n,r)};return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)}}},jE=class{_messenger;_originalPushState=null;_originalReplaceState=null;_listeners=[];constructor(e){this._messenger=e}start(){if(typeof window>`u`)return;let e=()=>{this._messenger.send(`INTLAYER_URL_CHANGE/post`,window.location.pathname)};this._originalPushState=history.pushState,this._originalReplaceState=history.replaceState;let t=e=>function(...t){e.apply(this,t),window.dispatchEvent(new Event(`locationchange`))};history.pushState=t(this._originalPushState),history.replaceState=t(this._originalReplaceState);for(let t of[`locationchange`,`popstate`,`hashchange`,`load`]){let n=e;window.addEventListener(t,n),this._listeners.push([t,n])}e()}stop(){if(typeof window<`u`){for(let[e,t]of this._listeners)window.removeEventListener(e,t);this._listeners=[],this._originalPushState&&=(history.pushState=this._originalPushState,null),this._originalReplaceState&&=(history.replaceState=this._originalReplaceState,null)}}},ME=AE(`edited_content`),NE=AE(`focused_content`),PE=class{messenger;editorEnabled;focusedContent;localeDictionaries;editedContent;configuration;currentLocale;displayedDictionaryKeys;_urlManager;_iframeInterceptor;_mode;_configuration;_unsubAreYouThere=null;_unsubActivate=null;_unsubClientReady=null;_displayedKeysObserver=null;_displayedKeysTimer=null;_displayedKeysListeners=[];_stopSharedStateSyncs=[];constructor(e){this._mode=e.mode,this._configuration=e.configuration,this.messenger=new EE(e.messenger),this.editorEnabled=new DE(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new DE(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new DE(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new DE(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new DE(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new DE(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this.displayedDictionaryKeys=new DE(`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`,initialValue:[]}),this._urlManager=new jE(this.messenger),this._iframeInterceptor=new kE(this.messenger)}start(){this.messenger.start(),this.editorEnabled.start(),this.focusedContent.start(),this.localeDictionaries.start(),this.editedContent.start(),this.configuration.start(),this.currentLocale.start(),this.displayedDictionaryKeys.start(),this._stopSharedStateSyncs=[this._syncWithSharedState(this.editedContent,ME,e=>Object.keys(e).length>0),this._syncWithSharedState(this.focusedContent,NE)],this._mode===`client`?(this._urlManager.start(),this._iframeInterceptor.startInterceptor(),this._loadDictionaries(),this._startDisplayedDictionariesTracking(),this.messenger.send(`INTLAYER_EDITED_CONTENT_CHANGED/get`),this._configuration?.editor?.enabled!==!1&&this._setupActivationHandshake()):(this._iframeInterceptor.startMerger(),this._setupEditorHandshake())}stop(){this._unsubAreYouThere?.(),this._unsubActivate?.(),this._unsubClientReady?.(),this._unsubAreYouThere=null,this._unsubActivate=null,this._unsubClientReady=null,this.messenger.stop(),this.editorEnabled.stop(),this.focusedContent.stop(),this.localeDictionaries.stop(),this.editedContent.stop(),this.configuration.stop(),this.currentLocale.stop(),this.displayedDictionaryKeys.stop(),this._stopDisplayedDictionariesTracking();for(let e of this._stopSharedStateSyncs)e();this._stopSharedStateSyncs=[],this._urlManager.stop(),this._iframeInterceptor.stopInterceptor(),this._iframeInterceptor.stopMerger()}pingClient(){this._mode===`editor`&&(this.messenger.send(`INTLAYER_ARE_YOU_THERE`),this.messenger.send(`INTLAYER_EDITOR_ENABLED/post`,!0))}requestLocaleChange(e){this._mode===`editor`&&this.messenger.send(`INTLAYER_LOCALE_CHANGE_REQUESTED`,e)}onLocaleChangeRequested(e){return this._mode===`client`?this.messenger.subscribe(`INTLAYER_LOCALE_CHANGE_REQUESTED`,e):()=>{}}setFocusedContentKeyPath(e){let t=e.filter(e=>e.type!==lr),n=this.focusedContent.value;n&&this.focusedContent.set({...n,keyPath:t})}setLocaleDictionary(e){if(!e.localId)return;let t=this.localeDictionaries.value??{};this.localeDictionaries.set({...t,[e.localId]:e})}setEditedDictionary(e){if(!e.localId){console.error(`setEditedDictionary: missing localId`,e);return}let t=this.editedContent.value??{};this.editedContent.set({...t,[e.localId]:e})}setEditedContent(e,t){let n=this.editedContent.value??{};this.editedContent.set({...n,[e]:{...n[e],content:t}})}addContent(e,t,n=[],r=!0){let i=this.editedContent.value??{},a=(this.localeDictionaries.value??{})[e]?.content,o=structuredClone(i[e]?.content??a),s=n;if(!r){let e=0,t=n.slice(0,-1),r=n[n.length-1],i=r.key;for(;Ri(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=Li(o,s,t);this.editedContent.set({...i,[e]:{...i[e],content:c}})}renameContent(e,t,n=[]){let r=this.editedContent.value??{},i=(this.localeDictionaries.value??{})[e]?.content,a=Ki(structuredClone(r[e]?.content??i),t,n);this.editedContent.set({...r,[e]:{...r[e],content:a}})}removeContent(e,t){let n=this.editedContent.value??{},r=(this.localeDictionaries.value??{})[e]?.content,i=Li(structuredClone(n[e]?.content??r),t,Ri(r,t));this.editedContent.set({...n,[e]:{...n[e],content:i}})}restoreContent(e){let{[e]:t,...n}=this.editedContent.value??{};this.editedContent.set(n)}getContentValue(e,t){let n=this.editedContent.value;if(!n)return;let r=t.filter(e=>e.type!==lr),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:Ri(n[e]?.content??{},r,this.currentLocale.value);let a=Object.keys(n).filter(t=>t.startsWith(`${e}:`)&&(!i||t in i));for(let e of a){let t=Ri(n[e]?.content??{},r,this.currentLocale.value);if(t)return t}}_syncWithSharedState(e,t,n=()=>!0){let r=!1,i=t=>{r=!0,e.set(t),r=!1},a=e=>{r||t.set(e.detail,this.messenger.senderId)};e.addEventListener(`change`,a);let o=t.subscribe((e,t)=>{t!==this.messenger.senderId&&i(e)}),s=t.get();return s!==void 0&&n(s)&&i(s),()=>{e.removeEventListener(`change`,a),o()}}_scanDisplayedDictionaryKeys(){if(typeof document>`u`)return;let e=document.querySelectorAll(`intlayer-content-selector-wrapper[dictionary-key]`),t=Array.from(new Set(Array.from(e).map(e=>e.getAttribute(`dictionary-key`)??``).filter(Boolean)));this.displayedDictionaryKeys.set(t)}_startDisplayedDictionariesTracking(){if(typeof document>`u`||typeof MutationObserver>`u`)return;let e=()=>{this._displayedKeysTimer&&clearTimeout(this._displayedKeysTimer),this._displayedKeysTimer=setTimeout(()=>this._scanDisplayedDictionaryKeys(),100)};this._displayedKeysObserver=new MutationObserver(e),this._displayedKeysObserver.observe(document.body,{childList:!0,subtree:!0});for(let t of[`locationchange`,`popstate`]){let n=e;window.addEventListener(t,n),this._displayedKeysListeners.push([t,n])}this._scanDisplayedDictionaryKeys()}_stopDisplayedDictionariesTracking(){this._displayedKeysObserver?.disconnect(),this._displayedKeysObserver=null,this._displayedKeysTimer&&=(clearTimeout(this._displayedKeysTimer),null);for(let[e,t]of this._displayedKeysListeners)window.removeEventListener(e,t);this._displayedKeysListeners=[]}_setupEditorHandshake(){this._unsubClientReady=this.messenger.subscribe(`INTLAYER_CLIENT_READY`,()=>{this.editorEnabled.set(!0),this.messenger.send(`INTLAYER_EDITOR_ACTIVATE`)}),this.messenger.send(`INTLAYER_ARE_YOU_THERE`)}_setupActivationHandshake(){this.messenger.send(`INTLAYER_CLIENT_READY`),this._unsubAreYouThere=this.messenger.subscribe(`INTLAYER_ARE_YOU_THERE`,()=>{this.messenger.send(`INTLAYER_CLIENT_READY`)}),this._unsubActivate=this.messenger.subscribe(`INTLAYER_EDITOR_ACTIVATE`,()=>{this.editorEnabled.set(!0),this._broadcastData()})}_broadcastData(){let e=this.configuration.value;e&&this.messenger.send(`INTLAYER_CONFIGURATION/post`,e);let t=this.currentLocale.value;t&&this.messenger.send(`INTLAYER_CURRENT_LOCALE/post`,t);let n=this.localeDictionaries.value;n&&this.messenger.send(`INTLAYER_LOCALE_DICTIONARIES_CHANGED/post`,n)}async _loadDictionaries(){try{let e=(await En(async()=>{let{getUnmergedDictionaries:e}=await import(`./unmerged_dictionaries-DWe4YFkq.js`);return{getUnmergedDictionaries:e}},[])).getUnmergedDictionaries(),t=Object.fromEntries(Object.values(e).flat().map(e=>[e.localId,e]));this.localeDictionaries.set(t),this.editorEnabled.value&&this._broadcastData()}catch(e){console.warn(`[intlayer] Failed to load unmerged dictionaries:`,e)}}},FE=()=>qT(JT.INTLAYER_URL_CHANGE,void 0);D();var IE=()=>{let e=WT();return n(()=>({setEditedContentState:t=>e?.editedContent.set(t),setEditedDictionary:t=>e?.setEditedDictionary(t),setEditedContent:(t,n)=>e?.setEditedContent(t,n),addEditedContent:(t,n,r,i)=>e?.addContent(t,n,r,i),renameEditedContent:(t,n,r)=>e?.renameContent(t,n,r),removeEditedContent:(t,n)=>e?.removeContent(t,n),restoreEditedContent:t=>e?.restoreContent(t),getEditedContentValue:(t,n)=>e?.getContentValue(t,n)}),[e])},LE=()=>{let e=WT(),[t,n]=N(e?.editedContent.value);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.editedContent.addEventListener(`change`,t),()=>e.editedContent.removeEventListener(`change`,t)},[e]),{editedContent:t,...IE()}};D();var RE=`INTLAYER_EDITED_CONTENT_CHANGED`,zE=()=>{let{editedContent:e,setEditedContentState:t}=LE();M(()=>{if(e!==void 0)return;let n=localStorage.getItem(RE);if(n)try{t(JSON.parse(n))}catch(e){console.error(e)}},[]),M(()=>{e!==void 0&&localStorage.setItem(RE,JSON.stringify(e))},[e])};D();var BE=()=>{let e=WT(),[t,n]=N(e?.currentLocale.value);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.currentLocale.addEventListener(`change`,t),()=>e.currentLocale.removeEventListener(`change`,t)},[e]),t};D();var VE=()=>{let e=WT(),[t,n]=N(e?.configuration.value);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.configuration.addEventListener(`change`,t),()=>e.configuration.removeEventListener(`change`,t)},[e]),t};D();var HE=()=>{let e=WT(),[t,n]=N(e?.editorEnabled.value??!1);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.editorEnabled.addEventListener(`change`,t),()=>e.editorEnabled.removeEventListener(`change`,t)},[e]),{enabled:t}},UE=()=>{let e=WT();return i(()=>e?.pingClient(),[e])};D();var WE=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=P(null);i.current||=new PE({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return M(()=>(CE(),$T(a),a.start(),()=>{a.stop(),$T(null)}),[a]),M(()=>{a&&t&&Object.keys(t).length!==0&&a.configuration.set(t)},[a,t]),L(UT,{manager:a,children:e})};D();var GE=()=>{let e=WT(),[t,n]=N(e?.focusedContent.value??null);return M(()=>{if(!e)return;let t=e=>n(e.detail);return e.focusedContent.addEventListener(`change`,t),()=>e.focusedContent.removeEventListener(`change`,t)},[e]),{focusedContent:t,setFocusedContent:i(t=>e?.focusedContent.set(t),[e]),setFocusedContentKeyPath:i(t=>e?.setFocusedContentKeyPath(t),[e])}};D();var KE=(e,t,n)=>{for(let r of t)try{if(Ri(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},qE=()=>{let{localeDictionaries:e}=GT(),t=BE(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=GE();return{focusedContent:n(()=>{if(!a||!e||a.dictionaryLocalId)return a;let n=Object.values(e).filter(e=>e.key===a.dictionaryKey),r=KE(a.keyPath??[],n,t);return{...a,...r}},[a,e,t]),setFocusedContent:r,setFocusedContentKeyPath:i}};D();var JE=5e3,YE=(e=JE)=>{let{enabled:t}=HE(),[n,r]=N(0),[a,o]=N(!1);M(()=>{if(t||n===0)return;let r=setTimeout(()=>o(!0),e);return()=>clearTimeout(r)},[t,n,e]);let s=i(()=>{o(!1),r(e=>e+1)},[]),c=i(()=>o(!1),[]);return{isConnectionFailed:a&&!t,handleFrameLoad:s,dismiss:c}},XE=e=>{let t=VE(),{locale:n}=Xi(),r=hS(),i=e?.sessionToken??r?.accessToken,a={headers:{[oi]:n,...i&&{Authorization:`Bearer ${i}`}},...e?.options??{}},o=e?.intlayerConfiguration??t;return{options:a,resolvedConfig:o?.editor?o:void 0}},ZE=e=>{let t=VE();return VT(e?.intlayerConfiguration??t)},QE=e=>{let{options:t,resolvedConfig:n}=XE(e);return BS(t,n)},$E=e=>{let{options:t,resolvedConfig:n}=XE(e);return LS(t,n)},eD=e=>{let{options:t,resolvedConfig:n}=XE(e);return PS(t,n)},tD=e=>{let{options:t,resolvedConfig:n}=XE(e);return US(t,n)},nD=e=>{let{options:t,resolvedConfig:n}=XE(e);return RS(t,n)},rD=[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]],iD=()=>{let e=ZE(),t=Ce();return en({mutationKey:[`logout`],mutationFn:()=>e.signOut({}),onSettled:()=>{rD.forEach(e=>{t.removeQueries({queryKey:e})})}})},aD=e=>{let t=jS(e,VE(),{editor:xn}),n=DS(void 0,t),r=ee(),{data:i}=$t({queryKey:[`oAuth2AccessToken`],queryFn:n.getOAuth2AccessToken,enabled:!!(t.editor.clientId&&t.editor.clientSecret)&&r,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1});return{oAuth2AccessToken:i?.data}},oD=(e,t)=>{let n=VE(),r=t??n??{editor:xn},i=Ce(),a=ee(),{data:o,isFetched:s,refetch:c}=$t({queryKey:[`session`],queryFn:async()=>(await VT(r).getSession({query:{}})).data,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:!e&&a}),l=o??(s?null:void 0),u=e=>{i.setQueryData([`session`],e)},d=async()=>(await c()).data;return{session:l,fetchSession:d,revalidateSession:d,setSession:u}},sD=({session:e,intlayerConfiguration:t}={})=>{let{session:n,fetchSession:r,revalidateSession:i,setSession:a}=oD(e,t),{oAuth2AccessToken:o}=aD(t),s=hS();return{session:n,fetchSession:r,setSession:a,revalidateSession:i,oAuth2AccessToken:o,isAuthenticated:!!(n?.user||o||s?.accessToken)}},cD=()=>{let{session:e,revalidateSession:t,setSession:n}=sD(),{mutate:r}=iD(),i=e?.user?`authenticated`:`unauthenticated`;return{isAuthenticated:i===`authenticated`,isUnauthenticated:i===`unauthenticated`,user:e?.user,revalidateSession:t,logout:async()=>{n(null),r()}}},lD=({requireUser:e,requireProject:t,requireOrganization:n})=>{let{oAuth2AccessToken:r,session:i}=sD({intlayerConfiguration:VE()}),a=hS(),o=i?i.user:r?.user??a?.user,s=i?i.organization:r?.organization??a?.organization,c=i?i.project:r?.project??a?.project;return{enable:(!e||!!o)&&(!t||!!c)&&(!n||!!s)}},uD=e=>{let{requireUser:t,requireProject:n,requireOrganization:r,...i}=e,{enable:a}=lD({requireUser:t,requireProject:n,requireOrganization:r});return $t({enabled:i?.enabled!==!1&&a,...i})},dD=()=>{let e=eD();return en({mutationKey:[`ai-auditContentDeclarationMetadata`],mutationFn:t=>e.auditContentDeclarationMetadata(t)})},fD=()=>{let e=eD();return en({mutationKey:[`ai-auditContentDeclarationField`],mutationFn:t=>e.auditContentDeclarationField(t)})},pD=()=>{let e=eD();return en({mutationKey:[`ai-customQuery`],mutationFn:t=>e.customQuery(t)})},mD=(e,t)=>{let n=$E();return uD({queryKey:[`dictionaries`,e],queryFn:({signal:t})=>n.getDictionaries(e,{signal:t}),requireUser:!0,requireOrganization:!0,requireProject:!0,...t})},hD=()=>{let e=$E();return en({mutationKey:[`dictionaries`],mutationFn:t=>e.pushDictionaries(t.dictionaries),meta:{invalidateQueries:[[`dictionaries`],[`dictionary`],[`dictionariesKeys`]]}})},gD=()=>{let e=$E();return en({mutationKey:[`dictionaries`],mutationFn:t=>e.deleteDictionary(t.dictionaryId),meta:{invalidateQueries:[[`dictionaries`],[`dictionary`],[`dictionariesKeys`]]}})},_D=()=>{let e=nD();return $t({queryKey:[`editor`,`dictionaries`],queryFn:()=>e.getDictionaries()})},vD=()=>{let e=nD();return en({mutationKey:[`editor`,`dictionaries`],mutationFn:t=>e.writeDictionary(t)})},yD=(e,t)=>{let n=QE();return uD({queryKey:[`projects`,e],queryFn:({signal:t})=>n.getProjects(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})},bD=(e,t)=>{let n=tD();return uD({queryKey:[`tags`,e],queryFn:({signal:t})=>n.getTags(e,{signal:t}),requireUser:!0,requireOrganization:!0,...t})};u(),p();var xD=2e3,SD=3e4,CD=2**31-1,wD=[`editorAuth`],TD=C(null),ED=()=>l(TD),DD=async()=>(await(await fetch(`/api/auth`)).json()).data,OD=({children:e})=>{let t=Ce(),[r,a]=N(!1),[o,s]=N(0),[c,l]=N(!1),[u,d]=N(!1),{data:f}=$t({queryKey:wD,queryFn:DD,refetchInterval:e=>e.state.data?.isLoginPending?xD:!1,refetchOnWindowFocus:!0}),p=f?.auth??null;M(()=>{if(!p?.expiresAt)return;let e=new Date(p.expiresAt).getTime()-Date.now();if(e>CD)return;let n=setTimeout(()=>t.invalidateQueries({queryKey:wD}),Math.max(e,0));return()=>clearTimeout(n)},[p?.expiresAt,t]);let m=!!f?.isLoginPending;M(()=>{if(l(!1),!m)return;let e=setTimeout(()=>l(!0),SD);return()=>clearTimeout(e)},[m,o]);let h=i(()=>{a(!0),s(e=>e+1),fetch(`/api/auth/login`,{method:`POST`}).then(()=>t.invalidateQueries({queryKey:wD})).finally(()=>a(!1))},[t]),g=i(()=>{d(!0),fetch(`/api/auth/logout`,{method:`POST`}).then(e=>e.json()).then(e=>t.setQueryData(wD,e.data)).finally(()=>d(!1))},[t]),_=r||m&&!c,v=n(()=>({accessToken:p?.accessToken??null,user:p?.user,organization:p?.organization,project:p?.project,login:h,isLoggingIn:_}),[p,h,_]),y=n(()=>({auth:p,isLoggingIn:_,login:h,logout:g,isLoggingOut:u}),[p,_,h,g,u]);return L(TD.Provider,{value:y,children:L(mS,{value:v,children:e})})},kD=({children:e})=>L(fS,{children:L(vn,{children:L(OD,{children:[L(fd,{}),e]})})}),AD={key:`dictionary-edition-drawer`,content:{nodeType:`translation`,translation:{en:{openDictionaryEditor:{popoverContent:`Open Dictionary in Editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},"en-GB":{openDictionaryEditor:{popoverContent:`Click to open the dictionary in the editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},fr:{openDictionaryEditor:{popoverContent:`Ouvrir le dictionnaire dans l’éditeur`,label:`Cliquez pour ouvrir le dictionnaire dans l’éditeur`},backButtonText:`Liste des dictionnaires`,modalTitle:`Modifier le dictionnaire`,noDictionaryFocused:`Aucun dictionnaire sélectionné`,focusedDictionaryNotFound:`Dictionnaire focalisé non trouvé`},es:{openDictionaryEditor:{popoverContent:`Abrir el diccionario en el editor`,label:`Haga clic para abrir el diccionario en el editor`},backButtonText:`Lista de diccionarios`,modalTitle:`Editar el diccionario`,noDictionaryFocused:`No hay diccionario enfocado`,focusedDictionaryNotFound:`Diccionario enfocado no encontrado`},de:{openDictionaryEditor:{popoverContent:`Wörterbuch im Editor öffnen`,label:`Klicken Sie hier, um das Wörterbuch im Editor zu öffnen`},backButtonText:`Wörterbuchliste`,modalTitle:`Wörterbuch bearbeiten`,noDictionaryFocused:`Kein Wörterbuch ausgewählt`,focusedDictionaryNotFound:`Ausgewähltes Wörterbuch nicht gefunden`},ja:{openDictionaryEditor:{popoverContent:`エディターで辞書を開く`,label:`エディターで辞書を開く`},backButtonText:`辞書リスト`,modalTitle:`辞書を編集`,noDictionaryFocused:`フォーカスされた辞書がありません`,focusedDictionaryNotFound:`フォーカスされた辞書が見つかりません`},ko:{openDictionaryEditor:{popoverContent:`편집기에서 사전 열기`,label:`편집기에서 사전 열기`},backButtonText:`사전 목록`,modalTitle:`사전 편집`,noDictionaryFocused:`포커스가 있는 사전이 없습니다`,focusedDictionaryNotFound:`포커스가 있는 사전이 없습니다`},zh:{openDictionaryEditor:{popoverContent:`点击打开词典到编辑器`,label:`点击打开词典到编辑器`},backButtonText:`词典列表`,modalTitle:`编辑词典`,noDictionaryFocused:`没有聚焦的词典`,focusedDictionaryNotFound:`没有聚焦的词典`},it:{openDictionaryEditor:{popoverContent:`Apri il dizionario nell’editor`,label:`Fai clic per aprire il dizionario nell’editor`},backButtonText:`Elenco di dizionari`,modalTitle:`Modifica dizionario`,noDictionaryFocused:`Nessun dizionario selezionato`,focusedDictionaryNotFound:`Nessun dizionario selezionato`},pt:{openDictionaryEditor:{popoverContent:`Abrir o dicionário no editor`,label:`Clique para abrir o dicionário no editor`},backButtonText:`Lista de dicionários`,modalTitle:`Editar dicionário`,noDictionaryFocused:`Nenhum dicionário focalizado`,focusedDictionaryNotFound:`Nenhum dicionário focalizado`},hi:{openDictionaryEditor:{popoverContent:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`,label:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`},backButtonText:`शब्दकोश सूची`,modalTitle:`शब्दकोश संपादित करें`,noDictionaryFocused:`कोई फोकस शब्दकोश नहीं है`,focusedDictionaryNotFound:`कोई फोकस शब्दकोश नहीं है`},ar:{openDictionaryEditor:{popoverContent:`انقر لفتح قاموس في المحرر`,label:`انقر لفتح قاموس في المحرر`},backButtonText:`قائمة القوامل`,modalTitle:`تحرير قاموس`,noDictionaryFocused:`لا يوجد قاموس مرتبط`,focusedDictionaryNotFound:`لا يوجد قاموس مرتبط`},ru:{openDictionaryEditor:{popoverContent:`Нажмите, чтобы открыть словарь в редакторе`,label:`Нажмите, чтобы открыть словарь в редакторе`},backButtonText:`Список словарей`,modalTitle:`Редактировать словарь`,noDictionaryFocused:`Нет фокусированного словаря`,focusedDictionaryNotFound:`Нет фокусированного словаря`}}},location:`local`,localId:`dictionary-edition-drawer::local::client/src/components/Editor/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts`,filePath:`client/src/components/Editor/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts`},jD=({className:e,strokeWidth:t=4})=>L(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`44`,height:`44`,viewBox:`0 0 44 44`,stroke:`currentColor`,role:`img`,"aria-label":`Spinner`,className:W(`size-full`,e),children:L(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[L(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[L(`animate`,{attributeName:`r`,begin:`0s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),L(`animate`,{attributeName:`stroke-opacity`,begin:`0s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]}),L(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[L(`animate`,{attributeName:`r`,begin:`-0.9s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),L(`animate`,{attributeName:`stroke-opacity`,begin:`-0.9s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]})]})}),MD=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>L(d,{children:t&&n?L(`div`,{className:`relative size-full`,children:[L(`div`,{className:W(`absolute inset-s-0 top-0 flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:L(jD,{className:`size-10 max-h-full max-w-full`})}),e]}):t?L(`div`,{className:W(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:L(jD,{className:`size-10 max-h-full max-w-full`})}):e??L(d,{})}),ND=gc(`flex-none shrink-0`,{variants:{size:{xs:`size-2`,sm:`size-3`,md:`size-4`,lg:`size-5`,xl:`size-6`,"icon-sm":`size-3`,"icon-md":`size-4`,"icon-lg":`size-5`,"icon-xl":`size-6`,custom:``}},defaultVariants:{size:`md`}}),PD=gc(`rtl-mirror-icons relative inline-flex cursor-pointer items-center justify-center font-medium ring-0 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{xs:`min-h-7 px-3 text-xs max-md:py-1`,sm:`min-h-7 px-3 text-xs max-md:py-1`,md:`min-h-8 px-6 text-sm max-md:py-2`,lg:`min-h-10 px-8 text-lg max-md:py-3`,xl:`min-h-11 px-10 text-xl max-md:py-4`,"icon-sm":`p-1.5`,"icon-md":`p-1.5`,"icon-lg":`p-1.5`,"icon-xl":`p-3`,custom:``},color:{neutral:`text-neutral ring-neutral-500/5 *:text-text-light`,card:`hover-card-500/20 text-card ring-card-500/20 *:text-text-light`,text:`text-text ring-text/20 *:text-text-opposite`,foreground:`text-foreground ring-foreground/20 *:text-foreground-opposite`,"text-inverse":`text-text-opposite ring-text-opposite/20 *:text-text`,error:`hover-error-500/20 text-error ring-error/20 *:text-text-light`,success:`hover-success-500/20 text-success ring-success/20 *:text-text-light`,custom:``},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,"4xl":`rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]`,"5xl":`rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]`,full:`rounded-full`},variant:{default:[`bg-current`,`hover:bg-current/90`,`hover:ring-5`,`aria-selected:ring-5`],outline:[`rounded-2xl border-[1.3px] border-current! bg-current/0 *:text-current!`,`hover:border-transparent hover:bg-current/30! focus-visible:bg-current/20`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],none:`border-none bg-current/0 text-inherit hover:bg-current/0`,link:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline`,"invisible-link":`h-auto justify-start border-inherit bg-transparent underline-offset-4 *:text-current! hover:bg-transparent`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/5 aria-[current]:bg-current/3`,fade:[`rounded-lg border-none bg-current/10 ring-current/5 transition *:text-current! hover:bg-current/10 aria-[current]:bg-current/3`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],input:[`text-text`,`w-full select-text resize-none rounded-2xl text-base shadow-none outline-none supports-[corner-shape:squircle]:rounded-4xl`,`transition-shadow duration-100 md:text-sm`,`ring-0`,`disabled:opacity-50`,`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-neutral-100 dark:ring-neutral-700`,`hover:ring-3`,`aria-selected:ring-4`,`focus-visible:ring-3`,`disabled:ring-0`,`focus-visible:outline-none`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`]},textAlign:{left:`justify-start text-start`,center:`justify-center text-center`,right:`justify-end text-end`},isFullWidth:{true:`w-full`,false:``}},defaultVariants:{variant:`default`,size:`md`,color:`text`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),Y=({variant:e,size:t,color:n,children:r,Icon:i,IconRight:a,iconClassName:o,isLoading:s=!1,isActive:c,isSelected:l,isFullWidth:u,roundedSize:d,textAlign:f,disabled:p,label:m,className:h,type:g=`button`,"aria-describedby":_,"aria-expanded":v,"aria-haspopup":y,"aria-pressed":b,...x})=>{let S=e===`link`||e===`invisible-link`,C=!r&&(i||a),w={"aria-label":x[`aria-label`]??m??void 0,"aria-labelledby":void 0,"aria-describedby":_,"aria-expanded":v,"aria-haspopup":y,"aria-pressed":c===void 0?b:c,"aria-busy":s,"aria-current":c?`page`:void 0,"aria-disabled":p||s,"aria-selected":l},T=t===`icon-sm`||t===`icon-md`||t===`icon-lg`||t===`icon-xl`;return L(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:PD({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:f??(a?`left`:`center`),className:h}),...w,...x,children:[i&&!s&&L(i,{className:ND({size:t,className:W(!T&&`me-3`,o)}),"aria-hidden":`true`}),L(`div`,{className:W(`flex items-center justify-center transition-[width] duration-300`,s&&t===`sm`&&`w-3`,s&&t===`md`&&`w-4`,s&&t===`lg`&&`w-6`,s&&t===`xl`&&`w-8`),children:L(MD,{className:ND({size:t,className:W(!T&&`me-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&L(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&C&&L(`span`,{className:`sr-only`,children:m}),a&&L(a,{className:ND({size:t,className:W(!T&&`ms-3`,o)}),"aria-hidden":`true`})]})},FD=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>L(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:W(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-[grid-template-rows] duration-700 ease-in-out`,t!==void 0&&!t&&`grid-rows-[1fr] overflow-x-auto`,r&&`hover:grid-rows-[1fr] hover:overflow-x-auto`,i&&`focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto`,n),...o,children:L(`div`,{style:{minHeight:`${a}px`},className:W(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})});D();var ID=({children:e,header:t,isOpen:n,defaultIsOpen:r=!1,onToggle:i,onClick:a,disabled:o=!1,contentClassName:s,headerClassName:c,contentId:l,"aria-label":u,className:d,iconClassName:f,color:p=`text`,...m})=>{let h=n!==void 0,[_,v]=N(r),y=g(),b=h?n:_,x=!b,S=l??`${y}-accordion-content`,C=e=>{if(o)return;let t=!b;h||v(t),i?.(t),a?.(e)};return L(`div`,{className:W(`w-full`,d),children:[L(Y,{variant:`hoverable`,color:p,onClick:C,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),C(e))},disabled:o,isFullWidth:!0,className:W(`flex items-center justify-between`,c),IconRight:ps,iconClassName:W(`size-3.5 transform transition-transform duration-300 ease-in-out`,b?`rotate-0`:`-rotate-180`,f),"aria-expanded":b,"aria-controls":S,"aria-label":u,role:`button`,...m,children:t}),L(FD,{id:S,tabIndex:x?-1:void 0,isHidden:x,className:s,role:`region`,"aria-labelledby":S,children:e})]})},LD=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>L(`div`,{className:W(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,e===2&&`hover:bg-card/30`,e>=3&&``,a===!0&&`bg-card/40`),...o,children:L(ID,{isOpen:a,label:t,header:L(`div`,{className:`flex w-full`,children:[L(`div`,{className:`flex w-full items-center justify-between`,children:[L(`span`,{className:W(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&L(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&L(`p`,{className:`ps-3 text-card-foreground text-sm`,children:n})]}),children:L(`div`,{className:`size-full px-2`,children:r})})}),RD=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:gr},s=[...t,o];return L(LD,{level:t.length,title:`${a}`,description:``,isSelected:Zn(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:L(wO,{...e,keyPath:s,section:n})},JSON.stringify(n))})},zD=new Set,BD=null,VD=()=>{BD=null;let e=[...zD];zD.clear();for(let t of e)t()},HD=e=>typeof requestAnimationFrame>`u`?()=>{}:(zD.add(e),BD??=requestAnimationFrame(VD),()=>{zD.delete(e),zD.size===0&&BD!==null&&(cancelAnimationFrame(BD),BD=null)});D();var UD=e=>e?.getAttribute(`aria-selected`)===`true`,WD=[`aria-selected`,`data-active`,`data-indicator`],GD=150,KD=(e,{selector:t=UD,isHoverable:n=!1,orientation:r=`horizontal`}={selector:UD,isHoverable:!1,orientation:`horizontal`})=>{let[a,o]=N(null),s=P(null),c=P(null),l=P(null),u=P(null),d=P(t);d.current=t;let f=P(r);f.current=r;let p=e.current.length,m=i(()=>{let t=s.current??e.current.find(d.current)??null;s.current&&c.current&&(clearTimeout(c.current),c.current=null);let n=f.current===`vertical`;if(!t){if(l.current?.opacity===0)return;let e=n?{top:l.current?.top??0,height:l.current?.height??0,opacity:0}:{left:l.current?.left??0,width:l.current?.width??0,opacity:0};o(e),l.current=e;return}if(n){let e=t.offsetTop,n=t.offsetHeight,r=l.current;if(r?.top===e&&r.height===n&&r.opacity===1)return;let i={top:e,height:n,opacity:1};o(i),l.current=i;return}let r=t.offsetLeft,i=t.offsetWidth,a=l.current;if(a?.left===r&&a.width===i&&a.opacity===1)return;let u={left:r,width:i,opacity:1};o(u),l.current=u},[e]),h=i(()=>{u.current===null&&(u.current=HD(()=>{u.current=null,m()}))},[m]),g=i(()=>{u.current?.(),u.current=null,m()},[m]);return M(()=>{window.addEventListener(`resize`,h,{passive:!0});let t=e.current.filter(Boolean),r=new MutationObserver(h),i=new ResizeObserver(g),a=e=>{c.current&&=(clearTimeout(c.current),null),s.current=e.currentTarget,h()},o=()=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{s.current=null,h()},GD)};for(let e of t)r.observe(e,{attributes:!0,attributeFilter:WD}),i.observe(e),n&&(e.addEventListener(`mouseenter`,a,{passive:!0}),e.addEventListener(`mouseleave`,o,{passive:!0}));return()=>{if(u.current?.(),u.current=null,c.current&&=(clearTimeout(c.current),null),window.removeEventListener(`resize`,h),r.disconnect(),i.disconnect(),n)for(let e of t)e.removeEventListener(`mouseenter`,a),e.removeEventListener(`mouseleave`,o)}},[e,p,n,r,h,g]),{choiceIndicatorPosition:a,calculatePosition:m,scheduleMeasurement:h,orientation:r}};D();var qD=({choices:e=[],value:t,defaultValue:n,onChange:r,hoverable:i=!0,disabled:a=!1},o)=>{let[s,c]=N(t??n??e[0].value),[l,u]=N(null),d=P([]),f=P(null),{choiceIndicatorPosition:p}=KD(d,{selector:e=>e?.getAttribute(`data-indicator`)===`true`,isHoverable:!1,orientation:o}),m=e.findIndex(e=>e.value===s),h=i&&l!==null?l:m;return M(()=>{t!==void 0&&c(t)},[t]),{valueState:s,hoveredIndex:l,setHoveredIndex:u,optionsRefs:d,indicatorRef:f,choiceIndicatorPosition:p,selectedIndex:m,indicatorIndex:h,handleChange:e=>{c(e),r?.(e)},disabled:a}};D();var JD=[{content:`Off`,value:!1},{content:`On`,value:!0}],YD=gc(`flex h-fit w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px] p-0.38`,{variants:{color:{neutral:`border-neutral text-neutral`,white:`border-white text-white`,black:`border-black text-black`,text:`border-foreground text-foreground`,error:`border-error text-error`},disabled:{true:`cursor-not-allowed opacity-50`,false:``}},defaultVariants:{color:`text`,disabled:!1}}),XD=gc(`z-1 flex-1 cursor-pointer whitespace-nowrap font-medium text-sm transition-all duration-300 ease-in-out aria-selected:cursor-default data-[indicator=true]:text-background motion-reduce:transition-none`,{variants:{size:{xs:`px-2 py-0.5 text-xs`,sm:`px-2 py-1 text-xs`,md:`p-2 text-sm`,lg:`p-4 text-base`}},defaultVariants:{size:`md`}}),ZD=gc(`absolute top-0 z-0 h-full w-auto rounded-full transition-all duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{neutral:`bg-neutral data-[indicator=true]:text-white`,white:`bg-white data-[indicator=true]:text-black`,black:`bg-black data-[indicator=true]:text-white`,text:`bg-foreground data-[indicator=true]:text-background`,error:`bg-error data-[indicator=true]:text-white`}}}),QD=e=>{let{choices:t=JD,color:n=`text`,size:r=`md`,className:i,itemClassName:o}=e,{selectedIndex:s,indicatorIndex:c,handleChange:l,optionsRefs:u,indicatorRef:d,choiceIndicatorPosition:f,setHoveredIndex:p,disabled:m}=qD({choices:t,value:e.value,defaultValue:e.defaultValue,onChange:e.onChange,hoverable:e.hoverable,disabled:e.disabled},`horizontal`);return L(`div`,{className:YD({color:n,disabled:m,className:i}),role:`tablist`,"aria-disabled":m?`true`:void 0,children:L(`div`,{className:`relative flex size-full flex-row items-center justify-center`,children:[t.map((e,t)=>{let{content:n,value:i,...d}=e,f=typeof i==`string`||typeof i==`number`,h=t===s,g=t===c;return a(`button`,{...d,type:`button`,className:W(XD({size:r}),m&&`cursor-not-allowed`,o),key:f?i:t,role:`tab`,onClick:()=>l(i),"aria-selected":h?`true`:void 0,"data-indicator":g?`true`:void 0,disabled:m,tabIndex:h?0:-1,ref:e=>{u.current[t]=e},onMouseEnter:()=>!m&&p(t),onMouseLeave:()=>!m&&p(null)},n)}),f&&L(`div`,{className:W(ZD({color:n})),style:f,ref:d})]})})},$D=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=Ri(n,e,BE());if(a!==void 0&&typeof a!=`boolean`)return L(d,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=a??t;return L(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-start transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,o===2&&`hover:bg-card/30`,o>=3&&``),onClick:t=>{t.stopPropagation(),i(e)},children:L(QD,{value:s,onChange:t=>r({keyPath:e,newValue:String(t)})})})};D();var eO=e=>{let{keyPath:t,section:n}=e;return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[fr]).map(r=>{let i={type:fr,key:r},o=[...t,i],s=n[fr][r];return L(d,{children:[L(`span`,{className:`flex items-center font-bold`,children:r}),a(wO,{...e,key:r,keyPath:o,section:s})]})})})};D();var tO=e=>{let{keyPath:t,section:n}=e;return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[ur]).map(r=>{let i={type:ur,key:r},o=[...t,i],s=n[ur][r];return L(d,{children:[L(`span`,{className:`flex items-center font-bold`,children:r}),a(wO,{...e,key:r,keyPath:o,section:s})]})})})},nO=(...e)=>e.filter(Boolean).join(` `),rO=gc([`w-full select-text resize-none text-base shadow-none outline-none`,`transition-all duration-300 md:text-sm`,`ring-0`,`disabled:opacity-50`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`].join(` `),{variants:{variant:{default:[`text-foreground`,`bg-accent`,`ring-text/20`,`disabled:ring-0`,`hover:ring-3`,`focus-within:ring-4`,`focus-visible:outline-none focus-visible:ring-4`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`].join(` `),invisible:`border-none text-inherit outline-none ring-0`},size:{sm:`px-2 py-2 text-sm md:py-1.5 md:text-xs`,md:`px-2 py-3 md:py-2`,lg:`p-4`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,size:`md`,validationStyleEnabled:`disabled`}}),iO=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>L(`input`,{className:nO(rO({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),aO=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>L(`textarea`,{className:W(`resize-none`,rO({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r});D();var oO=24,sO=12,cO=({className:e,autoSize:t=!0,onChange:n,maxRows:i=999,ref:a,...o})=>{let s=P(null);r(a,()=>s.current);let c=()=>{let e=s.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let r=e.scrollHeight,a=oO*i+sO;n.height=`${Math.max(Math.min(r,a),36)}px`};return F(()=>{(o.value??o.defaultValue)&&c()},[o.value,o.defaultValue,t,i]),L(aO,{ref:e=>{s.current=e},onChange:e=>{n?.(e),c()},className:W(`overflow-y-auto`,t&&`resize-none`,e),...o})};D();var lO=({value:e=``,onCancel:t,onSave:n,onClick:r,children:a,isDisabled:o,...s})=>{let[c,l]=N(!1),u=P(null),d=e=>{e.stopPropagation(),l(!1),n()},f=e=>{e.stopPropagation(),l(!1),t()},p=!e||e===``?`-`:e,m=i(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||u.current&&!u.current.contains(e.target)&&(l(!1),n())},[n]);return M(()=>(c?document.addEventListener(`click`,m):document.removeEventListener(`click`,m),()=>document.removeEventListener(`click`,m)),[m,c]),L(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{l(!0),r?.(e)},ref:u,...s,children:[L(`div`,{className:W(`flex flex-1 gap-2`,c?`display`:`hidden`),children:[a,L(Y,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:ds,onClick:d,disabled:o,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),L(Y,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:dc,onClick:f,disabled:o,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(c)),L(`div`,{className:W(`flex flex-1 gap-2`,c?`hidden`:`display`),children:[L(`span`,{className:`ms-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:p}),L(Y,{label:`Edit`,Icon:Gs,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:o,onClick:e=>{e.stopPropagation(),l(!0)}})]})]})};D();var uO=({onSave:e,onCancel:t,ref:n,...i})=>{let a=P(null);return r(n,()=>a.current),L(lO,{value:i.value??a.current?.value??i.defaultValue??``,onCancel:()=>{a.current&&(a.current.value=a.current.defaultValue??``),t?.()},onSave:()=>{e?.(a.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:L(cO,{className:`leading-6`,ref:a,onClick:e=>{e.preventDefault(),e.stopPropagation()},...i})})},dO=({keyPath:e,section:t,editedContent:n,editedContentValue:r,onContentChange:i,onFocusKeyPath:a,renderSection:o})=>{let s=BE(),c=r??Ri(n,e,s);if(c&&typeof c!=`string`)return L(d,{children:`Error loading section - Edited content Incoherence with the original content format`});let l=e.length,u=String(c??t);return L(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-start transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,l===2&&`hover:bg-card/30`,l>=3&&``),onClick:t=>{t.stopPropagation(),a(e)},children:typeof o==`function`?o(u):L(uO,{"aria-label":`Editable field`,defaultValue:u,onSave:t=>i({keyPath:e,newValue:t}),onCancel:()=>null})})},fO=e=>{let{keyPath:t,section:n}=e,{addEditedContent:r}=LE(),i=Ri(e.editedContent,t),a=n[mr],{content:o}=n,s=[...t,{type:mr}];return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:[L(`span`,{className:`text-neutral text-sm`,children:[a,` `]}),L(dO,{...e,keyPath:s,section:o,editedContentValue:i?.content,onContentChange:i=>{r(e.dictionary.localId,{...n,content:i.newValue},t)}})]})};D();var pO=e=>{let{keyPath:t,section:n}=e,r=n[Er];return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:Er,key:n},a=[...t,i];return L(d,{children:[L(`span`,{className:`flex items-center font-bold`,children:n}),L(wO,{...e,keyPath:a,section:r[n]})]},n)})})},mO=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:Sr}],i=n[Sr];return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:L(wO,{...e,keyPath:r,section:i})})},hO=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:pr}],i=n[pr];return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:L(wO,{...e,keyPath:r,section:i})})},gO=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:xr}],i=n[xr];return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:L(wO,{...e,keyPath:r,section:i})})};D();var _O=A(e=>{let{keyPath:t,section:r,focusedKeyPath:i=[],onFocusKeyPath:a}=e;return n(()=>Object.keys(r??{}).filter(e=>!CO.includes(e)),[r]).map(n=>{let o={key:n,type:hr},s=[...t,o],c=Zn(s,i);return L(LD,{level:t.length,title:Si(n),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:s)},children:L(wO,{...e,keyPath:s,section:r[n]})},n)})});D();var vO=({onSave:e,onCancel:t,ref:i,...a})=>{let o=P(null);return r(i,()=>o.current),L(lO,{value:n(()=>a.value??o.current?.value??a.defaultValue,[a.value,a.defaultValue,o.current?.value]),onCancel:()=>{o.current&&(o.current.value=o.current.defaultValue??``),t?.()},onSave:()=>{e?.(o.current?.value??``)},children:L(iO,{ref:o,...a})})},yO=({keyPath:e,section:t,editedContent:n,onContentChange:r,onFocusKeyPath:i})=>{let a=Ri(n,e,BE());if(a!==void 0&&typeof a!=`number`)return L(d,{children:`Error loading section - Edited content incoherence with the original content format`});let o=e.length,s=String(a??t);return L(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-start transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,o===2&&`hover:bg-card/30`,o>=3&&``),onClick:t=>{t.stopPropagation(),i(e)},children:L(vO,{"aria-label":`Editable number field`,type:`number`,defaultValue:s,onSave:t=>r({keyPath:e,newValue:t}),onCancel:()=>null})})};D();var bO=e=>{let{keyPath:t,section:n}=e,r=n[dr];return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:dr,key:n},a=[...t,i];return L(d,{children:[L(`span`,{className:`flex items-center font-bold`,children:n}),L(wO,{...e,keyPath:a,section:r[n]})]},n)})})};D();var xO=e=>{let{keyPath:t,section:n}=e,r=n[Dr];return L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(r).map(n=>{let i={type:Dr,key:n},o=[...t,i];return L(d,{children:[L(`span`,{className:`flex items-center font-bold`,children:n}),a(wO,{...e,key:n,keyPath:o,section:r[n]})]})})})},SO=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:lr,key:r},a=[...t,i],o=n[lr][r];return L(wO,{...e,keyPath:a,section:o})};D();var CO=[`filePath`,`id`,`nodeType`],wO=A(e=>{let t=BE(),r=n(()=>Ri(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),i=n(()=>Gi(r),[r]);if(typeof r==`object`)return i===`reactNode`?L(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):i===`nested`?L(`div`,{className:`ms-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):L(i===`markdown`?gO:i===`html`?mO:i===`translation`?SO:i===`enumeration`?tO:i===`plural`?bO:i===`gender`?pO:i===`select`?xO:i===`condition`?eO:i===`insertion`?hO:i===`array`?RD:i===`file`?fO:_O,{...e,section:r});if(typeof r==`string`)return L(dO,{...e,section:r});if(typeof r==`number`)return L(yO,{...e,section:r});if(typeof r==`boolean`)return L($D,{...e,section:r})});D();var TO=({dictionary:e,...t})=>{let n=BE(),{editedContent:r,addEditedContent:i}=LE(),{focusedContent:o,setFocusedContentKeyPath:s}=qE();return L(`div`,{className:`flex flex-col gap-2`,children:a(wO,{...t,keyPath:[],locale:n,dictionary:e,key:`${JSON.stringify((r?.[e.localId]??e).content)}${n}`,editedContent:r?.[e.localId]?.content,focusedKeyPath:o?.keyPath,section:e.content,onContentChange:t=>{i(e.localId,t.newValue,t.keyPath)},onFocusKeyPath:s})})},EO={key:`navigation-view`,content:{nodeType:`translation`,translation:{en:{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},addNewSelectCase:{label:`Click to add a select case`,text:`Add new case`},removeSelectCase:{label:`Click to remove the select case`,text:`Remove case`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},"en-GB":{tsxNotEditable:`React node is not editable`,goToField:{label:`Go to field`},addNewElement:{label:`Click to add element`,text:`Add new element`},removeElement:{label:`Click to remove element`,text:`Remove element`},addNewEnumeration:{label:`Click to add enumeration`,text:`Add new enumeration`},addNewSelectCase:{label:`Click to add a select case`,text:`Add new case`},removeSelectCase:{label:`Click to remove the select case`,text:`Remove case`},removeEnumeration:{label:`Click to remove enumeration`,text:`Remove enumeration`}},fr:{tsxNotEditable:`Node React non éditable`,goToField:{label:`Aller au champ`},addNewElement:{label:`Cliquez pour ajouter un élément`,text:`Ajouter un nouvel élément`},removeElement:{label:`Cliquez pour supprimer un élément`,text:`Supprimer l’élément`},addNewEnumeration:{label:`Cliquez pour ajouter une énumération`,text:`Ajouter une nouvelle énumération`},addNewSelectCase:{label:`Cliquez pour ajouter un cas de sélection`,text:`Ajouter un nouveau cas`},removeSelectCase:{label:`Cliquez pour supprimer le cas de sélection`,text:`Supprimer le cas`},removeEnumeration:{label:`Cliquez pour supprimer une énumération`,text:`Supprimer l’énumération`}},es:{tsxNotEditable:`Nodo React no editable`,goToField:{label:`Ir al campo`},addNewElement:{label:`Haga clic para agregar un elemento`,text:`Agregar nuevo elemento`},removeElement:{label:`Haga clic para eliminar un elemento`,text:`Eliminar elemento`},addNewEnumeration:{label:`Haga clic para agregar una enumeración`,text:`Agregar nueva enumeración`},addNewSelectCase:{label:`Haga clic para agregar un caso de selección`,text:`Agregar nuevo caso`},removeSelectCase:{label:`Haga clic para eliminar el caso de selección`,text:`Eliminar caso`},removeEnumeration:{label:`Haga clic para eliminar una enumeración`,text:`Eliminar enumeración`}},de:{tsxNotEditable:`React-Knoten ist nicht bearbeitbar`,goToField:{label:`Zum Feld gehen`},addNewElement:{label:`Klicken Sie, um ein Element hinzuzufügen`,text:`Neues Element hinzufügen`},removeElement:{label:`Klicken Sie, um ein Element zu entfernen`,text:`Element entfernen`},addNewEnumeration:{label:`Klicken Sie, um eine Aufzählung hinzuzufügen`,text:`Neue Aufzählung hinzufügen`},addNewSelectCase:{label:`Klicken Sie, um einen Auswahlfall hinzuzufügen`,text:`Neuen Fall hinzufügen`},removeSelectCase:{label:`Klicken Sie, um den Auswahlfall zu entfernen`,text:`Fall entfernen`},removeEnumeration:{label:`Klicken Sie, um eine Aufzählung zu entfernen`,text:`Aufzählung entfernen`}},ja:{tsxNotEditable:`編集できないReactノードです`,goToField:{label:`フィールドに移動`},addNewElement:{label:`要素を追加するにはクリック`,text:`新しい要素を追加`},removeElement:{label:`要素を削除するにはクリック`,text:`要素を削除`},addNewEnumeration:{label:`列挙を追加するにはクリック`,text:`新しい列挙を追加`},addNewSelectCase:{label:`選択ケースを追加するにはクリック`,text:`新しいケースを追加`},removeSelectCase:{label:`選択ケースを削除するにはクリック`,text:`ケースを削除`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},addNewSelectCase:{label:`선택 케이스를 추가하려면 클릭하세요`,text:`새 케이스 추가`},removeSelectCase:{label:`선택 케이스를 제거하려면 클릭하세요`,text:`케이스 제거`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{label:`点击添加枚举`,text:`添加新枚举`},addNewSelectCase:{label:`点击添加选择分支`,text:`添加新分支`},removeSelectCase:{label:`点击删除选择分支`,text:`删除分支`},removeEnumeration:{label:`点击删除枚举`,text:`删除枚举`}},it:{tsxNotEditable:`Node React non modificabile`,goToField:{label:`Vai al campo`},addNewElement:{label:`Clicca per aggiungere un elemento`,text:`Aggiungi nuovo elemento`},removeElement:{label:`Clicca per rimuovere un elemento`,text:`Rimuovi elemento`},addNewEnumeration:{label:`Clicca per aggiungere un enumerazione`,text:`Aggiungi nuova enumerazione`},addNewSelectCase:{label:`Clicca per aggiungere un caso di selezione`,text:`Aggiungi nuovo caso`},removeSelectCase:{label:`Clicca per rimuovere il caso di selezione`,text:`Rimuovi caso`},removeEnumeration:{label:`Clicca per rimuovere un'enumerazione`,text:`Rimuovi enumerazione`}},pt:{tsxNotEditable:`Nó React não editável`,goToField:{label:`Ir para o campo`},addNewElement:{label:`Clique para adicionar um elemento`,text:`Adicionar novo elemento`},removeElement:{label:`Clique para remover um elemento`,text:`Remover elemento`},addNewEnumeration:{label:`Clique para adicionar uma enumeração`,text:`Adicionar nova enumeração`},addNewSelectCase:{label:`Clique para adicionar um caso de seleção`,text:`Adicionar novo caso`},removeSelectCase:{label:`Clique para remover o caso de seleção`,text:`Remover caso`},removeEnumeration:{label:`Clique para remover uma enumeração`,text:`Remover enumeração`}},hi:{tsxNotEditable:`सम्पादित न करने योग्य React नोड`,goToField:{label:`फ़ील्ड पर जाएं`},addNewElement:{label:`तत्व जोड़ने के लिए क्लिक करें`,text:`नया तत्व जोड़ें`},removeElement:{label:`तत्व निकालने के लिए क्लिक करें`,text:`तत्व निकालें`},addNewEnumeration:{label:`सूची जोड़ने के लिए क्लिक करें`,text:`नया सूची जोड़ें`},addNewSelectCase:{label:`चयन केस जोड़ने के लिए क्लिक करें`,text:`नया केस जोड़ें`},removeSelectCase:{label:`चयन केस निकालने के लिए क्लिक करें`,text:`केस निकालें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},addNewSelectCase:{label:`انقر لإضافة حالة تحديد`,text:`أضف حالة جديدة`},removeSelectCase:{label:`انقر لإزالة حالة التحديد`,text:`إزالة الحالة`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},addNewSelectCase:{label:`Нажмите, чтобы добавить вариант выбора`,text:`Добавить новый вариант`},removeSelectCase:{label:`Нажмите, чтобы удалить вариант выбора`,text:`Удалить вариант`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`}}}},title:`Navigation view content`,description:`Content declarations used for UI interactions within the navigation view of the Dictionary Field Editor. Includes labels and helper texts for adding or removing elements, enumerations, and conditions.`,tags:[`editor UI`,`form navigation`,`dictionary editor`],location:`local`,localId:`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`},DO=gc(`flex flex-col text-foreground backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-md`,md:`rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,lg:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,xl:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,"2xl":`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,"3xl":`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"4xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,full:`rounded-full`},transparency:{none:`bg-card`,xs:`bg-card/95`,sm:`bg-card/90`,md:`bg-card/70`,lg:`bg-card/40`,xl:`bg-card/20`,full:``},padding:{none:`p-0`,sm:`px-3 py-2`,md:`px-4 py-3`,lg:`px-6 py-4`,xl:`px-8 py-6`,"2xl":`px-10 py-8`},separator:{without:``,x:`divide-x divide-dashed divide-text/20`,y:`divide-y divide-dashed divide-text/20`,both:`divide-x divide-y divide-dashed divide-text/20`},border:{none:``,with:`border-[1.3px]`},borderColor:{neutral:``,card:`border-card`,text:`border-text`,error:`border-error`,warning:`border-warning`,success:`border-success`},background:{none:`backdrop-blur-none`,hoverable:`bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur`,with:``},gap:{none:`gap-0`,sm:`gap-1`,md:`gap-3`,lg:`gap-5`,xl:`gap-8`,"2xl":`gap-10`}},defaultVariants:{roundedSize:`lg`,border:`none`,borderColor:`text`,transparency:`md`,padding:`none`,separator:`without`,gap:`none`},compoundVariants:[{background:`none`,class:`bg-transparent`}]}),OO=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>L(`div`,{className:W(DO({roundedSize:t,transparency:r,padding:n,separator:i,border:typeof o==`boolean`?o?`with`:`none`:void 0,background:c,borderColor:s,gap:l}),a),...u,children:e});D();var kO=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let[o,s]=N(e),[c,l]=N(0),u=o!==e,f=()=>{s(e),l(e=>e+1)},p=()=>{t(o)},m=e=>{s(e.currentTarget.value)},h=e=>{e.key===`Enter`&&!n&&g?(e.preventDefault(),p()):e.key===`Escape`&&(e.preventDefault(),f())};M(()=>{s(e),l(e=>e+1)},[e]);let g=r?.(o)??!0;return L(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[L(iO,{onChange:m,onKeyDown:h,"aria-label":`Editable input value`,"aria-describedby":u||i?`content-editor-input-actions`:void 0,"aria-invalid":!g,variant:`invisible`,className:`size-full`,defaultValue:e,disabled:n,...a},c),(u||i)&&L(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[u&&L(d,{children:[L(Y,{Icon:ds,label:`Save changes${g?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:n||!g,onClick:p,"aria-describedby":g?void 0:`validation-error`}),L(Y,{Icon:dc,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:f,disabled:n})]}),i]})]},String(e))};D();var AO=``,jO=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(AO).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===AO?``:t.split(AO).join(``)}).join(`
|
|
51
|
+
`)},MO=e=>{let t=e.split(`
|
|
52
|
+
`);return t.length===0?[``]:t},NO=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return e?new e(void 0,{granularity:`grapheme`}):null})(),PO=(e,t)=>{if(t<=0)return 0;if(NO){let n=[...NO.segment(e.slice(0,t))],r=n[n.length-1];return r?t-r.segment.length:t-1}let n=e.charCodeAt(t-1);return n>=56320&&n<=57343&&t>=2?t-2:t-1},FO=(e,t)=>{if(t>=e.length)return e.length;if(NO){let n=[...NO.segment(e.slice(t))][0];return n?t+n.segment.length:t+1}let n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length?t+2:t+1},IO=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]??``);)n--;for(;n>0&&/\S/.test(e[n-1]??``);)n--;return n},LO=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]??``);)n++;for(;n<e.length&&/\s/.test(e[n]??``);)n++;return n},RO=(e,t)=>e.slice(0,t).lastIndexOf(`
|
|
53
|
+
`)+1,zO=(e,t)=>{let n=e.indexOf(`
|
|
54
|
+
`,t);return n===-1?e.length:n},BO=({value:e,defaultValue:t,onChange:n,disabled:r=!1})=>{let i=e??t??``,[a,o]=N(()=>MO(i)),s=P(null),c=P(null),l=e!==void 0,u=P(a);u.current=a,M(()=>{l&&e!==void 0&&o(MO(e))},[e,l]);let d=()=>u.current.join(`
|
|
55
|
+
`),f=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`);for(let e=0;e<n.length;e++)if(n[e]?.contains(t.startContainer))return{line:e,offset:t.startOffset};return null},p=()=>{let e=window.getSelection();if(!e?.rangeCount||!s.current)return null;let t=e.getRangeAt(0),n=s.current.querySelectorAll(`[data-line]`),r=u.current,i=(e,t)=>{for(let i=0;i<n.length;i++)if(n[i]?.contains(e)){let e=0;for(let t=0;t<i;t++)e+=(r[t]?.length??0)+1;return e+Math.min(t,r[i]?.length??0)}return e===s.current?t===0?0:r.join(`
|
|
56
|
+
`).length:0},a=i(t.startContainer,t.startOffset),o=i(t.endContainer,t.endOffset);return{start:Math.min(a,o),end:Math.max(a,o),hasSelection:!t.collapsed}},m=e=>{if(!s.current)return;let t=s.current.querySelectorAll(`[data-line]`)[e.line];if(!t)return;let n=t.querySelector(`[data-editable]`),r=n?.firstChild??n??t.firstChild??t,i=window.getSelection();if(!i)return;let a=document.createRange(),o=Math.min(e.offset,r.textContent?.length??0);try{a.setStart(r,o),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}catch{a.selectNodeContents(r),a.collapse(!1),i.removeAllRanges(),i.addRange(a)}};F(()=>{c.current&&s.current&&(m(c.current),c.current=null)});let h=e=>{let t=u.current,n=0;for(let r=0;r<e.line;r++)n+=(t[r]?.length??0)+1;return n+e.offset},g=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t[e]?.length??0;if(n<=r)return{line:e,offset:n};n-=r+1}return{line:t.length-1,offset:t[t.length-1]?.length??0}},_=()=>{let e=f();return e?h(e):0},v=(e,t)=>{let r=MO(e);c.current=g(t,r),o(r),n?.(e)};return{lines:a,containerRef:s,getText:d,handleInput:()=>{if(c.current!==null||r||!s.current)return;let e=f(),t=jO(s.current),i=MO(t);c.current=e,o(i),n?.(t)},handleBeforeInput:e=>{if(r)return;let t=e.nativeEvent;if(t.isComposing)return;let n=t.inputType;if(n!==`insertParagraph`&&n!==`insertLineBreak`){if(n===`deleteContentBackward`||n===`deleteContentForward`){e.preventDefault();let t=p();if(!t)return;let r=u.current.join(`
|
|
57
|
+
`);if(t.hasSelection){let e=r.slice(0,t.start)+r.slice(t.end);v(e,t.start)}else if(n===`deleteContentBackward`){if(t.start===0)return;let e=PO(r,t.start),n=r.slice(0,e)+r.slice(t.start);v(n,e)}else{if(t.start>=r.length)return;let e=FO(r,t.start),n=r.slice(0,t.start)+r.slice(e);v(n,t.start)}return}if(n===`insertReplacementText`){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
|
|
58
|
+
`),i=t.data??t.dataTransfer?.getData(`text/plain`)??``,a=r.slice(0,n.start)+i+r.slice(n.end);v(a,n.start+i.length);return}if(n===`insertText`&&t.data){e.preventDefault();let n=p();if(!n)return;let r=u.current.join(`
|
|
59
|
+
`),i=t.data,a=r.slice(0,n.start)+i+r.slice(n.end);v(a,n.start+i.length)}}},handleKeyDown:e=>{if(r){e.preventDefault();return}if(e.nativeEvent.isComposing)return;if((e.metaKey||e.ctrlKey)&&e.key===`z`){e.preventDefault();return}let t=p();if(!t)return;let n=u.current.join(`
|
|
60
|
+
`);if(e.key===`Enter`){e.preventDefault();let r=n.slice(0,t.start)+`
|
|
61
|
+
`+n.slice(t.end);v(r,t.start+1);return}if(e.key===`Backspace`){if(e.preventDefault(),t.hasSelection){let e=n.slice(0,t.start)+n.slice(t.end);v(e,t.start)}else{if(t.start===0)return;let r;r=e.metaKey?RO(n,t.start):e.altKey?IO(n,t.start):PO(n,t.start);let i=n.slice(0,r)+n.slice(t.start);v(i,r)}return}if(e.key===`Delete`){if(e.preventDefault(),t.hasSelection){let e=n.slice(0,t.start)+n.slice(t.end);v(e,t.start)}else{if(t.start>=n.length)return;let r;r=e.metaKey?zO(n,t.start):e.altKey?LO(n,t.start):FO(n,t.start);let i=n.slice(0,t.start)+n.slice(r);v(i,t.start)}return}},handleCut:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=p();if(!t?.hasSelection)return;let n=u.current.join(`
|
|
62
|
+
`),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i);let a=n.slice(0,t.start)+n.slice(t.end);v(a,t.start)},handlePaste:e=>{if(r){e.preventDefault();return}e.preventDefault();let t=e.clipboardData.getData(`text/plain`);if(!t)return;let n=p();if(!n)return;let i=u.current.join(`
|
|
63
|
+
`),a=i.slice(0,n.start)+t+i.slice(n.end);v(a,n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:m,getCursorOffset:_,caretFromFlatOffset:g}},VO=({index:e,text:t,isLast:n,ghostText:r})=>L(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[L(`span`,{"data-editable":!0,children:t||``}),r&&L(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&L(`br`,{})]}),HO=24,UO=12,WO=({value:e,defaultValue:t,onChange:n,placeholder:i,disabled:a=!1,minRows:o=1,maxRows:s=999,autoSize:c=!0,validationStyleEnabled:l=!1,variant:u,ghostText:d,ghostLine:f,ghostOffset:p,onClick:m,className:h,dir:g=`auto`,ref:_,...v})=>{let{lines:y,containerRef:b,getText:x,handleInput:S,handleBeforeInput:C,handleKeyDown:w,handleCut:T,handlePaste:E,handleDrop:D,handleDragOver:O,getCursorOffset:k,setCaretPosition:A,caretFromFlatOffset:j}=BO({value:e,defaultValue:t,onChange:n,disabled:a}),M=P(null),N=e=>{M.current=e,b.current=e};r(_,()=>({getContainer:()=>M.current,getText:x,focus:()=>M.current?.focus(),getCursorOffset:k,setCursorAtOffset:e=>{A(j(e,y))}})),F(()=>{if(!c||!M.current)return;let e=M.current,t=HO*s+UO,n=HO*o+UO;e.style.height=`auto`;let r=e.scrollHeight;e.style.height=`${Math.max(Math.min(r,t),n)}px`,e.style.overflowY=r>t?`auto`:`hidden`},[y,c,s,o]);let I=y.length===1&&y[0]===``,R=d&&f!==void 0&&p!==void 0;return L(`div`,{className:`relative w-full`,children:[I&&i&&L(`div`,{className:`pointer-events-none absolute inset-0 select-none px-2 py-3 text-base text-neutral-400 leading-[1.5rem] md:py-2 md:text-sm`,"aria-hidden":`true`,children:i}),L(`div`,{...v,ref:N,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":i,"aria-disabled":a,"aria-autocomplete":R?`inline`:void 0,tabIndex:a?-1:0,contentEditable:!a,suppressContentEditableWarning:!0,dir:g,onInput:S,onBeforeInput:C,onKeyDown:w,onCut:T,onPaste:E,onDrop:D,onDragOver:O,onClick:m,className:W(`wrap-break-word resize-none whitespace-pre-wrap outline-none`,rO({variant:u,validationStyleEnabled:l?`enabled`:`disabled`}),c&&`overflow-y-auto`,h),children:y.map((e,t)=>L(VO,{index:t,text:e,isLast:t===y.length-1,ghostText:R&&f===t?d:void 0},t))})]})};D();var GO=({isActive:e=!0,suggestion:t,...n})=>{let r=String(n.value??n.defaultValue??``),[i,a]=N(r),[o,s]=N(``),c=P(null);M(()=>{n.value!==void 0&&a(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let l=()=>{let e=t??o;if(!e)return;let n=c.current?.getCursorOffset()??i.length,r=i.slice(0,n)+e+i.slice(n);a(r),s(``),setTimeout(()=>{c.current?.focus(),c.current?.setCursorAtOffset(n+e.length)},0)},u=e?t??(o||void 0):void 0,d=i.split(`
|
|
64
|
+
`);return L(WO,{ref:c,value:i,onChange:e=>{if(a(e),s(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??o)&&(e.preventDefault(),l()),n.onKeyDown?.(e)},ghostText:u,ghostLine:t?d.length-1:void 0,ghostOffset:t?d[d.length-1]?.length??0:void 0,placeholder:n.placeholder,disabled:n.disabled,autoSize:n.autoSize,maxRows:n.maxRows,minRows:n.rows,variant:n.variant,validationStyleEnabled:n.validationStyleEnabled,className:n.className,dir:n.dir,id:n.id,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})};D();var KO=({children:e,onContentChange:t,disabled:n,validate:r,additionalButtons:i,...a})=>{let{isAuthenticated:o}=cD(),[s,c]=N(e),[l,u]=N(0),f=s!==e,p=()=>{c(e),u(e=>e+1)},m=()=>{t(s)},h=e=>c(e.currentTarget.value??``),g=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!n&&_?(e.preventDefault(),m()):e.key===`Escape`&&(e.preventDefault(),p())};M(()=>{c(e),u(e=>e+1)},[e]);let _=r?.(s)??!0;return L(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[L(GO,{onChange:h,onKeyDown:g,variant:`invisible`,className:`size-full`,value:e,isActive:o,disabled:n,"aria-label":`Editable textarea content`,"aria-describedby":f||i?`content-editor-textarea-actions`:void 0,"aria-invalid":!_,...a},l),(f||i)&&L(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[f&&L(d,{children:[L(Y,{Icon:ds,label:`Save changes${_?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:n||!_,onClick:m,"aria-describedby":_?void 0:`textarea-validation-error`}),L(Y,{Icon:dc,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:p,disabled:n})]}),i]})]},e)},qO=(e,t,n)=>{let r={...e};for(let i of Object.keys(e))i===t?(r[n]=e[t],delete r[t]):r[i]=e[i];return r},JO=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>L(`label`,{className:W(`select-none font-medium text-sm leading-none`,`peer-disabled:cursor-not-allowed peer-disabled:opacity-70`,n&&`cursor-not-allowed text-muted-foreground opacity-70`,r),htmlFor:e,suppressHydrationWarning:!0,...a,children:[i,t&&L(`span`,{className:`ms-1 text-error`,"aria-hidden":`true`,title:`This field is required`,children:`*`})]});D();var YO=new Map,XO=new Map,ZO=e=>{try{return localStorage.getItem(e)}catch{return null}},QO=(e,t)=>{try{t===null?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}},$O=e=>{let t=YO.has(e)?YO.get(e):ZO(e);return t===`undefined`?null:t},ek=e=>{for(let t of XO.get(e)??[])t()},tk=(e,t)=>{YO.set(e,t),QO(e,t),ek(e)},nk=e=>{let t=e.key===null?[...XO.keys()]:[e.key];for(let e of t)YO.delete(e),ek(e)},rk=(e,t)=>{XO.size===0&&window.addEventListener(`storage`,nk);let n=XO.get(e)??new Set;return n.add(t),XO.set(e,n),()=>{n.delete(t),n.size===0&&XO.delete(e),XO.size===0&&window.removeEventListener(`storage`,nk)}},ik=(e,t)=>{if(e===null)return t;try{return JSON.parse(e)}catch(e){return console.error(e),t}},ak=(e,t)=>{let[r]=N(t),a=i(t=>rk(e,t),[e]),o=k(a,()=>$O(e),()=>null),s=n(()=>ik(o,r),[o,r]),c=i(t=>{let n=typeof t==`function`?t(ik($O(e),r)):t;n!==void 0&&tk(e,JSON.stringify(n))},[e,r]),l=i(()=>{YO.delete(e),ek(e)},[e]),u=i(()=>tk(e,null),[e]);return n(()=>[s,c,l,u],[s,c,l,u])};D();var ok=C({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),sk=()=>l(ok),ck=({availableLocales:e,defaultSelectedLocales:t,children:r})=>{let{locale:i}=Xi(),[a,o]=ak(`locale-content-selector-selected-locales`,t??[i]);return M(()=>{if(e.length&&!a?.some(t=>e.includes(t))){let n=t?.filter(t=>e.includes(t));o(n?.length?n:[i])}},[e]),L(ok,{value:n(()=>({availableLocales:e,selectedLocales:a,setSelectedLocales:o}),[e,a,o]),children:r})},lk=Object.defineProperty,uk=(e,t)=>lk(e,`name`,{value:t,configurable:!0});function dk(e,[t,n]){return Math.min(n,Math.max(t,e))}uk(dk,`clamp`),D();var fk=Object.defineProperty,pk=(e,t)=>fk(e,`name`,{value:t,configurable:!0}),mk=C(void 0);function hk(e){let t=l(mk);return e||t||`ltr`}pk(hk,`useDirection`),D();var gk=Object.defineProperty,_k=(e,t)=>gk(e,`name`,{value:t,configurable:!0}),vk=0,yk=null;function bk(e){return xk(),e.children}_k(bk,`FocusGuards`);function xk(){M(()=>{yk||={start:Sk(),end:Sk()};let{start:e,end:t}=yk;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),vk++,()=>{vk===1&&(yk?.start.remove(),yk?.end.remove(),yk=null),vk=Math.max(0,vk-1)}},[])}_k(xk,`useFocusGuards`);function Sk(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}_k(Sk,`createFocusGuard`),D();var Ck=Object.defineProperty,wk=(e,t)=>Ck(e,`name`,{value:t,configurable:!0}),Tk=`focusScope.autoFocusOnMount`,Ek=`focusScope.autoFocusOnUnmount`,Dk={bubbles:!1,cancelable:!0},Ok=w(wk(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=N(null),u=gl(a),d=gl(o),f=P(null),p=kc(t,l),m=P({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;M(()=>{if(r){let e=function(e){if(m.paused||!c)return;let t=e.target;c.contains(t)?f.current=t:Fk(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;let t=e.relatedTarget;t!==null&&(c.contains(t)||Fk(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Fk(c)};wk(e,`handleFocusIn`),wk(t,`handleFocusOut`),wk(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,m.paused]),M(()=>{if(c){Ik.add(m);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(Tk,Dk);c.addEventListener(Tk,u),c.dispatchEvent(t),t.defaultPrevented||(kk(zk(jk(c)),{select:!0}),document.activeElement===e&&Fk(c))}return()=>{c.removeEventListener(Tk,u),setTimeout(()=>{let t=new CustomEvent(Ek,Dk);c.addEventListener(Ek,d),c.dispatchEvent(t),t.defaultPrevented||Fk(e??document.body,{select:!0}),c.removeEventListener(Ek,d),Ik.remove(m)},0)}}},[c,u,d,m]);let h=i(e=>{if(!n&&!r||m.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Ak(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Fk(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Fk(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,m.paused]);return L(fl.div,{tabIndex:-1,...s,ref:p,onKeyDown:h})},`FocusScope`));function kk(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Fk(r,{select:t}),document.activeElement!==n)return}wk(kk,`focusFirst`);function Ak(e){let t=jk(e);return[Mk(t,e),Mk(t.reverse(),e)]}wk(Ak,`getTabbableEdges`);function jk(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:wk(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}wk(jk,`getTabbableCandidates`);function Mk(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Nk(r,{upTo:t})))return r}wk(Mk,`findVisible`);function Nk(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}wk(Nk,`isHidden`);function Pk(e){return e instanceof HTMLInputElement&&`select`in e}wk(Pk,`isSelectableInput`);function Fk(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Pk(e)&&t&&e.select()}}wk(Fk,`focus`);var Ik=Lk();function Lk(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Rk(e,t),e.unshift(t)},remove(t){e=Rk(e,t),e[0]?.resume()}}}wk(Lk,`createFocusScopesStack`);function Rk(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}wk(Rk,`arrayRemove`);function zk(e){return e.filter(e=>e.tagName!==`A`)}wk(zk,`removeLinks`),D();var Bk=Object.defineProperty,Vk=(e,t)=>Bk(e,`name`,{value:t,configurable:!0}),Hk=j.useId||(()=>void 0),Uk=0;function Wk(e){let[t,n]=N(Hk());return Pl(()=>{e||n(e=>e??String(Uk++))},[e]),e||(t?`radix-${t}`:``)}Vk(Wk,`useId`);var Gk=[`top`,`right`,`bottom`,`left`],Kk=[`start`,`end`],qk=Gk.reduce((e,t)=>e.concat(t,t+`-`+Kk[0],t+`-`+Kk[1]),[]),Jk=Math.min,Yk=Math.max,Xk=Math.round,Zk=Math.floor,Qk=e=>({x:e,y:e}),$k={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function eA(e,t,n){return Yk(e,Jk(t,n))}function tA(e,t){return typeof e==`function`?e(t):e}function nA(e){return e.split(`-`)[0]}function rA(e){return e.split(`-`)[1]}function iA(e){return e===`x`?`y`:`x`}function aA(e){return e===`y`?`height`:`width`}function oA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function sA(e){return iA(oA(e))}function cA(e,t,n){n===void 0&&(n=!1);let r=rA(e),i=sA(e),a=aA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=_A(o)),[o,_A(o)]}function lA(e){let t=_A(e);return[uA(e),t,uA(t)]}function uA(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var dA=[`left`,`right`],fA=[`right`,`left`],pA=[`top`,`bottom`],mA=[`bottom`,`top`];function hA(e,t,n){switch(e){case`top`:case`bottom`:return n?t?fA:dA:t?dA:fA;case`left`:case`right`:return t?pA:mA;default:return[]}}function gA(e,t,n,r){let i=rA(e),a=hA(nA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(uA)))),a}function _A(e){let t=nA(e);return $k[t]+e.slice(t.length)}function vA(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function yA(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:vA(e)}function bA(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 xA(e,t,n){let{reference:r,floating:i}=e,a=oA(t),o=sA(t),s=aA(o),c=nA(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=rA(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function SA(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}=tA(t,e),p=yA(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=bA(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=bA(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 CA=50,wA=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:SA},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=xA(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<CA&&(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}=xA(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},TA=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}=tA(e,t)||{};if(l==null)return{};let d=yA(u),f={x:n,y:r},p=sA(i),m=aA(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=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Jk(d[_],T),D=Jk(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=eA(E,k,O),j=!c.arrow&&rA(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}});function EA(e,t,n){return(e?[...n.filter(t=>rA(t)===e),...n.filter(t=>rA(t)!==e)]:n.filter(e=>nA(e)===e)).filter(n=>!e||rA(n)===e||(t?uA(n)!==n:!1))}var DA=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=qk,autoAlignment:u=!0,...d}=tA(e,t),f=c!==void 0||l===qk?EA(c||null,u,l):l,p=r.autoPlacement?.index||0,m=f[p];if(m==null)return{};if(i!==m)return{reset:{placement:f[0]}};let h=await a.detectOverflow(t,d),g=cA(m,n,await(a.isRTL==null?void 0:a.isRTL(o.floating))),_=[h[nA(m)],h[g[0]],h[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:m,overflows:_}],y=f[p+1];if(y)return{data:{index:p+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=rA(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,rA(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:p+1,overflows:v},reset:{placement:x}}}}},OA=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}=tA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=nA(r),_=oA(o),v=nA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[_A(o)]:lA(o)),x=p!==`none`;!d&&x&&b.push(...gA(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=cA(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`||_===oA(t)||T.every(e=>oA(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=oA(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{}}}};function kA(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AA(e){return Gk.some(t=>e[t]>=0)}var jA=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=tA(e,t);switch(i){case`referenceHidden`:{let e=kA(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:AA(e)}}}case`escaped`:{let e=kA(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:AA(e)}}}default:return{}}}}};function MA(e){let t=Jk(...e.map(e=>e.left)),n=Jk(...e.map(e=>e.top)),r=Yk(...e.map(e=>e.right)),i=Yk(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function NA(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>bA(MA(e)))}var PA=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=tA(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=NA(u),f=bA(MA(u)),p=yA(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if(oA(n)===`y`){let e=d[0],t=d[d.length-1],r=nA(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return bA({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=nA(n)===`left`,t=Yk(...d.map(e=>e.right)),r=Jk(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return bA({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},FA=new Set([`left`,`top`]);async function IA(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=nA(n),s=rA(n),c=oA(n)===`y`,l=FA.has(o)?-1:1,u=a&&c?-1:1,d=tA(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 LA=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 IA(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}}}}},RA=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}=tA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=oA(i),p=iA(f),m=u[p],h=u[f],g=(e,t)=>eA(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}}}}}},zA=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}=tA(e,t),u={x:n,y:r},d=oA(i),f=iA(d),p=u[f],m=u[d],h=tA(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=FA.has(nA(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}}}},BA=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}=tA(e,t),c=await i.detectOverflow(t,s),l=nA(n),u=rA(n),d=oA(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=Jk(p-c[m],g),y=Jk(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*Yk(c.left,c.right):S=p-2*Yk(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 VA(){return typeof window<`u`}function HA(e){return GA(e)?(e.nodeName||``).toLowerCase():`#document`}function UA(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function WA(e){return((GA(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function GA(e){return VA()?e instanceof Node||e instanceof UA(e).Node:!1}function KA(e){return VA()?e instanceof Element||e instanceof UA(e).Element:!1}function qA(e){return VA()?e instanceof HTMLElement||e instanceof UA(e).HTMLElement:!1}function JA(e){return!VA()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof UA(e).ShadowRoot}function YA(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=oj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function XA(e){return/^(table|td|th)$/.test(HA(e))}function ZA(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var QA=/transform|translate|scale|rotate|perspective|filter/,$A=/paint|layout|strict|content/,ej=e=>!!e&&e!==`none`,tj;function nj(e){let t=KA(e)?oj(e):e;return ej(t.transform)||ej(t.translate)||ej(t.scale)||ej(t.rotate)||ej(t.perspective)||!ij()&&(ej(t.backdropFilter)||ej(t.filter))||QA.test(t.willChange||``)||$A.test(t.contain||``)}function rj(e){let t=cj(e);for(;qA(t)&&!aj(t);){if(nj(t))return t;if(ZA(t))return null;t=cj(t)}return null}function ij(){return tj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),tj}function aj(e){return/^(html|body|#document)$/.test(HA(e))}function oj(e){return UA(e).getComputedStyle(e)}function sj(e){return KA(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function cj(e){if(HA(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||JA(e)&&e.host||WA(e);return JA(t)?t.host:t}function lj(e){let t=cj(e);return aj(t)?(e.ownerDocument||e).body:qA(t)&&YA(t)?t:lj(t)}function uj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=lj(e),i=r===e.ownerDocument?.body,a=UA(r);if(i){let e=dj(a);return t.concat(a,a.visualViewport||[],YA(r)?r:[],e&&n?uj(e):[])}return t.concat(r,uj(r,[],n))}function dj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function fj(e){let t=oj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=qA(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Xk(n)!==a||Xk(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function pj(e){return KA(e)?e:e.contextElement}function mj(e){let t=pj(e);if(!qA(t))return Qk(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=fj(t),o=(a?Xk(n.width):n.width)/r,s=(a?Xk(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var hj=Qk(0);function gj(e){let t=UA(e);return!ij()||!t.visualViewport?hj:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _j(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===UA(e)}function vj(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=pj(e),o=Qk(1);t&&(r?KA(r)&&(o=mj(r)):o=mj(e));let s=_j(a,n,r)?gj(a):Qk(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=UA(a),t=KA(r)?UA(r):r,n=e,i=dj(n);for(;i&&t!==n;){let e=mj(i),t=i.getBoundingClientRect(),r=oj(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=UA(i),i=dj(n)}}return bA({width:u,height:d,x:c,y:l})}function yj(e,t){let n=sj(e).scrollLeft;return t?t.left+n:vj(WA(e)).left+n}function bj(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-yj(e,n),y:n.top+t.scrollTop}}function xj(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=WA(r),s=t?ZA(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Qk(1),u=Qk(0),d=qA(r);if((d||!a)&&((HA(r)!==`body`||YA(o))&&(c=sj(r)),d)){let e=vj(r);l=mj(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?bj(o,c):Qk(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 Sj(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Cj(e){let t=sj(e),n=e.ownerDocument.body,r=Yk(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Yk(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+yj(e),o=-t.scrollTop;return oj(n).direction===`rtl`&&(a+=Yk(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var wj=25;function Tj(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=UA(e),a=WA(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ij()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(yj(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<=wj&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Ej(e,t){let n=vj(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=mj(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Dj(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Tj(e,n,t);else if(t===`document`)r=Cj(WA(e));else if(KA(t))r=Ej(t,n);else{let n=gj(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return bA(r)}function Oj(e,t){let n=t.get(e);if(n)return n;let r=uj(e,[],!1).filter(e=>KA(e)&&HA(e)!==`body`),i=null,a=oj(e).position===`fixed`,o=a?cj(e):e;for(;KA(o)&&!aj(o);){let e=oj(o),t=nj(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=cj(o)}return t.set(e,r),r}function kj(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ZA(t)?[]:Oj(t,this._c):[].concat(n),r],o=Dj(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=Dj(t,a[e],i);s=Yk(n.top,s),c=Jk(n.right,c),l=Jk(n.bottom,l),u=Yk(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Aj(e){let{width:t,height:n}=fj(e);return{width:t,height:n}}function jj(e,t,n){let r=qA(t),i=WA(t),a=n===`fixed`,o=vj(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Qk(0);if((r||!a)&&((HA(t)!==`body`||YA(i))&&(s=sj(t)),r)){let e=vj(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=yj(i));let l=i&&!r&&!a?bj(i,s):Qk(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 Mj(e){return oj(e).position===`static`}function Nj(e,t){if(!qA(e)||oj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return WA(e)===n&&(n=n.ownerDocument.body),n}function Pj(e,t){let n=UA(e);if(ZA(e))return n;if(!qA(e)){let t=cj(e);for(;t&&!aj(t);){if(KA(t)&&!Mj(t))return t;t=cj(t)}return n}let r=Nj(e,t);for(;r&&XA(r)&&Mj(r);)r=Nj(r,t);return r&&aj(r)&&Mj(r)&&!nj(r)?n:r||rj(e)||n}var Fj=async function(e){let t=this.getOffsetParent||Pj,n=this.getDimensions,r=await n(e.floating);return{reference:jj(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ij(e){return oj(e).direction===`rtl`}var Lj={convertOffsetParentRelativeRectToViewportRelativeRect:xj,getDocumentElement:WA,getClippingRect:kj,getOffsetParent:Pj,getElementRects:Fj,getClientRects:Sj,getDimensions:Aj,getScale:mj,isElement:KA,isRTL:Ij};function Rj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zj(e,t,n){let r=null,i,a=WA(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=Zk(d),h=Zk(a.clientWidth-(u+f)),g=Zk(a.clientHeight-(d+p)),_=Zk(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Yk(0,Jk(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Rj(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=UA(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Bj(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=pj(e),u=i||a?[...l?uj(l):[],...t?uj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?zj(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?vj(e):null;c&&g();function g(){let t=vj(e);h&&!Rj(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 Vj=LA,Hj=DA,Uj=RA,Wj=OA,Gj=BA,Kj=jA,qj=TA,Jj=PA,Yj=zA,Xj=(e,t,n)=>{let r=new Map,i=n??{},a={...Lj,...i.platform,_c:r};return wA(e,t,{...i,platform:a})};D();var Zj=typeof document<`u`?F:function(){};function Qj(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(!Qj(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)&&!Qj(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function $j(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eM(e,t){let n=$j(e);return Math.round(t*n)/n}function tM(e){let t=P(e);return Zj(()=>{t.current=e}),t}function nM(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:r=`absolute`,middleware:a=[],platform:o,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=e,[f,p]=N({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=N(a);Qj(m,a)||h(a);let[g,_]=N(null),[v,y]=N(null),x=i(e=>{e!==T.current&&(T.current=e,_(e))},[]),S=i(e=>{e!==E.current&&(E.current=e,y(e))},[]),C=s||g,w=c||v,T=P(null),E=P(null),D=P(f),O=u!=null,k=tM(u),A=tM(o),j=tM(d),M=i(()=>{if(!T.current||!E.current)return;let e={placement:t,strategy:r,middleware:m};A.current&&(e.platform=A.current),Xj(T.current,E.current,e).then(e=>{let t={...e,isPositioned:j.current!==!1};F.current&&!Qj(D.current,t)&&(D.current=t,b(()=>{p(t)}))})},[m,t,r,A,j]);Zj(()=>{d===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);let F=P(!1);Zj(()=>(F.current=!0,()=>{F.current=!1}),[]),Zj(()=>{if(C&&(T.current=C),w&&(E.current=w),C&&w){if(k.current)return k.current(C,w,M);M()}},[C,w,M,k,O]);let I=n(()=>({reference:T,floating:E,setReference:x,setFloating:S}),[x,S]),L=n(()=>({reference:C,floating:w}),[C,w]),R=n(()=>{let e={position:r,left:0,top:0};if(!L.floating)return e;let t=eM(L.floating,f.x),n=eM(L.floating,f.y);return l?{...e,transform:`translate(`+t+`px, `+n+`px)`,...$j(L.floating)>=1.5&&{willChange:`transform`}}:{position:r,left:t,top:n}},[r,l,L.floating,f.x,f.y]);return n(()=>({...f,update:M,refs:I,elements:L,floatingStyles:R}),[f,M,I,L,R])}var rM=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:qj({element:r.current,padding:i}).fn(n):r?qj({element:r,padding:i}).fn(n):{}}}},iM=(e,t)=>{let n=Vj(e);return{name:n.name,fn:n.fn,options:[e,t]}},aM=(e,t)=>{let n=Uj(e);return{name:n.name,fn:n.fn,options:[e,t]}},oM=(e,t)=>({fn:Yj(e).fn,options:[e,t]}),sM=(e,t)=>{let n=Wj(e);return{name:n.name,fn:n.fn,options:[e,t]}},cM=(e,t)=>{let n=Gj(e);return{name:n.name,fn:n.fn,options:[e,t]}},lM=(e,t)=>{let n=Kj(e);return{name:n.name,fn:n.fn,options:[e,t]}},uM=(e,t)=>{let n=rM(e);return{name:n.name,fn:n.fn,options:[e,t]}};D();var dM=Object.defineProperty,fM=(e,t)=>dM(e,`name`,{value:t,configurable:!0});function pM(e){let[t,n]=N(void 0);return Pl(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}fM(pM,`useSize`),D();var mM=Object.defineProperty,hM=(e,t)=>mM(e,`name`,{value:t,configurable:!0}),gM=`Popper`,[_M,vM]=Nc(gM),[yM,bM]=_M(gM),xM=hM(e=>{let{__scopePopper:t,children:n}=e,[r,i]=N(null),[a,o]=N(void 0);return L(yM,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),SM=`PopperAnchor`,CM=w(hM(function(e,t){let{__scopePopper:n,virtualRef:r,...a}=e,o=bM(SM,n),s=P(null),c=o.onAnchorChange,l=kc(t,i(e=>{s.current=e,e&&c(e)},[c])),u=P(null);M(()=>{if(!r)return;let e=u.current;u.current=r.current,e!==u.current&&c(u.current)});let d=o.placementState&&AM(o.placementState),f=d?.[0],p=d?.[1];return r?null:L(fl.div,{"data-radix-popper-side":f,"data-radix-popper-align":p,...a,ref:l})},`PopperAnchor`)),wM=`PopperContent`,[TM,EM]=_M(wM),DM=w(hM(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=bM(wM,n),[_,v]=N(null),y=kc(t,v),[b,x]=N(null),S=pM(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(OM),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:P,middlewareData:F}=nM({strategy:`fixed`,placement:T,whileElementsMounted:hM((...e)=>Bj(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[iM({mainAxis:i+w,alignmentAxis:o}),c&&aM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?oM():void 0,...k}),c&&sM({...k}),cM({...k,apply:hM(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&uM({element:b,padding:s}),kM({arrowWidth:C,arrowHeight:w}),f&&lM({strategy:`referenceHidden`,...k,boundary:O?k.boundary:void 0})]}),I=g.setPlacementState;Pl(()=>(I(M),()=>{I(void 0)}),[M,I]);let[R,ee]=AM(M),z=gl(m);Pl(()=>{P&&z?.()},[P,z]);let te=F.arrow?.x,B=F.arrow?.y,ne=F.arrow?.centerOffset!==0,[re,ie]=N();return Pl(()=>{_&&ie(window.getComputedStyle(_).zIndex)},[_]),L(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:P?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:re,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:L(TM,{scope:n,placedSide:R,placedAlign:ee,onArrowChange:x,arrowX:te,arrowY:B,shouldHideArrow:ne,children:L(fl.div,{"data-side":R,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`));function OM(e){return e!==null}hM(OM,`isNotNull`);var kM=hM(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=AM(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function AM(e){let[t,n=`center`]=e.split(`-`);return[t,n]}hM(AM,`getSideAndAlignFromPlacement`);var jM=xM,MM=CM,NM=DM;D();var PM=Object.defineProperty,FM=(e,t)=>PM(e,`name`,{value:t,configurable:!0});function IM(e){let t=P({value:e,previous:e});return n(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}FM(IM,`usePrevious`);var LM=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},RM=new WeakMap,zM=new WeakMap,BM={},VM=0,HM=function(e){return e&&(e.host||HM(e.parentNode))},UM=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=HM(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},WM=function(e,t,n,r){var i=UM(t,Array.isArray(e)?e:[e]);BM[n]||(BM[n]=new WeakMap);var a=BM[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(RM.get(e)||0)+1,l=(a.get(e)||0)+1;RM.set(e,c),a.set(e,l),o.push(e),c===1&&i&&zM.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),VM++,function(){o.forEach(function(e){var t=RM.get(e)-1,i=a.get(e)-1;RM.set(e,t),a.set(e,i),t||(zM.has(e)||e.removeAttribute(r),zM.delete(e)),i||e.removeAttribute(n)}),VM--,VM||(RM=new WeakMap,RM=new WeakMap,zM=new WeakMap,BM={})}},GM=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||LM(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),WM(r,i,n,`aria-hidden`)):function(){return null}},KM=function(){return KM=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},KM.apply(this,arguments)};function qM(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function JM(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var YM=`right-scroll-bar-position`,XM=`width-before-scroll-bar`,ZM=`with-scroll-bars-hidden`,QM=`--removed-body-scroll-bar-size`;function $M(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}D();function eN(e,t){var n=N(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}D();var tN=typeof window<`u`?F:M,nN=new WeakMap;function rN(e,t){var n=eN(t||null,function(t){return e.forEach(function(e){return $M(e,t)})});return tN(function(){var t=nN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||$M(e,null)}),i.forEach(function(e){r.has(e)||$M(e,a)})}nN.set(n,e)},[e]),n}function iN(e){return e}function aN(e,t){t===void 0&&(t=iN);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function oN(e){e===void 0&&(e={});var t=aN(null);return t.options=KM({async:!0,ssr:!1},e),t}D();var sN=function(e){var t=e.sideCar,n=qM(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return a(r,KM({},n))};sN.isSideCarExport=!0;function cN(e,t){return e.useMedium(t),sN}var lN=oN();D();var uN=function(){},dN=w(function(e,t){var n=P(null),r=N({onScrollCapture:uN,onWheelCapture:uN,onTouchMoveCapture:uN}),i=r[0],o=r[1],s=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,h=e.noRelative,g=e.noIsolation,_=e.inert,y=e.allowPinchZoom,b=e.as,x=b===void 0?`div`:b,S=e.gapMode,C=qM(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),w=m,E=rN([n,t]),D=KM(KM({},C),i);return a(d,null,f&&a(w,{sideCar:lN,removeScrollBar:u,shards:p,noRelative:h,noIsolation:g,inert:_,setCallbacks:o,allowPinchZoom:!!y,lockRef:n,gapMode:S}),s?v(T.only(c),KM(KM({},D),{ref:E})):a(x,KM({},D,{className:l,ref:E}),c))});dN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},dN.classNames={fullWidth:XM,zeroRight:YM};var fN=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function pN(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=fN();return t&&e.setAttribute(`nonce`,t),e}function mN(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hN(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var gN=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pN())&&(mN(t,n),hN(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};D();var _N=function(){var e=gN();return function(t,n){M(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vN=function(){var e=_N();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},yN={left:0,top:0,right:0,gap:0},bN=function(e){return parseInt(e||``,10)||0},xN=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[bN(n),bN(r),bN(i)]},SN=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return yN;var t=xN(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}};D();var CN=vN(),wN=`data-scroll-locked`,TN=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
65
|
+
.${ZM} {
|
|
66
|
+
overflow: hidden ${r};
|
|
67
|
+
padding-right: ${s}px ${r};
|
|
68
|
+
}
|
|
69
|
+
body[${wN}] {
|
|
70
|
+
overflow: hidden ${r};
|
|
71
|
+
overscroll-behavior: contain;
|
|
72
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
73
|
+
padding-left: ${i}px;
|
|
74
|
+
padding-top: ${a}px;
|
|
75
|
+
padding-right: ${o}px;
|
|
76
|
+
margin-left:0;
|
|
77
|
+
margin-top:0;
|
|
78
|
+
margin-right: ${s}px ${r};
|
|
79
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.${YM} {
|
|
83
|
+
right: ${s}px ${r};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.${XM} {
|
|
87
|
+
margin-right: ${s}px ${r};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.${YM} .${YM} {
|
|
91
|
+
right: 0 ${r};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.${XM} .${XM} {
|
|
95
|
+
margin-right: 0 ${r};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
body[${wN}] {
|
|
99
|
+
${QM}: ${s}px;
|
|
100
|
+
}
|
|
101
|
+
`},EN=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},DN=function(){M(function(){return document.body.setAttribute(wN,(EN()+1).toString()),function(){var e=EN()-1;e<=0?document.body.removeAttribute(wN):document.body.setAttribute(wN,e.toString())}},[])},ON=function(e){var t=e.noRelative,r=e.noImportant,i=e.gapMode,o=i===void 0?`margin`:i;DN();var s=n(function(){return SN(o)},[o]);return a(CN,{styles:TN(s,!t,o,r?``:`!important`)})},kN=!1;if(typeof window<`u`)try{var AN=Object.defineProperty({},"passive",{get:function(){return kN=!0,!0}});window.addEventListener(`test`,AN,AN),window.removeEventListener(`test`,AN,AN)}catch{kN=!1}var jN=kN?{passive:!1}:!1,MN=function(e){return e.tagName===`TEXTAREA`},NN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!MN(e)&&n[t]===`visible`)},PN=function(e){return NN(e,`overflowY`)},FN=function(e){return NN(e,`overflowX`)},IN=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),zN(e,r)){var i=BN(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},LN=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},RN=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},zN=function(e,t){return e===`v`?PN(t):FN(t)},BN=function(e,t){return e===`v`?LN(t):RN(t)},VN=function(e,t){return e===`h`&&t===`rtl`?-1:1},HN=function(e,t,n,r,i){var a=VN(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=BN(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&zN(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l};D();var UN=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},WN=function(e){return[e.deltaX,e.deltaY]},GN=function(e){return e&&`current`in e?e.current:e},KN=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qN=function(e){return`
|
|
102
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
103
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
104
|
+
`},JN=0,YN=[];function XN(e){var t=P([]),n=P([0,0]),r=P(),o=N(JN++)[0],s=N(vN)[0],c=P(e);M(function(){c.current=e},[e]),M(function(){if(e.inert){document.body.classList.add(`block-interactivity-${o}`);var t=JM([e.lockRef.current],(e.shards||[]).map(GN),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${o}`)}),function(){document.body.classList.remove(`block-interactivity-${o}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${o}`)})}}},[e.inert,e.lockRef.current,e.shards]);var l=i(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!c.current.allowPinchZoom;var i=UN(e),a=n.current,o=`deltaX`in e?e.deltaX:a[0]-i[0],s=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(o)>Math.abs(s)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=IN(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=IN(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(o||s)&&(r.current=l),!l)return!0;var h=r.current||l;return HN(h,t,e,h===`h`?o:s,!0)},[]),u=i(function(e){var n=e;if(YN.length&&YN[YN.length-1]===s){var r=`deltaY`in n?WN(n):UN(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&KN(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var a=(c.current.shards||[]).map(GN).filter(Boolean).filter(function(e){return e.contains(n.target)});(a.length>0?l(n,a[0]):!c.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),f=i(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:ZN(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),p=i(function(e){n.current=UN(e),r.current=void 0},[]),m=i(function(t){f(t.type,WN(t),t.target,l(t,e.lockRef.current))},[]),h=i(function(t){f(t.type,UN(t),t.target,l(t,e.lockRef.current))},[]);M(function(){return YN.push(s),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:h}),document.addEventListener(`wheel`,u,jN),document.addEventListener(`touchmove`,u,jN),document.addEventListener(`touchstart`,p,jN),function(){YN=YN.filter(function(e){return e!==s}),document.removeEventListener(`wheel`,u,jN),document.removeEventListener(`touchmove`,u,jN),document.removeEventListener(`touchstart`,p,jN)}},[]);var g=e.removeScrollBar,_=e.inert;return a(d,null,_?a(s,{styles:qN(o)}):null,g?a(ON,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ZN(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var QN=cN(lN,XN);D();var $N=w(function(e,t){return a(dN,KM({},e,{ref:t,sideCar:QN}))});$N.classNames=dN.classNames,D();var eP=Object.defineProperty,X=(e,t)=>eP(e,`name`,{value:t,configurable:!0}),tP=[` `,`Enter`,`ArrowUp`,`ArrowDown`],nP=[` `,`Enter`],rP=`Select`,[iP,aP,oP]=$c(rP),[sP,cP]=Nc(rP,[oP,vM]),lP=vM(),[uP,dP]=sP(rP),[fP,pP]=sP(rP);function mP(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:s,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:h,internal_do_not_use_render:g}=e,_=lP(t),[v,y]=N(null),[b,x]=N(null),[S,C]=N(!1),w=hk(u),[T,E]=eu({prop:r,defaultProp:a??!1,onChange:o,caller:rP}),[D,O]=eu({prop:s,defaultProp:c,onChange:l,caller:rP}),k=P(null),A=P(D);M(()=>{let e=h?v?.ownerDocument.getElementById(h):v?.form;if(e instanceof HTMLFormElement){let t=X(()=>O(A.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[h,v,O]);let j=!v||!!h||!!v.closest(`form`),[F,I]=N(new Set),R=Wk(),ee=Array.from(F).map(e=>e.props.value).join(`;`),z=i(e=>{I(t=>new Set(t).add(e))},[]),te=i(e=>{I(t=>{let n=new Set(t);return n.delete(e),n})},[]),B={required:m,trigger:v,onTriggerChange:y,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:R,value:D,onValueChange:O,open:T,onOpenChange:E,dir:w,triggerPointerDownPosRef:k,disabled:p,name:d,autoComplete:f,form:h,nativeOptions:F,nativeSelectKey:ee,isFormControl:j};return L(jM,{..._,children:L(uP,{scope:t,...B,children:L(iP.Provider,{scope:t,children:L(fP,{scope:t,onNativeOptionAdd:z,onNativeOptionRemove:te,children:aF(g)?g(B):n})})})})}X(mP,`SelectProvider`);var hP=X(e=>{let{__scopeSelect:t,children:n,...r}=e;return L(mP,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>L(d,{children:[n,e?L(iF,{__scopeSelect:t}):null]})})},`Select`),gP=`SelectTrigger`,_P=w(X(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=lP(n),o=dP(gP,n),s=o.disabled||r,c=kc(t,o.onTriggerChange),l=aP(n),u=P(`touch`),[d,f,p]=sF(e=>{let t=l().filter(e=>!e.disabled),n=cF(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=X(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return L(MM,{asChild:!0,...a,children:L(fl.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":oF(o.value)?``:void 0,...i,ref:c,onClick:bc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:bc(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:bc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&tP.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),vP=`SelectValue`,yP=w(X(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=dP(vP,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,f=kc(t,c.onValueNodeChange);Pl(()=>{l(u)},[l,u]);let p=oF(c.value);return L(fl.span,{...s,asChild:!p&&s.asChild,ref:f,style:{pointerEvents:`none`},children:L(d,{children:p?o:a},p?`placeholder`:`value`)})},`SelectValue`)),bP=w(X(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return L(fl.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[xP,SP]=sP(`SelectPortal`,{forceMount:void 0}),CP=X(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return L(xP,{scope:e.__scopeSelect,forceMount:n,children:L(Il,{asChild:!0,...r})})},`SelectPortal`),wP=`SelectContent`,TP=w(X(function(e,t){let n=SP(wP,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=dP(wP,e.__scopeSelect),[o,s]=N();return Pl(()=>{s(new DocumentFragment)},[]),L(Bl,{present:r||a.open,children:({present:e})=>e?L(jP,{...i,ref:t}):L(EP,{...i,fragment:o})})},`SelectContent`)),EP=w(X(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?E(L(OP,{scope:n,children:L(iP.Slot,{scope:n,children:L(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),DP=10,[OP,kP]=sP(wP),AP=Lc(`SelectContent.RemoveScroll`),jP=w(X(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:s,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_,...v}=e,y=dP(wP,n),[b,x]=N(null),[S,C]=N(null),w=kc(t,x),[T,E]=N(null),[D,O]=N(null),k=aP(n),[A,j]=N(!1),F=P(!1);M(()=>{if(b)return GM(b)},[b]),xk();let I=i(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),R=i(()=>I([T,b]),[I,T,b]);M(()=>{A&&R()},[A,R]);let{onOpenChange:ee,triggerPointerDownPosRef:z}=y;M(()=>{if(b){let e={x:0,y:0},t=X(t=>{e={x:Math.abs(Math.round(t.pageX)-(z.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(z.current?.y??0))}},`handlePointerMove`),n=X(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(b)||ee(!1),document.removeEventListener(`pointermove`,t),z.current=null},`handlePointerUp`);return z.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[b,ee,z]),M(()=>{let e=X(()=>ee(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[ee]);let[te,B]=sF(e=>{let t=k().filter(e=>!e.disabled),n=cF(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),ne=i((e,t,n)=>{let r=!F.current&&!n;(y.value!==void 0&&y.value===t||r)&&(E(e),r&&(F.current=!0))},[y.value]),re=i(()=>b?.focus(),[b]),ie=i((e,t,n)=>{let r=!F.current&&!n;(y.value!==void 0&&y.value===t||r)&&O(e)},[y.value]),ae=r===`popper`?NP:MP,oe=ae===NP?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:m,sticky:h,hideWhenDetached:g,avoidCollisions:_}:{};return L(OP,{scope:n,content:b,viewport:S,onViewportChange:C,itemRefCallback:ne,selectedItem:T,onItemLeave:re,itemTextRefCallback:ie,focusSelectedItem:R,selectedItemText:D,position:r,isPositioned:A,searchRef:te,children:L($N,{as:AP,allowPinchZoom:!0,children:L(Ok,{asChild:!0,trapped:y.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:bc(a,e=>{y.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:L(wl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:L(ae,{role:`listbox`,id:y.contentId,"data-state":y.open?`open`:`closed`,dir:y.dir,onContextMenu:e=>e.preventDefault(),...v,...oe,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,...v.style},onKeyDown:bc(v.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&B(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>I(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),MP=w(X(function(e,t){let{__scopeSelect:n,onPlaced:r,...a}=e,o=dP(wP,n),s=kP(wP,n),[c,l]=N(null),[u,d]=N(null),f=kc(t,d),p=aP(n),m=P(!1),h=P(!0),{viewport:g,selectedItem:_,selectedItemText:v,focusSelectedItem:y}=s,b=i(()=>{if(o.trigger&&o.valueNode&&c&&u&&g&&_&&v){let e=o.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),i=v.getBoundingClientRect();if(o.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-DP,d=dk(a,[DP,Math.max(DP,u-l)]);c.style.minWidth=s+`px`,c.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,s=e.width+o,l=Math.max(s,t.width),u=window.innerWidth-DP,d=dk(a,[DP,Math.max(DP,u-l)]);c.style.minWidth=s+`px`,c.style.right=d+`px`}let a=p(),s=window.innerHeight-DP*2,l=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=f+h+l+b+y,S=Math.min(_.offsetHeight*5,x),C=window.getComputedStyle(g),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-DP,D=s-E,O=_.offsetHeight/2,k=_.offsetTop+O,A=f+h+k,j=x-A;if(A<=E){let e=a.length>0&&_===a[a.length-1].ref.current;c.style.bottom=`0px`;let t=u.clientHeight-g.offsetTop-g.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);c.style.height=n+`px`}else{let e=a.length>0&&_===a[0].ref.current;c.style.top=`0px`;let t=Math.max(E,f+g.offsetTop+(e?w:0)+O)+j;c.style.height=t+`px`,g.scrollTop=A-E+g.offsetTop}c.style.margin=`${DP}px 0`,c.style.minHeight=S+`px`,c.style.maxHeight=s+`px`,r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,o.trigger,o.valueNode,c,u,g,_,v,o.dir,r]);Pl(()=>b(),[b]);let[x,S]=N();return Pl(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]),L(PP,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:i(e=>{e&&h.current===!0&&(b(),y?.(),h.current=!1)},[b,y]),children:L(`div`,{ref:l,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:L(fl.div,{...a,ref:f,style:{boxSizing:`border-box`,maxHeight:`100%`,...a.style}})})})},`SelectItemAlignedPosition`)),NP=w(X(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=DP,...a}=e;return L(NM,{...lP(n),...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})},`SelectPopperPosition`)),[PP,FP]=sP(wP,{}),IP=`SelectViewport`,LP=w(X(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=kP(IP,n),o=FP(IP,n),s=kc(t,a.onViewportChange),c=P(0);return L(d,{children:[L(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),L(iP.Slot,{scope:n,children:L(fl.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:bc(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-DP*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[RP,zP]=sP(`SelectGroup`),BP=w(X(function(e,t){let{__scopeSelect:n,...r}=e,i=Wk();return L(RP,{scope:n,id:i,children:L(fl.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})},`SelectGroup`)),VP=`SelectLabel`,HP=w(X(function(e,t){let{__scopeSelect:n,...r}=e,i=zP(VP,n);return L(fl.div,{id:i.id,...r,ref:t})},`SelectLabel`)),UP=`SelectItem`,[WP,GP]=sP(UP),KP=w(X(function(e,t){let{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...s}=e,c=dP(UP,n),l=kP(UP,n),u=c.value===r,[d,f]=N(o??``),[p,m]=N(!1),h=kc(t,gl(e=>l.itemRefCallback?.(e,r,a))),g=Wk(),_=P(`touch`),v=X(()=>{a||(c.onValueChange(r),c.onOpenChange(!1))},`handleSelect`);return L(WP,{scope:n,value:r,disabled:a,textId:g,isSelected:u,onItemTextChange:i(e=>{f(t=>t||(e?.textContent??``).trim())},[]),children:L(iP.ItemSlot,{scope:n,value:r,disabled:a,textValue:d,children:L(fl.div,{role:`option`,"aria-labelledby":g,"data-highlighted":p?``:void 0,"aria-selected":u&&p,"data-state":u?`checked`:`unchecked`,"aria-disabled":a||void 0,"data-disabled":a?``:void 0,tabIndex:a?void 0:-1,...s,ref:h,onFocus:bc(s.onFocus,()=>m(!0)),onBlur:bc(s.onBlur,()=>m(!1)),onClick:bc(s.onClick,()=>{_.current!==`mouse`&&v()}),onPointerUp:bc(s.onPointerUp,()=>{_.current===`mouse`&&v()}),onPointerDown:bc(s.onPointerDown,e=>{_.current=e.pointerType}),onPointerMove:bc(s.onPointerMove,e=>{_.current=e.pointerType,a?l.onItemLeave?.():_.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:bc(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:bc(s.onKeyDown,e=>{a||e.target!==e.currentTarget||(l.searchRef?.current===``||e.key!==` `)&&(nP.includes(e.key)&&v(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),qP=`SelectItemText`,JP=w(X(function(e,t){let{__scopeSelect:r,className:i,style:a,...o}=e,s=dP(qP,r),c=kP(qP,r),l=GP(qP,r),u=pP(qP,r),[f,p]=N(null),m=gl(e=>c.itemTextRefCallback?.(e,l.value,l.disabled)),h=kc(t,p,l.onItemTextChange,m),g=f?.textContent,_=n(()=>L(`option`,{value:l.value,disabled:l.disabled,children:g},l.value),[l.disabled,l.value,g]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=u;return Pl(()=>(v(_),()=>y(_)),[v,y,_]),L(d,{children:[L(fl.span,{id:l.textId,...o,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren&&!oF(s.value)?E(o.children,s.valueNode):null]})},`SelectItemText`)),YP=`SelectItemIndicator`,XP=w(X(function(e,t){let{__scopeSelect:n,...r}=e;return GP(YP,n).isSelected?L(fl.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),ZP=`SelectScrollUpButton`,QP=w(X(function(e,t){let n=kP(ZP,e.__scopeSelect),r=FP(ZP,e.__scopeSelect),[i,a]=N(!1),o=kc(t,r.onScrollButtonChange);return Pl(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};X(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?L(tF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),$P=`SelectScrollDownButton`,eF=w(X(function(e,t){let n=kP($P,e.__scopeSelect),r=FP($P,e.__scopeSelect),[i,a]=N(!1),o=kc(t,r.onScrollButtonChange);return Pl(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};X(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?L(tF,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),tF=w(X(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...a}=e,o=kP(`SelectScrollButton`,n),s=P(null),c=aP(n),l=i(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return M(()=>()=>l(),[l]),Pl(()=>{c().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[c]),L(fl.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:bc(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:bc(a.onPointerMove,()=>{o.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:bc(a.onPointerLeave,()=>{l()})})},`SelectScrollButtonImpl`)),nF=w(X(function(e,t){let{__scopeSelect:n,...r}=e;return L(fl.div,{"aria-hidden":!0,...r,ref:t})},`SelectSeparator`)),rF=`SelectBubbleInput`,iF=w(X(function({__scopeSelect:e,...t},n){let r=dP(rF,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=P(null),m=kc(n,p),h=i??``,g=IM(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return M(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),L(fl.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...su,...t.style},ref:m,defaultValue:h,children:[oF(i)&&!_?L(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function aF(e){return typeof e==`function`}X(aF,`isFunction`);function oF(e){return e===``||e===void 0}X(oF,`shouldShowPlaceholder`);function sF(e){let t=gl(e),n=P(``),r=P(0),a=i(e=>{let i=n.current+e;t(i),X((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),o=i(()=>{n.current=``,window.clearTimeout(r.current)},[]);return M(()=>()=>window.clearTimeout(r.current),[]),[n,a,o]}X(sF,`useTypeaheadSearch`);function cF(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=lF(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}X(cF,`findNextItem`);function lF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}X(lF,`wrapArray`);var uF=hP,dF=BP,fF=yP,pF=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>L(_P,{suppressHydrationWarning:!0,className:W(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-foreground`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,L(bP,{asChild:!0,children:L(xs,{className:`size-4 opacity-50`})})]}),mF=({className:e,...t})=>L(QP,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:L(ys,{})}),hF=({className:e,...t})=>L(eF,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:L(ps,{})}),gF=({className:e,children:t,position:n=`popper`,...r})=>L(CP,{children:L(TP,{className:W(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-foreground`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[L(mF,{}),L(LP,{className:W(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),L(hF,{})]})}),_F=({className:e,...t})=>L(HP,{className:W(`px-1 py-0.5 font-semibold text-sm`,e),...t}),vF=({className:e,children:t,...n})=>L(KP,{className:W(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 ps-2 pe-8 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[L(`span`,{className:`absolute inset-e-2 flex size-3.5 items-center justify-center`,children:L(XP,{children:L(ds,{className:`size-4`})})}),L(JP,{children:t})]}),yF=({className:e,...t})=>L(nF,{className:W(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),Z=uF;Z.Group=dF,Z.Value=fF,Z.Trigger=pF,Z.ScrollUpButton=mF,Z.ScrollDownButton=hF,Z.Content=gF,Z.Label=_F,Z.Item=vF,Z.Separator=yF,D();var bF=e=>{let t,n;if(typeof e==`number`||!Number.isNaN(Number(e)))t=`=`,n=e.toString();else if(typeof e==`string`){let r=[`<=`,`>=`,`<`,`>`,`=`].find(t=>e.startsWith(t));r&&(t=r,n=e.slice(r.length))}return{comparator:t,numberValue:n}},xF=({value:e,onChange:t})=>{let{comparator:r,numberValue:i}=n(()=>bF(e),[e]),[a,o]=N(r??null),[s,c]=N(i??null);return M(()=>{a&&s&&(a!==r||s!==i)&&t(`${a}${s}`)},[a,r,i,s,t]),L(`div`,{className:`flex gap-1`,children:[L(Z,{onValueChange:o,defaultValue:r,children:[L(Z.Trigger,{className:`w-20`,children:L(Z.Value,{placeholder:`Select a comparator`})}),L(Z.Content,{children:[L(Z.Item,{value:`<`,children:`<`}),L(Z.Item,{value:`<=`,children:`<=`}),L(Z.Item,{value:`=`,children:`=`}),L(Z.Item,{value:`>=`,children:`>=`}),L(Z.Item,{value:`>`,children:`>`})]})]}),L(iO,{type:`number`,"aria-label":`Quantity`,defaultValue:s??void 0,onChange:e=>c(e.target.value),className:`min-w-4`})]})};D();var SF=({rawContent:e})=>{let[t,n]=N(``);return M(()=>{En(async()=>{let{default:e}=await import(`./purify.es-Bvo9QlJ8.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?L(`div`,{dangerouslySetInnerHTML:{__html:t}}):L(`div`,{})};D();var CF=y(()=>En(()=>import(`./MarkDownRender-BzY_8i9Z.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1,2]))),wF=y(()=>En(()=>import(`./MarkdownEditor-BpbsoP4E.js`).then(e=>({default:e.MarkdownEditor})),__vite__mapDeps([3,2,1,4]))),TF=A(function({label:e,...t}){let[n,r]=N(!1);return L(ID,{header:e,label:e,onToggle:e=>{e&&!n&&r(!0)},children:n?L(WF,{...t}):null})}),EF=({keyPath:e,dictionary:t,...n})=>{let{editedContent:r,addEditedContent:i}=LE(),a=VE(),{mutate:o,isPending:s}=fD();return L(KO,{variant:`default`,onContentChange:n=>i(t.localId,n,e),additionalButtons:L(Y,{Icon:lc,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:s,onClick:()=>{o({fileContent:JSON.stringify({...t,...r?.[t.localId]??{}}),keyPath:e,locales:a?.internationalization.locales??[],aiOptions:{apiKey:a?.ai?.apiKey,model:a?.ai?.model,temperature:a?.ai?.temperature}},{onSuccess:n=>{if(n?.data)try{let r=n.data.fileContent;i(t.localId,r,e)}catch(e){console.error(e)}}})}}),...n})},DF=({keyPath:e,dictionary:t,...n})=>{let{addEditedContent:r}=LE();return L(kO,{variant:`default`,onContentChange:n=>r(t.localId,n,e),...n})},OF=[{content:`False`,value:!1},{content:`True`,value:!0}],kF=({dictionary:e,keyPath:t,...n})=>{let{addEditedContent:r}=LE();return L(QD,{choices:OF,value:!0,onChange:n=>r(e.localId,n,t),color:`text`,size:`sm`,...n})},AF=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{locale:i,defaultLocale:a}=Xi(),{selectedLocales:o}=sk(),s=e[lr];return L(`table`,{className:`w-full`,children:L(`tbody`,{className:`flex w-full flex-col gap-2`,children:o.map(e=>{let o=`${JSON.stringify(t)}-translation-${e}`;return L(d,{children:[L(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:L(`td`,{className:`flex w-full`,children:Pi(e,i)})}),L(`tr`,{className:`flex`,children:L(`td`,{className:`flex w-full`,children:L(GF,{section:s[e]??Bi(s[a]),keyPath:[...t,{type:lr,key:e}],dictionary:n,renderSection:r})})})]},o)})})})},jF=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=LE(),{addNewEnumeration:a,removeEnumeration:o}=qi(EO),s=e[ur],c=Object.keys(s)[0];return L(`div`,{className:`flex flex-col gap-2`,children:[L(`table`,{className:`w-full`,children:L(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(e[ur]).map(a=>{let l=[...t,{type:ur,key:a}],u=`${JSON.stringify(t)}-enumeration-${a}`;return L(d,{children:[L(`tr`,{className:`mt-2 w-full`,children:L(`td`,{className:`flex w-full`,children:L(`div`,{className:`flex flex-1`,children:L(Y,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,Icon:ac,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),L(`tr`,{className:`w-full p-2`,children:L(`td`,{className:`flex w-full`,children:L(xF,{value:a,onChange:r=>{let o=e[ur],s=qO(o,a,r),c={...e,[ur]:s};console.log(`newValue`,c),i(n.localId,c,t)}})})}),L(`tr`,{className:`block w-full`,children:L(`td`,{className:`flex w-full`,children:L(WF,{section:s[a]??Bi(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),L(Y,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>i(n.localId,Bi(s[c])??``,[...t,{type:ur,key:`unknown`}]),Icon:qs,className:`m-2`,children:a.text})]})},MF=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=LE(),{addNewSelectCase:a,removeSelectCase:o}=qi(EO),s=e[Dr],c=Object.keys(s)[0]??``;return L(`div`,{className:`flex flex-col gap-2`,children:[L(`table`,{className:`w-full`,children:L(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(s).map(a=>{let l=[...t,{type:Dr,key:a}],u=`${JSON.stringify(t)}-select-${a}`;return L(d,{children:[L(`tr`,{className:`mt-2 w-full`,children:L(`td`,{className:`flex w-full`,children:L(`div`,{className:`flex flex-1`,children:L(Y,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,Icon:ac,onClick:()=>i(n.localId,void 0,l),children:o.text})})})}),L(`tr`,{className:`w-full p-2`,children:L(`td`,{className:`flex w-full`,children:L(kO,{"aria-label":`Edit case`,type:`text`,variant:`default`,onContentChange:r=>{let o={...e,[Dr]:qO(s,a,String(r))};i(n.localId,o,t)},children:a})})}),L(`tr`,{className:`block w-full`,children:L(`td`,{className:`flex w-full`,children:L(WF,{section:s[a]??Bi(s[c]),keyPath:l,dictionary:n,renderSection:r})})})]},u)})})}),L(Y,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>i(n.localId,Bi(s[c])??``,[...t,{type:Dr,key:`newCase`}]),Icon:qs,className:`m-2`,children:a.text})]})},NF=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[fr];return L(`table`,{className:`w-full`,children:L(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return L(d,{children:[L(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:L(`td`,{className:`flex w-full`,children:String(e)})}),L(`tr`,{className:`block w-full`,children:L(`td`,{className:`flex w-full`,children:L(GF,{section:i[e]??Bi(i.true),keyPath:[...t,{type:fr,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},PF=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[Er];return L(`table`,{className:`w-full`,children:L(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return L(d,{children:[L(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:L(`td`,{className:`flex w-full`,children:String(e)})}),L(`tr`,{className:`block w-full`,children:L(`td`,{className:`flex w-full`,children:L(GF,{section:i[e]??Bi(i.male),keyPath:[...t,{type:Er,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},FF=[`zero`,`one`,`two`,`few`,`many`,`other`],IF=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[dr];return L(`table`,{className:`w-full`,children:L(`tbody`,{className:`flex w-full flex-col gap-2`,children:FF.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return L(d,{children:[L(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:L(`td`,{className:`flex w-full`,children:e})}),L(`tr`,{className:`block w-full`,children:L(`td`,{className:`flex w-full`,children:L(GF,{section:i[e]??Bi(i.other),keyPath:[...t,{type:dr,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},LF=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let{addEditedContent:i}=LE(),{addNewElement:a,removeElement:o}=qi(EO);return L(`div`,{className:`flex flex-col gap-2`,children:[L(`table`,{className:`w-full`,children:L(`tbody`,{className:`flex w-full flex-col gap-2`,children:e.map((a,s)=>{let c=`${JSON.stringify(t)}-array-${s}`;return L(d,{children:[L(`tr`,{className:`mt-2 w-full p-2`,children:L(`td`,{className:`flex w-full`,children:L(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[L(`span`,{className:`text-xs`,children:String(s)}),L(Y,{label:o.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ms-auto text-muted-foreground hover:text-error`,onClick:()=>{let e=[...t,{type:gr,key:s}];i(n.localId,void 0,e)},Icon:ac,children:o.text})]})})}),L(`tr`,{className:`block w-full`,children:L(`td`,{className:`flex w-full`,children:L(GF,{section:a??Bi(e[0]),keyPath:[...t,{type:gr,key:s}],dictionary:n,renderSection:r})})})]},c)})})}),L(Y,{label:a.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:()=>{let r=[...t,{type:gr,key:e.length}];i(n.localId,Bi(e[0])??``,r,!1)},Icon:qs,children:a.text})]})},RF=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return L(`table`,{className:`w-full`,children:L(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:hr,key:e}],s=i[e]??Bi(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?L(d,{children:[L(`tr`,{className:`mt-2 p-2 text-xs`,children:L(`td`,{className:`flex w-full`,children:String(e)})}),L(`tr`,{className:`block w-full`,children:L(`td`,{className:`flex w-full`,children:L(WF,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):L(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:L(`td`,{className:`flex w-full`,children:L(TF,{label:Si(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},zF=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=N(0),a=[{content:`Edit`,value:0},{content:`Preview`,value:1}],o=[...t,{type:Sr}],s=e[Sr];return L(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[L(QD,{choices:a,value:r,onChange:i,color:`text`,size:`sm`,className:`ms-auto`}),L(GF,{section:s,keyPath:o,dictionary:n,renderSection:r===1?e=>L(SF,{rawContent:e}):void 0})]})},BF=({section:e,keyPath:t,dictionary:n})=>{let[r,i]=N(0),{addEditedContent:a}=LE(),o=[{content:`Edit`,value:0},{content:`Raw`,value:1},{content:`Preview`,value:2}],s=[...t,{type:xr}],c=e.markdown??``;return L(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[L(QD,{choices:o,value:r,onChange:i,color:`text`,size:`sm`,className:`ms-auto`}),L(GF,{section:c,keyPath:s,dictionary:n,renderSection:r===0?(e,t)=>L(m,{fallback:L(MD,{}),children:L(wF,{defaultValue:e,onChange:e=>a(n.localId,e,t)},JSON.stringify(t))}):r===2?e=>L(m,{fallback:L(MD,{}),children:L(CF,{children:e})}):void 0})]})},VF=({section:e,keyPath:t,...n})=>{let r=[...t,{type:pr}],i=e[pr];return L(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:L(GF,{section:i,keyPath:r,...n})})},HF=({section:e,keyPath:t,...n})=>{let r=[...t,{type:mr}],i=e[mr],{content:a}=e;return L(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[L(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),L(GF,{section:a,keyPath:r,...n})]})},UF=({keyPath:e,dictionary:t,renderSection:n,section:r,...i})=>{let{addEditedContent:a}=LE(),o=r[_r],s=[...e,{type:_r}];return L(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[L(JO,{children:`Dictionary key`}),L(kO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...i,onContentChange:e=>{a(t.localId,{...o,dictionaryKey:String(e)},s)},children:o.dictionaryKey??``}),L(JO,{children:`Path (optional)`}),L(kO,{"aria-label":`Edit field`,type:`text`,variant:`default`,...i,onContentChange:e=>{a(t.localId,{...o,path:e===``?void 0:e},s)},children:o.path??``})]})},WF=A(function({section:e,keyPath:t,dictionary:n,renderSection:r}){let{tsxNotEditable:i}=qi(EO),a=Gi(e);return a===`reactNode`?L(`div`,{className:`flex w-full flex-col gap-2`,children:[L(`span`,{children:`(React Node)`}),L(`span`,{className:`flex text-muted-foreground text-xs`,children:i})]}):a===`nested`?L(UF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`translation`?L(AF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`enumeration`?L(jF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`condition`?L(NF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`select`?L(MF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`gender`?L(PF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`plural`?L(IF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`insertion`?L(VF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`markdown`?L(BF,{dictionary:n,keyPath:t,section:e}):a===`html`?L(zF,{dictionary:n,keyPath:t,section:e}):a===`file`?L(HF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`array`?L(LF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`object`?L(RF,{dictionary:n,renderSection:r,keyPath:t,section:e}):a===`number`?L(`div`,{className:`w-full p-2`,children:L(DF,{dictionary:n,keyPath:t,type:`number`,"aria-label":`Edit field`,children:e})}):a===`text`?L(`div`,{className:`w-full p-2`,children:typeof r==`function`?r(e,t):L(EF,{variant:`default`,"aria-label":`Edit field`,keyPath:t,dictionary:n,children:e})}):a===`boolean`?L(`div`,{className:`w-full p-2`,children:L(kF,{dictionary:n,keyPath:t,value:e})}):L(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(e,null,2),JSON.stringify(t,null,2),`NodeType : `,a]})}),GF=A(function(e){return L(OO,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`2xl`,children:L(WF,{...e})})}),KF=gc(`inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{color:{success:`border-success bg-success text-success hover:bg-success-500`,error:`border-error bg-error text-error hover:bg-error-500`,neutral:`border-neutral bg-neutral text-muted-foreground hover:bg-neutral-600`,light:`border-white bg-white text-white hover:bg-neutral-500`,dark:`border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900`,text:`border-text bg-text text-foreground hover:opacity-80`,custom:``},variant:{default:`rounded-lg text-foreground-opposite`,none:`border-none bg-opacity-0 text-inherit hover:bg-opacity-0`,outline:`rounded-lg border-[1.3px] bg-opacity-0 hover:bg-opacity-30`,hoverable:`rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10`},size:{sm:`px-2 py-0.5 text-xs`,md:`px-2.5 py-0.5 text-xs`,lg:`px-3 py-1 text-sm`}},defaultVariants:{variant:`default`,color:`text`,size:`md`}}),qF=({className:e,variant:t=`default`,color:n=`text`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return L(p,{className:W(KF({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pe-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&L(`button`,{type:`button`,className:`ms-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:L(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[L(`title`,{children:`Remove badge`}),L(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})]})})]})};D();var JF=Object.defineProperty,YF=(e,t)=>JF(e,`name`,{value:t,configurable:!0}),XF=`Dialog`,[ZF,QF]=Nc(XF),[$F,eI]=ZF(XF),tI=YF(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=P(null),l=P(null),[u,d]=eu({prop:r,defaultProp:a??!1,onChange:o,caller:XF}),[f,p]=N(0),[m,h]=N(0);return L($F,{scope:t,triggerRef:c,contentRef:l,contentId:Wk(),titleId:Wk(),descriptionId:Wk(),titlePresent:f>0,descriptionPresent:m>0,setTitleCount:p,setDescriptionCount:h,open:u,onOpenChange:d,onOpenToggle:i(()=>d(e=>!e),[d]),modal:s,children:n})},`Dialog`),nI=`DialogPortal`,[rI,iI]=ZF(nI,{forceMount:void 0}),aI=YF(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=eI(nI,t);return L(rI,{scope:t,forceMount:n,children:T.map(r,e=>L(Bl,{present:n||a.open,children:L(Il,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),oI=`DialogOverlay`,sI=w(YF(function(e,t){let n=iI(oI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=eI(oI,e.__scopeDialog);return a.modal?L(Bl,{present:r||a.open,children:L(lI,{...i,ref:t})}):null},`DialogOverlay`)),cI=Lc(`DialogOverlay.RemoveScroll`),lI=w(YF(function(e,t){let{__scopeDialog:n,...r}=e,i=eI(oI,n),a=kc(t,El());return L($N,{as:cI,allowPinchZoom:!0,shards:[i.contentRef],children:L(fl.div,{"data-state":hI(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),uI=`DialogContent`,dI=w(YF(function(e,t){let n=iI(uI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=eI(uI,e.__scopeDialog);return L(Bl,{present:r||a.open,children:a.modal?L(fI,{...i,ref:t}):L(pI,{...i,ref:t})})},`DialogContent`)),fI=w(YF(function(e,t){let n=eI(uI,e.__scopeDialog),r=P(null),i=kc(t,n.contentRef,r);return M(()=>{let e=r.current;if(e)return GM(e)},[]),L(mI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:bc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:bc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:bc(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),pI=w(YF(function(e,t){let n=eI(uI,e.__scopeDialog),r=P(!1),i=P(!1);return L(mI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),mI=w(YF(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=eI(uI,n);return xk(),L(d,{children:L(Ok,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:L(wl,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":hI(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`));function hI(e){return e?`open`:`closed`}YF(hI,`getState`);var gI=1,_I=.9,vI=.8,yI=.17,bI=.1,xI=.999,SI=.9999,CI=.99,wI=/[\\\/_+.#"@\[\(\{&]/,TI=/[\\\/_+.#"@\[\(\{&]/g,EI=/[\s-]/,DI=/[\s-]/g;function OI(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?gI:CI;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=OI(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=gI:wI.test(e.charAt(l-1))?(d*=vI,p=e.slice(i,l-1).match(TI),p&&i>0&&(d*=xI**+p.length)):EI.test(e.charAt(l-1))?(d*=_I,m=e.slice(i,l-1).match(DI),m&&i>0&&(d*=xI**+m.length)):(d*=yI,i>0&&(d*=xI**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=SI)),(d<bI&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=OI(e,t,n,r,l+1,a+2,o),f*bI>d&&(d=f*bI)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function kI(e){return e.toLowerCase().replace(DI,` `)}function AI(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,OI(e,t,kI(e),kI(t),0,0,{})}D();var jI=`[cmdk-group=""]`,MI=`[cmdk-group-items=""]`,NI=`[cmdk-group-heading=""]`,PI=`[cmdk-item=""]`,FI=`${PI}:not([aria-disabled="true"])`,II=`cmdk-item-select`,LI=`data-value`,RI=(e,t,n)=>AI(e,t,n),zI=C(void 0),BI=()=>l(zI),VI=C(void 0),HI=()=>l(VI),UI=C(void 0),WI=w((e,t)=>{let r=iL(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),i=iL(()=>new Set),o=iL(()=>new Map),s=iL(()=>new Map),c=iL(()=>new Set),l=nL(e),{label:u,children:d,value:f,onValueChange:p,filter:m,shouldFilter:h,loop:g,disablePointerSelection:_=!1,vimBindings:v=!0,...y}=e,b=Wk(),x=Wk(),S=Wk(),C=P(null),w=sL();rL(()=>{if(f!==void 0){let e=f.trim();r.current.value=e,T.emit()}},[f]),rL(()=>{w(6,j)},[]);let T=n(()=>({subscribe:e=>(c.current.add(e),()=>c.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var i,a,o;if(!Object.is(r.current[e],t)){if(r.current[e]=t,e===`search`)A(),O(),w(1,k);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(S);e?e.focus():(i=document.getElementById(b))==null||i.focus()}if(w(7,()=>{r.current.selectedItemId=M()?.id,T.emit()}),n||w(5,j),l.current?.value!==void 0){let e=t??``;(o=(a=l.current).onValueChange)==null||o.call(a,e);return}}T.emit()}},emit:()=>{c.current.forEach(e=>e())}}),[]),E=n(()=>({value:(e,t,n)=>{t!==s.current.get(e)?.value&&(s.current.set(e,{value:t,keywords:n}),r.current.filtered.items.set(e,D(t,n)),w(2,()=>{O(),T.emit()}))},item:(e,t)=>(i.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),w(3,()=>{A(),O(),r.current.value||k(),T.emit()}),()=>{s.current.delete(e),i.current.delete(e),r.current.filtered.items.delete(e);let t=M();w(4,()=>{A(),t?.getAttribute(`id`)===e&&k(),T.emit()})}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{s.current.delete(e),o.current.delete(e)}),filter:()=>l.current.shouldFilter,label:u||e[`aria-label`],getDisablePointerSelection:()=>l.current.disablePointerSelection,listId:b,inputId:S,labelId:x,listInnerRef:C}),[]);function D(e,t){let n=l.current?.filter??RI;return e?n(e,r.current.search,t):0}function O(){if(!r.current.search||l.current.shouldFilter===!1)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(n=>{let r=o.current.get(n),i=0;r.forEach(t=>{let n=e.get(t);i=Math.max(n,i)}),t.push([n,i])});let n=C.current;N().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(MI);t?t.appendChild(e.parentElement===t?e:e.closest(`${MI} > *`)):n.appendChild(e.parentElement===n?e:e.closest(`${MI} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=C.current?.querySelector(`${jI}[${LI}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function k(){let e=N().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(LI);T.setState(`value`,e||void 0)}function A(){if(!r.current.search||l.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let e=0;for(let t of i.current){let n=D(s.current.get(t)?.value??``,s.current.get(t)?.keywords??[]);r.current.filtered.items.set(t,n),n>0&&e++}for(let[e,t]of o.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=e}function j(){var e;let t=M();t&&(t.parentElement?.firstChild===t&&((e=t.closest(jI)?.querySelector(NI))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function M(){return C.current?.querySelector(`${PI}[aria-selected="true"]`)}function N(){return Array.from(C.current?.querySelectorAll(FI)||[])}function F(e){let t=N()[e];t&&T.setState(`value`,t.getAttribute(LI))}function I(e){var t;let n=M(),r=N(),i=r.findIndex(e=>e===n),a=r[i+e];(t=l.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&T.setState(`value`,a.getAttribute(LI))}function L(e){let t=M()?.closest(jI),n;for(;t&&!n;)t=e>0?eL(t,jI):tL(t,jI),n=t?.querySelector(FI);n?T.setState(`value`,n.getAttribute(LI)):I(e)}let R=()=>F(N().length-1),ee=e=>{e.preventDefault(),e.metaKey?R():e.altKey?L(1):I(1)},z=e=>{e.preventDefault(),e.metaKey?F(0):e.altKey?L(-1):I(-1)};return a(fl.div,{ref:t,tabIndex:-1,...y,"cmdk-root":``,onKeyDown:e=>{var t;(t=y.onKeyDown)==null||t.call(y,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:v&&e.ctrlKey&&ee(e);break;case`ArrowDown`:ee(e);break;case`p`:case`k`:v&&e.ctrlKey&&z(e);break;case`ArrowUp`:z(e);break;case`Home`:e.preventDefault(),F(0);break;case`End`:e.preventDefault(),R();break;case`Enter`:{e.preventDefault();let t=M();if(t){let e=new Event(II);t.dispatchEvent(e)}}}}},a(`label`,{"cmdk-label":``,htmlFor:E.inputId,id:E.labelId,style:uL},u),lL(e,e=>a(VI.Provider,{value:T},a(zI.Provider,{value:E},e))))}),GI=w((e,t)=>{let n=Wk(),r=P(null),i=l(UI),o=BI(),s=nL(e),c=s.current?.forceMount??i?.forceMount;rL(()=>{if(!c)return o.item(n,i?.id)},[c]);let u=oL(n,r,[e.value,e.children,r],e.keywords),d=HI(),f=aL(e=>e.value&&e.value===u.current),p=aL(e=>c||o.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);M(()=>{let t=r.current;if(t&&!e.disabled)return t.addEventListener(II,m),()=>t.removeEventListener(II,m)},[p,e.onSelect,e.disabled]);function m(){var e,t;h(),(t=(e=s.current).onSelect)==null||t.call(e,u.current)}function h(){d.setState(`value`,u.current,!0)}if(!p)return null;let{disabled:g,value:_,onSelect:v,forceMount:y,keywords:b,...x}=e;return a(fl.div,{ref:Oc(r,t),...x,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||o.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),KI=w((e,t)=>{let{heading:r,children:i,forceMount:o,...s}=e,c=Wk(),l=P(null),u=P(null),d=Wk(),f=BI(),p=aL(e=>o||f.filter()===!1?!0:!e.search||e.filtered.groups.has(c));rL(()=>f.group(c),[]),oL(c,l,[e.value,e.heading,u]);let m=n(()=>({id:c,forceMount:o}),[o]);return a(fl.div,{ref:Oc(l,t),...s,"cmdk-group":``,role:`presentation`,hidden:!p||void 0},r&&a(`div`,{ref:u,"cmdk-group-heading":``,"aria-hidden":!0,id:d},r),lL(e,e=>a(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":r?d:void 0},a(UI.Provider,{value:m},e))))}),qI=w((e,t)=>{let{alwaysRender:n,...r}=e,i=P(null),o=aL(e=>!e.search);return!n&&!o?null:a(fl.div,{ref:Oc(i,t),...r,"cmdk-separator":``,role:`separator`})}),JI=w((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=HI(),s=aL(e=>e.search),c=aL(e=>e.selectedItemId),l=BI();return M(()=>{e.value!=null&&o.setState(`search`,e.value)},[e.value]),a(fl.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":c,id:l.inputId,type:`text`,value:i?e.value:s,onChange:e=>{i||o.setState(`search`,e.target.value),n?.(e.target.value)}})}),YI=w((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,o=P(null),s=P(null),c=aL(e=>e.selectedItemId),l=BI();return M(()=>{if(s.current&&o.current){let e=s.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),a(fl.div,{ref:Oc(o,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":c,"aria-label":r,id:l.listId},lL(e,e=>a(`div`,{ref:Oc(s,l.listInnerRef),"cmdk-list-sizer":``},e)))}),XI=w((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:s,...c}=e;return a(tI,{open:n,onOpenChange:r},a(aI,{container:s},a(sI,{"cmdk-overlay":``,className:i}),a(dI,{"aria-label":e.label,"cmdk-dialog":``,className:o},a(WI,{ref:t,...c}))))}),ZI=w((e,t)=>aL(e=>e.filtered.count===0)?a(fl.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),QI=w((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...o}=e;return a(fl.div,{ref:t,...o,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},lL(e,e=>a(`div`,{"aria-hidden":!0},e)))}),$I=Object.assign(WI,{List:YI,Item:GI,Input:JI,Group:KI,Separator:qI,Dialog:XI,Empty:ZI,Loading:QI});function eL(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function tL(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function nL(e){let t=P(e);return rL(()=>{t.current=e}),t}var rL=typeof window>`u`?M:F;function iL(e){let t=P();return t.current===void 0&&(t.current=e()),t}function aL(e){let t=HI(),n=()=>e(t.snapshot());return k(t.subscribe,n,n)}function oL(e,t,n,r=[]){let i=P(),a=BI();return rL(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(LI,s),i.current=s}),i}var sL=()=>{let[e,t]=N(),n=iL(()=>new Map);return rL(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function cL(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function lL({asChild:e,children:t},n){return e&&x(t)?v(cL(t),{ref:t.ref},n(t.props.children)):n(t)}var uL={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},dL=({className:e,...t})=>L($I,{className:W(`flex flex-col overflow-hidden rounded-md px-3 py-2`,e),...t}),fL=({children:e,...t})=>L(tI,{...t,children:L(dI,{className:`overflow-hidden p-0`,children:L(dL,{className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]_svg]:size-5`,children:e})})}),pL=({className:e,...t})=>L(`div`,{className:W(`flex flex-1 items-center gap-2 px-3 py-2`,`rounded-2xl supports-[corner-shape:squircle]:rounded-4xl`,`bg-neutral-50 dark:bg-neutral-950`,`ring-1 ring-neutral-100 dark:ring-neutral-700`,`transition-shadow duration-100 focus-within:ring-3 hover:ring-3`,e),"cmdk-input-wrapper":``,children:[L(rc,{className:`size-4 shrink-0 opacity-50`}),L($I.Input,{className:`flex-1 bg-transparent text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,...t})]}),mL=({className:e,...t})=>L($I.List,{className:W(`max-h-75 overflow-y-auto overflow-x-hidden`,e),...t}),hL=e=>L($I.Empty,{className:`py-6 text-center text-sm`,...e}),gL=({className:e,...t})=>L($I.Group,{className:W(`overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:text-xs`,e),...t}),_L=({className:e,...t})=>L($I.Separator,{className:W(`-mx-1 h-px bg-border`,e),...t}),vL=({className:e,...t})=>L($I.Item,{className:W(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50`,e),...t}),yL=({className:e,...t})=>L(`span`,{className:W(`ms-auto text-muted-foreground text-xs tracking-widest`,e),...t}),bL={...dL,Dialog:fL,Input:pL,List:mL,Empty:hL,Group:gL,Separator:_L,Item:vL,Shortcut:yL};D();var xL=C(null),SL=()=>{let e=l(xL);if(!e)throw Error(`useMultiSelect must be used within MultiSelectProvider`);return e},CL=({values:e,defaultValues:t,onValueChange:r,loop:a=!1,disabled:o=!1,className:s,children:c,dir:l,...u})=>{let[d,f]=N(t??[]),[p,m]=N(``),[h,g]=N(!1),[_,v]=N(-1),y=P(null),[b,x]=N(!1),[S,C]=N(``);M(()=>{e&&f(e)},[e]);let w=i(e=>{if(d.includes(e)){let t=d.filter(t=>t!==e);f(t),r?.(t)}else{let t=[...d,e];f(t),r?.(t)}},[d]),T=i(e=>{e.preventDefault();let t=e.currentTarget,n=t.value.substring(t.selectionStart??0,t.selectionEnd??0);C(n),x(n===p)},[p]),E=i(e=>{e.stopPropagation();let t=y.current;if(!t)return;let n=()=>{let e=_+1;v(e>d.length-1?a?0:-1:e)},r=()=>{let e=_-1;v(e<0?d.length-1:e)},i=()=>{let e=_-1<=0?d.length-1==0?-1:0:_-1;v(e)};switch(e.key){case`ArrowLeft`:l===`rtl`?d.length>0&&(_!==-1||a)&&n():d.length>0&&t.selectionStart===0&&r();break;case`ArrowRight`:l===`rtl`?d.length>0&&t.selectionStart===0&&r():d.length>0&&(_!==-1||a)&&n();break;case`Backspace`:case`Delete`:if(d.length>0){let e=d[_];_!==-1&&e!==void 0?(w(e),i()):(t.selectionStart===0&&S===p||b)&&w(d[d.length-1])}break;case`Enter`:g(!0);break;case`Escape`:_===-1?h&&g(!1):v(-1)}},[d,p,_,a]);return L(xL,{value:n(()=>({value:d,onValueChange:w,open:h,setOpen:g,inputValue:p,setInputValue:m,activeIndex:_,setActiveIndex:v,ref:y,handleSelect:T}),[d,w,h,g,p,m,_,v,y,T]),children:L(dL,{onKeyDown:E,className:W(`flex w-full flex-col gap-2 overflow-visible bg-transparent`,o&&`cursor-not-allowed opacity-50`,s),dir:l,"aria-disabled":o||void 0,inert:o,...u,children:c})})},wL=({className:e,getBadgeValue:t=e=>e,validationStyleEnabled:n=!1,children:r,...a})=>{let{value:o,onValueChange:s,activeIndex:c}=SL(),l=i(e=>{e.preventDefault(),e.stopPropagation()},[]);return L(`div`,{className:W(`flex w-full flex-col gap-3`,`cursor-pointer select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-foreground`,`ring-0`,`focus-within:outline-none`,`focus-within:ring-3`,`focus-within:ring-neutral-200`,`dark:focus-within:ring-neutral-500`,`focus-within:ring-offset-white`,`dark:focus-within:ring-offset-neutral-500`,`[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,n&&`valid:border-success invalid:border-error`,e),...a,children:[o.length>0&&L(`div`,{className:`flex w-full flex-wrap gap-1`,children:o.map((e,n)=>L(qF,{className:W(`flex items-center gap-1 rounded-xl px-1`,c===n&&`ring-2 ring-muted-foreground`),color:`text`,children:[L(`span`,{className:`text-xs`,children:t(e)}),L(`button`,{"aria-label":`Remove ${e} option`,"aria-roledescription":`button to remove option`,onMouseDown:l,onClick:()=>s(e),children:[L(`span`,{className:`sr-only`,children:[`Remove `,e,` option`]}),L(dc,{className:`size-4 cursor-pointer`})]})]},e))}),r]})},TL=({className:e,...t})=>{let{setOpen:n,inputValue:r,setInputValue:i,activeIndex:a,setActiveIndex:o,handleSelect:s,ref:c}=SL();return L(bL.Input,{...t,tabIndex:0,ref:c,value:r,onValueChange:a===-1?i:void 0,onSelect:s,onBlur:()=>n(!1),onFocus:()=>n(!0),onClick:()=>o(-1),className:W(`ms-2 flex-1 cursor-pointer outline-hidden`,e,a!==-1&&`caret-transparent`)})},EL=({children:e})=>{let{open:t}=SL();return L(`div`,{className:`relative`,children:t&&e})},DL=({className:e,children:t})=>L(bL.List,{className:W(`absolute top-0 z-10 flex w-full flex-col gap-2`,`rounded-xl p-2 shadow-md`,`bg-white dark:bg-neutral-950`,`text-foreground`,`border border-neutral-200 dark:border-neutral-800`,`transition-colors`,e),children:[t,L(bL.Empty,{children:L(`span`,{className:`text-muted-foreground`,children:`No results found`})})]}),OL=({className:e,value:t,children:n,...r})=>{let{value:a,onValueChange:o,setInputValue:s}=SL(),c=i(e=>{e.preventDefault(),e.stopPropagation()},[]),l=a.includes(t);return L(bL.Item,{...r,onSelect:()=>{o(t),s(``)},className:W(`flex cursor-pointer justify-between`,`rounded-lg px-2 py-1`,`transition-colors`,`hover:bg-neutral/10`,l&&`opacity-50`,r.disabled&&`cursor-not-allowed opacity-50`,e),onMouseDown:c,children:[n,l&&L(ds,{className:`size-4`})]})},kL=CL;kL.Trigger=wL,kL.Input=TL,kL.Content=EL,kL.List=DL,kL.Item=OL,D();var AL=({id:e,...t})=>{let n=g(),r=e??n;return L(jL,{value:{id:r},children:L(`div`,{className:`flex flex-col gap-2 p-2`,id:r,suppressHydrationWarning:!0,...t})})},jL=C({});D();var ML=e=>e.type===`checkbox`,NL=e=>e.type===`file`,PL=e=>e instanceof Date,FL=e=>e==null,IL=e=>typeof e==`object`,LL=e=>!FL(e)&&!Array.isArray(e)&&IL(e)&&!PL(e),RL=e=>LL(e)&&e.target?ML(e.target)?e.target.checked:NL(e.target)?e.target.files:e.target.value:e,zL=/[.[\]'"]/,BL=e=>e.split(zL).filter(Boolean);function VL(e,t){let n=BL(t),r=e._formValues,i=e._defaultValues;for(let e=0;e<n.length-1;e++){let t=n[e];if(r=r==null?r:r[t],i=i==null?i:i[t],r===null||i===null)return null}}var HL=(e,t)=>t.split(`.`).some((t,n,r)=>!isNaN(Number(t))&&e.has(r.slice(0,n).join(`.`))),UL=typeof window<`u`&&window.HTMLElement!==void 0&&typeof document<`u`;function WL(e){if(typeof e!=`object`||!e)return e;if(e instanceof Date)return new Date(e);let t=typeof Blob<`u`&&e instanceof Blob,n=typeof FileList<`u`&&e instanceof FileList;if(UL&&(t||n))return e;let r=Array.isArray(e);if(!r&&e.constructor!==Object)return e;let i=r?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=WL(e[t]));return i}var GL={BLUR:`blur`,FOCUS_OUT:`focusout`,CHANGE:`change`,SUBMIT:`submit`,TRIGGER:`trigger`,VALID:`valid`},KL={onBlur:`onBlur`,onChange:`onChange`,onSubmit:`onSubmit`,onTouched:`onTouched`,all:`all`},qL={max:`max`,min:`min`,maxLength:`maxLength`,minLength:`minLength`,pattern:`pattern`,required:`required`,validate:`validate`},JL=[qL.required,qL.min,qL.max,qL.minLength,qL.maxLength,qL.pattern,qL.validate],YL=`form`,XL=`root`,ZL=[`__proto__`,`constructor`,`prototype`],QL=/^\w*$/,$L=e=>QL.test(e),eR=e=>e===void 0,Q=(e,t,n)=>{if(!t||!LL(e))return n;let r=$L(t)?[t]:BL(t);if(r.some(e=>ZL.includes(e)))return n;let i=r.reduce((e,t)=>FL(e)?void 0:e[t],e);return eR(i)||i===e?eR(e[t])?n:e[t]:i},tR=e=>typeof e==`boolean`,nR=e=>typeof e==`function`,rR=(e,t,n)=>{let r=-1,i=$L(t)?[t]:BL(t),a=i.length,o=a-1;for(;++r<a;){let t=i[r],a=n;if(r!==o){let n=e[t];a=LL(n)||Array.isArray(n)?n:isNaN(+i[r+1])?{}:[]}if(ZL.includes(t))return;e[t]=a,e=e[t]}},iR=_.createContext(null);iR.displayName=`HookFormControlContext`;var aR=()=>_.useContext(iR),oR=(e,t,n,r=!0)=>{let i={};for(let a in e)Object.defineProperty(i,a,{get:()=>{let i=a;return t._proxyFormState[i]!==KL.all&&(t._proxyFormState[i]=!r||KL.all),n&&(n[i]=!0),e[i]}});return i},sR=UL?_.useLayoutEffect:_.useEffect,cR=e=>{let t=e.constructor&&e.constructor.prototype;return LL(t)&&t.hasOwnProperty(`isPrototypeOf`)},lR=e=>FL(e)||!IL(e),uR=(e,t)=>t.length===0&&!Array.isArray(e)&&!cR(e);function dR(e,t,n=new WeakMap){if(e===t)return!0;if(lR(e)||lR(t))return Object.is(e,t);if(PL(e)&&PL(t))return Object.is(e.getTime(),t.getTime());let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(uR(e,r)||uR(t,i))return Object.is(e,t);if(!r.length&&Array.isArray(e)!==Array.isArray(t))return!1;let a=n.get(e);if(a&&a.has(t))return!0;if(a)a.add(t);else{let r=new WeakSet;r.add(t),n.set(e,r)}for(let i of r){let r=e[i];if(!(i in t))return!1;if(i!==`ref`){let e=t[i];if(PL(r)&&PL(e)||(LL(r)||Array.isArray(r))&&(LL(e)||Array.isArray(e))?!dR(r,e,n):!Object.is(r,e))return!1}}return!0}function fR(e){let t=_.useRef(!1),n=_.useRef(!1),r=_.useRef(void 0),i=_.useRef(0);return i.current++,!n.current&&e&&(n.current=!0,r.current=WL(e())),{resyncIfNeeded:_.useCallback((e,a,o)=>{if(e&&(t.current||n.current&&i.current>1)){let e=a();dR(r.current,e)||o(e)}t.current=!0},[]),snapshot:_.useCallback((e,t)=>{e&&(r.current=WL(t()))},[])}}function pR(e){let t=aR(),{control:n=t,disabled:r,name:i,exact:a}=e||{},o=()=>({...n._formState,defaultValues:n._defaultValues}),[s,c]=_.useState(o),l=_.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),{resyncIfNeeded:u,snapshot:d}=fR(o);return sR(()=>{u(!r,o,c);let e=n._subscribe({name:i,formState:l.current,exact:a,callback:e=>{!r&&c({...n._formState,...e,defaultValues:n._defaultValues})}});return()=>{e(),d(!r,o)}},[n,i,r,a,u,d]),_.useEffect(()=>{l.current.isValid&&n._setValid(!0)},[n]),_.useMemo(()=>oR(s,n,l.current,!1),[s,n])}var mR=e=>typeof e==`string`,hR=(e,t,n,r,i)=>mR(e)?(r&&t.watch.add(e),Q(n,e,i)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),Q(n,e,Q(i,e)))):(r&&(t.watchAll=!0),n);function gR(e){let t=aR(),{control:n=t,name:r,defaultValue:i,disabled:a,exact:o,compute:s}=e||{},c=_.useRef(i),l=_.useRef(s),u=_.useRef(n),d=_.useRef(r);l.current=s;let f=()=>{let e=n._getWatch(r,c.current);return l.current?l.current(e):e},[p,m]=_.useState(f),h=_.useRef(p),g=_.useCallback(e=>{let t=hR(r,n._names,e||n._formValues,!1,c.current);return l.current?l.current(t):t},[n._formValues,n._names,r]),v=_.useCallback(e=>{if(!a){let t=hR(r,n._names,e||n._formValues,!1,c.current);if(l.current){let e=l.current(t);dR(e,h.current)||(m(e),h.current=e)}else m(t)}},[n._formValues,n._names,a,r]),{resyncIfNeeded:y,snapshot:b}=fR(f),x=_.useRef(v);x.current=v;let S=_.useRef(g);S.current=g,sR(()=>{u.current!==n||!dR(d.current,r)?(u.current=n,d.current=r,x.current()):y(!a,()=>S.current(),e=>{m(e),h.current=e});let e=n._subscribe({name:r,formState:{values:!0},exact:o,callback:e=>{x.current(e.values)}});return()=>{e(),b(!a,()=>S.current())}},[n,o,r,a,y,b]),_.useEffect(()=>n._removeUnmounted());let C=u.current!==n,w=d.current;return _.useMemo(()=>{if(a)return!1;let e=!C&&!dR(w,r);return C||e},[a,C,r,w])?g():p}function _R(e){let t=aR(),{name:n,disabled:r,control:i=t,shouldUnregister:a,defaultValue:o,exact:s=!0}=e,c=HL(i._names.array,n),l=gR({control:i,name:n,defaultValue:_.useMemo(()=>{let e=Q(i._formValues,n,Q(i._defaultValues,n,o));return eR(e)?VL(i,n):e},[i,n,o]),exact:s}),u=pR({control:i,name:n,exact:s}),d=_.useRef(e),f=_.useRef(null),p=_.useRef(i.register(n,{...e.rules,value:l,...tR(e.disabled)?{disabled:e.disabled}:{}}));d.current=e;let m=_.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Q(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Q(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Q(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Q(u.validatingFields,n)},error:{enumerable:!0,get:()=>Q(u.errors,n)}}),[u,n]),h=_.useCallback(e=>{let t=RL(e);return Q(i._fields,n)||(p.current=i.register(n,{...d.current.rules,value:t})),p.current.onChange({target:{value:RL(e),name:n},type:GL.CHANGE})},[n,i]),g=_.useCallback(()=>p.current.onBlur({target:{value:Q(i._formValues,n),name:n},type:GL.BLUR}),[n,i._formValues]),v=_.useCallback(e=>{e&&(f.current={focus:()=>nR(e.focus)&&e.focus(),select:()=>nR(e.select)&&e.select(),setCustomValidity:t=>nR(e.setCustomValidity)&&e.setCustomValidity(t),reportValidity:()=>nR(e.reportValidity)&&e.reportValidity()});let t=Q(i._fields,n);t&&t._f&&e&&(t._f.ref=f.current,t._f._c=!0)},[i._fields,n]),y=_.useMemo(()=>({name:n,value:l,...tR(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h,onBlur:g,ref:v}),[n,r,u.disabled,h,g,v,l]);return _.useEffect(()=>{let e=i._options.shouldUnregister||a;p.current=i.register(n,{...d.current.rules,...tR(d.current.disabled)?{disabled:d.current.disabled}:{}});let t=(e,t)=>{let n=Q(i._fields,e);n&&n._f&&(n._f.mount=t,n._f._c=t)};if(t(n,!0),e){let e=WL(Q(a?i._defaultValues:i._options.values||i._defaultValues,n,Q(i._options.defaultValues,n,d.current.defaultValue)));rR(i._defaultValues,n,e),eR(Q(i._formValues,n))&&rR(i._formValues,n,e)}if(!c&&i.register(n,{...d.current.rules,...tR(d.current.disabled)?{disabled:d.current.disabled}:{}}),f.current){let e=Q(i._fields,n);e&&e._f&&(e._f.ref=f.current)}return()=>{(c?e&&!i._state.action:e)?i.unregister(n):t(n,!1)}},[n,i,c,a]),_.useEffect(()=>{i._setDisabledField({disabled:r,name:n})},[r,n,i]),_.useMemo(()=>({field:y,formState:u,fieldState:m}),[y,u,m])}var vR=e=>e.render(_R(e)),yR=e=>({isOnSubmit:!e||e===KL.onSubmit,isOnBlur:e===KL.onBlur,isOnChange:e===KL.onChange,isOnAll:e===KL.all,isOnTouch:e===KL.onTouched}),bR=(e,t,n)=>{if(n)return!1;if(t.watchAll||t.watch.has(e))return!0;for(let n of t.watch)if(e.startsWith(n)&&e.charAt(n.length)===`.`)return!0;return!1},xR=(e,t,n)=>{for(let r of n||Object.keys(e)){if(r===`_f`)continue;let i=n?Q(e,r):e[r];if(i){let{_f:e}=i;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],e.name)||e.ref&&t(e.ref,e.name)||xR(i,t))return!0}else if((LL(i)||Array.isArray(i))&&xR(i,t))return!0}}},SR=(e,t,n)=>{let r=Q(e,n),i=Array.isArray(r)?r:[];return rR(i,XL,t[n]),rR(e,n,i),e},CR=e=>LL(e)&&!Object.keys(e).length,wR=e=>{if(!UL)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},TR=e=>e.type===`radio`,ER=e=>e instanceof RegExp,DR=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},OR={value:!1,isValid:!1},kR={value:!0,isValid:!0},AR=e=>{if(!Array.isArray(e))return OR;if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}let t=e[0];return!t||!t.checked||t.disabled?OR:!t.attributes||!(`value`in t.attributes)||eR(t.value)||t.value===``?kR:{value:t.value,isValid:!0}},jR={isValid:!1,value:null},MR=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,jR):jR;function NR(e,t,n=`validate`){if(mR(e)||Array.isArray(e)&&e.every(mR)||tR(e)&&!e)return{type:n,message:mR(e)?e:``,ref:t}}var PR=e=>LL(e)&&!ER(e)?e:{value:e,message:``},FR=async(e,t,n,r,i,a)=>{let{ref:o,refs:s,required:c,maxLength:l,minLength:u,min:d,max:f,pattern:p,validate:m,name:h,valueAsNumber:g,mount:_,_c:v}=e._f,y=Q(n,h);if(!_||t.has(h))return{};let b=s?s[0]:o,x=e=>{if(i&&b.reportValidity){let t=tR(e)?``:e||``;s?s.forEach(e=>nR(e.setCustomValidity)&&e.setCustomValidity(t)):b.setCustomValidity(t),b.reportValidity()}},S={},C=TR(o),w=ML(o),T=C||w,E=(g||NL(o))&&eR(o.value)&&eR(y)||wR(o)&&o.value===``&&!v||y===``||Array.isArray(y)&&!y.length,D=DR.bind(null,h,r,S),O=(e,t,n,r=qL.maxLength,i=qL.minLength)=>{let a=e?t:n;S[h]={type:e?r:i,message:a,ref:o,...D(e?r:i,a)}};if(a?!Array.isArray(y)||!y.length:c&&(!T&&(E||FL(y))||tR(y)&&!y||w&&!AR(s).isValid||C&&!MR(s).isValid)){let{value:e,message:t}=mR(c)?{value:!!c,message:c}:PR(c);if(e&&(S[h]={type:qL.required,message:t,ref:b,...D(qL.required,t)},!r))return x(t),S}if(!E&&(!FL(d)||!FL(f))){let e,t,n=PR(f),i=PR(d);if(!FL(y)&&!PL(y)&&!isNaN(y)){let r=o.valueAsNumber||y&&+y;FL(n.value)||(e=r>n.value),FL(i.value)||(t=r<i.value)}else{let r=o.valueAsDate||new Date(y),a=e=>new Date(new Date().toDateString()+` `+e),s=o.type==`time`,c=o.type==`week`;mR(n.value)&&y&&(e=s?a(y)>a(n.value):c?y>n.value:r>new Date(n.value)),mR(i.value)&&y&&(t=s?a(y)<a(i.value):c?y<i.value:r<new Date(i.value))}if((e||t)&&(O(!!e,n.message,i.message,qL.max,qL.min),!r))return x(S[h].message),S}if((l||u)&&!E&&(mR(y)||a&&Array.isArray(y))){let e=PR(l),t=PR(u),n=!FL(e.value)&&y.length>+e.value,i=!FL(t.value)&&y.length<+t.value;if((n||i)&&(O(n,e.message,t.message),!r))return x(S[h].message),S}if(p&&!E&&mR(y)){let{value:e,message:t}=PR(p);if(ER(e)&&!y.match(e)&&(S[h]={type:qL.pattern,message:t,ref:o,...D(qL.pattern,t)},!r))return x(t),S}if(m){if(nR(m)){let e=NR(await m(y,n),b);if(e&&(S[h]={...e,...D(qL.validate,e.message)},!r))return x(e.message),S}else if(LL(m)){let e={};for(let t in m){if(!CR(e)&&!r)break;let i=NR(await m[t](y,n),b,t);i&&(e={...i,...D(t,i.message)},r||x(i.message),r&&(S[h]=e))}if(!CR(e)&&(S[h]={ref:b,...e},!r))return S}}let k=S[h];return x(!k||k.message),S},IR=e=>Array.isArray(e)?e:[e],LR=e=>Array.isArray(e)?e.filter(Boolean):[];function RR(e,t){let n=t.length-1,r=0;for(;r<n;){if(FL(e)){e=void 0;break}e=e[t[r]],r++}return e}function zR(e){for(let t in e)if(e.hasOwnProperty(t)&&!eR(e[t]))return!1;return!0}function BR(e,t){if(mR(t)&&Object.prototype.hasOwnProperty.call(e,t))return delete e[t],e;let n=Array.isArray(t)?t:$L(t)?[t]:BL(t);if(n.some(e=>ZL.includes(String(e))))return e;let r=n.length===1?e:RR(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(LL(r)&&CR(r)||Array.isArray(r)&&zR(r))&&BR(e,n.slice(0,-1)),e}var VR=_.createContext(null);VR.displayName=`HookFormContext`;var HR=()=>_.useContext(VR),UR=({children:e,watch:t,getValues:n,getErrors:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,setValues:c,trigger:l,formState:u,resetField:d,reset:f,resetDefaultValues:p,handleSubmit:m,unregister:h,control:g,register:v,setFocus:y,subscribe:b})=>{let x=_.useMemo(()=>({watch:t,getValues:n,getErrors:r,getFieldState:i,setError:a,clearErrors:o,setValue:s,setValues:c,trigger:l,formState:u,resetField:d,reset:f,resetDefaultValues:p,handleSubmit:m,unregister:h,control:g,register:v,setFocus:y,subscribe:b}),[o,g,u,r,i,n,m,v,f,p,d,a,y,s,c,b,l,h,t]);return _.createElement(VR.Provider,{value:x},_.createElement(iR.Provider,{value:x.control},e))},WR=()=>{let e=[];return{get observers(){return e},next:t=>{for(let n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}};function GR(e,t){let n=Array.isArray(e)?[]:{};for(let r in e)if(e.hasOwnProperty(r)){let i=e[r],a=t[r];i&&(LL(i)||Array.isArray(i))&&a?n[r]=GR(i,a):e[r]&&(n[r]=a)}return n}var KR=(e,t)=>e!==null&&IL(e)&&Object.prototype.hasOwnProperty.call(e,t),qR=(e,t)=>{if(!t)return!1;let n=e;for(let r of $L(t)?[t]:BL(t)){if(!KR(n,r))return KR(e,t);n=n[r]}return!0},JR=e=>e.type===`select-multiple`,YR=e=>TR(e)||ML(e),XR=e=>wR(e)&&e.isConnected;function ZR(e){return Array.isArray(e)||LL(e)}function QR(e,t,n=``,r=[]){for(let i in e){let a=n?`${n}.${i}`:i,o=e[i];ZR(o)&&ZR(Q(t,a))?QR(o,t,a,r):r.push(a)}return r}var $R=e=>{for(let t in e)if(nR(e[t]))return!0;return!1};function ez(e){return Array.isArray(e)||LL(e)&&!$R(e)}function tz(e){return!!(e&&`_f`in e)}function nz(e){return Array.isArray(e)?!e.some(e=>!eR(e)):!Object.keys(e).length}function rz(e,t){Array.isArray(e)?e[t]=void 0:delete e[t]}function iz(e,t={},n){for(let r in e){let i=e[r],a=n&&n[r];ez(i)&&(!Array.isArray(i)||!tz(a))?(t[r]=Array.isArray(i)?[]:{},iz(i,t[r],a),nz(t[r])&&rz(t,r)):eR(i)||(t[r]=!0)}return t}function az(e,t,n,r){n||=iz(t,{},r);for(let i in e){let a=e[i],o=r&&r[i];ez(a)&&(!Array.isArray(a)||!tz(o))?(eR(t)||lR(n[i])?n[i]=iz(a,Array.isArray(a)?[]:{},o):az(a,FL(t)?{}:t[i],n[i],o),nz(n[i])&&rz(n,i)):dR(a,t[i])?rz(n,i):n[i]=!0}return n}var oz=(e,t)=>{let n=t.split(`.`),r=[],i=n[0];for(let t=1;t<n.length;i+=`.`+n[t++])!isNaN(+n[t])&&e.has(i)&&r.push(`${i}.${n[t]}`);return r},sz=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>eR(e)?e:t?e===``?NaN:e&&+e:n&&mR(e)?new Date(e):r?r(e):e;function cz(e){let t=e.ref;return NL(t)?t.files:TR(t)?MR(e.refs).value:JR(t)?[...t.selectedOptions].map(({value:e})=>e):ML(t)?AR(e.refs).value:sz(t.value,e)}var lz=(e,t,n,r)=>{let i={};for(let n of e){let e=Q(t,n);e&&rR(i,n,e._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},uz=e=>eR(e)?e:ER(e)?e.source:LL(e)?ER(e.value)?e.value.source:e.value:e,dz=`AsyncFunction`,fz=e=>{if(!e||!e.validate)return!1;if(nR(e.validate))return e.validate.constructor.name===dz;if(LL(e.validate)){for(let t in e.validate)if(e.validate[t].constructor.name===dz)return!0}return!1},pz=e=>e.mount&&(e.required||!eR(e.required)&&e.required!==!1||!eR(e.min)||!eR(e.max)||!eR(e.maxLength)||!eR(e.minLength)||e.pattern||e.validate);function mz(e,t,n){let r=Q(e,n);if(r?.type||r?.message||Array.isArray(r))return{error:r,name:n};let i=n.split(`.`);for(;i.length;){let r=i.join(`.`),a=Q(t,r),o=Q(e,r);if(a&&!Array.isArray(a)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};if(o&&o.root&&o.root.type)return{name:`${r}.root`,error:o.root};i.pop()}return{name:n}}var hz=(e,t,n,r)=>{n(e);let i=Object.keys(e).filter(e=>e!==`name`);return!i.length||r&&i.length>=Object.keys(t).length||i.find(e=>t[e]===(!r||KL.all))},gz=(e,t,n)=>!e||!t||e===t||IR(e).some(e=>e&&(n?e===t||e.startsWith(t+`.`):e.startsWith(t)||t.startsWith(e))),_z=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:!(n?r.isOnChange:i.isOnChange)||e,vz=(e,t)=>{let n=Q(e,t);!LR(n).length&&!(n!=null&&n.root)&&BR(e,t)},yz={mode:KL.onSubmit,reValidateMode:KL.onChange,shouldFocusError:!0},bz=(e,t)=>{for(let n in e)n in t||delete e[n];Object.assign(e,t)},xz={submitCount:0,isDirty:!1,isReady:!1,isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{}};function Sz(e={}){let t={...yz,...e},n={...WL(xz),isLoading:nR(t.defaultValues),errors:t.errors||{},disabled:t.disabled||!1},r={},i=(LL(t.defaultValues)||LL(t.values))&&WL(t.defaultValues||t.values)||{},a=t.shouldUnregister?{}:WL(i),o={action:!1,actionArrayLengths:new Map,mount:!1,watch:!1,keepIsValid:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set,registerName:new Set},c={},l={},u=0,d=yR(t.mode),f=yR(t.reValidateMode),p={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},m={...p},h={...m},g=(...e)=>e.some(e=>m[e]||h[e]),_={array:WR(),state:WR()},v=0,y=0,b=t.criteriaMode===KL.all,x=(e,t)=>n=>{clearTimeout(l[e]),l[e]=setTimeout(t,n)},S=e=>{clearTimeout(l[e]),delete l[e],delete c[e]},C=e=>{S(e);let t=`${e}.`;for(let e of Object.keys(c))e.startsWith(t)&&S(e)},w=async e=>{if(!o.keepIsValid&&!t.disabled&&(g(`isValid`)||e)){let e=++v,i;t.resolver?(i=CR((await F()).errors),e===v&&T()):i=await R({fields:r,onlyCheckValid:!0,eventType:GL.VALID}),e===v&&i!==n.isValid&&_.state.next({isValid:i})}},T=(e,r)=>{!t.disabled&&g(`isValidating`,`validatingFields`)&&((e||s.mount).forEach(e=>{e&&(r?rR(n.validatingFields,e,r):BR(n.validatingFields,e))}),_.state.next({validatingFields:n.validatingFields,isValidating:!CR(n.validatingFields)}))},E=()=>{n.dirtyFields=az(i,a,void 0,r)},D=(e,i=[],s,c,l=!0,u=!0)=>{if(c&&s&&!t.disabled){o.action=!0;let t=Q(r,e);if(o.actionArrayLengths.has(e)||o.actionArrayLengths.set(e,Array.isArray(t)?t.length:0),u&&Array.isArray(t)){let n=s(t,c.argA,c.argB);l&&rR(r,e,n)}let a=Q(n.errors,e);if(u&&Array.isArray(a)){let t=a.root,r=s(a,c.argA,c.argB)||a;t&&(r.root=t),l&&rR(n.errors,e,r),vz(n.errors,e)}let d=Q(n.touchedFields,e),f=u&&Array.isArray(d);if(f){let t=s(d,c.argA,c.argB);l&&rR(n.touchedFields,e,t)}let p=Q(n.dirtyFields,e);if(u&&Array.isArray(p)){let t=s(p,c.argA,c.argB)||p;l&&rR(n.dirtyFields,e,t)}g(`dirtyFields`)&&E(),_.state.next({name:e,isDirty:z(e,i),dirtyFields:n.dirtyFields,...f&&{touchedFields:n.touchedFields},errors:n.errors,isValid:n.isValid})}else rR(a,e,i)},O=(e,t)=>{rR(n.errors,e,t),n.errors={...n.errors},_.state.next({errors:n.errors})},k=e=>{Object.keys(c).forEach(S);let t=!CR(e);n.errors=e,_.state.next({errors:n.errors,...t?{isValid:!1}:{}}),!t&&o.mount&&w()},A=e=>{let t=$L(e)?[e]:BL(e),n=a,r=i;for(let e=0;e<t.length-1;e++){let i=t[e];if(n=FL(n)?n:n[i],r=FL(r)?r:r[i],n===null&&r!==null)return!0}return!1},j=e=>{if(!o.actionArrayLengths.size)return!1;let t=$L(e)?[e]:BL(e),n=a,r=``,i=-1,s=0;for(let e=0;e<t.length;e++){if(FL(n))return!1;let a=t[e];if(r=r?`${r}.${a}`:a,Array.isArray(n)&&+a>=n.length)return i===-1?!1:e!==i||+a<s;if(o.actionArrayLengths.has(r)&&(i=e+1,s=o.actionArrayLengths.get(r)),n=n[a],eR(n)&&i!==-1&&e>i&&+t[i]<s)return!0}return!1},M=(c,l,u,d)=>{let f=Q(r,c);if(f){if(A(c)||j(c))return;let r=eR(Q(a,c)),p=Q(a,c,eR(u)?Q(i,c):u);eR(p)||d&&d.defaultChecked||l?rR(a,c,l?p:cz(f._f)):ne(c,p),o.mount&&!o.action&&(t.resolver&&g(`isValidating`,`validatingFields`)?Promise.resolve().then(()=>w()):w(),r&&n.isDirty&&g(`isDirty`)&&(z()||(n.isDirty=!1,_.state.next({...n}))),e.shouldUnregister&&r&&!eR(Q(a,c))&&bR(c,s)&&(o.watch=!0))}},N=(e,o,s,c,l)=>{let u=!1,d=!1,f={name:e};if(!t.disabled||c===!0){if(!s||c){let t=dR(Q(i,e),o);g(`isDirty`)&&(d=n.isDirty,n.isDirty=f.isDirty=!t||z(),u=d!==f.isDirty),d=!!Q(n.dirtyFields,e),t===n.isDirty?t?BR(n.dirtyFields,e):rR(n.dirtyFields,e,!0):bz(n.dirtyFields,az(i,a,void 0,r)),f.dirtyFields=n.dirtyFields,u||=g(`dirtyFields`)&&d!==!t}if(s){let t=Q(n.touchedFields,e);t||(rR(n.touchedFields,e,s),f.touchedFields=n.touchedFields,u||=g(`touchedFields`)&&t!==s)}u&&l&&_.state.next(f)}return u?f:{}},P=(e,r,i,a)=>{let o=Q(n.errors,e),s=g(`isValid`)&&tR(r)&&n.isValid!==r;if(t.delayError&&i?(c[e]=x(e,()=>O(e,i)),c[e](t.delayError)):(S(e),i?rR(n.errors,e,i):BR(n.errors,e),n.errors={...n.errors}),(i?!dR(o,i):o)||!CR(a)||s){let t={...a,...s&&tR(r)?{isValid:r}:{},errors:n.errors,name:e};_.state.next(t)}},F=async e=>(T(e,!0),await t.resolver(a,t.context,lz(e||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation))),I=async e=>{let t=y,{errors:i}=await F(e);if(t!==y)return i;if(T(e),e){for(let t of e){let e=Q(i,t);C(t);let a=s.array.has(t)&&LL(e)&&!Object.keys(e).some(e=>!Number.isNaN(Number(e))),o=Q(r,t),c=LL(o)&&Object.keys(o).some(e=>e!==`_f`);a?SR(n.errors,{[t]:e},t):e?.type||e?.message||Array.isArray(e)||LL(e)&&c?rR(n.errors,t,e):BR(n.errors,t)}n.errors={...n.errors}}else Object.keys(c).forEach(S),n.errors=i;return i},L=async({name:e,eventType:r})=>{if(t.validate){let i=y,o=await t.validate({formValues:a,formState:n,name:e,eventType:r});if(i!==y)return!0;if(LL(o)){let e=!0;pe(YL);for(let t in o){let n=o[t];n&&(e=!1,me(`${YL}.${t}`,{message:mR(n.message)?n.message:``,type:n.type||qL.validate}))}return e}return mR(o)||!o?(me(YL,{message:o||``,type:qL.validate}),!1):(pe(YL),!0)}return!0},R=async({fields:r,onlyCheckValid:i,name:o,eventType:c,context:l={valid:!0,runRootValidation:!1}})=>{let u=y;if(t.validate&&!l.runRootValidation&&(l.runRootValidation=!0,!await L({name:o,eventType:c})&&(l.valid=!1,i)))return l.valid;for(let o in r){let d=r[o];if(d){let{_f:r,...f}=d;if(r){let o=s.array.has(r.name),c=d._f&&fz(d._f),f=g(`isValidating`,`validatingFields`);c&&f&&T([r.name],!0);let p=await FR(d,s.disabled,a,b,t.shouldUseNativeValidation&&!i,o);if(u!==y)return l.valid;if(c&&f&&T([r.name]),p[r.name]&&(l.valid=!1,i)||(i||(S(r.name),Q(p,r.name)?o?SR(n.errors,p,r.name):rR(n.errors,r.name,p[r.name]):BR(n.errors,r.name)),e.shouldUseNativeValidation&&p[r.name]))break}!CR(f)&&await R({context:l,onlyCheckValid:i,fields:f,name:o,eventType:c})}}return l.valid},ee=()=>{for(let e of s.unMount){let t=Q(r,e);t&&(t._f.refs?t._f.refs.every(e=>!XR(e)):!XR(t._f.ref))&&ve(e)}s.unMount=new Set},z=(e,t)=>(e&&t&&rR(a,e,t),!dR(o.mount?a:i,i)),te=(e,t,n)=>hR(e,s,{...o.mount?a:eR(t)||mR(e)?i:t},n,t),B=e=>LR(Q(o.mount?a:i,e,t.shouldUnregister?Q(i,e,[]):[])),ne=(e,t,n={},i=!1,o=!1,s=!1)=>{let c=Q(r,e),l=t;if(c){let n=c._f;n&&(!n.disabled&&rR(a,e,sz(t,n)),l=wR(n.ref)&&FL(t)?``:t,JR(n.ref)?[...n.ref.options].forEach(e=>e.selected=l.includes(e.value)):n.refs?ML(n.ref)?n.refs.forEach(e=>{(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(l)?!!l.find(t=>t===e.value):l===e.value||!!l)}):n.refs.forEach(e=>e.checked=e.value===l):NL(n.ref)?n.ref.value=``:(n.ref.value=l,!n.ref.type&&!o&&!s&&_.state.next({name:e,values:i?a:WL(a)})))}(n.shouldDirty||n.shouldTouch)&&N(e,c&&c._f&&!c._f.disabled&&(c._f.valueAsNumber||c._f.valueAsDate||c._f.setValueAs)?sz(t,c._f):l,n.shouldTouch,n.shouldDirty,!o),n.shouldValidate&&le(e,{delayError:n.delayError}),n.shouldValidate&&c&&c._f&&c._f.deps&&(!Array.isArray(c._f.deps)||c._f.deps.length>0)&&le(c._f.deps)},re=(e,t,n,i=!1,o=!1,c=!1)=>{s.array.has(e)&&_.array.next({name:e,values:i?a:WL(a)});for(let a in t){if(!t.hasOwnProperty(a))continue;let l=t[a],u=e+`.`+a,d=Q(r,u);(s.array.has(e)||LL(l)||d&&!d._f)&&!PL(l)?re(u,l,n,i,o,c):ne(u,l,n,i,o,c)}},ie=(e,t,i,c,l=!1)=>{let u=Q(r,e),d=s.array.has(e),f=c?t:WL(t),p=dR(Q(a,e),f);if(p||rR(a,e,f),d)_.array.next({name:e,values:c?a:WL(a)}),g(`isDirty`,`dirtyFields`)&&i.shouldDirty&&(E(),l||_.state.next({name:e,dirtyFields:n.dirtyFields,isDirty:z(e,f)})),i.shouldValidate&&le(e,{delayError:i.delayError});else{let t=Array.isArray(f)&&!f.length||CR(f),n=!p&&!l;!u||u._f||FL(f)||t?ne(e,f,i,c,l,n):re(e,f,i,c,l,n)}if(!p&&!l){let t=bR(e,s),r=c?a:WL(a);if(_.state.next({...t&&n,name:o.mount||t?e:void 0,values:r}),!d)for(let t of oz(s.array,e))_.state.next({name:t,values:r})}},ae=(e,t,n={})=>ie(e,t,n,!1),oe=(e,t={})=>{let r=nR(e)?e(a):e;if(!dR(a,r)){a={...a,...r};for(let e of s.mount)qR(r,e)&&ie(e,Q(r,e),t,!0,!0);_.state.next({...n,name:void 0,type:void 0,...u?{values:a}:{}}),t.shouldValidate&&w()}},se=async e=>{o.mount=!0;let i=e.target,l=i.name,p=!0,m=Q(r,l),h=e=>{p=Number.isNaN(e)||PL(e)&&isNaN(e.getTime())||dR(e,Q(a,l,e))};if(m){let o,v,x=i.type?cz(m._f):RL(e),S=e.type===GL.BLUR||e.type===GL.FOCUS_OUT,C=!pz(m._f)&&!t.validate&&!t.resolver&&!Q(n.errors,l)&&!m._f.deps,E=C||_z(S,Q(n.touchedFields,l),n.isSubmitted,f,d),D=bR(l,s,S);if(rR(a,l,WL(x)),S){if(!i||!i.readOnly){m._f.onBlur&&m._f.onBlur(e);let t=c[l];t&&t(0)}}else m._f.onChange&&m._f.onChange(e);let O=N(l,x,S),k=!CR(O)||D;if(!S&&_.state.next({name:l,type:e.type,...u?{values:WL(a)}:{}}),E)return(!C||!n.isValid)&&g(`isValid`)&&(t.mode===`onBlur`?S&&w():S||w()),k&&_.state.next({name:l,...D?{}:O});if(!t.resolver&&t.validate&&await L({name:l,eventType:e.type}),!S&&D&&_.state.next({...n}),t.resolver){let e=y,{errors:t}=await F([l]);if(e!==y)return;if(T([l]),h(x),!p){!CR(O)&&_.state.next(O);return}let i=mz(n.errors,r,l),a=mz(t,r,i.name||l);o=a.error,l=a.name,v=CR(t)}else{let n=y;if(T([l],!0),o=(await FR(m,s.disabled,a,b,t.shouldUseNativeValidation))[l],n!==y)return;if(T([l]),h(x),p){if(o)v=!1;else if(g(`isValid`)&&(v=await R({fields:r,onlyCheckValid:!0,name:l,eventType:e.type}),n!==y))return}}p&&(m._f.deps&&(!Array.isArray(m._f.deps)||m._f.deps.length>0)&&le(m._f.deps),P(l,v,o,O))}},ce=(e,t)=>{if(Q(n.errors,t)&&e.focus)return e.focus(),1},le=async(e,i={})=>{let a,o,l=IR(e);if(t.resolver){let t=y,n=await I(eR(e)?e:l);if(a=CR(n),o=e?!l.some(e=>Q(n,e)):a,t!==y)return o}else e?(o=(await Promise.all(l.map(async e=>{let t=Q(r,e);return await R({fields:t&&t._f?{[e]:t}:t,eventType:GL.TRIGGER})}))).every(Boolean),(o||n.isValid)&&w()):o=a=await R({fields:r,name:e,eventType:GL.TRIGGER});if(i.delayError&&t.delayError&&mR(e)){let r=Q(n.errors,e);r?(BR(n.errors,e),c[e]=x(e,()=>O(e,r)),c[e](t.delayError)):S(e)}if(i.shouldTouch)for(let t of e?l:s.mount)!s.array.has(t)&&rR(n.touchedFields,t,!0);return _.state.next({...!mR(e)||g(`isValid`)&&a!==n.isValid?{}:{name:e},...t.resolver||!e?{isValid:a}:{},...i.shouldTouch&&g(`touchedFields`)?{touchedFields:n.touchedFields}:{},errors:n.errors}),i.shouldFocus&&!o&&xR(r,ce,e?l:s.mount),o},ue=(e,t)=>{let r={...o.mount?a:i};return t&&(r=GR(t.dirtyFields?n.dirtyFields:n.touchedFields,r)),eR(e)?r:mR(e)?Q(r,e):e.map(e=>Q(r,e))},de=e=>eR(e)?{...n.errors}:mR(e)?Q(n.errors,e):e.map(e=>Q(n.errors,e)),fe=(e,t)=>{let r=t||n,i=Q(r.errors,e);return{invalid:!!i,isDirty:!!Q(r.dirtyFields,e),error:i,isValidating:!!Q(r.validatingFields,e),isTouched:!!Q(r.touchedFields,e)}},pe=e=>{let t=e?IR(e):void 0;t?t.forEach(e=>{C(e),BR(n.errors,e),_.state.next({name:e,errors:n.errors})}):(Object.keys(c).forEach(S),n.errors={},_.state.next({errors:n.errors}))},me=(e,t,i)=>{C(e);let a=(Q(r,e,{_f:{}})._f||{}).ref,{ref:o,message:s,type:c,types:l,...u}=Q(n.errors,e)||{};rR(n.errors,e,{...u,...t,ref:a}),_.state.next({name:e,errors:n.errors,isValid:!1}),i&&i.shouldFocus&&a&&a.focus&&a.focus()},he=(e,t)=>{if(nR(e)){u++;let{unsubscribe:n}=_.state.subscribe({next:n=>`values`in n&&e(n.values||te(void 0,t),n)}),r=!1;return{unsubscribe:()=>{r||(r=!0,u--,n())}}}return te(e,t,!0)},ge=e=>{let t=!!e.formState?.values;t&&u++;let{unsubscribe:r}=_.state.subscribe({next:t=>{if(gz(e.name,t.name,e.exact)&&hz(t,e.formState||m,Oe,e.reRenderRoot)){let r={...a};e.callback({values:r,...n,...t,defaultValues:i})}}});if(!t)return r;let o=!1;return()=>{o||(o=!0,u--,r())}},_e=e=>(o.mount=!0,h={...h,...e.formState},ge({...e,formState:{...p,...e.formState}})),ve=(e,o={})=>{for(let c of e?IR(e):s.mount)s.mount.delete(c),s.array.delete(c),s.disabled.delete(c),o.keepValue||(BR(r,c),BR(a,c)),o.keepError||(C(c),BR(n.errors,c)),!o.keepDirty&&BR(n.dirtyFields,c),!o.keepTouched&&BR(n.touchedFields,c),!o.keepIsValidating&&BR(n.validatingFields,c),!t.shouldUnregister&&!o.keepDefaultValue&&BR(i,c);u&&_.state.next({values:WL(a)}),_.state.next({...n,...o.keepDirty?{}:{isDirty:z()},...o.keepIsValidating?{}:{isValidating:!CR(n.validatingFields)}}),!o.keepIsValid&&w()},ye=({disabled:e,name:t})=>{if(tR(e)&&o.mount||e||s.disabled.has(t)){let n=s.disabled.has(t)!==!!e;e?s.disabled.add(t):s.disabled.delete(t),n&&o.mount&&!o.action&&w()}},be=(e,n={})=>{let a=Q(r,e),c=tR(n.disabled)||tR(t.disabled),l=!s.registerName.has(e)&&a&&a._f&&!a._f.mount;if(rR(r,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...n}}),s.mount.add(e),a&&a._f){let t=Q(r,e);for(let e of JL)e in n||delete t._f[e]}return a&&!l?ye({disabled:tR(n.disabled)?n.disabled:t.disabled,name:e}):M(e,!0,n.value),{...c?{disabled:n.disabled||t.disabled}:{},...t.progressive?{required:!!n.required,min:uz(n.min),max:uz(n.max),minLength:uz(n.minLength),maxLength:uz(n.maxLength),pattern:uz(n.pattern)}:{},name:e,onChange:se,onBlur:se,ref:c=>{if(c){s.registerName.add(e),be(e,n),s.registerName.delete(e),a=Q(r,e);let t=eR(c.value)&&c.querySelectorAll&&c.querySelectorAll(`input,select,textarea`)[0]||c,o=YR(t),l=a._f.refs||[];if(o?l.find(e=>e===t):t===a._f.ref)return;let u={...a._f};o?(u.refs=[...l.filter(XR),t,...Array.isArray(Q(i,e))?[{}]:[]],u.ref={type:t.type,name:e}):(u.ref=t,delete u.refs),rR(r,e,{_f:u}),M(e,!1,void 0,t)}else a=Q(r,e,{}),a._f&&(a._f.mount=!1),(t.shouldUnregister||n.shouldUnregister)&&!(HL(s.array,e)&&o.action)&&s.unMount.add(e)}}},xe=()=>t.shouldFocusError&&!t.shouldUseNativeValidation&&xR(r,ce,s.mount),Se=e=>{tR(e)&&(_.state.next({disabled:e}),xR(r,(t,n)=>{let i=Q(r,n);i&&(t.disabled=i._f.disabled||e,Array.isArray(i._f.refs)&&i._f.refs.forEach(t=>{t.disabled=i._f.disabled||e}))},0))},Ce=(e,i)=>async o=>{let l,u;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let d=WL(a);if(_.state.next({isSubmitting:!0}),t.resolver){let e=y,{errors:t,values:r}=await F();if(e!==y)return;T(),Object.keys(c).forEach(S),n.errors=t,d=WL(r)}else{let e=y;if(await R({fields:r,eventType:GL.SUBMIT}),e!==y)return;BR(n.errors,XL)}if(s.disabled.size)for(let e of s.disabled)BR(d,e);if(CR(n.errors)){_.state.next({errors:{}});try{l=await e(d,o)}catch(e){u=e}}else i&&await i({...n.errors},o),xe(),setTimeout(xe);if(_.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:CR(n.errors)&&!u,submitCount:n.submitCount+1,errors:n.errors}),u)throw u;return l},we=(e,t={})=>{Q(r,e)&&(BR(n.validatingFields,e),eR(t.defaultValue)?ae(e,WL(Q(i,e))):(ae(e,t.defaultValue),rR(i,e,WL(t.defaultValue))),t.keepTouched||BR(n.touchedFields,e),t.keepDirty||(BR(n.dirtyFields,e),n.isDirty=t.defaultValue?z(e,WL(Q(i,e))):z()),t.keepError||(C(e),BR(n.errors,e),w()),_.state.next({...n,isValidating:!CR(n.validatingFields)}))},Te=(e,l={})=>{y++;let u=e?WL(e):i,d=WL(u),f=CR(e),p=d,h=r;if(Object.keys(c).forEach(S),l.keepDefaultValues||(i=u),!l.keepValues){if(l.keepDirtyValues){let e=new Set([...s.mount,...QR(az(i,a,void 0,h),n.dirtyFields)]);for(let t of e){let e=Q(n.dirtyFields,t),r=Q(a,t),i=Q(p,t);e&&!eR(r)?rR(p,t,r):!e&&!eR(i)&&ae(t,i)}}else{if(UL&&eR(e))for(let e of s.mount){let t=Q(r,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(wR(e)){let t=e.closest(`form`);if(t){t.reset();break}}}}if(l.keepFieldsRef)for(let e of s.mount)ae(e,Q(p,e));else r={}}if(t.shouldUnregister){if(a=l.keepDefaultValues?WL(i):{},l.keepFieldsRef)for(let e of s.mount)rR(a,e,Q(p,e))}else a=WL(p);_.array.next({values:{...p}}),_.state.next({name:void 0,type:void 0,values:{...p}})}s={mount:l.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,registerName:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:``},o.mount=!m.isValid||!!l.keepIsValid||!!l.keepDirtyValues||!t.shouldUnregister&&!CR(p),o.watch=!!t.shouldUnregister,o.keepIsValid=!!l.keepIsValid,o.action=!1,o.actionArrayLengths.clear(),l.keepErrors||(n.errors={}),_.state.next({submitCount:l.keepSubmitCount?n.submitCount:0,isDirty:f?!1:l.keepDirty?n.isDirty:l.keepValues?z():!(!l.keepDefaultValues||dR(e,i)),isSubmitted:l.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:f?{}:l.keepDirtyValues?l.keepDefaultValues&&a?az(i,a,void 0,h):n.dirtyFields:l.keepDefaultValues&&e?az(i,e,void 0,h):l.keepDirty?n.dirtyFields:l.keepValues?az(i,a,void 0,h):{},touchedFields:l.keepTouched?n.touchedFields:{},...!l.keepIsValidating&&(n.isValidating||!CR(n.validatingFields))?{validatingFields:{},isValidating:!1}:null,errors:l.keepErrors?n.errors:{},isSubmitSuccessful:l.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1,defaultValues:i})},Ee=(e,n)=>Te(nR(e)?e(a):e,{...t.resetOptions,...n}),De=(e,t={})=>{let n=Q(r,e),i=n&&n._f;if(i){let e=i.refs?i.refs[0]:i.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&nR(e.select)&&e.select()})}},Oe=e=>{let{name:t,type:r,values:i,...a}=e;n={...n,...a}};_.state.subscribe({next:Oe});let ke={control:{register:be,unregister:ve,getFieldState:fe,handleSubmit:Ce,setError:me,_subscribe:ge,_runSchema:F,_updateIsValidating:T,_focusError:xe,_getWatch:te,_getDirty:z,_setValid:w,_setFieldArray:D,_setDisabledField:ye,_setErrors:k,_getFieldArray:B,_reset:Te,_resetDefaultValues:()=>nR(t.defaultValues)&&t.defaultValues().then(e=>{Ee(e,t.resetOptions),_.state.next({isLoading:!1})}),_removeUnmounted:ee,_disableForm:Se,_subjects:_,_proxyFormState:m,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(e){o=e},get _defaultValues(){return i},get _names(){return s},set _names(e){s=e},get _formState(){return n},get _options(){return t},set _options(e){t={...t,...e},d=yR(t.mode),f=yR(t.reValidateMode),b=t.criteriaMode===KL.all}},subscribe:_e,trigger:le,register:be,handleSubmit:Ce,watch:he,setValue:ae,setValues:oe,getValues:ue,getErrors:de,reset:Ee,resetField:we,resetDefaultValues:(e,t={})=>{if(i=WL(e),!t.keepDirty){let e=az(i,a,void 0,r);n.dirtyFields=e,n.isDirty=!CR(e)}t.keepIsValid||w(),_.state.next({...n,defaultValues:i})},clearErrors:pe,unregister:ve,setError:me,setFocus:De,getFieldState:fe};return{...ke,formControl:ke}}function Cz(e={}){let t=_.useRef(void 0),n=_.useRef(void 0),r=_.useRef(e.formControl),i=_.useRef(!!e.validate),[a,o]=_.useState(()=>({...WL(xz),isLoading:nR(e.defaultValues),errors:e.errors||{},disabled:e.disabled||!1,defaultValues:nR(e.defaultValues)?void 0:e.defaultValues}));if(!t.current||e.formControl&&r.current!==e.formControl){if(r.current=e.formControl,e.formControl)t.current={...e.formControl,formState:a},e.defaultValues&&!nR(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:n,...r}=Sz(e);t.current={...r,formState:a}}}let s=t.current.control;s._options={...e,validate:e.validate};let c=()=>({...s._formState,defaultValues:s._defaultValues}),{resyncIfNeeded:l,snapshot:u}=fR(c);return sR(()=>{l(!0,c,o);let e=s._subscribe({formState:s._proxyFormState,callback:()=>o({...s._formState,defaultValues:s._defaultValues}),reRenderRoot:!0});return o(e=>({...e,isReady:!0})),s._formState.isReady=!0,()=>{e(),u(!0,c)}},[s,l,u]),_.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),_.useEffect(()=>{e.mode&&(s._options.mode=e.mode),e.reValidateMode&&(s._options.reValidateMode=e.reValidateMode)},[s,e.mode,e.reValidateMode]),_.useEffect(()=>{e.errors&&(s._setErrors(e.errors),s._focusError())},[s,e.errors]),_.useEffect(()=>{var n;i.current&&!e.validate&&((n=t.current)==null||n.clearErrors(YL)),i.current=!!e.validate},[e.validate]),_.useEffect(()=>{e.shouldUnregister&&s._subjects.state.next({values:s._getWatch()})},[s,e.shouldUnregister]),_.useEffect(()=>{if(s._proxyFormState.isDirty){let e=s._getDirty();e!==a.isDirty&&s._subjects.state.next({isDirty:e})}},[s,a.isDirty]),_.useEffect(()=>{e.values&&!dR(e.values,n.current)?(s._reset(e.values,{keepFieldsRef:!0,...s._options.resetOptions}),s._options.resetOptions?.keepIsValid||s._setValid(),n.current=e.values,o(e=>({...e}))):s._resetDefaultValues()},[s,e.values]),_.useEffect(()=>{s._state.mount||(s._setValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),t.current.formState=_.useMemo(()=>oR(a,s),[s,a]),t.current}D();var wz=C({}),Tz=({...e})=>L(wz,{value:n(()=>({name:e.name}),[e.name]),children:L(vR,{...e})}),Ez=()=>{let e=l(wz),t=l(jL),{getFieldState:n,formState:r}=HR(),i=n(e.name,r);if(!e)throw Error(`useFormField should be used within <FormField>`);let{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},Dz=e=>{let{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=Ez();return L(Rc,{id:n,"aria-describedby":t?`${r} ${i}`:`${r}`,"aria-invalid":!!t,...e})},Oz=e=>{let{formDescriptionId:t}=Ez();return L(`p`,{className:`text-neutral text-sm`,id:t,...e})},kz=({children:e,...t})=>{let{error:n,formMessageId:r}=Ez(),i=n?String(n?.message??``):e;return i?L(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:r,...t,children:i}):null},Az=({className:e,children:t,...n})=>L(`i`,{className:W(`text-neutral-400 text-xs`,e),...n,children:[`ⓘ `,t]}),jz=({className:e,...t})=>{let{error:n,formItemId:r}=Ez();return L(JO,{className:W(`mb-2`,n&&`text-error`,e),htmlFor:r,...t})},Mz=({isRequired:e})=>e?L(`span`,{"aria-label":`Asterisk meaning the field is required`,children:`*`}):L(d,{}),Nz=({children:e,isRequired:t,info:n,htmlFor:r,className:i})=>L(`div`,{className:`ms-1 flex gap-1 align-middle text-base leading-none`,children:[e&&L(jz,{htmlFor:r,id:`${r}-label`,suppressHydrationWarning:!0,className:W(`font-bold`,i),children:[e,L(Mz,{isRequired:t})]}),n&&L(Az,{content:n})]}),Pz=({label:e,description:t,isRequired:n,info:r,children:i,showErrorMessage:a=!0,htmlFor:o,className:s})=>L(AL,{className:W(`flex w-full flex-col flex-wrap gap-2 px-1 py-2`,s),children:[(t||e)&&L(`div`,{className:`flex max-w-full flex-col gap-1 p-1 leading-none`,children:[e&&L(Nz,{isRequired:n,info:r,htmlFor:o,children:e}),t&&L(Oz,{children:t})]}),L(Dz,{children:i}),a&&L(kz,{"data-testid":`error-message`})]}),Fz=e=>e?{toolparamdescription:e}:{},Iz=({field:e,name:t,label:n,Element:r,isRequired:i=!1,info:a,description:o,showErrorMessage:s=!0,layoutClassName:c,toolParamDescription:l,...u})=>{let{error:d}=Ez(),{value:f,onChange:p,...m}=e??{},h=u,g=h.value===void 0?f??``:h.value,_=(...e)=>{typeof p==`function`&&p(...e),typeof h.onChange==`function`&&h.onChange(...e)};return L(Pz,{htmlFor:t,label:n,description:o,isRequired:i,info:a,showErrorMessage:s,"aria-invalid":!!d,className:c,children:L(r,{"data-testid":`element`,id:t,...m,...u,...Fz(l),value:g,onChange:_,children:u.children})})},Lz=e=>{let{control:t}=HR();return L(Tz,{control:t,name:e.name,render:({field:t})=>L(Iz,{...e,field:t})})},Rz=e=>L(Lz,{id:e.name,"data-testid":e.name,Element:iO,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),zz=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c})=>{let{error:l}=Ez();return L(Pz,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!l,children:L(kL,{onValueChange:e.onChange,values:e.value,...c,children:s})})},Bz=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>{let{control:c}=HR();return L(Tz,{control:c,name:e,render:({field:c})=>L(zz,{field:c,name:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,...s,children:o})})},Vz=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c})=>{let{error:l}=Ez();return L(Pz,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!l,children:L(Z,{onValueChange:e.onChange,defaultValue:e.value,...c,children:s})})},Hz=({name:e,description:t,label:n,isRequired:r,info:i,showErrorMessage:a,children:o,...s})=>{let{control:c}=HR();return L(Tz,{control:c,name:e,render:({field:c})=>L(Vz,{field:c,name:e,label:n,description:t,isRequired:r,info:i,showErrorMessage:a,...s,children:o})})},Uz=(e,t,n)=>{if(e&&`reportValidity`in e){let r=Q(n,t);e.setCustomValidity(r&&r.message||``),e.reportValidity()}},Wz=(e,t)=>{for(let n in t.fields){let r=t.fields[n];r&&r.ref&&`reportValidity`in r.ref?Uz(r.ref,n,e):r&&r.refs&&r.refs.forEach(t=>Uz(t,n,e))}},Gz=(e,t)=>{t.shouldUseNativeValidation&&Wz(e,t);let n={};for(let r in e){let i=Q(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.refs?i.refs[0]:i&&i.ref});if(Kz(t.names||Object.keys(e),r)){let e=Object.assign({},Q(n,r));rR(e,`root`,a),rR(n,r,e)}else rR(n,r,a)}return n},Kz=(e,t)=>{let n=qz(t).replace(/[.*+?^${}()|\\]/g,`\\$&`);return e.some(e=>qz(e).match(`^${n}\\.\\d+`))};function qz(e){return e.replace(/\[(\d+)]/g,`.$1`).replace(/[[\]]/g,``)}function Jz(){return Jz=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jz.apply(null,arguments)}function Yz(e,t){try{var n=e()}catch(e){return t(e)}return n&&n.then?n.then(void 0,t):n}function Xz(e,t){for(var n=Object.create(null);e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o]){if(`unionErrors`in r){var s=r.unionErrors.reduce(function(e,t){return t.errors.length<e.errors.length?t:e}).errors[0];n[o]={message:s?.message??a,type:s?.code??i}}else n[o]={message:a,type:i}}if(`unionErrors`in r&&r.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=DR(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n}function Zz(e,t){for(var n=Object.create(null),r=function(){var r=e[0],i=r.code,a=r.message,o=r.path.join(`.`);if(!n[o]){if(r.code===`invalid_union`&&r.errors.length>0){var s=r.errors.reduce(function(e,t){return t.length<e.length?t:e})[0];n[o]={message:s?.message??a,type:s?.code??i}}else n[o]={message:a,type:i}}if(r.code===`invalid_union`&&r.errors.forEach(function(t){return t.forEach(function(t){return e.push(Jz({},t,{path:[].concat(r.path,t.path)}))})}),t){var c=n[o].types,l=c&&c[r.code];n[o]=DR(o,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()};e.length;)r();return n}function Qz(e,t,n){if(n===void 0&&(n={}),function(e){return`_zod`in e&&typeof e._zod==`object`}(e))return function(r,i,a){try{return Promise.resolve(Yz(function(){function i(e){return a.shouldUseNativeValidation&&Wz({},a),{errors:{},values:n.raw?Object.assign({},r):e}}var o=e;return n.mode===`sync`?i(o.parse(r,t)):Promise.resolve(o.parseAsync(r,t)).then(i)},function(e){if(function(e){var t;return!(e==null||(t=e._zod)==null||(t=t.traits)==null||!t.has(`$ZodError`))}(e))return{values:{},errors:Gz(Zz(e.issues,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};if(function(e){return`_def`in e&&typeof e._def==`object`}(e))return function(r,i,a){try{return Promise.resolve(Yz(function(){return Promise.resolve(e[n.mode===`sync`?`parse`:`parseAsync`](r,t)).then(function(e){return a.shouldUseNativeValidation&&Wz({},a),{errors:{},values:n.raw?Object.assign({},r):e}})},function(e){if(function(e){return Array.isArray(e?.issues)}(e))return{values:{},errors:Gz(Xz(e.errors,!a.shouldUseNativeValidation&&a.criteriaMode===`all`),a)};throw e}))}catch(e){return Promise.reject(e)}};throw Error(`Invalid input: not a Zod schema`)}var $z=({toolName:e,toolDescription:t,toolAutoSubmit:n})=>e?{toolname:e,tooldescription:t,toolautosubmit:n?``:void 0}:{},eB=async e=>e&&typeof e.then==`function`?await e:e,tB=({schema:e,onSubmit:t,onSubmitSuccess:n,onSubmitError:r,className:i,children:a,autoComplete:o,method:s,toolName:c,toolDescription:l,toolAutoSubmit:u,...d})=>{let f=async i=>{let a=e?.safeParse(i)??{success:!0,data:void 0};await eB(t?.(i)),a.success?await eB(n?.(a.data)):await eB(r?.(Error(a.error.issues.map(e=>e.message).join(`, `))))},p=e=>{if(e.key!==`Enter`)return;let t=e.target;if(t.tagName!==`INPUT`)return;e.preventDefault();let n=e.currentTarget,r=Array.from(n.querySelectorAll(`input:not([disabled]):not([type="hidden"]), textarea:not([disabled])`)),i=r.indexOf(t);i>=0&&i<r.length-1&&r[i+1]?.focus()};return L(UR,{...d,children:L(`form`,{className:W(`flex flex-col gap-y-6`,i),onSubmit:d.handleSubmit(f),onKeyDown:p,autoComplete:o?`on`:`off`,noValidate:!0,method:s,...$z({toolName:c,toolDescription:l,toolAutoSubmit:u}),children:a})})},nB=(e,t)=>{let n=Cz({resolver:Qz(e),...t}),{isSubmitting:r,isSubmitted:i,isLoading:a,isValid:o}=pR({control:n.control});return{form:n,isSubmitting:r,isSubmitted:i,isLoading:a,isValid:o}},rB=tB;function iB(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function aB(e,t){return typeof t==`bigint`?t.toString():t}var oB=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function sB(e){return new oB(e)}function cB(e){return e==null}function lB(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function uB(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}var dB=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function fB(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function pB(e){if(fB(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return fB(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function mB(e){return pB(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var hB=new Set([`string`,`number`,`symbol`]);function gB(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function _B(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function vB(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function yB(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function bB(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function xB(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function SB(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function CB(e){return typeof e==`string`?e:e?.message}function wB(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function TB(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:CB(e.inst?._zod.def?.error?.(e))??CB(a?.(e))??CB(t?.error?.(e))??CB(n.customError?.(e))??CB(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var EB=/[\uD800-\uDBFF]/;function DB(e){let t=e.length;if(!EB.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function OB(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function kB(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function AB(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):NB(e,n,r.value)}}function jB(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function MB(e,t,n){return jB(e,t,n,!1)}function NB(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:jB(this,t,n.bind(this))},set(e){jB(this,t,e)}})}function PB(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var FB,IB=!1,LB={configurable:!0,get(){IB=!0}};function RB(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&FB!==e._zod){FB=void 0;return}FB=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,LB);let e=IB;IB=!1;try{let r=n(this);return IB?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),IB||=e,r}catch(n){throw delete this[t],IB||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function zB(e,t,n,r){let i=PB(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var BB,VB={value:void 0,enumerable:!1},HB=`captureStackTrace`in Error?Error:null;function UB(e){let t=HB;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return HB=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function WB(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){VB.value=new a(r);try{Object.defineProperty(n,"_zod",VB)}finally{VB.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),AB(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?UB(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var GB=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}};(BB=globalThis).__zod_globalConfig??(BB.__zod_globalConfig={});var KB=globalThis.__zod_globalConfig;function qB(e){return e&&Object.assign(KB,e),KB}function JB(){let e=this._zod;return e.message??=JSON.stringify(e.def,aB,2),e.message}function YB(e){this._zod.message=e}var XB={get:JB,set:YB,enumerable:!0,configurable:!0},ZB={value:void 0,enumerable:!1},QB=new WeakSet([Object.prototype,Error.prototype]),$B=(e,t)=>{e.name=`$ZodError`,ZB.value=t,Object.defineProperty(e,"issues",ZB),ZB.value=void 0,Object.defineProperty(e,"message",XB);let n=Object.getPrototypeOf(e);QB.has(n)||(QB.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))};WB(`$ZodError`,$B);var eV=WB(`$ZodError`,$B,void 0,{Parent:Error}),tV=(e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new GB;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>TB(e,o,qB())));throw dB(n,a?.callee??t),n}return s.value};return t})(eV),nV=(e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>TB(e,o,qB())));throw dB(n,a?.callee??t),n}return s.value};return t})(eV),rV=(e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new GB;return a.issues.length?iV(e,a.issues,i):{success:!0,data:a.value}})(eV);function iV(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>TB(e,n,qB()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var aV=(e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?iV(e,a.issues,i):{success:!0,data:a.value}})(eV),oV=/^[\s\S]{0,}$/,sV=WB(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),cV=e=>{let t=e.value;return!cB(t)&&t.length!==void 0},lV=WB(`$ZodCheckMinLength`,(e,t)=>{var n;sV.init(e,t),(n=e._zod.def).when??(n.when=cV),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?DB(r):i)>=t.minimum)return;let a=OB(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),uV=WB(`$ZodCheckStringFormat`,(e,t)=>{var n,r;sV.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),dV=WB(`$ZodCheckRegex`,(e,t)=>{uV.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),fV={major:4,minor:6,patch:5},pV=WB(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=fV;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=bB(t),a;for(let o of n){if(o._zod.def.when){if(xB(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new GB;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(wB(t.issues,n,e),i||=bB(t,n))});else{if(t.issues.length===n)continue;wB(t.issues,n,e),i||=bB(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(bB(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new GB;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new GB;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return MB(this,`~standard`,gV(this))},set"~standard"(e){jB(this,`~standard`,e)}}),mV=(e,t)=>e.issues.length?{issues:e.issues.map(e=>TB(e,t,qB()))}:{value:e.value};async function hV(e,t){let n={async:!0};return mV(await e._zod.run({value:t,issues:[]},n),n)}function gV(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return mV(r,n)}catch{}return hV(e,t)},vendor:`zod`,version:1}}var _V=WB(`$ZodString`,(e,t)=>{pV.init(e,t),e._zod.pattern=t.pattern??oV,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}});function vV(e,t,n){e.issues.length&&t.issues.push(...SB(n,e.issues)),t.value[n]=e.value}var yV=WB(`$ZodArray`,(e,t)=>{pV.init(e,t);let n=KB.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>vV(t,r,e)));else if(vV(c,r,e),s&&c.issues.length!==0&&bB(c))break}return o.length?Promise.all(o).then(()=>r):r}});function bV(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...SB(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var xV=[];function SV(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:xV,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=yB(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function CV(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(bB(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>bV(e,n,i,t,d,f))):bV(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var wV=WB(`$ZodObject`,(e,t)=>{pV.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=sB(()=>SV(t));RB(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||uB(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=fB,o=t.catchall,s,c=KB.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(bB(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>bV(n,t,e,r,a,o))):bV(s,t,e,r,a,o)}return o?CV(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),TV=WB(`$ZodEnum`,(e,t)=>{pV.init(e,t);let n=iB(t.entries),r=new Set(n);e._zod.values=r,RB(e,`pattern`,e=>{let t=iB(e.def.entries).filter(e=>hB.has(typeof e));return RegExp(t.length?`^(${t.map(e=>gB(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}});function EV(e,t){return e.value=t.issues.length?void 0:t.value,e}var DV=WB(`$ZodOptional`,(e,t)=>{pV.init(e,t),RB(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,RB(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),RB(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${lB(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>EV(e,t)):EV(e,r)}return t.innerType._zod.run(e,n)}}),OV=WB(`$ZodDefault`,(e,t)=>{pV.init(e,t),e._zod.optin=`defaulted`,RB(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>kV(e,t)):kV(r,t)}});function kV(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var AV=WB(`$ZodCustom`,(e,t)=>{sV.init(e,t),pV.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>jV(t,n,r,e));jV(i,n,r,e)}});function jV(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(kB(e))}}function MV(e){return e.checks&&=[...e.checks],e}function NV(e,t){return new e(MV({type:`string`,...vB(t)}))}function PV(e,t){return new lV({check:`min_length`,...vB(t),minimum:e})}function FV(e,t){return new dV({check:`string_format`,format:`regex`,...vB(t),pattern:e})}function IV(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...vB(n)})}var LV=WB(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);pV.init(e,t),e.def=t,e.type=t.type},{get with(){return this.check},set with(e){jB(this,`with`,e)},parse(e,t){return tV(this,e,t,{callee:this.parse})},parseAsync(e,t){return nV(this,e,t,{callee:this.parseAsync})},safeParse(e,t){return rV(this,e,t)},safeParseAsync(e,t){return aV(this,e,t)},check(...e){let t=this.def;return this.clone({...t,checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0})},clone(e,t){return _B(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},apply(e,...t){return t.length===0?e(this):e(this,...t)}}),RV=WB(`ZodMiniString`,(e,t)=>{_V.init(e,t),LV.init(e,t)});function zV(e){return NV(RV,e)}var BV=WB(`ZodMiniArray`,(e,t)=>{yV.init(e,t),LV.init(e,t)});function VV(e,t){return new BV({type:`array`,element:e,...vB(t)})}var HV=WB(`ZodMiniObject`,(e,t)=>{wV.init(e,t),LV.init(e,t),zB(e,`shape`,e=>e._zod.def.shape,!1)});function UV(e,t){return new HV({type:`object`,shape:e??{},...vB(t)})}var WV=WB(`ZodMiniEnum`,(e,t)=>{TV.init(e,t),LV.init(e,t),e.options=[...e._zod.values]});function GV(e,t){return new WV({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...vB(t)})}var KV=WB(`ZodMiniOptional`,(e,t)=>{DV.init(e,t),LV.init(e,t)});function qV(e){return new KV({type:`optional`,innerType:e})}var JV=WB(`ZodMiniDefault`,(e,t)=>{OV.init(e,t),LV.init(e,t)});function YV(e,t){return new JV({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():mB(t)}})}var XV=WB(`ZodMiniCustom`,(e,t)=>{AV.init(e,t),LV.init(e,t)});function ZV(e,t={}){return IV(XV,e,t)}var QV=e=>e===void 0?``:typeof e==`string`?e:JSON.stringify(e),$V=e=>{let t=e.trim();if(!t.startsWith(`{`)&&!t.startsWith(`[`))return{variant:e,error:!1};try{return{variant:JSON.parse(t),error:!1}}catch{return{variant:e,error:!0}}},eH={key:`breadcrumb`,content:{nodeType:`translation`,translation:{en:{linkLabel:`Go to`},"en-GB":{linkLabel:`Go to`},fr:{linkLabel:`Aller à`},es:{linkLabel:`Ir a`},de:{linkLabel:`Gehe zu`},ja:{linkLabel:`に移動`},ko:{linkLabel:`로 이동`},zh:{linkLabel:`转到`},it:{linkLabel:`Vai a`},pt:{linkLabel:`Ir para`},hi:{linkLabel:`कर जाएं`},ar:{linkLabel:`اذهب إلى`},ru:{linkLabel:`Перейти на`}}},title:`Breadcrumb navigation`,description:`Content declaration for the breadcrumb component's navigation label, used to guide users through hierarchical structures within the interface.`,tags:[`navigation`,`breadcrumb`],location:`local`,localId:`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`};D();var tH=gc(`rtl-mirror-icons gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:underline hover:underline-offset-6 hover:opacity-80`,"invisible-link":`h-auto justify-start border-inherit bg-current/0`,button:`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current px-6 text-center font-medium text-sm text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,"button-outlined":`relative inline-flex min-h-8 cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current! px-6 text-center font-medium text-sm text-text ring-0 *:text-text hover:bg-current/30! hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5 max-md:py-2`,hoverable:`block rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/5 aria-[current]:bg-current/3`},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,full:`rounded-full`},color:{neutral:`text-neutral`,text:`text-text`,error:`text-error`,success:`text-success`,"text-inverse":`text-text-opposite`,custom:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 text-xs max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 text-sm max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 text-lg max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 text-xl max-md:py-4`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`custom`}}),nH=({href:e,isExternalLink:t},n)=>{if(typeof t==`boolean`)return t;if(typeof e!=`string`||e.trim()===``||!/^https?:\/\//.test(e))return!1;if(n)try{let t=new URL(e).hostname,r=new URL(n.startsWith(`http`)?n:`https://${n}`).hostname,i=e=>e.split(`.`).slice(-2).join(`.`);return i(t)!==i(r)}catch{return!0}return!0},rH=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(rH):x(e)?rH(e.props.children):!1,iH=e=>{let{variant:t=`default`,color:n=`custom`,roundedSize:r,children:i,label:a,className:o,isActive:s,underlined:c,locale:l,size:u,isExternalLink:d,isPageSection:f,href:p,rel:m,target:h,...g}=e,_=t===`button`||t===`button-outlined`,v=u??(_?`md`:`custom`),y=d??nH(e),b=f??p?.startsWith(`#`)??!1,x=rH(i),S=y?`noopener noreferrer nofollow`:m,C=y?`_blank`:h??`_self`,w=l&&p&&!y&&!b?Ai(p,l):p,T=w===``?void 0:w;return L(`a`,{...g,href:T,"aria-label":a,rel:S,target:C,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(tH({variant:t,color:n,roundedSize:r,underlined:c,size:v,className:o})),children:[_&&x?L(`span`,{children:i}):i,y&&x&&L(js,{className:`ms-2 inline-block size-4`}),b&&L(zs,{className:`ms-2 inline-block size-4`})]})};D();var aH=e=>e&&{neutral:`text-neutral`,text:`text-muted-foreground`,"text-inverse":`text-foreground-opposite`,error:`text-error`,success:`text-success`,custom:``}[e]||``,oH=gc(`flex flex-row flex-wrap items-center`,{variants:{size:{xs:`gap-1 text-xs`,sm:`gap-1.5 text-sm`,md:`gap-2 text-base`,lg:`gap-3 text-lg`,xl:`gap-4 text-xl`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`md`,spacing:`normal`}}),sH=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let{linkLabel:l}=qi(eH,o);return L(d,{children:[L(iH,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l.value} ${n}`,itemID:e,size:`custom`,children:L(`span`,{itemProp:`name`,children:n})}),L(`meta`,{itemProp:`position`,content:a.toString()})]})},cH=({children:e,onClick:t,color:n,position:r,className:i,...a})=>{let{linkLabel:o}=qi(eH);return L(d,{children:[L(Y,{onClick:t,variant:`link`,label:`${o} ${e}`,color:n,itemProp:`item`,size:`custom`,...a,children:L(`span`,{itemProp:`name`,children:e})}),L(`meta`,{itemProp:`position`,content:r.toString()})]})},lH=({children:e,position:t,className:n,...r})=>L(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-muted-foreground`,`transition-colors duration-200`,n),children:[L(`span`,{itemProp:`name`,...r,children:e}),L(`meta`,{itemProp:`position`,content:t.toString()})]}),uH=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:o=L(_s,{size:10}),ariaLabel:s=`breadcrumb`,includeStructuredData:c=!0,maxItems:l,size:u,spacing:f,...p})=>{let m=l&&e.length>l?[...e.slice(0,1),`...`,...e.slice(-(l-2))]:e;return L(`nav`,{"aria-label":s,className:`rtl-mirror-icons`,children:L(`ol`,{className:W(oH({size:u,spacing:f}),t),...c&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...p,children:m.map((e,t)=>{let s=t===m.length-1,l=typeof e==`object`&&typeof e.href==`string`,u=typeof e==`object`&&typeof e.onClick==`function`,f=t===m.length-1,p=f?i:void 0,h=e===`...`,g=typeof e==`string`?e:e.text,_=aH(n);if(h)return L(d,{children:[L(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:L(`span`,{className:`text-neutral-500`,children:`…`})}),!s&&L(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:L(`span`,{className:W(_),children:o})})]},`truncated-${g}`);let v=L(lH,{position:t+1,"aria-current":p,className:W(`transition-colors duration-200`,f&&`text-foreground`),children:g},g);l?v=L(sH,{href:e.href,color:n,position:t+1,locale:r,"aria-current":p,className:W(f&&`cursor-default text-foreground`),children:g},g):u&&(v=L(cH,{onClick:e.onClick,color:n,position:t+1,"aria-current":p,className:W(f&&`cursor-default text-neutral-900`),children:g},g));let y=a(`li`,{...c&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:g,className:`flex items-center`},v);return s?y:L(d,{children:[y,L(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:L(`span`,{className:W(_),children:o})})]},g)})})})},dH=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>L(uH,{links:[...a?[{text:Si(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:Si(t.key?.toString()??``)}))],locale:r,elementType:`location`,color:i}),fH={key:`content-editor`,content:{nodeType:`translation`,translation:{en:{itemPagination:{label:`Item`},variantSwitcher:{label:`Variant`},metaSwitcher:{label:`Meta`}},"en-GB":{itemPagination:{label:`Item`},variantSwitcher:{label:`Variant`},metaSwitcher:{label:`Meta`}},fr:{itemPagination:{label:`Élément`},variantSwitcher:{label:`Variante`},metaSwitcher:{label:`Méta`}},es:{itemPagination:{label:`Elemento`},variantSwitcher:{label:`Variante`},metaSwitcher:{label:`Meta`}},de:{itemPagination:{label:`Element`},variantSwitcher:{label:`Variante`},metaSwitcher:{label:`Meta`}},ja:{itemPagination:{label:`項目`},variantSwitcher:{label:`バリアント`},metaSwitcher:{label:`メタ`}},ko:{itemPagination:{label:`항목`},variantSwitcher:{label:`변형`},metaSwitcher:{label:`메타`}},zh:{itemPagination:{label:`项目`},variantSwitcher:{label:`变体`},metaSwitcher:{label:`元`}},it:{itemPagination:{label:`Elemento`},variantSwitcher:{label:`Variante`},metaSwitcher:{label:`Meta`}},pt:{itemPagination:{label:`Item`},variantSwitcher:{label:`Variante`},metaSwitcher:{label:`Meta`}},hi:{itemPagination:{label:`आइटम`},variantSwitcher:{label:`वेरिएंट`},metaSwitcher:{label:`मेटा`}},ar:{itemPagination:{label:`عنصر`},variantSwitcher:{label:`نوع`},metaSwitcher:{label:`بيانات وصفية`}},ru:{itemPagination:{label:`Элемент`},variantSwitcher:{label:`Вариант`},metaSwitcher:{label:`Мета`}}}},title:`Content editor`,description:`Labels and controls for the dictionary content editor, including item pagination, variant switcher, and meta switcher used to navigate between sibling dictionaries sharing the same key.`,tags:[`content editor`,`dictionary`,`navigation`],location:`local`,localId:`content-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/contentEditor.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/contentEditor.content.mjs`},pH={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`},seeAllLocalesSwitch:{true:`Voir toutes les langues`,false:`Voir seulement les langues sélectionnées`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`},seeAllLocalesSwitch:{true:`Ver todos los idiomas`,false:`Ver solo los idiomas seleccionados`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`},seeAllLocalesSwitch:{true:`Alle Sprachen anzeigen`,false:`Nur ausgewählte Sprachen anzeigen`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`},seeAllLocalesSwitch:{true:`Vedi tutte le lingue`,false:`Vedi solo le lingue selezionate`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`},seeAllLocalesSwitch:{true:`Ver todos os idiomas`,false:`Ver apenas os idiomas selecionados`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`}}}},title:`Locale switcher content`,description:`Content strings for the locale switcher component, including labels, placeholders, and toggle options for displaying available locales.`,tags:[`component`,`locale switcher`,`i18n`],location:`local`,localId:`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`},mH=({children:e,className:t,identifier:n,...r})=>L(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});mH.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>L(Y,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),mH.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,smootherClassName:c,...l})=>L(`div`,{className:W(`absolute z-100 min-w-full`,i===`start`&&`inset-s-0`,i===`end`&&`inset-e-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:L(FD,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`,c),...l,children:e})});function hH(e){return Array.isArray?Array.isArray(e):TH(e)===`[object Array]`}function gH(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function _H(e){return e==null?``:gH(e)}function vH(e){return typeof e==`string`}function yH(e){return typeof e==`number`}function bH(e){return e===!0||e===!1||SH(e)&&TH(e)==`[object Boolean]`}function xH(e){return typeof e==`object`}function SH(e){return xH(e)&&e!==null}function CH(e){return e!=null}function wH(e){return!e.trim().length}function TH(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var EH=`Incorrect 'index' type`,DH=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,OH=e=>`Invalid value for key ${e}`,kH=e=>`Pattern length exceeds max of ${e}.`,AH=e=>`Missing ${e} property in key`,jH=e=>`Property 'weight' in key '${e}' must be a positive integer`,MH=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,NH=Object.prototype.hasOwnProperty,PH=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=FH(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function FH(e){let t=null,n=null,r=null,i=1,a=null;if(vH(e)||hH(e))r=e,t=IH(e),n=LH(e);else{if(!NH.call(e,`name`))throw Error(AH(`name`));let o=e.name;if(r=o,NH.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(jH(LH(o)));t=IH(o),n=LH(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function IH(e){return hH(e)?e:e.split(`.`)}function LH(e){return hH(e)?e.join(`.`):e}function RH(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(CH(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!CH(s))return;if(a===t.length-1&&(vH(s)||yH(s)||bH(s)||typeof s==`bigint`))n.push(o===void 0?_H(s):{v:_H(s),i:o});else if(hH(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}}};return i(e,vH(t)?t.split(`.`):t,0),r?n:n[0]}var zH={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},BH={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},VH={location:0,threshold:.6,distance:100},HH={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:RH,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},$=Object.freeze({...BH,...zH,...VH,...HH});function UH(e){return e>=9&&e<=13||e===32||e===160}function WH(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e<t.length;e++)UH(t.charCodeAt(e))?a=!1:a||=(i++,!0);if(i===0&&(i=1),n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var GH=class{constructor({getFn:e=$.getFn,fieldNormWeight:t=$.fieldNormWeight}={}){this.norm=WH(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(vH(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(DH);if(vH(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(DH);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!CH(e)||wH(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(CH(i)){if(hH(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(CH(n)){if(vH(n)){if(!wH(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(CH(n.v)){let t=vH(n.v)?n.v:_H(n.v);if(!wH(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(vH(i)&&!wH(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function KH(e,t,{getFn:n=$.getFn,fieldNormWeight:r=$.fieldNormWeight}={}){let i=new GH({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(FH)),i.setSources(t),i.create(),i}function qH(e,{getFn:t=$.getFn,fieldNormWeight:n=$.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new GH({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function JH(e=[],t=$.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function YH(e,t,n,{location:r=$.location,distance:i=$.distance,threshold:a=$.threshold,findAllMatches:o=$.findAllMatches,minMatchCharLength:s=$.minMatchCharLength,includeMatches:c=$.includeMatches,ignoreLocation:l=$.ignoreLocation}={}){if(t.length>32)throw Error(kH(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=JH(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function XH(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function ZH(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var QH={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},$H=RegExp(`[`+Object.keys(QH).join(``)+`]`,`g`),eU=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace($H,e=>QH[e]):e=>e,tU=class{constructor(e,{location:t=$.location,threshold:n=$.threshold,distance:r=$.distance,includeMatches:i=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:o=$.minMatchCharLength,isCaseSensitive:s=$.isCaseSensitive,ignoreDiacritics:c=$.ignoreDiacritics,ignoreLocation:l=$.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?eU(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:XH(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e<n;)u(this.pattern.substr(e,32),e),e+=32;if(t){let e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?eU(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=YH(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=ZH(u)),p}},nU=new Set([`fuzzy`,`include`]);function rU(e){return e.startsWith(`inverse`)}var iU=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new tU(e,{location:t.location??$.location,threshold:t.threshold??$.threshold,distance:t.distance??$.distance,includeMatches:t.includeMatches??$.includeMatches,findAllMatches:t.findAllMatches??$.findAllMatches,minMatchCharLength:t.minMatchCharLength??$.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??$.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??$.ignoreDiacritics,ignoreLocation:t.ignoreLocation??$.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],aU=iU.length,oU=`\0`,sU=`|`;function cU(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function lU(e,t){let n=e.match(t);return n?n[1]:null}function uU(e,t={}){return e.replace(/\\\|/g,oU).split(sU).map(e=>{let n=cU(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<aU;){let e=iU[o],n=lU(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<aU;){let e=iU[o],n=lU(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var dU=class{constructor(e,{isCaseSensitive:t=$.isCaseSensitive,ignoreDiacritics:n=$.ignoreDiacritics,includeMatches:r=$.includeMatches,minMatchCharLength:i=$.minMatchCharLength,ignoreLocation:a=$.ignoreLocation,findAllMatches:o=$.findAllMatches,location:s=$.location,threshold:c=$.threshold,distance:l=$.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?eU(e):e,this.pattern=e,this.query=uU(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?eU(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,rU(r.type)&&(c=!0),n&&(nU.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=ZH(o)),e}}return{isMatch:!1,score:1}}},fU=[];function pU(...e){fU.push(...e)}function mU(e,t){for(let n=0,r=fU.length;n<r;n+=1){let r=fU[n];if(r.condition(e,t))return new r(e,t)}return new tU(e,t)}var hU={AND:`$and`,OR:`$or`},gU={PATH:`$path`,PATTERN:`$val`},_U=e=>!!(e[hU.AND]||e[hU.OR]),vU=e=>!!e[gU.PATH],yU=e=>!hH(e)&&xH(e)&&!_U(e),bU=e=>({[hU.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function xU(e,t,{auto:n=!0}={}){let r=e=>{if(vH(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=mU(e,t)),r}let i=Object.keys(e),a=vU(e);if(!a&&i.length>1&&!_U(e))return r(bU(e));if(yU(e)){let r=a?e[gU.PATH]:i[0],o=a?e[gU.PATTERN]:e[r];if(!vH(o))throw Error(OH(r));let s={keyId:LH(r),pattern:o};return n&&(s.searcher=mU(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];hH(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return _U(e)||(e=bU(e)),r(e)}function SU(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function CU(e,{ignoreFieldNorm:t=$.ignoreFieldNorm}){e.forEach(e=>{e.score=SU(e.matches,{ignoreFieldNorm:t})})}var wU=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):this.comparator(e,this.heap[0])<0&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&this.comparator(t[i],t[r])>0&&(r=i),a<n&&this.comparator(t[a],t[r])>0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function TU(e){let t=[];return e.matches.forEach(e=>{if(!CH(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function EU(e,t,{includeMatches:n=$.includeMatches,includeScore:r=$.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=TU(e)),r&&(a.score=e.score),a})}var DU=/[\p{L}\p{M}\p{N}_]+/gu,OU=new WeakSet;function kU(e){OU.has(e)||(OU.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function AU(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||kU(e),t=>t.match(e)||[]):e=>e.match(DU)||[]}function jU({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=AU(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=eU(n)),r(n)}}}var MU=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=jU({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new tU(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=ZH(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function NU(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function PU(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){NU(e,a,i,r);return}if(o)for(let t=0;t<n;t++){let n=o[t];if(n){if(Array.isArray(n))for(let t of n)NU(e,t.v,i,r);else NU(e,n.v,i,r)}}}function FU(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)PU(r,i,t,n);return r}function IU(e,t,n,r){PU(e,t,n,r)}function LU(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function RU(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)LU(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var zU=class{constructor(e,t,n){this.options={...$,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new PH(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=mU(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof GH))throw Error(EH);if(this._myIndex=t||KH(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=jU({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=FU(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!CH(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=jU({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});IU(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&RU(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(DH);this._invertedIndex&&RU(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(vH(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return yH(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&yH(n)&&n>0&&vH(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new wU(n,u);vH(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=vH(e)?vH(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),CU(d,{ignoreFieldNorm:s}),a&&d.sort(vH(e)?u:l),yH(n)&&n>-1&&(d=d.slice(0,n));return EU(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!CH(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=SU(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=xU(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e<n;e+=1){let n=a[e],c=r(n,t,i);if(c.length)s.push(...c);else if(o===hU.AND)return[]}return s},i=this._myIndex.records,a=new Map,o=[];return i.forEach(({$:e,i:n})=>{if(CH(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!CH(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=SU(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!CH(t))return[];let r=[];if(hH(t))t.forEach(({v:t,i,n:a})=>{if(!CH(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};zU.version=`7.5.0`,zU.createIndex=KH,zU.parseIndex=qH,zU.config=$,zU.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(MH);return mU(e,{...$,...n}).searchIn(t)},zU.parseQuery=xU,pU(dU),pU(MU),zU.use=function(...e){e.forEach(e=>pU(e))};var BU=zU;D();var VU=`locale-switcher-content`,HU=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:r,searchInput:i,localeSwitcherLabel:a,languageListLabel:o,seeAllLocalesSwitch:s}=qi(pH),c=P(null),{locale:l}=Xi(),{availableLocales:u,selectedLocales:f,setSelectedLocales:p}=sk(),m=n(()=>u.map(e=>({locale:e,englishName:Pi(e,`en`),currentLocaleName:Pi(e,l),ownLocaleName:Pi(e)})),[u,l]),[h,g]=N(``),[_,v]=ak(`locale-content-selector-see-all-locales`,!1),y=n(()=>new BU(m,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[m]),b=n(()=>h?y.search(h).map(e=>e.item):m,[h,m,y]),x=e=>{t?f.includes(e)?f.length>1&&p(t=>t.filter(t=>t!==e)):p(t=>[...t,e]):p([e])},S=e=>{v(e),p(e?u:[l])};return L(`div`,{className:`rounded-xl border border-text text-foreground transition-colors`,children:L(mH,{identifier:VU,children:[L(mH.Trigger,{identifier:VU,label:a.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:L(`div`,{className:`flex w-full items-center justify-between text-foreground`,children:[L(`div`,{className:`px-2 py-1`,children:L(Ns,{size:16})}),L(Vs,{className:`self-center`,size:16})]})}),L(mH.Panel,{identifier:VU,isOverable:!0,isFocusable:!0,align:`end`,...e,children:L(OO,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:!0,roundedSize:`3xl`,borderColor:`text`,"aria-label":o.value,children:[t&&L(`div`,{className:`m-auto p-2`,children:L(QD,{defaultValue:_,onChange:S,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:s.true.value,value:!0},{content:s.false.value,value:!1}]})}),!(t&&_)&&L(d,{children:[L(`div`,{className:`p-3`,children:L(iO,{type:`search`,"aria-label":i.ariaLabel.value,placeholder:i.placeholder.value,onChange:e=>g(e.target.value),ref:c})}),L(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:b.map(({locale:e,currentLocaleName:n,ownLocaleName:i})=>L(`li`,{className:`px-1.5 py-1`,children:L(Y,{onClick:()=>x(e),label:`${r} ${n}`,disabled:!(u??u).includes(e),isActive:f.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:L(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&L(`div`,{className:`w-4`,children:f.includes(e)&&L(ds,{className:`size-full`})}),L(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[L(`div`,{className:`flex flex-col text-nowrap`,children:[L(`span`,{dir:Ni(e),lang:e,children:i}),L(`span`,{className:`text-neutral text-xs`,children:n})]}),L(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},UU={key:`pagination`,content:{nodeType:`translation`,translation:{en:{numberItemsSelector:`Items per page`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Showing {{start}} to {{end}} of {{total}} results`},selectPageSize:`Select page size`,goToNextPage:`Go to next page`,goToPreviousPage:`Go to previous page`},"en-GB":{numberItemsSelector:`Items per page`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Showing {{start}} to {{end}} of {{total}} results`},selectPageSize:`Select page size`,goToNextPage:`Go to next page`,goToPreviousPage:`Go to previous page`},fr:{numberItemsSelector:`Eléments par page`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Afficher {{start}} à {{end}} de {{total}} résultats`},selectPageSize:`Sélectionner la taille de la page`,goToNextPage:`Aller à la page suivante`,goToPreviousPage:`Aller à la page précédente`},es:{numberItemsSelector:`Items por página`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Mostrando {{start}} a {{end}} de {{total}} resultados`},selectPageSize:`Seleccionar tamaño de página`,goToNextPage:`Ir a la página siguiente`,goToPreviousPage:`Ir a la página anterior`},de:{numberItemsSelector:`Items pro Seite`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Zeigt {{start}} bis {{end}} von {{total}} Ergebnissen`},selectPageSize:`Seitegröße auswählen`,goToNextPage:`Zur nächsten Seite`,goToPreviousPage:`Zur vorherigen Seite`},ja:{numberItemsSelector:`ページあたりのアイテム数`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`{{start}} から {{end}} までの {{total}} 件の結果を表示`},selectPageSize:`ページサイズを選択`,goToNextPage:`次のページに移動`,goToPreviousPage:`前のページに移動`},ko:{numberItemsSelector:`페이지당 아이템 수`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`{{start}} 에서 {{end}} 까지의 {{total}} 개 결과 표시`},selectPageSize:`페이지 크기 선택`,goToNextPage:`다음 페이지로 이동`,goToPreviousPage:`이전 페이지로 이동`},zh:{numberItemsSelector:`每页项目数`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`显示第 {{start}} 到 {{end}} 项,共 {{total}} 个结果`},selectPageSize:`选择页面大小`,goToNextPage:`转到下一页`,goToPreviousPage:`转到上一页`},it:{numberItemsSelector:`Elementi per pagina`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Mostrando {{start}} a {{end}} di {{total}} risultati`},selectPageSize:`Seleziona una dimensione di pagina`,goToNextPage:`Vai alla pagina successiva`,goToPreviousPage:`Vai alla pagina precedente`},pt:{numberItemsSelector:`Itens por página`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Mostrando {{start}} a {{end}} de {{total}} resultados`},selectPageSize:`Selecionar um tamanho de página`,goToNextPage:`Ir para a página seguinte`,goToPreviousPage:`Ir para a página anterior`},hi:{numberItemsSelector:`पृष्ठ पर आइटम्स`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`{{start}} से {{end}} तक के {{total}} परिणाम दिखा रहे हैं`},selectPageSize:`पृष्ठ आकार चुनें`,goToNextPage:`अगली पृष्ठ पर जाएं`,goToPreviousPage:`पिछली पृष्ठ पर जाएं`},ar:{numberItemsSelector:`عدد العناصر لكل صفحة`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`عرض {{start}} إلى {{end}} من {{total}} نتائج`},selectPageSize:`اختر حجم الصفحة`,goToNextPage:`اذهب إلى الصفحة التالية`,goToPreviousPage:`اذهب إلى الصفحة السابقة`},ru:{numberItemsSelector:`Элементов на странице`,showingResults:{fields:[`start`,`end`,`total`],nodeType:`insertion`,insertion:`Показано {{start}}-{{end}} из {{total}} результатов`},selectPageSize:`Выберите размер страницы`,goToNextPage:`Перейти к следующей странице`,goToPreviousPage:`Перейти к предыдущей странице`}}},title:`Pagination`,description:`Content strings used for the pagination component, including labels for navigating pages and selecting items per page.`,tags:[`pagination`,`component`],location:`local`,localId:`pagination::local::../@intlayer/design-system/dist/esm/components/Pagination/pagination.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/Pagination/pagination.content.mjs`};D();var WU=gc(`flex items-center justify-center gap-1`,{variants:{size:{sm:`gap-1`,md:`gap-2`,lg:`gap-3`},color:{text:`background-text`,neutral:`background-neutral`},variant:{default:``,bordered:`rounded-lg border border-border p-2`,ghost:`bg-transparent`}},defaultVariants:{size:`md`,variant:`default`}}),GU=(e,t,n)=>{if(t<=n)return Array.from({length:t},(e,t)=>t+1);let r=[],i=Math.floor(n/2);if(r.push(1),e<=i+2){for(let e=2;e<=Math.min(n-1,t-1);e++)r.push(e);t>n&&r.push(`ellipsis`),t>1&&r.push(t)}else if(e>=t-i-1){t>n&&r.push(`ellipsis`);for(let e=Math.max(2,t-n+2);e<=t;e++)r.push(e)}else{r.push(`ellipsis`);let n=e-i,a=e+i;for(let e=n;e<=a;e++)r.push(e);r.push(`ellipsis`),r.push(t)}return r},KU=e=>e?.getAttribute(`aria-current`)===`true`,qU=e=>e===`sm`?`icon-sm`:e===`lg`?`icon-lg`:`icon-md`,JU=e=>L(`div`,{className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/10 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),YU=({currentPage:e,totalPages:t,onPageChange:n,showFirstLast:r=!1,showPrevNext:i=!0,maxVisiblePages:a=5,disabled:o=!1,size:s=`md`,variant:c=`default`,color:l=`text`,className:u,...d})=>{let{goToNextPage:f,goToPreviousPage:p}=qi(UU),m=GU(e,t,a),h=qU(s),g=e===1,_=e===t,v=P([]),y=P(null),{choiceIndicatorPosition:b,scheduleMeasurement:x}=KD(v,{selector:KU,isHoverable:!0});if(M(()=>{let e=setTimeout(()=>{x()},300);return()=>clearTimeout(e)},[e,x]),t<=1)return null;let S=r=>{!o&&r>=1&&r<=t&&r!==e&&n(r)};return L(`div`,{className:W(WU({size:s,variant:c}),u),...d,children:L(`div`,{className:`relative flex items-center gap-1`,children:[b&&L(JU,{style:b,ref:y}),i&&L(Y,{variant:`outline`,size:h,color:`text`,onClick:()=>S(e-1),disabled:o||g,label:p.value,Icon:hs,ref:e=>{e&&(v.current[0]=e)},className:`min-w-0 px-2`}),L(`div`,{className:`flex items-center gap-1 max-md:gap-0.5`,children:m.map((t,n)=>{if(t===`ellipsis`){let e=n===m.indexOf(`ellipsis`)?`ellipsis-start`:`ellipsis-end`;return L(`div`,{className:`flex h-8 min-w-8 items-center justify-center px-1`,children:L(ks,{className:`h-4 w-4 text-muted-foreground`})},e)}let r=t===e,a=+!!i+m.slice(0,n).filter(e=>e!==`ellipsis`).length;return L(Y,{variant:r?`default`:`outline`,size:h,color:`text`,onClick:()=>S(t),disabled:o,label:`Go to page ${t}`,"aria-current":r?`true`:`false`,ref:e=>{e&&(v.current[a]=e)},className:W(`flex aspect-square h-8 w-8 min-w-0 items-center justify-center p-0 text-sm`,s===`sm`&&`h-6 w-6 text-xs`,s===`lg`&&`size-10 text-base`,r&&`font-semibold`),children:t},t)})}),i&&L(Y,{variant:`outline`,size:h,color:`text`,onClick:()=>S(e+1),disabled:o||_,label:f.value,Icon:_s,ref:e=>{let t=+!!i+m.filter(e=>e!==`ellipsis`).length;e&&(v.current[t]=e)},className:`min-w-0 px-2`})]})})},XU=e=>{let t=Vi(e),n=Gi(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?XU(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0};D();var ZU=({children:e,onToggle:t,...n})=>{let[r,i]=N(!1);return L(ID,{...n,onToggle:e=>{e&&!r&&i(!0),t?.(e)},children:r?e:null})},QU=({section:e,keyPath:t,dictionary:n})=>{let{selectedLocales:r}=sk(),i=Ri(e,t,BE()),{addEditedContent:a}=IE(),{setFocusedContentKeyPath:o,focusedContent:s}=qE(),{addNewElement:c,goToField:l}=qi(EO),u=Gi(i),f=e=>(s?.keyPath?.length??0)>0&&Zn(e,s?.keyPath??[]),p=XU(i);return i?p?L(Y,{label:l.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>o(t),IconRight:_s,children:Si(t[t.length-1]?.key)}):typeof i==`object`?u===`reactNode`?L(d,{children:`React Node`}):u===`translation`?L(`div`,{className:`flex flex-col justify-between gap-2`,children:r.map(r=>L(QU,{keyPath:[...t,{type:lr,key:r}],section:e,dictionary:n},r))}):u===`enumeration`||u===`plural`||u===`condition`?L(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(i[u]).map(r=>L(QU,{keyPath:[...t,{type:u,key:r}],section:e,dictionary:n},r))}):u===`array`?L(`div`,{className:`flex flex-col justify-between gap-2`,children:[i.map((r,i)=>{let a=[...t,{type:gr,key:i}];return XU(r)?L(Y,{label:`${l.label.value} ${i}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>o(a),IconRight:_s,isActive:f(a),children:[`Item `,i]},JSON.stringify(a)):L(ZU,{label:`${l.label.value} ${i}`,header:`Item ${i}`,isActive:f(a),onClick:()=>o(a),children:L(`div`,{className:`mt-2 flex w-full max-w-full`,children:L(`div`,{className:`flex-1 ps-10`,children:L(QU,{keyPath:a,section:e,dictionary:n})})})},JSON.stringify(a))}),L(Y,{label:c.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...t,{type:gr,key:i.length}],r=i,s=Bi(r[r.length-1])??``;a(n.localId,s,e,!1),o(e)},Icon:qs,children:c.text})]}):typeof i.nodeType==`string`?L(QU,{keyPath:[...t,{type:i.nodeType}],section:e,dictionary:n}):L(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(i).map(r=>{let i=[...t,{type:hr,key:r}];return XU(Ri(e,i))?L(Y,{label:`${l.label.value} ${r}`,isActive:f(i),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>o(i),IconRight:_s,children:Si(r)},r):L(ZU,{label:`${l.label.value} ${r}`,isActive:f(i),onClick:()=>o(i),header:Si(r),children:L(`div`,{className:`mt-2 flex w-full max-w-full`,children:L(`div`,{className:`flex-1 ps-10`,children:L(QU,{keyPath:i,section:e,dictionary:n})})})},r)})}):L(d,{children:[`Error loading section --`,u,`--`,JSON.stringify(i),`--`,JSON.stringify(t)]}):L(d,{})};D();var $U=({dictionary:e})=>{let{itemPagination:t,variantSwitcher:r}=qi(fH),{editedContent:a}=LE(),{focusedContent:o,setFocusedContentKeyPath:s}=qE(),[,c]=S(),l=i(e=>c(()=>s(e)),[s]),[u,d]=N(e);M(()=>{d(e)},[e]);let f=e.item!==void 0||e.variant!==void 0,{data:p}=mD({keys:[e.key]},{enabled:f&&!!e.key}),m=n(()=>p?.data??[],[p]),h=n(()=>e.item===void 0?[]:m.filter(e=>e.item!==void 0).sort((e,t)=>(e.item??0)-(t.item??0)),[e,m]),g=n(()=>e.variant===void 0?[]:m.filter(e=>e.variant!==void 0),[e,m]),_=i(e=>{d(e),l([])},[l]),{content:v,key:y,localId:b}=u,x=o?.keyPath,C=a?.[b]?.content===void 0?v:a?.[b]?.content,w=BE(),T=Ri(C,x??[],w),E=O(x),D=O(T),k=D!==T,A=XU(C),j=XU(D);M(()=>{T===void 0&&l(o?.keyPath?.slice(0,-1)??[])},[]);let P=h.findIndex(e=>e.localId===u.localId),F=u.variant;return L(`div`,{children:[f&&L(`div`,{className:`mb-4 flex flex-wrap items-center gap-4`,children:[h.length>0&&L(`div`,{className:`flex items-center gap-2`,children:[L(`span`,{className:`font-medium text-muted text-xs`,children:t.label}),L(YU,{currentPage:P>=0?P+1:1,totalPages:h.length,onPageChange:e=>{let t=h[e-1];t&&_(t)},size:`sm`})]}),g.length>0&&L(`div`,{className:`flex flex-wrap items-center gap-2`,children:[L(`span`,{className:`font-medium text-muted text-xs`,children:[r.label,`:`]}),g.map(e=>{let t=e.localId===u.localId;return L(`button`,{type:`button`,onClick:()=>!t&&_(e),className:`rounded-lg px-3 py-1 text-xs transition-colors ${t?`bg-text font-semibold text-foreground-opposite`:`cursor-pointer border border-border hover:bg-text/10`}`,children:QV(e.variant)},e.localId)}),F!==void 0&&!g.some(t=>t.localId===e.localId)&&L(`span`,{className:`rounded-lg bg-text px-3 py-1 font-semibold text-foreground-opposite text-xs`,children:QV(F)})]})]}),L(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[L(dH,{dictionaryKey:y,keyPath:x??[],onClickKeyPath:l}),L(`div`,{className:`flex items-center gap-2`,children:L(HU,{})})]}),L(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof C==`object`&&C&&!A&&Object.keys(C).length>0&&L(OO,{border:!0,background:`none`,className:`top-10 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`2xl`,transparency:`xs`,children:L(QU,{keyPath:[],section:C,dictionary:u})}),(j||(E??[]).length>0)&&L(`div`,{className:k?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:L(GF,{keyPath:E??[],section:D,dictionary:u})})]})]})},eW={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"en-GB":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"fr":{"deleteButton":{"text":"Supprimer le dictionnaire","label":"Cliquez pour supprimer le dictionnaire"},"resetButton":{"text":"Réinitialiser toutes les modifications","label":"Cliquez pour réinitialiser toutes les modifications"},"saveButton":{"text":"Enregistrer les modifications","label":"Cliquez pour enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"downloadButton":{"text":"Télécharger","label":"Cliquez pour télécharger"},"confirmation":{"title":"Confirmation","message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","confirmButton":{"text":"Confirmer","label":"Cliquez pour confirmer"},"cancelButton":{"text":"Annuler","label":"Cliquez pour annuler"}}},"es":{"deleteButton":{"text":"Eliminar diccionario","label":"Haga clic para eliminar el diccionario"},"resetButton":{"text":"Restablecer todas las modificaciones","label":"Haga clic para restablecer todas las modificaciones"},"saveButton":{"text":"Guardar cambios","label":"Haga clic para guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"downloadButton":{"text":"Descargar","label":"Haga clic para descargar"},"confirmation":{"title":"Confirmación","message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","confirmButton":{"text":"Confirmar","label":"Haga clic para confirmar"},"cancelButton":{"text":"Cancelar","label":"Haga clic para cancelar"}}},"de":{"deleteButton":{"text":"Wörterbuch löschen","label":"Klicken Sie, um das Wörterbuch zu löschen"},"resetButton":{"text":"Alle Änderungen zurücksetzen","label":"Klicken Sie, um alle Änderungen zurückzusetzen"},"saveButton":{"text":"Änderungen speichern","label":"Klicken Sie, um Änderungen zu speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"downloadButton":{"text":"Herunterladen","label":"Klicken Sie, um herunterzuladen"},"confirmation":{"title":"Bestätigung","message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","confirmButton":{"text":"Bestätigen","label":"Klicken Sie, um zu bestätigen"},"cancelButton":{"text":"Abbrechen","label":"Klicken Sie, um abzubrechen"}}},"ja":{"deleteButton":{"text":"辞書を削除","label":"辞書を削除するにはクリックしてください"},"resetButton":{"text":"すべての変更をリセット","label":"すべての変更をリセットするにはクリックしてください"},"saveButton":{"text":"変更を保存","label":"変更を保存するにはクリックしてください"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"downloadButton":{"text":"ダウンロード","label":"ダウンロードするにはクリックしてください"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"resetButton":{"text":"모든 변경 사항 초기화","label":"모든 변경 사항을 초기화하려면 클릭하세요"},"saveButton":{"text":"변경 사항 저장","label":"변경 사항을 저장하려면 클릭하세요"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"downloadButton":{"text":"다운로드","label":"다운로드를 클릭하세요"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"resetButton":{"text":"重置所有更改","label":"单击以重置所有更改"},"saveButton":{"text":"保存更改","label":"单击保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"downloadButton":{"text":"下载","label":"单击下载"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"resetButton":{"text":"Reimposta tutte le modifiche","label":"Fai clic per ripristinare tutte le modifiche"},"saveButton":{"text":"Salva le modifiche","label":"Fai clic per salvare le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"downloadButton":{"text":"Scarica","label":"Fai clic per scaricare"},"confirmation":{"title":"Conferma","message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","confirmButton":{"text":"Conferma","label":"Fai clic per confermare"},"cancelButton":{"text":"Annulla","label":"Fai clic per annullare"}}},"pt":{"deleteButton":{"text":"Excluir dicionário","label":"Clique para excluir o dicionário"},"resetButton":{"text":"Redefinir todas as alterações","label":"Clique para redefinir todas as alterações"},"saveButton":{"text":"Salvar alterações","label":"Clique para salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"downloadButton":{"text":"Baixar","label":"Clique para baixar"},"confirmation":{"title":"Confirmação","message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","confirmButton":{"text":"Confirmar","label":"Clique para confirmar"},"cancelButton":{"text":"Cancelar","label":"Clique para cancelar"}}},"hi":{"deleteButton":{"text":"शब्दकोश हटाएं","label":"शब्दकोश हटाने के लिए क्लिक करें"},"resetButton":{"text":"सभी परिवर्तनों को रीसेट करें","label":"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें"},"saveButton":{"text":"परिवर्तनों को सहेजें","label":"परिवर्तनों को सहेजने के लिए क्लिक करें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"downloadButton":{"text":"डाउनलोड","label":"डाउनलोड करने के लिए क्लिक करें"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"resetButton":{"text":"إعادة تعيين جميع التغييرات","label":"انقر لإعادة تعيين جميع التغييرات"},"saveButton":{"text":"احفظ التغييرات","label":"انقر لحفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"downloadButton":{"text":"تنزيل","label":"انقر لتنزيل"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"resetButton":{"text":"Сбросить все изменения","label":"Нажмите, чтобы сбросить все изменения"},"saveButton":{"text":"Сохранить изменения","label":"Нажмите, чтобы сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"downloadButton":{"text":"Скачать","label":"Нажмите, чтобы скачать"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),title:`Save dictionary details`,description:`Content declarations for managing dictionary actions including saving, deleting, resetting, publishing, and downloading, with confirmation prompts for updates or overwrites.`,tags:[`dictionary management`,`dictionary editor`],location:`local`,localId:`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`};D();var tW=e=>{let[t,n]=N(e);return M(()=>{n(e??window.document.body)},[e]),t};D();var nW=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}};D();var rW=()=>!1,iW=e=>{let{disableScroll:t=!1,element:n,key:r=`unnamed_blocker`}=e??{},a=tW(n);M(()=>{let e=n??window.document.body;return t?nW.addBlockage(r,e):nW.removeBlockage(r,e),()=>{nW.removeBlockage(r,e)}},[t,n,r]);let o=i(()=>a?nW.isElementScrollBlocked(a):!1,[a]);return{isScrollBlocked:k(nW.subscribe,o,rW)}},aW=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,oW=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-inset-s-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,sW=({className:e,...t})=>L(`h1`,{className:W(`text-3xl`,e),...t}),cW=({className:e,...t})=>L(`h2`,{className:W(`mb-2 text-2xl`,aW,e),...t}),lW=({className:e,...t})=>L(`h3`,{className:W(`mb-2 text-xl`,aW,e),...t}),uW=({className:e,...t})=>L(`h4`,{className:W(`text-lg`,aW,e),...t}),dW=({className:e,...t})=>L(`h5`,{className:W(`text-base`,aW,e),...t}),fW=({className:e,...t})=>L(`h6`,{className:W(`ms-3 text-base`,aW,e),...t}),pW=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),mW=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},hW=(e,t)=>{let n=e.getBoundingClientRect().left,r=e.getBoundingClientRect().top,i=window.getComputedStyle(e,`:after`),a=n+parseInt(i.getPropertyValue(`left`),10),o=a+parseInt(i.width,10),s=r+parseInt(i.getPropertyValue(`top`),10),c=s+parseInt(i.height,10),l=t.clientX,u=t.clientY;return l>=a&&l<=o&&u>=s&&u<=c},gW=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?pW(t):void 0;return L(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(hW(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),mW(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:W(r&&oW,n),...i,children:t})},_W=({isClickable:e,...t})=>L(sW,{...t}),vW=({isClickable:e=!1,...t})=>L(gW,{H:cW,isClickable:e,...t}),yW=({isClickable:e=!1,...t})=>L(gW,{H:lW,isClickable:e,...t}),bW=({isClickable:e=!1,...t})=>L(gW,{H:uW,isClickable:e,...t}),xW=({isClickable:e=!1,...t})=>L(gW,{H:dW,isClickable:e,...t}),SW=({isClickable:e=!1,...t})=>L(gW,{H:fW,isClickable:e,...t});D();var CW=gc(`flex cursor-default flex-col overflow-hidden shadow-sm`,{variants:{size:{sm:`h-auto max-h-[30vh] w-[95vw] max-w-xl`,md:`h-auto max-h-[50vh] w-[95vw] max-w-xl`,lg:`h-auto max-h-[70vh] w-[95vw] max-w-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),wW={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},TW=uS.create(OO),EW=({children:e,isOpen:t,container:n,onClose:r,hasCloseButton:i=!1,closeButtonColor:a=`text`,title:o,size:s=`md`,className:c,isScrollable:l=!1,disableScroll:u=!0,padding:f=`none`,...p})=>{let m=tW(n);if(iW({key:`modal`,disableScroll:t&&u}),M(()=>{let e=e=>{e.key===`Escape`&&t&&r&&r()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},[t,r]),!m)return L(d,{});let h=!!o,g=wW[f||`none`];return E(L(uS.div,{className:`invisible fixed inset-s-0 top-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:t?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:e=>{e.stopPropagation(),r?.()},"aria-hidden":!t,children:L(TW,{onClick:e=>e.stopPropagation(),initial:{scale:t?.5:1},animate:{scale:t?1:.5},transition:{duration:.3},className:CW({size:s,className:c}),role:`dialog`,"aria-modal":!0,padding:`none`,...p,children:[L(`div`,{className:W(`relative flex-none px-4 pt-4`,i&&h?`flex items-start`:i?`flex justify-end`:h?`items-center`:`hidden`),children:[h&&L(yW,{className:`ms-1 mb-2 flex items-center justify-center font-bold text-lg`,children:o}),i&&L(Y,{variant:`hoverable`,color:a,label:`Close modal`,className:`ms-auto`,onClick:e=>{e.stopPropagation(),r?.()},Icon:dc,size:`icon-md`})]}),L(`div`,{className:W(`flex min-h-0 w-full flex-1 flex-col`,l===!0&&`overflow-auto`,l===`y`&&`overflow-y-auto overflow-x-hidden`,l===`x`&&`overflow-x-auto overflow-y-hidden`,!l&&`overflow-visible`),children:L(`div`,{className:W(`flex size-full flex-1 flex-col`,g),children:e})})]})}),m)};D();var DW=({dictionary:e,mode:t,className:n,onDelete:r,onSave:i,...a})=>{let[o,s]=N(!1),{setLocaleDictionary:c}=KT(),{mutate:l,isPending:u}=gD(),{mutate:f,isPending:p}=vD(),{mutate:m,isPending:h}=hD(),g=p||h,{editedContent:_,restoreEditedContent:v}=LE(),{deleteButton:y,resetButton:b,saveButton:x,publishButton:S,downloadButton:C,confirmation:w}=qi(eW),{isAuthenticated:T}=sD(),{session:E}=oD(),D=hS(),[O,k]=N(!1),A=E?(E.permissions?.includes(`dictionary:admin`)||E.permissions?.includes(`dictionary:write`))??!1:!!D?.accessToken,j=t.includes(`remote`)&&!T&&!!D?.login,P=A,F=_?.[e.localId],I=F&&JSON.stringify(F)!==JSON.stringify(e),R=e?.id!==void 0,ee=async()=>{if(!_?.[e.localId])return;let t={...e,..._?.[e.localId]};f({dictionary:t},{onSuccess:()=>{let t=_?.[e.localId];t&&c(t),v(e.localId),s(!1),i?.()}})},z=()=>{let t={...e,..._?.[e.localId]};m({dictionaries:[t]},{onSuccess:n=>{n&&(c(t),v(e.localId),i?.())}})},te=()=>{k(!0),D?.login?.()},B=!!D?.isLoggingIn;M(()=>{O&&(T?(k(!1),z()):B||k(!1))},[O,T,B]);let ne=()=>{e.id&&l({dictionaryId:e.id},{onSuccess:e=>{e&&r?.()}})};return L(d,{children:[L(EW,{isOpen:o,title:w.title.value,size:`md`,roundedSize:`2xl`,onClose:()=>s(!1),padding:`md`,border:!0,borderColor:`neutral`,children:L(`form`,{className:`size-full`,onSubmit:e=>{e.preventDefault(),ee()},children:[L(`p`,{className:`py-4 text-muted-foreground text-sm`,children:w.message}),L(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[L(Y,{type:`button`,label:w.cancelButton.label.value,disabled:g,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:()=>s(!1),children:w.cancelButton.text}),L(Y,{type:`submit`,label:w.confirmButton.label.value,disabled:!I||g,Icon:$s,color:`text`,className:`max-md:w-full`,isLoading:p,onClick:ee,children:w.confirmButton.text})]})]})}),L(`form`,{className:W(`flex justify-end gap-2`,n),...a,children:[t.includes(`remote`)&&R&&r&&T&&L(Y,{label:y.label.value,Icon:ac,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:u,onClick:ne,disabled:!P,children:y.text}),I&&L(Y,{label:b.label.value,disabled:!I,Icon:Ys,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>v(e.localId),children:b.text}),t.includes(`local`)&&L(Y,{label:C.label.value,disabled:!I||g,Icon:Ds,color:`text`,variant:T||j?`outline`:`default`,className:`max-md:w-full`,isLoading:p,onClick:()=>s(!0),children:C.text}),t.includes(`remote`)&&T&&!R&&L(Y,{label:S.label.value,disabled:g||!A,Icon:ls,color:`text`,className:`max-md:w-full`,isLoading:h,onClick:z,children:S.text}),j&&!R&&L(Y,{label:S.label.value,disabled:g,Icon:ls,color:`text`,className:`max-md:w-full`,isLoading:O,onClick:te,children:S.text}),t.includes(`remote`)&&T&&R&&I&&L(Y,{label:x.label.value,disabled:!I||g||!A,Icon:$s,color:`text`,className:`max-md:w-full`,isLoading:h,onClick:z,children:x.text})]})]})},OW={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`}},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`}},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`}},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`}},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`}},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`}},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`}},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`}},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`}},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`}},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`}}}},title:`Dictionary field editor`,description:`Content declaration for the dictionary field editor component, including labels and texts used for navigation to the dictionary list.`,tags:[`component`,`dictionary`,`design system`],location:`local`,localId:`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`};D();var kW=(e,t=2e3,n,r)=>{let[i,a]=N(!1);return{isCopied:i,copy:async()=>{if(e)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{r?.(Error(`Clipboard API not supported in this browser`));return}a(!0),setTimeout(()=>a(!1),t),n?.()}catch(e){let t=e instanceof Error?e.message:`Failed to copy to clipboard`;r?.(e instanceof Error?e:Error(t))}}}},AW=({text:e,children:t,className:n,"aria-label":r=`Copy to clipboard`,"aria-copied-label":i=`Copied to clipboard`,feedbackDuration:a=2e3,onCopySuccess:o,onCopyError:s,disable:c,preventDefault:l=!0,stopPropagation:u=!0,size:d=14})=>{let{isCopied:f,copy:p}=kW(e,a,o,s);if(c)return L(`span`,{className:n,children:t});let m=e=>{(e.key===`Enter`||e.key===` `)&&h(e)},h=e=>{l&&e.preventDefault(),u&&e.stopPropagation(),p()},g=f?i:r,_=f?Cs:Ts;return L(`span`,{className:W(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,n),onClick:h,onKeyDown:m,role:`button`,tabIndex:0,"aria-label":g,"aria-pressed":f,"data-testid":`copy-to-clipboard`,children:[L(`span`,{className:`min-w-0 break-all`,children:t}),e&&L(_,{className:`ms-1 ms-auto shrink-0`,size:d,"aria-hidden":`true`})]})};D();var jW=gc(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{error:`border-error bg-error text-error`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-foreground`}},defaultVariants:{color:`text`}}),MW=gc(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{error:`bg-error/10 aria-selected:text-foreground`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-foreground-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`inset-s-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),NW=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`text`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=P([]),c=P(null),{choiceIndicatorPosition:l,scheduleMeasurement:u}=KD(s,{isHoverable:i,orientation:a});return M(()=>{u()},[t]),L(`div`,{className:W(jW({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return v(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),l&&L(`div`,{className:W(MW({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},PW={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"qualifierSection":{"title":"Qualifier","item":"Item","variant":"Variant","meta":"Meta"},"siblingDictionaries":{"title":"Related dictionaries","noSiblings":"No other dictionaries share this key.","collectionItems":"Collection items","variants":"Variants","metaRecords":"Meta records","itemIndex":"Item"},"typeSwitch":{"label":"Type","description":"The type controls how this dictionary is selected at runtime.","standard":"Standard","collection":"Collection","variant":"Variant","meta":"Dynamic","itemValueLabel":"Item index","itemValuePlaceholder":"e.g. 1","variantValueLabel":"Variant name","variantValuePlaceholder":"e.g. default","metaValueLabel":"Meta fields (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"Invalid JSON. Please fix before saving.","disablePickerTitle":"Sibling dictionaries with qualifiers","disablePickerDescription":"The following sibling dictionaries still have qualifiers. Navigate to each to update their type."},"auditButton":{"label":"Audit"}},"en-GB":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"qualifierSection":{"title":"Qualifier","item":"Item","variant":"Variant","meta":"Meta"},"siblingDictionaries":{"title":"Related dictionaries","noSiblings":"No other dictionaries share this key.","collectionItems":"Collection items","variants":"Variants","metaRecords":"Meta records","itemIndex":"Item"},"typeSwitch":{"label":"Type","description":"The type controls how this dictionary is selected at runtime.","standard":"Standard","collection":"Collection","variant":"Variant","meta":"Dynamic","itemValueLabel":"Item index","itemValuePlaceholder":"e.g. 1","variantValueLabel":"Variant name","variantValuePlaceholder":"e.g. default","metaValueLabel":"Meta fields (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"Invalid JSON. Please fix before saving.","disablePickerTitle":"Sibling dictionaries with qualifiers","disablePickerDescription":"The following sibling dictionaries still have qualifiers. Navigate to each to update their type."},"auditButton":{"label":"Audit"}},"fr":{"titleInput":{"label":"Titre","description":"Le titre de votre dictionnaire permet de l'identifier facilement","placeholder":"Entrez le titre de votre dictionnaire"},"keyInput":{"label":"Clé","description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","placeholder":"Entrez la clé de votre dictionnaire"},"descriptionInput":{"label":"Description","placeholder":"Entrez la description de votre dictionnaire","description":"La description de votre dictionnaire permet de l'identifier facilement en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire."},"projectInput":{"label":"Projets","description":"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"tagsSelect":{"label":"Tags","description":"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"importModeSelect":{"label":"Mode d'importation","description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","static":"Statique","dynamic":"Dynamique","live":"Fetch"},"filePathInput":{"label":"Chemin du fichier","description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"qualifierSection":{"title":"Qualificateur","item":"Élément","variant":"Variante","meta":"Méta"},"siblingDictionaries":{"title":"Dictionnaires liés","noSiblings":"Aucun autre dictionnaire ne partage cette clé.","collectionItems":"Éléments de collection","variants":"Variantes","metaRecords":"Enregistrements méta","itemIndex":"Élément"},"typeSwitch":{"label":"Type","description":"Le type contrôle comment ce dictionnaire est sélectionné à l'exécution.","standard":"Standard","collection":"Collection","variant":"Variante","meta":"Dynamique","itemValueLabel":"Index de l'élément","itemValuePlaceholder":"ex. 1","variantValueLabel":"Nom de variante","variantValuePlaceholder":"ex. défaut","metaValueLabel":"Champs méta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mon-enregistrement\\" }","variantJsonError":"JSON invalide. Veuillez corriger avant de sauvegarder.","disablePickerTitle":"Dictionnaires frères avec qualificateurs","disablePickerDescription":"Les dictionnaires frères suivants ont encore des qualificateurs. Naviguez vers chacun d'eux pour mettre à jour leur type."},"auditButton":{"label":"Auditer"}},"es":{"titleInput":{"label":"Título","description":"El título de su diccionario le permite identificar fácilmente","placeholder":"Ingrese le título de su diccionario"},"keyInput":{"label":"Clave","description":"La clave de su diccionario se utiliza para identificarla en la aplicación","placeholder":"Ingrese la clave de su diccionario"},"descriptionInput":{"label":"Descripción","placeholder":"Ingrese la descripción de su diccionario","description":"La descripción de su diccionario le permite identificar fácilmente el contenido utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario."},"projectInput":{"label":"Proyectos","description":"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"tagsSelect":{"label":"Etiquetas","description":"Un diccionario puede estar asociado con una o más etiquetas. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione los tags para asociar con su diccionario"},"locationSelect":{"label":"Ubicación","local":"Local","remote":"Distante","testDescription":"La ubicación determina si su dictionnaire se almacena localmente, de forma remota o ambos."},"importModeSelect":{"label":"Modo de importación","description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","static":"Estático","dynamic":"Dinámico","live":"Fetch"},"filePathInput":{"label":"Ruta del archivo","description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","placeholder":"Ingrese la ruta del archivo de su diccionario"},"qualifierSection":{"title":"Calificador","item":"Elemento","variant":"Variante","meta":"Meta"},"siblingDictionaries":{"title":"Diccionarios relacionados","noSiblings":"Ningún otro diccionario comparte esta clave.","collectionItems":"Elementos de colección","variants":"Variantes","metaRecords":"Registros meta","itemIndex":"Elemento"},"typeSwitch":{"label":"Tipo","description":"El tipo controla cómo se selecciona este diccionario en tiempo de ejecución.","standard":"Estándar","collection":"Colección","variant":"Variante","meta":"Dinámico","itemValueLabel":"Índice del elemento","itemValuePlaceholder":"ej. 1","variantValueLabel":"Nombre de variante","variantValuePlaceholder":"ej. predeterminado","metaValueLabel":"Campos meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mi-registro\\" }","variantJsonError":"JSON no válido. Por favor, corrija antes de guardar.","disablePickerTitle":"Diccionarios hermanos con calificadores","disablePickerDescription":"Los siguientes diccionarios hermanos todavía tienen calificadores. Navegue a cada uno para actualizar su tipo."},"auditButton":{"label":"Auditar"}},"de":{"titleInput":{"label":"Titel","description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"keyInput":{"label":"Schlüssel","description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"descriptionInput":{"label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein","description":"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen."},"projectInput":{"label":"Projekte","description":"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"tagsSelect":{"label":"Tags","description":"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"importModeSelect":{"label":"Importmodus","description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","static":"Statisch","dynamic":"Dynamisch","live":"Fetch"},"filePathInput":{"label":"Dateipfad","description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"qualifierSection":{"title":"Qualifikator","item":"Element","variant":"Variante","meta":"Meta"},"siblingDictionaries":{"title":"Verwandte Wörterbücher","noSiblings":"Kein anderes Wörterbuch verwendet denselben Schlüssel.","collectionItems":"Sammlungselemente","variants":"Varianten","metaRecords":"Meta-Datensätze","itemIndex":"Element"},"typeSwitch":{"label":"Typ","description":"Der Typ steuert, wie dieses Wörterbuch zur Laufzeit ausgewählt wird.","standard":"Standard","collection":"Sammlung","variant":"Variante","meta":"Dynamisch","itemValueLabel":"Elementindex","itemValuePlaceholder":"z.B. 1","variantValueLabel":"Variantenname","variantValuePlaceholder":"z.B. Standard","metaValueLabel":"Meta-Felder (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mein-eintrag\\" }","variantJsonError":"Ungültiges JSON. Bitte vor dem Speichern korrigieren.","disablePickerTitle":"Geschwister-Wörterbücher mit Qualifikatoren","disablePickerDescription":"Die folgenden Geschwister-Wörterbücher haben noch Qualifikatoren. Navigieren Sie zu jedem, um seinen Typ zu aktualisieren."},"auditButton":{"label":"Prüfen"}},"ja":{"titleInput":{"label":"タイトル","description":"辞書のタイトルは、それを簡単に識別することができます","placeholder":"辞書のタイトルを入力してください"},"keyInput":{"label":"キー","description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","placeholder":"辞書のキーを入力してください"},"descriptionInput":{"label":"説明","placeholder":"辞書の説明を入力してください","description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。"},"projectInput":{"label":"プロジェクト","description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"tagsSelect":{"label":"タグ","description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるタグを選択してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"importModeSelect":{"label":"インポートモード","description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","static":"静的","dynamic":"動的","live":"Fetch"},"filePathInput":{"label":"ファイルパス","description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","placeholder":"辞書のファイルパスを入力してください"},"qualifierSection":{"title":"修飾子","item":"項目","variant":"バリアント","meta":"メタ"},"siblingDictionaries":{"title":"関連辞書","noSiblings":"他の辞書はこのキーを共有していません。","collectionItems":"コレクション項目","variants":"バリアント","metaRecords":"メタレコード","itemIndex":"項目"},"typeSwitch":{"label":"タイプ","description":"タイプは実行時にこの辞書がどのように選択されるかを制御します。","standard":"スタンダード","collection":"コレクション","variant":"バリアント","meta":"ダイナミック","itemValueLabel":"要素インデックス","itemValuePlaceholder":"例: 1","variantValueLabel":"バリアント名","variantValuePlaceholder":"例: default","metaValueLabel":"メタフィールド(JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"無効なJSONです。保存する前に修正してください。","disablePickerTitle":"修飾子を持つ兄弟辞書","disablePickerDescription":"次の兄弟辞書にはまだ修飾子があります。それぞれに移動してタイプを更新してください。"},"auditButton":{"label":"監査"}},"ko":{"titleInput":{"label":"제목","description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","placeholder":"사전의 제목을 입력하세요"},"keyInput":{"label":"키","description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","placeholder":"사전의 키를 입력하세요"},"descriptionInput":{"label":"설명","placeholder":"사전의 설명을 입력하세요","description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다."},"projectInput":{"label":"프로젝트","description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"tagsSelect":{"label":"태그","description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 태그를 선택하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"importModeSelect":{"label":"가져오기 모드","description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","static":"정적","dynamic":"동적","live":"Fetch"},"filePathInput":{"label":"파일 경로","description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","placeholder":"사전의 파일 경로를 입력하세요"},"qualifierSection":{"title":"한정자","item":"항목","variant":"변형","meta":"메타"},"siblingDictionaries":{"title":"관련 사전","noSiblings":"이 키를 공유하는 다른 사전이 없습니다.","collectionItems":"컬렉션 항목","variants":"변형","metaRecords":"메타 레코드","itemIndex":"항목"},"typeSwitch":{"label":"유형","description":"유형은 런타임에 이 사전이 선택되는 방식을 제어합니다.","standard":"표준","collection":"컬렉션","variant":"변형","meta":"동적","itemValueLabel":"항목 인덱스","itemValuePlaceholder":"예: 1","variantValueLabel":"변형 이름","variantValuePlaceholder":"예: default","metaValueLabel":"메타 필드 (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"잘못된 JSON입니다. 저장하기 전에 수정하세요.","disablePickerTitle":"한정자가 있는 형제 사전","disablePickerDescription":"다음 형제 사전에는 아직 한정자가 있습니다. 각각으로 이동하여 유형을 업데이트하세요."},"auditButton":{"label":"감사"}},"zh":{"titleInput":{"label":"标题","description":"字典的标题使您能够轻松识别它","placeholder":"输入字典的标题"},"keyInput":{"label":"键","description":"字典的键用于在应用程序中识别它","placeholder":"输入字典的键"},"descriptionInput":{"label":"描述","placeholder":"输入字典的描述","description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。"},"projectInput":{"label":"项目","description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择一个或多个项目以与您的字典关联"},"tagsSelect":{"label":"标签","description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择与您的字典相关的标签"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"importModeSelect":{"label":"导入模式","description":"导入模式决定了您的词典如何导入到您的应用程序中。","static":"静态","dynamic":"动态","live":"Fetch"},"filePathInput":{"label":"文件路径","description":"字典的文件路径使您能够在项目中识别它。","placeholder":"输入字典的文件路径"},"qualifierSection":{"title":"限定符","item":"项目","variant":"变体","meta":"元"},"siblingDictionaries":{"title":"相关字典","noSiblings":"没有其他字典共享此键。","collectionItems":"集合项","variants":"变体","metaRecords":"元记录","itemIndex":"项目"},"typeSwitch":{"label":"类型","description":"类型控制此字典在运行时的选择方式。","standard":"标准","collection":"集合","variant":"变体","meta":"动态","itemValueLabel":"项目索引","itemValuePlaceholder":"例如 1","variantValueLabel":"变体名称","variantValuePlaceholder":"例如 default","metaValueLabel":"元字段 (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"无效的JSON。请在保存前修复。","disablePickerTitle":"具有限定符的兄弟字典","disablePickerDescription":"以下兄弟字典仍有限定符。导航到每个字典以更新其类型。"},"auditButton":{"label":"审核"}},"it":{"titleInput":{"label":"Titolo","description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","placeholder":"Inserisci il titolo del tuo dizionario"},"keyInput":{"label":"Chiave","description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","placeholder":"Inserisci la chiave del tuo dizionario"},"descriptionInput":{"label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario","description":"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario."},"projectInput":{"label":"Progetti","description":"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"tagsSelect":{"label":"Tag","description":"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona i tag da associare al tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"importModeSelect":{"label":"Modalità di importazione","description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","static":"Statico","dynamic":"Dinamico","live":"Fetch"},"filePathInput":{"label":"Percorso del file","description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","placeholder":"Inserisci il percorso del file del tuo dizionario"},"qualifierSection":{"title":"Qualificatore","item":"Elemento","variant":"Variante","meta":"Meta"},"siblingDictionaries":{"title":"Dizionari correlati","noSiblings":"Nessun altro dizionario condivide questa chiave.","collectionItems":"Elementi di raccolta","variants":"Varianti","metaRecords":"Record meta","itemIndex":"Elemento"},"typeSwitch":{"label":"Tipo","description":"Il tipo controlla come questo dizionario viene selezionato in fase di esecuzione.","standard":"Standard","collection":"Raccolta","variant":"Variante","meta":"Dinamico","itemValueLabel":"Indice elemento","itemValuePlaceholder":"es. 1","variantValueLabel":"Nome variante","variantValuePlaceholder":"es. predefinito","metaValueLabel":"Campi meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"mio-record\\" }","variantJsonError":"JSON non valido. Correggere prima di salvare.","disablePickerTitle":"Dizionari fratelli con qualificatori","disablePickerDescription":"I seguenti dizionari fratelli hanno ancora qualificatori. Naviga verso ognuno per aggiornare il loro tipo."},"auditButton":{"label":"Controllare"}},"pt":{"titleInput":{"label":"Título","description":"O titolo do seu dicionário permite que você o identifique facilmente","placeholder":"Insira o título do seu dicionário"},"keyInput":{"label":"Chave","description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","placeholder":"Insira a chave do seu dicionário"},"descriptionInput":{"label":"Descrição","placeholder":"Insira a descrição do seu dicionário","description":"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário."},"projectInput":{"label":"Projetos","description":"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em differentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"tagsSelect":{"label":"Tags","description":"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione os tags para associar ao seu dicionário"},"locationSelect":{"label":"Localização","local":"Local","remote":"Remoto","testDescription":"A localização determina se o seu dicionário è armazenado localmente, remotamente ou ambos."},"importModeSelect":{"label":"Modo de importação","description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","static":"Estático","dynamic":"Dinâmico","live":"Fetch"},"filePathInput":{"label":"Caminho do arquivo","description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","placeholder":"Insira o caminho do arquivo do seu dicionário"},"qualifierSection":{"title":"Qualificador","item":"Item","variant":"Variante","meta":"Meta"},"siblingDictionaries":{"title":"Dicionários relacionados","noSiblings":"Nenhum outro dicionário compartilha esta chave.","collectionItems":"Itens de coleção","variants":"Variantes","metaRecords":"Registros meta","itemIndex":"Item"},"typeSwitch":{"label":"Tipo","description":"O tipo controla como este dicionário é selecionado em tempo de execução.","standard":"Padrão","collection":"Coleção","variant":"Variante","meta":"Dinâmico","itemValueLabel":"Índice do item","itemValuePlaceholder":"ex. 1","variantValueLabel":"Nome da variante","variantValuePlaceholder":"ex. padrão","metaValueLabel":"Campos meta (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"meu-registro\\" }","variantJsonError":"JSON inválido. Por favor, corrija antes de salvar.","disablePickerTitle":"Dicionários irmãos com qualificadores","disablePickerDescription":"Os seguintes dicionários irmãos ainda têm qualificadores. Navegue para cada um para atualizar seu tipo."},"auditButton":{"label":"Auditar"}},"hi":{"titleInput":{"label":"शीर्षक","description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"keyInput":{"label":"कुंजी","description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"descriptionInput":{"label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें","description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।"},"projectInput":{"label":"परियोजनाएँ","description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"tagsSelect":{"label":"टैग","description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"importModeSelect":{"label":"आयात मोड","description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","static":"स्थैतिक","dynamic":"गतिशील","live":"Fetch"},"filePathInput":{"label":"फ़ाइल पथ","description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"qualifierSection":{"title":"क्वालीफायर","item":"आइटम","variant":"वेरिएंट","meta":"मेटा"},"siblingDictionaries":{"title":"संबंधित शब्दकोश","noSiblings":"कोई अन्य शब्दकोश इस कुंजी को साझा नहीं करता।","collectionItems":"संग्रह आइटम","variants":"वेरिएंट","metaRecords":"मेटा रिकॉर्ड","itemIndex":"आइटम"},"typeSwitch":{"label":"प्रकार","description":"प्रकार नियंत्रित करता है कि रनटाइम पर यह शब्दकोश कैसे चुना जाता है।","standard":"मानक","collection":"संग्रह","variant":"वेरिएंट","meta":"डायनामिक","itemValueLabel":"आइटम इंडेक्स","itemValuePlaceholder":"उदा. 1","variantValueLabel":"वेरिएंट नाम","variantValuePlaceholder":"उदा. default","metaValueLabel":"मेटा फ़ील्ड (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"अमान्य JSON। सहेजने से पहले कृपया ठीक करें।","disablePickerTitle":"क्वालीफायर के साथ सिब्लिंग शब्दकोश","disablePickerDescription":"निम्नलिखित सिब्लिंग शब्दकोशों में अभी भी क्वालीफायर हैं। प्रत्येक में जाकर उनका प्रकार अपडेट करें।"},"auditButton":{"label":"ऑडिट"}},"ar":{"titleInput":{"label":"العنوان","description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","placeholder":"أدخل عنوان القاموس الخاص بك"},"keyInput":{"label":"مفتاح","description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","placeholder":"أدخل مفتاح القاموس الخاص بك"},"descriptionInput":{"label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك","description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك."},"projectInput":{"label":"المشاريع","description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"tagsSelect":{"label":"الوسوم","description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"importModeSelect":{"label":"وضع الاستيراد","description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","static":"ثابت","dynamic":"ديناميكي","live":"Fetch"},"filePathInput":{"label":"مسار الملف","description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"qualifierSection":{"title":"المؤهل","item":"عنصر","variant":"نوع","meta":"بيانات وصفية"},"siblingDictionaries":{"title":"القواميس ذات الصلة","noSiblings":"لا توجد قواميس أخرى تشترك في هذا المفتاح.","collectionItems":"عناصر المجموعة","variants":"الأنواع","metaRecords":"سجلات البيانات الوصفية","itemIndex":"عنصر"},"typeSwitch":{"label":"النوع","description":"يتحكم النوع في كيفية تحديد هذا القاموس في وقت التشغيل.","standard":"قياسي","collection":"مجموعة","variant":"نوع","meta":"ديناميكي","itemValueLabel":"مؤشر العنصر","itemValuePlaceholder":"مثال: 1","variantValueLabel":"اسم النوع","variantValuePlaceholder":"مثال: افتراضي","metaValueLabel":"حقول البيانات الوصفية (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"JSON غير صالح. يرجى الإصلاح قبل الحفظ.","disablePickerTitle":"قواميس مرتبطة مع المؤهلات","disablePickerDescription":"لا تزال القواميس المرتبطة التالية تحتوي على مؤهلات. انتقل إلى كل منها لتحديث نوعه."},"auditButton":{"label":"التدقيق"}},"ru":{"titleInput":{"label":"Заголовок","description":"Название вашего словаря позволяет легко его идентифицировать","placeholder":"Введите название вашего словаря"},"keyInput":{"label":"Ключ","description":"Ключ вашего словаря используется для его идентификации в приложении","placeholder":"Введите ключ вашего словаря"},"descriptionInput":{"label":"Описание","placeholder":"Введите описание вашего словаря","description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."},"projectInput":{"label":"Проекты","description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"tagsSelect":{"label":"Теги","description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","placeholder":"Выберите теги, которые нужно связать с словарем"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"importModeSelect":{"label":"Режим импорта","description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","static":"Статический","dynamic":"Динамический","live":"Fetch"},"filePathInput":{"label":"Путь к файлу","description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","placeholder":"Введите путь к файлу вашего словаря"},"qualifierSection":{"title":"Квалификатор","item":"Элемент","variant":"Вариант","meta":"Мета"},"siblingDictionaries":{"title":"Связанные словари","noSiblings":"Никакие другие словари не используют этот ключ.","collectionItems":"Элементы коллекции","variants":"Варианты","metaRecords":"Мета-записи","itemIndex":"Элемент"},"typeSwitch":{"label":"Тип","description":"Тип управляет тем, как этот словарь выбирается во время выполнения.","standard":"Стандартный","collection":"Коллекция","variant":"Вариант","meta":"Динамический","itemValueLabel":"Индекс элемента","itemValuePlaceholder":"напр. 1","variantValueLabel":"Название варианта","variantValuePlaceholder":"напр. default","metaValueLabel":"Мета-поля (JSON)","metaValuePlaceholder":"{ \\"id\\": \\"my-record\\" }","variantJsonError":"Недопустимый JSON. Пожалуйста, исправьте перед сохранением.","disablePickerTitle":"Связанные словари с квалификаторами","disablePickerDescription":"Следующие связанные словари всё ещё имеют квалификаторы. Перейдите к каждому, чтобы обновить его тип."},"auditButton":{"label":"Отслеживание"}}}}`),title:`Dictionary details form`,description:`Form labels, placeholders and descriptions for editing the details of a dictionary, including title, key, description, projects, and tags. Used in the dictionary editor component to guide users in defining dictionary metadata.`,tags:[`form content`,`dictionary editor`,`metadata input`],location:`local`,localId:`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`},FW=gc([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:hover:opacity-80`,`ring-offset-background`,`hover:bg-neutral-500/10`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-foreground-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{neutral:`border-neutral/30 text-muted-foreground ring-neutral/20 checked:border-neutral checked:bg-neutral`,light:`border-white/30 text-white ring-white/20 checked:border-white checked:bg-white`,text:`border-text/30 text-foreground ring-text/20 checked:border-text checked:bg-text`,"text-inverse":`border-text-inverse/30 text-foreground-inverse ring-text-inverse/20 checked:border-text-inverse checked:bg-text-inverse`,dark:`border-neutral-800/30 text-neutral-800 ring-neutral-800/20 checked:border-neutral-800 checked:bg-neutral-800`,error:`border-error/30 text-error ring-error/20 checked:border-error checked:bg-error`,success:`border-success/30 text-success ring-success/20 checked:border-success checked:bg-success`,custom:`border-custom/30 text-custom ring-custom/20 checked:border-custom checked:bg-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`text`,validationStyleEnabled:`disabled`,size:`md`}}),IW=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>L(`input`,{type:`checkbox`,className:W(FW({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),LW=e=>{let{label:t,name:n,id:r}=e;return t?L(`label`,{htmlFor:r??n,className:W(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[L(IW,{id:r??n,...e}),t]}):L(IW,{id:r??n,...e})},RW=e=>L(Lz,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:vO,...e}),zW=e=>L(Lz,{id:e.name,"data-testid":e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,Element:uO,...e}),BW={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"en-GB":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"fr":{"titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire.","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keyInvalidTypeError":"La clé doit être une chaîne valide.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","descriptionInvalidTypeError":"La description doit être une chaîne valide.","requiredErrorProjectId":"Veuillez sélectionner un projet","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","locationRequiredError":"Veuillez sélectionner un emplacement","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide"},"es":{"titleRequiredError":"Por favor, ingrese un nombre para su diccionario.","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keyInvalidTypeError":"La clave debe ser una cadena válida.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","requiredErrorProjectId":"Por favor, seleccione un proyecto","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","locationRequiredError":"Por favor, seleccione una ubicación","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida"},"de":{"titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein.","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","locationRequiredError":"Bitte wählen Sie einen Standort aus","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein"},"ja":{"titleRequiredError":"辞書の名前を入力してください。","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","keyMinLengthError":"キーは4文字以上でなければなりません。","descriptionRequiredError":"辞書の説明を入力してください。","descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","requiredErrorProjectId":"プロジェクトを選択してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","locationRequiredError":"場所を選択してください","locationInvalidTypeError":"有効な場所を選択してください","filePathRequiredError":"ファイルパスを入力してください","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります"},"ko":{"titleRequiredError":"사전 이름을 입력하세요.","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","requiredErrorProjectId":"프로젝트를 선택하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","locationRequiredError":"위치를 선택하세요","locationInvalidTypeError":"유효한 위치를 선택하세요","filePathRequiredError":"파일 경로를 입력하세요","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다"},"zh":{"titleRequiredError":"请输入您词典的名称。","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","keyRequiredError":"请输入您词典的键。","keyInvalidTypeError":"关键字必须是有效的字符串。","keySpaceError":"关键字不能包含空格或特殊字符。","keyMinLengthError":"键必须至少为4个字符。","descriptionRequiredError":"请输入您词典的描述。","descriptionInvalidTypeError":"描述必须是有效的字符串。","requiredErrorProjectId":"请选择一个项目","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","locationRequiredError":"请选择一个位置","locationInvalidTypeError":"请选择有效的位置","filePathRequiredError":"请输入文件路径","filePathInvalidTypeError":"文件路径必须是有效的字符串"},"it":{"titleRequiredError":"Si prega di inserire un nome per il proprio dizionario.","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","requiredErrorProjectId":"Si prega di selezionare un progetto","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","locationRequiredError":"Si prega di selezionare una posizione","locationInvalidTypeError":"Si prega di selezionare una posizione valida","filePathRequiredError":"Si prega di inserire un percorso del file","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida"},"pt":{"titleRequiredError":"Por favor, insira um nome para o seu dicionário.","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keyInvalidTypeError":"A chave deve ser uma string válida.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","descriptionInvalidTypeError":"A descrição deve ser uma string válida.","requiredErrorProjectId":"Por favor, selecione um projeto","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","locationRequiredError":"Por favor, selecione um local","locationInvalidTypeError":"Por favor, selecione um local válido","filePathRequiredError":"Por favor, insira um caminho de arquivo","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida"},"hi":{"titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","locationRequiredError":"कृपया एक स्थान चुनें","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए"},"ar":{"titleRequiredError":"يرجى إدخال اسم لقاموسك.","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","requiredErrorProjectId":"يرجى اختيار مشروع","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","locationRequiredError":"يرجى اختيار موقع","locationInvalidTypeError":"يرجى اختيار موقع صالح","filePathRequiredError":"يرجى إدخال مسار الملف","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة"},"ru":{"titleRequiredError":"Пожалуйста, введите название вашего словаря.","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","descriptionInvalidTypeError":"Описание должно быть правильной строкой.","requiredErrorProjectId":"Пожалуйста, выберите проект","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","locationRequiredError":"Пожалуйста, выберите местоположение","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","filePathRequiredError":"Пожалуйста, введите путь к файлу","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой"}}}`),title:`Dictionary details validation schema`,description:`Validation schema for the dictionary details form, including error messages for fields such as title, key, description, project and tags.`,tags:[`form validation`,`dictionary schema`,`error messages`],location:`local`,localId:`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`},VW=e=>{let{titleRequiredError:t,titleInvalidTypeError:n,titleMinLengthError:r,keyRequiredError:i,keyInvalidTypeError:a,keySpaceError:o,keyMinLengthError:s,descriptionRequiredError:c,descriptionInvalidTypeError:l,requiredErrorProjectId:u,invalidTypeErrorProjectId:d,invalidTypeErrorTags:f,locationRequiredError:p,locationInvalidTypeError:m,filePathRequiredError:h,filePathInvalidTypeError:g}=qi(BW);return UV({title:qV(zV({error:e=>e.input===void 0?t.value:n.value}).check(ZV(e=>e.length===0||e.length>=4,{error:r.value}))),key:YV(zV({error:e=>e.input===void 0?i.value:a.value}).check(PV(4,{error:s.value}),FV(/^[a-zA-Z0-9-_]+$/,{error:o.value})),``),description:qV(zV({error:e=>e.input===void 0?c.value:l.value})),projectIds:YV(VV(zV({error:e=>e.input===void 0?u.value:d.value})),[e]),tags:YV(VV(zV({error:()=>f.value})),[]),location:qV(GV([`local`,`remote`,`hybrid`,`plugin`],{error:e=>e.input===void 0?p.value:m.value})),importMode:qV(GV([`static`,`dynamic`,`fetch`])),filePath:qV(zV({error:e=>e.input===void 0?h.value:g.value}))})};D();var HW=[`collection`,`variant`],UW=e=>{let t=[];return e.item!==void 0&&t.push(`collection`),e.variant!==void 0&&t.push(`variant`),t},WW=[`remote`,`local`,`hybrid`,`plugin`],GW=e=>WW.includes(e),KW=e=>e===void 0?`remote`:GW(e)?e:`plugin`,qW=({dictionary:e,mode:t,onSelectSibling:r})=>{let{session:i}=oD(),{project:a}=i??{},{data:o,isLoading:s}=yD(),{data:c}=bD(),l=o?.data??[],u=c?.data??[],d=VW(String(a?.id)),{form:f,isSubmitting:p}=nB(d,{defaultValues:{...e,location:KW(e.location)}}),{editedContent:m,setEditedDictionary:h}=LE(),{titleInput:g,keyInput:_,descriptionInput:v,projectInput:y,tagsSelect:b,locationSelect:x,importModeSelect:S,filePathInput:C,auditButton:w,qualifierSection:T,siblingDictionaries:E,typeSwitch:D}=qi(PW),{mutate:O,isPending:k}=dD(),A=m?.[e.localId],{data:j,isLoading:P}=mD({keys:[e.key]},{enabled:!!e.key}),F=n(()=>(j?.data??[]).filter(t=>t.localId!==e.localId),[j,e.localId]),I=n(()=>F.filter(e=>e.item!==void 0).sort((e,t)=>(e.item??0)-(t.item??0)),[F]),R=n(()=>F.filter(e=>e.variant!==void 0),[F]),ee=n(()=>e.item===void 0?I:[e,...I].sort((e,t)=>(e.item??0)-(t.item??0)),[e,I]),z=n(()=>e.variant===void 0?R:[e,...R],[e,R]);M(()=>{f.reset({...e,tags:e.tags??[],location:KW(e.location)}),ae(UW(e)),se(e.item??1),le(QV(e.variant)),de(!1),pe(!1)},[e,f?.reset]),M(()=>{A===void 0&&f.reset({...e,tags:e.tags??[],location:KW(e.location)})},[A]);let te=()=>{let t={...e,...A};O({fileContent:JSON.stringify(t)},{onSuccess:e=>{if(!e?.data)return;let n=e.data.fileContent,r={...t,...n,tags:n.tags??t.tags??[]};h(r),f.reset({...r,location:KW(r.location)})}})},B=gR({control:f.control,name:`location`}),ne=B===`local`||B===`hybrid`,re=F.length>0,[ie,ae]=N(()=>UW(e)),[oe,se]=N(e.item??1),[ce,le]=N(QV(e.variant)),[ue,de]=N(!1),[fe,pe]=N(!1),me=n(()=>[...I,...R],[I,R]),he=t=>{let n=[t].flat(),r=n.filter(e=>!ie.includes(e)),i=ie.filter(e=>!n.includes(e)),a={...e,...A??{}};for(let e of i)e===`collection`&&(a={...a,item:void 0}),e===`variant`&&(a={...a,variant:void 0});for(let e of r)if(e===`collection`){let e=ee.length>0?Math.max(...ee.map(e=>e.item??0))+1:1;se(e),a={...a,item:e}}else if(e===`variant`){let e=ce||`default`;le(e),a={...a,variant:$V(e).variant}}ae(n),h(a),de(!1),n.length===0&&me.length>0?pe(!0):pe(!1)};return L(rB,{className:`flex w-full flex-col gap-8`,...f,schema:d,children:[L(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[L(RW,{name:`key`,label:_.label,placeholder:_.label.value,description:_.description,disabled:p,isRequired:!0,onSave:t=>{f.setValue(`key`,t,{shouldDirty:!0}),h({...e,...A??{},key:t})}}),L(RW,{name:`title`,label:g.label,placeholder:g.placeholder.value,description:g.description,disabled:p,onSave:t=>{f.setValue(`title`,t,{shouldDirty:!0}),h({...e,...A??{},title:t})}})]}),L(zW,{name:`description`,label:v.label,placeholder:v.placeholder.value,description:v.description,disabled:p,onSave:t=>{f.setValue(`description`,t,{shouldDirty:!0}),h({...e,...A??{},description:t})}}),L(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[L(Tz,{control:f.control,name:`location`,render:({field:n})=>{let r=n.value,i=r===`local`||r===`hybrid`,a=r===`remote`||r===`hybrid`,o=t=>{if(!t&&!a)return;let r=t?a?`hybrid`:`local`:`remote`;n.onChange(r);let i=t?f.getValues(`filePath`)??e.filePath:void 0;t||f.setValue(`filePath`,void 0),h({...e,...A??{},location:r,filePath:i})},s=t=>{if(!t&&!i)return;let r=t?i?`hybrid`:`remote`:`local`;n.onChange(r),h({...e,...A??{},location:r})};return L(AL,{className:`flex flex-col gap-2 px-1`,children:[L(Nz,{className:`ms-1`,children:x.label}),L(`div`,{className:`ms-2 flex items-center gap-4 py-2`,children:[L(LW,{id:`location-local`,name:`location-local`,label:x.local.value,color:`text`,checked:i,disabled:!t.includes(`local`)&&!t.includes(`remote`),onChange:e=>o(e.target.checked)}),L(LW,{id:`location-remote`,name:`location-remote`,label:x.remote.value,color:`text`,checked:a,disabled:!t.includes(`remote`)&&e.location!==`remote`&&e.location!==`hybrid`,onChange:e=>s(e.target.checked)})]}),L(Oz,{children:x.testDescription}),L(kz,{})]})}}),L(hb,{mode:`wait`,children:ne&&L(ax.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},children:L(Rz,{name:`filePath`,label:C.label.value,placeholder:C.placeholder.value,description:C.description.value,disabled:p||!ne,onChange:t=>{let n=t.target.value;h({...e,...A??{},filePath:n})}})},`filePath-input`)})]}),L(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:L(Hz,{name:`importMode`,label:S.label.value,description:S.description.value,onValueChange:t=>{f.setValue(`importMode`,t,{shouldDirty:!0}),h({...e,...A??{},importMode:t})},children:[L(Z.Trigger,{children:L(Z.Value,{placeholder:S.label.value})}),L(Z.Content,{children:[L(Z.Item,{value:`static`,children:S.static.value}),L(Z.Item,{value:`dynamic`,children:S.dynamic.value}),L(Z.Item,{value:`live`,children:S.live.value})]})]})}),L(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[L(Bz,{name:`projectIds`,label:y.label.value,description:y.description,onValueChange:t=>{let n=[t].flat();f.setValue(`projectIds`,n,{shouldDirty:!0}),h({...e,...A??{},projectIds:n})},children:[L(kL.Trigger,{getBadgeValue:e=>l?.find(t=>String(t.id)===e)?.name??e,children:L(kL.Input,{placeholder:y.placeholder.value})}),L(kL.Content,{children:L(MD,{isLoading:s,children:L(kL.List,{children:l?.map(e=>L(kL.Item,{value:String(e.id),children:e.name},String(e.id)))})})})]}),L(Bz,{name:`tags`,label:b.label.value,description:b.description,onValueChange:t=>{let n=[t].flat();f.setValue(`tags`,n,{shouldDirty:!0}),h({...e,...A??{},tags:n})},children:[L(kL.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.key)===e)?.name??e,children:L(kL.Input,{placeholder:b.placeholder.value})}),L(kL.Content,{children:L(MD,{isLoading:s,children:L(kL.List,{children:u?.map(e=>L(kL.Item,{value:String(e.key),children:e.name??e.key},String(e.key)))})})})]})]}),L(OO,{className:`gap-4`,padding:`md`,roundedSize:`2xl`,background:`none`,border:!0,borderColor:`card`,children:[L(`div`,{className:`flex flex-col gap-1`,children:[L(`p`,{className:`ms-1 font-semibold text-sm`,children:D.label}),L(`p`,{className:`ms-1 text-muted text-xs`,children:D.description})]}),L(kL,{values:ie,onValueChange:he,className:`max-w-xs`,children:[L(kL.Trigger,{getBadgeValue:e=>e===`collection`?String(D.collection):e===`variant`?String(D.variant):e,children:L(kL.Input,{placeholder:D.label.value})}),L(kL.Content,{children:L(kL.List,{children:HW.map(e=>L(kL.Item,{value:e,children:D[e].value},e))})})]}),L(hb,{children:[ie.includes(`collection`)&&L(ax.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:L(`div`,{className:`flex flex-col gap-2 px-1`,children:[L(`label`,{htmlFor:`qualifier-item-value`,className:`ms-1 font-medium text-sm`,children:D.itemValueLabel}),L(iO,{id:`qualifier-item-value`,type:`number`,min:1,value:oe,placeholder:D.itemValuePlaceholder.value,onChange:t=>{let n=parseInt(t.target.value,10);!Number.isNaN(n)&&n>=1&&(se(n),h({...e,...A??{},item:n}))}})]})},`item-input`),ie.includes(`variant`)&&L(ax.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:L(`div`,{className:`flex flex-col gap-2 px-1`,children:[L(`label`,{htmlFor:`qualifier-variant-value`,className:`ms-1 font-medium text-sm`,children:D.variantValueLabel}),L(iO,{id:`qualifier-variant-value`,type:`text`,value:ce,placeholder:D.variantValuePlaceholder.value,onChange:t=>{let n=t.target.value;le(n);let{variant:r,error:i}=$V(n);de(i),i||h({...e,...A??{},variant:r})}}),ue&&L(`p`,{className:`ms-1 text-destructive text-xs`,children:D.variantJsonError})]})},`variant-input`),ie.length===0&&fe&&L(ax.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.2},children:L(OO,{background:`none`,border:!0,borderColor:`neutral`,roundedSize:`xl`,padding:`md`,className:`gap-3`,children:[L(`p`,{className:`font-medium text-sm`,children:D.disablePickerTitle}),L(`p`,{className:`text-muted text-xs`,children:D.disablePickerDescription}),L(`div`,{className:`flex flex-wrap gap-2`,children:me.map(e=>L(`button`,{type:`button`,onClick:()=>{r?.(e),pe(!1)},className:`cursor-pointer rounded-lg border border-border px-3 py-1 text-xs transition-colors hover:bg-text/10`,children:[e.variant!==void 0&&L(`span`,{children:[T.variant,`:`,` `,QV(e.variant)]}),e.item!==void 0&&L(`span`,{children:[T.item,`: `,e.item]})]},e.localId))})]})},`sibling-picker`)]})]}),L(OO,{className:`gap-4`,padding:`md`,roundedSize:`2xl`,background:`none`,border:!0,borderColor:`neutral`,children:[L(`p`,{className:`font-semibold text-sm`,children:E.title}),L(MD,{isLoading:P,children:[!re&&L(`p`,{className:`text-muted text-sm`,children:E.noSiblings}),ee.length>0&&L(`div`,{className:`flex flex-col gap-2`,children:[L(`p`,{className:`font-medium text-muted text-xs uppercase tracking-wide`,children:E.collectionItems}),L(YU,{currentPage:ee.findIndex(t=>t.localId===e.localId)+1||1,totalPages:ee.length,onPageChange:e=>{let t=ee[e-1];t&&r&&r(t)},showPrevNext:!0}),L(`div`,{className:`mt-1 flex flex-wrap gap-2`,children:ee.map(t=>{let n=t.localId===e.localId;return L(`button`,{type:`button`,onClick:()=>!n&&r?.(t),className:W(`rounded-lg px-3 py-1 text-xs transition-colors`,n?`bg-text font-semibold text-foreground-opposite`:`cursor-pointer border border-border hover:bg-text/10`),children:[E.itemIndex,` `,t.item]},t.localId)})})]}),z.length>0&&L(`div`,{className:`flex flex-col gap-2`,children:[L(`p`,{className:`font-medium text-muted text-xs uppercase tracking-wide`,children:E.variants}),L(`div`,{className:`flex flex-wrap gap-2`,children:z.map(t=>{let n=t.localId===e.localId;return L(`button`,{type:`button`,onClick:()=>!n&&r?.(t),className:W(`rounded-lg px-3 py-1 text-xs transition-colors`,n?`bg-text font-semibold text-foreground-opposite`:`cursor-pointer border border-border hover:bg-text/10`),children:QV(t.variant)},t.localId)})})]})]})]}),L(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:L(Y,{type:`button`,size:`icon-md`,label:w.label.value,Icon:lc,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:p||k,isLoading:k})})]})},JW={key:`copy-button`,content:{nodeType:`translation`,translation:{en:{label:`Copy content`},"en-GB":{label:`Copy content`},fr:{label:`Copier le contenu`},es:{label:`Copiar contenido`},de:{label:`Inhalt kopieren`},ja:{label:`コンテンツをコピー`},ko:{label:`콘텐츠 복사`},zh:{label:`复制内容`},it:{label:`Copia contenuto`},pt:{label:`Copiar conteúdo`},hi:{label:`सामग्री कॉपी करें`},ar:{label:`نسخ المحتوى`},ru:{label:`Копировать содержимое`}}},title:`Copy button label`,description:`Content declaration for the copy button label used to trigger the copy to clipboard action in the design system.`,tags:[`button component`,`design system`],location:`local`,localId:`copy-button::local::../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`};D();var YW=({content:e,onClick:t,...n})=>{let[r,i]=N(!1),[a,o]=N(!1),{label:s}=qi(JW),c=async n=>{t?.(n);try{o(!1);let t=typeof e==`function`?await e():e;await navigator.clipboard.writeText(t),i(!0)}catch(e){console.error(`Failed to copy text: `,e),o(!0)}};M(()=>{if(r||a){let e=setTimeout(()=>{i(!1),o(!1)},1e3);return()=>clearTimeout(e)}},[r,a]);let l=()=>r?`Content copied to clipboard`:a?`Failed to copy content`:n.label??s.value;return L(Y,{Icon:r?Cs:Ts,onClick:c,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:l(),...n,label:l(),"aria-describedby":r?`copy-success`:a?`copy-error`:void 0})};D();var XW=y(()=>En(()=>import(`./dist-DRjLHkdX.js`).then(e=>({default:e.Editor})),__vite__mapDeps([5,2]))),ZW=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=P(null),c=P(null),[l,u]=N({height:0,width:0}),d=n?`vs-dark-transparent`:`hc-light-theme`,f=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(d),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),u({height:n,width:s.current?.clientWidth??0})},p=r??(typeof e==`string`&&e.split(`
|
|
105
|
+
`).length>1);return L(`div`,{className:W(`relative size-full text-sm`,r&&`ms-0`),children:[i&&L(`div`,{className:`sticky top-5 z-10`,children:L(`div`,{className:W(`absolute inset-e-2 bottom-0 flex h-7 items-center`),children:L(YW,{content:e})})}),L(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:L(m,{fallback:L(MD,{}),children:L(XW,{...l,defaultLanguage:`typescript`,language:t,loading:L(MD,{}),defaultValue:String(e).replace(/\n$/,``),onMount:f,onChange:o,options:{contextmenu:!1,readOnly:a,cursorStyle:`line`,minimap:{enabled:!1},scrollbar:{vertical:`hidden`,verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:`off`,quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:p?`on`:`off`},theme:d,className:`my-2 rounded-md`})})})]})},QW=({dictionary:e,isDarkMode:t})=>{let{setEditedContent:n,editedContent:r}=LE(),i=e=>{try{return JSON.parse(e),!0}catch{return!1}},a=r?.[e.localId]?.content??e?.content;return L(ZW,{language:`json`,onChange:t=>{i(t??`{}`)&&n(e.localId,JSON.parse(t??`{}`))},isDarkMode:t,children:JSON.stringify(a,null,2)})},$W={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},"en-GB":{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},fr:{titleInput:{placeholder:`Entrez la clé de votre nœud`},deleteButton:{label:`Supprimer le nœud de la section`},addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`}},es:{titleInput:{placeholder:`Ingrese la clave de su nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`}},de:{titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`}},ja:{titleInput:{placeholder:`ノードのキーを入力してください`},deleteButton:{label:`セクションからノードを削除`},addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`}},ko:{titleInput:{placeholder:`노드의 키를 입력하세요`},deleteButton:{label:`섹션에서 노드를 제거`},addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`}},zh:{titleInput:{placeholder:`输入您节点的键`},deleteButton:{label:`从部分中移除节点`},addNodeButton:{label:`点击添加新节点`,text:`添加新节点`}},it:{titleInput:{placeholder:`Inserisci la chiave del tuo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`}},pt:{titleInput:{placeholder:`Insira a chave do seu nó`},deleteButton:{label:`Remover nó da seção`},addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`}},hi:{titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`}},ar:{titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`},deleteButton:{label:`إزالة العقدة من القسم`},addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`}},ru:{titleInput:{placeholder:`Введите ключ вашего узла`},deleteButton:{label:`Удалить узел из секции`},addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`}}}},title:`Structure view`,description:`Interface content for managing nodes within a structured view, including actions to add, remove, and identify nodes by key.`,tags:[`form`,`dictionary editor`,`structure management`],location:`local`,localId:`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`},eG={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,select:`Select`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,select:`Select`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,plural:`Pluriel`,gender:`Genre`,select:`Sélection`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,plural:`Plural`,gender:`Género`,select:`Selección`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Geschlecht`,select:`Auswahl`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,plural:`複数形`,gender:`性別`,select:`選択`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,plural:`복수`,gender:`성별`,select:`선택`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,plural:`复数`,gender:`性别`,select:`选择`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,plural:`Plurale`,gender:`Genere`,select:`Selezione`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,plural:`Plural`,gender:`Gênero`,select:`Seleção`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,plural:`बहुवचन`,gender:`लिंग`,select:`चयन`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,plural:`جمع`,gender:`جنس`,select:`تحديد`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,plural:`Множественное число`,gender:`Пол`,select:`Выбор`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},title:`Node type selector`,description:`Defines the available node types that can be selected for content modeling, including text, number, boolean, object structures, arrays, and other specialized types like enumeration, gender, condition, and markdown.`,tags:[`content modeling`,`field type`,`editor`],location:`local`,localId:`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`};D();var tG=({section:e,onValueChange:t})=>{let{multilingual:n,text:r,number:i,boolean:a,node:o,array:s,enumeration:c,plural:l,triggerPlaceHolder:u,nest:d,gender:f,select:p,condition:m,markdown:h,insertion:g,reactNode:_,file:v}=qi(eG),y=Gi(e),[b,x]=N(y);return L(Z,{value:b,onValueChange:e=>{x(e),t(e)},children:[L(Z.Trigger,{children:L(Z.Value,{placeholder:u})}),L(Z.Content,{children:[L(Z.Item,{value:lr,children:n}),L(Z.Item,{value:Cr,children:r}),L(Z.Item,{value:wr,children:i}),L(Z.Item,{value:Tr,children:a}),L(Z.Item,{value:hr,children:o}),L(Z.Item,{value:gr,children:s}),L(Z.Item,{value:ur,children:c}),L(Z.Item,{value:dr,children:l}),L(Z.Item,{value:Er,children:f}),L(Z.Item,{value:Dr,children:p}),L(Z.Item,{value:pr,children:g}),L(Z.Item,{value:xr,children:h}),L(Z.Item,{value:_r,children:d}),L(Z.Item,{value:fr,children:m}),L(Z.Item,{value:vr,disabled:!0,children:_}),L(Z.Item,{value:mr,children:v})]})]})},nG=({section:e,dictionaryLocalId:t,keyPath:n,onNodeTypeChange:r})=>{let i=VE()?.internationalization?.locales??[],a=Gi(e),o=Vi(e),s=e=>{r(zi(a,i,e))};if(a===`translation`||a===`condition`||a===`gender`||a===`select`||a===`enumeration`||a===`plural`){let c=Object.keys(e[a])[0],l=[...n,{type:a,key:c}];return L(`div`,{className:`flex w-full flex-col gap-1`,children:[L(tG,{section:e,onValueChange:e=>r(zi(e,i))}),L(nG,{section:o,keyPath:l,dictionaryLocalId:t,onNodeTypeChange:s})]})}if(a===`array`){let c=[...n,{type:a,key:0}];return L(`div`,{className:`flex w-full flex-col gap-1`,children:[L(tG,{section:e,onValueChange:e=>r(zi(e,i))}),L(nG,{section:o,keyPath:c,dictionaryLocalId:t,onNodeTypeChange:s})]})}return a===`object`?L(d,{children:[L(tG,{section:e,onValueChange:e=>r(zi(e,i))}),L(`div`,{className:`ms-10 mt-6`,children:L(aG,{keyPath:n,section:e,dictionaryLocalId:t})})]}):L(tG,{section:e,onValueChange:e=>r(zi(e,i))})},rG=({sectionKey:e,section:t,keyPath:n,dictionaryLocalId:r})=>{let{focusedContent:i,setFocusedContentKeyPath:a}=qE(),{renameEditedContent:o,addEditedContent:s}=IE(),{titleInput:c,deleteButton:l}=qi($W),u=e=>{o(r,e,n);let t=n.slice(0,-1),i=n[n.length-1],s=[...t,{...i,key:e}];a(s)};return L(OO,{transparency:`xl`,roundedSize:`2xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":Zn(n,i?.keyPath??[]),onClick:()=>a(n),children:L(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof e==`string`&&L(`div`,{className:`w-full`,children:[L(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[L(vO,{name:`key`,"aria-label":`Key`,placeholder:c.placeholder.value,defaultValue:e,onSave:e=>u(e),variant:`invisible`}),L(Y,{label:l.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:ac,onClick:()=>{s(r,void 0,n);let e=n.slice(0,-1);a(e)}})]}),L(`span`,{className:`ms-3 text-muted-foreground text-sm`,children:[`( `,Si(e),` )`]})]}),L(nG,{keyPath:n,dictionaryLocalId:r,section:t,onNodeTypeChange:e=>{s(r,e,n)}})]})})},iG=({section:e,keyPath:t,dictionaryLocalId:n})=>{let{addNodeButton:r}=qi($W),{setFocusedContentKeyPath:i}=qE(),{addEditedContent:a}=IE();return!e||typeof e!=`object`?L(`div`,{children:`Not an object`}):L(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[L(`ul`,{className:`me-auto flex flex-col gap-4`,children:Object.keys(e).map(r=>L(`li`,{className:`flex w-full`,children:L(rG,{sectionKey:r,section:e?.[r],keyPath:[...t,{type:hr,key:r}],dictionaryLocalId:n})},`${JSON.stringify(t)}-object-${r}`))}),L(Y,{label:r.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:qs,className:`flex-1`,onClick:()=>{let e=[...t,{type:hr,key:`newKey`}];a(n,``,e),i(e)},children:r.text})]})},aG=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?L(rG,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):L(iG,{section:e,keyPath:t,dictionaryLocalId:n}),oG=({dictionary:e})=>{let{content:t,localId:n}=e,{editedContent:r}=LE();return L(rG,{section:r?.[n]?.content===void 0?t:r?.[n]?.content,keyPath:[],dictionaryLocalId:n})};D();var sG=({dictionary:e,onClickDictionaryList:t,isDarkMode:n,mode:r,onDelete:i,onSave:a,showReturnButton:o=!0,rightContent:s})=>{let c=VE(),{returnToDictionaryList:l}=qi(OW),{focusedContent:u,setFocusedContent:d}=qE(),{setLocaleDictionary:f}=KT(),[p,m]=N(`content`);return M(()=>{d({...u??{},dictionaryKey:e.key,dictionaryLocalId:e.localId}),f(e)},[]),L(ck,{availableLocales:c?.internationalization?.locales??[],children:L(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[o&&L(Y,{onClick:t,variant:`hoverable`,className:`z-10 ms-5 me-auto mb-6 shrink-0`,color:`text`,Icon:as,label:l.label.value,children:l.text}),L(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[L(`div`,{className:`sticky top-0 z-10 flex shrink-0 gap-3 rounded-xl bg-background/20 p-3 pb-4`,children:[L(NW,{selectedChoice:p,tabs:[...r.includes(`remote`)?[L(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":p===`details`,onClick:()=>m(`details`),type:`button`,children:`Details`},`details`)]:[],L(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":p===`structure`,onClick:()=>m(`structure`),type:`button`,children:`Structure`},`structure`),L(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":p===`content`,onClick:()=>m(`content`),type:`button`,children:`Content`},`content`),L(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":p===`json`,onClick:()=>m(`json`),type:`button`,children:`JSON`},`json`)],hoverable:!0,color:`text`}),L(`div`,{className:`flex w-full items-center justify-end`,children:s})]}),L(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:L(`div`,{className:`flex w-full min-w-0 flex-col items-stretch gap-6`,children:[r.includes(`remote`)&&p===`details`&&L(qW,{dictionary:e,mode:r}),p===`structure`&&L(oG,{dictionary:e}),p===`content`&&L($U,{dictionary:e}),p===`json`&&L(QW,{dictionary:e,isDarkMode:n})]})})]}),L(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:L(OO,{color:`card`,roundedSize:`2xl`,padding:`sm`,className:`w-full shrink-0 flex-row flex-wrap items-center justify-end gap-10 bg-background/20 md:bottom-0`,children:[L(AW,{text:e.id,className:`text-nowrap text-muted-foreground text-sm`,size:9,children:e.id}),L(DW,{dictionary:e,mode:r,onDelete:()=>{d(null),i?.()},onSave:a})]})})]})})};D();var cG=C(null),lG=e=>{let t=l(cG)??e;return{triggerId:`unrollable-panel-button-${t}`,panelId:`unrollable-panel-${t}`}},uG=({children:e,className:t,identifier:n,...r})=>{let i=`${n}${g()}`,{triggerId:a}=lG(i);return L(cG,{value:i,children:L(`div`,{className:W(`group/popover relative flex cursor-pointer`,t),id:a,"aria-haspopup":!0,...r,children:e})})},dG=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:a=`below`,identifier:o,className:s,displayArrow:c=!0,...l})=>{let{triggerId:u,panelId:d}=lG(o);return L(OO,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":u,id:d,className:W(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`inset-s-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`inset-e-0`,a===`below`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:inset-s-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:inset-e-2`,c&&a===`below`&&`before:-top-2.5 before:border-s-[10px] before:border-s-transparent before:border-e-[10px] before:border-e-transparent before:border-b-[10px] before:border-b-neutral`,c&&a===`above`&&`before:-bottom-2.5 before:border-s-[10px] before:border-s-transparent before:border-e-[10px] before:border-e-transparent before:border-t-[10px] before:border-t-neutral`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,s),...l,children:e})};uG.Detail=dG,D();var fG=16,pG=16,mG=e=>L(uG,{...e}),hG=({xAlign:e=`start`,yAlign:t=`below`,...n})=>{let r=P(null),{triggerId:i}=lG(n.identifier),[a,o]=N(e),[s,c]=N(t),[l,u]=N(void 0);return F(()=>{let n=null,a=null,s=!1,l=()=>{let n=r.current,s=document.getElementById(i);if(!n||!s)return;let l=s.getBoundingClientRect(),d=window.innerWidth,f=window.innerHeight,p=d-l.left-pG,m=l.right-pG;u(Math.max(p,m));let h=n.classList.contains(`invisible`);h&&(n.style.visibility=`hidden`,n.classList.remove(`invisible`)),a=HD(()=>{a=null;let r=n.getBoundingClientRect();h&&(n.style.visibility=``,n.classList.add(`invisible`));let i=t,u=f-l.bottom-fG,p=l.top-fG;t===`below`&&u<r.height?p>=r.height&&(i=`above`):t===`above`&&p<r.height&&u>=r.height&&(i=`below`);let m=e,g=d-l.left-pG,_=l.right-pG,v=getComputedStyle(s).direction===`rtl`,y=v?_:g,b=v?g:_;e===`start`&&y<r.width?b>=r.width&&(m=`end`):e===`end`&&b<r.width&&y>=r.width&&(m=`start`),c(i),o(m)})},d=()=>{n||=HD(()=>{n=null,l()})},f=()=>{s||(s=!0,window.addEventListener(`scroll`,d,{passive:!0,capture:!0})),d()},p=()=>{s&&(s=!1,window.removeEventListener(`scroll`,d,!0))},m=document.getElementById(i);m&&(m.addEventListener(`mouseenter`,f,{passive:!0}),m.addEventListener(`focusin`,f,{passive:!0}),m.addEventListener(`mouseleave`,p,{passive:!0}),m.addEventListener(`focusout`,p,{passive:!0}));let h=new ResizeObserver(()=>{s&&d()});return r.current&&h.observe(r.current),window.addEventListener(`resize`,d,{passive:!0}),()=>{n?.(),a?.(),m&&(m.removeEventListener(`mouseenter`,f),m.removeEventListener(`focusin`,f),m.removeEventListener(`mouseleave`,p),m.removeEventListener(`focusout`,p)),h.disconnect(),window.removeEventListener(`resize`,d),window.removeEventListener(`scroll`,d,!0)}},[i,e,t]),L(dG,{...n,xAlign:a,yAlign:s,ref:r,style:{...n.style,maxWidth:l?`${l}px`:void 0}})},gG=mG;gG.Detail=hG,D();var _G=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;isOpen=e=>!!this.drawers[e];open=e=>{this.drawers[e]||(this.drawers={...this.drawers,[e]:!0},this.emit())};close=e=>{this.drawers[e]&&(this.drawers={...this.drawers,[e]:!1},this.emit())};set=e=>{let t=!1,n={...this.drawers};for(let[r,i]of Object.entries(e))n[r]!==i&&(n[r]=i,t=!0);t&&(this.drawers=n,this.emit())};emit=()=>{this.listeners.forEach(e=>{e()})}},vG={open:_G.open,close:_G.close,set:_G.set},yG=()=>!1,bG=()=>vG,xG=e=>{let t=i(()=>_G.isOpen(e),[e]);return k(_G.subscribe,t,yG)},SG={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{goBack:`Go back`,closeDrawer:`Close Drawer`},"en-GB":{goBack:`Go back`,closeDrawer:`Close Drawer`},fr:{goBack:`Retour`,closeDrawer:`Fermer le tiroir`},es:{goBack:`Volver`,closeDrawer:`Cerrar cajón`},de:{goBack:`Zurück`,closeDrawer:`Schublade schließen`},ja:{goBack:`戻る`,closeDrawer:`引き出しを閉じる`},ko:{goBack:`뒤로`,closeDrawer:`서랍 닫기`},zh:{goBack:`返回`,closeDrawer:`关闭抽屉`},it:{goBack:`Indietro`,closeDrawer:`Chiudi cassetto`},pt:{goBack:`Voltar`,closeDrawer:`Fechar gaveta`},hi:{goBack:`वापस जाएं`,closeDrawer:`दराज बंद करें`},ar:{goBack:`رجوع`,closeDrawer:`إغلاق الدرج`},ru:{goBack:`Назад`,closeDrawer:`Закрыть панель`}}},title:`Right Drawer`,description:`Localized UI strings for the Right Drawer component (labels: "Go back" and "Close Drawer").`,tags:[`component`,`right-drawer`,`ui`,`localization`],location:`local`,localId:`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`};D();var CG={xs:480,sm:640,md:768,lg:1024,xl:1280,"2xl":1536},wG=e=>typeof e==`number`?e:CG[e]??CG.md,TG=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},EG=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},DG=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},OG=Object.freeze({isMobileScreen:void 0,isMobileUserAgent:void 0,isMobile:void 0,isIOS:void 0,isMac:void 0}),kG,AG=()=>(kG??={isMobileUserAgent:TG(),isIOS:EG(),isMac:DG()},kG),jG=new Map,MG=e=>{let t=window.matchMedia(`(max-width: ${e}px)`),n=new Set,r=e=>({...AG(),isMobileScreen:e,isMobile:e}),i=r(t.matches),a=e=>i.isMobileScreen!==e&&(i=r(e),!0),o=e=>{if(a(e.matches))for(let e of n)e()};return{subscribe:e=>(n.size===0&&(a(t.matches),t.addEventListener(`change`,o)),n.add(e),()=>{n.delete(e),n.size===0&&t.removeEventListener(`change`,o)}),getSnapshot:()=>i}},NG=e=>{let t=jG.get(e);if(t)return t;let n=MG(e);return jG.set(e,n),n},PG=()=>OG,FG=(e=`md`)=>{let t=wG(e),n=i(e=>NG(t).subscribe(e),[t]),r=i(()=>NG(t).getSnapshot(),[t]);return k(n,r,PG)};D();var IG=e=>e.split(` + `).map(e=>e.trim()),LG=e=>({"⌘":`Meta`,Ctrl:`Control`,Control:`Control`,Alt:`Alt`,"⌥":`Alt`,Shift:`Shift`,Meta:`Meta`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`})[e]||e,RG=(e,t)=>{let n=t.map(LG),r={Meta:n.includes(`Meta`),Control:n.includes(`Control`),Alt:n.includes(`Alt`),Shift:n.includes(`Shift`)};if(r.Meta!==e.metaKey||r.Control!==e.ctrlKey||r.Alt!==e.altKey||r.Shift!==e.shiftKey)return!1;let i=t.find(e=>![`⌘`,`Ctrl`,`Control`,`Alt`,`⌥`,`Shift`,`Meta`].includes(LG(e)));if(!i)return!1;let a=LG(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},zG=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,BG=(e,t)=>{let n=e;return t?(n=n.replace(/Ctrl/g,`⌘`),n=n.replace(/Alt/g,`⌥`)):(n=n.replace(/⌘/g,`Ctrl`),n=n.replace(/⌥/g,`Alt`)),n=n.replace(/ArrowUp/g,`↑`),n=n.replace(/ArrowDown/g,`↓`),n=n.replace(/ArrowLeft/g,`←`),n=n.replace(/ArrowRight/g,`→`),n},VG=({shortcut:e,onTriggered:t,display:r=!0,disabled:i=!1,className:a,size:o=`md`})=>{let{isMac:s}=FG(),c=BG(e,s??!1),l=n(()=>IG(c),[c]),[u,d]=N(new Set);if(M(()=>{let e=e=>{let n=e.target,r=n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.isContentEditable,a=e.key,o=new Set;if(e.metaKey&&o.add(`⌘`),e.ctrlKey&&o.add(`Ctrl`),e.altKey&&o.add(s?`⌥`:`Alt`),e.shiftKey&&o.add(`Shift`),a.startsWith(`Arrow`)?(o.add(a),o.add(zG(a))):o.add(a.toUpperCase()),d(o),!i&&t&&RG(e,l)){let n=l.includes(`Escape`);if(r&&!n)return;e.preventDefault(),t()}},n=()=>{d(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,n),window.addEventListener(`blur`,n),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,n),window.removeEventListener(`blur`,n)}},[l,t,s,i]),!r)return null;let f=e=>{let t=e.toUpperCase(),n=LG(e);return u.has(e)||u.has(t)||u.has(n)||e===`⌘`&&u.has(`Meta`)||e===`Ctrl`&&u.has(`Control`)||e===`⌥`&&u.has(`Alt`)||e===`Alt`&&u.has(`Alt`)||e===`←`&&u.has(`ArrowLeft`)||e===`→`&&u.has(`ArrowRight`)||e===`↑`&&u.has(`ArrowUp`)||e===`↓`&&u.has(`ArrowDown`)};return L(`kbd`,{className:W(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 text-neutral`,o===`sm`&&`text-xs`,o===`md`&&`text-sm`,o===`lg`&&`text-base`,a),children:l.map((t,n)=>{let r=`${t}-${n}-${e}`,i=zG(t);return L(`span`,{className:`inline-flex items-center`,children:[n>0&&L(`span`,{className:`text-neutral/50`,children:`+`}),L(`span`,{className:W(`min-w-4 px-0.5 text-center`,f(t)&&`scale-120 font-bold text-foreground`),suppressHydrationWarning:!0,children:i})]},r)})})},HG=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,isDisabled:i=!1,className:a,...o})=>{let s=t&&!i;return L(`div`,{className:W(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-[grid-template-columns] duration-500 ease-in-out`,s?``:`grid-cols-[1fr]`,a),"aria-hidden":s,inert:s?!0:void 0,...o,children:L(`div`,{style:{minWidth:`${n}px`},className:W(r===`right`&&`ms-auto`),children:e})})},UG=e=>{let t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){let n=t.left+t.width/2,r=t.top+10,i=document.elementFromPoint(n,r);return e===i||e.contains(i)}return!1};D();var WG=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=qi(SG),{isMobile:f}=FG(`md`),p=P(null),m=P(null),h=tW(l),{open:g,close:_}=bG(),v=xG(t),y=v,[b,x]=N(!1);M(()=>{if(!y){x(!1);return}let e=0,t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>x(!0))});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[y]);let S=y&&b;iW({disableScroll:y,key:t?`right_drawer_${t}`:`right_drawer`}),M(()=>{if(!y)return;let e=e=>{try{if(!p.current)return;let n=a,r=e.target&&!p.current.contains(e.target),i=UG(p.current);(n&&r&&i||!e.target)&&(_(t),c?.())}catch{_(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[y,_,c,a,t]);let C=P(c);return M(()=>{C.current=c},[c]),M(()=>{s!==void 0&&s!==v&&(s?g(t):(_(t),C.current?.()))},[s,v,t,g,_]),h?E(L(`div`,{className:`fixed inset-e-0 top-0 z-50 flex h-full justify-end`,children:L(HG,{isHidden:!S,align:`right`,children:L(OO,{className:`relative flex h-screen w-screen flex-col border-s text-foreground md:w-100`,ref:p,roundedSize:`none`,borderColor:`neutral`,children:[L(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[L(`div`,{className:`flex justify-between gap-3`,children:[L(`div`,{children:o&&L(Y,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:hs,children:o?.text})}),L(`div`,{children:L(gG,{identifier:`close-drawer`,children:[L(Y,{variant:`hoverable`,color:`text`,label:`Close`,className:`ms-auto`,onClick:()=>{_(t),c?.()},Icon:dc,size:`icon-md`}),L(gG.Detail,{identifier:`close-drawer`,children:L(`div`,{className:`flex items-center gap-2 p-2`,children:[L(`span`,{className:`whitespace-nowrap text-muted-foreground text-xs`,children:u.closeDrawer}),L(VG,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{_(t),c?.()}})]})})]})})]}),e&&L(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),L(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:L(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&f&&(_(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),f&&(_(t),c?.()))},ref:m,role:`button`,tabIndex:0,children:n})}),i&&L(`div`,{className:`shrink-0`,children:i})]})})}),h):L(d,{})},GG=gc(`w-fit backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,xl:`rounded-xl`,xxl:`rounded-2xl`,xxxl:`rounded-3xl`,full:`rounded-full`},color:{success:`border-success bg-success/10 text-success`,error:`border-error bg-error/10 text-error`,warning:`border-warning bg-warning/10 text-warning`,neutral:`/10 border-neutral bg-neutral/10 text-neutral`,text:`border-text bg-text/10 text-foreground`,black:`border-black bg-black/10 text-black`,white:`border-white bg-white/10 text-white`},size:{xs:`border-[1.2px] px-2 py-0.5 text-xs`,sm:`border-[1.3px] px-2 py-0.5 text-sm`,md:`border-2 px-2 py-1 text-base`,lg:`border-2 px-3 py-2 text-lg`,xl:`border-2 px-3 py-2 text-xl`},border:{none:`border-none`,with:`border-[1.3px] border-text`},background:{none:`bg-none`,with:``}},defaultVariants:{roundedSize:`full`,border:`none`,color:`text`,size:`md`}}),KG=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>L(`div`,{className:GG({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e});p();var qG=e=>{let t=P(e??void 0);return e!=null&&(t.current=e),t.current},JG=`dictionaryList`;p();var YG=e=>`dictionary_edition_${e}`,XG=e=>{let t=YG(e),{open:n,close:r}=bG(),a=xG(t),{getEditedContentValue:o}=IE(),{focusedContent:s,setFocusedContent:c}=qE();return M(()=>{s?.dictionaryKey&&n(t)},[s?.dictionaryKey,n,t]),{isOpen:a,focusedContent:s,getEditedContentValue:o,close:i(()=>{r(t),c(e=>e?.dictionaryKey?{...e,keyPath:[]}:e??null)},[r,t,c])}};p();var ZG=({dictionaryKey:e,isDarkMode:t})=>{let{backButtonText:n,openDictionaryEditor:r,modalTitle:i,noDictionaryFocused:a,focusedDictionaryNotFound:o}=qi(AD),s=YG(e),{focusedContent:c,close:l}=XG(e),{setFocusedContent:u}=qE(),{open:f}=bG(),p=()=>f(JG),{data:m}=_D(),h=m,g=()=>{l(),u(null),p()},[_,v]=N(!1),y=()=>{v(!1),g()},b=qG(c?.dictionaryLocalId);if(!b)return L(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:a});let x=h?.[e]?.find(e=>e.localId===b);return x?L(WG,{identifier:s,backButton:{onBack:g,text:n.value},onClose:()=>{l(),u(null)},header:L(d,{children:[L(`header`,{className:`mb-5 flex w-full px-3`,children:[L(`h3`,{className:`w-full text-center text-lg`,children:x.title?x.title:x.key}),L(gG,{identifier:`open-dictionary-editor`,children:[L(Y,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Us,label:r.label.value,onClick:()=>v(!0)}),L(gG.Detail,{identifier:`open-dictionary-editor`,children:L(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:r.popoverContent})})]})]}),L(`div`,{className:`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dotted pb-3`,children:[L(KG,{color:`text`,roundedSize:`full`,size:`xs`,children:x.key}),x.filePath&&L(KG,{color:`neutral`,roundedSize:`full`,size:`xs`,children:x.filePath.split(`/`).pop()}),x.id&&L(KG,{color:`success`,roundedSize:`full`,size:`xs`,children:`remote`})]})]}),footer:L(DW,{dictionary:x,mode:[`local`,`remote`],className:`mb-4 flex-col px-3`,onDelete:g}),children:[L(EW,{isOpen:_,onClose:()=>v(!1),hasCloseButton:!0,title:i,size:`xl`,transparency:`lg`,className:`h-full`,children:L(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:L(sG,{dictionary:x,onClickDictionaryList:y,isDarkMode:t,mode:[`local`,`remote`],onDelete:()=>{v(!1),g()},onSave:()=>{v(!1)}})})}),L(TO,{dictionary:x})]}):L(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:o})},QG=({isDarkMode:e})=>{let{focusedContent:t}=qE(),n=qG(t?.dictionaryKey);return n?L(ZG,{dictionaryKey:n,isDarkMode:e}):L(d,{})},$G={key:`dictionary-list-drawer`,content:{nodeType:`translation`,translation:{en:{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},"en-GB":{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},fr:{drawerTitle:{label:`Liste des dictionnaires`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Ouvrir le dictionnaire dans l'éditeur {{dictionaryLocalId}}`}}},es:{drawerTitle:{label:`Lista de diccionarios`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir el diccionario en el editor {{dictionaryLocalId}}`}}},de:{drawerTitle:{label:`Wörterbuchliste`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Wörterbuch-Editor öffnen {{dictionaryLocalId}}`}}},ja:{drawerTitle:{label:`辞書リスト`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`辞書エディタを開く {{dictionaryLocalId}}`}}},ko:{drawerTitle:{label:`사전 목록`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`사전 편집기 열기 {{dictionaryLocalId}}`}}},zh:{drawerTitle:{label:`字典列表`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`打开字典编辑器 {{dictionaryLocalId}}`}}},it:{drawerTitle:{label:`Lista dei dizionari`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Apri editor dizionario {{dictionaryLocalId}}`}}},pt:{drawerTitle:{label:`Lista de dicionários`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir editor de dicionário {{dictionaryLocalId}}`}}},hi:{drawerTitle:{label:`शब्दकोश सूची`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`शब्दकोश संपादक खोलें {{dictionaryLocalId}}`}}},ar:{drawerTitle:{label:`قائمة القواميس`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`فتح محرر القاموس {{dictionaryLocalId}}`}}},ru:{drawerTitle:{label:`Список словарей`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Открыть редактор словаря {{dictionaryLocalId}}`}}}}},location:`local`,localId:`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`,filePath:`client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`};D();var eK=e=>{let{minChars:t=3,debounceMs:n=300,trim:r=!0,defaultValue:i,onSearch:a,onClear:o}=e??{},s=P(``),c=P(null),[l,u]=N(i??``),d=()=>{c.current&&=(clearTimeout(c.current),null)};return M(()=>()=>{d()},[]),{setSearch:e=>{s.current=e;let i=r?e.trim():e;if(d(),i.length<t){u(``),o?.();return}c.current=setTimeout(()=>{let e=r?s.current.trim():s.current;e.length>=t?(u(e),a?.(e)):(u(``),o?.())},n)},search:l,hasMinChars:l.length>=t}},tK=({className:e,...t})=>L(`div`,{className:`relative flex w-full items-center gap-1`,children:[L(rc,{className:`absolute inset-s-2 size-4`}),L(iO,{...t,type:`search`,className:W(`ps-8`,e)})]});p();var nK=()=>{let{drawerTitle:e,buttonLabel:t}=qi($G),{set:r}=bG(),{localeDictionaries:i}=GT(),{editedContent:a}=LE(),{setFocusedContent:o}=qE(),{setSearch:s,search:c}=eK(),l=n(()=>Object.values(i??{}),[i]),u=n(()=>new BU(l,{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[l]),d=n(()=>{let e=c?.trim()??``;return e===``?l:u.search(e).map(e=>e.item)},[c,u,l]),f=e=>{o({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),r({[JG]:!1,[YG(e.key)]:!0})},p=n(()=>new Set(Object.keys(a??{})),[a]);return L(WG,{title:e.label.value,identifier:JG,children:[L(`div`,{className:`p-3 pb-4`,children:L(tK,{placeholder:`Search dictionaries`,onChange:e=>s(e.currentTarget.value),type:`search`})}),L(`ul`,{className:`flex flex-col gap-1`,children:d.map(e=>L(`li`,{className:`w-full`,children:L(Y,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>f(e),variant:`hoverable`,color:`text`,IconRight:_s,size:`md`,isFullWidth:!0,Icon:p.has(e.localId)?Gs:void 0,children:L(`div`,{className:`flex items-center gap-2 py-1`,children:L(`div`,{className:`flex max-w-full flex-col gap-1`,children:[L(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[L(KG,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&L(KG,{color:`neutral`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&L(KG,{color:`success`,roundedSize:`full`,size:`xs`,children:`remote`})]}),L(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},rK={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} to edit the {{dictionaryKey}} dictionary`},longPress:`Long press`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + click`}},"en-GB":{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} to edit the {{dictionaryKey}} dictionary`},longPress:`Long press`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + click`}},fr:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} pour modifier le dictionnaire {{dictionaryKey}}`},longPress:`Appui long`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + clic`}},es:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} para editar el diccionario {{dictionaryKey}}`},longPress:`Pulsación larga`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + clic`}},de:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}}, um das Wörterbuch {{dictionaryKey}} zu bearbeiten`},longPress:`Lange drücken`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + Klick`}},ja:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} で {{dictionaryKey}} 辞書を編集`},longPress:`長押し`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + クリック`}},ko:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}}: {{dictionaryKey}} 사전 편집`},longPress:`길게 누르기`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + 클릭`}},zh:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} 以编辑 {{dictionaryKey}} 字典`},longPress:`长按`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + 点击`}},it:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} per modificare il dizionario {{dictionaryKey}}`},longPress:`Pressione prolungata`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + clic`}},pt:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} para editar o dicionário {{dictionaryKey}}`},longPress:`Pressão longa`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + clique`}},hi:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{dictionaryKey}} डिक्शनरी संपादित करने के लिए {{longPress}} / {{modifierClick}}`},longPress:`देर तक दबाएँ`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + क्लिक`}},ar:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}} لتعديل القاموس {{dictionaryKey}}`},longPress:`ضغط مطوّل`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + نقرة`}},ru:{message:{fields:[`longPress`,`modifierClick`,`dictionaryKey`],nodeType:`insertion`,insertion:`{{longPress}} / {{modifierClick}}, чтобы редактировать словарь {{dictionaryKey}}`},longPress:`Долгое нажатие`,modifierClick:{fields:[`modifierKey`],nodeType:`insertion`,insertion:`{{modifierKey}} + клик`}}}},location:`local`,localId:`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`,filePath:`client/src/components/Editor/LongPressMessage/index.content.ts`},iK=({children:e})=>L(`span`,{className:`mx-1 whitespace-nowrap rounded-md border border-neutral px-1.5`,children:e}),aK=()=>{let{message:e,longPress:t,modifierClick:n}=qi(rK),{isMac:r}=FG(),i=qT(JT.INTLAYER_HOVERED_CONTENT_CHANGED,null);return L(OO,{roundedSize:`2xl`,border:!0,borderColor:`neutral`,className:W(`ml-1 p-1 pr-2 text-sm text-text transition-opacity duration-100`,i?.dictionaryKey?`opacity-100`:`opacity-0`),children:L(`p`,{className:`text-sm text-text/50 leading-6`,children:i?.dictionaryKey?e({longPress:L(iK,{children:t}),modifierClick:L(iK,{children:n({modifierKey:r?`⌘`:`Ctrl`})}),dictionaryKey:L(`strong`,{className:`wrap-break-word mx-1`,children:i.dictionaryKey})}):``})})},oK=({children:e})=>L(`div`,{className:`relative size-full bg-card p-3`,children:[e,L(`div`,{className:`absolute inset-e-2 bottom-2`,children:L(aK,{})}),L(QG,{}),L(nK,{})]}),sK=3e3,cK=async e=>{try{return await fetch(e,{method:`HEAD`,mode:`no-cors`,cache:`no-store`}),{isRunning:!0}}catch(e){return{isRunning:!1,errorMessage:e instanceof Error?e.message:String(e)}}},lK=e=>{let{data:t,isPending:n,refetch:r}=$t({queryKey:[`application-status`,e],queryFn:()=>cK(e),enabled:!!e,retry:!1,staleTime:1/0,refetchOnWindowFocus:!1,refetchInterval:e=>e.state.data?.isRunning===!1&&sK});return{isChecking:n,isRunning:t?.isRunning===!0,errorMessage:t?.isRunning===!1?t.errorMessage:void 0,retry:r}};p();var uK=()=>{let[e,t]=N();return M(()=>{fetch(`/api/config`).then(e=>e.json()).then(e=>t(e.data))},[]),e},dK={key:`application-not-running-view`,content:{nodeType:`translation`,translation:{en:{title:`Your application is not accessible`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`The editor could not reach {{applicationUrl}}. Start your application, the editor will connect automatically.`},configurationTip:"If your application runs on another URL, update the `editor.applicationURL` field of your configuration.",retry:`Retry`,checkingApplicationStatus:`Checking application status`},"en-GB":{title:`Your application is not accessible`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`The editor could not reach {{applicationUrl}}. Start your application, the editor will connect automatically.`},configurationTip:"If your application runs on another URL, update the `editor.applicationURL` field of your configuration.",retry:`Retry`,checkingApplicationStatus:`Checking application status`},fr:{title:`Votre application n'est pas accessible`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`L'éditeur n'a pas pu joindre {{applicationUrl}}. Démarrez votre application, l'éditeur se connectera automatiquement.`},configurationTip:"Si votre application tourne sur une autre URL, mettez à jour le champ `editor.applicationURL` de votre configuration.",retry:`Réessayer`,checkingApplicationStatus:`Vérification de l'état de l'application`},es:{title:`Tu aplicación no está accesible`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`El editor no pudo acceder a {{applicationUrl}}. Inicie su aplicación, el editor se conectará automáticamente.`},configurationTip:"Si su aplicación se ejecuta en otra URL, actualice el campo `editor.applicationURL` de su configuración.",retry:`Reintentar`,checkingApplicationStatus:`Verificando el estado de la aplicación`},de:{title:`Ihre Anwendung ist nicht zugänglich`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`Der Editor konnte {{applicationUrl}} nicht erreichen. Starten Sie Ihre Anwendung, der Editor verbindet sich automatisch.`},configurationTip:"Wenn Ihre Anwendung unter einer anderen URL läuft, aktualisieren Sie das Feld `editor.applicationURL` Ihrer Konfiguration.",retry:`Erneut versuchen`,checkingApplicationStatus:`Status der Anwendung wird geprüft`},ja:{title:`アプリケーションにアクセスできません`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`エディターは {{applicationUrl}} に接続できませんでした。アプリケーションを起動すると、エディターが自動的に接続します。`},configurationTip:"アプリケーションが別の URL で実行されている場合は、設定の `editor.applicationURL` フィールドを更新してください。",retry:`再試行`,checkingApplicationStatus:`アプリケーションの状態を確認しています`},ko:{title:`애플리케이션에 접근할 수 없습니다`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`에디터가 {{applicationUrl}}에 연결할 수 없습니다. 애플리케이션을 시작하면 에디터가 자동으로 연결됩니다.`},configurationTip:"애플리케이션이 다른 URL에서 실행 중이라면 설정의 `editor.applicationURL` 필드를 업데이트하세요.",retry:`다시 시도`,checkingApplicationStatus:`애플리케이션 상태를 확인하고 있습니다`},zh:{title:`您的应用程序无法访问`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`编辑器无法访问 {{applicationUrl}}。启动您的应用程序后,编辑器将自动连接。`},configurationTip:"如果您的应用程序运行在其他 URL 上,请更新配置中的 `editor.applicationURL` 字段。",retry:`重试`,checkingApplicationStatus:`正在检查应用程序状态`},it:{title:`La tua applicazione non è accessibile`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`L'editor non è riuscito a raggiungere {{applicationUrl}}. Avvia la tua applicazione, l'editor si connetterà automaticamente.`},configurationTip:"Se la tua applicazione è in esecuzione su un altro URL, aggiorna il campo `editor.applicationURL` della configurazione.",retry:`Riprova`,checkingApplicationStatus:`Controllo dello stato dell'applicazione`},pt:{title:`Sua aplicação não está acessível`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`O editor não conseguiu acessar {{applicationUrl}}. Inicie sua aplicação, o editor se conectará automaticamente.`},configurationTip:"Se sua aplicação roda em outra URL, atualize o campo `editor.applicationURL` da sua configuração.",retry:`Tentar novamente`,checkingApplicationStatus:`Verificando o estado da aplicação`},hi:{title:`आपका एप्लिकेशन उपलब्ध नहीं है`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`एडिटर {{applicationUrl}} तक नहीं पहुँच सका। अपना एप्लिकेशन शुरू करें, एडिटर अपने आप कनेक्ट हो जाएगा।`},configurationTip:"यदि आपका एप्लिकेशन किसी अन्य URL पर चल रहा है, तो अपने कॉन्फ़िगरेशन का `editor.applicationURL` फ़ील्ड अपडेट करें।",retry:`पुनः प्रयास करें`,checkingApplicationStatus:`एप्लिकेशन की स्थिति की जांच हो रही है`},ar:{title:`تطبيقك غير متاح`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`تعذر على المحرر الوصول إلى {{applicationUrl}}. شغّل تطبيقك، وسيتصل المحرر تلقائيًا.`},configurationTip:"إذا كان تطبيقك يعمل على عنوان URL آخر، فحدّث الحقل `editor.applicationURL` في الإعدادات.",retry:`إعادة المحاولة`,checkingApplicationStatus:`جارٍ التحقق من حالة التطبيق`},ru:{title:`Ваше приложение недоступно`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`Редактору не удалось подключиться к {{applicationUrl}}. Запустите приложение, и редактор подключится автоматически.`},configurationTip:"Если приложение работает по другому URL, обновите поле `editor.applicationURL` в конфигурации.",retry:`Повторить`,checkingApplicationStatus:`Проверка состояния приложения`}}},title:`Application not running view`,description:`Shown by the standalone editor when the configured application URL does not answer.`,location:`local`,localId:`application-not-running-view::local::client/src/components/Editor/ApplicationNotRunningView/applicationNotRunningView.content.ts`,filePath:`client/src/components/Editor/ApplicationNotRunningView/applicationNotRunningView.content.ts`},fK=({applicationURL:e,errorMessage:t,onRetry:n})=>{let{title:r,description:i,configurationTip:a,retry:o}=qi(dK);return L(`div`,{className:`flex size-full items-center justify-center p-4`,children:L(OO,{className:`flex max-w-xl flex-col gap-4 text-sm`,padding:`xl`,roundedSize:`3xl`,border:!0,borderColor:`neutral`,children:[L(yW,{className:`text-lg`,children:r}),L(`p`,{className:`text-neutral`,children:i({applicationUrl:L(`strong`,{children:e})})}),t&&L(`code`,{className:`rounded-lg border border-error p-2 text-neutral text-xs`,children:t}),L(`p`,{className:`text-neutral`,children:a}),L(Y,{label:o.value,onClick:n,color:`text`,className:`ms-auto`,children:o})]})})};p();var pK=({children:e,iframeRef:t})=>{let r=uK(),a=r?.editor.applicationURL,{isChecking:o,isRunning:s,errorMessage:c,retry:l}=lK(a),u=i(e=>{t.current?.contentWindow?.postMessage(e,a)},[t,a]),d=n(()=>[a],[a]);return!r||a&&o?L(MD,{}):a&&!s?L(Ii,{children:L(fK,{applicationURL:a,errorMessage:c,onRetry:()=>l()})}):L(WE,{postMessage:u,allowedOrigins:d,configuration:r,children:e})};p();var mK=[`vscode-webview:`],hK=()=>{if(typeof window>`u`||window.parent===window)return null;let e=window.location.ancestorOrigins?.[0];return e&&mK.some(t=>e.startsWith(t))?e:null},gK=()=>{let{focusedContent:e}=qE();return M(()=>{let t=hK();t&&window.parent.postMessage({type:JT.INTLAYER_FOCUSED_CONTENT_CHANGED,data:e},t)},[e]),null},_K={key:`iframe-controller`,content:{nodeType:`translation`,translation:{en:{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},"en-GB":{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},fr:{intlayerApplication:`Application Intlayer`,enableEditor:`Activer l'éditeur`},es:{intlayerApplication:`Aplicación Intlayer`,enableEditor:`Activar el editor`},de:{intlayerApplication:`Intlayer-Anwendung`,enableEditor:`Editor aktivieren`},ja:{intlayerApplication:`Intlayerアプリケーション`,enableEditor:`エディタを有効にする`},ko:{intlayerApplication:`Intlayer 애플리케이션`,enableEditor:`에디터 활성화`},zh:{intlayerApplication:`Intlayer 应用程序`,enableEditor:`启用编辑器`},it:{intlayerApplication:`Applicazione Intlayer`,enableEditor:`Abilita l'editor`},pt:{intlayerApplication:`Aplicativo Intlayer`,enableEditor:`Ativar editor`},hi:{intlayerApplication:`इंटलेयर एप्लिकेशन`,enableEditor:`संपादक सक्षम करें`},ar:{intlayerApplication:`تطبيق Intlayer`,enableEditor:`تفعيل المحرر`},ru:{intlayerApplication:`Приложение Intlayer`,enableEditor:`Включить редактор`}}},location:`local`,localId:`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`,filePath:`client/src/components/Editor/iframeController.content.ts`},vK={key:`browser`,content:{nodeType:`translation`,translation:{en:{ariaLabel:`Embedded browser`,urlLabel:`URL address bar`,urlPlaceholder:`https://example.com`,errorMessage:`Invalid URL. Try a path like "/page" or a full URL.`,domainRestrictionError:`URL must match the application domain.`,backButtonLabel:`Go back`,forwardButtonLabel:`Go forward`,iframeTitle:`Embedded web page`,sitemapButtonLabel:`Scan sitemap`,sitemapSearchPlaceholder:`Filter URLs…`,sitemapSearchAriaLabel:`Search sitemap URLs`,sitemapLoading:`Scanning sitemap…`,sitemapEmpty:`No URLs found`,sitemapError:`Could not load sitemap`},"en-GB":{ariaLabel:`Embedded browser`,urlLabel:`URL address bar`,urlPlaceholder:`https://example.com`,errorMessage:`Invalid URL. Try a path like "/page" or a full URL.`,domainRestrictionError:`URL must match the application domain.`,backButtonLabel:`Go back`,forwardButtonLabel:`Go forward`,iframeTitle:`Embedded web page`,sitemapButtonLabel:`Scan sitemap`,sitemapSearchPlaceholder:`Filter URLs…`,sitemapSearchAriaLabel:`Search sitemap URLs`,sitemapLoading:`Scanning sitemap…`,sitemapEmpty:`No URLs found`,sitemapError:`Could not load sitemap`},fr:{ariaLabel:`Navigateur intégré`,urlLabel:`Barre d'adresse URL`,urlPlaceholder:`https://example.com`,errorMessage:`URL invalide. Essayez un chemin comme "/page" ou une URL complète.`,domainRestrictionError:`L'URL doit correspondre au domaine de l'application.`,backButtonLabel:`Retour`,forwardButtonLabel:`Avancer`,iframeTitle:`Page web intégrée`,sitemapButtonLabel:`Scanner le sitemap`,sitemapSearchPlaceholder:`Filtrer les URLs…`,sitemapSearchAriaLabel:`Rechercher les URLs du sitemap`,sitemapLoading:`Scan du sitemap en cours…`,sitemapEmpty:`Aucune URL trouvée`,sitemapError:`Impossible de charger le sitemap`},es:{ariaLabel:`Navegador integrado`,urlLabel:`Barra de direcciones URL`,urlPlaceholder:`https://example.com`,errorMessage:`URL no válida. Intente una ruta como "/page" o una URL completa.`,domainRestrictionError:`La URL debe coincidir con el dominio de la aplicación.`,backButtonLabel:`Atrás`,forwardButtonLabel:`Adelante`,iframeTitle:`Página web integrada`,sitemapButtonLabel:`Escanear sitemap`,sitemapSearchPlaceholder:`Filtrar URLs…`,sitemapSearchAriaLabel:`Buscar URLs del sitemap`,sitemapLoading:`Escaneando sitemap…`,sitemapEmpty:`No se encontraron URLs`,sitemapError:`No se pudo cargar el sitemap`},de:{ariaLabel:`Eingebetteter Browser`,urlLabel:`URL-Adressleiste`,urlPlaceholder:`https://example.com`,errorMessage:`Ungültige URL. Versuchen Sie einen Pfad wie "/page" oder eine vollständige URL.`,domainRestrictionError:`Die URL muss mit der Anwendungsdomäne übereinstimmen.`,backButtonLabel:`Zurück`,forwardButtonLabel:`Vorwärts`,iframeTitle:`Eingebettete Webseite`,sitemapButtonLabel:`Sitemap scannen`,sitemapSearchPlaceholder:`URLs filtern…`,sitemapSearchAriaLabel:`Sitemap-URLs durchsuchen`,sitemapLoading:`Sitemap wird gescannt…`,sitemapEmpty:`Keine URLs gefunden`,sitemapError:`Sitemap konnte nicht geladen werden`},ja:{ariaLabel:`埋め込みブラウザ`,urlLabel:`URLアドレスバー`,urlPlaceholder:`https://example.com`,errorMessage:`無効なURL。"/page"のようなパスまたは完全なURLを試してください。`,domainRestrictionError:`URLはアプリケーションドメインと一致する必要があります。`,backButtonLabel:`戻る`,forwardButtonLabel:`進む`,iframeTitle:`埋め込みウェブページ`,sitemapButtonLabel:`サイトマップをスキャン`,sitemapSearchPlaceholder:`URLを絞り込む…`,sitemapSearchAriaLabel:`サイトマップURLを検索`,sitemapLoading:`サイトマップをスキャン中…`,sitemapEmpty:`URLが見つかりません`,sitemapError:`サイトマップを読み込めませんでした`},ko:{ariaLabel:`임베디드 브라우저`,urlLabel:`URL 주소 표시줄`,urlPlaceholder:`https://example.com`,errorMessage:`잘못된 URL입니다. "/page"와 같은 경로 또는 전체 URL을 시도하십시오.`,domainRestrictionError:`URL은 애플리케이션 도메인과 일치해야 합니다.`,backButtonLabel:`뒤로 가기`,forwardButtonLabel:`앞으로 가기`,iframeTitle:`임베디드 웹페이지`,sitemapButtonLabel:`사이트맵 스캔`,sitemapSearchPlaceholder:`URL 필터링…`,sitemapSearchAriaLabel:`사이트맵 URL 검색`,sitemapLoading:`사이트맵 스캔 중…`,sitemapEmpty:`URL을 찾을 수 없습니다`,sitemapError:`사이트맵을 불러올 수 없습니다`},zh:{ariaLabel:`嵌入式浏览器`,urlLabel:`URL地址栏`,urlPlaceholder:`https://example.com`,errorMessage:`无效的URL。尝试像"/page"这样的路径或完整的URL。`,domainRestrictionError:`URL必须与应用程序域名匹配。`,backButtonLabel:`后退`,forwardButtonLabel:`前进`,iframeTitle:`嵌入式网页`,sitemapButtonLabel:`扫描网站地图`,sitemapSearchPlaceholder:`过滤URL…`,sitemapSearchAriaLabel:`搜索网站地图URL`,sitemapLoading:`正在扫描网站地图…`,sitemapEmpty:`未找到URL`,sitemapError:`无法加载网站地图`},it:{ariaLabel:`Browser incorporato`,urlLabel:`Barra degli indirizzi URL`,urlPlaceholder:`https://example.com`,errorMessage:`URL non valido. Prova un percorso come "/page" o un URL completo.`,domainRestrictionError:`L'URL deve corrispondere al dominio dell'applicazione.`,backButtonLabel:`Indietro`,forwardButtonLabel:`Avanti`,iframeTitle:`Pagina web incorporata`,sitemapButtonLabel:`Scansiona sitemap`,sitemapSearchPlaceholder:`Filtra URL…`,sitemapSearchAriaLabel:`Cerca URL del sitemap`,sitemapLoading:`Scansione sitemap in corso…`,sitemapEmpty:`Nessun URL trovato`,sitemapError:`Impossibile caricare il sitemap`},pt:{ariaLabel:`Navegador incorporado`,urlLabel:`Barra de endereços URL`,urlPlaceholder:`https://example.com`,errorMessage:`URL inválido. Tente um caminho como "/page" ou uma URL completa.`,domainRestrictionError:`A URL deve corresponder ao domínio da aplicação.`,backButtonLabel:`Voltar`,forwardButtonLabel:`Avançar`,iframeTitle:`Página web incorporada`,sitemapButtonLabel:`Escanear sitemap`,sitemapSearchPlaceholder:`Filtrar URLs…`,sitemapSearchAriaLabel:`Pesquisar URLs do sitemap`,sitemapLoading:`Escaneando sitemap…`,sitemapEmpty:`Nenhuma URL encontrada`,sitemapError:`Não foi possível carregar o sitemap`},hi:{ariaLabel:`एम्बेडेड ब्राउज़र`,urlLabel:`URL पता बार`,urlPlaceholder:`https://example.com`,errorMessage:`अमान्य URL। "/page" जैसा पथ या पूर्ण URL प्रयास करें।`,domainRestrictionError:`URL एप्लिकेशन डोमेन से मेल खाना चाहिए।`,backButtonLabel:`वापस जाएं`,forwardButtonLabel:`आगे जाएं`,iframeTitle:`एम्बेडेड वेब पेज`,sitemapButtonLabel:`साइटमैप स्कैन करें`,sitemapSearchPlaceholder:`URL फ़िल्टर करें…`,sitemapSearchAriaLabel:`साइटमैप URL खोजें`,sitemapLoading:`साइटमैप स्कैन हो रहा है…`,sitemapEmpty:`कोई URL नहीं मिला`,sitemapError:`साइटमैप लोड नहीं हो सका`},ar:{ariaLabel:`متصفح مدمج`,urlLabel:`شريط عنوان URL`,urlPlaceholder:`https://example.com`,errorMessage:`رابط غير صالح. جرب مسارًا مثل "/page" أو رابطًا كاملاً.`,domainRestrictionError:`يجب أن يتطابق الرابط مع نطاق التطبيق.`,backButtonLabel:`رجوع`,forwardButtonLabel:`إلى الأمام`,iframeTitle:`صفحة ويب مدمجة`,sitemapButtonLabel:`مسح خريطة الموقع`,sitemapSearchPlaceholder:`تصفية الروابط…`,sitemapSearchAriaLabel:`ابحث في روابط خريطة الموقع`,sitemapLoading:`جارٍ مسح خريطة الموقع…`,sitemapEmpty:`لم يتم العثور على روابط`,sitemapError:`تعذّر تحميل خريطة الموقع`},ru:{ariaLabel:`Встроенный браузер`,urlLabel:`Адресная строка URL`,urlPlaceholder:`https://example.com`,errorMessage:`Неверный URL. Попробуйте путь вроде "/page" или полный URL.`,domainRestrictionError:`URL должен соответствовать домену приложения.`,backButtonLabel:`Назад`,forwardButtonLabel:`Вперёд`,iframeTitle:`Встроенная веб-страница`,sitemapButtonLabel:`Сканировать карту сайта`,sitemapSearchPlaceholder:`Фильтр URL…`,sitemapSearchAriaLabel:`Поиск URL карты сайта`,sitemapLoading:`Сканирование карты сайта…`,sitemapEmpty:`URL не найдены`,sitemapError:`Не удалось загрузить карту сайта`}}},title:`Embedded browser component`,description:`Content declaration for the embedded browser UI component, including ARIA labels, URL placeholder, and error messages for displaying web pages within an iframe.`,tags:[`UI component`,`embedded browser`,`iframe`],location:`local`,localId:`browser::local::../@intlayer/design-system/dist/esm/components/Browser/Browser.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/Browser/Browser.content.mjs`};D();var yK=({children:e,onClickOutSide:t,listenForEscape:n=!1,disabled:r=!1,...a})=>{let o=P(null),s=i(e=>{r||o.current&&!o.current.contains(e.target)&&t()},[t,r]),c=i(e=>{!r&&n&&e.key===`Escape`&&t()},[t,r,n]);return M(()=>(document.addEventListener(`mousedown`,s,{passive:!0}),n&&document.addEventListener(`keydown`,c),()=>{document.removeEventListener(`mousedown`,s),n&&document.removeEventListener(`keydown`,c)}),[s,c,n]),L(`div`,{ref:o,...a,role:a.role||`region`,children:e})};D();var bK=({url:e})=>{let t=xK(e).split(`/`).filter(Boolean);return t.length===0?L(`span`,{children:`/`}):t.flatMap((e,t,n)=>[L(`span`,{children:e},`part-${t}`),t<n.length-1&&L(`span`,{className:`mx-2 text-neutral`,children:`/`},`sep-${t}`)])},xK=e=>{try{let{pathname:t,search:n,hash:r}=new URL(e);return`${t}${n}${r}`||`/`}catch{return e}},SK=({initialUrl:e=`https://example.com`,path:t,className:i,style:a,size:o=`md`,"aria-label":s,sandbox:c=`allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-downloads`,ref:l,domainRestriction:u,toolbarActions:d,...f})=>{let[p,m]=N(e),[h,g]=N(e),[_,v]=N([e]),[y,b]=N(0),[x,S]=N(null),[C,w]=N(!1),T=P(null),[E,D]=N(!1),[O,k]=N([]),[A,j]=N(``),[F,I]=N(!1),R=P(!1),[ee,z]=N(!1),te=P(null);r(l,()=>T.current,[]);let B=qi(vK);M(()=>{m(e),g(e),v([e]),b(0),S(null),w(!1),D(!1),k([]),j(``),R.current=!1,z(!1)},[e]),M(()=>{if(t)try{let n=`${new URL(u??e).origin}${t}`;m(n);let r=!1;if(T.current?.contentWindow)try{let e=T.current.contentWindow.location.href;new URL(e).href===new URL(n).href&&(r=!0)}catch{}_[y]!==n&&(v(e=>{let t=e.slice(0,y+1);return t.push(n),t}),b(e=>e+1)),r||g(n),S(null)}catch{}},[t,u,e]),M(()=>{let e=T.current;e&&e.src!==h&&(e.src=h)},[h]);let ne=e=>{try{let t=le(e);if(t===h){oe();return}g(t),m(t),S(null);let n=_.slice(0,y+1);n.push(t),v(n),b(n.length-1)}catch(e){e instanceof Error&&e.message===`URL does not match allowed domain`&&u?S(B.domainRestrictionError?.value??`Only URLs from ${u} are allowed.`):S(B.errorMessage.value)}},re=()=>{if(y>0){let e=y-1,t=_[e]??``;b(e),g(t),m(t),S(null)}},ie=()=>{if(y<_.length-1){let e=y+1,t=_[e]??``;b(e),g(t),m(t),S(null)}},ae=e=>{e.preventDefault(),w(!0),ne(p)},oe=()=>{let e=T.current;if(!e)return;let t=e.src;e.src=``,setTimeout(()=>{T.current&&(T.current.src=t)},50)},se=e=>e===`localhost`||/^(\d{1,3}\.){3}\d{1,3}$/.test(e)||/^[a-f0-9:]+$/i.test(e)?!0:!(!/^[a-z0-9.-]+$/i.test(e)||/^[-.]/.test(e)||/[-.]$/.test(e)||e.includes(`..`)||!e.includes(`.`)),ce=()=>{if(!u)return null;try{return new URL(u)}catch{return null}},le=e=>{let t=e.trim();if(!t||/\s/.test(t))throw Error(`Invalid`);let n=ce();if(t.startsWith(`/`)&&!t.startsWith(`//`))return n?new URL(`${n.origin}${t}`).toString():new URL(`${new URL(h).origin}${t}`).toString();let r=/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(t)?t:`https://${t}`,i=new URL(r);if(i.protocol!==`http:`&&i.protocol!==`https:`)throw Error(`Only http(s) is allowed`);if(!se(i.hostname))throw Error(`Invalid host`);if(n&&(i.hostname!==n.hostname||i.protocol!==n.protocol||n.port!==``&&i.port!==n.port&&i.host!==n.host))throw Error(`URL does not match allowed domain`);return i.toString()},ue=async()=>{if(!R.current){R.current=!0,I(!0),z(!1);try{let{extractUrlFromSitemap:e}=await En(async()=>{let{extractUrlFromSitemap:e}=await import(`./extractUrlFromSitemap-Chj1JVpo.js`);return{extractUrlFromSitemap:e}},[]);k(await e(h))}catch{z(!0)}finally{I(!1)}}},de=()=>{let e=!E;D(e),e&&(ue(),setTimeout(()=>te.current?.focus(),50))},fe=n(()=>{let e=A.trim().toLowerCase();return e?O.filter(t=>t.toLowerCase().includes(e)):O},[O,A]),pe=C&&!!x,me=y>0,he=y<_.length-1;return L(`section`,{className:W(`flex w-full flex-col overflow-hidden rounded-xl bg-background shadow-[0_4px_12px_rgba(0,0,0,0.4),0_0_1px_rgba(0,0,0,0.2)]`,i),style:a,"aria-label":s??B.ariaLabel.value,children:[L(`div`,{className:`@container relative z-10 flex shrink-0 items-center gap-3 rounded-t-xl border-b bg-card px-4 py-2`,children:[L(`div`,{className:`flex items-center gap-1`,children:[L(Y,{type:`button`,onClick:re,disabled:!me,variant:`hoverable`,size:`icon-md`,label:B.backButtonLabel.value,Icon:as}),L(Y,{type:`button`,onClick:ie,disabled:!he,variant:`hoverable`,size:`icon-md`,label:B.forwardButtonLabel.value,Icon:ss})]}),L(`form`,{onSubmit:ae,noValidate:!0,className:W(rO(),`flex w-full gap-2 rounded-xl p-0.5! supports-[corner-shape:squircle]:rounded-2xl`,`bg-neutral/10 text-foreground/50 placeholder:text-neutral/80`),children:[L(`label`,{htmlFor:`browser-url`,className:`sr-only`,children:B.urlLabel}),L(iO,{id:`browser-url`,type:`text`,inputMode:`url`,spellCheck:!1,autoCapitalize:`off`,variant:`invisible`,className:`ms-3 p-0!`,size:`sm`,autoCorrect:`off`,value:p,onChange:e=>{m(e.target.value),pe&&S(null)},placeholder:B.urlPlaceholder.value,"aria-label":B.urlLabel.value,"aria-invalid":pe,"aria-describedby":pe?`browser-url-error`:void 0}),L(Y,{type:`button`,onClick:oe,variant:`hoverable`,size:`icon-md`,className:`p-1!`,label:`content.reloadButtonTitle.value`,Icon:Zs}),L(`button`,{type:`submit`,className:`sr-only absolute`,tabIndex:-1})]}),d,L(yK,{onClickOutSide:()=>D(!1),disabled:!E,role:`none`,children:L(mH,{identifier:`sitemap-explorer`,onMouseEnter:ue,onFocus:ue,children:[L(mH.Trigger,{identifier:`sitemap-explorer-trigger`,type:`button`,color:`text`,onClick:de,variant:`hoverable`,size:`icon-md`,label:B.sitemapButtonLabel.value,Icon:tc}),L(mH.Panel,{identifier:`sitemap-explorer`,isHidden:!E,align:`end`,isFocusable:!0,isOverable:!0,children:L(OO,{className:`w-80 max-w-[calc(100cqw-2rem)] rounded-md!`,roundedSize:`xl`,border:!0,borderColor:`neutral`,children:[L(`div`,{className:`p-2`,children:L(iO,{type:`search`,ref:te,"aria-label":B.sitemapSearchAriaLabel.value,placeholder:B.sitemapSearchPlaceholder.value,onChange:e=>j(e.target.value),value:A,size:`sm`})}),L(`ul`,{className:`max-h-64 divide-y divide-dotted divide-neutral/30 overflow-y-auto p-1 text-center`,"aria-label":B.sitemapButtonLabel.value,children:F?L(`li`,{className:`px-3 py-4 text-center text-muted-foreground text-xs`,children:B.sitemapLoading}):ee||!F&&fe.length===0?L(`li`,{className:`px-3 py-4 text-center text-muted-foreground text-xs`,children:ee?B.sitemapError:B.sitemapEmpty}):fe.map(e=>L(`li`,{className:`py-0.5`,children:L(Y,{variant:`hoverable`,color:`text`,size:`sm`,className:`w-full text-start`,label:e,onClick:()=>{ne(e),D(!1)},children:L(`span`,{className:`block truncate text-start text-base`,children:L(bK,{url:e})})})},e))})]})})]})}),pe&&L(`div`,{className:`absolute inset-s-4 top-full z-20 mt-1`,children:L(`p`,{id:`browser-url-error`,role:`alert`,"aria-live":`assertive`,className:`rounded-md bg-red-900/90 px-3 py-1.5 text-red-100 text-xs shadow-md backdrop-blur-sm`,children:x})})]}),L(`div`,{className:`relative z-0 flex min-h-0 w-full flex-1 flex-col overflow-hidden rounded-b-xl bg-background`,children:L(`iframe`,{ref:T,src:h,title:B.iframeTitle.value,className:`size-full flex-1`,sandbox:c??void 0,loading:`lazy`,"aria-live":`polite`,...f})})]})},CK={key:`frame-connection-error`,content:{nodeType:`translation`,translation:{en:{title:`The application could not be displayed`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} did not connect to the editor. Check that:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"its Content-Security-Policy `frame-ancestors` directive (or `X-Frame-Options` header) allows {{editorOrigin}}"},editorEnabledCause:"the visual editor is enabled in its Intlayer configuration (`editor.enabled`)",providerCause:`the page renders the Intlayer provider of your framework`,retry:`Retry`,dismiss:`Show the page anyway`},"en-GB":{title:`The application could not be displayed`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} did not connect to the editor. Check that:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"its Content-Security-Policy `frame-ancestors` directive (or `X-Frame-Options` header) allows {{editorOrigin}}"},editorEnabledCause:"the visual editor is enabled in its Intlayer configuration (`editor.enabled`)",providerCause:`the page renders the Intlayer provider of your framework`,retry:`Retry`,dismiss:`Show the page anyway`},fr:{title:`L'application n'a pas pu être affichée`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} ne s'est pas connectée à l'éditeur. Vérifiez que :`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"sa directive Content-Security-Policy `frame-ancestors` (ou son en-tête `X-Frame-Options`) autorise {{editorOrigin}}"},editorEnabledCause:"l'éditeur visuel est activé dans sa configuration Intlayer (`editor.enabled`)",providerCause:`la page affiche le provider Intlayer de votre framework`,retry:`Réessayer`,dismiss:`Afficher la page quand même`},es:{title:`No se pudo mostrar la aplicación`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} no se conectó al editor. Compruebe que:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"su directiva Content-Security-Policy `frame-ancestors` (o la cabecera `X-Frame-Options`) permite {{editorOrigin}}"},editorEnabledCause:"el editor visual está activado en su configuración de Intlayer (`editor.enabled`)",providerCause:`la página renderiza el provider de Intlayer de su framework`,retry:`Reintentar`,dismiss:`Mostrar la página de todos modos`},de:{title:`Die Anwendung konnte nicht angezeigt werden`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} hat sich nicht mit dem Editor verbunden. Prüfen Sie, dass:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"seine Content-Security-Policy-Direktive `frame-ancestors` (oder der Header `X-Frame-Options`) {{editorOrigin}} erlaubt"},editorEnabledCause:"der visuelle Editor in der Intlayer-Konfiguration aktiviert ist (`editor.enabled`)",providerCause:`die Seite den Intlayer-Provider Ihres Frameworks rendert`,retry:`Erneut versuchen`,dismiss:`Seite trotzdem anzeigen`},ja:{title:`アプリケーションを表示できませんでした`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} がエディターに接続しませんでした。次の点を確認してください:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"Content-Security-Policy の `frame-ancestors` ディレクティブ(または `X-Frame-Options` ヘッダー)が {{editorOrigin}} を許可している"},editorEnabledCause:"Intlayer 設定でビジュアルエディターが有効になっている(`editor.enabled`)",providerCause:`ページがフレームワークの Intlayer プロバイダーをレンダリングしている`,retry:`再試行`,dismiss:`それでもページを表示`},ko:{title:`애플리케이션을 표시할 수 없습니다`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}}이(가) 에디터에 연결되지 않았습니다. 다음을 확인하세요:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"Content-Security-Policy의 `frame-ancestors` 지시어(또는 `X-Frame-Options` 헤더)가 {{editorOrigin}}을(를) 허용하는지"},editorEnabledCause:"Intlayer 설정에서 비주얼 에디터가 활성화되어 있는지 (`editor.enabled`)",providerCause:`페이지가 프레임워크의 Intlayer 프로바이더를 렌더링하는지`,retry:`다시 시도`,dismiss:`그래도 페이지 표시`},zh:{title:`无法显示应用程序`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} 未连接到编辑器。请检查:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"其 Content-Security-Policy 的 `frame-ancestors` 指令(或 `X-Frame-Options` 头)允许 {{editorOrigin}}"},editorEnabledCause:"其 Intlayer 配置中已启用可视化编辑器(`editor.enabled`)",providerCause:`页面渲染了您框架的 Intlayer provider`,retry:`重试`,dismiss:`仍然显示页面`},it:{title:`Impossibile visualizzare l'applicazione`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} non si è connessa all'editor. Verifica che:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"la sua direttiva Content-Security-Policy `frame-ancestors` (o l’header `X-Frame-Options`) consente {{editorOrigin}}"},editorEnabledCause:"l'editor visuale è abilitato nella sua configurazione Intlayer (`editor.enabled`)",providerCause:`la pagina renderizza il provider Intlayer del tuo framework`,retry:`Riprova`,dismiss:`Mostra comunque la pagina`},pt:{title:`Não foi possível exibir a aplicação`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} não se conectou ao editor. Verifique se:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"sua diretiva Content-Security-Policy `frame-ancestors` (ou o cabeçalho `X-Frame-Options`) permite {{editorOrigin}}"},editorEnabledCause:"o editor visual está ativado na configuração do Intlayer (`editor.enabled`)",providerCause:`a página renderiza o provider Intlayer do seu framework`,retry:`Tentar novamente`,dismiss:`Mostrar a página mesmo assim`},hi:{title:`एप्लिकेशन प्रदर्शित नहीं किया जा सका`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} एडिटर से कनेक्ट नहीं हुआ। जाँचें कि:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"इसका Content-Security-Policy `frame-ancestors` निर्देश (या `X-Frame-Options` हेडर) {{editorOrigin}} को अनुमति देता है"},editorEnabledCause:"इसके Intlayer कॉन्फ़िगरेशन में विज़ुअल एडिटर सक्षम है (`editor.enabled`)",providerCause:`पेज आपके फ़्रेमवर्क का Intlayer provider रेंडर करता है`,retry:`पुनः प्रयास करें`,dismiss:`फिर भी पेज दिखाएँ`},ar:{title:`تعذر عرض التطبيق`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`لم يتصل {{applicationUrl}} بالمحرر. تحقق من أن:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"توجيه `frame-ancestors` في Content-Security-Policy (أو ترويسة `X-Frame-Options`) يسمح بـ {{editorOrigin}}"},editorEnabledCause:"المحرر المرئي مفعّل في إعدادات Intlayer الخاصة به (`editor.enabled`)",providerCause:`الصفحة تعرض موفّر Intlayer الخاص بإطار العمل لديك`,retry:`إعادة المحاولة`,dismiss:`عرض الصفحة على أي حال`},ru:{title:`Не удалось отобразить приложение`,description:{fields:[`applicationUrl`],nodeType:`insertion`,insertion:`{{applicationUrl}} не подключилось к редактору. Убедитесь, что:`},framingCause:{fields:[`editorOrigin`],nodeType:`insertion`,insertion:"его директива Content-Security-Policy `frame-ancestors` (или заголовок `X-Frame-Options`) разрешает {{editorOrigin}}"},editorEnabledCause:"визуальный редактор включён в его конфигурации Intlayer (`editor.enabled`)",providerCause:`страница рендерит провайдер Intlayer вашего фреймворка`,retry:`Повторить`,dismiss:`Всё равно показать страницу`}}},title:`Frame connection error`,description:`Overlay shown when the application framed by the visual editor never connects to it.`,location:`local`,localId:`frame-connection-error::local::../@intlayer/design-system/dist/esm/components/FrameConnectionError/FrameConnectionError.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/FrameConnectionError/FrameConnectionError.content.mjs`},wK=()=>[...new Set([window.location.origin,...Array.from(window.location.ancestorOrigins??[])])],TK=({applicationURL:e,onRetry:t,onDismiss:n})=>{let{title:r,description:i,framingCause:a,editorEnabledCause:o,providerCause:s,retry:c,dismiss:l}=qi(CK);return L(`div`,{className:`absolute inset-0 z-10 flex overflow-auto bg-background/90 p-2 sm:p-4`,children:L(OO,{className:`m-auto flex w-full min-w-0 max-w-xl flex-col gap-3 px-4 py-4 text-sm sm:gap-4 sm:px-8 sm:py-6`,roundedSize:`3xl`,border:!0,borderColor:`neutral`,role:`alert`,children:[L(yW,{className:`text-base sm:text-lg`,children:r}),L(`p`,{className:`wrap-anywhere text-neutral`,children:i({applicationUrl:L(`strong`,{children:e})})}),L(`ul`,{className:`wrap-anywhere list-outside list-disc space-y-2 ps-5 text-neutral`,children:[L(`li`,{children:a({editorOrigin:L(`strong`,{children:wK().join(`, `)})})}),L(`li`,{children:o}),L(`li`,{children:s})]}),L(`div`,{className:`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,children:[L(Y,{label:l.value,onClick:n,variant:`outline`,color:`text`,children:l}),L(Y,{label:c.value,onClick:t,color:`text`,children:c})]})]})})},EK={key:`locale-switcher-drop-down`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`}}}},title:`Locale switcher`,description:`Content declaration for the locale switcher component, including user interface labels for switching and searching between different languages.`,tags:[`language selector`,`internationalization`,`UI component`],location:`local`,localId:`locale-switcher-drop-down::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs`,filePath:`../@intlayer/design-system/dist/esm/components/LocaleSwitcherDropDown/localeSwitcher.content.mjs`};D();var DK={sm:{nav:`rounded-full border-[1.3px] border-text`,trigger:`min-h-0 px-1.5 py-0.5 text-xs`,label:`px-1`,icon:`size-3`},md:{nav:`rounded-xl border border-text`,trigger:``,label:`px-2`,icon:`w-5`}},OK=`locale-switcher`,kK=({locale:e,localeList:t,availableLocales:r,fullLocaleName:a=!0,setLocale:o,panelProps:s,size:c=`md`,border:l,borderColor:u,roundedSize:d,variant:f,color:p})=>{let m=`Select a locale`,{switchTo:h,searchInput:g,languageListLabel:_,localeSwitcherLabel:v}=qi(EK),y=P(null),b=n(()=>t.map(t=>({locale:t,englishName:Pi(t,`en`),currentLocaleName:Pi(t,e),ownLocaleName:Pi(t)})),[t,e]),[x,S]=N(b),C=n(()=>new BU(b,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[b]),w=i(e=>{if(e){let t=C.search(e).map(e=>e.item);S(t)}else S(b)},[C,b]);return e&&(m=a?Pi(e):e.toUpperCase()),L(`nav`,{className:f?void 0:DK[c].nav,"aria-label":v.value,children:L(mH,{identifier:OK,children:[L(mH.Trigger,{identifier:OK,...f&&{variant:f},color:p??`custom`,size:c===`sm`?`custom`:`md`,roundedSize:c===`sm`?`full`:`md`,className:W(!p&&`text-text`,DK[c].trigger),children:L(`div`,{className:`flex w-full items-center justify-between`,children:[L(`div`,{className:W(`text-nowrap`,DK[c].label),children:m}),L(Vs,{className:W(`self-center`,DK[c].icon)})]})}),L(mH.Panel,{identifier:OK,isOverable:!0,isFocusable:!0,align:`end`,...s,children:L(OO,{className:`max-h-[80vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:l,borderColor:u,roundedSize:d,"aria-label":_.value,children:[L(`div`,{className:`p-3`,children:L(iO,{type:`search`,"aria-label":g.ariaLabel.value,placeholder:g.placeholder.value,onChange:e=>w(e.target.value),ref:y})}),L(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:x.map(({locale:n,currentLocaleName:i,ownLocaleName:a})=>L(`li`,{className:`px-1.5 py-1`,children:L(Y,{onClick:()=>o(n),label:`${h} ${i}`,disabled:!(r??t).includes(n),isActive:e===n,variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,children:L(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[L(`div`,{className:`flex flex-col text-nowrap`,children:[L(`span`,{dir:Ni(n),lang:n,suppressHydrationWarning:!0,children:a}),L(`span`,{className:`text-neutral text-xs`,suppressHydrationWarning:!0,children:i})]}),L(`span`,{className:`text-neutral text-sm`,children:n.toUpperCase()})]})})},n))})]})})]})})},AK=(e,t,n,r)=>{let{internationalization:i,routing:a}=r,o=Object.keys(a?.domains??{}).length>0;if(a?.mode===`no-prefix`&&!o)return null;let s=new URL(t,e).href;return Ai(s,n,{locales:i.locales,defaultLocale:i.defaultLocale,mode:a?.mode,rewrite:a?.rewrite,domains:a?.domains})},jK=({iframeRef:e,applicationURL:t,applicationPath:n})=>{let r=VE(),i=WT(),a=BE(),o=FE(),s=r?.internationalization.locales??[];return!r||s.length<2?null:L(kK,{locale:a,localeList:s,setLocale:a=>{i?.requestLocaleChange(a);let s=o??n,c=AK(t,s,a,r),l=new URL(s,t).href,u=e.current;c&&u&&c!==l&&(u.src=c)},fullLocaleName:!1,size:`sm`,variant:`outline`,color:`text`,border:!0,borderColor:`neutral`,roundedSize:`2xl`})},MK={key:`editor-profile`,content:{nodeType:`translation`,translation:{en:{login:{label:`Log in to the Intlayer CMS (runs intlayer login)`,title:`Login`,pending:`Waiting for the browser…`},logout:{label:`Log out of the intlayer login session`,title:`Logout`},profileLabel:`Open the profile menu`,sessionAuth:`Signed in with intlayer login`,accessKeyAuth:`Signed in with an access key`,project:`Project`},"en-GB":{login:{label:`Log in to the Intlayer CMS (runs intlayer login)`,title:`Login`,pending:`Waiting for the browser…`},logout:{label:`Log out of the intlayer login session`,title:`Logout`},profileLabel:`Open the profile menu`,sessionAuth:`Signed in with intlayer login`,accessKeyAuth:`Signed in with an access key`,project:`Project`},fr:{login:{label:`Se connecter au CMS Intlayer (exécute intlayer login)`,title:`Connexion`,pending:`En attente du navigateur…`},logout:{label:`Se déconnecter de la session intlayer login`,title:`Déconnexion`},profileLabel:`Ouvrir le menu du profil`,sessionAuth:`Connecté avec intlayer login`,accessKeyAuth:`Connecté avec une clé d'accès`,project:`Projet`},es:{login:{label:`Iniciar sesión en el CMS de Intlayer (ejecuta intlayer login)`,title:`Iniciar sesión`,pending:`Esperando al navegador…`},logout:{label:`Cerrar la sesión de intlayer login`,title:`Cerrar sesión`},profileLabel:`Abrir el menú del perfil`,sessionAuth:`Sesión iniciada con intlayer login`,accessKeyAuth:`Sesión iniciada con una clave de acceso`,project:`Proyecto`},de:{login:{label:`Beim Intlayer-CMS anmelden (führt intlayer login aus)`,title:`Anmelden`,pending:`Warten auf den Browser…`},logout:{label:`Von der intlayer login-Sitzung abmelden`,title:`Abmelden`},profileLabel:`Profilmenü öffnen`,sessionAuth:`Mit intlayer login angemeldet`,accessKeyAuth:`Mit einem Zugriffsschlüssel angemeldet`,project:`Projekt`},ja:{login:{label:`Intlayer CMS にログイン(intlayer login を実行)`,title:`ログイン`,pending:`ブラウザを待っています…`},logout:{label:`intlayer login セッションからログアウト`,title:`ログアウト`},profileLabel:`プロフィールメニューを開く`,sessionAuth:`intlayer login でサインイン中`,accessKeyAuth:`アクセスキーでサインイン中`,project:`プロジェクト`},ko:{login:{label:`Intlayer CMS에 로그인 (intlayer login 실행)`,title:`로그인`,pending:`브라우저를 기다리는 중…`},logout:{label:`intlayer login 세션에서 로그아웃`,title:`로그아웃`},profileLabel:`프로필 메뉴 열기`,sessionAuth:`intlayer login으로 로그인됨`,accessKeyAuth:`액세스 키로 로그인됨`,project:`프로젝트`},zh:{login:{label:`登录 Intlayer CMS(运行 intlayer login)`,title:`登录`,pending:`正在等待浏览器…`},logout:{label:`退出 intlayer login 会话`,title:`退出登录`},profileLabel:`打开个人资料菜单`,sessionAuth:`已通过 intlayer login 登录`,accessKeyAuth:`已通过访问密钥登录`,project:`项目`},it:{login:{label:`Accedi al CMS Intlayer (esegue intlayer login)`,title:`Accedi`,pending:`In attesa del browser…`},logout:{label:`Esci dalla sessione intlayer login`,title:`Esci`},profileLabel:`Apri il menu del profilo`,sessionAuth:`Accesso effettuato con intlayer login`,accessKeyAuth:`Accesso effettuato con una chiave di accesso`,project:`Progetto`},pt:{login:{label:`Entrar no CMS Intlayer (executa intlayer login)`,title:`Entrar`,pending:`Aguardando o navegador…`},logout:{label:`Sair da sessão do intlayer login`,title:`Sair`},profileLabel:`Abrir o menu do perfil`,sessionAuth:`Conectado com intlayer login`,accessKeyAuth:`Conectado com uma chave de acesso`,project:`Projeto`},hi:{login:{label:`Intlayer CMS में लॉग इन करें (intlayer login चलाता है)`,title:`लॉग इन`,pending:`ब्राउज़र की प्रतीक्षा…`},logout:{label:`intlayer login सत्र से लॉग आउट करें`,title:`लॉग आउट`},profileLabel:`प्रोफ़ाइल मेनू खोलें`,sessionAuth:`intlayer login से साइन इन किया गया`,accessKeyAuth:`एक्सेस की से साइन इन किया गया`,project:`प्रोजेक्ट`},ar:{login:{label:`تسجيل الدخول إلى Intlayer CMS (يشغّل intlayer login)`,title:`تسجيل الدخول`,pending:`في انتظار المتصفح…`},logout:{label:`تسجيل الخروج من جلسة intlayer login`,title:`تسجيل الخروج`},profileLabel:`فتح قائمة الملف الشخصي`,sessionAuth:`تم تسجيل الدخول باستخدام intlayer login`,accessKeyAuth:`تم تسجيل الدخول باستخدام مفتاح وصول`,project:`المشروع`},ru:{login:{label:`Войти в CMS Intlayer (запускает intlayer login)`,title:`Войти`,pending:`Ожидание браузера…`},logout:{label:`Выйти из сеанса intlayer login`,title:`Выйти`},profileLabel:`Открыть меню профиля`,sessionAuth:`Вход выполнен через intlayer login`,accessKeyAuth:`Вход выполнен с ключом доступа`,project:`Проект`}}},location:`local`,localId:`editor-profile::local::client/src/components/Editor/EditorProfile/editorProfile.content.ts`,filePath:`client/src/components/Editor/EditorProfile/editorProfile.content.ts`};D();var NK=(e,t=` `)=>e?(t===` `?e.trim().split(/\s+/):e.split(t)).filter(Boolean).map(e=>e.charAt(0).toUpperCase()):[],PK=({isClickable:e,onClick:t,...n})=>e&&t?L(`button`,{...n,onClick:t,type:`button`}):L(`div`,{...n,role:n.tabIndex!==void 0||n[`aria-label`]?`img`:void 0}),FK=({fullname:e,className:t,isLoading:r=!1,isLoggedIn:i=!0,src:a,onClick:o,size:s=`md`,alt:c,focusable:l=!1,hoverable:u=!1,...d})=>{let f=!!a,p=(e??``).length>0,m=e?NK(e):void 0,h=r,g=i&&!h&&f,_=i&&!h&&!g&&p,v=i&&!h&&!g&&!_,y=o!==void 0,b=n(()=>{let t={};return g&&c?t[`aria-label`]=c:g&&e?t[`aria-label`]=`Avatar of ${e}`:_&&e?t[`aria-label`]=`Avatar initials for ${e}`:v?t[`aria-label`]=`Default user avatar`:h&&(t[`aria-label`]=`Loading avatar`,t[`aria-busy`]=!0),!y&&l&&(t.tabIndex=0),y&&(t[`aria-describedby`]=`avatar-description`),t},[g,_,v,h,c,e,y,l]);return L(PK,{isClickable:y,className:W(`rounded-full border-[1.3px] border-text p-0.5 ring-offset-0 transition-ring duration-200`,s===`sm`&&`size-7 border-[1px] p-0.25`,s===`md`&&`size-9`,s===`lg`&&`size-12`,s===`xl`&&`size-16`,s===`2xl`&&`size-24`,y&&`cursor-pointer hover:opacity-80 focus:outline-none focus:ring-3 focus:ring-text/50 focus:ring-offset-2`,u&&`hover:opacity-80 hover:ring-4 hover:ring-text/30 hover:ring-offset-2`,!y&&l&&`focus:outline-none focus:ring-3 focus:ring-text/50 focus:ring-offset-2`,h&&`animate-pulse`,t),dir:`ltr`,onClick:o,...b,...d,children:L(`div`,{className:`relative flex aspect-square size-full flex-row items-center justify-center`,children:L(`div`,{className:`absolute inset-s-0 top-0 flex aspect-square size-full flex-col items-center justify-center rounded-full bg-text text-foreground-opposite`,children:[h&&L(MD,{className:`w-3/4`,"aria-label":`Loading user avatar`}),g&&L(`img`,{className:`size-full rounded-full object-cover`,src:a,srcSet:a,alt:c??`Avatar of ${e}`,width:59,height:59,loading:`lazy`,draggable:!1}),_&&L(`div`,{className:W(`flex size-full items-center justify-center gap-[0.1rem] font-bold max-md:py-1`,s===`sm`&&`text-xs`,s===`md`&&`text-sm`,s===`lg`&&`text-base`,s===`xl`&&`text-lg`,s===`2xl`&&`text-xl`),children:m?.map((e,t)=>L(`span`,{children:e},`${e}-${t}`))}),v&&L(sc,{size:W(s===`sm`&&14,s===`md`&&25,s===`lg`&&30,s===`xl`&&40),"aria-label":`Default user icon`})]})})})},IK=`editor-profile`,LK=()=>{let e=qi(MK),t=ED();if(!t)return null;let{auth:n,isLoggingIn:r,login:i,logout:a,isLoggingOut:o}=t;if(!n)return L(Y,{label:e.login.label.value,onClick:i,isLoading:r,variant:`outline`,color:`text`,size:`custom`,className:`min-h-0 px-1.5 py-0.5 text-xs`,roundedSize:`full`,Icon:Fs,iconClassName:`size-3`,children:r?e.login.pending:e.login.title});let{user:s,project:c,authType:l}=n,u=s?.name??s?.email??c?.name??``;return L(mH,{identifier:IK,children:[L(mH.Trigger,{identifier:IK,label:e.profileLabel.value,size:`icon-sm`,variant:`outline`,color:`text`,roundedSize:`full`,className:`border-none p-0!`,children:L(FK,{fullname:u,src:s?.image??void 0,size:`sm`})}),L(mH.Panel,{identifier:IK,isFocusable:!0,isOverable:!0,align:`end`,children:L(OO,{className:`min-w-56 p-4`,transparency:`xs`,roundedSize:`2xl`,border:!0,borderColor:`neutral`,children:L(`div`,{className:`flex flex-col gap-3`,children:[s?.name&&L(`span`,{className:`whitespace-nowrap font-bold`,children:s.name}),s?.email&&L(`span`,{className:`whitespace-nowrap text-sm`,children:s.email}),c?.name&&L(`span`,{className:`whitespace-nowrap text-sm`,children:[e.project,`: `,c.name]}),L(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:l===`session`?e.sessionAuth:e.accessKeyAuth}),l===`session`&&L(Y,{label:e.logout.label.value,onClick:a,isLoading:o,variant:`outline`,color:`text`,size:`sm`,Icon:Ls,children:e.logout.title})]})})})]})},RK={key:`no-application-url-view`,content:{nodeType:`translation`,translation:{en:{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},"en-GB":{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},fr:{title:`Votre configuration de projet ne comprend pas l’URL de l’application`,description:`Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.`,documentationLink:{label:`Cliquez ici pour accéder à la documentation de l’éditeur`,text:`Voir comment configurer l’éditeur`}},es:{title:`Su configuración de proyecto no incluye la URL de la aplicación`,description:`Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.`,documentationLink:{label:`Haga clic aquí para acceder a la documentación del editor`,text:`Vea cómo configurar el editor`}},de:{title:`Ihre Projektkonfiguration enthält keine Anwendungs-URL`,description:`Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.`,documentationLink:{label:`Klicken Sie hier, um die Editor-Dokumentation zu besuchen`,text:`Siehe, wie man den Editor konfiguriert`}},ja:{title:`あなたのプロジェクト構成にはアプリケーション URL が含まれていません`,description:`エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。`,documentationLink:{label:`エディターのドキュメントに移動するには、ここをクリックしてください`,text:`エディターの設定方法を見る`}},ko:{title:`당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.`,description:`에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.`,documentationLink:{label:`에디터 문서로 이동하려면 여기를 클릭하십시오.`,text:`에디터 설정 방법을 보십시오`}},zh:{title:`您的项目配置未包含应用程序 URL`,description:`要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。`,documentationLink:{label:`点击此处访问编辑器文档`,text:`查看如何配置编辑器`}},it:{title:`La configurazione del progetto non include l’URL dell’applicazione`,description:`Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione.`,documentationLink:{label:`Fai clic qui per accedere alla documentazione dell’editor`,text:`Vedi come configurare l’editor`}},pt:{title:`Sua configuração do projeto não inclui a URL do aplicativo`,description:`Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.`,documentationLink:{label:`Clique aqui para acessar a documentação do editor`,text:`Veja como configurar o editor`}},hi:{title:`आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है`,description:`एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।`,documentationLink:{label:`एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?`,text:`एडिटर को काने के बारे में देखें`}},ar:{title:`تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق`,description:`لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.`,documentationLink:{label:`انقر هنا للوصول إلى وثائق المحرر`,text:`انظر كيفية تكوين المحرر`}},ru:{title:`Ваша конфигурация проекта не включает URL-адрес приложения`,description:`Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.`,documentationLink:{label:`Нажмите, чтобы перейти к документации редактора`,text:`Смотрите, как настроить редактор`}}}},location:`local`,localId:`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`,filePath:`client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`},zK=()=>{let{title:e,description:t,documentationLink:n}=qi(RK);return L(`div`,{className:`flex flex-col gap-6`,children:[L(yW,{className:`mb-8`,children:e}),L(`strong`,{className:`block text-neutral`,children:t}),L(iH,{label:n.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ms-auto`,isExternalLink:!0,children:n.text})]})};p();var BK=({iframeRef:e,applicationPath:t,isBrowserVisible:n=!1})=>{let r=qi(_K),{editor:i}=VE()??{},{enabled:a}=HE(),o=UE(),{isConnectionFailed:s,handleFrameLoad:c,dismiss:l}=YE();zE();let[u,d]=N(!0),f=FE();if(M(()=>{typeof f==`string`&&window.history.replaceState({},``,`${f}${window.location.search}`)},[f]),!i?.applicationURL)return L(OO,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:L(zK,{})});let p=s&&L(TK,{applicationURL:i.applicationURL,onRetry:()=>{let t=e.current;if(!t)return;let{src:n}=t;t.src=n},onDismiss:l}),m=!a&&L(`div`,{className:`fixed inset-e-4 bottom-4`,children:L(Y,{label:r.enableEditor.value,onClick:o,color:`text`,children:r.enableEditor})}),h=L(`div`,{className:`flex shrink-0 items-center gap-2`,children:[L(jK,{iframeRef:e,applicationURL:i.applicationURL,applicationPath:t}),L(LK,{})]});return n?L(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[L(SK,{initialUrl:`${i.applicationURL}${t}`,path:f,domainRestriction:i.applicationURL,className:`size-full`,sandbox:`allow-scripts allow-same-origin`,ref:e,onLoad:c,toolbarActions:h}),p,m]}):L(`div`,{className:`flex size-full flex-col gap-2`,children:[L(`div`,{className:`flex justify-end`,children:h}),L(`div`,{className:`relative min-h-0 w-full flex-1 overflow-hidden rounded-lg`,children:[L(MD,{isLoading:u}),L(`iframe`,{src:`${i.applicationURL}${t}`,title:r.intlayerApplication.value,sandbox:`allow-scripts allow-same-origin`,className:W(`size-full`,u&&`hidden`),ref:e,onLoad:()=>{d(!1),c()}}),p,m]})]})};p();var VK=`theme`,HK=e=>e===`light`||e===`dark`,UK=()=>{let e=new URLSearchParams(window.location.search).get(VK);return HK(e)?e:void 0},WK=()=>{let[e,t]=N(UK);return M(()=>{let e=hK();if(!e)return;let n=n=>{n.origin===e&&n.source===window.parent&&n.data?.type===JT.INTLAYER_HOST_THEME_CHANGED&&HK(n.data.theme)&&t(n.data.theme)};return window.addEventListener(`message`,n),()=>window.removeEventListener(`message`,n)},[]),e};p();var GK=`browser`,KK=()=>{let e=new URLSearchParams(window.location.search).get(GK);return e!==null&&e!==`false`},qK=()=>{let e=P(null),[t]=N(()=>window.location.pathname),[n]=N(KK);return L(pK,{iframeRef:e,children:[L(gK,{}),L(Ii,{children:L(oK,{children:L(BK,{iframeRef:e,applicationPath:t,isBrowserVisible:n})})})]})},JK=()=>L(le,{forcedTheme:WK(),hasBootstrapScript:!1,children:L(kD,{children:L(qK,{})})});u();var YK=document.getElementById(`root`);YK&&e(L(JK,{}),YK);export{FD as A,rs as B,Kj as C,Gj as D,Uj as E,gc as F,L as G,qi as H,hc as I,ac as L,MD as M,pD as N,ak as O,Rc as P,ps as R,Wj as S,Vj as T,En as U,W as V,be as W,Z as _,_W as a,Bj as b,bW as c,iH as d,bL as f,GI as g,$I as h,EW as i,Y as j,OO as k,xW as l,ZI as m,YW as n,vW as o,dL as p,NW as r,yW as s,gG as t,SW as u,qj as v,Jj as w,Xj as x,Hj as y,ds as z};
|