intlayer-editor 8.9.4-canary.0 → 8.9.4
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/client/dist/assets/{CodeBlockShiki-tYuBsb-D.js → CodeBlockShiki-D0C6rZyp.js} +2 -2
- package/client/dist/assets/{bundle-web-DUmOj0Jn.js → bundle-web-DXOHBgb_.js} +1 -1
- package/client/dist/assets/{index-BEQcZxNK.js → index-MTg78yVA.js} +6 -6
- package/client/dist/index.html +1 -1
- package/package.json +11 -11
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-e34uwh4y.js","assets/angular-html-CEHubn6t.js","assets/chunk-BNv3lrIs.js","assets/html-CYL5PFvn.js","assets/css-Dp02Rd8y.js","assets/javascript-DXaYTZG5.js","assets/angular-ts-CiyvuJ3c.js","assets/angular-ts-CjAS5IwH.js","assets/scss-DHuHgsan.js","assets/astro-CF-G_mLd.js","assets/astro-Db9UTNXL.js","assets/json-BOcesKJN.js","assets/postcss-CicMbQzg.js","assets/tsx-Cz_vagcs.js","assets/typescript-DPA-zpBF.js","assets/typescript-BvdxnUJE.js","assets/javascript-CVwQ0ckB.js","assets/bash-BOi29tyq.js","assets/shellscript-DwXoW65R.js","assets/json-CZNVOEZU.js","assets/json5-DhDVLaCN.js","assets/json5-CKxDO2EN.js","assets/tsx-Bs58sluU.js","assets/vue-D6mvedsZ.js","assets/vue-BM4Ht5NB.js","assets/html-derivative-CpPBJMkX.js","assets/svelte-BqRx2SlM.js","assets/svelte-B2g7RBet.js","assets/markdown-uEa4nrao.js","assets/markdown-DAtzMmbf.js","assets/css-CKWU9jB-.js","assets/html-H13abZ3q.js","assets/xml-V1ZKXNIX.js","assets/xml-xDUUt4p9.js","assets/java-BdeadKJM.js","assets/yaml-Db6gu32L.js","assets/yaml-sdi5CfWK.js","assets/github-dark-B-TBrtZc.js","assets/github-dark-CoIrAhfN.js","assets/github-light-DX4kBiEw.js","assets/github-light-DUySBmbm.js","assets/bundle-web-
|
|
2
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{t}from"./react-BFwN_vxz.js";import{i as n,n as r,r as i,t as a}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-e34uwh4y.js","assets/angular-html-CEHubn6t.js","assets/chunk-BNv3lrIs.js","assets/html-CYL5PFvn.js","assets/css-Dp02Rd8y.js","assets/javascript-DXaYTZG5.js","assets/angular-ts-CiyvuJ3c.js","assets/angular-ts-CjAS5IwH.js","assets/scss-DHuHgsan.js","assets/astro-CF-G_mLd.js","assets/astro-Db9UTNXL.js","assets/json-BOcesKJN.js","assets/postcss-CicMbQzg.js","assets/tsx-Cz_vagcs.js","assets/typescript-DPA-zpBF.js","assets/typescript-BvdxnUJE.js","assets/javascript-CVwQ0ckB.js","assets/bash-BOi29tyq.js","assets/shellscript-DwXoW65R.js","assets/json-CZNVOEZU.js","assets/json5-DhDVLaCN.js","assets/json5-CKxDO2EN.js","assets/tsx-Bs58sluU.js","assets/vue-D6mvedsZ.js","assets/vue-BM4Ht5NB.js","assets/html-derivative-CpPBJMkX.js","assets/svelte-BqRx2SlM.js","assets/svelte-B2g7RBet.js","assets/markdown-uEa4nrao.js","assets/markdown-DAtzMmbf.js","assets/css-CKWU9jB-.js","assets/html-H13abZ3q.js","assets/xml-V1ZKXNIX.js","assets/xml-xDUUt4p9.js","assets/java-BdeadKJM.js","assets/yaml-Db6gu32L.js","assets/yaml-sdi5CfWK.js","assets/github-dark-B-TBrtZc.js","assets/github-dark-CoIrAhfN.js","assets/github-light-DX4kBiEw.js","assets/github-light-DUySBmbm.js","assets/bundle-web-DXOHBgb_.js","assets/index-MTg78yVA.js","assets/react-BFwN_vxz.js","assets/index-cbJiinse.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e}from"./chunk-BNv3lrIs.js";import{t}from"./react-BFwN_vxz.js";import{i as n,n as r,r as i,t as a}from"./index-MTg78yVA.js";var o=n(),s=e(t(),1),c=i(),l=new Map,u=new Map,d=async e=>{if(l.has(e))return l.get(e);let t;switch(e){case`angular-html`:t=await r(()=>import(`./angular-html-e34uwh4y.js`),__vite__mapDeps([0,1,2,3,4,5]));break;case`angular-ts`:t=await r(()=>import(`./angular-ts-CiyvuJ3c.js`),__vite__mapDeps([6,7,1,2,3,4,5,8]));break;case`astro`:t=await r(()=>import(`./astro-CF-G_mLd.js`),__vite__mapDeps([9,10,4,2,5,11,12,13,14]));break;case`typescript`:case`ts`:t=await r(()=>import(`./typescript-BvdxnUJE.js`),__vite__mapDeps([15,14,2]));break;case`javascript`:case`js`:case`cjs`:case`mjs`:t=await r(()=>import(`./javascript-CVwQ0ckB.js`),__vite__mapDeps([16,5,2]));break;case`bash`:case`sh`:case`shell`:t=await r(()=>import(`./bash-BOi29tyq.js`),__vite__mapDeps([17,18,2]));break;case`json`:t=await r(()=>import(`./json-CZNVOEZU.js`),__vite__mapDeps([19,11,2]));break;case`jsonc`:case`json5`:t=await r(()=>import(`./json5-DhDVLaCN.js`),__vite__mapDeps([20,21]));break;case`tsx`:case`jsx`:t=await r(()=>import(`./tsx-Bs58sluU.js`),__vite__mapDeps([22,13,2]));break;case`vue`:t=await r(()=>import(`./vue-D6mvedsZ.js`),__vite__mapDeps([23,24,4,2,25,3,5,11,14]));break;case`svelte`:t=await r(()=>import(`./svelte-BqRx2SlM.js`),__vite__mapDeps([26,27,4,2,5,12,14]));break;case`markdown`:case`md`:case`mdx`:t=await r(()=>import(`./markdown-uEa4nrao.js`),__vite__mapDeps([28,29]));break;case`css`:t=await r(()=>import(`./css-CKWU9jB-.js`),__vite__mapDeps([30,4,2]));break;case`html`:t=await r(()=>import(`./html-H13abZ3q.js`),__vite__mapDeps([31,3,2,4,5]));break;case`xml`:t=await r(()=>import(`./xml-V1ZKXNIX.js`),__vite__mapDeps([32,33,2,34]));break;case`yml`:case`yaml`:t=await r(()=>import(`./yaml-Db6gu32L.js`),__vite__mapDeps([35,36]));break;default:t=await r(()=>import(`./typescript-BvdxnUJE.js`),__vite__mapDeps([15,14,2]));break}let n=t.default;return l.set(e,n),n},f=async e=>{if(u.has(e))return u.get(e);let t;switch(e){case`github-dark`:t=await r(()=>import(`./github-dark-B-TBrtZc.js`),__vite__mapDeps([37,38]));break;default:t=await r(()=>import(`./github-light-DX4kBiEw.js`),__vite__mapDeps([39,40]));break}let n=t.default;return u.set(e,n),n},p=null,m=async()=>(p||=r(async()=>{let{createHighlighter:e}=await import(`./bundle-web-DXOHBgb_.js`);return{createHighlighter:e}},__vite__mapDeps([41,2,42,43,44])).then(({createHighlighter:e})=>e({langs:[],themes:[]})),p),h=async(e,t,n)=>{let r=n?`github-dark`:`github-light`,[i,a,o]=await Promise.all([m(),d(t),f(r)]);return i.getLoadedLanguages().includes(t)||await i.loadLanguage(a),i.getLoadedThemes().includes(r)||await i.loadTheme(o),i.codeToHtml(String(e),{lang:t,theme:r})},g=e=>{let t=(0,o.c)(12),{children:n,lang:r,isDarkMode:i}=e,[l,u]=(0,s.useState)(null),d;t[0]!==n||t[1]!==l||t[2]!==i||t[3]!==r?(d=()=>{let e=!1;return h(n,r,i).then(t=>{e||u(t)}).catch(t=>{console.error(`Failed to highlight code:`,t),!e&&l===null&&u(``)}),()=>{e=!0}},t[0]=n,t[1]=l,t[2]=i,t[3]=r,t[4]=d):d=t[4];let f;t[5]!==n||t[6]!==i||t[7]!==r?(f=[n,r,i],t[5]=n,t[6]=i,t[7]=r,t[8]=f):f=t[8],(0,s.useEffect)(d,f);let p;return t[9]!==n||t[10]!==l?(p=(0,c.jsx)(`div`,{className:`min-w-0 max-w-full overflow-auto bg-transparent [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden [&_pre::-webkit-scrollbar]:hidden [&_pre]:[-ms-overflow-style:none] [&_pre]:[scrollbar-width:none]`,children:l?(0,c.jsx)(`div`,{dangerouslySetInnerHTML:{__html:l}}):(0,c.jsx)(a,{children:n})}),t[9]=n,t[10]=l,t[11]=p):p=t[11],p};export{g as CodeBlockShiki};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CEHubn6t.js","assets/chunk-BNv3lrIs.js","assets/html-CYL5PFvn.js","assets/css-Dp02Rd8y.js","assets/javascript-DXaYTZG5.js","assets/angular-ts-CjAS5IwH.js","assets/scss-DHuHgsan.js","assets/astro-Db9UTNXL.js","assets/json-BOcesKJN.js","assets/postcss-CicMbQzg.js","assets/tsx-Cz_vagcs.js","assets/typescript-DPA-zpBF.js","assets/blade-0oTzNpGX.js","assets/html-derivative-CpPBJMkX.js","assets/sql-CyI3A612.js","assets/xml-xDUUt4p9.js","assets/java-BdeadKJM.js","assets/c-B5k7CMmv.js","assets/coffee-D-Iq59RO.js","assets/cpp-BlooxUeF.js","assets/glsl-C6kXYX9a.js","assets/regexp-CvLtUeqp.js","assets/graphql-C4ZBHvsL.js","assets/jsx-ZzuQs-p_.js","assets/haml-CdXYj0WL.js","assets/handlebars-CpZ8Je77.js","assets/yaml-sdi5CfWK.js","assets/http-D6nf2vql.js","assets/shellscript-DwXoW65R.js","assets/hurl-CbA31W85.js","assets/csv-BwvM08Vd.js","assets/jinja-DfoX-8sw.js","assets/jison-D9pKMN5P.js","assets/julia-C5BYbWcw.js","assets/python-xLLWlBd0.js","assets/r-Cksr5ThK.js","assets/marko-ClNWpUX4.js","assets/less-BbgM5gh0.js","assets/mdc-DbapGt0R.js","assets/markdown-DAtzMmbf.js","assets/php-DoJMSkqh.js","assets/pug-DUxdJeW-.js","assets/svelte-B2g7RBet.js","assets/ts-tags-hIs1pIiW.js","assets/vue-BM4Ht5NB.js","assets/vue-html-CKAxv468.js","assets/vue-vine-BCo0FeU-.js","assets/stylus-CZRBdom4.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./chunk-BNv3lrIs.js";import{n as t}from"./index-BEQcZxNK.js";var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},c=(e,t,n)=>(s(e,t,`default`),n&&s(n,t,`default`)),l=e({createOnigurumaEngine:()=>_e,getDefaultWasmLoader:()=>ge,loadWasm:()=>ue,setDefaultWasmLoader:()=>he}),u=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function d(){return 2147483648}function f(){return typeof performance<`u`?performance.now():Date.now()}var p=(e,t)=>e+(t-e%t)%t;async function m(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=d();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,p(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let m={emscripten_get_now:f,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function h(){let n=await e({env:m,wasi_snapshot_preview1:m});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await h(),r}var h=Object.defineProperty,g=(e,t,n)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t,n)=>g(e,typeof t==`symbol`?t:t+``,n),v=null;function ee(e){throw new u(e.UTF8ToString(e.getLastOnigError()))}var te=class e{constructor(t){_(this,`utf16Length`),_(this,`utf8Length`),_(this,`utf16Value`),_(this,`utf8Value`),_(this,`utf16OffsetToUtf8`),_(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},y=class e{constructor(t){if(_(this,`id`,++e.LAST_ID),_(this,`_onigBinding`),_(this,`content`),_(this,`utf16Length`),_(this,`utf8Length`),_(this,`utf16OffsetToUtf8`),_(this,`utf8OffsetToUtf16`),_(this,`ptr`),!v)throw new u(`Must invoke loadWasm first.`);this._onigBinding=v,this.content=t;let n=new te(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=v.omalloc(1e4),e._sharedPtrInUse=!0,v.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(v)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};_(y,`LAST_ID`,0),_(y,`_sharedPtr`,0),_(y,`_sharedPtrInUse`,!1);var ne=y,re=class{constructor(e){if(_(this,`_onigBinding`),_(this,`_ptr`),!v)throw new u(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new te(e[r]);t[r]=i.createString(v),n[r]=i.utf8Length}let r=v.omalloc(4*e.length);v.HEAPU32.set(t,r/4);let i=v.omalloc(4*e.length);v.HEAPU32.set(n,i/4);let a=v.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)v.ofree(t[n]);v.ofree(i),v.ofree(r),a===0&&ee(v),this._onigBinding=v,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new ne(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function ie(e){return typeof e.instantiator==`function`}function ae(e){return typeof e.default==`function`}function oe(e){return e.data!==void 0}function se(e){return typeof Response<`u`&&e instanceof Response}function ce(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var le;function ue(e){if(le)return le;async function t(){v=await m(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),ie(n)?n=await n.instantiator(t):ae(n)?n=await n.default(t):(oe(n)&&(n=n.data),se(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await fe(n)(t):await pe(n)(t):ce(n)||n instanceof WebAssembly.Module?n=await de(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await de(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return le=t(),le}function de(e){return t=>WebAssembly.instantiate(e,t)}function fe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function pe(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var me;function he(e){me=e}function ge(){return me}async function _e(e){return e&&await ue(e),{createScanner(e){return new re(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new ne(e)}}}var ve=o({});c(ve,l);var ye=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>t(()=>import(`./andromeeda-BKXc-Kgq.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>t(()=>import(`./aurora-x-CEefmCn-.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>t(()=>import(`./ayu-dark-Dp_SrN4b.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>t(()=>import(`./ayu-light-Z6lab8Xa.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>t(()=>import(`./ayu-mirage-B2YOsU9y.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>t(()=>import(`./catppuccin-frappe-CAeZDElF.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>t(()=>import(`./catppuccin-latte-DPg_G08_.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>t(()=>import(`./catppuccin-macchiato-0Dnq51c-.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>t(()=>import(`./catppuccin-mocha-DfsmkFoe.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>t(()=>import(`./dark-plus-C3Qhs5KW.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>t(()=>import(`./dracula-BW6SEHpr.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>t(()=>import(`./dracula-soft-D7y9ok-Y.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>t(()=>import(`./everforest-dark-DJYXwCzB.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>t(()=>import(`./everforest-light-BlBXJ3oR.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>t(()=>import(`./github-dark-CoIrAhfN.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>t(()=>import(`./github-dark-default-B7MXZv6t.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>t(()=>import(`./github-dark-dimmed-COQmaHJ7.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>t(()=>import(`./github-dark-high-contrast-Bt8ufBoZ.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>t(()=>import(`./github-light-DUySBmbm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>t(()=>import(`./github-light-default-DTNOk-a1.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>t(()=>import(`./github-light-high-contrast--uAnf0JM.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>t(()=>import(`./gruvbox-dark-hard-BmpZ_hRd.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>t(()=>import(`./gruvbox-dark-medium-NmKEaTq6.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>t(()=>import(`./gruvbox-dark-soft-DIAHbTf3.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>t(()=>import(`./gruvbox-light-hard-DahUAtwX.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>t(()=>import(`./gruvbox-light-medium-CpdcyQRi.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>t(()=>import(`./gruvbox-light-soft-BbvjL_VW.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>t(()=>import(`./horizon-Q_JAoC71.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>t(()=>import(`./horizon-bright-BrigX3lx.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>t(()=>import(`./houston-D2POuoYx.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>t(()=>import(`./kanagawa-dragon-D66lvHbz.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>t(()=>import(`./kanagawa-lotus-CiFusJwe.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>t(()=>import(`./kanagawa-wave-BOFnYQJS.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>t(()=>import(`./laserwave-D4EAJmwU.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>t(()=>import(`./light-plus-wJOZCr5w.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>t(()=>import(`./material-theme-DACMZfQX.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>t(()=>import(`./material-theme-darker-m5_iOZ1V.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>t(()=>import(`./material-theme-lighter-BP3PjZuV.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>t(()=>import(`./material-theme-ocean-H8Vprld4.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>t(()=>import(`./material-theme-palenight-BFeZNwLh.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>t(()=>import(`./min-dark-DjqjzmHX.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>t(()=>import(`./min-light-CpKYHpIq.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>t(()=>import(`./monokai-DWlKofrY.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>t(()=>import(`./night-owl-CT8fGPtk.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>t(()=>import(`./night-owl-light-pwDpBvRM.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>t(()=>import(`./nord-m-jF9xiQ.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>t(()=>import(`./one-dark-pro-CTjfdPFF.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>t(()=>import(`./one-light-DN1wnYU9.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>t(()=>import(`./plastic-B_U9p5x0.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>t(()=>import(`./poimandres-DyjorAyX.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>t(()=>import(`./red-B257ToOP.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>t(()=>import(`./rose-pine-FJZncGYO.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>t(()=>import(`./rose-pine-dawn-6eTF_gsl.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>t(()=>import(`./rose-pine-moon-C-wEGARl.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>t(()=>import(`./slack-dark-C819I-ea.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>t(()=>import(`./slack-ochin-DqRidfD8.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>t(()=>import(`./snazzy-light-ku_B_Mdd.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>t(()=>import(`./solarized-dark-SoLZAXVn.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>t(()=>import(`./solarized-light-BL8LPueC.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>t(()=>import(`./synthwave-84-YqLbC8oT.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>t(()=>import(`./tokyo-night-Cn1-9G-o.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>t(()=>import(`./vesper-Co4nnOQl.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>t(()=>import(`./vitesse-black-DSEFth6l.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>t(()=>import(`./vitesse-dark-Da1SI7z7.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>t(()=>import(`./vitesse-light-BezxtMH8.js`),[]))}].map(e=>[e.id,e.import])),b=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function be(e){return xe(e)}function xe(e){return Array.isArray(e)?Se(e):e instanceof RegExp?e:typeof e==`object`?Ce(e):e}function Se(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=xe(e[n]);return t}function Ce(e){let t={};for(let n in e)t[n]=xe(e[n]);return t}function we(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Te(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Te(e.substring(0,e.length-1)):e.substr(~t+1)}var Ee=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,De=class{static hasCaptures(e){return e===null?!1:(Ee.lastIndex=0,Ee.test(e))}static replaceCaptures(e,t,n){return e.replace(Ee,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Oe(e,t){return e<t?-1:+(e>t)}function ke(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Oe(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Ae(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function je(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Me=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Ne=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Re(e),t)}static createFromParsedTheme(e,t){return Be(e,t)}_cachedMatchRoot=new Me(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Fe(e.parent,t.parentScopes));return n?new Le(n.fontStyle,n.foreground,n.background):null}},Pe=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Fe(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Ie(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ie(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Le=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Re(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Ae(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Ae(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new ze(l,u,e,o,s,c)}}return n}var ze=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},x=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(x||{});function Be(e,t){e.sort((e,t)=>{let n=Oe(e.scope,t.scope);return n!==0||(n=ke(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Ve(t),o=new Le(n,a.getId(r),a.getId(i)),s=new We(new Ue(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Ne(a,o,s)}var Ve=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},He=Object.freeze([]),Ue=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||He,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},We=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Ue.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(ke(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ue(e,t,n,r,i))}},S=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Ke(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Ge(e){return e}function Ke(e){return e}function C(e,t){let n=[],r=Je(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(qe(i)){let e=[];do e.push(i),i=r.next();while(qe(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function qe(e){return!!e&&!!e.match(/[\w\.:]+/)}function Je(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Ye(e){typeof e.dispose==`function`&&e.dispose()}var w=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Xe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ze=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Qe=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new w(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Ze;for(let n of e)$e(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof w){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function $e(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof w?T({baseGrammar:a,selfGrammar:i},r):et(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new w(e))}function et(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];tt([r],t,n)}}function T(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&tt(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&tt(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function tt(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?we({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&tt(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=st(i);switch(a.kind){case 0:T({...t,selfGrammar:t.baseGrammar},n);break;case 1:T(t,n);break;case 2:et(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?et(a.ruleName,i,n):T(i,n)}else a.kind===4?n.add(new Xe(a.scopeName,a.ruleName)):n.add(new w(a.scopeName));break}}}var nt=class{kind=0},rt=class{kind=1},it=class{constructor(e){this.ruleName=e}kind=2},at=class{constructor(e){this.scopeName=e}kind=3},ot=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function st(e){if(e===`$base`)return new nt;if(e===`$self`)return new rt;let t=e.indexOf(`#`);return t===-1?new at(e):t===0?new it(e.substring(1)):new ot(e.substring(0,t),e.substring(t+1))}var ct=/\\(\d+)/,lt=/\\(\d+)/g,ut=-1,dt=-2;function ft(e){return e}function pt(e){return e}var E=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=De.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=De.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Te(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:De.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:De.replaceCaptures(this._contentName,e,t)}},mt=class extends E{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},ht=class extends E{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new D(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new O,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends E{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new O,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_t=class extends E{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new D(i,this.id),this.beginCaptures=a,this._end=new D(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new O;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},vt=class extends E{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new D(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new D(o,dt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new O;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new O,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},yt=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new mt(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ht(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=we({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new gt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new vt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new _t(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=st(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof gt||e instanceof _t||e instanceof vt)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},D=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=ct.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return lt.lastIndex=0,this.source.replace(lt,(e,t)=>je(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},O=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new bt(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new bt(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},bt=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
2
|
+
import{r as e}from"./chunk-BNv3lrIs.js";import{n as t}from"./index-MTg78yVA.js";var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,o=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},c=(e,t,n)=>(s(e,t,`default`),n&&s(n,t,`default`)),l=e({createOnigurumaEngine:()=>_e,getDefaultWasmLoader:()=>ge,loadWasm:()=>ue,setDefaultWasmLoader:()=>he}),u=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function d(){return 2147483648}function f(){return typeof performance<`u`?performance.now():Date.now()}var p=(e,t)=>e+(t-e%t)%t;async function m(e){let t,n,r={};function i(e){n=e,r.HEAPU8=new Uint8Array(e),r.HEAPU32=new Uint32Array(e)}function a(e,t,n){r.HEAPU8.copyWithin(e,t,t+n)}function o(e){try{return t.grow(e-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function s(e){let t=r.HEAPU8.length;e>>>=0;let n=d();if(e>n)return!1;for(let r=1;r<=4;r*=2){let i=t*(1+.2/r);if(i=Math.min(i,e+100663296),o(Math.min(n,p(Math.max(e,i),65536))))return!0}return!1}let c=typeof TextDecoder<`u`?new TextDecoder(`utf8`):void 0;function l(e,t,n=1024){let r=t+n,i=t;for(;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&c)return c.decode(e.subarray(t,i));let a=``;for(;t<i;){let n=e[t++];if(!(n&128)){a+=String.fromCharCode(n);continue}let r=e[t++]&63;if((n&224)==192){a+=String.fromCharCode((n&31)<<6|r);continue}let i=e[t++]&63;if(n=(n&240)==224?(n&15)<<12|r<<6|i:(n&7)<<18|r<<12|i<<6|e[t++]&63,n<65536)a+=String.fromCharCode(n);else{let e=n-65536;a+=String.fromCharCode(55296|e>>10,56320|e&1023)}}return a}function u(e,t){return e?l(r.HEAPU8,e,t):``}let m={emscripten_get_now:f,emscripten_memcpy_big:a,emscripten_resize_heap:s,fd_write:()=>0};async function h(){let n=await e({env:m,wasi_snapshot_preview1:m});t=n.memory,i(t.buffer),Object.assign(r,n),r.UTF8ToString=u}return await h(),r}var h=Object.defineProperty,g=(e,t,n)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,_=(e,t,n)=>g(e,typeof t==`symbol`?t:t+``,n),v=null;function ee(e){throw new u(e.UTF8ToString(e.getLastOnigError()))}var te=class e{constructor(t){_(this,`utf16Length`),_(this,`utf8Length`),_(this,`utf16Value`),_(this,`utf8Value`),_(this,`utf16OffsetToUtf8`),_(this,`utf8OffsetToUtf16`);let n=t.length,r=e._utf8ByteLength(t),i=r!==n,a=i?new Uint32Array(n+1):null;i&&(a[n]=r);let o=i?new Uint32Array(r+1):null;i&&(o[r]=n);let s=new Uint8Array(r),c=0;for(let e=0;e<n;e++){let r=t.charCodeAt(e),l=r,u=!1;if(r>=55296&&r<=56319&&e+1<n){let n=t.charCodeAt(e+1);n>=56320&&n<=57343&&(l=(r-55296<<10)+65536|n-56320,u=!0)}i&&(a[e]=c,u&&(a[e+1]=c),l<=127?o[c+0]=e:l<=2047?(o[c+0]=e,o[c+1]=e):l<=65535?(o[c+0]=e,o[c+1]=e,o[c+2]=e):(o[c+0]=e,o[c+1]=e,o[c+2]=e,o[c+3]=e)),l<=127?s[c++]=l:l<=2047?(s[c++]=192|(l&1984)>>>6,s[c++]=128|(l&63)>>>0):l<=65535?(s[c++]=224|(l&61440)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0):(s[c++]=240|(l&1835008)>>>18,s[c++]=128|(l&258048)>>>12,s[c++]=128|(l&4032)>>>6,s[c++]=128|(l&63)>>>0),u&&e++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=s,this.utf16OffsetToUtf8=a,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let t=0;for(let n=0,r=e.length;n<r;n++){let i=e.charCodeAt(n),a=i,o=!1;if(i>=55296&&i<=56319&&n+1<r){let t=e.charCodeAt(n+1);t>=56320&&t<=57343&&(a=(i-55296<<10)+65536|t-56320,o=!0)}a<=127?t+=1:a<=2047?t+=2:a<=65535?t+=3:t+=4,o&&n++}return t}createString(e){let t=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,t),t}},y=class e{constructor(t){if(_(this,`id`,++e.LAST_ID),_(this,`_onigBinding`),_(this,`content`),_(this,`utf16Length`),_(this,`utf8Length`),_(this,`utf16OffsetToUtf8`),_(this,`utf8OffsetToUtf16`),_(this,`ptr`),!v)throw new u(`Must invoke loadWasm first.`);this._onigBinding=v,this.content=t;let n=new te(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!e._sharedPtrInUse?(e._sharedPtr||=v.omalloc(1e4),e._sharedPtrInUse=!0,v.HEAPU8.set(n.utf8Value,e._sharedPtr),this.ptr=e._sharedPtr):this.ptr=n.createString(v)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===e._sharedPtr?e._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};_(y,`LAST_ID`,0),_(y,`_sharedPtr`,0),_(y,`_sharedPtrInUse`,!1);var ne=y,re=class{constructor(e){if(_(this,`_onigBinding`),_(this,`_ptr`),!v)throw new u(`Must invoke loadWasm first.`);let t=[],n=[];for(let r=0,i=e.length;r<i;r++){let i=new te(e[r]);t[r]=i.createString(v),n[r]=i.utf8Length}let r=v.omalloc(4*e.length);v.HEAPU32.set(t,r/4);let i=v.omalloc(4*e.length);v.HEAPU32.set(n,i/4);let a=v.createOnigScanner(r,i,e.length);for(let n=0,r=e.length;n<r;n++)v.ofree(t[n]);v.ofree(i),v.ofree(r),a===0&&ee(v),this._onigBinding=v,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,t,n){let r=0;if(typeof n==`number`&&(r=n),typeof e==`string`){e=new ne(e);let n=this._findNextMatchSync(e,t,!1,r);return e.dispose(),n}return this._findNextMatchSync(e,t,!1,r)}_findNextMatchSync(e,t,n,r){let i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(t),r);if(a===0)return null;let o=i.HEAPU32,s=a/4,c=o[s++],l=o[s++],u=[];for(let t=0;t<l;t++){let n=e.convertUtf8OffsetToUtf16(o[s++]),r=e.convertUtf8OffsetToUtf16(o[s++]);u[t]={start:n,end:r,length:r-n}}return{index:c,captureIndices:u}}};function ie(e){return typeof e.instantiator==`function`}function ae(e){return typeof e.default==`function`}function oe(e){return e.data!==void 0}function se(e){return typeof Response<`u`&&e instanceof Response}function ce(e){return typeof ArrayBuffer<`u`&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<`u`&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer||typeof Uint32Array<`u`&&e instanceof Uint32Array}var le;function ue(e){if(le)return le;async function t(){v=await m(async t=>{let n=e;return n=await n,typeof n==`function`&&(n=await n(t)),typeof n==`function`&&(n=await n(t)),ie(n)?n=await n.instantiator(t):ae(n)?n=await n.default(t):(oe(n)&&(n=n.data),se(n)?n=typeof WebAssembly.instantiateStreaming==`function`?await fe(n)(t):await pe(n)(t):ce(n)||n instanceof WebAssembly.Module?n=await de(n)(t):`default`in n&&n.default instanceof WebAssembly.Module&&(n=await de(n.default)(t))),`instance`in n&&(n=n.instance),`exports`in n&&(n=n.exports),n})}return le=t(),le}function de(e){return t=>WebAssembly.instantiate(e,t)}function fe(e){return t=>WebAssembly.instantiateStreaming(e,t)}function pe(e){return async t=>{let n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}var me;function he(e){me=e}function ge(){return me}async function _e(e){return e&&await ue(e),{createScanner(e){return new re(e.map(e=>typeof e==`string`?e:e.source))},createString(e){return new ne(e)}}}var ve=o({});c(ve,l);var ye=Object.fromEntries([{id:`andromeeda`,displayName:`Andromeeda`,type:`dark`,import:(()=>t(()=>import(`./andromeeda-BKXc-Kgq.js`),[]))},{id:`aurora-x`,displayName:`Aurora X`,type:`dark`,import:(()=>t(()=>import(`./aurora-x-CEefmCn-.js`),[]))},{id:`ayu-dark`,displayName:`Ayu Dark`,type:`dark`,import:(()=>t(()=>import(`./ayu-dark-Dp_SrN4b.js`),[]))},{id:`ayu-light`,displayName:`Ayu Light`,type:`light`,import:(()=>t(()=>import(`./ayu-light-Z6lab8Xa.js`),[]))},{id:`ayu-mirage`,displayName:`Ayu Mirage`,type:`dark`,import:(()=>t(()=>import(`./ayu-mirage-B2YOsU9y.js`),[]))},{id:`catppuccin-frappe`,displayName:`Catppuccin Frappé`,type:`dark`,import:(()=>t(()=>import(`./catppuccin-frappe-CAeZDElF.js`),[]))},{id:`catppuccin-latte`,displayName:`Catppuccin Latte`,type:`light`,import:(()=>t(()=>import(`./catppuccin-latte-DPg_G08_.js`),[]))},{id:`catppuccin-macchiato`,displayName:`Catppuccin Macchiato`,type:`dark`,import:(()=>t(()=>import(`./catppuccin-macchiato-0Dnq51c-.js`),[]))},{id:`catppuccin-mocha`,displayName:`Catppuccin Mocha`,type:`dark`,import:(()=>t(()=>import(`./catppuccin-mocha-DfsmkFoe.js`),[]))},{id:`dark-plus`,displayName:`Dark Plus`,type:`dark`,import:(()=>t(()=>import(`./dark-plus-C3Qhs5KW.js`),[]))},{id:`dracula`,displayName:`Dracula Theme`,type:`dark`,import:(()=>t(()=>import(`./dracula-BW6SEHpr.js`),[]))},{id:`dracula-soft`,displayName:`Dracula Theme Soft`,type:`dark`,import:(()=>t(()=>import(`./dracula-soft-D7y9ok-Y.js`),[]))},{id:`everforest-dark`,displayName:`Everforest Dark`,type:`dark`,import:(()=>t(()=>import(`./everforest-dark-DJYXwCzB.js`),[]))},{id:`everforest-light`,displayName:`Everforest Light`,type:`light`,import:(()=>t(()=>import(`./everforest-light-BlBXJ3oR.js`),[]))},{id:`github-dark`,displayName:`GitHub Dark`,type:`dark`,import:(()=>t(()=>import(`./github-dark-CoIrAhfN.js`),[]))},{id:`github-dark-default`,displayName:`GitHub Dark Default`,type:`dark`,import:(()=>t(()=>import(`./github-dark-default-B7MXZv6t.js`),[]))},{id:`github-dark-dimmed`,displayName:`GitHub Dark Dimmed`,type:`dark`,import:(()=>t(()=>import(`./github-dark-dimmed-COQmaHJ7.js`),[]))},{id:`github-dark-high-contrast`,displayName:`GitHub Dark High Contrast`,type:`dark`,import:(()=>t(()=>import(`./github-dark-high-contrast-Bt8ufBoZ.js`),[]))},{id:`github-light`,displayName:`GitHub Light`,type:`light`,import:(()=>t(()=>import(`./github-light-DUySBmbm.js`),[]))},{id:`github-light-default`,displayName:`GitHub Light Default`,type:`light`,import:(()=>t(()=>import(`./github-light-default-DTNOk-a1.js`),[]))},{id:`github-light-high-contrast`,displayName:`GitHub Light High Contrast`,type:`light`,import:(()=>t(()=>import(`./github-light-high-contrast--uAnf0JM.js`),[]))},{id:`gruvbox-dark-hard`,displayName:`Gruvbox Dark Hard`,type:`dark`,import:(()=>t(()=>import(`./gruvbox-dark-hard-BmpZ_hRd.js`),[]))},{id:`gruvbox-dark-medium`,displayName:`Gruvbox Dark Medium`,type:`dark`,import:(()=>t(()=>import(`./gruvbox-dark-medium-NmKEaTq6.js`),[]))},{id:`gruvbox-dark-soft`,displayName:`Gruvbox Dark Soft`,type:`dark`,import:(()=>t(()=>import(`./gruvbox-dark-soft-DIAHbTf3.js`),[]))},{id:`gruvbox-light-hard`,displayName:`Gruvbox Light Hard`,type:`light`,import:(()=>t(()=>import(`./gruvbox-light-hard-DahUAtwX.js`),[]))},{id:`gruvbox-light-medium`,displayName:`Gruvbox Light Medium`,type:`light`,import:(()=>t(()=>import(`./gruvbox-light-medium-CpdcyQRi.js`),[]))},{id:`gruvbox-light-soft`,displayName:`Gruvbox Light Soft`,type:`light`,import:(()=>t(()=>import(`./gruvbox-light-soft-BbvjL_VW.js`),[]))},{id:`horizon`,displayName:`Horizon`,type:`dark`,import:(()=>t(()=>import(`./horizon-Q_JAoC71.js`),[]))},{id:`horizon-bright`,displayName:`Horizon Bright`,type:`light`,import:(()=>t(()=>import(`./horizon-bright-BrigX3lx.js`),[]))},{id:`houston`,displayName:`Houston`,type:`dark`,import:(()=>t(()=>import(`./houston-D2POuoYx.js`),[]))},{id:`kanagawa-dragon`,displayName:`Kanagawa Dragon`,type:`dark`,import:(()=>t(()=>import(`./kanagawa-dragon-D66lvHbz.js`),[]))},{id:`kanagawa-lotus`,displayName:`Kanagawa Lotus`,type:`light`,import:(()=>t(()=>import(`./kanagawa-lotus-CiFusJwe.js`),[]))},{id:`kanagawa-wave`,displayName:`Kanagawa Wave`,type:`dark`,import:(()=>t(()=>import(`./kanagawa-wave-BOFnYQJS.js`),[]))},{id:`laserwave`,displayName:`LaserWave`,type:`dark`,import:(()=>t(()=>import(`./laserwave-D4EAJmwU.js`),[]))},{id:`light-plus`,displayName:`Light Plus`,type:`light`,import:(()=>t(()=>import(`./light-plus-wJOZCr5w.js`),[]))},{id:`material-theme`,displayName:`Material Theme`,type:`dark`,import:(()=>t(()=>import(`./material-theme-DACMZfQX.js`),[]))},{id:`material-theme-darker`,displayName:`Material Theme Darker`,type:`dark`,import:(()=>t(()=>import(`./material-theme-darker-m5_iOZ1V.js`),[]))},{id:`material-theme-lighter`,displayName:`Material Theme Lighter`,type:`light`,import:(()=>t(()=>import(`./material-theme-lighter-BP3PjZuV.js`),[]))},{id:`material-theme-ocean`,displayName:`Material Theme Ocean`,type:`dark`,import:(()=>t(()=>import(`./material-theme-ocean-H8Vprld4.js`),[]))},{id:`material-theme-palenight`,displayName:`Material Theme Palenight`,type:`dark`,import:(()=>t(()=>import(`./material-theme-palenight-BFeZNwLh.js`),[]))},{id:`min-dark`,displayName:`Min Dark`,type:`dark`,import:(()=>t(()=>import(`./min-dark-DjqjzmHX.js`),[]))},{id:`min-light`,displayName:`Min Light`,type:`light`,import:(()=>t(()=>import(`./min-light-CpKYHpIq.js`),[]))},{id:`monokai`,displayName:`Monokai`,type:`dark`,import:(()=>t(()=>import(`./monokai-DWlKofrY.js`),[]))},{id:`night-owl`,displayName:`Night Owl`,type:`dark`,import:(()=>t(()=>import(`./night-owl-CT8fGPtk.js`),[]))},{id:`night-owl-light`,displayName:`Night Owl Light`,type:`light`,import:(()=>t(()=>import(`./night-owl-light-pwDpBvRM.js`),[]))},{id:`nord`,displayName:`Nord`,type:`dark`,import:(()=>t(()=>import(`./nord-m-jF9xiQ.js`),[]))},{id:`one-dark-pro`,displayName:`One Dark Pro`,type:`dark`,import:(()=>t(()=>import(`./one-dark-pro-CTjfdPFF.js`),[]))},{id:`one-light`,displayName:`One Light`,type:`light`,import:(()=>t(()=>import(`./one-light-DN1wnYU9.js`),[]))},{id:`plastic`,displayName:`Plastic`,type:`dark`,import:(()=>t(()=>import(`./plastic-B_U9p5x0.js`),[]))},{id:`poimandres`,displayName:`Poimandres`,type:`dark`,import:(()=>t(()=>import(`./poimandres-DyjorAyX.js`),[]))},{id:`red`,displayName:`Red`,type:`dark`,import:(()=>t(()=>import(`./red-B257ToOP.js`),[]))},{id:`rose-pine`,displayName:`Rosé Pine`,type:`dark`,import:(()=>t(()=>import(`./rose-pine-FJZncGYO.js`),[]))},{id:`rose-pine-dawn`,displayName:`Rosé Pine Dawn`,type:`light`,import:(()=>t(()=>import(`./rose-pine-dawn-6eTF_gsl.js`),[]))},{id:`rose-pine-moon`,displayName:`Rosé Pine Moon`,type:`dark`,import:(()=>t(()=>import(`./rose-pine-moon-C-wEGARl.js`),[]))},{id:`slack-dark`,displayName:`Slack Dark`,type:`dark`,import:(()=>t(()=>import(`./slack-dark-C819I-ea.js`),[]))},{id:`slack-ochin`,displayName:`Slack Ochin`,type:`light`,import:(()=>t(()=>import(`./slack-ochin-DqRidfD8.js`),[]))},{id:`snazzy-light`,displayName:`Snazzy Light`,type:`light`,import:(()=>t(()=>import(`./snazzy-light-ku_B_Mdd.js`),[]))},{id:`solarized-dark`,displayName:`Solarized Dark`,type:`dark`,import:(()=>t(()=>import(`./solarized-dark-SoLZAXVn.js`),[]))},{id:`solarized-light`,displayName:`Solarized Light`,type:`light`,import:(()=>t(()=>import(`./solarized-light-BL8LPueC.js`),[]))},{id:`synthwave-84`,displayName:`Synthwave '84`,type:`dark`,import:(()=>t(()=>import(`./synthwave-84-YqLbC8oT.js`),[]))},{id:`tokyo-night`,displayName:`Tokyo Night`,type:`dark`,import:(()=>t(()=>import(`./tokyo-night-Cn1-9G-o.js`),[]))},{id:`vesper`,displayName:`Vesper`,type:`dark`,import:(()=>t(()=>import(`./vesper-Co4nnOQl.js`),[]))},{id:`vitesse-black`,displayName:`Vitesse Black`,type:`dark`,import:(()=>t(()=>import(`./vitesse-black-DSEFth6l.js`),[]))},{id:`vitesse-dark`,displayName:`Vitesse Dark`,type:`dark`,import:(()=>t(()=>import(`./vitesse-dark-Da1SI7z7.js`),[]))},{id:`vitesse-light`,displayName:`Vitesse Light`,type:`light`,import:(()=>t(()=>import(`./vitesse-light-BezxtMH8.js`),[]))}].map(e=>[e.id,e.import])),b=class extends Error{constructor(e){super(e),this.name=`ShikiError`}};function be(e){return xe(e)}function xe(e){return Array.isArray(e)?Se(e):e instanceof RegExp?e:typeof e==`object`?Ce(e):e}function Se(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=xe(e[n]);return t}function Ce(e){let t={};for(let n in e)t[n]=xe(e[n]);return t}function we(e,...t){return t.forEach(t=>{for(let n in t)e[n]=t[n]}),e}function Te(e){let t=~e.lastIndexOf(`/`)||~e.lastIndexOf(`\\`);return t===0?e:~t===e.length-1?Te(e.substring(0,e.length-1)):e.substr(~t+1)}var Ee=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,De=class{static hasCaptures(e){return e===null?!1:(Ee.lastIndex=0,Ee.test(e))}static replaceCaptures(e,t,n){return e.replace(Ee,(e,r,i,a)=>{let o=n[parseInt(r||i,10)];if(o){let e=t.substring(o.start,o.end);for(;e[0]===`.`;)e=e.substring(1);switch(a){case`downcase`:return e.toLowerCase();case`upcase`:return e.toUpperCase();default:return e}}else return e})}};function Oe(e,t){return e<t?-1:+(e>t)}function ke(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let r=0;r<n;r++){let n=Oe(e[r],t[r]);if(n!==0)return n}return 0}return n-r}function Ae(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function je(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,`\\$&`)}var Me=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);let t=this.fn(e);return this.cache.set(e,t),t}},Ne=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Re(e),t)}static createFromParsedTheme(e,t){return Be(e,t)}_cachedMatchRoot=new Me(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;let t=e.scopeName,n=this._cachedMatchRoot.get(t).find(t=>Fe(e.parent,t.parentScopes));return n?new Le(n.fontStyle,n.foreground,n.background):null}},Pe=class e{constructor(e,t){this.parent=e,this.scopeName=t}static push(t,n){for(let r of n)t=new e(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new e(n,t[r]);return n}push(t){return new e(this,t)}getSegments(){let e=this,t=[];for(;e;)t.push(e.scopeName),e=e.parent;return t.reverse(),t}toString(){return this.getSegments().join(` `)}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push(n.scopeName),n=n.parent;return n===e?t.reverse():void 0}};function Fe(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===`>`){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!Ie(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Ie(e,t){return t===e||e.startsWith(t)&&e[t.length]===`.`}var Le=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Re(e){if(!e||!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let e=0,i=t.length;e<i;e++){let i=t[e];if(!i.settings)continue;let a;if(typeof i.scope==`string`){let e=i.scope;e=e.replace(/^[,]+/,``),e=e.replace(/[,]+$/,``),a=e.split(`,`)}else a=Array.isArray(i.scope)?i.scope:[``];let o=-1;if(typeof i.settings.fontStyle==`string`){o=0;let e=i.settings.fontStyle.split(` `);for(let t=0,n=e.length;t<n;t++)switch(e[t]){case`italic`:o|=1;break;case`bold`:o|=2;break;case`underline`:o|=4;break;case`strikethrough`:o|=8;break}}let s=null;typeof i.settings.foreground==`string`&&Ae(i.settings.foreground)&&(s=i.settings.foreground);let c=null;typeof i.settings.background==`string`&&Ae(i.settings.background)&&(c=i.settings.background);for(let t=0,i=a.length;t<i;t++){let i=a[t].trim().split(` `),l=i[i.length-1],u=null;i.length>1&&(u=i.slice(0,i.length-1),u.reverse()),n[r++]=new ze(l,u,e,o,s,c)}}return n}var ze=class{constructor(e,t,n,r,i,a){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=a}},x=(e=>(e[e.NotSet=-1]=`NotSet`,e[e.None=0]=`None`,e[e.Italic=1]=`Italic`,e[e.Bold=2]=`Bold`,e[e.Underline=4]=`Underline`,e[e.Strikethrough=8]=`Strikethrough`,e))(x||{});function Be(e,t){e.sort((e,t)=>{let n=Oe(e.scope,t.scope);return n!==0||(n=ke(e.parentScopes,t.parentScopes),n!==0)?n:e.index-t.index});let n=0,r=`#000000`,i=`#ffffff`;for(;e.length>=1&&e[0].scope===``;){let t=e.shift();t.fontStyle!==-1&&(n=t.fontStyle),t.foreground!==null&&(r=t.foreground),t.background!==null&&(i=t.background)}let a=new Ve(t),o=new Le(n,a.getId(r),a.getId(i)),s=new We(new Ue(0,null,-1,0,0),[]);for(let t=0,n=e.length;t<n;t++){let n=e[t];s.insert(0,n.scope,n.parentScopes,n.fontStyle,a.getId(n.foreground),a.getId(n.background))}return new Ne(a,o,s)}var Ve=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},He=Object.freeze([]),Ue=class e{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(e,t,n,r,i){this.scopeDepth=e,this.parentScopes=t||He,this.fontStyle=n,this.foreground=r,this.background=i}clone(){return new e(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=e[n].clone();return t}acceptOverwrite(e,t,n,r){this.scopeDepth>e?console.log(`how did this happen?`):this.scopeDepth=e,t!==-1&&(this.fontStyle=t),n!==0&&(this.foreground=n),r!==0&&(this.background=r)}},We=class e{constructor(e,t=[],n={}){this._mainRule=e,this._children=n,this._rulesWithParentScopes=t}_rulesWithParentScopes;static _cmpBySpecificity(e,t){if(e.scopeDepth!==t.scopeDepth)return t.scopeDepth-e.scopeDepth;let n=0,r=0;for(;e.parentScopes[n]===`>`&&n++,t.parentScopes[r]===`>`&&r++,!(n>=e.parentScopes.length||r>=t.parentScopes.length);){let i=t.parentScopes[r].length-e.parentScopes[n].length;if(i!==0)return i;n++,r++}return t.parentScopes.length-e.parentScopes.length}match(t){if(t!==``){let e=t.indexOf(`.`),n,r;if(e===-1?(n=t,r=``):(n=t.substring(0,e),r=t.substring(e+1)),this._children.hasOwnProperty(n))return this._children[n].match(r)}let n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(e._cmpBySpecificity),n}insert(t,n,r,i,a,o){if(n===``){this._doInsertHere(t,r,i,a,o);return}let s=n.indexOf(`.`),c,l;s===-1?(c=n,l=``):(c=n.substring(0,s),l=n.substring(s+1));let u;this._children.hasOwnProperty(c)?u=this._children[c]:(u=new e(this._mainRule.clone(),Ue.cloneArr(this._rulesWithParentScopes)),this._children[c]=u),u.insert(t+1,l,r,i,a,o)}_doInsertHere(e,t,n,r,i){if(t===null){this._mainRule.acceptOverwrite(e,n,r,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let o=this._rulesWithParentScopes[a];if(ke(o.parentScopes,t)===0){o.acceptOverwrite(e,n,r,i);return}}n===-1&&(n=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Ue(e,t,n,r,i))}},S=class e{static toBinaryStr(e){return e.toString(2).padStart(32,`0`)}static print(t){let n=e.getLanguageId(t),r=e.getTokenType(t),i=e.getFontStyle(t),a=e.getForeground(t),o=e.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:a,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!=0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(t,n,r,i,a,o,s){let c=e.getLanguageId(t),l=e.getTokenType(t),u=+!!e.containsBalancedBrackets(t),d=e.getFontStyle(t),f=e.getForeground(t),p=e.getBackground(t);return n!==0&&(c=n),r!==8&&(l=Ke(r)),i!==null&&(u=+!!i),a!==-1&&(d=a),o!==0&&(f=o),s!==0&&(p=s),(c<<0|l<<8|u<<10|d<<11|f<<15|p<<24)>>>0}};function Ge(e){return e}function Ke(e){return e}function C(e,t){let n=[],r=Je(e),i=r.next();for(;i!==null;){let e=0;if(i.length===2&&i.charAt(1)===`:`){switch(i.charAt(0)){case`R`:e=1;break;case`L`:e=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let t=o();if(n.push({matcher:t,priority:e}),i!==`,`)break;i=r.next()}return n;function a(){if(i===`-`){i=r.next();let e=a();return t=>!!e&&!e(t)}if(i===`(`){i=r.next();let e=s();return i===`)`&&(i=r.next()),e}if(qe(i)){let e=[];do e.push(i),i=r.next();while(qe(i));return n=>t(e,n)}return null}function o(){let e=[],t=a();for(;t;)e.push(t),t=a();return t=>e.every(e=>e(t))}function s(){let e=[],t=o();for(;t&&(e.push(t),i===`|`||i===`,`);){do i=r.next();while(i===`|`||i===`,`);t=o()}return t=>e.some(e=>e(t))}}function qe(e){return!!e&&!!e.match(/[\w\.:]+/)}function Je(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;let r=n[0];return n=t.exec(e),r}}}function Ye(e){typeof e.dispose==`function`&&e.dispose()}var w=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Xe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Ze=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){let t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Qe=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new w(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){let e=this.Q;this.Q=[];let t=new Ze;for(let n of e)$e(n,this.initialScopeName,this.repo,t);for(let e of t.references)if(e instanceof w){if(this.seenFullScopeRequests.has(e.scopeName))continue;this.seenFullScopeRequests.add(e.scopeName),this.Q.push(e)}else{if(this.seenFullScopeRequests.has(e.scopeName)||this.seenPartialScopeRequests.has(e.toKey()))continue;this.seenPartialScopeRequests.add(e.toKey()),this.Q.push(e)}}};function $e(e,t,n,r){let i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw Error(`No grammar provided for <${t}>`);return}let a=n.lookup(t);e instanceof w?T({baseGrammar:a,selfGrammar:i},r):et(e.ruleName,{baseGrammar:a,selfGrammar:i,repository:i.repository},r);let o=n.injections(e.scopeName);if(o)for(let e of o)r.add(new w(e))}function et(e,t,n){if(t.repository&&t.repository[e]){let r=t.repository[e];tt([r],t,n)}}function T(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&tt(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&tt(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function tt(e,t,n){for(let r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);let e=r.repository?we({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&tt(r.patterns,{...t,repository:e},n);let i=r.include;if(!i)continue;let a=st(i);switch(a.kind){case 0:T({...t,selfGrammar:t.baseGrammar},n);break;case 1:T(t,n);break;case 2:et(a.ruleName,{...t,repository:e},n);break;case 3:case 4:let r=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(r){let i={baseGrammar:t.baseGrammar,selfGrammar:r,repository:e};a.kind===4?et(a.ruleName,i,n):T(i,n)}else a.kind===4?n.add(new Xe(a.scopeName,a.ruleName)):n.add(new w(a.scopeName));break}}}var nt=class{kind=0},rt=class{kind=1},it=class{constructor(e){this.ruleName=e}kind=2},at=class{constructor(e){this.scopeName=e}kind=3},ot=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function st(e){if(e===`$base`)return new nt;if(e===`$self`)return new rt;let t=e.indexOf(`#`);return t===-1?new at(e):t===0?new it(e.substring(1)):new ot(e.substring(0,t),e.substring(t+1))}var ct=/\\(\d+)/,lt=/\\(\d+)/g,ut=-1,dt=-2;function ft(e){return e}function pt(e){return e}var E=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=De.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=De.hasCaptures(this._contentName)}get debugName(){let e=this.$location?`${Te(this.$location.filename)}:${this.$location.line}`:`unknown`;return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:De.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:De.replaceCaptures(this._contentName,e,t)}},mt=class extends E{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw Error(`Not supported!`)}compile(e,t){throw Error(`Not supported!`)}compileAG(e,t,n,r){throw Error(`Not supported!`)}},ht=class extends E{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new D(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new O,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},gt=class extends E{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}collectPatterns(e,t){for(let n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new O,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},_t=class extends E{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,a,o,s,c,l){super(e,t,n,r),this._begin=new D(i,this.id),this.beginCaptures=a,this._end=new D(o||``,-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=s,this.applyEndPatternLast=c||!1,this.patterns=l.patterns,this.hasMissingPatterns=l.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new O;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},vt=class extends E{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,a,o,s,c){super(e,t,n,r),this._begin=new D(i,this.id),this.beginCaptures=a,this.whileCaptures=s,this._while=new D(o,dt),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&=(this._cachedCompiledPatterns.dispose(),null),this._cachedCompiledWhilePatterns&&=(this._cachedCompiledWhilePatterns.dispose(),null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new O;for(let t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new O,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||``),this._cachedCompiledWhilePatterns}},yt=class e{static createCaptureRule(e,t,n,r,i){return e.registerRule(e=>new mt(t,e,n,r,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new ht(t.$vscodeTextmateLocation,t.id,t.name,t.match,e._compileCaptures(t.captures,n,r));if(t.begin===void 0){t.repository&&(r=we({},r,t.repository));let i=t.patterns;return i===void 0&&t.include&&(i=[{include:t.include}]),new gt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,e._compilePatterns(i,n,r))}return t.while?new vt(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,e._compileCaptures(t.whileCaptures||t.captures,n,r),e._compilePatterns(t.patterns,n,r)):new _t(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,e._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,e._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,e._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let a=0;for(let e in t){if(e===`$vscodeTextmateLocation`)continue;let t=parseInt(e,10);t>a&&(a=t)}for(let e=0;e<=a;e++)i[e]=null;for(let a in t){if(a===`$vscodeTextmateLocation`)continue;let o=parseInt(a,10),s=0;t[a].patterns&&(s=e.getCompiledRuleId(t[a],n,r)),i[o]=e.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,s)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let a=0,o=t.length;a<o;a++){let o=t[a],s=-1;if(o.include){let t=st(o.include);switch(t.kind){case 0:case 1:s=e.getCompiledRuleId(r[o.include],n,r);break;case 2:let i=r[t.ruleName];i&&(s=e.getCompiledRuleId(i,n,r));break;case 3:case 4:let a=t.scopeName,c=t.kind===4?t.ruleName:null,l=n.getExternalGrammar(a,r);if(l)if(c){let t=l.repository[c];t&&(s=e.getCompiledRuleId(t,n,l.repository))}else s=e.getCompiledRuleId(l.repository.$self,n,l.repository);break}}else s=e.getCompiledRuleId(o,n,r);if(s!==-1){let e=n.getRule(s),t=!1;if((e instanceof gt||e instanceof _t||e instanceof vt)&&e.hasMissingPatterns&&e.patterns.length===0&&(t=!0),t)continue;i.push(s)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},D=class e{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(e,t){if(e&&typeof e==`string`){let t=e.length,n=0,r=[],i=!1;for(let a=0;a<t;a++)if(e.charAt(a)===`\\`&&a+1<t){let t=e.charAt(a+1);t===`z`?(r.push(e.substring(n,a)),r.push(`$(?!\\n)(?<!\\n)`),n=a+2):(t===`A`||t===`G`)&&(i=!0),a++}this.hasAnchor=i,n===0?this.source=e:(r.push(e.substring(n,t)),this.source=r.join(``))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=t,typeof this.source==`string`?this.hasBackReferences=ct.test(this.source):this.hasBackReferences=!1}clone(){return new e(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,t){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let n=t.map(t=>e.substring(t.start,t.end));return lt.lastIndex=0,this.source.replace(lt,(e,t)=>je(n[parseInt(t,10)]||``))}_buildAnchorCache(){if(typeof this.source!=`string`)throw Error(`This method should only be called if the source is a string`);let e=[],t=[],n=[],r=[],i,a,o,s;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),e[i]=o,t[i]=o,n[i]=o,r[i]=o,o===`\\`&&i+1<a&&(s=this.source.charAt(i+1),s===`A`?(e[i+1]=``,t[i+1]=``,n[i+1]=`A`,r[i+1]=`A`):s===`G`?(e[i+1]=``,t[i+1]=`G`,n[i+1]=``,r[i+1]=`G`):(e[i+1]=s,t[i+1]=s,n[i+1]=s,r[i+1]=s),i++);return{A0_G0:e.join(``),A0_G1:t.join(``),A1_G0:n.join(``),A1_G1:r.join(``)}}resolveAnchors(e,t){return!this.hasAnchor||!this._anchorCache||typeof this.source!=`string`?this.source:e?t?this._anchorCache.A1_G1:this._anchorCache.A1_G0:t?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},O=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&=(this._cached.dispose(),null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(e=>e.source);this._cached=new bt(e,t,this._items.map(e=>e.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){return new bt(e,this._items.map(e=>e.resolveAnchors(t,n)),this._items.map(e=>e.ruleId))}},bt=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose==`function`&&this.scanner.dispose()}toString(){let e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(` - `+this.rules[t]+`: `+this.regExps[t]);return e.join(`
|
|
3
3
|
`)}findNextMatchSync(e,t,n){let r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},xt=class{constructor(e,t){this.languageId=e,this.tokenType=t}},St=class e{_defaultAttributes;_embeddedLanguagesMatcher;constructor(e,t){this._defaultAttributes=new xt(e,8),this._embeddedLanguagesMatcher=new Ct(Object.entries(t||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?e._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new xt(0,0);_getBasicScopeAttributes=new Me(e=>new xt(this._scopeToLanguage(e),this._toStandardTokenType(e)));_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(t){let n=t.match(e.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case`comment`:return 1;case`string`:return 2;case`regex`:return 3;case`meta.embedded`:return 0}throw Error(`Unexpected match for standard token type!`)}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},Ct=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);let t=e.map(([e,t])=>je(e));t.sort(),t.reverse(),this.scopesRegExp=RegExp(`^((${t.join(`)|(`)}))($|\\.)`,``)}}match(e){if(!this.scopesRegExp)return;let t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}};typeof process<`u`&&{}.VSCODE_TEXTMATE_DEBUG;var wt=!1,Tt=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function Et(e,t,n,r,i,a,o,s){let c=t.content.length,l=!1,u=-1;if(o){let o=Dt(e,t,n,r,i,a);i=o.stack,r=o.linePos,n=o.isFirstLine,u=o.anchorPosition}let d=Date.now();for(;!l;){if(s!==0&&Date.now()-d>s)return new Tt(i,!0);f()}return new Tt(i,!1);function f(){let o=Ot(e,t,n,r,i,u);if(!o){a.produce(i,c),l=!0;return}let s=o.captureIndices,d=o.matchedRuleId,f=s&&s.length>0?s[0].end>r:!1;if(d===ut){let o=i.getRule(e);a.produce(i,s[0].start),i=i.withContentNameScopesList(i.nameScopesList),k(e,t,n,i,a,o.endCaptures,s),a.produce(i,s[0].end);let d=i;if(i=i.parent,u=d.getAnchorPos(),!f&&d.getEnterPos()===r){i=d,a.produce(i,c),l=!0;return}}else{let o=e.getRule(d);a.produce(i,s[0].start);let p=i,m=o.getName(t.content,s),h=i.contentNameScopesList.pushAttributed(m,e);if(i=i.push(d,r,u,s[0].end===c,null,h,h),o instanceof _t){let r=o;k(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.endHasBackReferences&&(i=i.withEndRule(r.getEndWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(o instanceof vt){let r=o;k(e,t,n,i,a,r.beginCaptures,s),a.produce(i,s[0].end),u=s[0].end;let d=r.getContentName(t.content,s),m=h.pushAttributed(d,e);if(i=i.withContentNameScopesList(m),r.whileHasBackReferences&&(i=i.withEndRule(r.getWhileWithResolvedBackReferences(t.content,s))),!f&&p.hasSameRuleAs(i)){i=i.pop(),a.produce(i,c),l=!0;return}}else if(k(e,t,n,i,a,o.captures,s),a.produce(i,s[0].end),i=i.pop(),!f){i=i.safePop(),a.produce(i,c),l=!0;return}}s[0].end>r&&(r=s[0].end,n=!1)}}function Dt(e,t,n,r,i,a){let o=i.beginRuleCapturedEOL?0:-1,s=[];for(let t=i;t;t=t.pop()){let n=t.getRule(e);n instanceof vt&&s.push({rule:n,stack:t})}for(let c=s.pop();c;c=s.pop()){let{ruleScanner:s,findOptions:l}=Mt(c.rule,e,c.stack.endRule,n,r===o),u=s.findNextMatchSync(t,r,l);if(u){if(u.ruleId!==dt){i=c.stack.pop();break}u.captureIndices&&u.captureIndices.length&&(a.produce(c.stack,u.captureIndices[0].start),k(e,t,n,c.stack,a,c.rule.whileCaptures,u.captureIndices),a.produce(c.stack,u.captureIndices[0].end),o=u.captureIndices[0].end,u.captureIndices[0].end>r&&(r=u.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:o,isFirstLine:n}}function Ot(e,t,n,r,i,a){let o=kt(e,t,n,r,i,a),s=e.getInjections();if(s.length===0)return o;let c=At(s,e,t,n,r,i,a);if(!c)return o;if(!o)return c;let l=o.captureIndices[0].start,u=c.captureIndices[0].start;return u<l||c.priorityMatch&&u===l?c:o}function kt(e,t,n,r,i,a){let{ruleScanner:o,findOptions:s}=jt(i.getRule(e),e,i.endRule,n,r===a),c=o.findNextMatchSync(t,r,s);return c?{captureIndices:c.captureIndices,matchedRuleId:c.ruleId}:null}function At(e,t,n,r,i,a,o){let s=Number.MAX_VALUE,c=null,l,u=0,d=a.contentNameScopesList.getScopeNames();for(let a=0,f=e.length;a<f;a++){let f=e[a];if(!f.matcher(d))continue;let{ruleScanner:p,findOptions:m}=jt(t.getRule(f.ruleId),t,null,r,i===o),h=p.findNextMatchSync(n,i,m);if(!h)continue;let g=h.captureIndices[0].start;if(!(g>=s)&&(s=g,c=h.captureIndices,l=h.ruleId,u=f.priority,s===i))break}return c?{priorityMatch:u===-1,captureIndices:c,matchedRuleId:l}:null}function jt(e,t,n,r,i){return wt?{ruleScanner:e.compile(t,n),findOptions:Nt(r,i)}:{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function Mt(e,t,n,r,i){return wt?{ruleScanner:e.compileWhile(t,n),findOptions:Nt(r,i)}:{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Nt(e,t){let n=0;return e||(n|=1),t||(n|=4),n}function k(e,t,n,r,i,a,o){if(a.length===0)return;let s=t.content,c=Math.min(a.length,o.length),l=[],u=o[0].end;for(let t=0;t<c;t++){let c=a[t];if(c===null)continue;let d=o[t];if(d.length===0)continue;if(d.start>u)break;for(;l.length>0&&l[l.length-1].endPos<=d.start;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop();if(l.length>0?i.produceFromScopes(l[l.length-1].scopes,d.start):i.produce(r,d.start),c.retokenizeCapturedWithRuleId){let t=c.getName(s,o),a=r.contentNameScopesList.pushAttributed(t,e),l=c.getContentName(s,o),u=a.pushAttributed(l,e),f=r.push(c.retokenizeCapturedWithRuleId,d.start,-1,!1,null,a,u),p=e.createOnigString(s.substring(0,d.end));Et(e,p,n&&d.start===0,d.start,f,i,!1,0),Ye(p);continue}let f=c.getName(s,o);if(f!==null){let t=(l.length>0?l[l.length-1].scopes:r.contentNameScopesList).pushAttributed(f,e);l.push(new Pt(t,d.end))}}for(;l.length>0;)i.produceFromScopes(l[l.length-1].scopes,l[l.length-1].endPos),l.pop()}var Pt=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function Ft(e,t,n,r,i,a,o,s){return new zt(e,t,n,r,i,a,o,s)}function It(e,t,n,r,i){let a=C(t,Lt),o=yt.getCompiledRuleId(n,r,i.repository);for(let n of a)e.push({debugSelector:t,matcher:n.matcher,ruleId:o,grammar:i,priority:n.priority})}function Lt(e,t){if(t.length<e.length)return!1;let n=0;return e.every(e=>{for(let r=n;r<t.length;r++)if(Rt(t[r],e))return n=r+1,!0;return!1})}function Rt(e,t){if(!e)return!1;if(e===t)return!0;let n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]===`.`}var zt=class{constructor(e,t,n,r,i,a,o,s){if(this._rootScopeName=e,this.balancedBracketSelectors=a,this._onigLib=s,this._basicScopeAttributesProvider=new St(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=Bt(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(let e of Object.keys(i)){let t=C(e,Lt);for(let n of t)this._tokenTypeMatchers.push({matcher:n.matcher,type:i[e]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(let e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){let e={lookup:e=>e===this._rootScopeName?this._grammar:this.getExternalGrammar(e),injections:e=>this._grammarRepository.injections(e)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){let e=r.injections;if(e)for(let n in e)It(t,n,e[n],this,r);let i=this._grammarRepository.injections(n);i&&i.forEach(e=>{let n=this.getExternalGrammar(e);if(n){let e=n.injectionSelector;e&&It(t,e,n,this,n)}})}return t.sort((e,t)=>e.priority-t.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){let t=++this._lastRuleId,n=e(ft(t));return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[pt(e)]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){let n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=Bt(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){let r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){let r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=yt.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Vt.NULL){i=!0;let e=this._basicScopeAttributesProvider.getDefaultAttributes(),n=this.themeProvider.getDefaults(),r=S.set(0,e.languageId,e.tokenType,null,n.fontStyle,n.foregroundId,n.backgroundId),a=this.getRule(this._rootId).getName(null,null),o;o=a?A.createRootAndLookUpScopeName(a,r,this):A.createRoot(`unknown`,r),t=new Vt(null,this._rootId,-1,-1,!1,null,o,o)}else i=!1,t.reset();e+=`
|
|
4
4
|
`;let a=this.createOnigString(e),o=a.content.length,s=new Ut(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=Et(this,a,i,0,t,s,!0,r);return Ye(a),{lineLength:o,lineTokens:s,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function Bt(e,t){return e=be(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var A=class e{constructor(e,t,n){this.parent=e,this.scopePath=t,this.tokenAttributes=n}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(let t of n)i=Pe.push(i,t.scopeNames),r=new e(r,i,t.encodedTokenAttributes);return r}static createRoot(t,n){return new e(null,new Pe(null,t),n)}static createRootAndLookUpScopeName(t,n,r){let i=r.getMetadataForScope(t),a=new Pe(null,t),o=r.themeProvider.themeMatch(a);return new e(null,a,e.mergeAttributes(n,i,o))}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(` `)}equals(t){return e.equals(this,t)}static equals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.scopeName!==t.scopeName||e.tokenAttributes!==t.tokenAttributes)return!1;e=e.parent,t=t.parent}while(!0)}static mergeAttributes(e,t,n){let r=-1,i=0,a=0;return n!==null&&(r=n.fontStyle,i=n.foregroundId,a=n.backgroundId),S.set(e,t.languageId,t.tokenType,null,r,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(` `)===-1)return e._pushAttributed(this,t,n);let r=t.split(/ /g),i=this;for(let t of r)i=e._pushAttributed(i,t,n);return i}static _pushAttributed(t,n,r){let i=r.getMetadataForScope(n),a=t.scopePath.push(n),o=r.themeProvider.themeMatch(a);return new e(t,a,e.mergeAttributes(t.tokenAttributes,i,o))}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){let t=[],n=this;for(;n&&n!==e;)t.push({encodedTokenAttributes:n.tokenAttributes,scopeNames:n.scopePath.getExtensionIfDefined(n.parent?.scopePath??null)}),n=n.parent;return n===e?t.reverse():void 0}},Vt=class e{constructor(e,t,n,r,i,a,o,s){this.parent=e,this.ruleId=t,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=s,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=n,this._anchorPos=r}_stackElementBrand=void 0;static NULL=new e(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:e._equals(this,t)}static _equals(e,t){return e===t?!0:this._structuralEquals(e,t)?A.equals(e.contentNameScopesList,t.contentNameScopesList):!1}static _structuralEquals(e,t){do{if(e===t||!e&&!t)return!0;if(!e||!t||e.depth!==t.depth||e.ruleId!==t.ruleId||e.endRule!==t.endRule)return!1;e=e.parent,t=t.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){e._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,a,o,s){return new e(this,t,n,r,i,a,o,s)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){let e=[];return this._writeString(e,0),`[`+e.join(`,`)+`]`}_writeString(e,t){return this.parent&&(t=this.parent._writeString(e,t)),e[t++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,t}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(t){return this.endRule===t?this:new e(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let t=this;for(;t&&t._enterPos===e._enterPos;){if(t.ruleId===e.ruleId)return!0;t=t.parent}return!1}toStateStackFrame(){return{ruleId:pt(this.ruleId),beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){let r=A.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new e(t,ft(n.ruleId),n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,A.fromExtension(r,n.contentNameScopesList))}},Ht=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(e=>e===`*`?(this.allowAny=!0,[]):C(e,Lt).map(e=>e.matcher)),this.unbalancedBracketScopes=t.flatMap(e=>C(e,Lt).map(e=>e.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(let t of this.unbalancedBracketScopes)if(t(e))return!1;for(let t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Ut=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let n=e?.tokenAttributes??0,r=!1;if(this.balancedBracketSelectors?.matchesAlways&&(r=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){let t=e?.getScopeNames()??[];for(let e of this._tokenTypeOverrides)e.matcher(t)&&(n=S.set(n,0,Ge(e.type),null,-1,0,0));this.balancedBracketSelectors&&(r=this.balancedBracketSelectors.match(t))}if(r&&(n=S.set(n,0,8,r,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===n){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(n),this._lastTokenEndIndex=t;return}let n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);let n=new Uint32Array(this._binaryTokens.length);for(let e=0,t=this._binaryTokens.length;e<t;e++)n[e]=this._binaryTokens[e];return n}},Wt=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(let e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let a=this._rawGrammars.get(e);if(!a)return null;this._grammars.set(e,Ft(e,a,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},Gt=class{_options;_syncRegistry;_ensureGrammarCache;constructor(e){this._options=e,this._syncRegistry=new Wt(Ne.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,t){this._syncRegistry.setTheme(Ne.createFromRawTheme(e,t))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,t,n){return this.loadGrammarWithConfiguration(e,t,{embeddedLanguages:n})}loadGrammarWithConfiguration(e,t,n){return this._loadGrammar(e,t,n.embeddedLanguages,n.tokenTypes,new Ht(n.balancedBracketSelectors||[],n.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,t,n,r,i){let a=new Qe(this._syncRegistry,e);for(;a.Q.length>0;)a.Q.map(e=>this._loadSingleGrammar(e.scopeName)),a.processQueue();return this._grammarForScopeName(e,t,n,r,i)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){let t=this._options.loadGrammar(e);if(t){let n=typeof this._options.getInjections==`function`?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(t,n)}}addGrammar(e,t=[],n=0,r=null){return this._syncRegistry.addGrammar(e,t),this._grammarForScopeName(e.scopeName,n,r)}_grammarForScopeName(e,t=0,n=null,r=null,i=null){return this._syncRegistry.grammarForScopeName(e,t,n,r,i)}},Kt=Vt.NULL;function qt(e,t){let n=typeof e==`string`?{}:{...e.colorReplacements},r=typeof e==`string`?e:e.name;for(let[e,i]of Object.entries(t?.colorReplacements||{}))typeof i==`string`?n[e]=i:e===r&&Object.assign(n,i);return n}function j(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Jt(e){return Array.isArray(e)?e:[e]}async function Yt(e){return Promise.resolve(typeof e==`function`?e():e).then(e=>e.default||e)}function M(e){return!e||[`plaintext`,`txt`,`text`,`plain`].includes(e)}function Xt(e){return e===`ansi`||M(e)}function N(e){return e===`none`}function Zt(e){return N(e)}function P(e,t=!1){if(e.length===0)return[[``,0]];let n=e.split(/(\r?\n)/g),r=0,i=[];for(let e=0;e<n.length;e+=2){let a=t?n[e]+(n[e+1]||``):n[e];i.push([a,r]),r+=n[e].length,r+=n[e+1]?.length||0}return i}var Qt={light:`#333333`,dark:`#bbbbbb`},$t={light:`#fffffe`,dark:`#1e1e1e`},en=`__shiki_resolved`;function tn(e){if(e?.[en])return e;let t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||=`dark`,t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){let e=t.settings?t.settings.find(e=>!e.name&&!e.scope):void 0;e?.settings?.foreground&&(r=e.settings.foreground),e?.settings?.background&&(n=e.settings.background),!r&&t?.colors?.[`editor.foreground`]&&(r=t.colors[`editor.foreground`]),!n&&t?.colors?.[`editor.background`]&&(n=t.colors[`editor.background`]),r||=t.type===`light`?Qt.light:Qt.dark,n||=t.type===`light`?$t.light:$t.dark,t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0,a=new Map;function o(e){if(a.has(e))return a.get(e);i+=1;let n=`#${i.toString(16).padStart(8,`0`).toLowerCase()}`;return t.colorReplacements?.[`#${n}`]?o(e):(a.set(e,n),n)}t.settings=t.settings.map(e=>{let n=e.settings?.foreground&&!e.settings.foreground.startsWith(`#`),r=e.settings?.background&&!e.settings.background.startsWith(`#`);if(!n&&!r)return e;let i={...e,settings:{...e.settings}};if(n){let n=o(e.settings.foreground);t.colorReplacements[n]=e.settings.foreground,i.settings.foreground=n}if(r){let n=o(e.settings.background);t.colorReplacements[n]=e.settings.background,i.settings.background=n}return i});for(let e of Object.keys(t.colors||{}))if((e===`editor.foreground`||e===`editor.background`||e.startsWith(`terminal.ansi`))&&!t.colors[e]?.startsWith(`#`)){let n=o(t.colors[e]);t.colorReplacements[n]=t.colors[e],t.colors[e]=n}return Object.defineProperty(t,en,{enumerable:!1,writable:!1,value:!0}),t}async function nn(e){return Array.from(new Set((await Promise.all(e.filter(e=>!Xt(e)).map(async e=>await Yt(e).then(e=>Array.isArray(e)?e:[e])))).flat()))}async function rn(e){return(await Promise.all(e.map(async e=>Zt(e)?null:tn(await Yt(e))))).filter(e=>!!e)}function an(e,t){if(!t)return e;if(t[e]){let n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new b(`Circular alias \`${Array.from(n).join(` -> `)} -> ${e}\``);n.add(e)}}return e}var on=class extends Gt{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(e=>this.loadTheme(e)),this.loadLanguages(this._langs)}getTheme(e){return typeof e==`string`?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){let t=tn(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||=[...this._resolvedThemes.keys()],this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Ne.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=an(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;let t=new Set([...this._langMap.values()].filter(t=>t.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);let n={balancedBracketSelectors:e.balancedBracketSelectors||[`*`],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);let r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(t=>{this._alias[t]=e.name}),this._loadedLanguagesCache=null,t.size)for(let e of t)this._resolvedGrammars.delete(e.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(e.scopeName),this._syncRegistry?._grammars?.delete(e.scopeName),this.loadLanguage(this._langMap.get(e.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(let t of e)this.resolveEmbeddedLanguages(t);let t=Array.from(this._langGraph.entries()),n=t.filter(([e,t])=>!t);if(n.length){let e=t.filter(([e,t])=>t?(t.embeddedLanguages||t.embeddedLangs)?.some(e=>n.map(([e])=>e).includes(e)):!1).filter(e=>!n.includes(e));throw new b(`Missing languages ${n.map(([e])=>`\`${e}\``).join(`, `)}, required by ${e.map(([e])=>`\`${e}\``).join(`, `)}`)}for(let[e,n]of t)this._resolver.addLanguage(n);for(let[e,n]of t)this.loadLanguage(n)}getLoadedLanguages(){return this._loadedLanguagesCache||=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])],this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);let t=e.embeddedLanguages??e.embeddedLangs;if(t)for(let e of t)this._langGraph.set(e,this._langMap.get(e))}},sn=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:t=>e.createScanner(t),createOnigString:t=>e.createString(t)},t.forEach(e=>this.addLanguage(e))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){let t=e.split(`.`),n=[];for(let e=1;e<=t.length;e++){let r=t.slice(0,e).join(`.`);n=[...n,...this._injections.get(r)||[]]}return n}},F=0;function cn(e){F+=1,e.warnings!==!1&&F>=10&&F%10==0&&console.warn(`[Shiki] ${F} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new b("`engine` option is required for synchronous mode");let n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(tn),i=new on(new sn(e.engine,n),r,n,e.langAlias),a;function o(t){return an(t,e.langAlias)}function s(e){g();let t=i.getGrammar(typeof e==`string`?e:e.name);if(!t)throw new b(`Language \`${e}\` not found, you may need to load it first`);return t}function c(e){if(e===`none`)return{bg:``,fg:``,name:`none`,settings:[],type:`dark`};g();let t=i.getTheme(e);if(!t)throw new b(`Theme \`${e}\` not found, you may need to load it first`);return t}function l(e){g();let t=c(e);return a!==e&&(i.setTheme(t),a=e),{theme:t,colorMap:i.getColorMap()}}function u(){return g(),i.getLoadedThemes()}function d(){return g(),i.getLoadedLanguages()}function f(...e){g(),i.loadLanguages(e.flat(1))}async function p(...e){return f(await nn(e))}function m(...e){g();for(let t of e.flat(1))i.loadTheme(t)}async function h(...e){return g(),m(await rn(e))}function g(){if(t)throw new b(`Shiki instance has been disposed`)}function _(){t||(t=!0,i.dispose(),--F)}return{setTheme:l,getTheme:c,getLanguage:s,getLoadedThemes:u,getLoadedLanguages:d,resolveLangAlias:o,loadLanguage:p,loadLanguageSync:f,loadTheme:h,loadThemeSync:m,dispose:_,[Symbol.dispose]:_}}async function ln(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");let[t,n,r]=await Promise.all([rn(e.themes||[]),nn(e.langs||[]),e.engine]);return cn({...e,themes:t,langs:n,engine:r})}var un=new WeakMap;function I(e,t){un.set(e,t)}function L(e){return un.get(e)}var R=class e{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new e(Object.fromEntries(Jt(n).map(e=>[e,Kt])),t)}constructor(...e){if(e.length===2){let[t,n]=e;this.lang=n,this._stacks=t}else{let[t,n,r]=e;this.lang=n,this._stacks={[r]:t}}}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return dn(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function dn(e){let t=[],n=new Set;function r(e){if(n.has(e))return;n.add(e);let i=e?.nameScopesList?.scopeName;i&&t.push(i),e.parent&&r(e.parent)}return r(e),t}function fn(e,t){if(!(e instanceof R))throw new b(`Invalid grammar state`);return e.getInternalStack(t)}function pn(e,t,n={}){let{theme:r=e.getLoadedThemes()[0]}=n;if(M(e.resolveLangAlias(n.lang||`text`))||N(r))return P(t).map(e=>[{content:e[0],offset:e[1]}]);let{theme:i,colorMap:a}=e.setTheme(r),o=e.getLanguage(n.lang||`text`);if(n.grammarState){if(n.grammarState.lang!==o.name)throw new b(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new b(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return hn(t,o,i,a,n)}function mn(...e){if(e.length===2)return L(e[1]);let[t,n,r={}]=e,{lang:i=`text`,theme:a=t.getLoadedThemes()[0]}=r;if(M(i)||N(a))throw new b(`Plain language does not have grammar state`);if(i===`ansi`)throw new b(`ANSI language does not have grammar state`);let{theme:o,colorMap:s}=t.setTheme(a),c=t.getLanguage(i);return new R(gn(n,c,o,s,r).stateStack,c.name,o.name)}function hn(e,t,n,r,i){let a=gn(e,t,n,r,i),o=new R(a.stateStack,t.name,n.name);return I(a.tokens,o),a.tokens}function gn(e,t,n,r,i){let a=qt(n,i),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:s=500}=i,c=P(e),l=i.grammarState?fn(i.grammarState,n.name)??Kt:i.grammarContextCode==null?Kt:gn(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack,u=[],d=[];for(let e=0,f=c.length;e<f;e++){let[f,p]=c[e];if(f===``){u=[],d.push([]);continue}if(o>0&&f.length>=o){u=[],d.push([{content:f,offset:p,color:``,fontStyle:0}]);continue}let m,h,g;i.includeExplanation&&(m=t.tokenizeLine(f,l,s),h=m.tokens,g=0);let _=t.tokenizeLine2(f,l,s),v=_.tokens.length/2;for(let e=0;e<v;e++){let t=_.tokens[2*e],o=e+1<v?_.tokens[2*e+2]:f.length;if(t===o)continue;let s=_.tokens[2*e+1],c=j(r[S.getForeground(s)],a),l=S.getFontStyle(s),d={content:f.substring(t,o),offset:p+t,color:c,fontStyle:l};if(i.includeExplanation){let e=[];if(i.includeExplanation!==`scopeName`)for(let t of n.settings){let n;switch(typeof t.scope){case`string`:n=t.scope.split(/,/).map(e=>e.trim());break;case`object`:n=t.scope;break;default:continue}e.push({settings:t,selectors:n.map(e=>e.split(/ /))})}d.explanation=[];let r=0;for(;t+r<o;){let t=h[g],n=f.substring(t.startIndex,t.endIndex);r+=n.length,d.explanation.push({content:n,scopes:i.includeExplanation===`scopeName`?_n(t.scopes):vn(e,t.scopes)}),g+=1}}u.push(d)}d.push(u),u=[],l=_.ruleStack}return{tokens:d,stateStack:l}}function _n(e){return e.map(e=>({scopeName:e}))}function vn(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r];n[r]={scopeName:i,themeMatches:xn(e,i,t.slice(0,r))}}return n}function yn(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]===`.`}function bn(e,t,n){if(!yn(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)yn(e[r],n[i])&&--r,--i;return r===-1}function xn(e,t,n){let r=[];for(let{selectors:i,settings:a}of e)for(let e of i)if(bn(e,t,n)){r.push(a);break}return r}function Sn(e,t,n,r=pn){let i=Object.entries(n.themes).filter(e=>e[1]).map(e=>({color:e[0],theme:e[1]})),a=i.map(i=>{let a=r(e,t,{...n,theme:i.theme});return{tokens:a,state:L(a),theme:typeof i.theme==`string`?i.theme:i.theme.name}}),o=Cn(...a.map(e=>e.tokens)),s=o[0].map((e,t)=>e.map((e,r)=>{let a={content:e.content,variants:{},offset:e.offset};return`includeExplanation`in n&&n.includeExplanation&&(a.explanation=e.explanation),o.forEach((e,n)=>{let{content:o,explanation:s,offset:c,...l}=e[t][r];a.variants[i[n].color]=l}),a})),c=a[0].state?new R(Object.fromEntries(a.map(e=>[e.theme,e.state?.getInternalStack(e.theme)])),a[0].state.lang):void 0;return c&&I(s,c),s}function Cn(...e){let t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){let i=e.map(e=>e[r]),a=t.map(()=>[]);t.forEach((e,t)=>e.push(a[t]));let o=i.map(()=>0),s=i.map(e=>e[0]);for(;s.every(e=>e);){let e=Math.min(...s.map(e=>e.content.length));for(let t=0;t<n;t++){let n=s[t];n.content.length===e?(a[t].push(n),o[t]+=1,s[t]=i[t][o[t]]):(a[t].push({...n,content:n.content.slice(0,e)}),s[t]={...n,content:n.content.slice(e),offset:n.offset+e})}}}return t}var wn=[`area`,`base`,`basefont`,`bgsound`,`br`,`col`,`command`,`embed`,`frame`,`hr`,`image`,`img`,`input`,`keygen`,`link`,`meta`,`param`,`source`,`track`,`wbr`],z=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};z.prototype.normal={},z.prototype.property={},z.prototype.space=void 0;function Tn(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new z(n,r,t)}function En(e){return e.toLowerCase()}var B=class{constructor(e,t){this.attribute=t,this.property=e}};B.prototype.attribute=``,B.prototype.booleanish=!1,B.prototype.boolean=!1,B.prototype.commaOrSpaceSeparated=!1,B.prototype.commaSeparated=!1,B.prototype.defined=!1,B.prototype.mustUseProperty=!1,B.prototype.number=!1,B.prototype.overloadedBoolean=!1,B.prototype.property=``,B.prototype.spaceSeparated=!1,B.prototype.space=void 0;var Dn=e({boolean:()=>V,booleanish:()=>H,commaOrSpaceSeparated:()=>K,commaSeparated:()=>G,number:()=>U,overloadedBoolean:()=>kn,spaceSeparated:()=>W}),On=0,V=q(),H=q(),kn=q(),U=q(),W=q(),G=q(),K=q();function q(){return 2**++On}var An=Object.keys(Dn),jn=class extends B{constructor(e,t,n,r){let i=-1;if(super(e,t),Mn(this,`space`,r),typeof n==`number`)for(;++i<An.length;){let e=An[i];Mn(this,An[i],(n&Dn[e])===Dn[e])}}};jn.prototype.defined=!0;function Mn(e,t,n){n&&(e[t]=n)}function J(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new jn(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[En(r)]=r,n[En(a.attribute)]=r}return new z(t,n,e.space)}var Nn=J({properties:{ariaActiveDescendant:null,ariaAtomic:H,ariaAutoComplete:null,ariaBusy:H,ariaChecked:H,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:W,ariaCurrent:null,ariaDescribedBy:W,ariaDetails:null,ariaDisabled:H,ariaDropEffect:W,ariaErrorMessage:null,ariaExpanded:H,ariaFlowTo:W,ariaGrabbed:H,ariaHasPopup:null,ariaHidden:H,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:W,ariaLevel:U,ariaLive:null,ariaModal:H,ariaMultiLine:H,ariaMultiSelectable:H,ariaOrientation:null,ariaOwns:W,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:H,ariaReadOnly:H,ariaRelevant:null,ariaRequired:H,ariaRoleDescription:W,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:H,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function Pn(e,t){return t in e?e[t]:t}function Fn(e,t){return Pn(e,t.toLowerCase())}var In=J({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:G,acceptCharset:W,accessKey:W,action:null,allow:null,allowFullScreen:V,allowPaymentRequest:V,allowUserMedia:V,alt:null,as:null,async:V,autoCapitalize:null,autoComplete:W,autoFocus:V,autoPlay:V,blocking:W,capture:null,charSet:null,checked:V,cite:null,className:W,cols:U,colSpan:null,content:null,contentEditable:H,controls:V,controlsList:W,coords:U|G,crossOrigin:null,data:null,dateTime:null,decoding:null,default:V,defer:V,dir:null,dirName:null,disabled:V,download:kn,draggable:H,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:V,formTarget:null,headers:W,height:U,hidden:kn,high:U,href:null,hrefLang:null,htmlFor:W,httpEquiv:W,id:null,imageSizes:null,imageSrcSet:null,inert:V,inputMode:null,integrity:null,is:null,isMap:V,itemId:null,itemProp:W,itemRef:W,itemScope:V,itemType:W,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:V,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:V,muted:V,name:null,nonce:null,noModule:V,noValidate:V,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:V,optimum:U,pattern:null,ping:W,placeholder:null,playsInline:V,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:V,referrerPolicy:null,rel:W,required:V,reversed:V,rows:U,rowSpan:U,sandbox:W,scope:null,scoped:V,seamless:V,selected:V,shadowRootClonable:V,shadowRootDelegatesFocus:V,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:H,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:V,useMap:null,value:H,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:W,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:V,declare:V,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:V,noHref:V,noShade:V,noWrap:V,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:H,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:V,disableRemotePlayback:V,prefix:null,property:null,results:U,security:null,unselectable:null},space:`html`,transform:Fn}),Ln=J({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:K,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:W,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:V,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:G,g2:G,glyphName:G,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:K,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:U,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:W,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:K,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:K,rev:K,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:K,requiredFeatures:K,requiredFonts:K,requiredFormats:K,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:K,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:K,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:K,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:Pn}),Rn=J({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),zn=J({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Fn}),Bn=J({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Vn=/[A-Z]/g,Hn=/-[a-z]/g,Un=/^data[-\w.:]+$/i;function Wn(e,t){let n=En(t),r=t,i=B;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&Un.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Hn,Kn);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Hn.test(e)){let n=e.replace(Vn,Gn);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=jn}return new i(r,t)}function Gn(e){return`-`+e.toLowerCase()}function Kn(e){return e.charAt(1).toUpperCase()}var qn=Tn([Nn,In,Rn,zn,Bn],`html`),Jn=Tn([Nn,Ln,Rn,zn,Bn],`svg`),Yn={}.hasOwnProperty;function Xn(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&Yn.call(t,e)){let n=String(t[e]);i=Yn.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}var Zn=/["&'<>`]/g,Qn=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,$n=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,er=/[|\\{}()[\]^$+*?.]/g,tr=new WeakMap;function nr(e,t){if(e=e.replace(t.subset?rr(t.subset):Zn,r),t.subset||t.escapeOnly)return e;return e.replace(Qn,n).replace($n,r);function n(e,n,r){return t.format((e.charCodeAt(0)-55296)*1024+e.charCodeAt(1)-56320+65536,r.charCodeAt(n+2),t)}function r(e,n,r){return t.format(e.charCodeAt(0),r.charCodeAt(n+1),t)}}function rr(e){let t=tr.get(e);return t||(t=ir(e),tr.set(e,t)),t}function ir(e){let t=[],n=-1;for(;++n<e.length;)t.push(e[n].replace(er,`\\$&`));return RegExp(`(?:`+t.join(`|`)+`)`,`g`)}var ar=/[\dA-Fa-f]/;function or(e,t,n){let r=`&#x`+e.toString(16).toUpperCase();return n&&t&&!ar.test(String.fromCharCode(t))?r:r+`;`}var sr=/\d/;function cr(e,t,n){let r=`&#`+String(e);return n&&t&&!sr.test(String.fromCharCode(t))?r:r+`;`}var lr=`AElig.AMP.Aacute.Acirc.Agrave.Aring.Atilde.Auml.COPY.Ccedil.ETH.Eacute.Ecirc.Egrave.Euml.GT.Iacute.Icirc.Igrave.Iuml.LT.Ntilde.Oacute.Ocirc.Ograve.Oslash.Otilde.Ouml.QUOT.REG.THORN.Uacute.Ucirc.Ugrave.Uuml.Yacute.aacute.acirc.acute.aelig.agrave.amp.aring.atilde.auml.brvbar.ccedil.cedil.cent.copy.curren.deg.divide.eacute.ecirc.egrave.eth.euml.frac12.frac14.frac34.gt.iacute.icirc.iexcl.igrave.iquest.iuml.laquo.lt.macr.micro.middot.nbsp.not.ntilde.oacute.ocirc.ograve.ordf.ordm.oslash.otilde.ouml.para.plusmn.pound.quot.raquo.reg.sect.shy.sup1.sup2.sup3.szlig.thorn.times.uacute.ucirc.ugrave.uml.uuml.yacute.yen.yuml`.split(`.`),ur={nbsp:`\xA0`,iexcl:`¡`,cent:`¢`,pound:`£`,curren:`¤`,yen:`¥`,brvbar:`¦`,sect:`§`,uml:`¨`,copy:`©`,ordf:`ª`,laquo:`«`,not:`¬`,shy:``,reg:`®`,macr:`¯`,deg:`°`,plusmn:`±`,sup2:`²`,sup3:`³`,acute:`´`,micro:`µ`,para:`¶`,middot:`·`,cedil:`¸`,sup1:`¹`,ordm:`º`,raquo:`»`,frac14:`¼`,frac12:`½`,frac34:`¾`,iquest:`¿`,Agrave:`À`,Aacute:`Á`,Acirc:`Â`,Atilde:`Ã`,Auml:`Ä`,Aring:`Å`,AElig:`Æ`,Ccedil:`Ç`,Egrave:`È`,Eacute:`É`,Ecirc:`Ê`,Euml:`Ë`,Igrave:`Ì`,Iacute:`Í`,Icirc:`Î`,Iuml:`Ï`,ETH:`Ð`,Ntilde:`Ñ`,Ograve:`Ò`,Oacute:`Ó`,Ocirc:`Ô`,Otilde:`Õ`,Ouml:`Ö`,times:`×`,Oslash:`Ø`,Ugrave:`Ù`,Uacute:`Ú`,Ucirc:`Û`,Uuml:`Ü`,Yacute:`Ý`,THORN:`Þ`,szlig:`ß`,agrave:`à`,aacute:`á`,acirc:`â`,atilde:`ã`,auml:`ä`,aring:`å`,aelig:`æ`,ccedil:`ç`,egrave:`è`,eacute:`é`,ecirc:`ê`,euml:`ë`,igrave:`ì`,iacute:`í`,icirc:`î`,iuml:`ï`,eth:`ð`,ntilde:`ñ`,ograve:`ò`,oacute:`ó`,ocirc:`ô`,otilde:`õ`,ouml:`ö`,divide:`÷`,oslash:`ø`,ugrave:`ù`,uacute:`ú`,ucirc:`û`,uuml:`ü`,yacute:`ý`,thorn:`þ`,yuml:`ÿ`,fnof:`ƒ`,Alpha:`Α`,Beta:`Β`,Gamma:`Γ`,Delta:`Δ`,Epsilon:`Ε`,Zeta:`Ζ`,Eta:`Η`,Theta:`Θ`,Iota:`Ι`,Kappa:`Κ`,Lambda:`Λ`,Mu:`Μ`,Nu:`Ν`,Xi:`Ξ`,Omicron:`Ο`,Pi:`Π`,Rho:`Ρ`,Sigma:`Σ`,Tau:`Τ`,Upsilon:`Υ`,Phi:`Φ`,Chi:`Χ`,Psi:`Ψ`,Omega:`Ω`,alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,rho:`ρ`,sigmaf:`ς`,sigma:`σ`,tau:`τ`,upsilon:`υ`,phi:`φ`,chi:`χ`,psi:`ψ`,omega:`ω`,thetasym:`ϑ`,upsih:`ϒ`,piv:`ϖ`,bull:`•`,hellip:`…`,prime:`′`,Prime:`″`,oline:`‾`,frasl:`⁄`,weierp:`℘`,image:`ℑ`,real:`ℜ`,trade:`™`,alefsym:`ℵ`,larr:`←`,uarr:`↑`,rarr:`→`,darr:`↓`,harr:`↔`,crarr:`↵`,lArr:`⇐`,uArr:`⇑`,rArr:`⇒`,dArr:`⇓`,hArr:`⇔`,forall:`∀`,part:`∂`,exist:`∃`,empty:`∅`,nabla:`∇`,isin:`∈`,notin:`∉`,ni:`∋`,prod:`∏`,sum:`∑`,minus:`−`,lowast:`∗`,radic:`√`,prop:`∝`,infin:`∞`,ang:`∠`,and:`∧`,or:`∨`,cap:`∩`,cup:`∪`,int:`∫`,there4:`∴`,sim:`∼`,cong:`≅`,asymp:`≈`,ne:`≠`,equiv:`≡`,le:`≤`,ge:`≥`,sub:`⊂`,sup:`⊃`,nsub:`⊄`,sube:`⊆`,supe:`⊇`,oplus:`⊕`,otimes:`⊗`,perp:`⊥`,sdot:`⋅`,lceil:`⌈`,rceil:`⌉`,lfloor:`⌊`,rfloor:`⌋`,lang:`〈`,rang:`〉`,loz:`◊`,spades:`♠`,clubs:`♣`,hearts:`♥`,diams:`♦`,quot:`"`,amp:`&`,lt:`<`,gt:`>`,OElig:`Œ`,oelig:`œ`,Scaron:`Š`,scaron:`š`,Yuml:`Ÿ`,circ:`ˆ`,tilde:`˜`,ensp:` `,emsp:` `,thinsp:` `,zwnj:``,zwj:``,lrm:``,rlm:``,ndash:`–`,mdash:`—`,lsquo:`‘`,rsquo:`’`,sbquo:`‚`,ldquo:`“`,rdquo:`”`,bdquo:`„`,dagger:`†`,Dagger:`‡`,permil:`‰`,lsaquo:`‹`,rsaquo:`›`,euro:`€`},dr=[`cent`,`copy`,`divide`,`gt`,`lt`,`not`,`para`,`times`],fr={}.hasOwnProperty,pr={},mr;for(mr in ur)fr.call(ur,mr)&&(pr[ur[mr]]=mr);var hr=/[^\dA-Za-z]/;function gr(e,t,n,r){let i=String.fromCharCode(e);if(fr.call(pr,i)){let e=pr[i],a=`&`+e;return n&&lr.includes(e)&&!dr.includes(e)&&(!r||t&&t!==61&&hr.test(String.fromCharCode(t)))?a:a+`;`}return``}function _r(e,t,n){let r=or(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=gr(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){let i=cr(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function Y(e,t){return nr(e,Object.assign({format:_r},t))}var vr=/^>|^->|<!--|-->|--!>|<!-$/g,yr=[`>`],br=[`<`,`>`];function xr(e,t,n,r){return r.settings.bogusComments?`<?`+Y(e.value,Object.assign({},r.settings.characterReferences,{subset:yr}))+`>`:`<!--`+e.value.replace(vr,i)+`-->`;function i(e){return Y(e,Object.assign({},r.settings.characterReferences,{subset:br}))}}function Sr(e,t,n,r){return`<!`+(r.settings.upperDoctype?`DOCTYPE`:`doctype`)+(r.settings.tightDoctype?``:` `)+`html>`}function Cr(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function wr(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}function Tr(e){return e.join(` `).trim()}var Er=/[ \t\n\f\r]/g;function Dr(e){return typeof e==`object`?e.type===`text`?Or(e.value):!1:Or(e)}function Or(e){return e.replace(Er,``)===``}var X=jr(1),kr=jr(-1),Ar=[];function jr(e){return t;function t(t,n,r){let i=t?t.children:Ar,a=(n||0)+e,o=i[a];if(!r)for(;o&&Dr(o);)a+=e,o=i[a];return o}}var Mr={}.hasOwnProperty;function Nr(e){return t;function t(t,n,r){return Mr.call(e,t.tagName)&&e[t.tagName](t,n,r)}}var Pr=Nr({body:Lr,caption:Fr,colgroup:Fr,dd:Vr,dt:Br,head:Fr,html:Ir,li:zr,optgroup:Ur,option:Wr,p:Rr,rp:Hr,rt:Hr,tbody:Kr,td:Yr,tfoot:qr,th:Yr,thead:Gr,tr:Jr});function Fr(e,t,n){let r=X(n,t,!0);return!r||r.type!==`comment`&&!(r.type===`text`&&Dr(r.value.charAt(0)))}function Ir(e,t,n){let r=X(n,t);return!r||r.type!==`comment`}function Lr(e,t,n){let r=X(n,t);return!r||r.type!==`comment`}function Rr(e,t,n){let r=X(n,t);return r?r.type===`element`&&(r.tagName===`address`||r.tagName===`article`||r.tagName===`aside`||r.tagName===`blockquote`||r.tagName===`details`||r.tagName===`div`||r.tagName===`dl`||r.tagName===`fieldset`||r.tagName===`figcaption`||r.tagName===`figure`||r.tagName===`footer`||r.tagName===`form`||r.tagName===`h1`||r.tagName===`h2`||r.tagName===`h3`||r.tagName===`h4`||r.tagName===`h5`||r.tagName===`h6`||r.tagName===`header`||r.tagName===`hgroup`||r.tagName===`hr`||r.tagName===`main`||r.tagName===`menu`||r.tagName===`nav`||r.tagName===`ol`||r.tagName===`p`||r.tagName===`pre`||r.tagName===`section`||r.tagName===`table`||r.tagName===`ul`):!n||!(n.type===`element`&&(n.tagName===`a`||n.tagName===`audio`||n.tagName===`del`||n.tagName===`ins`||n.tagName===`map`||n.tagName===`noscript`||n.tagName===`video`))}function zr(e,t,n){let r=X(n,t);return!r||r.type===`element`&&r.tagName===`li`}function Br(e,t,n){let r=X(n,t);return!!(r&&r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`))}function Vr(e,t,n){let r=X(n,t);return!r||r.type===`element`&&(r.tagName===`dt`||r.tagName===`dd`)}function Hr(e,t,n){let r=X(n,t);return!r||r.type===`element`&&(r.tagName===`rp`||r.tagName===`rt`)}function Ur(e,t,n){let r=X(n,t);return!r||r.type===`element`&&r.tagName===`optgroup`}function Wr(e,t,n){let r=X(n,t);return!r||r.type===`element`&&(r.tagName===`option`||r.tagName===`optgroup`)}function Gr(e,t,n){let r=X(n,t);return!!(r&&r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`))}function Kr(e,t,n){let r=X(n,t);return!r||r.type===`element`&&(r.tagName===`tbody`||r.tagName===`tfoot`)}function qr(e,t,n){return!X(n,t)}function Jr(e,t,n){let r=X(n,t);return!r||r.type===`element`&&r.tagName===`tr`}function Yr(e,t,n){let r=X(n,t);return!r||r.type===`element`&&(r.tagName===`td`||r.tagName===`th`)}var Xr=Nr({body:$r,colgroup:ei,head:Qr,html:Zr,tbody:ti});function Zr(e){let t=X(e,-1);return!t||t.type!==`comment`}function Qr(e){let t=new Set;for(let n of e.children)if(n.type===`element`&&(n.tagName===`base`||n.tagName===`title`)){if(t.has(n.tagName))return!1;t.add(n.tagName)}let n=e.children[0];return!n||n.type===`element`}function $r(e){let t=X(e,-1,!0);return!t||t.type!==`comment`&&!(t.type===`text`&&Dr(t.value.charAt(0)))&&!(t.type===`element`&&(t.tagName===`meta`||t.tagName===`link`||t.tagName===`script`||t.tagName===`style`||t.tagName===`template`))}function ei(e,t,n){let r=kr(n,t),i=X(e,-1,!0);return n&&r&&r.type===`element`&&r.tagName===`colgroup`&&Pr(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`col`)}function ti(e,t,n){let r=kr(n,t),i=X(e,-1);return n&&r&&r.type===`element`&&(r.tagName===`thead`||r.tagName===`tbody`)&&Pr(r,n.children.indexOf(r),n)?!1:!!(i&&i.type===`element`&&i.tagName===`tr`)}var ni={name:[[`
|
|
5
5
|
\f\r &/=>`.split(``),`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/CodeBlockShiki-D0C6rZyp.js","assets/chunk-BNv3lrIs.js","assets/react-BFwN_vxz.js","assets/bundle-web-DXOHBgb_.js","assets/dist-CtWL5eO0.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{a as e,i as t,n,r,t as i}from"./chunk-BNv3lrIs.js";import{t as a}from"./react-BFwN_vxz.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),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var o=i((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),s=i(((e,t)=>{t.exports=o()})),c=i((e=>{var t=a();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.6`})),l=i(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=c()})),u=i((e=>{var t=s(),n=a(),r=l();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(c(e)!==e)throw Error(i(188))}function p(e){var t=e.alternate;if(!t){if(t=c(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return f(a),e;if(o===r)return f(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var s=!1,l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function P(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?P(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return P(e(t))}catch{}}return null}var ee=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function L(e){return{current:e}}function R(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function z(e,t){re++,ne[re]=e.current,e.current=t}var ie=L(null),ae=L(null),oe=L(null),se=L(null);function ce(e,t){switch(z(oe,t),z(ae,e),z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yd(t),e=Xd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(ie),z(ie,e)}function le(){R(ie),R(ae),R(oe)}function ue(e){e.memoizedState!==null&&z(se,e);var t=ie.current,n=Xd(t,e.type);t!==n&&(z(ae,e),z(ie,n))}function de(e){ae.current===e&&(R(ie),R(ae)),se.current===e&&(R(se),op._currentValue=te)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -53,10 +53,10 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
53
53
|
.wrapper[data-active] {
|
|
54
54
|
outline-color: inherit;
|
|
55
55
|
}
|
|
56
|
-
`,rT=typeof HTMLElement<`u`?HTMLElement:class{},iT=class extends rT{_isSelecting=!1;_pressDuration=tT;_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=nT,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?tT: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}))}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>{this._isSelectingState=!0,this._updateActiveState(),this._dispatch(`intlayer:press`)},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){(this._isSelecting||this._isSelectingState)&&(e.preventDefault(),e.stopPropagation())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},aT=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,iT),Nw(),Iw(),eT())},oT=()=>({allowedOrigins:[y?.editorURL,y?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),sT=0,cT=()=>{sT++;let e=Ow();if(e)return e;let t=new Zw({mode:`client`,messenger:oT(),configuration:b});return kw(t),aT(),t.start(),t},lT=()=>{sT=Math.max(0,sT-1),!(sT>0)&&(Ow()?.stop(),kw(null))},uT=(e,t,n)=>{let r=(0,g.c)(16),i=yw(),a;r[0]===t?a=r[1]:(a=typeof t==`function`?t():t,r[0]=t,r[1]=a);let o=a,[s,c]=(0,m.useState)(o),l=(0,m.useRef)(o),u=(0,m.useRef)(null),d;r[2]!==e||r[3]!==i?.messenger||r[4]!==n||r[5]!==o?(d=()=>{let{emit:t,receive:r}=n??{},a=t===void 0?!0:t,s=r===void 0?!0:r,d=new zw(e,i?.messenger,{emit:a,receive:s,initialValue:o});u.current=d;let f=e=>{let t=e.detail;l.current=t,c(t)};return d.addEventListener(`change`,f),d.start(),()=>{d.removeEventListener(`change`,f),d.stop(),u.current=null}},r[2]=e,r[3]=i?.messenger,r[4]=n,r[5]=o,r[6]=d):d=r[6];let f=i?.messenger,p=n?.emit,h=n?.receive,_;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==h?(_=[e,f,p,h],r[7]=e,r[8]=f,r[9]=p,r[10]=h,r[11]=_):_=r[11],(0,m.useEffect)(d,_);let v;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=v):v=r[12];let y=v,b;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>{u.current?.postCurrentValue()},r[13]=b):b=r[13];let x=b,S;return r[14]===s?S=r[15]:(S=[s,y,x],r[14]=s,r[15]=S),S},dT=(e,t)=>uT(Cw.INTLAYER_URL_CHANGE,e,t),fT=()=>{let e=(0,g.c)(13),t=yw(),n;e[0]===t?.localeDictionaries.value?n=e[1]:(n=t?.localeDictionaries.value??{},e[0]=t?.localeDictionaries.value,e[1]=n);let[r,i]=(0,m.useState)(n),a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{if(!t)return;let e=e=>i(e.detail??{});return t.localeDictionaries.addEventListener(`change`,e),()=>t.localeDictionaries.removeEventListener(`change`,e)},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,m.useEffect)(a,o);let s;e[5]===t?.localeDictionaries?s=e[6]:(s=e=>t?.localeDictionaries.set(e),e[5]=t?.localeDictionaries,e[6]=s);let c=s,l;e[7]===t?l=e[8]:(l=e=>t?.setLocaleDictionary(e),e[7]=t,e[8]=l);let u=l,d;return e[9]!==r||e[10]!==c||e[11]!==u?(d={localeDictionaries:r,setLocaleDictionaries:c,setLocaleDictionary:u},e[9]=r,e[10]=c,e[11]=u,e[12]=d):d=e[12],d},pT=()=>{let e=(0,g.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=fT(),r;return e[0]!==t||e[1]!==n?(r={setLocaleDictionaries:t,setLocaleDictionary:n},e[0]=t,e[1]=n,e[2]=r):r=e[2],r},mT=()=>{let e=(0,g.c)(3),t=yw(),[n,r]=(0,m.useState)(t?.currentLocale.value),i,a;return e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.currentLocale.addEventListener(`change`,e),()=>t.currentLocale.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,m.useEffect)(i,a),n},hT=(e,t,n)=>{for(let r of t)try{if(Uw(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},gT=()=>{let e=(0,g.c)(12),{localeDictionaries:t}=fT(),n=mT(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=xw(),o;bb0:{if(!a){o=a;break bb0}if(!t){o=a;break bb0}if(a.dictionaryLocalId){o=a;break bb0}let r;if(e[0]!==n||e[1]!==t||e[2]!==a.dictionaryKey||e[3]!==a.keyPath){let i=Object.values(t).filter(e=>e.key===a.dictionaryKey);r=hT(a.keyPath??[],i,n),e[0]=n,e[1]=t,e[2]=a.dictionaryKey,e[3]=a.keyPath,e[4]=r}else r=e[4];let i=r,s;e[5]!==a||e[6]!==i?(s={...a,...i},e[5]=a,e[6]=i,e[7]=s):s=e[7],o=s}let s;return e[8]!==r||e[9]!==i||e[10]!==o?(s={focusedContent:o,setFocusedContent:r,setFocusedContentKeyPath:i},e[8]=r,e[9]=i,e[10]=o,e[11]=s):s=e[11],s},_T=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,m.useRef)(null);i.current||=new Zw({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,m.useEffect)(()=>(aT(),kw(a),a.start(),()=>{a.stop(),kw(null)}),[a]),(0,C.jsx)(vw,{manager:a,children:e})},vT=(0,m.createContext)(void 0),yT=()=>{let e=(0,g.c)(4),t=yw(),n=(0,m.useContext)(vT),[r,i]=(0,m.useState)(t?.configuration.value??n),a,o;return e[0]!==t||e[1]!==n?(a=()=>{if(!t){i(n);return}let e=e=>{let t=e.detail;i(t??n)};return t.configuration.addEventListener(`change`,e),()=>t.configuration.removeEventListener(`change`,e)},o=[t,n],e[0]=t,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,m.useEffect)(a,o),r??n},bT=()=>{let e=(0,g.c)(23),t=yw(),n;e[0]===t?.editedContent?n=e[1]:(n=e=>t?.editedContent.set(e),e[0]=t?.editedContent,e[1]=n);let r,i,a,o,s,c,l,u,d;e[2]===t?(r=e[3],i=e[4],a=e[5],o=e[6],s=e[7],c=e[8],l=e[9],u=e[10],d=e[11]):(r=e=>t?.setEditedDictionary(e),i=(e,n)=>t?.setEditedContent(e,n),a=(e,n,r,i)=>t?.addContent(e,n,r,i),o=(e,n,r)=>t?.renameContent(e,n,r),s=(e,n)=>t?.removeContent(e,n),c=e=>t?.restoreContent(e),l=e=>t?.clearContent(e),u=()=>t?.clearAllContent(),d=(e,n)=>t?.getContentValue(e,n),e[2]=t,e[3]=r,e[4]=i,e[5]=a,e[6]=o,e[7]=s,e[8]=c,e[9]=l,e[10]=u,e[11]=d);let f;return e[12]!==n||e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o||e[17]!==s||e[18]!==c||e[19]!==l||e[20]!==u||e[21]!==d?(f={setEditedContentState:n,setEditedDictionary:r,setEditedContent:i,addEditedContent:a,renameEditedContent:o,removeEditedContent:s,restoreEditedContent:c,clearEditedDictionaryContent:l,clearEditedContent:u,getEditedContentValue:d},e[12]=n,e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=s,e[18]=c,e[19]=l,e[20]=u,e[21]=d,e[22]=f):f=e[22],f},xT=()=>{let e=(0,g.c)(6),t=yw(),[n,r]=(0,m.useState)(t?.editedContent.value),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editedContent.addEventListener(`change`,e),()=>t.editedContent.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,m.useEffect)(i,a);let o=bT(),s;return e[3]!==n||e[4]!==o?(s={editedContent:n,...o},e[3]=n,e[4]=o,e[5]=s):s=e[5],s},ST=()=>{let e=(0,g.c)(5),t=yw(),[n,r]=(0,m.useState)(t?.editorEnabled.value??!1),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editorEnabled.addEventListener(`change`,e),()=>t.editorEnabled.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,m.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},CT=()=>{let e=(0,g.c)(2),t=yw(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},wT=(e,t,n)=>{let r=(0,g.c)(11),i=yw(),a;r[0]!==e||r[1]!==i?.messenger||r[2]!==t?(a=()=>{if(t)return i?.messenger.subscribe(e,t)},r[0]=e,r[1]=i?.messenger,r[2]=t,r[3]=a):a=r[3];let o;r[4]!==e||r[5]!==i||r[6]!==n?(o=[i,e,n],r[4]=e,r[5]=i,r[6]=n,r[7]=o):o=r[7],(0,m.useEffect)(a,o);let s;return r[8]!==e||r[9]!==i?.messenger?(s=t=>{i?.messenger.send(e,t)},r[8]=e,r[9]=i?.messenger,r[10]=s):s=r[10],s},TT=()=>{wT(Cw.INTLAYER_IFRAME_CLICKED,ww)},ET=e=>{let t=(0,g.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Uw(i,n,mT());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsx)(C.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,l=s??r,u;t[1]!==n||t[2]!==o?(u=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=u):u=t[3];let d;return t[4]!==n||t[5]!==a?(d=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=d):d=t[6],(0,C.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,C.jsx)(gw,{value:l,onChange:d})})},DT=e=>{let{keyPath:t,section:n}=e;return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZT.includes(e)).map(r=>{let i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,m.createElement)(QT,{...e,key:r,keyPath:a,section:o})]})})})},OT=e=>{let{keyPath:t,section:n}=e;return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZT.includes(e)).map(r=>{let i={type:D,key:r},a=[...t,i],o=n[D][r];return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,m.createElement)(QT,{...e,key:r,keyPath:a,section:o})]})})})},kT=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,m.useState)(!1),l=(0,m.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,m.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,m.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,C.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,C.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,C.jsx)(tw,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:hf,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,C.jsx)(tw,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Bf,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,C.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,C.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,C.jsx)(tw,{label:`Edit`,Icon:Nf,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},AT=(...e)=>e.filter(Boolean).join(` `),jT=tf([`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-text`,`bg-neutral-50 dark:bg-neutral-950`,`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`}}),MT=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,C.jsx)(`input`,{className:AT(jT({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),NT=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,C.jsx)(`textarea`,{className:W(`resize-none`,jT({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),PT=24,FT=12,IT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,m.useRef)(null);(0,m.useImperativeHandle)(i,()=>o.current);let s=()=>{let e=o.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let i=e.scrollHeight,a=PT*r+FT,s=PT+FT;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,m.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,C.jsx)(NT,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:W(`overflow-y-auto`,t&&`resize-none`,e),...a})},LT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,m.useRef)(null);return(0,m.useImperativeHandle)(n,()=>i.current),(0,C.jsx)(kT,{value:r.value??i.current?.value??r.defaultValue??``,onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,C.jsx)(IT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},RT=e=>{let t=(0,g.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=mT(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??Uw(i,n,l),t[0]=l,t[1]=i,t[2]=a,t[3]=n,t[4]=u):u=t[4];let d=u;if(d&&typeof d!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsx)(C.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let f=n.length,p=String(d??r),m;if(t[6]!==p||t[7]!==n||t[8]!==f||t[9]!==o||t[10]!==s||t[11]!==c){let e;t[13]!==n||t[14]!==s?(e=e=>{e.stopPropagation(),s(n)},t[13]=n,t[14]=s,t[15]=e):e=t[15],m=(0,C.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,C.jsx)(LT,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:zT})}),t[6]=p,t[7]=n,t[8]=f,t[9]=o,t[10]=s,t[11]=c,t[12]=m}else m=t[12];return m};function zT(){return null}var BT=e=>{let t=(0,g.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=xT(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=Uw(e.editedContent,n),s=r[j],{content:c}=r,l=[...n,{type:j}],u;t[5]!==i||t[6]!==n||t[7]!==e.dictionary||t[8]!==r?(u=t=>{i(e.dictionary.localId,{...r,content:t.newValue},n)},t[5]=i,t[6]=n,t[7]=e.dictionary,t[8]=r,t[9]=u):u=t[9],a=(0,C.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,C.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,C.jsx)(RT,{...e,keyPath:l,section:c,editedContentValue:o?.content,onContentChange:u})]}),t[0]=i,t[1]=n,t[2]=e,t[3]=r,t[4]=a}else a=t[4];return a},VT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:I}],i=n[I];return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,C.jsx)(QT,{...e,keyPath:r,section:i})})},HT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:A}],i=n[A];return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,C.jsx)(QT,{...e,keyPath:r,section:i})})},UT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:F}],i=n[F];return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,C.jsx)(QT,{...e,keyPath:r,section:i})})},WT=(0,m.memo)(e=>{let t=(0,g.c)(11),{keyPath:n,section:r,focusedKeyPath:i,onFocusKeyPath:a}=e,o;t[0]===i?o=t[1]:(o=i===void 0?[]:i,t[0]=i,t[1]=o);let s=o,c;t[2]===r?c=t[3]:(c=Object.keys(r??{}).filter(GT),t[2]=r,t[3]=c);let l=c,u;return t[4]!==s||t[5]!==n||t[6]!==a||t[7]!==e||t[8]!==r||t[9]!==l?(u=l.map(t=>{let i={key:t,type:M},o=[...n,i],c=dr(o,s);return(0,C.jsx)(iw,{level:n.length,title:hr(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,C.jsx)(QT,{...e,keyPath:o,section:r[t]})},t)}),t[4]=s,t[5]=n,t[6]=a,t[7]=e,t[8]=r,t[9]=l,t[10]=u):u=t[10],u});function GT(e){return!ZT.includes(e)}var KT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,m.useRef)(null);return(0,m.useImperativeHandle)(n,()=>i.current),(0,C.jsx)(kT,{value:(0,m.useMemo)(()=>r.value??i.current?.value??r.defaultValue,[r.value,r.defaultValue,i.current?.value]),onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},children:(0,C.jsx)(MT,{ref:i,...r})})},qT=e=>{let t=(0,g.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=mT(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=Uw(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let l=c;if(l!==void 0&&typeof l!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsx)(C.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let u=n.length,d=String(l??r),f;if(t[5]!==d||t[6]!==n||t[7]!==u||t[8]!==a||t[9]!==o){let e;t[11]!==n||t[12]!==o?(e=e=>{e.stopPropagation(),o(n)},t[11]=n,t[12]=o,t[13]=e):e=t[13];let r;t[14]!==n||t[15]!==a?(r=e=>a({keyPath:n,newValue:e}),t[14]=n,t[15]=a,t[16]=r):r=t[16],f=(0,C.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,C.jsx)(KT,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:JT})}),t[5]=d,t[6]=n,t[7]=u,t[8]=a,t[9]=o,t[10]=f}else f=t[10];return f};function JT(){return null}var YT=e=>{let{keyPath:t,section:n}=e;return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZT.includes(e)).map(r=>{let i={type:O,key:r},a=[...t,i],o=n[O][r];return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,m.createElement)(QT,{...e,key:r,keyPath:a,section:o})]})})})},XT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:E,key:r},a=[...t,i],o=n[E][r];return(0,C.jsx)(QT,{...e,keyPath:a,section:o})},ZT=[`filePath`,`id`,`nodeType`],QT=(0,m.memo)(e=>{let t=mT(),n=(0,m.useMemo)(()=>Uw(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,m.useMemo)(()=>Yw(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,C.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,C.jsx)(UT,{...e,section:n}):r===`html`?(0,C.jsx)(VT,{...e,section:n}):r===`translation`?(0,C.jsx)(XT,{...e,section:n}):r===`enumeration`?(0,C.jsx)(OT,{...e,section:n}):r===`plural`?(0,C.jsx)(YT,{...e,section:n}):r===`condition`?(0,C.jsx)(DT,{...e,section:n}):r===`insertion`?(0,C.jsx)(HT,{...e,section:n}):r===`array`?(0,C.jsx)(aw,{...e,section:n}):r===`file`?(0,C.jsx)(BT,{...e,section:n}):(0,C.jsx)(WT,{...e,section:n});if(typeof n==`string`)return(0,C.jsx)(RT,{...e,section:n});if(typeof n==`number`)return(0,C.jsx)(qT,{...e,section:n});if(typeof n==`boolean`)return(0,C.jsx)(ET,{...e,section:n})}),$T=e=>{let t=(0,g.c)(6),{dictionary:n,...r}=e,i=mT(),{editedContent:a,addEditedContent:o}=xT(),{focusedContent:s,setFocusedContentKeyPath:c}=gT(),l;t[0]!==n||t[1]!==a?(l=JSON.stringify((a?.[n.localId]??n).content),t[0]=n,t[1]=a,t[2]=l):l=t[2];let u;return t[3]!==o||t[4]!==n.localId?(u=e=>{o(n.localId,e.newValue,e.keyPath)},t[3]=o,t[4]=n.localId,t[5]=u):u=t[5],(0,C.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,m.createElement)(QT,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},eE={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`},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`},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`},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`},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`},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:`新しい列挙を追加`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{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`},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`},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:`नया सूची जोड़ें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`}}}},localIds:[`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`]},tE={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},nE=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),rE=e=>e.reduce((e,t)=>{let n=e??{},r=nE(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=rE([tE,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=rE([tE.headers,...t.map(e=>e.headers)]),s=rE(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=rE(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=`${e}${r}`,d=await fetch(u,l);if(!d.ok){let e=await d.json();throw Error(JSON.stringify(e.error)??`An error occurred`)}return await d.json()},iE=(e={},t)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,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(`
|
|
57
|
-
`);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,...
|
|
58
|
-
`);
|
|
59
|
-
`);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},oE=(e={},t)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},sE=(e={},t)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},cE=(e={},t)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},lE=(e={},t)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}})}},uE=(e={},t)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},dE=(e={},t)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},fE=e=>{let t=e.editor.backendURL,{clientId:n,clientSecret:r}=e.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${t}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:n,client_secret:r}})}},pE=(e={},t)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},mE=(e={},t)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},hE=(e={},t)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},gE=(e={},t=b)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`}),getInvoices:async(t={})=>await q(`${n}/invoices`,e,t,{method:`GET`}),getPaymentMethod:async(t={})=>await q(`${n}/payment-method`,e,t,{method:`GET`}),createPortalSession:async(t={})=>await q(`${n}/portal-session`,e,t,{method:`POST`})}},_E=(e={},t)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},vE=(e={},t)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},yE=(e={},t)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},bE=(e={},t)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function xE(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 SE(e,t,n=`.`,r){if(!xE(t))return SE(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)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:xE(a)&&xE(i[t])?i[t]=SE(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function CE(e){return(...t)=>t.reduce((t,n)=>SE(t,n,``,e),{})}var wE=CE(),TE=(e={},t)=>{let n=wE(t??{},b);return{organization:pE(e,n),project:mE(e,n),user:yE(e,n),oAuth:fE(n),dictionary:sE(e,n),stripe:gE(e,n),ai:iE(e,n),audit:aE(e,n),tag:_E(e,n),search:hE(e,n),editor:cE(e,n),newsletter:dE(e,n),github:lE(e,n),gitlab:uE(e,n),bitbucket:oE(e,n),showcaseProject:bE(e,n),translate:vE(e,n)}},EE=e=>{let t=(0,g.c)(7),n=wE(e,yT(),b),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=fE(n),a=!!(n.editor.clientId&&n.editor.clientSecret),o;t[1]!==r||t[2]!==i.getOAuth2AccessToken||t[3]!==a?(o={queryKey:r,queryFn:i.getOAuth2AccessToken,enabled:a,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[1]=r,t[2]=i.getOAuth2AccessToken,t[3]=a,t[4]=o):o=t[4];let{data:s}=Sc(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function DE(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var OE=DE({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`,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`}),kE=`1.6.9`;function AE(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 jE(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 ME(){return NE.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var NE={stubThis:e=>e};function PE(e){let{id:t}=e;return{...e,id:jE(t),transports:e.transports}}function FE(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 IE=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 LE({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 IE({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 IE({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 IE({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 IE({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 IE({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new IE({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 IE({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new IE({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(!FE(t))return new IE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new IE({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 IE({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 IE({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 RE=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}}},zE=[`cross-platform`,`platform`];function BE(e){if(e&&!(zE.indexOf(e)<0))return e}async function VE(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(!ME())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:jE(t.challenge),user:{...t.user,id:jE(t.user.id)},excludeCredentials:t.excludeCredentials?.map(PE)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=RE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw LE({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){HE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=AE(e))}catch(e){HE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=AE(c.getAuthenticatorData())}catch(e){HE(`getAuthenticatorData()`,e)}return{id:o,rawId:AE(s),response:{attestationObject:AE(c.attestationObject),clientDataJSON:AE(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:BE(a.authenticatorAttachment)}}function HE(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 UE(){if(!ME())return WE.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?WE.stubThis(new Promise(e=>e(!1))):WE.stubThis(e.isConditionalMediationAvailable())}var WE={stubThis:e=>e};function GE({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 IE({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new IE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!FE(t))return new IE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new IE({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 IE({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 KE(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(!ME())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(PE));let a={...t,challenge:jE(t.challenge),allowCredentials:i},o={};if(n){if(!await UE())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=RE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw GE({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=AE(u.userHandle)),{id:c,rawId:AE(l),response:{authenticatorData:AE(u.authenticatorData),clientDataJSON:AE(u.clientDataJSON),signature:AE(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:BE(s.authenticatorAttachment)}}var qE=`1.6.9`,JE=Symbol.for(`better-auth:broadcast-channel`),YE=()=>Math.floor(Date.now()/1e3),XE=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:YE()}))}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 ZE(e=`better-auth.message`){return globalThis[JE]||(globalThis[JE]=new XE(e)),globalThis[JE]}var QE=Symbol.for(`better-auth:focus-manager`),$E=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 eD(){return globalThis[QE]||(globalThis[QE]=new $E),globalThis[QE]}var tD=Symbol.for(`better-auth:online-manager`),nD=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 rD(){return globalThis[tD]||(globalThis[tD]=new nD),globalThis[tD]}var iD={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*:/},aD=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,oD={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},sD=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function cD(e){return e instanceof Date&&!isNaN(e.getTime())}function lD(e){let t=sD.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 cD(f)?f:null}function uD(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();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in oD)return oD[s];if(!aD.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(iD).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=lD(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function dD(e,t={strict:!0}){return uD(e,t)}var fD=[],pD=0,mD=4,hD=globalThis.nanostoresGlobal||={epoch:0},gD=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=pD+mD;t<fD.length;)fD[t]===e?fD.splice(t,mD):t+=mD;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){hD.epoch++;let i=!fD.length;for(let i of t)fD.push(i,n.value,e,r);if(i){for(pD=0;pD<fD.length;pD+=mD)fD[pD](fD[pD+1],fD[pD+2],fD[pD+3]);fD.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},_D=5,vD=6,yD=10,bD=(e,t,n,r)=>(e.events=e.events||{},e.events[n+yD]||(e.events[n+yD]=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+yD](),delete e.events[n+yD])}),xD=1e3,SD=(e,t)=>bD(e,n=>{let r=t(n);r&&e.events[vD].push(r)},_D,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[vD]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[vD])t();e.events[vD]=[]}},xD)},()=>{e.listen=n,e.off=r}}),CD=()=>typeof window>`u`,wD=(e,t,n,r)=>{let i=gD({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.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)return;let a=e.error.status===401;i.set({error:e.error,data:a?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e)},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{CD()||(o?await a():SD(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},TD=()=>Math.floor(Date.now()/1e3);function ED(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var DD=5;function OD(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||rD().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=TD(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=TD(),r(`/get-session`).then(async e=>{let{data:a,error:o}=ED(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=ED(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=TD(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(TD()-c.lastSessionRequest<DD)return;c.lastSessionRequest=TD()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=TD(),n.set(!n.get()))},d=e=>{ZE().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=ZE().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=eD().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=rD().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),ZE().setup(),eD().setup(),rD().setup()},cleanup:()=>{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.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}var kD=Object.create(null),AD=e=>({}),jD=new Proxy(kD,{get(e,t){return AD()[t]??kD[t]},has(e,t){return t in AD()||t in kD},set(e,t,n){let r=AD(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=AD(!0);return delete n[t],!0},ownKeys(){let e=AD(!0);return Object.keys(e)}});function MD(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 MD(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return MD(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return MD(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return MD(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return MD(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return MD(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return MD(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function ND(){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 PD(e){let t=e.split(`
|
|
56
|
+
`,rT=typeof HTMLElement<`u`?HTMLElement:class{},iT=class extends rT{_isSelecting=!1;_pressDuration=tT;_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=nT,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?tT: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}))}_handleMouseDown(){this._clearPressTimer(),this._pressTimer=setTimeout(()=>{this._isSelectingState=!0,this._updateActiveState(),this._dispatch(`intlayer:press`)},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){(this._isSelecting||this._isSelectingState)&&(e.preventDefault(),e.stopPropagation())}_handleBlur(){this._isSelectingState=!1,this._updateActiveState()}},aT=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,iT),Nw(),Iw(),eT())},oT=()=>({allowedOrigins:[y?.editorURL,y?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),sT=0,cT=()=>{sT++;let e=Ow();if(e)return e;let t=new Zw({mode:`client`,messenger:oT(),configuration:b});return kw(t),aT(),t.start(),t},lT=()=>{sT=Math.max(0,sT-1),!(sT>0)&&(Ow()?.stop(),kw(null))},uT=(e,t,n)=>{let r=(0,g.c)(16),i=yw(),a;r[0]===t?a=r[1]:(a=typeof t==`function`?t():t,r[0]=t,r[1]=a);let o=a,[s,c]=(0,m.useState)(o),l=(0,m.useRef)(o),u=(0,m.useRef)(null),d;r[2]!==e||r[3]!==i?.messenger||r[4]!==n||r[5]!==o?(d=()=>{let{emit:t,receive:r}=n??{},a=t===void 0?!0:t,s=r===void 0?!0:r,d=new zw(e,i?.messenger,{emit:a,receive:s,initialValue:o});u.current=d;let f=e=>{let t=e.detail;l.current=t,c(t)};return d.addEventListener(`change`,f),d.start(),()=>{d.removeEventListener(`change`,f),d.stop(),u.current=null}},r[2]=e,r[3]=i?.messenger,r[4]=n,r[5]=o,r[6]=d):d=r[6];let f=i?.messenger,p=n?.emit,h=n?.receive,_;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==h?(_=[e,f,p,h],r[7]=e,r[8]=f,r[9]=p,r[10]=h,r[11]=_):_=r[11],(0,m.useEffect)(d,_);let v;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=v):v=r[12];let y=v,b;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>{u.current?.postCurrentValue()},r[13]=b):b=r[13];let x=b,S;return r[14]===s?S=r[15]:(S=[s,y,x],r[14]=s,r[15]=S),S},dT=(e,t)=>uT(Cw.INTLAYER_URL_CHANGE,e,t),fT=()=>{let e=(0,g.c)(13),t=yw(),n;e[0]===t?.localeDictionaries.value?n=e[1]:(n=t?.localeDictionaries.value??{},e[0]=t?.localeDictionaries.value,e[1]=n);let[r,i]=(0,m.useState)(n),a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{if(!t)return;let e=e=>i(e.detail??{});return t.localeDictionaries.addEventListener(`change`,e),()=>t.localeDictionaries.removeEventListener(`change`,e)},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,m.useEffect)(a,o);let s;e[5]===t?.localeDictionaries?s=e[6]:(s=e=>t?.localeDictionaries.set(e),e[5]=t?.localeDictionaries,e[6]=s);let c=s,l;e[7]===t?l=e[8]:(l=e=>t?.setLocaleDictionary(e),e[7]=t,e[8]=l);let u=l,d;return e[9]!==r||e[10]!==c||e[11]!==u?(d={localeDictionaries:r,setLocaleDictionaries:c,setLocaleDictionary:u},e[9]=r,e[10]=c,e[11]=u,e[12]=d):d=e[12],d},pT=()=>{let e=(0,g.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=fT(),r;return e[0]!==t||e[1]!==n?(r={setLocaleDictionaries:t,setLocaleDictionary:n},e[0]=t,e[1]=n,e[2]=r):r=e[2],r},mT=()=>{let e=(0,g.c)(3),t=yw(),[n,r]=(0,m.useState)(t?.currentLocale.value),i,a;return e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.currentLocale.addEventListener(`change`,e),()=>t.currentLocale.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,m.useEffect)(i,a),n},hT=(e,t,n)=>{for(let r of t)try{if(Uw(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},gT=()=>{let e=(0,g.c)(12),{localeDictionaries:t}=fT(),n=mT(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=xw(),o;bb0:{if(!a){o=a;break bb0}if(!t){o=a;break bb0}if(a.dictionaryLocalId){o=a;break bb0}let r;if(e[0]!==n||e[1]!==t||e[2]!==a.dictionaryKey||e[3]!==a.keyPath){let i=Object.values(t).filter(e=>e.key===a.dictionaryKey);r=hT(a.keyPath??[],i,n),e[0]=n,e[1]=t,e[2]=a.dictionaryKey,e[3]=a.keyPath,e[4]=r}else r=e[4];let i=r,s;e[5]!==a||e[6]!==i?(s={...a,...i},e[5]=a,e[6]=i,e[7]=s):s=e[7],o=s}let s;return e[8]!==r||e[9]!==i||e[10]!==o?(s={focusedContent:o,setFocusedContent:r,setFocusedContentKeyPath:i},e[8]=r,e[9]=i,e[10]=o,e[11]=s):s=e[11],s},_T=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,m.useRef)(null);i.current||=new Zw({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,m.useEffect)(()=>(aT(),kw(a),a.start(),()=>{a.stop(),kw(null)}),[a]),(0,C.jsx)(vw,{manager:a,children:e})},vT=(0,m.createContext)(void 0),yT=()=>{let e=(0,g.c)(4),t=yw(),n=(0,m.useContext)(vT),[r,i]=(0,m.useState)(t?.configuration.value??n),a,o;return e[0]!==t||e[1]!==n?(a=()=>{if(!t){i(n);return}let e=e=>{let t=e.detail;i(t??n)};return t.configuration.addEventListener(`change`,e),()=>t.configuration.removeEventListener(`change`,e)},o=[t,n],e[0]=t,e[1]=n,e[2]=a,e[3]=o):(a=e[2],o=e[3]),(0,m.useEffect)(a,o),r??n},bT=()=>{let e=(0,g.c)(23),t=yw(),n;e[0]===t?.editedContent?n=e[1]:(n=e=>t?.editedContent.set(e),e[0]=t?.editedContent,e[1]=n);let r,i,a,o,s,c,l,u,d;e[2]===t?(r=e[3],i=e[4],a=e[5],o=e[6],s=e[7],c=e[8],l=e[9],u=e[10],d=e[11]):(r=e=>t?.setEditedDictionary(e),i=(e,n)=>t?.setEditedContent(e,n),a=(e,n,r,i)=>t?.addContent(e,n,r,i),o=(e,n,r)=>t?.renameContent(e,n,r),s=(e,n)=>t?.removeContent(e,n),c=e=>t?.restoreContent(e),l=e=>t?.clearContent(e),u=()=>t?.clearAllContent(),d=(e,n)=>t?.getContentValue(e,n),e[2]=t,e[3]=r,e[4]=i,e[5]=a,e[6]=o,e[7]=s,e[8]=c,e[9]=l,e[10]=u,e[11]=d);let f;return e[12]!==n||e[13]!==r||e[14]!==i||e[15]!==a||e[16]!==o||e[17]!==s||e[18]!==c||e[19]!==l||e[20]!==u||e[21]!==d?(f={setEditedContentState:n,setEditedDictionary:r,setEditedContent:i,addEditedContent:a,renameEditedContent:o,removeEditedContent:s,restoreEditedContent:c,clearEditedDictionaryContent:l,clearEditedContent:u,getEditedContentValue:d},e[12]=n,e[13]=r,e[14]=i,e[15]=a,e[16]=o,e[17]=s,e[18]=c,e[19]=l,e[20]=u,e[21]=d,e[22]=f):f=e[22],f},xT=()=>{let e=(0,g.c)(6),t=yw(),[n,r]=(0,m.useState)(t?.editedContent.value),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editedContent.addEventListener(`change`,e),()=>t.editedContent.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,m.useEffect)(i,a);let o=bT(),s;return e[3]!==n||e[4]!==o?(s={editedContent:n,...o},e[3]=n,e[4]=o,e[5]=s):s=e[5],s},ST=()=>{let e=(0,g.c)(5),t=yw(),[n,r]=(0,m.useState)(t?.editorEnabled.value??!1),i,a;e[0]===t?(i=e[1],a=e[2]):(i=()=>{if(!t)return;let e=e=>r(e.detail);return t.editorEnabled.addEventListener(`change`,e),()=>t.editorEnabled.removeEventListener(`change`,e)},a=[t],e[0]=t,e[1]=i,e[2]=a),(0,m.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},CT=()=>{let e=(0,g.c)(2),t=yw(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},wT=(e,t,n)=>{let r=(0,g.c)(11),i=yw(),a;r[0]!==e||r[1]!==i?.messenger||r[2]!==t?(a=()=>{if(t)return i?.messenger.subscribe(e,t)},r[0]=e,r[1]=i?.messenger,r[2]=t,r[3]=a):a=r[3];let o;r[4]!==e||r[5]!==i||r[6]!==n?(o=[i,e,n],r[4]=e,r[5]=i,r[6]=n,r[7]=o):o=r[7],(0,m.useEffect)(a,o);let s;return r[8]!==e||r[9]!==i?.messenger?(s=t=>{i?.messenger.send(e,t)},r[8]=e,r[9]=i?.messenger,r[10]=s):s=r[10],s},TT=()=>{wT(Cw.INTLAYER_IFRAME_CLICKED,ww)},ET=e=>{let t=(0,g.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=Uw(i,n,mT());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsx)(C.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[0]=e):e=t[0],e}let c=n.length,l=s??r,u;t[1]!==n||t[2]!==o?(u=e=>{e.stopPropagation(),o(n)},t[1]=n,t[2]=o,t[3]=u):u=t[3];let d;return t[4]!==n||t[5]!==a?(d=e=>a({keyPath:n,newValue:String(e)}),t[4]=n,t[5]=a,t[6]=d):d=t[6],(0,C.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,C.jsx)(gw,{value:l,onChange:d})})},DT=e=>{let{keyPath:t,section:n}=e;return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZT.includes(e)).map(r=>{let i={type:k,key:r},a=[...t,i],o=n[k][r];return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,m.createElement)(QT,{...e,key:r,keyPath:a,section:o})]})})})},OT=e=>{let{keyPath:t,section:n}=e;return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZT.includes(e)).map(r=>{let i={type:D,key:r},a=[...t,i],o=n[D][r];return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,m.createElement)(QT,{...e,key:r,keyPath:a,section:o})]})})})},kT=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,m.useState)(!1),l=(0,m.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,m.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,m.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,C.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,C.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,C.jsx)(tw,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:hf,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,C.jsx)(tw,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Bf,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,C.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,C.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,C.jsx)(tw,{label:`Edit`,Icon:Nf,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},AT=(...e)=>e.filter(Boolean).join(` `),jT=tf([`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-text`,`bg-neutral-50 dark:bg-neutral-950`,`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`}}),MT=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,C.jsx)(`input`,{className:AT(jT({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),NT=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,C.jsx)(`textarea`,{className:W(`resize-none`,jT({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),PT=24,FT=12,IT=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,m.useRef)(null);(0,m.useImperativeHandle)(i,()=>o.current);let s=()=>{let e=o.current;if(!e||!t)return;let n=e.style;n.height=`auto`;let i=e.scrollHeight,a=PT*r+FT,s=PT+FT;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,m.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,C.jsx)(NT,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:W(`overflow-y-auto`,t&&`resize-none`,e),...a})},LT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,m.useRef)(null);return(0,m.useImperativeHandle)(n,()=>i.current),(0,C.jsx)(kT,{value:r.value??i.current?.value??r.defaultValue??``,onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},onClick:e=>{e.preventDefault(),e.stopPropagation()},children:(0,C.jsx)(IT,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},RT=e=>{let t=(0,g.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=mT(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??Uw(i,n,l),t[0]=l,t[1]=i,t[2]=a,t[3]=n,t[4]=u):u=t[4];let d=u;if(d&&typeof d!=`string`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsx)(C.Fragment,{children:`Error loading section - Edited content Incoherence with the original content format`}),t[5]=e):e=t[5],e}let f=n.length,p=String(d??r),m;if(t[6]!==p||t[7]!==n||t[8]!==f||t[9]!==o||t[10]!==s||t[11]!==c){let e;t[13]!==n||t[14]!==s?(e=e=>{e.stopPropagation(),s(n)},t[13]=n,t[14]=s,t[15]=e):e=t[15],m=(0,C.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,C.jsx)(LT,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:zT})}),t[6]=p,t[7]=n,t[8]=f,t[9]=o,t[10]=s,t[11]=c,t[12]=m}else m=t[12];return m};function zT(){return null}var BT=e=>{let t=(0,g.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=xT(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=Uw(e.editedContent,n),s=r[j],{content:c}=r,l=[...n,{type:j}],u;t[5]!==i||t[6]!==n||t[7]!==e.dictionary||t[8]!==r?(u=t=>{i(e.dictionary.localId,{...r,content:t.newValue},n)},t[5]=i,t[6]=n,t[7]=e.dictionary,t[8]=r,t[9]=u):u=t[9],a=(0,C.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,C.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,C.jsx)(RT,{...e,keyPath:l,section:c,editedContentValue:o?.content,onContentChange:u})]}),t[0]=i,t[1]=n,t[2]=e,t[3]=r,t[4]=a}else a=t[4];return a},VT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:I}],i=n[I];return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,C.jsx)(QT,{...e,keyPath:r,section:i})})},HT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:A}],i=n[A];return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,C.jsx)(QT,{...e,keyPath:r,section:i})})},UT=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:F}],i=n[F];return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,C.jsx)(QT,{...e,keyPath:r,section:i})})},WT=(0,m.memo)(e=>{let t=(0,g.c)(11),{keyPath:n,section:r,focusedKeyPath:i,onFocusKeyPath:a}=e,o;t[0]===i?o=t[1]:(o=i===void 0?[]:i,t[0]=i,t[1]=o);let s=o,c;t[2]===r?c=t[3]:(c=Object.keys(r??{}).filter(GT),t[2]=r,t[3]=c);let l=c,u;return t[4]!==s||t[5]!==n||t[6]!==a||t[7]!==e||t[8]!==r||t[9]!==l?(u=l.map(t=>{let i={key:t,type:M},o=[...n,i],c=dr(o,s);return(0,C.jsx)(iw,{level:n.length,title:hr(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,C.jsx)(QT,{...e,keyPath:o,section:r[t]})},t)}),t[4]=s,t[5]=n,t[6]=a,t[7]=e,t[8]=r,t[9]=l,t[10]=u):u=t[10],u});function GT(e){return!ZT.includes(e)}var KT=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,m.useRef)(null);return(0,m.useImperativeHandle)(n,()=>i.current),(0,C.jsx)(kT,{value:(0,m.useMemo)(()=>r.value??i.current?.value??r.defaultValue,[r.value,r.defaultValue,i.current?.value]),onCancel:()=>{i.current&&(i.current.value=i.current.defaultValue??``),t?.()},onSave:()=>{e?.(i.current?.value??``)},children:(0,C.jsx)(MT,{ref:i,...r})})},qT=e=>{let t=(0,g.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=mT(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=Uw(i,n,s),t[0]=i,t[1]=n,t[2]=s,t[3]=c):c=t[3];let l=c;if(l!==void 0&&typeof l!=`number`){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsx)(C.Fragment,{children:`Error loading section - Edited content incoherence with the original content format`}),t[4]=e):e=t[4],e}let u=n.length,d=String(l??r),f;if(t[5]!==d||t[6]!==n||t[7]!==u||t[8]!==a||t[9]!==o){let e;t[11]!==n||t[12]!==o?(e=e=>{e.stopPropagation(),o(n)},t[11]=n,t[12]=o,t[13]=e):e=t[13];let r;t[14]!==n||t[15]!==a?(r=e=>a({keyPath:n,newValue:e}),t[14]=n,t[15]=a,t[16]=r):r=t[16],f=(0,C.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,C.jsx)(KT,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:JT})}),t[5]=d,t[6]=n,t[7]=u,t[8]=a,t[9]=o,t[10]=f}else f=t[10];return f};function JT(){return null}var YT=e=>{let{keyPath:t,section:n}=e;return(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZT.includes(e)).map(r=>{let i={type:O,key:r},a=[...t,i],o=n[O][r];return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,m.createElement)(QT,{...e,key:r,keyPath:a,section:o})]})})})},XT=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:E,key:r},a=[...t,i],o=n[E][r];return(0,C.jsx)(QT,{...e,keyPath:a,section:o})},ZT=[`filePath`,`id`,`nodeType`],QT=(0,m.memo)(e=>{let t=mT(),n=(0,m.useMemo)(()=>Uw(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,m.useMemo)(()=>Yw(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,C.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,C.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,C.jsx)(UT,{...e,section:n}):r===`html`?(0,C.jsx)(VT,{...e,section:n}):r===`translation`?(0,C.jsx)(XT,{...e,section:n}):r===`enumeration`?(0,C.jsx)(OT,{...e,section:n}):r===`plural`?(0,C.jsx)(YT,{...e,section:n}):r===`condition`?(0,C.jsx)(DT,{...e,section:n}):r===`insertion`?(0,C.jsx)(HT,{...e,section:n}):r===`array`?(0,C.jsx)(aw,{...e,section:n}):r===`file`?(0,C.jsx)(BT,{...e,section:n}):(0,C.jsx)(WT,{...e,section:n});if(typeof n==`string`)return(0,C.jsx)(RT,{...e,section:n});if(typeof n==`number`)return(0,C.jsx)(qT,{...e,section:n});if(typeof n==`boolean`)return(0,C.jsx)(ET,{...e,section:n})}),$T=e=>{let t=(0,g.c)(6),{dictionary:n,...r}=e,i=mT(),{editedContent:a,addEditedContent:o}=xT(),{focusedContent:s,setFocusedContentKeyPath:c}=gT(),l;t[0]!==n||t[1]!==a?(l=JSON.stringify((a?.[n.localId]??n).content),t[0]=n,t[1]=a,t[2]=l):l=t[2];let u;return t[3]!==o||t[4]!==n.localId?(u=e=>{o(n.localId,e.newValue,e.keyPath)},t[3]=o,t[4]=n.localId,t[5]=u):u=t[5],(0,C.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,m.createElement)(QT,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},eE={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`},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`},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`},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`},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`},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:`新しい列挙を追加`},removeEnumeration:{label:`列挙を削除するにはクリック`,text:`列挙を削除`}},ko:{tsxNotEditable:`편집할 수 없는 React 노드입니다`,goToField:{label:`필드로 이동`},addNewElement:{label:`요소를 추가하려면 클릭하세요`,text:`새 요소 추가`},removeElement:{label:`요소를 제거하려면 클릭하세요`,text:`요소 제거`},addNewEnumeration:{label:`열거를 추가하려면 클릭하세요`,text:`새 목록 추가`},removeEnumeration:{label:`목록을 제거하려면 클릭하세요`,text:`목록 제거`}},zh:{tsxNotEditable:`不可编辑的 React 节点`,goToField:{label:`转到字段`},addNewElement:{label:`点击添加元素`,text:`添加新元素`},removeElement:{label:`点击删除元素`,text:`删除元素`},addNewEnumeration:{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`},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`},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:`नया सूची जोड़ें`},removeEnumeration:{label:`सूची निकालने के लिए क्लिक करें`,text:`सूची निकालें`}},ar:{tsxNotEditable:`عقدة React غير قابلة للتحرير`,goToField:{label:`اذهب إلى الحقل`},addNewElement:{label:`انقر لإضافة عنصر`,text:`أضف عنصرًا جديدًا`},removeElement:{label:`انقر لإزالة عنصر`,text:`إزالة عنصر`},addNewEnumeration:{label:`انقر لإضافة تعداد`,text:`أضف تعدادًا جديدًا`},removeEnumeration:{label:`انقر لإزالة تعداد`,text:`إزالة تعداد`}},ru:{tsxNotEditable:`React-узел не редактируемый`,goToField:{label:`Перейти к полю`},addNewElement:{label:`Нажмите, чтобы добавить элемент`,text:`Добавить новый элемент`},removeElement:{label:`Нажмите, чтобы удалить элемент`,text:`Удалить элемент`},addNewEnumeration:{label:`Нажмите, чтобы добавить перечисление`,text:`Добавить новое перечисление`},removeEnumeration:{label:`Нажмите, чтобы удалить перечисление`,text:`Удалить перечисление`}}}},localIds:[`navigation-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/NavigationView/navigationViewNode.content.mjs`]},tE={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},nE=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),rE=e=>e.reduce((e,t)=>{let n=e??{},r=nE(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=rE([tE,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=rE([tE.headers,...t.map(e=>e.headers)]),s=rE(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=rE(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=`${e}${r}`,d=await fetch(u,l);if(!d.ok){let e=await d.json();throw Error(JSON.stringify(e.error)??`An error occurred`)}return await d.json()},iE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,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(`
|
|
57
|
+
`);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(`${n}/chat`,{method:`POST`,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(`
|
|
58
|
+
`);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 q(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await q(`${n}/discussions`,e,r,{method:`GET`,params:t})}},aE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/scan`;return{discoverUrls:async(t,r={})=>await q(`${n}/recursive/discover`,e,r,{method:`GET`,params:t}),scanUrl:async(t,r={})=>{if(!t?.url)return;let{url:i,onMessage:a,onDone:o}=t,s=`${n}?${new URLSearchParams({url:i}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...e.headers,...r.headers},credentials:`include`,signal:r.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.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(`
|
|
59
|
+
`);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},oE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},sE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},cE=(e={},t=b)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},lE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}})}},uE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},dE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},fE=(e=b)=>{let t=e.editor.backendURL,{clientId:n,clientSecret:r}=e.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${t}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:n,client_secret:r}})}},pE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},mE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},hE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},gE=(e={},t=b)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`}),getInvoices:async(t={})=>await q(`${n}/invoices`,e,t,{method:`GET`}),getPaymentMethod:async(t={})=>await q(`${n}/payment-method`,e,t,{method:`GET`}),createPortalSession:async(t={})=>await q(`${n}/portal-session`,e,t,{method:`POST`})}},_E=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},vE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},yE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},bE=(e={},t=b)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function xE(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 SE(e,t,n=`.`,r){if(!xE(t))return SE(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)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:xE(a)&&xE(i[t])?i[t]=SE(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function CE(e){return(...t)=>t.reduce((t,n)=>SE(t,n,``,e),{})}var wE=CE(),TE=(e={},t=b)=>{let n=wE(t??{},b);return{organization:pE(e,n),project:mE(e,n),user:yE(e,n),oAuth:fE(n),dictionary:sE(e,n),stripe:gE(e,n),ai:iE(e,n),audit:aE(e,n),tag:_E(e,n),search:hE(e,n),editor:cE(e,n),newsletter:dE(e,n),github:lE(e,n),gitlab:uE(e,n),bitbucket:oE(e,n),showcaseProject:bE(e,n),translate:vE(e,n)}},EE=e=>{let t=(0,g.c)(7),n=wE(e,yT(),b),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=fE(n),a=!!(n.editor.clientId&&n.editor.clientSecret),o;t[1]!==r||t[2]!==i.getOAuth2AccessToken||t[3]!==a?(o={queryKey:r,queryFn:i.getOAuth2AccessToken,enabled:a,staleTime:0,gcTime:0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,refetchInterval:!1,refetchIntervalInBackground:!1},t[1]=r,t[2]=i.getOAuth2AccessToken,t[3]=a,t[4]=o):o=t[4];let{data:s}=Sc(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function DE(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var OE=DE({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`,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`}),kE=`1.6.9`;function AE(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 jE(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 ME(){return NE.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var NE={stubThis:e=>e};function PE(e){let{id:t}=e;return{...e,id:jE(t),transports:e.transports}}function FE(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 IE=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 LE({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 IE({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 IE({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 IE({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 IE({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 IE({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new IE({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 IE({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new IE({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(!FE(t))return new IE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new IE({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 IE({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 IE({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 RE=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}}},zE=[`cross-platform`,`platform`];function BE(e){if(e&&!(zE.indexOf(e)<0))return e}async function VE(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(!ME())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:jE(t.challenge),user:{...t.user,id:jE(t.user.id)},excludeCredentials:t.excludeCredentials?.map(PE)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=RE.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw LE({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){HE(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=AE(e))}catch(e){HE(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=AE(c.getAuthenticatorData())}catch(e){HE(`getAuthenticatorData()`,e)}return{id:o,rawId:AE(s),response:{attestationObject:AE(c.attestationObject),clientDataJSON:AE(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:BE(a.authenticatorAttachment)}}function HE(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 UE(){if(!ME())return WE.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?WE.stubThis(new Promise(e=>e(!1))):WE.stubThis(e.isConditionalMediationAvailable())}var WE={stubThis:e=>e};function GE({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 IE({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new IE({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!FE(t))return new IE({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new IE({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 IE({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 KE(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(!ME())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(PE));let a={...t,challenge:jE(t.challenge),allowCredentials:i},o={};if(n){if(!await UE())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=RE.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw GE({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=AE(u.userHandle)),{id:c,rawId:AE(l),response:{authenticatorData:AE(u.authenticatorData),clientDataJSON:AE(u.clientDataJSON),signature:AE(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:BE(s.authenticatorAttachment)}}var qE=`1.6.9`,JE=Symbol.for(`better-auth:broadcast-channel`),YE=()=>Math.floor(Date.now()/1e3),XE=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:YE()}))}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 ZE(e=`better-auth.message`){return globalThis[JE]||(globalThis[JE]=new XE(e)),globalThis[JE]}var QE=Symbol.for(`better-auth:focus-manager`),$E=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 eD(){return globalThis[QE]||(globalThis[QE]=new $E),globalThis[QE]}var tD=Symbol.for(`better-auth:online-manager`),nD=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 rD(){return globalThis[tD]||(globalThis[tD]=new nD),globalThis[tD]}var iD={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*:/},aD=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,oD={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},sD=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function cD(e){return e instanceof Date&&!isNaN(e.getTime())}function lD(e){let t=sD.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 cD(f)?f:null}function uD(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();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in oD)return oD[s];if(!aD.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(iD).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=lD(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function dD(e,t={strict:!0}){return uD(e,t)}var fD=[],pD=0,mD=4,hD=globalThis.nanostoresGlobal||={epoch:0},gD=e=>{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=pD+mD;t<fD.length;)fD[t]===e?fD.splice(t,mD):t+=mD;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){hD.epoch++;let i=!fD.length;for(let i of t)fD.push(i,n.value,e,r);if(i){for(pD=0;pD<fD.length;pD+=mD)fD[pD](fD[pD+1],fD[pD+2],fD[pD+3]);fD.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},_D=5,vD=6,yD=10,bD=(e,t,n,r)=>(e.events=e.events||{},e.events[n+yD]||(e.events[n+yD]=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+yD](),delete e.events[n+yD])}),xD=1e3,SD=(e,t)=>bD(e,n=>{let r=t(n);r&&e.events[vD].push(r)},_D,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[vD]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[vD])t();e.events[vD]=[]}},xD)},()=>{e.listen=n,e.off=r}}),CD=()=>typeof window>`u`,wD=(e,t,n,r)=>{let i=gD({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let o=typeof r==`function`?r({data:i.get().data,error:i.get().error,isPending:i.get().isPending}):r;n(t,{...o,query:{...o?.query,...e?.query},async onSuccess(e){i.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.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)return;let a=e.error.status===401;i.set({error:e.error,data:a?null:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch}),await o?.onError?.(e)},async onRequest(e){let t=i.get();i.set({isPending:t.data===null,data:t.data,error:null,isRefetching:!0,refetch:i.value.refetch}),await o?.onRequest?.(e)}}).catch(e=>{i.set({error:e,data:i.get().data,isPending:!1,isRefetching:!1,refetch:i.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let o=!1;for(let t of e)t.subscribe(async()=>{CD()||(o?await a():SD(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},TD=()=>Math.floor(Date.now()/1e3);function ED(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var DD=5;function OD(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={lastSync:0,lastSessionRequest:0,cachedSession:void 0},l=()=>s||rD().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=TD(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=TD(),r(`/get-session`).then(async e=>{let{data:a,error:o}=ED(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=ED(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=TD(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(TD()-c.lastSessionRequest<DD)return;c.lastSessionRequest=TD()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=TD(),n.set(!n.get()))},d=e=>{ZE().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{t.get()?.data&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=ZE().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=eD().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=rD().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),ZE().setup(),eD().setup(),rD().setup()},cleanup:()=>{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.lastSync=0,c.lastSessionRequest=0,c.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:d}}var kD=Object.create(null),AD=e=>({}),jD=new Proxy(kD,{get(e,t){return AD()[t]??kD[t]},has(e,t){return t in AD()||t in kD},set(e,t,n){let r=AD(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=AD(!0);return delete n[t],!0},ownKeys(){let e=AD(!0);return Object.keys(e)}});function MD(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 MD(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return MD(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return MD(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return MD(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return MD(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return MD(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return MD(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function ND(){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 PD(e){let t=e.split(`
|
|
60
60
|
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
61
61
|
at `))}function FD(e,t){class n extends e{#e;constructor(...e){if(ND()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=PD(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 ID={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};FD(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:ID[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 LD=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function RD(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new LD(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function zD(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new LD(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof LD?t:new LD(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function BD(e,t=`/api/auth`){if(zD(e),RD(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function VD(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 HD(e,t,n,r,i){if(e)return BD(e,t);if(r!==!1){let e=jD.BETTER_AUTH_URL||jD.NEXT_PUBLIC_BETTER_AUTH_URL||jD.PUBLIC_BETTER_AUTH_URL||jD.NUXT_PUBLIC_BETTER_AUTH_URL||jD.NUXT_PUBLIC_AUTH_URL||(jD.BASE_URL===`/`?void 0:jD.BASE_URL);if(e)return BD(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&VD(o,`proto`)&&VD(a,`host`))try{return BD(`${o}://${a}`,t)}catch{}if(n){let e=UD(n.url);if(!e)throw new LD(`Could not get origin from request. Please provide a valid base URL.`);return BD(e,t)}if(typeof window<`u`&&window.location)return BD(window.location.origin,t)}function UD(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var WD={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function GD(e,t){let n=gD(!1),r=wD(n,`/get-session`,e,{method:`GET`}),i=()=>{};return SD(r,()=>{let a=OD({sessionAtom:r,sessionSignal:n,$fetch:e,options:t});return a.init(),i=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>i(e)}}var KD=Object.defineProperty,qD=Object.defineProperties,JD=Object.getOwnPropertyDescriptors,YD=Object.getOwnPropertySymbols,XD=Object.prototype.hasOwnProperty,ZD=Object.prototype.propertyIsEnumerable,QD=(e,t,n)=>t in e?KD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$D=(e,t)=>{for(var n in t||={})XD.call(t,n)&&QD(e,n,t[n]);if(YD)for(var n of YD(t))ZD.call(t,n)&&QD(e,n,t[n]);return e},eO=(e,t)=>qD(e,JD(t)),tO=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)}},nO=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 r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.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}},rO=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}},iO=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 aO(e){if(typeof e==`number`)return new rO({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new rO(e);case`exponential`:return new iO(e);default:throw Error(`Invalid retry strategy`)}}var oO=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},sO=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function cO(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 sO.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function lO(e){try{return JSON.parse(e),!0}catch{return!1}}function uO(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 dO(e){try{return JSON.parse(e)}catch{return e}}function fO(e){return typeof e==`function`}function pO(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&fO(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&fO(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function mO(e){let t=new Headers(e?.headers),n=await oO(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=hO(e?.body);n&&t.set(`content-type`,n)}return t}function hO(e){return uO(e)?`application/json`:null}function gO(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(uO(e.body)&&!t.has(`content-type`)){for(let[t,n]of Object.entries(e?.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has(`content-type`)&&t.get(`content-type`)===`application/x-www-form-urlencoded`&&uO(e.body)?new URLSearchParams(e.body).toString():e.body}function _O(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return xO.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function vO(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var yO=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function bO(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new yO(n.issues);return n.value}var xO=[`get`,`post`,`put`,`patch`,`delete`],SO=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``));let i=r.schema[e];if(i){let e=eO($D({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=eO($D({},e),{body:i.input?await bO(i.input,n?.body):n?.body,params:i.params?await bO(i.params,n?.params):n?.params,query:i.query?await bO(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),CO=e=>{async function t(t,n){let r=eO($D($D({},e),n),{plugins:[...e?.plugins||[],SO(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await TO(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 TO(t,r)}return t};function wO(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];xO.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);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)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];o=o.replace(n,e)}}else for(let[e,t]of Object.entries(r))o=o.replace(`:${e}`,String(t));o=o.split(`/`).map(encodeURIComponent).join(`/`),o.startsWith(`/`)&&(o=o.slice(1));let l=c.toString();return l=l.length>0?`?${l}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${l}`,a):`${a}${o}${l}`}var TO=async(e,t)=>{let{hooks:n,url:r,options:i}=await nO(e,t),a=pO(i),o=new AbortController,s=i.signal??o.signal,c=wO(r,i),l=gO(i),u=await mO(i),d=_O(r,i),f=eO($D({},i),{url:c,headers:u,body:l,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&(f=t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=vO(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(eO($D({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=cO(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??dO)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await bO(f.output,r.data));for(let e of n.onSuccess)e&&await e(eO($D({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??dO,_=await m.text(),v=lO(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:eO($D({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(eO($D({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=aO(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await TO(e,eO($D({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new tO(m.status,m.statusText,v?y:_);return{data:null,error:eO($D({},y),{status:m.status,statusText:m.statusText})}},EO=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{}}},DO=(e,t)=>{let n=`credentials`in Request.prototype,r=HD(e?.baseURL,e?.basePath,void 0,t)??EO(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=CO({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?dD(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[WD],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=GD(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return 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`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=wE(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function OO(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function kO(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 AO(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`||OO(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=kO(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 jO(e){return e.charAt(0).toUpperCase()+e.slice(1)}function MO(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=DO(e),s={};for(let[e,t]of Object.entries(r))s[`use${jO(e)}`]=t;return AO({...n,...s,$fetch:i,$store:o},i,t,r,a)}var NO=(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;try{let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s=await KE({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill}),{clientExtensionResults:c,...l}=s,u=await e(`/passkey/verify-authentication`,{body:{response:l},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...u,webauthn:{response:s,clientExtensionResults:c}}:u}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:OE.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}}},passkey:{addPasskey:async(n,r)=>{let i=await e(`/passkey/generate-register-options`,{method:`GET`,query:{...n?.authenticatorAttachment&&{authenticatorAttachment:n.authenticatorAttachment},...n?.name&&{name:n.name},...n?.context&&{context:n.context}},throw:!1});if(!i.data)return i;try{let a=i.data.extensions||n?.extensions?{...i.data.extensions||{},...n?.extensions||{}}:void 0,o=await VE({optionsJSON:{...i.data,extensions:a},useAutoRegister:n?.useAutoRegister}),{clientExtensionResults:s,...c}=o,l=await e(`/passkey/verify-registration`,{...n?.fetchOptions,...r,body:{response:c,name:n?.name},method:`POST`,throw:!1});return l.data?(t.set(Math.random()),n?.returnWebAuthnResponse?{...l,webauthn:{response:o,clientExtensionResults:s}}:l):l}catch(e){return e instanceof IE?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:OE.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:OE.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:OE.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),PO=()=>{let e=gD();return{id:`passkey`,version:kE,$InferServerPlugin:{},getActions:(t,n)=>NO(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:wD(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:OE}},FO=`1.6.9`,IO=e=>({id:`sso-client`,version:FO,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),LO=()=>({id:`magic-link`,version:qE,$InferServerPlugin:{}}),RO=DE({OTP_NOT_ENABLED:`OTP not enabled`,OTP_HAS_EXPIRED:`OTP has expired`,TOTP_NOT_ENABLED:`TOTP not enabled`,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.`,INVALID_TWO_FACTOR_COOKIE:`Invalid two factor cookie`}),zO=e=>({id:`two-factor`,version:qE,$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`&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:RO}),BO=e=>MO({baseURL:e,withCredentials:!0,plugins:[zO({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}}),PO(),LO(),IO()]}),VO=e=>{let t=e?.editor?.backendURL??b?.editor?.backendURL;t||(t=Yn,console.dir({intlayerConfig:e,configuration:b},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=BO(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()=>[],deleteSSOProvider:async e=>({success:!0})}},HO=(e,t)=>{let n=(0,g.c)(14),r=yT(),i=t??r??b,a=oc(),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[`session`],n[0]=o):o=n[0];let s;n[1]===i?s=n[2]:(s=async()=>(await VO(i).getSession()).data,n[1]=i,n[2]=s);let c=!e,l;n[3]!==s||n[4]!==c?(l={queryKey:o,queryFn:s,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=Sc(l),p=u??(d?null:void 0),m;n[6]===a?m=n[7]:(m=e=>{a.setQueryData([`session`],e)},n[6]=a,n[7]=m);let h=m,_;n[8]===f?_=n[9]:(_=async()=>(await f()).data,n[8]=f,n[9]=_);let v=_,y;return n[10]!==v||n[11]!==p||n[12]!==h?(y={session:p,fetchSession:v,revalidateSession:v,setSession:h},n[10]=v,n[11]=p,n[12]=h,n[13]=y):y=n[13],y},UO=e=>{let t=(0,g.c)(9),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{session:r,intlayerConfiguration:i}=n,{session:a,fetchSession:o,revalidateSession:s,setSession:c}=HO(r,i),{oAuth2AccessToken:l}=EE(i),u=!!(a?.user||l),d;return t[2]!==o||t[3]!==l||t[4]!==s||t[5]!==a||t[6]!==c||t[7]!==u?(d={session:a,fetchSession:o,setSession:c,revalidateSession:s,oAuth2AccessToken:l,isAuthenticated:u},t[2]=o,t[3]=l,t[4]=s,t[5]=a,t[6]=c,t[7]=u,t[8]=d):d=t[8],d},WO=e=>{let t=(0,g.c)(5),n=yT(),{oAuth2AccessToken:r}=UO(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=TE({...r&&{headers:{Authorization:`Bearer ${r.accessToken}`}},...e?.options??{}},e?.intlayerConfiguration??n),t[0]=n,t[1]=r,t[2]=e?.intlayerConfiguration,t[3]=e?.options,t[4]=i):i=t[4],i},GO=e=>{let t=(0,g.c)(2),n=yT(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=VO(r),t[0]=r,t[1]=i),i},KO=e=>{let t=(0,g.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=yT(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=UO(o),l=c?c.user:s?.user,u=c?c.organization:s?.organization,d=c?c.project:s?.project,f=(n?!!l:!0)&&(r?!!d:!0)&&(i?!!u:!0),p;return t[2]===f?p=t[3]:(p={enable:f},t[2]=f,t[3]=p),p},qO=e=>{let t=(0,g.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({requireUser:i,requireProject:r,requireOrganization:n,...a}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o;t[5]!==n||t[6]!==r||t[7]!==i?(o={requireUser:i,requireProject:r,requireOrganization:n},t[5]=n,t[6]=r,t[7]=i,t[8]=o):o=t[8];let{enable:s}=KO(o),c=a?.enabled===!1?!1:s,l;return t[9]!==a||t[10]!==c?(l={enabled:c,...a},t[9]=a,t[10]=c,t[11]=l):l=t[11],Sc(l)},JO=()=>{let e=(0,g.c)(6),t=GO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`logout`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=()=>t.signOut(),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={resetQueries:[[`session`],[`users`],[`organizations`],[`projects`],[`dictionaries`],[`tags`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),Cc(a)},YO=(e,t)=>{let n=(0,g.c)(9),r=WO(),i;n[0]===e?i=n[1]:(i=[`projects`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.project.getProjects(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],qO(o)},XO=()=>{let e=(0,g.c)(6),t=WO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.pushDictionaries(e.dictionaries),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),Cc(a)},ZO=()=>{let e=(0,g.c)(6),t=WO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.deleteDictionary(e.dictionaryId),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),Cc(a)},QO=(e,t)=>{let n=(0,g.c)(9),r=WO(),i;n[0]===e?i=n[1]:(i=[`tags`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.tag.getTags(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],qO(o)},$O=()=>{let e=(0,g.c)(3),t=WO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationMetadata`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationMetadata(e)},e[1]=t,e[2]=r),Cc(r)},ek=()=>{let e=(0,g.c)(3),t=WO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationField`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationField(e)},e[1]=t,e[2]=r),Cc(r)},tk=()=>{let e=(0,g.c)(3),t=WO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={queryKey:n,queryFn:()=>t.editor.getDictionaries()},e[1]=t,e[2]=r),Sc(r)},nk=()=>{let e=(0,g.c)(3),t=WO(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.editor.writeDictionary(e)},e[1]=t,e[2]=r),Cc(r)},rk=(e,t)=>{let n=(0,g.c)(21),r;n[0]!==t||n[1]!==e?(r=()=>{if(t!==void 0){let n=typeof t==`function`?t():t;if(typeof window>`u`)return n;let r=localStorage?.getItem(e);if(r)try{return JSON.parse(r)}catch(e){console.error(e)}return n}},n[0]=t,n[1]=e,n[2]=r):r=n[2];let[i,a]=(0,m.useState)(r),o;n[3]!==t||n[4]!==e||n[5]!==i?(o=()=>{let n=localStorage?.getItem(e);if(n&&n!==`undefined`&&i===void 0)try{a(JSON.parse(n))}catch(e){console.error(e)}else t!==void 0&&i===void 0&&a(t)},n[3]=t,n[4]=e,n[5]=i,n[6]=o):o=n[6];let s;n[7]!==e||n[8]!==i?(s=[e,i],n[7]=e,n[8]=i,n[9]=s):s=n[9],(0,m.useEffect)(o,s);let c;n[10]===e?c=n[11]:(c=t=>{a(n=>{let r=typeof t==`function`?t(n):t;return r===void 0?n:(localStorage?.setItem(e,JSON.stringify(r)),r)})},n[10]=e,n[11]=c);let l=c,u;n[12]===e?u=n[13]:(u=()=>{let t=localStorage?.getItem(e);t&&a(JSON.parse(t))},n[12]=e,n[13]=u);let d=u,f;n[14]===e?f=n[15]:(f=()=>{localStorage?.removeItem(e),a(void 0)},n[14]=e,n[15]=f);let p=f,h;return n[16]!==p||n[17]!==d||n[18]!==l||n[19]!==i?(h=[i,l,d,p],n[16]=p,n[17]=d,n[18]=l,n[19]=i,n[20]=h):h=n[20],h},ik=(0,m.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),ak=()=>(0,m.useContext)(ik),ok=e=>{let t=(0,g.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=br(),o;t[0]!==r||t[1]!==a?(o=r??[a],t[0]=r,t[1]=a,t[2]=o):o=t[2];let[s,c]=rk(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,C.jsx)(ik,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[3]=n,t[4]=i,t[5]=s,t[6]=c,t[7]=l):l=t[7],l},sk=e=>{let t=(0,g.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,m.useState)(n),[u,d]=(0,m.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(ck)},t[0]=n,t[1]=p);let h=p,_;t[2]!==c||t[3]!==r?(_=()=>{r(c)},t[2]=c,t[3]=r,t[4]=_):_=t[4];let v=_,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{l(e.currentTarget.value)},t[5]=y):y=t[5];let b=y,x=e=>{e.key===`Enter`&&!i&&T?(e.preventDefault(),v()):e.key===`Escape`&&(e.preventDefault(),h())},S,w;t[6]===n?(S=t[7],w=t[8]):(S=()=>{l(n),d(lk)},w=[n],t[6]=n,t[7]=S,t[8]=w),(0,m.useEffect)(S,w);let T=a?.(c)??!0;return(0,C.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,C.jsx)(MT,{onChange:b,onKeyDown:x,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!T,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,C.jsxs)(`div`,{id:`content-editor-input-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[f&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(tw,{Icon:hf,label:`Save changes${T?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!T,onClick:v,"aria-describedby":T?void 0:`validation-error`}),(0,C.jsx)(tw,{Icon:Bf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:h,disabled:i})]}),o]})]},String(n))};function ck(e){return e+1}function lk(e){return e+1}var uk=()=>{let e=(0,g.c)(9),{session:t,revalidateSession:n,setSession:r}=UO(),{mutate:i}=JO(),a=t?.user?`authenticated`:`unauthenticated`,o=a===`authenticated`,s=a===`unauthenticated`,c=t?.user,l;e[0]!==i||e[1]!==r?(l=async()=>{r(null),i()},e[0]=i,e[1]=r,e[2]=l):l=e[2];let u=l,d;return e[3]!==o||e[4]!==s||e[5]!==u||e[6]!==n||e[7]!==c?(d={isAuthenticated:o,isUnauthenticated:s,user:c,revalidateSession:n,logout:u},e[3]=o,e[4]=s,e[5]=u,e[6]=n,e[7]=c,e[8]=d):d=e[8],d},dk=``,fk=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(dk).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===dk?``:t.split(dk).join(``)}).join(`
|
|
62
62
|
`)},pk=e=>{let t=e.split(`
|
|
@@ -73,7 +73,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
73
73
|
`),i=n.slice(t.start,t.end);e.clipboardData.setData(`text/plain`,i),y(n.slice(0,t.start)+n.slice(t.end),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(`
|
|
74
74
|
`);y(i.slice(0,n.start)+t+i.slice(n.end),n.start+t.length)},handleDrop:e=>{e.preventDefault()},handleDragOver:e=>{e.preventDefault()},getCaretPosition:f,setCaretPosition:h,getCursorOffset:v,caretFromFlatOffset:_}},Sk=({index:e,text:t,isLast:n,ghostText:r})=>(0,C.jsxs)(`span`,{"data-line":e,className:`block min-h-[1.5rem]`,children:[(0,C.jsx)(`span`,{"data-editable":!0,children:t||``}),r&&(0,C.jsx)(`span`,{"data-ghost":!0,className:`pointer-events-none select-none text-neutral`,"aria-hidden":`true`,children:r}),!n&&(0,C.jsx)(`br`,{})]}),Ck=24,wk=12,Tk=({value:e,defaultValue:t,onChange:n,placeholder:r,disabled:i=!1,minRows:a=1,maxRows:o=999,autoSize:s=!0,validationStyleEnabled:c=!1,variant:l,ghostText:u,ghostLine:d,ghostOffset:f,onClick:p,className:h,dir:g=`auto`,ref:_,...v})=>{let{lines:y,containerRef:b,getText:x,handleInput:S,handleBeforeInput:w,handleKeyDown:T,handleCut:E,handlePaste:D,handleDrop:O,handleDragOver:k,getCursorOffset:A,setCaretPosition:j,caretFromFlatOffset:M}=xk({value:e,defaultValue:t,onChange:n,disabled:i}),N=(0,m.useRef)(null),P=e=>{N.current=e,b.current=e};(0,m.useImperativeHandle)(_,()=>({getContainer:()=>N.current,getText:x,focus:()=>N.current?.focus(),getCursorOffset:A,setCursorAtOffset:e=>{j(M(e,y))}})),(0,m.useEffect)(()=>{if(!s||!N.current)return;let e=N.current,t=Ck*o+wk,n=Ck*a+wk;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,s,o,a]);let ee=y.length===1&&y[0]===``,F=u&&d!==void 0&&f!==void 0;return(0,C.jsxs)(`div`,{className:`relative w-full`,children:[ee&&r&&(0,C.jsx)(`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:r}),(0,C.jsx)(`div`,{...v,ref:P,role:`textbox`,"aria-multiline":`true`,"aria-placeholder":r,"aria-disabled":i,"aria-autocomplete":F?`inline`:void 0,tabIndex:i?-1:0,contentEditable:!i,suppressContentEditableWarning:!0,dir:g,onInput:S,onBeforeInput:w,onKeyDown:T,onCut:E,onPaste:D,onDrop:O,onDragOver:k,onClick:p,className:W(`resize-none whitespace-pre-wrap break-words outline-none`,jT({variant:l,validationStyleEnabled:c?`enabled`:`disabled`}),s&&`overflow-y-auto`,h),children:y.map((e,t)=>(0,C.jsx)(Sk,{index:t,text:e,isLast:t===y.length-1,ghostText:F&&d===t?u:void 0},t))})]})},Ek=({isActive:e=!0,suggestion:t,...n})=>{let[r,i]=(0,m.useState)(String(n.value??n.defaultValue??``)),[a,o]=(0,m.useState)(``),s=(0,m.useRef)(null);(0,m.useEffect)(()=>{n.value!==void 0&&i(String(n.value??n.defaultValue??``))},[n.value,n.defaultValue]);let c=()=>{let e=t??a;if(!e)return;let n=s.current?.getCursorOffset()??r.length;i(r.slice(0,n)+e+r.slice(n)),o(``),setTimeout(()=>{s.current?.focus(),s.current?.setCursorAtOffset(n+e.length)},0)},l=e?t??(a||void 0):void 0,u=r.split(`
|
|
75
75
|
`);return(0,C.jsx)(Tk,{ref:s,value:r,onChange:e=>{if(i(e),o(``),n.onChange){let t={target:{value:e},currentTarget:{value:e}};n.onChange(t)}},onKeyDown:e=>{e.key===`Tab`&&(t??a)&&(e.preventDefault(),c()),n.onKeyDown?.(e)},ghostText:l,ghostLine:t?u.length-1:void 0,ghostOffset:t?u[u.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,"aria-label":n[`aria-label`],"aria-invalid":n[`aria-invalid`],"aria-describedby":n[`aria-describedby`],"data-testid":n[`data-testid`]})},Dk=e=>{let t=(0,g.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,{isAuthenticated:c}=uk(),[l,u]=(0,m.useState)(n),[d,f]=(0,m.useState)(0),p=l!==n,h;t[0]===n?h=t[1]:(h=()=>{u(n),f(Ok)},t[0]=n,t[1]=h);let _=h,v;t[2]!==l||t[3]!==r?(v=()=>{r(l)},t[2]=l,t[3]=r,t[4]=v):v=t[4];let y=v,b;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(b=e=>u(e.currentTarget.value??``),t[5]=b):b=t[5];let x=b,S=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&!i&&E?(e.preventDefault(),y()):e.key===`Escape`&&(e.preventDefault(),_())},w,T;t[6]===n?(w=t[7],T=t[8]):(w=()=>{u(n),f(kk)},T=[n],t[6]=n,t[7]=w,t[8]=T),(0,m.useEffect)(w,T);let E=a?.(l)??!0;return(0,C.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor textarea`,children:[(0,C.jsx)(Ek,{onChange:x,onKeyDown:S,variant:`invisible`,className:`size-full`,value:n,isActive:c,disabled:i,"aria-label":`Editable textarea content`,"aria-describedby":p||o?`content-editor-textarea-actions`:void 0,"aria-invalid":!E,...s},d),(p||o)&&(0,C.jsxs)(`div`,{id:`content-editor-textarea-actions`,className:`flex w-full items-center justify-end gap-2`,role:`group`,"aria-label":`Edit actions`,children:[p&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(tw,{Icon:hf,label:`Save changes${E?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!E,onClick:y,"aria-describedby":E?void 0:`textarea-validation-error`}),(0,C.jsx)(tw,{Icon:Bf,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:_,disabled:i})]}),o]})]},n)};function Ok(e){return e+1}function kk(e){return e+1}var Ak=(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},jk=({htmlFor:e,required:t=!1,disabled:n=!1,className:r,children:i,...a})=>(0,C.jsxs)(`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&&(0,C.jsx)(`span`,{className:`ml-1 text-destructive`,"aria-label":`required`,title:`This field is required`,children:`*`})]}),Mk=tf(`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:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-5 hover:bg-current/0 aria-[current]:bg-current/5`,button:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,"button-outlined":`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,hoverable:`block rounded-lg border-none bg-current/0 hover:bg-current/10 aria-[current]:bg-current/5`},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:{primary:`text-primary`,secondary:`text-secondary`,destructive:`text-destructive`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,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 max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 max-md:py-4`},{variant:[`button`,`button-outlined`],color:`primary`,class:`ring-primary/20`},{variant:[`button`,`button-outlined`],color:`secondary`,class:`ring-secondary/20`},{variant:[`button`,`button-outlined`],color:`destructive`,class:`ring-destructive/20`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`light`,class:`ring-white/20`},{variant:[`button`,`button-outlined`],color:`dark`,class:`ring-neutral-800/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:`md`}}),Nk=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},Pk=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(Pk):(0,m.isValidElement)(e)?Pk(e.props.children):!1,Fk=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,...m}=e,h=d??Nk(e),g=f??p?.startsWith(`#`)??!1,_=Pk(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`;return(0,C.jsxs)(`a`,{href:l&&p&&!h&&!g?tr(p,l):p,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(Mk({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,C.jsx)(`span`,{children:i}):i,h&&_&&(0,C.jsx)(wf,{className:`ml-2 inline-block size-4`}),g&&(0,C.jsx)(Af,{className:`ml-2 inline-block size-4`})]})},Ik=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,Lk=`after:content-['#'] after:scale-75 after:px-6 after:text-neutral after:absolute after:top-0 after:h-full after:-left-12 after:absolute after:to-neutral after:md:opacity-0 after:transition-opacity hover:after:opacity-80 after:duration-200 after:delay-100`,Rk=({className:e,...t})=>(0,C.jsx)(`h1`,{className:W(`font-bold text-2xl`,e),...t}),zk=({className:e,...t})=>(0,C.jsx)(`h2`,{className:W(`mb-2 font-bold text-2xl`,Ik,e),...t}),Bk=({className:e,...t})=>(0,C.jsx)(`h3`,{className:W(`mb-2 font-bold text-xl`,Ik,e),...t}),Vk=({className:e,...t})=>(0,C.jsx)(`h4`,{className:W(`font-bold text-lg`,Ik,e),...t}),Hk=({className:e,...t})=>(0,C.jsx)(`h5`,{className:W(`font-bold text-base`,Ik,e),...t}),Uk=({className:e,...t})=>(0,C.jsx)(`h6`,{className:W(`ml-3 font-bold text-base`,Ik,e),...t}),Wk=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Gk=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Kk=(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},qk=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Wk(t):void 0;return(0,C.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Kk(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Gk(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:W(r&&Lk,n),...i,children:t})},Jk=({isClickable:e,...t})=>(0,C.jsx)(Rk,{...t}),Yk=({isClickable:e=!1,...t})=>(0,C.jsx)(qk,{H:zk,isClickable:e,...t}),Xk=({isClickable:e=!1,...t})=>(0,C.jsx)(qk,{H:Bk,isClickable:e,...t}),Zk=({isClickable:e=!1,...t})=>(0,C.jsx)(qk,{H:Vk,isClickable:e,...t}),Qk=({isClickable:e=!1,...t})=>(0,C.jsx)(qk,{H:Hk,isClickable:e,...t}),$k=({isClickable:e=!1,...t})=>(0,C.jsx)(qk,{H:Uk,isClickable:e,...t}),eA=(0,m.createContext)({packageManager:`npm`,setPackageManager:()=>{},codeFormat:`typescript`,setCodeFormat:()=>{},contentDeclarationFormat:`typescript`,setContentDeclarationFormat:()=>{}}),tA=()=>(0,m.useContext)(eA),nA=e=>{let t=(0,g.c)(8),{children:n}=e,[r,i]=rk(`packageManager`,`npm`),[a,o]=rk(`codeFormat`,`typescript`),[s,c]=rk(`contentDeclarationFormat`,`typescript`),l;return t[0]!==n||t[1]!==a||t[2]!==s||t[3]!==r||t[4]!==o||t[5]!==c||t[6]!==i?(l=(0,C.jsx)(eA,{value:{packageManager:r,setPackageManager:i,codeFormat:a,setCodeFormat:o,contentDeclarationFormat:s,setContentDeclarationFormat:c},children:n}),t[0]=n,t[1]=a,t[2]=s,t[3]=r,t[4]=o,t[5]=c,t[6]=i,t[7]=l):l=t[7],l},rA={key:`expand-collapse`,content:{nodeType:`translation`,translation:{en:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},"en-GB":{expandCollapseContent:{nodeType:`condition`,condition:{true:`Show all`,false:`Show less`}}},fr:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Afficher tout`,false:`Afficher moins`}}},es:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar todo`,false:`Mostrar menos`}}},de:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mehr anzeigen`,false:`Weniger anzeigen`}}},ja:{expandCollapseContent:{nodeType:`condition`,condition:{true:`すべて表示`,false:`表示を減らす`}}},ko:{expandCollapseContent:{nodeType:`condition`,condition:{true:`모두 보기`,false:`간략히 보기`}}},zh:{expandCollapseContent:{nodeType:`condition`,condition:{true:`显示全部`,false:`显示较少`}}},it:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostra tutto`,false:`Mostra meno`}}},pt:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Mostrar tudo`,false:`Mostrar menos`}}},hi:{expandCollapseContent:{nodeType:`condition`,condition:{true:`सभी दिखाएँ`,false:`कम दिखाएँ`}}},ar:{expandCollapseContent:{nodeType:`condition`,condition:{true:`عرض الكل`,false:`عرض أقل`}}},ru:{expandCollapseContent:{nodeType:`condition`,condition:{true:`Показать все`,false:`Показать меньше`}}}}},localIds:[`expand-collapse::local::../@intlayer/design-system/dist/esm/components/ExpandCollapse/expandCollapse.content.mjs`]},iA=700,aA=({isRollable:e=!0,minHeight:t=iA,children:n,className:r})=>{let[i,a]=(0,m.useState)(0),[o,s]=(0,m.useState)(!0),c=(0,m.useRef)(null),{expandCollapseContent:l}=yr(rA),u=i>t;return(0,m.useEffect)(()=>{let e=()=>{c.current&&a(c.current.clientHeight)};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[n]),e?u?(0,C.jsxs)(nw,{isHidden:o,minHeight:t,className:`w-full overflow-x-auto overflow-y-hidden`,children:[(0,C.jsx)(`div`,{className:W(`grid w-full`,r),ref:c,children:n}),(0,C.jsx)(`button`,{className:W(`absolute right-0 bottom-0 flex w-full cursor-pointer items-center justify-center rounded-t-2xl bg-gradient-to-t from-card/80 to-transparent px-3 py-0.5 text-md text-neutral-700 shadow-[0_0_10px_-15px_rgba(0,0,0,0.3)] backdrop-blur transition-all duration-300 hover:py-1 dark:text-neutral-400`,o?`w-full`:`w-32`),type:`button`,onClick:()=>s(e=>!e),children:l(o)})]}):(0,C.jsx)(`div`,{className:W(`grid w-full`,r),ref:c,children:n}):n},oA=({children:e})=>(0,C.jsx)(`div`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,C.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden`,children:(0,C.jsx)(`code`,{children:typeof e==`string`?e.split(`
|
|
76
|
-
`).map((e,t)=>(0,C.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),sA=(0,m.lazy)(()=>Ln(()=>import(`./CodeBlockShiki-tYuBsb-D.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1,2]))),cA=({className:e,onChange:t,isEditable:n,children:r,lang:i,isDarkMode:a,...o})=>(0,C.jsx)(`div`,{className:W(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:(0,C.jsx)(m.Suspense,{fallback:(0,C.jsx)(oA,{children:r}),children:(0,C.jsx)(sA,{lang:i,isDarkMode:a,children:r})})}),lA=e=>{switch(e){case`jsx`:return`tsx`;case`mjs`:case`cjs`:return`javascript`;default:return e}},uA=({children:e,originalLang:t,targetFormat:n,isDarkMode:r})=>{let[i,a]=(0,m.useState)(null),o=(0,m.useRef)(null);(0,m.useEffect)(()=>{let i=!1;return(async()=>{try{let s=e,c=lA(t);if(n!==`typescript`){let{transformCode:r,deriveLanguage:a}=await Ln(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-jT7tvqvu.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;s=r(String(e),n),c=lA(a(t,n))}let{codeToHtml:l}=await Ln(async()=>{let{codeToHtml:e}=await import(`./bundle-web-DUmOj0Jn.js`);return{codeToHtml:e}},__vite__mapDeps([3,1]));if(i)return;let u=await l(String(s),{lang:c,theme:r?`github-dark`:`github-light`});i||(o.current=u,a(u))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,C.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,C.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,C.jsx)(`code`,{children:e})})},dA=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},fA=e=>{let t=(0,g.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=tA(),s=r.packageManager===void 0,c=i===r.packageManager,l=dA(r.codeFormat),u=l===void 0,d=l?l.includes(a):!1,f=dA(r.contentDeclarationFormat),p=f===void 0,m=f?f.includes(o):!1;if((s||c)&&(u||d)&&(p||m))return n;let h;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,C.jsx)(C.Fragment,{}),t[0]=h):h=t[0],h},pA={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]};function mA(e,[t,n]){return Math.min(n,Math.max(t,e))}var hA=m.createContext(void 0);function gA(e){let t=m.useContext(hA);return e||t||`ltr`}var _A=0;function vA(){m.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??yA()),document.body.insertAdjacentElement(`beforeend`,e[1]??yA()),_A++,()=>{_A===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),_A--}},[])}function yA(){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}var bA=`focusScope.autoFocusOnMount`,xA=`focusScope.autoFocusOnUnmount`,SA={bubbles:!1,cancelable:!0},CA=`FocusScope`,wA=m.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=Tu(i),u=Tu(a),d=m.useRef(null),f=du(t,e=>c(e)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:jA(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||jA(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&jA(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),m.useEffect(()=>{if(s){MA.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(bA,SA);s.addEventListener(bA,l),s.dispatchEvent(t),t.defaultPrevented||(TA(FA(DA(s)),{select:!0}),document.activeElement===e&&jA(s))}return()=>{s.removeEventListener(bA,l),setTimeout(()=>{let t=new CustomEvent(xA,SA);s.addEventListener(xA,u),s.dispatchEvent(t),t.defaultPrevented||jA(e??document.body,{select:!0}),s.removeEventListener(xA,u),MA.remove(p)},0)}}},[s,l,u,p]);let h=m.useCallback(e=>{if(!n&&!r||p.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]=EA(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&jA(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&jA(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,C.jsx)(Cu.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})});wA.displayName=CA;function TA(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(jA(r,{select:t}),document.activeElement!==n)return}function EA(e){let t=DA(e);return[OA(t,e),OA(t.reverse(),e)]}function DA(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode: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}});for(;n.nextNode();)t.push(n.currentNode);return t}function OA(e,t){for(let n of e)if(!kA(n,{upTo:t}))return n}function kA(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function AA(e){return e instanceof HTMLInputElement&&`select`in e}function jA(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&AA(e)&&t&&e.select()}}var MA=NA();function NA(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=PA(e,t),e.unshift(t)},remove(t){e=PA(e,t),e[0]?.resume()}}}function PA(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function FA(e){return e.filter(e=>e.tagName!==`A`)}var IA=m.useId||(()=>void 0),LA=0;function RA(e){let[t,n]=m.useState(IA());return Hu(()=>{e||n(e=>e??String(LA++))},[e]),e||(t?`radix-${t}`:``)}var zA=[`top`,`right`,`bottom`,`left`],BA=Math.min,VA=Math.max,HA=Math.round,UA=Math.floor,WA=e=>({x:e,y:e}),GA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function KA(e,t,n){return VA(e,BA(t,n))}function qA(e,t){return typeof e==`function`?e(t):e}function JA(e){return e.split(`-`)[0]}function YA(e){return e.split(`-`)[1]}function XA(e){return e===`x`?`y`:`x`}function ZA(e){return e===`y`?`height`:`width`}function QA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $A(e){return XA(QA(e))}function ej(e,t,n){n===void 0&&(n=!1);let r=YA(e),i=$A(e),a=ZA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=lj(o)),[o,lj(o)]}function tj(e){let t=lj(e);return[nj(e),t,nj(t)]}function nj(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var rj=[`left`,`right`],ij=[`right`,`left`],aj=[`top`,`bottom`],oj=[`bottom`,`top`];function sj(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ij:rj:t?rj:ij;case`left`:case`right`:return t?aj:oj;default:return[]}}function cj(e,t,n,r){let i=YA(e),a=sj(JA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(nj)))),a}function lj(e){let t=JA(e);return GA[t]+e.slice(t.length)}function uj(e){return{top:0,right:0,bottom:0,left:0,...e}}function dj(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:uj(e)}function fj(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 pj(e,t,n){let{reference:r,floating:i}=e,a=QA(t),o=$A(t),s=ZA(o),c=JA(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}}switch(YA(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function mj(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}=qA(t,e),p=dj(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=fj(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=fj(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 hj=50,gj=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:mj},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=pj(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<hj&&(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}=pj(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},_j=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}=qA(e,t)||{};if(l==null)return{};let d=dj(u),f={x:n,y:r},p=$A(i),m=ZA(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=BA(d[_],T),D=BA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=KA(O,A,k),M=!c.arrow&&YA(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),vj=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}=qA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=JA(r),_=QA(o),v=JA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[lj(o)]:tj(o)),x=p!==`none`;!d&&x&&b.push(...cj(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=ej(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`&&_!==QA(t))||T.every(e=>QA(e.placement)===_?e.overflows[0]>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=QA(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;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function yj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bj(e){return zA.some(t=>e[t]>=0)}var xj=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=qA(e,t);switch(i){case`referenceHidden`:{let e=yj(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:bj(e)}}}case`escaped`:{let e=yj(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:bj(e)}}}default:return{}}}}},Sj=new Set([`left`,`top`]);async function Cj(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=JA(n),s=YA(n),c=QA(n)===`y`,l=Sj.has(o)?-1:1,u=a&&c?-1:1,d=qA(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 wj=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 Cj(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}}}}},Tj=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}=qA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=QA(JA(i)),p=XA(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=KA(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=KA(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ej=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}=qA(e,t),u={x:n,y:r},d=QA(i),f=XA(d),p=u[f],m=u[d],h=qA(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};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=Sj.has(JA(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}}}},Dj=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=qA(e,t),u=await o.detectOverflow(t,l),d=JA(i),f=YA(i),p=QA(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=BA(h-u[g],v),x=BA(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=VA(u.left,0),t=VA(u.right,0),n=VA(u.top,0),r=VA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:VA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:VA(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Oj(){return typeof window<`u`}function kj(e){return Mj(e)?(e.nodeName||``).toLowerCase():`#document`}function Aj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jj(e){return((Mj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Mj(e){return Oj()?e instanceof Node||e instanceof Aj(e).Node:!1}function Nj(e){return Oj()?e instanceof Element||e instanceof Aj(e).Element:!1}function Pj(e){return Oj()?e instanceof HTMLElement||e instanceof Aj(e).HTMLElement:!1}function Fj(e){return!Oj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Aj(e).ShadowRoot}function Ij(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Lj(e){return/^(table|td|th)$/.test(kj(e))}function Rj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var zj=/transform|translate|scale|rotate|perspective|filter/,Bj=/paint|layout|strict|content/,Vj=e=>!!e&&e!==`none`,Hj;function Uj(e){let t=Nj(e)?qj(e):e;return Vj(t.transform)||Vj(t.translate)||Vj(t.scale)||Vj(t.rotate)||Vj(t.perspective)||!Gj()&&(Vj(t.backdropFilter)||Vj(t.filter))||zj.test(t.willChange||``)||Bj.test(t.contain||``)}function Wj(e){let t=Yj(e);for(;Pj(t)&&!Kj(t);){if(Uj(t))return t;if(Rj(t))return null;t=Yj(t)}return null}function Gj(){return Hj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Hj}function Kj(e){return/^(html|body|#document)$/.test(kj(e))}function qj(e){return Aj(e).getComputedStyle(e)}function Jj(e){return Nj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yj(e){if(kj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Fj(e)&&e.host||jj(e);return Fj(t)?t.host:t}function Xj(e){let t=Yj(e);return Kj(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pj(t)&&Ij(t)?t:Xj(t)}function Zj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Xj(e),i=r===e.ownerDocument?.body,a=Aj(r);if(i){let e=Qj(a);return t.concat(a,a.visualViewport||[],Ij(r)?r:[],e&&n?Zj(e):[])}else return t.concat(r,Zj(r,[],n))}function Qj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $j(e){let t=qj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Pj(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=HA(n)!==a||HA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function eM(e){return Nj(e)?e:e.contextElement}function tM(e){let t=eM(e);if(!Pj(t))return WA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$j(t),o=(a?HA(n.width):n.width)/r,s=(a?HA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var nM=WA(0);function rM(e){let t=Aj(e);return!Gj()||!t.visualViewport?nM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Aj(e)?!1:t}function aM(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=eM(e),o=WA(1);t&&(r?Nj(r)&&(o=tM(r)):o=tM(e));let s=iM(a,n,r)?rM(a):WA(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){let e=Aj(a),t=r&&Nj(r)?Aj(r):r,n=e,i=Qj(n);for(;i&&r&&t!==n;){let e=tM(i),t=i.getBoundingClientRect(),r=qj(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=Aj(i),i=Qj(n)}}return fj({width:u,height:d,x:c,y:l})}function oM(e,t){let n=Jj(e).scrollLeft;return t?t.left+n:aM(jj(e)).left+n}function sM(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-oM(e,n),y:n.top+t.scrollTop}}function cM(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=jj(r),s=t?Rj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=WA(1),u=WA(0),d=Pj(r);if((d||!d&&!a)&&((kj(r)!==`body`||Ij(o))&&(c=Jj(r)),d)){let e=aM(r);l=tM(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sM(o,c):WA(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 lM(e){return Array.from(e.getClientRects())}function uM(e){let t=jj(e),n=Jj(e),r=e.ownerDocument.body,i=VA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=VA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+oM(e),s=-n.scrollTop;return qj(r).direction===`rtl`&&(o+=VA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var dM=25;function fM(e,t){let n=Aj(e),r=jj(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Gj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=oM(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=dM&&(a-=o)}else l<=dM&&(a+=l);return{width:a,height:o,x:s,y:c}}function pM(e,t){let n=aM(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Pj(e)?tM(e):WA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mM(e,t,n){let r;if(t===`viewport`)r=fM(e,n);else if(t===`document`)r=uM(jj(e));else if(Nj(t))r=pM(t,n);else{let n=rM(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fj(r)}function hM(e,t){let n=Yj(e);return n===t||!Nj(n)||Kj(n)?!1:qj(n).position===`fixed`||hM(n,t)}function gM(e,t){let n=t.get(e);if(n)return n;let r=Zj(e,[],!1).filter(e=>Nj(e)&&kj(e)!==`body`),i=null,a=qj(e).position===`fixed`,o=a?Yj(e):e;for(;Nj(o)&&!Kj(o);){let t=qj(o),n=Uj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ij(o)&&!n&&hM(e,o))?r=r.filter(e=>e!==o):i=t,o=Yj(o)}return t.set(e,r),r}function _M(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Rj(t)?[]:gM(t,this._c):[].concat(n),r],o=mM(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=mM(t,a[e],i);s=VA(n.top,s),c=BA(n.right,c),l=BA(n.bottom,l),u=VA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function vM(e){let{width:t,height:n}=$j(e);return{width:t,height:n}}function yM(e,t,n){let r=Pj(t),i=jj(t),a=n===`fixed`,o=aM(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=WA(0);function l(){c.x=oM(i)}if(r||!r&&!a)if((kj(t)!==`body`||Ij(i))&&(s=Jj(t)),r){let e=aM(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?sM(i,s):WA(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function bM(e){return qj(e).position===`static`}function xM(e,t){if(!Pj(e)||qj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return jj(e)===n&&(n=n.ownerDocument.body),n}function SM(e,t){let n=Aj(e);if(Rj(e))return n;if(!Pj(e)){let t=Yj(e);for(;t&&!Kj(t);){if(Nj(t)&&!bM(t))return t;t=Yj(t)}return n}let r=xM(e,t);for(;r&&Lj(r)&&bM(r);)r=xM(r,t);return r&&Kj(r)&&bM(r)&&!Uj(r)?n:r||Wj(e)||n}var CM=async function(e){let t=this.getOffsetParent||SM,n=this.getDimensions,r=await n(e.floating);return{reference:yM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wM(e){return qj(e).direction===`rtl`}var TM={convertOffsetParentRelativeRectToViewportRelativeRect:cM,getDocumentElement:jj,getClippingRect:_M,getOffsetParent:SM,getElementRects:CM,getClientRects:lM,getDimensions:vM,getScale:tM,isElement:Nj,isRTL:wM};function EM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function DM(e,t){let n=null,r,i=jj(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=UA(d),h=UA(i.clientWidth-(u+f)),g=UA(i.clientHeight-(d+p)),_=UA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:VA(0,BA(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!EM(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function OM(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=eM(e),u=i||a?[...l?Zj(l):[],...t?Zj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?DM(l,n):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?aM(e):null;c&&g();function g(){let t=aM(e);h&&!EM(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 kM=wj,AM=Tj,jM=vj,MM=Dj,NM=xj,PM=_j,FM=Ej,IM=(e,t,n)=>{let r=new Map,i={platform:TM,...n},a={...i.platform,_c:r};return gj(e,t,{...i,platform:a})},LM=typeof document<`u`?m.useLayoutEffect:function(){};function RM(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(!RM(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)&&!RM(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function zM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function BM(e,t){let n=zM(e);return Math.round(t*n)/n}function VM(e){let t=m.useRef(e);return LM(()=>{t.current=e}),t}function HM(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);RM(f,r)||p(r);let[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=m.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=m.useRef(null),w=m.useRef(null),T=m.useRef(u),E=c!=null,D=VM(c),O=VM(i),k=VM(l),A=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),IM(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!RM(T.current,t)&&(T.current=t,Su.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);LM(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=m.useRef(!1);LM(()=>(j.current=!0,()=>{j.current=!1}),[]),LM(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=m.useMemo(()=>({reference:x,floating:S}),[x,S]),P=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=BM(N.floating,u.x),r=BM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...zM(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var UM=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?{}:PM({element:r.current,padding:i}).fn(n):r?PM({element:r,padding:i}).fn(n):{}}}},WM=(e,t)=>{let n=kM(e);return{name:n.name,fn:n.fn,options:[e,t]}},GM=(e,t)=>{let n=AM(e);return{name:n.name,fn:n.fn,options:[e,t]}},KM=(e,t)=>({fn:FM(e).fn,options:[e,t]}),qM=(e,t)=>{let n=jM(e);return{name:n.name,fn:n.fn,options:[e,t]}},JM=(e,t)=>{let n=MM(e);return{name:n.name,fn:n.fn,options:[e,t]}},YM=(e,t)=>{let n=NM(e);return{name:n.name,fn:n.fn,options:[e,t]}},XM=(e,t)=>{let n=UM(e);return{name:n.name,fn:n.fn,options:[e,t]}},ZM=`Arrow`,QM=m.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,C.jsx)(Cu.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,C.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});QM.displayName=ZM;var $M=QM;function eN(e){let[t,n]=m.useState(void 0);return Hu(()=>{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)}else n(void 0)},[e]),t}var tN=`Popper`,[nN,rN]=pu(tN),[iN,aN]=nN(tN),oN=e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null);return(0,C.jsx)(iN,{scope:t,anchor:r,onAnchorChange:i,children:n})};oN.displayName=tN;var sN=`PopperAnchor`,cN=m.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=aN(sN,n),o=m.useRef(null),s=du(t,o),c=m.useRef(null);return m.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,C.jsx)(Cu.div,{...i,ref:s})});cN.displayName=sN;var lN=`PopperContent`,[uN,dN]=nN(lN),fN=m.forwardRef((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:h,...g}=e,_=aN(lN,n),[v,y]=m.useState(null),b=du(t,e=>y(e)),[x,S]=m.useState(null),w=eN(x),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(gN),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:ee,middlewareData:F}=HM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>OM(...e,{animationFrame:p===`always`}),elements:{reference:_.anchor},middleware:[WM({mainAxis:i+E,alignmentAxis:o}),c&&GM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?KM():void 0,...j}),c&&qM({...j}),JM({...j,apply:({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`)}}),x&&XM({element:x,padding:s}),_N({arrowWidth:T,arrowHeight:E}),f&&YM({strategy:`referenceHidden`,...j})]}),[I,te]=vN(P),ne=Tu(h);Hu(()=>{ee&&ne?.()},[ee,ne]);let re=F.arrow?.x,L=F.arrow?.y,R=F.arrow?.centerOffset!==0,[z,ie]=m.useState();return Hu(()=>{v&&ie(window.getComputedStyle(v).zIndex)},[v]),(0,C.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:ee?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,C.jsx)(uN,{scope:n,placedSide:I,onArrowChange:S,arrowX:re,arrowY:L,shouldHideArrow:R,children:(0,C.jsx)(Cu.div,{"data-side":I,"data-align":te,...g,ref:b,style:{...g.style,animation:ee?void 0:`none`}})})})});fN.displayName=lN;var pN=`PopperArrow`,mN={top:`bottom`,right:`left`,bottom:`top`,left:`right`},hN=m.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=dN(pN,n),a=mN[i.placedSide];return(0,C.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,C.jsx)($M,{...r,ref:t,style:{...r.style,display:`block`}})})});hN.displayName=pN;function gN(e){return e!==null}var _N=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]=vN(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}}}});function vN(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var yN=oN,bN=cN,xN=fN,SN=hN;function CN(e){let t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var wN=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},TN=new WeakMap,EN=new WeakMap,DN={},ON=0,kN=function(e){return e&&(e.host||kN(e.parentNode))},AN=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=kN(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})},jN=function(e,t,n,r){var i=AN(t,Array.isArray(e)?e:[e]);DN[n]||(DN[n]=new WeakMap);var a=DN[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=(TN.get(e)||0)+1,l=(a.get(e)||0)+1;TN.set(e,c),a.set(e,l),o.push(e),c===1&&i&&EN.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(),ON++,function(){o.forEach(function(e){var t=TN.get(e)-1,i=a.get(e)-1;TN.set(e,t),a.set(e,i),t||(EN.has(e)||e.removeAttribute(r),EN.delete(e)),i||e.removeAttribute(n)}),ON--,ON||(TN=new WeakMap,TN=new WeakMap,EN=new WeakMap,DN={})}},MN=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||wN(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),jN(r,i,n,`aria-hidden`)):function(){return null}},NN=function(){return NN=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},NN.apply(this,arguments)};function PN(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 FN(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 IN=`right-scroll-bar-position`,LN=`width-before-scroll-bar`,RN=`with-scroll-bars-hidden`,zN=`--removed-body-scroll-bar-size`;function BN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function VN(e,t){var n=(0,m.useState)(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}var HN=typeof window<`u`?m.useLayoutEffect:m.useEffect,UN=new WeakMap;function WN(e,t){var n=VN(t||null,function(t){return e.forEach(function(e){return BN(e,t)})});return HN(function(){var t=UN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||BN(e,null)}),i.forEach(function(e){r.has(e)||BN(e,a)})}UN.set(n,e)},[e]),n}function GN(e){return e}function KN(e,t){t===void 0&&(t=GN);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 qN(e){e===void 0&&(e={});var t=KN(null);return t.options=NN({async:!0,ssr:!1},e),t}var JN=function(e){var t=e.sideCar,n=PN(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 m.createElement(r,NN({},n))};JN.isSideCarExport=!0;function YN(e,t){return e.useMedium(t),JN}var XN=qN(),ZN=function(){},QN=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:ZN,onWheelCapture:ZN,onTouchMoveCapture:ZN}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=PN(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=WN([n,t]),w=NN(NN({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:XN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),NN(NN({},w),{ref:C})):m.createElement(y,NN({},w,{className:c,ref:C}),s))});QN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},QN.classNames={fullWidth:LN,zeroRight:IN};var $N,eP=function(){if($N)return $N;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function tP(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=eP();return t&&e.setAttribute(`nonce`,t),e}function nP(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rP(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var iP=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tP())&&(nP(t,n),rP(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aP=function(){var e=iP();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oP=function(){var e=aP();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},sP={left:0,top:0,right:0,gap:0},cP=function(e){return parseInt(e||``,10)||0},lP=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[cP(n),cP(r),cP(i)]},uP=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return sP;var t=lP(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])}},dP=oP(),fP=`data-scroll-locked`,pP=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
76
|
+
`).map((e,t)=>(0,C.jsx)(`span`,{className:`line block w-full`,children:e},`line-${t}-${e.slice(0,10)}`)):e})})}),sA=(0,m.lazy)(()=>Ln(()=>import(`./CodeBlockShiki-D0C6rZyp.js`).then(e=>({default:e.CodeBlockShiki})),__vite__mapDeps([0,1,2]))),cA=({className:e,onChange:t,isEditable:n,children:r,lang:i,isDarkMode:a,...o})=>(0,C.jsx)(`div`,{className:W(`flex w-full min-w-0 max-w-full overflow-x-auto`,e),...o,children:(0,C.jsx)(m.Suspense,{fallback:(0,C.jsx)(oA,{children:r}),children:(0,C.jsx)(sA,{lang:i,isDarkMode:a,children:r})})}),lA=e=>{switch(e){case`jsx`:return`tsx`;case`mjs`:case`cjs`:return`javascript`;default:return e}},uA=({children:e,originalLang:t,targetFormat:n,isDarkMode:r})=>{let[i,a]=(0,m.useState)(null),o=(0,m.useRef)(null);(0,m.useEffect)(()=>{let i=!1;return(async()=>{try{let s=e,c=lA(t);if(n!==`typescript`){let{transformCode:r,deriveLanguage:a}=await Ln(async()=>{let{transformCode:e,deriveLanguage:t}=await import(`./codeTransformer-jT7tvqvu.js`);return{transformCode:e,deriveLanguage:t}},[]);if(i)return;s=r(String(e),n),c=lA(a(t,n))}let{codeToHtml:l}=await Ln(async()=>{let{codeToHtml:e}=await import(`./bundle-web-DXOHBgb_.js`);return{codeToHtml:e}},__vite__mapDeps([3,1]));if(i)return;let u=await l(String(s),{lang:c,theme:r?`github-dark`:`github-light`});i||(o.current=u,a(u))}catch{i||a(``)}})(),()=>{i=!0}},[e,t,n,r]);let s=i??o.current;return s?(0,C.jsx)(`div`,{dangerouslySetInnerHTML:{__html:s},style:{backgroundColor:`transparent`}}):(0,C.jsx)(`pre`,{className:`min-w-0 max-w-full overflow-x-auto`,children:(0,C.jsx)(`code`,{children:e})})},dA=e=>{if(e!=null){if(Array.isArray(e))return e;if(typeof e==`string`&&e.startsWith(`[`))try{let t=JSON.parse(e);if(Array.isArray(t))return t}catch{}return[e]}},fA=e=>{let t=(0,g.c)(1),{children:n,...r}=e,{packageManager:i,codeFormat:a,contentDeclarationFormat:o}=tA(),s=r.packageManager===void 0,c=i===r.packageManager,l=dA(r.codeFormat),u=l===void 0,d=l?l.includes(a):!1,f=dA(r.contentDeclarationFormat),p=f===void 0,m=f?f.includes(o):!1;if((s||c)&&(u||d)&&(p||m))return n;let h;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,C.jsx)(C.Fragment,{}),t[0]=h):h=t[0],h},pA={key:`code-selectors`,content:{nodeType:`translation`,translation:{en:{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},"en-GB":{packageManager:{placeholder:`Package Manager`,label:`Select package manager`},codeFormat:{placeholder:`Code Format`,label:`Select code format`},contentDeclarationFormat:{placeholder:`Dictionary Format`,label:`Select dictionary format`}},fr:{packageManager:{placeholder:`Gestionnaire de paquets`,label:`Sélectionner le gestionnaire de paquets`},codeFormat:{placeholder:`Format de code`,label:`Sélectionner le format de code`},contentDeclarationFormat:{placeholder:`Format de dictionnaire`,label:`Sélectionner le format de dictionnaire`}},es:{packageManager:{placeholder:`Gestor de paquetes`,label:`Seleccionar gestor de paquetes`},codeFormat:{placeholder:`Formato de código`,label:`Seleccionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de diccionario`,label:`Seleccionar formato de diccionario`}},de:{packageManager:{placeholder:`Paketmanager`,label:`Paketmanager auswählen`},codeFormat:{placeholder:`Code-Format`,label:`Code-Format auswählen`},contentDeclarationFormat:{placeholder:`Wörterbuchformat`,label:`Wörterbuchformat auswählen`}},ja:{packageManager:{placeholder:`パッケージマネージャー`,label:`パッケージマネージャーを選択`},codeFormat:{placeholder:`コード形式`,label:`コード形式を選択`},contentDeclarationFormat:{placeholder:`辞書形式`,label:`辞書形式を選択`}},ko:{packageManager:{placeholder:`패키지 관리자`,label:`패키지 관리자 선택`},codeFormat:{placeholder:`코드 형식`,label:`코드 형식 선택`},contentDeclarationFormat:{placeholder:`사전 형식`,label:`사전 형식 선택`}},zh:{packageManager:{placeholder:`包管理器`,label:`选择包管理器`},codeFormat:{placeholder:`代码格式`,label:`选择代码格式`},contentDeclarationFormat:{placeholder:`字典格式`,label:`选择字典格式`}},it:{packageManager:{placeholder:`Gestore dei pacchetti`,label:`Seleziona il gestore dei pacchetti`},codeFormat:{placeholder:`Formato del codice`,label:`Seleziona il formato del codice`},contentDeclarationFormat:{placeholder:`Formato del dizionario`,label:`Seleziona il formato del dizionario`}},pt:{packageManager:{placeholder:`Gerenciador de pacotes`,label:`Selecionar gerenciador de pacotes`},codeFormat:{placeholder:`Formato de código`,label:`Selecionar formato de código`},contentDeclarationFormat:{placeholder:`Formato de dicionário`,label:`Selecionar formato de dicionário`}},hi:{packageManager:{placeholder:`पैकेज प्रबंधक`,label:`पैकेज प्रबंधक चुनें`},codeFormat:{placeholder:`कोड प्रारूप`,label:`कोड प्रारूप चुनें`},contentDeclarationFormat:{placeholder:`शब्दकोश प्रारूप`,label:`शब्दकोश प्रारूप चुनें`}},ar:{packageManager:{placeholder:`مدير الحزم`,label:`اختر مدير الحزم`},codeFormat:{placeholder:`تنسيق الكود`,label:`اختر تنسيق الكود`},contentDeclarationFormat:{placeholder:`تنسيق القاموس`,label:`اختر تنسيق القاموس`}},ru:{packageManager:{placeholder:`Менеджер пакетов`,label:`Выбрать менеджер пакетов`},codeFormat:{placeholder:`Формат кода`,label:`Выбрать формат кода`},contentDeclarationFormat:{placeholder:`Формат словаря`,label:`Выбрать формат словаря`}}}},localIds:[`code-selectors::local::../@intlayer/design-system/dist/esm/components/IDE/selectors.content.mjs`]};function mA(e,[t,n]){return Math.min(n,Math.max(t,e))}var hA=m.createContext(void 0);function gA(e){let t=m.useContext(hA);return e||t||`ltr`}var _A=0;function vA(){m.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??yA()),document.body.insertAdjacentElement(`beforeend`,e[1]??yA()),_A++,()=>{_A===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),_A--}},[])}function yA(){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}var bA=`focusScope.autoFocusOnMount`,xA=`focusScope.autoFocusOnUnmount`,SA={bubbles:!1,cancelable:!0},CA=`FocusScope`,wA=m.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=m.useState(null),l=Tu(i),u=Tu(a),d=m.useRef(null),f=du(t,e=>c(e)),p=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:jA(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||jA(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&jA(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),m.useEffect(()=>{if(s){MA.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(bA,SA);s.addEventListener(bA,l),s.dispatchEvent(t),t.defaultPrevented||(TA(FA(DA(s)),{select:!0}),document.activeElement===e&&jA(s))}return()=>{s.removeEventListener(bA,l),setTimeout(()=>{let t=new CustomEvent(xA,SA);s.addEventListener(xA,u),s.dispatchEvent(t),t.defaultPrevented||jA(e??document.body,{select:!0}),s.removeEventListener(xA,u),MA.remove(p)},0)}}},[s,l,u,p]);let h=m.useCallback(e=>{if(!n&&!r||p.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]=EA(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&jA(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&jA(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,C.jsx)(Cu.div,{tabIndex:-1,...o,ref:f,onKeyDown:h})});wA.displayName=CA;function TA(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(jA(r,{select:t}),document.activeElement!==n)return}function EA(e){let t=DA(e);return[OA(t,e),OA(t.reverse(),e)]}function DA(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode: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}});for(;n.nextNode();)t.push(n.currentNode);return t}function OA(e,t){for(let n of e)if(!kA(n,{upTo:t}))return n}function kA(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function AA(e){return e instanceof HTMLInputElement&&`select`in e}function jA(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&AA(e)&&t&&e.select()}}var MA=NA();function NA(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=PA(e,t),e.unshift(t)},remove(t){e=PA(e,t),e[0]?.resume()}}}function PA(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function FA(e){return e.filter(e=>e.tagName!==`A`)}var IA=m.useId||(()=>void 0),LA=0;function RA(e){let[t,n]=m.useState(IA());return Hu(()=>{e||n(e=>e??String(LA++))},[e]),e||(t?`radix-${t}`:``)}var zA=[`top`,`right`,`bottom`,`left`],BA=Math.min,VA=Math.max,HA=Math.round,UA=Math.floor,WA=e=>({x:e,y:e}),GA={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function KA(e,t,n){return VA(e,BA(t,n))}function qA(e,t){return typeof e==`function`?e(t):e}function JA(e){return e.split(`-`)[0]}function YA(e){return e.split(`-`)[1]}function XA(e){return e===`x`?`y`:`x`}function ZA(e){return e===`y`?`height`:`width`}function QA(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function $A(e){return XA(QA(e))}function ej(e,t,n){n===void 0&&(n=!1);let r=YA(e),i=$A(e),a=ZA(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=lj(o)),[o,lj(o)]}function tj(e){let t=lj(e);return[nj(e),t,nj(t)]}function nj(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var rj=[`left`,`right`],ij=[`right`,`left`],aj=[`top`,`bottom`],oj=[`bottom`,`top`];function sj(e,t,n){switch(e){case`top`:case`bottom`:return n?t?ij:rj:t?rj:ij;case`left`:case`right`:return t?aj:oj;default:return[]}}function cj(e,t,n,r){let i=YA(e),a=sj(JA(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(nj)))),a}function lj(e){let t=JA(e);return GA[t]+e.slice(t.length)}function uj(e){return{top:0,right:0,bottom:0,left:0,...e}}function dj(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:uj(e)}function fj(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 pj(e,t,n){let{reference:r,floating:i}=e,a=QA(t),o=$A(t),s=ZA(o),c=JA(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}}switch(YA(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function mj(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}=qA(t,e),p=dj(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=fj(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=fj(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 hj=50,gj=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:mj},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=pj(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<hj&&(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}=pj(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},_j=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}=qA(e,t)||{};if(l==null)return{};let d=dj(u),f={x:n,y:r},p=$A(i),m=ZA(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=BA(d[_],T),D=BA(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=KA(O,A,k),M=!c.arrow&&YA(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),vj=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}=qA(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=JA(r),_=QA(o),v=JA(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[lj(o)]:tj(o)),x=p!==`none`;!d&&x&&b.push(...cj(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=ej(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`&&_!==QA(t))||T.every(e=>QA(e.placement)===_?e.overflows[0]>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=QA(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;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function yj(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function bj(e){return zA.some(t=>e[t]>=0)}var xj=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=qA(e,t);switch(i){case`referenceHidden`:{let e=yj(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:bj(e)}}}case`escaped`:{let e=yj(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:bj(e)}}}default:return{}}}}},Sj=new Set([`left`,`top`]);async function Cj(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=JA(n),s=YA(n),c=QA(n)===`y`,l=Sj.has(o)?-1:1,u=a&&c?-1:1,d=qA(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 wj=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 Cj(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}}}}},Tj=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}=qA(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=QA(JA(i)),p=XA(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=KA(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=KA(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},Ej=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}=qA(e,t),u={x:n,y:r},d=QA(i),f=XA(d),p=u[f],m=u[d],h=qA(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};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=Sj.has(JA(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}}}},Dj=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=qA(e,t),u=await o.detectOverflow(t,l),d=JA(i),f=YA(i),p=QA(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=BA(h-u[g],v),x=BA(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=VA(u.left,0),t=VA(u.right,0),n=VA(u.top,0),r=VA(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:VA(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:VA(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Oj(){return typeof window<`u`}function kj(e){return Mj(e)?(e.nodeName||``).toLowerCase():`#document`}function Aj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jj(e){return((Mj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Mj(e){return Oj()?e instanceof Node||e instanceof Aj(e).Node:!1}function Nj(e){return Oj()?e instanceof Element||e instanceof Aj(e).Element:!1}function Pj(e){return Oj()?e instanceof HTMLElement||e instanceof Aj(e).HTMLElement:!1}function Fj(e){return!Oj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Aj(e).ShadowRoot}function Ij(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Lj(e){return/^(table|td|th)$/.test(kj(e))}function Rj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var zj=/transform|translate|scale|rotate|perspective|filter/,Bj=/paint|layout|strict|content/,Vj=e=>!!e&&e!==`none`,Hj;function Uj(e){let t=Nj(e)?qj(e):e;return Vj(t.transform)||Vj(t.translate)||Vj(t.scale)||Vj(t.rotate)||Vj(t.perspective)||!Gj()&&(Vj(t.backdropFilter)||Vj(t.filter))||zj.test(t.willChange||``)||Bj.test(t.contain||``)}function Wj(e){let t=Yj(e);for(;Pj(t)&&!Kj(t);){if(Uj(t))return t;if(Rj(t))return null;t=Yj(t)}return null}function Gj(){return Hj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Hj}function Kj(e){return/^(html|body|#document)$/.test(kj(e))}function qj(e){return Aj(e).getComputedStyle(e)}function Jj(e){return Nj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yj(e){if(kj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Fj(e)&&e.host||jj(e);return Fj(t)?t.host:t}function Xj(e){let t=Yj(e);return Kj(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pj(t)&&Ij(t)?t:Xj(t)}function Zj(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Xj(e),i=r===e.ownerDocument?.body,a=Aj(r);if(i){let e=Qj(a);return t.concat(a,a.visualViewport||[],Ij(r)?r:[],e&&n?Zj(e):[])}else return t.concat(r,Zj(r,[],n))}function Qj(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $j(e){let t=qj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Pj(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=HA(n)!==a||HA(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function eM(e){return Nj(e)?e:e.contextElement}function tM(e){let t=eM(e);if(!Pj(t))return WA(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=$j(t),o=(a?HA(n.width):n.width)/r,s=(a?HA(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var nM=WA(0);function rM(e){let t=Aj(e);return!Gj()||!t.visualViewport?nM:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function iM(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Aj(e)?!1:t}function aM(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=eM(e),o=WA(1);t&&(r?Nj(r)&&(o=tM(r)):o=tM(e));let s=iM(a,n,r)?rM(a):WA(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){let e=Aj(a),t=r&&Nj(r)?Aj(r):r,n=e,i=Qj(n);for(;i&&r&&t!==n;){let e=tM(i),t=i.getBoundingClientRect(),r=qj(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=Aj(i),i=Qj(n)}}return fj({width:u,height:d,x:c,y:l})}function oM(e,t){let n=Jj(e).scrollLeft;return t?t.left+n:aM(jj(e)).left+n}function sM(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-oM(e,n),y:n.top+t.scrollTop}}function cM(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=jj(r),s=t?Rj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=WA(1),u=WA(0),d=Pj(r);if((d||!d&&!a)&&((kj(r)!==`body`||Ij(o))&&(c=Jj(r)),d)){let e=aM(r);l=tM(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?sM(o,c):WA(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 lM(e){return Array.from(e.getClientRects())}function uM(e){let t=jj(e),n=Jj(e),r=e.ownerDocument.body,i=VA(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=VA(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+oM(e),s=-n.scrollTop;return qj(r).direction===`rtl`&&(o+=VA(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var dM=25;function fM(e,t){let n=Aj(e),r=jj(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Gj();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=oM(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=dM&&(a-=o)}else l<=dM&&(a+=l);return{width:a,height:o,x:s,y:c}}function pM(e,t){let n=aM(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Pj(e)?tM(e):WA(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function mM(e,t,n){let r;if(t===`viewport`)r=fM(e,n);else if(t===`document`)r=uM(jj(e));else if(Nj(t))r=pM(t,n);else{let n=rM(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return fj(r)}function hM(e,t){let n=Yj(e);return n===t||!Nj(n)||Kj(n)?!1:qj(n).position===`fixed`||hM(n,t)}function gM(e,t){let n=t.get(e);if(n)return n;let r=Zj(e,[],!1).filter(e=>Nj(e)&&kj(e)!==`body`),i=null,a=qj(e).position===`fixed`,o=a?Yj(e):e;for(;Nj(o)&&!Kj(o);){let t=qj(o),n=Uj(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Ij(o)&&!n&&hM(e,o))?r=r.filter(e=>e!==o):i=t,o=Yj(o)}return t.set(e,r),r}function _M(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Rj(t)?[]:gM(t,this._c):[].concat(n),r],o=mM(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=mM(t,a[e],i);s=VA(n.top,s),c=BA(n.right,c),l=BA(n.bottom,l),u=VA(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function vM(e){let{width:t,height:n}=$j(e);return{width:t,height:n}}function yM(e,t,n){let r=Pj(t),i=jj(t),a=n===`fixed`,o=aM(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=WA(0);function l(){c.x=oM(i)}if(r||!r&&!a)if((kj(t)!==`body`||Ij(i))&&(s=Jj(t)),r){let e=aM(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?sM(i,s):WA(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function bM(e){return qj(e).position===`static`}function xM(e,t){if(!Pj(e)||qj(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return jj(e)===n&&(n=n.ownerDocument.body),n}function SM(e,t){let n=Aj(e);if(Rj(e))return n;if(!Pj(e)){let t=Yj(e);for(;t&&!Kj(t);){if(Nj(t)&&!bM(t))return t;t=Yj(t)}return n}let r=xM(e,t);for(;r&&Lj(r)&&bM(r);)r=xM(r,t);return r&&Kj(r)&&bM(r)&&!Uj(r)?n:r||Wj(e)||n}var CM=async function(e){let t=this.getOffsetParent||SM,n=this.getDimensions,r=await n(e.floating);return{reference:yM(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function wM(e){return qj(e).direction===`rtl`}var TM={convertOffsetParentRelativeRectToViewportRelativeRect:cM,getDocumentElement:jj,getClippingRect:_M,getOffsetParent:SM,getElementRects:CM,getClientRects:lM,getDimensions:vM,getScale:tM,isElement:Nj,isRTL:wM};function EM(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function DM(e,t){let n=null,r,i=jj(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=UA(d),h=UA(i.clientWidth-(u+f)),g=UA(i.clientHeight-(d+p)),_=UA(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:VA(0,BA(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!EM(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function OM(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=eM(e),u=i||a?[...l?Zj(l):[],...t?Zj(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?DM(l,n):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?aM(e):null;c&&g();function g(){let t=aM(e);h&&!EM(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 kM=wj,AM=Tj,jM=vj,MM=Dj,NM=xj,PM=_j,FM=Ej,IM=(e,t,n)=>{let r=new Map,i={platform:TM,...n},a={...i.platform,_c:r};return gj(e,t,{...i,platform:a})},LM=typeof document<`u`?m.useLayoutEffect:function(){};function RM(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(!RM(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)&&!RM(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function zM(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function BM(e,t){let n=zM(e);return Math.round(t*n)/n}function VM(e){let t=m.useRef(e);return LM(()=>{t.current=e}),t}function HM(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=m.useState(r);RM(f,r)||p(r);let[h,g]=m.useState(null),[_,v]=m.useState(null),y=m.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),b=m.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||h,S=o||_,C=m.useRef(null),w=m.useRef(null),T=m.useRef(u),E=c!=null,D=VM(c),O=VM(i),k=VM(l),A=m.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),IM(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!RM(T.current,t)&&(T.current=t,Su.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);LM(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=m.useRef(!1);LM(()=>(j.current=!0,()=>{j.current=!1}),[]),LM(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=m.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=m.useMemo(()=>({reference:x,floating:S}),[x,S]),P=m.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=BM(N.floating,u.x),r=BM(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...zM(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return m.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var UM=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?{}:PM({element:r.current,padding:i}).fn(n):r?PM({element:r,padding:i}).fn(n):{}}}},WM=(e,t)=>{let n=kM(e);return{name:n.name,fn:n.fn,options:[e,t]}},GM=(e,t)=>{let n=AM(e);return{name:n.name,fn:n.fn,options:[e,t]}},KM=(e,t)=>({fn:FM(e).fn,options:[e,t]}),qM=(e,t)=>{let n=jM(e);return{name:n.name,fn:n.fn,options:[e,t]}},JM=(e,t)=>{let n=MM(e);return{name:n.name,fn:n.fn,options:[e,t]}},YM=(e,t)=>{let n=NM(e);return{name:n.name,fn:n.fn,options:[e,t]}},XM=(e,t)=>{let n=UM(e);return{name:n.name,fn:n.fn,options:[e,t]}},ZM=`Arrow`,QM=m.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,C.jsx)(Cu.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,C.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});QM.displayName=ZM;var $M=QM;function eN(e){let[t,n]=m.useState(void 0);return Hu(()=>{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)}else n(void 0)},[e]),t}var tN=`Popper`,[nN,rN]=pu(tN),[iN,aN]=nN(tN),oN=e=>{let{__scopePopper:t,children:n}=e,[r,i]=m.useState(null);return(0,C.jsx)(iN,{scope:t,anchor:r,onAnchorChange:i,children:n})};oN.displayName=tN;var sN=`PopperAnchor`,cN=m.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=aN(sN,n),o=m.useRef(null),s=du(t,o),c=m.useRef(null);return m.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,C.jsx)(Cu.div,{...i,ref:s})});cN.displayName=sN;var lN=`PopperContent`,[uN,dN]=nN(lN),fN=m.forwardRef((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:h,...g}=e,_=aN(lN,n),[v,y]=m.useState(null),b=du(t,e=>y(e)),[x,S]=m.useState(null),w=eN(x),T=w?.width??0,E=w?.height??0,D=r+(a===`center`?``:`-`+a),O=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},k=Array.isArray(l)?l:[l],A=k.length>0,j={padding:O,boundary:k.filter(gN),altBoundary:A},{refs:M,floatingStyles:N,placement:P,isPositioned:ee,middlewareData:F}=HM({strategy:`fixed`,placement:D,whileElementsMounted:(...e)=>OM(...e,{animationFrame:p===`always`}),elements:{reference:_.anchor},middleware:[WM({mainAxis:i+E,alignmentAxis:o}),c&&GM({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?KM():void 0,...j}),c&&qM({...j}),JM({...j,apply:({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`)}}),x&&XM({element:x,padding:s}),_N({arrowWidth:T,arrowHeight:E}),f&&YM({strategy:`referenceHidden`,...j})]}),[I,te]=vN(P),ne=Tu(h);Hu(()=>{ee&&ne?.()},[ee,ne]);let re=F.arrow?.x,L=F.arrow?.y,R=F.arrow?.centerOffset!==0,[z,ie]=m.useState();return Hu(()=>{v&&ie(window.getComputedStyle(v).zIndex)},[v]),(0,C.jsx)(`div`,{ref:M.setFloating,"data-radix-popper-content-wrapper":``,style:{...N,transform:ee?N.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:z,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,C.jsx)(uN,{scope:n,placedSide:I,onArrowChange:S,arrowX:re,arrowY:L,shouldHideArrow:R,children:(0,C.jsx)(Cu.div,{"data-side":I,"data-align":te,...g,ref:b,style:{...g.style,animation:ee?void 0:`none`}})})})});fN.displayName=lN;var pN=`PopperArrow`,mN={top:`bottom`,right:`left`,bottom:`top`,left:`right`},hN=m.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=dN(pN,n),a=mN[i.placedSide];return(0,C.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,C.jsx)($M,{...r,ref:t,style:{...r.style,display:`block`}})})});hN.displayName=pN;function gN(e){return e!==null}var _N=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]=vN(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}}}});function vN(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var yN=oN,bN=cN,xN=fN,SN=hN;function CN(e){let t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var wN=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},TN=new WeakMap,EN=new WeakMap,DN={},ON=0,kN=function(e){return e&&(e.host||kN(e.parentNode))},AN=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=kN(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})},jN=function(e,t,n,r){var i=AN(t,Array.isArray(e)?e:[e]);DN[n]||(DN[n]=new WeakMap);var a=DN[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=(TN.get(e)||0)+1,l=(a.get(e)||0)+1;TN.set(e,c),a.set(e,l),o.push(e),c===1&&i&&EN.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(),ON++,function(){o.forEach(function(e){var t=TN.get(e)-1,i=a.get(e)-1;TN.set(e,t),a.set(e,i),t||(EN.has(e)||e.removeAttribute(r),EN.delete(e)),i||e.removeAttribute(n)}),ON--,ON||(TN=new WeakMap,TN=new WeakMap,EN=new WeakMap,DN={})}},MN=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||wN(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),jN(r,i,n,`aria-hidden`)):function(){return null}},NN=function(){return NN=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},NN.apply(this,arguments)};function PN(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 FN(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 IN=`right-scroll-bar-position`,LN=`width-before-scroll-bar`,RN=`with-scroll-bars-hidden`,zN=`--removed-body-scroll-bar-size`;function BN(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function VN(e,t){var n=(0,m.useState)(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}var HN=typeof window<`u`?m.useLayoutEffect:m.useEffect,UN=new WeakMap;function WN(e,t){var n=VN(t||null,function(t){return e.forEach(function(e){return BN(e,t)})});return HN(function(){var t=UN.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||BN(e,null)}),i.forEach(function(e){r.has(e)||BN(e,a)})}UN.set(n,e)},[e]),n}function GN(e){return e}function KN(e,t){t===void 0&&(t=GN);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 qN(e){e===void 0&&(e={});var t=KN(null);return t.options=NN({async:!0,ssr:!1},e),t}var JN=function(e){var t=e.sideCar,n=PN(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 m.createElement(r,NN({},n))};JN.isSideCarExport=!0;function YN(e,t){return e.useMedium(t),JN}var XN=qN(),ZN=function(){},QN=m.forwardRef(function(e,t){var n=m.useRef(null),r=m.useState({onScrollCapture:ZN,onWheelCapture:ZN,onTouchMoveCapture:ZN}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=PN(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=WN([n,t]),w=NN(NN({},x),i);return m.createElement(m.Fragment,null,u&&m.createElement(S,{sideCar:XN,removeScrollBar:l,shards:d,noRelative:p,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?m.cloneElement(m.Children.only(s),NN(NN({},w),{ref:C})):m.createElement(y,NN({},w,{className:c,ref:C}),s))});QN.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},QN.classNames={fullWidth:LN,zeroRight:IN};var $N,eP=function(){if($N)return $N;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function tP(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=eP();return t&&e.setAttribute(`nonce`,t),e}function nP(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rP(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var iP=function(){var e=0,t=null;return{add:function(n){e==0&&(t=tP())&&(nP(t,n),rP(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aP=function(){var e=iP();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oP=function(){var e=aP();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},sP={left:0,top:0,right:0,gap:0},cP=function(e){return parseInt(e||``,10)||0},lP=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[cP(n),cP(r),cP(i)]},uP=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return sP;var t=lP(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])}},dP=oP(),fP=`data-scroll-locked`,pP=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
77
77
|
.${RN} {
|
|
78
78
|
overflow: hidden ${r};
|
|
79
79
|
padding-right: ${s}px ${r};
|
package/client/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Intlayer Editor</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-MTg78yVA.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/assets/chunk-BNv3lrIs.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/assets/react-BFwN_vxz.js">
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-cbJiinse.css">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer-editor",
|
|
3
|
-
"version": "8.9.4
|
|
3
|
+
"version": "8.9.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Integrate the Intlayer visual editor into your Intlayer projects, enabling CMS-like content management with multilingual support.",
|
|
6
6
|
"keywords": [
|
|
@@ -93,17 +93,17 @@
|
|
|
93
93
|
"@fastify/formbody": "8.0.2",
|
|
94
94
|
"@fastify/helmet": "13.0.2",
|
|
95
95
|
"@fastify/static": "9.1.3",
|
|
96
|
-
"@intlayer/chokidar": "8.9.4
|
|
97
|
-
"@intlayer/config": "8.9.4
|
|
98
|
-
"@intlayer/unmerged-dictionaries-entry": "8.9.4
|
|
96
|
+
"@intlayer/chokidar": "8.9.4",
|
|
97
|
+
"@intlayer/config": "8.9.4",
|
|
98
|
+
"@intlayer/unmerged-dictionaries-entry": "8.9.4",
|
|
99
99
|
"fastify": "5.8.5",
|
|
100
|
-
"fastify-intlayer": "8.9.4
|
|
100
|
+
"fastify-intlayer": "8.9.4",
|
|
101
101
|
"mime": "4.1.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
|
-
"@intlayer/design-system": "8.9.4
|
|
105
|
-
"@intlayer/editor-react": "8.9.4
|
|
106
|
-
"@intlayer/types": "8.9.4
|
|
104
|
+
"@intlayer/design-system": "8.9.4",
|
|
105
|
+
"@intlayer/editor-react": "8.9.4",
|
|
106
|
+
"@intlayer/types": "8.9.4",
|
|
107
107
|
"@rolldown/plugin-babel": "^0.2.3",
|
|
108
108
|
"@tailwindcss/vite": "4.3.0",
|
|
109
109
|
"@tanstack/react-query": "5.100.9",
|
|
@@ -117,17 +117,17 @@
|
|
|
117
117
|
"framer-motion": "12.38.0",
|
|
118
118
|
"fuse.js": "7.3.0",
|
|
119
119
|
"globals": "17.6.0",
|
|
120
|
-
"intlayer": "8.9.4
|
|
120
|
+
"intlayer": "8.9.4",
|
|
121
121
|
"lucide-react": "1.14.0",
|
|
122
122
|
"react": "19.2.6",
|
|
123
123
|
"react-dom": "19.2.6",
|
|
124
|
-
"react-intlayer": "8.9.4
|
|
124
|
+
"react-intlayer": "8.9.4",
|
|
125
125
|
"react-router-dom": "7.15.0",
|
|
126
126
|
"tailwindcss": "4.3.0",
|
|
127
127
|
"tsdown": "0.22.00",
|
|
128
128
|
"typescript": "6.0.3",
|
|
129
129
|
"vite": "8.0.11",
|
|
130
|
-
"vite-intlayer": "8.9.4
|
|
130
|
+
"vite-intlayer": "8.9.4",
|
|
131
131
|
"vitest": "4.1.5"
|
|
132
132
|
},
|
|
133
133
|
"engines": {
|