intlayer-editor 8.11.2 → 8.11.3
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/{CodeBlockClient-D0ObuBVe.js → CodeBlockClient-D0pEstG_.js} +3 -3
- package/client/dist/assets/{CodeBlockShiki-Cz1JRuLX.js → CodeBlockShiki-wCnl92ep.js} +2 -2
- package/client/dist/assets/{MarkDownRender-ByaYYDzH.js → MarkDownRender-CmDu17Um.js} +4 -4
- package/client/dist/assets/{angular-html-BCoRK-7x.js → angular-html-BhNYtXig.js} +1 -1
- package/client/dist/assets/angular-html-CK1WWHDt.js +1 -0
- package/client/dist/assets/{angular-ts-3bkKESuf.js → angular-ts-Bgx_YLtV.js} +1 -1
- package/client/dist/assets/angular-ts-C8ug4v3a.js +1 -0
- package/client/dist/assets/{astro-CXcdfe7L.js → astro-DYrLNOPG.js} +1 -1
- package/client/dist/assets/astro-y-1FLQk4.js +1 -0
- package/client/dist/assets/bash-DpJpayxR.js +1 -0
- package/client/dist/assets/{blade-Dp5AS8Qj.js → blade-Dfkorpud.js} +1 -1
- package/client/dist/assets/{bundle-web-C7OTDIWZ.js → bundle-web-D2G9azxz.js} +3 -3
- package/client/dist/assets/{c-C6GLfCXU.js → c-CpNzQgpk.js} +1 -1
- package/client/dist/assets/{coffee-CHm0Xl8J.js → coffee-KdhmR0Jc.js} +1 -1
- package/client/dist/assets/{cpp-OHpYMmIp.js → cpp-D7z-Apo4.js} +1 -1
- package/client/dist/assets/{css-Dg9te5MJ.js → css-C6ZclOeb.js} +1 -1
- package/client/dist/assets/css-Cmh8zljs.js +1 -0
- package/client/dist/assets/{dist-C7G_-OEc.js → dist-n6pPp0RM.js} +1 -1
- package/client/dist/assets/{glsl-BQmJwTEn.js → glsl-Bxr2wRsn.js} +1 -1
- package/client/dist/assets/{graphql-7vLyeuH0.js → graphql-DJHGJiAR.js} +1 -1
- package/client/dist/assets/{haml-5-_pheN2.js → haml-DumorzfJ.js} +1 -1
- package/client/dist/assets/{handlebars-CqCFpfDM.js → handlebars-BO0dHGLY.js} +1 -1
- package/client/dist/assets/{html-DZm0jiB5.js → html-DForud47.js} +1 -1
- package/client/dist/assets/{html-derivative-CcP6l1d_.js → html-derivative-Z7WXmgc6.js} +1 -1
- package/client/dist/assets/html-pB_zI3xu.js +1 -0
- package/client/dist/assets/{http-C6-QGjVw.js → http-Bfmo0JDx.js} +1 -1
- package/client/dist/assets/{hurl-CEb10L9a.js → hurl-3nK2SwN4.js} +1 -1
- package/client/dist/assets/index-5Kjw-DcH.css +2 -0
- package/client/dist/assets/{index-B7wiXW5F.js → index-Czc2Opy7.js} +9 -9
- package/client/dist/assets/{java-BjTRUiLC.js → java-CGrTGkCx.js} +1 -1
- package/client/dist/assets/javascript-D3ASMNZJ.js +1 -0
- package/client/dist/assets/{javascript-B6bd6jQU.js → javascript-DEVfd_Vl.js} +1 -1
- package/client/dist/assets/{jinja-DnlZBX9k.js → jinja-C0Kx117H.js} +1 -1
- package/client/dist/assets/{jison-JfyW3O6R.js → jison-DLA9JcAW.js} +1 -1
- package/client/dist/assets/json-BrXAD4tz.js +1 -0
- package/client/dist/assets/{json-BwMzDyCy.js → json-DDBMmHKe.js} +1 -1
- package/client/dist/assets/{jsx-CN9Em1nV.js → jsx-AJ0nOAoK.js} +1 -1
- package/client/dist/assets/{julia--NE_1eIa.js → julia-U2FSUeo8.js} +1 -1
- package/client/dist/assets/{marko-BpllmrkT.js → marko-DYLVNorT.js} +1 -1
- package/client/dist/assets/{mdc-CaYmdZqQ.js → mdc-DDEvUTfg.js} +1 -1
- package/client/dist/assets/{php-CVh-2818.js → php-CLfMssyd.js} +1 -1
- package/client/dist/assets/{postcss-DK4uaEBr.js → postcss-Djew7QkE.js} +1 -1
- package/client/dist/assets/{pug-B7cQMiSP.js → pug-BR3OiCd5.js} +1 -1
- package/client/dist/assets/{regexp-DbedfIzO.js → regexp-By1KtQN-.js} +1 -1
- package/client/dist/assets/{scss-D80FDzXy.js → scss-CdrKidMU.js} +1 -1
- package/client/dist/assets/{shellscript-C2s8urTX.js → shellscript-Bkjvv9So.js} +1 -1
- package/client/dist/assets/{sql-3cAhshWu.js → sql-BDSBVu7o.js} +1 -1
- package/client/dist/assets/{svelte-B9Y_1I-G.js → svelte-3PCQZaw_.js} +1 -1
- package/client/dist/assets/svelte-DSIdNSNr.js +1 -0
- package/client/dist/assets/{ts-tags-BIbTg8ER.js → ts-tags-sxgQacaj.js} +1 -1
- package/client/dist/assets/tsx-Cqny-j0-.js +1 -0
- package/client/dist/assets/{tsx-CTdBTKUm.js → tsx-Det6Z5Px.js} +1 -1
- package/client/dist/assets/typescript-CGNFHgvh.js +1 -0
- package/client/dist/assets/{typescript-DwTTPDii.js → typescript-DNfbWSrD.js} +1 -1
- package/client/dist/assets/vue-C79Phfa_.js +1 -0
- package/client/dist/assets/{vue-CKJpJGiN.js → vue-Dg-shDnh.js} +1 -1
- package/client/dist/assets/{vue-html-ChImrqI3.js → vue-html-DsaM6WQP.js} +1 -1
- package/client/dist/assets/{vue-vine-C9rO9iys.js → vue-vine-Da9PT0kO.js} +1 -1
- package/client/dist/assets/{xml-BxTfN6_X.js → xml-B5IZiqvv.js} +1 -1
- package/client/dist/assets/xml-DErQV8xe.js +1 -0
- package/client/dist/index.html +2 -2
- package/package.json +11 -11
- package/client/dist/assets/angular-html-DUNKBExS.js +0 -1
- package/client/dist/assets/angular-ts-BAb7lN0z.js +0 -1
- package/client/dist/assets/astro-DPwmc-zG.js +0 -1
- package/client/dist/assets/bash-Cjq34j37.js +0 -1
- package/client/dist/assets/css-Cb6i3fBJ.js +0 -1
- package/client/dist/assets/html-DFyd59os.js +0 -1
- package/client/dist/assets/index-Q9g9RwMw.css +0 -2
- package/client/dist/assets/javascript-CqcDF9BD.js +0 -1
- package/client/dist/assets/json-BQEbWFE8.js +0 -1
- package/client/dist/assets/svelte-CxmSA4xb.js +0 -1
- package/client/dist/assets/tsx-CmbYo5tJ.js +0 -1
- package/client/dist/assets/typescript-G81baQh5.js +0 -1
- package/client/dist/assets/vue-A9rXWaWI.js +0 -1
- package/client/dist/assets/xml-DZeMd2Lq.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MarkDownRender-CmDu17Um.js","assets/CodeBlockClient-D0pEstG_.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(e&&(t=e(e=0)),t),s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,a)=>(a=n==null?{}:e(i(n)),l(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e);(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 f=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),p=s(((e,t)=>{t.exports=f()})),m=s((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}}}})),h=s(((e,t)=>{t.exports=m()})),g=s((e=>{var t=p();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},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(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 o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.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=c(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=c(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=c(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=c(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 s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.6`})),_=s(((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=g()})),v=s((e=>{var t=h(),n=p(),r=_();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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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 s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(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 s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)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 d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var f=Object.assign,m=Symbol.for(`react.element`),g=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 F=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},te=[],ne=-1;function R(e){return{current:e}}function z(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function B(e,t){ne++,te[ne]=e.current,e.current=t}var re=R(null),ie=R(null),ae=R(null),oe=R(null);function se(e,t){switch(B(ae,t),B(ie,e),B(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Jd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Jd(t),e=Yd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(re),B(re,e)}function ce(){z(re),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=re.current,n=Yd(t,e.type);t!==n&&(B(ie,e),B(re,n))}function ue(e){ie.current===e&&(z(re),z(ie)),oe.current===e&&(z(oe),ip._currentValue=ee)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!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(`
|
|
@@ -17,9 +17,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
17
17
|
${_}px !important;
|
|
18
18
|
${v}px !important;
|
|
19
19
|
}
|
|
20
|
-
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,O.jsx)(Ny,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:D.cloneElement(e,{ref:u})})}var Fy=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Yu(Iy),d=(0,D.useId)(),f=!0,p=(0,D.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,D.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),D.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,O.jsx)(Py,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,O.jsx)(Zu.Provider,{value:p,children:e})};function Iy(){return new Map}function Ly(e=!0){let t=(0,D.useContext)(Zu);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,D.useId)();(0,D.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,D.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Ry=e=>e.key||``;function zy(e){let t=[];return D.Children.forEach(e,e=>{(0,D.isValidElement)(e)&&t.push(e)}),t}var By=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=Ly(o),f=(0,D.useMemo)(()=>zy(e),[e]),p=o&&!u?[]:f.map(Ry),m=(0,D.useRef)(!0),h=(0,D.useRef)(f),g=Yu(()=>new Map),_=(0,D.useRef)(new Set),[v,y]=(0,D.useState)(f),[b,x]=(0,D.useState)(f);Xu(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=Ry(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=Ry(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(zy(e)),y(f),null}let{forceRender:C}=(0,D.useContext)(Ju);return(0,O.jsx)(O.Fragment,{children:b.map(e=>{let v=Ry(e),y=o&&!u?!1:f===b||p.includes(v);return(0,O.jsx)(Fy,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},Vy=(0,D.createContext)({strict:!1}),Hy={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Uy=!1;function Wy(){if(Uy)return;let e={};for(let t in Hy)e[t]={isEnabled:e=>Hy[t].some(t=>!!e[t])};Jg(e),Uy=!0}function Gy(){return Wy(),Yg()}function Ky(e){let t=Gy();for(let n in e)t[n]={...t[n],...e[n]};Jg(t)}function qy({children:e,features:t,strict:n=!1}){let[,r]=(0,D.useState)(!Jy(t)),i=(0,D.useRef)(void 0);if(!Jy(t)){let{renderer:e,...n}=t;i.current=e,Ky(n)}return(0,D.useEffect)(()=>{Jy(t)&&t().then(({renderer:e,...t})=>{Ky(t),i.current=e,r(!0)})},[]),(0,O.jsx)(Vy.Provider,{value:{renderer:i.current,strict:n},children:e})}function Jy(e){return typeof e==`function`}var Yy=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Xy(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Yy.has(e)}var Zy=c({default:()=>Qy}),Qy,$y=o((()=>{throw Qy={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),eb=e=>!Xy(e);function tb(e){typeof e==`function`&&(eb=t=>t.startsWith(`on`)?!Xy(t):e(t))}try{tb(($y(),d(Zy)).default)}catch{}function nb(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||fh(e[i])||(eb(i)||n===!0&&Xy(i)||!t&&!Xy(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var rb=(0,D.createContext)({});function ib(e,t){if(zg(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Ig(t)?t:void 0,animate:Ig(n)?n:void 0}}return e.inherit===!1?{}:t}function ab(e){let{initial:t,animate:n}=ib(e,(0,D.useContext)(rb));return(0,D.useMemo)(()=>({initial:t,animate:n}),[ob(t),ob(n)])}function ob(e){return Array.isArray(e)?e.join(` `):e}var sb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cb(e,t,n){for(let r in t)!fh(t[r])&&!k_(r,n)&&(e[r]=t[r])}function lb({transformTemplate:e},t){return(0,D.useMemo)(()=>{let n=sb();return C_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ub(e,t){let n=e.style||{},r={};return cb(r,n,e),Object.assign(r,lb(e,t)),r}function db(e,t){let n={},r=ub(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var fb=()=>({...sb(),attrs:{}});function pb(e,t,n,r){let i=(0,D.useMemo)(()=>{let n=fb();return L_(n,t,z_(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};cb(t,e.style,e),i.style={...t,...i.style}}return i}var mb=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function hb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(mb.indexOf(e)>-1||/[A-Z]/u.test(e))}function gb(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??hb(e)?pb:db)(t,r,i,e),c=nb(t,typeof e==`string`,a),l=e===D.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,D.useMemo)(()=>fh(u)?u.get():u,[u]);return(0,D.createElement)(e,{...l,children:d})}function _b({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:vb(n,r,i,e),renderState:t()}}function vb(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Wv(a[e]);let{initial:o,animate:s}=e,c=zg(e),l=Bg(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Fg(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ah(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var yb=e=>(t,n)=>{let r=(0,D.useContext)(rb),i=(0,D.useContext)(Zu),a=()=>_b(e,t,r,i);return n?a():Yu(a)},bb=yb({scrapeMotionValuesFromProps:A_,createRenderState:sb}),xb=yb({scrapeMotionValuesFromProps:V_,createRenderState:fb}),Sb=Symbol.for(`motionComponentSymbol`);function Cb(e,t,n){let r=(0,D.useRef)(n);(0,D.useInsertionEffect)(()=>{r.current=n});let i=(0,D.useRef)(null);return(0,D.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var wb=(0,D.createContext)({});function Tb(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Eb(e,t,n,r,i,a){let{visualElement:o}=(0,D.useContext)(rb),s=(0,D.useContext)(Vy),c=(0,D.useContext)(Zu),l=(0,D.useContext)(ky),u=l.reducedMotion,d=l.skipAnimations,f=(0,D.useRef)(null),p=(0,D.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,D.useContext)(wb);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Db(f.current,n,i,h);let g=(0,D.useRef)(!1);(0,D.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[gh],v=(0,D.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Xu(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,D.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Db(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Ob(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Tb(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Ob(e){if(e)return e.options.allowProjection===!1?Ob(e.parent):e.projection}function kb(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Ky(r);let a=n?n===`svg`:hb(e),o=a?xb:bb;function s(n,s){let c,l={...(0,D.useContext)(ky),...n,layoutId:Ab(n)},{isStatic:u}=l,d=ab(n),f=o(n,u);if(!u&&typeof window<`u`){jb(l,r);let t=Mb(l);c=t.MeasureLayout,d.visualElement=Eb(e,f,l,i,t.ProjectionNode,a)}return(0,O.jsxs)(rb.Provider,{value:d,children:[c&&d.visualElement?(0,O.jsx)(c,{visualElement:d.visualElement,...l}):null,gb(e,n,Cb(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,D.forwardRef)(s);return c[Sb]=e,c}function Ab({layoutId:e}){let t=(0,D.useContext)(Ju).id;return t&&e!==void 0?t+`-`+e:e}function jb(e,t){(0,D.useContext)(Vy).strict}function Mb(e){let{drag:t,layout:n}=Gy();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Nb(e,t){if(typeof Proxy>`u`)return kb;let n=new Map,r=(n,r)=>kb(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,kb(a,void 0,e,t)),n.get(a))})}var Pb=(e,t)=>t.isSVG??hb(e)?new H_(t):new M_(t,{allowProjection:e!==D.Fragment}),Fb=class extends Qg{constructor(e){super(e),e.animationState||=Y_(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Fg(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Ib=0,Lb={animation:{Feature:Fb},exit:{Feature:class extends Qg{constructor(){super(...arguments),this.id=Ib++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=oh(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Rb(e){return{point:{x:e.pageX,y:e.pageY}}}var zb=e=>t=>eg(t)&&e(t,Rb(t));function Bb(e,t,n,r){return Bv(e,t,zb(n),r)}var Vb=({current:e})=>e?e.ownerDocument.defaultView:null,Hb=(e,t)=>Math.abs(e-t);function Ub(e,t){let n=Hb(e.x,t.x),r=Hb(e.y,t.y);return Math.sqrt(n**2+r**2)}var Wb=new Set([`auto`,`scroll`]),Gb=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Kb(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Jb(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Ub(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Vd;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Kb(t,this.transformPagePoint),K.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Jb(e.type===`pointercancel`?this.lastMoveEventInfo:Kb(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!eg(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Kb(Rb(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Vd;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Jb(s,this.history)),this.removeListeners=sd(Bb(this.contextWindow,`pointermove`,this.handlePointerMove),Bb(this.contextWindow,`pointerup`,this.handlePointerUp),Bb(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Wb.has(e.overflowX)||Wb.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),K.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Bd(this.updatePoint)}};function Kb(e,t){return t?{point:t(e.point)}:e}function qb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jb({point:e},t){return{point:e,delta:qb(e,Xb(t)),offset:qb(e,Yb(t)),velocity:Zb(t,.1)}}function Yb(e){return e[0]}function Xb(e){return e[e.length-1]}function Zb(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Xb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ud(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ud(t)*2&&(r=e[1]);let a=dd(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Qb(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Vf(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Vf(n,e,r.max):Math.min(e,n)),e}function $b(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function ex(e,{top:t,left:n,bottom:r,right:i}){return{x:$b(e.x,n,i),y:$b(e.y,t,r)}}function tx(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nx(e,t){return{x:tx(e.x,t.x),y:tx(e.y,t.y)}}function rx(e,t){let n=.5,r=ov(e),i=ov(t);return i>r?n=cd(t.min,t.max-r,e.min):r>i&&(n=cd(e.min,e.max-i,t.min)),ed(0,1,n)}function ix(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var ax=.35;function ox(e=ax){return e===!1?e=0:e===!0&&(e=ax),{x:sx(e,`left`,`right`),y:sx(e,`top`,`bottom`)}}function sx(e,t,n){return{min:cx(e,t),max:cx(e,n)}}function cx(e,t){return typeof e==`number`?e:e[t]||0}var lx=new WeakMap,ux=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ng(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Rb(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Yh(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ov(e=>{let t=this.getAxisMotionValue(e).get()||0;if(gf.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=ov(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&K.update(()=>i(e,t),!1,!0),mh(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=mx(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&K.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Gb(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Vb(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&K.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!px(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Qb(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Tb(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=ex(n.layoutBox,e):this.constraints=!1,this.elastic=ox(t),r!==this.constraints&&!Tb(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ov(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ix(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Tb(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=y_(n,r.root,this.visualElement.getTransformPagePoint()),a=nx(r.layout.layoutBox,i);if(t){let e=t(e_(a));this.hasMutatedConstraints=!!e,e&&(a=$g(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Ov(o=>{if(!px(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return mh(this.visualElement,e),n.start(eh(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ov(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Ov(t=>{let{drag:n}=this.getProps();if(!px(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-Vf(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Tb(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Ov(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=rx({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ov(t=>{if(!px(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Vf(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;lx.set(this.visualElement,this);let e=this.visualElement.current,t=Bb(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ig(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Tb(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=fx(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),K.read(r);let o=Bv(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ov(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=ax,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function dx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function fx(e,t,n){let r=Eg(e,dx(n)),i=Eg(t,dx(n));return()=>{r(),i()}}function px(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mx(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var hx=class extends Qg{constructor(e){super(e),this.removeGroupControls=od,this.removeListeners=od,this.controls=new ux(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||od}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},gx=e=>(t,n)=>{e&&K.update(()=>e(t,n),!1,!0)},_x=class extends Qg{constructor(){super(...arguments),this.removePointerDownListener=od}onPointerDown(e){this.session=new Gb(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vb(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:gx(e),onStart:gx(t),onMove:gx(n),onEnd:(e,t)=>{delete this.session,r&&K.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Bb(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},vx=!1,yx=class extends D.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),vx&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Kv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),vx=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||K.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Gh.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;vx=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function bx(e){let[t,n]=Ly(),r=(0,D.useContext)(Ju);return(0,O.jsx)(yx,{...e,layoutGroup:r,switchLayoutGroup:(0,D.useContext)(wb),isPresent:t,safeToRemove:n})}var xx={pan:{Feature:_x},drag:{Feature:hx,ProjectionNode:Oy,MeasureLayout:bx}};function Sx(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&K.postRender(()=>i(t,Rb(t)))}var Cx=class extends Qg{mount(){let{current:e}=this.node;e&&(this.unmount=Qh(e,(e,t)=>(Sx(this.node,t,`Start`),e=>Sx(this.node,e,`End`))))}unmount(){}},wx=class extends Qg{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=sd(Bv(this.node.current,`focus`,()=>this.onFocus()),Bv(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Tx(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&K.postRender(()=>i(t,Rb(t)))}var Ex=class extends Qg{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=dg(e,(e,t)=>(Tx(this.node,t,`Start`),(e,{success:t})=>Tx(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Dx=new WeakMap,Ox=new WeakMap,kx=e=>{let t=Dx.get(e.target);t&&t(e)},Ax=e=>{e.forEach(kx)};function jx({root:e,...t}){let n=e||document;Ox.has(n)||Ox.set(n,{});let r=Ox.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ax,{root:e,...t})),r[i]}function Mx(e,t,n){let r=jx(t);return Dx.set(e,n),r.observe(e),()=>{Dx.delete(e),r.unobserve(e)}}var Nx={some:0,all:1},Px=class extends Qg{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Nx[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Mx(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Fx(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Fx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Ix={inView:{Feature:Px},tap:{Feature:Ex},focus:{Feature:wx},hover:{Feature:Cx}},Lx={layout:{ProjectionNode:Oy,MeasureLayout:bx}},Rx=Nb({...Lb,...Ix,...xx,...Lx},Pb),zx={renderer:Pb,...Lb,...Ix},Bx=e=>{let t=(0,V.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,O.jsx)(qy,{features:zx,children:n}),t[0]=n,t[1]=r),r},Vx=e=>{let t=(0,V.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,O.jsx)(Ku,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,O.jsx)(Bx,{children:(0,O.jsxs)(Mo,{children:[r,n]})}),t[1]=n,t[2]=i),i},Hx=e=>{let t=(0,V.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,O.jsx)(ei,{children:(0,O.jsx)(pr,{children:(0,O.jsx)(dr,{path:`*`,element:n})})}),t[0]=n,t[1]=r),r},Ux={key:`dictionary-edition-drawer`,content:{nodeType:`translation`,translation:{en:{openDictionaryEditor:{popoverContent:`Open Dictionary in Editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},"en-GB":{openDictionaryEditor:{popoverContent:`Click to open the dictionary in the editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},fr:{openDictionaryEditor:{popoverContent:`Ouvrir le dictionnaire dans l’éditeur`,label:`Cliquez pour ouvrir le dictionnaire dans l’éditeur`},backButtonText:`Liste des dictionnaires`,modalTitle:`Modifier le dictionnaire`,noDictionaryFocused:`Aucun dictionnaire sélectionné`,focusedDictionaryNotFound:`Dictionnaire focalisé non trouvé`},es:{openDictionaryEditor:{popoverContent:`Abrir el diccionario en el editor`,label:`Haga clic para abrir el diccionario en el editor`},backButtonText:`Lista de diccionarios`,modalTitle:`Editar el diccionario`,noDictionaryFocused:`No hay diccionario enfocado`,focusedDictionaryNotFound:`Diccionario enfocado no encontrado`},de:{openDictionaryEditor:{popoverContent:`Wörterbuch im Editor öffnen`,label:`Klicken Sie hier, um das Wörterbuch im Editor zu öffnen`},backButtonText:`Wörterbuchliste`,modalTitle:`Wörterbuch bearbeiten`,noDictionaryFocused:`Kein Wörterbuch ausgewählt`,focusedDictionaryNotFound:`Ausgewähltes Wörterbuch nicht gefunden`},ja:{openDictionaryEditor:{popoverContent:`エディターで辞書を開く`,label:`エディターで辞書を開く`},backButtonText:`辞書リスト`,modalTitle:`辞書を編集`,noDictionaryFocused:`フォーカスされた辞書がありません`,focusedDictionaryNotFound:`フォーカスされた辞書が見つかりません`},ko:{openDictionaryEditor:{popoverContent:`편집기에서 사전 열기`,label:`편집기에서 사전 열기`},backButtonText:`사전 목록`,modalTitle:`사전 편집`,noDictionaryFocused:`포커스가 있는 사전이 없습니다`,focusedDictionaryNotFound:`포커스가 있는 사전이 없습니다`},zh:{openDictionaryEditor:{popoverContent:`点击打开词典到编辑器`,label:`点击打开词典到编辑器`},backButtonText:`词典列表`,modalTitle:`编辑词典`,noDictionaryFocused:`没有聚焦的词典`,focusedDictionaryNotFound:`没有聚焦的词典`},it:{openDictionaryEditor:{popoverContent:`Apri il dizionario nell’editor`,label:`Fai clic per aprire il dizionario nell’editor`},backButtonText:`Elenco di dizionari`,modalTitle:`Modifica dizionario`,noDictionaryFocused:`Nessun dizionario selezionato`,focusedDictionaryNotFound:`Nessun dizionario selezionato`},pt:{openDictionaryEditor:{popoverContent:`Abrir o dicionário no editor`,label:`Clique para abrir o dicionário no editor`},backButtonText:`Lista de dicionários`,modalTitle:`Editar dicionário`,noDictionaryFocused:`Nenhum dicionário focalizado`,focusedDictionaryNotFound:`Nenhum dicionário focalizado`},hi:{openDictionaryEditor:{popoverContent:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`,label:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`},backButtonText:`शब्दकोश सूची`,modalTitle:`शब्दकोश संपादित करें`,noDictionaryFocused:`कोई फोकस शब्दकोश नहीं है`,focusedDictionaryNotFound:`कोई फोकस शब्दकोश नहीं है`},ar:{openDictionaryEditor:{popoverContent:`انقر لفتح قاموس في المحرر`,label:`انقر لفتح قاموس في المحرر`},backButtonText:`قائمة القوامل`,modalTitle:`تحرير قاموس`,noDictionaryFocused:`لا يوجد قاموس مرتبط`,focusedDictionaryNotFound:`لا يوجد قاموس مرتبط`},ru:{openDictionaryEditor:{popoverContent:`Нажмите, чтобы открыть словарь в редакторе`,label:`Нажмите, чтобы открыть словарь в редакторе`},backButtonText:`Список словарей`,modalTitle:`Редактировать словарь`,noDictionaryFocused:`Нет фокусированного словаря`,focusedDictionaryNotFound:`Нет фокусированного словаря`}}},localIds:[`dictionary-edition-drawer::local::client/src/components/Editor/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts`]},Wx={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},Gx=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),Kx=e=>e.reduce((e,t)=>{let n=e??{},r=Gx(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),qx=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=Kx([Wx,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=Kx([Wx.headers,...t.map(e=>e.headers)]),s=Kx(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=Kx(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()},Jx=(e={},t)=>{let n=`${t?.editor?.backendURL??w.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await qx(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await qx(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await qx(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await qx(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await qx(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await qx(`${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(`
|
|
21
|
-
`);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(`
|
|
22
|
-
`);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 qx(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await qx(`${n}/discussions`,e,r,{method:`GET`,params:t})}},Yx=(e={},t)=>{let n=`${t?.editor?.backendURL??w.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await qx(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await qx(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await qx(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await qx(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await qx(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await qx(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await qx(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await qx(`${n}/${t}`,e,r,{method:`DELETE`})}},Xx=(e={},t)=>{let n=`${t?.editor?.editorURL??w.editorURL}/api`;return{getDictionaries:async(t={})=>(await qx(`${n}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await qx(`${n}/config`,e,t)).data,writeDictionary:async(t,r={})=>await qx(`${n}/dictionary`,e,r,{method:`POST`,body:t})}},Zx=(e={},t)=>{let n=t?.editor?.backendURL??w.backendURL,{clientId:r,clientSecret:i}=t?.editor??{};return{getOAuth2AccessToken:async(e={})=>await qx(`${n}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:r,client_secret:i}}),createCliSessionToken:async(t={})=>await qx(`${n}/api/cli-session`,e,t,{method:`POST`}),getCliSessionMe:async(t={})=>await qx(`${n}/api/cli-session/me`,e,t)}},Qx=(e={},t)=>{let n=`${t?.editor?.backendURL??w.backendURL}/api/project`;return{getProjects:async(t,r={})=>await qx(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await qx(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await qx(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await qx(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await qx(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await qx(`${n}`,e,t,{method:`DELETE`}),deleteProjectByIdAdmin:async(t,r={})=>qx(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectProject:async(t,r={})=>await qx(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await qx(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await qx(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await qx(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await qx(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await qx(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await qx(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await qx(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await qx(`${n}/ci`,e,t,{method:`POST`})}},$x=(e={},t)=>{let n=`${t?.editor?.backendURL??w.backendURL}/api/tag`;return{getTags:async(t,r={})=>await qx(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await qx(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await qx(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await qx(`${n}/${t}`,e,r,{method:`DELETE`})}};function eS(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 tS(e,t,n=`.`,r){if(!eS(t))return tS(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]]:eS(a)&&eS(i[t])?i[t]=tS(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function nS(e){return(...t)=>t.reduce((t,n)=>tS(t,n,``,e),{})}var rS=nS(),iS=(0,D.createContext)(null),aS=({children:e,manager:t})=>(0,O.jsx)(iS.Provider,{value:t,children:e}),oS=()=>(0,D.useContext)(iS),sS=(0,D.createContext)(void 0),cS=()=>{let e=(0,V.c)(16),t=oS(),n=(0,D.useContext)(sS),[r,i]=(0,D.useState)(t?.focusedContent.value??n?.focusedContent??null),a;e[0]!==t||e[1]!==n?.focusedContent?(a=()=>{if(!t){i(n?.focusedContent??null);return}let e=e=>i(e.detail);return t.focusedContent.addEventListener(`change`,e),()=>t.focusedContent.removeEventListener(`change`,e)},e[0]=t,e[1]=n?.focusedContent,e[2]=a):a=e[2];let o=n?.focusedContent,s;e[3]!==t||e[4]!==o?(s=[t,o],e[3]=t,e[4]=o,e[5]=s):s=e[5],(0,D.useEffect)(a,s);let c;e[6]!==t||e[7]!==n?(c=e=>{n?n.setFocusedContent(e):t&&t.focusedContent.set(e)},e[6]=t,e[7]=n,e[8]=c):c=e[8];let l=c,u;e[9]!==t||e[10]!==n?(u=e=>{n?n.setFocusedContentKeyPath(e):t&&t.setFocusedContentKeyPath(e)},e[9]=t,e[10]=n,e[11]=u):u=e[11];let d=u,f;return e[12]!==r||e[13]!==l||e[14]!==d?(f={focusedContent:r,setFocusedContent:l,setFocusedContentKeyPath:d},e[12]=r,e[13]=l,e[14]=d,e[15]=f):f=e[15],f},lS=(e,t)=>{try{let n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;let i=n.pathname.replace(/\/$/,``),a=r.pathname.replace(/\/$/,``);return!(i!==``&&a!==``&&i!==a)}catch(n){return console.error(`Invalid URL(s)`,n,{url1:e,url2:t}),!1}},uS=function(e){return e.INTLAYER_CLIENT_READY=`INTLAYER_CLIENT_READY`,e.INTLAYER_ARE_YOU_THERE=`INTLAYER_ARE_YOU_THERE`,e.INTLAYER_EDITOR_ACTIVATE=`INTLAYER_EDITOR_ACTIVATE`,e.INTLAYER_EDITOR_ENABLED=`INTLAYER_EDITOR_ENABLED`,e.INTLAYER_CONFIGURATION=`INTLAYER_CONFIGURATION`,e.INTLAYER_CURRENT_LOCALE=`INTLAYER_CURRENT_LOCALE`,e.INTLAYER_URL_CHANGE=`INTLAYER_URL_CHANGE`,e.INTLAYER_LOCALE_DICTIONARIES_CHANGED=`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,e.INTLAYER_DISTANT_DICTIONARIES_CHANGED=`INTLAYER_DISTANT_DICTIONARIES_CHANGED`,e.INTLAYER_HOVERED_CONTENT_CHANGED=`INTLAYER_HOVERED_CONTENT_CHANGED`,e.INTLAYER_FOCUSED_CONTENT_CHANGED=`INTLAYER_FOCUSED_CONTENT_CHANGED`,e.INTLAYER_EDITED_CONTENT_CHANGED=`INTLAYER_EDITED_CONTENT_CHANGED`,e.INTLAYER_IFRAME_CLICKED=`INTLAYER_IFRAME_CLICKED`,e.INTLAYER_DISPLAYED_DICTIONARY_KEYS=`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,e}({}),dS=e=>{let t=new MouseEvent(`mousedown`,{bubbles:!0,cancelable:!0,view:window}),n=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window});Object.assign(n,{iframeData:e}),Object.assign(t,{iframeData:e}),window.dispatchEvent(n),window.dispatchEvent(t)},fS=`__intlayer_editor_manager__`,pS=`__intlayer_editor_manager_events__`,mS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[pS]||(e[pS]=new EventTarget),e[pS]},hS=()=>typeof window>`u`?null:window[fS]??null,gS=e=>{if(typeof window<`u`){let t=window;t[fS]=e}mS().dispatchEvent(new CustomEvent(`change`,{detail:e}))},_S=e=>{let t=mS(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},vS=typeof HTMLElement<`u`?HTMLElement:class{},yS=class extends vS{_keyPathJson=`[]`;_dictionaryKey=``;_editorEnabled=!1;_isInIframe=!1;_isSelected=!1;_editedValue=void 0;_renderState=null;_selector=null;_unsubManager=null;_unsubEnabled=null;_unsubFocused=null;_unsubEditedContent=null;static get observedAttributes(){return[`key-path`,`dictionary-key`]}get keyPathJson(){return this._keyPathJson}set keyPathJson(e){this._keyPathJson=e;let t=hS();t&&this._updateEditedValue(t)}get dictionaryKey(){return this._dictionaryKey}set dictionaryKey(e){this._dictionaryKey=e;let t=hS();t&&this._updateEditedValue(t)}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=`:host { display: contents; }`,e.appendChild(t)}attributeChangedCallback(e,t,n){if(e===`key-path`){this._keyPathJson=n??`[]`;let e=hS();e&&this._updateEditedValue(e)}else if(e===`dictionary-key`){this._dictionaryKey=n??``;let e=hS();e&&this._updateEditedValue(e)}}connectedCallback(){typeof window<`u`&&(this._isInIframe=window.self!==window.top),this._subscribeToManager(),this._render()}disconnectedCallback(){this._teardown()}_teardown(){this._unsubManager?.(),this._unsubEnabled?.(),this._unsubFocused?.(),this._unsubEditedContent?.(),this._unsubManager=null,this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null}_getRawKeyPath(){try{return JSON.parse(this._keyPathJson)}catch{return[]}}_getFilteredKeyPath(){return this._getRawKeyPath().filter(e=>e.type!==j)}_updateEditedValue(e){let t=this._getFilteredKeyPath();if(!this._dictionaryKey||t.length===0){this._editedValue=void 0,this._render();return}let n=this._getRawKeyPath(),r=n[n.length-1]?.type;if(r===`markdown`||r===`html`||r===`insertion`||r===`file`){this._editedValue=void 0,this._render();return}let i=e.getContentValue(this._dictionaryKey,t);if(typeof i==`object`&&i&&i.nodeType===`translation`){let t=e.currentLocale.value;i=t?i[j][t]:void 0}this._editedValue=i,this._render()}_updateIsSelected(e){if(!e){this._isSelected=!1,this._updateSelectorAttr();return}let t=this._getFilteredKeyPath(),n=this._isSelected;this._isSelected=e.dictionaryKey===this._dictionaryKey&&(e.keyPath?.length??0)>0&&Qe(e.keyPath??[],t),this._updateSelectorAttr(),this._isSelected&&!n&&this._scrollIntoViewIfNeeded()}_scrollIntoViewIfNeeded(){try{let e;if(this._selector){let t=this._selector.shadowRoot?.querySelector(`.wrapper`);if(t){let n=t.getBoundingClientRect();(n.width>0||n.height>0)&&(e=n)}}if(!e&&this.childNodes.length>0){let t=document.createRange();t.selectNodeContents(this);let n=t.getBoundingClientRect();(n.width>0||n.height>0)&&(e=n)}e||=this.getBoundingClientRect();let t=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;if(!(e.width>0&&e.height>0&&e.bottom>0&&e.right>0&&e.top<t&&e.left<n)){let n=window.scrollY??document.documentElement.scrollTop,r=e.top+n-t*.25;window.scrollTo({top:Math.max(0,r),behavior:`smooth`})}}catch{}}_updateSelectorAttr(){this._selector&&(this._isSelected?this._selector.setAttribute(`is-selecting`,``):this._selector.removeAttribute(`is-selecting`))}_subscribeToManager(){let e=hS();e&&this._setupManagerSubscriptions(e),this._unsubManager=_S(e=>{this._unsubEnabled?.(),this._unsubFocused?.(),this._unsubEditedContent?.(),this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):(this._editorEnabled=!1,this._isSelected=!1,this._editedValue=void 0,this._render())})}_setupManagerSubscriptions(e){this._editorEnabled=e.editorEnabled.value??!1,this._updateIsSelected(e.focusedContent.value),this._updateEditedValue(e);let t=e=>{this._editorEnabled=e.detail,this._render()},n=e=>{this._updateIsSelected(e.detail)},r=()=>{this._updateEditedValue(e)};e.editorEnabled.addEventListener(`change`,t),e.focusedContent.addEventListener(`change`,n),e.editedContent.addEventListener(`change`,r),this._unsubEnabled=()=>e.editorEnabled.removeEventListener(`change`,t),this._unsubFocused=()=>e.focusedContent.removeEventListener(`change`,n),this._unsubEditedContent=()=>e.editedContent.removeEventListener(`change`,r)}_handlePress(e){e.stopPropagation();let t=hS();t&&t.focusedContent.set({dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),hS()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),hS()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,null)}_render(){let e=this._isInIframe&&this._editorEnabled,t=this._editedValue,n=e?typeof t==`string`||typeof t==`number`||typeof t==`boolean`?`wrapped-text`:`wrapped-slot`:`simple`;if(this._renderState!==n){this._rebuildContent(n);return}n!==`simple`&&this._selector&&(this._updateSelectorAttr(),n===`wrapped-text`&&this._selector.firstChild?.nodeType===Node.TEXT_NODE&&(this._selector.firstChild.data=String(t)))}_rebuildContent(e){let t=this.shadowRoot;for(;t.childNodes.length>1;)t.removeChild(t.lastChild);if(this._selector=null,e===`simple`)t.appendChild(document.createElement(`slot`));else{let n=document.createElement(`intlayer-content-selector`);this._selector=n,this._isSelected&&n.setAttribute(`is-selecting`,``),n.addEventListener(`intlayer:press`,e=>this._handlePress(e)),n.addEventListener(`intlayer:hover`,e=>this._handleHover(e)),n.addEventListener(`intlayer:unhover`,e=>this._handleUnhover(e)),e===`wrapped-text`?n.appendChild(document.createTextNode(String(this._editedValue))):n.appendChild(document.createElement(`slot`)),t.appendChild(n)}this._renderState=e}},bS=()=>{typeof customElements>`u`||customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,yS)},xS=typeof HTMLElement<`u`?HTMLElement:class{},SS=class extends xS{_dictionaryKey=``;_keyPathJson=`[]`;_locale=``;_editedText=null;_unsubManager=null;_unsubEditedContent=null;_selectorWrapper;_slot;static get observedAttributes(){return[`dictionary-key`,`key-path`,`locale`]}get dictionaryKey(){return this._dictionaryKey}set dictionaryKey(e){this._dictionaryKey=e,this._selectorWrapper.setAttribute(`dictionary-key`,e)}get keyPathJson(){return this._keyPathJson}set keyPathJson(e){this._keyPathJson=e,this._selectorWrapper.setAttribute(`key-path`,e)}get locale(){return this._locale}set locale(e){this._locale=e}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=`:host { display: contents; }`,e.appendChild(t),this._selectorWrapper=document.createElement(`intlayer-content-selector-wrapper`),this._slot=document.createElement(`slot`),this._selectorWrapper.appendChild(this._slot),e.appendChild(this._selectorWrapper)}attributeChangedCallback(e,t,n){let r=n??``;e===`dictionary-key`?(this._dictionaryKey=r,this._selectorWrapper.setAttribute(`dictionary-key`,r)):e===`key-path`?(this._keyPathJson=r||`[]`,this._selectorWrapper.setAttribute(`key-path`,this._keyPathJson)):e===`locale`&&(this._locale=r)}connectedCallback(){this._subscribeToManager()}disconnectedCallback(){this._teardown()}_teardown(){this._unsubManager?.(),this._unsubEditedContent?.(),this._unsubManager=null,this._unsubEditedContent=null}_getKeyPath(){try{return JSON.parse(this._keyPathJson)}catch{return[]}}_render(){for(;this._selectorWrapper.firstChild;)this._selectorWrapper.removeChild(this._selectorWrapper.firstChild);this._editedText===null?this._selectorWrapper.appendChild(this._slot):this._selectorWrapper.appendChild(document.createTextNode(this._editedText))}_resolveEditedText(e){let t=this._getKeyPath(),n=e.getContentValue(this._dictionaryKey,t);if(n==null){this._editedText=null,this._render();return}if(typeof n==`string`||typeof n==`number`){this._editedText=String(n),this._render();return}if(typeof n==`object`){let e=this._locale||void 0,r=De(n,{locale:e,dictionaryKey:this._dictionaryKey,keyPath:t},Ee(e));typeof r==`string`||typeof r==`number`?this._editedText=String(r):(console.error(`[intlayer-edited-content] Incorrect edited content format. Expected string. Value: ${JSON.stringify(r)}`),this._editedText=null),this._render();return}this._editedText=null,this._render()}_setupManagerSubscriptions(e){this._resolveEditedText(e);let t=()=>this._resolveEditedText(e);e.editedContent.addEventListener(`change`,t),this._unsubEditedContent=()=>e.editedContent.removeEventListener(`change`,t)}_subscribeToManager(){let e=hS();e&&this._setupManagerSubscriptions(e),this._unsubManager=_S(e=>{this._unsubEditedContent?.(),this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):(this._editedText=null,this._render())})}},CS=()=>{typeof customElements>`u`||customElements.get(`intlayer-edited-content`)||customElements.define(`intlayer-edited-content`,SS)},wS=()=>Math.random().toString(36).slice(2),TS=class{senderId;_config;_subscribers=new Map;_windowHandler=null;_seenMessageIds=new Set;constructor(e){this._config=e,this.senderId=wS()}start(){typeof window>`u`||this._windowHandler||(this._windowHandler=e=>{this._handleMessage(e)},window.addEventListener(`message`,this._windowHandler))}stop(){this._windowHandler&&=(window.removeEventListener(`message`,this._windowHandler),null)}send(e,t){let n={type:e,data:t,senderId:this.senderId,messageId:wS()};for(let e of this._config.allowedOrigins)e&&this._config.postMessageFn(n,e)}subscribe(e,t){return this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(t),()=>{this._subscribers.get(e)?.delete(t)}}_handleMessage(e){let t=e.data;if(!t||typeof t!=`object`)return;let{type:n,data:r,senderId:i,messageId:a}=t;if(!n||typeof n!=`string`||i===this.senderId)return;if(a){if(this._seenMessageIds.has(a))return;this._seenMessageIds.add(a),this._seenMessageIds.size>200&&this._seenMessageIds.clear()}let{allowedOrigins:o}=this._config;if(!(!o||o.length===0||o.includes(`*`)||o.filter(e=>!!e&&e!==``).some(t=>lS(t,e.origin))))return;let s=this._subscribers.get(n);if(s)for(let e of s)e(r,i)}},ES=class extends EventTarget{_value;_key;_messenger;_options;_unsubscribers=[];constructor(e,t,n={}){super(),this._key=e,this._messenger=t,this._options={emit:n.emit??!0,receive:n.receive??!0},n.initialValue!==void 0&&(this._value=n.initialValue)}get value(){return this._value}set(e){this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e})),this._options.emit&&this._messenger.send(`${this._key}/post`,e)}start(){if(this._options.receive){let e=this._messenger.subscribe(`${this._key}/post`,e=>{this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e}))});this._unsubscribers.push(e)}if(this._options.emit){let e=this._messenger.subscribe(`${this._key}/get`,(e,t)=>{t!==this._messenger.senderId&&this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)});this._unsubscribers.push(e)}this._options.receive&&this._value===void 0&&this._messenger.send(`${this._key}/get`)}stop(){for(let e of this._unsubscribers)e();this._unsubscribers.length=0}postCurrentValue(){this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)}},DS=`__intlayer_edited_content_bus__`,OS=`__intlayer_edited_content_bus_events__`,kS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[OS]||(e[OS]=new EventTarget),e[OS]},AS=()=>typeof window>`u`?{}:window[DS]??{},jS=(e,t)=>{typeof window<`u`&&(window[DS]=e),kS().dispatchEvent(new CustomEvent(`change`,{detail:{content:e,sourceId:t}}))},MS=e=>{let t=t=>{let{content:n,sourceId:r}=t.detail;e(n,r)},n=kS();return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},NS=`__intlayer_focused_content_bus__`,PS=`__intlayer_focused_content_bus_events__`,FS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[PS]||(e[PS]=new EventTarget),e[PS]},IS=()=>{if(typeof window>`u`)return;let e=window;if(e.__intlayer_focused_content_bus_set__)return e[NS]??null},LS=(e,t)=>{if(typeof window<`u`){let t=window;t[NS]=e,t.__intlayer_focused_content_bus_set__=!0}FS().dispatchEvent(new CustomEvent(`change`,{detail:{content:e,sourceId:t}}))},RS=e=>{let t=t=>{let{content:n,sourceId:r}=t.detail;e(n,r)},n=FS();return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},zS=class{_messenger;_mousedownHandler=null;_unsubscribeMerge=null;constructor(e){this._messenger=e}startInterceptor(){typeof window>`u`||(this._mousedownHandler=()=>{this._messenger.send(`INTLAYER_IFRAME_CLICKED`)},window.addEventListener(`mousedown`,this._mousedownHandler))}startMerger(){this._unsubscribeMerge=this._messenger.subscribe(`INTLAYER_IFRAME_CLICKED`,dS)}stopInterceptor(){this._mousedownHandler&&=(window.removeEventListener(`mousedown`,this._mousedownHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},BS=class{_messenger;_originalPushState=null;_originalReplaceState=null;_listeners=[];constructor(e){this._messenger=e}start(){if(typeof window>`u`)return;let e=()=>{this._messenger.send(`INTLAYER_URL_CHANGE/post`,window.location.pathname)};this._originalPushState=history.pushState,this._originalReplaceState=history.replaceState;let t=e=>function(...t){e.apply(this,t),window.dispatchEvent(new Event(`locationchange`))};history.pushState=t(this._originalPushState),history.replaceState=t(this._originalReplaceState);for(let t of[`locationchange`,`popstate`,`hashchange`,`load`]){let n=e;window.addEventListener(t,n),this._listeners.push([t,n])}e()}stop(){if(!(typeof window>`u`)){for(let[e,t]of this._listeners)window.removeEventListener(e,t);this._listeners=[],this._originalPushState&&=(history.pushState=this._originalPushState,null),this._originalReplaceState&&=(history.replaceState=this._originalReplaceState,null)}}},VS=(e,t,n)=>{let r=e,i=null,a=[];if(t.length===0)return n;try{for(let e=0;e<t.length;e++){let o=t[e];if(i=r,(o.type===`object`||o.type===`array`)&&(a=[o.key],(!r[o.key]||typeof r[o.key]!=`object`)&&(r[o.key]={}),r=r[o.key]),(o.type===`translation`||o.type===`enumeration`||o.type===`plural`)&&(a=[o.type,o.key],(!r[o.type]||typeof r[o.type]!=`object`)&&(r[o.type]={}),(!r[o.type][o.key]||typeof r[o.type][o.key]!=`object`)&&(r[o.type][o.key]={}),r=r[o.type][o.key]),(o.type===`enumeration`||o.type===`plural`||o.type===`condition`)&&o.type!==`enumeration`&&o.type!==`plural`&&(a=[o.type,o.key],r=r[o.type][o.key]),(o.type===`markdown`||o.type===`html`||o.type===`insertion`)&&(a=[o.type],r[o.type]??(r[o.type]=``),r=r[o.type]),o.type===`file`&&(a=[`content`],r=r.content),e===t.length-1&&i&&a.length>0){let e=i;for(let t of a.slice(0,-1))e=e[t];let t=a[a.length-1];if(n===void 0)if(Array.isArray(e)){let n=Number(t);!Number.isNaN(n)&&n>=0&&n<e.length&&e.splice(n,1)}else delete e[t];else e[t]=n}}return e}catch(r){return console.error(`Cannot edit dictionary by key path`,{dictionaryContent:e,keyPath:t,newValue:n},r),e}},HS=(e,t,n)=>{let r=structuredClone(e);for(let e of t)n&&r?.nodeType===`translation`&&(r=r?.[j]?.[n]),(e.type===`object`||e.type===`array`)&&(r=r?.[e.key]),(e.type===`translation`||e.type===`condition`||e.type===`enumeration`||e.type===`plural`)&&(r=r?.[e.type]?.[e.key]),(e.type===`markdown`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(r=r?.[e.type]);return r},US=(e,t,n)=>{let r=structuredClone(n);switch(e){case j:return{nodeType:j,[j]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case M:return{nodeType:M,[M]:{1:r??``}};case N:return{nodeType:N,[N]:{one:r??``,other:r??``}};case P:return{nodeType:P,[P]:{true:r??``,false:r??``}};case F:return{nodeType:F,[F]:{insertion:r??``}};case te:return{nodeType:te,[te]:{dictionaryKey:``}};case R:return{nodeType:R,[R]:r??``};case z:return{nodeType:z,[z]:r??``,customComponents:[]};case I:return{nodeType:I,[I]:r??``};case L:return{newKey:r??``};case ee:return[r??``];case B:return r??``;case re:return r??0;case ie:return r??!0;default:return r??``}},WS=e=>{if(typeof e==`string`)return``;if(typeof e==`number`)return 0;if(typeof e==`boolean`)return!0;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`html`?WS(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?WS(n):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(WS);let t=Object.entries(e).map(([e,t])=>[e,WS(t)]);return Object.fromEntries(t)},GS=e=>{if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`markdown`||t.nodeType===`html`?n:t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`file`?n[Object.keys(n)[0]]:t.nodeType===`nested`?void 0:n}return!e||typeof e!=`object`?e:Array.isArray(e)?e[0]:e},KS=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,qS=e=>[j,M,N,P,F,I,L,ee,te,ne,R,z,B,re,ie,ae,oe,se].includes(e),JS=e=>{if(typeof e==`string`)return B;if(KS(e)){let t=e.nodeType;return qS(t)?t:se}return Array.isArray(e)?ee:Ge(e)?ne:typeof e==`number`?re:typeof e==`boolean`?ie:e&&typeof e==`object`?L:e===null?oe:se},YS=(e,t,n)=>{let r=e,i=null,a=null;for(let e of n)i=r,(e.type===`object`||e.type===`array`)&&(a=e.key,r=r[e.key]),(e.type===`translation`||e.type===`enumeration`||e.type===`plural`||e.type===`condition`)&&(a=e.type,r=r[e.type][e.key]),(e.type===`markdown`||e.type===`reactNode`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(a=e.type,r=r[e.type]);if(i&&a!==null)if(Array.isArray(i))i[a]=r;else{let e={};for(let n of Object.keys(i))n===a&&t!==void 0?e[t]=r:e[n]=i[n];Object.keys(i).forEach(e=>{delete i[e]}),Object.assign(i,e)}return e},XS=class{messenger;editorEnabled;focusedContent;localeDictionaries;editedContent;configuration;currentLocale;displayedDictionaryKeys;_urlManager;_iframeInterceptor;_mode;_configuration;_unsubAreYouThere=null;_unsubActivate=null;_unsubClientReady=null;_displayedKeysObserver=null;_displayedKeysTimer=null;_displayedKeysListeners=[];_editedContentFromBus=!1;_unsubGlobalEditedContent=null;_editedContentBusHandler=null;_focusedContentFromBus=!1;_unsubGlobalFocusedContent=null;_focusedContentBusHandler=null;constructor(e){this._mode=e.mode,this._configuration=e.configuration,this.messenger=new TS(e.messenger),this.editorEnabled=new ES(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new ES(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new ES(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new ES(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new ES(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new ES(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this.displayedDictionaryKeys=new ES(`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`,initialValue:[]}),this._urlManager=new BS(this.messenger),this._iframeInterceptor=new zS(this.messenger)}start(){this.messenger.start(),this.editorEnabled.start(),this.focusedContent.start(),this.localeDictionaries.start(),this.editedContent.start(),this.configuration.start(),this.currentLocale.start(),this.displayedDictionaryKeys.start(),this._startEditedContentBusSync(),this._startFocusedContentBusSync(),this._mode===`client`?(this._urlManager.start(),this._iframeInterceptor.startInterceptor(),this._loadDictionaries(),this._startDisplayedDictionariesTracking(),this.messenger.send(`INTLAYER_EDITED_CONTENT_CHANGED/get`),this._configuration?.editor?.enabled!==!1&&this._setupActivationHandshake()):(this._iframeInterceptor.startMerger(),this._setupEditorHandshake())}stop(){this._unsubAreYouThere?.(),this._unsubActivate?.(),this._unsubClientReady?.(),this._unsubAreYouThere=null,this._unsubActivate=null,this._unsubClientReady=null,this.messenger.stop(),this.editorEnabled.stop(),this.focusedContent.stop(),this.localeDictionaries.stop(),this.editedContent.stop(),this.configuration.stop(),this.currentLocale.stop(),this.displayedDictionaryKeys.stop(),this._stopDisplayedDictionariesTracking(),this._stopEditedContentBusSync(),this._stopFocusedContentBusSync(),this._urlManager.stop(),this._iframeInterceptor.stopInterceptor(),this._iframeInterceptor.stopMerger()}pingClient(){this._mode===`editor`&&this.messenger.send(`INTLAYER_ARE_YOU_THERE`)}setFocusedContentKeyPath(e){let t=e.filter(e=>e.type!==j),n=this.focusedContent.value;n&&this.focusedContent.set({...n,keyPath:t})}setLocaleDictionary(e){if(!e.localId)return;let t=this.localeDictionaries.value??{};this.localeDictionaries.set({...t,[e.localId]:e})}setEditedDictionary(e){if(!e.localId){console.error(`setEditedDictionary: missing localId`,e);return}let t=this.editedContent.value??{};this.editedContent.set({...t,[e.localId]:e})}setEditedContent(e,t){let n=this.editedContent.value??{};this.editedContent.set({...n,[e]:{...n[e],content:t}})}addContent(e,t,n=[],r=!0){let i=this.editedContent.value??{},a=(this.localeDictionaries.value??{})[e]?.content,o=structuredClone(i[e]?.content??a),s=n;if(!r){let e=0,t=n.slice(0,-1),r=n[n.length-1],i=r.key;for(;HS(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=VS(o,s,t);this.editedContent.set({...i,[e]:{...i[e],content:c}})}renameContent(e,t,n=[]){let r=this.editedContent.value??{},i=(this.localeDictionaries.value??{})[e]?.content,a=YS(structuredClone(r[e]?.content??i),t,n);this.editedContent.set({...r,[e]:{...r[e],content:a}})}removeContent(e,t){let n=this.editedContent.value??{},r=(this.localeDictionaries.value??{})[e]?.content,i=VS(structuredClone(n[e]?.content??r),t,HS(r,t));this.editedContent.set({...n,[e]:{...n[e],content:i}})}restoreContent(e){let t={...this.editedContent.value??{}};delete t[e],this.editedContent.set(t)}clearContent(e){let t={...this.editedContent.value??{}};delete t[e],this.editedContent.set(t)}clearAllContent(){this.editedContent.set({})}getContentValue(e,t){let n=this.editedContent.value;if(!n)return;let r=t.filter(e=>e.type!==j),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:HS(n[e]?.content??{},r,this.currentLocale.value);let a=Object.keys(n).filter(t=>t.startsWith(`${e}:`)&&(!i||t in i));for(let e of a){let t=HS(n[e]?.content??{},r,this.currentLocale.value);if(t)return t}}_startEditedContentBusSync(){this._editedContentBusHandler=e=>{if(this._editedContentFromBus)return;let t=e.detail;jS(t,this.messenger.senderId)},this.editedContent.addEventListener(`change`,this._editedContentBusHandler),this._unsubGlobalEditedContent=MS((e,t)=>{t!==this.messenger.senderId&&(this._editedContentFromBus=!0,this.editedContent.set(e),this._editedContentFromBus=!1)});let e=AS();Object.keys(e).length>0&&(this._editedContentFromBus=!0,this.editedContent.set(e),this._editedContentFromBus=!1)}_stopEditedContentBusSync(){this._editedContentBusHandler&&=(this.editedContent.removeEventListener(`change`,this._editedContentBusHandler),null),this._unsubGlobalEditedContent?.(),this._unsubGlobalEditedContent=null}_startFocusedContentBusSync(){this._focusedContentBusHandler=e=>{if(this._focusedContentFromBus)return;let t=e.detail;LS(t,this.messenger.senderId)},this.focusedContent.addEventListener(`change`,this._focusedContentBusHandler),this._unsubGlobalFocusedContent=RS((e,t)=>{t!==this.messenger.senderId&&(this._focusedContentFromBus=!0,this.focusedContent.set(e),this._focusedContentFromBus=!1)});let e=IS();e!==void 0&&(this._focusedContentFromBus=!0,this.focusedContent.set(e),this._focusedContentFromBus=!1)}_stopFocusedContentBusSync(){this._focusedContentBusHandler&&=(this.focusedContent.removeEventListener(`change`,this._focusedContentBusHandler),null),this._unsubGlobalFocusedContent?.(),this._unsubGlobalFocusedContent=null}_scanDisplayedDictionaryKeys(){if(typeof document>`u`)return;let e=document.querySelectorAll(`intlayer-content-selector-wrapper[dictionary-key]`),t=Array.from(new Set(Array.from(e).map(e=>e.getAttribute(`dictionary-key`)??``).filter(Boolean)));this.displayedDictionaryKeys.set(t)}_startDisplayedDictionariesTracking(){if(typeof document>`u`||typeof MutationObserver>`u`)return;let e=()=>{this._displayedKeysTimer&&clearTimeout(this._displayedKeysTimer),this._displayedKeysTimer=setTimeout(()=>this._scanDisplayedDictionaryKeys(),100)};this._displayedKeysObserver=new MutationObserver(e),this._displayedKeysObserver.observe(document.body,{childList:!0,subtree:!0});for(let t of[`locationchange`,`popstate`]){let n=e;window.addEventListener(t,n),this._displayedKeysListeners.push([t,n])}this._scanDisplayedDictionaryKeys()}_stopDisplayedDictionariesTracking(){this._displayedKeysObserver?.disconnect(),this._displayedKeysObserver=null,this._displayedKeysTimer&&=(clearTimeout(this._displayedKeysTimer),null);for(let[e,t]of this._displayedKeysListeners)window.removeEventListener(e,t);this._displayedKeysListeners=[]}_setupEditorHandshake(){this._unsubClientReady=this.messenger.subscribe(`INTLAYER_CLIENT_READY`,()=>{this.editorEnabled.set(!0),this.messenger.send(`INTLAYER_EDITOR_ACTIVATE`)}),this.messenger.send(`INTLAYER_ARE_YOU_THERE`)}_setupActivationHandshake(){this.messenger.send(`INTLAYER_CLIENT_READY`),this._unsubAreYouThere=this.messenger.subscribe(`INTLAYER_ARE_YOU_THERE`,()=>{this.messenger.send(`INTLAYER_CLIENT_READY`)}),this._unsubActivate=this.messenger.subscribe(`INTLAYER_EDITOR_ACTIVATE`,()=>{this.editorEnabled.set(!0),this._broadcastData()})}_broadcastData(){let e=this.configuration.value;e&&this.messenger.send(`INTLAYER_CONFIGURATION/post`,e);let t=this.currentLocale.value;t&&this.messenger.send(`INTLAYER_CURRENT_LOCALE/post`,t);let n=this.localeDictionaries.value;n&&this.messenger.send(`INTLAYER_LOCALE_DICTIONARIES_CHANGED/post`,n)}async _loadDictionaries(){try{let e=(await Fe(async()=>{let{getUnmergedDictionaries:e}=await import(`./unmerged_dictionaries-DWe4YFkq.js`);return{getUnmergedDictionaries:e}},[])).getUnmergedDictionaries(),t=Object.fromEntries(Object.values(e).flat().map(e=>[e.localId,e]));this.localeDictionaries.set(t),this.editorEnabled.value&&this._broadcastData()}catch(e){console.warn(`[intlayer] Failed to load unmerged dictionaries:`,e)}}},ZS=typeof HTMLElement<`u`?HTMLElement:class{},QS=class extends ZS{_configuration=void 0;_locale=void 0;_initialized=!1;_unsubManager=null;static get observedAttributes(){return[`locale`]}get configuration(){return this._configuration}set configuration(e){this._configuration=e,this._initialized||this._init()}get locale(){return this._locale}set locale(e){this._locale=e,e&&this._initialized&&this._syncLocale(e)}attributeChangedCallback(e,t,n){e===`locale`&&n!==null&&(this._locale=n,this._initialized&&this._syncLocale(n))}connectedCallback(){this._init()}disconnectedCallback(){this._unsubManager?.(),this._unsubManager=null,this._initialized&&=(cC(),!1)}_init(){this._initialized||(sC(),this._initialized=!0,this._locale&&this._syncLocale(this._locale))}_syncLocale(e){let t=hS();t?t.currentLocale.set(e):(this._unsubManager?.(),this._unsubManager=_S(t=>{t&&(this._unsubManager?.(),this._unsubManager=null,t.currentLocale.set(e))}))}},$S=()=>{typeof customElements>`u`||customElements.get(`intlayer-editor`)||customElements.define(`intlayer-editor`,QS)},eC=250,tC=`
|
|
20
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,O.jsx)(Ny,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:D.cloneElement(e,{ref:u})})}var Fy=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Yu(Iy),d=(0,D.useId)(),f=!0,p=(0,D.useMemo)(()=>(f=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:e=>{u.set(e,!0);for(let e of u.values())if(!e)return;r&&r()},register:e=>(u.set(e,!1),()=>u.delete(e))}),[n,u,r]);return a&&f&&(p={...p}),(0,D.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),D.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,O.jsx)(Py,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,O.jsx)(Zu.Provider,{value:p,children:e})};function Iy(){return new Map}function Ly(e=!0){let t=(0,D.useContext)(Zu);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,D.useId)();(0,D.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,D.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Ry=e=>e.key||``;function zy(e){let t=[];return D.Children.forEach(e,e=>{(0,D.isValidElement)(e)&&t.push(e)}),t}var By=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1,anchorX:s=`left`,anchorY:c=`top`,root:l})=>{let[u,d]=Ly(o),f=(0,D.useMemo)(()=>zy(e),[e]),p=o&&!u?[]:f.map(Ry),m=(0,D.useRef)(!0),h=(0,D.useRef)(f),g=Yu(()=>new Map),_=(0,D.useRef)(new Set),[v,y]=(0,D.useState)(f),[b,x]=(0,D.useState)(f);Xu(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=Ry(b[e]);p.includes(t)?(g.delete(t),_.current.delete(t)):g.get(t)!==!0&&g.set(t,!1)}},[b,p.length,p.join(`-`)]);let S=[];if(f!==v){let e=[...f];for(let t=0;t<b.length;t++){let n=b[t],r=Ry(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(zy(e)),y(f),null}let{forceRender:C}=(0,D.useContext)(Ju);return(0,O.jsx)(O.Fragment,{children:b.map(e=>{let v=Ry(e),y=o&&!u?!1:f===b||p.includes(v);return(0,O.jsx)(Fy,{isPresent:y,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:l,onExitComplete:y?void 0:()=>{if(_.current.has(v))return;if(g.has(v))_.current.add(v),g.set(v,!0);else return;let e=!0;g.forEach(t=>{t||(e=!1)}),e&&(C?.(),x(h.current),o&&d?.(),r&&r())},anchorX:s,anchorY:c,children:e},v)})})},Vy=(0,D.createContext)({strict:!1}),Hy={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},Uy=!1;function Wy(){if(Uy)return;let e={};for(let t in Hy)e[t]={isEnabled:e=>Hy[t].some(t=>!!e[t])};Jg(e),Uy=!0}function Gy(){return Wy(),Yg()}function Ky(e){let t=Gy();for(let n in e)t[n]={...t[n],...e[n]};Jg(t)}function qy({children:e,features:t,strict:n=!1}){let[,r]=(0,D.useState)(!Jy(t)),i=(0,D.useRef)(void 0);if(!Jy(t)){let{renderer:e,...n}=t;i.current=e,Ky(n)}return(0,D.useEffect)(()=>{Jy(t)&&t().then(({renderer:e,...t})=>{Ky(t),i.current=e,r(!0)})},[]),(0,O.jsx)(Vy.Provider,{value:{renderer:i.current,strict:n},children:e})}function Jy(e){return typeof e==`function`}var Yy=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function Xy(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||Yy.has(e)}var Zy=c({default:()=>Qy}),Qy,$y=o((()=>{throw Qy={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),eb=e=>!Xy(e);function tb(e){typeof e==`function`&&(eb=t=>t.startsWith(`on`)?!Xy(t):e(t))}try{tb(($y(),d(Zy)).default)}catch{}function nb(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||fh(e[i])||(eb(i)||n===!0&&Xy(i)||!t&&!Xy(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var rb=(0,D.createContext)({});function ib(e,t){if(zg(e)){let{initial:t,animate:n}=e;return{initial:t===!1||Ig(t)?t:void 0,animate:Ig(n)?n:void 0}}return e.inherit===!1?{}:t}function ab(e){let{initial:t,animate:n}=ib(e,(0,D.useContext)(rb));return(0,D.useMemo)(()=>({initial:t,animate:n}),[ob(t),ob(n)])}function ob(e){return Array.isArray(e)?e.join(` `):e}var sb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function cb(e,t,n){for(let r in t)!fh(t[r])&&!k_(r,n)&&(e[r]=t[r])}function lb({transformTemplate:e},t){return(0,D.useMemo)(()=>{let n=sb();return C_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function ub(e,t){let n=e.style||{},r={};return cb(r,n,e),Object.assign(r,lb(e,t)),r}function db(e,t){let n={},r=ub(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var fb=()=>({...sb(),attrs:{}});function pb(e,t,n,r){let i=(0,D.useMemo)(()=>{let n=fb();return L_(n,t,z_(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};cb(t,e.style,e),i.style={...t,...i.style}}return i}var mb=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function hb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(mb.indexOf(e)>-1||/[A-Z]/u.test(e))}function gb(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??hb(e)?pb:db)(t,r,i,e),c=nb(t,typeof e==`string`,a),l=e===D.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,D.useMemo)(()=>fh(u)?u.get():u,[u]);return(0,D.createElement)(e,{...l,children:d})}function _b({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:vb(n,r,i,e),renderState:t()}}function vb(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Wv(a[e]);let{initial:o,animate:s}=e,c=zg(e),l=Bg(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Fg(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=ah(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var yb=e=>(t,n)=>{let r=(0,D.useContext)(rb),i=(0,D.useContext)(Zu),a=()=>_b(e,t,r,i);return n?a():Yu(a)},bb=yb({scrapeMotionValuesFromProps:A_,createRenderState:sb}),xb=yb({scrapeMotionValuesFromProps:V_,createRenderState:fb}),Sb=Symbol.for(`motionComponentSymbol`);function Cb(e,t,n){let r=(0,D.useRef)(n);(0,D.useInsertionEffect)(()=>{r.current=n});let i=(0,D.useRef)(null);return(0,D.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var wb=(0,D.createContext)({});function Tb(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Eb(e,t,n,r,i,a){let{visualElement:o}=(0,D.useContext)(rb),s=(0,D.useContext)(Vy),c=(0,D.useContext)(Zu),l=(0,D.useContext)(ky),u=l.reducedMotion,d=l.skipAnimations,f=(0,D.useRef)(null),p=(0,D.useRef)(!1);r||=s.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u,skipAnimations:d,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let m=f.current,h=(0,D.useContext)(wb);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Db(f.current,n,i,h);let g=(0,D.useRef)(!1);(0,D.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[gh],v=(0,D.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Xu(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,D.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Db(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Ob(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Tb(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Ob(e){if(e)return e.options.allowProjection===!1?Ob(e.parent):e.projection}function kb(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Ky(r);let a=n?n===`svg`:hb(e),o=a?xb:bb;function s(n,s){let c,l={...(0,D.useContext)(ky),...n,layoutId:Ab(n)},{isStatic:u}=l,d=ab(n),f=o(n,u);if(!u&&typeof window<`u`){jb(l,r);let t=Mb(l);c=t.MeasureLayout,d.visualElement=Eb(e,f,l,i,t.ProjectionNode,a)}return(0,O.jsxs)(rb.Provider,{value:d,children:[c&&d.visualElement?(0,O.jsx)(c,{visualElement:d.visualElement,...l}):null,gb(e,n,Cb(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,D.forwardRef)(s);return c[Sb]=e,c}function Ab({layoutId:e}){let t=(0,D.useContext)(Ju).id;return t&&e!==void 0?t+`-`+e:e}function jb(e,t){(0,D.useContext)(Vy).strict}function Mb(e){let{drag:t,layout:n}=Gy();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Nb(e,t){if(typeof Proxy>`u`)return kb;let n=new Map,r=(n,r)=>kb(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,kb(a,void 0,e,t)),n.get(a))})}var Pb=(e,t)=>t.isSVG??hb(e)?new H_(t):new M_(t,{allowProjection:e!==D.Fragment}),Fb=class extends Qg{constructor(e){super(e),e.animationState||=Y_(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Fg(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Ib=0,Lb={animation:{Feature:Fb},exit:{Feature:class extends Qg{constructor(){super(...arguments),this.id=Ib++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=oh(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Rb(e){return{point:{x:e.pageX,y:e.pageY}}}var zb=e=>t=>eg(t)&&e(t,Rb(t));function Bb(e,t,n,r){return Bv(e,t,zb(n),r)}var Vb=({current:e})=>e?e.ownerDocument.defaultView:null,Hb=(e,t)=>Math.abs(e-t);function Ub(e,t){let n=Hb(e.x,t.x),r=Hb(e.y,t.y);return Math.sqrt(n**2+r**2)}var Wb=new Set([`auto`,`scroll`]),Gb=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Kb(this.lastRawMoveEventInfo,this.transformPagePoint));let e=Jb(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Ub(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Vd;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=Kb(t,this.transformPagePoint),K.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=Jb(e.type===`pointercancel`?this.lastMoveEventInfo:Kb(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!eg(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Kb(Rb(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Vd;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,Jb(s,this.history)),this.removeListeners=sd(Bb(this.contextWindow,`pointermove`,this.handlePointerMove),Bb(this.contextWindow,`pointerup`,this.handlePointerUp),Bb(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Wb.has(e.overflowX)||Wb.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),K.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Bd(this.updatePoint)}};function Kb(e,t){return t?{point:t(e.point)}:e}function qb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jb({point:e},t){return{point:e,delta:qb(e,Xb(t)),offset:qb(e,Yb(t)),velocity:Zb(t,.1)}}function Yb(e){return e[0]}function Xb(e){return e[e.length-1]}function Zb(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=Xb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>ud(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>ud(t)*2&&(r=e[1]);let a=dd(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Qb(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Vf(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Vf(n,e,r.max):Math.min(e,n)),e}function $b(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function ex(e,{top:t,left:n,bottom:r,right:i}){return{x:$b(e.x,n,i),y:$b(e.y,t,r)}}function tx(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function nx(e,t){return{x:tx(e.x,t.x),y:tx(e.y,t.y)}}function rx(e,t){let n=.5,r=ov(e),i=ov(t);return i>r?n=cd(t.min,t.max-r,e.min):r>i&&(n=cd(e.min,e.max-i,t.min)),ed(0,1,n)}function ix(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var ax=.35;function ox(e=ax){return e===!1?e=0:e===!0&&(e=ax),{x:sx(e,`left`,`right`),y:sx(e,`top`,`bottom`)}}function sx(e,t,n){return{min:cx(e,t),max:cx(e,n)}}function cx(e,t){return typeof e==`number`?e:e[t]||0}var lx=new WeakMap,ux=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ng(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Rb(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Yh(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ov(e=>{let t=this.getAxisMotionValue(e).get()||0;if(gf.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=ov(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&K.update(()=>i(e,t),!1,!0),mh(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=mx(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&K.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new Gb(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Vb(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&K.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!px(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=Qb(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Tb(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=ex(n.layoutBox,e):this.constraints=!1,this.elastic=ox(t),r!==this.constraints&&!Tb(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Ov(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=ix(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Tb(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=y_(n,r.root,this.visualElement.getTransformPagePoint()),a=nx(r.layout.layoutBox,i);if(t){let e=t(e_(a));this.hasMutatedConstraints=!!e,e&&(a=$g(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Ov(o=>{if(!px(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return mh(this.visualElement,e),n.start(eh(e,n,0,t,this.visualElement,!1))}stopAnimation(){Ov(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){Ov(t=>{let{drag:n}=this.getProps();if(!px(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-Vf(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Tb(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Ov(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=rx({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ov(t=>{if(!px(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Vf(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;lx.set(this.visualElement,this);let e=this.visualElement.current,t=Bb(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ig(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Tb(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=fx(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),K.read(r);let o=Bv(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Ov(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=ax,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function dx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function fx(e,t,n){let r=Eg(e,dx(n)),i=Eg(t,dx(n));return()=>{r(),i()}}function px(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function mx(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var hx=class extends Qg{constructor(e){super(e),this.removeGroupControls=od,this.removeListeners=od,this.controls=new ux(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||od}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},gx=e=>(t,n)=>{e&&K.update(()=>e(t,n),!1,!0)},_x=class extends Qg{constructor(){super(...arguments),this.removePointerDownListener=od}onPointerDown(e){this.session=new Gb(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vb(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:gx(e),onStart:gx(t),onMove:gx(n),onEnd:(e,t)=>{delete this.session,r&&K.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Bb(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},vx=!1,yx=class extends D.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),vx&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Kv.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),vx=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||K.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),Gh.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;vx=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function bx(e){let[t,n]=Ly(),r=(0,D.useContext)(Ju);return(0,O.jsx)(yx,{...e,layoutGroup:r,switchLayoutGroup:(0,D.useContext)(wb),isPresent:t,safeToRemove:n})}var xx={pan:{Feature:_x},drag:{Feature:hx,ProjectionNode:Oy,MeasureLayout:bx}};function Sx(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&K.postRender(()=>i(t,Rb(t)))}var Cx=class extends Qg{mount(){let{current:e}=this.node;e&&(this.unmount=Qh(e,(e,t)=>(Sx(this.node,t,`Start`),e=>Sx(this.node,e,`End`))))}unmount(){}},wx=class extends Qg{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=sd(Bv(this.node.current,`focus`,()=>this.onFocus()),Bv(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Tx(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&K.postRender(()=>i(t,Rb(t)))}var Ex=class extends Qg{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=dg(e,(e,t)=>(Tx(this.node,t,`Start`),(e,{success:t})=>Tx(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Dx=new WeakMap,Ox=new WeakMap,kx=e=>{let t=Dx.get(e.target);t&&t(e)},Ax=e=>{e.forEach(kx)};function jx({root:e,...t}){let n=e||document;Ox.has(n)||Ox.set(n,{});let r=Ox.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Ax,{root:e,...t})),r[i]}function Mx(e,t,n){let r=jx(t);return Dx.set(e,n),r.observe(e),()=>{Dx.delete(e),r.unobserve(e)}}var Nx={some:0,all:1},Px=class extends Qg{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Nx[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Mx(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Fx(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Fx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Ix={inView:{Feature:Px},tap:{Feature:Ex},focus:{Feature:wx},hover:{Feature:Cx}},Lx={layout:{ProjectionNode:Oy,MeasureLayout:bx}},Rx=Nb({...Lb,...Ix,...xx,...Lx},Pb),zx={renderer:Pb,...Lb,...Ix},Bx=e=>{let t=(0,V.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,O.jsx)(qy,{features:zx,children:n}),t[0]=n,t[1]=r),r},Vx=e=>{let t=(0,V.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,O.jsx)(Ku,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,O.jsx)(Bx,{children:(0,O.jsxs)(Mo,{children:[r,n]})}),t[1]=n,t[2]=i),i},Hx=e=>{let t=(0,V.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,O.jsx)(ei,{children:(0,O.jsx)(pr,{children:(0,O.jsx)(dr,{path:`*`,element:n})})}),t[0]=n,t[1]=r),r},Ux={key:`dictionary-edition-drawer`,content:{nodeType:`translation`,translation:{en:{openDictionaryEditor:{popoverContent:`Open Dictionary in Editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},"en-GB":{openDictionaryEditor:{popoverContent:`Click to open the dictionary in the editor`,label:`Click to open the dictionary in the editor`},backButtonText:`Dictionary list`,modalTitle:`Edit dictionary`,noDictionaryFocused:`No dictionary focused`,focusedDictionaryNotFound:`Focused dictionary not found`},fr:{openDictionaryEditor:{popoverContent:`Ouvrir le dictionnaire dans l’éditeur`,label:`Cliquez pour ouvrir le dictionnaire dans l’éditeur`},backButtonText:`Liste des dictionnaires`,modalTitle:`Modifier le dictionnaire`,noDictionaryFocused:`Aucun dictionnaire sélectionné`,focusedDictionaryNotFound:`Dictionnaire focalisé non trouvé`},es:{openDictionaryEditor:{popoverContent:`Abrir el diccionario en el editor`,label:`Haga clic para abrir el diccionario en el editor`},backButtonText:`Lista de diccionarios`,modalTitle:`Editar el diccionario`,noDictionaryFocused:`No hay diccionario enfocado`,focusedDictionaryNotFound:`Diccionario enfocado no encontrado`},de:{openDictionaryEditor:{popoverContent:`Wörterbuch im Editor öffnen`,label:`Klicken Sie hier, um das Wörterbuch im Editor zu öffnen`},backButtonText:`Wörterbuchliste`,modalTitle:`Wörterbuch bearbeiten`,noDictionaryFocused:`Kein Wörterbuch ausgewählt`,focusedDictionaryNotFound:`Ausgewähltes Wörterbuch nicht gefunden`},ja:{openDictionaryEditor:{popoverContent:`エディターで辞書を開く`,label:`エディターで辞書を開く`},backButtonText:`辞書リスト`,modalTitle:`辞書を編集`,noDictionaryFocused:`フォーカスされた辞書がありません`,focusedDictionaryNotFound:`フォーカスされた辞書が見つかりません`},ko:{openDictionaryEditor:{popoverContent:`편집기에서 사전 열기`,label:`편집기에서 사전 열기`},backButtonText:`사전 목록`,modalTitle:`사전 편집`,noDictionaryFocused:`포커스가 있는 사전이 없습니다`,focusedDictionaryNotFound:`포커스가 있는 사전이 없습니다`},zh:{openDictionaryEditor:{popoverContent:`点击打开词典到编辑器`,label:`点击打开词典到编辑器`},backButtonText:`词典列表`,modalTitle:`编辑词典`,noDictionaryFocused:`没有聚焦的词典`,focusedDictionaryNotFound:`没有聚焦的词典`},it:{openDictionaryEditor:{popoverContent:`Apri il dizionario nell’editor`,label:`Fai clic per aprire il dizionario nell’editor`},backButtonText:`Elenco di dizionari`,modalTitle:`Modifica dizionario`,noDictionaryFocused:`Nessun dizionario selezionato`,focusedDictionaryNotFound:`Nessun dizionario selezionato`},pt:{openDictionaryEditor:{popoverContent:`Abrir o dicionário no editor`,label:`Clique para abrir o dicionário no editor`},backButtonText:`Lista de dicionários`,modalTitle:`Editar dicionário`,noDictionaryFocused:`Nenhum dicionário focalizado`,focusedDictionaryNotFound:`Nenhum dicionário focalizado`},hi:{openDictionaryEditor:{popoverContent:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`,label:`एडिटर में शब्दकोश खोलने के लिए क्लिक करें`},backButtonText:`शब्दकोश सूची`,modalTitle:`शब्दकोश संपादित करें`,noDictionaryFocused:`कोई फोकस शब्दकोश नहीं है`,focusedDictionaryNotFound:`कोई फोकस शब्दकोश नहीं है`},ar:{openDictionaryEditor:{popoverContent:`انقر لفتح قاموس في المحرر`,label:`انقر لفتح قاموس في المحرر`},backButtonText:`قائمة القوامل`,modalTitle:`تحرير قاموس`,noDictionaryFocused:`لا يوجد قاموس مرتبط`,focusedDictionaryNotFound:`لا يوجد قاموس مرتبط`},ru:{openDictionaryEditor:{popoverContent:`Нажмите, чтобы открыть словарь в редакторе`,label:`Нажмите, чтобы открыть словарь в редакторе`},backButtonText:`Список словарей`,modalTitle:`Редактировать словарь`,noDictionaryFocused:`Нет фокусированного словаря`,focusedDictionaryNotFound:`Нет фокусированного словаря`}}},localIds:[`dictionary-edition-drawer::local::client/src/components/Editor/DictionaryEditionDrawer/dictionaryEditionDrawer.content.ts`]},Wx=(0,D.createContext)(null),Gx=({children:e,manager:t})=>(0,O.jsx)(Wx.Provider,{value:t,children:e}),Kx=()=>(0,D.useContext)(Wx),qx=(0,D.createContext)(void 0),Jx=()=>{let e=(0,V.c)(16),t=Kx(),n=(0,D.useContext)(qx),[r,i]=(0,D.useState)(t?.focusedContent.value??n?.focusedContent??null),a;e[0]!==t||e[1]!==n?.focusedContent?(a=()=>{if(!t){i(n?.focusedContent??null);return}let e=e=>i(e.detail);return t.focusedContent.addEventListener(`change`,e),()=>t.focusedContent.removeEventListener(`change`,e)},e[0]=t,e[1]=n?.focusedContent,e[2]=a):a=e[2];let o=n?.focusedContent,s;e[3]!==t||e[4]!==o?(s=[t,o],e[3]=t,e[4]=o,e[5]=s):s=e[5],(0,D.useEffect)(a,s);let c;e[6]!==t||e[7]!==n?(c=e=>{n?n.setFocusedContent(e):t&&t.focusedContent.set(e)},e[6]=t,e[7]=n,e[8]=c):c=e[8];let l=c,u;e[9]!==t||e[10]!==n?(u=e=>{n?n.setFocusedContentKeyPath(e):t&&t.setFocusedContentKeyPath(e)},e[9]=t,e[10]=n,e[11]=u):u=e[11];let d=u,f;return e[12]!==r||e[13]!==l||e[14]!==d?(f={focusedContent:r,setFocusedContent:l,setFocusedContentKeyPath:d},e[12]=r,e[13]=l,e[14]=d,e[15]=f):f=e[15],f},Yx=(e,t)=>{try{let n=new URL(e),r=new URL(t);if(n.protocol!==r.protocol||n.hostname!==r.hostname||n.port!==r.port)return!1;let i=n.pathname.replace(/\/$/,``),a=r.pathname.replace(/\/$/,``);return!(i!==``&&a!==``&&i!==a)}catch(n){return console.error(`Invalid URL(s)`,n,{url1:e,url2:t}),!1}},Xx=function(e){return e.INTLAYER_CLIENT_READY=`INTLAYER_CLIENT_READY`,e.INTLAYER_ARE_YOU_THERE=`INTLAYER_ARE_YOU_THERE`,e.INTLAYER_EDITOR_ACTIVATE=`INTLAYER_EDITOR_ACTIVATE`,e.INTLAYER_EDITOR_ENABLED=`INTLAYER_EDITOR_ENABLED`,e.INTLAYER_CONFIGURATION=`INTLAYER_CONFIGURATION`,e.INTLAYER_CURRENT_LOCALE=`INTLAYER_CURRENT_LOCALE`,e.INTLAYER_URL_CHANGE=`INTLAYER_URL_CHANGE`,e.INTLAYER_LOCALE_DICTIONARIES_CHANGED=`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,e.INTLAYER_DISTANT_DICTIONARIES_CHANGED=`INTLAYER_DISTANT_DICTIONARIES_CHANGED`,e.INTLAYER_HOVERED_CONTENT_CHANGED=`INTLAYER_HOVERED_CONTENT_CHANGED`,e.INTLAYER_FOCUSED_CONTENT_CHANGED=`INTLAYER_FOCUSED_CONTENT_CHANGED`,e.INTLAYER_EDITED_CONTENT_CHANGED=`INTLAYER_EDITED_CONTENT_CHANGED`,e.INTLAYER_IFRAME_CLICKED=`INTLAYER_IFRAME_CLICKED`,e.INTLAYER_DISPLAYED_DICTIONARY_KEYS=`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,e}({}),Zx=e=>{let t=new MouseEvent(`mousedown`,{bubbles:!0,cancelable:!0,view:window}),n=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window});Object.assign(n,{iframeData:e}),Object.assign(t,{iframeData:e}),window.dispatchEvent(n),window.dispatchEvent(t)},Qx=`__intlayer_editor_manager__`,$x=`__intlayer_editor_manager_events__`,eS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[$x]||(e[$x]=new EventTarget),e[$x]},tS=()=>typeof window>`u`?null:window[Qx]??null,nS=e=>{if(typeof window<`u`){let t=window;t[Qx]=e}eS().dispatchEvent(new CustomEvent(`change`,{detail:e}))},rS=e=>{let t=eS(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},iS=typeof HTMLElement<`u`?HTMLElement:class{},aS=class extends iS{_keyPathJson=`[]`;_dictionaryKey=``;_editorEnabled=!1;_isInIframe=!1;_isSelected=!1;_editedValue=void 0;_renderState=null;_selector=null;_unsubManager=null;_unsubEnabled=null;_unsubFocused=null;_unsubEditedContent=null;static get observedAttributes(){return[`key-path`,`dictionary-key`]}get keyPathJson(){return this._keyPathJson}set keyPathJson(e){this._keyPathJson=e;let t=tS();t&&this._updateEditedValue(t)}get dictionaryKey(){return this._dictionaryKey}set dictionaryKey(e){this._dictionaryKey=e;let t=tS();t&&this._updateEditedValue(t)}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=`:host { display: contents; }`,e.appendChild(t)}attributeChangedCallback(e,t,n){if(e===`key-path`){this._keyPathJson=n??`[]`;let e=tS();e&&this._updateEditedValue(e)}else if(e===`dictionary-key`){this._dictionaryKey=n??``;let e=tS();e&&this._updateEditedValue(e)}}connectedCallback(){typeof window<`u`&&(this._isInIframe=window.self!==window.top),this._subscribeToManager(),this._render()}disconnectedCallback(){this._teardown()}_teardown(){this._unsubManager?.(),this._unsubEnabled?.(),this._unsubFocused?.(),this._unsubEditedContent?.(),this._unsubManager=null,this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null}_getRawKeyPath(){try{return JSON.parse(this._keyPathJson)}catch{return[]}}_getFilteredKeyPath(){return this._getRawKeyPath().filter(e=>e.type!==j)}_updateEditedValue(e){let t=this._getFilteredKeyPath();if(!this._dictionaryKey||t.length===0){this._editedValue=void 0,this._render();return}let n=this._getRawKeyPath(),r=n[n.length-1]?.type;if(r===`markdown`||r===`html`||r===`insertion`||r===`file`){this._editedValue=void 0,this._render();return}let i=e.getContentValue(this._dictionaryKey,t);if(typeof i==`object`&&i&&i.nodeType===`translation`){let t=e.currentLocale.value;i=t?i[j][t]:void 0}this._editedValue=i,this._render()}_updateIsSelected(e){if(!e){this._isSelected=!1,this._updateSelectorAttr();return}let t=this._getFilteredKeyPath(),n=this._isSelected;this._isSelected=e.dictionaryKey===this._dictionaryKey&&(e.keyPath?.length??0)>0&&Qe(e.keyPath??[],t),this._updateSelectorAttr(),this._isSelected&&!n&&this._scrollIntoViewIfNeeded()}_scrollIntoViewIfNeeded(){try{let e;if(this._selector){let t=this._selector.shadowRoot?.querySelector(`.wrapper`);if(t){let n=t.getBoundingClientRect();(n.width>0||n.height>0)&&(e=n)}}if(!e&&this.childNodes.length>0){let t=document.createRange();t.selectNodeContents(this);let n=t.getBoundingClientRect();(n.width>0||n.height>0)&&(e=n)}e||=this.getBoundingClientRect();let t=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth;if(!(e.width>0&&e.height>0&&e.bottom>0&&e.right>0&&e.top<t&&e.left<n)){let n=window.scrollY??document.documentElement.scrollTop,r=e.top+n-t*.25;window.scrollTo({top:Math.max(0,r),behavior:`smooth`})}}catch{}}_updateSelectorAttr(){this._selector&&(this._isSelected?this._selector.setAttribute(`is-selecting`,``):this._selector.removeAttribute(`is-selecting`))}_subscribeToManager(){let e=tS();e&&this._setupManagerSubscriptions(e),this._unsubManager=rS(e=>{this._unsubEnabled?.(),this._unsubFocused?.(),this._unsubEditedContent?.(),this._unsubEnabled=null,this._unsubFocused=null,this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):(this._editorEnabled=!1,this._isSelected=!1,this._editedValue=void 0,this._render())})}_setupManagerSubscriptions(e){this._editorEnabled=e.editorEnabled.value??!1,this._updateIsSelected(e.focusedContent.value),this._updateEditedValue(e);let t=e=>{this._editorEnabled=e.detail,this._render()},n=e=>{this._updateIsSelected(e.detail)},r=()=>{this._updateEditedValue(e)};e.editorEnabled.addEventListener(`change`,t),e.focusedContent.addEventListener(`change`,n),e.editedContent.addEventListener(`change`,r),this._unsubEnabled=()=>e.editorEnabled.removeEventListener(`change`,t),this._unsubFocused=()=>e.focusedContent.removeEventListener(`change`,n),this._unsubEditedContent=()=>e.editedContent.removeEventListener(`change`,r)}_handlePress(e){e.stopPropagation();let t=tS();t&&t.focusedContent.set({dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),tS()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),tS()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,null)}_render(){let e=this._isInIframe&&this._editorEnabled,t=this._editedValue,n=e?typeof t==`string`||typeof t==`number`||typeof t==`boolean`?`wrapped-text`:`wrapped-slot`:`simple`;if(this._renderState!==n){this._rebuildContent(n);return}n!==`simple`&&this._selector&&(this._updateSelectorAttr(),n===`wrapped-text`&&this._selector.firstChild?.nodeType===Node.TEXT_NODE&&(this._selector.firstChild.data=String(t)))}_rebuildContent(e){let t=this.shadowRoot;for(;t.childNodes.length>1;)t.removeChild(t.lastChild);if(this._selector=null,e===`simple`)t.appendChild(document.createElement(`slot`));else{let n=document.createElement(`intlayer-content-selector`);this._selector=n,this._isSelected&&n.setAttribute(`is-selecting`,``),n.addEventListener(`intlayer:press`,e=>this._handlePress(e)),n.addEventListener(`intlayer:hover`,e=>this._handleHover(e)),n.addEventListener(`intlayer:unhover`,e=>this._handleUnhover(e)),e===`wrapped-text`?n.appendChild(document.createTextNode(String(this._editedValue))):n.appendChild(document.createElement(`slot`)),t.appendChild(n)}this._renderState=e}},oS=()=>{typeof customElements>`u`||customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,aS)},sS=typeof HTMLElement<`u`?HTMLElement:class{},cS=class extends sS{_dictionaryKey=``;_keyPathJson=`[]`;_locale=``;_editedText=null;_unsubManager=null;_unsubEditedContent=null;_selectorWrapper;_slot;static get observedAttributes(){return[`dictionary-key`,`key-path`,`locale`]}get dictionaryKey(){return this._dictionaryKey}set dictionaryKey(e){this._dictionaryKey=e,this._selectorWrapper.setAttribute(`dictionary-key`,e)}get keyPathJson(){return this._keyPathJson}set keyPathJson(e){this._keyPathJson=e,this._selectorWrapper.setAttribute(`key-path`,e)}get locale(){return this._locale}set locale(e){this._locale=e}constructor(){super();let e=this.attachShadow({mode:`open`}),t=document.createElement(`style`);t.textContent=`:host { display: contents; }`,e.appendChild(t),this._selectorWrapper=document.createElement(`intlayer-content-selector-wrapper`),this._slot=document.createElement(`slot`),this._selectorWrapper.appendChild(this._slot),e.appendChild(this._selectorWrapper)}attributeChangedCallback(e,t,n){let r=n??``;e===`dictionary-key`?(this._dictionaryKey=r,this._selectorWrapper.setAttribute(`dictionary-key`,r)):e===`key-path`?(this._keyPathJson=r||`[]`,this._selectorWrapper.setAttribute(`key-path`,this._keyPathJson)):e===`locale`&&(this._locale=r)}connectedCallback(){this._subscribeToManager()}disconnectedCallback(){this._teardown()}_teardown(){this._unsubManager?.(),this._unsubEditedContent?.(),this._unsubManager=null,this._unsubEditedContent=null}_getKeyPath(){try{return JSON.parse(this._keyPathJson)}catch{return[]}}_render(){for(;this._selectorWrapper.firstChild;)this._selectorWrapper.removeChild(this._selectorWrapper.firstChild);this._editedText===null?this._selectorWrapper.appendChild(this._slot):this._selectorWrapper.appendChild(document.createTextNode(this._editedText))}_resolveEditedText(e){let t=this._getKeyPath(),n=e.getContentValue(this._dictionaryKey,t);if(n==null){this._editedText=null,this._render();return}if(typeof n==`string`||typeof n==`number`){this._editedText=String(n),this._render();return}if(typeof n==`object`){let e=this._locale||void 0,r=De(n,{locale:e,dictionaryKey:this._dictionaryKey,keyPath:t},Ee(e));typeof r==`string`||typeof r==`number`?this._editedText=String(r):(console.error(`[intlayer-edited-content] Incorrect edited content format. Expected string. Value: ${JSON.stringify(r)}`),this._editedText=null),this._render();return}this._editedText=null,this._render()}_setupManagerSubscriptions(e){this._resolveEditedText(e);let t=()=>this._resolveEditedText(e);e.editedContent.addEventListener(`change`,t),this._unsubEditedContent=()=>e.editedContent.removeEventListener(`change`,t)}_subscribeToManager(){let e=tS();e&&this._setupManagerSubscriptions(e),this._unsubManager=rS(e=>{this._unsubEditedContent?.(),this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):(this._editedText=null,this._render())})}},lS=()=>{typeof customElements>`u`||customElements.get(`intlayer-edited-content`)||customElements.define(`intlayer-edited-content`,cS)},uS=()=>Math.random().toString(36).slice(2),dS=class{senderId;_config;_subscribers=new Map;_windowHandler=null;_seenMessageIds=new Set;constructor(e){this._config=e,this.senderId=uS()}start(){typeof window>`u`||this._windowHandler||(this._windowHandler=e=>{this._handleMessage(e)},window.addEventListener(`message`,this._windowHandler))}stop(){this._windowHandler&&=(window.removeEventListener(`message`,this._windowHandler),null)}send(e,t){let n={type:e,data:t,senderId:this.senderId,messageId:uS()};for(let e of this._config.allowedOrigins)e&&this._config.postMessageFn(n,e)}subscribe(e,t){return this._subscribers.has(e)||this._subscribers.set(e,new Set),this._subscribers.get(e).add(t),()=>{this._subscribers.get(e)?.delete(t)}}_handleMessage(e){let t=e.data;if(!t||typeof t!=`object`)return;let{type:n,data:r,senderId:i,messageId:a}=t;if(!n||typeof n!=`string`||i===this.senderId)return;if(a){if(this._seenMessageIds.has(a))return;this._seenMessageIds.add(a),this._seenMessageIds.size>200&&this._seenMessageIds.clear()}let{allowedOrigins:o}=this._config;if(!(!o||o.length===0||o.includes(`*`)||o.filter(e=>!!e&&e!==``).some(t=>Yx(t,e.origin))))return;let s=this._subscribers.get(n);if(s)for(let e of s)e(r,i)}},fS=class extends EventTarget{_value;_key;_messenger;_options;_unsubscribers=[];constructor(e,t,n={}){super(),this._key=e,this._messenger=t,this._options={emit:n.emit??!0,receive:n.receive??!0},n.initialValue!==void 0&&(this._value=n.initialValue)}get value(){return this._value}set(e){this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e})),this._options.emit&&this._messenger.send(`${this._key}/post`,e)}start(){if(this._options.receive){let e=this._messenger.subscribe(`${this._key}/post`,e=>{this._value=e,this.dispatchEvent(new CustomEvent(`change`,{detail:e}))});this._unsubscribers.push(e)}if(this._options.emit){let e=this._messenger.subscribe(`${this._key}/get`,(e,t)=>{t!==this._messenger.senderId&&this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)});this._unsubscribers.push(e)}this._options.receive&&this._value===void 0&&this._messenger.send(`${this._key}/get`)}stop(){for(let e of this._unsubscribers)e();this._unsubscribers.length=0}postCurrentValue(){this._value!==void 0&&this._messenger.send(`${this._key}/post`,this._value)}},pS=`__intlayer_edited_content_bus__`,mS=`__intlayer_edited_content_bus_events__`,hS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[mS]||(e[mS]=new EventTarget),e[mS]},gS=()=>typeof window>`u`?{}:window[pS]??{},_S=(e,t)=>{typeof window<`u`&&(window[pS]=e),hS().dispatchEvent(new CustomEvent(`change`,{detail:{content:e,sourceId:t}}))},vS=e=>{let t=t=>{let{content:n,sourceId:r}=t.detail;e(n,r)},n=hS();return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},yS=`__intlayer_focused_content_bus__`,bS=`__intlayer_focused_content_bus_events__`,xS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[bS]||(e[bS]=new EventTarget),e[bS]},SS=()=>{if(typeof window>`u`)return;let e=window;if(e.__intlayer_focused_content_bus_set__)return e[yS]??null},CS=(e,t)=>{if(typeof window<`u`){let t=window;t[yS]=e,t.__intlayer_focused_content_bus_set__=!0}xS().dispatchEvent(new CustomEvent(`change`,{detail:{content:e,sourceId:t}}))},wS=e=>{let t=t=>{let{content:n,sourceId:r}=t.detail;e(n,r)},n=xS();return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},TS=class{_messenger;_mousedownHandler=null;_unsubscribeMerge=null;constructor(e){this._messenger=e}startInterceptor(){typeof window>`u`||(this._mousedownHandler=()=>{this._messenger.send(`INTLAYER_IFRAME_CLICKED`)},window.addEventListener(`mousedown`,this._mousedownHandler))}startMerger(){this._unsubscribeMerge=this._messenger.subscribe(`INTLAYER_IFRAME_CLICKED`,Zx)}stopInterceptor(){this._mousedownHandler&&=(window.removeEventListener(`mousedown`,this._mousedownHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},ES=class{_messenger;_originalPushState=null;_originalReplaceState=null;_listeners=[];constructor(e){this._messenger=e}start(){if(typeof window>`u`)return;let e=()=>{this._messenger.send(`INTLAYER_URL_CHANGE/post`,window.location.pathname)};this._originalPushState=history.pushState,this._originalReplaceState=history.replaceState;let t=e=>function(...t){e.apply(this,t),window.dispatchEvent(new Event(`locationchange`))};history.pushState=t(this._originalPushState),history.replaceState=t(this._originalReplaceState);for(let t of[`locationchange`,`popstate`,`hashchange`,`load`]){let n=e;window.addEventListener(t,n),this._listeners.push([t,n])}e()}stop(){if(!(typeof window>`u`)){for(let[e,t]of this._listeners)window.removeEventListener(e,t);this._listeners=[],this._originalPushState&&=(history.pushState=this._originalPushState,null),this._originalReplaceState&&=(history.replaceState=this._originalReplaceState,null)}}},DS=(e,t,n)=>{let r=e,i=null,a=[];if(t.length===0)return n;try{for(let e=0;e<t.length;e++){let o=t[e];if(i=r,(o.type===`object`||o.type===`array`)&&(a=[o.key],(!r[o.key]||typeof r[o.key]!=`object`)&&(r[o.key]={}),r=r[o.key]),(o.type===`translation`||o.type===`enumeration`||o.type===`plural`)&&(a=[o.type,o.key],(!r[o.type]||typeof r[o.type]!=`object`)&&(r[o.type]={}),(!r[o.type][o.key]||typeof r[o.type][o.key]!=`object`)&&(r[o.type][o.key]={}),r=r[o.type][o.key]),(o.type===`enumeration`||o.type===`plural`||o.type===`condition`)&&o.type!==`enumeration`&&o.type!==`plural`&&(a=[o.type,o.key],r=r[o.type][o.key]),(o.type===`markdown`||o.type===`html`||o.type===`insertion`)&&(a=[o.type],r[o.type]??(r[o.type]=``),r=r[o.type]),o.type===`file`&&(a=[`content`],r=r.content),e===t.length-1&&i&&a.length>0){let e=i;for(let t of a.slice(0,-1))e=e[t];let t=a[a.length-1];if(n===void 0)if(Array.isArray(e)){let n=Number(t);!Number.isNaN(n)&&n>=0&&n<e.length&&e.splice(n,1)}else delete e[t];else e[t]=n}}return e}catch(r){return console.error(`Cannot edit dictionary by key path`,{dictionaryContent:e,keyPath:t,newValue:n},r),e}},OS=(e,t,n)=>{let r=structuredClone(e);for(let e of t)n&&r?.nodeType===`translation`&&(r=r?.[j]?.[n]),(e.type===`object`||e.type===`array`)&&(r=r?.[e.key]),(e.type===`translation`||e.type===`condition`||e.type===`enumeration`||e.type===`plural`)&&(r=r?.[e.type]?.[e.key]),(e.type===`markdown`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(r=r?.[e.type]);return r},kS=(e,t,n)=>{let r=structuredClone(n);switch(e){case j:return{nodeType:j,[j]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case M:return{nodeType:M,[M]:{1:r??``}};case N:return{nodeType:N,[N]:{one:r??``,other:r??``}};case P:return{nodeType:P,[P]:{true:r??``,false:r??``}};case F:return{nodeType:F,[F]:{insertion:r??``}};case te:return{nodeType:te,[te]:{dictionaryKey:``}};case R:return{nodeType:R,[R]:r??``};case z:return{nodeType:z,[z]:r??``,customComponents:[]};case I:return{nodeType:I,[I]:r??``};case L:return{newKey:r??``};case ee:return[r??``];case B:return r??``;case re:return r??0;case ie:return r??!0;default:return r??``}},AS=e=>{if(typeof e==`string`)return``;if(typeof e==`number`)return 0;if(typeof e==`boolean`)return!0;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`html`?AS(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?AS(n):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(AS);let t=Object.entries(e).map(([e,t])=>[e,AS(t)]);return Object.fromEntries(t)},jS=e=>{if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e?.nodeType==`string`){let t=e,n=t[t.nodeType];return t.nodeType===`markdown`||t.nodeType===`html`?n:t.nodeType===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`file`?n[Object.keys(n)[0]]:t.nodeType===`nested`?void 0:n}return!e||typeof e!=`object`?e:Array.isArray(e)?e[0]:e},MS=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,NS=e=>[j,M,N,P,F,I,L,ee,te,ne,R,z,B,re,ie,ae,oe,se].includes(e),PS=e=>{if(typeof e==`string`)return B;if(MS(e)){let t=e.nodeType;return NS(t)?t:se}return Array.isArray(e)?ee:Ge(e)?ne:typeof e==`number`?re:typeof e==`boolean`?ie:e&&typeof e==`object`?L:e===null?oe:se},FS=(e,t,n)=>{let r=e,i=null,a=null;for(let e of n)i=r,(e.type===`object`||e.type===`array`)&&(a=e.key,r=r[e.key]),(e.type===`translation`||e.type===`enumeration`||e.type===`plural`||e.type===`condition`)&&(a=e.type,r=r[e.type][e.key]),(e.type===`markdown`||e.type===`reactNode`||e.type===`html`||e.type===`insertion`||e.type===`file`)&&(a=e.type,r=r[e.type]);if(i&&a!==null)if(Array.isArray(i))i[a]=r;else{let e={};for(let n of Object.keys(i))n===a&&t!==void 0?e[t]=r:e[n]=i[n];Object.keys(i).forEach(e=>{delete i[e]}),Object.assign(i,e)}return e},IS=class{messenger;editorEnabled;focusedContent;localeDictionaries;editedContent;configuration;currentLocale;displayedDictionaryKeys;_urlManager;_iframeInterceptor;_mode;_configuration;_unsubAreYouThere=null;_unsubActivate=null;_unsubClientReady=null;_displayedKeysObserver=null;_displayedKeysTimer=null;_displayedKeysListeners=[];_editedContentFromBus=!1;_unsubGlobalEditedContent=null;_editedContentBusHandler=null;_focusedContentFromBus=!1;_unsubGlobalFocusedContent=null;_focusedContentBusHandler=null;constructor(e){this._mode=e.mode,this._configuration=e.configuration,this.messenger=new dS(e.messenger),this.editorEnabled=new fS(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new fS(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new fS(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new fS(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new fS(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new fS(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this.displayedDictionaryKeys=new fS(`INTLAYER_DISPLAYED_DICTIONARY_KEYS`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`,initialValue:[]}),this._urlManager=new ES(this.messenger),this._iframeInterceptor=new TS(this.messenger)}start(){this.messenger.start(),this.editorEnabled.start(),this.focusedContent.start(),this.localeDictionaries.start(),this.editedContent.start(),this.configuration.start(),this.currentLocale.start(),this.displayedDictionaryKeys.start(),this._startEditedContentBusSync(),this._startFocusedContentBusSync(),this._mode===`client`?(this._urlManager.start(),this._iframeInterceptor.startInterceptor(),this._loadDictionaries(),this._startDisplayedDictionariesTracking(),this.messenger.send(`INTLAYER_EDITED_CONTENT_CHANGED/get`),this._configuration?.editor?.enabled!==!1&&this._setupActivationHandshake()):(this._iframeInterceptor.startMerger(),this._setupEditorHandshake())}stop(){this._unsubAreYouThere?.(),this._unsubActivate?.(),this._unsubClientReady?.(),this._unsubAreYouThere=null,this._unsubActivate=null,this._unsubClientReady=null,this.messenger.stop(),this.editorEnabled.stop(),this.focusedContent.stop(),this.localeDictionaries.stop(),this.editedContent.stop(),this.configuration.stop(),this.currentLocale.stop(),this.displayedDictionaryKeys.stop(),this._stopDisplayedDictionariesTracking(),this._stopEditedContentBusSync(),this._stopFocusedContentBusSync(),this._urlManager.stop(),this._iframeInterceptor.stopInterceptor(),this._iframeInterceptor.stopMerger()}pingClient(){this._mode===`editor`&&this.messenger.send(`INTLAYER_ARE_YOU_THERE`)}setFocusedContentKeyPath(e){let t=e.filter(e=>e.type!==j),n=this.focusedContent.value;n&&this.focusedContent.set({...n,keyPath:t})}setLocaleDictionary(e){if(!e.localId)return;let t=this.localeDictionaries.value??{};this.localeDictionaries.set({...t,[e.localId]:e})}setEditedDictionary(e){if(!e.localId){console.error(`setEditedDictionary: missing localId`,e);return}let t=this.editedContent.value??{};this.editedContent.set({...t,[e.localId]:e})}setEditedContent(e,t){let n=this.editedContent.value??{};this.editedContent.set({...n,[e]:{...n[e],content:t}})}addContent(e,t,n=[],r=!0){let i=this.editedContent.value??{},a=(this.localeDictionaries.value??{})[e]?.content,o=structuredClone(i[e]?.content??a),s=n;if(!r){let e=0,t=n.slice(0,-1),r=n[n.length-1],i=r.key;for(;OS(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=DS(o,s,t);this.editedContent.set({...i,[e]:{...i[e],content:c}})}renameContent(e,t,n=[]){let r=this.editedContent.value??{},i=(this.localeDictionaries.value??{})[e]?.content,a=FS(structuredClone(r[e]?.content??i),t,n);this.editedContent.set({...r,[e]:{...r[e],content:a}})}removeContent(e,t){let n=this.editedContent.value??{},r=(this.localeDictionaries.value??{})[e]?.content,i=DS(structuredClone(n[e]?.content??r),t,OS(r,t));this.editedContent.set({...n,[e]:{...n[e],content:i}})}restoreContent(e){let t={...this.editedContent.value??{}};delete t[e],this.editedContent.set(t)}clearContent(e){let t={...this.editedContent.value??{}};delete t[e],this.editedContent.set(t)}clearAllContent(){this.editedContent.set({})}getContentValue(e,t){let n=this.editedContent.value;if(!n)return;let r=t.filter(e=>e.type!==j),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:OS(n[e]?.content??{},r,this.currentLocale.value);let a=Object.keys(n).filter(t=>t.startsWith(`${e}:`)&&(!i||t in i));for(let e of a){let t=OS(n[e]?.content??{},r,this.currentLocale.value);if(t)return t}}_startEditedContentBusSync(){this._editedContentBusHandler=e=>{if(this._editedContentFromBus)return;let t=e.detail;_S(t,this.messenger.senderId)},this.editedContent.addEventListener(`change`,this._editedContentBusHandler),this._unsubGlobalEditedContent=vS((e,t)=>{t!==this.messenger.senderId&&(this._editedContentFromBus=!0,this.editedContent.set(e),this._editedContentFromBus=!1)});let e=gS();Object.keys(e).length>0&&(this._editedContentFromBus=!0,this.editedContent.set(e),this._editedContentFromBus=!1)}_stopEditedContentBusSync(){this._editedContentBusHandler&&=(this.editedContent.removeEventListener(`change`,this._editedContentBusHandler),null),this._unsubGlobalEditedContent?.(),this._unsubGlobalEditedContent=null}_startFocusedContentBusSync(){this._focusedContentBusHandler=e=>{if(this._focusedContentFromBus)return;let t=e.detail;CS(t,this.messenger.senderId)},this.focusedContent.addEventListener(`change`,this._focusedContentBusHandler),this._unsubGlobalFocusedContent=wS((e,t)=>{t!==this.messenger.senderId&&(this._focusedContentFromBus=!0,this.focusedContent.set(e),this._focusedContentFromBus=!1)});let e=SS();e!==void 0&&(this._focusedContentFromBus=!0,this.focusedContent.set(e),this._focusedContentFromBus=!1)}_stopFocusedContentBusSync(){this._focusedContentBusHandler&&=(this.focusedContent.removeEventListener(`change`,this._focusedContentBusHandler),null),this._unsubGlobalFocusedContent?.(),this._unsubGlobalFocusedContent=null}_scanDisplayedDictionaryKeys(){if(typeof document>`u`)return;let e=document.querySelectorAll(`intlayer-content-selector-wrapper[dictionary-key]`),t=Array.from(new Set(Array.from(e).map(e=>e.getAttribute(`dictionary-key`)??``).filter(Boolean)));this.displayedDictionaryKeys.set(t)}_startDisplayedDictionariesTracking(){if(typeof document>`u`||typeof MutationObserver>`u`)return;let e=()=>{this._displayedKeysTimer&&clearTimeout(this._displayedKeysTimer),this._displayedKeysTimer=setTimeout(()=>this._scanDisplayedDictionaryKeys(),100)};this._displayedKeysObserver=new MutationObserver(e),this._displayedKeysObserver.observe(document.body,{childList:!0,subtree:!0});for(let t of[`locationchange`,`popstate`]){let n=e;window.addEventListener(t,n),this._displayedKeysListeners.push([t,n])}this._scanDisplayedDictionaryKeys()}_stopDisplayedDictionariesTracking(){this._displayedKeysObserver?.disconnect(),this._displayedKeysObserver=null,this._displayedKeysTimer&&=(clearTimeout(this._displayedKeysTimer),null);for(let[e,t]of this._displayedKeysListeners)window.removeEventListener(e,t);this._displayedKeysListeners=[]}_setupEditorHandshake(){this._unsubClientReady=this.messenger.subscribe(`INTLAYER_CLIENT_READY`,()=>{this.editorEnabled.set(!0),this.messenger.send(`INTLAYER_EDITOR_ACTIVATE`)}),this.messenger.send(`INTLAYER_ARE_YOU_THERE`)}_setupActivationHandshake(){this.messenger.send(`INTLAYER_CLIENT_READY`),this._unsubAreYouThere=this.messenger.subscribe(`INTLAYER_ARE_YOU_THERE`,()=>{this.messenger.send(`INTLAYER_CLIENT_READY`)}),this._unsubActivate=this.messenger.subscribe(`INTLAYER_EDITOR_ACTIVATE`,()=>{this.editorEnabled.set(!0),this._broadcastData()})}_broadcastData(){let e=this.configuration.value;e&&this.messenger.send(`INTLAYER_CONFIGURATION/post`,e);let t=this.currentLocale.value;t&&this.messenger.send(`INTLAYER_CURRENT_LOCALE/post`,t);let n=this.localeDictionaries.value;n&&this.messenger.send(`INTLAYER_LOCALE_DICTIONARIES_CHANGED/post`,n)}async _loadDictionaries(){try{let e=(await Fe(async()=>{let{getUnmergedDictionaries:e}=await import(`./unmerged_dictionaries-DWe4YFkq.js`);return{getUnmergedDictionaries:e}},[])).getUnmergedDictionaries(),t=Object.fromEntries(Object.values(e).flat().map(e=>[e.localId,e]));this.localeDictionaries.set(t),this.editorEnabled.value&&this._broadcastData()}catch(e){console.warn(`[intlayer] Failed to load unmerged dictionaries:`,e)}}},LS=typeof HTMLElement<`u`?HTMLElement:class{},RS=class extends LS{_configuration=void 0;_locale=void 0;_initialized=!1;_unsubManager=null;static get observedAttributes(){return[`locale`]}get configuration(){return this._configuration}set configuration(e){this._configuration=e,this._initialized||this._init()}get locale(){return this._locale}set locale(e){this._locale=e,e&&this._initialized&&this._syncLocale(e)}attributeChangedCallback(e,t,n){e===`locale`&&n!==null&&(this._locale=n,this._initialized&&this._syncLocale(n))}connectedCallback(){this._init()}disconnectedCallback(){this._unsubManager?.(),this._unsubManager=null,this._initialized&&=(JS(),!1)}_init(){this._initialized||(qS(),this._initialized=!0,this._locale&&this._syncLocale(this._locale))}_syncLocale(e){let t=tS();t?t.currentLocale.set(e):(this._unsubManager?.(),this._unsubManager=rS(t=>{t&&(this._unsubManager?.(),this._unsubManager=null,t.currentLocale.set(e))}))}},zS=()=>{typeof customElements>`u`||customElements.get(`intlayer-editor`)||customElements.define(`intlayer-editor`,RS)},BS=250,VS=`
|
|
23
21
|
:host {
|
|
24
22
|
display: contents;
|
|
25
23
|
}
|
|
@@ -39,9 +37,11 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
39
37
|
.wrapper[data-active] {
|
|
40
38
|
outline-color: inherit;
|
|
41
39
|
}
|
|
42
|
-
`,nC=typeof HTMLElement<`u`?HTMLElement:class{},rC=class extends nC{_isSelecting=!1;_pressDuration=eC;_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=tC,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?eC: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()}},iC=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,rC),bS(),CS(),$S())},aC=()=>({allowedOrigins:[w?.editorURL,w?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),oC=0,sC=()=>{oC++;let e=hS();if(e)return e;let t=new XS({mode:`client`,messenger:aC(),configuration:{editor:w}});return gS(t),iC(),t.start(),t},cC=()=>{oC=Math.max(0,oC-1),!(oC>0)&&(hS()?.stop(),gS(null))},lC=(e,t,n)=>{let r=(0,V.c)(16),i=oS(),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,D.useState)(o),l=(0,D.useRef)(o),u=(0,D.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 ES(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,m=n?.receive,h;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(h=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=h):h=r[11],(0,D.useEffect)(d,h);let g;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=g):g=r[12];let _=g,v;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{u.current?.postCurrentValue()},r[13]=v):v=r[13];let y=v,b;return r[14]===s?b=r[15]:(b=[s,_,y],r[14]=s,r[15]=b),b},uC=(e,t)=>lC(uS.INTLAYER_URL_CHANGE,e,t),dC=()=>{let e=(0,V.c)(13),t=oS(),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,D.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,D.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},fC=()=>{let e=(0,V.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=dC(),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},pC=()=>{let e=(0,V.c)(3),t=oS(),[n,r]=(0,D.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,D.useEffect)(i,a),n},mC=(e,t,n)=>{for(let r of t)try{if(HS(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},hC=()=>{let e=(0,V.c)(12),{localeDictionaries:t}=dC(),n=pC(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=cS(),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=mC(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},gC=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,D.useRef)(null);i.current||=new XS({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,D.useEffect)(()=>(iC(),gS(a),a.start(),()=>{a.stop(),gS(null)}),[a]),(0,D.useEffect)(()=>{!a||!t||Object.keys(t).length===0||a.configuration.set(t)},[a,t]),(0,O.jsx)(aS,{manager:a,children:e})},_C=(0,D.createContext)(void 0),vC=()=>{let e=(0,V.c)(4),t=oS(),n=(0,D.useContext)(_C),[r,i]=(0,D.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,D.useEffect)(a,o),r??n},yC=()=>{let e=(0,V.c)(23),t=oS(),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},bC=()=>{let e=(0,V.c)(6),t=oS(),[n,r]=(0,D.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,D.useEffect)(i,a);let o=yC(),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},xC=()=>{let e=(0,V.c)(5),t=oS(),[n,r]=(0,D.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,D.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},SC=()=>{let e=(0,V.c)(2),t=oS(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},CC=(e,t,n)=>{let r=(0,V.c)(11),i=oS(),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,D.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},wC=()=>{CC(uS.INTLAYER_IFRAME_CLICKED,dS)},TC=e=>{let t=(0,V.c)(7),n=rS(e,vC(),{editor:w}),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=Zx(void 0,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}=vo(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function EC(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var DC=EC({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`}),OC=`1.6.13`;function kC(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 AC(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 jC(){return MC.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var MC={stubThis:e=>e};function NC(e){let{id:t}=e;return{...e,id:AC(t),transports:e.transports}}function PC(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 FC=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 IC({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 FC({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 FC({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 FC({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 FC({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 FC({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new FC({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 FC({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new FC({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(!PC(t))return new FC({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new FC({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 FC({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 FC({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 LC=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}}},RC=[`cross-platform`,`platform`];function zC(e){if(e&&!(RC.indexOf(e)<0))return e}async function BC(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(!jC())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:AC(t.challenge),user:{...t.user,id:AC(t.user.id)},excludeCredentials:t.excludeCredentials?.map(NC)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=LC.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw IC({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){VC(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=kC(e))}catch(e){VC(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=kC(c.getAuthenticatorData())}catch(e){VC(`getAuthenticatorData()`,e)}return{id:o,rawId:kC(s),response:{attestationObject:kC(c.attestationObject),clientDataJSON:kC(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:zC(a.authenticatorAttachment)}}function VC(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 HC(){if(!jC())return UC.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?UC.stubThis(new Promise(e=>e(!1))):UC.stubThis(e.isConditionalMediationAvailable())}var UC={stubThis:e=>e};function WC({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 FC({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new FC({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!PC(t))return new FC({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new FC({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 FC({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 GC(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(!jC())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(NC));let a={...t,challenge:AC(t.challenge),allowCredentials:i},o={};if(n){if(!await HC())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=LC.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw WC({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=kC(u.userHandle)),{id:c,rawId:kC(l),response:{authenticatorData:kC(u.authenticatorData),clientDataJSON:kC(u.clientDataJSON),signature:kC(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:zC(s.authenticatorAttachment)}}var KC=`1.6.13`,qC=Symbol.for(`better-auth:broadcast-channel`),JC=()=>Math.floor(Date.now()/1e3),YC=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:JC()}))}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 XC(e=`better-auth.message`){return globalThis[qC]||(globalThis[qC]=new YC(e)),globalThis[qC]}var ZC=Symbol.for(`better-auth:focus-manager`),QC=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 $C(){return globalThis[ZC]||(globalThis[ZC]=new QC),globalThis[ZC]}var ew=Symbol.for(`better-auth:online-manager`),tw=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 nw(){return globalThis[ew]||(globalThis[ew]=new tw),globalThis[ew]}var rw={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*:/},iw=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,aw={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},ow=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function sw(e){return e instanceof Date&&!isNaN(e.getTime())}function cw(e){let t=ow.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 sw(f)?f:null}function lw(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in aw)return aw[s];if(!iw.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(rw).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=cw(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function uw(e,t={strict:!0}){return lw(e,t)}var dw=[],fw=0,pw=4,mw=globalThis.nanostoresGlobal||={epoch:0},hw=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=fw+pw;t<dw.length;)dw[t]===e?dw.splice(t,pw):t+=pw;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){mw.epoch++;let i=!dw.length;for(let i of t)dw.push(i,n.value,e,r);if(i){for(fw=0;fw<dw.length;fw+=pw)dw[fw](dw[fw+1],dw[fw+2],dw[fw+3]);dw.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},gw=5,_w=6,vw=10,yw=(e,t,n,r)=>(e.events=e.events||{},e.events[n+vw]||(e.events[n+vw]=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+vw](),delete e.events[n+vw])}),bw=1e3,xw=(e,t)=>yw(e,n=>{let r=t(n);r&&e.events[_w].push(r)},gw,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[_w]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[_w])t();e.events[_w]=[]}},bw)},()=>{e.listen=n,e.off=r}}),Sw=()=>typeof window>`u`,Cw=(e,t,n,r)=>{let i=hw({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()=>{Sw()||(o?await a():xw(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},ww=()=>Math.floor(Date.now()/1e3);function Tw(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var Ew=5;function Dw(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||nw().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=ww(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=ww(),r(`/get-session`).then(async e=>{let{data:a,error:o}=Tw(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=Tw(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=ww(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(ww()-c.lastSessionRequest<Ew)return;c.lastSessionRequest=ww()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=ww(),n.set(!n.get()))},d=e=>{XC().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=XC().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=$C().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=nw().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),XC().setup(),$C().setup(),nw().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 Ow=Object.create(null),kw=e=>({}),Aw=new Proxy(Ow,{get(e,t){return kw()[t]??Ow[t]},has(e,t){return t in kw()||t in Ow},set(e,t,n){let r=kw(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=kw(!0);return delete n[t],!0},ownKeys(){let e=kw(!0);return Object.keys(e)}});function jw(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 jw(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return jw(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return jw(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return jw(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return jw(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return jw(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return jw(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function Mw(){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 Nw(e){let t=e.split(`
|
|
40
|
+
`,HS=typeof HTMLElement<`u`?HTMLElement:class{},US=class extends HS{_isSelecting=!1;_pressDuration=BS;_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=VS,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?BS: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()}},WS=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,US),oS(),lS(),zS())},GS=()=>({allowedOrigins:[w?.editorURL,w?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),KS=0,qS=()=>{KS++;let e=tS();if(e)return e;let t=new IS({mode:`client`,messenger:GS(),configuration:{editor:w}});return nS(t),WS(),t.start(),t},JS=()=>{KS=Math.max(0,KS-1),!(KS>0)&&(tS()?.stop(),nS(null))},YS=(e,t,n)=>{let r=(0,V.c)(16),i=Kx(),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,D.useState)(o),l=(0,D.useRef)(o),u=(0,D.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 fS(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,m=n?.receive,h;r[7]!==e||r[8]!==f||r[9]!==p||r[10]!==m?(h=[e,f,p,m],r[7]=e,r[8]=f,r[9]=p,r[10]=m,r[11]=h):h=r[11],(0,D.useEffect)(d,h);let g;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(g=e=>{c(t=>{let n=typeof e==`function`?e(t):e;return l.current=n,u.current?.set(n),n})},r[12]=g):g=r[12];let _=g,v;r[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>{u.current?.postCurrentValue()},r[13]=v):v=r[13];let y=v,b;return r[14]===s?b=r[15]:(b=[s,_,y],r[14]=s,r[15]=b),b},XS=(e,t)=>YS(Xx.INTLAYER_URL_CHANGE,e,t),ZS=()=>{let e=(0,V.c)(13),t=Kx(),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,D.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,D.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},QS=()=>{let e=(0,V.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=ZS(),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},$S=()=>{let e=(0,V.c)(3),t=Kx(),[n,r]=(0,D.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,D.useEffect)(i,a),n},eC=(e,t,n)=>{for(let r of t)try{if(OS(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},tC=()=>{let e=(0,V.c)(12),{localeDictionaries:t}=ZS(),n=$S(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=Jx(),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=eC(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},nC=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,D.useRef)(null);i.current||=new IS({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,D.useEffect)(()=>(WS(),nS(a),a.start(),()=>{a.stop(),nS(null)}),[a]),(0,D.useEffect)(()=>{!a||!t||Object.keys(t).length===0||a.configuration.set(t)},[a,t]),(0,O.jsx)(Gx,{manager:a,children:e})},rC=(0,D.createContext)(void 0),iC=()=>{let e=(0,V.c)(4),t=Kx(),n=(0,D.useContext)(rC),[r,i]=(0,D.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,D.useEffect)(a,o),r??n},aC=()=>{let e=(0,V.c)(23),t=Kx(),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},oC=()=>{let e=(0,V.c)(6),t=Kx(),[n,r]=(0,D.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,D.useEffect)(i,a);let o=aC(),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},sC=()=>{let e=(0,V.c)(5),t=Kx(),[n,r]=(0,D.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,D.useEffect)(i,a);let o;return e[3]===n?o=e[4]:(o={enabled:n},e[3]=n,e[4]=o),o},cC=()=>{let e=(0,V.c)(2),t=Kx(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},lC=(e,t,n)=>{let r=(0,V.c)(11),i=Kx(),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,D.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},uC=()=>{lC(Xx.INTLAYER_IFRAME_CLICKED,Zx)},dC={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},fC=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),pC=e=>e.reduce((e,t)=>{let n=e??{},r=fC(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),mC=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=pC([dC,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=pC([dC.headers,...t.map(e=>e.headers)]),s=pC(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=pC(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()},hC=(e={},t)=>{let n=`${t?.editor?.backendURL??w.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await mC(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await mC(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await mC(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await mC(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await mC(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await mC(`${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(`
|
|
41
|
+
`);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(`
|
|
42
|
+
`);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 mC(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await mC(`${n}/discussions`,e,r,{method:`GET`,params:t})}},gC=(e={},t)=>{let n=`${t?.editor?.backendURL??w.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await mC(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await mC(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await mC(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await mC(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await mC(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await mC(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await mC(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await mC(`${n}/${t}`,e,r,{method:`DELETE`})}},_C=(e={},t)=>{let n=`${t?.editor?.editorURL??w.editorURL}/api`;return{getDictionaries:async(t={})=>(await mC(`${n}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await mC(`${n}/config`,e,t)).data,writeDictionary:async(t,r={})=>await mC(`${n}/dictionary`,e,r,{method:`POST`,body:t})}},vC=(e={},t)=>{let n=t?.editor?.backendURL??w.backendURL,{clientId:r,clientSecret:i}=t?.editor??{};return{getOAuth2AccessToken:async(e={})=>await mC(`${n}/oauth2/token`,{},e,{method:`POST`,headers:{"Content-Type":`application/x-www-form-urlencoded`},body:{grant_type:`client_credentials`,client_id:r,client_secret:i}}),createCliSessionToken:async(t={})=>await mC(`${n}/api/cli-session`,e,t,{method:`POST`}),getCliSessionMe:async(t={})=>await mC(`${n}/api/cli-session/me`,e,t)}},yC=(e={},t)=>{let n=`${t?.editor?.backendURL??w.backendURL}/api/project`;return{getProjects:async(t,r={})=>await mC(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await mC(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await mC(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await mC(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await mC(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await mC(`${n}`,e,t,{method:`DELETE`}),deleteProjectByIdAdmin:async(t,r={})=>mC(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectProject:async(t,r={})=>await mC(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await mC(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await mC(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await mC(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await mC(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await mC(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await mC(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await mC(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await mC(`${n}/ci`,e,t,{method:`POST`})}},bC=(e={},t)=>{let n=`${t?.editor?.backendURL??w.backendURL}/api/tag`;return{getTags:async(t,r={})=>await mC(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await mC(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await mC(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await mC(`${n}/${t}`,e,r,{method:`DELETE`})}};function xC(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 SC(e,t,n=`.`,r){if(!xC(t))return SC(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]]:xC(a)&&xC(i[t])?i[t]=SC(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function CC(e){return(...t)=>t.reduce((t,n)=>SC(t,n,``,e),{})}var wC=CC(),TC=e=>{let t=(0,V.c)(7),n=wC(e,iC(),{editor:w}),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=vC(void 0,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}=vo(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function EC(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var DC=EC({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`}),OC=`1.6.13`;function kC(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 AC(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 jC(){return MC.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var MC={stubThis:e=>e};function NC(e){let{id:t}=e;return{...e,id:AC(t),transports:e.transports}}function PC(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 FC=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 IC({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 FC({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 FC({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 FC({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 FC({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 FC({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new FC({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 FC({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new FC({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(!PC(t))return new FC({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new FC({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 FC({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 FC({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 LC=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}}},RC=[`cross-platform`,`platform`];function zC(e){if(e&&!(RC.indexOf(e)<0))return e}async function BC(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(!jC())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:AC(t.challenge),user:{...t.user,id:AC(t.user.id)},excludeCredentials:t.excludeCredentials?.map(NC)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=LC.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw IC({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){VC(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=kC(e))}catch(e){VC(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=kC(c.getAuthenticatorData())}catch(e){VC(`getAuthenticatorData()`,e)}return{id:o,rawId:kC(s),response:{attestationObject:kC(c.attestationObject),clientDataJSON:kC(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:zC(a.authenticatorAttachment)}}function VC(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 HC(){if(!jC())return UC.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?UC.stubThis(new Promise(e=>e(!1))):UC.stubThis(e.isConditionalMediationAvailable())}var UC={stubThis:e=>e};function WC({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 FC({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new FC({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!PC(t))return new FC({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new FC({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 FC({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 GC(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(!jC())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(NC));let a={...t,challenge:AC(t.challenge),allowCredentials:i},o={};if(n){if(!await HC())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=LC.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw WC({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=kC(u.userHandle)),{id:c,rawId:kC(l),response:{authenticatorData:kC(u.authenticatorData),clientDataJSON:kC(u.clientDataJSON),signature:kC(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:zC(s.authenticatorAttachment)}}var KC=`1.6.13`,qC=Symbol.for(`better-auth:broadcast-channel`),JC=()=>Math.floor(Date.now()/1e3),YC=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:JC()}))}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 XC(e=`better-auth.message`){return globalThis[qC]||(globalThis[qC]=new YC(e)),globalThis[qC]}var ZC=Symbol.for(`better-auth:focus-manager`),QC=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 $C(){return globalThis[ZC]||(globalThis[ZC]=new QC),globalThis[ZC]}var ew=Symbol.for(`better-auth:online-manager`),tw=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 nw(){return globalThis[ew]||(globalThis[ew]=new tw),globalThis[ew]}var rw={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*:/},iw=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,aw={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},ow=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function sw(e){return e instanceof Date&&!isNaN(e.getTime())}function cw(e){let t=ow.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 sw(f)?f:null}function lw(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in aw)return aw[s];if(!iw.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(rw).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=cw(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function uw(e,t={strict:!0}){return lw(e,t)}var dw=[],fw=0,pw=4,mw=globalThis.nanostoresGlobal||={epoch:0},hw=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=fw+pw;t<dw.length;)dw[t]===e?dw.splice(t,pw):t+=pw;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){mw.epoch++;let i=!dw.length;for(let i of t)dw.push(i,n.value,e,r);if(i){for(fw=0;fw<dw.length;fw+=pw)dw[fw](dw[fw+1],dw[fw+2],dw[fw+3]);dw.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},gw=5,_w=6,vw=10,yw=(e,t,n,r)=>(e.events=e.events||{},e.events[n+vw]||(e.events[n+vw]=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+vw](),delete e.events[n+vw])}),bw=1e3,xw=(e,t)=>yw(e,n=>{let r=t(n);r&&e.events[_w].push(r)},gw,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[_w]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[_w])t();e.events[_w]=[]}},bw)},()=>{e.listen=n,e.off=r}}),Sw=()=>typeof window>`u`,Cw=(e,t,n,r)=>{let i=hw({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()=>{Sw()||(o?await a():xw(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},ww=()=>Math.floor(Date.now()/1e3);function Tw(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var Ew=5;function Dw(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||nw().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=ww(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=ww(),r(`/get-session`).then(async e=>{let{data:a,error:o}=Tw(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=Tw(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=ww(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(ww()-c.lastSessionRequest<Ew)return;c.lastSessionRequest=ww()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=ww(),n.set(!n.get()))},d=e=>{XC().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=XC().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=$C().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=nw().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),XC().setup(),$C().setup(),nw().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 Ow=Object.create(null),kw=e=>({}),Aw=new Proxy(Ow,{get(e,t){return kw()[t]??Ow[t]},has(e,t){return t in kw()||t in Ow},set(e,t,n){let r=kw(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=kw(!0);return delete n[t],!0},ownKeys(){let e=kw(!0);return Object.keys(e)}});function jw(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 jw(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return jw(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return jw(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return jw(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return jw(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return jw(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return jw(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function Mw(){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 Nw(e){let t=e.split(`
|
|
43
43
|
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
44
|
-
at `))}function Pw(e,t){class n extends e{#e;constructor(...e){if(Mw()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=Nw(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 Fw={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};Pw(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:Fw[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 Iw=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},Lw=47;function Rw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===Lw;)t--;return t===e.length?e:e.slice(0,t)}function zw(e){try{return(Rw(new URL(e).pathname)||`/`)!==`/`}catch{throw new Iw(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Bw(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new Iw(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Iw?t:new Iw(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Vw(e,t=`/api/auth`){if(Bw(e),zw(e))return e;let n=Rw(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function Hw(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function Uw(e,t,n,r,i){if(e)return Vw(e,t);if(r!==!1){let e=Aw.BETTER_AUTH_URL||Aw.NEXT_PUBLIC_BETTER_AUTH_URL||Aw.PUBLIC_BETTER_AUTH_URL||Aw.NUXT_PUBLIC_BETTER_AUTH_URL||Aw.NUXT_PUBLIC_AUTH_URL||(Aw.BASE_URL===`/`?void 0:Aw.BASE_URL);if(e)return Vw(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&Hw(o,`proto`)&&Hw(a,`host`))try{return Vw(`${o}://${a}`,t)}catch{}if(n){let e=Ww(n.url);if(!e)throw new Iw(`Could not get origin from request. Please provide a valid base URL.`);return Vw(e,t)}if(typeof window<`u`&&window.location)return Vw(window.location.origin,t)}function Ww(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Gw=[`javascript:`,`data:`,`vbscript:`];function Kw(e){return URL.canParse(e)?!Gw.includes(new URL(e).protocol):!0}var qw={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&Kw(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function Jw(e,t){let n=hw(!1),r=Cw(n,`/get-session`,e,{method:`GET`}),i=()=>{};return xw(r,()=>{let a=Dw({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 Yw=Object.defineProperty,Xw=Object.defineProperties,Zw=Object.getOwnPropertyDescriptors,Qw=Object.getOwnPropertySymbols,$w=Object.prototype.hasOwnProperty,eT=Object.prototype.propertyIsEnumerable,tT=(e,t,n)=>t in e?Yw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nT=(e,t)=>{for(var n in t||={})$w.call(t,n)&&tT(e,n,t[n]);if(Qw)for(var n of Qw(t))eT.call(t,n)&&tT(e,n,t[n]);return e},rT=(e,t)=>Xw(e,Zw(t)),iT=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)}},aT=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}},oT=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}},sT=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 cT(e){if(typeof e==`number`)return new oT({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new oT(e);case`exponential`:return new sT(e);default:throw Error(`Invalid retry strategy`)}}var lT=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},uT=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function dT(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 uT.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function fT(e){try{return JSON.parse(e),!0}catch{return!1}}function pT(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 mT(e){try{return JSON.parse(e)}catch{return e}}function hT(e){return typeof e==`function`}function gT(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&hT(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&hT(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function _T(e){let t=new Headers(e?.headers),n=await lT(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=vT(e?.body);n&&t.set(`content-type`,n)}return t}function vT(e){return pT(e)?`application/json`:null}function yT(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(pT(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`&&pT(e.body)?new URLSearchParams(e.body).toString():e.body}function bT(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return wT.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function xT(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var ST=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function CT(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new ST(n.issues);return n.value}var wT=[`get`,`post`,`put`,`patch`,`delete`],TT=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=rT(nT({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=rT(nT({},e),{body:i.input?await CT(i.input,n?.body):n?.body,params:i.params?await CT(i.params,n?.params):n?.params,query:i.query?await CT(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),ET=e=>{async function t(t,n){let r=rT(nT(nT({},e),n),{plugins:[...e?.plugins||[],TT(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await OT(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 OT(t,r)}return t};function DT(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];wT.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 OT=async(e,t)=>{let{hooks:n,url:r,options:i}=await aT(e,t),a=gT(i),o=new AbortController,s=i.signal??o.signal,c=DT(r,i),l=yT(i),u=await _T(i),d=bT(r,i),f=rT(nT({},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}=xT(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(rT(nT({},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=dT(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??mT)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await CT(f.output,r.data));for(let e of n.onSuccess)e&&await e(rT(nT({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??mT,_=await m.text(),v=fT(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:rT(nT({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(rT(nT({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=cT(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 OT(e,rT(nT({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new iT(m.status,m.statusText,v?y:_);return{data:null,error:rT(nT({},y),{status:m.status,statusText:m.statusText})}},kT=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{}}},AT=(e,t)=>{let n=`credentials`in Request.prototype,r=Uw(e?.baseURL,e?.basePath,void 0,t)??kT(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=ET({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?uw(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[qw],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=Jw(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=rS(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function jT(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function MT(e){return e.charAt(0).toUpperCase()+e.slice(1)}var NT=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,PT=/['\u2019]/g;function FT(e){return e.replace(PT,``).match(NT)??[]}function IT(e){return FT(e).map(e=>e.toLowerCase()).join(`-`)}function LT(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 RT(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`||jT(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(IT).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=LT(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 zT(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=AT(e),s={};for(let[e,t]of Object.entries(r))s[`use${MT(e)}`]=t;return RT({...n,...s,$fetch:i,$store:o},i,t,r,a)}var BT=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s;try{s=await GC({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof FC?e.code:`AUTH_CANCELLED`,message:DC.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}try{let{clientExtensionResults:a,...o}=s,c=await e(`/passkey/verify-authentication`,{body:{response:o},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...c,webauthn:{response:s,clientExtensionResults:a}}:c}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:DC.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 BC({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 FC?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:DC.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:DC.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:DC.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),VT=()=>{let e=hw();return{id:`passkey`,version:OC,$InferServerPlugin:{},getActions:(t,n)=>BT(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:Cw(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:DC}},HT=`1.6.13`,UT=e=>({id:`sso-client`,version:HT,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),WT=()=>({id:`magic-link`,version:KC,$InferServerPlugin:{}}),GT=EC({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`}),KT=e=>({id:`two-factor`,version:KC,$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`&&Kw(e.twoFactorPage)&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:GT}),qT=e=>zT({baseURL:e,withCredentials:!0,plugins:[KT({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}}),VT(),WT(),UT()]}),JT=e=>{let t=e?.editor?.backendURL??w?.backendURL;t||(t=rt,console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=qT(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})}},YT=(e,t)=>{let n=(0,V.c)(17),r=vC(),i;n[0]!==r||n[1]!==t?(i=t??r??{editor:w},n[0]=r,n[1]=t,n[2]=i):i=n[2];let a=i,o=no(),s;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=[`session`],n[3]=s):s=n[3];let c;n[4]===a?c=n[5]:(c=async()=>(await JT(a).getSession()).data,n[4]=a,n[5]=c);let l=!e,u;n[6]!==c||n[7]!==l?(u={queryKey:s,queryFn:c,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:l},n[6]=c,n[7]=l,n[8]=u):u=n[8];let{data:d,isFetched:f,refetch:p}=vo(u),m=d??(f?null:void 0),h;n[9]===o?h=n[10]:(h=e=>{o.setQueryData([`session`],e)},n[9]=o,n[10]=h);let g=h,_;n[11]===p?_=n[12]:(_=async()=>(await p()).data,n[11]=p,n[12]=_);let v=_,y;return n[13]!==v||n[14]!==m||n[15]!==g?(y={session:m,fetchSession:v,revalidateSession:v,setSession:g},n[13]=v,n[14]=m,n[15]=g,n[16]=y):y=n[16],y},XT=e=>{let t=(0,V.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}=YT(r,i),{oAuth2AccessToken:l}=TC(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},ZT=e=>{let t=(0,V.c)(10),n=vC(),{oAuth2AccessToken:r}=XT(),i;t[0]===r?i=t[1]:(i=r&&{headers:{Authorization:`Bearer ${r.accessToken}`}},t[0]=r,t[1]=i);let a;t[2]===e?.options?a=t[3]:(a=e?.options??{},t[2]=e?.options,t[3]=a);let o;t[4]!==i||t[5]!==a?(o={...i,...a},t[4]=i,t[5]=a,t[6]=o):o=t[6];let s=o,c=e?.intlayerConfiguration??n,l=c?.editor?c:void 0,u;return t[7]!==s||t[8]!==l?(u={options:s,resolvedConfig:l},t[7]=s,t[8]=l,t[9]=u):u=t[9],u},QT=e=>{let t=(0,V.c)(2),n=vC(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=JT(r),t[0]=r,t[1]=i),i},$T=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=Qx(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},eE=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=Yx(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},tE=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=Jx(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},nE=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=$x(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},rE=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=Xx(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},iE=()=>{let e=(0,V.c)(3),t=tE(),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.auditContentDeclarationMetadata(e)},e[1]=t,e[2]=r),yo(r)},aE=()=>{let e=(0,V.c)(3),t=tE(),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.auditContentDeclarationField(e)},e[1]=t,e[2]=r),yo(r)},oE=e=>{let t=(0,V.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=vC(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=XT(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},sE=e=>{let t=(0,V.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}=oE(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],vo(l)},cE=()=>{let e=(0,V.c)(6),t=QT(),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),yo(a)},lE=()=>{let e=(0,V.c)(6),t=eE(),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.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),yo(a)},uE=()=>{let e=(0,V.c)(6),t=eE(),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.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),yo(a)},dE=()=>{let e=(0,V.c)(3),t=rE(),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.getDictionaries()},e[1]=t,e[2]=r),vo(r)},fE=()=>{let e=(0,V.c)(3),t=rE(),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.writeDictionary(e)},e[1]=t,e[2]=r),yo(r)},pE=(e,t)=>{let n=(0,V.c)(9),r=$T(),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.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],sE(o)},mE=(e,t)=>{let n=(0,V.c)(9),r=nE(),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.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],sE(o)},hE=()=>{let e=(0,V.c)(9),{session:t,revalidateSession:n,setSession:r}=XT(),{mutate:i}=cE(),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},gE=tu(`flex flex-col text-text backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-md`,md:`rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,lg:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,xl:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,"2xl":`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,"3xl":`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"4xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,full:`rounded-full`},transparency:{none:`bg-card`,xs:`bg-card/95`,sm:`bg-card/90`,md:`bg-card/70`,lg:`bg-card/40`,xl:`bg-card/20`,full:``},padding:{none:`p-0`,sm:`px-3 py-2`,md:`px-4 py-3`,lg:`px-6 py-4`,xl:`px-8 py-6`,"2xl":`px-10 py-8`},separator:{without:``,x:`divide-x divide-dashed divide-text/20`,y:`divide-y divide-dashed divide-text/20`,both:`divide-x divide-y divide-dashed divide-text/20`},border:{none:``,with:`border-[1.3px]`},borderColor:{primary:`border-primary`,secondary:`border-secondary`,neutral:`border-neutral/20`,card:`border-card`,text:`border-text`,error:`border-error`,warning:`border-warning`,success:`border-success`},background:{none:`backdrop-blur-none`,hoverable:`bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur`,with:``},gap:{none:`gap-0`,sm:`gap-1`,md:`gap-3`,lg:`gap-5`,xl:`gap-8`,"2xl":`gap-10`}},defaultVariants:{roundedSize:`lg`,border:`none`,borderColor:`text`,transparency:`md`,padding:`none`,separator:`without`,gap:`none`},compoundVariants:[{background:`none`,class:`bg-transparent`}]}),_E=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>(0,O.jsx)(`div`,{className:G(gE({roundedSize:t,transparency:r,padding:n,separator:i,border:typeof o==`boolean`?o?`with`:`none`:void 0,background:c,borderColor:s,gap:l}),a),...u,children:e}),vE=({className:e,strokeWidth:t=4})=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`44`,height:`44`,viewBox:`0 0 44 44`,stroke:`currentColor`,role:`img`,"aria-label":`Spinner`,className:G(`size-full`,e),children:(0,O.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[(0,O.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,O.jsx)(`animate`,{attributeName:`r`,begin:`0s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,O.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`0s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]}),(0,O.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,O.jsx)(`animate`,{attributeName:`r`,begin:`-0.9s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,O.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`-0.9s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]})]})}),yE=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>(0,O.jsx)(O.Fragment,{children:t&&n?(0,O.jsxs)(`div`,{className:`relative size-full`,children:[(0,O.jsx)(`div`,{className:G(`absolute top-0 left-0 flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,O.jsx)(vE,{className:`size-10 max-h-full max-w-full`})}),e]}):t?(0,O.jsx)(`div`,{className:G(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,O.jsx)(vE,{className:`size-10 max-h-full max-w-full`})}):e??(0,O.jsx)(O.Fragment,{})}),bE=tu(`flex-none shrink-0`,{variants:{size:{xs:`size-2`,sm:`size-3`,md:`size-4`,lg:`size-5`,xl:`size-6`,"icon-sm":`size-3`,"icon-md":`size-4`,"icon-lg":`size-5`,"icon-xl":`size-6`}},defaultVariants:{size:`md`}}),xE=tu(`relative inline-flex cursor-pointer items-center justify-center font-medium ring-0 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{xs:`min-h-7 px-3 text-xs max-md:py-1`,sm:`min-h-7 px-3 text-xs max-md:py-1`,md:`min-h-8 px-6 text-sm max-md:py-2`,lg:`min-h-10 px-8 text-lg max-md:py-3`,xl:`min-h-11 px-10 text-xl max-md:py-4`,"icon-sm":`p-1.5`,"icon-md":`p-1.5`,"icon-lg":`p-1.5`,"icon-xl":`p-3`},color:{primary:`hover-primary-500/20 text-primary ring-primary-500/20 *:text-text-light`,secondary:`hover-secondary-500/20 text-secondary ring-secondary-500/20 *:text-text-light`,neutral:`text-neutral ring-neutral-500/5 *:text-text-light`,card:`hover-card-500/20 text-card ring-card-500/20 *:text-text-light`,light:`hover-white-500/20 text-white ring-white/20 *:text-text-light`,dark:`text-neutral-800 ring-text-light/50 *:text-text-light`,text:`text-text ring-text/20 *:text-text-opposite`,current:`hover-current-500/10 text-current ring-current/10 *:text-text-light`,"text-inverse":`text-text-opposite ring-text-opposite/20 *:text-text`,error:`hover-error-500/20 text-error ring-error/20 *:text-text-light`,success:`hover-success-500/20 text-success ring-success/20 *:text-text-light`,custom:``},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,"4xl":`rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]`,"5xl":`rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]`,full:`rounded-full`},variant:{default:[`bg-current`,`hover:bg-current/90`,`hover:ring-5`,`aria-selected:ring-5`],outline:[`rounded-2xl border-[1.3px] border-current bg-current/0 *:text-current!`,`hover:bg-current/20 focus-visible:bg-current/20`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],none:`border-none bg-current/0 text-inherit hover:bg-current/0`,link:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline`,"invisible-link":`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,fade:[`rounded-lg border-none bg-current/10 ring-current/5 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],input:[`text-text`,`w-full select-text resize-none rounded-2xl text-base shadow-none outline-none supports-[corner-shape:squircle]:rounded-4xl`,`transition-shadow duration-100 md:text-sm`,`ring-0`,`disabled:opacity-50`,`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-neutral-100 dark:ring-neutral-700`,`hover:ring-3`,`aria-selected:ring-4`,`focus-visible:ring-3`,`disabled:ring-0`,`focus-visible:outline-none`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`]},textAlign:{left:`justify-start text-left`,center:`justify-center text-center`,right:`justify-end text-right`},isFullWidth:{true:`w-full`,false:``}},defaultVariants:{variant:`default`,size:`md`,color:`text`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),SE=({variant:e,size:t,color:n,children:r,Icon:i,IconRight:a,iconClassName:o,isLoading:s=!1,isActive:c,isSelected:l,isFullWidth:u,roundedSize:d,textAlign:f,disabled:p,label:m,className:h,type:g=`button`,"aria-describedby":_,"aria-expanded":v,"aria-haspopup":y,"aria-pressed":b,...x})=>{let S=e===`link`||e===`invisible-link`,C=!r&&(i||a),w={"aria-label":C?m??void 0:void 0,"aria-labelledby":void 0,"aria-describedby":_,"aria-expanded":v,"aria-haspopup":y,"aria-pressed":c===void 0?b:c,"aria-busy":s,"aria-current":c?`page`:void 0,"aria-disabled":p||s,"aria-selected":l},T=t===`icon-sm`||t===`icon-md`||t===`icon-lg`||t===`icon-xl`;return(0,O.jsxs)(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:xE({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:f??(a?`left`:`center`),className:h}),...w,...x,children:[i&&!s&&(0,O.jsx)(i,{className:bE({size:t,className:G(!T&&`mr-3`,o)}),"aria-hidden":`true`}),(0,O.jsx)(`div`,{className:G(`flex items-center justify-center transition-[width] duration-300`,s&&t===`sm`&&`w-3`,s&&t===`md`&&`w-4`,s&&t===`lg`&&`w-6`,s&&t===`xl`&&`w-8`),children:(0,O.jsx)(yE,{className:bE({size:t,className:G(!T&&`mr-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&(0,O.jsx)(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&C&&(0,O.jsx)(`span`,{className:`sr-only`,children:m}),a&&(0,O.jsx)(a,{className:bE({size:t,className:G(!T&&`ml-3`,o)}),"aria-hidden":`true`})]})},CE=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>(0,O.jsx)(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:G(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out`,t!==void 0&&!t&&`grid-rows-[1fr] overflow-x-auto`,r&&`hover:grid-rows-[1fr] hover:overflow-x-auto`,i&&`focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto`,n),...o,children:(0,O.jsx)(`div`,{style:{minHeight:`${a}px`},className:G(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})}),wE=e=>{let t=(0,V.c)(8),{children:n,header:r,isOpen:i,defaultIsOpen:a,onToggle:o,onClick:s,disabled:c,contentClassName:l,headerClassName:u,contentId:d,"aria-label":f,...p}=e,m=a===void 0?!1:a,h=c===void 0?!1:c,g=i!==void 0,[_,v]=(0,D.useState)(m),y=(0,D.useId)(),b=g?i:_,x=!b,S=d??`${y}-accordion-content`,C;t[0]!==h||t[1]!==g||t[2]!==b||t[3]!==s||t[4]!==o?(C=e=>{if(h)return;let t=!b;g||v(t),o?.(t),s?.(e)},t[0]=h,t[1]=g,t[2]=b,t[3]=s,t[4]=o,t[5]=C):C=t[5];let w=C,T;return t[6]===w?T=t[7]:(T=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),w(e))},t[6]=w,t[7]=T),(0,O.jsxs)(`div`,{className:`w-full`,children:[(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,onClick:w,onKeyDown:T,disabled:h,isFullWidth:!0,className:G(`flex items-center justify-between gap-2`,u),IconRight:hu,iconClassName:G(`transform transition-transform duration-500 ease-in-out`,b?`rotate-0`:`-rotate-180`),"aria-expanded":b,"aria-controls":S,"aria-label":f,role:`button`,...p,children:r}),(0,O.jsx)(CE,{id:S,tabIndex:x?-1:void 0,isHidden:x,className:l,role:`region`,"aria-labelledby":S,children:n})]})},TE=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>(0,O.jsx)(`div`,{className:G(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,e===2&&`hover:bg-card/30`,e>=3&&``,a===!0&&`bg-card/40`),...o,children:(0,O.jsx)(wE,{isOpen:a,label:t,header:(0,O.jsxs)(`div`,{className:`flex w-full`,children:[(0,O.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,O.jsx)(`span`,{className:G(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&(0,O.jsx)(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&(0,O.jsx)(`p`,{className:`pl-3 text-card text-sm`,children:n})]}),children:(0,O.jsx)(`div`,{className:`size-full px-2`,children:r})})}),EE=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:ee},s=[...t,o];return(0,O.jsx)(TE,{level:t.length,title:`${a}`,description:``,isSelected:Qe(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:(0,O.jsx)(dD,{...e,keyPath:s,section:n})},JSON.stringify(n))})},DE=e=>e?.getAttribute(`aria-selected`)===`true`,OE=(e,t)=>{let n=(0,V.c)(24),r;n[0]===t?r=n[1]:(r=t===void 0?{selector:DE,isHoverable:!1,orientation:`horizontal`}:t,n[0]=t,n[1]=r);let{selector:i,isHoverable:a,orientation:o}=r,s=i===void 0?DE:i,c=a===void 0?!1:a,l=o===void 0?`horizontal`:o,[u,d]=(0,D.useState)(null),[f,p]=(0,D.useState)(null),m=(0,D.useRef)(null),h=(0,D.useRef)(null),g=e.current.length,_;n[2]!==f||n[3]!==e.current||n[4]!==l||n[5]!==s?(_=()=>{let t;if(f?(t=f,m.current&&=(clearTimeout(m.current),null)):t=e.current.find(s)??null,!t){if(l===`vertical`){let e=h.current,t={top:e?.top??0,height:e?.height??0,opacity:0};e?.opacity!==0&&(d(t),h.current=t)}else{let e=h.current,t={left:e?.left??0,width:e?.width??0,opacity:0};e?.opacity!==0&&(d(t),h.current=t)}return}if(l===`vertical`){let e=t.offsetTop,n=t.offsetHeight,r={top:e,height:n,opacity:1},i=h.current;(!i||i.top!==e||i.height!==n||i.opacity!==1)&&(d(r),h.current=r)}else{let e=t.offsetLeft,n=t.offsetWidth,r={left:e,width:n,opacity:1},i=h.current;(!i||i.left!==e||i.width!==n||i.opacity!==1)&&(d(r),h.current=r)}},n[2]=f,n[3]=e.current,n[4]=l,n[5]=s,n[6]=_):_=n[6];let v=_,y;n[7]!==v||n[8]!==f||n[9]!==c||n[10]!==e.current||n[11]!==s?(y=()=>{v(),window.addEventListener(`resize`,v),window.addEventListener(`DOMContentLoaded`,v);let t=[];e.current.forEach(e=>{if(e){let n=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&(t.attributeName===`aria-selected`||t.attributeName===`data-active`||t.attributeName===`data-indicator`)){v();break}});n.observe(e,{attributes:!0,attributeFilter:[`aria-selected`,`data-active`,`data-indicator`]}),t.push(n)}});let n=[],r=e=>{if(!e)return;let t=new ResizeObserver(()=>{v()});t.observe(e),n.push(t)},i=e.current.find(s)??null;i&&r(i),f&&r(f);let a=e=>{m.current&&=(clearTimeout(m.current),null),p(e.currentTarget)},o=()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{p(null)},150)};return c&&e.current.forEach(e=>{e?.addEventListener(`mouseenter`,a,{passive:!0}),e?.addEventListener(`mouseleave`,o,{passive:!0})}),()=>{m.current&&clearTimeout(m.current),window.removeEventListener(`resize`,v),window.removeEventListener(`DOMContentLoaded`,v),t.forEach(kE),n.forEach(AE),e.current.forEach(e=>{e?.removeEventListener(`mouseenter`,a),e?.removeEventListener(`mouseleave`,o)})}},n[7]=v,n[8]=f,n[9]=c,n[10]=e.current,n[11]=s,n[12]=y):y=n[12];let b;n[13]!==f||n[14]!==c||n[15]!==g||n[16]!==e||n[17]!==l||n[18]!==s?(b=[e,s,f,g,l,c],n[13]=f,n[14]=c,n[15]=g,n[16]=e,n[17]=l,n[18]=s,n[19]=b):b=n[19],(0,D.useLayoutEffect)(y,b);let x;return n[20]!==v||n[21]!==u||n[22]!==l?(x={choiceIndicatorPosition:u,calculatePosition:v,orientation:l},n[20]=v,n[21]=u,n[22]=l,n[23]=x):x=n[23],x};function kE(e){e.disconnect()}function AE(e){e.disconnect()}var jE=(e,t)=>{let n=(0,V.c)(23),{choices:r,value:i,defaultValue:a,onChange:o,hoverable:s,disabled:c}=e,l;n[0]===r?l=n[1]:(l=r===void 0?[]:r,n[0]=r,n[1]=l);let u=l,d=s===void 0?!0:s,f=c===void 0?!1:c,[p,m]=(0,D.useState)(i??a??u[0]?.value),[h,g]=(0,D.useState)(null),_;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],n[2]=_):_=n[2];let v=(0,D.useRef)(_),y=(0,D.useRef)(null),b;n[3]===t?b=n[4]:(b={selector:ME,isHoverable:!1,orientation:t},n[3]=t,n[4]=b);let{choiceIndicatorPosition:x}=OE(v,b),S;if(n[5]!==u||n[6]!==p){let e;n[8]===p?e=n[9]:(e=e=>e.value===p,n[8]=p,n[9]=e),S=u.findIndex(e),n[5]=u,n[6]=p,n[7]=S}else S=n[7];let C=S,w=d&&h!==null?h:C,T;n[10]===o?T=n[11]:(T=e=>{console.log(`useSwitchSelector handleChange`,e),m(e),o?.(e)},n[10]=o,n[11]=T);let E=T,O,k;n[12]===i?(O=n[13],k=n[14]):(k=()=>{i!==void 0&&m(i)},O=[i],n[12]=i,n[13]=O,n[14]=k),(0,D.useEffect)(k,O);let A;return n[15]!==x||n[16]!==f||n[17]!==E||n[18]!==h||n[19]!==w||n[20]!==C||n[21]!==p?(A={valueState:p,hoveredIndex:h,setHoveredIndex:g,optionsRefs:v,indicatorRef:y,choiceIndicatorPosition:x,selectedIndex:C,indicatorIndex:w,handleChange:E,disabled:f},n[15]=x,n[16]=f,n[17]=E,n[18]=h,n[19]=w,n[20]=C,n[21]=p,n[22]=A):A=n[22],A};function ME(e){return e.getAttribute(`data-indicator`)===`true`}var NE=[{content:`Off`,value:!1},{content:`On`,value:!0}],PE=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.DARK=`dark`,e.TEXT=`text`,e}({}),FE=tu(`flex h-fit w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px] p-[1.5px]`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`},disabled:{true:`cursor-not-allowed opacity-50`,false:``}},defaultVariants:{color:`text`,disabled:!1}}),IE=tu(`z-1 flex-1 cursor-pointer font-medium text-sm transition-all duration-300 ease-in-out aria-selected:cursor-default data-[indicator=true]:text-text-opposite motion-reduce:transition-none`,{variants:{size:{xs:`px-2 py-0.5 text-xs`,sm:`px-2 py-1 text-xs`,md:`p-2 text-sm`,lg:`p-4 text-base`}},defaultVariants:{size:`md`}}),LE=tu(`absolute top-0 z-0 h-full w-auto rounded-full transition-all duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary data-[indicator=true]:text-text`,secondary:`bg-secondary data-[indicator=true]:text-text`,[`${PE.ERROR}`]:`bg-error data-[indicator=true]:text-text`,neutral:`bg-neutral data-[indicator=true]:text-white`,light:`bg-white data-[indicator=true]:text-black`,dark:`bg-neutral-800 data-[indicator=true]:text-white`,text:`bg-text data-[indicator=true]:text-text-opposite`}}}),RE=e=>{let t=(0,V.c)(30),{choices:n,color:r,size:i,className:a,itemClassName:o}=e,s=n===void 0?NE:n,c=r===void 0?`primary`:r,l=i===void 0?`md`:i,u;t[0]!==s||t[1]!==e.defaultValue||t[2]!==e.disabled||t[3]!==e.hoverable||t[4]!==e.onChange||t[5]!==e.value?(u={choices:s,value:e.value,defaultValue:e.defaultValue,onChange:e.onChange,hoverable:e.hoverable,disabled:e.disabled},t[0]=s,t[1]=e.defaultValue,t[2]=e.disabled,t[3]=e.hoverable,t[4]=e.onChange,t[5]=e.value,t[6]=u):u=t[6];let{selectedIndex:d,indicatorIndex:f,handleChange:p,optionsRefs:m,indicatorRef:h,choiceIndicatorPosition:g,setHoveredIndex:_,disabled:v}=jE(u,`horizontal`),y;if(t[7]!==g||t[8]!==s||t[9]!==a||t[10]!==c||t[11]!==v||t[12]!==p||t[13]!==f||t[14]!==h||t[15]!==o||t[16]!==m||t[17]!==d||t[18]!==_||t[19]!==l){let e;t[21]!==v||t[22]!==p||t[23]!==f||t[24]!==o||t[25]!==m||t[26]!==d||t[27]!==_||t[28]!==l?(e=(e,t)=>{let{content:n,value:r,...i}=e,a=typeof r==`string`||typeof r==`number`,s=t===d,c=t===f;return(0,D.createElement)(`button`,{...i,className:G(IE({size:l}),v&&`cursor-not-allowed`,o),key:a?r:t,role:`tab`,onClick:()=>p(r),"aria-selected":s?`true`:void 0,"data-indicator":c?`true`:void 0,disabled:v,tabIndex:s?0:-1,ref:e=>{m.current[t]=e},onMouseEnter:()=>!v&&_(t),onMouseLeave:()=>!v&&_(null)},n)},t[21]=v,t[22]=p,t[23]=f,t[24]=o,t[25]=m,t[26]=d,t[27]=_,t[28]=l,t[29]=e):e=t[29],y=(0,O.jsx)(`div`,{className:FE({color:c,disabled:v,className:a}),role:`tablist`,"aria-disabled":v?`true`:void 0,children:(0,O.jsxs)(`div`,{className:`relative flex h-full w-full flex-row items-center justify-center`,children:[s.map(e),g&&(0,O.jsx)(`div`,{className:G(LE({color:c})),style:g,ref:h})]})}),t[7]=g,t[8]=s,t[9]=a,t[10]=c,t[11]=v,t[12]=p,t[13]=f,t[14]=h,t[15]=o,t[16]=m,t[17]=d,t[18]=_,t[19]=l,t[20]=y}else y=t[20];return y},zE=e=>{let t=(0,V.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=HS(i,n,pC());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(O.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,O.jsx)(`button`,{type:`button`,className:G(`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,O.jsx)(RE,{value:l,onChange:d})})},BE=e=>{let{keyPath:t,section:n}=e;return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[P]).map(r=>{let i={type:P,key:r},a=[...t,i],o=n[P][r];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,D.createElement)(dD,{...e,key:r,keyPath:a,section:o})]})})})},VE=e=>{let{keyPath:t,section:n}=e;return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[M]).map(r=>{let i={type:M,key:r},a=[...t,i],o=n[M][r];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,D.createElement)(dD,{...e,key:r,keyPath:a,section:o})]})})})},HE=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,D.useState)(!1),l=(0,D.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,D.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,D.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,O.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,O.jsxs)(`div`,{className:G(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,O.jsx)(SE,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:mu,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,O.jsx)(SE,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Ru,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,O.jsxs)(`div`,{className:G(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,O.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,O.jsx)(SE,{label:`Edit`,Icon:ju,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},UE=(...e)=>e.filter(Boolean).join(` `),WE=tu([`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`}}),GE=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,O.jsx)(`input`,{className:UE(WE({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),KE=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,O.jsx)(`textarea`,{className:G(`resize-none`,WE({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),qE=24,JE=12,YE=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,D.useRef)(null);(0,D.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=qE*r+JE;n.height=`${Math.max(Math.min(i,a),36)}px`};return(0,D.useLayoutEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,O.jsx)(KE,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:G(`overflow-y-auto`,t&&`resize-none`,e),...a})},XE=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,D.useRef)(null);return(0,D.useImperativeHandle)(n,()=>i.current),(0,O.jsx)(HE,{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,O.jsx)(YE,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},ZE=e=>{let t=(0,V.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=pC(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??HS(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,O.jsx)(O.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,O.jsx)(`button`,{type:`button`,className:G(`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,O.jsx)(XE,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:QE})}),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 QE(){return null}var $E=e=>{let t=(0,V.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=bC(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=HS(e.editedContent,n),s=r[I],{content:c}=r,l=[...n,{type:I}],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,O.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,O.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,O.jsx)(ZE,{...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},eD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:z}],i=n[z];return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,O.jsx)(dD,{...e,keyPath:r,section:i})})},tD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:F}],i=n[F];return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,O.jsx)(dD,{...e,keyPath:r,section:i})})},nD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,O.jsx)(dD,{...e,keyPath:r,section:i})})},rD=(0,D.memo)(e=>{let t=(0,V.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(iD),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:L},o=[...n,i],c=Qe(o,s);return(0,O.jsx)(TE,{level:n.length,title:nt(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,O.jsx)(dD,{...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 iD(e){return!uD.includes(e)}var aD=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,D.useRef)(null);return(0,D.useImperativeHandle)(n,()=>i.current),(0,O.jsx)(HE,{value:(0,D.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,O.jsx)(GE,{ref:i,...r})})},oD=e=>{let t=(0,V.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=pC(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=HS(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,O.jsx)(O.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,O.jsx)(`button`,{type:`button`,className:G(`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,O.jsx)(aD,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:sD})}),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 sD(){return null}var cD=e=>{let{keyPath:t,section:n}=e;return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!uD.includes(e)).map(r=>{let i={type:N,key:r},a=[...t,i],o=n[N][r];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,D.createElement)(dD,{...e,key:r,keyPath:a,section:o})]})})})},lD=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:j,key:r},a=[...t,i],o=n[j][r];return(0,O.jsx)(dD,{...e,keyPath:a,section:o})},uD=[`filePath`,`id`,`nodeType`],dD=(0,D.memo)(e=>{let t=pC(),n=(0,D.useMemo)(()=>HS(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,D.useMemo)(()=>JS(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,O.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,O.jsx)(nD,{...e,section:n}):r===`html`?(0,O.jsx)(eD,{...e,section:n}):r===`translation`?(0,O.jsx)(lD,{...e,section:n}):r===`enumeration`?(0,O.jsx)(VE,{...e,section:n}):r===`plural`?(0,O.jsx)(cD,{...e,section:n}):r===`condition`?(0,O.jsx)(BE,{...e,section:n}):r===`insertion`?(0,O.jsx)(tD,{...e,section:n}):r===`array`?(0,O.jsx)(EE,{...e,section:n}):r===`file`?(0,O.jsx)($E,{...e,section:n}):(0,O.jsx)(rD,{...e,section:n});if(typeof n==`string`)return(0,O.jsx)(ZE,{...e,section:n});if(typeof n==`number`)return(0,O.jsx)(oD,{...e,section:n});if(typeof n==`boolean`)return(0,O.jsx)(zE,{...e,section:n})}),fD=e=>{let t=(0,V.c)(6),{dictionary:n,...r}=e,i=pC(),{editedContent:a,addEditedContent:o}=bC(),{focusedContent:s,setFocusedContentKeyPath:c}=hC(),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,O.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,D.createElement)(dD,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},pD={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`]},mD=(e,t)=>{let n=(0,V.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,D.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,D.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,m;return n[16]!==p||n[17]!==d||n[18]!==l||n[19]!==i?(m=[i,l,d,p],n[16]=p,n[17]=d,n[18]=l,n[19]=i,n[20]=m):m=n[20],m},hD=(0,D.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),gD=()=>(0,D.useContext)(hD),_D=e=>{let t=(0,V.c)(16),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=vt(),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]=mD(`locale-content-selector-selected-locales`,o),l;t[3]!==n||t[4]!==r||t[5]!==a||t[6]!==s||t[7]!==c?(l=()=>{if(n.length&&!s?.some(e=>n.includes(e))){let e=r?.filter(e=>n.includes(e));c(e?.length?e:[a])}},t[3]=n,t[4]=r,t[5]=a,t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===n?u=t[10]:(u=[n],t[9]=n,t[10]=u),(0,D.useEffect)(l,u);let d;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==c?(d=(0,O.jsx)(hD,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[11]=n,t[12]=i,t[13]=s,t[14]=c,t[15]=d):d=t[15],d},vD=e=>{let t=(0,V.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,D.useState)(n),[u,d]=(0,D.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(yD)},t[0]=n,t[1]=p);let m=p,h;t[2]!==c||t[3]!==r?(h=()=>{r(c)},t[2]=c,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{l(e.currentTarget.value)},t[5]=_):_=t[5];let v=_,y=e=>{e.key===`Enter`&&!i&&S?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),m())},b,x;t[6]===n?(b=t[7],x=t[8]):(b=()=>{l(n),d(bD)},x=[n],t[6]=n,t[7]=b,t[8]=x),(0,D.useEffect)(b,x);let S=a?.(c)??!0;return(0,O.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,O.jsx)(GE,{onChange:v,onKeyDown:y,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!S,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,O.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,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(SE,{Icon:mu,label:`Save changes${S?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!S,onClick:g,"aria-describedby":S?void 0:`validation-error`}),(0,O.jsx)(SE,{Icon:Ru,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function yD(e){return e+1}function bD(e){return e+1}var xD=``,SD=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(xD).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===xD?``:t.split(xD).join(``)}).join(`
|
|
44
|
+
at `))}function Pw(e,t){class n extends e{#e;constructor(...e){if(Mw()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=Nw(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 Fw={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};Pw(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:Fw[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 Iw=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},Lw=47;function Rw(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===Lw;)t--;return t===e.length?e:e.slice(0,t)}function zw(e){try{return(Rw(new URL(e).pathname)||`/`)!==`/`}catch{throw new Iw(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Bw(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new Iw(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Iw?t:new Iw(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Vw(e,t=`/api/auth`){if(Bw(e),zw(e))return e;let n=Rw(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function Hw(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function Uw(e,t,n,r,i){if(e)return Vw(e,t);if(r!==!1){let e=Aw.BETTER_AUTH_URL||Aw.NEXT_PUBLIC_BETTER_AUTH_URL||Aw.PUBLIC_BETTER_AUTH_URL||Aw.NUXT_PUBLIC_BETTER_AUTH_URL||Aw.NUXT_PUBLIC_AUTH_URL||(Aw.BASE_URL===`/`?void 0:Aw.BASE_URL);if(e)return Vw(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&Hw(o,`proto`)&&Hw(a,`host`))try{return Vw(`${o}://${a}`,t)}catch{}if(n){let e=Ww(n.url);if(!e)throw new Iw(`Could not get origin from request. Please provide a valid base URL.`);return Vw(e,t)}if(typeof window<`u`&&window.location)return Vw(window.location.origin,t)}function Ww(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Gw=[`javascript:`,`data:`,`vbscript:`];function Kw(e){return URL.canParse(e)?!Gw.includes(new URL(e).protocol):!0}var qw={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&Kw(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function Jw(e,t){let n=hw(!1),r=Cw(n,`/get-session`,e,{method:`GET`}),i=()=>{};return xw(r,()=>{let a=Dw({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 Yw=Object.defineProperty,Xw=Object.defineProperties,Zw=Object.getOwnPropertyDescriptors,Qw=Object.getOwnPropertySymbols,$w=Object.prototype.hasOwnProperty,eT=Object.prototype.propertyIsEnumerable,tT=(e,t,n)=>t in e?Yw(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nT=(e,t)=>{for(var n in t||={})$w.call(t,n)&&tT(e,n,t[n]);if(Qw)for(var n of Qw(t))eT.call(t,n)&&tT(e,n,t[n]);return e},rT=(e,t)=>Xw(e,Zw(t)),iT=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)}},aT=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}},oT=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}},sT=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 cT(e){if(typeof e==`number`)return new oT({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new oT(e);case`exponential`:return new sT(e);default:throw Error(`Invalid retry strategy`)}}var lT=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},uT=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function dT(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 uT.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function fT(e){try{return JSON.parse(e),!0}catch{return!1}}function pT(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 mT(e){try{return JSON.parse(e)}catch{return e}}function hT(e){return typeof e==`function`}function gT(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&hT(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&hT(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function _T(e){let t=new Headers(e?.headers),n=await lT(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=vT(e?.body);n&&t.set(`content-type`,n)}return t}function vT(e){return pT(e)?`application/json`:null}function yT(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(pT(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`&&pT(e.body)?new URLSearchParams(e.body).toString():e.body}function bT(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return wT.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function xT(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var ST=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function CT(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new ST(n.issues);return n.value}var wT=[`get`,`post`,`put`,`patch`,`delete`],TT=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=rT(nT({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=rT(nT({},e),{body:i.input?await CT(i.input,n?.body):n?.body,params:i.params?await CT(i.params,n?.params):n?.params,query:i.query?await CT(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),ET=e=>{async function t(t,n){let r=rT(nT(nT({},e),n),{plugins:[...e?.plugins||[],TT(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await OT(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 OT(t,r)}return t};function DT(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];wT.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 OT=async(e,t)=>{let{hooks:n,url:r,options:i}=await aT(e,t),a=gT(i),o=new AbortController,s=i.signal??o.signal,c=DT(r,i),l=yT(i),u=await _T(i),d=bT(r,i),f=rT(nT({},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}=xT(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(rT(nT({},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=dT(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??mT)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await CT(f.output,r.data));for(let e of n.onSuccess)e&&await e(rT(nT({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??mT,_=await m.text(),v=fT(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:rT(nT({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(rT(nT({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=cT(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 OT(e,rT(nT({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new iT(m.status,m.statusText,v?y:_);return{data:null,error:rT(nT({},y),{status:m.status,statusText:m.statusText})}},kT=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{}}},AT=(e,t)=>{let n=`credentials`in Request.prototype,r=Uw(e?.baseURL,e?.basePath,void 0,t)??kT(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=ET({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?uw(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[qw],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=Jw(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=wC(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function jT(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function MT(e){return e.charAt(0).toUpperCase()+e.slice(1)}var NT=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,PT=/['\u2019]/g;function FT(e){return e.replace(PT,``).match(NT)??[]}function IT(e){return FT(e).map(e=>e.toLowerCase()).join(`-`)}function LT(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 RT(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`||jT(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(IT).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=LT(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 zT(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=AT(e),s={};for(let[e,t]of Object.entries(r))s[`use${MT(e)}`]=t;return RT({...n,...s,$fetch:i,$store:o},i,t,r,a)}var BT=(e,{$listPasskeys:t,$store:n})=>({signIn:{passkey:async(r,i)=>{let a=await e(`/passkey/generate-authenticate-options`,{method:`GET`,throw:!1});if(!a.data)return a;let o=a.data.extensions||r?.extensions?{...a.data.extensions||{},...r?.extensions||{}}:void 0,s;try{s=await GC({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof FC?e.code:`AUTH_CANCELLED`,message:DC.AUTH_CANCELLED.message,status:400,statusText:`BAD_REQUEST`}}}try{let{clientExtensionResults:a,...o}=s,c=await e(`/passkey/verify-authentication`,{body:{response:o},...r?.fetchOptions,...i,method:`POST`,throw:!1});return t.set(Math.random()),n.notify(`$sessionSignal`),r?.returnWebAuthnResponse?{...c,webauthn:{response:s,clientExtensionResults:a}}:c}catch(e){return console.error(`[Better Auth] Error verifying passkey`,e),{data:null,error:{code:`AUTH_CANCELLED`,message:DC.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 BC({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 FC?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:DC.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:DC.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:DC.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),VT=()=>{let e=hw();return{id:`passkey`,version:OC,$InferServerPlugin:{},getActions:(t,n)=>BT(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:Cw(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:DC}},HT=`1.6.13`,UT=e=>({id:`sso-client`,version:HT,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),WT=()=>({id:`magic-link`,version:KC,$InferServerPlugin:{}}),GT=EC({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`}),KT=e=>({id:`two-factor`,version:KC,$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`&&Kw(e.twoFactorPage)&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:GT}),qT=e=>zT({baseURL:e,withCredentials:!0,plugins:[KT({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}}),VT(),WT(),UT()]}),JT=e=>{let t=e?.editor?.backendURL??w?.backendURL;t||(t=rt,console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=qT(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})}},YT=(e,t)=>{let n=(0,V.c)(17),r=iC(),i;n[0]!==r||n[1]!==t?(i=t??r??{editor:w},n[0]=r,n[1]=t,n[2]=i):i=n[2];let a=i,o=no(),s;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=[`session`],n[3]=s):s=n[3];let c;n[4]===a?c=n[5]:(c=async()=>(await JT(a).getSession()).data,n[4]=a,n[5]=c);let l=!e,u;n[6]!==c||n[7]!==l?(u={queryKey:s,queryFn:c,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:l},n[6]=c,n[7]=l,n[8]=u):u=n[8];let{data:d,isFetched:f,refetch:p}=vo(u),m=d??(f?null:void 0),h;n[9]===o?h=n[10]:(h=e=>{o.setQueryData([`session`],e)},n[9]=o,n[10]=h);let g=h,_;n[11]===p?_=n[12]:(_=async()=>(await p()).data,n[11]=p,n[12]=_);let v=_,y;return n[13]!==v||n[14]!==m||n[15]!==g?(y={session:m,fetchSession:v,revalidateSession:v,setSession:g},n[13]=v,n[14]=m,n[15]=g,n[16]=y):y=n[16],y},XT=e=>{let t=(0,V.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}=YT(r,i),{oAuth2AccessToken:l}=TC(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},ZT=e=>{let t=(0,V.c)(10),n=iC(),{oAuth2AccessToken:r}=XT(),i;t[0]===r?i=t[1]:(i=r&&{headers:{Authorization:`Bearer ${r.accessToken}`}},t[0]=r,t[1]=i);let a;t[2]===e?.options?a=t[3]:(a=e?.options??{},t[2]=e?.options,t[3]=a);let o;t[4]!==i||t[5]!==a?(o={...i,...a},t[4]=i,t[5]=a,t[6]=o):o=t[6];let s=o,c=e?.intlayerConfiguration??n,l=c?.editor?c:void 0,u;return t[7]!==s||t[8]!==l?(u={options:s,resolvedConfig:l},t[7]=s,t[8]=l,t[9]=u):u=t[9],u},QT=e=>{let t=(0,V.c)(2),n=iC(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=JT(r),t[0]=r,t[1]=i),i},$T=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=yC(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},eE=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=gC(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},tE=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=hC(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},nE=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=bC(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},rE=e=>{let t=(0,V.c)(3),{options:n,resolvedConfig:r}=ZT(e),i;return t[0]!==n||t[1]!==r?(i=_C(n,r),t[0]=n,t[1]=r,t[2]=i):i=t[2],i},iE=()=>{let e=(0,V.c)(3),t=tE(),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.auditContentDeclarationMetadata(e)},e[1]=t,e[2]=r),yo(r)},aE=()=>{let e=(0,V.c)(3),t=tE(),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.auditContentDeclarationField(e)},e[1]=t,e[2]=r),yo(r)},oE=e=>{let t=(0,V.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=iC(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=XT(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},sE=e=>{let t=(0,V.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}=oE(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],vo(l)},cE=()=>{let e=(0,V.c)(6),t=QT(),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),yo(a)},lE=()=>{let e=(0,V.c)(6),t=eE(),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.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),yo(a)},uE=()=>{let e=(0,V.c)(6),t=eE(),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.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),yo(a)},dE=()=>{let e=(0,V.c)(3),t=rE(),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.getDictionaries()},e[1]=t,e[2]=r),vo(r)},fE=()=>{let e=(0,V.c)(3),t=rE(),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.writeDictionary(e)},e[1]=t,e[2]=r),yo(r)},pE=(e,t)=>{let n=(0,V.c)(9),r=$T(),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.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],sE(o)},mE=(e,t)=>{let n=(0,V.c)(9),r=nE(),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.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],sE(o)},hE=()=>{let e=(0,V.c)(9),{session:t,revalidateSession:n,setSession:r}=XT(),{mutate:i}=cE(),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},gE=tu(`flex flex-col text-text backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-md`,md:`rounded-md [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-lg`,lg:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,xl:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,"2xl":`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,"3xl":`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"4xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,full:`rounded-full`},transparency:{none:`bg-card`,xs:`bg-card/95`,sm:`bg-card/90`,md:`bg-card/70`,lg:`bg-card/40`,xl:`bg-card/20`,full:``},padding:{none:`p-0`,sm:`px-3 py-2`,md:`px-4 py-3`,lg:`px-6 py-4`,xl:`px-8 py-6`,"2xl":`px-10 py-8`},separator:{without:``,x:`divide-x divide-dashed divide-text/20`,y:`divide-y divide-dashed divide-text/20`,both:`divide-x divide-y divide-dashed divide-text/20`},border:{none:``,with:`border-[1.3px]`},borderColor:{primary:`border-primary`,secondary:`border-secondary`,neutral:`border-neutral/20`,card:`border-card`,text:`border-text`,error:`border-error`,warning:`border-warning`,success:`border-success`},background:{none:`backdrop-blur-none`,hoverable:`bg-opacity-5! backdrop-blur-0 hover:bg-opacity-10! hover:backdrop-blur focus:bg-opacity-10! focus:backdrop-blur aria-selected:bg-opacity-15! aria-selected:backdrop-blur`,with:``},gap:{none:`gap-0`,sm:`gap-1`,md:`gap-3`,lg:`gap-5`,xl:`gap-8`,"2xl":`gap-10`}},defaultVariants:{roundedSize:`lg`,border:`none`,borderColor:`text`,transparency:`md`,padding:`none`,separator:`without`,gap:`none`},compoundVariants:[{background:`none`,class:`bg-transparent`}]}),_E=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>(0,O.jsx)(`div`,{className:G(gE({roundedSize:t,transparency:r,padding:n,separator:i,border:typeof o==`boolean`?o?`with`:`none`:void 0,background:c,borderColor:s,gap:l}),a),...u,children:e}),vE=({className:e,strokeWidth:t=4})=>(0,O.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`44`,height:`44`,viewBox:`0 0 44 44`,stroke:`currentColor`,role:`img`,"aria-label":`Spinner`,className:G(`size-full`,e),children:(0,O.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[(0,O.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,O.jsx)(`animate`,{attributeName:`r`,begin:`0s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,O.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`0s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]}),(0,O.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,O.jsx)(`animate`,{attributeName:`r`,begin:`-0.9s`,dur:`1.8s`,values:`1; 20`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.165, 0.84, 0.44, 1`,repeatCount:`indefinite`}),(0,O.jsx)(`animate`,{attributeName:`stroke-opacity`,begin:`-0.9s`,dur:`1.8s`,values:`1; 0`,calcMode:`spline`,keyTimes:`0; 1`,keySplines:`0.3, 0.61, 0.355, 1`,repeatCount:`indefinite`})]})]})}),yE=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>(0,O.jsx)(O.Fragment,{children:t&&n?(0,O.jsxs)(`div`,{className:`relative size-full`,children:[(0,O.jsx)(`div`,{className:G(`absolute top-0 left-0 flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,O.jsx)(vE,{className:`size-10 max-h-full max-w-full`})}),e]}):t?(0,O.jsx)(`div`,{className:G(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,O.jsx)(vE,{className:`size-10 max-h-full max-w-full`})}):e??(0,O.jsx)(O.Fragment,{})}),bE=tu(`flex-none shrink-0`,{variants:{size:{xs:`size-2`,sm:`size-3`,md:`size-4`,lg:`size-5`,xl:`size-6`,"icon-sm":`size-3`,"icon-md":`size-4`,"icon-lg":`size-5`,"icon-xl":`size-6`}},defaultVariants:{size:`md`}}),xE=tu(`relative inline-flex cursor-pointer items-center justify-center font-medium ring-0 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{size:{xs:`min-h-7 px-3 text-xs max-md:py-1`,sm:`min-h-7 px-3 text-xs max-md:py-1`,md:`min-h-8 px-6 text-sm max-md:py-2`,lg:`min-h-10 px-8 text-lg max-md:py-3`,xl:`min-h-11 px-10 text-xl max-md:py-4`,"icon-sm":`p-1.5`,"icon-md":`p-1.5`,"icon-lg":`p-1.5`,"icon-xl":`p-3`},color:{primary:`hover-primary-500/20 text-primary ring-primary-500/20 *:text-text-light`,secondary:`hover-secondary-500/20 text-secondary ring-secondary-500/20 *:text-text-light`,neutral:`text-neutral ring-neutral-500/5 *:text-text-light`,card:`hover-card-500/20 text-card ring-card-500/20 *:text-text-light`,light:`hover-white-500/20 text-white ring-white/20 *:text-text-light`,dark:`text-neutral-800 ring-text-light/50 *:text-text-light`,text:`text-text ring-text/20 *:text-text-opposite`,current:`hover-current-500/10 text-current ring-current/10 *:text-text-light`,"text-inverse":`text-text-opposite ring-text-opposite/20 *:text-text`,error:`hover-error-500/20 text-error ring-error/20 *:text-text-light`,success:`hover-success-500/20 text-success ring-success/20 *:text-text-light`,custom:``},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,"4xl":`rounded-[3rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[4rem]`,"5xl":`rounded-[4rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[5rem]`,full:`rounded-full`},variant:{default:[`bg-current`,`hover:bg-current/90`,`hover:ring-5`,`aria-selected:ring-5`],outline:[`rounded-2xl border-[1.3px] border-current bg-current/0 *:text-current!`,`hover:bg-current/20 focus-visible:bg-current/20`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],none:`border-none bg-current/0 text-inherit hover:bg-current/0`,link:`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent hover:underline`,"invisible-link":`h-auto justify-start border-inherit bg-transparent px-1 underline-offset-4 *:text-current! hover:bg-transparent`,hoverable:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,fade:[`rounded-lg border-none bg-current/10 ring-current/5 transition *:text-current! hover:bg-current/20 aria-[current]:bg-current/5`,`hover:ring-5 focus-visible:ring-5`,`aria-selected:ring-5`],input:[`text-text`,`w-full select-text resize-none rounded-2xl text-base shadow-none outline-none supports-[corner-shape:squircle]:rounded-4xl`,`transition-shadow duration-100 md:text-sm`,`ring-0`,`disabled:opacity-50`,`text-text`,`bg-neutral-50 dark:bg-neutral-950`,`ring-neutral-100 dark:ring-neutral-700`,`hover:ring-3`,`aria-selected:ring-4`,`focus-visible:ring-3`,`disabled:ring-0`,`focus-visible:outline-none`,`[box-shadow:none] focus:[box-shadow:none]`,`aria-invalid:border-error`]},textAlign:{left:`justify-start text-left`,center:`justify-center text-center`,right:`justify-end text-right`},isFullWidth:{true:`w-full`,false:``}},defaultVariants:{variant:`default`,size:`md`,color:`text`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),SE=({variant:e,size:t,color:n,children:r,Icon:i,IconRight:a,iconClassName:o,isLoading:s=!1,isActive:c,isSelected:l,isFullWidth:u,roundedSize:d,textAlign:f,disabled:p,label:m,className:h,type:g=`button`,"aria-describedby":_,"aria-expanded":v,"aria-haspopup":y,"aria-pressed":b,...x})=>{let S=e===`link`||e===`invisible-link`,C=!r&&(i||a),w={"aria-label":C?m??void 0:void 0,"aria-labelledby":void 0,"aria-describedby":_,"aria-expanded":v,"aria-haspopup":y,"aria-pressed":c===void 0?b:c,"aria-busy":s,"aria-current":c?`page`:void 0,"aria-disabled":p||s,"aria-selected":l},T=t===`icon-sm`||t===`icon-md`||t===`icon-lg`||t===`icon-xl`;return(0,O.jsxs)(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:xE({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:f??(a?`left`:`center`),className:h}),...w,...x,children:[i&&!s&&(0,O.jsx)(i,{className:bE({size:t,className:G(!T&&`mr-3`,o)}),"aria-hidden":`true`}),(0,O.jsx)(`div`,{className:G(`flex items-center justify-center transition-[width] duration-300`,s&&t===`sm`&&`w-3`,s&&t===`md`&&`w-4`,s&&t===`lg`&&`w-6`,s&&t===`xl`&&`w-8`),children:(0,O.jsx)(yE,{className:bE({size:t,className:G(!T&&`mr-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&(0,O.jsx)(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&C&&(0,O.jsx)(`span`,{className:`sr-only`,children:m}),a&&(0,O.jsx)(a,{className:bE({size:t,className:G(!T&&`ml-3`,o)}),"aria-hidden":`true`})]})},CE=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>(0,O.jsx)(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:G(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-all duration-700 ease-in-out`,t!==void 0&&!t&&`grid-rows-[1fr] overflow-x-auto`,r&&`hover:grid-rows-[1fr] hover:overflow-x-auto`,i&&`focus-within:grid-rows-[1fr] focus-within:overflow-x-auto focus:grid-rows-[1fr] focus:overflow-x-auto`,n),...o,children:(0,O.jsx)(`div`,{style:{minHeight:`${a}px`},className:G(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})}),wE=e=>{let t=(0,V.c)(8),{children:n,header:r,isOpen:i,defaultIsOpen:a,onToggle:o,onClick:s,disabled:c,contentClassName:l,headerClassName:u,contentId:d,"aria-label":f,...p}=e,m=a===void 0?!1:a,h=c===void 0?!1:c,g=i!==void 0,[_,v]=(0,D.useState)(m),y=(0,D.useId)(),b=g?i:_,x=!b,S=d??`${y}-accordion-content`,C;t[0]!==h||t[1]!==g||t[2]!==b||t[3]!==s||t[4]!==o?(C=e=>{if(h)return;let t=!b;g||v(t),o?.(t),s?.(e)},t[0]=h,t[1]=g,t[2]=b,t[3]=s,t[4]=o,t[5]=C):C=t[5];let w=C,T;return t[6]===w?T=t[7]:(T=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),w(e))},t[6]=w,t[7]=T),(0,O.jsxs)(`div`,{className:`w-full`,children:[(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,onClick:w,onKeyDown:T,disabled:h,isFullWidth:!0,className:G(`flex items-center justify-between gap-2`,u),IconRight:hu,iconClassName:G(`transform transition-transform duration-500 ease-in-out`,b?`rotate-0`:`-rotate-180`),"aria-expanded":b,"aria-controls":S,"aria-label":f,role:`button`,...p,children:r}),(0,O.jsx)(CE,{id:S,tabIndex:x?-1:void 0,isHidden:x,className:l,role:`region`,"aria-labelledby":S,children:n})]})},TE=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>(0,O.jsx)(`div`,{className:G(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,e===2&&`hover:bg-card/30`,e>=3&&``,a===!0&&`bg-card/40`),...o,children:(0,O.jsx)(wE,{isOpen:a,label:t,header:(0,O.jsxs)(`div`,{className:`flex w-full`,children:[(0,O.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,O.jsx)(`span`,{className:G(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&(0,O.jsx)(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&(0,O.jsx)(`p`,{className:`pl-3 text-card text-sm`,children:n})]}),children:(0,O.jsx)(`div`,{className:`size-full px-2`,children:r})})}),EE=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:ee},s=[...t,o];return(0,O.jsx)(TE,{level:t.length,title:`${a}`,description:``,isSelected:Qe(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:(0,O.jsx)(dD,{...e,keyPath:s,section:n})},JSON.stringify(n))})},DE=e=>e?.getAttribute(`aria-selected`)===`true`,OE=(e,t)=>{let n=(0,V.c)(24),r;n[0]===t?r=n[1]:(r=t===void 0?{selector:DE,isHoverable:!1,orientation:`horizontal`}:t,n[0]=t,n[1]=r);let{selector:i,isHoverable:a,orientation:o}=r,s=i===void 0?DE:i,c=a===void 0?!1:a,l=o===void 0?`horizontal`:o,[u,d]=(0,D.useState)(null),[f,p]=(0,D.useState)(null),m=(0,D.useRef)(null),h=(0,D.useRef)(null),g=e.current.length,_;n[2]!==f||n[3]!==e.current||n[4]!==l||n[5]!==s?(_=()=>{let t;if(f?(t=f,m.current&&=(clearTimeout(m.current),null)):t=e.current.find(s)??null,!t){if(l===`vertical`){let e=h.current,t={top:e?.top??0,height:e?.height??0,opacity:0};e?.opacity!==0&&(d(t),h.current=t)}else{let e=h.current,t={left:e?.left??0,width:e?.width??0,opacity:0};e?.opacity!==0&&(d(t),h.current=t)}return}if(l===`vertical`){let e=t.offsetTop,n=t.offsetHeight,r={top:e,height:n,opacity:1},i=h.current;(!i||i.top!==e||i.height!==n||i.opacity!==1)&&(d(r),h.current=r)}else{let e=t.offsetLeft,n=t.offsetWidth,r={left:e,width:n,opacity:1},i=h.current;(!i||i.left!==e||i.width!==n||i.opacity!==1)&&(d(r),h.current=r)}},n[2]=f,n[3]=e.current,n[4]=l,n[5]=s,n[6]=_):_=n[6];let v=_,y;n[7]!==v||n[8]!==f||n[9]!==c||n[10]!==e.current||n[11]!==s?(y=()=>{v(),window.addEventListener(`resize`,v),window.addEventListener(`DOMContentLoaded`,v);let t=[];e.current.forEach(e=>{if(e){let n=new MutationObserver(e=>{for(let t of e)if(t.type===`attributes`&&(t.attributeName===`aria-selected`||t.attributeName===`data-active`||t.attributeName===`data-indicator`)){v();break}});n.observe(e,{attributes:!0,attributeFilter:[`aria-selected`,`data-active`,`data-indicator`]}),t.push(n)}});let n=[],r=e=>{if(!e)return;let t=new ResizeObserver(()=>{v()});t.observe(e),n.push(t)},i=e.current.find(s)??null;i&&r(i),f&&r(f);let a=e=>{m.current&&=(clearTimeout(m.current),null),p(e.currentTarget)},o=()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{p(null)},150)};return c&&e.current.forEach(e=>{e?.addEventListener(`mouseenter`,a,{passive:!0}),e?.addEventListener(`mouseleave`,o,{passive:!0})}),()=>{m.current&&clearTimeout(m.current),window.removeEventListener(`resize`,v),window.removeEventListener(`DOMContentLoaded`,v),t.forEach(kE),n.forEach(AE),e.current.forEach(e=>{e?.removeEventListener(`mouseenter`,a),e?.removeEventListener(`mouseleave`,o)})}},n[7]=v,n[8]=f,n[9]=c,n[10]=e.current,n[11]=s,n[12]=y):y=n[12];let b;n[13]!==f||n[14]!==c||n[15]!==g||n[16]!==e||n[17]!==l||n[18]!==s?(b=[e,s,f,g,l,c],n[13]=f,n[14]=c,n[15]=g,n[16]=e,n[17]=l,n[18]=s,n[19]=b):b=n[19],(0,D.useLayoutEffect)(y,b);let x;return n[20]!==v||n[21]!==u||n[22]!==l?(x={choiceIndicatorPosition:u,calculatePosition:v,orientation:l},n[20]=v,n[21]=u,n[22]=l,n[23]=x):x=n[23],x};function kE(e){e.disconnect()}function AE(e){e.disconnect()}var jE=(e,t)=>{let n=(0,V.c)(23),{choices:r,value:i,defaultValue:a,onChange:o,hoverable:s,disabled:c}=e,l;n[0]===r?l=n[1]:(l=r===void 0?[]:r,n[0]=r,n[1]=l);let u=l,d=s===void 0?!0:s,f=c===void 0?!1:c,[p,m]=(0,D.useState)(i??a??u[0]?.value),[h,g]=(0,D.useState)(null),_;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],n[2]=_):_=n[2];let v=(0,D.useRef)(_),y=(0,D.useRef)(null),b;n[3]===t?b=n[4]:(b={selector:ME,isHoverable:!1,orientation:t},n[3]=t,n[4]=b);let{choiceIndicatorPosition:x}=OE(v,b),S;if(n[5]!==u||n[6]!==p){let e;n[8]===p?e=n[9]:(e=e=>e.value===p,n[8]=p,n[9]=e),S=u.findIndex(e),n[5]=u,n[6]=p,n[7]=S}else S=n[7];let C=S,w=d&&h!==null?h:C,T;n[10]===o?T=n[11]:(T=e=>{console.log(`useSwitchSelector handleChange`,e),m(e),o?.(e)},n[10]=o,n[11]=T);let E=T,O,k;n[12]===i?(O=n[13],k=n[14]):(k=()=>{i!==void 0&&m(i)},O=[i],n[12]=i,n[13]=O,n[14]=k),(0,D.useEffect)(k,O);let A;return n[15]!==x||n[16]!==f||n[17]!==E||n[18]!==h||n[19]!==w||n[20]!==C||n[21]!==p?(A={valueState:p,hoveredIndex:h,setHoveredIndex:g,optionsRefs:v,indicatorRef:y,choiceIndicatorPosition:x,selectedIndex:C,indicatorIndex:w,handleChange:E,disabled:f},n[15]=x,n[16]=f,n[17]=E,n[18]=h,n[19]=w,n[20]=C,n[21]=p,n[22]=A):A=n[22],A};function ME(e){return e.getAttribute(`data-indicator`)===`true`}var NE=[{content:`Off`,value:!1},{content:`On`,value:!0}],PE=function(e){return e.PRIMARY=`primary`,e.SECONDARY=`secondary`,e.NEUTRAL=`neutral`,e.LIGHT=`light`,e.DARK=`dark`,e.TEXT=`text`,e}({}),FE=tu(`flex h-fit w-fit cursor-pointer flex-row gap-2 rounded-full border-[1.3px] p-[1.5px]`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`},disabled:{true:`cursor-not-allowed opacity-50`,false:``}},defaultVariants:{color:`text`,disabled:!1}}),IE=tu(`z-1 flex-1 cursor-pointer font-medium text-sm transition-all duration-300 ease-in-out aria-selected:cursor-default data-[indicator=true]:text-text-opposite motion-reduce:transition-none`,{variants:{size:{xs:`px-2 py-0.5 text-xs`,sm:`px-2 py-1 text-xs`,md:`p-2 text-sm`,lg:`p-4 text-base`}},defaultVariants:{size:`md`}}),LE=tu(`absolute top-0 z-0 h-full w-auto rounded-full transition-all duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary data-[indicator=true]:text-text`,secondary:`bg-secondary data-[indicator=true]:text-text`,[`${PE.ERROR}`]:`bg-error data-[indicator=true]:text-text`,neutral:`bg-neutral data-[indicator=true]:text-white`,light:`bg-white data-[indicator=true]:text-black`,dark:`bg-neutral-800 data-[indicator=true]:text-white`,text:`bg-text data-[indicator=true]:text-text-opposite`}}}),RE=e=>{let t=(0,V.c)(30),{choices:n,color:r,size:i,className:a,itemClassName:o}=e,s=n===void 0?NE:n,c=r===void 0?`primary`:r,l=i===void 0?`md`:i,u;t[0]!==s||t[1]!==e.defaultValue||t[2]!==e.disabled||t[3]!==e.hoverable||t[4]!==e.onChange||t[5]!==e.value?(u={choices:s,value:e.value,defaultValue:e.defaultValue,onChange:e.onChange,hoverable:e.hoverable,disabled:e.disabled},t[0]=s,t[1]=e.defaultValue,t[2]=e.disabled,t[3]=e.hoverable,t[4]=e.onChange,t[5]=e.value,t[6]=u):u=t[6];let{selectedIndex:d,indicatorIndex:f,handleChange:p,optionsRefs:m,indicatorRef:h,choiceIndicatorPosition:g,setHoveredIndex:_,disabled:v}=jE(u,`horizontal`),y;if(t[7]!==g||t[8]!==s||t[9]!==a||t[10]!==c||t[11]!==v||t[12]!==p||t[13]!==f||t[14]!==h||t[15]!==o||t[16]!==m||t[17]!==d||t[18]!==_||t[19]!==l){let e;t[21]!==v||t[22]!==p||t[23]!==f||t[24]!==o||t[25]!==m||t[26]!==d||t[27]!==_||t[28]!==l?(e=(e,t)=>{let{content:n,value:r,...i}=e,a=typeof r==`string`||typeof r==`number`,s=t===d,c=t===f;return(0,D.createElement)(`button`,{...i,className:G(IE({size:l}),v&&`cursor-not-allowed`,o),key:a?r:t,role:`tab`,onClick:()=>p(r),"aria-selected":s?`true`:void 0,"data-indicator":c?`true`:void 0,disabled:v,tabIndex:s?0:-1,ref:e=>{m.current[t]=e},onMouseEnter:()=>!v&&_(t),onMouseLeave:()=>!v&&_(null)},n)},t[21]=v,t[22]=p,t[23]=f,t[24]=o,t[25]=m,t[26]=d,t[27]=_,t[28]=l,t[29]=e):e=t[29],y=(0,O.jsx)(`div`,{className:FE({color:c,disabled:v,className:a}),role:`tablist`,"aria-disabled":v?`true`:void 0,children:(0,O.jsxs)(`div`,{className:`relative flex size-full flex-row items-center justify-center`,children:[s.map(e),g&&(0,O.jsx)(`div`,{className:G(LE({color:c})),style:g,ref:h})]})}),t[7]=g,t[8]=s,t[9]=a,t[10]=c,t[11]=v,t[12]=p,t[13]=f,t[14]=h,t[15]=o,t[16]=m,t[17]=d,t[18]=_,t[19]=l,t[20]=y}else y=t[20];return y},zE=e=>{let t=(0,V.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=OS(i,n,$S());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(O.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,O.jsx)(`button`,{type:`button`,className:G(`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,O.jsx)(RE,{value:l,onChange:d})})},BE=e=>{let{keyPath:t,section:n}=e;return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[P]).map(r=>{let i={type:P,key:r},a=[...t,i],o=n[P][r];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,D.createElement)(dD,{...e,key:r,keyPath:a,section:o})]})})})},VE=e=>{let{keyPath:t,section:n}=e;return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n[M]).map(r=>{let i={type:M,key:r},a=[...t,i],o=n[M][r];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,D.createElement)(dD,{...e,key:r,keyPath:a,section:o})]})})})},HE=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,D.useState)(!1),l=(0,D.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,D.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,D.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,O.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,O.jsxs)(`div`,{className:G(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,O.jsx)(SE,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:mu,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,O.jsx)(SE,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Ru,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,O.jsxs)(`div`,{className:G(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,O.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,O.jsx)(SE,{label:`Edit`,Icon:ju,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},UE=(...e)=>e.filter(Boolean).join(` `),WE=tu([`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`}}),GE=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,O.jsx)(`input`,{className:UE(WE({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),KE=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,O.jsx)(`textarea`,{className:G(`resize-none`,WE({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),qE=24,JE=12,YE=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,D.useRef)(null);(0,D.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=qE*r+JE;n.height=`${Math.max(Math.min(i,a),36)}px`};return(0,D.useLayoutEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,O.jsx)(KE,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:G(`overflow-y-auto`,t&&`resize-none`,e),...a})},XE=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,D.useRef)(null);return(0,D.useImperativeHandle)(n,()=>i.current),(0,O.jsx)(HE,{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,O.jsx)(YE,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},ZE=e=>{let t=(0,V.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=$S(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??OS(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,O.jsx)(O.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,O.jsx)(`button`,{type:`button`,className:G(`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,O.jsx)(XE,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:QE})}),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 QE(){return null}var $E=e=>{let t=(0,V.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=oC(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=OS(e.editedContent,n),s=r[I],{content:c}=r,l=[...n,{type:I}],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,O.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,O.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,O.jsx)(ZE,{...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},eD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:z}],i=n[z];return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,O.jsx)(dD,{...e,keyPath:r,section:i})})},tD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:F}],i=n[F];return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,O.jsx)(dD,{...e,keyPath:r,section:i})})},nD=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,O.jsx)(dD,{...e,keyPath:r,section:i})})},rD=(0,D.memo)(e=>{let t=(0,V.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(iD),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:L},o=[...n,i],c=Qe(o,s);return(0,O.jsx)(TE,{level:n.length,title:nt(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,O.jsx)(dD,{...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 iD(e){return!uD.includes(e)}var aD=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,D.useRef)(null);return(0,D.useImperativeHandle)(n,()=>i.current),(0,O.jsx)(HE,{value:(0,D.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,O.jsx)(GE,{ref:i,...r})})},oD=e=>{let t=(0,V.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=$S(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=OS(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,O.jsx)(O.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,O.jsx)(`button`,{type:`button`,className:G(`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,O.jsx)(aD,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:sD})}),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 sD(){return null}var cD=e=>{let{keyPath:t,section:n}=e;return(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!uD.includes(e)).map(r=>{let i={type:N,key:r},a=[...t,i],o=n[N][r];return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,D.createElement)(dD,{...e,key:r,keyPath:a,section:o})]})})})},lD=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:j,key:r},a=[...t,i],o=n[j][r];return(0,O.jsx)(dD,{...e,keyPath:a,section:o})},uD=[`filePath`,`id`,`nodeType`],dD=(0,D.memo)(e=>{let t=$S(),n=(0,D.useMemo)(()=>OS(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,D.useMemo)(()=>PS(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,O.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,O.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,O.jsx)(nD,{...e,section:n}):r===`html`?(0,O.jsx)(eD,{...e,section:n}):r===`translation`?(0,O.jsx)(lD,{...e,section:n}):r===`enumeration`?(0,O.jsx)(VE,{...e,section:n}):r===`plural`?(0,O.jsx)(cD,{...e,section:n}):r===`condition`?(0,O.jsx)(BE,{...e,section:n}):r===`insertion`?(0,O.jsx)(tD,{...e,section:n}):r===`array`?(0,O.jsx)(EE,{...e,section:n}):r===`file`?(0,O.jsx)($E,{...e,section:n}):(0,O.jsx)(rD,{...e,section:n});if(typeof n==`string`)return(0,O.jsx)(ZE,{...e,section:n});if(typeof n==`number`)return(0,O.jsx)(oD,{...e,section:n});if(typeof n==`boolean`)return(0,O.jsx)(zE,{...e,section:n})}),fD=e=>{let t=(0,V.c)(6),{dictionary:n,...r}=e,i=$S(),{editedContent:a,addEditedContent:o}=oC(),{focusedContent:s,setFocusedContentKeyPath:c}=tC(),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,O.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,D.createElement)(dD,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},pD={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`]},mD=(e,t)=>{let n=(0,V.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,D.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,D.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,m;return n[16]!==p||n[17]!==d||n[18]!==l||n[19]!==i?(m=[i,l,d,p],n[16]=p,n[17]=d,n[18]=l,n[19]=i,n[20]=m):m=n[20],m},hD=(0,D.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),gD=()=>(0,D.useContext)(hD),_D=e=>{let t=(0,V.c)(16),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=vt(),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]=mD(`locale-content-selector-selected-locales`,o),l;t[3]!==n||t[4]!==r||t[5]!==a||t[6]!==s||t[7]!==c?(l=()=>{if(n.length&&!s?.some(e=>n.includes(e))){let e=r?.filter(e=>n.includes(e));c(e?.length?e:[a])}},t[3]=n,t[4]=r,t[5]=a,t[6]=s,t[7]=c,t[8]=l):l=t[8];let u;t[9]===n?u=t[10]:(u=[n],t[9]=n,t[10]=u),(0,D.useEffect)(l,u);let d;return t[11]!==n||t[12]!==i||t[13]!==s||t[14]!==c?(d=(0,O.jsx)(hD,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[11]=n,t[12]=i,t[13]=s,t[14]=c,t[15]=d):d=t[15],d},vD=e=>{let t=(0,V.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,D.useState)(n),[u,d]=(0,D.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(yD)},t[0]=n,t[1]=p);let m=p,h;t[2]!==c||t[3]!==r?(h=()=>{r(c)},t[2]=c,t[3]=r,t[4]=h):h=t[4];let g=h,_;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>{l(e.currentTarget.value)},t[5]=_):_=t[5];let v=_,y=e=>{e.key===`Enter`&&!i&&S?(e.preventDefault(),g()):e.key===`Escape`&&(e.preventDefault(),m())},b,x;t[6]===n?(b=t[7],x=t[8]):(b=()=>{l(n),d(bD)},x=[n],t[6]=n,t[7]=b,t[8]=x),(0,D.useEffect)(b,x);let S=a?.(c)??!0;return(0,O.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,O.jsx)(GE,{onChange:v,onKeyDown:y,"aria-label":`Editable input value`,"aria-describedby":f||o?`content-editor-input-actions`:void 0,"aria-invalid":!S,variant:`invisible`,className:`size-full`,defaultValue:n,disabled:i,...s},u),(f||o)&&(0,O.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,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(SE,{Icon:mu,label:`Save changes${S?``:` (invalid content)`}`,variant:`hoverable`,color:`text`,size:`icon-sm`,className:`cursor-pointer hover:scale-110`,disabled:i||!S,onClick:g,"aria-describedby":S?void 0:`validation-error`}),(0,O.jsx)(SE,{Icon:Ru,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function yD(e){return e+1}function bD(e){return e+1}var xD=``,SD=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(xD).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===xD?``:t.split(xD).join(``)}).join(`
|
|
45
45
|
`)},CD=e=>{let t=e.split(`
|
|
46
46
|
`);return t.length===0?[``]:t},wD=(()=>{if(typeof Intl>`u`||!(`Segmenter`in Intl))return null;let e=Intl.Segmenter;return new e(void 0,{granularity:`grapheme`})})(),TD=(e,t)=>{if(t<=0)return 0;if(wD){let n=[...wD.segment(e.slice(0,t))],r=n[n.length-1];return r?t-r.segment.length:t-1}let n=e.charCodeAt(t-1);return n>=56320&&n<=57343&&t>=2?t-2:t-1},ED=(e,t)=>{if(t>=e.length)return e.length;if(wD){let n=[...wD.segment(e.slice(t))][0];return n?t+n.segment.length:t+1}let n=e.charCodeAt(t);return n>=55296&&n<=56319&&t+1<e.length?t+2:t+1},DD=(e,t)=>{if(t<=0)return 0;let n=t-1;for(;n>0&&/\s/.test(e[n-1]);)n--;for(;n>0&&/\S/.test(e[n-1]);)n--;return n},OD=(e,t)=>{if(t>=e.length)return e.length;let n=t;for(;n<e.length&&/\S/.test(e[n]);)n++;for(;n<e.length&&/\s/.test(e[n]);)n++;return n},kD=(e,t)=>e.slice(0,t).lastIndexOf(`
|
|
47
47
|
`)+1,AD=(e,t)=>{let n=e.indexOf(`
|
|
@@ -95,7 +95,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
95
95
|
`},Hj=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Uj=function(){D.useEffect(function(){return document.body.setAttribute(Bj,(Hj()+1).toString()),function(){var e=Hj()-1;e<=0?document.body.removeAttribute(Bj):document.body.setAttribute(Bj,e.toString())}},[])},Wj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Uj();var a=D.useMemo(function(){return Rj(i)},[i]);return D.createElement(zj,{styles:Vj(a,!t,i,n?``:`!important`)})},Gj=!1;if(typeof window<`u`)try{var Kj=Object.defineProperty({},"passive",{get:function(){return Gj=!0,!0}});window.addEventListener(`test`,Kj,Kj),window.removeEventListener(`test`,Kj,Kj)}catch{Gj=!1}var qj=Gj?{passive:!1}:!1,Jj=function(e){return e.tagName===`TEXTAREA`},Yj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Jj(e)&&n[t]===`visible`)},Xj=function(e){return Yj(e,`overflowY`)},Zj=function(e){return Yj(e,`overflowX`)},Qj=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),tM(e,r)){var i=nM(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$j=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},eM=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},tM=function(e,t){return e===`v`?Xj(t):Zj(t)},nM=function(e,t){return e===`v`?$j(t):eM(t)},rM=function(e,t){return e===`h`&&t===`rtl`?-1:1},iM=function(e,t,n,r,i){var a=rM(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=nM(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&tM(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},aM=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},oM=function(e){return[e.deltaX,e.deltaY]},sM=function(e){return e&&`current`in e?e.current:e},cM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},lM=function(e){return`
|
|
96
96
|
.block-interactivity-${e} {pointer-events: none;}
|
|
97
97
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
98
|
-
`},uM=0,dM=[];function fM(e){var t=D.useRef([]),n=D.useRef([0,0]),r=D.useRef(),i=D.useState(uM++)[0],a=D.useState(Pj)[0],o=D.useRef(e);D.useEffect(function(){o.current=e},[e]),D.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=lj([e.lockRef.current],(e.shards||[]).map(sM),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=D.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=aM(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Qj(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Qj(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return iM(h,t,e,h===`h`?s:c,!0)},[]),c=D.useCallback(function(e){var n=e;if(!(!dM.length||dM[dM.length-1]!==a)){var r=`deltaY`in n?oM(n):aM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&cM(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(sM).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=D.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:pM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=D.useCallback(function(e){n.current=aM(e),r.current=void 0},[]),d=D.useCallback(function(t){l(t.type,oM(t),t.target,s(t,e.lockRef.current))},[]),f=D.useCallback(function(t){l(t.type,aM(t),t.target,s(t,e.lockRef.current))},[]);D.useEffect(function(){return dM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,qj),document.addEventListener(`touchmove`,c,qj),document.addEventListener(`touchstart`,u,qj),function(){dM=dM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,qj),document.removeEventListener(`touchmove`,c,qj),document.removeEventListener(`touchstart`,u,qj)}},[]);var p=e.removeScrollBar,m=e.inert;return D.createElement(D.Fragment,null,m?D.createElement(a,{styles:lM(i)}):null,p?D.createElement(Wj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var mM=Cj(wj,fM),hM=D.forwardRef(function(e,t){return D.createElement(Ej,sj({},e,{ref:t,sideCar:mM}))});hM.classNames=Ej.classNames;var gM=[` `,`Enter`,`ArrowUp`,`ArrowDown`],_M=[` `,`Enter`],vM=`Select`,[yM,bM,xM]=xc(vM),[SM,CM]=pc(vM,[xM,jA]),wM=jA(),[TM,EM]=SM(vM),[DM,OM]=SM(vM),kM=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=wM(t),[g,_]=D.useState(null),[v,y]=D.useState(null),[b,x]=D.useState(!1),S=WD(l),[C,w]=Zc({prop:r,defaultProp:i??!1,onChange:a,caller:vM}),[T,E]=Zc({prop:o,defaultProp:s,onChange:c,caller:vM}),k=D.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=D.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,O.jsx)(qA,{...h,children:(0,O.jsxs)(TM,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:fO(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:k,disabled:f,children:[(0,O.jsx)(yM.Provider,{scope:t,children:(0,O.jsx)(DM,{scope:e.__scopeSelect,onNativeOptionAdd:D.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:D.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,O.jsxs)(wN,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,O.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};kM.displayName=vM;var AM=`SelectTrigger`,jM=D.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=wM(n),o=EM(AM,n),s=o.disabled||r,c=dc(t,o.onTriggerChange),l=bM(n),u=D.useRef(`touch`),[d,f,p]=EN(e=>{let t=l().filter(e=>!e.disabled),n=DN(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,O.jsx)(JA,{asChild:!0,...a,children:(0,O.jsx)(Cc.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":TN(o.value)?``:void 0,...i,ref:c,onClick:cc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:cc(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:cc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&gM.includes(e.key)&&(m(),e.preventDefault())})})})});jM.displayName=AM;var MM=`SelectValue`,NM=D.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=EM(MM,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=dc(t,c.onValueNodeChange);return Hc(()=>{l(u)},[l,u]),(0,O.jsx)(Cc.span,{...s,ref:d,style:{pointerEvents:`none`},children:TN(c.value)?(0,O.jsx)(O.Fragment,{children:o}):a})});NM.displayName=MM;var PM=`SelectIcon`,FM=D.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,O.jsx)(Cc.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});FM.displayName=PM;var IM=`SelectPortal`,LM=e=>(0,O.jsx)(Wc,{asChild:!0,...e});LM.displayName=IM;var RM=`SelectContent`,zM=D.forwardRef((e,t)=>{let n=EM(RM,e.__scopeSelect),[r,i]=D.useState();if(Hc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Sc.createPortal((0,O.jsx)(VM,{scope:e.__scopeSelect,children:(0,O.jsx)(yM.Slot,{scope:e.__scopeSelect,children:(0,O.jsx)(`div`,{children:e.children})})}),t):null}return(0,O.jsx)(GM,{...e,ref:t})});zM.displayName=RM;var BM=10,[VM,HM]=SM(RM),UM=`SelectContentImpl`,WM=hc(`SelectContent.RemoveScroll`),GM=D.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=EM(RM,n),[y,b]=D.useState(null),[x,S]=D.useState(null),C=dc(t,e=>b(e)),[w,T]=D.useState(null),[E,k]=D.useState(null),A=bM(n),[j,M]=D.useState(!1),N=D.useRef(!1);D.useEffect(()=>{if(y)return oj(y)},[y]),KD();let P=D.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,x]),F=D.useCallback(()=>P([w,y]),[P,w,y]);D.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=v;D.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null};return L.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,I,L]),D.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[ee,te]=EN(e=>{let t=A().filter(e=>!e.disabled),n=DN(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=D.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(N.current=!0))},[v.value]),R=D.useCallback(()=>y?.focus(),[y]),z=D.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&k(e)},[v.value]),B=r===`popper`?YM:qM,re=B===YM?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,O.jsx)(VM,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:R,itemTextRefCallback:z,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:j,searchRef:ee,children:(0,O.jsx)(hM,{as:WM,allowPinchZoom:!0,children:(0,O.jsx)(QD,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:cc(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,O.jsx)(Nc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,O.jsx)(B,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...re,onPlaced:()=>M(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:cc(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})});GM.displayName=UM;var KM=`SelectItemAlignedPosition`,qM=D.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=EM(RM,n),o=HM(RM,n),[s,c]=D.useState(null),[l,u]=D.useState(null),d=dc(t,e=>u(e)),f=bM(n),p=D.useRef(!1),m=D.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=D.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-BM,d=HD(a,[BM,Math.max(BM,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-BM,d=HD(a,[BM,Math.max(BM,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-BM*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-BM,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${BM}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Hc(()=>y(),[y]);let[b,x]=D.useState();return Hc(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,O.jsx)(XM,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:D.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,O.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,O.jsx)(Cc.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});qM.displayName=KM;var JM=`SelectPopperPosition`,YM=D.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=BM,...a}=e,o=wM(n);return(0,O.jsx)(YA,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});YM.displayName=JM;var[XM,ZM]=SM(RM,{}),QM=`SelectViewport`,$M=D.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=HM(QM,n),o=ZM(QM,n),s=dc(t,a.onViewportChange),c=D.useRef(0);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,O.jsx)(yM.Slot,{scope:n,children:(0,O.jsx)(Cc.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:cc(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-BM*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});$M.displayName=QM;var eN=`SelectGroup`,[tN,nN]=SM(eN),rN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=fO();return(0,O.jsx)(tN,{scope:n,id:i,children:(0,O.jsx)(Cc.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});rN.displayName=eN;var iN=`SelectLabel`,aN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=nN(iN,n);return(0,O.jsx)(Cc.div,{id:i.id,...r,ref:t})});aN.displayName=iN;var oN=`SelectItem`,[sN,cN]=SM(oN),lN=D.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=EM(oN,n),c=HM(oN,n),l=s.value===r,[u,d]=D.useState(a??``),[f,p]=D.useState(!1),m=dc(t,e=>c.itemRefCallback?.(e,r,i)),h=fO(),g=D.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,O.jsx)(sN,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:D.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,O.jsx)(yM.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,O.jsx)(Cc.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:cc(o.onFocus,()=>p(!0)),onBlur:cc(o.onBlur,()=>p(!1)),onClick:cc(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:cc(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:cc(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:cc(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:cc(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:cc(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(_M.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});lN.displayName=oN;var uN=`SelectItemText`,dN=D.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=EM(uN,n),s=HM(uN,n),c=cN(uN,n),l=OM(uN,n),[u,d]=D.useState(null),f=dc(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=D.useMemo(()=>(0,O.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Hc(()=>(h(m),()=>g(m)),[h,g,m]),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Cc.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Sc.createPortal(a.children,o.valueNode):null]})});dN.displayName=uN;var fN=`SelectItemIndicator`,pN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return cN(fN,n).isSelected?(0,O.jsx)(Cc.span,{"aria-hidden":!0,...r,ref:t}):null});pN.displayName=fN;var mN=`SelectScrollUpButton`,hN=D.forwardRef((e,t)=>{let n=HM(mN,e.__scopeSelect),r=ZM(mN,e.__scopeSelect),[i,a]=D.useState(!1),o=dc(t,r.onScrollButtonChange);return Hc(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(vN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});hN.displayName=mN;var gN=`SelectScrollDownButton`,_N=D.forwardRef((e,t)=>{let n=HM(gN,e.__scopeSelect),r=ZM(gN,e.__scopeSelect),[i,a]=D.useState(!1),o=dc(t,r.onScrollButtonChange);return Hc(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(vN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});_N.displayName=gN;var vN=D.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=HM(`SelectScrollButton`,n),o=D.useRef(null),s=bM(n),c=D.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return D.useEffect(()=>()=>c(),[c]),Hc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,O.jsx)(Cc.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:cc(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:cc(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:cc(i.onPointerLeave,()=>{c()})})}),yN=`SelectSeparator`,bN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,O.jsx)(Cc.div,{"aria-hidden":!0,...r,ref:t})});bN.displayName=yN;var xN=`SelectArrow`,SN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=wM(n),a=EM(xN,n),o=HM(xN,n);return a.open&&o.position===`popper`?(0,O.jsx)(XA,{...i,...r,ref:t}):null});SN.displayName=xN;var CN=`SelectBubbleInput`,wN=D.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=D.useRef(null),a=dc(r,i),o=ZA(t);return D.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,O.jsx)(Cc.select,{...n,style:{...el,...n.style},ref:a,defaultValue:t})});wN.displayName=CN;function TN(e){return e===``||e===void 0}function EN(e){let t=Tc(e),n=D.useRef(``),r=D.useRef(0),i=D.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=D.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function DN(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=ON(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function ON(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kN=kM,AN=jM,jN=NM,MN=FM,NN=LM,PN=zM,FN=$M,IN=rN,LN=aN,RN=lN,zN=dN,BN=pN,VN=hN,HN=_N,UN=bN,WN=kN,GN=IN,KN=jN,qN=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,O.jsxs)(AN,{suppressHydrationWarning:!0,className:G(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,O.jsx)(MN,{asChild:!0,children:(0,O.jsx)(yu,{className:`size-4 opacity-50`})})]}),JN=({className:e,...t})=>(0,O.jsx)(VN,{className:G(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(vu,{})}),YN=({className:e,...t})=>(0,O.jsx)(HN,{className:G(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(hu,{})}),XN=({className:e,children:t,position:n=`popper`,...r})=>(0,O.jsx)(NN,{children:(0,O.jsxs)(PN,{className:G(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,O.jsx)(JN,{}),(0,O.jsx)(FN,{className:G(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,O.jsx)(YN,{})]})}),ZN=({className:e,...t})=>(0,O.jsx)(LN,{className:G(`px-1 py-0.5 font-semibold text-sm`,e),...t}),QN=({className:e,children:t,...n})=>(0,O.jsxs)(RN,{className:G(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,O.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,O.jsx)(BN,{children:(0,O.jsx)(mu,{className:`size-4`})})}),(0,O.jsx)(zN,{children:t})]}),$N=({className:e,...t})=>(0,O.jsx)(UN,{className:G(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=WN;J.Group=GN,J.Value=KN,J.Trigger=qN,J.ScrollUpButton=JN,J.ScrollDownButton=YN,J.Content=XN,J.Label=ZN,J.Item=QN,J.Separator=$N;var eP=e=>{let t,n;if(typeof e==`number`||!Number.isNaN(Number(e)))t=`=`,n=e.toString();else if(typeof e==`string`){let r=[`<=`,`>=`,`<`,`>`,`=`].find(t=>e.startsWith(t));r&&(t=r,n=e.slice(r.length))}return{comparator:t,numberValue:n}},tP=e=>{let t=(0,V.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=eP(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,D.useState)(a??null),[l,u]=(0,D.useState)(o??null),d,f;t[2]!==s||t[3]!==a||t[4]!==o||t[5]!==l||t[6]!==r?(d=()=>{s&&l&&(s!==a||l!==o)&&r(`${s}${l}`)},f=[s,a,o,l,r],t[2]=s,t[3]=a,t[4]=o,t[5]=l,t[6]=r,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,D.useEffect)(d,f);let p;if(t[9]!==a||t[10]!==l){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>u(e.target.value),t[12]=e):e=t[12],p=(0,O.jsxs)(`div`,{className:`flex gap-1`,children:[(0,O.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,O.jsx)(J.Trigger,{className:`w-20`,children:(0,O.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,O.jsxs)(J.Content,{children:[(0,O.jsx)(J.Item,{value:`<`,children:`<`}),(0,O.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,O.jsx)(J.Item,{value:`=`,children:`=`}),(0,O.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,O.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,O.jsx)(GE,{type:`number`,"aria-label":`Quantity`,defaultValue:l??void 0,onChange:e,className:`min-w-4`})]}),t[9]=a,t[10]=l,t[11]=p}else p=t[11];return p},nP=({rawContent:e})=>{let[t,n]=(0,D.useState)(``);return(0,D.useEffect)(()=>{Fe(async()=>{let{default:e}=await import(`./purify.es-Dt2VzQ8a.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?(0,O.jsx)(`div`,{dangerouslySetInnerHTML:{__html:t}}):(0,O.jsx)(`div`,{})},rP=(0,D.lazy)(()=>Fe(()=>import(`./MarkDownRender-ByaYYDzH.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1]))),iP=(0,D.memo)(function(e){let t=(0,V.c)(2),{label:n,...r}=e,[i,a]=(0,D.useState)(!1),o;return t[0]===i?o=t[1]:(o=e=>{e&&!i&&a(!0)},t[0]=i,t[1]=o),(0,O.jsx)(wE,{header:n,label:n,onToggle:o,children:i?(0,O.jsx)(SP,{...r}):null})}),aP=e=>{let t=(0,V.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=bC(),s=vC(),{mutate:c,isPending:l}=aE(),u;t[0]!==o||t[1]!==r||t[2]!==n?(u=e=>o(r.localId,e,n),t[0]=o,t[1]=r,t[2]=n,t[3]=u):u=t[3];let d;return t[4]!==o||t[5]!==c||t[6]!==s?.ai?.apiKey||t[7]!==s?.ai?.model||t[8]!==s?.ai?.temperature||t[9]!==s?.internationalization||t[10]!==r||t[11]!==a||t[12]!==n?(d=()=>{c({fileContent:JSON.stringify({...r,...a?.[r.localId]??{}}),keyPath:n,locales:s?.internationalization.locales??[],aiOptions:{apiKey:s?.ai?.apiKey,model:s?.ai?.model,temperature:s?.ai?.temperature}},{onSuccess:e=>{if(e?.data)try{let t=e.data.fileContent;o(r.localId,t,n)}catch(e){console.error(e)}}})},t[4]=o,t[5]=c,t[6]=s?.ai?.apiKey,t[7]=s?.ai?.model,t[8]=s?.ai?.temperature,t[9]=s?.internationalization,t[10]=r,t[11]=a,t[12]=n,t[13]=d):d=t[13],(0,O.jsx)(LD,{variant:`default`,onContentChange:u,additionalButtons:(0,O.jsx)(SE,{Icon:Lu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},oP=e=>{let t=(0,V.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=bC(),o;return t[0]!==a||t[1]!==r||t[2]!==n?(o=e=>a(r.localId,e,n),t[0]=a,t[1]=r,t[2]=n,t[3]=o):o=t[3],(0,O.jsx)(vD,{variant:`default`,onContentChange:o,...i})},sP=[{content:`False`,value:!1},{content:`True`,value:!0}],cP=e=>{let t=(0,V.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=bC(),o;return t[0]!==a||t[1]!==n||t[2]!==r?(o=e=>a(n.localId,e,r),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3],(0,O.jsx)(RE,{choices:sP,value:!0,onChange:o,color:`text`,size:`sm`,...i})},lP=e=>{let t=(0,V.c)(15),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=vt(),{selectedLocales:c}=gD(),l=n[j],u;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==c){let e;t[8]!==l||t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o||t[13]!==a?(e=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:pt(e,o)})}),(0,O.jsx)(`tr`,{className:`flex`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:l[e]??WS(l[s]),keyPath:[...r,{type:j,key:e}],dictionary:i,renderSection:a})})})]},t)},t[8]=l,t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=a,t[14]=e):e=t[14],u=(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:c.map(e)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=c,t[7]=u}else u=t[7];return u},uP=e=>{let t=(0,V.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=bC(),{addNewEnumeration:s,removeEnumeration:c}=_t(pD),l=n[M],u;t[0]===l?u=t[1]:(u=Object.keys(l),t[0]=l,t[1]=u);let d=u[0],f;if(t[2]!==o||t[3]!==s.label.value||t[4]!==s.text||t[5]!==l||t[6]!==i||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==a||t[11]!==n){let e;t[13]!==o||t[14]!==l||t[15]!==i||t[16]!==d||t[17]!==r?(e=()=>o(i.localId,WS(l[d])??``,[...r,{type:M,key:`unknown`}]),t[13]=o,t[14]=l,t[15]=i,t[16]=d,t[17]=r,t[18]=e):e=t[18],f=(0,O.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[M]).map(e=>{let t=[...r,{type:M,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(`div`,{className:`flex flex-1`,children:(0,O.jsx)(SE,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Iu,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,O.jsx)(`tr`,{className:`w-full p-2`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(tP,{value:e,onChange:t=>{let a=n[M],s=BD(a,e,t),c={...n,[M]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(SP,{section:l[e]??WS(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,O.jsx)(SE,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Mu,className:`m-2`,children:s.text})]}),t[2]=o,t[3]=s.label.value,t[4]=s.text,t[5]=l,t[6]=i,t[7]=d,t[8]=r,t[9]=c,t[10]=a,t[11]=n,t[12]=f}else f=t[12];return f},dP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[P];return(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:i[e]??WS(i.true),keyPath:[...t,{type:P,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},fP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[ae];return(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:i[e]??WS(i.male),keyPath:[...t,{type:ae,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},pP=[`zero`,`one`,`two`,`few`,`many`,`other`],mP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[N];return(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:pP.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:e})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:i[e]??WS(i.other),keyPath:[...t,{type:N,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},hP=e=>{let t=(0,V.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=bC(),{addNewElement:s,removeElement:c}=_t(pD),l;if(t[0]!==o||t[1]!==s.label.value||t[2]!==s.text||t[3]!==i||t[4]!==r||t[5]!==c||t[6]!==a||t[7]!==n){let e;t[9]!==o||t[10]!==i||t[11]!==r||t[12]!==c||t[13]!==a||t[14]!==n[0]?(e=(e,t)=>{let s=`${JSON.stringify(r)}-array-${t}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,O.jsx)(SE,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:ee,key:t}];o(i.localId,void 0,e)},Icon:Iu,children:c.text})]})})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:e??WS(n[0]),keyPath:[...r,{type:ee,key:t}],dictionary:i,renderSection:a})})})]},s)},t[9]=o,t[10]=i,t[11]=r,t[12]=c,t[13]=a,t[14]=n[0],t[15]=e):e=t[15];let u;t[16]!==o||t[17]!==i||t[18]!==r||t[19]!==n[0]||t[20]!==n.length?(u=()=>{let e=[...r,{type:ee,key:n.length}];o(i.localId,WS(n[0])??``,e,!1)},t[16]=o,t[17]=i,t[18]=r,t[19]=n[0],t[20]=n.length,t[21]=u):u=t[21],l=(0,O.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,O.jsx)(SE,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Mu,children:s.text})]}),t[0]=o,t[1]=s.label.value,t[2]=s.text,t[3]=i,t[4]=r,t[5]=c,t[6]=a,t[7]=n,t[8]=l}else l=t[8];return l},gP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:L,key:e}],s=i[e]??WS(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(SP,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):(0,O.jsx)(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(iP,{label:nt(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},_P=e=>{let t=(0,V.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,D.useState)(0),s;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],c=[...r,{type:z}],l=n[z];s=(0,O.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,O.jsx)(RE,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,O.jsx)(CP,{section:l,keyPath:c,dictionary:i,renderSection:a===1?wP:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},vP=e=>{let t=(0,V.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,D.useState)(0),c;if(t[0]!==i||t[1]!==a||t[2]!==r||t[3]!==o||t[4]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],l=[...r,{type:R}],u=n.markdown??``,d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(yE,{}),children:(0,O.jsx)(rP,{isDarkMode:a,children:e})}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,O.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,O.jsx)(RE,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,O.jsx)(CP,{section:u,keyPath:l,dictionary:i,renderSection:d})]}),t[0]=i,t[1]=a,t[2]=r,t[3]=o,t[4]=n,t[5]=c}else c=t[5];return c},yP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:F}],i=e[F];return(0,O.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,O.jsx)(CP,{section:i,keyPath:r,...n})})},bP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:I}],i=e[I],{content:a}=e;return(0,O.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,O.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,O.jsx)(CP,{section:a,keyPath:r,...n})]})},xP=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=bC(),s=i[te],c=[...t,{type:te}];return(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,O.jsx)(VD,{children:`Dictionary key`}),(0,O.jsx)(vD,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,O.jsx)(VD,{children:`Path (optional)`}),(0,O.jsx)(vD,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},SP=(0,D.memo)(function(e){let t=(0,V.c)(82),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=_t(pD),c,l;if(t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==a||t[4]!==n||t[5]!==s){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=JS(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,O.jsx)(`span`,{children:`(React Node)`}),(0,O.jsx)(`span`,{className:`flex text-neutral text-xs`,children:s})]}),t[8]=s,t[9]=e),l=e;break bb0}if(e===`nested`){let e;t[10]!==i||t[11]!==r||t[12]!==a||t[13]!==n?(e=(0,O.jsx)(xP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[10]=i,t[11]=r,t[12]=a,t[13]=n,t[14]=e):e=t[14],l=e;break bb0}if(e===`translation`){let e;t[15]!==i||t[16]!==r||t[17]!==a||t[18]!==n?(e=(0,O.jsx)(lP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[15]=i,t[16]=r,t[17]=a,t[18]=n,t[19]=e):e=t[19],l=e;break bb0}if(e===`enumeration`){let e;t[20]!==i||t[21]!==r||t[22]!==a||t[23]!==n?(e=(0,O.jsx)(uP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[20]=i,t[21]=r,t[22]=a,t[23]=n,t[24]=e):e=t[24],l=e;break bb0}if(e===`condition`){let e;t[25]!==i||t[26]!==r||t[27]!==a||t[28]!==n?(e=(0,O.jsx)(dP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[25]=i,t[26]=r,t[27]=a,t[28]=n,t[29]=e):e=t[29],l=e;break bb0}if(e===`gender`){let e;t[30]!==i||t[31]!==r||t[32]!==a||t[33]!==n?(e=(0,O.jsx)(fP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[30]=i,t[31]=r,t[32]=a,t[33]=n,t[34]=e):e=t[34],l=e;break bb0}if(e===`plural`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,O.jsx)(mP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[35]=i,t[36]=r,t[37]=a,t[38]=n,t[39]=e):e=t[39],l=e;break bb0}if(e===`insertion`){let e;t[40]!==i||t[41]!==r||t[42]!==a||t[43]!==n?(e=(0,O.jsx)(yP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[40]=i,t[41]=r,t[42]=a,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`markdown`){let e;t[45]!==i||t[46]!==o||t[47]!==r||t[48]!==n?(e=(0,O.jsx)(vP,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[45]=i,t[46]=o,t[47]=r,t[48]=n,t[49]=e):e=t[49],l=e;break bb0}if(e===`html`){let e;t[50]!==i||t[51]!==r||t[52]!==n?(e=(0,O.jsx)(_P,{dictionary:i,keyPath:r,section:n}),t[50]=i,t[51]=r,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`file`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,O.jsx)(bP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[54]=i,t[55]=r,t[56]=a,t[57]=n,t[58]=e):e=t[58],l=e;break bb0}if(e===`array`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,O.jsx)(hP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[59]=i,t[60]=r,t[61]=a,t[62]=n,t[63]=e):e=t[63],l=e;break bb0}if(e===`object`){let e;t[64]!==i||t[65]!==r||t[66]!==a||t[67]!==n?(e=(0,O.jsx)(gP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[64]=i,t[65]=r,t[66]=a,t[67]=n,t[68]=e):e=t[68],l=e;break bb0}if(e===`number`){let e;t[69]!==i||t[70]!==r||t[71]!==n?(e=(0,O.jsx)(`div`,{className:`w-full p-2`,children:(0,O.jsx)(oP,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[69]=i,t[70]=r,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`text`){let e;t[73]!==i||t[74]!==r||t[75]!==a||t[76]!==n?(e=(0,O.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,O.jsx)(aP,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[73]=i,t[74]=r,t[75]=a,t[76]=n,t[77]=e):e=t[77],l=e;break bb0}if(e===`boolean`){let e;t[78]!==i||t[79]!==r||t[80]!==n?(e=(0,O.jsx)(`div`,{className:`w-full p-2`,children:(0,O.jsx)(cP,{dictionary:i,keyPath:r,value:n})}),t[78]=i,t[79]=r,t[80]=n,t[81]=e):e=t[81],l=e;break bb0}c=(0,O.jsxs)(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(n,null,2),JSON.stringify(r,null,2),`NodeType : `,e]})}t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=n,t[5]=s,t[6]=c,t[7]=l}else c=t[6],l=t[7];return l===Symbol.for(`react.early_return_sentinel`)?c:l}),CP=(0,D.memo)(function(e){return(0,O.jsx)(_E,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`2xl`,children:(0,O.jsx)(SP,{...e})})});function wP(e){return(0,O.jsx)(nP,{rawContent:e})}var TP={key:`breadcrumb`,content:{nodeType:`translation`,translation:{en:{linkLabel:`Go to`},"en-GB":{linkLabel:`Go to`},fr:{linkLabel:`Aller à`},es:{linkLabel:`Ir a`},de:{linkLabel:`Gehe zu`},ja:{linkLabel:`に移動`},ko:{linkLabel:`로 이동`},zh:{linkLabel:`转到`},it:{linkLabel:`Vai a`},pt:{linkLabel:`Ir para`},hi:{linkLabel:`कर जाएं`},ar:{linkLabel:`اذهب إلى`},ru:{linkLabel:`Перейти на`}}},localIds:[`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`]},EP=tu(`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:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/20 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`,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:`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`}}),DP=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},OP=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(OP):(0,D.isValidElement)(e)?OP(e.props.children):!1,kP=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??DP(e),g=f??p?.startsWith(`#`)??!1,_=OP(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`,x=l&&p&&!h&&!g?ut(p,l):p;return(0,O.jsxs)(`a`,{href:x===``?void 0:x,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:G(EP({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,O.jsx)(`span`,{children:i}):i,h&&_&&(0,O.jsx)(Cu,{className:`ml-2 inline-block size-4`}),g&&(0,O.jsx)(Ou,{className:`ml-2 inline-block size-4`})]})},AP=e=>e&&{primary:`text-primary`,secondary:`text-secondary`,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:``}[e]||``,jP=tu(`flex flex-row flex-wrap items-center text-sm`,{variants:{size:{small:`gap-1 text-xs`,medium:`gap-2 text-sm`,large:`gap-3 text-base`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`medium`,spacing:`normal`}}),MP=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Oe(TP).linkLabel;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(kP,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l} ${n}`,itemID:e,size:`sm`,children:(0,O.jsx)(`span`,{itemProp:`name`,children:n})}),(0,O.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},NP=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=_t(TP);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(SE,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,O.jsx)(`span`,{itemProp:`name`,children:t})}),(0,O.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},PP=({children:e,position:t,className:n,...r})=>(0,O.jsxs)(`span`,{itemProp:`item`,className:G(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,O.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,O.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),FP=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,O.jsx)(_u,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,O.jsx)(`nav`,{"aria-label":o,children:(0,O.jsx)(`ol`,{className:G(jP({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,m=e.text??e,h=AP(n);if(p)return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,O.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,O.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,O.jsx)(`span`,{className:G(h),children:a})})]},`truncated-${m}`);let g=(0,O.jsx)(PP,{position:t+1,"aria-current":d,className:G(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?g=(0,O.jsx)(MP,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:G(u&&`cursor-default text-neutral-900`),children:m},m):l&&(g=(0,O.jsx)(NP,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:G(u&&`cursor-default text-neutral-900`),children:m},m));let _=(0,D.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},g);return o?_:(0,O.jsxs)(D.Fragment,{children:[_,(0,O.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,O.jsx)(`span`,{className:G(h),children:a})})]},m)})})})},IP=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,O.jsx)(FP,{links:[...a?[{text:nt(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:nt(t.key?.toString()??``)}))],locale:r,elementType:`location`,color:i}),LP={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`},seeAllLocalesSwitch:{true:`Voir toutes les langues`,false:`Voir seulement les langues sélectionnées`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`},seeAllLocalesSwitch:{true:`Ver todos los idiomas`,false:`Ver solo los idiomas seleccionados`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`},seeAllLocalesSwitch:{true:`Alle Sprachen anzeigen`,false:`Nur ausgewählte Sprachen anzeigen`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`},seeAllLocalesSwitch:{true:`Vedi tutte le lingue`,false:`Vedi solo le lingue selezionate`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`},seeAllLocalesSwitch:{true:`Ver todos os idiomas`,false:`Ver apenas os idiomas selecionados`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`}}}},localIds:[`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`]},RP=({children:e,className:t,identifier:n,...r})=>(0,O.jsx)(`div`,{className:G(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});RP.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,O.jsx)(SE,{className:G([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),RP.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,smootherClassName:c,...l})=>(0,O.jsx)(`div`,{className:G(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,O.jsx)(CE,{isHidden:t,className:G(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`,c),...l,children:e})});function zP(e){return Array.isArray?Array.isArray(e):YP(e)===`[object Array]`}function BP(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function VP(e){return e==null?``:BP(e)}function HP(e){return typeof e==`string`}function UP(e){return typeof e==`number`}function WP(e){return e===!0||e===!1||KP(e)&&YP(e)==`[object Boolean]`}function GP(e){return typeof e==`object`}function KP(e){return GP(e)&&e!==null}function qP(e){return e!=null}function JP(e){return!e.trim().length}function YP(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var XP=`Incorrect 'index' type`,ZP=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,QP=e=>`Invalid value for key ${e}`,$P=e=>`Pattern length exceeds max of ${e}.`,eF=e=>`Missing ${e} property in key`,tF=e=>`Property 'weight' in key '${e}' must be a positive integer`,nF=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,rF=Object.prototype.hasOwnProperty,iF=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=aF(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function aF(e){let t=null,n=null,r=null,i=1,a=null;if(HP(e)||zP(e))r=e,t=oF(e),n=sF(e);else{if(!rF.call(e,`name`))throw Error(eF(`name`));let o=e.name;if(r=o,rF.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(tF(sF(o)));t=oF(o),n=sF(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function oF(e){return zP(e)?e:e.split(`.`)}function sF(e){return zP(e)?e.join(`.`):e}function cF(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(qP(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!qP(s))return;if(a===t.length-1&&(HP(s)||UP(s)||WP(s)||typeof s==`bigint`))n.push(o===void 0?VP(s):{v:VP(s),i:o});else if(zP(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,HP(t)?t.split(`.`):t,0),r?n:n[0]}var lF={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},uF={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},dF={location:0,threshold:.6,distance:100},fF={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:cF,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...uF,...lF,...dF,...fF});function pF(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=1,a=!1;for(let e=0;e<t.length;e++)t.charCodeAt(e)===32?a||=(i++,!0):a=!1;if(n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var mF=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=pF(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(HP(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(ZP);if(HP(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(ZP);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!qP(e)||JP(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(qP(i)){if(zP(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(qP(n)){if(HP(n)){if(!JP(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(qP(n.v)){let t=HP(n.v)?n.v:VP(n.v);if(!JP(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(HP(i)&&!JP(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function hF(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new mF({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(aF)),i.setSources(t),i.create(),i}function gF(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new mF({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function _F(e=[],t=Y.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var vF=32;function yF(e,t,n,{location:r=Y.location,distance:i=Y.distance,threshold:a=Y.threshold,findAllMatches:o=Y.findAllMatches,minMatchCharLength:s=Y.minMatchCharLength,includeMatches:c=Y.includeMatches,ignoreLocation:l=Y.ignoreLocation}={}){if(t.length>vF)throw Error($P(vF));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=_F(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function bF(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function xF(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var SF={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},CF=RegExp(`[`+Object.keys(SF).join(``)+`]`,`g`),wF=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(CF,e=>SF[e]):e=>e,TF=class{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?wF(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:bF(e),startIndex:t})},d=this.pattern.length;if(d>vF){let e=0,t=d%vF,n=d-t;for(;e<n;)u(this.pattern.substr(e,vF),e),e+=vF;if(t){let e=d-vF;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?wF(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=yF(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=xF(u)),p}},EF=new Set([`fuzzy`,`include`]);function DF(e){return e.startsWith(`inverse`)}var OF=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new TF(e,{location:t.location??Y.location,threshold:t.threshold??Y.threshold,distance:t.distance??Y.distance,includeMatches:t.includeMatches??Y.includeMatches,findAllMatches:t.findAllMatches??Y.findAllMatches,minMatchCharLength:t.minMatchCharLength??Y.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??Y.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??Y.ignoreDiacritics,ignoreLocation:t.ignoreLocation??Y.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],kF=OF.length,AF=`\0`,jF=`|`;function MF(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function NF(e,t){let n=e.match(t);return n?n[1]:null}function PF(e,t={}){return e.replace(/\\\|/g,AF).split(jF).map(e=>{let n=MF(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<kF;){let e=OF[o],n=NF(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<kF;){let e=OF[o],n=NF(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var FF=class{constructor(e,{isCaseSensitive:t=Y.isCaseSensitive,ignoreDiacritics:n=Y.ignoreDiacritics,includeMatches:r=Y.includeMatches,minMatchCharLength:i=Y.minMatchCharLength,ignoreLocation:a=Y.ignoreLocation,findAllMatches:o=Y.findAllMatches,location:s=Y.location,threshold:c=Y.threshold,distance:l=Y.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?wF(e):e,this.pattern=e,this.query=PF(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?wF(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,DF(r.type)&&(c=!0),n&&(EF.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=xF(o)),e}}return{isMatch:!1,score:1}}},IF=[];function LF(...e){IF.push(...e)}function RF(e,t){for(let n=0,r=IF.length;n<r;n+=1){let r=IF[n];if(r.condition(e,t))return new r(e,t)}return new TF(e,t)}var zF={AND:`$and`,OR:`$or`},BF={PATH:`$path`,PATTERN:`$val`},VF=e=>!!(e[zF.AND]||e[zF.OR]),HF=e=>!!e[BF.PATH],UF=e=>!zP(e)&&GP(e)&&!VF(e),WF=e=>({[zF.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function GF(e,t,{auto:n=!0}={}){let r=e=>{if(HP(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=RF(e,t)),r}let i=Object.keys(e),a=HF(e);if(!a&&i.length>1&&!VF(e))return r(WF(e));if(UF(e)){let r=a?e[BF.PATH]:i[0],o=a?e[BF.PATTERN]:e[r];if(!HP(o))throw Error(QP(r));let s={keyId:sF(r),pattern:o};return n&&(s.searcher=RF(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];zP(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return VF(e)||(e=WF(e)),r(e)}function KF(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function qF(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=KF(e.matches,{ignoreFieldNorm:t})})}var JF=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function YF(e){let t=[];return e.matches.forEach(e=>{if(!qP(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function XF(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=YF(e)),r&&(a.score=e.score),a})}var ZF=/[\p{L}\p{M}\p{N}_]+/gu,QF=new WeakSet;function $F(e){QF.has(e)||(QF.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function eI(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||$F(e),t=>t.match(e)||[]):e=>e.match(ZF)||[]}function tI({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=eI(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=wF(n)),r(n)}}}var nI=31,rI=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=tI({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new TF(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=nI}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=xF(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function iI(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function aI(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){iI(e,a,i,r);return}if(o)for(let t=0;t<n;t++){let n=o[t];if(n)if(Array.isArray(n))for(let t of n)iI(e,t.v,i,r);else iI(e,n.v,i,r)}}function oI(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)aI(r,i,t,n);return r}function sI(e,t,n,r){aI(e,t,n,r)}function cI(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function lI(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)cI(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var uI=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new iF(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=RF(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof mF))throw Error(XP);if(this._myIndex=t||hF(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=tI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=oI(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!qP(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=tI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});sI(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&lI(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(ZP);this._invertedIndex&&lI(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(HP(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return UP(n)&&n>-1&&(e=e.slice(0,n)),e}let c=UP(n)&&n>0&&HP(e),l;if(c){let t=new JF(n);HP(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=HP(e)?HP(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),qF(l,{ignoreFieldNorm:s}),a&&l.sort(o),UP(n)&&n>-1&&(l=l.slice(0,n));return XF(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!qP(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=KF(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=GF(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===zF.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(qP(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{keys:a,records:o}=this._myIndex,s=t?null:[];return o.forEach(({$:e,i:o})=>{if(!qP(e))return;let c=[],l=!1,u=!1;if(a.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:o,item:e,matches:c};t?(r.score=KF(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!qP(t))return[];let r=[];if(zP(t))t.forEach(({v:t,i,n:a})=>{if(!qP(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=nI){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};uI.version=`7.4.0`,uI.createIndex=hF,uI.parseIndex=gF,uI.config=Y,uI.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(nF);return RF(e,{...Y,...n}).searchIn(t)},uI.parseQuery=GF,LF(FF),LF(rI),uI.use=function(...e){e.forEach(e=>LF(e))};var dI=`locale-switcher-content`,fI=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=_t(LP),s=(0,D.useRef)(null),{locale:c}=vt(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=gD(),f=(0,D.useMemo)(()=>l.map(e=>({locale:e,englishName:pt(e,`en`),currentLocaleName:pt(e,c),ownLocaleName:pt(e)})),[l,c]),[p,m]=(0,D.useState)(``),[h,g]=mD(`locale-content-selector-see-all-locales`,!1),_=(0,D.useMemo)(()=>new uI(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),v=(0,D.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),y=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},b=e=>{g(e),d(e?l:[c])};return(0,O.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,O.jsxs)(RP,{identifier:dI,children:[(0,O.jsx)(RP.Trigger,{identifier:dI,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,O.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,O.jsx)(`div`,{className:`px-2 py-1`,children:(0,O.jsx)(Eu,{size:16})}),(0,O.jsx)(ku,{className:`self-center`,size:16})]})}),(0,O.jsx)(RP.Panel,{identifier:dI,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,O.jsxs)(_E,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:!0,roundedSize:`3xl`,borderColor:`text`,"aria-label":a.value,children:[t&&(0,O.jsx)(`div`,{className:`m-auto p-2`,children:(0,O.jsx)(RE,{defaultValue:h,onChange:b,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`p-3`,children:(0,O.jsx)(GE,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,O.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:v.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,O.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,O.jsx)(SE,{onClick:()=>y(e),label:`${n} ${r}`,disabled:!(l??l).includes(e),isActive:u.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:(0,O.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,O.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,O.jsx)(mu,{className:`size-full`})}),(0,O.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,O.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,O.jsx)(`span`,{dir:ft(e),lang:e,children:i}),(0,O.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,O.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},pI=e=>{let t=GS(e),n=JS(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?pI(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},mI=e=>{let t=(0,V.c)(3),{children:n,onToggle:r,...i}=e,[a,o]=(0,D.useState)(!1),s;return t[0]!==a||t[1]!==r?(s=e=>{e&&!a&&o(!0),r?.(e)},t[0]=a,t[1]=r,t[2]=s):s=t[2],(0,O.jsx)(wE,{...i,onToggle:s,children:a?n:null})},hI=e=>{let t=(0,V.c)(16),{section:n,keyPath:r,dictionary:i}=e,{selectedLocales:a}=gD(),o=HS(n,r,pC()),{addEditedContent:s}=yC(),{setFocusedContentKeyPath:c,focusedContent:l}=hC(),{addNewElement:u,goToField:d}=_t(pD),f=JS(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&Qe(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=pI(o);if(!o)return(0,O.jsx)(O.Fragment,{});if(h){let e;return t[2]!==r||t[3]!==c?(e=()=>c(r),t[2]=r,t[3]=c,t[4]=e):e=t[4],(0,O.jsx)(SE,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:_u,children:nt(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,O.jsx)(O.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,O.jsx)(hI,{keyPath:[...r,{type:j,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,O.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`plural`||f===`condition`)return(0,O.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,O.jsx)(hI,{keyPath:[...r,{type:f,key:e}],section:n,dictionary:i},e))});if(f===`array`){let e;return t[9]!==i||t[10]!==m||t[11]!==d||t[12]!==r||t[13]!==n||t[14]!==c?(e=(e,t)=>{let a=[...r,{type:ee,key:t}];return pI(e)?(0,O.jsxs)(SE,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:_u,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,O.jsx)(mI,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,O.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,O.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,O.jsx)(hI,{keyPath:a,section:n,dictionary:i})})})},JSON.stringify(a))},t[9]=i,t[10]=m,t[11]=d,t[12]=r,t[13]=n,t[14]=c,t[15]=e):e=t[15],(0,O.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,O.jsx)(SE,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:ee,key:o.length}],t=o,n=WS(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Mu,children:u.text})]})}return typeof o.nodeType==`string`?(0,O.jsx)(hI,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,O.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(o).map(e=>{let t=[...r,{type:L,key:e}];return pI(HS(n,t))?(0,O.jsx)(SE,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:_u,children:nt(e)},e):(0,O.jsx)(mI,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:nt(e),children:(0,O.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,O.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,O.jsx)(hI,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,O.jsxs)(O.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},gI=e=>{let t=(0,V.c)(16),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=bC(),{focusedContent:c,setFocusedContentKeyPath:l}=hC(),[,u]=(0,D.useTransition)(),d;t[0]!==l||t[1]!==u?(d=e=>u(()=>l(e)),t[0]=l,t[1]=u,t[2]=d):d=t[2];let f=d,p=c?.keyPath,m=s?.[o]?.content===void 0?i:s?.[o]?.content,h=pC(),g;t[3]===p?g=t[4]:(g=p??[],t[3]=p,t[4]=g);let _;t[5]!==h||t[6]!==m||t[7]!==g?(_=HS(m,g,h),t[5]=h,t[6]=m,t[7]=g,t[8]=_):_=t[8];let v=_,y=(0,D.useDeferredValue)(p),b=(0,D.useDeferredValue)(v),x=b!==v,S;t[9]===m?S=t[10]:(S=pI(m),t[9]=m,t[10]=S);let C=S,w=pI(b),T;t[11]!==c?.keyPath||t[12]!==v||t[13]!==f?(T=()=>{v===void 0&&f(c?.keyPath?.slice(0,-1)??[])},t[11]=c?.keyPath,t[12]=v,t[13]=f,t[14]=T):T=t[14];let E;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[15]=E):E=t[15],(0,D.useEffect)(T,E),(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,O.jsx)(IP,{dictionaryKey:a,keyPath:p??[],onClickKeyPath:f}),(0,O.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,O.jsx)(fI,{})})]}),(0,O.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof m==`object`&&m&&!C&&Object.keys(m).length>0&&(0,O.jsx)(_E,{border:!0,background:`none`,className:`top-10 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`2xl`,transparency:`xs`,children:(0,O.jsx)(hI,{keyPath:[],section:m,dictionary:n})}),(w||(y??[]).length>0)&&(0,O.jsx)(`div`,{className:x?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:(0,O.jsx)(CP,{keyPath:y??[],section:b,dictionary:n,isDarkMode:r})})]})]})},_I=tu(`inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{color:{primary:`border-primary bg-primary text-primary hover:bg-primary-500`,secondary:`border-secondary bg-secondary text-secondary hover:bg-secondary-300`,success:`border-success bg-success text-success hover:bg-success-500`,error:`border-error bg-error text-error hover:bg-error-500`,neutral:`border-neutral bg-neutral text-neutral hover:bg-neutral-600`,light:`border-white bg-white text-white hover:bg-neutral-500`,dark:`border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900`,text:`border-text bg-text text-text hover:opacity-80`,custom:``},variant:{default:`rounded-lg text-text-opposite`,none:`border-none bg-opacity-0 text-inherit hover:bg-opacity-0`,outline:`rounded-lg border-[1.3px] bg-opacity-0 hover:bg-opacity-30`,hoverable:`rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10`},size:{sm:`px-2 py-0.5 text-xs`,md:`px-2.5 py-0.5 text-xs`,lg:`px-3 py-1 text-sm`}},defaultVariants:{variant:`default`,color:`primary`,size:`md`}}),vI=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,O.jsxs)(p,{className:G(_I({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,O.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,O.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,O.jsx)(`title`,{children:`Remove badge`}),(0,O.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})]})})]})},yI=`Dialog`,[bI,xI]=pc(yI),[SI,CI]=bI(yI),wI=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=D.useRef(null),c=D.useRef(null),[l,u]=Zc({prop:r,defaultProp:i??!1,onChange:a,caller:yI});return(0,O.jsx)(SI,{scope:t,triggerRef:s,contentRef:c,contentId:fO(),titleId:fO(),descriptionId:fO(),open:l,onOpenChange:u,onOpenToggle:D.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};wI.displayName=yI;var TI=`DialogTrigger`,EI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(TI,n),a=dc(t,i.triggerRef);return(0,O.jsx)(Cc.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":KI(i.open),...r,ref:a,onClick:cc(e.onClick,i.onOpenToggle)})});EI.displayName=TI;var DI=`DialogPortal`,[OI,kI]=bI(DI,{forceMount:void 0}),AI=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=CI(DI,t);return(0,O.jsx)(OI,{scope:t,forceMount:n,children:D.Children.map(r,e=>(0,O.jsx)(Kc,{present:n||a.open,children:(0,O.jsx)(Wc,{asChild:!0,container:i,children:e})}))})};AI.displayName=DI;var jI=`DialogOverlay`,MI=D.forwardRef((e,t)=>{let n=kI(jI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=CI(jI,e.__scopeDialog);return a.modal?(0,O.jsx)(Kc,{present:r||a.open,children:(0,O.jsx)(PI,{...i,ref:t})}):null});MI.displayName=jI;var NI=hc(`DialogOverlay.RemoveScroll`),PI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(jI,n);return(0,O.jsx)(hM,{as:NI,allowPinchZoom:!0,shards:[i.contentRef],children:(0,O.jsx)(Cc.div,{"data-state":KI(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),FI=`DialogContent`,II=D.forwardRef((e,t)=>{let n=kI(FI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=CI(FI,e.__scopeDialog);return(0,O.jsx)(Kc,{present:r||a.open,children:a.modal?(0,O.jsx)(LI,{...i,ref:t}):(0,O.jsx)(RI,{...i,ref:t})})});II.displayName=FI;var LI=D.forwardRef((e,t)=>{let n=CI(FI,e.__scopeDialog),r=D.useRef(null),i=dc(t,n.contentRef,r);return D.useEffect(()=>{let e=r.current;if(e)return oj(e)},[]),(0,O.jsx)(zI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:cc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:cc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:cc(e.onFocusOutside,e=>e.preventDefault())})}),RI=D.forwardRef((e,t)=>{let n=CI(FI,e.__scopeDialog),r=D.useRef(!1),i=D.useRef(!1);return(0,O.jsx)(zI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),zI=D.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=CI(FI,n),c=D.useRef(null),l=dc(t,c);return KD(),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(QD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(Nc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":KI(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(XI,{titleId:s.titleId}),(0,O.jsx)(QI,{contentRef:c,descriptionId:s.descriptionId})]})]})}),BI=`DialogTitle`,VI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(BI,n);return(0,O.jsx)(Cc.h2,{id:i.titleId,...r,ref:t})});VI.displayName=BI;var HI=`DialogDescription`,UI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(HI,n);return(0,O.jsx)(Cc.p,{id:i.descriptionId,...r,ref:t})});UI.displayName=HI;var WI=`DialogClose`,GI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(WI,n);return(0,O.jsx)(Cc.button,{type:`button`,...r,ref:t,onClick:cc(e.onClick,()=>i.onOpenChange(!1))})});GI.displayName=WI;function KI(e){return e?`open`:`closed`}var qI=`DialogTitleWarning`,[JI,YI]=fc(qI,{contentName:FI,titleName:BI,docsSlug:`dialog`}),XI=({titleId:e})=>{let t=YI(qI),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
98
|
+
`},uM=0,dM=[];function fM(e){var t=D.useRef([]),n=D.useRef([0,0]),r=D.useRef(),i=D.useState(uM++)[0],a=D.useState(Pj)[0],o=D.useRef(e);D.useEffect(function(){o.current=e},[e]),D.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=lj([e.lockRef.current],(e.shards||[]).map(sM),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=D.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=aM(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Qj(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Qj(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return iM(h,t,e,h===`h`?s:c,!0)},[]),c=D.useCallback(function(e){var n=e;if(!(!dM.length||dM[dM.length-1]!==a)){var r=`deltaY`in n?oM(n):aM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&cM(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(sM).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=D.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:pM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=D.useCallback(function(e){n.current=aM(e),r.current=void 0},[]),d=D.useCallback(function(t){l(t.type,oM(t),t.target,s(t,e.lockRef.current))},[]),f=D.useCallback(function(t){l(t.type,aM(t),t.target,s(t,e.lockRef.current))},[]);D.useEffect(function(){return dM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,qj),document.addEventListener(`touchmove`,c,qj),document.addEventListener(`touchstart`,u,qj),function(){dM=dM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,qj),document.removeEventListener(`touchmove`,c,qj),document.removeEventListener(`touchstart`,u,qj)}},[]);var p=e.removeScrollBar,m=e.inert;return D.createElement(D.Fragment,null,m?D.createElement(a,{styles:lM(i)}):null,p?D.createElement(Wj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var mM=Cj(wj,fM),hM=D.forwardRef(function(e,t){return D.createElement(Ej,sj({},e,{ref:t,sideCar:mM}))});hM.classNames=Ej.classNames;var gM=[` `,`Enter`,`ArrowUp`,`ArrowDown`],_M=[` `,`Enter`],vM=`Select`,[yM,bM,xM]=xc(vM),[SM,CM]=pc(vM,[xM,jA]),wM=jA(),[TM,EM]=SM(vM),[DM,OM]=SM(vM),kM=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=wM(t),[g,_]=D.useState(null),[v,y]=D.useState(null),[b,x]=D.useState(!1),S=WD(l),[C,w]=Zc({prop:r,defaultProp:i??!1,onChange:a,caller:vM}),[T,E]=Zc({prop:o,defaultProp:s,onChange:c,caller:vM}),k=D.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=D.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,O.jsx)(qA,{...h,children:(0,O.jsxs)(TM,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:fO(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:k,disabled:f,children:[(0,O.jsx)(yM.Provider,{scope:t,children:(0,O.jsx)(DM,{scope:e.__scopeSelect,onNativeOptionAdd:D.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:D.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,O.jsxs)(wN,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:T,onChange:e=>E(e.target.value),disabled:f,form:m,children:[T===void 0?(0,O.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};kM.displayName=vM;var AM=`SelectTrigger`,jM=D.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=wM(n),o=EM(AM,n),s=o.disabled||r,c=dc(t,o.onTriggerChange),l=bM(n),u=D.useRef(`touch`),[d,f,p]=EN(e=>{let t=l().filter(e=>!e.disabled),n=DN(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,O.jsx)(JA,{asChild:!0,...a,children:(0,O.jsx)(Cc.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":TN(o.value)?``:void 0,...i,ref:c,onClick:cc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:cc(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:cc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&gM.includes(e.key)&&(m(),e.preventDefault())})})})});jM.displayName=AM;var MM=`SelectValue`,NM=D.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=EM(MM,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=dc(t,c.onValueNodeChange);return Hc(()=>{l(u)},[l,u]),(0,O.jsx)(Cc.span,{...s,ref:d,style:{pointerEvents:`none`},children:TN(c.value)?(0,O.jsx)(O.Fragment,{children:o}):a})});NM.displayName=MM;var PM=`SelectIcon`,FM=D.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,O.jsx)(Cc.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});FM.displayName=PM;var IM=`SelectPortal`,LM=e=>(0,O.jsx)(Wc,{asChild:!0,...e});LM.displayName=IM;var RM=`SelectContent`,zM=D.forwardRef((e,t)=>{let n=EM(RM,e.__scopeSelect),[r,i]=D.useState();if(Hc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?Sc.createPortal((0,O.jsx)(VM,{scope:e.__scopeSelect,children:(0,O.jsx)(yM.Slot,{scope:e.__scopeSelect,children:(0,O.jsx)(`div`,{children:e.children})})}),t):null}return(0,O.jsx)(GM,{...e,ref:t})});zM.displayName=RM;var BM=10,[VM,HM]=SM(RM),UM=`SelectContentImpl`,WM=hc(`SelectContent.RemoveScroll`),GM=D.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=EM(RM,n),[y,b]=D.useState(null),[x,S]=D.useState(null),C=dc(t,e=>b(e)),[w,T]=D.useState(null),[E,k]=D.useState(null),A=bM(n),[j,M]=D.useState(!1),N=D.useRef(!1);D.useEffect(()=>{if(y)return oj(y)},[y]),KD();let P=D.useCallback(e=>{let[t,...n]=A().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[A,x]),F=D.useCallback(()=>P([w,y]),[P,w,y]);D.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=v;D.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(L.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(L.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||I(!1),document.removeEventListener(`pointermove`,t),L.current=null};return L.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,I,L]),D.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[ee,te]=EN(e=>{let t=A().filter(e=>!e.disabled),n=DN(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=D.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(N.current=!0))},[v.value]),R=D.useCallback(()=>y?.focus(),[y]),z=D.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&k(e)},[v.value]),B=r===`popper`?YM:qM,re=B===YM?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,O.jsx)(VM,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:R,itemTextRefCallback:z,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:j,searchRef:ee,children:(0,O.jsx)(hM,{as:WM,allowPinchZoom:!0,children:(0,O.jsx)(QD,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:cc(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,O.jsx)(Nc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,O.jsx)(B,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...re,onPlaced:()=>M(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:cc(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&te(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=A().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>P(t)),e.preventDefault()}})})})})})})});GM.displayName=UM;var KM=`SelectItemAlignedPosition`,qM=D.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=EM(RM,n),o=HM(RM,n),[s,c]=D.useState(null),[l,u]=D.useState(null),d=dc(t,e=>u(e)),f=bM(n),p=D.useRef(!1),m=D.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=D.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-BM,d=HD(a,[BM,Math.max(BM,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-BM,d=HD(a,[BM,Math.max(BM,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-BM*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-BM,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${BM}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Hc(()=>y(),[y]);let[b,x]=D.useState();return Hc(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,O.jsx)(XM,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:D.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,O.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,O.jsx)(Cc.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});qM.displayName=KM;var JM=`SelectPopperPosition`,YM=D.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=BM,...a}=e,o=wM(n);return(0,O.jsx)(YA,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});YM.displayName=JM;var[XM,ZM]=SM(RM,{}),QM=`SelectViewport`,$M=D.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=HM(QM,n),o=ZM(QM,n),s=dc(t,a.onViewportChange),c=D.useRef(0);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,O.jsx)(yM.Slot,{scope:n,children:(0,O.jsx)(Cc.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:cc(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-BM*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});$M.displayName=QM;var eN=`SelectGroup`,[tN,nN]=SM(eN),rN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=fO();return(0,O.jsx)(tN,{scope:n,id:i,children:(0,O.jsx)(Cc.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});rN.displayName=eN;var iN=`SelectLabel`,aN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=nN(iN,n);return(0,O.jsx)(Cc.div,{id:i.id,...r,ref:t})});aN.displayName=iN;var oN=`SelectItem`,[sN,cN]=SM(oN),lN=D.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=EM(oN,n),c=HM(oN,n),l=s.value===r,[u,d]=D.useState(a??``),[f,p]=D.useState(!1),m=dc(t,e=>c.itemRefCallback?.(e,r,i)),h=fO(),g=D.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,O.jsx)(sN,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:D.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,O.jsx)(yM.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,O.jsx)(Cc.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:cc(o.onFocus,()=>p(!0)),onBlur:cc(o.onBlur,()=>p(!1)),onClick:cc(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:cc(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:cc(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:cc(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:cc(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:cc(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(_M.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});lN.displayName=oN;var uN=`SelectItemText`,dN=D.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=EM(uN,n),s=HM(uN,n),c=cN(uN,n),l=OM(uN,n),[u,d]=D.useState(null),f=dc(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=D.useMemo(()=>(0,O.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Hc(()=>(h(m),()=>g(m)),[h,g,m]),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Cc.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Sc.createPortal(a.children,o.valueNode):null]})});dN.displayName=uN;var fN=`SelectItemIndicator`,pN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return cN(fN,n).isSelected?(0,O.jsx)(Cc.span,{"aria-hidden":!0,...r,ref:t}):null});pN.displayName=fN;var mN=`SelectScrollUpButton`,hN=D.forwardRef((e,t)=>{let n=HM(mN,e.__scopeSelect),r=ZM(mN,e.__scopeSelect),[i,a]=D.useState(!1),o=dc(t,r.onScrollButtonChange);return Hc(()=>{if(n.viewport&&n.isPositioned){let e=function(){a(t.scrollTop>0)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(vN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});hN.displayName=mN;var gN=`SelectScrollDownButton`,_N=D.forwardRef((e,t)=>{let n=HM(gN,e.__scopeSelect),r=ZM(gN,e.__scopeSelect),[i,a]=D.useState(!1),o=dc(t,r.onScrollButtonChange);return Hc(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,O.jsx)(vN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});_N.displayName=gN;var vN=D.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=HM(`SelectScrollButton`,n),o=D.useRef(null),s=bM(n),c=D.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return D.useEffect(()=>()=>c(),[c]),Hc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,O.jsx)(Cc.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:cc(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:cc(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:cc(i.onPointerLeave,()=>{c()})})}),yN=`SelectSeparator`,bN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,O.jsx)(Cc.div,{"aria-hidden":!0,...r,ref:t})});bN.displayName=yN;var xN=`SelectArrow`,SN=D.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=wM(n),a=EM(xN,n),o=HM(xN,n);return a.open&&o.position===`popper`?(0,O.jsx)(XA,{...i,...r,ref:t}):null});SN.displayName=xN;var CN=`SelectBubbleInput`,wN=D.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=D.useRef(null),a=dc(r,i),o=ZA(t);return D.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,O.jsx)(Cc.select,{...n,style:{...el,...n.style},ref:a,defaultValue:t})});wN.displayName=CN;function TN(e){return e===``||e===void 0}function EN(e){let t=Tc(e),n=D.useRef(``),r=D.useRef(0),i=D.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=D.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return D.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function DN(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=ON(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function ON(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kN=kM,AN=jM,jN=NM,MN=FM,NN=LM,PN=zM,FN=$M,IN=rN,LN=aN,RN=lN,zN=dN,BN=pN,VN=hN,HN=_N,UN=bN,WN=kN,GN=IN,KN=jN,qN=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,O.jsxs)(AN,{suppressHydrationWarning:!0,className:G(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-text`,`ring-0`,`focus-visible:outline-none`,`focus-visible:ring-3`,`focus-visible:ring-neutral-200`,`dark:focus-visible:ring-neutral-500`,`focus-visible:ring-offset-white`,`dark:focus-visible:ring-offset-neutral-500`,`[box-shadow:none] focus:[box-shadow:none]`,`disabled:cursor-not-allowed disabled:opacity-50`,`aria-invalid:border-error`,`[&>span]:line-clamp-1`,e&&`valid:border-success invalid:border-error`,t),...r,children:[n,(0,O.jsx)(MN,{asChild:!0,children:(0,O.jsx)(yu,{className:`size-4 opacity-50`})})]}),JN=({className:e,...t})=>(0,O.jsx)(VN,{className:G(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(vu,{})}),YN=({className:e,...t})=>(0,O.jsx)(HN,{className:G(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,O.jsx)(hu,{})}),XN=({className:e,children:t,position:n=`popper`,...r})=>(0,O.jsx)(NN,{children:(0,O.jsxs)(PN,{className:G(`relative z-50 max-h-96 min-w-32 overflow-hidden`,`rounded-xl shadow-md`,`bg-white dark:bg-neutral-950`,`text-text`,`border border-neutral-200 dark:border-neutral-800`,`data-[state=closed]:animate-out data-[state=open]:animate-in`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,`data-[side=bottom]:slide-in-from-top-2`,`data-[side=left]:slide-in-from-right-2`,`data-[side=right]:slide-in-from-left-2`,`data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,O.jsx)(JN,{}),(0,O.jsx)(FN,{className:G(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,O.jsx)(YN,{})]})}),ZN=({className:e,...t})=>(0,O.jsx)(LN,{className:G(`px-1 py-0.5 font-semibold text-sm`,e),...t}),QN=({className:e,children:t,...n})=>(0,O.jsxs)(RN,{className:G(`relative flex w-full cursor-pointer select-none items-center rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden focus:bg-neutral/10 data-disabled:pointer-events-none data-disabled:opacity-50`,e),...n,children:[(0,O.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,O.jsx)(BN,{children:(0,O.jsx)(mu,{className:`size-4`})})}),(0,O.jsx)(zN,{children:t})]}),$N=({className:e,...t})=>(0,O.jsx)(UN,{className:G(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=WN;J.Group=GN,J.Value=KN,J.Trigger=qN,J.ScrollUpButton=JN,J.ScrollDownButton=YN,J.Content=XN,J.Label=ZN,J.Item=QN,J.Separator=$N;var eP=e=>{let t,n;if(typeof e==`number`||!Number.isNaN(Number(e)))t=`=`,n=e.toString();else if(typeof e==`string`){let r=[`<=`,`>=`,`<`,`>`,`=`].find(t=>e.startsWith(t));r&&(t=r,n=e.slice(r.length))}return{comparator:t,numberValue:n}},tP=e=>{let t=(0,V.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=eP(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,D.useState)(a??null),[l,u]=(0,D.useState)(o??null),d,f;t[2]!==s||t[3]!==a||t[4]!==o||t[5]!==l||t[6]!==r?(d=()=>{s&&l&&(s!==a||l!==o)&&r(`${s}${l}`)},f=[s,a,o,l,r],t[2]=s,t[3]=a,t[4]=o,t[5]=l,t[6]=r,t[7]=d,t[8]=f):(d=t[7],f=t[8]),(0,D.useEffect)(d,f);let p;if(t[9]!==a||t[10]!==l){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>u(e.target.value),t[12]=e):e=t[12],p=(0,O.jsxs)(`div`,{className:`flex gap-1`,children:[(0,O.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,O.jsx)(J.Trigger,{className:`w-20`,children:(0,O.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,O.jsxs)(J.Content,{children:[(0,O.jsx)(J.Item,{value:`<`,children:`<`}),(0,O.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,O.jsx)(J.Item,{value:`=`,children:`=`}),(0,O.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,O.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,O.jsx)(GE,{type:`number`,"aria-label":`Quantity`,defaultValue:l??void 0,onChange:e,className:`min-w-4`})]}),t[9]=a,t[10]=l,t[11]=p}else p=t[11];return p},nP=({rawContent:e})=>{let[t,n]=(0,D.useState)(``);return(0,D.useEffect)(()=>{Fe(async()=>{let{default:e}=await import(`./purify.es-Dt2VzQ8a.js`);return{default:e}},[]).then(({default:t})=>{n(t.sanitize(e))})},[e]),t?(0,O.jsx)(`div`,{dangerouslySetInnerHTML:{__html:t}}):(0,O.jsx)(`div`,{})},rP=(0,D.lazy)(()=>Fe(()=>import(`./MarkDownRender-CmDu17Um.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1]))),iP=(0,D.memo)(function(e){let t=(0,V.c)(2),{label:n,...r}=e,[i,a]=(0,D.useState)(!1),o;return t[0]===i?o=t[1]:(o=e=>{e&&!i&&a(!0)},t[0]=i,t[1]=o),(0,O.jsx)(wE,{header:n,label:n,onToggle:o,children:i?(0,O.jsx)(SP,{...r}):null})}),aP=e=>{let t=(0,V.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=oC(),s=iC(),{mutate:c,isPending:l}=aE(),u;t[0]!==o||t[1]!==r||t[2]!==n?(u=e=>o(r.localId,e,n),t[0]=o,t[1]=r,t[2]=n,t[3]=u):u=t[3];let d;return t[4]!==o||t[5]!==c||t[6]!==s?.ai?.apiKey||t[7]!==s?.ai?.model||t[8]!==s?.ai?.temperature||t[9]!==s?.internationalization||t[10]!==r||t[11]!==a||t[12]!==n?(d=()=>{c({fileContent:JSON.stringify({...r,...a?.[r.localId]??{}}),keyPath:n,locales:s?.internationalization.locales??[],aiOptions:{apiKey:s?.ai?.apiKey,model:s?.ai?.model,temperature:s?.ai?.temperature}},{onSuccess:e=>{if(e?.data)try{let t=e.data.fileContent;o(r.localId,t,n)}catch(e){console.error(e)}}})},t[4]=o,t[5]=c,t[6]=s?.ai?.apiKey,t[7]=s?.ai?.model,t[8]=s?.ai?.temperature,t[9]=s?.internationalization,t[10]=r,t[11]=a,t[12]=n,t[13]=d):d=t[13],(0,O.jsx)(LD,{variant:`default`,onContentChange:u,additionalButtons:(0,O.jsx)(SE,{Icon:Lu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},oP=e=>{let t=(0,V.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=oC(),o;return t[0]!==a||t[1]!==r||t[2]!==n?(o=e=>a(r.localId,e,n),t[0]=a,t[1]=r,t[2]=n,t[3]=o):o=t[3],(0,O.jsx)(vD,{variant:`default`,onContentChange:o,...i})},sP=[{content:`False`,value:!1},{content:`True`,value:!0}],cP=e=>{let t=(0,V.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=oC(),o;return t[0]!==a||t[1]!==n||t[2]!==r?(o=e=>a(n.localId,e,r),t[0]=a,t[1]=n,t[2]=r,t[3]=o):o=t[3],(0,O.jsx)(RE,{choices:sP,value:!0,onChange:o,color:`text`,size:`sm`,...i})},lP=e=>{let t=(0,V.c)(15),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=vt(),{selectedLocales:c}=gD(),l=n[j],u;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==c){let e;t[8]!==l||t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o||t[13]!==a?(e=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:pt(e,o)})}),(0,O.jsx)(`tr`,{className:`flex`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:l[e]??AS(l[s]),keyPath:[...r,{type:j,key:e}],dictionary:i,renderSection:a})})})]},t)},t[8]=l,t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=a,t[14]=e):e=t[14],u=(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:c.map(e)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=c,t[7]=u}else u=t[7];return u},uP=e=>{let t=(0,V.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=oC(),{addNewEnumeration:s,removeEnumeration:c}=_t(pD),l=n[M],u;t[0]===l?u=t[1]:(u=Object.keys(l),t[0]=l,t[1]=u);let d=u[0],f;if(t[2]!==o||t[3]!==s.label.value||t[4]!==s.text||t[5]!==l||t[6]!==i||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==a||t[11]!==n){let e;t[13]!==o||t[14]!==l||t[15]!==i||t[16]!==d||t[17]!==r?(e=()=>o(i.localId,AS(l[d])??``,[...r,{type:M,key:`unknown`}]),t[13]=o,t[14]=l,t[15]=i,t[16]=d,t[17]=r,t[18]=e):e=t[18],f=(0,O.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[M]).map(e=>{let t=[...r,{type:M,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(`div`,{className:`flex flex-1`,children:(0,O.jsx)(SE,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Iu,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,O.jsx)(`tr`,{className:`w-full p-2`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(tP,{value:e,onChange:t=>{let a=n[M],s=BD(a,e,t),c={...n,[M]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(SP,{section:l[e]??AS(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,O.jsx)(SE,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Mu,className:`m-2`,children:s.text})]}),t[2]=o,t[3]=s.label.value,t[4]=s.text,t[5]=l,t[6]=i,t[7]=d,t[8]=r,t[9]=c,t[10]=a,t[11]=n,t[12]=f}else f=t[12];return f},dP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[P];return(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`true`,`false`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-condition-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:i[e]??AS(i.true),keyPath:[...t,{type:P,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},fP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[ae];return(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:[`male`,`female`,`fallback`].map(e=>{let a=`${JSON.stringify(t)}-gender-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:i[e]??AS(i.male),keyPath:[...t,{type:ae,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},pP=[`zero`,`one`,`two`,`few`,`many`,`other`],mP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[N];return(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:pP.map(e=>{let a=`${JSON.stringify(t)}-plural-${e}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:e})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:i[e]??AS(i.other),keyPath:[...t,{type:N,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},hP=e=>{let t=(0,V.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=oC(),{addNewElement:s,removeElement:c}=_t(pD),l;if(t[0]!==o||t[1]!==s.label.value||t[2]!==s.text||t[3]!==i||t[4]!==r||t[5]!==c||t[6]!==a||t[7]!==n){let e;t[9]!==o||t[10]!==i||t[11]!==r||t[12]!==c||t[13]!==a||t[14]!==n[0]?(e=(e,t)=>{let s=`${JSON.stringify(r)}-array-${t}`;return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,O.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,O.jsx)(SE,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:ee,key:t}];o(i.localId,void 0,e)},Icon:Iu,children:c.text})]})})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(CP,{section:e??AS(n[0]),keyPath:[...r,{type:ee,key:t}],dictionary:i,renderSection:a})})})]},s)},t[9]=o,t[10]=i,t[11]=r,t[12]=c,t[13]=a,t[14]=n[0],t[15]=e):e=t[15];let u;t[16]!==o||t[17]!==i||t[18]!==r||t[19]!==n[0]||t[20]!==n.length?(u=()=>{let e=[...r,{type:ee,key:n.length}];o(i.localId,AS(n[0])??``,e,!1)},t[16]=o,t[17]=i,t[18]=r,t[19]=n[0],t[20]=n.length,t[21]=u):u=t[21],l=(0,O.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,O.jsx)(SE,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Mu,children:s.text})]}),t[0]=o,t[1]=s.label.value,t[2]=s.text,t[3]=i,t[4]=r,t[5]=c,t[6]=a,t[7]=n,t[8]=l}else l=t[8];return l},gP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return(0,O.jsx)(`table`,{className:`w-full`,children:(0,O.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:L,key:e}],s=i[e]??AS(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,O.jsx)(`tr`,{className:`block w-full`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(SP,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):(0,O.jsx)(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:(0,O.jsx)(`td`,{className:`flex w-full`,children:(0,O.jsx)(iP,{label:nt(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},_P=e=>{let t=(0,V.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,D.useState)(0),s;if(t[0]!==i||t[1]!==r||t[2]!==a||t[3]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],c=[...r,{type:z}],l=n[z];s=(0,O.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,O.jsx)(RE,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,O.jsx)(CP,{section:l,keyPath:c,dictionary:i,renderSection:a===1?wP:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},vP=e=>{let t=(0,V.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,D.useState)(0),c;if(t[0]!==i||t[1]!==a||t[2]!==r||t[3]!==o||t[4]!==n){let e=[{content:`Edit`,value:0},{content:`Preview`,value:1}],l=[...r,{type:R}],u=n.markdown??``,d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(yE,{}),children:(0,O.jsx)(rP,{isDarkMode:a,children:e})}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,O.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,O.jsx)(RE,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,O.jsx)(CP,{section:u,keyPath:l,dictionary:i,renderSection:d})]}),t[0]=i,t[1]=a,t[2]=r,t[3]=o,t[4]=n,t[5]=c}else c=t[5];return c},yP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:F}],i=e[F];return(0,O.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,O.jsx)(CP,{section:i,keyPath:r,...n})})},bP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:I}],i=e[I],{content:a}=e;return(0,O.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,O.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,O.jsx)(CP,{section:a,keyPath:r,...n})]})},xP=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=oC(),s=i[te],c=[...t,{type:te}];return(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,O.jsx)(VD,{children:`Dictionary key`}),(0,O.jsx)(vD,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,O.jsx)(VD,{children:`Path (optional)`}),(0,O.jsx)(vD,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},SP=(0,D.memo)(function(e){let t=(0,V.c)(82),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=_t(pD),c,l;if(t[0]!==i||t[1]!==o||t[2]!==r||t[3]!==a||t[4]!==n||t[5]!==s){l=Symbol.for(`react.early_return_sentinel`);bb0:{let e=PS(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,O.jsx)(`span`,{children:`(React Node)`}),(0,O.jsx)(`span`,{className:`flex text-neutral text-xs`,children:s})]}),t[8]=s,t[9]=e),l=e;break bb0}if(e===`nested`){let e;t[10]!==i||t[11]!==r||t[12]!==a||t[13]!==n?(e=(0,O.jsx)(xP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[10]=i,t[11]=r,t[12]=a,t[13]=n,t[14]=e):e=t[14],l=e;break bb0}if(e===`translation`){let e;t[15]!==i||t[16]!==r||t[17]!==a||t[18]!==n?(e=(0,O.jsx)(lP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[15]=i,t[16]=r,t[17]=a,t[18]=n,t[19]=e):e=t[19],l=e;break bb0}if(e===`enumeration`){let e;t[20]!==i||t[21]!==r||t[22]!==a||t[23]!==n?(e=(0,O.jsx)(uP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[20]=i,t[21]=r,t[22]=a,t[23]=n,t[24]=e):e=t[24],l=e;break bb0}if(e===`condition`){let e;t[25]!==i||t[26]!==r||t[27]!==a||t[28]!==n?(e=(0,O.jsx)(dP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[25]=i,t[26]=r,t[27]=a,t[28]=n,t[29]=e):e=t[29],l=e;break bb0}if(e===`gender`){let e;t[30]!==i||t[31]!==r||t[32]!==a||t[33]!==n?(e=(0,O.jsx)(fP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[30]=i,t[31]=r,t[32]=a,t[33]=n,t[34]=e):e=t[34],l=e;break bb0}if(e===`plural`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,O.jsx)(mP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[35]=i,t[36]=r,t[37]=a,t[38]=n,t[39]=e):e=t[39],l=e;break bb0}if(e===`insertion`){let e;t[40]!==i||t[41]!==r||t[42]!==a||t[43]!==n?(e=(0,O.jsx)(yP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[40]=i,t[41]=r,t[42]=a,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`markdown`){let e;t[45]!==i||t[46]!==o||t[47]!==r||t[48]!==n?(e=(0,O.jsx)(vP,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[45]=i,t[46]=o,t[47]=r,t[48]=n,t[49]=e):e=t[49],l=e;break bb0}if(e===`html`){let e;t[50]!==i||t[51]!==r||t[52]!==n?(e=(0,O.jsx)(_P,{dictionary:i,keyPath:r,section:n}),t[50]=i,t[51]=r,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`file`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,O.jsx)(bP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[54]=i,t[55]=r,t[56]=a,t[57]=n,t[58]=e):e=t[58],l=e;break bb0}if(e===`array`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,O.jsx)(hP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[59]=i,t[60]=r,t[61]=a,t[62]=n,t[63]=e):e=t[63],l=e;break bb0}if(e===`object`){let e;t[64]!==i||t[65]!==r||t[66]!==a||t[67]!==n?(e=(0,O.jsx)(gP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[64]=i,t[65]=r,t[66]=a,t[67]=n,t[68]=e):e=t[68],l=e;break bb0}if(e===`number`){let e;t[69]!==i||t[70]!==r||t[71]!==n?(e=(0,O.jsx)(`div`,{className:`w-full p-2`,children:(0,O.jsx)(oP,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[69]=i,t[70]=r,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`text`){let e;t[73]!==i||t[74]!==r||t[75]!==a||t[76]!==n?(e=(0,O.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,O.jsx)(aP,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[73]=i,t[74]=r,t[75]=a,t[76]=n,t[77]=e):e=t[77],l=e;break bb0}if(e===`boolean`){let e;t[78]!==i||t[79]!==r||t[80]!==n?(e=(0,O.jsx)(`div`,{className:`w-full p-2`,children:(0,O.jsx)(cP,{dictionary:i,keyPath:r,value:n})}),t[78]=i,t[79]=r,t[80]=n,t[81]=e):e=t[81],l=e;break bb0}c=(0,O.jsxs)(`div`,{className:`w-full p-2`,children:[`Error. Format not supported.`,JSON.stringify(n,null,2),JSON.stringify(r,null,2),`NodeType : `,e]})}t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=n,t[5]=s,t[6]=c,t[7]=l}else c=t[6],l=t[7];return l===Symbol.for(`react.early_return_sentinel`)?c:l}),CP=(0,D.memo)(function(e){return(0,O.jsx)(_E,{border:!0,background:`none`,className:`top-6 flex h-full flex-1 flex-col gap-6 overflow-hidden p-2 md:sticky`,roundedSize:`2xl`,children:(0,O.jsx)(SP,{...e})})});function wP(e){return(0,O.jsx)(nP,{rawContent:e})}var TP={key:`breadcrumb`,content:{nodeType:`translation`,translation:{en:{linkLabel:`Go to`},"en-GB":{linkLabel:`Go to`},fr:{linkLabel:`Aller à`},es:{linkLabel:`Ir a`},de:{linkLabel:`Gehe zu`},ja:{linkLabel:`に移動`},ko:{linkLabel:`로 이동`},zh:{linkLabel:`转到`},it:{linkLabel:`Vai a`},pt:{linkLabel:`Ir para`},hi:{linkLabel:`कर जाएं`},ar:{linkLabel:`اذهب إلى`},ru:{linkLabel:`Перейти на`}}},localIds:[`breadcrumb::local::../@intlayer/design-system/dist/esm/components/Breadcrumb/breadcrumb.content.mjs`]},EP=tu(`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:`rounded-lg border-none bg-current/0 transition *:text-current! hover:bg-current/20 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`,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:`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`}}),DP=({href:e,isExternalLink:t},n)=>{if(typeof t==`boolean`)return t;if(!(typeof e==`string`&&e.trim()!==``)||!/^https?:\/\//.test(e))return!1;if(n)try{let t=new URL(e).hostname,r=new URL(n.startsWith(`http`)?n:`https://${n}`).hostname,i=e=>e.split(`.`).slice(-2).join(`.`);return i(t)!==i(r)}catch{return!0}return!0},OP=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(OP):(0,D.isValidElement)(e)?OP(e.props.children):!1,kP=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??DP(e),g=f??p?.startsWith(`#`)??!1,_=OP(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`,x=l&&p&&!h&&!g?ut(p,l):p;return(0,O.jsxs)(`a`,{href:x===``?void 0:x,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:G(EP({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,O.jsx)(`span`,{children:i}):i,h&&_&&(0,O.jsx)(Cu,{className:`ml-2 inline-block size-4`}),g&&(0,O.jsx)(Ou,{className:`ml-2 inline-block size-4`})]})},AP=e=>e&&{primary:`text-primary`,secondary:`text-secondary`,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:``}[e]||``,jP=tu(`flex flex-row flex-wrap items-center text-sm`,{variants:{size:{small:`gap-1 text-xs`,medium:`gap-2 text-sm`,large:`gap-3 text-base`},spacing:{compact:`gap-1`,normal:`gap-2`,loose:`gap-4`}},defaultVariants:{size:`medium`,spacing:`normal`}}),MP=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Oe(TP).linkLabel;return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(kP,{href:e,locale:o,color:i,onClick:r,itemProp:`item`,isExternalLink:!1,itemScope:!0,itemType:`https://schema.org/WebPage`,...c,label:`${l} ${n}`,itemID:e,size:`sm`,children:(0,O.jsx)(`span`,{itemProp:`name`,children:n})}),(0,O.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},NP=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=_t(TP);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(SE,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,O.jsx)(`span`,{itemProp:`name`,children:t})}),(0,O.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},PP=({children:e,position:t,className:n,...r})=>(0,O.jsxs)(`span`,{itemProp:`item`,className:G(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,O.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,O.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),FP=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,O.jsx)(_u,{size:10}),ariaLabel:o=`breadcrumb`,includeStructuredData:s=!0,maxItems:c,size:l,spacing:u,...d})=>{let f=c&&e.length>c?[...e.slice(0,1),`...`,...e.slice(-(c-2))]:e;return(0,O.jsx)(`nav`,{"aria-label":o,children:(0,O.jsx)(`ol`,{className:G(jP({size:l,spacing:u}),t),...s&&{itemScope:!0,itemType:`http://schema.org/BreadcrumbList`},...d,children:f.map((e,t)=>{let o=t===f.length-1,c=typeof e==`object`&&typeof e.href==`string`,l=typeof e==`object`&&typeof e.onClick==`function`,u=t===f.length-1,d=u?i:void 0,p=e===`...`,m=e.text??e,h=AP(n);if(p)return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,O.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,O.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,O.jsx)(`span`,{className:G(h),children:a})})]},`truncated-${m}`);let g=(0,O.jsx)(PP,{position:t+1,"aria-current":d,className:G(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?g=(0,O.jsx)(MP,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:G(u&&`cursor-default text-neutral-900`),children:m},m):l&&(g=(0,O.jsx)(NP,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:G(u&&`cursor-default text-neutral-900`),children:m},m));let _=(0,D.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},g);return o?_:(0,O.jsxs)(D.Fragment,{children:[_,(0,O.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,O.jsx)(`span`,{className:G(h),children:a})})]},m)})})})},IP=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,O.jsx)(FP,{links:[...a?[{text:nt(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:nt(t.key?.toString()??``)}))],locale:r,elementType:`location`,color:i}),LP={key:`locale-switcher-content`,content:{nodeType:`translation`,translation:{en:{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},"en-GB":{localeSwitcherLabel:`Language switcher`,languageListLabel:`Language list`,switchTo:`Switch to`,searchInput:{text:`Search Locale`,placeholder:`Search a locale`,ariaLabel:`Language search`},seeAllLocalesSwitch:{true:`See all locales`,false:`See only selected locales`}},fr:{localeSwitcherLabel:`Changer de langue`,languageListLabel:`Liste des langues`,switchTo:`Passer à`,searchInput:{text:`Rechercher la locale`,placeholder:`Rechercher une locale`,ariaLabel:`Recherche de langue`},seeAllLocalesSwitch:{true:`Voir toutes les langues`,false:`Voir seulement les langues sélectionnées`}},es:{localeSwitcherLabel:`Cambiar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Cambiar a`,searchInput:{text:`Buscar idioma`,placeholder:`Buscar un idioma`,ariaLabel:`Búsqueda de idioma`},seeAllLocalesSwitch:{true:`Ver todos los idiomas`,false:`Ver solo los idiomas seleccionados`}},de:{localeSwitcherLabel:`Sprachwechsler`,languageListLabel:`Sprachliste`,switchTo:`Wechseln Sie zu`,searchInput:{text:`Sprache durchsuchen`,placeholder:`Sprache suchen`,ariaLabel:`Sprachsuche`},seeAllLocalesSwitch:{true:`Alle Sprachen anzeigen`,false:`Nur ausgewählte Sprachen anzeigen`}},ja:{localeSwitcherLabel:`言語スイッチャー`,languageListLabel:`言語リスト`,switchTo:`に切り替える`,searchInput:{text:`ロケールを検索`,placeholder:`ロケールを検索`,ariaLabel:`言語検索`},seeAllLocalesSwitch:{true:`すべての言語を表示`,false:`選択された言語のみを表示`}},ko:{localeSwitcherLabel:`언어 스위치`,languageListLabel:`언어 목록`,switchTo:`전환`,searchInput:{text:`언어 검색`,placeholder:`언어 검색`,ariaLabel:`언어 검색`},seeAllLocalesSwitch:{true:`모든 언어 보기`,false:`선택한 언어만 보기`}},zh:{localeSwitcherLabel:`语言切换器`,languageListLabel:`语言列表`,switchTo:`切换到`,searchInput:{text:`搜索语言`,placeholder:`搜索语言`,ariaLabel:`语言搜索`},seeAllLocalesSwitch:{true:`查看所有语言`,false:`仅查看选定的语言`}},it:{localeSwitcherLabel:`Cambia lingua`,languageListLabel:`Elenco lingue`,switchTo:`Passa a`,searchInput:{text:`Cerca lingua`,placeholder:`Cerca una lingua`,ariaLabel:`Ricerca lingua`},seeAllLocalesSwitch:{true:`Vedi tutte le lingue`,false:`Vedi solo le lingue selezionate`}},pt:{localeSwitcherLabel:`Mudar idioma`,languageListLabel:`Lista de idiomas`,switchTo:`Mudar para`,searchInput:{text:`Pesquisar idioma`,placeholder:`Pesquisar um idioma`,ariaLabel:`Pesquisa de idioma`},seeAllLocalesSwitch:{true:`Ver todos os idiomas`,false:`Ver apenas os idiomas selecionados`}},hi:{localeSwitcherLabel:`भाषा स्विचर`,languageListLabel:`भाषा सूची`,switchTo:`स्विच करें`,searchInput:{text:`भाषा खोजें`,placeholder:`भाषा खोजें`,ariaLabel:`भाषा खोजें`},seeAllLocalesSwitch:{true:`सभी भाषाओं को देखें`,false:`केवल चुने गए भाषाओं को देखें`}},ar:{localeSwitcherLabel:`مبدل اللغة`,languageListLabel:`قائمة اللغات`,switchTo:`التبديل إلى`,searchInput:{text:`بحث اللغة`,placeholder:`بحث اللغة`,ariaLabel:`بحث اللغة`},seeAllLocalesSwitch:{true:`عرض جميع اللغات`,false:`عرض اللغات المحددة فقط`}},ru:{localeSwitcherLabel:`Переключатель языка`,languageListLabel:`Список языков`,switchTo:`Переключиться на`,searchInput:{text:`Поиск языка`,placeholder:`Поиск языка`,ariaLabel:`Поиск языка`},seeAllLocalesSwitch:{true:`Показать все языки`,false:`Показать только выбранные языки`}}}},localIds:[`locale-switcher-content::local::../@intlayer/design-system/dist/esm/components/LocaleSwitcherContentDropDown/localeSwitcher.content.mjs`]},RP=({children:e,className:t,identifier:n,...r})=>(0,O.jsx)(`div`,{className:G(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});RP.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,O.jsx)(SE,{className:G([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),RP.Panel=({children:e,isHidden:t=void 0,isOverable:n=!1,isFocusable:r=!1,align:i=`start`,yAlign:a=`below`,identifier:o,className:s,smootherClassName:c,...l})=>(0,O.jsx)(`div`,{className:G(`absolute z-100 min-w-full`,i===`start`&&`left-0`,i===`end`&&`right-0`,a===`below`&&`top-[calc(100%+0.5rem)]`,a===`above`&&`bottom-[calc(100%+0.5rem)]`,s),"aria-hidden":t,role:`region`,"aria-labelledby":`dropdown-trigger-${o}`,id:`dropdown-panel-${o}`,children:(0,O.jsx)(CE,{isHidden:t,className:G(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`,c),...l,children:e})});function zP(e){return Array.isArray?Array.isArray(e):YP(e)===`[object Array]`}function BP(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function VP(e){return e==null?``:BP(e)}function HP(e){return typeof e==`string`}function UP(e){return typeof e==`number`}function WP(e){return e===!0||e===!1||KP(e)&&YP(e)==`[object Boolean]`}function GP(e){return typeof e==`object`}function KP(e){return GP(e)&&e!==null}function qP(e){return e!=null}function JP(e){return!e.trim().length}function YP(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var XP=`Incorrect 'index' type`,ZP=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,QP=e=>`Invalid value for key ${e}`,$P=e=>`Pattern length exceeds max of ${e}.`,eF=e=>`Missing ${e} property in key`,tF=e=>`Property 'weight' in key '${e}' must be a positive integer`,nF=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,rF=Object.prototype.hasOwnProperty,iF=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=aF(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function aF(e){let t=null,n=null,r=null,i=1,a=null;if(HP(e)||zP(e))r=e,t=oF(e),n=sF(e);else{if(!rF.call(e,`name`))throw Error(eF(`name`));let o=e.name;if(r=o,rF.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(tF(sF(o)));t=oF(o),n=sF(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function oF(e){return zP(e)?e:e.split(`.`)}function sF(e){return zP(e)?e.join(`.`):e}function cF(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(qP(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!qP(s))return;if(a===t.length-1&&(HP(s)||UP(s)||WP(s)||typeof s==`bigint`))n.push(o===void 0?VP(s):{v:VP(s),i:o});else if(zP(s)){r=!0;for(let e=0,n=s.length;e<n;e+=1)i(s[e],t,a+1,e)}else t.length&&i(s,t,a+1,o)}};return i(e,HP(t)?t.split(`.`):t,0),r?n:n[0]}var lF={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},uF={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},dF={location:0,threshold:.6,distance:100},fF={useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:`any`,getFn:cF,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...uF,...lF,...dF,...fF});function pF(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=1,a=!1;for(let e=0;e<t.length;e++)t.charCodeAt(e)===32?a||=(i++,!0):a=!1;if(n.has(i))return n.get(i);let o=Math.round(r/i**(.5*e))/r;return n.set(i,o),o},clear(){n.clear()}}}var mF=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=pF(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(HP(this.docs[0]))for(let n=0;n<e;n++){let e=this._createStringRecord(this.docs[n],n);e&&(this.records[t++]=e)}else for(let n=0;n<e;n++)this.records[t++]=this._createObjectRecord(this.docs[n],n);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(ZP);if(HP(e)){let n=this._createStringRecord(e,t);return n&&this.records.push(n),n}let n=this._createObjectRecord(e,t);return this.records.push(n),n}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(ZP);for(let t=0,n=this.records.length;t<n;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i>e&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e.i?t=i+1:r=i}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!qP(e)||JP(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let n={i:t,$:{}};for(let t=0,r=this.keys.length;t<r;t++){let r=this.keys[t],i=r.getFn?r.getFn(e):this.getFn(e,r.path);if(qP(i)){if(zP(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(qP(n)){if(HP(n)){if(!JP(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(qP(n.v)){let t=HP(n.v)?n.v:VP(n.v);if(!JP(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[t]=e}else if(HP(i)&&!JP(i)){let e={v:i,n:this.norm.get(i)};n.$[t]=e}}}return n}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function hF(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new mF({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(aF)),i.setSources(t),i.create(),i}function gF(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new mF({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function _F(e=[],t=Y.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a<o;a+=1){let o=e[a];o&&r===-1?r=a:!o&&r!==-1&&(i=a-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}var vF=32;function yF(e,t,n,{location:r=Y.location,distance:i=Y.distance,threshold:a=Y.threshold,findAllMatches:o=Y.findAllMatches,minMatchCharLength:s=Y.minMatchCharLength,includeMatches:c=Y.includeMatches,ignoreLocation:l=Y.ignoreLocation}={}){if(t.length>vF)throw Error($P(vF));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e<u;)_[v+e]=1,e+=1}}m=-1;let y=[],b=1,x=0,S=u+d,C=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=S;for(;r<i;)h(t,f+i)<=p?r=i:S=i,i=Math.floor((S-r)/2+r);S=i;let a=Math.max(1,f-i+1),s=o?d:Math.min(f+i,d)+u,c=Array(s+2);c[s+1]=(1<<t)-1;for(let r=s;r>=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=_F(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function bF(e){let t={};for(let n=0,r=e.length;n<r;n+=1){let i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}function xF(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;n<r;n+=1){let r=t[t.length-1],i=e[n];i[0]<=r[1]+1?r[1]=Math.max(r[1],i[1]):t.push(i)}return t}var SF={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},CF=RegExp(`[`+Object.keys(SF).join(``)+`]`,`g`),wF=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(CF,e=>SF[e]):e=>e,TF=class{constructor(e,{location:t=Y.location,threshold:n=Y.threshold,distance:r=Y.distance,includeMatches:i=Y.includeMatches,findAllMatches:a=Y.findAllMatches,minMatchCharLength:o=Y.minMatchCharLength,isCaseSensitive:s=Y.isCaseSensitive,ignoreDiacritics:c=Y.ignoreDiacritics,ignoreLocation:l=Y.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?wF(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:bF(e),startIndex:t})},d=this.pattern.length;if(d>vF){let e=0,t=d%vF,n=d-t;for(;e<n;)u(this.pattern.substr(e,vF),e),e+=vF;if(t){let e=d-vF;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r}=this.options;if(e=t?e:e.toLowerCase(),e=n?wF(e):e,this.pattern===e){let t={isMatch:!0,score:0};return r&&(t.indices=[[0,e.length-1]]),t}let{location:i,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,ignoreLocation:l}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:n,startIndex:p})=>{let{isMatch:m,score:h,indices:g}=yF(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=xF(u)),p}},EF=new Set([`fuzzy`,`include`]);function DF(e){return e.startsWith(`inverse`)}var OF=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new TF(e,{location:t.location??Y.location,threshold:t.threshold??Y.threshold,distance:t.distance??Y.distance,includeMatches:t.includeMatches??Y.includeMatches,findAllMatches:t.findAllMatches??Y.findAllMatches,minMatchCharLength:t.minMatchCharLength??Y.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??Y.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??Y.ignoreDiacritics,ignoreLocation:t.ignoreLocation??Y.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],kF=OF.length,AF=`\0`,jF=`|`;function MF(e){let t=[],n=e.length,r=0;for(;r<n;){for(;r<n&&e[r]===` `;)r++;if(r>=n)break;let i=r;for(;i<n&&e[i]!==` `&&e[i]!==`"`;)i++;if(i<n&&e[i]===`"`){for(i++;i<n;){if(e[i]===`"`){let t=i+1;if(t>=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i<n&&e[i]!==` `;)i++;t.push(e.substring(r,i)),r=i}}return t}function NF(e,t){let n=e.match(t);return n?n[1]:null}function PF(e,t={}){return e.replace(/\\\|/g,AF).split(jF).map(e=>{let n=MF(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e<i;e+=1){let i=n[e],a=!1,o=-1;for(;!a&&++o<kF;){let e=OF[o],n=NF(i,e.multiRegex);n&&(r.push(e.create(n,t)),a=!0)}if(!a)for(o=-1;++o<kF;){let e=OF[o],n=NF(i,e.singleRegex);if(n){r.push(e.create(n,t));break}}}return r})}var FF=class{constructor(e,{isCaseSensitive:t=Y.isCaseSensitive,ignoreDiacritics:n=Y.ignoreDiacritics,includeMatches:r=Y.includeMatches,minMatchCharLength:i=Y.minMatchCharLength,ignoreLocation:a=Y.ignoreLocation,findAllMatches:o=Y.findAllMatches,location:s=Y.location,threshold:c=Y.threshold,distance:l=Y.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:r,minMatchCharLength:i,findAllMatches:o,ignoreLocation:a,location:s,threshold:c,distance:l},e=t?e:e.toLowerCase(),e=n?wF(e):e,this.pattern=e,this.query=PF(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:n,isCaseSensitive:r,ignoreDiacritics:i}=this.options;e=r?e:e.toLowerCase(),e=i?wF(e):e;let a=0,o=[],s=0,c=!1;for(let r=0,i=t.length;r<i;r+=1){let i=t[r];o.length=0,a=0,c=!1;for(let t=0,r=i.length;t<r;t+=1){let r=i[t],{isMatch:l,indices:u,score:d}=r.search(e);if(l)a+=1,s+=d,DF(r.type)&&(c=!0),n&&(EF.has(r.type)?o.push(...u):o.push(u));else{s=0,a=0,o.length=0,c=!1;break}}if(a){let e={isMatch:!0,score:s/a};return c&&(e.hasInverse=!0),n&&(e.indices=xF(o)),e}}return{isMatch:!1,score:1}}},IF=[];function LF(...e){IF.push(...e)}function RF(e,t){for(let n=0,r=IF.length;n<r;n+=1){let r=IF[n];if(r.condition(e,t))return new r(e,t)}return new TF(e,t)}var zF={AND:`$and`,OR:`$or`},BF={PATH:`$path`,PATTERN:`$val`},VF=e=>!!(e[zF.AND]||e[zF.OR]),HF=e=>!!e[BF.PATH],UF=e=>!zP(e)&&GP(e)&&!VF(e),WF=e=>({[zF.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function GF(e,t,{auto:n=!0}={}){let r=e=>{if(HP(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=RF(e,t)),r}let i=Object.keys(e),a=HF(e);if(!a&&i.length>1&&!VF(e))return r(WF(e));if(UF(e)){let r=a?e[BF.PATH]:i[0],o=a?e[BF.PATTERN]:e[r];if(!HP(o))throw Error(QP(r));let s={keyId:sF(r),pattern:o};return n&&(s.searcher=RF(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];zP(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return VF(e)||(e=WF(e)),r(e)}function KF(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function qF(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=KF(e.matches,{ignoreFieldNorm:t})})}var JF=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){let t=this.heap;for(;e>0;){let n=e-1>>1;if(t[e].score<=t[n].score)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i<n&&t[i].score>t[r].score&&(r=i),a<n&&t[a].score>t[r].score&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function YF(e){let t=[];return e.matches.forEach(e=>{if(!qP(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function XF(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=YF(e)),r&&(a.score=e.score),a})}var ZF=/[\p{L}\p{M}\p{N}_]+/gu,QF=new WeakSet;function $F(e){QF.has(e)||(QF.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function eI(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||$F(e),t=>t.match(e)||[]):e=>e.match(ZF)||[]}function tI({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=eI(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=wF(n)),r(n)}}}var nI=31,rI=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=tI({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new TF(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=nI}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let c=this.termSearchers[s].searchIn(e),l=this.idfWeights[s];r+=l,c.isMatch&&(i++,n+=l*(1-c.score),c.indices&&t.push(...c.indices),this.combineAll&&(this.useMask?a|=1<<s:o.add(s)))}if(i===0)return{isMatch:!1,score:1};let s=r>0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=xF(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function iI(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function aI(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){iI(e,a,i,r);return}if(o)for(let t=0;t<n;t++){let n=o[t];if(n)if(Array.isArray(n))for(let t of n)iI(e,t.v,i,r);else iI(e,n.v,i,r)}}function oI(e,t,n){let r={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let i of e)aI(r,i,t,n);return r}function sI(e,t,n,r){aI(e,t,n,r)}function cI(e,t){let n=e.docFieldCount.get(t);if(n===void 0)return;e.fieldCount-=n,e.docFieldCount.delete(t);let r=e.docTermFieldHits.get(t);if(r){for(let[t,n]of r){let r=(e.df.get(t)||0)-n;r<=0?e.df.delete(t):e.df.set(t,r)}e.docTermFieldHits.delete(t)}}function lI(e,t){if(t.length===0)return;let n=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of n)cI(e,t);let r=e=>{let t=0,r=n.length;for(;t<r;){let i=t+r>>>1;n[i]<e?t=i+1:r=i}return e-t},i=n[0],a=new Map;for(let[t,n]of e.docFieldCount)a.set(t>i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var uI=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new iF(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=RF(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof mF))throw Error(XP);if(this._myIndex=t||hF(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=tI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=oI(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!qP(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=tI({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});sI(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r<i;r+=1)e(this._docs[r],r)&&(t.push(this._docs[r]),n.push(r));if(n.length){this._invertedIndex&&lI(this._invertedIndex,n);let e=new Set(n);this._docs=this._docs.filter((t,n)=>!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(ZP);this._invertedIndex&&lI(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(HP(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return UP(n)&&n>-1&&(e=e.slice(0,n)),e}let c=UP(n)&&n>0&&HP(e),l;if(c){let t=new JF(n);HP(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=HP(e)?HP(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),qF(l,{ignoreFieldNorm:s}),a&&l.sort(o),UP(n)&&n>-1&&(l=l.slice(0,n));return XF(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!qP(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=KF(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=GF(e,this.options),n=(e,t,r)=>{if(!(`children`in e)){let{keyId:n,searcher:i}=e,a;return n===null?(a=[],this._myIndex.keys.forEach((e,n)=>{a.push(...this._findMatches({key:e,value:t[n],searcher:i}))})):a=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:i}),a&&a.length?[{idx:r,item:t,matches:a}]:[]}let{children:i,operator:a}=e,o=[];for(let e=0,s=i.length;e<s;e+=1){let s=i[e],c=n(s,t,r);if(c.length)o.push(...c);else if(a===zF.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(qP(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{keys:a,records:o}=this._myIndex,s=t?null:[];return o.forEach(({$:e,i:o})=>{if(!qP(e))return;let c=[],l=!1,u=!1;if(a.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:o,item:e,matches:c};t?(r.score=KF(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!qP(t))return[];let r=[];if(zP(t))t.forEach(({v:t,i,n:a})=>{if(!qP(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=nI){let n=0;for(let t=0;t<e.length;t++)n|=e[t].matchedMask||0;return n===2**t-1}let n=new Set;for(let t=0;t<e.length;t++){let r=e[t].matchedTerms;if(r)for(let e of r)n.add(e)}return n.size===t}};uI.version=`7.4.0`,uI.createIndex=hF,uI.parseIndex=gF,uI.config=Y,uI.match=function(e,t,n){if(n&&n.useTokenSearch)throw Error(nF);return RF(e,{...Y,...n}).searchIn(t)},uI.parseQuery=GF,LF(FF),LF(rI),uI.use=function(...e){e.forEach(e=>LF(e))};var dI=`locale-switcher-content`,fI=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=_t(LP),s=(0,D.useRef)(null),{locale:c}=vt(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=gD(),f=(0,D.useMemo)(()=>l.map(e=>({locale:e,englishName:pt(e,`en`),currentLocaleName:pt(e,c),ownLocaleName:pt(e)})),[l,c]),[p,m]=(0,D.useState)(``),[h,g]=mD(`locale-content-selector-see-all-locales`,!1),_=(0,D.useMemo)(()=>new uI(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),v=(0,D.useMemo)(()=>p?_.search(p).map(e=>e.item):f,[p,f,_]),y=e=>{t?u.includes(e)?u.length>1&&d(t=>t.filter(t=>t!==e)):d(t=>[...t,e]):d([e])},b=e=>{g(e),d(e?l:[c])};return(0,O.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,O.jsxs)(RP,{identifier:dI,children:[(0,O.jsx)(RP.Trigger,{identifier:dI,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,O.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,O.jsx)(`div`,{className:`px-2 py-1`,children:(0,O.jsx)(Eu,{size:16})}),(0,O.jsx)(ku,{className:`self-center`,size:16})]})}),(0,O.jsx)(RP.Panel,{identifier:dI,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,O.jsxs)(_E,{className:`max-h-[60vh] min-w-28`,separator:`y`,role:`listbox`,transparency:`xs`,border:!0,roundedSize:`3xl`,borderColor:`text`,"aria-label":a.value,children:[t&&(0,O.jsx)(`div`,{className:`m-auto p-2`,children:(0,O.jsx)(RE,{defaultValue:h,onChange:b,color:`text`,size:`sm`,className:`!w-60`,choices:[{content:o.true.value,value:!0},{content:o.false.value,value:!1}]})}),!(t&&h)&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`div`,{className:`p-3`,children:(0,O.jsx)(GE,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,O.jsx)(`ol`,{className:`divide-y divide-dashed divide-text/20 overflow-y-auto p-1`,children:v.map(({locale:e,currentLocaleName:r,ownLocaleName:i})=>(0,O.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,O.jsx)(SE,{onClick:()=>y(e),label:`${n} ${r}`,disabled:!(l??l).includes(e),isActive:u.includes(e),variant:`hoverable`,color:`text`,isFullWidth:!0,textAlign:`left`,size:`sm`,children:(0,O.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,O.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,O.jsx)(mu,{className:`size-full`})}),(0,O.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,O.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,O.jsx)(`span`,{dir:ft(e),lang:e,children:i}),(0,O.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,O.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},pI=e=>{let t=jS(e),n=PS(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?pI(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},mI=e=>{let t=(0,V.c)(3),{children:n,onToggle:r,...i}=e,[a,o]=(0,D.useState)(!1),s;return t[0]!==a||t[1]!==r?(s=e=>{e&&!a&&o(!0),r?.(e)},t[0]=a,t[1]=r,t[2]=s):s=t[2],(0,O.jsx)(wE,{...i,onToggle:s,children:a?n:null})},hI=e=>{let t=(0,V.c)(16),{section:n,keyPath:r,dictionary:i}=e,{selectedLocales:a}=gD(),o=OS(n,r,$S()),{addEditedContent:s}=aC(),{setFocusedContentKeyPath:c,focusedContent:l}=tC(),{addNewElement:u,goToField:d}=_t(pD),f=PS(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&Qe(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=pI(o);if(!o)return(0,O.jsx)(O.Fragment,{});if(h){let e;return t[2]!==r||t[3]!==c?(e=()=>c(r),t[2]=r,t[3]=c,t[4]=e):e=t[4],(0,O.jsx)(SE,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:_u,children:nt(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,O.jsx)(O.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,O.jsx)(hI,{keyPath:[...r,{type:j,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,O.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`plural`||f===`condition`)return(0,O.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,O.jsx)(hI,{keyPath:[...r,{type:f,key:e}],section:n,dictionary:i},e))});if(f===`array`){let e;return t[9]!==i||t[10]!==m||t[11]!==d||t[12]!==r||t[13]!==n||t[14]!==c?(e=(e,t)=>{let a=[...r,{type:ee,key:t}];return pI(e)?(0,O.jsxs)(SE,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:_u,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,O.jsx)(mI,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,O.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,O.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,O.jsx)(hI,{keyPath:a,section:n,dictionary:i})})})},JSON.stringify(a))},t[9]=i,t[10]=m,t[11]=d,t[12]=r,t[13]=n,t[14]=c,t[15]=e):e=t[15],(0,O.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,O.jsx)(SE,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:ee,key:o.length}],t=o,n=AS(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Mu,children:u.text})]})}return typeof o.nodeType==`string`?(0,O.jsx)(hI,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,O.jsx)(`div`,{className:`flex w-full max-w-full flex-col justify-between gap-2`,children:Object.keys(o).map(e=>{let t=[...r,{type:L,key:e}];return pI(OS(n,t))?(0,O.jsx)(SE,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:_u,children:nt(e)},e):(0,O.jsx)(mI,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:nt(e),children:(0,O.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,O.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,O.jsx)(hI,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,O.jsxs)(O.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},gI=e=>{let t=(0,V.c)(16),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=oC(),{focusedContent:c,setFocusedContentKeyPath:l}=tC(),[,u]=(0,D.useTransition)(),d;t[0]!==l||t[1]!==u?(d=e=>u(()=>l(e)),t[0]=l,t[1]=u,t[2]=d):d=t[2];let f=d,p=c?.keyPath,m=s?.[o]?.content===void 0?i:s?.[o]?.content,h=$S(),g;t[3]===p?g=t[4]:(g=p??[],t[3]=p,t[4]=g);let _;t[5]!==h||t[6]!==m||t[7]!==g?(_=OS(m,g,h),t[5]=h,t[6]=m,t[7]=g,t[8]=_):_=t[8];let v=_,y=(0,D.useDeferredValue)(p),b=(0,D.useDeferredValue)(v),x=b!==v,S;t[9]===m?S=t[10]:(S=pI(m),t[9]=m,t[10]=S);let C=S,w=pI(b),T;t[11]!==c?.keyPath||t[12]!==v||t[13]!==f?(T=()=>{v===void 0&&f(c?.keyPath?.slice(0,-1)??[])},t[11]=c?.keyPath,t[12]=v,t[13]=f,t[14]=T):T=t[14];let E;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(E=[],t[15]=E):E=t[15],(0,D.useEffect)(T,E),(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,O.jsx)(IP,{dictionaryKey:a,keyPath:p??[],onClickKeyPath:f}),(0,O.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,O.jsx)(fI,{})})]}),(0,O.jsxs)(`div`,{className:`flex flex-1 gap-2 overflow-visible max-md:flex-col`,children:[typeof m==`object`&&m&&!C&&Object.keys(m).length>0&&(0,O.jsx)(_E,{border:!0,background:`none`,className:`top-10 flex h-full flex-col items-start gap-0.5 overflow-auto p-2 md:sticky md:max-w-[50%]`,roundedSize:`2xl`,transparency:`xs`,children:(0,O.jsx)(hI,{keyPath:[],section:m,dictionary:n})}),(w||(y??[]).length>0)&&(0,O.jsx)(`div`,{className:x?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:(0,O.jsx)(CP,{keyPath:y??[],section:b,dictionary:n,isDarkMode:r})})]})]})},_I=tu(`inline-flex items-center rounded-md border px-2.5 py-0.5 font-semibold text-xs transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{color:{primary:`border-primary bg-primary text-primary hover:bg-primary-500`,secondary:`border-secondary bg-secondary text-secondary hover:bg-secondary-300`,success:`border-success bg-success text-success hover:bg-success-500`,error:`border-error bg-error text-error hover:bg-error-500`,neutral:`border-neutral bg-neutral text-neutral hover:bg-neutral-600`,light:`border-white bg-white text-white hover:bg-neutral-500`,dark:`border-neutral-800 bg-neutral-800 text-neutral-800 hover:bg-neutral-900`,text:`border-text bg-text text-text hover:opacity-80`,custom:``},variant:{default:`rounded-lg text-text-opposite`,none:`border-none bg-opacity-0 text-inherit hover:bg-opacity-0`,outline:`rounded-lg border-[1.3px] bg-opacity-0 hover:bg-opacity-30`,hoverable:`rounded-lg border-none bg-opacity-0 transition hover:bg-opacity-10`},size:{sm:`px-2 py-0.5 text-xs`,md:`px-2.5 py-0.5 text-xs`,lg:`px-3 py-1 text-sm`}},defaultVariants:{variant:`default`,color:`primary`,size:`md`}}),vI=({className:e,variant:t=`default`,color:n=`primary`,size:r=`md`,children:i,clickable:a=!1,dismissible:o=!1,onClick:s,onDismiss:c,role:l,tabIndex:u,"aria-label":d,...f})=>{let p=a?`button`:`span`,m=e=>{a&&s&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},h=e=>{e.stopPropagation(),c?.()};return(0,O.jsxs)(p,{className:G(_I({variant:t,color:n,size:r}),a&&`cursor-pointer hover:opacity-80 focus-visible:ring-2 focus-visible:ring-offset-2`,o&&`pr-1`,e),onClick:a?s:void 0,onKeyDown:a?m:void 0,role:l||(a?`button`:`status`),tabIndex:a?u??0:u,"aria-label":d||(a?`${i} button`:void 0),...f,children:[i,o&&(0,O.jsx)(`button`,{type:`button`,className:`ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full hover:bg-black/10 focus:outline-none focus:ring-1 focus:ring-offset-1`,onClick:h,"aria-label":`Remove ${i} badge`,children:(0,O.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,O.jsx)(`title`,{children:`Remove badge`}),(0,O.jsx)(`path`,{fillRule:`evenodd`,d:`M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z`,clipRule:`evenodd`})]})})]})},yI=`Dialog`,[bI,xI]=pc(yI),[SI,CI]=bI(yI),wI=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=D.useRef(null),c=D.useRef(null),[l,u]=Zc({prop:r,defaultProp:i??!1,onChange:a,caller:yI});return(0,O.jsx)(SI,{scope:t,triggerRef:s,contentRef:c,contentId:fO(),titleId:fO(),descriptionId:fO(),open:l,onOpenChange:u,onOpenToggle:D.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};wI.displayName=yI;var TI=`DialogTrigger`,EI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(TI,n),a=dc(t,i.triggerRef);return(0,O.jsx)(Cc.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":KI(i.open),...r,ref:a,onClick:cc(e.onClick,i.onOpenToggle)})});EI.displayName=TI;var DI=`DialogPortal`,[OI,kI]=bI(DI,{forceMount:void 0}),AI=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=CI(DI,t);return(0,O.jsx)(OI,{scope:t,forceMount:n,children:D.Children.map(r,e=>(0,O.jsx)(Kc,{present:n||a.open,children:(0,O.jsx)(Wc,{asChild:!0,container:i,children:e})}))})};AI.displayName=DI;var jI=`DialogOverlay`,MI=D.forwardRef((e,t)=>{let n=kI(jI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=CI(jI,e.__scopeDialog);return a.modal?(0,O.jsx)(Kc,{present:r||a.open,children:(0,O.jsx)(PI,{...i,ref:t})}):null});MI.displayName=jI;var NI=hc(`DialogOverlay.RemoveScroll`),PI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(jI,n);return(0,O.jsx)(hM,{as:NI,allowPinchZoom:!0,shards:[i.contentRef],children:(0,O.jsx)(Cc.div,{"data-state":KI(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),FI=`DialogContent`,II=D.forwardRef((e,t)=>{let n=kI(FI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=CI(FI,e.__scopeDialog);return(0,O.jsx)(Kc,{present:r||a.open,children:a.modal?(0,O.jsx)(LI,{...i,ref:t}):(0,O.jsx)(RI,{...i,ref:t})})});II.displayName=FI;var LI=D.forwardRef((e,t)=>{let n=CI(FI,e.__scopeDialog),r=D.useRef(null),i=dc(t,n.contentRef,r);return D.useEffect(()=>{let e=r.current;if(e)return oj(e)},[]),(0,O.jsx)(zI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:cc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:cc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:cc(e.onFocusOutside,e=>e.preventDefault())})}),RI=D.forwardRef((e,t)=>{let n=CI(FI,e.__scopeDialog),r=D.useRef(!1),i=D.useRef(!1);return(0,O.jsx)(zI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),zI=D.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=CI(FI,n),c=D.useRef(null),l=dc(t,c);return KD(),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(QD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,O.jsx)(Nc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":KI(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(XI,{titleId:s.titleId}),(0,O.jsx)(QI,{contentRef:c,descriptionId:s.descriptionId})]})]})}),BI=`DialogTitle`,VI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(BI,n);return(0,O.jsx)(Cc.h2,{id:i.titleId,...r,ref:t})});VI.displayName=BI;var HI=`DialogDescription`,UI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(HI,n);return(0,O.jsx)(Cc.p,{id:i.descriptionId,...r,ref:t})});UI.displayName=HI;var WI=`DialogClose`,GI=D.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=CI(WI,n);return(0,O.jsx)(Cc.button,{type:`button`,...r,ref:t,onClick:cc(e.onClick,()=>i.onOpenChange(!1))})});GI.displayName=WI;function KI(e){return e?`open`:`closed`}var qI=`DialogTitleWarning`,[JI,YI]=fc(qI,{contentName:FI,titleName:BI,docsSlug:`dialog`}),XI=({titleId:e})=>{let t=YI(qI),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
99
99
|
|
|
100
100
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
101
101
|
|
|
@@ -181,5 +181,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
181
181
|
--nojs-bg: black !important;
|
|
182
182
|
--nojs-fg: white !important;
|
|
183
183
|
}
|
|
184
|
-
}`,eG=18,tG=40,nG=`${tG}px`,rG=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),iG=e=>{let t=(0,V.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,D.useState)(!1),[c,l]=(0,D.useState)(!1),[u,d]=(0,D.useState)(!1),f=i===`none`?!1:(i===`increase-width`||i===`experimental-no-flickering`)&&o&&c,p;t[0]!==n||t[1]!==u||t[2]!==r||t[3]!==i?(p=()=>{let e=n.current,t=r.current;if(!e||!t||u||i===`none`)return;let a=e,o=a.getBoundingClientRect().left+a.offsetWidth,c=a.getBoundingClientRect().top+a.offsetHeight/2,l=o-eG,f=c;document.querySelectorAll(rG).length===0&&document.elementFromPoint(l,f)===e||(s(!0),d(!0))},t[0]=n,t[1]=u,t[2]=r,t[3]=i,t[4]=p):p=t[4];let m=p,h,g;t[5]!==n||t[6]!==i?(h=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=tG)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},g=[n,i],t[5]=n,t[6]=i,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,D.useEffect)(h,g);let _;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(_=()=>{let e=a||document.activeElement===r.current;if(i===`none`||!e)return;let t=setTimeout(m,0),n=setTimeout(m,2e3),o=setTimeout(m,5e3),s=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(t),clearTimeout(n),clearTimeout(o),clearTimeout(s)}},t[9]=r,t[10]=a,t[11]=i,t[12]=m,t[13]=_):_=t[13];let v;t[14]!==r||t[15]!==a||t[16]!==i?(v=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=v):v=t[17],(0,D.useEffect)(_,v);let y;return t[18]!==o||t[19]!==f?(y={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:nG},t[18]=o,t[19]=f,t[20]=y):y=t[20],y},aG=e=>{let t=(0,D.useRef)(void 0);return(0,D.useEffect)(()=>{t.current=e}),t.current},oG=(0,D.createContext)({}),sG=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:l,containerClassName:u,noScriptCSSFallback:d=$W,render:f,children:p,...m})=>{let[h,g]=(0,D.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),_=e??h,v=aG(_),y=e=>{t?.(e),g(e)},b=r===void 0?null:typeof r==`string`?new RegExp(r):r,x=(0,D.useRef)(null),S=(0,D.useRef)(null),C=(0,D.useRef)({value:_,onChange:y,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),w=(0,D.useRef)({prev:[x.current?.selectionStart??null,x.current?.selectionEnd??null,x.current?.selectionDirection??`none`]});(0,D.useEffect)(()=>{let e=x.current,t=S.current;if(!e||!t)return;C.current.value!==e.value&&C.current.onChange(e.value),w.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){M(null),P(null),I(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=w.current.prev,s=-1,c=-1,l=r??`none`;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&x.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;I(t!==null&&n!==null?t===n?t:u:null),M(u),P(d),w.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&A(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;QW(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),QW(e.sheet,`[data-input-otp]:autofill { ${t} }`),QW(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),QW(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),QW(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[T,E]=(0,D.useState)(!1),[k,A]=(0,D.useState)(!1),[j,M]=(0,D.useState)(null),[N,P]=(0,D.useState)(null),[F,I]=(0,D.useState)(null);(0,D.useEffect)(()=>{ZW(()=>{x.current?.dispatchEvent(new Event(`input`));let e=x.current?.selectionStart??null,t=x.current?.selectionEnd??null,n=x.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),P(t),I(e),w.current.prev=[e,t,n])})},[_,k]),(0,D.useEffect)(()=>{v!==void 0&&_!==v&&v.length<n&&_.length===n&&o?.(_)},[n,o,v,_]);let L=(0,D.useRef)(null);(0,D.useEffect)(()=>{let e=k&&F!==null?F:null;e!==L.current&&(L.current=e,s?.(e))},[k,F,s]);let ee=iG({containerRef:S,inputRef:x,pushPasswordManagerStrategy:c,isFocused:k}),te=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&b&&!b.test(t)){e.preventDefault();return}typeof v==`string`&&t.length<v.length&&document.dispatchEvent(new Event(`selectionchange`)),y(t)},ne=()=>{if(x.current){let e=Math.min(x.current.value.length,n-1),t=x.current.value.length;x.current?.setSelectionRange(e,t),M(e),P(t)}A(!0)},R=e=>{let t=x.current;if(!l&&(!C.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=x.current?.selectionStart,o=x.current?.selectionEnd,s=(a===o?_.slice(0,a??0)+i+_.slice(a??0):_.slice(0,a??0)+i+_.slice(o??0)).slice(0,n);if(!(s.length>0&&b&&!b.test(s))&&t){t.value=s,y(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),P(r)}},z={width:ee.willPushPWMBadge?`calc(100% + ${ee.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:ee.willPushPWMBadge?`inset(0 ${ee.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},B=(0,O.jsx)(`input`,{autoComplete:m.autoComplete||`one-time-code`,...m,"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:b?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:z,maxLength:n,value:_,ref:x,onPaste:e=>{R(e),m.onPaste?.(e)},onChange:te,onMouseOver:e=>{E(!0),m.onMouseOver?.(e)},onMouseLeave:e=>{E(!1),m.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=x.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&I(t)}}),m.onKeyDown?.(e)},onFocus:e=>{ne(),m.onFocus?.(e)},onBlur:e=>{A(!1),m.onBlur?.(e)}}),re={slots:Array.from({length:n}).map((e,t)=>{let n=k&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=_[t]===void 0?null:_[t];return{char:r,placeholderChar:_[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:k,isHovering:!m.disabled&&T,setSelection:e=>{let t=x.current;if(!t||m.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=_[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),P(o),A(!0)}},ie=f===void 0?(0,O.jsx)(oG.Provider,{value:re,children:p}):f(re);return(0,O.jsxs)(O.Fragment,{children:[d!==null&&(0,O.jsx)(`noscript`,{children:(0,O.jsx)(`style`,{children:d})}),(0,O.jsxs)(`div`,{ref:S,className:G(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[ie,(0,O.jsx)(`div`,{className:`absolute inset-0`,children:B})]})]})},cG=({className:e,render:t,...n})=>(0,O.jsx)(sG,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:G(`disabled:cursor-not-allowed`,e),render:t,...n}),lG=({className:e,...t})=>(0,O.jsx)(`div`,{className:G(`z-10 flex items-center gap-3`,e),...t}),uG=e=>{let t=(0,V.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,D.useContext)(oG),{char:c,isActive:l}=s?.slots[n]??{},u;t[0]===s?u=t[1]:(u=s??{},t[0]=s,t[1]=u);let{setSelection:d}=u,f;t[2]!==n||t[3]!==i||t[4]!==d?(f=e=>{d?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=d,t[5]=f):f=t[5];let p=f,m;t[6]!==n||t[7]!==a||t[8]!==d?(m=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=d,t[9]=m):m=t[9];let h=m;return(0,O.jsx)(SE,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:G(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:h,label:null,...o,children:(0,O.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},dG=e=>(0,O.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full text-text/50`,...e,children:(0,O.jsx)(Du,{})}),fG=e=>(0,O.jsx)(`div`,{"data-indicator":!0,className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/20 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),pG=e=>e?.getAttribute(`aria-selected`)===`true`,mG=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c=6,maxLength:l=6,...u})=>{let{error:d}=LW(),f=(0,D.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=OE(f,{selector:pG,isHoverable:!0});return(0,D.useEffect)(()=>{m()},[]),(0,O.jsx)(HW,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,O.jsx)(cG,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(lG,{children:[(0,O.jsx)(uG,{index:0,ref:e=>{f.current[0]=e}}),(0,O.jsx)(uG,{index:1,ref:e=>{f.current[1]=e}}),(0,O.jsx)(uG,{index:2,ref:e=>{f.current[2]=e}})]}),(0,O.jsx)(dG,{}),(0,O.jsxs)(lG,{children:[(0,O.jsx)(uG,{index:3,ref:e=>{f.current[3]=e}}),(0,O.jsx)(uG,{index:4,ref:e=>{f.current[4]=e}}),(0,O.jsx)(uG,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,O.jsx)(fG,{style:p})]})})})},hG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c,maxLength:l,...u}=e,d=c===void 0?6:c,f=l===void 0?6:l,{control:p}=$R();return(0,O.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,O.jsx)(mG,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},gG=({className:e,...t})=>(0,O.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,O.jsx)(Fu,{className:`absolute left-2 size-4`}),(0,O.jsx)(GE,{...t,type:`search`,className:G(`pl-8`,e)})]}),_G=e=>(0,O.jsx)(WW,{id:e.name,"data-testid":e.name,Element:gG,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),vG=e=>(0,O.jsx)(WW,{Element:KE,id:e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,"data-testid":e.name,...e}),yG=e=>(0,O.jsx)(WW,{Element:YE,id:e.name,"data-testid":e.name,...e}),bG=tu([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:hover:opacity-80`,`ring-offset-background`,`hover:bg-neutral-500/10`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`border-primary/30 text-primary ring-primary/20 checked:border-primary checked:bg-primary`,secondary:`border-secondary/30 text-secondary ring-secondary/20 checked:border-secondary checked:bg-secondary`,neutral:`border-neutral/30 text-neutral ring-neutral/20 checked:border-neutral checked:bg-neutral`,light:`border-white/30 text-white ring-white/20 checked:border-white checked:bg-white`,text:`border-text/30 text-text ring-text/20 checked:border-text checked:bg-text`,"text-inverse":`border-text-inverse/30 text-text-inverse ring-text-inverse/20 checked:border-text-inverse checked:bg-text-inverse`,dark:`border-neutral-800/30 text-neutral-800 ring-neutral-800/20 checked:border-neutral-800 checked:bg-neutral-800`,error:`border-error/30 text-error ring-error/20 checked:border-error checked:bg-error`,success:`border-success/30 text-success ring-success/20 checked:border-success checked:bg-success`,custom:`border-custom/30 text-custom ring-custom/20 checked:border-custom checked:bg-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`text`,validationStyleEnabled:`disabled`,size:`md`}}),xG=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,O.jsx)(`input`,{type:`checkbox`,className:G(bG({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),SG=e=>{let{label:t,name:n,id:r}=e;return t?(0,O.jsxs)(`label`,{htmlFor:r??n,className:G(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,O.jsx)(xG,{id:r??n,...e}),t]}):(0,O.jsx)(xG,{id:r??n,...e})},CG=({inputLabel:e,value:t,onChange:n,...r})=>(0,O.jsx)(SG,{...r,label:e,checked:!!t,onChange:n}),wG=({autoComplete:e,...t})=>(0,O.jsx)(WW,{Element:CG,id:t.name,"data-testid":t.name,autoComplete:e,...t}),TG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=LW();return(0,O.jsx)(HW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,O.jsx)(gR,{onValueChange:t.onChange,values:t.value,...l,children:c})})},EG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=$R();return(0,O.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,O.jsx)(TG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},DG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=LW();return(0,O.jsx)(HW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,O.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},OG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=$R();return(0,O.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,O.jsx)(DG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},kG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=LW();return(0,O.jsx)(HW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,O.jsx)(RE,{...t,...l,children:c})})},AG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=$R();return(0,O.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,O.jsx)(kG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},jG=Symbol.for(`react.lazy`),MG=D.use;function NG(e){return typeof e==`object`&&!!e&&`then`in e}function PG(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===jG&&`_payload`in e&&NG(e._payload)}function FG(e){let t=LG(e),n=D.forwardRef((e,n)=>{let{children:r,...i}=e;PG(r)&&typeof MG==`function`&&(r=MG(r._payload));let a=D.Children.toArray(r),o=a.find(zG);if(o){let e=o.props.children,r=a.map(t=>t===o?D.Children.count(e)>1?D.Children.only(null):D.isValidElement(e)?e.props.children:null:t);return(0,O.jsx)(t,{...i,ref:n,children:D.isValidElement(e)?D.cloneElement(e,void 0,r):null})}return(0,O.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var IG=FG(`Slot`);function LG(e){let t=D.forwardRef((e,t)=>{let{children:n,...r}=e;if(PG(n)&&typeof MG==`function`&&(n=MG(n._payload)),D.isValidElement(n)){let e=VG(n),i=BG(r,n.props);return n.type!==D.Fragment&&(i.ref=t?uc(t,e):e),D.cloneElement(n,i)}return D.Children.count(n)>1?D.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RG=Symbol(`radix.slottable`);function zG(e){return D.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===RG}function BG(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function VG(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var HG=e=>{let t=(0,V.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=LW(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,O.jsx)(IG,{id:r,"aria-describedby":o,"aria-invalid":s,...e}),t[0]=r,t[1]=e,t[2]=o,t[3]=s,t[4]=c):c=t[4],c},UG=e=>{let t=(0,V.c)(3),{formDescriptionId:n}=LW(),r;return t[0]!==n||t[1]!==e?(r=(0,O.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},WG=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=LW(),a=r?String(r?.message??``):t;return a?(0,O.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=jW;$.Description=UG,$.Control=HG,$.Field=IW,$.Item=NW,$.Label=VW,$.Message=WG,$.Element=WW,$.Input=qW,$.InputPassword=XW,$.Checkbox=wG,$.TextArea=vG,$.AutoSizedTextArea=yG,$.Button=SE,$.Select=OG,$.MultiSelect=EG,$.EditableFieldInput=GW,$.EditableFieldTextArea=KW,$.SwitchSelector=AG,$.OTP=hG,$.SearchInput=_G;var GG=Z(`ZodISODateTime`,(e,t)=>{lH.init(e,t),vK.init(e,t)});function KG(e){return kU(GG,e)}var qG=Z(`ZodISODate`,(e,t)=>{uH.init(e,t),vK.init(e,t)});function JG(e){return AU(qG,e)}var YG=Z(`ZodISOTime`,(e,t)=>{dH.init(e,t),vK.init(e,t)});function XG(e){return jU(YG,e)}var ZG=Z(`ZodISODuration`,(e,t)=>{fH.init(e,t),vK.init(e,t)});function QG(e){return MU(ZG,e)}var $G=Z(`ZodError`,(e,t)=>{VB.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>WB(e,t)},flatten:{value:t=>UB(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,sB,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,sB,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),eK=GB($G),tK=qB($G),nK=YB($G),rK=ZB($G),iK=$B($G),aK=eV($G),oK=tV($G),sK=nV($G),cK=rV($G),lK=iV($G),uK=aV($G),dK=oV($G),fK=new WeakMap;function pK(e,t,n){let r=Object.getPrototypeOf(e),i=fK.get(r);if(i||(i=new Set,fK.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var mK=Z(`ZodType`,(e,t)=>(YV.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:oW(e,`input`),output:oW(e,`output`)}}),e.toJSONSchema=aW(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>eK(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>nK(e,t,n),e.parseAsync=async(t,n)=>tK(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>rK(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>iK(e,t,n),e.decode=(t,n)=>aK(e,t,n),e.encodeAsync=async(t,n)=>oK(e,t,n),e.decodeAsync=async(t,n)=>sK(e,t,n),e.safeEncode=(t,n)=>cK(e,t,n),e.safeDecode=(t,n)=>lK(e,t,n),e.safeEncodeAsync=async(t,n)=>uK(e,t,n),e.safeDecodeAsync=async(t,n)=>dK(e,t,n),pK(e,`ZodType`,{check(...e){let t=this.def;return this.clone(mB(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return wB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(yq(e,t))},superRefine(e,t){return this.check(bq(e,t))},overwrite(e){return this.check(WU(e))},optional(){return tq(this)},exactOptional(){return rq(this)},nullable(){return aq(this)},nullish(){return tq(aq(this))},nonoptional(e){return dq(this,e)},array(){return UK(this)},or(e){return qK([this,e])},and(e){return YK(this,e)},transform(e){return hq(this,$K(e))},default(e){return sq(this,e)},prefault(e){return lq(this,e)},catch(e){return pq(this,e)},pipe(e){return hq(this,e)},readonly(){return _q(this)},describe(e){let t=this.clone();return aU.add(t,{description:e}),t},meta(...e){if(e.length===0)return aU.get(this);let t=this.clone();return aU.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return aU.get(e)?.description},configurable:!0}),e)),hK=Z(`_ZodString`,(e,t)=>{XV.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cW(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,pK(e,`_ZodString`,{regex(...e){return this.check(RU(...e))},includes(...e){return this.check(VU(...e))},startsWith(...e){return this.check(HU(...e))},endsWith(...e){return this.check(UU(...e))},min(...e){return this.check(IU(...e))},max(...e){return this.check(FU(...e))},length(...e){return this.check(LU(...e))},nonempty(...e){return this.check(IU(1,...e))},lowercase(e){return this.check(zU(e))},uppercase(e){return this.check(BU(e))},trim(){return this.check(KU())},normalize(...e){return this.check(GU(...e))},toLowerCase(){return this.check(qU())},toUpperCase(){return this.check(JU())},slugify(){return this.check(YU())}})}),gK=Z(`ZodString`,(e,t)=>{XV.init(e,t),hK.init(e,t),e.email=t=>e.check(sU(yK,t)),e.url=t=>e.check(pU(SK,t)),e.jwt=t=>e.check(OU(LK,t)),e.emoji=t=>e.check(mU(CK,t)),e.guid=t=>e.check(cU(bK,t)),e.uuid=t=>e.check(lU(xK,t)),e.uuidv4=t=>e.check(uU(xK,t)),e.uuidv6=t=>e.check(dU(xK,t)),e.uuidv7=t=>e.check(fU(xK,t)),e.nanoid=t=>e.check(hU(wK,t)),e.guid=t=>e.check(cU(bK,t)),e.cuid=t=>e.check(gU(TK,t)),e.cuid2=t=>e.check(_U(EK,t)),e.ulid=t=>e.check(vU(DK,t)),e.base64=t=>e.check(TU(PK,t)),e.base64url=t=>e.check(EU(FK,t)),e.xid=t=>e.check(yU(OK,t)),e.ksuid=t=>e.check(bU(kK,t)),e.ipv4=t=>e.check(xU(AK,t)),e.ipv6=t=>e.check(SU(jK,t)),e.cidrv4=t=>e.check(CU(MK,t)),e.cidrv6=t=>e.check(wU(NK,t)),e.e164=t=>e.check(DU(IK,t)),e.datetime=t=>e.check(KG(t)),e.date=t=>e.check(JG(t)),e.time=t=>e.check(XG(t)),e.duration=t=>e.check(QG(t))});function _K(e){return oU(gK,e)}var vK=Z(`ZodStringFormat`,(e,t)=>{ZV.init(e,t),hK.init(e,t)}),yK=Z(`ZodEmail`,(e,t)=>{eH.init(e,t),vK.init(e,t)}),bK=Z(`ZodGUID`,(e,t)=>{QV.init(e,t),vK.init(e,t)}),xK=Z(`ZodUUID`,(e,t)=>{$V.init(e,t),vK.init(e,t)}),SK=Z(`ZodURL`,(e,t)=>{tH.init(e,t),vK.init(e,t)}),CK=Z(`ZodEmoji`,(e,t)=>{nH.init(e,t),vK.init(e,t)}),wK=Z(`ZodNanoID`,(e,t)=>{rH.init(e,t),vK.init(e,t)}),TK=Z(`ZodCUID`,(e,t)=>{iH.init(e,t),vK.init(e,t)}),EK=Z(`ZodCUID2`,(e,t)=>{aH.init(e,t),vK.init(e,t)}),DK=Z(`ZodULID`,(e,t)=>{oH.init(e,t),vK.init(e,t)}),OK=Z(`ZodXID`,(e,t)=>{sH.init(e,t),vK.init(e,t)}),kK=Z(`ZodKSUID`,(e,t)=>{cH.init(e,t),vK.init(e,t)}),AK=Z(`ZodIPv4`,(e,t)=>{pH.init(e,t),vK.init(e,t)}),jK=Z(`ZodIPv6`,(e,t)=>{mH.init(e,t),vK.init(e,t)}),MK=Z(`ZodCIDRv4`,(e,t)=>{hH.init(e,t),vK.init(e,t)}),NK=Z(`ZodCIDRv6`,(e,t)=>{gH.init(e,t),vK.init(e,t)}),PK=Z(`ZodBase64`,(e,t)=>{vH.init(e,t),vK.init(e,t)}),FK=Z(`ZodBase64URL`,(e,t)=>{bH.init(e,t),vK.init(e,t)}),IK=Z(`ZodE164`,(e,t)=>{xH.init(e,t),vK.init(e,t)}),LK=Z(`ZodJWT`,(e,t)=>{CH.init(e,t),vK.init(e,t)}),RK=Z(`ZodUnknown`,(e,t)=>{wH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function zK(){return NU(RK)}var BK=Z(`ZodNever`,(e,t)=>{TH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lW(e,t,n,r)});function VK(e){return PU(BK,e)}var HK=Z(`ZodArray`,(e,t)=>{DH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pW(e,t,n,r),e.element=t.element,pK(e,`ZodArray`,{min(e,t){return this.check(IU(e,t))},nonempty(e){return this.check(IU(1,e))},max(e,t){return this.check(FU(e,t))},length(e,t){return this.check(LU(e,t))},unwrap(){return this.element}})});function UK(e,t){return XU(HK,e,t)}var WK=Z(`ZodObject`,(e,t)=>{MH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mW(e,t,n,r),fB(e,`shape`,()=>t.shape),pK(e,`ZodObject`,{keyof(){return ZK(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:zK()})},loose(){return this.clone({...this._zod.def,catchall:zK()})},strict(){return this.clone({...this._zod.def,catchall:VK()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return OB(this,e)},safeExtend(e){return kB(this,e)},merge(e){return AB(this,e)},pick(e){return EB(this,e)},omit(e){return DB(this,e)},partial(...e){return jB(eq,this,e[0])},required(...e){return MB(uq,this,e[0])}})});function GK(e,t){return new WK({type:`object`,shape:e??{},...Q(t)})}var KK=Z(`ZodUnion`,(e,t)=>{PH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hW(e,t,n,r),e.options=t.options});function qK(e,t){return new KK({type:`union`,options:e,...Q(t)})}var JK=Z(`ZodIntersection`,(e,t)=>{FH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gW(e,t,n,r)});function YK(e,t){return new JK({type:`intersection`,left:e,right:t})}var XK=Z(`ZodEnum`,(e,t)=>{RH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uW(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new XK({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new XK({...t,checks:[],...Q(r),entries:i})}});function ZK(e,t){return new XK({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var QK=Z(`ZodTransform`,(e,t)=>{zH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fW(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new rB(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(zB(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(zB(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function $K(e){return new QK({type:`transform`,transform:e})}var eq=Z(`ZodOptional`,(e,t)=>{VH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tq(e){return new eq({type:`optional`,innerType:e})}var nq=Z(`ZodExactOptional`,(e,t)=>{HH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rq(e){return new nq({type:`optional`,innerType:e})}var iq=Z(`ZodNullable`,(e,t)=>{UH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_W(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function aq(e){return new iq({type:`nullable`,innerType:e})}var oq=Z(`ZodDefault`,(e,t)=>{WH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sq(e,t){return new oq({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():xB(t)}})}var cq=Z(`ZodPrefault`,(e,t)=>{KH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lq(e,t){return new cq({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():xB(t)}})}var uq=Z(`ZodNonOptional`,(e,t)=>{qH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dq(e,t){return new uq({type:`nonoptional`,innerType:e,...Q(t)})}var fq=Z(`ZodCatch`,(e,t)=>{YH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pq(e,t){return new fq({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var mq=Z(`ZodPipe`,(e,t)=>{XH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SW(e,t,n,r),e.in=t.in,e.out=t.out});function hq(e,t){return new mq({type:`pipe`,in:e,out:t})}var gq=Z(`ZodReadonly`,(e,t)=>{QH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function _q(e){return new gq({type:`readonly`,innerType:e})}var vq=Z(`ZodCustom`,(e,t)=>{eU.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dW(e,t,n,r)});function yq(e,t={}){return ZU(vq,e,t)}function bq(e,t){return QU(e,t)}var xq={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"en-GB":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"fr":{"deleteButton":{"text":"Supprimer le dictionnaire","label":"Cliquez pour supprimer le dictionnaire"},"resetButton":{"text":"Réinitialiser toutes les modifications","label":"Cliquez pour réinitialiser toutes les modifications"},"saveButton":{"text":"Enregistrer les modifications","label":"Cliquez pour enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"downloadButton":{"text":"Télécharger","label":"Cliquez pour télécharger"},"confirmation":{"title":"Confirmation","message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","confirmButton":{"text":"Confirmer","label":"Cliquez pour confirmer"},"cancelButton":{"text":"Annuler","label":"Cliquez pour annuler"}}},"es":{"deleteButton":{"text":"Eliminar diccionario","label":"Haga clic para eliminar el diccionario"},"resetButton":{"text":"Restablecer todas las modificaciones","label":"Haga clic para restablecer todas las modificaciones"},"saveButton":{"text":"Guardar cambios","label":"Haga clic para guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"downloadButton":{"text":"Descargar","label":"Haga clic para descargar"},"confirmation":{"title":"Confirmación","message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","confirmButton":{"text":"Confirmar","label":"Haga clic para confirmar"},"cancelButton":{"text":"Cancelar","label":"Haga clic para cancelar"}}},"de":{"deleteButton":{"text":"Wörterbuch löschen","label":"Klicken Sie, um das Wörterbuch zu löschen"},"resetButton":{"text":"Alle Änderungen zurücksetzen","label":"Klicken Sie, um alle Änderungen zurückzusetzen"},"saveButton":{"text":"Änderungen speichern","label":"Klicken Sie, um Änderungen zu speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"downloadButton":{"text":"Herunterladen","label":"Klicken Sie, um herunterzuladen"},"confirmation":{"title":"Bestätigung","message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","confirmButton":{"text":"Bestätigen","label":"Klicken Sie, um zu bestätigen"},"cancelButton":{"text":"Abbrechen","label":"Klicken Sie, um abzubrechen"}}},"ja":{"deleteButton":{"text":"辞書を削除","label":"辞書を削除するにはクリックしてください"},"resetButton":{"text":"すべての変更をリセット","label":"すべての変更をリセットするにはクリックしてください"},"saveButton":{"text":"変更を保存","label":"変更を保存するにはクリックしてください"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"downloadButton":{"text":"ダウンロード","label":"ダウンロードするにはクリックしてください"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"resetButton":{"text":"모든 변경 사항 초기화","label":"모든 변경 사항을 초기화하려면 클릭하세요"},"saveButton":{"text":"변경 사항 저장","label":"변경 사항을 저장하려면 클릭하세요"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"downloadButton":{"text":"다운로드","label":"다운로드를 클릭하세요"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"resetButton":{"text":"重置所有更改","label":"单击以重置所有更改"},"saveButton":{"text":"保存更改","label":"单击保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"downloadButton":{"text":"下载","label":"单击下载"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"resetButton":{"text":"Reimposta tutte le modifiche","label":"Fai clic per ripristinare tutte le modifiche"},"saveButton":{"text":"Salva le modifiche","label":"Fai clic per salvare le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"downloadButton":{"text":"Scarica","label":"Fai clic per scaricare"},"confirmation":{"title":"Conferma","message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","confirmButton":{"text":"Conferma","label":"Fai clic per confermare"},"cancelButton":{"text":"Annulla","label":"Fai clic per annullare"}}},"pt":{"deleteButton":{"text":"Excluir dicionário","label":"Clique para excluir o dicionário"},"resetButton":{"text":"Redefinir todas as alterações","label":"Clique para redefinir todas as alterações"},"saveButton":{"text":"Salvar alterações","label":"Clique para salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"downloadButton":{"text":"Baixar","label":"Clique para baixar"},"confirmation":{"title":"Confirmação","message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","confirmButton":{"text":"Confirmar","label":"Clique para confirmar"},"cancelButton":{"text":"Cancelar","label":"Clique para cancelar"}}},"hi":{"deleteButton":{"text":"शब्दकोश हटाएं","label":"शब्दकोश हटाने के लिए क्लिक करें"},"resetButton":{"text":"सभी परिवर्तनों को रीसेट करें","label":"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें"},"saveButton":{"text":"परिवर्तनों को सहेजें","label":"परिवर्तनों को सहेजने के लिए क्लिक करें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"downloadButton":{"text":"डाउनलोड","label":"डाउनलोड करने के लिए क्लिक करें"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"resetButton":{"text":"إعادة تعيين جميع التغييرات","label":"انقر لإعادة تعيين جميع التغييرات"},"saveButton":{"text":"احفظ التغييرات","label":"انقر لحفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"downloadButton":{"text":"تنزيل","label":"انقر لتنزيل"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"resetButton":{"text":"Сбросить все изменения","label":"Нажмите, чтобы сбросить все изменения"},"saveButton":{"text":"Сохранить изменения","label":"Нажмите, чтобы сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"downloadButton":{"text":"Скачать","label":"Нажмите, чтобы скачать"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),localIds:[`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`]},Sq=e=>{let t=(0,V.c)(3),[n,r]=(0,D.useState)(e),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{r(e??window.document.body)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,D.useEffect)(i,a),n},Cq=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},wq=[],Tq=()=>{let e=(0,V.c)(2),t=(0,D.useSyncExternalStore)(Cq.subscribe,Cq.getSnapshot,Eq),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:Cq.addBlockage,removeBlockage:Cq.removeBlockage,isElementScrollBlocked:Cq.isElementScrollBlocked},e[0]=t,e[1]=n),n};function Eq(){return wq}var Dq=e=>{let t=(0,V.c)(14),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{disableScroll:r,element:i,key:a}=n,o=r===void 0?!1:r,s=a===void 0?`unnamed_blocker`:a,{isElementScrollBlocked:c,addBlockage:l,removeBlockage:u}=Tq(),d=Sq(i),f,p;t[2]!==l||t[3]!==o||t[4]!==i||t[5]!==s||t[6]!==u?(f=()=>{let e=i??window.document.body;return o?l(s,e):u(s,e),()=>{u(s,e)}},p=[l,o,i,s,u],t[2]=l,t[3]=o,t[4]=i,t[5]=s,t[6]=u,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,D.useEffect)(f,p);let m;t[9]!==d||t[10]!==c?(m=d?c(d):!1,t[9]=d,t[10]=c,t[11]=m):m=t[11];let h;return t[12]===m?h=t[13]:(h={isScrollBlocked:m},t[12]=m,t[13]=h),h},Oq=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,kq=`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`,Aq=({className:e,...t})=>(0,O.jsx)(`h1`,{className:G(`font-bold text-2xl`,e),...t}),jq=({className:e,...t})=>(0,O.jsx)(`h2`,{className:G(`mb-2 font-bold text-2xl`,Oq,e),...t}),Mq=({className:e,...t})=>(0,O.jsx)(`h3`,{className:G(`mb-2 font-bold text-xl`,Oq,e),...t}),Nq=({className:e,...t})=>(0,O.jsx)(`h4`,{className:G(`font-bold text-lg`,Oq,e),...t}),Pq=({className:e,...t})=>(0,O.jsx)(`h5`,{className:G(`font-bold text-base`,Oq,e),...t}),Fq=({className:e,...t})=>(0,O.jsx)(`h6`,{className:G(`ml-3 font-bold text-base`,Oq,e),...t}),Iq=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Lq=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Rq=(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},zq=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Iq(t):void 0;return(0,O.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Rq(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Lq(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:G(r&&kq,n),...i,children:t})},Bq=({isClickable:e,...t})=>(0,O.jsx)(Aq,{...t}),Vq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:jq,isClickable:e,...t}),Hq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:Mq,isClickable:e,...t}),Uq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:Nq,isClickable:e,...t}),Wq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:Pq,isClickable:e,...t}),Gq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:Fq,isClickable:e,...t}),Kq=tu(`flex cursor-default flex-col overflow-hidden shadow-sm`,{variants:{size:{sm:`h-auto max-h-[30vh] w-[95vw] max-w-xl`,md:`h-auto max-h-[50vh] w-[95vw] max-w-xl`,lg:`h-auto max-h-[70vh] w-[95vw] max-w-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),qq={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},Jq=Rx.create(_E),Yq=e=>{let t=(0,V.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:l,isScrollable:u,disableScroll:d,padding:f,...p}=e,m=o===void 0?!1:o,h=c===void 0?`md`:c,g=u===void 0?!1:u,_=d===void 0?!0:d,v=f===void 0?`none`:f,y=Sq(i),b=r&&_,x;t[0]===b?x=t[1]:(x={key:`modal`,disableScroll:b},t[0]=b,t[1]=x),Dq(x);let S,C;if(t[2]!==r||t[3]!==a?(S=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},C=[r,a],t[2]=r,t[3]=a,t[4]=S,t[5]=C):(S=t[4],C=t[5]),(0,D.useEffect)(S,C),!y){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(O.Fragment,{}),t[6]=e):e=t[6],e}let w=!!s,T=qq[v||`none`],E;return t[7]===a?E=t[8]:(E=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=E),(0,Sc.createPortal)((0,O.jsx)(Rx.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:r?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:E,"aria-hidden":!r,children:(0,O.jsxs)(Jq,{onClick:Xq,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:Kq({size:h,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,O.jsxs)(`div`,{className:G(`relative flex-none px-4 pt-4`,m&&w?`flex items-start`:m?`flex justify-end`:w?`items-center`:`hidden`),children:[w&&(0,O.jsx)(Hq,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Ru,size:`icon-md`})]}),(0,O.jsx)(`div`,{className:G(`flex min-h-0 w-full flex-1 flex-col`,g===!0&&`overflow-auto`,g===`y`&&`overflow-y-auto overflow-x-hidden`,g===`x`&&`overflow-x-auto overflow-y-hidden`,!g&&`overflow-visible`),children:(0,O.jsx)(`div`,{className:G(`flex h-full w-full flex-1 flex-col`,T),children:n})})]})}),y)};function Xq(e){return e.stopPropagation()}var Zq=e=>{let t=(0,V.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,D.useState)(!1),{setLocaleDictionary:u}=fC(),{mutate:d,isPending:f}=uE(),{mutate:p,isPending:m}=fE(),{mutate:h,isPending:g}=lE(),_=m||g,{editedContent:v,restoreEditedContent:y}=bC(),{deleteButton:b,resetButton:x,saveButton:S,publishButton:C,downloadButton:w,confirmation:T}=_t(xq),{isAuthenticated:E}=XT(),k=v?.[n.localId],A;t[0]!==n||t[1]!==k?(A=k&&JSON.stringify(k)!==JSON.stringify(n),t[0]=n,t[1]=k,t[2]=A):A=t[2];let j=A,M=n?.id!==void 0,N;t[3]!==n||t[4]!==v||t[5]!==o||t[6]!==y||t[7]!==u||t[8]!==p?(N=async()=>{v?.[n.localId]&&p({dictionary:{...n,...v?.[n.localId]}},{onSuccess:()=>{u(v?.[n.localId]),y(n.localId),l(!1),o?.()}})},t[3]=n,t[4]=v,t[5]=o,t[6]=y,t[7]=u,t[8]=p,t[9]=N):N=t[9];let P=N,F;t[10]!==n||t[11]!==v||t[12]!==o||t[13]!==h||t[14]!==y||t[15]!==u?(F=()=>{let e={...n,...v?.[n.localId]};h({dictionaries:[e]},{onSuccess:t=>{t&&(u(e),y(n.localId),o?.())}})},t[10]=n,t[11]=v,t[12]=o,t[13]=h,t[14]=y,t[15]=u,t[16]=F):F=t[16];let I=F,L;t[17]!==d||t[18]!==n||t[19]!==a?(L=()=>{n.id&&d({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=d,t[18]=n,t[19]=a,t[20]=L):L=t[20];let ee=L,te;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>l(!1),t[21]=te):te=t[21];let ne;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ne=()=>l(!1),t[22]=ne):ne=t[22],(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Yq,{isOpen:c,title:T.title.value,size:`md`,onClose:te,padding:`md`,children:(0,O.jsxs)(`form`,{className:`size-full`,children:[(0,O.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:T.message}),(0,O.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,O.jsx)($.Button,{label:T.cancelButton.label.value,disabled:!j||_,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:ne,children:T.cancelButton.text}),(0,O.jsx)($.Button,{label:T.confirmButton.label.value,disabled:!j||_,Icon:Pu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:P,children:T.confirmButton.text})]})]})}),(0,O.jsxs)(`form`,{className:G(`flex justify-end gap-2`,i),...s,children:[r.includes(`remote`)&&M&&a&&E&&(0,O.jsx)($.Button,{label:b.label.value,Icon:Iu,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ee,children:b.text}),j&&(0,O.jsx)($.Button,{label:x.label.value,disabled:!j,Icon:Nu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>y(n.localId),children:x.text}),r.includes(`local`)&&(0,O.jsx)($.Button,{label:w.label.value,disabled:!j||_,Icon:Su,color:`text`,variant:E?`outline`:`default`,className:`max-md:w-full`,isLoading:m,onClick:()=>l(!0),children:w.text}),r.includes(`remote`)&&E&&!M&&(0,O.jsx)($.Button,{label:C.label.value,disabled:_,Icon:pu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:C.text}),r.includes(`remote`)&&E&&M&&j&&(0,O.jsx)($.Button,{label:S.label.value,disabled:!j||_,Icon:Pu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:S.text})]})]})},Qq={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`}},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`}},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`}},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`}},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`}},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`}},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`}},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`}},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`}},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`}},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`}}}},localIds:[`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`]},$q=(e,t=2e3,n,r)=>{let[i,a]=(0,D.useState)(!1);return{isCopied:i,copy:async()=>{if(e)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{r?.(Error(`Clipboard API not supported in this browser`));return}a(!0),setTimeout(()=>a(!1),t),n?.()}catch(e){let t=e instanceof Error?e.message:`Failed to copy to clipboard`;r?.(e instanceof Error?e:Error(t))}}}},eJ=e=>{let t=(0,V.c)(14),{text:n,children:r,className:i,"aria-label":a,"aria-copied-label":o,feedbackDuration:s,onCopySuccess:c,onCopyError:l,disable:u,preventDefault:d,stopPropagation:f,size:p}=e,m=a===void 0?`Copy to clipboard`:a,h=o===void 0?`Copied to clipboard`:o,g=s===void 0?2e3:s,_=d===void 0?!0:d,v=f===void 0?!0:f,y=p===void 0?14:p,{isCopied:b,copy:x}=$q(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,O.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let S;if(t[3]!==h||t[4]!==m||t[5]!==r||t[6]!==i||t[7]!==x||t[8]!==b||t[9]!==_||t[10]!==y||t[11]!==v||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{_&&e.preventDefault(),v&&e.stopPropagation(),x()},o=b?h:m,s=b?bu:xu;S=(0,O.jsxs)(`span`,{className:G(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":b,"data-testid":`copy-to-clipboard`,children:[(0,O.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,O.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:y,"aria-hidden":`true`})]}),t[3]=h,t[4]=m,t[5]=r,t[6]=i,t[7]=x,t[8]=b,t[9]=_,t[10]=y,t[11]=v,t[12]=n,t[13]=S}else S=t[13];return S},tJ=tu(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,error:`border-error bg-error text-error`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`}},defaultVariants:{color:`primary`}}),nJ=tu(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary/10 aria-selected:text-text`,secondary:`bg-secondary/10 aria-selected:text-text`,error:`bg-error/10 aria-selected:text-text`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-text-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),rJ=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,D.useRef)([]),c=(0,D.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=OE(s,{isHoverable:i,orientation:a});return(0,D.useEffect)(()=>{u()},[t]),(0,O.jsxs)(`div`,{className:G(tJ({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,D.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),l&&(0,O.jsx)(`div`,{className:G(nJ({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},iJ={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"en-GB":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"fr":{"titleInput":{"label":"Titre","description":"Le titre de votre dictionnaire permet de l'identifier facilement","placeholder":"Entrez le titre de votre dictionnaire"},"keyInput":{"label":"Clé","description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","placeholder":"Entrez la clé de votre dictionnaire"},"descriptionInput":{"label":"Description","placeholder":"Entrez la description de votre dictionnaire","description":"La description de votre dictionnaire permet de l'identifier facilement en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire."},"projectInput":{"label":"Projets","description":"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"tagsSelect":{"label":"Tags","description":"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"importModeSelect":{"label":"Mode d'importation","description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","static":"Statique","dynamic":"Dynamique","live":"Fetch"},"filePathInput":{"label":"Chemin du fichier","description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"auditButton":{"label":"Auditer"}},"es":{"titleInput":{"label":"Título","description":"El título de su diccionario le permite identificar fácilmente","placeholder":"Ingrese le título de su diccionario"},"keyInput":{"label":"Clave","description":"La clave de su diccionario se utiliza para identificarla en la aplicación","placeholder":"Ingrese la clave de su diccionario"},"descriptionInput":{"label":"Descripción","placeholder":"Ingrese la descripción de su diccionario","description":"La descripción de su diccionario le permite identificar fácilmente el contenido utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario."},"projectInput":{"label":"Proyectos","description":"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"tagsSelect":{"label":"Etiquetas","description":"Un diccionario puede estar asociado con una o más etiquetas. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione los tags para asociar con su diccionario"},"locationSelect":{"label":"Ubicación","local":"Local","remote":"Distante","testDescription":"La ubicación determina si su dictionnaire se almacena localmente, de forma remota o ambos."},"importModeSelect":{"label":"Modo de importación","description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","static":"Estático","dynamic":"Dinámico","live":"Fetch"},"filePathInput":{"label":"Ruta del archivo","description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","placeholder":"Ingrese la ruta del archivo de su diccionario"},"auditButton":{"label":"Auditar"}},"de":{"titleInput":{"label":"Titel","description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"keyInput":{"label":"Schlüssel","description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"descriptionInput":{"label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein","description":"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen."},"projectInput":{"label":"Projekte","description":"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"tagsSelect":{"label":"Tags","description":"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"importModeSelect":{"label":"Importmodus","description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","static":"Statisch","dynamic":"Dynamisch","live":"Fetch"},"filePathInput":{"label":"Dateipfad","description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"auditButton":{"label":"Prüfen"}},"ja":{"titleInput":{"label":"タイトル","description":"辞書のタイトルは、それを簡単に識別することができます","placeholder":"辞書のタイトルを入力してください"},"keyInput":{"label":"キー","description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","placeholder":"辞書のキーを入力してください"},"descriptionInput":{"label":"説明","placeholder":"辞書の説明を入力してください","description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。"},"projectInput":{"label":"プロジェクト","description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"tagsSelect":{"label":"タグ","description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるタグを選択してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"importModeSelect":{"label":"インポートモード","description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","static":"静的","dynamic":"動的","live":"Fetch"},"filePathInput":{"label":"ファイルパス","description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","placeholder":"辞書のファイルパスを入力してください"},"auditButton":{"label":"監査"}},"ko":{"titleInput":{"label":"제목","description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","placeholder":"사전의 제목을 입력하세요"},"keyInput":{"label":"키","description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","placeholder":"사전의 키를 입력하세요"},"descriptionInput":{"label":"설명","placeholder":"사전의 설명을 입력하세요","description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다."},"projectInput":{"label":"프로젝트","description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"tagsSelect":{"label":"태그","description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 태그를 선택하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"importModeSelect":{"label":"가져오기 모드","description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","static":"정적","dynamic":"동적","live":"Fetch"},"filePathInput":{"label":"파일 경로","description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","placeholder":"사전의 파일 경로를 입력하세요"},"auditButton":{"label":"감사"}},"zh":{"titleInput":{"label":"标题","description":"字典的标题使您能够轻松识别它","placeholder":"输入字典的标题"},"keyInput":{"label":"键","description":"字典的键用于在应用程序中识别它","placeholder":"输入字典的键"},"descriptionInput":{"label":"描述","placeholder":"输入字典的描述","description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。"},"projectInput":{"label":"项目","description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择一个或多个项目以与您的字典关联"},"tagsSelect":{"label":"标签","description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择与您的字典相关的标签"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"importModeSelect":{"label":"导入模式","description":"导入模式决定了您的词典如何导入到您的应用程序中。","static":"静态","dynamic":"动态","live":"Fetch"},"filePathInput":{"label":"文件路径","description":"字典的文件路径使您能够在项目中识别它。","placeholder":"输入字典的文件路径"},"auditButton":{"label":"审核"}},"it":{"titleInput":{"label":"Titolo","description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","placeholder":"Inserisci il titolo del tuo dizionario"},"keyInput":{"label":"Chiave","description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","placeholder":"Inserisci la chiave del tuo dizionario"},"descriptionInput":{"label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario","description":"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario."},"projectInput":{"label":"Progetti","description":"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"tagsSelect":{"label":"Tag","description":"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona i tag da associare al tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"importModeSelect":{"label":"Modalità di importazione","description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","static":"Statico","dynamic":"Dinamico","live":"Fetch"},"filePathInput":{"label":"Percorso del file","description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","placeholder":"Inserisci il percorso del file del tuo dizionario"},"auditButton":{"label":"Controllare"}},"pt":{"titleInput":{"label":"Título","description":"O titolo do seu dicionário permite que você o identifique facilmente","placeholder":"Insira o título do seu dicionário"},"keyInput":{"label":"Chave","description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","placeholder":"Insira a chave do seu dicionário"},"descriptionInput":{"label":"Descrição","placeholder":"Insira a descrição do seu dicionário","description":"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário."},"projectInput":{"label":"Projetos","description":"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em differentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"tagsSelect":{"label":"Tags","description":"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione os tags para associar ao seu dicionário"},"locationSelect":{"label":"Localização","local":"Local","remote":"Remoto","testDescription":"A localização determina se o seu dicionário è armazenado localmente, remotamente ou ambos."},"importModeSelect":{"label":"Modo de importação","description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","static":"Estático","dynamic":"Dinâmico","live":"Fetch"},"filePathInput":{"label":"Caminho do arquivo","description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","placeholder":"Insira o caminho do arquivo do seu dicionário"},"auditButton":{"label":"Auditar"}},"hi":{"titleInput":{"label":"शीर्षक","description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"keyInput":{"label":"कुंजी","description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"descriptionInput":{"label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें","description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।"},"projectInput":{"label":"परियोजनाएँ","description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"tagsSelect":{"label":"टैग","description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"importModeSelect":{"label":"आयात मोड","description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","static":"स्थैतिक","dynamic":"गतिशील","live":"Fetch"},"filePathInput":{"label":"फ़ाइल पथ","description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"auditButton":{"label":"ऑडिट"}},"ar":{"titleInput":{"label":"العنوان","description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","placeholder":"أدخل عنوان القاموس الخاص بك"},"keyInput":{"label":"مفتاح","description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","placeholder":"أدخل مفتاح القاموس الخاص بك"},"descriptionInput":{"label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك","description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك."},"projectInput":{"label":"المشاريع","description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"tagsSelect":{"label":"الوسوم","description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"importModeSelect":{"label":"وضع الاستيراد","description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","static":"ثابت","dynamic":"ديناميكي","live":"Fetch"},"filePathInput":{"label":"مسار الملف","description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"auditButton":{"label":"التدقيق"}},"ru":{"titleInput":{"label":"Заголовок","description":"Название вашего словаря позволяет легко его идентифицировать","placeholder":"Введите название вашего словаря"},"keyInput":{"label":"Ключ","description":"Ключ вашего словаря используется для его идентификации в приложении","placeholder":"Введите ключ вашего словаря"},"descriptionInput":{"label":"Описание","placeholder":"Введите описание вашего словаря","description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."},"projectInput":{"label":"Проекты","description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"tagsSelect":{"label":"Теги","description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","placeholder":"Выберите теги, которые нужно связать с словарем"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"importModeSelect":{"label":"Режим импорта","description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","static":"Статический","dynamic":"Динамический","live":"Fetch"},"filePathInput":{"label":"Путь к файлу","description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","placeholder":"Введите путь к файлу вашего словаря"},"auditButton":{"label":"Отслеживание"}}}}`),localIds:[`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`]},aJ={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"en-GB":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"fr":{"titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire.","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keyInvalidTypeError":"La clé doit être une chaîne valide.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","descriptionInvalidTypeError":"La description doit être une chaîne valide.","requiredErrorProjectId":"Veuillez sélectionner un projet","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","locationRequiredError":"Veuillez sélectionner un emplacement","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide"},"es":{"titleRequiredError":"Por favor, ingrese un nombre para su diccionario.","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keyInvalidTypeError":"La clave debe ser una cadena válida.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","requiredErrorProjectId":"Por favor, seleccione un proyecto","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","locationRequiredError":"Por favor, seleccione una ubicación","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida"},"de":{"titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein.","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","locationRequiredError":"Bitte wählen Sie einen Standort aus","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein"},"ja":{"titleRequiredError":"辞書の名前を入力してください。","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","keyMinLengthError":"キーは4文字以上でなければなりません。","descriptionRequiredError":"辞書の説明を入力してください。","descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","requiredErrorProjectId":"プロジェクトを選択してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","locationRequiredError":"場所を選択してください","locationInvalidTypeError":"有効な場所を選択してください","filePathRequiredError":"ファイルパスを入力してください","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります"},"ko":{"titleRequiredError":"사전 이름을 입력하세요.","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","requiredErrorProjectId":"프로젝트를 선택하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","locationRequiredError":"위치를 선택하세요","locationInvalidTypeError":"유효한 위치를 선택하세요","filePathRequiredError":"파일 경로를 입력하세요","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다"},"zh":{"titleRequiredError":"请输入您词典的名称。","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","keyRequiredError":"请输入您词典的键。","keyInvalidTypeError":"关键字必须是有效的字符串。","keySpaceError":"关键字不能包含空格或特殊字符。","keyMinLengthError":"键必须至少为4个字符。","descriptionRequiredError":"请输入您词典的描述。","descriptionInvalidTypeError":"描述必须是有效的字符串。","requiredErrorProjectId":"请选择一个项目","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","locationRequiredError":"请选择一个位置","locationInvalidTypeError":"请选择有效的位置","filePathRequiredError":"请输入文件路径","filePathInvalidTypeError":"文件路径必须是有效的字符串"},"it":{"titleRequiredError":"Si prega di inserire un nome per il proprio dizionario.","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","requiredErrorProjectId":"Si prega di selezionare un progetto","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","locationRequiredError":"Si prega di selezionare una posizione","locationInvalidTypeError":"Si prega di selezionare una posizione valida","filePathRequiredError":"Si prega di inserire un percorso del file","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida"},"pt":{"titleRequiredError":"Por favor, insira um nome para o seu dicionário.","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keyInvalidTypeError":"A chave deve ser uma string válida.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","descriptionInvalidTypeError":"A descrição deve ser uma string válida.","requiredErrorProjectId":"Por favor, selecione um projeto","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","locationRequiredError":"Por favor, selecione um local","locationInvalidTypeError":"Por favor, selecione um local válido","filePathRequiredError":"Por favor, insira um caminho de arquivo","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida"},"hi":{"titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","locationRequiredError":"कृपया एक स्थान चुनें","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए"},"ar":{"titleRequiredError":"يرجى إدخال اسم لقاموسك.","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","requiredErrorProjectId":"يرجى اختيار مشروع","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","locationRequiredError":"يرجى اختيار موقع","locationInvalidTypeError":"يرجى اختيار موقع صالح","filePathRequiredError":"يرجى إدخال مسار الملف","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة"},"ru":{"titleRequiredError":"Пожалуйста, введите название вашего словаря.","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","descriptionInvalidTypeError":"Описание должно быть правильной строкой.","requiredErrorProjectId":"Пожалуйста, выберите проект","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","locationRequiredError":"Пожалуйста, выберите местоположение","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","filePathRequiredError":"Пожалуйста, введите путь к файлу","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой"}}}`),localIds:[`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`]},oJ=e=>{let t=(0,V.c)(38),{titleRequiredError:n,titleInvalidTypeError:r,titleMinLengthError:i,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:s,keyMinLengthError:c,descriptionRequiredError:l,descriptionInvalidTypeError:u,requiredErrorProjectId:d,invalidTypeErrorProjectId:f,invalidTypeErrorTags:p,locationRequiredError:m,locationInvalidTypeError:h,filePathRequiredError:g,filePathInvalidTypeError:_}=_t(aJ),v;if(t[0]!==u||t[1]!==l||t[2]!==_||t[3]!==g||t[4]!==f||t[5]!==p||t[6]!==o||t[7]!==c.value||t[8]!==a||t[9]!==s.value||t[10]!==h||t[11]!==m||t[12]!==e||t[13]!==d||t[14]!==r||t[15]!==i.value||t[16]!==n){let y;t[18]!==r||t[19]!==n?(y=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=y):y=t[20];let b;t[21]!==o||t[22]!==a?(b=e=>e.input===void 0?a.value:o.value,t[21]=o,t[22]=a,t[23]=b):b=t[23];let x;t[24]!==u||t[25]!==l?(x=e=>e.input===void 0?l.value:u.value,t[24]=u,t[25]=l,t[26]=x):x=t[26];let S;t[27]!==f||t[28]!==d?(S=e=>e.input===void 0?d.value:f.value,t[27]=f,t[28]=d,t[29]=S):S=t[29];let C;t[30]===p?C=t[31]:(C=()=>p.value,t[30]=p,t[31]=C);let w;t[32]!==h||t[33]!==m?(w=e=>e.input===void 0?m.value:h.value,t[32]=h,t[33]=m,t[34]=w):w=t[34];let T;t[35]!==_||t[36]!==g?(T=e=>e.input===void 0?g.value:_.value,t[35]=_,t[36]=g,t[37]=T):T=t[37],v=GK({title:_K({error:y}).refine(sJ,{error:i.value}).optional(),key:_K({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:_K({error:x}).optional(),projectIds:UK(_K({error:S})).default([e]),tags:UK(_K({error:C})).default([]),location:ZK([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:ZK([`static`,`dynamic`,`fetch`]).optional(),filePath:_K({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=_,t[3]=g,t[4]=f,t[5]=p,t[6]=o,t[7]=c.value,t[8]=a,t[9]=s.value,t[10]=h,t[11]=m,t[12]=e,t[13]=d,t[14]=r,t[15]=i.value,t[16]=n,t[17]=v}else v=t[17];return v};function sJ(e){return e.length===0||e.length>=4}var cJ=e=>{let t=(0,V.c)(62),{dictionary:n,mode:r}=e,{session:i}=YT(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=pE(),{data:l}=mE(),u=s?.data??[],d=l?.data??[],f=oJ(String(o?.id)),p=n.location??`remote`,m;t[2]!==n||t[3]!==p?(m={defaultValues:{...n,location:p}},t[2]=n,t[3]=p,t[4]=m):m=t[4];let{form:h,isSubmitting:g}=MW(f,m),{editedContent:_,setEditedDictionary:v}=bC(),{titleInput:y,keyInput:b,descriptionInput:x,projectInput:S,tagsSelect:C,locationSelect:w,importModeSelect:T,filePathInput:E,auditButton:k}=_t(iJ),{mutate:A,isPending:j}=iE(),M=_?.[n.localId],N;t[5]!==n||t[6]!==h?(N=()=>{h.reset({...n,tags:n.tags??[],location:n.location??`remote`})},t[5]=n,t[6]=h,t[7]=N):N=t[7];let P=h?.reset,F;t[8]!==n||t[9]!==P?(F=[n,P],t[8]=n,t[9]=P,t[10]=F):F=t[10],(0,D.useEffect)(N,F);let I;t[11]!==n||t[12]!==h||t[13]!==M?(I=()=>{M===void 0&&h.reset({...n,tags:n.tags??[],location:n.location??`remote`})},t[11]=n,t[12]=h,t[13]=M,t[14]=I):I=t[14];let L;t[15]===M?L=t[16]:(L=[M],t[15]=M,t[16]=L),(0,D.useEffect)(I,L);let ee;t[17]!==A||t[18]!==n||t[19]!==h||t[20]!==v||t[21]!==M?(ee=()=>{let e={...n,...M};A({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(!t?.data)return;let n=t.data.fileContent,r={...e,...n,tags:n.tags??e.tags??[]};v(r),h.reset(r)}})},t[17]=A,t[18]=n,t[19]=h,t[20]=v,t[21]=M,t[22]=ee):ee=t[22];let te=ee,ne;t[23]===h.control?ne=t[24]:(ne={control:h.control,name:`location`},t[23]=h.control,t[24]=ne);let R=YR(ne),z=R===`local`||R===`hybrid`,B;t[25]!==n||t[26]!==h||t[27]!==v||t[28]!==M?(B=e=>{h.setValue(`key`,e,{shouldDirty:!0}),v({...n,...M??{},key:e})},t[25]=n,t[26]=h,t[27]=v,t[28]=M,t[29]=B):B=t[29];let re;t[30]!==n||t[31]!==h||t[32]!==v||t[33]!==M?(re=e=>{h.setValue(`title`,e,{shouldDirty:!0}),v({...n,...M??{},title:e})},t[30]=n,t[31]=h,t[32]=v,t[33]=M,t[34]=re):re=t[34];let ie;t[35]!==n||t[36]!==h||t[37]!==v||t[38]!==M?(ie=e=>{h.setValue(`description`,e,{shouldDirty:!0}),v({...n,...M??{},description:e})},t[35]=n,t[36]=h,t[37]=v,t[38]=M,t[39]=ie):ie=t[39];let ae;t[40]!==n||t[41]!==h||t[42]!==w||t[43]!==r||t[44]!==v||t[45]!==M?(ae=e=>{let{field:t}=e,i=t.value,a=i===`local`||i===`hybrid`,o=i===`remote`||i===`hybrid`,s=e=>{if(!e&&!o)return;let r=e?o?`hybrid`:`local`:`remote`;t.onChange(r);let i=e?h.getValues(`filePath`)??n.filePath:void 0;e||h.setValue(`filePath`,void 0),v({...n,...M??{},location:r,filePath:i})},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),v({...n,...M??{},location:r})};return(0,O.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,O.jsx)($.Label,{className:`ml-1`,children:w.label}),(0,O.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,O.jsx)(SG,{id:`location-local`,name:`location-local`,label:w.local.value,color:`text`,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,O.jsx)(SG,{id:`location-remote`,name:`location-remote`,label:w.remote.value,color:`text`,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,O.jsx)($.Description,{children:w.testDescription}),(0,O.jsx)($.Message,{})]})},t[40]=n,t[41]=h,t[42]=w,t[43]=r,t[44]=v,t[45]=M,t[46]=ae):ae=t[46];let oe;t[47]!==n||t[48]!==h||t[49]!==v||t[50]!==M?(oe=e=>{h.setValue(`importMode`,e,{shouldDirty:!0}),v({...n,...M??{},importMode:e})},t[47]=n,t[48]=h,t[49]=v,t[50]=M,t[51]=oe):oe=t[51];let se;t[52]!==n||t[53]!==h||t[54]!==v||t[55]!==M?(se=e=>{let t=[e].flat();h.setValue(`projectIds`,t,{shouldDirty:!0}),v({...n,...M??{},projectIds:t})},t[52]=n,t[53]=h,t[54]=v,t[55]=M,t[56]=se):se=t[56];let ce;return t[57]!==n||t[58]!==h||t[59]!==v||t[60]!==M?(ce=e=>{let t=[e].flat();h.setValue(`tags`,t,{shouldDirty:!0}),v({...n,...M??{},tags:t})},t[57]=n,t[58]=h,t[59]=v,t[60]=M,t[61]=ce):ce=t[61],(0,O.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,O.jsx)($.EditableFieldInput,{name:`key`,label:b.label,placeholder:b.label.value,description:b.description,disabled:g,isRequired:!0,onSave:B}),(0,O.jsx)($.EditableFieldInput,{name:`title`,label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:g,onSave:re})]}),(0,O.jsx)($.EditableFieldTextArea,{name:`description`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ie}),(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,O.jsx)($.Field,{control:h.control,name:`location`,render:ae}),(0,O.jsx)(By,{mode:`wait`,children:z&&(0,O.jsx)(Rx.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,O.jsx)($.Input,{name:`filePath`,label:E.label.value,placeholder:E.placeholder.value,description:E.description.value,disabled:g||!z,onChange:e=>{let t=e.target.value;v({...n,...M??{},filePath:t})}})},`filePath-input`)})]}),(0,O.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,O.jsxs)($.Select,{name:`importMode`,label:T.label.value,description:T.description.value,onValueChange:oe,children:[(0,O.jsx)(J.Trigger,{children:(0,O.jsx)(J.Value,{placeholder:T.label.value})}),(0,O.jsxs)(J.Content,{children:[(0,O.jsx)(J.Item,{value:`static`,children:T.static.value}),(0,O.jsx)(J.Item,{value:`dynamic`,children:T.dynamic.value}),(0,O.jsx)(J.Item,{value:`live`,children:T.live.value})]})]})}),(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,O.jsxs)($.MultiSelect,{name:`projectIds`,label:S.label.value,description:S.description,onValueChange:se,children:[(0,O.jsx)(gR.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,O.jsx)(gR.Input,{placeholder:S.placeholder.value})}),(0,O.jsx)(gR.Content,{children:(0,O.jsx)(yE,{isLoading:c,children:(0,O.jsx)(gR.List,{children:u?.map(lJ)})})})]}),(0,O.jsxs)($.MultiSelect,{name:`tags`,label:C.label.value,description:C.description,onValueChange:ce,children:[(0,O.jsx)(gR.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,O.jsx)(gR.Input,{placeholder:C.placeholder.value})}),(0,O.jsx)(gR.Content,{children:(0,O.jsx)(yE,{isLoading:c,children:(0,O.jsx)(gR.List,{children:d?.map(uJ)})})})]})]}),(0,O.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,O.jsx)($.Button,{type:`button`,size:`icon-md`,label:k.label.value,Icon:Lu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||j,isLoading:j})})]})};function lJ(e){return(0,O.jsx)(gR.Item,{value:String(e.id),children:e.name},String(e.id))}function uJ(e){return(0,O.jsx)(gR.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var dJ={key:`copy-button`,content:{nodeType:`translation`,translation:{en:{label:`Copy content`},"en-GB":{label:`Copy content`},fr:{label:`Copier le contenu`},es:{label:`Copiar contenido`},de:{label:`Inhalt kopieren`},ja:{label:`コンテンツをコピー`},ko:{label:`콘텐츠 복사`},zh:{label:`复制内容`},it:{label:`Copia contenuto`},pt:{label:`Copiar conteúdo`},hi:{label:`सामग्री कॉपी करें`},ar:{label:`نسخ المحتوى`},ru:{label:`Копировать содержимое`}}},localIds:[`copy-button::local::../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`]},fJ=e=>{let t=(0,V.c)(6),{content:n,...r}=e,[i,a]=(0,D.useState)(!1),[o,s]=(0,D.useState)(!1),{label:c}=_t(dJ),l;t[0]===n?l=t[1]:(l=async()=>{try{s(!1),await navigator.clipboard.writeText(n),a(!0)}catch(e){console.error(`Failed to copy text: `,e),s(!0)}},t[0]=n,t[1]=l);let u=l,d,f;t[2]!==i||t[3]!==o?(d=()=>{if(i||o){let e=setTimeout(()=>{a(!1),s(!1)},1e3);return()=>clearTimeout(e)}},f=[i,o],t[2]=i,t[3]=o,t[4]=d,t[5]=f):(d=t[4],f=t[5]),(0,D.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,O.jsx)(SE,{Icon:i?bu:xu,onClick:u,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:p(),...r,label:p(),"aria-describedby":i?`copy-success`:o?`copy-error`:void 0})},pJ=(0,D.lazy)(()=>Fe(()=>import(`./dist-C7G_-OEc.js`).then(e=>({default:e.Editor})),[])),mJ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,D.useRef)(null),c=(0,D.useRef)(null),[l,u]=(0,D.useState)({height:0,width:0}),d=n?`vs-dark-transparent`:`hc-light-theme`,f=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(d),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),u({height:n,width:s.current?.clientWidth??0})},p=r??(typeof e==`string`?e.split(`
|
|
185
|
-
`).length>1:!1);return(0,O.jsxs)(`div`,{className:G(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,O.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,O.jsx)(`div`,{className:G(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,O.jsx)(fJ,{content:e})})}),(0,O.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(yE,{}),children:(0,O.jsx)(pJ,{...l,defaultLanguage:`typescript`,language:t,loading:(0,O.jsx)(yE,{}),defaultValue:String(e).replace(/\n$/,``),onMount:f,onChange:o,options:{contextmenu:!1,readOnly:a,cursorStyle:`line`,minimap:{enabled:!1},scrollbar:{vertical:`hidden`,verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:`off`,quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:p?`on`:`off`},theme:d,className:`my-2 rounded-md`})})})]})},hJ=e=>{let t=(0,V.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=bC(),o=gJ,s=a?.[n.localId]?.content??n?.content,c;t[0]!==n||t[1]!==i?(c=e=>{o(e??`{}`)&&i(n.localId,JSON.parse(e??`{}`))},t[0]=n,t[1]=i,t[2]=c):c=t[2];let l;return t[3]!==s||t[4]!==r||t[5]!==c?(l=(0,O.jsx)(mJ,{language:`json`,onChange:c,isDarkMode:r,children:JSON.stringify(s,null,2)}),t[3]=s,t[4]=r,t[5]=c,t[6]=l):l=t[6],l};function gJ(e){try{return JSON.parse(e),!0}catch{return!1}}var _J={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},"en-GB":{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},fr:{titleInput:{placeholder:`Entrez la clé de votre nœud`},deleteButton:{label:`Supprimer le nœud de la section`},addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`}},es:{titleInput:{placeholder:`Ingrese la clave de su nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`}},de:{titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`}},ja:{titleInput:{placeholder:`ノードのキーを入力してください`},deleteButton:{label:`セクションからノードを削除`},addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`}},ko:{titleInput:{placeholder:`노드의 키를 입력하세요`},deleteButton:{label:`섹션에서 노드를 제거`},addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`}},zh:{titleInput:{placeholder:`输入您节点的键`},deleteButton:{label:`从部分中移除节点`},addNodeButton:{label:`点击添加新节点`,text:`添加新节点`}},it:{titleInput:{placeholder:`Inserisci la chiave del tuo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`}},pt:{titleInput:{placeholder:`Insira a chave do seu nó`},deleteButton:{label:`Remover nó da seção`},addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`}},hi:{titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`}},ar:{titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`},deleteButton:{label:`إزالة العقدة من القسم`},addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`}},ru:{titleInput:{placeholder:`Введите ключ вашего узла`},deleteButton:{label:`Удалить узел из секции`},addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`}}}},localIds:[`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`]},vJ={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,plural:`Pluriel`,gender:`Genre`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,plural:`Plural`,gender:`Género`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Geschlecht`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,plural:`複数形`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,plural:`복수`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,plural:`复数`,gender:`性别`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,plural:`Plurale`,gender:`Genere`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,plural:`Plural`,gender:`Gênero`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,plural:`बहुवचन`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,plural:`جمع`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,plural:`Множественное число`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},yJ=e=>{let t=(0,V.c)(23),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,plural:d,triggerPlaceHolder:f,nest:p,gender:m,condition:h,markdown:g,insertion:_,reactNode:v,file:y}=_t(vJ),b;t[0]===n?b=t[1]:(b=JS(n),t[0]=n,t[1]=b);let[x,S]=(0,D.useState)(b),C;t[2]===r?C=t[3]:(C=e=>{S(e),r(e)},t[2]=r,t[3]=C);let w=C,T;return t[4]!==l||t[5]!==s||t[6]!==h||t[7]!==u||t[8]!==y||t[9]!==m||t[10]!==_||t[11]!==x||t[12]!==g||t[13]!==i||t[14]!==p||t[15]!==c||t[16]!==o||t[17]!==w||t[18]!==d||t[19]!==v||t[20]!==a||t[21]!==f?(T=(0,O.jsxs)(J,{value:x,onValueChange:w,children:[(0,O.jsx)(J.Trigger,{children:(0,O.jsx)(J.Value,{placeholder:f})}),(0,O.jsxs)(J.Content,{children:[(0,O.jsx)(J.Item,{value:j,children:i}),(0,O.jsx)(J.Item,{value:B,children:a}),(0,O.jsx)(J.Item,{value:re,children:o}),(0,O.jsx)(J.Item,{value:ie,children:s}),(0,O.jsx)(J.Item,{value:L,children:c}),(0,O.jsx)(J.Item,{value:ee,children:l}),(0,O.jsx)(J.Item,{value:M,children:u}),(0,O.jsx)(J.Item,{value:N,children:d}),(0,O.jsx)(J.Item,{value:ae,children:m}),(0,O.jsx)(J.Item,{value:F,children:_}),(0,O.jsx)(J.Item,{value:R,children:g}),(0,O.jsx)(J.Item,{value:te,children:p}),(0,O.jsx)(J.Item,{value:P,children:h}),(0,O.jsx)(J.Item,{value:ne,disabled:!0,children:v}),(0,O.jsx)(J.Item,{value:I,children:y})]})]}),t[4]=l,t[5]=s,t[6]=h,t[7]=u,t[8]=y,t[9]=m,t[10]=_,t[11]=x,t[12]=g,t[13]=i,t[14]=p,t[15]=c,t[16]=o,t[17]=w,t[18]=d,t[19]=v,t[20]=a,t[21]=f,t[22]=T):T=t[22],T},bJ=e=>{let t=(0,V.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=vC()?.internationalization?.locales??[],s=JS(n),c=GS(n),l=e=>{a(US(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`||s===`plural`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,O.jsx)(yJ,{section:n,onValueChange:e=>a(US(e,o))}),(0,O.jsx)(bJ,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,O.jsx)(yJ,{section:n,onValueChange:e=>a(US(e,o))}),(0,O.jsx)(bJ,{section:c,keyPath:e,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`object`){let e;if(t[0]!==r||t[1]!==i||t[2]!==o||t[3]!==a||t[4]!==n){let s;t[6]!==o||t[7]!==a?(s=e=>a(US(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(yJ,{section:n,onValueChange:s}),(0,O.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,O.jsx)(CJ,{keyPath:i,section:n,dictionaryLocalId:r})})]}),t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=n,t[5]=e}else e=t[5];return e}let u;t[9]!==o||t[10]!==a?(u=e=>a(US(e,o)),t[9]=o,t[10]=a,t[11]=u):u=t[11];let d;return t[12]!==n||t[13]!==u?(d=(0,O.jsx)(yJ,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},xJ=e=>{let t=(0,V.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=hC(),{renameEditedContent:c,addEditedContent:l}=yC(),{titleInput:u,deleteButton:d}=_t(_J),f;t[0]!==a||t[1]!==i||t[2]!==c||t[3]!==s?(f=e=>{c(a,e,i);let t=i.slice(0,-1),n=i[i.length-1];s([...t,{...n,key:e}])},t[0]=a,t[1]=i,t[2]=c,t[3]=s,t[4]=f):f=t[4];let p=f,m;if(t[5]!==l||t[6]!==d||t[7]!==a||t[8]!==o?.keyPath||t[9]!==p||t[10]!==i||t[11]!==r||t[12]!==n||t[13]!==s||t[14]!==u){let e;t[16]!==i||t[17]!==s?(e=()=>s(i),t[16]=i,t[17]=s,t[18]=e):e=t[18];let c;t[19]!==l||t[20]!==a||t[21]!==i?(c=e=>{l(a,e,i)},t[19]=l,t[20]=a,t[21]=i,t[22]=c):c=t[22],m=(0,O.jsx)(_E,{transparency:`xl`,roundedSize:`xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":Qe(i,o?.keyPath??[]),onClick:e,children:(0,O.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,O.jsxs)(`div`,{className:`w-full`,children:[(0,O.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,O.jsx)(aD,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,O.jsx)(SE,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Iu,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,O.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,nt(n),` )`]})]}),(0,O.jsx)(bJ,{keyPath:i,dictionaryLocalId:a,section:r,onNodeTypeChange:c})]})}),t[5]=l,t[6]=d,t[7]=a,t[8]=o?.keyPath,t[9]=p,t[10]=i,t[11]=r,t[12]=n,t[13]=s,t[14]=u,t[15]=m}else m=t[15];return m},SJ=e=>{let t=(0,V.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=_t(_J),{setFocusedContentKeyPath:o}=hC(),{addEditedContent:s}=yC();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(`div`,{children:`Not an object`}),t[0]=e):e=t[0],e}let c;if(t[1]!==s||t[2]!==a.label.value||t[3]!==a.text||t[4]!==i||t[5]!==r||t[6]!==n||t[7]!==o){let e;t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o?(e=()=>{let e=[...r,{type:L,key:`newKey`}];s(i,``,e),o(e)},t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=e):e=t[13],c=(0,O.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,O.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,O.jsx)(`li`,{className:`flex w-full`,children:(0,O.jsx)(xJ,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:L,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,O.jsx)(SE,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Mu,className:`flex-1`,onClick:e,children:a.text})]}),t[1]=s,t[2]=a.label.value,t[3]=a.text,t[4]=i,t[5]=r,t[6]=n,t[7]=o,t[8]=c}else c=t[8];return c},CJ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,O.jsx)(xJ,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,O.jsx)(SJ,{section:e,keyPath:t,dictionaryLocalId:n}),wJ=e=>{let t=(0,V.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=bC(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,O.jsx)(xJ,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},TJ=e=>{let t=(0,V.c)(24),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=vC(),{returnToDictionaryList:d}=_t(Qq),{focusedContent:f,setFocusedContent:p}=hC(),{setLocaleDictionary:m}=fC(),[h,g]=(0,D.useState)(`content`),_;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(_=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=_):_=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],t[5]=v):v=t[5],(0,D.useEffect)(_,v);let y;if(t[6]!==h||t[7]!==u?.internationalization?.locales||t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==r||t[12]!==o||t[13]!==s||t[14]!==d||t[15]!==p||t[16]!==l){let e;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>g(`structure`),t[18]=e):e=t[18];let c;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>g(`content`),t[19]=c):c=t[19];let f;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>g(`json`),t[20]=f):f=t[20];let m;t[21]!==o||t[22]!==p?(m=()=>{p(null),o?.()},t[21]=o,t[22]=p,t[23]=m):m=t[23],y=(0,O.jsx)(_D,{availableLocales:u?.internationalization?.locales??[],children:(0,O.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,O.jsx)(SE,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:fu,label:d.label.value,children:d.text}),(0,O.jsxs)(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,O.jsx)(`div`,{className:`sticky top-0 z-10 flex shrink-0 gap-3 rounded-xl bg-background/20 p-3 pb-4`,children:(0,O.jsx)(rJ,{selectedChoice:h,tabs:[...a.includes(`remote`)?[(0,O.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`details`,onClick:()=>g(`details`),type:`button`,children:`Details`},`details`)]:[],(0,O.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`structure`,onClick:e,type:`button`,children:`Structure`},`structure`),(0,O.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`content`,onClick:c,type:`button`,children:`Content`},`content`),(0,O.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`json`,onClick:f,type:`button`,children:`JSON`},`json`)],hoverable:!0,color:`text`})}),(0,O.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:(0,O.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-stretch gap-6`,children:[a.includes(`remote`)&&h===`details`&&(0,O.jsx)(cJ,{dictionary:n,mode:a}),h===`structure`&&(0,O.jsx)(wJ,{dictionary:n}),h===`content`&&(0,O.jsx)(gI,{dictionary:n,isDarkMode:i}),h===`json`&&(0,O.jsx)(hJ,{dictionary:n,isDarkMode:i})]})})]}),(0,O.jsx)(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:(0,O.jsxs)(_E,{color:`card`,roundedSize:`2xl`,padding:`sm`,className:`w-full shrink-0 flex-row flex-wrap items-center justify-end gap-10 bg-background/20 md:bottom-0`,children:[(0,O.jsx)(eJ,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,O.jsx)(Zq,{dictionary:n,mode:a,onDelete:m,onSave:s})]})})]})}),t[6]=h,t[7]=u?.internationalization?.locales,t[8]=n,t[9]=i,t[10]=a,t[11]=r,t[12]=o,t[13]=s,t[14]=d,t[15]=p,t[16]=l,t[17]=y}else y=t[17];return y},EJ=({children:e,className:t,identifier:n,...r})=>(0,O.jsx)(`div`,{className:G(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),DJ=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:a=`bellow`,identifier:o,className:s,displayArrow:c=!0,...l})=>(0,O.jsx)(_E,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:G(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`left-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`right-0`,a===`bellow`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:left-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:right-2`,c&&a===`bellow`&&`before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,c&&a===`above`&&`before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,s),...l,children:e});EJ.Detail=DJ;var OJ=e=>(0,O.jsx)(EJ,{...e}),kJ=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,D.useRef)(null),[i,a]=(0,D.useState)(e),[o,s]=(0,D.useState)(t),[c,l]=(0,D.useState)(void 0);return(0,D.useLayoutEffect)(()=>{let i=()=>{if(!r.current)return;let i=r.current,o=document.getElementById(`unrollable-panel-button-${n.identifier}`);if(!o)return;let c=o.getBoundingClientRect(),u=window.innerWidth,d=window.innerHeight,f=u-c.left-16,p=c.right-16;l(Math.max(f,p));let m=i.classList.contains(`invisible`);m&&(i.style.visibility=`hidden`,i.classList.remove(`invisible`)),requestAnimationFrame(()=>{let n=i.getBoundingClientRect();m&&(i.style.visibility=``,i.classList.add(`invisible`));let r=t,o=d-c.bottom-16,l=c.top-16;t===`bellow`&&o<n.height?l>=n.height&&(r=`above`):t===`above`&&l<n.height&&o>=n.height&&(r=`bellow`);let f=e,p=u-c.left-16,h=c.right-16;e===`start`&&p<n.width?h>=n.width&&(f=`end`):e===`end`&&h<n.width&&p>=n.width&&(f=`start`),s(r),a(f)})},o=setTimeout(i,0),c=document.getElementById(`unrollable-panel-button-${n.identifier}`);c&&(c.addEventListener(`mouseenter`,i),c.addEventListener(`focusin`,i));let u=new ResizeObserver(()=>{i()});return r.current&&u.observe(r.current),window.addEventListener(`resize`,i),window.addEventListener(`scroll`,i,!0),()=>{clearTimeout(o),c&&(c.removeEventListener(`mouseenter`,i),c.removeEventListener(`focusin`,i)),u.disconnect(),window.removeEventListener(`resize`,i),window.removeEventListener(`scroll`,i,!0)}},[n.identifier,e,t]),(0,O.jsx)(DJ,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},AJ=OJ;AJ.Detail=kJ;var jJ=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;open=e=>{this.drawers[e]||(this.drawers={...this.drawers,[e]:!0},this.emit())};close=e=>{this.drawers[e]&&(this.drawers={...this.drawers,[e]:!1},this.emit())};set=e=>{let t=!1,n={...this.drawers};for(let[r,i]of Object.entries(e))n[r]!==i&&(n[r]=i,t=!0);t&&(this.drawers=n,this.emit())};emit=()=>{this.listeners.forEach(e=>{e()})}},MJ=()=>{let e=(0,V.c)(2),t=(0,D.useSyncExternalStore)(jJ.subscribe,jJ.getSnapshot,NJ),n;return e[0]===t?n=e[1]:(n={open:jJ.open,close:jJ.close,set:jJ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function NJ(){return{}}var PJ={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{goBack:`Go back`,closeDrawer:`Close Drawer`},"en-GB":{goBack:`Go back`,closeDrawer:`Close Drawer`},fr:{goBack:`Retour`,closeDrawer:`Fermer le tiroir`},es:{goBack:`Volver`,closeDrawer:`Cerrar cajón`},de:{goBack:`Zurück`,closeDrawer:`Schublade schließen`},ja:{goBack:`戻る`,closeDrawer:`引き出しを閉じる`},ko:{goBack:`뒤로`,closeDrawer:`서랍 닫기`},zh:{goBack:`返回`,closeDrawer:`关闭抽屉`},it:{goBack:`Indietro`,closeDrawer:`Chiudi cassetto`},pt:{goBack:`Voltar`,closeDrawer:`Fechar gaveta`},hi:{goBack:`वापस जाएं`,closeDrawer:`दराज बंद करें`},ar:{goBack:`رجوع`,closeDrawer:`إغلاق الدرج`},ru:{goBack:`Назад`,closeDrawer:`Закрыть панель`}}},localIds:[`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`]},FJ=e=>{switch(e){case`xs`:return 480;case`sm`:return 640;case`md`:return 768;case`lg`:return 1024;case`xl`:return 1280;case`2xl`:return 1536;default:return e}},IJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},LJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},RJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},zJ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},BJ=(e=`md`)=>{let t=FJ(e),n=IJ(),r=zJ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:LJ(),isMac:RJ()}},VJ=e=>{let t=(0,V.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=BJ(n),t[0]=n,t[1]=r);let[i,a]=(0,D.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(BJ(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,D.useEffect)(o,s),i},HJ=e=>e.split(` + `).map(e=>e.trim()),UJ=e=>({"⌘":`Meta`,Ctrl:`Control`,Control:`Control`,Alt:`Alt`,"⌥":`Alt`,Shift:`Shift`,Meta:`Meta`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`})[e]||e,WJ=(e,t)=>{let n=t.map(UJ),r={Meta:n.includes(`Meta`),Control:n.includes(`Control`),Alt:n.includes(`Alt`),Shift:n.includes(`Shift`)};if(r.Meta!==e.metaKey||r.Control!==e.ctrlKey||r.Alt!==e.altKey||r.Shift!==e.shiftKey)return!1;let i=t.find(e=>![`⌘`,`Ctrl`,`Control`,`Alt`,`⌥`,`Shift`,`Meta`].includes(UJ(e)));if(!i)return!1;let a=UJ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},GJ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,KJ=(e,t)=>{let n=e;return t?(n=n.replace(/Ctrl/g,`⌘`),n=n.replace(/Alt/g,`⌥`)):(n=n.replace(/⌘/g,`Ctrl`),n=n.replace(/⌥/g,`Alt`)),n=n.replace(/ArrowUp/g,`↑`),n=n.replace(/ArrowDown/g,`↓`),n=n.replace(/ArrowLeft/g,`←`),n=n.replace(/ArrowRight/g,`→`),n},qJ=e=>{let t=(0,V.c)(21),{shortcut:n,onTriggered:r,display:i,disabled:a,className:o,size:s}=e,c=i===void 0?!0:i,l=a===void 0?!1:a,u=s===void 0?`md`:s,{isMac:d}=VJ(),f;t[0]!==d||t[1]!==n?(f=HJ(KJ(n,d??!1)),t[0]=d,t[1]=n,t[2]=f):f=t[2];let p=f,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=new Set,t[3]=m):m=t[3];let[h,g]=(0,D.useState)(m),_,v;if(t[4]!==l||t[5]!==d||t[6]!==p||t[7]!==r?(_=()=>{let e=e=>{let t=e.target,n=t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable,i=e.key,a=new Set;if(e.metaKey&&a.add(`⌘`),e.ctrlKey&&a.add(`Ctrl`),e.altKey&&a.add(d?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(GJ(i))):a.add(i.toUpperCase()),g(a),!l&&r&&WJ(e,p)){let t=p.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{g(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,t)}},v=[p,r,d,l],t[4]=l,t[5]=d,t[6]=p,t[7]=r,t[8]=_,t[9]=v):(_=t[8],v=t[9]),(0,D.useEffect)(_,v),!c)return null;let y;t[10]===h?y=t[11]:(y=e=>{let t=e.toUpperCase(),n=UJ(e);return h.has(e)||h.has(t)||h.has(n)||e===`⌘`&&h.has(`Meta`)||e===`Ctrl`&&h.has(`Control`)||e===`⌥`&&h.has(`Alt`)||e===`Alt`&&h.has(`Alt`)||e===`←`&&h.has(`ArrowLeft`)||e===`→`&&h.has(`ArrowRight`)||e===`↑`&&h.has(`ArrowUp`)||e===`↓`&&h.has(`ArrowDown`)},t[10]=h,t[11]=y);let b=y,x;if(t[12]!==o||t[13]!==b||t[14]!==p||t[15]!==n||t[16]!==u){let e;t[18]!==b||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=GJ(e);return(0,O.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,O.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,O.jsx)(`span`,{className:G(`min-w-4 px-0.5 text-center`,b(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=b,t[19]=n,t[20]=e):e=t[20],x=(0,O.jsx)(`kbd`,{className:G(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,u===`sm`&&`text-xs`,u===`md`&&`text-sm`,u===`lg`&&`text-base`,o),children:p.map(e)}),t[12]=o,t[13]=b,t[14]=p,t[15]=n,t[16]=u,t[17]=x}else x=t[17];return x},JJ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,O.jsx)(`div`,{className:G(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,O.jsx)(`div`,{style:{minWidth:`${n}px`},className:G(r===`right`&&`ml-auto`),children:e})}),YJ=e=>{let t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){let n=t.left+t.width/2,r=t.top+10,i=document.elementFromPoint(n,r);return e===i||e.contains(i)}return!1},XJ=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=_t(PJ),{isMobile:d}=VJ(`md`),f=(0,D.useRef)(null),p=(0,D.useRef)(null),m=Sq(l),{open:h,close:g,isOpen:_}=MJ(),v=_(t),y=v;Dq({disableScroll:y,key:t?`right_drawer_${t}`:`right_drawer`}),(0,D.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=y&&a,r=e.target&&!f.current.contains(e.target),i=YJ(f.current);(n&&r&&i||!e.target)&&(g(t),c?.())}catch{g(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[y,g,c,a,t]);let b=(0,D.useRef)(c);return(0,D.useEffect)(()=>{b.current=c},[c]),(0,D.useEffect)(()=>{s!==void 0&&s!==v&&(s?h(t):(g(t),b.current?.()))},[s,v,t,h,g]),m?(0,Sc.createPortal)((0,O.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,O.jsx)(JJ,{isHidden:!y,align:`right`,children:(0,O.jsxs)(_E,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,O.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,O.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,O.jsx)(`div`,{children:o&&(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:gu,children:o?.text})}),(0,O.jsx)(`div`,{children:(0,O.jsxs)(AJ,{identifier:`close-drawer`,children:[(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Ru,size:`icon-md`}),(0,O.jsx)(AJ.Detail,{identifier:`close-drawer`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,O.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,O.jsx)(qJ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,O.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,O.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,O.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(g(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(g(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,O.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,O.jsx)(O.Fragment,{})},ZJ=tu(`w-fit backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,xl:`rounded-xl`,"2xl":`rounded-2xl`,"3xl":`rounded-3xl`,full:`rounded-full`},color:{primary:`border-primary bg-primary/10 text-primary`,success:`border-success bg-success/10 text-success`,error:`border-error bg-error/10 text-error`,warning:`border-warning bg-warning/10 text-warning`,neutral:`/10 border-neutral bg-neutral/10 text-neutral`,text:`border-text bg-text/10 text-text`,blue:`border-blue-500 bg-blue-500/10 text-blue-500 dark:text-blue-300`,yellow:`border-yellow-500 bg-yellow-500/10 text-yellow-500 dark:text-yellow-300`,green:`border-green-500 bg-green-500/10 text-green-500 dark:text-green-300`,red:`border-error bg-error/10 text-error dark:text-red-300`,orange:`border-orange-500 bg-orange-500/10 text-orange-500 dark:text-orange-300`,purple:`border-purple-500 bg-purple-500/10 text-purple-500 dark:text-purple-300`,pink:`border-pink-500 bg-pink-500/10 text-pink-500 dark:text-pink-300`,brown:`border-brown-500 bg-brown-500/10 text-brown-500 dark:text-brown-300`,gray:`border-gray-500 bg-gray-500/10 text-gray-500 dark:text-gray-300`,black:`border-black bg-black/10 text-black`,white:`border-white bg-white/10 text-white`},size:{xs:`border-[1.2px] px-2 py-0.5 text-xs`,sm:`border-[1.3px] px-2 py-0.5 text-sm`,md:`border-2 px-2 py-1 text-base`,lg:`border-2 px-3 py-2 text-lg`,xl:`border-2 px-3 py-2 text-xl`},border:{none:`border-none`,with:`border-[1.3px] border-text`},background:{none:`bg-none`,with:``}},defaultVariants:{roundedSize:`full`,border:`none`,color:`text`,size:`md`}}),QJ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,O.jsx)(`div`,{className:ZJ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),$J=`dictionaryList`,eY=e=>`dictionary_edition_${e}`,tY=e=>{let t=(0,V.c)(23),n;t[0]===e?n=t[1]:(n=eY(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=MJ(),{getEditedContentValue:s}=yC(),{focusedContent:c,setFocusedContent:l}=hC(),u;t[2]!==c?.dictionaryKey||t[3]!==r||t[4]!==a?(u=()=>{c?.dictionaryKey&&a(r)},t[2]=c?.dictionaryKey,t[3]=r,t[4]=a,t[5]=u):u=t[5];let d=c?.dictionaryKey,f;t[6]!==r||t[7]!==a||t[8]!==d?(f=[d,a,r],t[6]=r,t[7]=a,t[8]=d,t[9]=f):f=t[9],(0,D.useEffect)(u,f);let p;t[10]!==i||t[11]!==r?(p=i(r),t[10]=i,t[11]=r,t[12]=p):p=t[12];let m;t[13]!==o||t[14]!==c||t[15]!==r||t[16]!==l?(m=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[13]=o,t[14]=c,t[15]=r,t[16]=l,t[17]=m):m=t[17];let h;return t[18]!==c||t[19]!==s||t[20]!==p||t[21]!==m?(h={isOpen:p,focusedContent:c,getEditedContentValue:s,close:m},t[18]=c,t[19]=s,t[20]=p,t[21]=m,t[22]=h):h=t[22],h},nY=e=>{let t=(0,V.c)(77),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=_t(Ux),l;t[0]===n?l=t[1]:(l=eY(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=tY(n),{setFocusedContent:p}=hC(),{open:m}=MJ(),h;t[2]===m?h=t[3]:(h=()=>m($J),t[2]=m,t[3]=h);let g=h,{data:_}=dE(),v;t[4]!==f||t[5]!==g||t[6]!==p?(v=()=>{f(),p(null),g()},t[4]=f,t[5]=g,t[6]=p,t[7]=v):v=t[7];let y=v,[b,x]=(0,D.useState)(!1),S;t[8]===y?S=t[9]:(S=()=>{x(!1),y()},t[8]=y,t[9]=S);let C=S;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,O.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let w,T,E,k,A,j,M,N,P,F;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==y||t[17]!==u||t[18]!==a||t[19]!==p||t[20]!==_){A=Symbol.for(`react.early_return_sentinel`);bb0:{if(T=_?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!T){let e;t[31]===c?e=t[32]:(e=(0,O.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[31]=c,t[32]=e),A=e;break bb0}w=XJ,F=u,t[33]!==i.value||t[34]!==y?(E={onBack:y,text:i.value},t[33]=i.value,t[34]=y,t[35]=E):E=t[35],t[36]!==f||t[37]!==p?(k=()=>{f(),p(null)},t[36]=f,t[37]=p,t[38]=k):k=t[38];let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>x(!0),t[39]=e):e=t[39];let n;t[40]===a.label.value?n=t[41]:(n=(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Au,label:a.label.value,onClick:e}),t[40]=a.label.value,t[41]=n);let r;t[42]===a.popoverContent?r=t[43]:(r=(0,O.jsx)(AJ.Detail,{identifier:`open-dictionary-editor`,children:(0,O.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[42]=a.popoverContent,t[43]=r);let o;t[44]!==n||t[45]!==r?(o=(0,O.jsxs)(AJ,{identifier:`open-dictionary-editor`,children:[n,r]}),t[44]=n,t[45]=r,t[46]=o):o=t[46],P=(0,O.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,O.jsx)(`h3`,{className:`w-full text-center text-lg`,children:T.title?T.title:T.key}),o]}),j=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dotted pb-3`,M=(0,O.jsx)(QJ,{color:`text`,roundedSize:`full`,size:`xs`,children:T.key}),N=T.filePath&&(0,O.jsx)(QJ,{color:`blue`,roundedSize:`full`,size:`xs`,children:T.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=y,t[17]=u,t[18]=a,t[19]=p,t[20]=_,t[21]=w,t[22]=T,t[23]=E,t[24]=k,t[25]=A,t[26]=j,t[27]=M,t[28]=N,t[29]=P,t[30]=F}else w=t[21],T=t[22],E=t[23],k=t[24],A=t[25],j=t[26],M=t[27],N=t[28],P=t[29],F=t[30];if(A!==Symbol.for(`react.early_return_sentinel`))return A;let I;t[47]===T.id?I=t[48]:(I=T.id&&(0,O.jsx)(QJ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[47]=T.id,t[48]=I);let L;t[49]!==I||t[50]!==j||t[51]!==M||t[52]!==N?(L=(0,O.jsxs)(`div`,{className:j,children:[M,N,I]}),t[49]=I,t[50]=j,t[51]=M,t[52]=N,t[53]=L):L=t[53];let ee;t[54]!==L||t[55]!==P?(ee=(0,O.jsxs)(O.Fragment,{children:[P,L]}),t[54]=L,t[55]=P,t[56]=ee):ee=t[56];let te;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[57]=te):te=t[57];let ne;t[58]!==T||t[59]!==y?(ne=(0,O.jsx)(Zq,{dictionary:T,mode:te,className:`mb-4 flex-col px-3`,onDelete:y}),t[58]=T,t[59]=y,t[60]=ne):ne=t[60];let R;t[61]!==T||t[62]!==b||t[63]!==d||t[64]!==y||t[65]!==r||t[66]!==o||t[67]!==C?(R=d&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Yq,{isOpen:b,onClose:()=>x(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,O.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,O.jsx)(TJ,{dictionary:T,onClickDictionaryList:C,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{x(!1),y()},onSave:()=>{x(!1)}})})}),(0,O.jsx)(fD,{dictionary:T})]}),t[61]=T,t[62]=b,t[63]=d,t[64]=y,t[65]=r,t[66]=o,t[67]=C,t[68]=R):R=t[68];let z;return t[69]!==w||t[70]!==E||t[71]!==k||t[72]!==ee||t[73]!==ne||t[74]!==R||t[75]!==F?(z=(0,O.jsx)(w,{identifier:F,backButton:E,onClose:k,header:ee,footer:ne,children:R}),t[69]=w,t[70]=E,t[71]=k,t[72]=ee,t[73]=ne,t[74]=R,t[75]=F,t[76]=z):z=t[76],z},rY=e=>{let t=(0,V.c)(4),{isDarkMode:n}=e,{focusedContent:r}=hC(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(O.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,O.jsx)(nY,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},iY={key:`dictionary-list-drawer`,content:{nodeType:`translation`,translation:{en:{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},"en-GB":{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},fr:{drawerTitle:{label:`Liste des dictionnaires`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Ouvrir le dictionnaire dans l'éditeur {{dictionaryLocalId}}`}}},es:{drawerTitle:{label:`Lista de diccionarios`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir el diccionario en el editor {{dictionaryLocalId}}`}}},de:{drawerTitle:{label:`Wörterbuchliste`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Wörterbuch-Editor öffnen {{dictionaryLocalId}}`}}},ja:{drawerTitle:{label:`辞書リスト`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`辞書エディタを開く {{dictionaryLocalId}}`}}},ko:{drawerTitle:{label:`사전 목록`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`사전 편집기 열기 {{dictionaryLocalId}}`}}},zh:{drawerTitle:{label:`字典列表`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`打开字典编辑器 {{dictionaryLocalId}}`}}},it:{drawerTitle:{label:`Lista dei dizionari`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Apri editor dizionario {{dictionaryLocalId}}`}}},pt:{drawerTitle:{label:`Lista de dicionários`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir editor de dicionário {{dictionaryLocalId}}`}}},hi:{drawerTitle:{label:`शब्दकोश सूची`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`शब्दकोश संपादक खोलें {{dictionaryLocalId}}`}}},ar:{drawerTitle:{label:`قائمة القواميس`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`فتح محرر القاموس {{dictionaryLocalId}}`}}},ru:{drawerTitle:{label:`Список словарей`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Открыть редактор словаря {{dictionaryLocalId}}`}}}}},localIds:[`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`]},aY=e=>{let t=(0,V.c)(15),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{minChars:r,debounceMs:i,trim:a,defaultValue:o,onSearch:s,onClear:c}=n,l=r===void 0?3:r,u=i===void 0?300:i,d=a===void 0?!0:a,f=(0,D.useRef)(``),p=(0,D.useRef)(null),[m,h]=(0,D.useState)(o??``),g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=g):g=t[2];let _=g,v;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(v=e=>{f.current=e;let t=d?e.trim():e;if(_(),t.length<l){h(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(h(e),s?.(e)):(h(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=v):v=t[8];let y=v,b,x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>()=>{_()},x=[],t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,D.useEffect)(b,x);let S=m.length>=l,C;return t[11]!==m||t[12]!==y||t[13]!==S?(C={setSearch:y,search:m,hasMinChars:S},t[11]=m,t[12]=y,t[13]=S,t[14]=C):C=t[14],C},oY=()=>{let{drawerTitle:e,buttonLabel:t}=_t(iY),{set:n}=MJ(),{localeDictionaries:r}=dC(),{editedContent:i}=bC(),{setFocusedContent:a}=hC(),{setSearch:o,search:s}=aY(),c=(0,D.useMemo)(()=>new uI(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,D.useMemo)(()=>!s||s.trim()===``?Object.values(r):c.search(s).map(e=>e.item),[s,c,r]),u=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[$J]:!1,[eY(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,O.jsxs)(XJ,{title:e.label.value,identifier:$J,children:[(0,O.jsx)(`div`,{className:`p-3 pb-4`,children:(0,O.jsx)(gG,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,O.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,O.jsx)(`li`,{className:`w-full`,children:(0,O.jsx)(SE,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:_u,size:`md`,isFullWidth:!0,Icon:d(e.localId)?ju:void 0,children:(0,O.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,O.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,O.jsx)(QJ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,O.jsx)(QJ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,O.jsx)(QJ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,O.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},sY={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},"en-GB":{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},fr:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press pour éditer le dictionnaire "{{dictionaryKey}}"`}},es:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Presiona largo para editar el diccionario "{{dictionaryKey}}"`}},de:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"`}},ja:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`長押しして編集 "{{dictionaryKey}}" 辞書`}},ko:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`길게 눌러 편집 "{{dictionaryKey}}" 사전`}},zh:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`长按编辑 "{{dictionaryKey}}" 字典`}},it:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Premi a lungo per modificare il dizionario "{{dictionaryKey}}"`}},pt:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Pressione longa para editar o dicionário "{{dictionaryKey}}"`}},hi:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`लंग प्रेस करें टू एडिट "{{dictionaryKey}}"`}},ar:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`اضغط طويلاً للتعديل "{{dictionaryKey}}"`}},ru:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Длительное нажатие для редактирования словаря "{{dictionaryKey}}"`}}}},localIds:[`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`]},cY=()=>{let e=(0,V.c)(8),{message:t}=_t(sY),[n]=lC(uS.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=G(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,O.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},lY=e=>{let t=(0,V.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,O.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,O.jsx)(cY,{})}),i=(0,O.jsx)(rY,{}),a=(0,O.jsx)(oY,{}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,O.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},uY=()=>{let e=(0,V.c)(2),[t,n]=(0,D.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(dY).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,D.useEffect)(r,i),t};function dY(e){return e.json()}var fY=e=>{let t=(0,V.c)(11),{children:n,iframeRef:r}=e,i=uY(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(yE,{}),t[0]=e):e=t[0],e}let o;t[1]!==a||t[2]!==r?(o=e=>{r.current?.contentWindow?.postMessage(e,a)},t[1]=a,t[2]=r,t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=[a],t[4]=a,t[5]=s);let c;return t[6]!==n||t[7]!==i||t[8]!==o||t[9]!==s?(c=(0,O.jsx)(gC,{postMessage:o,allowedOrigins:s,configuration:i,children:n}),t[6]=n,t[7]=i,t[8]=o,t[9]=s,t[10]=c):c=t[10],c},pY={key:`iframe-controller`,content:{nodeType:`translation`,translation:{en:{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},"en-GB":{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},fr:{intlayerApplication:`Application Intlayer`,enableEditor:`Activer l'éditeur`},es:{intlayerApplication:`Aplicación Intlayer`,enableEditor:`Activar el editor`},de:{intlayerApplication:`Intlayer-Anwendung`,enableEditor:`Editor aktivieren`},ja:{intlayerApplication:`Intlayerアプリケーション`,enableEditor:`エディタを有効にする`},ko:{intlayerApplication:`Intlayer 애플리케이션`,enableEditor:`에디터 활성화`},zh:{intlayerApplication:`Intlayer 应用程序`,enableEditor:`启用编辑器`},it:{intlayerApplication:`Applicazione Intlayer`,enableEditor:`Abilita l'editor`},pt:{intlayerApplication:`Aplicativo Intlayer`,enableEditor:`Ativar editor`},hi:{intlayerApplication:`इंटलेयर एप्लिकेशन`,enableEditor:`संपादक सक्षम करें`},ar:{intlayerApplication:`تطبيق Intlayer`,enableEditor:`تفعيل المحرر`},ru:{intlayerApplication:`Приложение Intlayer`,enableEditor:`Включить редактор`}}},localIds:[`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`]},mY=()=>{let e=(0,V.c)(9),{editedContent:t,setEditedContentState:n}=bC(),r;e[0]===n?r=e[1]:(r=()=>{let e=localStorage?.getItem(`INTLAYER_EDITED_CONTENT_CHANGED`);if(e)try{n(JSON.parse(e))}catch(e){console.error(e)}},e[0]=n,e[1]=r);let i=r,a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{t!==void 0&&localStorage?.setItem(`INTLAYER_EDITED_CONTENT_CHANGED`,JSON.stringify(t))},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,D.useEffect)(a,o);let s;e[5]!==t||e[6]!==i?(s=()=>{t===void 0&&i()},e[5]=t,e[6]=i,e[7]=s):s=e[7];let c;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=[],e[8]=c):c=e[8],(0,D.useEffect)(s,c),i},hY={key:`no-application-url-view`,content:{nodeType:`translation`,translation:{en:{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},"en-GB":{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},fr:{title:`Votre configuration de projet ne comprend pas l’URL de l’application`,description:`Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.`,documentationLink:{label:`Cliquez ici pour accéder à la documentation de l’éditeur`,text:`Voir comment configurer l’éditeur`}},es:{title:`Su configuración de proyecto no incluye la URL de la aplicación`,description:`Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.`,documentationLink:{label:`Haga clic aquí para acceder a la documentación del editor`,text:`Vea cómo configurar el editor`}},de:{title:`Ihre Projektkonfiguration enthält keine Anwendungs-URL`,description:`Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.`,documentationLink:{label:`Klicken Sie hier, um die Editor-Dokumentation zu besuchen`,text:`Siehe, wie man den Editor konfiguriert`}},ja:{title:`あなたのプロジェクト構成にはアプリケーション URL が含まれていません`,description:`エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。`,documentationLink:{label:`エディターのドキュメントに移動するには、ここをクリックしてください`,text:`エディターの設定方法を見る`}},ko:{title:`당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.`,description:`에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.`,documentationLink:{label:`에디터 문서로 이동하려면 여기를 클릭하십시오.`,text:`에디터 설정 방법을 보십시오`}},zh:{title:`您的项目配置未包含应用程序 URL`,description:`要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。`,documentationLink:{label:`点击此处访问编辑器文档`,text:`查看如何配置编辑器`}},it:{title:`La configurazione del progetto non include l’URL dell’applicazione`,description:`Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione.`,documentationLink:{label:`Fai clic qui per accedere alla documentazione dell’editor`,text:`Vedi come configurare l’editor`}},pt:{title:`Sua configuração do projeto não inclui a URL do aplicativo`,description:`Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.`,documentationLink:{label:`Clique aqui para acessar a documentação do editor`,text:`Veja como configurar o editor`}},hi:{title:`आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है`,description:`एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।`,documentationLink:{label:`एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?`,text:`एडिटर को काने के बारे में देखें`}},ar:{title:`تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق`,description:`لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.`,documentationLink:{label:`انقر هنا للوصول إلى وثائق المحرر`,text:`انظر كيفية تكوين المحرر`}},ru:{title:`Ваша конфигурация проекта не включает URL-адрес приложения`,description:`Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.`,documentationLink:{label:`Нажмите, чтобы перейти к документации редактора`,text:`Смотрите, как настроить редактор`}}}},localIds:[`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`]},gY=()=>{let e=(0,V.c)(11),{title:t,description:n,documentationLink:r}=_t(hY),i;e[0]===t?i=e[1]:(i=(0,O.jsx)(Hq,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,O.jsx)(`strong`,{className:`block text-neutral`,children:n}),e[2]=n,e[3]=a);let o;e[4]!==r.label.value||e[5]!==r.text?(o=(0,O.jsx)(kP,{label:r.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ml-auto`,isExternalLink:!0,children:r.text}),e[4]=r.label.value,e[5]=r.text,e[6]=o):o=e[6];let s;return e[7]!==i||e[8]!==a||e[9]!==o?(s=(0,O.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[i,a,o]}),e[7]=i,e[8]=a,e[9]=o,e[10]=s):s=e[10],s},_Y=e=>{let t=(0,V.c)(23),{iframeRef:n,applicationPath:r}=e,i=_t(pY),{editor:a}=vC()??{},{enabled:o}=xC(),s=SC();mY(),wC();let[c,l]=(0,D.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=uC(void 0,u),f,p;if(t[1]===d?(f=t[2],p=t[3]):(f=()=>{typeof d==`string`&&window.history.replaceState({},``,d)},p=[d],t[1]=d,t[2]=f,t[3]=p),(0,D.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(_E,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,O.jsx)(gY,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,O.jsx)(yE,{isLoading:c}),t[5]=c,t[6]=m);let h=`${a.applicationURL}${r}`,g=i.intlayerApplication.value,_=c&&`hidden`,v;t[7]===_?v=t[8]:(v=G(`size-full`,_),t[7]=_,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{l(!1)},t[9]=y):y=t[9];let b;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==h||t[13]!==v?(b=(0,O.jsx)(`iframe`,{src:h,title:g,sandbox:`allow-scripts allow-same-origin`,className:v,ref:n,onLoad:y}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=h,t[13]=v,t[14]=b):b=t[14];let x;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(x=!o&&(0,O.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,O.jsx)(SE,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=x):x=t[18];let S;return t[19]!==b||t[20]!==x||t[21]!==m?(S=(0,O.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[m,b,x]}),t[19]=b,t[20]=x,t[21]=m,t[22]=S):S=t[22],S},vY=()=>{let e=(0,V.c)(2),t=(0,D.useRef)(null),n=Ln(),r;return e[0]===n.pathname?r=e[1]:(r=(0,O.jsx)(fY,{iframeRef:t,children:(0,O.jsx)(ht,{disableEditor:!0,children:(0,O.jsx)(lY,{children:(0,O.jsx)(_Y,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,No.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(D.StrictMode,{children:(0,O.jsx)(()=>{let e=(0,V.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,O.jsx)(Hx,{children:(0,O.jsx)(Vx,{children:(0,O.jsx)(vY,{})})}),e[0]=t):t=e[0],t},{})}));export{x as C,u as E,E as S,c as T,du as _,Bq as a,_t as b,Uq as c,kP as d,J as f,_E as g,SE as h,Yq as i,Wq as l,CE as m,fJ as n,Vq as o,mD as p,rJ as r,Hq as s,AJ as t,Gq as u,tu as v,p as w,Fe as x,G as y};
|
|
184
|
+
}`,eG=18,tG=40,nG=`${tG}px`,rG=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),iG=e=>{let t=(0,V.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,D.useState)(!1),[c,l]=(0,D.useState)(!1),[u,d]=(0,D.useState)(!1),f=i===`none`?!1:(i===`increase-width`||i===`experimental-no-flickering`)&&o&&c,p;t[0]!==n||t[1]!==u||t[2]!==r||t[3]!==i?(p=()=>{let e=n.current,t=r.current;if(!e||!t||u||i===`none`)return;let a=e,o=a.getBoundingClientRect().left+a.offsetWidth,c=a.getBoundingClientRect().top+a.offsetHeight/2,l=o-eG,f=c;document.querySelectorAll(rG).length===0&&document.elementFromPoint(l,f)===e||(s(!0),d(!0))},t[0]=n,t[1]=u,t[2]=r,t[3]=i,t[4]=p):p=t[4];let m=p,h,g;t[5]!==n||t[6]!==i?(h=()=>{let e=n.current;if(!e||i===`none`)return;let t=()=>{l(window.innerWidth-e.getBoundingClientRect().right>=tG)};t();let r=setInterval(t,1e3);return()=>{clearInterval(r)}},g=[n,i],t[5]=n,t[6]=i,t[7]=h,t[8]=g):(h=t[7],g=t[8]),(0,D.useEffect)(h,g);let _;t[9]!==r||t[10]!==a||t[11]!==i||t[12]!==m?(_=()=>{let e=a||document.activeElement===r.current;if(i===`none`||!e)return;let t=setTimeout(m,0),n=setTimeout(m,2e3),o=setTimeout(m,5e3),s=setTimeout(()=>{d(!0)},6e3);return()=>{clearTimeout(t),clearTimeout(n),clearTimeout(o),clearTimeout(s)}},t[9]=r,t[10]=a,t[11]=i,t[12]=m,t[13]=_):_=t[13];let v;t[14]!==r||t[15]!==a||t[16]!==i?(v=[r,a,i],t[14]=r,t[15]=a,t[16]=i,t[17]=v):v=t[17],(0,D.useEffect)(_,v);let y;return t[18]!==o||t[19]!==f?(y={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:nG},t[18]=o,t[19]=f,t[20]=y):y=t[20],y},aG=e=>{let t=(0,D.useRef)(void 0);return(0,D.useEffect)(()=>{t.current=e}),t.current},oG=(0,D.createContext)({}),sG=({value:e,onChange:t,maxLength:n,pattern:r,placeholder:i,inputMode:a=`numeric`,onComplete:o,onActiveSlotChange:s,pushPasswordManagerStrategy:c=`increase-width`,pasteTransformer:l,containerClassName:u,noScriptCSSFallback:d=$W,render:f,children:p,...m})=>{let[h,g]=(0,D.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),_=e??h,v=aG(_),y=e=>{t?.(e),g(e)},b=r===void 0?null:typeof r==`string`?new RegExp(r):r,x=(0,D.useRef)(null),S=(0,D.useRef)(null),C=(0,D.useRef)({value:_,onChange:y,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),w=(0,D.useRef)({prev:[x.current?.selectionStart??null,x.current?.selectionEnd??null,x.current?.selectionDirection??`none`]});(0,D.useEffect)(()=>{let e=x.current,t=S.current;if(!e||!t)return;C.current.value!==e.value&&C.current.onChange(e.value),w.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection??`none`];let n=()=>{if(document.activeElement!==e){M(null),P(null),I(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=w.current.prev,s=-1,c=-1,l=r??`none`;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&x.current?.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l;I(t!==null&&n!==null?t===n?t:u:null),M(u),P(d),w.current.prev=[u,d,f]};if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&A(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;QW(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),QW(e.sheet,`[data-input-otp]:autofill { ${t} }`),QW(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),QW(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),QW(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[T,E]=(0,D.useState)(!1),[k,A]=(0,D.useState)(!1),[j,M]=(0,D.useState)(null),[N,P]=(0,D.useState)(null),[F,I]=(0,D.useState)(null);(0,D.useEffect)(()=>{ZW(()=>{x.current?.dispatchEvent(new Event(`input`));let e=x.current?.selectionStart??null,t=x.current?.selectionEnd??null,n=x.current?.selectionDirection??`none`;e!==null&&t!==null&&(M(e),P(t),I(e),w.current.prev=[e,t,n])})},[_,k]),(0,D.useEffect)(()=>{v!==void 0&&_!==v&&v.length<n&&_.length===n&&o?.(_)},[n,o,v,_]);let L=(0,D.useRef)(null);(0,D.useEffect)(()=>{let e=k&&F!==null?F:null;e!==L.current&&(L.current=e,s?.(e))},[k,F,s]);let ee=iG({containerRef:S,inputRef:x,pushPasswordManagerStrategy:c,isFocused:k}),te=e=>{let t=e.currentTarget.value.slice(0,n);if(t.length>0&&b&&!b.test(t)){e.preventDefault();return}typeof v==`string`&&t.length<v.length&&document.dispatchEvent(new Event(`selectionchange`)),y(t)},ne=()=>{if(x.current){let e=Math.min(x.current.value.length,n-1),t=x.current.value.length;x.current?.setSelectionRange(e,t),M(e),P(t)}A(!0)},R=e=>{let t=x.current;if(!l&&(!C.current.isIOS||!e.clipboardData||!t))return;let r=e.clipboardData.getData(`text/plain`),i=l?l(r):r;e.preventDefault();let a=x.current?.selectionStart,o=x.current?.selectionEnd,s=(a===o?_.slice(0,a??0)+i+_.slice(a??0):_.slice(0,a??0)+i+_.slice(o??0)).slice(0,n);if(!(s.length>0&&b&&!b.test(s))&&t){t.value=s,y(s);let e=Math.min(s.length,n-1),r=s.length;t.setSelectionRange(e,r),M(e),P(r)}},z={width:ee.willPushPWMBadge?`calc(100% + ${ee.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:ee.willPushPWMBadge?`inset(0 ${ee.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,fontSize:`var(--root-height)`},B=(0,O.jsx)(`input`,{autoComplete:m.autoComplete||`one-time-code`,...m,"data-input-otp":!0,"data-input-otp-placeholder-shown":_.length===0||void 0,"data-input-otp-mss":j,"data-input-otp-mse":N,inputMode:a,pattern:b?.source,"aria-placeholder":i,className:`pointer-events-auto absolute inset-0 -z-10 flex h-full border-0 border-transparent bg-transparent text-center font-mono text-transparent tabular-nums leading-none tracking-[-.5em] caret-transparent opacity-100 shadow-none outline-none`,style:z,maxLength:n,value:_,ref:x,onPaste:e=>{R(e),m.onPaste?.(e)},onChange:te,onMouseOver:e=>{E(!0),m.onMouseOver?.(e)},onMouseLeave:e=>{E(!1),m.onMouseLeave?.(e)},onKeyDown:e=>{(e.key===`ArrowLeft`||e.key===`ArrowRight`)&&requestAnimationFrame(()=>{let e=x.current;if(e&&document.activeElement===e){let t=e.selectionStart,n=e.selectionEnd;t!==null&&n!==null&&I(t)}}),m.onKeyDown?.(e)},onFocus:e=>{ne(),m.onFocus?.(e)},onBlur:e=>{A(!1),m.onBlur?.(e)}}),re={slots:Array.from({length:n}).map((e,t)=>{let n=k&&j!==null&&N!==null&&(j===N&&t===j||t>=j&&t<N),r=_[t]===void 0?null:_[t];return{char:r,placeholderChar:_[0]===void 0?i?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:k,isHovering:!m.disabled&&T,setSelection:e=>{let t=x.current;if(!t||m.disabled)return;let r=Math.max(0,Math.min(e,n-1));document.activeElement!==t&&t.focus();let i=_[r]!==void 0,a=r,o=i?r+1:r;t.setSelectionRange(a,o),M(a),P(o),A(!0)}},ie=f===void 0?(0,O.jsx)(oG.Provider,{value:re,children:p}):f(re);return(0,O.jsxs)(O.Fragment,{children:[d!==null&&(0,O.jsx)(`noscript`,{children:(0,O.jsx)(`style`,{children:d})}),(0,O.jsxs)(`div`,{ref:S,className:G(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[ie,(0,O.jsx)(`div`,{className:`absolute inset-0`,children:B})]})]})},cG=({className:e,render:t,...n})=>(0,O.jsx)(sG,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:G(`disabled:cursor-not-allowed`,e),render:t,...n}),lG=({className:e,...t})=>(0,O.jsx)(`div`,{className:G(`z-10 flex items-center gap-3`,e),...t}),uG=e=>{let t=(0,V.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,D.useContext)(oG),{char:c,isActive:l}=s?.slots[n]??{},u;t[0]===s?u=t[1]:(u=s??{},t[0]=s,t[1]=u);let{setSelection:d}=u,f;t[2]!==n||t[3]!==i||t[4]!==d?(f=e=>{d?.(n),i?.(e)},t[2]=n,t[3]=i,t[4]=d,t[5]=f):f=t[5];let p=f,m;t[6]!==n||t[7]!==a||t[8]!==d?(m=e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d?.(n)),a?.(e)},t[6]=n,t[7]=a,t[8]=d,t[9]=m):m=t[9];let h=m;return(0,O.jsx)(SE,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:G(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:h,label:null,...o,children:(0,O.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},dG=e=>(0,O.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full text-text/50`,...e,children:(0,O.jsx)(Du,{})}),fG=e=>(0,O.jsx)(`div`,{"data-indicator":!0,className:`absolute top-0 z-0 h-full w-auto rounded-xl bg-text/20 ring-4 ring-text/20 transition-[left,width] duration-300 ease-in-out [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl motion-reduce:transition-none`,...e}),pG=e=>e?.getAttribute(`aria-selected`)===`true`,mG=({field:e,name:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c=6,maxLength:l=6,...u})=>{let{error:d}=LW(),f=(0,D.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=OE(f,{selector:pG,isHoverable:!0});return(0,D.useEffect)(()=>{m()},[]),(0,O.jsx)(HW,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,O.jsx)(cG,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(lG,{children:[(0,O.jsx)(uG,{index:0,ref:e=>{f.current[0]=e}}),(0,O.jsx)(uG,{index:1,ref:e=>{f.current[1]=e}}),(0,O.jsx)(uG,{index:2,ref:e=>{f.current[2]=e}})]}),(0,O.jsx)(dG,{}),(0,O.jsxs)(lG,{children:[(0,O.jsx)(uG,{index:3,ref:e=>{f.current[3]=e}}),(0,O.jsx)(uG,{index:4,ref:e=>{f.current[4]=e}}),(0,O.jsx)(uG,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,O.jsx)(fG,{style:p})]})})})},hG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,slots:c,maxLength:l,...u}=e,d=c===void 0?6:c,f=l===void 0?6:l,{control:p}=$R();return(0,O.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,O.jsx)(mG,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},gG=({className:e,...t})=>(0,O.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,O.jsx)(Fu,{className:`absolute left-2 size-4`}),(0,O.jsx)(GE,{...t,type:`search`,className:G(`pl-8`,e)})]}),_G=e=>(0,O.jsx)(WW,{id:e.name,"data-testid":e.name,Element:gG,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),vG=e=>(0,O.jsx)(WW,{Element:KE,id:e.name,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,"data-testid":e.name,...e}),yG=e=>(0,O.jsx)(WW,{Element:YE,id:e.name,"data-testid":e.name,...e}),bG=tu([`appearance-none`,`relative cursor-pointer border-2`,`focus:outline-0`,`checked:hover:opacity-80`,`ring-offset-background`,`hover:bg-neutral-500/10`,`disabled:opacity-50`,`ring-0 transition-all duration-300 ease-in-out hover:ring-4 focus-visible:ring-6`,`checked:before:absolute checked:before:inset-0 checked:before:content-['✓']`,`checked:before:flex checked:before:items-center checked:before:justify-center`,`checked:before:text-text-opposite/80`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`after:absolute after:-inset-2 after:content-['']`].join(` `),{variants:{variant:{default:``},size:{xs:`size-3 rounded-sm`,sm:`size-4 rounded-md`,md:`size-5 rounded-lg`,lg:`size-6 rounded-xl`},color:{primary:`border-primary/30 text-primary ring-primary/20 checked:border-primary checked:bg-primary`,secondary:`border-secondary/30 text-secondary ring-secondary/20 checked:border-secondary checked:bg-secondary`,neutral:`border-neutral/30 text-neutral ring-neutral/20 checked:border-neutral checked:bg-neutral`,light:`border-white/30 text-white ring-white/20 checked:border-white checked:bg-white`,text:`border-text/30 text-text ring-text/20 checked:border-text checked:bg-text`,"text-inverse":`border-text-inverse/30 text-text-inverse ring-text-inverse/20 checked:border-text-inverse checked:bg-text-inverse`,dark:`border-neutral-800/30 text-neutral-800 ring-neutral-800/20 checked:border-neutral-800 checked:bg-neutral-800`,error:`border-error/30 text-error ring-error/20 checked:border-error checked:bg-error`,success:`border-success/30 text-success ring-success/20 checked:border-success checked:bg-success`,custom:`border-custom/30 text-custom ring-custom/20 checked:border-custom checked:bg-custom`},validationStyleEnabled:{disabled:``,enabled:`valid:border-success invalid:border-error`}},defaultVariants:{variant:`default`,color:`text`,validationStyleEnabled:`disabled`,size:`md`}}),xG=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,O.jsx)(`input`,{type:`checkbox`,className:G(bG({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),SG=e=>{let{label:t,name:n,id:r}=e;return t?(0,O.jsxs)(`label`,{htmlFor:r??n,className:G(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,O.jsx)(xG,{id:r??n,...e}),t]}):(0,O.jsx)(xG,{id:r??n,...e})},CG=({inputLabel:e,value:t,onChange:n,...r})=>(0,O.jsx)(SG,{...r,label:e,checked:!!t,onChange:n}),wG=({autoComplete:e,...t})=>(0,O.jsx)(WW,{Element:CG,id:t.name,"data-testid":t.name,autoComplete:e,...t}),TG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=LW();return(0,O.jsx)(HW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,O.jsx)(gR,{onValueChange:t.onChange,values:t.value,...l,children:c})})},EG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=$R();return(0,O.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,O.jsx)(TG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},DG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=LW();return(0,O.jsx)(HW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,O.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},OG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=$R();return(0,O.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,O.jsx)(DG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},kG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=LW();return(0,O.jsx)(HW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,O.jsx)(RE,{...t,...l,children:c})})},AG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=$R();return(0,O.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,O.jsx)(kG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},jG=Symbol.for(`react.lazy`),MG=D.use;function NG(e){return typeof e==`object`&&!!e&&`then`in e}function PG(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===jG&&`_payload`in e&&NG(e._payload)}function FG(e){let t=LG(e),n=D.forwardRef((e,n)=>{let{children:r,...i}=e;PG(r)&&typeof MG==`function`&&(r=MG(r._payload));let a=D.Children.toArray(r),o=a.find(zG);if(o){let e=o.props.children,r=a.map(t=>t===o?D.Children.count(e)>1?D.Children.only(null):D.isValidElement(e)?e.props.children:null:t);return(0,O.jsx)(t,{...i,ref:n,children:D.isValidElement(e)?D.cloneElement(e,void 0,r):null})}return(0,O.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var IG=FG(`Slot`);function LG(e){let t=D.forwardRef((e,t)=>{let{children:n,...r}=e;if(PG(n)&&typeof MG==`function`&&(n=MG(n._payload)),D.isValidElement(n)){let e=VG(n),i=BG(r,n.props);return n.type!==D.Fragment&&(i.ref=t?uc(t,e):e),D.cloneElement(n,i)}return D.Children.count(n)>1?D.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var RG=Symbol(`radix.slottable`);function zG(e){return D.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===RG}function BG(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function VG(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var HG=e=>{let t=(0,V.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=LW(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,O.jsx)(IG,{id:r,"aria-describedby":o,"aria-invalid":s,...e}),t[0]=r,t[1]=e,t[2]=o,t[3]=s,t[4]=c):c=t[4],c},UG=e=>{let t=(0,V.c)(3),{formDescriptionId:n}=LW(),r;return t[0]!==n||t[1]!==e?(r=(0,O.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},WG=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=LW(),a=r?String(r?.message??``):t;return a?(0,O.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=jW;$.Description=UG,$.Control=HG,$.Field=IW,$.Item=NW,$.Label=VW,$.Message=WG,$.Element=WW,$.Input=qW,$.InputPassword=XW,$.Checkbox=wG,$.TextArea=vG,$.AutoSizedTextArea=yG,$.Button=SE,$.Select=OG,$.MultiSelect=EG,$.EditableFieldInput=GW,$.EditableFieldTextArea=KW,$.SwitchSelector=AG,$.OTP=hG,$.SearchInput=_G;var GG=Z(`ZodISODateTime`,(e,t)=>{lH.init(e,t),vK.init(e,t)});function KG(e){return kU(GG,e)}var qG=Z(`ZodISODate`,(e,t)=>{uH.init(e,t),vK.init(e,t)});function JG(e){return AU(qG,e)}var YG=Z(`ZodISOTime`,(e,t)=>{dH.init(e,t),vK.init(e,t)});function XG(e){return jU(YG,e)}var ZG=Z(`ZodISODuration`,(e,t)=>{fH.init(e,t),vK.init(e,t)});function QG(e){return MU(ZG,e)}var $G=Z(`ZodError`,(e,t)=>{VB.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>WB(e,t)},flatten:{value:t=>UB(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,sB,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,sB,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),eK=GB($G),tK=qB($G),nK=YB($G),rK=ZB($G),iK=$B($G),aK=eV($G),oK=tV($G),sK=nV($G),cK=rV($G),lK=iV($G),uK=aV($G),dK=oV($G),fK=new WeakMap;function pK(e,t,n){let r=Object.getPrototypeOf(e),i=fK.get(r);if(i||(i=new Set,fK.set(r,i)),!i.has(t)){i.add(t);for(let e in n){let t=n[e];Object.defineProperty(r,e,{configurable:!0,enumerable:!1,get(){let n=t.bind(this);return Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:n}),n},set(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,enumerable:!0,value:t})}})}}}var mK=Z(`ZodType`,(e,t)=>(YV.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:oW(e,`input`),output:oW(e,`output`)}}),e.toJSONSchema=aW(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(t,n)=>eK(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>nK(e,t,n),e.parseAsync=async(t,n)=>tK(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>rK(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>iK(e,t,n),e.decode=(t,n)=>aK(e,t,n),e.encodeAsync=async(t,n)=>oK(e,t,n),e.decodeAsync=async(t,n)=>sK(e,t,n),e.safeEncode=(t,n)=>cK(e,t,n),e.safeDecode=(t,n)=>lK(e,t,n),e.safeEncodeAsync=async(t,n)=>uK(e,t,n),e.safeDecodeAsync=async(t,n)=>dK(e,t,n),pK(e,`ZodType`,{check(...e){let t=this.def;return this.clone(mB(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return wB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(yq(e,t))},superRefine(e,t){return this.check(bq(e,t))},overwrite(e){return this.check(WU(e))},optional(){return tq(this)},exactOptional(){return rq(this)},nullable(){return aq(this)},nullish(){return tq(aq(this))},nonoptional(e){return dq(this,e)},array(){return UK(this)},or(e){return qK([this,e])},and(e){return YK(this,e)},transform(e){return hq(this,$K(e))},default(e){return sq(this,e)},prefault(e){return lq(this,e)},catch(e){return pq(this,e)},pipe(e){return hq(this,e)},readonly(){return _q(this)},describe(e){let t=this.clone();return aU.add(t,{description:e}),t},meta(...e){if(e.length===0)return aU.get(this);let t=this.clone();return aU.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e){return e(this)}}),Object.defineProperty(e,"description",{get(){return aU.get(e)?.description},configurable:!0}),e)),hK=Z(`_ZodString`,(e,t)=>{XV.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cW(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,pK(e,`_ZodString`,{regex(...e){return this.check(RU(...e))},includes(...e){return this.check(VU(...e))},startsWith(...e){return this.check(HU(...e))},endsWith(...e){return this.check(UU(...e))},min(...e){return this.check(IU(...e))},max(...e){return this.check(FU(...e))},length(...e){return this.check(LU(...e))},nonempty(...e){return this.check(IU(1,...e))},lowercase(e){return this.check(zU(e))},uppercase(e){return this.check(BU(e))},trim(){return this.check(KU())},normalize(...e){return this.check(GU(...e))},toLowerCase(){return this.check(qU())},toUpperCase(){return this.check(JU())},slugify(){return this.check(YU())}})}),gK=Z(`ZodString`,(e,t)=>{XV.init(e,t),hK.init(e,t),e.email=t=>e.check(sU(yK,t)),e.url=t=>e.check(pU(SK,t)),e.jwt=t=>e.check(OU(LK,t)),e.emoji=t=>e.check(mU(CK,t)),e.guid=t=>e.check(cU(bK,t)),e.uuid=t=>e.check(lU(xK,t)),e.uuidv4=t=>e.check(uU(xK,t)),e.uuidv6=t=>e.check(dU(xK,t)),e.uuidv7=t=>e.check(fU(xK,t)),e.nanoid=t=>e.check(hU(wK,t)),e.guid=t=>e.check(cU(bK,t)),e.cuid=t=>e.check(gU(TK,t)),e.cuid2=t=>e.check(_U(EK,t)),e.ulid=t=>e.check(vU(DK,t)),e.base64=t=>e.check(TU(PK,t)),e.base64url=t=>e.check(EU(FK,t)),e.xid=t=>e.check(yU(OK,t)),e.ksuid=t=>e.check(bU(kK,t)),e.ipv4=t=>e.check(xU(AK,t)),e.ipv6=t=>e.check(SU(jK,t)),e.cidrv4=t=>e.check(CU(MK,t)),e.cidrv6=t=>e.check(wU(NK,t)),e.e164=t=>e.check(DU(IK,t)),e.datetime=t=>e.check(KG(t)),e.date=t=>e.check(JG(t)),e.time=t=>e.check(XG(t)),e.duration=t=>e.check(QG(t))});function _K(e){return oU(gK,e)}var vK=Z(`ZodStringFormat`,(e,t)=>{ZV.init(e,t),hK.init(e,t)}),yK=Z(`ZodEmail`,(e,t)=>{eH.init(e,t),vK.init(e,t)}),bK=Z(`ZodGUID`,(e,t)=>{QV.init(e,t),vK.init(e,t)}),xK=Z(`ZodUUID`,(e,t)=>{$V.init(e,t),vK.init(e,t)}),SK=Z(`ZodURL`,(e,t)=>{tH.init(e,t),vK.init(e,t)}),CK=Z(`ZodEmoji`,(e,t)=>{nH.init(e,t),vK.init(e,t)}),wK=Z(`ZodNanoID`,(e,t)=>{rH.init(e,t),vK.init(e,t)}),TK=Z(`ZodCUID`,(e,t)=>{iH.init(e,t),vK.init(e,t)}),EK=Z(`ZodCUID2`,(e,t)=>{aH.init(e,t),vK.init(e,t)}),DK=Z(`ZodULID`,(e,t)=>{oH.init(e,t),vK.init(e,t)}),OK=Z(`ZodXID`,(e,t)=>{sH.init(e,t),vK.init(e,t)}),kK=Z(`ZodKSUID`,(e,t)=>{cH.init(e,t),vK.init(e,t)}),AK=Z(`ZodIPv4`,(e,t)=>{pH.init(e,t),vK.init(e,t)}),jK=Z(`ZodIPv6`,(e,t)=>{mH.init(e,t),vK.init(e,t)}),MK=Z(`ZodCIDRv4`,(e,t)=>{hH.init(e,t),vK.init(e,t)}),NK=Z(`ZodCIDRv6`,(e,t)=>{gH.init(e,t),vK.init(e,t)}),PK=Z(`ZodBase64`,(e,t)=>{vH.init(e,t),vK.init(e,t)}),FK=Z(`ZodBase64URL`,(e,t)=>{bH.init(e,t),vK.init(e,t)}),IK=Z(`ZodE164`,(e,t)=>{xH.init(e,t),vK.init(e,t)}),LK=Z(`ZodJWT`,(e,t)=>{CH.init(e,t),vK.init(e,t)}),RK=Z(`ZodUnknown`,(e,t)=>{wH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function zK(){return NU(RK)}var BK=Z(`ZodNever`,(e,t)=>{TH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lW(e,t,n,r)});function VK(e){return PU(BK,e)}var HK=Z(`ZodArray`,(e,t)=>{DH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pW(e,t,n,r),e.element=t.element,pK(e,`ZodArray`,{min(e,t){return this.check(IU(e,t))},nonempty(e){return this.check(IU(1,e))},max(e,t){return this.check(FU(e,t))},length(e,t){return this.check(LU(e,t))},unwrap(){return this.element}})});function UK(e,t){return XU(HK,e,t)}var WK=Z(`ZodObject`,(e,t)=>{MH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mW(e,t,n,r),fB(e,`shape`,()=>t.shape),pK(e,`ZodObject`,{keyof(){return ZK(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:zK()})},loose(){return this.clone({...this._zod.def,catchall:zK()})},strict(){return this.clone({...this._zod.def,catchall:VK()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return OB(this,e)},safeExtend(e){return kB(this,e)},merge(e){return AB(this,e)},pick(e){return EB(this,e)},omit(e){return DB(this,e)},partial(...e){return jB(eq,this,e[0])},required(...e){return MB(uq,this,e[0])}})});function GK(e,t){return new WK({type:`object`,shape:e??{},...Q(t)})}var KK=Z(`ZodUnion`,(e,t)=>{PH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hW(e,t,n,r),e.options=t.options});function qK(e,t){return new KK({type:`union`,options:e,...Q(t)})}var JK=Z(`ZodIntersection`,(e,t)=>{FH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gW(e,t,n,r)});function YK(e,t){return new JK({type:`intersection`,left:e,right:t})}var XK=Z(`ZodEnum`,(e,t)=>{RH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uW(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new XK({...t,checks:[],...Q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new XK({...t,checks:[],...Q(r),entries:i})}});function ZK(e,t){return new XK({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var QK=Z(`ZodTransform`,(e,t)=>{zH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fW(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new rB(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(zB(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(zB(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function $K(e){return new QK({type:`transform`,transform:e})}var eq=Z(`ZodOptional`,(e,t)=>{VH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function tq(e){return new eq({type:`optional`,innerType:e})}var nq=Z(`ZodExactOptional`,(e,t)=>{HH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rq(e){return new nq({type:`optional`,innerType:e})}var iq=Z(`ZodNullable`,(e,t)=>{UH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_W(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function aq(e){return new iq({type:`nullable`,innerType:e})}var oq=Z(`ZodDefault`,(e,t)=>{WH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function sq(e,t){return new oq({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():xB(t)}})}var cq=Z(`ZodPrefault`,(e,t)=>{KH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function lq(e,t){return new cq({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():xB(t)}})}var uq=Z(`ZodNonOptional`,(e,t)=>{qH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function dq(e,t){return new uq({type:`nonoptional`,innerType:e,...Q(t)})}var fq=Z(`ZodCatch`,(e,t)=>{YH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function pq(e,t){return new fq({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var mq=Z(`ZodPipe`,(e,t)=>{XH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SW(e,t,n,r),e.in=t.in,e.out=t.out});function hq(e,t){return new mq({type:`pipe`,in:e,out:t})}var gq=Z(`ZodReadonly`,(e,t)=>{QH.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function _q(e){return new gq({type:`readonly`,innerType:e})}var vq=Z(`ZodCustom`,(e,t)=>{eU.init(e,t),mK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dW(e,t,n,r)});function yq(e,t={}){return ZU(vq,e,t)}function bq(e,t){return QU(e,t)}var xq={key:`save-dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"en-GB":{"deleteButton":{"text":"Delete dictionary","label":"Click to delete dictionary"},"resetButton":{"text":"Reset all changes","label":"Click to reset all the changes"},"saveButton":{"text":"Save changes","label":"Click to save changes"},"publishButton":{"text":"Publish dictionary","label":"Click to publish dictionary"},"downloadButton":{"text":"Download","label":"Click to download"},"confirmation":{"title":"Confirmation","message":"This will overwrite the existing dictionary. Are you sure you want to continue?","confirmButton":{"text":"Confirm","label":"Click to confirm"},"cancelButton":{"text":"Cancel","label":"Click to cancel"}}},"fr":{"deleteButton":{"text":"Supprimer le dictionnaire","label":"Cliquez pour supprimer le dictionnaire"},"resetButton":{"text":"Réinitialiser toutes les modifications","label":"Cliquez pour réinitialiser toutes les modifications"},"saveButton":{"text":"Enregistrer les modifications","label":"Cliquez pour enregistrer les modifications"},"publishButton":{"text":"Publier dictionnaire","label":"Cliquez pour publier dictionnaire"},"downloadButton":{"text":"Télécharger","label":"Cliquez pour télécharger"},"confirmation":{"title":"Confirmation","message":"Cela remplacera le dictionnaire existant. Êtes-vous sûr de vouloir continuer?","confirmButton":{"text":"Confirmer","label":"Cliquez pour confirmer"},"cancelButton":{"text":"Annuler","label":"Cliquez pour annuler"}}},"es":{"deleteButton":{"text":"Eliminar diccionario","label":"Haga clic para eliminar el diccionario"},"resetButton":{"text":"Restablecer todas las modificaciones","label":"Haga clic para restablecer todas las modificaciones"},"saveButton":{"text":"Guardar cambios","label":"Haga clic para guardar cambios"},"publishButton":{"text":"Publicar diccionario","label":"Haga clic para publicar diccionario"},"downloadButton":{"text":"Descargar","label":"Haga clic para descargar"},"confirmation":{"title":"Confirmación","message":"Esto sobrescribirá el diccionario existente. ¿Estás seguro de que quieres continuar?","confirmButton":{"text":"Confirmar","label":"Haga clic para confirmar"},"cancelButton":{"text":"Cancelar","label":"Haga clic para cancelar"}}},"de":{"deleteButton":{"text":"Wörterbuch löschen","label":"Klicken Sie, um das Wörterbuch zu löschen"},"resetButton":{"text":"Alle Änderungen zurücksetzen","label":"Klicken Sie, um alle Änderungen zurückzusetzen"},"saveButton":{"text":"Änderungen speichern","label":"Klicken Sie, um Änderungen zu speichern"},"publishButton":{"text":"Wörterbuch veröffentlichen","label":"Klicken Sie, um das Wörterbuch zu veröffentlichen"},"downloadButton":{"text":"Herunterladen","label":"Klicken Sie, um herunterzuladen"},"confirmation":{"title":"Bestätigung","message":"Dies wird das existierende Wörterbuch überschreiben. Sind Sie sicher, dass Sie fortfahren möchten?","confirmButton":{"text":"Bestätigen","label":"Klicken Sie, um zu bestätigen"},"cancelButton":{"text":"Abbrechen","label":"Klicken Sie, um abzubrechen"}}},"ja":{"deleteButton":{"text":"辞書を削除","label":"辞書を削除するにはクリックしてください"},"resetButton":{"text":"すべての変更をリセット","label":"すべての変更をリセットするにはクリックしてください"},"saveButton":{"text":"変更を保存","label":"変更を保存するにはクリックしてください"},"publishButton":{"text":"辞書を公開","label":"辞書を公開するにはクリックしてください"},"downloadButton":{"text":"ダウンロード","label":"ダウンロードするにはクリックしてください"},"confirmation":{"title":"確認","message":"既存の辞書を上書きします。続行しますか?","confirmButton":{"text":"確認","label":"確認するにはクリックしてください"},"cancelButton":{"text":"キャンセル","label":"キャンセルするにはクリックしてください"}}},"ko":{"deleteButton":{"text":"사전 삭제","label":"사전을 삭제하려면 클릭하세요"},"resetButton":{"text":"모든 변경 사항 초기화","label":"모든 변경 사항을 초기화하려면 클릭하세요"},"saveButton":{"text":"변경 사항 저장","label":"변경 사항을 저장하려면 클릭하세요"},"publishButton":{"text":"사전을 게시합니다","label":"사전을 게시하려면 클릭하세요"},"downloadButton":{"text":"다운로드","label":"다운로드를 클릭하세요"},"confirmation":{"title":"확인","message":"이는 기존 사전을 덮어 쓸 것입니다. 계속하시겠습니까?","confirmButton":{"text":"확인","label":"확인을 클릭하세요"},"cancelButton":{"text":"취소","label":"취소를 클릭하세요"}}},"zh":{"deleteButton":{"text":"删除字典","label":"单击以删除字典"},"resetButton":{"text":"重置所有更改","label":"单击以重置所有更改"},"saveButton":{"text":"保存更改","label":"单击保存更改"},"publishButton":{"text":"发布字典","label":"单击以发布字典"},"downloadButton":{"text":"下载","label":"单击下载"},"confirmation":{"title":"确认","message":"这将覆盖现有的字典。你确定要继续吗?","confirmButton":{"text":"确认","label":"单击确认"},"cancelButton":{"text":"取消","label":"单击取消"}}},"it":{"deleteButton":{"text":"Elimina dizionario","label":"Fai clic per eliminare il dizionario"},"resetButton":{"text":"Reimposta tutte le modifiche","label":"Fai clic per ripristinare tutte le modifiche"},"saveButton":{"text":"Salva le modifiche","label":"Fai clic per salvare le modifiche"},"publishButton":{"text":"Pubblica dizionario","label":"Fai clic per pubblicare il dizionario"},"downloadButton":{"text":"Scarica","label":"Fai clic per scaricare"},"confirmation":{"title":"Conferma","message":"Questo sovrascriverà il dizionario esistente. Sei sicuro di voler continuare?","confirmButton":{"text":"Conferma","label":"Fai clic per confermare"},"cancelButton":{"text":"Annulla","label":"Fai clic per annullare"}}},"pt":{"deleteButton":{"text":"Excluir dicionário","label":"Clique para excluir o dicionário"},"resetButton":{"text":"Redefinir todas as alterações","label":"Clique para redefinir todas as alterações"},"saveButton":{"text":"Salvar alterações","label":"Clique para salvar alterações"},"publishButton":{"text":"Publicar dicionário","label":"Clique para publicar dicionário"},"downloadButton":{"text":"Baixar","label":"Clique para baixar"},"confirmation":{"title":"Confirmação","message":"Isso sobrescreverá o dicionário existente. Você tem certeza de que deseja continuar?","confirmButton":{"text":"Confirmar","label":"Clique para confirmar"},"cancelButton":{"text":"Cancelar","label":"Clique para cancelar"}}},"hi":{"deleteButton":{"text":"शब्दकोश हटाएं","label":"शब्दकोश हटाने के लिए क्लिक करें"},"resetButton":{"text":"सभी परिवर्तनों को रीसेट करें","label":"सभी परिवर्तनों को रीसेट करने के लिए क्लिक करें"},"saveButton":{"text":"परिवर्तनों को सहेजें","label":"परिवर्तनों को सहेजने के लिए क्लिक करें"},"publishButton":{"text":"शब्दकोश प्रकाशित करें","label":"शब्दकोश प्रकाशित करने के लिए क्लिक करें"},"downloadButton":{"text":"डाउनलोड","label":"डाउनलोड करने के लिए क्लिक करें"},"confirmation":{"title":"पुष्टि करें","message":"यह मौजूदा शब्दकोश को अधिलेखित कर देगा। क्या आप जारी रखना चाहते हैं?","confirmButton":{"text":"पुष्टि करें","label":"पुष्टि करने के लिए क्लिक करें"},"cancelButton":{"text":"रद्द करें","label":"रद्द करने के लिए क्लिक करें"}}},"ar":{"deleteButton":{"text":"حذف القاموس","label":"انقر لحذف القاموس"},"resetButton":{"text":"إعادة تعيين جميع التغييرات","label":"انقر لإعادة تعيين جميع التغييرات"},"saveButton":{"text":"احفظ التغييرات","label":"انقر لحفظ التغييرات"},"publishButton":{"text":"نشر القاموس","label":"انقر لنشر القاموس"},"downloadButton":{"text":"تنزيل","label":"انقر لتنزيل"},"confirmation":{"title":"تأكيد","message":"سيتم الكتابة على القاموس الحالي. هل أنت متأكد من أنك تريد المتابعة؟","confirmButton":{"text":"تأكيد","label":"انقر لتأكيد"},"cancelButton":{"text":"إلغاء","label":"انقر لإلغاء"}}},"ru":{"deleteButton":{"text":"Удалить словарь","label":"Нажмите, чтобы удалить словарь"},"resetButton":{"text":"Сбросить все изменения","label":"Нажмите, чтобы сбросить все изменения"},"saveButton":{"text":"Сохранить изменения","label":"Нажмите, чтобы сохранить изменения"},"publishButton":{"text":"Опубликовать словарь","label":"Нажмите, чтобы опубликовать словарь"},"downloadButton":{"text":"Скачать","label":"Нажмите, чтобы скачать"},"confirmation":{"title":"Подтверждение","message":"Это перезапишет существующий словарь. Вы уверены, что хотите продолжить?","confirmButton":{"text":"Подтвердить","label":"Нажмите, чтобы подтвердить"},"cancelButton":{"text":"Отмена","label":"Нажмите, чтобы отменить"}}}}}`),localIds:[`save-dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/SaveForm/saveForm.content.mjs`]},Sq=e=>{let t=(0,V.c)(3),[n,r]=(0,D.useState)(e),i,a;return t[0]===e?(i=t[1],a=t[2]):(i=()=>{r(e??window.document.body)},a=[e],t[0]=e,t[1]=i,t[2]=a),(0,D.useEffect)(i,a),n},Cq=new class{listeners=new Set;scrollBlockers=[];subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.scrollBlockers;addBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);if(n){if(n.blockers.includes(e))return;this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:[...n.blockers,e]}:n)}else t.style.overflowY=`hidden`,t.style.overflowX=`hidden`,this.scrollBlockers=[...this.scrollBlockers,{element:t,blockers:[e]}];this.emit()};removeBlockage=(e,t)=>{let n=this.scrollBlockers.find(e=>e.element===t);n&&(n.blockers.length>1?this.scrollBlockers=this.scrollBlockers.map(n=>n.element===t?{...n,blockers:n.blockers.filter(t=>t!==e)}:n):(t.style.overflowY=``,t.style.overflowX=``,this.scrollBlockers=this.scrollBlockers.filter(e=>e.element!==t)),this.emit())};isElementScrollBlocked=e=>this.scrollBlockers.some(t=>t.element===e);emit=()=>{this.listeners.forEach(e=>{e()})}},wq=[],Tq=()=>{let e=(0,V.c)(2),t=(0,D.useSyncExternalStore)(Cq.subscribe,Cq.getSnapshot,Eq),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:Cq.addBlockage,removeBlockage:Cq.removeBlockage,isElementScrollBlocked:Cq.isElementScrollBlocked},e[0]=t,e[1]=n),n};function Eq(){return wq}var Dq=e=>{let t=(0,V.c)(14),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{disableScroll:r,element:i,key:a}=n,o=r===void 0?!1:r,s=a===void 0?`unnamed_blocker`:a,{isElementScrollBlocked:c,addBlockage:l,removeBlockage:u}=Tq(),d=Sq(i),f,p;t[2]!==l||t[3]!==o||t[4]!==i||t[5]!==s||t[6]!==u?(f=()=>{let e=i??window.document.body;return o?l(s,e):u(s,e),()=>{u(s,e)}},p=[l,o,i,s,u],t[2]=l,t[3]=o,t[4]=i,t[5]=s,t[6]=u,t[7]=f,t[8]=p):(f=t[7],p=t[8]),(0,D.useEffect)(f,p);let m;t[9]!==d||t[10]!==c?(m=d?c(d):!1,t[9]=d,t[10]=c,t[11]=m):m=t[11];let h;return t[12]===m?h=t[13]:(h={isScrollBlocked:m},t[12]=m,t[13]=h),h},Oq=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,kq=`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`,Aq=({className:e,...t})=>(0,O.jsx)(`h1`,{className:G(`font-bold text-2xl`,e),...t}),jq=({className:e,...t})=>(0,O.jsx)(`h2`,{className:G(`mb-2 font-bold text-2xl`,Oq,e),...t}),Mq=({className:e,...t})=>(0,O.jsx)(`h3`,{className:G(`mb-2 font-bold text-xl`,Oq,e),...t}),Nq=({className:e,...t})=>(0,O.jsx)(`h4`,{className:G(`font-bold text-lg`,Oq,e),...t}),Pq=({className:e,...t})=>(0,O.jsx)(`h5`,{className:G(`font-bold text-base`,Oq,e),...t}),Fq=({className:e,...t})=>(0,O.jsx)(`h6`,{className:G(`ml-3 font-bold text-base`,Oq,e),...t}),Iq=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Lq=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},Rq=(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},zq=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Iq(t):void 0;return(0,O.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(Rq(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Lq(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:G(r&&kq,n),...i,children:t})},Bq=({isClickable:e,...t})=>(0,O.jsx)(Aq,{...t}),Vq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:jq,isClickable:e,...t}),Hq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:Mq,isClickable:e,...t}),Uq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:Nq,isClickable:e,...t}),Wq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:Pq,isClickable:e,...t}),Gq=({isClickable:e=!1,...t})=>(0,O.jsx)(zq,{H:Fq,isClickable:e,...t}),Kq=tu(`flex cursor-default flex-col overflow-hidden shadow-sm`,{variants:{size:{sm:`h-auto max-h-[30vh] w-[95vw] max-w-xl`,md:`h-auto max-h-[50vh] w-[95vw] max-w-xl`,lg:`h-auto max-h-[70vh] w-[95vw] max-w-4xl`,xl:`h-auto max-h-[95vh] w-[95vw] max-w-6xl`,unset:`h-auto max-h-[95vh] w-[95vw]`}},defaultVariants:{size:`unset`}}),qq={none:`p-0`,sm:`px-2 py-4`,md:`px-4 py-6`,lg:`px-6 py-8`,xl:`px-8 py-10`,"2xl":`px-10 py-12`},Jq=Rx.create(_E),Yq=e=>{let t=(0,V.c)(9),{children:n,isOpen:r,container:i,onClose:a,hasCloseButton:o,title:s,size:c,className:l,isScrollable:u,disableScroll:d,padding:f,...p}=e,m=o===void 0?!1:o,h=c===void 0?`md`:c,g=u===void 0?!1:u,_=d===void 0?!0:d,v=f===void 0?`none`:f,y=Sq(i),b=r&&_,x;t[0]===b?x=t[1]:(x={key:`modal`,disableScroll:b},t[0]=b,t[1]=x),Dq(x);let S,C;if(t[2]!==r||t[3]!==a?(S=()=>{let e=e=>{e.key===`Escape`&&r&&a&&a()};return document.addEventListener(`keydown`,e),()=>{document.removeEventListener(`keydown`,e)}},C=[r,a],t[2]=r,t[3]=a,t[4]=S,t[5]=C):(S=t[4],C=t[5]),(0,D.useEffect)(S,C),!y){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(O.Fragment,{}),t[6]=e):e=t[6],e}let w=!!s,T=qq[v||`none`],E;return t[7]===a?E=t[8]:(E=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=E),(0,Sc.createPortal)((0,O.jsx)(Rx.div,{className:`invisible fixed top-0 left-0 z-50 flex size-full cursor-pointer items-center justify-center overflow-hidden bg-background/40 backdrop-blur`,animate:r?`visible`:`invisible`,variants:{visible:{opacity:1,visibility:`visible`,transition:{duration:.1,when:`beforeChildren`}},invisible:{opacity:0,visibility:`hidden`,transition:{duration:.1,when:`afterChildren`}}},onClick:E,"aria-hidden":!r,children:(0,O.jsxs)(Jq,{onClick:Xq,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:Kq({size:h,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,O.jsxs)(`div`,{className:G(`relative flex-none px-4 pt-4`,m&&w?`flex items-start`:m?`flex justify-end`:w?`items-center`:`hidden`),children:[w&&(0,O.jsx)(Hq,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Ru,size:`icon-md`})]}),(0,O.jsx)(`div`,{className:G(`flex min-h-0 w-full flex-1 flex-col`,g===!0&&`overflow-auto`,g===`y`&&`overflow-y-auto overflow-x-hidden`,g===`x`&&`overflow-x-auto overflow-y-hidden`,!g&&`overflow-visible`),children:(0,O.jsx)(`div`,{className:G(`flex size-full flex-1 flex-col`,T),children:n})})]})}),y)};function Xq(e){return e.stopPropagation()}var Zq=e=>{let t=(0,V.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,D.useState)(!1),{setLocaleDictionary:u}=QS(),{mutate:d,isPending:f}=uE(),{mutate:p,isPending:m}=fE(),{mutate:h,isPending:g}=lE(),_=m||g,{editedContent:v,restoreEditedContent:y}=oC(),{deleteButton:b,resetButton:x,saveButton:S,publishButton:C,downloadButton:w,confirmation:T}=_t(xq),{isAuthenticated:E}=XT(),k=v?.[n.localId],A;t[0]!==n||t[1]!==k?(A=k&&JSON.stringify(k)!==JSON.stringify(n),t[0]=n,t[1]=k,t[2]=A):A=t[2];let j=A,M=n?.id!==void 0,N;t[3]!==n||t[4]!==v||t[5]!==o||t[6]!==y||t[7]!==u||t[8]!==p?(N=async()=>{v?.[n.localId]&&p({dictionary:{...n,...v?.[n.localId]}},{onSuccess:()=>{u(v?.[n.localId]),y(n.localId),l(!1),o?.()}})},t[3]=n,t[4]=v,t[5]=o,t[6]=y,t[7]=u,t[8]=p,t[9]=N):N=t[9];let P=N,F;t[10]!==n||t[11]!==v||t[12]!==o||t[13]!==h||t[14]!==y||t[15]!==u?(F=()=>{let e={...n,...v?.[n.localId]};h({dictionaries:[e]},{onSuccess:t=>{t&&(u(e),y(n.localId),o?.())}})},t[10]=n,t[11]=v,t[12]=o,t[13]=h,t[14]=y,t[15]=u,t[16]=F):F=t[16];let I=F,L;t[17]!==d||t[18]!==n||t[19]!==a?(L=()=>{n.id&&d({dictionaryId:n.id},{onSuccess:e=>{e&&a?.()}})},t[17]=d,t[18]=n,t[19]=a,t[20]=L):L=t[20];let ee=L,te;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(te=()=>l(!1),t[21]=te):te=t[21];let ne;return t[22]===Symbol.for(`react.memo_cache_sentinel`)?(ne=()=>l(!1),t[22]=ne):ne=t[22],(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Yq,{isOpen:c,title:T.title.value,size:`md`,onClose:te,padding:`md`,children:(0,O.jsxs)(`form`,{className:`size-full`,children:[(0,O.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:T.message}),(0,O.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,O.jsx)($.Button,{label:T.cancelButton.label.value,disabled:!j||_,color:`text`,className:`max-md:w-full`,variant:`outline`,onClick:ne,children:T.cancelButton.text}),(0,O.jsx)($.Button,{label:T.confirmButton.label.value,disabled:!j||_,Icon:Pu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:P,children:T.confirmButton.text})]})]})}),(0,O.jsxs)(`form`,{className:G(`flex justify-end gap-2`,i),...s,children:[r.includes(`remote`)&&M&&a&&E&&(0,O.jsx)($.Button,{label:b.label.value,Icon:Iu,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ee,children:b.text}),j&&(0,O.jsx)($.Button,{label:x.label.value,disabled:!j,Icon:Nu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>y(n.localId),children:x.text}),r.includes(`local`)&&(0,O.jsx)($.Button,{label:w.label.value,disabled:!j||_,Icon:Su,color:`text`,variant:E?`outline`:`default`,className:`max-md:w-full`,isLoading:m,onClick:()=>l(!0),children:w.text}),r.includes(`remote`)&&E&&!M&&(0,O.jsx)($.Button,{label:C.label.value,disabled:_,Icon:pu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:C.text}),r.includes(`remote`)&&E&&M&&j&&(0,O.jsx)($.Button,{label:S.label.value,disabled:!j||_,Icon:Pu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:S.text})]})]})},Qq={key:`dictionary-field-editor`,content:{nodeType:`translation`,translation:{en:{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},"en-GB":{returnToDictionaryList:{label:`Return to dictionary list`,text:`Dictionary list`}},fr:{returnToDictionaryList:{label:`Retourner à la liste des dictionnaires`,text:`Liste des dictionnaires`}},es:{returnToDictionaryList:{label:`Volver a la lista de diccionarios`,text:`Lista de diccionarios`}},de:{returnToDictionaryList:{label:`Zurück zur Wörterbuchliste`,text:`Wörterbuchliste`}},ja:{returnToDictionaryList:{label:`辞書リストに戻る`,text:`辞書リスト`}},ko:{returnToDictionaryList:{label:`사전 목록으로 돌아가기`,text:`사전 목록`}},zh:{returnToDictionaryList:{label:`返回字典列表`,text:`字典列表`}},it:{returnToDictionaryList:{label:`Torna alla lista dei dizionari`,text:`Elenco dei dizionari`}},pt:{returnToDictionaryList:{label:`Retornar à lista de dicionários`,text:`Lista de dicionários`}},hi:{returnToDictionaryList:{label:`शब्दकोश सूची पर वापस जाएं`,text:`शब्दकोश सूची`}},ar:{returnToDictionaryList:{label:`العودة إلى قائمة القوامل`,text:`قائمة المعاجم`}},ru:{returnToDictionaryList:{label:`Вернуться к списку словарей`,text:`Список словарей`}}}},localIds:[`dictionary-field-editor::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/dictionaryFieldEditor.content.mjs`]},$q=(e,t=2e3,n,r)=>{let[i,a]=(0,D.useState)(!1);return{isCopied:i,copy:async()=>{if(e)try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(e);else{r?.(Error(`Clipboard API not supported in this browser`));return}a(!0),setTimeout(()=>a(!1),t),n?.()}catch(e){let t=e instanceof Error?e.message:`Failed to copy to clipboard`;r?.(e instanceof Error?e:Error(t))}}}},eJ=e=>{let t=(0,V.c)(14),{text:n,children:r,className:i,"aria-label":a,"aria-copied-label":o,feedbackDuration:s,onCopySuccess:c,onCopyError:l,disable:u,preventDefault:d,stopPropagation:f,size:p}=e,m=a===void 0?`Copy to clipboard`:a,h=o===void 0?`Copied to clipboard`:o,g=s===void 0?2e3:s,_=d===void 0?!0:d,v=f===void 0?!0:f,y=p===void 0?14:p,{isCopied:b,copy:x}=$q(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,O.jsx)(`span`,{className:i,children:r}),t[0]=r,t[1]=i,t[2]=e):e=t[2],e}let S;if(t[3]!==h||t[4]!==m||t[5]!==r||t[6]!==i||t[7]!==x||t[8]!==b||t[9]!==_||t[10]!==y||t[11]!==v||t[12]!==n){let e=e=>{(e.key===`Enter`||e.key===` `)&&a(e)},a=e=>{_&&e.preventDefault(),v&&e.stopPropagation(),x()},o=b?h:m,s=b?bu:xu;S=(0,O.jsxs)(`span`,{className:G(`inline-flex max-w-full cursor-pointer items-center gap-2 rounded-md p-0.5 hover:bg-neutral/10`,i),onClick:a,onKeyDown:e,role:`button`,tabIndex:0,"aria-label":o,"aria-pressed":b,"data-testid":`copy-to-clipboard`,children:[(0,O.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,O.jsx)(s,{className:`ml-1 ml-auto shrink-0`,size:y,"aria-hidden":`true`})]}),t[3]=h,t[4]=m,t[5]=r,t[6]=i,t[7]=x,t[8]=b,t[9]=_,t[10]=y,t[11]=v,t[12]=n,t[13]=S}else S=t[13];return S},tJ=tu(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,error:`border-error bg-error text-error`,neutral:`border-neutral text-neutral`,light:`border-white text-white`,dark:`border-neutral-800 text-neutral-800`,text:`border-text text-text`}},defaultVariants:{color:`primary`}}),nJ=tu(`absolute -z-1 rounded-lg duration-300 ease-in-out motion-reduce:transition-none`,{variants:{color:{primary:`bg-primary/10 aria-selected:text-text`,secondary:`bg-secondary/10 aria-selected:text-text`,error:`bg-error/10 aria-selected:text-text`,neutral:`bg-neutral/10 aria-selected:text-white/10`,light:`bg-white/10 aria-selected:text-black`,dark:`bg-neutral-800/10 aria-selected:text-white`,text:`bg-text/10 aria-selected:text-text-opposite`},orientation:{horizontal:`top-0 h-full w-auto transition-[left,width]`,vertical:`left-0 h-auto w-full transition-[top,height]`}},defaultVariants:{orientation:`horizontal`}}),rJ=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,D.useRef)([]),c=(0,D.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=OE(s,{isHoverable:i,orientation:a});return(0,D.useEffect)(()=>{u()},[t]),(0,O.jsxs)(`div`,{className:G(tJ({color:r}),o),"aria-orientation":a,"aria-multiselectable":`false`,role:`tablist`,children:[e.map((e,r)=>{let i=e.key,a=t===i;return(0,D.cloneElement)(e,{key:i??r,role:`tab`,onClick:t=>{e.props?.onClick?.(t),n?.(i)},"aria-selected":a,"data-active":a,tabIndex:a?0:-1,ref:e=>{s.current[r]=e}})}),l&&(0,O.jsx)(`div`,{className:G(nJ({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},iJ={key:`dictionary-details`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Distant","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"en-GB":{"titleInput":{"label":"Title","description":"The title of your dictionary allows you to easily identify it","placeholder":"Enter the title of your dictionary"},"keyInput":{"label":"Key","description":"The key of your dictionary is used to identify it in the application","placeholder":"Enter the key of your dictionary"},"descriptionInput":{"label":"Description","placeholder":"Enter the description of your dictionary","description":"The description of your dictionary allows you to easily identify it using keywords. It is also used to search for your dictionary, and to assist the AI in understanding your dictionary."},"projectInput":{"label":"Projects","description":"A dictionary can be associated with one or more projects. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select one or more projects to associate with your dictionary"},"tagsSelect":{"label":"Tags","description":"A dictionary can be associated with one or more tags. This allows you to load the dictionary on different applications, and share it across different teams.","placeholder":"Select the tags to associate with your dictionary"},"locationSelect":{"label":"Location","local":"Local","remote":"Remote","testDescription":"The location determines whether your dictionary is stored locally, remotely, or both."},"importModeSelect":{"label":"Import mode","description":"The import mode determines how your dictionary is imported in your application.","static":"Static","dynamic":"Dynamic","live":"Fetch"},"filePathInput":{"label":"File path","description":"The file path of your dictionary allows you to identify it in your project.","placeholder":"Enter the file path of your dictionary"},"auditButton":{"label":"Audit"}},"fr":{"titleInput":{"label":"Titre","description":"Le titre de votre dictionnaire permet de l'identifier facilement","placeholder":"Entrez le titre de votre dictionnaire"},"keyInput":{"label":"Clé","description":"La clé de votre dictionnaire est utilisée pour l'identifier dans l'application","placeholder":"Entrez la clé de votre dictionnaire"},"descriptionInput":{"label":"Description","placeholder":"Entrez la description de votre dictionnaire","description":"La description de votre dictionnaire permet de l'identifier facilement en utilisant des mots-clés. Elle est également utilisée pour rechercher votre dictionnaire et pour aider l'IA à comprendre votre dictionnaire."},"projectInput":{"label":"Projets","description":"Un dictionnaire peut être associé à un ou plusieurs projets. Cela permet de charger le dictionnaire sur différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez un ou plusieurs projets à associer à votre dictionnaire"},"tagsSelect":{"label":"Tags","description":"Un dictionnaire peut être associé à un ou plusieurs tags. Cela permet de charger le dictionnaire dans différentes applications et de le partager entre différentes équipes.","placeholder":"Sélectionnez les tags à associer à votre dictionnaire"},"locationSelect":{"label":"Emplacement","local":"Local","remote":"Distant","testDescription":"La localisation détermine si votre dictionnaire est stocké localement, à distance ou les deux."},"importModeSelect":{"label":"Mode d'importation","description":"Le mode d'importation détermine comment votre dictionnaire est importé dans votre application.","static":"Statique","dynamic":"Dynamique","live":"Fetch"},"filePathInput":{"label":"Chemin du fichier","description":"Le chemin du fichier de votre dictionnaire permet de l'identifier dans votre projet.","placeholder":"Entrez le chemin du fichier de votre dictionnaire"},"auditButton":{"label":"Auditer"}},"es":{"titleInput":{"label":"Título","description":"El título de su diccionario le permite identificar fácilmente","placeholder":"Ingrese le título de su diccionario"},"keyInput":{"label":"Clave","description":"La clave de su diccionario se utiliza para identificarla en la aplicación","placeholder":"Ingrese la clave de su diccionario"},"descriptionInput":{"label":"Descripción","placeholder":"Ingrese la descripción de su diccionario","description":"La descripción de su diccionario le permite identificar fácilmente el contenido utilizando palabras clave. También se utiliza para buscar su diccionario y para ayudar a la IA a entender su diccionario."},"projectInput":{"label":"Proyectos","description":"Un diccionario puede estar asociado con uno o más proyectos. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione uno o más proyectos para asociar con su diccionario"},"tagsSelect":{"label":"Etiquetas","description":"Un diccionario puede estar asociado con una o más etiquetas. Esto permite cargar el diccionario en diferentes aplicaciones y compartirlo entre diferentes equipos.","placeholder":"Seleccione los tags para asociar con su diccionario"},"locationSelect":{"label":"Ubicación","local":"Local","remote":"Distante","testDescription":"La ubicación determina si su dictionnaire se almacena localmente, de forma remota o ambos."},"importModeSelect":{"label":"Modo de importación","description":"El modo de importación determina cómo se importa su dictionnaire en su aplicación.","static":"Estático","dynamic":"Dinámico","live":"Fetch"},"filePathInput":{"label":"Ruta del archivo","description":"La ruta del archivo de su dictionnaire le permite identificarlo en su proyecto.","placeholder":"Ingrese la ruta del archivo de su diccionario"},"auditButton":{"label":"Auditar"}},"de":{"titleInput":{"label":"Titel","description":"Der Titel Ihres Wörterbuchs ermöglicht es Ihnen, es leicht zu identifizieren","placeholder":"Geben Sie den Titel Ihres Wörterbuchs ein"},"keyInput":{"label":"Schlüssel","description":"Der Schlüssel Ihres Wörterbuchs wird verwendet, um es in der Anwendung zu identifizieren","placeholder":"Geben Sie den Schlüssel Ihres Wörterbuchs ein"},"descriptionInput":{"label":"Beschreibung","placeholder":"Geben Sie die Beschreibung Ihres Wörterbuchs ein","description":"Die Beschreibung Ihres Wörterbuchs ermöglicht es Ihnen, es mit Schlüsselwörtern leicht zu identifizieren. Sie wird auch verwendet, um nach Ihrem Wörterbuch zu suchen und der KI zu helfen, Ihr Wörterbuch zu verstehen."},"projectInput":{"label":"Projekte","description":"Ein Wörterbuch kann mit einem oder mehreren Projekten verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie ein oder mehrere Projekte aus, um sie mit Ihrem Wörterbuch zu verknüpfen"},"tagsSelect":{"label":"Tags","description":"Ein Wörterbuch kann mit einem oder mehreren Tags verknüpft werden. Dies ermöglicht es Ihnen, das Wörterbuch in verschiedenen Anwendungen zu laden und es in verschiedenen Teams zu teilen.","placeholder":"Wählen Sie die Tags, die mit Ihrem Wörterbuch verknüpft werden sollen"},"locationSelect":{"label":"Speicherort","local":"Lokal","remote":"Entfernt","testDescription":"Der Speicherort bestimmt, ob Ihr Wörterbuch lokal, remote oder beides gespeichert wird."},"importModeSelect":{"label":"Importmodus","description":"Der Importmodus bestimmt, wie Ihr Wörterbuch in Ihre Anwendung importiert wird.","static":"Statisch","dynamic":"Dynamisch","live":"Fetch"},"filePathInput":{"label":"Dateipfad","description":"Der Dateipfad Ihres Wörterbuchs ermöglicht es Ihnen, es in Ihrem Projekt zu identifizieren.","placeholder":"Geben Sie den Dateipfad Ihres Wörterbuchs ein"},"auditButton":{"label":"Prüfen"}},"ja":{"titleInput":{"label":"タイトル","description":"辞書のタイトルは、それを簡単に識別することができます","placeholder":"辞書のタイトルを入力してください"},"keyInput":{"label":"キー","description":"辞書のキーは、アプリケーション内でそれを識別するために使用されます","placeholder":"辞書のキーを入力してください"},"descriptionInput":{"label":"説明","placeholder":"辞書の説明を入力してください","description":"辞書の説明は、キーワードを使用して簡単に識別できます。また、辞書を検索するために使用され、AIが辞書を理解するのを助けます。"},"projectInput":{"label":"プロジェクト","description":"辞書は1つ以上のプロジェクトに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるプロジェクトを1つ以上選択してください"},"tagsSelect":{"label":"タグ","description":"辞書は1つ以上のタグに関連付けることができます。これにより、辞書を異なるアプリケーションにロードし、異なるチーム間で共有できます。","placeholder":"辞書に関連付けるタグを選択してください"},"locationSelect":{"label":"場所","local":"ローカル","remote":"リモート","testDescription":"ロケーションは辞書がローカル、リモート、またはその両方に保存されるかを決定します。"},"importModeSelect":{"label":"インポートモード","description":"インポートモードは、辞書がアプリケーションにどのようにインポートされるかを決定します。","static":"静的","dynamic":"動的","live":"Fetch"},"filePathInput":{"label":"ファイルパス","description":"辞書のファイルパスにより、プロジェクト内でそれを識別できます。","placeholder":"辞書のファイルパスを入力してください"},"auditButton":{"label":"監査"}},"ko":{"titleInput":{"label":"제목","description":"사전의 제목은 이를 쉽게 식별할 수 있게 해줍니다","placeholder":"사전의 제목을 입력하세요"},"keyInput":{"label":"키","description":"사전의 키는 애플리케이션에서 이를 식별하는 데 사용됩니다","placeholder":"사전의 키를 입력하세요"},"descriptionInput":{"label":"설명","placeholder":"사전의 설명을 입력하세요","description":"사전의 설명은 키워드를 사용하여 쉽게 식별할 수 있습니다. 또한 사전을 검색하고 AI가 사전을 이해하는 데 도움을 줍니다."},"projectInput":{"label":"프로젝트","description":"사전은 하나 이상의 프로젝트와 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 하나 이상의 프로젝트를 선택하세요"},"tagsSelect":{"label":"태그","description":"사전은 태그를 하나 이상의 태그로 연결할 수 있습니다. 이를 통해 사전을 다양한 애플리케이션에 로드하고 다양한 팀 간에 공유할 수 있습니다.","placeholder":"사전과 연결할 태그를 선택하세요"},"locationSelect":{"label":"위치","local":"로컬","remote":"원격","testDescription":"위치는 사전이 로컬, 원격 또는 둘 다에 저장되는지 결정합니다."},"importModeSelect":{"label":"가져오기 모드","description":"가져오기 모드는 사전이 애플리케이션에서 어떻게 가져와지는지 결정합니다.","static":"정적","dynamic":"동적","live":"Fetch"},"filePathInput":{"label":"파일 경로","description":"사전의 파일 경로를 통해 프로젝트에서 이를 식별할 수 있습니다.","placeholder":"사전의 파일 경로를 입력하세요"},"auditButton":{"label":"감사"}},"zh":{"titleInput":{"label":"标题","description":"字典的标题使您能够轻松识别它","placeholder":"输入字典的标题"},"keyInput":{"label":"键","description":"字典的键用于在应用程序中识别它","placeholder":"输入字典的键"},"descriptionInput":{"label":"描述","placeholder":"输入字典的描述","description":"您字典的描述使您能够使用关键字轻松地识别它。它还用于搜索您的字典,以及帮助 AI 理解您的字典。"},"projectInput":{"label":"项目","description":"字典可以与一个或多个项目关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择一个或多个项目以与您的字典关联"},"tagsSelect":{"label":"标签","description":"字典可以与一个 or 多个标签关联。这使您能够在不同的应用程序中加载字典,并在不同的团队之间共享。","placeholder":"选择与您的字典相关的标签"},"locationSelect":{"label":"位置","local":"本地","remote":"远程","testDescription":"位置决定您的词典是本地存储、远程存储还是同时两者。"},"importModeSelect":{"label":"导入模式","description":"导入模式决定了您的词典如何导入到您的应用程序中。","static":"静态","dynamic":"动态","live":"Fetch"},"filePathInput":{"label":"文件路径","description":"字典的文件路径使您能够在项目中识别它。","placeholder":"输入字典的文件路径"},"auditButton":{"label":"审核"}},"it":{"titleInput":{"label":"Titolo","description":"Il titolo del tuo dizionario ti consente di identificarlo facilmente","placeholder":"Inserisci il titolo del tuo dizionario"},"keyInput":{"label":"Chiave","description":"La chiave del tuo dizionario viene utilizzata per identificarlo nell'applicazione","placeholder":"Inserisci la chiave del tuo dizionario"},"descriptionInput":{"label":"Descrizione","placeholder":"Inserisci la descrizione del tuo dizionario","description":"La descrizione del tuo dizionario ti consente di identificarlo facilmente utilizzando parole chiave. Viene anche utilizzata per cercare il tuo dizionario e per assistere l'IA nella comprensione del tuo dizionario."},"projectInput":{"label":"Progetti","description":"Un dizionario può essere associato a uno o più progetti. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona uno o più progetti da associare al tuo dizionario"},"tagsSelect":{"label":"Tag","description":"Un dizionario può essere associato a uno o più tag. Questo ti consente di caricare il dizionario in diverse applicazioni e condividerlo tra diversi team.","placeholder":"Seleziona i tag da associare al tuo dizionario"},"locationSelect":{"label":"Posizione","local":"Locale","remote":"Remoto","testDescription":"La posizione determina se il tuo dizionario è archiviato localmente, da remoto o entrambi."},"importModeSelect":{"label":"Modalità di importazione","description":"La modalità di importazione determina il modo in cui il tuo dizionario viene importato nella tua applicazione.","static":"Statico","dynamic":"Dinamico","live":"Fetch"},"filePathInput":{"label":"Percorso del file","description":"Il percorso del file del tuo dizionario ti consente di identificarlo nel tuo progetto.","placeholder":"Inserisci il percorso del file del tuo dizionario"},"auditButton":{"label":"Controllare"}},"pt":{"titleInput":{"label":"Título","description":"O titolo do seu dicionário permite que você o identifique facilmente","placeholder":"Insira o título do seu dicionário"},"keyInput":{"label":"Chave","description":"A chave do seu dicionário é usada para identificá-lo no aplicativo","placeholder":"Insira a chave do seu dicionário"},"descriptionInput":{"label":"Descrição","placeholder":"Insira a descrição do seu dicionário","description":"A descrição do seu dicionário permite que você o identifique facilmente usando palavras-chave. Também é usada para pesquisar seu dicionário e para ajudar a IA a entender seu dicionário."},"projectInput":{"label":"Projetos","description":"Um dicionário pode ser associado a um ou mais projetos. Isso permite que você carregue o dicionário em differentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione um ou mais projetos para associar ao seu dicionário"},"tagsSelect":{"label":"Tags","description":"Um dicionário pode ser associado a um ou mais tags. Isso permite que você carregue o dicionário em diferentes aplicativos e o compartilhe entre diferentes equipes.","placeholder":"Selecione os tags para associar ao seu dicionário"},"locationSelect":{"label":"Localização","local":"Local","remote":"Remoto","testDescription":"A localização determina se o seu dicionário è armazenado localmente, remotamente ou ambos."},"importModeSelect":{"label":"Modo de importação","description":"O modo de importação determina como seu dicionário è importado em seu aplicativo.","static":"Estático","dynamic":"Dinâmico","live":"Fetch"},"filePathInput":{"label":"Caminho do arquivo","description":"O caminho do arquivo do seu dicionário permite que você o identifique em seu projeto.","placeholder":"Insira o caminho do arquivo do seu dicionário"},"auditButton":{"label":"Auditar"}},"hi":{"titleInput":{"label":"शीर्षक","description":"आपके शब्दकोश का शीर्षक इसे आसानी से पहचानने में मदद करता है","placeholder":"आपके शब्दकोश का शीर्षक दर्ज करें"},"keyInput":{"label":"कुंजी","description":"आपके शब्दकोश की कुंजी इसे एप्लिकेशन में पहचानने के लिए उपयोग की जाती है","placeholder":"अपने शब्दकोश की कुंजी दर्ज करें"},"descriptionInput":{"label":"विवरण","placeholder":"अपने शब्दकोश का विवरण दर्ज करें","description":"आपके शब्दकोश का विवरण आपको कुंजीशब्दों का उपयोग करके इसे आसानी से पहचानने की अनुमति देता है। इसका उपयोग आपके शब्दकोश की खोज करने और AI को आपके शब्दकोश को समझने में मदद करने के लिए भी किया जाता है।"},"projectInput":{"label":"परियोजनाएँ","description":"एक शब्दकोश को एक या अधिक परियोजनाओं से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए एक या अधिक परियोजनाएँ चुनें"},"tagsSelect":{"label":"टैग","description":"एक शब्दकोश को एक या अधिक टैग से जोड़ा जा सकता है। यह आपको विभिन्न अनुप्रयोगों में शब्दकोश लोड करने और विभिन्न टीमों के बीच साझा करने की अनुमति देता है।","placeholder":"अपने शब्दकोश से जोड़ने के लिए टैग का चयन करें"},"locationSelect":{"label":"स्थान","local":"स्थानीय","remote":"दूरस्थ","testDescription":"स्थान निर्धारित करता है कि आपका शब्दकोश स्थानीय, दूरस्थ या दोनों में संग्रहीत है।"},"importModeSelect":{"label":"आयात मोड","description":"आयात मोड यह निर्धारित करता है कि आपके शब्दकोश को आपके आवेदन में कैसे आयात किया जाता है।","static":"स्थैतिक","dynamic":"गतिशील","live":"Fetch"},"filePathInput":{"label":"फ़ाइल पथ","description":"आपके शब्दकोश का फ़ाइल पथ आपको अपने प्रोजेक्ट में इसे पहचानने की अनुमति देता है।","placeholder":"अपने शब्दकोश का फ़ाइल पथ दर्ज करें"},"auditButton":{"label":"ऑडिट"}},"ar":{"titleInput":{"label":"العنوان","description":"يتيح لك عنوان القاموس الخاص بك التعرف عليه بسهولة","placeholder":"أدخل عنوان القاموس الخاص بك"},"keyInput":{"label":"مفتاح","description":"مفتاح القاموس الخاص بك يُستخدم لتحديده في التطبيق","placeholder":"أدخل مفتاح القاموس الخاص بك"},"descriptionInput":{"label":"الوصف","placeholder":"أدخل وصف القاموس الخاص بك","description":"يتيح لك وصف القاموس الخاص بك التعرف عليه بسهولة باستخدام الكلمات الرئيسية. كما أنه يستخدم للبحث عن القاموس الخاص بك ، ولمساعدة الذكاء الاصطناعي على فهم القاموس الخاص بك."},"projectInput":{"label":"المشاريع","description":"يمكن ربط قاموس بواحد أو أكثر من المشاريع. وهذا يتيح لك تحميل القاموس على تطبيقات مختلفة ومشاركته عبر فرق مختلفة.","placeholder":"حدد مشروعًا أو أكثر لربطه بقاموسك"},"tagsSelect":{"label":"الوسوم","description":"يمكن ربط قاموس بواحد أو أكثر من الوسوم. يتيح لك تحميل القاموس في تطبيقات مختلفة ومشاركته بين فرق مختلفة.","placeholder":"حدد الوسوم التي تريد ربطها بقاموسك"},"locationSelect":{"label":"الموقع","local":"محلي","remote":"بعيد","testDescription":"الموقع يحدد ما إذا كان قاموسك يتم تخزينه محليًا أو عن بُعد أو كليهما."},"importModeSelect":{"label":"وضع الاستيراد","description":"يحدد وضع الاستيراد كيفية استيراد قاموسك في تطبيقك.","static":"ثابت","dynamic":"ديناميكي","live":"Fetch"},"filePathInput":{"label":"مسار الملف","description":"مسار ملف القاموس الخاص بك يسمح لك بتحديده في مشروعك.","placeholder":"أدخل مسار ملف القاموس الخاص بك"},"auditButton":{"label":"التدقيق"}},"ru":{"titleInput":{"label":"Заголовок","description":"Название вашего словаря позволяет легко его идентифицировать","placeholder":"Введите название вашего словаря"},"keyInput":{"label":"Ключ","description":"Ключ вашего словаря используется для его идентификации в приложении","placeholder":"Введите ключ вашего словаря"},"descriptionInput":{"label":"Описание","placeholder":"Введите описание вашего словаря","description":"Описание вашего словаря позволяет легко его идентифицировать с помощью ключевых слов. Оно также используется для поиска вашего словаря и для помощи ИИ в понимании вашего словаря."},"projectInput":{"label":"Проекты","description":"Словарь можно ассоциировать с одним или несколькими проектами. Это позволяет загружать словарь в различных приложениях и делиться им между разными командами.","placeholder":"Выберите один или несколько проектов, чтобы связать их с вашим словарем"},"tagsSelect":{"label":"Теги","description":"Словарь можно связать с одним или несколькими тегами. Это позволяет загружать словарь в различных приложениях и делиться им между различными командами.","placeholder":"Выберите теги, которые нужно связать с словарем"},"locationSelect":{"label":"Расположение","local":"Локальный","remote":"Удаленный","testDescription":"Расположение определяет, хранится ли ваш словарь локально, удаленно или и там, и там."},"importModeSelect":{"label":"Режим импорта","description":"Режим импорта определяет, как ваш словарь импортируется в ваше приложение.","static":"Статический","dynamic":"Динамический","live":"Fetch"},"filePathInput":{"label":"Путь к файлу","description":"Путь к файлу вашего словаря позволяет идентифицировать его в вашем проекте.","placeholder":"Введите путь к файлу вашего словаря"},"auditButton":{"label":"Отслеживание"}}}}`),localIds:[`dictionary-details::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/dictionaryDetails.content.mjs`]},aJ={key:`dictionary-detail-schema`,content:JSON.parse(`{"nodeType":"translation","translation":{"en":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"en-GB":{"titleRequiredError":"Please enter a name for your dictionary.","titleInvalidTypeError":"The dictionary name must be a valid string.","titleMinLengthError":"The dictionary name must be at least 4 characters long.","keyRequiredError":"Please enter a key for your dictionary.","keyInvalidTypeError":"The key must be a valid string.","keySpaceError":"The key cannot contain spaces or special characters.","keyMinLengthError":"The key must be at least 4 characters long.","descriptionRequiredError":"Please enter a description for your dictionary.","descriptionInvalidTypeError":"The description must be a valid string.","requiredErrorProjectId":"Please select a project","invalidTypeErrorProjectId":"Please select a valid project","invalidTypeErrorTags":"Please enter a valid tag","locationRequiredError":"Please select a location","locationInvalidTypeError":"Please select a valid location","filePathRequiredError":"Please enter a file path","filePathInvalidTypeError":"The file path must be a valid string"},"fr":{"titleRequiredError":"Veuillez saisir un nom pour votre dictionnaire.","titleInvalidTypeError":"Le nom du dictionnaire doit être une chaîne valide.","titleMinLengthError":"Le nom du dictionnaire doit comporter au moins 4 caractères.","keyRequiredError":"Veuillez saisir une clé pour votre dictionnaire.","keyInvalidTypeError":"La clé doit être une chaîne valide.","keySpaceError":"La clé ne peut pas contenir d'espaces ou de caractères spéciaux.","keyMinLengthError":"La clé doit comporter au moins 4 caractères.","descriptionRequiredError":"Veuillez saisir une description pour votre dictionnaire.","descriptionInvalidTypeError":"La description doit être une chaîne valide.","requiredErrorProjectId":"Veuillez sélectionner un projet","invalidTypeErrorProjectId":"Veuillez sélectionner un projet valide","invalidTypeErrorTags":"Veuillez saisir un tag valide","locationRequiredError":"Veuillez sélectionner un emplacement","locationInvalidTypeError":"Veuillez sélectionner un emplacement valide","filePathRequiredError":"Veuillez saisir un chemin de fichier","filePathInvalidTypeError":"Le chemin du fichier doit être une chaîne valide"},"es":{"titleRequiredError":"Por favor, ingrese un nombre para su diccionario.","titleInvalidTypeError":"El nombre del diccionario debe ser una cadena válida.","titleMinLengthError":"El nombre del diccionario debe tener al menos 4 caracteres.","keyRequiredError":"Por favor, ingrese una clave para su diccionario.","keyInvalidTypeError":"La clave debe ser una cadena válida.","keySpaceError":"La clave no puede contener espacios o caracteres especiales.","keyMinLengthError":"La clave debe tener al menos 4 caracteres.","descriptionRequiredError":"Por favor, ingrese una descripción para su diccionario.","descriptionInvalidTypeError":"La descripción debe ser una cadena válida.","requiredErrorProjectId":"Por favor, seleccione un proyecto","invalidTypeErrorProjectId":"Por favor, seleccione un proyecto válido","invalidTypeErrorTags":"Por favor, ingrese un tag válido","locationRequiredError":"Por favor, seleccione una ubicación","locationInvalidTypeError":"Por favor, seleccione una ubicación válida","filePathRequiredError":"Por favor, ingrese una ruta de archivo","filePathInvalidTypeError":"La ruta del archivo debe ser una cadena válida"},"de":{"titleRequiredError":"Bitte geben Sie einen Namen für Ihr Wörterbuch ein.","titleInvalidTypeError":"Der Name des Wörterbuchs muss eine gültige Zeichenfolge sein.","titleMinLengthError":"Der Name des Wörterbuchs muss mindestens 4 Zeichen lang sein.","keyRequiredError":"Bitte geben Sie einen Schlüssel für Ihr Wörterbuch ein.","keyInvalidTypeError":"Der Schlüssel muss eine gültige Zeichenfolge sein.","keySpaceError":"Der Schlüssel darf keine Leerzeichen oder Sonderzeichen enthalten.","keyMinLengthError":"Der Schlüssel muss mindestens 4 Zeichen lang sein.","descriptionRequiredError":"Bitte geben Sie eine Beschreibung für Ihr Wörterbuch ein.","descriptionInvalidTypeError":"Die Beschreibung muss eine gültige Zeichenfolge sein.","requiredErrorProjectId":"Bitte wählen Sie ein Projekt aus","invalidTypeErrorProjectId":"Bitte wählen Sie ein gültiges Projekt aus","invalidTypeErrorTags":"Bitte geben Sie einen gültigen Tag ein","locationRequiredError":"Bitte wählen Sie einen Standort aus","locationInvalidTypeError":"Bitte wählen Sie einen gültigen Standort aus","filePathRequiredError":"Bitte geben Sie einen Dateipfad ein","filePathInvalidTypeError":"Der Dateipfad muss eine gültige Zeichenfolge sein"},"ja":{"titleRequiredError":"辞書の名前を入力してください。","titleInvalidTypeError":"辞書名は有効な文字列である必要があります。","titleMinLengthError":"辞書名は4文字以上でなければなりません。","keyRequiredError":"辞書のためにキーを入力してください。","keyInvalidTypeError":"キーは有効な文字列である必要があります。","keySpaceError":"キーにはスペースや特殊文字を含めることはできません。","keyMinLengthError":"キーは4文字以上でなければなりません。","descriptionRequiredError":"辞書の説明を入力してください。","descriptionInvalidTypeError":"説明は有効な文字列である必要があります。","requiredErrorProjectId":"プロジェクトを選択してください","invalidTypeErrorProjectId":"有効なプロジェクトを選択してください","invalidTypeErrorTags":"有効なタグを入力してください","locationRequiredError":"場所を選択してください","locationInvalidTypeError":"有効な場所を選択してください","filePathRequiredError":"ファイルパスを入力してください","filePathInvalidTypeError":"ファイルパスは有効な文字列である必要があります"},"ko":{"titleRequiredError":"사전 이름을 입력하세요.","titleInvalidTypeError":"사전 이름은 유효한 문자열이어야 합니다.","titleMinLengthError":"사전 이름은 4자 이상이어야 합니다.","keyRequiredError":"사전에 대한 키를 입력하세요.","keyInvalidTypeError":"키는 유효한 문자열이어야 합니다.","keySpaceError":"키에는 공백이나 특수 문자가 포함될 수 없습니다.","keyMinLengthError":"키는 4자 이상이어야 합니다.","descriptionRequiredError":"사전에 대한 설명을 입력하세요.","descriptionInvalidTypeError":"설명은 유효한 문자열이어야 합니다.","requiredErrorProjectId":"프로젝트를 선택하세요","invalidTypeErrorProjectId":"유효한 프로젝트를 선택하세요","invalidTypeErrorTags":"유효한 태그를 입력하세요","locationRequiredError":"위치를 선택하세요","locationInvalidTypeError":"유효한 위치를 선택하세요","filePathRequiredError":"파일 경로를 입력하세요","filePathInvalidTypeError":"파일 경로는 유효한 문자열이어야 합니다"},"zh":{"titleRequiredError":"请输入您词典的名称。","titleInvalidTypeError":"词典名称必须是有效的字符串。","titleMinLengthError":"词典名称必须至少4个字符。","keyRequiredError":"请输入您词典的键。","keyInvalidTypeError":"关键字必须是有效的字符串。","keySpaceError":"关键字不能包含空格或特殊字符。","keyMinLengthError":"键必须至少为4个字符。","descriptionRequiredError":"请输入您词典的描述。","descriptionInvalidTypeError":"描述必须是有效的字符串。","requiredErrorProjectId":"请选择一个项目","invalidTypeErrorProjectId":"请选择有效的项目","invalidTypeErrorTags":"请输入有效的标签","locationRequiredError":"请选择一个位置","locationInvalidTypeError":"请选择有效的位置","filePathRequiredError":"请输入文件路径","filePathInvalidTypeError":"文件路径必须是有效的字符串"},"it":{"titleRequiredError":"Si prega di inserire un nome per il proprio dizionario.","titleInvalidTypeError":"Il nome del dizionario deve essere una stringa valida.","titleMinLengthError":"Il nome del dizionario deve essere lungo almeno 4 caratteri.","keyRequiredError":"Si prega di inserire una chiave per il proprio dizionario.","keyInvalidTypeError":"La chiave deve essere una stringa valida.","keySpaceError":"La chiave non può contenere spazi o caratteri speciali.","keyMinLengthError":"La chiave deve essere lunga almeno 4 caratteri.","descriptionRequiredError":"Si prega di inserire una descrizione per il proprio dizionario.","descriptionInvalidTypeError":"La descrizione deve essere una stringa valida.","requiredErrorProjectId":"Si prega di selezionare un progetto","invalidTypeErrorProjectId":"Si prega di selezionare un progetto valido","invalidTypeErrorTags":"Si prega di inserire un tag valido","locationRequiredError":"Si prega di selezionare una posizione","locationInvalidTypeError":"Si prega di selezionare una posizione valida","filePathRequiredError":"Si prega di inserire un percorso del file","filePathInvalidTypeError":"Il percorso del file deve essere una stringa valida"},"pt":{"titleRequiredError":"Por favor, insira um nome para o seu dicionário.","titleInvalidTypeError":"O nome do dicionário deve ser uma string válida.","titleMinLengthError":"O nome do dicionário deve ter pelo menos 4 caracteres.","keyRequiredError":"Por favor, insira uma chave para o seu dicionário.","keyInvalidTypeError":"A chave deve ser uma string válida.","keySpaceError":"A chave não pode conter espaços ou caracteres especiais.","keyMinLengthError":"A chave deve ter pelo menos 4 caracteres.","descriptionRequiredError":"Por favor, insira uma descrição para o seu dicionário.","descriptionInvalidTypeError":"A descrição deve ser uma string válida.","requiredErrorProjectId":"Por favor, selecione um projeto","invalidTypeErrorProjectId":"Por favor, selecione um projeto válido","invalidTypeErrorTags":"Por favor, insira um tag válido","locationRequiredError":"Por favor, selecione um local","locationInvalidTypeError":"Por favor, selecione um local válido","filePathRequiredError":"Por favor, insira um caminho de arquivo","filePathInvalidTypeError":"O caminho do arquivo deve ser uma string válida"},"hi":{"titleRequiredError":"कृपया अपने शब्दकोश का नाम दर्ज करें।","titleInvalidTypeError":"शब्दकोश का नाम एक वैध स्ट्रिंग होना चाहिए।","titleMinLengthError":"शब्दकोश का नाम कम से कम 4 वर्ण का होना चाहिए।","keyRequiredError":"कृपया अपने शब्दकोश के लिए एक कुंजी दर्ज करें।","keyInvalidTypeError":"कुंजी एक वैध स्ट्रिंग होनी चाहिए।","keySpaceError":"कुंजी में स्पेस या विशेष वर्ण नहीं हो सकते।","keyMinLengthError":"कुंजी में कम से कम 4 वर्ण होने चाहिए।","descriptionRequiredError":"कृपया अपने शब्दकोश का विवरण दर्ज करें।","descriptionInvalidTypeError":"विवरण एक वैध स्ट्रिंग होना चाहिए।","requiredErrorProjectId":"कृपया एक प्रोजेक्ट चुनें","invalidTypeErrorProjectId":"कृपया एक वैध परियोजना चुनें","invalidTypeErrorTags":"कृपया एक वैध टैग दर्ज करें","locationRequiredError":"कृपया एक स्थान चुनें","locationInvalidTypeError":"कृपया एक वैध स्थान चुनें","filePathRequiredError":"कृपया एक फ़ाइल पथ दर्ज करें","filePathInvalidTypeError":"फ़ाइल पथ एक वैध स्ट्रिंग होना चाहिए"},"ar":{"titleRequiredError":"يرجى إدخال اسم لقاموسك.","titleInvalidTypeError":"يجب أن يكون اسم القاموس سلسلة صحيحة.","titleMinLengthError":"يجب أن يكون اسم القاموس مكونًا من 4 أحرف على الأقل.","keyRequiredError":"يرجى إدخال مفتاح لقاموسك.","keyInvalidTypeError":"يجب أن يكون المفتاح سلسلة صحيحة.","keySpaceError":"لا يمكن أن يحتوي المفتاح على مسافات أو أحرف خاصة.","keyMinLengthError":"يجب أن يكون المفتاح مكونًا من 4 أحرف على الأقل.","descriptionRequiredError":"يرجى إدخال وصف لقاموسك.","descriptionInvalidTypeError":"يجب أن يكون الوصف سلسلة صحيحة.","requiredErrorProjectId":"يرجى اختيار مشروع","invalidTypeErrorProjectId":"يرجى اختيار مشروع صالح","invalidTypeErrorTags":"يرجى إدخال وسم صالح","locationRequiredError":"يرجى اختيار موقع","locationInvalidTypeError":"يرجى اختيار موقع صالح","filePathRequiredError":"يرجى إدخال مسار الملف","filePathInvalidTypeError":"يجب أن يكون مسار الملف سلسلة صحيحة"},"ru":{"titleRequiredError":"Пожалуйста, введите название вашего словаря.","titleInvalidTypeError":"Название словаря должно быть правильной строкой.","titleMinLengthError":"Название словаря должно содержать не менее 4 символов.","keyRequiredError":"Пожалуйста, введите ключ для вашего словаря.","keyInvalidTypeError":"Ключ должен быть правильной строкой.","keySpaceError":"Ключ не может содержать пробелы или специальные символы.","keyMinLengthError":"Ключ должен содержать не менее 4 символов.","descriptionRequiredError":"Пожалуйста, введите описание вашего словаря.","descriptionInvalidTypeError":"Описание должно быть правильной строкой.","requiredErrorProjectId":"Пожалуйста, выберите проект","invalidTypeErrorProjectId":"Пожалуйста, выберите действительный проект","invalidTypeErrorTags":"Пожалуйста, введите действительный тег","locationRequiredError":"Пожалуйста, выберите местоположение","locationInvalidTypeError":"Пожалуйста, выберите действительное местоположение","filePathRequiredError":"Пожалуйста, введите путь к файлу","filePathInvalidTypeError":"Путь к файлу должен быть правильной строкой"}}}`),localIds:[`dictionary-detail-schema::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/DictionaryDetails/useDictionaryDetailsSchema.content.mjs`]},oJ=e=>{let t=(0,V.c)(38),{titleRequiredError:n,titleInvalidTypeError:r,titleMinLengthError:i,keyRequiredError:a,keyInvalidTypeError:o,keySpaceError:s,keyMinLengthError:c,descriptionRequiredError:l,descriptionInvalidTypeError:u,requiredErrorProjectId:d,invalidTypeErrorProjectId:f,invalidTypeErrorTags:p,locationRequiredError:m,locationInvalidTypeError:h,filePathRequiredError:g,filePathInvalidTypeError:_}=_t(aJ),v;if(t[0]!==u||t[1]!==l||t[2]!==_||t[3]!==g||t[4]!==f||t[5]!==p||t[6]!==o||t[7]!==c.value||t[8]!==a||t[9]!==s.value||t[10]!==h||t[11]!==m||t[12]!==e||t[13]!==d||t[14]!==r||t[15]!==i.value||t[16]!==n){let y;t[18]!==r||t[19]!==n?(y=e=>e.input===void 0?n.value:r.value,t[18]=r,t[19]=n,t[20]=y):y=t[20];let b;t[21]!==o||t[22]!==a?(b=e=>e.input===void 0?a.value:o.value,t[21]=o,t[22]=a,t[23]=b):b=t[23];let x;t[24]!==u||t[25]!==l?(x=e=>e.input===void 0?l.value:u.value,t[24]=u,t[25]=l,t[26]=x):x=t[26];let S;t[27]!==f||t[28]!==d?(S=e=>e.input===void 0?d.value:f.value,t[27]=f,t[28]=d,t[29]=S):S=t[29];let C;t[30]===p?C=t[31]:(C=()=>p.value,t[30]=p,t[31]=C);let w;t[32]!==h||t[33]!==m?(w=e=>e.input===void 0?m.value:h.value,t[32]=h,t[33]=m,t[34]=w):w=t[34];let T;t[35]!==_||t[36]!==g?(T=e=>e.input===void 0?g.value:_.value,t[35]=_,t[36]=g,t[37]=T):T=t[37],v=GK({title:_K({error:y}).refine(sJ,{error:i.value}).optional(),key:_K({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:_K({error:x}).optional(),projectIds:UK(_K({error:S})).default([e]),tags:UK(_K({error:C})).default([]),location:ZK([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:ZK([`static`,`dynamic`,`fetch`]).optional(),filePath:_K({error:T}).optional()}),t[0]=u,t[1]=l,t[2]=_,t[3]=g,t[4]=f,t[5]=p,t[6]=o,t[7]=c.value,t[8]=a,t[9]=s.value,t[10]=h,t[11]=m,t[12]=e,t[13]=d,t[14]=r,t[15]=i.value,t[16]=n,t[17]=v}else v=t[17];return v};function sJ(e){return e.length===0||e.length>=4}var cJ=e=>{let t=(0,V.c)(62),{dictionary:n,mode:r}=e,{session:i}=YT(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=pE(),{data:l}=mE(),u=s?.data??[],d=l?.data??[],f=oJ(String(o?.id)),p=n.location??`remote`,m;t[2]!==n||t[3]!==p?(m={defaultValues:{...n,location:p}},t[2]=n,t[3]=p,t[4]=m):m=t[4];let{form:h,isSubmitting:g}=MW(f,m),{editedContent:_,setEditedDictionary:v}=oC(),{titleInput:y,keyInput:b,descriptionInput:x,projectInput:S,tagsSelect:C,locationSelect:w,importModeSelect:T,filePathInput:E,auditButton:k}=_t(iJ),{mutate:A,isPending:j}=iE(),M=_?.[n.localId],N;t[5]!==n||t[6]!==h?(N=()=>{h.reset({...n,tags:n.tags??[],location:n.location??`remote`})},t[5]=n,t[6]=h,t[7]=N):N=t[7];let P=h?.reset,F;t[8]!==n||t[9]!==P?(F=[n,P],t[8]=n,t[9]=P,t[10]=F):F=t[10],(0,D.useEffect)(N,F);let I;t[11]!==n||t[12]!==h||t[13]!==M?(I=()=>{M===void 0&&h.reset({...n,tags:n.tags??[],location:n.location??`remote`})},t[11]=n,t[12]=h,t[13]=M,t[14]=I):I=t[14];let L;t[15]===M?L=t[16]:(L=[M],t[15]=M,t[16]=L),(0,D.useEffect)(I,L);let ee;t[17]!==A||t[18]!==n||t[19]!==h||t[20]!==v||t[21]!==M?(ee=()=>{let e={...n,...M};A({fileContent:JSON.stringify(e)},{onSuccess:t=>{if(!t?.data)return;let n=t.data.fileContent,r={...e,...n,tags:n.tags??e.tags??[]};v(r),h.reset(r)}})},t[17]=A,t[18]=n,t[19]=h,t[20]=v,t[21]=M,t[22]=ee):ee=t[22];let te=ee,ne;t[23]===h.control?ne=t[24]:(ne={control:h.control,name:`location`},t[23]=h.control,t[24]=ne);let R=YR(ne),z=R===`local`||R===`hybrid`,B;t[25]!==n||t[26]!==h||t[27]!==v||t[28]!==M?(B=e=>{h.setValue(`key`,e,{shouldDirty:!0}),v({...n,...M??{},key:e})},t[25]=n,t[26]=h,t[27]=v,t[28]=M,t[29]=B):B=t[29];let re;t[30]!==n||t[31]!==h||t[32]!==v||t[33]!==M?(re=e=>{h.setValue(`title`,e,{shouldDirty:!0}),v({...n,...M??{},title:e})},t[30]=n,t[31]=h,t[32]=v,t[33]=M,t[34]=re):re=t[34];let ie;t[35]!==n||t[36]!==h||t[37]!==v||t[38]!==M?(ie=e=>{h.setValue(`description`,e,{shouldDirty:!0}),v({...n,...M??{},description:e})},t[35]=n,t[36]=h,t[37]=v,t[38]=M,t[39]=ie):ie=t[39];let ae;t[40]!==n||t[41]!==h||t[42]!==w||t[43]!==r||t[44]!==v||t[45]!==M?(ae=e=>{let{field:t}=e,i=t.value,a=i===`local`||i===`hybrid`,o=i===`remote`||i===`hybrid`,s=e=>{if(!e&&!o)return;let r=e?o?`hybrid`:`local`:`remote`;t.onChange(r);let i=e?h.getValues(`filePath`)??n.filePath:void 0;e||h.setValue(`filePath`,void 0),v({...n,...M??{},location:r,filePath:i})},c=e=>{if(!e&&!a)return;let r=e?a?`hybrid`:`remote`:`local`;t.onChange(r),v({...n,...M??{},location:r})};return(0,O.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,O.jsx)($.Label,{className:`ml-1`,children:w.label}),(0,O.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,O.jsx)(SG,{id:`location-local`,name:`location-local`,label:w.local.value,color:`text`,checked:a,disabled:!r.includes(`local`)&&!r.includes(`remote`),onChange:e=>s(e.target.checked)}),(0,O.jsx)(SG,{id:`location-remote`,name:`location-remote`,label:w.remote.value,color:`text`,checked:o,disabled:!r.includes(`remote`)&&n.location!==`remote`&&n.location!==`hybrid`,onChange:e=>c(e.target.checked)})]}),(0,O.jsx)($.Description,{children:w.testDescription}),(0,O.jsx)($.Message,{})]})},t[40]=n,t[41]=h,t[42]=w,t[43]=r,t[44]=v,t[45]=M,t[46]=ae):ae=t[46];let oe;t[47]!==n||t[48]!==h||t[49]!==v||t[50]!==M?(oe=e=>{h.setValue(`importMode`,e,{shouldDirty:!0}),v({...n,...M??{},importMode:e})},t[47]=n,t[48]=h,t[49]=v,t[50]=M,t[51]=oe):oe=t[51];let se;t[52]!==n||t[53]!==h||t[54]!==v||t[55]!==M?(se=e=>{let t=[e].flat();h.setValue(`projectIds`,t,{shouldDirty:!0}),v({...n,...M??{},projectIds:t})},t[52]=n,t[53]=h,t[54]=v,t[55]=M,t[56]=se):se=t[56];let ce;return t[57]!==n||t[58]!==h||t[59]!==v||t[60]!==M?(ce=e=>{let t=[e].flat();h.setValue(`tags`,t,{shouldDirty:!0}),v({...n,...M??{},tags:t})},t[57]=n,t[58]=h,t[59]=v,t[60]=M,t[61]=ce):ce=t[61],(0,O.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,O.jsx)($.EditableFieldInput,{name:`key`,label:b.label,placeholder:b.label.value,description:b.description,disabled:g,isRequired:!0,onSave:B}),(0,O.jsx)($.EditableFieldInput,{name:`title`,label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:g,onSave:re})]}),(0,O.jsx)($.EditableFieldTextArea,{name:`description`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ie}),(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,O.jsx)($.Field,{control:h.control,name:`location`,render:ae}),(0,O.jsx)(By,{mode:`wait`,children:z&&(0,O.jsx)(Rx.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,O.jsx)($.Input,{name:`filePath`,label:E.label.value,placeholder:E.placeholder.value,description:E.description.value,disabled:g||!z,onChange:e=>{let t=e.target.value;v({...n,...M??{},filePath:t})}})},`filePath-input`)})]}),(0,O.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,O.jsxs)($.Select,{name:`importMode`,label:T.label.value,description:T.description.value,onValueChange:oe,children:[(0,O.jsx)(J.Trigger,{children:(0,O.jsx)(J.Value,{placeholder:T.label.value})}),(0,O.jsxs)(J.Content,{children:[(0,O.jsx)(J.Item,{value:`static`,children:T.static.value}),(0,O.jsx)(J.Item,{value:`dynamic`,children:T.dynamic.value}),(0,O.jsx)(J.Item,{value:`live`,children:T.live.value})]})]})}),(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,O.jsxs)($.MultiSelect,{name:`projectIds`,label:S.label.value,description:S.description,onValueChange:se,children:[(0,O.jsx)(gR.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,O.jsx)(gR.Input,{placeholder:S.placeholder.value})}),(0,O.jsx)(gR.Content,{children:(0,O.jsx)(yE,{isLoading:c,children:(0,O.jsx)(gR.List,{children:u?.map(lJ)})})})]}),(0,O.jsxs)($.MultiSelect,{name:`tags`,label:C.label.value,description:C.description,onValueChange:ce,children:[(0,O.jsx)(gR.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,O.jsx)(gR.Input,{placeholder:C.placeholder.value})}),(0,O.jsx)(gR.Content,{children:(0,O.jsx)(yE,{isLoading:c,children:(0,O.jsx)(gR.List,{children:d?.map(uJ)})})})]})]}),(0,O.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,O.jsx)($.Button,{type:`button`,size:`icon-md`,label:k.label.value,Icon:Lu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||j,isLoading:j})})]})};function lJ(e){return(0,O.jsx)(gR.Item,{value:String(e.id),children:e.name},String(e.id))}function uJ(e){return(0,O.jsx)(gR.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var dJ={key:`copy-button`,content:{nodeType:`translation`,translation:{en:{label:`Copy content`},"en-GB":{label:`Copy content`},fr:{label:`Copier le contenu`},es:{label:`Copiar contenido`},de:{label:`Inhalt kopieren`},ja:{label:`コンテンツをコピー`},ko:{label:`콘텐츠 복사`},zh:{label:`复制内容`},it:{label:`Copia contenuto`},pt:{label:`Copiar conteúdo`},hi:{label:`सामग्री कॉपी करें`},ar:{label:`نسخ المحتوى`},ru:{label:`Копировать содержимое`}}},localIds:[`copy-button::local::../@intlayer/design-system/dist/esm/components/CopyButton/CopyButton.content.mjs`]},fJ=e=>{let t=(0,V.c)(6),{content:n,...r}=e,[i,a]=(0,D.useState)(!1),[o,s]=(0,D.useState)(!1),{label:c}=_t(dJ),l;t[0]===n?l=t[1]:(l=async()=>{try{s(!1),await navigator.clipboard.writeText(n),a(!0)}catch(e){console.error(`Failed to copy text: `,e),s(!0)}},t[0]=n,t[1]=l);let u=l,d,f;t[2]!==i||t[3]!==o?(d=()=>{if(i||o){let e=setTimeout(()=>{a(!1),s(!1)},1e3);return()=>clearTimeout(e)}},f=[i,o],t[2]=i,t[3]=o,t[4]=d,t[5]=f):(d=t[4],f=t[5]),(0,D.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,O.jsx)(SE,{Icon:i?bu:xu,onClick:u,variant:`hoverable`,color:`text`,size:`icon-sm`,tabIndex:0,title:p(),...r,label:p(),"aria-describedby":i?`copy-success`:o?`copy-error`:void 0})},pJ=(0,D.lazy)(()=>Fe(()=>import(`./dist-n6pPp0RM.js`).then(e=>({default:e.Editor})),[])),mJ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,D.useRef)(null),c=(0,D.useRef)(null),[l,u]=(0,D.useState)({height:0,width:0}),d=n?`vs-dark-transparent`:`hc-light-theme`,f=(e,t)=>{c.current=e;let n=(e.getContentHeight()??0)+25;t.editor.defineTheme(`vs-dark-transparent`,{base:`vs-dark`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.defineTheme(`hc-light-theme`,{base:`vs`,inherit:!0,rules:[],colors:{"editor.background":`#00000000`}}),t.editor.setTheme(d),t.languages.typescript.typescriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!0}),t.languages.typescript.typescriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),t.languages.typescript.javascriptDefaults.setCompilerOptions({noLib:!0,allowNonTsExtensions:!0}),u({height:n,width:s.current?.clientWidth??0})},p=r??(typeof e==`string`?e.split(`
|
|
185
|
+
`).length>1:!1);return(0,O.jsxs)(`div`,{className:G(`relative size-full text-sm`,r&&`ml-0`),children:[i&&(0,O.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,O.jsx)(`div`,{className:G(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,O.jsx)(fJ,{content:e})})}),(0,O.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,O.jsx)(D.Suspense,{fallback:(0,O.jsx)(yE,{}),children:(0,O.jsx)(pJ,{...l,defaultLanguage:`typescript`,language:t,loading:(0,O.jsx)(yE,{}),defaultValue:String(e).replace(/\n$/,``),onMount:f,onChange:o,options:{contextmenu:!1,readOnly:a,cursorStyle:`line`,minimap:{enabled:!1},scrollbar:{vertical:`hidden`,verticalScrollbarSize:0,alwaysConsumeMouseWheel:!1},folding:!1,renderValidationDecorations:`off`,quickSuggestions:!1,parameterHints:{enabled:!1},suggestOnTriggerCharacters:!1,mouseWheelScrollSensitivity:0,fastScrollSensitivity:0,scrollBeyondLastLine:!1,lineNumbers:p?`on`:`off`},theme:d,className:`my-2 rounded-md`})})})]})},hJ=e=>{let t=(0,V.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=oC(),o=gJ,s=a?.[n.localId]?.content??n?.content,c;t[0]!==n||t[1]!==i?(c=e=>{o(e??`{}`)&&i(n.localId,JSON.parse(e??`{}`))},t[0]=n,t[1]=i,t[2]=c):c=t[2];let l;return t[3]!==s||t[4]!==r||t[5]!==c?(l=(0,O.jsx)(mJ,{language:`json`,onChange:c,isDarkMode:r,children:JSON.stringify(s,null,2)}),t[3]=s,t[4]=r,t[5]=c,t[6]=l):l=t[6],l};function gJ(e){try{return JSON.parse(e),!0}catch{return!1}}var _J={key:`structure-view`,content:{nodeType:`translation`,translation:{en:{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},"en-GB":{titleInput:{placeholder:`Enter the key of your node`},deleteButton:{label:`Remove node from section`},addNodeButton:{label:`Click to add a new node`,text:`Add a new node`}},fr:{titleInput:{placeholder:`Entrez la clé de votre nœud`},deleteButton:{label:`Supprimer le nœud de la section`},addNodeButton:{label:`Cliquez pour ajouter un nouveau nœud`,text:`Ajouter un nouveau nœud`}},es:{titleInput:{placeholder:`Ingrese la clave de su nodo`},deleteButton:{label:`Eliminar el nodo de la sección`},addNodeButton:{label:`Haga clic para agregar un nuevo nodo`,text:`Agregar un nuevo nodo`}},de:{titleInput:{placeholder:`Geben Sie den Schlüssel Ihres Knotens ein`},deleteButton:{label:`Knoten aus dem Abschnitt entfernen`},addNodeButton:{label:`Klicken, um einen neuen Knoten hinzuzufügen`,text:`Neuen Knoten hinzufügen`}},ja:{titleInput:{placeholder:`ノードのキーを入力してください`},deleteButton:{label:`セクションからノードを削除`},addNodeButton:{label:`新しいノードを追加するにはクリックしてください`,text:`新しいノードを追加`}},ko:{titleInput:{placeholder:`노드의 키를 입력하세요`},deleteButton:{label:`섹션에서 노드를 제거`},addNodeButton:{label:`새 노드를 추가하려면 클릭하세요`,text:`새 노드 추가`}},zh:{titleInput:{placeholder:`输入您节点的键`},deleteButton:{label:`从部分中移除节点`},addNodeButton:{label:`点击添加新节点`,text:`添加新节点`}},it:{titleInput:{placeholder:`Inserisci la chiave del tuo nodo`},deleteButton:{label:`Rimuovi nodo dalla sezione`},addNodeButton:{label:`Fai clic per aggiungere un nuovo nodo`,text:`Aggiungi un nuovo nodo`}},pt:{titleInput:{placeholder:`Insira a chave do seu nó`},deleteButton:{label:`Remover nó da seção`},addNodeButton:{label:`Clique para adicionar um novo nó`,text:`Adicionar um novo nó`}},hi:{titleInput:{placeholder:`अपनी नोड की कुंजी दर्ज करें`},deleteButton:{label:`सेक्शन से नोड हटाएं`},addNodeButton:{label:`नया नोड जोड़ने के लिए क्लिक करें`,text:`नया नोड जोड़ें`}},ar:{titleInput:{placeholder:`أدخل مفتاح العقدة الخاص بك`},deleteButton:{label:`إزالة العقدة من القسم`},addNodeButton:{label:`انقر لإضافة عقدة جديدة`,text:`إضافة عقدة جديدة`}},ru:{titleInput:{placeholder:`Введите ключ вашего узла`},deleteButton:{label:`Удалить узел из секции`},addNodeButton:{label:`Нажмите, чтобы добавить новый узел`,text:`Добавить новый узел`}}}},localIds:[`structure-view::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/StructureView/structureView.content.mjs`]},vJ={key:`node-type-selector`,content:{nodeType:`translation`,translation:{en:{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},"en-GB":{triggerPlaceHolder:`Node type`,multilingual:`Multilingual content`,text:`Text`,number:`Number`,boolean:`Boolean`,node:`Object`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Gender`,nest:`Nesting`,insertion:`Insertion`,condition:`Condition`,file:`File`,markdown:`Markdown`,reactNode:`React Node`},fr:{triggerPlaceHolder:`Type du Nœud`,multilingual:`Contenu Multilingue`,text:`Texte`,number:`Nombre`,boolean:`Booléen`,node:`Objet`,array:`Tableau`,enumeration:`Énumération`,plural:`Pluriel`,gender:`Genre`,nest:`Imbriquation`,insertion:`Insertion`,condition:`Condition`,file:`Fichier`,markdown:`Markdown`,reactNode:`Node React`},es:{triggerPlaceHolder:`Tipo del nodo`,multilingual:`Contenido multilingüe`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Arreglo`,enumeration:`Enumeración`,plural:`Plural`,gender:`Género`,nest:`Anidación`,insertion:`Inserción`,condition:`Condición`,file:`Archivo`,markdown:`Markdown`,reactNode:`Nodo React`},de:{triggerPlaceHolder:`Knotentyp`,multilingual:`Mehrsprachiger Inhalt`,text:`Text`,number:`Zahl`,boolean:`Bool`,node:`Objekt`,array:`Array`,enumeration:`Enumeration`,plural:`Plural`,gender:`Geschlecht`,nest:`Vererbung`,insertion:`Einfügung`,condition:`Bedingung`,file:`Datei`,markdown:`Markdown`,reactNode:`React-Knoten`},ja:{triggerPlaceHolder:`ノードタイプ`,multilingual:`複数言語コンテンツ`,text:`テキスト`,number:`数字`,boolean:`ブール`,node:`オブジェクト`,array:`配列`,enumeration:`列挙`,plural:`複数形`,gender:`性別`,nest:`ネスト`,insertion:`挿入`,condition:`条件`,file:`ファイル`,markdown:`マークダウン`,reactNode:`リアル・ノード`},ko:{triggerPlaceHolder:`노드 유형`,multilingual:`다중 언어 콘텐츠`,text:`텍스트`,number:`숫자`,boolean:`불리언`,node:`객체`,array:`배열`,enumeration:`열거`,plural:`복수`,gender:`성별`,nest:`중첩`,insertion:`삽입`,condition:`조건`,file:`파일`,markdown:`마크다운`,reactNode:`리액 노드`},zh:{triggerPlaceHolder:`节点类型`,multilingual:`多语言内容`,text:`文本`,number:`数字`,boolean:`布尔`,node:`对象`,array:`数组`,enumeration:`枚举`,plural:`复数`,gender:`性别`,nest:`嵌套`,insertion:`插入`,condition:`条件`,file:`文件`,markdown:`Markdown`,reactNode:`React 节点`},it:{triggerPlaceHolder:`Tipo di nodo`,multilingual:`Contenuto multilingue`,text:`Testo`,number:`Numero`,boolean:`Booleano`,node:`Oggetto`,array:`Array`,enumeration:`Enumerazione`,plural:`Plurale`,gender:`Genere`,nest:`Nidificazione`,insertion:`Inserimento`,condition:`Condizione`,file:`File`,markdown:`Markdown`,reactNode:`Nodo React`},pt:{triggerPlaceHolder:`Tipo de nó`,multilingual:`Conteúdo multilíngue`,text:`Texto`,number:`Número`,boolean:`Booleano`,node:`Objeto`,array:`Array`,enumeration:`Enumeração`,plural:`Plural`,gender:`Gênero`,nest:`Nido`,insertion:`Inserção`,condition:`Condição`,file:`Arquivo`,markdown:`Markdown`,reactNode:`Nó React`},hi:{triggerPlaceHolder:`नोड प्रकार`,multilingual:`बहुभाषी सामग्री`,text:`पाठ`,number:`संख्या`,boolean:`बूलियन`,node:`ऑब्जेक्ट`,array:`ऐरे`,enumeration:`गणना`,plural:`बहुवचन`,gender:`लिंग`,nest:`नेस्टेंस`,insertion:`सम्मिलन`,condition:`शर्त्ता`,file:`फ़ाइल`,markdown:`मार्कडाउन`,reactNode:`रेड नोड`},ar:{triggerPlaceHolder:`نوع العقدة`,multilingual:`محتوى متعدد اللغات`,text:`نص`,number:`رقم`,boolean:`منطقي`,node:`كائن`,array:`مصفوفة`,enumeration:`تعداد`,plural:`جمع`,gender:`جنس`,nest:`مستوى`,insertion:`إدراج`,condition:`شرط`,file:`ملف`,markdown:`مارك داون`,reactNode:`عقدة رياكت`},ru:{triggerPlaceHolder:`Тип узла`,multilingual:`Многоязычный контент`,text:`Текст`,number:`Число`,boolean:`Булево`,node:`Объект`,array:`Массив`,enumeration:`Перечисление`,plural:`Множественное число`,gender:`Пол`,nest:`Вложенность`,insertion:`Вставка`,condition:`Условие`,file:`Файл`,markdown:`Markdown`,reactNode:`Реакт узел`}}},localIds:[`node-type-selector::local::../@intlayer/design-system/dist/esm/components/DictionaryFieldEditor/nodeTypeSelector.content.mjs`]},yJ=e=>{let t=(0,V.c)(23),{section:n,onValueChange:r}=e,{multilingual:i,text:a,number:o,boolean:s,node:c,array:l,enumeration:u,plural:d,triggerPlaceHolder:f,nest:p,gender:m,condition:h,markdown:g,insertion:_,reactNode:v,file:y}=_t(vJ),b;t[0]===n?b=t[1]:(b=PS(n),t[0]=n,t[1]=b);let[x,S]=(0,D.useState)(b),C;t[2]===r?C=t[3]:(C=e=>{S(e),r(e)},t[2]=r,t[3]=C);let w=C,T;return t[4]!==l||t[5]!==s||t[6]!==h||t[7]!==u||t[8]!==y||t[9]!==m||t[10]!==_||t[11]!==x||t[12]!==g||t[13]!==i||t[14]!==p||t[15]!==c||t[16]!==o||t[17]!==w||t[18]!==d||t[19]!==v||t[20]!==a||t[21]!==f?(T=(0,O.jsxs)(J,{value:x,onValueChange:w,children:[(0,O.jsx)(J.Trigger,{children:(0,O.jsx)(J.Value,{placeholder:f})}),(0,O.jsxs)(J.Content,{children:[(0,O.jsx)(J.Item,{value:j,children:i}),(0,O.jsx)(J.Item,{value:B,children:a}),(0,O.jsx)(J.Item,{value:re,children:o}),(0,O.jsx)(J.Item,{value:ie,children:s}),(0,O.jsx)(J.Item,{value:L,children:c}),(0,O.jsx)(J.Item,{value:ee,children:l}),(0,O.jsx)(J.Item,{value:M,children:u}),(0,O.jsx)(J.Item,{value:N,children:d}),(0,O.jsx)(J.Item,{value:ae,children:m}),(0,O.jsx)(J.Item,{value:F,children:_}),(0,O.jsx)(J.Item,{value:R,children:g}),(0,O.jsx)(J.Item,{value:te,children:p}),(0,O.jsx)(J.Item,{value:P,children:h}),(0,O.jsx)(J.Item,{value:ne,disabled:!0,children:v}),(0,O.jsx)(J.Item,{value:I,children:y})]})]}),t[4]=l,t[5]=s,t[6]=h,t[7]=u,t[8]=y,t[9]=m,t[10]=_,t[11]=x,t[12]=g,t[13]=i,t[14]=p,t[15]=c,t[16]=o,t[17]=w,t[18]=d,t[19]=v,t[20]=a,t[21]=f,t[22]=T):T=t[22],T},bJ=e=>{let t=(0,V.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=iC()?.internationalization?.locales??[],s=PS(n),c=jS(n),l=e=>{a(kS(s,o,e))};if(s===`translation`||s===`condition`||s===`gender`||s===`enumeration`||s===`plural`){let e=Object.keys(n[s])[0],t=[...i,{type:s,key:e}];return(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,O.jsx)(yJ,{section:n,onValueChange:e=>a(kS(e,o))}),(0,O.jsx)(bJ,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,O.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,O.jsx)(yJ,{section:n,onValueChange:e=>a(kS(e,o))}),(0,O.jsx)(bJ,{section:c,keyPath:e,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`object`){let e;if(t[0]!==r||t[1]!==i||t[2]!==o||t[3]!==a||t[4]!==n){let s;t[6]!==o||t[7]!==a?(s=e=>a(kS(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(yJ,{section:n,onValueChange:s}),(0,O.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,O.jsx)(CJ,{keyPath:i,section:n,dictionaryLocalId:r})})]}),t[0]=r,t[1]=i,t[2]=o,t[3]=a,t[4]=n,t[5]=e}else e=t[5];return e}let u;t[9]!==o||t[10]!==a?(u=e=>a(kS(e,o)),t[9]=o,t[10]=a,t[11]=u):u=t[11];let d;return t[12]!==n||t[13]!==u?(d=(0,O.jsx)(yJ,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},xJ=e=>{let t=(0,V.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=tC(),{renameEditedContent:c,addEditedContent:l}=aC(),{titleInput:u,deleteButton:d}=_t(_J),f;t[0]!==a||t[1]!==i||t[2]!==c||t[3]!==s?(f=e=>{c(a,e,i);let t=i.slice(0,-1),n=i[i.length-1];s([...t,{...n,key:e}])},t[0]=a,t[1]=i,t[2]=c,t[3]=s,t[4]=f):f=t[4];let p=f,m;if(t[5]!==l||t[6]!==d||t[7]!==a||t[8]!==o?.keyPath||t[9]!==p||t[10]!==i||t[11]!==r||t[12]!==n||t[13]!==s||t[14]!==u){let e;t[16]!==i||t[17]!==s?(e=()=>s(i),t[16]=i,t[17]=s,t[18]=e):e=t[18];let c;t[19]!==l||t[20]!==a||t[21]!==i?(c=e=>{l(a,e,i)},t[19]=l,t[20]=a,t[21]=i,t[22]=c):c=t[22],m=(0,O.jsx)(_E,{transparency:`xl`,roundedSize:`xl`,className:`w-full min-w-80 gap-2 overflow-auto px-5 py-2`,border:!0,borderColor:`text`,background:`none`,"aria-selected":Qe(i,o?.keyPath??[]),onClick:e,children:(0,O.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,O.jsxs)(`div`,{className:`w-full`,children:[(0,O.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,O.jsx)(aD,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,O.jsx)(SE,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Iu,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,O.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,nt(n),` )`]})]}),(0,O.jsx)(bJ,{keyPath:i,dictionaryLocalId:a,section:r,onNodeTypeChange:c})]})}),t[5]=l,t[6]=d,t[7]=a,t[8]=o?.keyPath,t[9]=p,t[10]=i,t[11]=r,t[12]=n,t[13]=s,t[14]=u,t[15]=m}else m=t[15];return m},SJ=e=>{let t=(0,V.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=_t(_J),{setFocusedContentKeyPath:o}=tC(),{addEditedContent:s}=aC();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(`div`,{children:`Not an object`}),t[0]=e):e=t[0],e}let c;if(t[1]!==s||t[2]!==a.label.value||t[3]!==a.text||t[4]!==i||t[5]!==r||t[6]!==n||t[7]!==o){let e;t[9]!==s||t[10]!==i||t[11]!==r||t[12]!==o?(e=()=>{let e=[...r,{type:L,key:`newKey`}];s(i,``,e),o(e)},t[9]=s,t[10]=i,t[11]=r,t[12]=o,t[13]=e):e=t[13],c=(0,O.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,O.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,O.jsx)(`li`,{className:`flex w-full`,children:(0,O.jsx)(xJ,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:L,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,O.jsx)(SE,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Mu,className:`flex-1`,onClick:e,children:a.text})]}),t[1]=s,t[2]=a.label.value,t[3]=a.text,t[4]=i,t[5]=r,t[6]=n,t[7]=o,t[8]=c}else c=t[8];return c},CJ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,O.jsx)(xJ,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,O.jsx)(SJ,{section:e,keyPath:t,dictionaryLocalId:n}),wJ=e=>{let t=(0,V.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=oC(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,O.jsx)(xJ,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},TJ=e=>{let t=(0,V.c)(24),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=iC(),{returnToDictionaryList:d}=_t(Qq),{focusedContent:f,setFocusedContent:p}=tC(),{setLocaleDictionary:m}=QS(),[h,g]=(0,D.useState)(`content`),_;t[0]!==n||t[1]!==f||t[2]!==p||t[3]!==m?(_=()=>{p({...f??{},dictionaryKey:n.key,dictionaryLocalId:n.localId}),m(n)},t[0]=n,t[1]=f,t[2]=p,t[3]=m,t[4]=_):_=t[4];let v;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(v=[],t[5]=v):v=t[5],(0,D.useEffect)(_,v);let y;if(t[6]!==h||t[7]!==u?.internationalization?.locales||t[8]!==n||t[9]!==i||t[10]!==a||t[11]!==r||t[12]!==o||t[13]!==s||t[14]!==d||t[15]!==p||t[16]!==l){let e;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>g(`structure`),t[18]=e):e=t[18];let c;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>g(`content`),t[19]=c):c=t[19];let f;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(f=()=>g(`json`),t[20]=f):f=t[20];let m;t[21]!==o||t[22]!==p?(m=()=>{p(null),o?.()},t[21]=o,t[22]=p,t[23]=m):m=t[23],y=(0,O.jsx)(_D,{availableLocales:u?.internationalization?.locales??[],children:(0,O.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,O.jsx)(SE,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:fu,label:d.label.value,children:d.text}),(0,O.jsxs)(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,O.jsx)(`div`,{className:`sticky top-0 z-10 flex shrink-0 gap-3 rounded-xl bg-background/20 p-3 pb-4`,children:(0,O.jsx)(rJ,{selectedChoice:h,tabs:[...a.includes(`remote`)?[(0,O.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`details`,onClick:()=>g(`details`),type:`button`,children:`Details`},`details`)]:[],(0,O.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`structure`,onClick:e,type:`button`,children:`Structure`},`structure`),(0,O.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`content`,onClick:c,type:`button`,children:`Content`},`content`),(0,O.jsx)(`button`,{className:`cursor-pointer whitespace-nowrap rounded-md px-4 py-1 font-medium text-sm transition-colors focus:outline-none`,"data-active":h===`json`,onClick:f,type:`button`,children:`JSON`},`json`)],hoverable:!0,color:`text`})}),(0,O.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:(0,O.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-stretch gap-6`,children:[a.includes(`remote`)&&h===`details`&&(0,O.jsx)(cJ,{dictionary:n,mode:a}),h===`structure`&&(0,O.jsx)(wJ,{dictionary:n}),h===`content`&&(0,O.jsx)(gI,{dictionary:n,isDarkMode:i}),h===`json`&&(0,O.jsx)(hJ,{dictionary:n,isDarkMode:i})]})})]}),(0,O.jsx)(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:(0,O.jsxs)(_E,{color:`card`,roundedSize:`2xl`,padding:`sm`,className:`w-full shrink-0 flex-row flex-wrap items-center justify-end gap-10 bg-background/20 md:bottom-0`,children:[(0,O.jsx)(eJ,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,O.jsx)(Zq,{dictionary:n,mode:a,onDelete:m,onSave:s})]})})]})}),t[6]=h,t[7]=u?.internationalization?.locales,t[8]=n,t[9]=i,t[10]=a,t[11]=r,t[12]=o,t[13]=s,t[14]=d,t[15]=p,t[16]=l,t[17]=y}else y=t[17];return y},EJ=({children:e,className:t,identifier:n,...r})=>(0,O.jsx)(`div`,{className:G(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),DJ=({children:e,isHidden:t=void 0,isOverable:n=!0,isFocusable:r=!1,xAlign:i=`start`,yAlign:a=`bellow`,identifier:o,className:s,displayArrow:c=!0,...l})=>(0,O.jsx)(_E,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:G(`absolute z-60 min-w-full rounded-md ring-1 ring-neutral`,i===`start`&&`left-0`,i===`center`&&`left-1/2 -translate-x-1/2`,i===`end`&&`right-0`,a===`bellow`&&`top-[calc(100%+1rem)]`,a===`above`&&`bottom-[calc(100%+1rem)]`,c&&`before:absolute before:z-[999] before:h-0 before:w-0 before:content-[""]`,c&&i===`start`&&`before:left-2`,c&&i===`center`&&`before:left-1/2 before:-translate-x-1/2`,c&&i===`end`&&`before:right-2`,c&&a===`bellow`&&`before:-top-[10px] before:border-r-[10px] before:border-r-transparent before:border-b-[10px] before:border-b-neutral before:border-l-[10px] before:border-l-transparent`,c&&a===`above`&&`before:-bottom-[10px] before:border-t-[10px] before:border-t-neutral before:border-r-[10px] before:border-r-transparent before:border-l-[10px] before:border-l-transparent`,`overflow-x-visible opacity-0 transition-all duration-400 ease-in-out`,t===!1?`visible opacity-100 delay-800`:`invisible`,n&&`group-hover/popover:visible group-hover/popover:opacity-100 group-hover/popover:delay-800`,r&&`group-focus-within/popover:visible group-focus-within/popover:opacity-100 group-focus-within/popover:delay-800`,s),...l,children:e});EJ.Detail=DJ;var OJ=e=>(0,O.jsx)(EJ,{...e}),kJ=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,D.useRef)(null),[i,a]=(0,D.useState)(e),[o,s]=(0,D.useState)(t),[c,l]=(0,D.useState)(void 0);return(0,D.useLayoutEffect)(()=>{let i=()=>{if(!r.current)return;let i=r.current,o=document.getElementById(`unrollable-panel-button-${n.identifier}`);if(!o)return;let c=o.getBoundingClientRect(),u=window.innerWidth,d=window.innerHeight,f=u-c.left-16,p=c.right-16;l(Math.max(f,p));let m=i.classList.contains(`invisible`);m&&(i.style.visibility=`hidden`,i.classList.remove(`invisible`)),requestAnimationFrame(()=>{let n=i.getBoundingClientRect();m&&(i.style.visibility=``,i.classList.add(`invisible`));let r=t,o=d-c.bottom-16,l=c.top-16;t===`bellow`&&o<n.height?l>=n.height&&(r=`above`):t===`above`&&l<n.height&&o>=n.height&&(r=`bellow`);let f=e,p=u-c.left-16,h=c.right-16;e===`start`&&p<n.width?h>=n.width&&(f=`end`):e===`end`&&h<n.width&&p>=n.width&&(f=`start`),s(r),a(f)})},o=setTimeout(i,0),c=document.getElementById(`unrollable-panel-button-${n.identifier}`);c&&(c.addEventListener(`mouseenter`,i),c.addEventListener(`focusin`,i));let u=new ResizeObserver(()=>{i()});return r.current&&u.observe(r.current),window.addEventListener(`resize`,i),window.addEventListener(`scroll`,i,!0),()=>{clearTimeout(o),c&&(c.removeEventListener(`mouseenter`,i),c.removeEventListener(`focusin`,i)),u.disconnect(),window.removeEventListener(`resize`,i),window.removeEventListener(`scroll`,i,!0)}},[n.identifier,e,t]),(0,O.jsx)(DJ,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},AJ=OJ;AJ.Detail=kJ;var jJ=new class{listeners=new Set;drawers={};subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.drawers;open=e=>{this.drawers[e]||(this.drawers={...this.drawers,[e]:!0},this.emit())};close=e=>{this.drawers[e]&&(this.drawers={...this.drawers,[e]:!1},this.emit())};set=e=>{let t=!1,n={...this.drawers};for(let[r,i]of Object.entries(e))n[r]!==i&&(n[r]=i,t=!0);t&&(this.drawers=n,this.emit())};emit=()=>{this.listeners.forEach(e=>{e()})}},MJ=()=>{let e=(0,V.c)(2),t=(0,D.useSyncExternalStore)(jJ.subscribe,jJ.getSnapshot,NJ),n;return e[0]===t?n=e[1]:(n={open:jJ.open,close:jJ.close,set:jJ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function NJ(){return{}}var PJ={key:`right-drawer`,content:{nodeType:`translation`,translation:{en:{goBack:`Go back`,closeDrawer:`Close Drawer`},"en-GB":{goBack:`Go back`,closeDrawer:`Close Drawer`},fr:{goBack:`Retour`,closeDrawer:`Fermer le tiroir`},es:{goBack:`Volver`,closeDrawer:`Cerrar cajón`},de:{goBack:`Zurück`,closeDrawer:`Schublade schließen`},ja:{goBack:`戻る`,closeDrawer:`引き出しを閉じる`},ko:{goBack:`뒤로`,closeDrawer:`서랍 닫기`},zh:{goBack:`返回`,closeDrawer:`关闭抽屉`},it:{goBack:`Indietro`,closeDrawer:`Chiudi cassetto`},pt:{goBack:`Voltar`,closeDrawer:`Fechar gaveta`},hi:{goBack:`वापस जाएं`,closeDrawer:`दराज बंद करें`},ar:{goBack:`رجوع`,closeDrawer:`إغلاق الدرج`},ru:{goBack:`Назад`,closeDrawer:`Закрыть панель`}}},localIds:[`right-drawer::local::../@intlayer/design-system/dist/esm/components/RightDrawer/rightDrawer.content.mjs`]},FJ=e=>{switch(e){case`xs`:return 480;case`sm`:return 640;case`md`:return 768;case`lg`:return 1024;case`xl`:return 1280;case`2xl`:return 1536;default:return e}},IJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/android|bb\d+|meego|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(?:hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(?:ob|in)i|palm(?: os)?|phone|p(?:ixi|re)\/|plucker|pocket|psp|series(?:4|6)0|symbian|treo|up\.(?:browser|link)|vodafone|wap|windows ce|windows phone|xda|xiino|zte-/i.test(e)},LJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},RJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},zJ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},BJ=(e=`md`)=>{let t=FJ(e),n=IJ(),r=zJ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:LJ(),isMac:RJ()}},VJ=e=>{let t=(0,V.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=BJ(n),t[0]=n,t[1]=r);let[i,a]=(0,D.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(BJ(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,D.useEffect)(o,s),i},HJ=e=>e.split(` + `).map(e=>e.trim()),UJ=e=>({"⌘":`Meta`,Ctrl:`Control`,Control:`Control`,Alt:`Alt`,"⌥":`Alt`,Shift:`Shift`,Meta:`Meta`,"↑":`ArrowUp`,"↓":`ArrowDown`,"←":`ArrowLeft`,"→":`ArrowRight`,ArrowUp:`ArrowUp`,ArrowDown:`ArrowDown`,ArrowLeft:`ArrowLeft`,ArrowRight:`ArrowRight`})[e]||e,WJ=(e,t)=>{let n=t.map(UJ),r={Meta:n.includes(`Meta`),Control:n.includes(`Control`),Alt:n.includes(`Alt`),Shift:n.includes(`Shift`)};if(r.Meta!==e.metaKey||r.Control!==e.ctrlKey||r.Alt!==e.altKey||r.Shift!==e.shiftKey)return!1;let i=t.find(e=>![`⌘`,`Ctrl`,`Control`,`Alt`,`⌥`,`Shift`,`Meta`].includes(UJ(e)));if(!i)return!1;let a=UJ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},GJ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,KJ=(e,t)=>{let n=e;return t?(n=n.replace(/Ctrl/g,`⌘`),n=n.replace(/Alt/g,`⌥`)):(n=n.replace(/⌘/g,`Ctrl`),n=n.replace(/⌥/g,`Alt`)),n=n.replace(/ArrowUp/g,`↑`),n=n.replace(/ArrowDown/g,`↓`),n=n.replace(/ArrowLeft/g,`←`),n=n.replace(/ArrowRight/g,`→`),n},qJ=e=>{let t=(0,V.c)(21),{shortcut:n,onTriggered:r,display:i,disabled:a,className:o,size:s}=e,c=i===void 0?!0:i,l=a===void 0?!1:a,u=s===void 0?`md`:s,{isMac:d}=VJ(),f;t[0]!==d||t[1]!==n?(f=HJ(KJ(n,d??!1)),t[0]=d,t[1]=n,t[2]=f):f=t[2];let p=f,m;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=new Set,t[3]=m):m=t[3];let[h,g]=(0,D.useState)(m),_,v;if(t[4]!==l||t[5]!==d||t[6]!==p||t[7]!==r?(_=()=>{let e=e=>{let t=e.target,n=t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable,i=e.key,a=new Set;if(e.metaKey&&a.add(`⌘`),e.ctrlKey&&a.add(`Ctrl`),e.altKey&&a.add(d?`⌥`:`Alt`),e.shiftKey&&a.add(`Shift`),i.startsWith(`Arrow`)?(a.add(i),a.add(GJ(i))):a.add(i.toUpperCase()),g(a),!l&&r&&WJ(e,p)){let t=p.includes(`Escape`);if(n&&!t)return;e.preventDefault(),r()}},t=()=>{g(new Set)};return window.addEventListener(`keydown`,e),window.addEventListener(`keyup`,t),window.addEventListener(`blur`,t),()=>{window.removeEventListener(`keydown`,e),window.removeEventListener(`keyup`,t),window.removeEventListener(`blur`,t)}},v=[p,r,d,l],t[4]=l,t[5]=d,t[6]=p,t[7]=r,t[8]=_,t[9]=v):(_=t[8],v=t[9]),(0,D.useEffect)(_,v),!c)return null;let y;t[10]===h?y=t[11]:(y=e=>{let t=e.toUpperCase(),n=UJ(e);return h.has(e)||h.has(t)||h.has(n)||e===`⌘`&&h.has(`Meta`)||e===`Ctrl`&&h.has(`Control`)||e===`⌥`&&h.has(`Alt`)||e===`Alt`&&h.has(`Alt`)||e===`←`&&h.has(`ArrowLeft`)||e===`→`&&h.has(`ArrowRight`)||e===`↑`&&h.has(`ArrowUp`)||e===`↓`&&h.has(`ArrowDown`)},t[10]=h,t[11]=y);let b=y,x;if(t[12]!==o||t[13]!==b||t[14]!==p||t[15]!==n||t[16]!==u){let e;t[18]!==b||t[19]!==n?(e=(e,t)=>{let r=`${e}-${t}-${n}`,i=GJ(e);return(0,O.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,O.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,O.jsx)(`span`,{className:G(`min-w-4 px-0.5 text-center`,b(e)&&`scale-120 font-bold text-text`),suppressHydrationWarning:!0,children:i})]},r)},t[18]=b,t[19]=n,t[20]=e):e=t[20],x=(0,O.jsx)(`kbd`,{className:G(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 border-neutral/20 text-neutral`,u===`sm`&&`text-xs`,u===`md`&&`text-sm`,u===`lg`&&`text-base`,o),children:p.map(e)}),t[12]=o,t[13]=b,t[14]=p,t[15]=n,t[16]=u,t[17]=x}else x=t[17];return x},JJ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,O.jsx)(`div`,{className:G(`relative grid h-full grid-cols-[0fr] overflow-x-hidden overflow-y-hidden transition-all duration-500 ease-in-out`,t?``:`grid-cols-[1fr]`,i),"aria-hidden":t,inert:t?!0:void 0,...a,children:(0,O.jsx)(`div`,{style:{minWidth:`${n}px`},className:G(r===`right`&&`ml-auto`),children:e})}),YJ=e=>{let t=e.getBoundingClientRect(),n=t.top,r=t.bottom-1;if(n>=0&&r<=window.innerHeight){let n=t.left+t.width/2,r=t.top+10,i=document.elementFromPoint(n,r);return e===i||e.contains(i)}return!1},XJ=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=_t(PJ),{isMobile:d}=VJ(`md`),f=(0,D.useRef)(null),p=(0,D.useRef)(null),m=Sq(l),{open:h,close:g,isOpen:_}=MJ(),v=_(t),y=v;Dq({disableScroll:y,key:t?`right_drawer_${t}`:`right_drawer`}),(0,D.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=y&&a,r=e.target&&!f.current.contains(e.target),i=YJ(f.current);(n&&r&&i||!e.target)&&(g(t),c?.())}catch{g(t),c?.()}};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[y,g,c,a,t]);let b=(0,D.useRef)(c);return(0,D.useEffect)(()=>{b.current=c},[c]),(0,D.useEffect)(()=>{s!==void 0&&s!==v&&(s?h(t):(g(t),b.current?.()))},[s,v,t,h,g]),m?(0,Sc.createPortal)((0,O.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,O.jsx)(JJ,{isHidden:!y,align:`right`,children:(0,O.jsxs)(_E,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,O.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,O.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,O.jsx)(`div`,{children:o&&(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:gu,children:o?.text})}),(0,O.jsx)(`div`,{children:(0,O.jsxs)(AJ,{identifier:`close-drawer`,children:[(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Ru,size:`icon-md`}),(0,O.jsx)(AJ.Detail,{identifier:`close-drawer`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,O.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,O.jsx)(qJ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,O.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,O.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,O.jsx)(`div`,{className:`flex flex-1 flex-col outline-none`,onClick:e=>{e.target===e.currentTarget&&d&&(g(t),c?.())},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),d&&(g(t),c?.()))},ref:p,role:`button`,tabIndex:0,children:n})}),i&&(0,O.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,O.jsx)(O.Fragment,{})},ZJ=tu(`w-fit backdrop-blur`,{variants:{roundedSize:{none:`rounded-none`,sm:`rounded-sm`,md:`rounded-md`,lg:`rounded-lg`,xl:`rounded-xl`,"2xl":`rounded-2xl`,"3xl":`rounded-3xl`,full:`rounded-full`},color:{primary:`border-primary bg-primary/10 text-primary`,success:`border-success bg-success/10 text-success`,error:`border-error bg-error/10 text-error`,warning:`border-warning bg-warning/10 text-warning`,neutral:`/10 border-neutral bg-neutral/10 text-neutral`,text:`border-text bg-text/10 text-text`,blue:`border-blue-500 bg-blue-500/10 text-blue-500 dark:text-blue-300`,yellow:`border-yellow-500 bg-yellow-500/10 text-yellow-500 dark:text-yellow-300`,green:`border-green-500 bg-green-500/10 text-green-500 dark:text-green-300`,red:`border-error bg-error/10 text-error dark:text-red-300`,orange:`border-orange-500 bg-orange-500/10 text-orange-500 dark:text-orange-300`,purple:`border-purple-500 bg-purple-500/10 text-purple-500 dark:text-purple-300`,pink:`border-pink-500 bg-pink-500/10 text-pink-500 dark:text-pink-300`,brown:`border-brown-500 bg-brown-500/10 text-brown-500 dark:text-brown-300`,gray:`border-gray-500 bg-gray-500/10 text-gray-500 dark:text-gray-300`,black:`border-black bg-black/10 text-black`,white:`border-white bg-white/10 text-white`},size:{xs:`border-[1.2px] px-2 py-0.5 text-xs`,sm:`border-[1.3px] px-2 py-0.5 text-sm`,md:`border-2 px-2 py-1 text-base`,lg:`border-2 px-3 py-2 text-lg`,xl:`border-2 px-3 py-2 text-xl`},border:{none:`border-none`,with:`border-[1.3px] border-text`},background:{none:`bg-none`,with:``}},defaultVariants:{roundedSize:`full`,border:`none`,color:`text`,size:`md`}}),QJ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,O.jsx)(`div`,{className:ZJ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),$J=`dictionaryList`,eY=e=>`dictionary_edition_${e}`,tY=e=>{let t=(0,V.c)(23),n;t[0]===e?n=t[1]:(n=eY(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=MJ(),{getEditedContentValue:s}=aC(),{focusedContent:c,setFocusedContent:l}=tC(),u;t[2]!==c?.dictionaryKey||t[3]!==r||t[4]!==a?(u=()=>{c?.dictionaryKey&&a(r)},t[2]=c?.dictionaryKey,t[3]=r,t[4]=a,t[5]=u):u=t[5];let d=c?.dictionaryKey,f;t[6]!==r||t[7]!==a||t[8]!==d?(f=[d,a,r],t[6]=r,t[7]=a,t[8]=d,t[9]=f):f=t[9],(0,D.useEffect)(u,f);let p;t[10]!==i||t[11]!==r?(p=i(r),t[10]=i,t[11]=r,t[12]=p):p=t[12];let m;t[13]!==o||t[14]!==c||t[15]!==r||t[16]!==l?(m=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[13]=o,t[14]=c,t[15]=r,t[16]=l,t[17]=m):m=t[17];let h;return t[18]!==c||t[19]!==s||t[20]!==p||t[21]!==m?(h={isOpen:p,focusedContent:c,getEditedContentValue:s,close:m},t[18]=c,t[19]=s,t[20]=p,t[21]=m,t[22]=h):h=t[22],h},nY=e=>{let t=(0,V.c)(77),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=_t(Ux),l;t[0]===n?l=t[1]:(l=eY(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=tY(n),{setFocusedContent:p}=tC(),{open:m}=MJ(),h;t[2]===m?h=t[3]:(h=()=>m($J),t[2]=m,t[3]=h);let g=h,{data:_}=dE(),v;t[4]!==f||t[5]!==g||t[6]!==p?(v=()=>{f(),p(null),g()},t[4]=f,t[5]=g,t[6]=p,t[7]=v):v=t[7];let y=v,[b,x]=(0,D.useState)(!1),S;t[8]===y?S=t[9]:(S=()=>{x(!1),y()},t[8]=y,t[9]=S);let C=S;if(!d?.dictionaryKey){let e;return t[10]===s?e=t[11]:(e=(0,O.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let w,T,E,k,A,j,M,N,P,F;if(t[12]!==i||t[13]!==f||t[14]!==d||t[15]!==c||t[16]!==y||t[17]!==u||t[18]!==a||t[19]!==p||t[20]!==_){A=Symbol.for(`react.early_return_sentinel`);bb0:{if(T=_?.[d.dictionaryKey]?.find(e=>e.localId===d?.dictionaryLocalId),!T){let e;t[31]===c?e=t[32]:(e=(0,O.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[31]=c,t[32]=e),A=e;break bb0}w=XJ,F=u,t[33]!==i.value||t[34]!==y?(E={onBack:y,text:i.value},t[33]=i.value,t[34]=y,t[35]=E):E=t[35],t[36]!==f||t[37]!==p?(k=()=>{f(),p(null)},t[36]=f,t[37]=p,t[38]=k):k=t[38];let e;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(e=()=>x(!0),t[39]=e):e=t[39];let n;t[40]===a.label.value?n=t[41]:(n=(0,O.jsx)(SE,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Au,label:a.label.value,onClick:e}),t[40]=a.label.value,t[41]=n);let r;t[42]===a.popoverContent?r=t[43]:(r=(0,O.jsx)(AJ.Detail,{identifier:`open-dictionary-editor`,children:(0,O.jsx)(`span`,{className:`whitespace-nowrap p-2 text-neutral text-xs`,children:a.popoverContent})}),t[42]=a.popoverContent,t[43]=r);let o;t[44]!==n||t[45]!==r?(o=(0,O.jsxs)(AJ,{identifier:`open-dictionary-editor`,children:[n,r]}),t[44]=n,t[45]=r,t[46]=o):o=t[46],P=(0,O.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,O.jsx)(`h3`,{className:`w-full text-center text-lg`,children:T.title?T.title:T.key}),o]}),j=`flex flex-wrap items-center justify-center gap-x-4 gap-y-2 border-text/20 border-b border-dotted pb-3`,M=(0,O.jsx)(QJ,{color:`text`,roundedSize:`full`,size:`xs`,children:T.key}),N=T.filePath&&(0,O.jsx)(QJ,{color:`blue`,roundedSize:`full`,size:`xs`,children:T.filePath.split(`/`).pop()})}t[12]=i,t[13]=f,t[14]=d,t[15]=c,t[16]=y,t[17]=u,t[18]=a,t[19]=p,t[20]=_,t[21]=w,t[22]=T,t[23]=E,t[24]=k,t[25]=A,t[26]=j,t[27]=M,t[28]=N,t[29]=P,t[30]=F}else w=t[21],T=t[22],E=t[23],k=t[24],A=t[25],j=t[26],M=t[27],N=t[28],P=t[29],F=t[30];if(A!==Symbol.for(`react.early_return_sentinel`))return A;let I;t[47]===T.id?I=t[48]:(I=T.id&&(0,O.jsx)(QJ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`}),t[47]=T.id,t[48]=I);let L;t[49]!==I||t[50]!==j||t[51]!==M||t[52]!==N?(L=(0,O.jsxs)(`div`,{className:j,children:[M,N,I]}),t[49]=I,t[50]=j,t[51]=M,t[52]=N,t[53]=L):L=t[53];let ee;t[54]!==L||t[55]!==P?(ee=(0,O.jsxs)(O.Fragment,{children:[P,L]}),t[54]=L,t[55]=P,t[56]=ee):ee=t[56];let te;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(te=[`local`,`remote`],t[57]=te):te=t[57];let ne;t[58]!==T||t[59]!==y?(ne=(0,O.jsx)(Zq,{dictionary:T,mode:te,className:`mb-4 flex-col px-3`,onDelete:y}),t[58]=T,t[59]=y,t[60]=ne):ne=t[60];let R;t[61]!==T||t[62]!==b||t[63]!==d||t[64]!==y||t[65]!==r||t[66]!==o||t[67]!==C?(R=d&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(Yq,{isOpen:b,onClose:()=>x(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,O.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,O.jsx)(TJ,{dictionary:T,onClickDictionaryList:C,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{x(!1),y()},onSave:()=>{x(!1)}})})}),(0,O.jsx)(fD,{dictionary:T})]}),t[61]=T,t[62]=b,t[63]=d,t[64]=y,t[65]=r,t[66]=o,t[67]=C,t[68]=R):R=t[68];let z;return t[69]!==w||t[70]!==E||t[71]!==k||t[72]!==ee||t[73]!==ne||t[74]!==R||t[75]!==F?(z=(0,O.jsx)(w,{identifier:F,backButton:E,onClose:k,header:ee,footer:ne,children:R}),t[69]=w,t[70]=E,t[71]=k,t[72]=ee,t[73]=ne,t[74]=R,t[75]=F,t[76]=z):z=t[76],z},rY=e=>{let t=(0,V.c)(4),{isDarkMode:n}=e,{focusedContent:r}=tC(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(O.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,O.jsx)(nY,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},iY={key:`dictionary-list-drawer`,content:{nodeType:`translation`,translation:{en:{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},"en-GB":{drawerTitle:{label:`Dictionary list`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Open dictionary editor {{dictionaryLocalId}}`}}},fr:{drawerTitle:{label:`Liste des dictionnaires`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Ouvrir le dictionnaire dans l'éditeur {{dictionaryLocalId}}`}}},es:{drawerTitle:{label:`Lista de diccionarios`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir el diccionario en el editor {{dictionaryLocalId}}`}}},de:{drawerTitle:{label:`Wörterbuchliste`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Wörterbuch-Editor öffnen {{dictionaryLocalId}}`}}},ja:{drawerTitle:{label:`辞書リスト`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`辞書エディタを開く {{dictionaryLocalId}}`}}},ko:{drawerTitle:{label:`사전 목록`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`사전 편집기 열기 {{dictionaryLocalId}}`}}},zh:{drawerTitle:{label:`字典列表`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`打开字典编辑器 {{dictionaryLocalId}}`}}},it:{drawerTitle:{label:`Lista dei dizionari`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Apri editor dizionario {{dictionaryLocalId}}`}}},pt:{drawerTitle:{label:`Lista de dicionários`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Abrir editor de dicionário {{dictionaryLocalId}}`}}},hi:{drawerTitle:{label:`शब्दकोश सूची`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`शब्दकोश संपादक खोलें {{dictionaryLocalId}}`}}},ar:{drawerTitle:{label:`قائمة القواميس`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`فتح محرر القاموس {{dictionaryLocalId}}`}}},ru:{drawerTitle:{label:`Список словарей`},buttonLabel:{label:{fields:[`dictionaryLocalId`],nodeType:`insertion`,insertion:`Открыть редактор словаря {{dictionaryLocalId}}`}}}}},localIds:[`dictionary-list-drawer::local::client/src/components/Editor/DictionaryListDrawer/dictionaryListDrawer.content.ts`]},aY=e=>{let t=(0,V.c)(15),n;t[0]===e?n=t[1]:(n=e??{},t[0]=e,t[1]=n);let{minChars:r,debounceMs:i,trim:a,defaultValue:o,onSearch:s,onClear:c}=n,l=r===void 0?3:r,u=i===void 0?300:i,d=a===void 0?!0:a,f=(0,D.useRef)(``),p=(0,D.useRef)(null),[m,h]=(0,D.useState)(o??``),g;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{p.current&&=(clearTimeout(p.current),null)},t[2]=g):g=t[2];let _=g,v;t[3]!==u||t[4]!==l||t[5]!==c||t[6]!==s||t[7]!==d?(v=e=>{f.current=e;let t=d?e.trim():e;if(_(),t.length<l){h(``),c?.();return}p.current=setTimeout(()=>{let e=d?f.current.trim():f.current;e.length>=l?(h(e),s?.(e)):(h(``),c?.())},u)},t[3]=u,t[4]=l,t[5]=c,t[6]=s,t[7]=d,t[8]=v):v=t[8];let y=v,b,x;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>()=>{_()},x=[],t[9]=b,t[10]=x):(b=t[9],x=t[10]),(0,D.useEffect)(b,x);let S=m.length>=l,C;return t[11]!==m||t[12]!==y||t[13]!==S?(C={setSearch:y,search:m,hasMinChars:S},t[11]=m,t[12]=y,t[13]=S,t[14]=C):C=t[14],C},oY=()=>{let{drawerTitle:e,buttonLabel:t}=_t(iY),{set:n}=MJ(),{localeDictionaries:r}=ZS(),{editedContent:i}=oC(),{setFocusedContent:a}=tC(),{setSearch:o,search:s}=aY(),c=(0,D.useMemo)(()=>new uI(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,D.useMemo)(()=>!s||s.trim()===``?Object.values(r):c.search(s).map(e=>e.item),[s,c,r]),u=e=>{a({dictionaryKey:e.key,dictionaryLocalId:e.localId,keyPath:[]}),n({[$J]:!1,[eY(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,O.jsxs)(XJ,{title:e.label.value,identifier:$J,children:[(0,O.jsx)(`div`,{className:`p-3 pb-4`,children:(0,O.jsx)(gG,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,O.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,O.jsx)(`li`,{className:`w-full`,children:(0,O.jsx)(SE,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:_u,size:`md`,isFullWidth:!0,Icon:d(e.localId)?ju:void 0,children:(0,O.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,O.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,O.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,O.jsx)(QJ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,O.jsx)(QJ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,O.jsx)(QJ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,O.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},sY={key:`long-press-message`,content:{nodeType:`translation`,translation:{en:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},"en-GB":{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press to edit the "{{dictionaryKey}}" dictionary`}},fr:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Long press pour éditer le dictionnaire "{{dictionaryKey}}"`}},es:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Presiona largo para editar el diccionario "{{dictionaryKey}}"`}},de:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Lang press für Bearbeitung des Wörterbuchs "{{dictionaryKey}}"`}},ja:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`長押しして編集 "{{dictionaryKey}}" 辞書`}},ko:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`길게 눌러 편집 "{{dictionaryKey}}" 사전`}},zh:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`长按编辑 "{{dictionaryKey}}" 字典`}},it:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Premi a lungo per modificare il dizionario "{{dictionaryKey}}"`}},pt:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Pressione longa para editar o dicionário "{{dictionaryKey}}"`}},hi:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`लंग प्रेस करें टू एडिट "{{dictionaryKey}}"`}},ar:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`اضغط طويلاً للتعديل "{{dictionaryKey}}"`}},ru:{message:{fields:[`dictionaryKey`],nodeType:`insertion`,insertion:`Длительное нажатие для редактирования словаря "{{dictionaryKey}}"`}}}},localIds:[`long-press-message::local::client/src/components/Editor/LongPressMessage/index.content.ts`]},cY=()=>{let e=(0,V.c)(8),{message:t}=_t(sY),[n]=YS(Xx.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=G(`rounded-2xl bg-neutral/30 px-3 py-1 font-bold text-sm text-text transition-opacity duration-100`,r),e[0]=r,e[1]=i);let a;e[2]!==n||e[3]!==t?(a=n?.dictionaryKey?t({dictionaryKey:n.dictionaryKey}):``,e[2]=n,e[3]=t,e[4]=a):a=e[4];let o;return e[5]!==i||e[6]!==a?(o=(0,O.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},lY=e=>{let t=(0,V.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,O.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,O.jsx)(cY,{})}),i=(0,O.jsx)(rY,{}),a=(0,O.jsx)(oY,{}),t[0]=r,t[1]=i,t[2]=a):(r=t[0],i=t[1],a=t[2]);let o;return t[3]===n?o=t[4]:(o=(0,O.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},uY=()=>{let e=(0,V.c)(2),[t,n]=(0,D.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(dY).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,D.useEffect)(r,i),t};function dY(e){return e.json()}var fY=e=>{let t=(0,V.c)(11),{children:n,iframeRef:r}=e,i=uY(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(yE,{}),t[0]=e):e=t[0],e}let o;t[1]!==a||t[2]!==r?(o=e=>{r.current?.contentWindow?.postMessage(e,a)},t[1]=a,t[2]=r,t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=[a],t[4]=a,t[5]=s);let c;return t[6]!==n||t[7]!==i||t[8]!==o||t[9]!==s?(c=(0,O.jsx)(nC,{postMessage:o,allowedOrigins:s,configuration:i,children:n}),t[6]=n,t[7]=i,t[8]=o,t[9]=s,t[10]=c):c=t[10],c},pY={key:`iframe-controller`,content:{nodeType:`translation`,translation:{en:{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},"en-GB":{intlayerApplication:`Intlayer Application`,enableEditor:`Enable Editor`},fr:{intlayerApplication:`Application Intlayer`,enableEditor:`Activer l'éditeur`},es:{intlayerApplication:`Aplicación Intlayer`,enableEditor:`Activar el editor`},de:{intlayerApplication:`Intlayer-Anwendung`,enableEditor:`Editor aktivieren`},ja:{intlayerApplication:`Intlayerアプリケーション`,enableEditor:`エディタを有効にする`},ko:{intlayerApplication:`Intlayer 애플리케이션`,enableEditor:`에디터 활성화`},zh:{intlayerApplication:`Intlayer 应用程序`,enableEditor:`启用编辑器`},it:{intlayerApplication:`Applicazione Intlayer`,enableEditor:`Abilita l'editor`},pt:{intlayerApplication:`Aplicativo Intlayer`,enableEditor:`Ativar editor`},hi:{intlayerApplication:`इंटलेयर एप्लिकेशन`,enableEditor:`संपादक सक्षम करें`},ar:{intlayerApplication:`تطبيق Intlayer`,enableEditor:`تفعيل المحرر`},ru:{intlayerApplication:`Приложение Intlayer`,enableEditor:`Включить редактор`}}},localIds:[`iframe-controller::local::client/src/components/Editor/iframeController.content.ts`]},mY=()=>{let e=(0,V.c)(9),{editedContent:t,setEditedContentState:n}=oC(),r;e[0]===n?r=e[1]:(r=()=>{let e=localStorage?.getItem(`INTLAYER_EDITED_CONTENT_CHANGED`);if(e)try{n(JSON.parse(e))}catch(e){console.error(e)}},e[0]=n,e[1]=r);let i=r,a,o;e[2]===t?(a=e[3],o=e[4]):(a=()=>{t!==void 0&&localStorage?.setItem(`INTLAYER_EDITED_CONTENT_CHANGED`,JSON.stringify(t))},o=[t],e[2]=t,e[3]=a,e[4]=o),(0,D.useEffect)(a,o);let s;e[5]!==t||e[6]!==i?(s=()=>{t===void 0&&i()},e[5]=t,e[6]=i,e[7]=s):s=e[7];let c;return e[8]===Symbol.for(`react.memo_cache_sentinel`)?(c=[],e[8]=c):c=e[8],(0,D.useEffect)(s,c),i},hY={key:`no-application-url-view`,content:{nodeType:`translation`,translation:{en:{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},"en-GB":{title:`Your project configuration do not includes application URL`,description:`To use the editor, you need to add the URL of the application to access to the configuration file.`,documentationLink:{label:`Click to go to the editor documentation`,text:`See how to configure the editor`}},fr:{title:`Votre configuration de projet ne comprend pas l’URL de l’application`,description:`Pour utiliser l’éditeur, vous devez ajouter l’URL de l’application pour accéder au fichier de configuration.`,documentationLink:{label:`Cliquez ici pour accéder à la documentation de l’éditeur`,text:`Voir comment configurer l’éditeur`}},es:{title:`Su configuración de proyecto no incluye la URL de la aplicación`,description:`Para usar el editor, debe agregar la URL de la aplicación para acceder al archivo de configuración.`,documentationLink:{label:`Haga clic aquí para acceder a la documentación del editor`,text:`Vea cómo configurar el editor`}},de:{title:`Ihre Projektkonfiguration enthält keine Anwendungs-URL`,description:`Um den Editor zu verwenden, müssen Sie die URL der Anwendung hinzufügen, um auf die Konfigurationsdatei zuzugreifen.`,documentationLink:{label:`Klicken Sie hier, um die Editor-Dokumentation zu besuchen`,text:`Siehe, wie man den Editor konfiguriert`}},ja:{title:`あなたのプロジェクト構成にはアプリケーション URL が含まれていません`,description:`エディターを使用するには、アプリケーションの URL を設定ファイルに追加する必要があります。`,documentationLink:{label:`エディターのドキュメントに移動するには、ここをクリックしてください`,text:`エディターの設定方法を見る`}},ko:{title:`당신의 프로젝트 구성에 앱 URL이 포함되어 있지 않습니다.`,description:`에디터를 사용하려면 설정 파일에 앱 URL을 추가해야 합니다.`,documentationLink:{label:`에디터 문서로 이동하려면 여기를 클릭하십시오.`,text:`에디터 설정 방법을 보십시오`}},zh:{title:`您的项目配置未包含应用程序 URL`,description:`要使用编辑器,您需要将应用程序 URL 添加到访问配置文件。`,documentationLink:{label:`点击此处访问编辑器文档`,text:`查看如何配置编辑器`}},it:{title:`La configurazione del progetto non include l’URL dell’applicazione`,description:`Per utilizzare l’editor, è necessario aggiungere l’URL dell’applicazione per accedere al file di configurazione.`,documentationLink:{label:`Fai clic qui per accedere alla documentazione dell’editor`,text:`Vedi come configurare l’editor`}},pt:{title:`Sua configuração do projeto não inclui a URL do aplicativo`,description:`Para usar o editor, você precisa adicionar a URL do aplicativo para acessar o arquivo de configuração.`,documentationLink:{label:`Clique aqui para acessar a documentação do editor`,text:`Veja como configurar o editor`}},hi:{title:`आपके प्रोजेक्ट कॉन्फ़िगरेशन में ऐप का URL शामिल नहीं है`,description:`एडिटर का उपयोग करने के लिए, आपको कॉन्फ़िगरेशन फ़ाइल तक ऐप का URL को जोड़ना होगा।`,documentationLink:{label:`एडिटर को डॉक्यूमेंट पर जाए रखना चाहते हैं?`,text:`एडिटर को काने के बारे में देखें`}},ar:{title:`تم إنشاء مشروعك بدون تضمين عنوان URL التطبيق`,description:`لاستخدام المحرر، يجب عليك إضافة عنوان URL التطبيق للوصول إلى ملف التكوين.`,documentationLink:{label:`انقر هنا للوصول إلى وثائق المحرر`,text:`انظر كيفية تكوين المحرر`}},ru:{title:`Ваша конфигурация проекта не включает URL-адрес приложения`,description:`Чтобы использовать редактор, вам необходимо добавить URL-адрес приложения для доступа к файлу конфигурации.`,documentationLink:{label:`Нажмите, чтобы перейти к документации редактора`,text:`Смотрите, как настроить редактор`}}}},localIds:[`no-application-url-view::local::client/src/components/Editor/NoApplicationURLView/noApplicationURLView.content.ts`]},gY=()=>{let e=(0,V.c)(11),{title:t,description:n,documentationLink:r}=_t(hY),i;e[0]===t?i=e[1]:(i=(0,O.jsx)(Hq,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,O.jsx)(`strong`,{className:`block text-neutral`,children:n}),e[2]=n,e[3]=a);let o;e[4]!==r.label.value||e[5]!==r.text?(o=(0,O.jsx)(kP,{label:r.label.value,href:`https://intlayer.org/doc/concept/configuration#editor-configuration`,color:`text`,variant:`button`,className:`ml-auto`,isExternalLink:!0,children:r.text}),e[4]=r.label.value,e[5]=r.text,e[6]=o):o=e[6];let s;return e[7]!==i||e[8]!==a||e[9]!==o?(s=(0,O.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[i,a,o]}),e[7]=i,e[8]=a,e[9]=o,e[10]=s):s=e[10],s},_Y=e=>{let t=(0,V.c)(23),{iframeRef:n,applicationPath:r}=e,i=_t(pY),{editor:a}=iC()??{},{enabled:o}=sC(),s=cC();mY(),uC();let[c,l]=(0,D.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=XS(void 0,u),f,p;if(t[1]===d?(f=t[2],p=t[3]):(f=()=>{typeof d==`string`&&window.history.replaceState({},``,d)},p=[d],t[1]=d,t[2]=f,t[3]=p),(0,D.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,O.jsx)(_E,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,O.jsx)(gY,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,O.jsx)(yE,{isLoading:c}),t[5]=c,t[6]=m);let h=`${a.applicationURL}${r}`,g=i.intlayerApplication.value,_=c&&`hidden`,v;t[7]===_?v=t[8]:(v=G(`size-full`,_),t[7]=_,t[8]=v);let y;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(y=()=>{l(!1)},t[9]=y):y=t[9];let b;t[10]!==i.intlayerApplication.value||t[11]!==n||t[12]!==h||t[13]!==v?(b=(0,O.jsx)(`iframe`,{src:h,title:g,sandbox:`allow-scripts allow-same-origin`,className:v,ref:n,onLoad:y}),t[10]=i.intlayerApplication.value,t[11]=n,t[12]=h,t[13]=v,t[14]=b):b=t[14];let x;t[15]!==i.enableEditor||t[16]!==o||t[17]!==s?(x=!o&&(0,O.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,O.jsx)(SE,{label:i.enableEditor.value,onClick:s,color:`text`,children:i.enableEditor})}),t[15]=i.enableEditor,t[16]=o,t[17]=s,t[18]=x):x=t[18];let S;return t[19]!==b||t[20]!==x||t[21]!==m?(S=(0,O.jsxs)(`div`,{className:`relative size-full overflow-hidden rounded-lg`,children:[m,b,x]}),t[19]=b,t[20]=x,t[21]=m,t[22]=S):S=t[22],S},vY=()=>{let e=(0,V.c)(2),t=(0,D.useRef)(null),n=Ln(),r;return e[0]===n.pathname?r=e[1]:(r=(0,O.jsx)(fY,{iframeRef:t,children:(0,O.jsx)(ht,{disableEditor:!0,children:(0,O.jsx)(lY,{children:(0,O.jsx)(_Y,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,No.createRoot)(document.getElementById(`root`)).render((0,O.jsx)(D.StrictMode,{children:(0,O.jsx)(()=>{let e=(0,V.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,O.jsx)(Hx,{children:(0,O.jsx)(Vx,{children:(0,O.jsx)(vY,{})})}),e[0]=t):t=e[0],t},{})}));export{x as C,u as E,E as S,c as T,du as _,Bq as a,_t as b,Uq as c,kP as d,J as f,_E as g,SE as h,Yq as i,Wq as l,CE as m,fJ as n,Vq as o,mD as p,rJ as r,Hq as s,AJ as t,Gq as u,tu as v,p as w,Fe as x,G as y};
|