intlayer-editor 8.9.7 → 8.9.8
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-DI2Ux6x7.js → CodeBlockClient-Cfppn9ub.js} +3 -3
- package/client/dist/assets/{CodeBlockShiki-FUdNKsp6.js → CodeBlockShiki-D_r-AU6H.js} +2 -2
- package/client/dist/assets/{MarkDownRender-CwYfws6H.js → MarkDownRender-1dAb42uT.js} +3 -3
- package/client/dist/assets/angular-html-6x7HOuAX.js +1 -0
- package/client/dist/assets/{angular-html-B5cFy3zJ.js → angular-html-C1_ktC5c.js} +1 -1
- package/client/dist/assets/angular-ts-CQ37BvLS.js +1 -0
- package/client/dist/assets/{angular-ts-AaMu0fOZ.js → angular-ts-wOiV7Bqw.js} +1 -1
- package/client/dist/assets/{astro-BBrgiHaL.js → astro-DQGmz69T.js} +1 -1
- package/client/dist/assets/astro-X6EHzxO7.js +1 -0
- package/client/dist/assets/bash-By1UYtZZ.js +1 -0
- package/client/dist/assets/{blade-DMamcNEm.js → blade-Cu3Ej4HE.js} +1 -1
- package/client/dist/assets/{bundle-web-DmyJnmYJ.js → bundle-web-BTy6mFmi.js} +3 -3
- package/client/dist/assets/{c-DE1yPHmY.js → c-CSBhdKhH.js} +1 -1
- package/client/dist/assets/{coffee-awy5CXlY.js → coffee-BljkZBlT.js} +1 -1
- package/client/dist/assets/{cpp-Cir3bDpp.js → cpp-C0j_Muju.js} +1 -1
- package/client/dist/assets/css-6LMrLsnL.js +1 -0
- package/client/dist/assets/{css-CpkmSQt5.js → css-DXC7paGp.js} +1 -1
- package/client/dist/assets/{dist-DwV4KkIc.js → dist-Du3avZ3_.js} +1 -1
- package/client/dist/assets/{glsl-DbLBEbaM.js → glsl-DW99jMcg.js} +1 -1
- package/client/dist/assets/{graphql--7XffOA_.js → graphql-usEu64VI.js} +1 -1
- package/client/dist/assets/{haml-BF3DZ3o_.js → haml-B0v2pOAS.js} +1 -1
- package/client/dist/assets/{handlebars-BjgE7YPG.js → handlebars-LhdsDp3n.js} +1 -1
- package/client/dist/assets/{html-DhCDMCbh.js → html-DCzByzRn.js} +1 -1
- package/client/dist/assets/{html-derivative-Bhz-yz27.js → html-derivative-DY1hANIy.js} +1 -1
- package/client/dist/assets/html-rWb_0rEi.js +1 -0
- package/client/dist/assets/{http-A0kF4mlE.js → http-C5UcQ8_F.js} +1 -1
- package/client/dist/assets/{hurl-Bw3T-QpZ.js → hurl-B2i4OXin.js} +1 -1
- package/client/dist/assets/index-CCUXfHvt.css +2 -0
- package/client/dist/assets/{index-KuA8EhBp.js → index-CHarlQYc.js} +6 -6
- package/client/dist/assets/{java-CRwOtJik.js → java-DO8NkNlM.js} +1 -1
- package/client/dist/assets/javascript-C4lWcboR.js +1 -0
- package/client/dist/assets/{javascript-C_2DxZj5.js → javascript-DEGLFO96.js} +1 -1
- package/client/dist/assets/{jinja-BfoRd6wA.js → jinja-BhsuO0mc.js} +1 -1
- package/client/dist/assets/{jison-Qyoz0UhQ.js → jison-CNthGGH4.js} +1 -1
- package/client/dist/assets/json-CaI0RCaU.js +1 -0
- package/client/dist/assets/{json-BK7DdqmP.js → json-D77Gi08Z.js} +1 -1
- package/client/dist/assets/{jsx-BWyZ9ef2.js → jsx-CGaI1oiQ.js} +1 -1
- package/client/dist/assets/{julia-pSIilXex.js → julia-BtNyznjO.js} +1 -1
- package/client/dist/assets/{marko-gsht3S5Z.js → marko-Cp-gqNXV.js} +1 -1
- package/client/dist/assets/{mdc-D98xauxm.js → mdc-D5kDd3Vh.js} +1 -1
- package/client/dist/assets/{php-XhV117Te.js → php-CXopZyYp.js} +1 -1
- package/client/dist/assets/{postcss-p2Aqym-c.js → postcss-Ds_rVzPO.js} +1 -1
- package/client/dist/assets/{pug-VMEsQ1BB.js → pug-D8Sa0sWT.js} +1 -1
- package/client/dist/assets/{regexp-XTllzwB5.js → regexp-DS8GxbDf.js} +1 -1
- package/client/dist/assets/{scss-CnBi0kyK.js → scss-BUDgGyNM.js} +1 -1
- package/client/dist/assets/{shellscript-LMcURRun.js → shellscript-BnSguREt.js} +1 -1
- package/client/dist/assets/{sql-CcuLG0m9.js → sql-RSr5Hm_Q.js} +1 -1
- package/client/dist/assets/svelte-BmAntO9J.js +1 -0
- package/client/dist/assets/{svelte-fGyqBkPm.js → svelte-dR694-Y4.js} +1 -1
- package/client/dist/assets/{ts-tags-6Y45voLL.js → ts-tags-C2fgzJjS.js} +1 -1
- package/client/dist/assets/{tsx-MuI0qVYB.js → tsx-CG05RXiV.js} +1 -1
- package/client/dist/assets/tsx-eIxS1YG8.js +1 -0
- package/client/dist/assets/{typescript-CEa9RQpw.js → typescript-CpHeHTGt.js} +1 -1
- package/client/dist/assets/typescript-kP7C2txz.js +1 -0
- package/client/dist/assets/vue-BBLdz8Kd.js +1 -0
- package/client/dist/assets/{vue-DJ5RPPf0.js → vue-BIaRLQ90.js} +1 -1
- package/client/dist/assets/{vue-html-DrZNRCIC.js → vue-html-CZhvGYqY.js} +1 -1
- package/client/dist/assets/{vue-vine-BhEkT-Ae.js → vue-vine-1Oi4w0_X.js} +1 -1
- package/client/dist/assets/{xml-Dn2GDtwx.js → xml-CVCAPs5t.js} +1 -1
- package/client/dist/assets/xml-DEK3QTWg.js +1 -0
- package/client/dist/index.html +2 -2
- package/package.json +11 -11
- package/server/dist/controllers/configuration.controller.cjs.map +1 -1
- package/server/dist/controllers/configuration.controller.mjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.cjs.map +1 -1
- package/server/dist/controllers/dictionary.controller.mjs.map +1 -1
- package/server/dist/index.cjs.map +1 -1
- package/server/dist/index.mjs.map +1 -1
- package/server/dist/routes/config.routes.cjs.map +1 -1
- package/server/dist/routes/config.routes.mjs.map +1 -1
- package/server/dist/routes/dictionary.routes.cjs.map +1 -1
- package/server/dist/routes/dictionary.routes.mjs.map +1 -1
- package/server/dist/utils/checkPortAvailability.cjs.map +1 -1
- package/server/dist/utils/checkPortAvailability.mjs.map +1 -1
- package/server/dist/utils/httpStatusCodes.cjs.map +1 -1
- package/server/dist/utils/httpStatusCodes.mjs.map +1 -1
- package/server/dist/utils/responseData.cjs.map +1 -1
- package/server/dist/utils/responseData.mjs.map +1 -1
- package/client/dist/assets/angular-html-CkZN-zwb.js +0 -1
- package/client/dist/assets/angular-ts-aCJQrVLy.js +0 -1
- package/client/dist/assets/astro-K-GMz4bW.js +0 -1
- package/client/dist/assets/bash-CLMUVK7P.js +0 -1
- package/client/dist/assets/css-DSN6QOaH.js +0 -1
- package/client/dist/assets/html-QdiNHQ1g.js +0 -1
- package/client/dist/assets/index-EitKxXyt.css +0 -2
- package/client/dist/assets/javascript-Ilxev6-r.js +0 -1
- package/client/dist/assets/json-CMWM7dTt.js +0 -1
- package/client/dist/assets/svelte-B8rfFmF_.js +0 -1
- package/client/dist/assets/tsx-BQfVnQdW.js +0 -1
- package/client/dist/assets/typescript-BdlM1D4f.js +0 -1
- package/client/dist/assets/vue-C2H2WQEN.js +0 -1
- package/client/dist/assets/xml-z1Hfb9SR.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-1dAb42uT.js","assets/CodeBlockClient-Cfppn9ub.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 re(e){return{current:e}}function R(e){0>ne||(e.current=te[ne],te[ne]=null,ne--)}function z(e,t){ne++,te[ne]=e.current,e.current=t}var ie=re(null),ae=re(null),oe=re(null),se=re(null);function ce(e,t){switch(z(oe,t),z(ae,e),z(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Yd(t),e=Xd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}R(ie),z(ie,e)}function le(){R(ie),R(ae),R(oe)}function ue(e){e.memoizedState!==null&&z(se,e);var t=ie.current,n=Xd(t,e.type);t!==n&&(z(ae,e),z(ie,n))}function de(e){ae.current===e&&(R(ie),R(ae)),se.current===e&&(R(se),ap._currentValue=ee)}var fe,pe;function me(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``,pe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+fe+e+pe}var he=!1;function ge(e,t){if(!e||he)return``;he=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -17,7 +17,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
17
17
|
${h}px !important;
|
|
18
18
|
${g}px !important;
|
|
19
19
|
}
|
|
20
|
-
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,k.jsx)(Ry,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:O.cloneElement(e,{ref:u})})}var By=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Zu(Vy),d=(0,O.useId)(),f=!0,p=(0,O.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,O.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),O.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,k.jsx)(zy,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,k.jsx)($u.Provider,{value:p,children:e})};function Vy(){return new Map}function Hy(e=!0){let t=(0,O.useContext)($u);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,O.useId)();(0,O.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,O.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Uy=e=>e.key||``;function Wy(e){let t=[];return O.Children.forEach(e,e=>{(0,O.isValidElement)(e)&&t.push(e)}),t}var Gy=({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]=Hy(o),f=(0,O.useMemo)(()=>Wy(e),[e]),p=o&&!u?[]:f.map(Uy),m=(0,O.useRef)(!0),h=(0,O.useRef)(f),g=Zu(()=>new Map),_=(0,O.useRef)(new Set),[v,y]=(0,O.useState)(f),[b,x]=(0,O.useState)(f);Qu(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=Uy(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=Uy(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(Wy(e)),y(f),null}let{forceRender:C}=(0,O.useContext)(Xu);return(0,k.jsx)(k.Fragment,{children:b.map(e=>{let v=Uy(e),y=o&&!u?!1:f===b||p.includes(v);return(0,k.jsx)(By,{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)})})},Ky=(0,O.createContext)({strict:!1}),qy={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`]},Jy=!1;function Yy(){if(Jy)return;let e={};for(let t in qy)e[t]={isEnabled:e=>qy[t].some(t=>!!e[t])};Zg(e),Jy=!0}function Xy(){return Yy(),Qg()}function Zy(e){let t=Xy();for(let n in e)t[n]={...t[n],...e[n]};Zg(t)}function Qy({children:e,features:t,strict:n=!1}){let[,r]=(0,O.useState)(!$y(t)),i=(0,O.useRef)(void 0);if(!$y(t)){let{renderer:e,...n}=t;i.current=e,Zy(n)}return(0,O.useEffect)(()=>{$y(t)&&t().then(({renderer:e,...t})=>{Zy(t),i.current=e,r(!0)})},[]),(0,k.jsx)(Ky.Provider,{value:{renderer:i.current,strict:n},children:e})}function $y(e){return typeof e==`function`}var eb=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 tb(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||eb.has(e)}var nb=c({default:()=>rb}),rb,ib=o((()=>{throw rb={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),ab=e=>!tb(e);function ob(e){typeof e==`function`&&(ab=t=>t.startsWith(`on`)?!tb(t):e(t))}try{ob((ib(),d(nb)).default)}catch{}function sb(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||hh(e[i])||(ab(i)||n===!0&&tb(i)||!t&&!tb(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var cb=(0,O.createContext)({});function lb(e,t){if(Hg(e)){let{initial:t,animate:n}=e;return{initial:t===!1||zg(t)?t:void 0,animate:zg(n)?n:void 0}}return e.inherit===!1?{}:t}function ub(e){let{initial:t,animate:n}=lb(e,(0,O.useContext)(cb));return(0,O.useMemo)(()=>({initial:t,animate:n}),[db(t),db(n)])}function db(e){return Array.isArray(e)?e.join(` `):e}var fb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pb(e,t,n){for(let r in t)!hh(t[r])&&!M_(r,n)&&(e[r]=t[r])}function mb({transformTemplate:e},t){return(0,O.useMemo)(()=>{let n=fb();return E_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function hb(e,t){let n=e.style||{},r={};return pb(r,n,e),Object.assign(r,mb(e,t)),r}function gb(e,t){let n={},r=hb(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 _b=()=>({...fb(),attrs:{}});function vb(e,t,n,r){let i=(0,O.useMemo)(()=>{let n=_b();return B_(n,t,H_(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};pb(t,e.style,e),i.style={...t,...i.style}}return i}var yb=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function bb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(yb.indexOf(e)>-1||/[A-Z]/u.test(e))}function xb(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??bb(e)?vb:gb)(t,r,i,e),c=sb(t,typeof e==`string`,a),l=e===O.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,O.useMemo)(()=>hh(u)?u.get():u,[u]);return(0,O.createElement)(e,{...l,children:d})}function Sb({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Cb(n,r,i,e),renderState:t()}}function Cb(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Yv(a[e]);let{initial:o,animate:s}=e,c=Hg(e),l=Ug(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`&&!Rg(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=rh(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var wb=e=>(t,n)=>{let r=(0,O.useContext)(cb),i=(0,O.useContext)($u),a=()=>Sb(e,t,r,i);return n?a():Zu(a)},Tb=wb({scrapeMotionValuesFromProps:N_,createRenderState:fb}),Eb=wb({scrapeMotionValuesFromProps:W_,createRenderState:_b}),Db=Symbol.for(`motionComponentSymbol`);function Ob(e,t,n){let r=(0,O.useRef)(n);(0,O.useInsertionEffect)(()=>{r.current=n});let i=(0,O.useRef)(null);return(0,O.useCallback)(n=>{n&&e.onMount?.(n);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&&(n?t.mount(n):t.unmount())},[t])}var kb=(0,O.createContext)({});function Ab(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function jb(e,t,n,r,i,a){let{visualElement:o}=(0,O.useContext)(cb),s=(0,O.useContext)(Ky),c=(0,O.useContext)($u),l=(0,O.useContext)(Py),u=l.reducedMotion,d=l.skipAnimations,f=(0,O.useRef)(null),p=(0,O.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,O.useContext)(kb);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Mb(f.current,n,i,h);let g=(0,O.useRef)(!1);(0,O.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[yh],v=(0,O.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Qu(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,O.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Mb(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:Nb(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ab(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Nb(e){if(e)return e.options.allowProjection===!1?Nb(e.parent):e.projection}function Pb(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Zy(r);let a=n?n===`svg`:bb(e),o=a?Eb:Tb;function s(n,s){let c,l={...(0,O.useContext)(Py),...n,layoutId:Fb(n)},{isStatic:u}=l,d=ub(n),f=o(n,u);if(!u&&typeof window<`u`){Ib(l,r);let t=Lb(l);c=t.MeasureLayout,d.visualElement=jb(e,f,l,i,t.ProjectionNode,a)}return(0,k.jsxs)(cb.Provider,{value:d,children:[c&&d.visualElement?(0,k.jsx)(c,{visualElement:d.visualElement,...l}):null,xb(e,n,Ob(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,O.forwardRef)(s);return c[Db]=e,c}function Fb({layoutId:e}){let t=(0,O.useContext)(Xu).id;return t&&e!==void 0?t+`-`+e:e}function Ib(e,t){(0,O.useContext)(Ky).strict}function Lb(e){let{drag:t,layout:n}=Xy();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Rb(e,t){if(typeof Proxy>`u`)return Pb;let n=new Map,r=(n,r)=>Pb(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Pb(a,void 0,e,t)),n.get(a))})}var zb=(e,t)=>t.isSVG??bb(e)?new G_(t):new F_(t,{allowProjection:e!==O.Fragment}),Bb=class extends t_{constructor(e){super(e),e.animationState||=Q_(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Rg(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?.()}},Vb=0,Hb={animation:{Feature:Bb},exit:{Feature:class extends t_{constructor(){super(...arguments),this.id=Vb++,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`){let n=ih(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 Ub(e){return{point:{x:e.pageX,y:e.pageY}}}var Wb=e=>t=>rg(t)&&e(t,Ub(t));function Gb(e,t,n,r){return Gv(e,t,Wb(n),r)}var Kb=({current:e})=>e?e.ownerDocument.defaultView:null,qb=(e,t)=>Math.abs(e-t);function Jb(e,t){let n=qb(e.x,t.x),r=qb(e.y,t.y);return Math.sqrt(n**2+r**2)}var Yb=new Set([`auto`,`scroll`]),Xb=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=Zb(this.lastRawMoveEventInfo,this.transformPagePoint));let e=$b(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Jb(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Wd;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=Zb(t,this.transformPagePoint),G.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=$b(e.type===`pointercancel`?this.lastMoveEventInfo:Zb(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!rg(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Zb(Ub(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Wd;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,$b(s,this.history)),this.removeListeners=ud(Gb(this.contextWindow,`pointermove`,this.handlePointerMove),Gb(this.contextWindow,`pointerup`,this.handlePointerUp),Gb(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Yb.has(e.overflowX)||Yb.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),G.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ud(this.updatePoint)}};function Zb(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 $b({point:e},t){return{point:e,delta:Qb(e,tx(t)),offset:Qb(e,ex(t)),velocity:nx(t,.1)}}function ex(e){return e[0]}function tx(e){return e[e.length-1]}function nx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=tx(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>pd(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>pd(t)*2&&(r=e[1]);let a=md(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 rx(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Wf(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Wf(n,e,r.max):Math.min(e,n)),e}function ix(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 ax(e,{top:t,left:n,bottom:r,right:i}){return{x:ix(e.x,n,i),y:ix(e.y,t,r)}}function ox(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 sx(e,t){return{x:ox(e.x,t.x),y:ox(e.y,t.y)}}function cx(e,t){let n=.5,r=dv(e),i=dv(t);return i>r?n=dd(t.min,t.max-r,e.min):r>i&&(n=dd(e.min,e.max-i,t.min)),nd(0,1,n)}function lx(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 ux=.35;function dx(e=ux){return e===!1?e=0:e===!0&&(e=ux),{x:fx(e,`left`,`right`),y:fx(e,`top`,`bottom`)}}function fx(e,t,n){return{min:px(e,t),max:px(e,n)}}function px(e,t){return typeof e==`number`?e:e[t]||0}var mx=new WeakMap,hx=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=Ig(),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(Ub(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=Qh(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),Nv(e=>{let t=this.getAxisMotionValue(e).get()||0;if(yf.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=dv(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&G.update(()=>i(e,t),!1,!0),_h(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=yx(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&&G.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 Xb(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Kb(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&&G.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||!vx(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=rx(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&&Ab(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=ax(n.layoutBox,e):this.constraints=!1,this.elastic=dx(t),r!==this.constraints&&!Ab(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Nv(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=lx(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ab(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=S_(n,r.root,this.visualElement.getTransformPagePoint()),a=sx(r.layout.layoutBox,i);if(t){let e=t(r_(a));this.hasMutatedConstraints=!!e,e&&(a=n_(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Nv(o=>{if(!vx(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 _h(this.visualElement,e),n.start(th(e,n,0,t,this.visualElement,!1))}stopAnimation(){Nv(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Nv(t=>{let{drag:n}=this.getProps();if(!vx(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]-Wf(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ab(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Nv(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=cx({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(),Nv(t=>{if(!vx(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Wf(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;mx.set(this.visualElement,this);let e=this.visualElement.current,t=Gb(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&sg(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Ab(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=_x(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),G.read(r);let o=Gv(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Nv(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=ux,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function gx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function _x(e,t,n){let r=kg(e,gx(n)),i=kg(t,gx(n));return()=>{r(),i()}}function vx(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yx(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var bx=class extends t_{constructor(e){super(e),this.removeGroupControls=cd,this.removeListeners=cd,this.controls=new hx(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cd}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()}},xx=e=>(t,n)=>{e&&G.update(()=>e(t,n),!1,!0)},Sx=class extends t_{constructor(){super(...arguments),this.removePointerDownListener=cd}onPointerDown(e){this.session=new Xb(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Kb(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:xx(e),onStart:xx(t),onMove:xx(n),onEnd:(e,t)=>{delete this.session,r&&G.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Gb(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Cx=!1,wx=class extends O.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),Cx&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Zv.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}),Cx=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||G.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(),Jh.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Cx=!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 Tx(e){let[t,n]=Hy(),r=(0,O.useContext)(Xu);return(0,k.jsx)(wx,{...e,layoutGroup:r,switchLayoutGroup:(0,O.useContext)(kb),isPresent:t,safeToRemove:n})}var Ex={pan:{Feature:Sx},drag:{Feature:bx,ProjectionNode:Ny,MeasureLayout:Tx}};function Dx(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&G.postRender(()=>i(t,Ub(t)))}var Ox=class extends t_{mount(){let{current:e}=this.node;e&&(this.unmount=tg(e,(e,t)=>(Dx(this.node,t,`Start`),e=>Dx(this.node,e,`End`))))}unmount(){}},kx=class extends t_{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=ud(Gv(this.node.current,`focus`,()=>this.onFocus()),Gv(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Ax(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&&G.postRender(()=>i(t,Ub(t)))}var jx=class extends t_{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=mg(e,(e,t)=>(Ax(this.node,t,`Start`),(e,{success:t})=>Ax(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Mx=new WeakMap,Nx=new WeakMap,Px=e=>{let t=Mx.get(e.target);t&&t(e)},Fx=e=>{e.forEach(Px)};function Ix({root:e,...t}){let n=e||document;Nx.has(n)||Nx.set(n,{});let r=Nx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Fx,{root:e,...t})),r[i]}function Lx(e,t,n){let r=Ix(t);return Mx.set(e,n),r.observe(e),()=>{Mx.delete(e),r.unobserve(e)}}var Rx={some:0,all:1},zx=class extends t_{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:Rx[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=Lx(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(Bx(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Bx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Vx={inView:{Feature:zx},tap:{Feature:jx},focus:{Feature:kx},hover:{Feature:Ox}},Hx={layout:{ProjectionNode:Ny,MeasureLayout:Tx}},Ux=Rb({...Hb,...Vx,...Ex,...Hx},zb),Wx={renderer:zb,...Hb,...Vx},Gx=e=>{let t=(0,B.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,k.jsx)(Qy,{features:Wx,children:n}),t[0]=n,t[1]=r),r},Kx=e=>{let t=(0,B.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsx)(Ju,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,k.jsx)(Gx,{children:(0,k.jsxs)(Po,{children:[r,n]})}),t[1]=n,t[2]=i),i},qx=e=>{let t=(0,B.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,k.jsx)(ni,{children:(0,k.jsx)(hr,{children:(0,k.jsx)(pr,{path:`*`,element:n})})}),t[0]=n,t[1]=r),r},Jx={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`]},Yx=ru(`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`,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`}]}),Xx=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>(0,k.jsx)(`div`,{className:W(Yx({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}),Zx=({className:e,strokeWidth:t=4})=>(0,k.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:W(`size-full`,e),children:(0,k.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[(0,k.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,k.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,k.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,k.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,k.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,k.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`})]})]})}),Qx=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>(0,k.jsx)(k.Fragment,{children:t&&n?(0,k.jsxs)(`div`,{className:`relative size-full`,children:[(0,k.jsx)(`div`,{className:W(`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,k.jsx)(Zx,{className:`size-10 max-h-full max-w-full`})}),e]}):t?(0,k.jsx)(`div`,{className:W(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,k.jsx)(Zx,{className:`size-10 max-h-full max-w-full`})}):e??(0,k.jsx)(k.Fragment,{})}),$x=ru(`flex-none shrink-0`,{variants:{size:{sm:`size-3`,md:`size-4`,lg:`size-5`,xl:`size-6`,"icon-sm":`size-3`,"icon-md":`size-4`,"icon-lg":`size-4`,"icon-xl":`size-5`}},defaultVariants:{size:`md`}}),eS=ru(`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:{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-2`,"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`,destructive:`hover-destructive-500/20 text-destructive ring-destructive-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:`custom`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),tS=({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,k.jsxs)(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:eS({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:f??(a?`left`:`center`),className:h}),...w,...x,children:[i&&!s&&(0,k.jsx)(i,{className:$x({size:t,className:W(!T&&`mr-3`,o)}),"aria-hidden":`true`}),(0,k.jsx)(`div`,{className:W(`flex items-center justify-center transition-[width] duration-300`,s&&t===`sm`&&`w-3`,s&&t===`md`&&`w-4`,s&&t===`lg`&&`w-5`,s&&t===`xl`&&`w-6`),children:(0,k.jsx)(Qx,{className:$x({size:t,className:W(!T&&`mr-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&(0,k.jsx)(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&C&&(0,k.jsx)(`span`,{className:`sr-only`,children:m}),a&&(0,k.jsx)(a,{className:$x({size:t,className:W(!T&&`ml-3`,o)}),"aria-hidden":`true`})]})},nS=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>(0,k.jsx)(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:W(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-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,k.jsx)(`div`,{style:{minHeight:`${a}px`},className:W(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})}),rS=e=>{let t=(0,B.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,O.useState)(m),y=(0,O.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,k.jsxs)(`div`,{className:`w-full`,children:[(0,k.jsx)(tS,{variant:`hoverable`,color:`text`,onClick:w,onKeyDown:T,disabled:h,isFullWidth:!0,className:W(`flex items-center justify-between gap-2`,u),IconRight:_u,iconClassName:W(`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,k.jsx)(nS,{id:S,tabIndex:x?-1:void 0,isHidden:x,className:l,role:`region`,"aria-labelledby":S,children:n})]})},iS=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>(0,k.jsx)(`div`,{className:W(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,e===2&&`hover:bg-card/30`,e>=3&&``,a===!0&&`bg-card/40`),...o,children:(0,k.jsx)(rS,{isOpen:a,label:t,header:(0,k.jsxs)(`div`,{className:`flex w-full`,children:[(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,k.jsx)(`span`,{className:W(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&(0,k.jsx)(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&(0,k.jsx)(`p`,{className:`pl-3 text-card text-sm`,children:n})]}),children:(0,k.jsx)(`div`,{className:`size-full px-2`,children:r})})}),aS=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:te},s=[...t,o];return(0,k.jsx)(iS,{level:t.length,title:`${a}`,description:``,isSelected:dt(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:(0,k.jsx)(QC,{...e,keyPath:s,section:n})},JSON.stringify(n))})},oS=e=>e?.getAttribute(`aria-selected`)===`true`,sS=(e,t)=>{let n=(0,B.c)(24),r;n[0]===t?r=n[1]:(r=t===void 0?{selector:oS,isHoverable:!1,orientation:`horizontal`}:t,n[0]=t,n[1]=r);let{selector:i,isHoverable:a,orientation:o}=r,s=i===void 0?oS:i,c=a===void 0?!1:a,l=o===void 0?`horizontal`:o,[u,d]=(0,O.useState)(null),[f,p]=(0,O.useState)(null),m=(0,O.useRef)(null),h=(0,O.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(cS),n.forEach(lS),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,O.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 cS(e){e.disconnect()}function lS(e){e.disconnect()}var uS=(e,t)=>{let n=(0,B.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,O.useState)(i??a??u[0]?.value),[h,g]=(0,O.useState)(null),_;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],n[2]=_):_=n[2];let v=(0,O.useRef)(_),y=(0,O.useRef)(null),b;n[3]===t?b=n[4]:(b={selector:dS,isHoverable:!1,orientation:t},n[3]=t,n[4]=b);let{choiceIndicatorPosition:x}=sS(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,D,k;n[12]===i?(D=n[13],k=n[14]):(k=()=>{i!==void 0&&m(i)},D=[i],n[12]=i,n[13]=D,n[14]=k),(0,O.useEffect)(k,D);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 dS(e){return e.getAttribute(`data-indicator`)===`true`}var fS=[{content:`Off`,value:!1},{content:`On`,value:!0}],pS=ru(`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`,destructive:`border-destructive bg-destructive text-destructive`,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:`primary`,disabled:!1}}),mS=ru(`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:{sm:`px-2 py-1 text-xs`,md:`p-2 text-sm`,lg:`p-4 text-base`}},defaultVariants:{size:`md`}}),hS=ru(`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`,destructive:`bg-destructive 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`}}}),gS=e=>{let t=(0,B.c)(30),{choices:n,color:r,size:i,className:a,itemClassName:o}=e,s=n===void 0?fS: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}=uS(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,O.createElement)(`button`,{...i,className:W(mS({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,k.jsx)(`div`,{className:pS({color:c,disabled:v,className:a}),role:`tablist`,"aria-disabled":v?`true`:void 0,children:(0,k.jsxs)(`div`,{className:`relative flex h-full w-full flex-row items-center justify-center`,children:[s.map(e),g&&(0,k.jsx)(`div`,{className:W(hS({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},_S=(0,O.createContext)(null),vS=({children:e,manager:t})=>(0,k.jsx)(_S.Provider,{value:t,children:e}),yS=()=>(0,O.useContext)(_S),bS=(0,O.createContext)(void 0),xS=()=>{let e=(0,B.c)(16),t=yS(),n=(0,O.useContext)(bS),[r,i]=(0,O.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,O.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},SS=(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}},CS=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}({}),wS=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)},TS=`__intlayer_editor_manager__`,ES=`__intlayer_editor_manager_events__`,DS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[ES]||(e[ES]=new EventTarget),e[ES]},OS=()=>typeof window>`u`?null:window[TS]??null,kS=e=>{if(typeof window<`u`){let t=window;t[TS]=e}DS().dispatchEvent(new CustomEvent(`change`,{detail:e}))},AS=e=>{let t=DS(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},jS=typeof HTMLElement<`u`?HTMLElement:class{},MS=class extends jS{_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=OS();t&&this._updateEditedValue(t)}get dictionaryKey(){return this._dictionaryKey}set dictionaryKey(e){this._dictionaryKey=e;let t=OS();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=OS();e&&this._updateEditedValue(e)}else if(e===`dictionary-key`){this._dictionaryKey=n??``;let e=OS();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!==M)}_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[M][t]:void 0}this._editedValue=i,this._render()}_updateIsSelected(e){if(!e){this._isSelected=!1,this._updateSelectorAttr();return}let t=this._getFilteredKeyPath();this._isSelected=e.dictionaryKey===this._dictionaryKey&&(e.keyPath?.length??0)>0&&dt(e.keyPath??[],t),this._updateSelectorAttr()}_updateSelectorAttr(){this._selector&&(this._isSelected?this._selector.setAttribute(`is-selecting`,``):this._selector.removeAttribute(`is-selecting`))}_subscribeToManager(){let e=OS();e&&this._setupManagerSubscriptions(e),this._unsubManager=AS(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=OS();t&&t.focusedContent.set({dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),OS()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),OS()?.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}},NS=()=>{typeof customElements>`u`||customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,MS)},PS=typeof HTMLElement<`u`?HTMLElement:class{},FS=class extends PS{_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=ke(n,{locale:e,dictionaryKey:this._dictionaryKey,keyPath:t},Oe(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=OS();e&&this._setupManagerSubscriptions(e),this._unsubManager=AS(e=>{this._unsubEditedContent?.(),this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):(this._editedText=null,this._render())})}},IS=()=>{typeof customElements>`u`||customElements.get(`intlayer-edited-content`)||customElements.define(`intlayer-edited-content`,FS)},LS=()=>Math.random().toString(36).slice(2),RS=class{senderId;_config;_subscribers=new Map;_windowHandler=null;_seenMessageIds=new Set;constructor(e){this._config=e,this.senderId=LS()}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:LS()};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=>SS(t,e.origin))))return;let s=this._subscribers.get(n);if(s)for(let e of s)e(r,i)}},zS=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)}},BS=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`,wS)}stopInterceptor(){this._mousedownHandler&&=(window.removeEventListener(`mousedown`,this._mousedownHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},VS=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)}}},HS=(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]||typeof r[o.type]!=`object`)&&(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}},US=(e,t,n)=>{let r=structuredClone(e);for(let e of t)n&&r?.nodeType===`translation`&&(r=r?.[M]?.[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},WS=(e,t,n)=>{let r=structuredClone(n);switch(e){case M:return{nodeType:M,[M]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case N:return{nodeType:N,[N]:{1:r??``}};case P:return{nodeType:P,[P]:{one:r??``,other:r??``}};case F:return{nodeType:F,[F]:{true:r??``,false:r??``}};case I:return{nodeType:I,[I]:{insertion:r??``}};case ne:return{nodeType:ne,[ne]:{dictionaryKey:``}};case R:return{nodeType:R,[R]:r??``};case z:return{nodeType:z,[z]:r??``,customComponents:[]};case L:return{nodeType:L,[L]:r??``};case ee:return{newKey:r??``};case te:return[r??``];case ie:return r??``;case ae:return r??0;case oe:return r??!0;default:return r??``}},GS=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`?GS(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?GS(t):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(GS);let t=Object.entries(e).map(([e,t])=>[e,GS(t)]);return Object.fromEntries(t)},KS=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===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`file`||t.nodeType===`markdown`||t.nodeType===`html`?n[Object.keys(n)[0]]:t.nodeType===`nested`?void 0:n}return!e||typeof e!=`object`?e:Array.isArray(e)?e[0]:e},qS=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,JS=e=>[M,N,P,F,I,L,ee,te,ne,re,R,z,ie,ae,oe,se,ce,le].includes(e),YS=e=>{if(typeof e==`string`)return ie;if(qS(e)){let t=e.nodeType;return JS(t)?t:le}return Array.isArray(e)?te:ut(e)?re:typeof e==`number`?ae:typeof e==`boolean`?oe:e&&typeof e==`object`?ee:e===null?ce:le},XS=(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},ZS=class{messenger;editorEnabled;focusedContent;localeDictionaries;editedContent;configuration;currentLocale;_urlManager;_iframeInterceptor;_mode;_configuration;_unsubAreYouThere=null;_unsubActivate=null;_unsubClientReady=null;constructor(e){this._mode=e.mode,this._configuration=e.configuration,this.messenger=new RS(e.messenger),this.editorEnabled=new zS(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new zS(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new zS(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new zS(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new zS(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new zS(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this._urlManager=new VS(this.messenger),this._iframeInterceptor=new BS(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._mode===`client`?(this._urlManager.start(),this._iframeInterceptor.startInterceptor(),this._loadDictionaries(),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._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!==M),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(;US(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=HS(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=XS(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=HS(structuredClone(n[e]?.content??r),t,US(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!==M),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:US(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=US(n[e]?.content??{},r,this.currentLocale.value);if(t)return t}}_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 Le(async()=>{let{getUnmergedDictionaries:e}=await import(`./unmerged_dictionaries-CH-zTaWW.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)}}},QS=typeof HTMLElement<`u`?HTMLElement:class{},$S=class extends QS{_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&&=(lC(),!1)}_init(){this._initialized||(cC(),this._initialized=!0,this._locale&&this._syncLocale(this._locale))}_syncLocale(e){let t=OS();t?t.currentLocale.set(e):(this._unsubManager?.(),this._unsubManager=AS(t=>{t&&(this._unsubManager?.(),this._unsubManager=null,t.currentLocale.set(e))}))}},eC=()=>{typeof customElements>`u`||customElements.get(`intlayer-editor`)||customElements.define(`intlayer-editor`,$S)},tC=250,nC=`
|
|
20
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),v.contains(_)&&v.removeChild(_)}},[t]),(0,k.jsx)(Ry,{isPresent:t,childRef:s,sizeRef:c,pop:a,children:a===!1?e:O.cloneElement(e,{ref:u})})}var By=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:s,anchorY:c,root:l})=>{let u=Zu(Vy),d=(0,O.useId)(),f=!0,p=(0,O.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,O.useMemo)(()=>{u.forEach((e,t)=>u.set(t,!1))},[n]),O.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),e=(0,k.jsx)(zy,{pop:o===`popLayout`,isPresent:n,anchorX:s,anchorY:c,root:l,children:e}),(0,k.jsx)($u.Provider,{value:p,children:e})};function Vy(){return new Map}function Hy(e=!0){let t=(0,O.useContext)($u);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,O.useId)();(0,O.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,O.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Uy=e=>e.key||``;function Wy(e){let t=[];return O.Children.forEach(e,e=>{(0,O.isValidElement)(e)&&t.push(e)}),t}var Gy=({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]=Hy(o),f=(0,O.useMemo)(()=>Wy(e),[e]),p=o&&!u?[]:f.map(Uy),m=(0,O.useRef)(!0),h=(0,O.useRef)(f),g=Zu(()=>new Map),_=(0,O.useRef)(new Set),[v,y]=(0,O.useState)(f),[b,x]=(0,O.useState)(f);Qu(()=>{m.current=!1,h.current=f;for(let e=0;e<b.length;e++){let t=Uy(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=Uy(n);p.includes(r)||(e.splice(t,0,n),S.push(n))}return a===`wait`&&S.length&&(e=S),x(Wy(e)),y(f),null}let{forceRender:C}=(0,O.useContext)(Xu);return(0,k.jsx)(k.Fragment,{children:b.map(e=>{let v=Uy(e),y=o&&!u?!1:f===b||p.includes(v);return(0,k.jsx)(By,{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)})})},Ky=(0,O.createContext)({strict:!1}),qy={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`]},Jy=!1;function Yy(){if(Jy)return;let e={};for(let t in qy)e[t]={isEnabled:e=>qy[t].some(t=>!!e[t])};Zg(e),Jy=!0}function Xy(){return Yy(),Qg()}function Zy(e){let t=Xy();for(let n in e)t[n]={...t[n],...e[n]};Zg(t)}function Qy({children:e,features:t,strict:n=!1}){let[,r]=(0,O.useState)(!$y(t)),i=(0,O.useRef)(void 0);if(!$y(t)){let{renderer:e,...n}=t;i.current=e,Zy(n)}return(0,O.useEffect)(()=>{$y(t)&&t().then(({renderer:e,...t})=>{Zy(t),i.current=e,r(!0)})},[]),(0,k.jsx)(Ky.Provider,{value:{renderer:i.current,strict:n},children:e})}function $y(e){return typeof e==`function`}var eb=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 tb(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||eb.has(e)}var nb=c({default:()=>rb}),rb,ib=o((()=>{throw rb={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),ab=e=>!tb(e);function ob(e){typeof e==`function`&&(ab=t=>t.startsWith(`on`)?!tb(t):e(t))}try{ob((ib(),d(nb)).default)}catch{}function sb(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||hh(e[i])||(ab(i)||n===!0&&tb(i)||!t&&!tb(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var cb=(0,O.createContext)({});function lb(e,t){if(Hg(e)){let{initial:t,animate:n}=e;return{initial:t===!1||zg(t)?t:void 0,animate:zg(n)?n:void 0}}return e.inherit===!1?{}:t}function ub(e){let{initial:t,animate:n}=lb(e,(0,O.useContext)(cb));return(0,O.useMemo)(()=>({initial:t,animate:n}),[db(t),db(n)])}function db(e){return Array.isArray(e)?e.join(` `):e}var fb=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function pb(e,t,n){for(let r in t)!hh(t[r])&&!M_(r,n)&&(e[r]=t[r])}function mb({transformTemplate:e},t){return(0,O.useMemo)(()=>{let n=fb();return E_(n,t,e),Object.assign({},n.vars,n.style)},[t])}function hb(e,t){let n=e.style||{},r={};return pb(r,n,e),Object.assign(r,mb(e,t)),r}function gb(e,t){let n={},r=hb(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 _b=()=>({...fb(),attrs:{}});function vb(e,t,n,r){let i=(0,O.useMemo)(()=>{let n=_b();return B_(n,t,H_(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};pb(t,e.style,e),i.style={...t,...i.style}}return i}var yb=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function bb(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(yb.indexOf(e)>-1||/[A-Z]/u.test(e))}function xb(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??bb(e)?vb:gb)(t,r,i,e),c=sb(t,typeof e==`string`,a),l=e===O.Fragment?{}:{...c,...s,ref:n},{children:u}=t,d=(0,O.useMemo)(()=>hh(u)?u.get():u,[u]);return(0,O.createElement)(e,{...l,children:d})}function Sb({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Cb(n,r,i,e),renderState:t()}}function Cb(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Yv(a[e]);let{initial:o,animate:s}=e,c=Hg(e),l=Ug(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`&&!Rg(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=rh(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var wb=e=>(t,n)=>{let r=(0,O.useContext)(cb),i=(0,O.useContext)($u),a=()=>Sb(e,t,r,i);return n?a():Zu(a)},Tb=wb({scrapeMotionValuesFromProps:N_,createRenderState:fb}),Eb=wb({scrapeMotionValuesFromProps:W_,createRenderState:_b}),Db=Symbol.for(`motionComponentSymbol`);function Ob(e,t,n){let r=(0,O.useRef)(n);(0,O.useInsertionEffect)(()=>{r.current=n});let i=(0,O.useRef)(null);return(0,O.useCallback)(n=>{n&&e.onMount?.(n);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&&(n?t.mount(n):t.unmount())},[t])}var kb=(0,O.createContext)({});function Ab(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function jb(e,t,n,r,i,a){let{visualElement:o}=(0,O.useContext)(cb),s=(0,O.useContext)(Ky),c=(0,O.useContext)($u),l=(0,O.useContext)(Py),u=l.reducedMotion,d=l.skipAnimations,f=(0,O.useRef)(null),p=(0,O.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,O.useContext)(kb);m&&!m.projection&&i&&(m.type===`html`||m.type===`svg`)&&Mb(f.current,n,i,h);let g=(0,O.useRef)(!1);(0,O.useInsertionEffect)(()=>{m&&g.current&&m.update(n,c)});let _=n[yh],v=(0,O.useRef)(!!_&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(_)&&window.MotionHasOptimisedAnimation?.(_));return Qu(()=>{p.current=!0,m&&(g.current=!0,window.MotionIsMounted=!0,m.updateFeatures(),m.scheduleRenderMicrotask(),v.current&&m.animationState&&m.animationState.animateChanges())}),(0,O.useEffect)(()=>{m&&(!v.current&&m.animationState&&m.animationState.animateChanges(),v.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(_)}),!1),m.enteringChildren=void 0)}),m}function Mb(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:Nb(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Ab(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Nb(e){if(e)return e.options.allowProjection===!1?Nb(e.parent):e.projection}function Pb(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&Zy(r);let a=n?n===`svg`:bb(e),o=a?Eb:Tb;function s(n,s){let c,l={...(0,O.useContext)(Py),...n,layoutId:Fb(n)},{isStatic:u}=l,d=ub(n),f=o(n,u);if(!u&&typeof window<`u`){Ib(l,r);let t=Lb(l);c=t.MeasureLayout,d.visualElement=jb(e,f,l,i,t.ProjectionNode,a)}return(0,k.jsxs)(cb.Provider,{value:d,children:[c&&d.visualElement?(0,k.jsx)(c,{visualElement:d.visualElement,...l}):null,xb(e,n,Ob(f,d.visualElement,s),f,u,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,O.forwardRef)(s);return c[Db]=e,c}function Fb({layoutId:e}){let t=(0,O.useContext)(Xu).id;return t&&e!==void 0?t+`-`+e:e}function Ib(e,t){(0,O.useContext)(Ky).strict}function Lb(e){let{drag:t,layout:n}=Xy();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Rb(e,t){if(typeof Proxy>`u`)return Pb;let n=new Map,r=(n,r)=>Pb(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Pb(a,void 0,e,t)),n.get(a))})}var zb=(e,t)=>t.isSVG??bb(e)?new G_(t):new F_(t,{allowProjection:e!==O.Fragment}),Bb=class extends t_{constructor(e){super(e),e.animationState||=Q_(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Rg(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?.()}},Vb=0,Hb={animation:{Feature:Bb},exit:{Feature:class extends t_{constructor(){super(...arguments),this.id=Vb++,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`){let n=ih(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 Ub(e){return{point:{x:e.pageX,y:e.pageY}}}var Wb=e=>t=>rg(t)&&e(t,Ub(t));function Gb(e,t,n,r){return Gv(e,t,Wb(n),r)}var Kb=({current:e})=>e?e.ownerDocument.defaultView:null,qb=(e,t)=>Math.abs(e-t);function Jb(e,t){let n=qb(e.x,t.x),r=qb(e.y,t.y);return Math.sqrt(n**2+r**2)}var Yb=new Set([`auto`,`scroll`]),Xb=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=Zb(this.lastRawMoveEventInfo,this.transformPagePoint));let e=$b(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Jb(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=Wd;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=Zb(t,this.transformPagePoint),G.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=$b(e.type===`pointercancel`?this.lastMoveEventInfo:Zb(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!rg(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=Zb(Ub(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=Wd;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,$b(s,this.history)),this.removeListeners=ud(Gb(this.contextWindow,`pointermove`,this.handlePointerMove),Gb(this.contextWindow,`pointerup`,this.handlePointerUp),Gb(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Yb.has(e.overflowX)||Yb.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),G.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),Ud(this.updatePoint)}};function Zb(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 $b({point:e},t){return{point:e,delta:Qb(e,tx(t)),offset:Qb(e,ex(t)),velocity:nx(t,.1)}}function ex(e){return e[0]}function tx(e){return e[e.length-1]}function nx(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=tx(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>pd(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>pd(t)*2&&(r=e[1]);let a=md(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 rx(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Wf(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Wf(n,e,r.max):Math.min(e,n)),e}function ix(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 ax(e,{top:t,left:n,bottom:r,right:i}){return{x:ix(e.x,n,i),y:ix(e.y,t,r)}}function ox(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 sx(e,t){return{x:ox(e.x,t.x),y:ox(e.y,t.y)}}function cx(e,t){let n=.5,r=dv(e),i=dv(t);return i>r?n=dd(t.min,t.max-r,e.min):r>i&&(n=dd(e.min,e.max-i,t.min)),nd(0,1,n)}function lx(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 ux=.35;function dx(e=ux){return e===!1?e=0:e===!0&&(e=ux),{x:fx(e,`left`,`right`),y:fx(e,`top`,`bottom`)}}function fx(e,t,n){return{min:px(e,t),max:px(e,n)}}function px(e,t){return typeof e==`number`?e:e[t]||0}var mx=new WeakMap,hx=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=Ig(),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(Ub(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=Qh(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),Nv(e=>{let t=this.getAxisMotionValue(e).get()||0;if(yf.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=dv(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&G.update(()=>i(e,t),!1,!0),_h(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=yx(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&&G.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 Xb(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Kb(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&&G.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||!vx(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=rx(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&&Ab(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=ax(n.layoutBox,e):this.constraints=!1,this.elastic=dx(t),r!==this.constraints&&!Ab(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&Nv(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=lx(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Ab(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=S_(n,r.root,this.visualElement.getTransformPagePoint()),a=sx(r.layout.layoutBox,i);if(t){let e=t(r_(a));this.hasMutatedConstraints=!!e,e&&(a=n_(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Nv(o=>{if(!vx(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 _h(this.visualElement,e),n.start(th(e,n,0,t,this.visualElement,!1))}stopAnimation(){Nv(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Nv(t=>{let{drag:n}=this.getProps();if(!vx(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]-Wf(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Ab(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Nv(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=cx({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(),Nv(t=>{if(!vx(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Wf(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;mx.set(this.visualElement,this);let e=this.visualElement.current,t=Gb(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&sg(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Ab(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=_x(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),G.read(r);let o=Gv(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Nv(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=ux,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function gx(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function _x(e,t,n){let r=kg(e,gx(n)),i=kg(t,gx(n));return()=>{r(),i()}}function vx(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function yx(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var bx=class extends t_{constructor(e){super(e),this.removeGroupControls=cd,this.removeListeners=cd,this.controls=new hx(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||cd}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()}},xx=e=>(t,n)=>{e&&G.update(()=>e(t,n),!1,!0)},Sx=class extends t_{constructor(){super(...arguments),this.removePointerDownListener=cd}onPointerDown(e){this.session=new Xb(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Kb(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:xx(e),onStart:xx(t),onMove:xx(n),onEnd:(e,t)=>{delete this.session,r&&G.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Gb(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},Cx=!1,wx=class extends O.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),Cx&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Zv.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}),Cx=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||G.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(),Jh.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Cx=!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 Tx(e){let[t,n]=Hy(),r=(0,O.useContext)(Xu);return(0,k.jsx)(wx,{...e,layoutGroup:r,switchLayoutGroup:(0,O.useContext)(kb),isPresent:t,safeToRemove:n})}var Ex={pan:{Feature:Sx},drag:{Feature:bx,ProjectionNode:Ny,MeasureLayout:Tx}};function Dx(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&G.postRender(()=>i(t,Ub(t)))}var Ox=class extends t_{mount(){let{current:e}=this.node;e&&(this.unmount=tg(e,(e,t)=>(Dx(this.node,t,`Start`),e=>Dx(this.node,e,`End`))))}unmount(){}},kx=class extends t_{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=ud(Gv(this.node.current,`focus`,()=>this.onFocus()),Gv(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Ax(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&&G.postRender(()=>i(t,Ub(t)))}var jx=class extends t_{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=mg(e,(e,t)=>(Ax(this.node,t,`Start`),(e,{success:t})=>Ax(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Mx=new WeakMap,Nx=new WeakMap,Px=e=>{let t=Mx.get(e.target);t&&t(e)},Fx=e=>{e.forEach(Px)};function Ix({root:e,...t}){let n=e||document;Nx.has(n)||Nx.set(n,{});let r=Nx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Fx,{root:e,...t})),r[i]}function Lx(e,t,n){let r=Ix(t);return Mx.set(e,n),r.observe(e),()=>{Mx.delete(e),r.unobserve(e)}}var Rx={some:0,all:1},zx=class extends t_{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:Rx[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=Lx(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(Bx(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Bx({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Vx={inView:{Feature:zx},tap:{Feature:jx},focus:{Feature:kx},hover:{Feature:Ox}},Hx={layout:{ProjectionNode:Ny,MeasureLayout:Tx}},Ux=Rb({...Hb,...Vx,...Ex,...Hx},zb),Wx={renderer:zb,...Hb,...Vx},Gx=e=>{let t=(0,B.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,k.jsx)(Qy,{features:Wx,children:n}),t[0]=n,t[1]=r),r},Kx=e=>{let t=(0,B.c)(3),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsx)(Ju,{}),t[0]=r):r=t[0];let i;return t[1]===n?i=t[2]:(i=(0,k.jsx)(Gx,{children:(0,k.jsxs)(Po,{children:[r,n]})}),t[1]=n,t[2]=i),i},qx=e=>{let t=(0,B.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,k.jsx)(ni,{children:(0,k.jsx)(hr,{children:(0,k.jsx)(pr,{path:`*`,element:n})})}),t[0]=n,t[1]=r),r},Jx={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`]},Yx=ru(`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`}]}),Xx=({children:e,roundedSize:t,padding:n,transparency:r,separator:i,className:a,border:o,borderColor:s,background:c,gap:l,...u})=>(0,k.jsx)(`div`,{className:W(Yx({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}),Zx=({className:e,strokeWidth:t=4})=>(0,k.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:W(`size-full`,e),children:(0,k.jsxs)(`g`,{fill:`none`,fillRule:`evenodd`,strokeWidth:t,children:[(0,k.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,k.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,k.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,k.jsxs)(`circle`,{cx:`22`,cy:`22`,r:`1`,children:[(0,k.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,k.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`})]})]})}),Qx=({children:e,isLoading:t=!0,keepChildren:n=!1,className:r,...i})=>(0,k.jsx)(k.Fragment,{children:t&&n?(0,k.jsxs)(`div`,{className:`relative size-full`,children:[(0,k.jsx)(`div`,{className:W(`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,k.jsx)(Zx,{className:`size-10 max-h-full max-w-full`})}),e]}):t?(0,k.jsx)(`div`,{className:W(`flex size-full max-h-screen max-w-[100vw] flex-1 items-center justify-center`,r),role:`status`,"aria-label":`Animated icon, meaning that the website is processing`,...i,children:(0,k.jsx)(Zx,{className:`size-10 max-h-full max-w-full`})}):e??(0,k.jsx)(k.Fragment,{})}),$x=ru(`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`}}),eS=ru(`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`,destructive:`hover-destructive-500/20 text-destructive ring-destructive-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:`custom`,roundedSize:`md`,textAlign:`center`,isFullWidth:!1}}),tS=({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,k.jsxs)(`button`,{disabled:s||p,role:S?`link`:`button`,type:g,className:eS({variant:e,size:t,color:n,isFullWidth:u,roundedSize:d,textAlign:f??(a?`left`:`center`),className:h}),...w,...x,children:[i&&!s&&(0,k.jsx)(i,{className:$x({size:t,className:W(!T&&`mr-3`,o)}),"aria-hidden":`true`}),(0,k.jsx)(`div`,{className:W(`flex items-center justify-center transition-[width] duration-300`,s&&t===`sm`&&`w-3`,s&&t===`md`&&`w-4`,s&&t===`lg`&&`w-6`,s&&t===`xl`&&`w-8`),children:(0,k.jsx)(Qx,{className:$x({size:t,className:W(!T&&`mr-3`,o)}),isLoading:s,"aria-hidden":`true`,"data-testid":`loader`})}),r&&(0,k.jsx)(`span`,{className:`flex-1 truncate whitespace-nowrap`,children:r}),!r&&C&&(0,k.jsx)(`span`,{className:`sr-only`,children:m}),a&&(0,k.jsx)(a,{className:$x({size:t,className:W(!T&&`ml-3`,o)}),"aria-hidden":`true`})]})},nS=({children:e,isHidden:t,className:n=``,isOverable:r=!1,isFocusable:i=!1,minHeight:a=0,...o})=>(0,k.jsx)(`div`,{"aria-hidden":i?t:void 0,tabIndex:i?0:void 0,role:i?`button`:`none`,className:W(`group/height-smoother relative grid w-full grid-rows-[0fr] overflow-hidden transition-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,k.jsx)(`div`,{style:{minHeight:`${a}px`},className:W(r&&`group-hover/height-smoother:visible`,i&&`group-focus/height-smoother:visible`,n),children:e})}),rS=e=>{let t=(0,B.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,O.useState)(m),y=(0,O.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,k.jsxs)(`div`,{className:`w-full`,children:[(0,k.jsx)(tS,{variant:`hoverable`,color:`text`,onClick:w,onKeyDown:T,disabled:h,isFullWidth:!0,className:W(`flex items-center justify-between gap-2`,u),IconRight:_u,iconClassName:W(`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,k.jsx)(nS,{id:S,tabIndex:x?-1:void 0,isHidden:x,className:l,role:`region`,"aria-labelledby":S,children:n})]})},iS=({level:e,title:t,description:n,children:r,rightParam:i,isSelected:a,...o})=>(0,k.jsx)(`div`,{className:W(`rounded-md p-2 transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,e===2&&`hover:bg-card/30`,e>=3&&``,a===!0&&`bg-card/40`),...o,children:(0,k.jsx)(rS,{isOpen:a,label:t,header:(0,k.jsxs)(`div`,{className:`flex w-full`,children:[(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,k.jsx)(`span`,{className:W(e===0&&`text-lg`,e===1&&`text-md`,e===2&&`text-md`,e>=3&&`text-base`),children:t}),i&&(0,k.jsx)(`div`,{className:`flex w-auto items-center justify-between p-3`,children:i})]}),n&&(0,k.jsx)(`p`,{className:`pl-3 text-card text-sm`,children:n})]}),children:(0,k.jsx)(`div`,{className:`size-full px-2`,children:r})})}),aS=e=>{let{keyPath:t,section:n,onFocusKeyPath:r,focusedKeyPath:i=[]}=e;return n.map((n,a)=>{let o={key:a,type:te},s=[...t,o];return(0,k.jsx)(iS,{level:t.length,title:`${a}`,description:``,isSelected:dt(s,i),onClick:e=>{e.stopPropagation(),r(s)},children:(0,k.jsx)(QC,{...e,keyPath:s,section:n})},JSON.stringify(n))})},oS=e=>e?.getAttribute(`aria-selected`)===`true`,sS=(e,t)=>{let n=(0,B.c)(24),r;n[0]===t?r=n[1]:(r=t===void 0?{selector:oS,isHoverable:!1,orientation:`horizontal`}:t,n[0]=t,n[1]=r);let{selector:i,isHoverable:a,orientation:o}=r,s=i===void 0?oS:i,c=a===void 0?!1:a,l=o===void 0?`horizontal`:o,[u,d]=(0,O.useState)(null),[f,p]=(0,O.useState)(null),m=(0,O.useRef)(null),h=(0,O.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(cS),n.forEach(lS),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,O.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 cS(e){e.disconnect()}function lS(e){e.disconnect()}var uS=(e,t)=>{let n=(0,B.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,O.useState)(i??a??u[0]?.value),[h,g]=(0,O.useState)(null),_;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],n[2]=_):_=n[2];let v=(0,O.useRef)(_),y=(0,O.useRef)(null),b;n[3]===t?b=n[4]:(b={selector:dS,isHoverable:!1,orientation:t},n[3]=t,n[4]=b);let{choiceIndicatorPosition:x}=sS(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,D,k;n[12]===i?(D=n[13],k=n[14]):(k=()=>{i!==void 0&&m(i)},D=[i],n[12]=i,n[13]=D,n[14]=k),(0,O.useEffect)(k,D);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 dS(e){return e.getAttribute(`data-indicator`)===`true`}var fS=[{content:`Off`,value:!1},{content:`On`,value:!0}],pS=ru(`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`,destructive:`border-destructive bg-destructive text-destructive`,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:`primary`,disabled:!1}}),mS=ru(`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`}}),hS=ru(`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`,destructive:`bg-destructive 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`}}}),gS=e=>{let t=(0,B.c)(30),{choices:n,color:r,size:i,className:a,itemClassName:o}=e,s=n===void 0?fS: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}=uS(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,O.createElement)(`button`,{...i,className:W(mS({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,k.jsx)(`div`,{className:pS({color:c,disabled:v,className:a}),role:`tablist`,"aria-disabled":v?`true`:void 0,children:(0,k.jsxs)(`div`,{className:`relative flex h-full w-full flex-row items-center justify-center`,children:[s.map(e),g&&(0,k.jsx)(`div`,{className:W(hS({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},_S=(0,O.createContext)(null),vS=({children:e,manager:t})=>(0,k.jsx)(_S.Provider,{value:t,children:e}),yS=()=>(0,O.useContext)(_S),bS=(0,O.createContext)(void 0),xS=()=>{let e=(0,B.c)(16),t=yS(),n=(0,O.useContext)(bS),[r,i]=(0,O.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,O.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},SS=(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}},CS=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}({}),wS=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)},TS=`__intlayer_editor_manager__`,ES=`__intlayer_editor_manager_events__`,DS=()=>{if(typeof window>`u`)return new EventTarget;let e=window;return e[ES]||(e[ES]=new EventTarget),e[ES]},OS=()=>typeof window>`u`?null:window[TS]??null,kS=e=>{if(typeof window<`u`){let t=window;t[TS]=e}DS().dispatchEvent(new CustomEvent(`change`,{detail:e}))},AS=e=>{let t=DS(),n=t=>{e(t.detail)};return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}},jS=typeof HTMLElement<`u`?HTMLElement:class{},MS=class extends jS{_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=OS();t&&this._updateEditedValue(t)}get dictionaryKey(){return this._dictionaryKey}set dictionaryKey(e){this._dictionaryKey=e;let t=OS();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=OS();e&&this._updateEditedValue(e)}else if(e===`dictionary-key`){this._dictionaryKey=n??``;let e=OS();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!==M)}_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[M][t]:void 0}this._editedValue=i,this._render()}_updateIsSelected(e){if(!e){this._isSelected=!1,this._updateSelectorAttr();return}let t=this._getFilteredKeyPath();this._isSelected=e.dictionaryKey===this._dictionaryKey&&(e.keyPath?.length??0)>0&&dt(e.keyPath??[],t),this._updateSelectorAttr()}_updateSelectorAttr(){this._selector&&(this._isSelected?this._selector.setAttribute(`is-selecting`,``):this._selector.removeAttribute(`is-selecting`))}_subscribeToManager(){let e=OS();e&&this._setupManagerSubscriptions(e),this._unsubManager=AS(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=OS();t&&t.focusedContent.set({dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleHover(e){e.stopPropagation(),OS()?.messenger.send(`INTLAYER_HOVERED_CONTENT_CHANGED/post`,{dictionaryKey:this._dictionaryKey,keyPath:this._getFilteredKeyPath()})}_handleUnhover(e){e.stopPropagation(),OS()?.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}},NS=()=>{typeof customElements>`u`||customElements.get(`intlayer-content-selector-wrapper`)||customElements.define(`intlayer-content-selector-wrapper`,MS)},PS=typeof HTMLElement<`u`?HTMLElement:class{},FS=class extends PS{_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=ke(n,{locale:e,dictionaryKey:this._dictionaryKey,keyPath:t},Oe(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=OS();e&&this._setupManagerSubscriptions(e),this._unsubManager=AS(e=>{this._unsubEditedContent?.(),this._unsubEditedContent=null,e?this._setupManagerSubscriptions(e):(this._editedText=null,this._render())})}},IS=()=>{typeof customElements>`u`||customElements.get(`intlayer-edited-content`)||customElements.define(`intlayer-edited-content`,FS)},LS=()=>Math.random().toString(36).slice(2),RS=class{senderId;_config;_subscribers=new Map;_windowHandler=null;_seenMessageIds=new Set;constructor(e){this._config=e,this.senderId=LS()}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:LS()};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=>SS(t,e.origin))))return;let s=this._subscribers.get(n);if(s)for(let e of s)e(r,i)}},zS=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)}},BS=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`,wS)}stopInterceptor(){this._mousedownHandler&&=(window.removeEventListener(`mousedown`,this._mousedownHandler),null)}stopMerger(){this._unsubscribeMerge?.(),this._unsubscribeMerge=null}},VS=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)}}},HS=(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]||typeof r[o.type]!=`object`)&&(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}},US=(e,t,n)=>{let r=structuredClone(e);for(let e of t)n&&r?.nodeType===`translation`&&(r=r?.[M]?.[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},WS=(e,t,n)=>{let r=structuredClone(n);switch(e){case M:return{nodeType:M,[M]:Object.assign({},...t.map(e=>({[e]:structuredClone(r)??``})))};case N:return{nodeType:N,[N]:{1:r??``}};case P:return{nodeType:P,[P]:{one:r??``,other:r??``}};case F:return{nodeType:F,[F]:{true:r??``,false:r??``}};case I:return{nodeType:I,[I]:{insertion:r??``}};case ne:return{nodeType:ne,[ne]:{dictionaryKey:``}};case R:return{nodeType:R,[R]:r??``};case z:return{nodeType:z,[z]:r??``,customComponents:[]};case L:return{nodeType:L,[L]:r??``};case ee:return{newKey:r??``};case te:return[r??``];case ie:return r??``;case ae:return r??0;case oe:return r??!0;default:return r??``}},GS=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`?GS(n):t.nodeType===`nested`?`dictionary-key`:t.nodeType===`file`?`file/path`:t.nodeType===`markdown`?GS(t):n}if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(GS);let t=Object.entries(e).map(([e,t])=>[e,GS(t)]);return Object.fromEntries(t)},KS=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===`translation`||t.nodeType===`enumeration`||t.nodeType===`plural`||t.nodeType===`condition`||t.nodeType===`insertion`||t.nodeType===`gender`||t.nodeType===`file`||t.nodeType===`markdown`||t.nodeType===`html`?n[Object.keys(n)[0]]:t.nodeType===`nested`?void 0:n}return!e||typeof e!=`object`?e:Array.isArray(e)?e[0]:e},qS=e=>typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`string`,JS=e=>[M,N,P,F,I,L,ee,te,ne,re,R,z,ie,ae,oe,se,ce,le].includes(e),YS=e=>{if(typeof e==`string`)return ie;if(qS(e)){let t=e.nodeType;return JS(t)?t:le}return Array.isArray(e)?te:ut(e)?re:typeof e==`number`?ae:typeof e==`boolean`?oe:e&&typeof e==`object`?ee:e===null?ce:le},XS=(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},ZS=class{messenger;editorEnabled;focusedContent;localeDictionaries;editedContent;configuration;currentLocale;_urlManager;_iframeInterceptor;_mode;_configuration;_unsubAreYouThere=null;_unsubActivate=null;_unsubClientReady=null;constructor(e){this._mode=e.mode,this._configuration=e.configuration,this.messenger=new RS(e.messenger),this.editorEnabled=new zS(`INTLAYER_EDITOR_ENABLED`,this.messenger,{emit:!1,receive:!0,initialValue:!1}),this.focusedContent=new zS(`INTLAYER_FOCUSED_CONTENT_CHANGED`,this.messenger,{emit:!0,receive:!0,initialValue:null}),this.localeDictionaries=new zS(`INTLAYER_LOCALE_DICTIONARIES_CHANGED`,this.messenger),this.editedContent=new zS(`INTLAYER_EDITED_CONTENT_CHANGED`,this.messenger),this.configuration=new zS(`INTLAYER_CONFIGURATION`,this.messenger,{emit:!0,receive:!1,...e.configuration?{initialValue:e.configuration}:{}}),this.currentLocale=new zS(`INTLAYER_CURRENT_LOCALE`,this.messenger,{emit:e.mode===`client`,receive:e.mode===`editor`}),this._urlManager=new VS(this.messenger),this._iframeInterceptor=new BS(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._mode===`client`?(this._urlManager.start(),this._iframeInterceptor.startInterceptor(),this._loadDictionaries(),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._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!==M),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(;US(o,s)!==void 0;)e++,i=e===0?r.key:`${r.key} (${e})`,s=[...t,{...r,key:i}]}let c=HS(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=XS(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=HS(structuredClone(n[e]?.content??r),t,US(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!==M),i=this.localeDictionaries.value;if(e.includes(`:local:`)||e.includes(`:remote:`))return i&&!(e in i)?void 0:US(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=US(n[e]?.content??{},r,this.currentLocale.value);if(t)return t}}_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 Le(async()=>{let{getUnmergedDictionaries:e}=await import(`./unmerged_dictionaries-CH-zTaWW.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)}}},QS=typeof HTMLElement<`u`?HTMLElement:class{},$S=class extends QS{_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&&=(lC(),!1)}_init(){this._initialized||(cC(),this._initialized=!0,this._locale&&this._syncLocale(this._locale))}_syncLocale(e){let t=OS();t?t.currentLocale.set(e):(this._unsubManager?.(),this._unsubManager=AS(t=>{t&&(this._unsubManager?.(),this._unsubManager=null,t.currentLocale.set(e))}))}},eC=()=>{typeof customElements>`u`||customElements.get(`intlayer-editor`)||customElements.define(`intlayer-editor`,$S)},tC=250,nC=`
|
|
21
21
|
:host {
|
|
22
22
|
display: contents;
|
|
23
23
|
}
|
|
@@ -40,7 +40,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
40
40
|
`,rC=typeof HTMLElement<`u`?HTMLElement:class{},iC=class extends rC{_isSelecting=!1;_pressDuration=tC;_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=nC,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?tC: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()}},aC=()=>{typeof customElements>`u`||(customElements.get(`intlayer-content-selector`)||customElements.define(`intlayer-content-selector`,iC),NS(),IS(),eC())},oC=()=>({allowedOrigins:[w?.editorURL,w?.cmsURL].filter(Boolean),postMessageFn:(e,t)=>{typeof window>`u`||window.self!==window.top&&window.parent?.postMessage(e,t)}}),sC=0,cC=()=>{sC++;let e=OS();if(e)return e;let t=new ZS({mode:`client`,messenger:oC(),configuration:T});return kS(t),aC(),t.start(),t},lC=()=>{sC=Math.max(0,sC-1),!(sC>0)&&(OS()?.stop(),kS(null))},uC=(e,t,n)=>{let r=(0,B.c)(16),i=yS(),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,O.useState)(o),l=(0,O.useRef)(o),u=(0,O.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 zS(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,O.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},dC=(e,t)=>uC(CS.INTLAYER_URL_CHANGE,e,t),fC=()=>{let e=(0,B.c)(13),t=yS(),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,O.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,O.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},pC=()=>{let e=(0,B.c)(3),{setLocaleDictionaries:t,setLocaleDictionary:n}=fC(),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},mC=()=>{let e=(0,B.c)(3),t=yS(),[n,r]=(0,O.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,O.useEffect)(i,a),n},hC=(e,t,n)=>{for(let r of t)try{if(US(r.content,e??[],n))return{keyPath:e,dictionaryLocalId:r.localId}}catch{}},gC=()=>{let e=(0,B.c)(12),{localeDictionaries:t}=fC(),n=mC(),{setFocusedContent:r,setFocusedContentKeyPath:i,focusedContent:a}=xS(),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=hC(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},_C=({children:e,configuration:t,postMessage:n,allowedOrigins:r})=>{let i=(0,O.useRef)(null);i.current||=new ZS({mode:`editor`,messenger:{allowedOrigins:r,postMessageFn:n},configuration:t});let a=i.current;return(0,O.useEffect)(()=>(aC(),kS(a),a.start(),()=>{a.stop(),kS(null)}),[a]),(0,k.jsx)(vS,{manager:a,children:e})},vC=(0,O.createContext)(void 0),yC=()=>{let e=(0,B.c)(4),t=yS(),n=(0,O.useContext)(vC),[r,i]=(0,O.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,O.useEffect)(a,o),r??n},bC=()=>{let e=(0,B.c)(23),t=yS(),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},xC=()=>{let e=(0,B.c)(6),t=yS(),[n,r]=(0,O.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,O.useEffect)(i,a);let o=bC(),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,B.c)(5),t=yS(),[n,r]=(0,O.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,O.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,B.c)(2),t=yS(),n;return e[0]===t?n=e[1]:(n=()=>t?.pingClient(),e[0]=t,e[1]=n),n},wC=(e,t,n)=>{let r=(0,B.c)(11),i=yS(),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,O.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},TC=()=>{wC(CS.INTLAYER_IFRAME_CLICKED,wS)},EC=e=>{let t=(0,B.c)(7),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=US(i,n,mC());if(s!==void 0&&typeof s!=`boolean`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.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,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,c===2&&`hover:bg-card/30`,c>=3&&``),onClick:u,children:(0,k.jsx)(gS,{value:l,onChange:d})})},DC=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZC.includes(e)).map(r=>{let i={type:F,key:r},a=[...t,i],o=n[F][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(QC,{...e,key:r,keyPath:a,section:o})]})})})},OC=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZC.includes(e)).map(r=>{let i={type:N,key:r},a=[...t,i],o=n[N][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(QC,{...e,key:r,keyPath:a,section:o})]})})})},kC=({value:e=``,onCancel:t,onSave:n,onClick:r,children:i,isDisabled:a,...o})=>{let[s,c]=(0,O.useState)(!1),l=(0,O.useRef)(null),u=e=>{e.stopPropagation(),c(!1),n()},d=e=>{e.stopPropagation(),c(!1),t()},f=!e||e===``?`-`:e,p=(0,O.useCallback)(e=>{let t=window.getSelection();t&&t.toString().trim()!==``||l.current&&!l.current.contains(e.target)&&(c(!1),n())},[n]);return(0,O.useEffect)(()=>(s?document.addEventListener(`click`,p):document.removeEventListener(`click`,p),()=>document.removeEventListener(`click`,p)),[p,s]),(0,k.jsxs)(`span`,{className:`group/editable-field flex gap-2`,role:`button`,tabIndex:0,onClick:e=>{c(!0),r?.(e)},ref:l,...o,children:[(0,k.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`display`:`hidden`),children:[i,(0,k.jsx)(tS,{label:`Save`,variant:`hoverable`,size:`icon-sm`,color:`text`,Icon:gu,onClick:u,disabled:a,className:`!text-current`,role:`button`,tabIndex:0,"aria-label":`Save changes`,"data-testid":`editable-field-save-button`}),(0,k.jsx)(tS,{label:`Cancel`,color:`text`,variant:`hoverable`,className:`!text-current`,size:`icon-sm`,Icon:Bu,onClick:d,disabled:a,role:`button`,tabIndex:0,"aria-label":`Cancel changes`,"data-testid":`editable-field-cancel-button`})]},String(s)),(0,k.jsxs)(`div`,{className:W(`flex flex-1 gap-2`,s?`hidden`:`display`),children:[(0,k.jsx)(`span`,{className:`ml-2 flex w-full whitespace-pre-wrap p-1 text-sm leading-6`,children:f}),(0,k.jsx)(tS,{label:`Edit`,Icon:Mu,color:`text`,variant:`hoverable`,size:`icon-sm`,className:`!text-current invisible group-hover/editable-field:visible`,disabled:a,onClick:e=>{e.stopPropagation(),c(!0)}})]})]})},AC=(...e)=>e.filter(Boolean).join(` `),jC=ru([`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`}}),MC=({validationStyleEnabled:e=!1,variant:t,size:n,className:r,...i})=>(0,k.jsx)(`input`,{className:AC(jC({variant:t,size:n,validationStyleEnabled:e?`enabled`:`disabled`}),r),suppressHydrationWarning:!0,...i}),NC=({className:e,variant:t,validationStyleEnabled:n=!1,...r})=>(0,k.jsx)(`textarea`,{className:W(`resize-none`,jC({variant:t,validationStyleEnabled:n?`enabled`:`disabled`,className:e})),...r}),PC=24,FC=12,IC=({className:e,autoSize:t=!0,onChange:n,maxRows:r=999,ref:i,...a})=>{let o=(0,O.useRef)(null);(0,O.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=PC*r+FC,s=PC+FC;n.height=`${Math.max(Math.min(i,a),s)}px`};return(0,O.useEffect)(()=>{s()},[a.value,a.defaultValue,s]),(0,k.jsx)(NC,{ref:e=>{o.current=e,e&&s()},onChange:e=>{n?.(e),s()},className:W(`overflow-y-auto`,t&&`resize-none`,e),...a})},LC=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,O.useRef)(null);return(0,O.useImperativeHandle)(n,()=>i.current),(0,k.jsx)(kC,{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,k.jsx)(IC,{className:`leading-6`,ref:i,onClick:e=>{e.preventDefault(),e.stopPropagation()},...r})})},RC=e=>{let t=(0,B.c)(16),{keyPath:n,section:r,editedContent:i,editedContentValue:a,onContentChange:o,onFocusKeyPath:s,renderSection:c}=e,l=mC(),u;t[0]!==l||t[1]!==i||t[2]!==a||t[3]!==n?(u=a??US(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,k.jsx)(k.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,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,f===2&&`hover:bg-card/30`,f>=3&&``),onClick:e,children:typeof c==`function`?c(p):(0,k.jsx)(LC,{"aria-label":`Editable field`,defaultValue:p,onSave:e=>o({keyPath:n,newValue:e}),onCancel:zC})}),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 zC(){return null}var BC=e=>{let t=(0,B.c)(10),{keyPath:n,section:r}=e,{addEditedContent:i}=xC(),a;if(t[0]!==i||t[1]!==n||t[2]!==e||t[3]!==r){let o=US(e.editedContent,n),s=r[L],{content:c}=r,l=[...n,{type:L}],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,k.jsxs)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:[(0,k.jsxs)(`span`,{className:`text-neutral text-sm`,children:[s,` `]}),(0,k.jsx)(RC,{...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},VC=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:z}],i=n[z];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(QC,{...e,keyPath:r,section:i})})},HC=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:I}],i=n[I];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(QC,{...e,keyPath:r,section:i})})},UC=e=>{let{keyPath:t,section:n}=e,r=[...t,{type:R}],i=n[R];return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:(0,k.jsx)(QC,{...e,keyPath:r,section:i})})},WC=(0,O.memo)(e=>{let t=(0,B.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(GC),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:ee},o=[...n,i],c=dt(o,s);return(0,k.jsx)(iS,{level:n.length,title:ht(t),description:``,isSelected:c,onClick:e=>{e.stopPropagation(),a(c?[]:o)},children:(0,k.jsx)(QC,{...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 GC(e){return!ZC.includes(e)}var KC=({onSave:e,onCancel:t,ref:n,...r})=>{let i=(0,O.useRef)(null);return(0,O.useImperativeHandle)(n,()=>i.current),(0,k.jsx)(kC,{value:(0,O.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,k.jsx)(MC,{ref:i,...r})})},qC=e=>{let t=(0,B.c)(17),{keyPath:n,section:r,editedContent:i,onContentChange:a,onFocusKeyPath:o}=e,s=mC(),c;t[0]!==i||t[1]!==n||t[2]!==s?(c=US(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,k.jsx)(k.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,k.jsx)(`button`,{type:`button`,className:W(`w-full rounded-md p-2 text-left transition`,`hover:bg-card/30 [&:has(.section:hover)]:bg-transparent`,u===2&&`hover:bg-card/30`,u>=3&&``),onClick:e,children:(0,k.jsx)(KC,{"aria-label":`Editable number field`,type:`number`,defaultValue:d,onSave:r,onCancel:JC})}),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 JC(){return null}var YC=e=>{let{keyPath:t,section:n}=e;return(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:Object.keys(n).filter(e=>!ZC.includes(e)).map(r=>{let i={type:P,key:r},a=[...t,i],o=n[P][r];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`span`,{className:`flex items-center font-bold`,children:r}),(0,O.createElement)(QC,{...e,key:r,keyPath:a,section:o})]})})})},XC=e=>{let{keyPath:t,section:n,locale:r}=e,i={type:M,key:r},a=[...t,i],o=n[M][r];return(0,k.jsx)(QC,{...e,keyPath:a,section:o})},ZC=[`filePath`,`id`,`nodeType`],QC=(0,O.memo)(e=>{let t=mC(),n=(0,O.useMemo)(()=>US(e.editedContent,e.keyPath,t)??e.section,[e.editedContent,e.keyPath,e.section]),r=(0,O.useMemo)(()=>YS(n),[n]);if(typeof n==`object`)return r===`reactNode`?(0,k.jsx)(`span`,{className:`text-neutral text-xs`,children:`React node not editable`}):r===`nested`?(0,k.jsx)(`div`,{className:`ml-2 grid grid-cols-[auto,1fr] gap-2`,children:`[Nested] Dictionary`}):r===`markdown`?(0,k.jsx)(UC,{...e,section:n}):r===`html`?(0,k.jsx)(VC,{...e,section:n}):r===`translation`?(0,k.jsx)(XC,{...e,section:n}):r===`enumeration`?(0,k.jsx)(OC,{...e,section:n}):r===`plural`?(0,k.jsx)(YC,{...e,section:n}):r===`condition`?(0,k.jsx)(DC,{...e,section:n}):r===`insertion`?(0,k.jsx)(HC,{...e,section:n}):r===`array`?(0,k.jsx)(aS,{...e,section:n}):r===`file`?(0,k.jsx)(BC,{...e,section:n}):(0,k.jsx)(WC,{...e,section:n});if(typeof n==`string`)return(0,k.jsx)(RC,{...e,section:n});if(typeof n==`number`)return(0,k.jsx)(qC,{...e,section:n});if(typeof n==`boolean`)return(0,k.jsx)(EC,{...e,section:n})}),$C=e=>{let t=(0,B.c)(6),{dictionary:n,...r}=e,i=mC(),{editedContent:a,addEditedContent:o}=xC(),{focusedContent:s,setFocusedContentKeyPath:c}=gC(),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,k.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,O.createElement)(QC,{...r,keyPath:[],locale:i,dictionary:n,key:`${l}${i}`,editedContent:a?.[n.localId]?.content,focusedKeyPath:s?.keyPath,section:n.content,onContentChange:u,onFocusKeyPath:c})})},ew={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`]},tw=(e,t)=>{let n=(0,B.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,O.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,O.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},nw=(0,O.createContext)({availableLocales:[],selectedLocales:[],setSelectedLocales:()=>{}}),rw=()=>(0,O.useContext)(nw),iw=e=>{let t=(0,B.c)(8),{availableLocales:n,defaultSelectedLocales:r,children:i}=e,{locale:a}=bt(),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]=tw(`locale-content-selector-selected-locales`,o),l;return t[3]!==n||t[4]!==i||t[5]!==s||t[6]!==c?(l=(0,k.jsx)(nw,{value:{availableLocales:n,selectedLocales:s,setSelectedLocales:c},children:i}),t[3]=n,t[4]=i,t[5]=s,t[6]=c,t[7]=l):l=t[7],l},aw=e=>{let t=(0,B.c)(9),{children:n,onContentChange:r,disabled:i,validate:a,additionalButtons:o,...s}=e,[c,l]=(0,O.useState)(n),[u,d]=(0,O.useState)(0),f=c!==n,p;t[0]===n?p=t[1]:(p=()=>{l(n),d(ow)},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(sw)},x=[n],t[6]=n,t[7]=b,t[8]=x),(0,O.useEffect)(b,x);let S=a?.(c)??!0;return(0,k.jsxs)(`div`,{className:`flex size-full flex-col items-center justify-between gap-2`,role:`group`,"aria-label":`Content editor input`,children:[(0,k.jsx)(MC,{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,k.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,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(tS,{Icon:gu,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,k.jsx)(tS,{Icon:Bu,label:`Cancel changes`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,onClick:m,disabled:i})]}),o]})]},String(n))};function ow(e){return e+1}function sw(e){return e+1}var cw={method:`GET`,headers:{"Content-Type":`application/json`},credentials:`include`},lw=e=>(Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]}),e),uw=e=>e.reduce((e,t)=>{let n=e??{},r=lw(t??{});return typeof n==`object`&&typeof r==`object`?{...n,...r}:r??n},{}),q=async(e,...t)=>{let{signal:n}=new AbortController,r=``,i,a=uw([cw,...t.map(({body:e,params:t,headers:n,...r})=>r)]),o=uw([cw.headers,...t.map(e=>e.headers)]),s=uw(t.map(e=>e.params)),c=a.method;if(c!==`GET`&&c!==`HEAD`){let e=uw(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()},dw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/ai`;return{customQuery:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),translateJSON:async(t,r={})=>await q(`${n}/translate/json`,e,r,{method:`POST`,body:t}),auditContentDeclaration:async(t,r={})=>await q(`${n}/audit/dictionary`,e,r,{method:`POST`,body:t}),auditContentDeclarationField:async(t,r={})=>await q(`${n}/audit/dictionary/field`,e,r,{method:`POST`,body:t}),auditContentDeclarationMetadata:async(t,r={})=>await q(`${n}/audit/dictionary/metadata`,e,r,{method:`POST`,body:t}),auditTag:async(t,r={})=>await q(`${n}/audit/tag`,e,r,{method:`POST`,body:t}),askDocQuestion:async(t,r={})=>{if(!t)return;let{onMessage:i,onDone:a,...o}=t,s=new AbortController;try{let t=await fetch(`${n}/ask`,{method:`POST`,headers:{"Content-Type":`application/json`,...e.headers,...r.headers},body:JSON.stringify({...o,...e.body,...r.body}),signal:s.signal,credentials:`include`});if(!t.ok){let e=`An error occurred`;try{let n=await t.json(),r=n.error??n;e=JSON.stringify(r)??`An error occurred`}catch{try{let n=await t.text();n&&(e=n)}catch{}}throw Error(e)}let c=t.body?.getReader();if(!c)throw Error(`No reader available`);let l=new TextDecoder,u=``;for(;;){let{done:e,value:t}=await c.read();if(e)break;u+=l.decode(t,{stream:!0});let n=u.split(`
|
|
41
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
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 q(`${n}/autocomplete`,e,r,{method:`POST`,body:t}),getDiscussions:async(t,r={})=>await q(`${n}/discussions`,e,r,{method:`GET`,params:t})}},fw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/scan`;return{discoverUrls:async(t,r={})=>await q(`${n}/recursive/discover`,e,r,{method:`GET`,params:t}),scanUrl:async(t,r={})=>{if(!t?.url)return;let{url:i,onMessage:a,onDone:o}=t,s=`${n}?${new URLSearchParams({url:i}).toString()}`,c=await fetch(s,{method:`GET`,headers:{Accept:`text/event-stream`,...e.headers,...r.headers},credentials:`include`,signal:r.signal});if(!c.ok){let e=`An error occurred`;try{let t=await c.json();e=JSON.stringify(t.error)??e}catch{try{let t=await c.text();t&&(e=t)}catch{}}throw Error(e)}let l=c.body?.getReader();if(!l)throw Error(`No reader available`);let u=new TextDecoder,d=``;for(;;){let{done:e,value:t}=await l.read();if(e)break;d+=u.decode(t,{stream:!0});let n=d.split(`
|
|
43
|
-
`);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},pw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},mw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},hw=(e={},t=T)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},gw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}}),getToken:async(t={})=>await q(`${n}/token`,e,t)}},_w=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},vw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},yw=(e={},t=T)=>{let n=t.editor.backendURL,{clientId:r,clientSecret:i}=t.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${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 q(`${n}/api/cli-session`,e,t,{method:`POST`}),getCliSessionMe:async(t={})=>await q(`${n}/api/cli-session/me`,e,t)}},bw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),deleteOrganizationByIdAdmin:async(t,r={})=>q(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},xw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),deleteProjectByIdAdmin:async(t,r={})=>q(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},Sw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},Cw=(e={},t=T)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`}),getInvoices:async(t={})=>await q(`${n}/invoices`,e,t,{method:`GET`}),getPaymentMethod:async(t={})=>await q(`${n}/payment-method`,e,t,{method:`GET`}),createPortalSession:async(t={})=>await q(`${n}/portal-session`,e,t,{method:`POST`})}},ww=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},Tw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},Ew=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},Dw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function Ow(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 kw(e,t,n=`.`,r){if(!Ow(t))return kw(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]]:Ow(a)&&Ow(i[t])?i[t]=kw(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Aw(e){return(...t)=>t.reduce((t,n)=>kw(t,n,``,e),{})}var jw=Aw(),Mw=(e={},t=T)=>{let n=jw(t??{},T);return{organization:bw(e,n),project:xw(e,n),user:Ew(e,n),oAuth:yw(e,n),dictionary:mw(e,n),stripe:Cw(e,n),ai:dw(e,n),audit:fw(e,n),tag:ww(e,n),search:Sw(e,n),editor:hw(e,n),newsletter:vw(e,n),github:gw(e,n),gitlab:_w(e,n),bitbucket:pw(e,n),showcaseProject:Dw(e,n),translate:Tw(e,n)}},Nw=e=>{let t=(0,B.c)(7),n=jw(e,yC(),T),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=yw(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}=bo(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function Pw(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var Fw=Pw({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`}),Iw=`1.6.11`;function Lw(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 Rw(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 zw(){return Bw.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var Bw={stubThis:e=>e};function Vw(e){let{id:t}=e;return{...e,id:Rw(t),transports:e.transports}}function Hw(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 Uw=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 Ww({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 Uw({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 Uw({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 Uw({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 Uw({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 Uw({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Uw({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 Uw({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Uw({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(!Hw(t))return new Uw({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Uw({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 Uw({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 Uw({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 Gw=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}}},Kw=[`cross-platform`,`platform`];function qw(e){if(e&&!(Kw.indexOf(e)<0))return e}async function Jw(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(!zw())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:Rw(t.challenge),user:{...t.user,id:Rw(t.user.id)},excludeCredentials:t.excludeCredentials?.map(Vw)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=Gw.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw Ww({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){Yw(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=Lw(e))}catch(e){Yw(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=Lw(c.getAuthenticatorData())}catch(e){Yw(`getAuthenticatorData()`,e)}return{id:o,rawId:Lw(s),response:{attestationObject:Lw(c.attestationObject),clientDataJSON:Lw(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:qw(a.authenticatorAttachment)}}function Yw(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 Xw(){if(!zw())return Zw.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?Zw.stubThis(new Promise(e=>e(!1))):Zw.stubThis(e.isConditionalMediationAvailable())}var Zw={stubThis:e=>e};function Qw({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 Uw({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Uw({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Hw(t))return new Uw({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Uw({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 Uw({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 $w(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(!zw())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(Vw));let a={...t,challenge:Rw(t.challenge),allowCredentials:i},o={};if(n){if(!await Xw())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=Gw.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw Qw({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=Lw(u.userHandle)),{id:c,rawId:Lw(l),response:{authenticatorData:Lw(u.authenticatorData),clientDataJSON:Lw(u.clientDataJSON),signature:Lw(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:qw(s.authenticatorAttachment)}}var eT=`1.6.11`,tT=Symbol.for(`better-auth:broadcast-channel`),nT=()=>Math.floor(Date.now()/1e3),rT=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:nT()}))}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 iT(e=`better-auth.message`){return globalThis[tT]||(globalThis[tT]=new rT(e)),globalThis[tT]}var aT=Symbol.for(`better-auth:focus-manager`),oT=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 sT(){return globalThis[aT]||(globalThis[aT]=new oT),globalThis[aT]}var cT=Symbol.for(`better-auth:online-manager`),lT=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 uT(){return globalThis[cT]||(globalThis[cT]=new lT),globalThis[cT]}var dT={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*:/},fT=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,pT={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},mT=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function hT(e){return e instanceof Date&&!isNaN(e.getTime())}function gT(e){let t=mT.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 hT(f)?f:null}function _T(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in pT)return pT[s];if(!fT.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(dT).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=gT(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function vT(e,t={strict:!0}){return _T(e,t)}var yT=[],bT=0,xT=4,ST=globalThis.nanostoresGlobal||={epoch:0},CT=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=bT+xT;t<yT.length;)yT[t]===e?yT.splice(t,xT):t+=xT;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){ST.epoch++;let i=!yT.length;for(let i of t)yT.push(i,n.value,e,r);if(i){for(bT=0;bT<yT.length;bT+=xT)yT[bT](yT[bT+1],yT[bT+2],yT[bT+3]);yT.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},wT=5,TT=6,ET=10,DT=(e,t,n,r)=>(e.events=e.events||{},e.events[n+ET]||(e.events[n+ET]=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+ET](),delete e.events[n+ET])}),OT=1e3,kT=(e,t)=>DT(e,n=>{let r=t(n);r&&e.events[TT].push(r)},wT,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[TT]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[TT])t();e.events[TT]=[]}},OT)},()=>{e.listen=n,e.off=r}}),AT=()=>typeof window>`u`,jT=(e,t,n,r)=>{let i=CT({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()=>{AT()||(o?await a():kT(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},MT=()=>Math.floor(Date.now()/1e3);function NT(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var PT=5;function FT(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||uT().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=MT(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=MT(),r(`/get-session`).then(async e=>{let{data:a,error:o}=NT(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=NT(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=MT(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(MT()-c.lastSessionRequest<PT)return;c.lastSessionRequest=MT()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=MT(),n.set(!n.get()))},d=e=>{iT().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=iT().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=sT().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=uT().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),iT().setup(),sT().setup(),uT().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 IT=Object.create(null),LT=e=>({}),RT=new Proxy(IT,{get(e,t){return LT()[t]??IT[t]},has(e,t){return t in LT()||t in IT},set(e,t,n){let r=LT(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=LT(!0);return delete n[t],!0},ownKeys(){let e=LT(!0);return Object.keys(e)}});function zT(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 zT(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return zT(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return zT(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return zT(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return zT(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return zT(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return zT(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function BT(){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 VT(e){let t=e.split(`
|
|
43
|
+
`);d=n.pop()??``;for(let e of n)if(e.startsWith(`data: `))try{let t=JSON.parse(e.slice(6));a?.(t)}catch{}}o?.()},startRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/start`,e,r,{method:`POST`,params:t?.url?{url:t.url}:void 0,body:t?.urls===void 0?void 0:{urls:t.urls}}),getRecursiveAuditStatus:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}`,e,r,{method:`GET`}),cancelRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/cancel`,e,r,{method:`POST`}),pauseRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/pause`,e,r,{method:`POST`}),resumeRecursiveAudit:async(t,r={})=>await q(`${n}/recursive/${t?.jobId}/resume`,e,r,{method:`POST`})}},pw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/bitbucket`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,workspace:r,repoSlug:i,branch:a,path:o}})}},mw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/dictionary`;return{getDictionaries:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getDictionariesKeys:async(t={})=>await q(`${n}/keys`,e,t,{cache:`no-store`}),getDictionariesUpdateTimestamp:async(t={})=>await q(`${n}/update`,e,t,{cache:`no-store`}),getDictionary:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{params:r?{version:r.toString()}:void 0}),pushDictionaries:async(t,r={})=>await q(`${n}`,e,r,{method:`PATCH`,body:{dictionaries:t}}),addDictionary:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateDictionary:async(t,r={})=>await q(`${n}/${t.id}`,e,r,{method:`PUT`,body:t}),deleteDictionary:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},hw=(e={},t=T)=>{let n=t.editor.editorURL;if(!n)throw Error(`Editor URL is not defined in the Intlayer configuration.`);let r=`${n}/api`;return{getDictionaries:async(t={})=>(await q(`${r}/dictionary`,e,t)).data,getConfiguration:async(t={})=>(await q(`${r}/config`,e,t)).data,writeDictionary:async(t,n={})=>await q(`${r}/dictionary`,e,n,{method:`POST`,body:t})}},gw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/github`;return{getAuthUrl:async(t,r={})=>await q(`${n}/auth-url`,e,r,{params:{redirectUri:t}}),authenticate:async(t,r={})=>await q(`${n}/auth`,e,r,{method:`POST`,body:{code:t}}),getRepositories:async(t,r={})=>await q(`${n}/repos`,e,r,{params:t?{token:t}:void 0}),checkIntlayerConfig:async(t,r,i,a=`main`,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a}}),getConfigFile:async(t,r,i,a=`main`,o=`intlayer.config.ts`,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,owner:r,repository:i,branch:a,path:o}}),getToken:async(t={})=>await q(`${n}/token`,e,t)}},_w=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/gitlab`;return{getAuthUrl:async(t,r,i={})=>await q(`${n}/auth-url`,e,i,{params:{redirectUri:t,...r&&{instanceUrl:r}}}),authenticate:async(t,r,i,a={})=>await q(`${n}/auth`,e,a,{method:`POST`,body:{code:t,redirectUri:r,instanceUrl:i}}),getProjects:async(t,r,i={})=>await q(`${n}/projects`,e,i,{params:{...t&&{token:t},...r&&{instanceUrl:r}}}),checkIntlayerConfig:async(t,r,i=`main`,a,o={})=>await q(`${n}/check-config`,e,o,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,...a&&{instanceUrl:a}}}),getConfigFile:async(t,r,i=`main`,a=`intlayer.config.ts`,o,s={})=>await q(`${n}/get-config-file`,e,s,{method:`POST`,body:{token:t??void 0,projectId:r,branch:i,path:a,...o&&{instanceUrl:o}}})}},vw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/newsletter`;return{subscribeToNewsletter:async(t,r={})=>await q(`${n}/subscribe`,e,r,{method:`POST`,body:t}),unsubscribeFromNewsletter:async(t,r={})=>await q(`${n}/unsubscribe`,e,r,{method:`POST`,body:t}),getNewsletterStatus:async(t={})=>await q(`${n}/status`,e,t,{method:`GET`})}},yw=(e={},t=T)=>{let n=t.editor.backendURL,{clientId:r,clientSecret:i}=t.editor;return{getOAuth2AccessToken:async(e={})=>await q(`${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 q(`${n}/api/cli-session`,e,t,{method:`POST`}),getCliSessionMe:async(t={})=>await q(`${n}/api/cli-session/me`,e,t)}},bw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/organization`;return{getOrganizations:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r),addOrganization:async(t,r={})=>await q(n,e,r,{method:`POST`,body:t}),addOrganizationMember:async(t,r={})=>q(`${n}/member`,e,r,{method:`POST`,body:t}),updateOrganization:async(t,r={})=>q(n,e,r,{method:`PUT`,body:t}),updateOrganizationMembers:async(t,r={})=>q(`${n}/members`,e,r,{method:`PUT`,body:t}),updateOrganizationMembersById:async(t,r,i={})=>q(`${n}/${t}/members`,e,i,{method:`PUT`,body:r}),deleteOrganization:async(t={})=>await q(n,e,t,{method:`DELETE`}),deleteOrganizationByIdAdmin:async(t,r={})=>q(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectOrganization:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectOrganization:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`})}},xw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/project`;return{getProjects:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addProject:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateProject:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),updateProjectMembers:async(t,r={})=>await q(`${n}/members`,e,r,{method:`PUT`,body:t}),pushProjectConfiguration:async(t,r={})=>await q(`${n}/configuration`,e,r,{method:`PUT`,body:t}),deleteProject:async(t={})=>await q(`${n}`,e,t,{method:`DELETE`}),deleteProjectByIdAdmin:async(t,r={})=>q(`${n}/${t}/admin`,e,r,{method:`DELETE`}),selectProject:async(t,r={})=>await q(`${n}/${String(t)}`,e,r,{method:`PUT`}),unselectProject:async(t={})=>await q(`${n}/logout`,e,t,{method:`POST`}),addNewAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`POST`,body:t}),deleteAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`DELETE`,body:{clientId:t}}),refreshAccessKey:async(t,r={})=>await q(`${n}/access_key`,e,r,{method:`PATCH`,body:{clientId:t}}),triggerBuild:async(t={})=>await q(`${n}/build`,e,t,{method:`POST`}),triggerWebhook:async(t,r={})=>await q(`${n}/webhook`,e,r,{method:`POST`,body:{webhookIndex:t}}),getCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`GET`}),pushCIConfig:async(t={})=>await q(`${n}/ci`,e,t,{method:`POST`})}},Sw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/search`;return{searchDoc:async(t,r={})=>await q(`${n}/doc`,e,r,{method:`GET`,params:t})}},Cw=(e={},t=T)=>{let n=`${t?.editor?.backendURL}/api/stripe`;return{getPricing:async(t,r={})=>await q(`${n}/pricing`,e,r,{method:`POST`,body:t}),getSubscription:async(t,r={})=>await q(`${n}/create-subscription`,e,r,{method:`POST`,body:t}),cancelSubscription:async(t={})=>await q(`${n}/cancel-subscription`,e,t,{method:`POST`}),getInvoices:async(t={})=>await q(`${n}/invoices`,e,t,{method:`GET`}),getPaymentMethod:async(t={})=>await q(`${n}/payment-method`,e,t,{method:`GET`}),createPortalSession:async(t={})=>await q(`${n}/portal-session`,e,t,{method:`POST`})}},ww=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/tag`;return{getTags:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),addTag:async(t,r={})=>await q(`${n}`,e,r,{method:`POST`,body:t}),updateTag:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PUT`,body:r}),deleteTag:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`})}},Tw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/translate`;return{translateDictionaries:async(t,r={})=>q(`${n}/dictionaries`,e,r,{method:`POST`,body:t}),pauseTranslationJob:async(t,r={})=>q(`${n}/${t}/pause`,e,r,{method:`POST`}),resumeTranslationJob:async(t,r={})=>q(`${n}/${t}/resume`,e,r,{method:`POST`}),stopTranslationJob:async(t,r={})=>q(`${n}/${t}/stop`,e,r,{method:`POST`}),retryTranslationJob:async(t,r={})=>q(`${n}/${t}/retry`,e,r,{method:`POST`}),restartTranslationJob:async(t,r={})=>q(`${n}/${t}/restart`,e,r,{method:`POST`})}},Ew=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/user`;return{createUser:async(t,r={})=>await q(`${n}/`,e,r,{method:`POST`,body:t}),getUsers:async(t,r={})=>await q(n,e,r,{cache:`no-store`,params:t}),getUserById:async(t,r={})=>await q(`${n}/${t}`,e,r,{cache:`no-store`}),getUserByAccount:async(t,r,i={})=>await q(`${n}/account/${r}/${t}`,e,i,{cache:`no-store`}),getUserByEmail:async(t,r={})=>await q(`${n}/email/${t}`,e,r,{cache:`no-store`}),updateUser:async(t,r={})=>await q(`${n}`,e,r,{method:`PUT`,body:t}),deleteUser:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),uploadAvatar:async(t,r={})=>{let i=await t.arrayBuffer(),a={"Content-Type":t.type||`image/jpeg`},o=e.headers??{},s=await fetch(`${n}/avatar`,{method:`POST`,credentials:`include`,headers:{...o,...a},body:i,signal:r.signal});if(!s.ok){let e=await s.json();throw Error(JSON.stringify(e.error)??`Avatar upload failed`)}return await s.json()},getVerifyEmailStatusURL:e=>`${n}/verify-email-status/${String(e)}`}},Dw=(e={},t=T)=>{let n=`${t.editor.backendURL}/api/showcase-project`;return{getShowcaseProjects:async(t,r={})=>{let i={};return t?.page!==void 0&&(i.page=String(t.page)),t?.pageSize!==void 0&&(i.pageSize=String(t.pageSize)),t?.search!==void 0&&(i.search=t.search),t?.isOpenSource!==void 0&&(i.isOpenSource=String(t.isOpenSource)),t?.selectedUseCases?.length&&(i.selectedUseCases=t.selectedUseCases),await q(n,e,r,{method:`GET`,params:i})},getShowcaseProjectById:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`GET`}),getOtherShowcaseProjects:async(t,r={})=>{let i={excludeId:t.excludeId};return t.limit!==void 0&&(i.limit=String(t.limit)),await q(`${n}/others`,e,r,{method:`GET`,params:i})},submitShowcaseProject:async(t,r={})=>await q(`${n}/submit`,e,r,{method:`POST`,body:t}),toggleShowcaseUpvote:async(t,r={})=>await q(`${n}/upvote`,e,r,{method:`POST`,body:t}),toggleShowcaseDownvote:async(t,r={})=>await q(`${n}/downvote`,e,r,{method:`POST`,body:t}),deleteShowcaseProject:async(t,r={})=>await q(`${n}/${t}`,e,r,{method:`DELETE`}),updateShowcaseProject:async(t,r,i={})=>await q(`${n}/${t}`,e,i,{method:`PATCH`,body:r})}};function Ow(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 kw(e,t,n=`.`,r){if(!Ow(t))return kw(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]]:Ow(a)&&Ow(i[t])?i[t]=kw(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Aw(e){return(...t)=>t.reduce((t,n)=>kw(t,n,``,e),{})}var jw=Aw(),Mw=(e={},t=T)=>{let n=jw(t??{},T);return{organization:bw(e,n),project:xw(e,n),user:Ew(e,n),oAuth:yw(e,n),dictionary:mw(e,n),stripe:Cw(e,n),ai:dw(e,n),audit:fw(e,n),tag:ww(e,n),search:Sw(e,n),editor:hw(e,n),newsletter:vw(e,n),github:gw(e,n),gitlab:_w(e,n),bitbucket:pw(e,n),showcaseProject:Dw(e,n),translate:Tw(e,n)}},Nw=e=>{let t=(0,B.c)(7),n=jw(e,yC(),T),r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=[`oAuth2AccessToken`],t[0]=r):r=t[0];let i=yw(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}=bo(o),c=s?.data,l;return t[5]===c?l=t[6]:(l={oAuth2AccessToken:c},t[5]=c,t[6]=l),l};function Pw(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}var Fw=Pw({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`}),Iw=`1.6.11`;function Lw(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 Rw(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 zw(){return Bw.stubThis(globalThis?.PublicKeyCredential!==void 0&&typeof globalThis.PublicKeyCredential==`function`)}var Bw={stubThis:e=>e};function Vw(e){let{id:t}=e;return{...e,id:Rw(t),transports:e.transports}}function Hw(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 Uw=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 Ww({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 Uw({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 Uw({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 Uw({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 Uw({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 Uw({message:`The authenticator was previously registered`,code:`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`,cause:e});else if(e.name===`NotAllowedError`)return new Uw({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 Uw({message:`No entry in pubKeyCredParams was of type "public-key"`,code:`ERROR_MALFORMED_PUBKEYCREDPARAMS`,cause:e}):new Uw({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(!Hw(t))return new Uw({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rp.id!==t)return new Uw({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 Uw({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 Uw({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 Gw=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}}},Kw=[`cross-platform`,`platform`];function qw(e){if(e&&!(Kw.indexOf(e)<0))return e}async function Jw(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(!zw())throw Error(`WebAuthn is not supported in this browser`);let r={...t,challenge:Rw(t.challenge),user:{...t.user,id:Rw(t.user.id)},excludeCredentials:t.excludeCredentials?.map(Vw)},i={};n&&(i.mediation=`conditional`),i.publicKey=r,i.signal=Gw.createNewAbortSignal();let a;try{a=await navigator.credentials.create(i)}catch(e){throw Ww({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){Yw(`getPublicKeyAlgorithm()`,e)}let f;if(typeof c.getPublicKey==`function`)try{let e=c.getPublicKey();e!==null&&(f=Lw(e))}catch(e){Yw(`getPublicKey()`,e)}let p;if(typeof c.getAuthenticatorData==`function`)try{p=Lw(c.getAuthenticatorData())}catch(e){Yw(`getAuthenticatorData()`,e)}return{id:o,rawId:Lw(s),response:{attestationObject:Lw(c.attestationObject),clientDataJSON:Lw(c.clientDataJSON),transports:u,publicKeyAlgorithm:d,publicKey:f,authenticatorData:p},type:l,clientExtensionResults:a.getClientExtensionResults(),authenticatorAttachment:qw(a.authenticatorAttachment)}}function Yw(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 Xw(){if(!zw())return Zw.stubThis(new Promise(e=>e(!1)));let e=globalThis.PublicKeyCredential;return e?.isConditionalMediationAvailable===void 0?Zw.stubThis(new Promise(e=>e(!1))):Zw.stubThis(e.isConditionalMediationAvailable())}var Zw={stubThis:e=>e};function Qw({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 Uw({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new Uw({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=globalThis.location.hostname;if(!Hw(t))return new Uw({message:`${globalThis.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new Uw({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 Uw({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 $w(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(!zw())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(Vw));let a={...t,challenge:Rw(t.challenge),allowCredentials:i},o={};if(n){if(!await Xw())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=Gw.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw Qw({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=Lw(u.userHandle)),{id:c,rawId:Lw(l),response:{authenticatorData:Lw(u.authenticatorData),clientDataJSON:Lw(u.clientDataJSON),signature:Lw(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:qw(s.authenticatorAttachment)}}var eT=`1.6.11`,tT=Symbol.for(`better-auth:broadcast-channel`),nT=()=>Math.floor(Date.now()/1e3),rT=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:nT()}))}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 iT(e=`better-auth.message`){return globalThis[tT]||(globalThis[tT]=new rT(e)),globalThis[tT]}var aT=Symbol.for(`better-auth:focus-manager`),oT=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 sT(){return globalThis[aT]||(globalThis[aT]=new oT),globalThis[aT]}var cT=Symbol.for(`better-auth:online-manager`),lT=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 uT(){return globalThis[cT]||(globalThis[cT]=new lT),globalThis[cT]}var dT={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*:/},fT=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,pT={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},mT=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function hT(e){return e instanceof Date&&!isNaN(e.getTime())}function gT(e){let t=mT.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 hT(f)?f:null}function _T(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim();if(o.length>0&&o[0]===`"`&&o.endsWith(`"`)&&!o.slice(1,-1).includes(`"`))return o.slice(1,-1);let s=o.toLowerCase();if(s.length<=9&&s in pT)return pT[s];if(!fT.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(dT).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=gT(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function vT(e,t={strict:!0}){return _T(e,t)}var yT=[],bT=0,xT=4,ST=globalThis.nanostoresGlobal||={epoch:0},CT=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=bT+xT;t<yT.length;)yT[t]===e?yT.splice(t,xT):t+=xT;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){ST.epoch++;let i=!yT.length;for(let i of t)yT.push(i,n.value,e,r);if(i){for(bT=0;bT<yT.length;bT+=xT)yT[bT](yT[bT+1],yT[bT+2],yT[bT+3]);yT.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},wT=5,TT=6,ET=10,DT=(e,t,n,r)=>(e.events=e.events||{},e.events[n+ET]||(e.events[n+ET]=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+ET](),delete e.events[n+ET])}),OT=1e3,kT=(e,t)=>DT(e,n=>{let r=t(n);r&&e.events[TT].push(r)},wT,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[TT]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[TT])t();e.events[TT]=[]}},OT)},()=>{e.listen=n,e.off=r}}),AT=()=>typeof window>`u`,jT=(e,t,n,r)=>{let i=CT({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()=>{AT()||(o?await a():kT(i,()=>{let e=setTimeout(async()=>{o||(o=!0,await a())},0);return()=>{i.off(),t.off(),clearTimeout(e)}}))});return i},MT=()=>Math.floor(Date.now()/1e3);function NT(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}var PT=5;function FT(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||uT().isOnline,u=e=>{if(!l())return;if(e?.event===`storage`){c.lastSync=MT(),n.set(!n.get());return}let i=t.get(),a=()=>{c.lastSessionRequest=MT(),r(`/get-session`).then(async e=>{let{data:a,error:o}=NT(e);if(a?.needsRefresh)try{let e=await r(`/get-session`,{method:`POST`});({data:a,error:o}=NT(e))}catch{}let s=a?.session&&a?.user?a:null;t.set({...i,data:s,error:o}),c.lastSync=MT(),n.set(!n.get())}).catch(()=>{})};if(e?.event===`poll`){a();return}if(e?.event===`visibilitychange`){if(MT()-c.lastSessionRequest<PT)return;c.lastSessionRequest=MT()}if(e?.event===`visibilitychange`){a();return}(i?.data===null||i?.data===void 0)&&(c.lastSync=MT(),n.set(!n.get()))},d=e=>{iT().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=iT().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=sT().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=uT().subscribe(e=>{e&&u({event:`visibilitychange`})})};return{init:()=>{f(),p(),m(),h(),iT().setup(),sT().setup(),uT().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 IT=Object.create(null),LT=e=>({}),RT=new Proxy(IT,{get(e,t){return LT()[t]??IT[t]},has(e,t){return t in LT()||t in IT},set(e,t,n){let r=LT(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=LT(!0);return delete n[t],!0},ownKeys(){let e=LT(!0);return Object.keys(e)}});function zT(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 zT(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return zT(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return zT(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return zT(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return zT(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return zT(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return zT(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});function BT(){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 VT(e){let t=e.split(`
|
|
44
44
|
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
45
45
|
at `))}function HT(e,t){class n extends e{#e;constructor(...e){if(BT()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=VT(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 UT={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};HT(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:UT[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 WT=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}};function GT(e){try{return(new URL(e).pathname.replace(/\/+$/,``)||`/`)!==`/`}catch{throw new WT(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function KT(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new WT(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof WT?t:new WT(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function qT(e,t=`/api/auth`){if(KT(e),GT(e))return e;let n=e.replace(/\/+$/,``);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function JT(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 YT(e,t,n,r,i){if(e)return qT(e,t);if(r!==!1){let e=RT.BETTER_AUTH_URL||RT.NEXT_PUBLIC_BETTER_AUTH_URL||RT.PUBLIC_BETTER_AUTH_URL||RT.NUXT_PUBLIC_BETTER_AUTH_URL||RT.NUXT_PUBLIC_AUTH_URL||(RT.BASE_URL===`/`?void 0:RT.BASE_URL);if(e)return qT(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&JT(o,`proto`)&&JT(a,`host`))try{return qT(`${o}://${a}`,t)}catch{}if(n){let e=XT(n.url);if(!e)throw new WT(`Could not get origin from request. Please provide a valid base URL.`);return qT(e,t)}if(typeof window<`u`&&window.location)return qT(window.location.origin,t)}function XT(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var ZT={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}};function QT(e,t){let n=CT(!1),r=jT(n,`/get-session`,e,{method:`GET`}),i=()=>{};return kT(r,()=>{let a=FT({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 $T=Object.defineProperty,eE=Object.defineProperties,tE=Object.getOwnPropertyDescriptors,nE=Object.getOwnPropertySymbols,rE=Object.prototype.hasOwnProperty,iE=Object.prototype.propertyIsEnumerable,aE=(e,t,n)=>t in e?$T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oE=(e,t)=>{for(var n in t||={})rE.call(t,n)&&aE(e,n,t[n]);if(nE)for(var n of nE(t))iE.call(t,n)&&aE(e,n,t[n]);return e},sE=(e,t)=>eE(e,tE(t)),cE=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)}},lE=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}},uE=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}},dE=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 fE(e){if(typeof e==`number`)return new uE({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new uE(e);case`exponential`:return new dE(e);default:throw Error(`Invalid retry strategy`)}}var pE=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},mE=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function hE(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 mE.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function gE(e){try{return JSON.parse(e),!0}catch{return!1}}function _E(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 vE(e){try{return JSON.parse(e)}catch{return e}}function yE(e){return typeof e==`function`}function bE(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&yE(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&yE(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}async function xE(e){let t=new Headers(e?.headers),n=await pE(e);for(let[e,r]of Object.entries(n||{}))t.set(e,r);if(!t.has(`content-type`)){let n=SE(e?.body);n&&t.set(`content-type`,n)}return t}function SE(e){return _E(e)?`application/json`:null}function CE(e){if(!e?.body)return null;let t=new Headers(e?.headers);if(_E(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`&&_E(e.body)?new URLSearchParams(e.body).toString():e.body}function wE(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return OE.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function TE(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var EE=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function DE(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new EE(n.issues);return n.value}var OE=[`get`,`post`,`put`,`patch`,`delete`],kE=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=sE(oE({},n),{method:i.method,output:i.output});return n?.disableValidation||(e=sE(oE({},e),{body:i.input?await DE(i.input,n?.body):n?.body,params:i.params?await DE(i.params,n?.params):n?.params,query:i.query?await DE(i.query,n?.query):n?.query})),{url:t,options:e}}}return{url:t,options:n}}}),AE=e=>{async function t(t,n){let r=sE(oE(oE({},e),n),{plugins:[...e?.plugins||[],kE(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await ME(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 ME(t,r)}return t};function jE(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];OE.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 ME=async(e,t)=>{let{hooks:n,url:r,options:i}=await lE(e,t),a=bE(i),o=new AbortController,s=i.signal??o.signal,c=jE(r,i),l=CE(i),u=await xE(i),d=wE(r,i),f=sE(oE({},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}=TE(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(sE(oE({},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=hE(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??vE)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await DE(f.output,r.data));for(let e of n.onSuccess)e&&await e(sE(oE({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??vE,_=await m.text(),v=gE(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:sE(oE({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(sE(oE({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=fE(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 ME(e,sE(oE({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new cE(m.status,m.statusText,v?y:_);return{data:null,error:sE(oE({},y),{status:m.status,statusText:m.statusText})}},NE=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{}}},PE=(e,t)=>{let n=`credentials`in Request.prototype,r=YT(e?.baseURL,e?.basePath,void 0,t)??NE(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=AE({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?vT(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[ZT],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=QT(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=jw(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function FE(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function IE(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 LE(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`||FE(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=IE(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 RE(e){return e.charAt(0).toUpperCase()+e.slice(1)}function zE(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,atomListeners:a,$store:o}=PE(e),s={};for(let[e,t]of Object.entries(r))s[`use${RE(e)}`]=t;return LE({...n,...s,$fetch:i,$store:o},i,t,r,a)}var BE=(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 $w({optionsJSON:{...a.data,extensions:o},useBrowserAutofill:r?.autoFill})}catch(e){return{data:null,error:{code:e instanceof Uw?e.code:`AUTH_CANCELLED`,message:Fw.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:Fw.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 Jw({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 Uw?e.code===`ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED`?{data:null,error:{code:e.code,message:Fw.PREVIOUSLY_REGISTERED.message,status:400,statusText:`BAD_REQUEST`}}:e.code===`ERROR_CEREMONY_ABORTED`?{data:null,error:{code:e.code,message:Fw.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:Fw.UNKNOWN_ERROR.message,status:500,statusText:`INTERNAL_SERVER_ERROR`}}}}},$Infer:{}}),VE=()=>{let e=CT();return{id:`passkey`,version:Iw,$InferServerPlugin:{},getActions:(t,n)=>BE(t,{$listPasskeys:e,$store:n}),getAtoms(t){return{listPasskeys:jT(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:Fw}},HE=`1.6.11`,UE=e=>({id:`sso-client`,version:HE,$InferServerPlugin:{},pathMethods:{"/sso/providers":`GET`,"/sso/get-provider":`GET`}}),WE=()=>({id:`magic-link`,version:eT,$InferServerPlugin:{}}),GE=Pw({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`}),KE=e=>({id:`two-factor`,version:eT,$InferServerPlugin:{},atomListeners:[{matcher:e=>e.startsWith(`/two-factor/`),signal:`$sessionSignal`}],pathMethods:{"/two-factor/disable":`POST`,"/two-factor/enable":`POST`,"/two-factor/send-otp":`POST`,"/two-factor/generate-backup-codes":`POST`,"/two-factor/get-totp-uri":`POST`,"/two-factor/verify-totp":`POST`,"/two-factor/verify-otp":`POST`,"/two-factor/verify-backup-code":`POST`},fetchPlugins:[{id:`two-factor`,name:`two-factor`,hooks:{async onSuccess(t){if(t.data?.twoFactorRedirect){if(e?.onTwoFactorRedirect){await e.onTwoFactorRedirect({twoFactorMethods:t.data.twoFactorMethods});return}e?.twoFactorPage&&typeof window<`u`&&(window.location.href=e.twoFactorPage)}}}}],$ERROR_CODES:GE}),qE=e=>zE({baseURL:e,withCredentials:!0,plugins:[KE({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}}),VE(),WE(),UE()]}),JE=e=>{let t=e?.editor?.backendURL??T?.editor?.backendURL;t||(t=Ye,console.dir({intlayerConfig:e,configuration:T},{depth:null}),console.error(`Backend URL is not defined in the Intlayer configuration.`));let n=qE(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})}},YE=(e,t)=>{let n=(0,B.c)(14),r=yC(),i=t??r??T,a=io(),o;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=[`session`],n[0]=o):o=n[0];let s;n[1]===i?s=n[2]:(s=async()=>(await JE(i).getSession()).data,n[1]=i,n[2]=s);let c=!e,l;n[3]!==s||n[4]!==c?(l={queryKey:o,queryFn:s,staleTime:3e5,gcTime:18e5,refetchInterval:6e5,refetchIntervalInBackground:!1,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:c},n[3]=s,n[4]=c,n[5]=l):l=n[5];let{data:u,isFetched:d,refetch:f}=bo(l),p=u??(d?null:void 0),m;n[6]===a?m=n[7]:(m=e=>{a.setQueryData([`session`],e)},n[6]=a,n[7]=m);let h=m,g;n[8]===f?g=n[9]:(g=async()=>(await f()).data,n[8]=f,n[9]=g);let _=g,v;return n[10]!==_||n[11]!==p||n[12]!==h?(v={session:p,fetchSession:_,revalidateSession:_,setSession:h},n[10]=_,n[11]=p,n[12]=h,n[13]=v):v=n[13],v},XE=e=>{let t=(0,B.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}=YE(r,i),{oAuth2AccessToken:l}=Nw(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},ZE=e=>{let t=(0,B.c)(5),n=yC(),{oAuth2AccessToken:r}=XE(),i;return t[0]!==n||t[1]!==r||t[2]!==e?.intlayerConfiguration||t[3]!==e?.options?(i=Mw({...r&&{headers:{Authorization:`Bearer ${r.accessToken}`}},...e?.options??{}},e?.intlayerConfiguration??n),t[0]=n,t[1]=r,t[2]=e?.intlayerConfiguration,t[3]=e?.options,t[4]=i):i=t[4],i},QE=e=>{let t=(0,B.c)(2),n=yC(),r=e?.intlayerConfiguration??n,i;return t[0]===r?i=t[1]:(i=JE(r),t[0]=r,t[1]=i),i},$E=e=>{let t=(0,B.c)(4),{requireUser:n,requireProject:r,requireOrganization:i}=e,a=yC(),o;t[0]===a?o=t[1]:(o={intlayerConfiguration:a},t[0]=a,t[1]=o);let{oAuth2AccessToken:s,session:c}=XE(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},eD=e=>{let t=(0,B.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}=$E(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],bo(l)},tD=()=>{let e=(0,B.c)(6),t=QE(),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),xo(a)},nD=(e,t)=>{let n=(0,B.c)(9),r=ZE(),i;n[0]===e?i=n[1]:(i=[`projects`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.project.getProjects(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],eD(o)},rD=()=>{let e=(0,B.c)(6),t=ZE(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.pushDictionaries(e.dictionaries),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),xo(a)},iD=()=>{let e=(0,B.c)(6),t=ZE(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`dictionaries`],e[0]=n):n=e[0];let r;e[1]===t?r=e[2]:(r=e=>t.dictionary.deleteDictionary(e.dictionaryId),e[1]=t,e[2]=r);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i={invalidateQueries:[[`dictionaries`],[`dictionariesKeys`]]},e[3]=i):i=e[3];let a;return e[4]===r?a=e[5]:(a={mutationKey:n,mutationFn:r,meta:i},e[4]=r,e[5]=a),xo(a)},aD=(e,t)=>{let n=(0,B.c)(9),r=ZE(),i;n[0]===e?i=n[1]:(i=[`tags`,e],n[0]=e,n[1]=i);let a;n[2]!==e||n[3]!==r?(a=t=>{let{signal:n}=t;return r.tag.getTags(e,{signal:n})},n[2]=e,n[3]=r,n[4]=a):a=n[4];let o;return n[5]!==t||n[6]!==i||n[7]!==a?(o={queryKey:i,queryFn:a,requireUser:!0,requireOrganization:!0,...t},n[5]=t,n[6]=i,n[7]=a,n[8]=o):o=n[8],eD(o)},oD=()=>{let e=(0,B.c)(3),t=ZE(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationMetadata`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationMetadata(e)},e[1]=t,e[2]=r),xo(r)},sD=()=>{let e=(0,B.c)(3),t=ZE(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`ai-auditContentDeclarationField`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.ai.auditContentDeclarationField(e)},e[1]=t,e[2]=r),xo(r)},cD=()=>{let e=(0,B.c)(3),t=ZE(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={queryKey:n,queryFn:()=>t.editor.getDictionaries()},e[1]=t,e[2]=r),bo(r)},lD=()=>{let e=(0,B.c)(3),t=ZE(),n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=[`editor`,`dictionaries`],e[0]=n):n=e[0];let r;return e[1]===t?r=e[2]:(r={mutationKey:n,mutationFn:e=>t.editor.writeDictionary(e)},e[1]=t,e[2]=r),xo(r)},uD=``,dD=e=>{let t=e.querySelectorAll(`[data-line]`);return t.length===0?(e.textContent??``).split(uD).join(``):Array.from(t).map(e=>{let t=e.querySelector(`[data-editable]`)?.textContent??e.textContent??``;return t===uD?``:t.split(uD).join(``)}).join(`
|
|
46
46
|
`)},fD=e=>{let t=e.split(`
|
|
@@ -96,7 +96,7 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
96
96
|
`},Mj=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Nj=function(){O.useEffect(function(){return document.body.setAttribute(Aj,(Mj()+1).toString()),function(){var e=Mj()-1;e<=0?document.body.removeAttribute(Aj):document.body.setAttribute(Aj,e.toString())}},[])},Pj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Nj();var a=O.useMemo(function(){return Oj(i)},[i]);return O.createElement(kj,{styles:jj(a,!t,i,n?``:`!important`)})},Fj=!1;if(typeof window<`u`)try{var Ij=Object.defineProperty({},`passive`,{get:function(){return Fj=!0,!0}});window.addEventListener(`test`,Ij,Ij),window.removeEventListener(`test`,Ij,Ij)}catch{Fj=!1}var Lj=Fj?{passive:!1}:!1,Rj=function(e){return e.tagName===`TEXTAREA`},zj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Rj(e)&&n[t]===`visible`)},Bj=function(e){return zj(e,`overflowY`)},Vj=function(e){return zj(e,`overflowX`)},Hj=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Gj(e,r)){var i=Kj(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Uj=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Wj=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Gj=function(e,t){return e===`v`?Bj(t):Vj(t)},Kj=function(e,t){return e===`v`?Uj(t):Wj(t)},qj=function(e,t){return e===`h`&&t===`rtl`?-1:1},Jj=function(e,t,n,r,i){var a=qj(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=Kj(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Gj(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},Yj=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Xj=function(e){return[e.deltaX,e.deltaY]},Zj=function(e){return e&&`current`in e?e.current:e},Qj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$j=function(e){return`
|
|
97
97
|
.block-interactivity-${e} {pointer-events: none;}
|
|
98
98
|
.allow-interactivity-${e} {pointer-events: all;}
|
|
99
|
-
`},eM=0,tM=[];function nM(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),i=O.useState(eM++)[0],a=O.useState(wj)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=$A([e.lockRef.current],(e.shards||[]).map(Zj),!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=O.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Yj(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=Hj(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Hj(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 Jj(h,t,e,h===`h`?s:c,!0)},[]),c=O.useCallback(function(e){var n=e;if(!(!tM.length||tM[tM.length-1]!==a)){var r=`deltaY`in n?Xj(n):Yj(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Qj(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Zj).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=O.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:rM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=O.useCallback(function(e){n.current=Yj(e),r.current=void 0},[]),d=O.useCallback(function(t){l(t.type,Xj(t),t.target,s(t,e.lockRef.current))},[]),f=O.useCallback(function(t){l(t.type,Yj(t),t.target,s(t,e.lockRef.current))},[]);O.useEffect(function(){return tM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Lj),document.addEventListener(`touchmove`,c,Lj),document.addEventListener(`touchstart`,u,Lj),function(){tM=tM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Lj),document.removeEventListener(`touchmove`,c,Lj),document.removeEventListener(`touchstart`,u,Lj)}},[]);var p=e.removeScrollBar,m=e.inert;return O.createElement(O.Fragment,null,m?O.createElement(a,{styles:$j(i)}):null,p?O.createElement(Pj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var iM=pj(mj,nM),aM=O.forwardRef(function(e,t){return O.createElement(gj,ZA({},e,{ref:t,sideCar:iM}))});aM.classNames=gj.classNames;var oM=[` `,`Enter`,`ArrowUp`,`ArrowDown`],sM=[` `,`Enter`],cM=`Select`,[lM,uM,dM]=Cc(cM),[fM,pM]=hc(cM,[dM,xA]),mM=xA(),[hM,gM]=fM(cM),[_M,vM]=fM(cM),yM=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=mM(t),[g,_]=O.useState(null),[v,y]=O.useState(null),[b,x]=O.useState(!1),S=PD(l),[C,w]=$c({prop:r,defaultProp:i??!1,onChange:a,caller:cM}),[T,E]=$c({prop:o,defaultProp:s,onChange:c,caller:cM}),D=O.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=O.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,k.jsx)(LA,{...h,children:(0,k.jsxs)(hM,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:nO(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[(0,k.jsx)(lM.Provider,{scope:t,children:(0,k.jsx)(_M,{scope:e.__scopeSelect,onNativeOptionAdd:O.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:O.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,k.jsxs)(mN,{"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,k.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};yM.displayName=cM;var bM=`SelectTrigger`,xM=O.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=mM(n),o=gM(bM,n),s=o.disabled||r,c=pc(t,o.onTriggerChange),l=uM(n),u=O.useRef(`touch`),[d,f,p]=gN(e=>{let t=l().filter(e=>!e.disabled),n=_N(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,k.jsx)(RA,{asChild:!0,...a,children:(0,k.jsx)(Tc.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":hN(o.value)?``:void 0,...i,ref:c,onClick:uc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:uc(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:uc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&oM.includes(e.key)&&(m(),e.preventDefault())})})})});xM.displayName=bM;var SM=`SelectValue`,CM=O.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=gM(SM,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=pc(t,c.onValueNodeChange);return Wc(()=>{l(u)},[l,u]),(0,k.jsx)(Tc.span,{...s,ref:d,style:{pointerEvents:`none`},children:hN(c.value)?(0,k.jsx)(k.Fragment,{children:o}):a})});CM.displayName=SM;var wM=`SelectIcon`,TM=O.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,k.jsx)(Tc.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});TM.displayName=wM;var EM=`SelectPortal`,DM=e=>(0,k.jsx)(Kc,{asChild:!0,...e});DM.displayName=EM;var OM=`SelectContent`,kM=O.forwardRef((e,t)=>{let n=gM(OM,e.__scopeSelect),[r,i]=O.useState();if(Wc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?wc.createPortal((0,k.jsx)(jM,{scope:e.__scopeSelect,children:(0,k.jsx)(lM.Slot,{scope:e.__scopeSelect,children:(0,k.jsx)(`div`,{children:e.children})})}),t):null}return(0,k.jsx)(FM,{...e,ref:t})});kM.displayName=OM;var AM=10,[jM,MM]=fM(OM),NM=`SelectContentImpl`,PM=_c(`SelectContent.RemoveScroll`),FM=O.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=gM(OM,n),[y,b]=O.useState(null),[x,S]=O.useState(null),C=pc(t,e=>b(e)),[w,T]=O.useState(null),[E,D]=O.useState(null),A=uM(n),[j,M]=O.useState(!1),N=O.useRef(!1);O.useEffect(()=>{if(y)return XA(y)},[y]),ID();let P=O.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=O.useCallback(()=>P([w,y]),[P,w,y]);O.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=v;O.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]),O.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]=gN(e=>{let t=A().filter(e=>!e.disabled),n=_N(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=O.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]),re=O.useCallback(()=>y?.focus(),[y]),R=O.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),z=r===`popper`?zM:LM,ie=z===zM?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,k.jsx)(jM,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:re,itemTextRefCallback:R,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:j,searchRef:ee,children:(0,k.jsx)(aM,{as:PM,allowPinchZoom:!0,children:(0,k.jsx)(HD,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:uc(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,k.jsx)(Fc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,k.jsx)(z,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ie,onPlaced:()=>M(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:uc(_.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()}})})})})})})});FM.displayName=NM;var IM=`SelectItemAlignedPosition`,LM=O.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=gM(OM,n),o=MM(OM,n),[s,c]=O.useState(null),[l,u]=O.useState(null),d=pc(t,e=>u(e)),f=uM(n),p=O.useRef(!1),m=O.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=O.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-AM,d=MD(a,[AM,Math.max(AM,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-AM,d=MD(a,[AM,Math.max(AM,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-AM*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-AM,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=`${AM}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]);Wc(()=>y(),[y]);let[b,x]=O.useState();return Wc(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,k.jsx)(BM,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:O.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,k.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,k.jsx)(Tc.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});LM.displayName=IM;var RM=`SelectPopperPosition`,zM=O.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=AM,...a}=e,o=mM(n);return(0,k.jsx)(zA,{...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)`}})});zM.displayName=RM;var[BM,VM]=fM(OM,{}),HM=`SelectViewport`,UM=O.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=MM(HM,n),o=VM(HM,n),s=pc(t,a.onViewportChange),c=O.useRef(0);return(0,k.jsxs)(k.Fragment,{children:[(0,k.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,k.jsx)(lM.Slot,{scope:n,children:(0,k.jsx)(Tc.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:uc(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-AM*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})})})]})});UM.displayName=HM;var WM=`SelectGroup`,[GM,KM]=fM(WM),qM=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=nO();return(0,k.jsx)(GM,{scope:n,id:i,children:(0,k.jsx)(Tc.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});qM.displayName=WM;var JM=`SelectLabel`,YM=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=KM(JM,n);return(0,k.jsx)(Tc.div,{id:i.id,...r,ref:t})});YM.displayName=JM;var XM=`SelectItem`,[ZM,QM]=fM(XM),$M=O.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=gM(XM,n),c=MM(XM,n),l=s.value===r,[u,d]=O.useState(a??``),[f,p]=O.useState(!1),m=pc(t,e=>c.itemRefCallback?.(e,r,i)),h=nO(),g=O.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,k.jsx)(ZM,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:O.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,k.jsx)(lM.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,k.jsx)(Tc.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:uc(o.onFocus,()=>p(!0)),onBlur:uc(o.onBlur,()=>p(!1)),onClick:uc(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:uc(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:uc(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:uc(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:uc(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:uc(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(sM.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});$M.displayName=XM;var eN=`SelectItemText`,tN=O.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=gM(eN,n),s=MM(eN,n),c=QM(eN,n),l=vM(eN,n),[u,d]=O.useState(null),f=pc(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=O.useMemo(()=>(0,k.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Wc(()=>(h(m),()=>g(m)),[h,g,m]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Tc.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?wc.createPortal(a.children,o.valueNode):null]})});tN.displayName=eN;var nN=`SelectItemIndicator`,rN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return QM(nN,n).isSelected?(0,k.jsx)(Tc.span,{"aria-hidden":!0,...r,ref:t}):null});rN.displayName=nN;var iN=`SelectScrollUpButton`,aN=O.forwardRef((e,t)=>{let n=MM(iN,e.__scopeSelect),r=VM(iN,e.__scopeSelect),[i,a]=O.useState(!1),o=pc(t,r.onScrollButtonChange);return Wc(()=>{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,k.jsx)(cN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});aN.displayName=iN;var oN=`SelectScrollDownButton`,sN=O.forwardRef((e,t)=>{let n=MM(oN,e.__scopeSelect),r=VM(oN,e.__scopeSelect),[i,a]=O.useState(!1),o=pc(t,r.onScrollButtonChange);return Wc(()=>{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,k.jsx)(cN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});sN.displayName=oN;var cN=O.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=MM(`SelectScrollButton`,n),o=O.useRef(null),s=uM(n),c=O.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return O.useEffect(()=>()=>c(),[c]),Wc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,k.jsx)(Tc.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:uc(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:uc(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:uc(i.onPointerLeave,()=>{c()})})}),lN=`SelectSeparator`,uN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,k.jsx)(Tc.div,{"aria-hidden":!0,...r,ref:t})});uN.displayName=lN;var dN=`SelectArrow`,fN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=mM(n),a=gM(dN,n),o=MM(dN,n);return a.open&&o.position===`popper`?(0,k.jsx)(BA,{...i,...r,ref:t}):null});fN.displayName=dN;var pN=`SelectBubbleInput`,mN=O.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=O.useRef(null),a=pc(r,i),o=VA(t);return O.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,k.jsx)(Tc.select,{...n,style:{...nl,...n.style},ref:a,defaultValue:t})});mN.displayName=pN;function hN(e){return e===``||e===void 0}function gN(e){let t=Dc(e),n=O.useRef(``),r=O.useRef(0),i=O.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=O.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return O.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function _N(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=vN(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 vN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yN=yM,bN=xM,xN=CM,SN=TM,CN=DM,wN=kM,TN=UM,EN=qM,DN=YM,ON=$M,kN=tN,AN=rN,jN=aN,MN=sN,NN=uN,PN=yN,FN=EN,IN=xN,LN=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,k.jsxs)(bN,{suppressHydrationWarning:!0,className:W(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-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,k.jsx)(SN,{asChild:!0,children:(0,k.jsx)(xu,{className:`size-4 opacity-50`})})]}),RN=({className:e,...t})=>(0,k.jsx)(jN,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,k.jsx)(bu,{})}),zN=({className:e,...t})=>(0,k.jsx)(MN,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,k.jsx)(_u,{})}),BN=({className:e,children:t,position:n=`popper`,...r})=>(0,k.jsx)(CN,{children:(0,k.jsxs)(wN,{className:W(`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,k.jsx)(RN,{}),(0,k.jsx)(TN,{className:W(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,k.jsx)(zN,{})]})}),VN=({className:e,...t})=>(0,k.jsx)(DN,{className:W(`px-1 py-0.5 font-semibold text-sm`,e),...t}),HN=({className:e,children:t,...n})=>(0,k.jsxs)(ON,{className:W(`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,k.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,k.jsx)(AN,{children:(0,k.jsx)(gu,{className:`size-4`})})}),(0,k.jsx)(kN,{children:t})]}),UN=({className:e,...t})=>(0,k.jsx)(NN,{className:W(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=PN;J.Group=FN,J.Value=IN,J.Trigger=LN,J.ScrollUpButton=RN,J.ScrollDownButton=zN,J.Content=BN,J.Label=VN,J.Item=HN,J.Separator=UN;var WN=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}},GN=e=>{let t=(0,B.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=WN(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,O.useState)(a??null),[l,u]=(0,O.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,O.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,k.jsxs)(`div`,{className:`flex gap-1`,children:[(0,k.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,k.jsx)(J.Trigger,{className:`w-20`,children:(0,k.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:`<`,children:`<`}),(0,k.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,k.jsx)(J.Item,{value:`=`,children:`=`}),(0,k.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,k.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,k.jsx)(MC,{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},KN=(0,O.lazy)(()=>Le(()=>import(`./MarkDownRender-CwYfws6H.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1]))),qN=(0,O.memo)(function(e){let t=(0,B.c)(2),{label:n,...r}=e,[i,a]=(0,O.useState)(!1),o;return t[0]===i?o=t[1]:(o=e=>{e&&!i&&a(!0)},t[0]=i,t[1]=o),(0,k.jsx)(rS,{header:n,label:n,onToggle:o,children:i?(0,k.jsx)(lP,{...r}):null})}),JN=e=>{let t=(0,B.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=xC(),s=yC(),{mutate:c,isPending:l}=sD(),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,k.jsx)(DD,{variant:`default`,onContentChange:u,additionalButtons:(0,k.jsx)(tS,{Icon:zu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},YN=e=>{let t=(0,B.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=xC(),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,k.jsx)(aw,{variant:`default`,onContentChange:o,...i})},XN=[{content:`False`,value:!1},{content:`True`,value:!0}],ZN=e=>{let t=(0,B.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=xC(),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,k.jsx)(gS,{choices:XN,value:!0,onChange:o,color:`text`,size:`sm`,...i})},QN=e=>{let t=(0,B.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=bt(),{selectedLocales:c,availableLocales:l}=rw(),u=n[M],d;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==n||t[7]!==u||t[8]!==c){let e=Object.keys(u),f=l.length>c.length?c:[...new Set([...l,...e])],p=n[M],m;t[10]!==p||t[11]!==s||t[12]!==i||t[13]!==r||t[14]!==o||t[15]!==a?(m=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:lt(e,o)})}),(0,k.jsx)(`tr`,{className:`flex`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(uP,{section:p[e]??GS(p[s]),keyPath:[...r,{type:M,key:e}],dictionary:i,renderSection:a})})})]},t)},t[10]=p,t[11]=s,t[12]=i,t[13]=r,t[14]=o,t[15]=a,t[16]=m):m=t[16],d=(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:f.map(m)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=n,t[7]=u,t[8]=c,t[9]=d}else d=t[9];return d},$N=e=>{let t=(0,B.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=xC(),{addNewEnumeration:s,removeEnumeration:c}=yt(ew),l=n[N],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,GS(l[d])??``,[...r,{type:N,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,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[N]).map(e=>{let t=[...r,{type:N,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(`div`,{className:`flex flex-1`,children:(0,k.jsx)(tS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Ru,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,k.jsx)(`tr`,{className:`w-full p-2`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(GN,{value:e,onChange:t=>{let a=n[N],s=AD(a,e,t),c={...n,[N]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(lP,{section:l[e]??GS(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,k.jsx)(tS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Pu,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},eP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[F];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.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,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(uP,{section:i[e]??GS(i.true),keyPath:[...t,{type:F,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},tP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[se];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.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,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(uP,{section:i[e]??GS(i.male),keyPath:[...t,{type:se,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},nP=e=>{let t=(0,B.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=xC(),{addNewElement:s,removeElement:c}=yt(ew),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,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,k.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,k.jsx)(tS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:te,key:t}];o(i.localId,void 0,e)},Icon:Ru,children:c.text})]})})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(uP,{section:e??GS(n[0]),keyPath:[...r,{type:te,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:te,key:n.length}];o(i.localId,GS(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,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,k.jsx)(tS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Pu,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},rP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:ee,key:e}],s=i[e]??GS(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(lP,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):(0,k.jsx)(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(qN,{label:ht(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},iP=e=>{let t=(0,B.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,O.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,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsx)(gS,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,k.jsx)(uP,{section:l,keyPath:c,dictionary:i,renderSection:a===1?dP:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},aP=e=>{let t=(0,B.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,O.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[R],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(Qx,{}),children:(0,k.jsx)(KN,{isDarkMode:a,children:e})}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsx)(gS,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,k.jsx)(uP,{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},oP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:I}],i=e[I];return(0,k.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,k.jsx)(uP,{section:i,keyPath:r,...n})})},sP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:L}],i=e[L],{content:a}=e;return(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,k.jsx)(uP,{section:a,keyPath:r,...n})]})},cP=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=xC(),s=i[ne],c=[...t,{type:ne}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,k.jsx)(jD,{children:`Dictionary key`}),(0,k.jsx)(aw,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,k.jsx)(jD,{children:`Path (optional)`}),(0,k.jsx)(aw,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},lP=(0,O.memo)(function(e){let t=(0,B.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=yt(ew),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=YS(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,k.jsx)(`span`,{children:`(React Node)`}),(0,k.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,k.jsx)(cP,{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,k.jsx)(QN,{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,k.jsx)($N,{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,k.jsx)(eP,{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,k.jsx)(tP,{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===`insertion`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,k.jsx)(oP,{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===`markdown`){let e;t[40]!==i||t[41]!==o||t[42]!==r||t[43]!==n?(e=(0,k.jsx)(aP,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[40]=i,t[41]=o,t[42]=r,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`html`){let e;t[45]!==i||t[46]!==r||t[47]!==n?(e=(0,k.jsx)(iP,{dictionary:i,keyPath:r,section:n}),t[45]=i,t[46]=r,t[47]=n,t[48]=e):e=t[48],l=e;break bb0}if(e===`file`){let e;t[49]!==i||t[50]!==r||t[51]!==a||t[52]!==n?(e=(0,k.jsx)(sP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[49]=i,t[50]=r,t[51]=a,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`array`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,k.jsx)(nP,{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===`object`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,k.jsx)(rP,{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===`number`){let e;t[64]!==i||t[65]!==r||t[66]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:(0,k.jsx)(YN,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[64]=i,t[65]=r,t[66]=n,t[67]=e):e=t[67],l=e;break bb0}if(e===`text`){let e;t[68]!==i||t[69]!==r||t[70]!==a||t[71]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,k.jsx)(JN,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[68]=i,t[69]=r,t[70]=a,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`boolean`){let e;t[73]!==i||t[74]!==r||t[75]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:(0,k.jsx)(ZN,{dictionary:i,keyPath:r,value:n})}),t[73]=i,t[74]=r,t[75]=n,t[76]=e):e=t[76],l=e;break bb0}c=(0,k.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}),uP=(0,O.memo)(function(e){return(0,k.jsx)(Xx,{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,k.jsx)(lP,{...e})})});function dP(e){return(0,k.jsx)(SafeHtmlRenderer,{rawContent:e})}var fP={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`]},pP=ru(`gap-3 transition-all duration-300 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,{variants:{variant:{default:`h-auto justify-start border-inherit bg-current/0 px-1 font-medium decoration-[1.5] underline-offset-5 hover:bg-current/0 hover:text-current/80 hover:underline hover:underline-offset-6`,"invisible-link":`h-auto justify-start border-inherit bg-current/0 px-1 underline-offset-5 hover:bg-current/0 aria-[current]:bg-current/5`,button:`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full bg-current text-center font-medium text-text ring-0 *:text-text-opposite hover:bg-current/90 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,"button-outlined":`relative flex cursor-pointer flex-row items-center justify-center gap-2 rounded-full border-[1.3px] border-current text-center font-medium text-text ring-0 *:text-text hover:bg-current/20 hover:ring-5 aria-selected:ring-5 aria-[current]:ring-5`,hoverable:`block rounded-lg border-none bg-current/0 hover:bg-current/10 aria-[current]:bg-current/5`},roundedSize:{none:`rounded-none`,sm:`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,md:`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,lg:`rounded-2xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-3xl`,xl:`rounded-3xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-4xl`,"2xl":`rounded-4xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[2.5rem]`,"3xl":`rounded-[2.5rem] [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-[3rem]`,full:`rounded-full`},color:{primary:`text-primary`,secondary:`text-secondary`,destructive:`text-destructive`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 max-md:py-4`},{variant:[`button`,`button-outlined`],color:`primary`,class:`ring-primary/20`},{variant:[`button`,`button-outlined`],color:`secondary`,class:`ring-secondary/20`},{variant:[`button`,`button-outlined`],color:`destructive`,class:`ring-destructive/20`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`light`,class:`ring-white/20`},{variant:[`button`,`button-outlined`],color:`dark`,class:`ring-neutral-800/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`md`}}),mP=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},hP=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(hP):(0,O.isValidElement)(e)?hP(e.props.children):!1,gP=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??mP(e),g=f??p?.startsWith(`#`)??!1,_=hP(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`;return(0,k.jsxs)(`a`,{href:l&&p&&!h&&!g?tt(p,l):p,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(pP({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,k.jsx)(`span`,{children:i}):i,h&&_&&(0,k.jsx)(Tu,{className:`ml-2 inline-block size-4`}),g&&(0,k.jsx)(Au,{className:`ml-2 inline-block size-4`})]})},_P=e=>e&&{primary:`text-primary`,secondary:`text-secondary`,destructive:`text-destructive`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``}[e]||``,vP=ru(`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`}}),yP=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Ae(fP).linkLabel;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(gP,{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,k.jsx)(`span`,{itemProp:`name`,children:n})}),(0,k.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},bP=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=yt(fP);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(tS,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,k.jsx)(`span`,{itemProp:`name`,children:t})}),(0,k.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},xP=({children:e,position:t,className:n,...r})=>(0,k.jsxs)(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,k.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,k.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),SP=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,k.jsx)(yu,{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,k.jsx)(`nav`,{"aria-label":o,children:(0,k.jsx)(`ol`,{className:W(vP({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=_P(n);if(p)return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,k.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,k.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,k.jsx)(`span`,{className:W(h),children:a})})]},`truncated-${m}`);let g=(0,k.jsx)(xP,{position:t+1,"aria-current":d,className:W(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?g=(0,k.jsx)(yP,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m):l&&(g=(0,k.jsx)(bP,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m));let _=(0,O.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},g);return o?_:(0,k.jsxs)(O.Fragment,{children:[_,(0,k.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,k.jsx)(`span`,{className:W(h),children:a})})]},m)})})})},CP=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,k.jsx)(SP,{links:[...a?[{text:ht(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:t.key?.toString()??``}))],locale:r,elementType:`location`,color:i}),wP={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`]},TP=({children:e,className:t,identifier:n,...r})=>(0,k.jsx)(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});TP.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,k.jsx)(tS,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),TP.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,k.jsx)(`div`,{className:W(`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,k.jsx)(nS,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`,c),...l,children:e})});function EP(e){return Array.isArray?Array.isArray(e):IP(e)===`[object Array]`}function DP(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 OP(e){return e==null?``:DP(e)}function kP(e){return typeof e==`string`}function AP(e){return typeof e==`number`}function jP(e){return e===!0||e===!1||NP(e)&&IP(e)==`[object Boolean]`}function MP(e){return typeof e==`object`}function NP(e){return MP(e)&&e!==null}function PP(e){return e!=null}function FP(e){return!e.trim().length}function IP(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var LP=`Incorrect 'index' type`,RP=e=>`Invalid value for key ${e}`,zP=e=>`Pattern length exceeds max of ${e}.`,BP=e=>`Missing ${e} property in key`,VP=e=>`Property 'weight' in key '${e}' must be a positive integer`,HP=Object.prototype.hasOwnProperty,UP=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=WP(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 WP(e){let t=null,n=null,r=null,i=1,a=null;if(kP(e)||EP(e))r=e,t=GP(e),n=KP(e);else{if(!HP.call(e,`name`))throw Error(BP(`name`));let o=e.name;if(r=o,HP.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(VP(o));t=GP(o),n=KP(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function GP(e){return EP(e)?e:e.split(`.`)}function KP(e){return EP(e)?e.join(`.`):e}function qP(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(PP(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!PP(s))return;if(a===t.length-1&&(kP(s)||AP(s)||jP(s)||typeof s==`bigint`))n.push(o===void 0?OP(s):{v:OP(s),i:o});else if(EP(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,kP(t)?t.split(`.`):t,0),r?n:n[0]}var JP={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},YP={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},XP={location:0,threshold:.6,distance:100},ZP={useExtendedSearch:!1,useTokenSearch:!1,getFn:qP,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...YP,...JP,...XP,...ZP}),QP=/[^ ]+/g;function $P(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(QP).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var eF=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=$P(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(){this.isCreated||!this.docs.length||(this.isCreated=!0,kP(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();kP(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!PP(e)||FP(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(PP(i)){if(EP(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(PP(n)){if(kP(n)){if(!FP(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(PP(n.v)){let t=kP(n.v)?n.v:OP(n.v);if(!FP(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(kP(i)&&!FP(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function tF(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new eF({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(WP)),i.setSources(t),i.create(),i}function nF(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new eF({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function rF(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 iF=32;function aF(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>iF)throw Error(zP(iF));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=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=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(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=rF(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function oF(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 sF(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 cF={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},lF=RegExp(`[`+Object.keys(cF).join(``)+`]`,`g`),uF=String.prototype.normalize?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(lF,e=>cF[e]):e=>e,dF=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?uF(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:oF(e),startIndex:t})},d=this.pattern.length;if(d>iF){let e=0,t=d%iF,n=d-t;for(;e<n;)u(this.pattern.substr(e,iF),e),e+=iF;if(t){let e=d-iF;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?uF(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}=aF(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=sF(u)),p}},fF=class{constructor(e){this.pattern=e}static isMultiMatch(e){return pF(e,this.multiRegex)}static isSingleMatch(e){return pF(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function pF(e,t){let n=e.match(t);return n?n[1]:null}var mF=class extends fF{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},hF=class extends fF{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},gF=class extends fF{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},_F=class extends fF{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},vF=class extends fF{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},yF=class extends fF{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},bF=class extends fF{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}={}){super(e),this._bitapSearch=new dF(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},xF=class extends fF{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},SF=[mF,xF,gF,_F,yF,vF,hF,bF],CF=SF.length,wF=`\0`,TF=`|`;function EF(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 DF(e,t={}){return e.replace(/\\\|/g,wF).split(TF).map(e=>{let n=EF(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<CF;){let e=SF[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<CF;){let e=SF[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var OF=new Set([bF.type,xF.type]),kF=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?uF(e):e,this.pattern=e,this.query=DF(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?uF(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;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(OF.has(e)?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=sF(o)),e}}return{isMatch:!1,score:1}}},AF=[];function jF(...e){AF.push(...e)}function MF(e,t){for(let n=0,r=AF.length;n<r;n+=1){let r=AF[n];if(r.condition(e,t))return new r(e,t)}return new dF(e,t)}var NF={AND:`$and`,OR:`$or`},PF={PATH:`$path`,PATTERN:`$val`},FF=e=>!!(e[NF.AND]||e[NF.OR]),IF=e=>!!e[PF.PATH],LF=e=>!EP(e)&&MP(e)&&!FF(e),RF=e=>({[NF.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function zF(e,t,{auto:n=!0}={}){let r=e=>{if(kP(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=MF(e,t)),r}let i=Object.keys(e),a=IF(e);if(!a&&i.length>1&&!FF(e))return r(RF(e));if(LF(e)){let r=a?e[PF.PATH]:i[0],o=a?e[PF.PATTERN]:e[r];if(!kP(o))throw Error(RP(r));let s={keyId:KP(r),pattern:o};return n&&(s.searcher=MF(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];EP(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return FF(e)||(e=RF(e)),r(e)}function BF(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 VF(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=BF(e.matches,{ignoreFieldNorm:t})})}var HF=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 UF(e,t){let n=e.matches;t.matches=[],PP(n)&&n.forEach(e=>{if(!PP(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function WF(e,t){t.score=e.score}function GF(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(UF),r&&i.push(WF),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var KF=/\b\w+\b/g;function qF({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=uF(n)),n.match(KF)||[]}}}function JF(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function YF(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function XF(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var ZF=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new UP(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=MF(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 eF))throw Error(LP);if(this._myIndex=t||tF(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=qF({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=JF(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(PP(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=qF({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});YF(this._invertedIndex,e,this._myIndex.keys.length,t)}}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){if(this._invertedIndex)for(let e of n)XF(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&XF(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}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(kP(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return AP(n)&&n>-1&&(e=e.slice(0,n)),e}let c=AP(n)&&n>0&&kP(e),l;if(c){let t=new HF(n);kP(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=kP(e)?kP(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),VF(l,{ignoreFieldNorm:s}),a&&l.sort(o),AP(n)&&n>-1&&(l=l.slice(0,n));return GF(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!PP(e))return;let{isMatch:s,score:c,indices:l}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:l}]};t?(r.score=BF(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=zF(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===NF.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(PP(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),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!PP(e))return;let s=[],c=!1,l=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(l=!0)):c=!0}),!(l&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=BF(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!PP(t))return[];let r=[];if(EP(t))t.forEach(({v:t,i,n:a})=>{if(!PP(t))return;let{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c,hasInverse:l})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c,hasInverse:l})}return r}},QF=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=qF({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});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 dF(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)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=sF(t)),o}};ZF.version=`7.3.0`,ZF.createIndex=tF,ZF.parseIndex=nF,ZF.config=Y,ZF.match=function(e,t,n){return MF(e,{...Y,...n}).searchIn(t)},ZF.parseQuery=zF,jF(kF),jF(QF),ZF.use=function(...e){e.forEach(e=>jF(e))};var $F=`locale-switcher-content`,eI=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=yt(wP),s=(0,O.useRef)(null),{locale:c}=bt(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=rw(),f=(0,O.useMemo)(()=>l.map(e=>({locale:e,englishName:lt(e,`en`),currentLocaleName:lt(e,c),ownLocaleName:lt(e)})),[l,c]),[p,m]=(0,O.useState)(``),[h,g]=tw(`locale-content-selector-see-all-locales`,!1),_=(0,O.useMemo)(()=>new ZF(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),v=(0,O.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,k.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,k.jsxs)(TP,{identifier:$F,children:[(0,k.jsx)(TP.Trigger,{identifier:$F,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,k.jsx)(`div`,{className:`px-2 py-1`,children:(0,k.jsx)(Ou,{size:16})}),(0,k.jsx)(ju,{className:`self-center`,size:16})]})}),(0,k.jsx)(TP.Panel,{identifier:$F,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,k.jsxs)(Xx,{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,k.jsx)(`div`,{className:`m-auto p-2`,children:(0,k.jsx)(gS,{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,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`p-3`,children:(0,k.jsx)(MC,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,k.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,k.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,k.jsx)(tS,{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,k.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,k.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,k.jsx)(gu,{className:`size-full`})}),(0,k.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,k.jsx)(`span`,{dir:ct(e),lang:e,children:i}),(0,k.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,k.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},tI=e=>{let t=KS(e),n=YS(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?tI(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},nI=e=>{let t=(0,B.c)(3),{children:n,onToggle:r,...i}=e,[a,o]=(0,O.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,k.jsx)(rS,{...i,onToggle:s,children:a?n:null})},rI=e=>{let t=(0,B.c)(16),{section:n,keyPath:r,dictionary:i}=e,{locales:a}=S,o=US(n,r,mC()),{addEditedContent:s}=bC(),{setFocusedContentKeyPath:c,focusedContent:l}=gC(),{addNewElement:u,goToField:d}=yt(ew),f=YS(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&dt(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=tI(o);if(!o)return(0,k.jsx)(k.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,k.jsx)(tS,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:yu,children:ht(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,k.jsx)(k.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,k.jsx)(rI,{keyPath:[...r,{type:M,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,k.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`plural`||f===`condition`)return(0,k.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,k.jsx)(rI,{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:te,key:t}];return tI(e)?(0,k.jsxs)(tS,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:yu,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,k.jsx)(nI,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,k.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,k.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,k.jsx)(rI,{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,k.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,k.jsx)(tS,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:te,key:o.length}],t=o,n=GS(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Pu,children:u.text})]})}return typeof o.nodeType==`string`?(0,k.jsx)(rI,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,k.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:ee,key:e}];return tI(US(n,t))?(0,k.jsx)(tS,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:yu,children:ht(e)},e):(0,k.jsx)(nI,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:ht(e),children:(0,k.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,k.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,k.jsx)(rI,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,k.jsxs)(k.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},iI=e=>{let t=(0,B.c)(16),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=xC(),{focusedContent:c,setFocusedContentKeyPath:l}=gC(),[,u]=(0,O.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=mC(),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?(_=US(m,g,h),t[5]=h,t[6]=m,t[7]=g,t[8]=_):_=t[8];let v=_,y=(0,O.useDeferredValue)(p),b=(0,O.useDeferredValue)(v),x=b!==v,S;t[9]===m?S=t[10]:(S=tI(m),t[9]=m,t[10]=S);let C=S,w=tI(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,O.useEffect)(T,E),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,k.jsx)(CP,{dictionaryKey:a,keyPath:p??[],onClickKeyPath:f}),(0,k.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,k.jsx)(eI,{})})]}),(0,k.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,k.jsx)(Xx,{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,k.jsx)(rI,{keyPath:[],section:m,dictionary:n})}),(w||(y??[]).length>0)&&(0,k.jsx)(`div`,{className:x?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:(0,k.jsx)(uP,{keyPath:y??[],section:b,dictionary:n,isDarkMode:r})})]})]})},aI=ru(`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`,destructive:`border-destructive bg-destructive text-destructive hover:bg-destructive-500`,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`}}),oI=({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,k.jsxs)(p,{className:W(aI({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,k.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,k.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,k.jsx)(`title`,{children:`Remove badge`}),(0,k.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`})]})})]})},sI=`Dialog`,[cI,lI]=hc(sI),[uI,dI]=cI(sI),fI=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=O.useRef(null),c=O.useRef(null),[l,u]=$c({prop:r,defaultProp:i??!1,onChange:a,caller:sI});return(0,k.jsx)(uI,{scope:t,triggerRef:s,contentRef:c,contentId:nO(),titleId:nO(),descriptionId:nO(),open:l,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};fI.displayName=sI;var pI=`DialogTrigger`,mI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(pI,n),a=pc(t,i.triggerRef);return(0,k.jsx)(Tc.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":PI(i.open),...r,ref:a,onClick:uc(e.onClick,i.onOpenToggle)})});mI.displayName=pI;var hI=`DialogPortal`,[gI,_I]=cI(hI,{forceMount:void 0}),vI=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=dI(hI,t);return(0,k.jsx)(gI,{scope:t,forceMount:n,children:O.Children.map(r,e=>(0,k.jsx)(Jc,{present:n||a.open,children:(0,k.jsx)(Kc,{asChild:!0,container:i,children:e})}))})};vI.displayName=hI;var yI=`DialogOverlay`,bI=O.forwardRef((e,t)=>{let n=_I(yI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=dI(yI,e.__scopeDialog);return a.modal?(0,k.jsx)(Jc,{present:r||a.open,children:(0,k.jsx)(SI,{...i,ref:t})}):null});bI.displayName=yI;var xI=_c(`DialogOverlay.RemoveScroll`),SI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(yI,n);return(0,k.jsx)(aM,{as:xI,allowPinchZoom:!0,shards:[i.contentRef],children:(0,k.jsx)(Tc.div,{"data-state":PI(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),CI=`DialogContent`,wI=O.forwardRef((e,t)=>{let n=_I(CI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=dI(CI,e.__scopeDialog);return(0,k.jsx)(Jc,{present:r||a.open,children:a.modal?(0,k.jsx)(TI,{...i,ref:t}):(0,k.jsx)(EI,{...i,ref:t})})});wI.displayName=CI;var TI=O.forwardRef((e,t)=>{let n=dI(CI,e.__scopeDialog),r=O.useRef(null),i=pc(t,n.contentRef,r);return O.useEffect(()=>{let e=r.current;if(e)return XA(e)},[]),(0,k.jsx)(DI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:uc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:uc(e.onFocusOutside,e=>e.preventDefault())})}),EI=O.forwardRef((e,t)=>{let n=dI(CI,e.__scopeDialog),r=O.useRef(!1),i=O.useRef(!1);return(0,k.jsx)(DI,{...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()}})}),DI=O.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=dI(CI,n),c=O.useRef(null),l=pc(t,c);return ID(),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(HD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,k.jsx)(Fc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":PI(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(RI,{titleId:s.titleId}),(0,k.jsx)(BI,{contentRef:c,descriptionId:s.descriptionId})]})]})}),OI=`DialogTitle`,kI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(OI,n);return(0,k.jsx)(Tc.h2,{id:i.titleId,...r,ref:t})});kI.displayName=OI;var AI=`DialogDescription`,jI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(AI,n);return(0,k.jsx)(Tc.p,{id:i.descriptionId,...r,ref:t})});jI.displayName=AI;var MI=`DialogClose`,NI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(MI,n);return(0,k.jsx)(Tc.button,{type:`button`,...r,ref:t,onClick:uc(e.onClick,()=>i.onOpenChange(!1))})});NI.displayName=MI;function PI(e){return e?`open`:`closed`}var FI=`DialogTitleWarning`,[II,LI]=mc(FI,{contentName:CI,titleName:OI,docsSlug:`dialog`}),RI=({titleId:e})=>{let t=LI(FI),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
99
|
+
`},eM=0,tM=[];function nM(e){var t=O.useRef([]),n=O.useRef([0,0]),r=O.useRef(),i=O.useState(eM++)[0],a=O.useState(wj)[0],o=O.useRef(e);O.useEffect(function(){o.current=e},[e]),O.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=$A([e.lockRef.current],(e.shards||[]).map(Zj),!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=O.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Yj(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=Hj(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Hj(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 Jj(h,t,e,h===`h`?s:c,!0)},[]),c=O.useCallback(function(e){var n=e;if(!(!tM.length||tM[tM.length-1]!==a)){var r=`deltaY`in n?Xj(n):Yj(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Qj(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Zj).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=O.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:rM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=O.useCallback(function(e){n.current=Yj(e),r.current=void 0},[]),d=O.useCallback(function(t){l(t.type,Xj(t),t.target,s(t,e.lockRef.current))},[]),f=O.useCallback(function(t){l(t.type,Yj(t),t.target,s(t,e.lockRef.current))},[]);O.useEffect(function(){return tM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Lj),document.addEventListener(`touchmove`,c,Lj),document.addEventListener(`touchstart`,u,Lj),function(){tM=tM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Lj),document.removeEventListener(`touchmove`,c,Lj),document.removeEventListener(`touchstart`,u,Lj)}},[]);var p=e.removeScrollBar,m=e.inert;return O.createElement(O.Fragment,null,m?O.createElement(a,{styles:$j(i)}):null,p?O.createElement(Pj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var iM=pj(mj,nM),aM=O.forwardRef(function(e,t){return O.createElement(gj,ZA({},e,{ref:t,sideCar:iM}))});aM.classNames=gj.classNames;var oM=[` `,`Enter`,`ArrowUp`,`ArrowDown`],sM=[` `,`Enter`],cM=`Select`,[lM,uM,dM]=Cc(cM),[fM,pM]=hc(cM,[dM,xA]),mM=xA(),[hM,gM]=fM(cM),[_M,vM]=fM(cM),yM=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=mM(t),[g,_]=O.useState(null),[v,y]=O.useState(null),[b,x]=O.useState(!1),S=PD(l),[C,w]=$c({prop:r,defaultProp:i??!1,onChange:a,caller:cM}),[T,E]=$c({prop:o,defaultProp:s,onChange:c,caller:cM}),D=O.useRef(null),A=g?m||!!g.closest(`form`):!0,[j,M]=O.useState(new Set),N=Array.from(j).map(e=>e.props.value).join(`;`);return(0,k.jsx)(LA,{...h,children:(0,k.jsxs)(hM,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:b,onValueNodeHasChildrenChange:x,contentId:nO(),value:T,onValueChange:E,open:C,onOpenChange:w,dir:S,triggerPointerDownPosRef:D,disabled:f,children:[(0,k.jsx)(lM.Provider,{scope:t,children:(0,k.jsx)(_M,{scope:e.__scopeSelect,onNativeOptionAdd:O.useCallback(e=>{M(t=>new Set(t).add(e))},[]),onNativeOptionRemove:O.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),A?(0,k.jsxs)(mN,{"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,k.jsx)(`option`,{value:``}):null,Array.from(j)]},N):null]})})};yM.displayName=cM;var bM=`SelectTrigger`,xM=O.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=mM(n),o=gM(bM,n),s=o.disabled||r,c=pc(t,o.onTriggerChange),l=uM(n),u=O.useRef(`touch`),[d,f,p]=gN(e=>{let t=l().filter(e=>!e.disabled),n=_N(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,k.jsx)(RA,{asChild:!0,...a,children:(0,k.jsx)(Tc.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":hN(o.value)?``:void 0,...i,ref:c,onClick:uc(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:uc(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:uc(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&oM.includes(e.key)&&(m(),e.preventDefault())})})})});xM.displayName=bM;var SM=`SelectValue`,CM=O.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=gM(SM,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=pc(t,c.onValueNodeChange);return Wc(()=>{l(u)},[l,u]),(0,k.jsx)(Tc.span,{...s,ref:d,style:{pointerEvents:`none`},children:hN(c.value)?(0,k.jsx)(k.Fragment,{children:o}):a})});CM.displayName=SM;var wM=`SelectIcon`,TM=O.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,k.jsx)(Tc.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})});TM.displayName=wM;var EM=`SelectPortal`,DM=e=>(0,k.jsx)(Kc,{asChild:!0,...e});DM.displayName=EM;var OM=`SelectContent`,kM=O.forwardRef((e,t)=>{let n=gM(OM,e.__scopeSelect),[r,i]=O.useState();if(Wc(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?wc.createPortal((0,k.jsx)(jM,{scope:e.__scopeSelect,children:(0,k.jsx)(lM.Slot,{scope:e.__scopeSelect,children:(0,k.jsx)(`div`,{children:e.children})})}),t):null}return(0,k.jsx)(FM,{...e,ref:t})});kM.displayName=OM;var AM=10,[jM,MM]=fM(OM),NM=`SelectContentImpl`,PM=_c(`SelectContent.RemoveScroll`),FM=O.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=gM(OM,n),[y,b]=O.useState(null),[x,S]=O.useState(null),C=pc(t,e=>b(e)),[w,T]=O.useState(null),[E,D]=O.useState(null),A=uM(n),[j,M]=O.useState(!1),N=O.useRef(!1);O.useEffect(()=>{if(y)return XA(y)},[y]),ID();let P=O.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=O.useCallback(()=>P([w,y]),[P,w,y]);O.useEffect(()=>{j&&F()},[j,F]);let{onOpenChange:I,triggerPointerDownPosRef:L}=v;O.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]),O.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]=gN(e=>{let t=A().filter(e=>!e.disabled),n=_N(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),ne=O.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]),re=O.useCallback(()=>y?.focus(),[y]),R=O.useCallback((e,t,n)=>{let r=!N.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),z=r===`popper`?zM:LM,ie=z===zM?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,k.jsx)(jM,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:ne,selectedItem:w,onItemLeave:re,itemTextRefCallback:R,focusSelectedItem:F,selectedItemText:E,position:r,isPositioned:j,searchRef:ee,children:(0,k.jsx)(aM,{as:PM,allowPinchZoom:!0,children:(0,k.jsx)(HD,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:uc(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,k.jsx)(Fc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,k.jsx)(z,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ie,onPlaced:()=>M(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:uc(_.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()}})})})})})})});FM.displayName=NM;var IM=`SelectItemAlignedPosition`,LM=O.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=gM(OM,n),o=MM(OM,n),[s,c]=O.useState(null),[l,u]=O.useState(null),d=pc(t,e=>u(e)),f=uM(n),p=O.useRef(!1),m=O.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=O.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-AM,d=MD(a,[AM,Math.max(AM,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-AM,d=MD(a,[AM,Math.max(AM,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-AM*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-AM,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=`${AM}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]);Wc(()=>y(),[y]);let[b,x]=O.useState();return Wc(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]),(0,k.jsx)(BM,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:O.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]),children:(0,k.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,k.jsx)(Tc.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});LM.displayName=IM;var RM=`SelectPopperPosition`,zM=O.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=AM,...a}=e,o=mM(n);return(0,k.jsx)(zA,{...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)`}})});zM.displayName=RM;var[BM,VM]=fM(OM,{}),HM=`SelectViewport`,UM=O.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=MM(HM,n),o=VM(HM,n),s=pc(t,a.onViewportChange),c=O.useRef(0);return(0,k.jsxs)(k.Fragment,{children:[(0,k.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,k.jsx)(lM.Slot,{scope:n,children:(0,k.jsx)(Tc.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:uc(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-AM*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})})})]})});UM.displayName=HM;var WM=`SelectGroup`,[GM,KM]=fM(WM),qM=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=nO();return(0,k.jsx)(GM,{scope:n,id:i,children:(0,k.jsx)(Tc.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});qM.displayName=WM;var JM=`SelectLabel`,YM=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=KM(JM,n);return(0,k.jsx)(Tc.div,{id:i.id,...r,ref:t})});YM.displayName=JM;var XM=`SelectItem`,[ZM,QM]=fM(XM),$M=O.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=gM(XM,n),c=MM(XM,n),l=s.value===r,[u,d]=O.useState(a??``),[f,p]=O.useState(!1),m=pc(t,e=>c.itemRefCallback?.(e,r,i)),h=nO(),g=O.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,k.jsx)(ZM,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:O.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,k.jsx)(lM.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,k.jsx)(Tc.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:uc(o.onFocus,()=>p(!0)),onBlur:uc(o.onBlur,()=>p(!1)),onClick:uc(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:uc(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:uc(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:uc(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:uc(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:uc(o.onKeyDown,e=>{c.searchRef?.current!==``&&e.key===` `||(sM.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});$M.displayName=XM;var eN=`SelectItemText`,tN=O.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=gM(eN,n),s=MM(eN,n),c=QM(eN,n),l=vM(eN,n),[u,d]=O.useState(null),f=pc(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=O.useMemo(()=>(0,k.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Wc(()=>(h(m),()=>g(m)),[h,g,m]),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Tc.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?wc.createPortal(a.children,o.valueNode):null]})});tN.displayName=eN;var nN=`SelectItemIndicator`,rN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return QM(nN,n).isSelected?(0,k.jsx)(Tc.span,{"aria-hidden":!0,...r,ref:t}):null});rN.displayName=nN;var iN=`SelectScrollUpButton`,aN=O.forwardRef((e,t)=>{let n=MM(iN,e.__scopeSelect),r=VM(iN,e.__scopeSelect),[i,a]=O.useState(!1),o=pc(t,r.onScrollButtonChange);return Wc(()=>{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,k.jsx)(cN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});aN.displayName=iN;var oN=`SelectScrollDownButton`,sN=O.forwardRef((e,t)=>{let n=MM(oN,e.__scopeSelect),r=VM(oN,e.__scopeSelect),[i,a]=O.useState(!1),o=pc(t,r.onScrollButtonChange);return Wc(()=>{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,k.jsx)(cN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});sN.displayName=oN;var cN=O.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=MM(`SelectScrollButton`,n),o=O.useRef(null),s=uM(n),c=O.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return O.useEffect(()=>()=>c(),[c]),Wc(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,k.jsx)(Tc.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:uc(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:uc(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:uc(i.onPointerLeave,()=>{c()})})}),lN=`SelectSeparator`,uN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return(0,k.jsx)(Tc.div,{"aria-hidden":!0,...r,ref:t})});uN.displayName=lN;var dN=`SelectArrow`,fN=O.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=mM(n),a=gM(dN,n),o=MM(dN,n);return a.open&&o.position===`popper`?(0,k.jsx)(BA,{...i,...r,ref:t}):null});fN.displayName=dN;var pN=`SelectBubbleInput`,mN=O.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=O.useRef(null),a=pc(r,i),o=VA(t);return O.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,k.jsx)(Tc.select,{...n,style:{...nl,...n.style},ref:a,defaultValue:t})});mN.displayName=pN;function hN(e){return e===``||e===void 0}function gN(e){let t=Dc(e),n=O.useRef(``),r=O.useRef(0),i=O.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=O.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return O.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function _N(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=vN(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 vN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var yN=yM,bN=xM,xN=CM,SN=TM,CN=DM,wN=kM,TN=UM,EN=qM,DN=YM,ON=$M,kN=tN,AN=rN,jN=aN,MN=sN,NN=uN,PN=yN,FN=EN,IN=xN,LN=({validationStyleEnabled:e=!1,className:t,children:n,...r})=>(0,k.jsxs)(bN,{suppressHydrationWarning:!0,className:W(`flex w-full cursor-pointer items-center justify-between whitespace-nowrap`,`select-text text-base shadow-none outline-none md:text-sm`,`rounded-xl [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-2xl`,`px-2 py-3 md:py-2`,`bg-neutral-50 dark:bg-neutral-950`,`text-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,k.jsx)(SN,{asChild:!0,children:(0,k.jsx)(xu,{className:`size-4 opacity-50`})})]}),RN=({className:e,...t})=>(0,k.jsx)(jN,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,k.jsx)(bu,{})}),zN=({className:e,...t})=>(0,k.jsx)(MN,{className:W(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,k.jsx)(_u,{})}),BN=({className:e,children:t,position:n=`popper`,...r})=>(0,k.jsx)(CN,{children:(0,k.jsxs)(wN,{className:W(`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,k.jsx)(RN,{}),(0,k.jsx)(TN,{className:W(`p-1`,n===`popper`&&`h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)`),children:t}),(0,k.jsx)(zN,{})]})}),VN=({className:e,...t})=>(0,k.jsx)(DN,{className:W(`px-1 py-0.5 font-semibold text-sm`,e),...t}),HN=({className:e,children:t,...n})=>(0,k.jsxs)(ON,{className:W(`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,k.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,k.jsx)(AN,{children:(0,k.jsx)(gu,{className:`size-4`})})}),(0,k.jsx)(kN,{children:t})]}),UN=({className:e,...t})=>(0,k.jsx)(NN,{className:W(`-mx-1 my-1 h-px`,`bg-neutral-200 dark:bg-neutral-800`,e),...t}),J=PN;J.Group=FN,J.Value=IN,J.Trigger=LN,J.ScrollUpButton=RN,J.ScrollDownButton=zN,J.Content=BN,J.Label=VN,J.Item=HN,J.Separator=UN;var WN=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}},GN=e=>{let t=(0,B.c)(13),{value:n,onChange:r}=e,i;t[0]===n?i=t[1]:(i=WN(n),t[0]=n,t[1]=i);let{comparator:a,numberValue:o}=i,[s,c]=(0,O.useState)(a??null),[l,u]=(0,O.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,O.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,k.jsxs)(`div`,{className:`flex gap-1`,children:[(0,k.jsxs)(J,{onValueChange:c,defaultValue:a,children:[(0,k.jsx)(J.Trigger,{className:`w-20`,children:(0,k.jsx)(J.Value,{placeholder:`Select a comparator`})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:`<`,children:`<`}),(0,k.jsx)(J.Item,{value:`<=`,children:`<=`}),(0,k.jsx)(J.Item,{value:`=`,children:`=`}),(0,k.jsx)(J.Item,{value:`>=`,children:`>=`}),(0,k.jsx)(J.Item,{value:`>`,children:`>`})]})]}),(0,k.jsx)(MC,{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},KN=(0,O.lazy)(()=>Le(()=>import(`./MarkDownRender-1dAb42uT.js`).then(e=>({default:e.MarkdownRenderer})),__vite__mapDeps([0,1]))),qN=(0,O.memo)(function(e){let t=(0,B.c)(2),{label:n,...r}=e,[i,a]=(0,O.useState)(!1),o;return t[0]===i?o=t[1]:(o=e=>{e&&!i&&a(!0)},t[0]=i,t[1]=o),(0,k.jsx)(rS,{header:n,label:n,onToggle:o,children:i?(0,k.jsx)(lP,{...r}):null})}),JN=e=>{let t=(0,B.c)(14),{keyPath:n,dictionary:r,...i}=e,{editedContent:a,addEditedContent:o}=xC(),s=yC(),{mutate:c,isPending:l}=sD(),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,k.jsx)(DD,{variant:`default`,onContentChange:u,additionalButtons:(0,k.jsx)(tS,{Icon:zu,label:`Audit`,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`cursor-pointer hover:scale-110`,isLoading:l,onClick:d}),...i})},YN=e=>{let t=(0,B.c)(4),{keyPath:n,dictionary:r,...i}=e,{addEditedContent:a}=xC(),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,k.jsx)(aw,{variant:`default`,onContentChange:o,...i})},XN=[{content:`False`,value:!1},{content:`True`,value:!0}],ZN=e=>{let t=(0,B.c)(4),{dictionary:n,keyPath:r,...i}=e,{addEditedContent:a}=xC(),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,k.jsx)(gS,{choices:XN,value:!0,onChange:o,color:`text`,size:`sm`,...i})},QN=e=>{let t=(0,B.c)(17),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{locale:o,defaultLocale:s}=bt(),{selectedLocales:c,availableLocales:l}=rw(),u=n[M],d;if(t[0]!==l||t[1]!==s||t[2]!==i||t[3]!==r||t[4]!==o||t[5]!==a||t[6]!==n||t[7]!==u||t[8]!==c){let e=Object.keys(u),f=l.length>c.length?c:[...new Set([...l,...e])],p=n[M],m;t[10]!==p||t[11]!==s||t[12]!==i||t[13]!==r||t[14]!==o||t[15]!==a?(m=e=>{let t=`${JSON.stringify(r)}-translation-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:lt(e,o)})}),(0,k.jsx)(`tr`,{className:`flex`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(uP,{section:p[e]??GS(p[s]),keyPath:[...r,{type:M,key:e}],dictionary:i,renderSection:a})})})]},t)},t[10]=p,t[11]=s,t[12]=i,t[13]=r,t[14]=o,t[15]=a,t[16]=m):m=t[16],d=(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:f.map(m)})}),t[0]=l,t[1]=s,t[2]=i,t[3]=r,t[4]=o,t[5]=a,t[6]=n,t[7]=u,t[8]=c,t[9]=d}else d=t[9];return d},$N=e=>{let t=(0,B.c)(19),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=xC(),{addNewEnumeration:s,removeEnumeration:c}=yt(ew),l=n[N],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,GS(l[d])??``,[...r,{type:N,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,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:Object.keys(n[N]).map(e=>{let t=[...r,{type:N,key:e}],s=`${JSON.stringify(r)}-enumeration-${e}`;return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(`div`,{className:`flex flex-1`,children:(0,k.jsx)(tS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,Icon:Ru,onClick:()=>o(i.localId,void 0,t),children:c.text})})})}),(0,k.jsx)(`tr`,{className:`w-full p-2`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(GN,{value:e,onChange:t=>{let a=n[N],s=AD(a,e,t),c={...n,[N]:s};console.log(`newValue`,c),o(i.localId,c,r)}})})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(lP,{section:l[e]??GS(l[d]),keyPath:t,dictionary:i,renderSection:a})})})]},s)})})}),(0,k.jsx)(tS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:e,Icon:Pu,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},eP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[F];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.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,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(uP,{section:i[e]??GS(i.true),keyPath:[...t,{type:F,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},tP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e[se];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.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,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 block w-full p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(uP,{section:i[e]??GS(i.male),keyPath:[...t,{type:se,key:e}],dictionary:n,renderSection:r})})})]},a)})})})},nP=e=>{let t=(0,B.c)(22),{section:n,keyPath:r,dictionary:i,renderSection:a}=e,{addEditedContent:o}=xC(),{addNewElement:s,removeElement:c}=yt(ew),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,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 w-full p-2`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-2`,children:[(0,k.jsx)(`span`,{className:`text-xs`,children:String(t)}),(0,k.jsx)(tS,{label:c.label.value,variant:`hoverable`,size:`sm`,color:`error`,className:`ml-auto text-neutral hover:text-error`,onClick:()=>{let e=[...r,{type:te,key:t}];o(i.localId,void 0,e)},Icon:Ru,children:c.text})]})})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(uP,{section:e??GS(n[0]),keyPath:[...r,{type:te,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:te,key:n.length}];o(i.localId,GS(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,k.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex w-full flex-col gap-2`,children:n.map(e)})}),(0,k.jsx)(tS,{label:s.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,isFullWidth:!0,onClick:u,Icon:Pu,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},rP=({section:e,keyPath:t,dictionary:n,renderSection:r})=>{let i=e,a=Object.keys(i)[0];return(0,k.jsx)(`table`,{className:`w-full`,children:(0,k.jsx)(`tbody`,{className:`flex flex-col gap-2`,children:Object.keys(i).map(e=>{let o=[...t,{type:ee,key:e}],s=i[e]??GS(i[a]),c=`${JSON.stringify(t)}-object-${e}`;return typeof s!=`object`||!s?(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`tr`,{className:`mt-2 p-2 text-xs`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:String(e)})}),(0,k.jsx)(`tr`,{className:`block w-full`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(lP,{section:s,keyPath:o,dictionary:n,renderSection:r})})})]},c):(0,k.jsx)(`tr`,{className:`block w-full border-neutral/10 border-t py-1`,children:(0,k.jsx)(`td`,{className:`flex w-full`,children:(0,k.jsx)(qN,{label:ht(e),section:s,keyPath:o,dictionary:n,renderSection:r})})},c)})})})},iP=e=>{let t=(0,B.c)(5),{section:n,keyPath:r,dictionary:i}=e,[a,o]=(0,O.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,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsx)(gS,{choices:e,value:a,onChange:o,color:`text`,size:`sm`,className:`ml-auto`}),(0,k.jsx)(uP,{section:l,keyPath:c,dictionary:i,renderSection:a===1?dP:void 0})]}),t[0]=i,t[1]=r,t[2]=a,t[3]=n,t[4]=s}else s=t[4];return s},aP=e=>{let t=(0,B.c)(9),{section:n,keyPath:r,dictionary:i,isDarkMode:a}=e,[o,s]=(0,O.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[R],d;t[6]!==a||t[7]!==o?(d=o===1?e=>(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(Qx,{}),children:(0,k.jsx)(KN,{isDarkMode:a,children:e})}):void 0,t[6]=a,t[7]=o,t[8]=d):d=t[8],c=(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsx)(gS,{choices:e,value:o,onChange:s,color:`text`,size:`sm`,className:`ml-auto`}),(0,k.jsx)(uP,{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},oP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:I}],i=e[I];return(0,k.jsx)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:(0,k.jsx)(uP,{section:i,keyPath:r,...n})})},sP=({section:e,keyPath:t,...n})=>{let r=[...t,{type:L}],i=e[L],{content:a}=e;return(0,k.jsxs)(`div`,{className:`flex w-full flex-col justify-center gap-6 p-2`,children:[(0,k.jsxs)(`span`,{className:`text-neutral text-sm`,children:[i,` `]}),(0,k.jsx)(uP,{section:a,keyPath:r,...n})]})},cP=e=>{let{keyPath:t,dictionary:n,renderSection:r,section:i,...a}=e,{addEditedContent:o}=xC(),s=i[ne],c=[...t,{type:ne}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-4 p-2`,children:[(0,k.jsx)(jD,{children:`Dictionary key`}),(0,k.jsx)(aw,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,dictionaryKey:String(e)},c)},children:s.dictionaryKey??``}),(0,k.jsx)(jD,{children:`Path (optional)`}),(0,k.jsx)(aw,{"aria-label":`Edit field`,type:`text`,variant:`default`,...a,onContentChange:e=>{o(n.localId,{...s,path:e===``?void 0:e},c)},children:s.path??``})]})},lP=(0,O.memo)(function(e){let t=(0,B.c)(77),{section:n,keyPath:r,dictionary:i,renderSection:a,isDarkMode:o}=e,{tsxNotEditable:s}=yt(ew),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=YS(n);if(e===`reactNode`){let e;t[8]===s?e=t[9]:(e=(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[(0,k.jsx)(`span`,{children:`(React Node)`}),(0,k.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,k.jsx)(cP,{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,k.jsx)(QN,{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,k.jsx)($N,{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,k.jsx)(eP,{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,k.jsx)(tP,{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===`insertion`){let e;t[35]!==i||t[36]!==r||t[37]!==a||t[38]!==n?(e=(0,k.jsx)(oP,{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===`markdown`){let e;t[40]!==i||t[41]!==o||t[42]!==r||t[43]!==n?(e=(0,k.jsx)(aP,{dictionary:i,keyPath:r,section:n,isDarkMode:o}),t[40]=i,t[41]=o,t[42]=r,t[43]=n,t[44]=e):e=t[44],l=e;break bb0}if(e===`html`){let e;t[45]!==i||t[46]!==r||t[47]!==n?(e=(0,k.jsx)(iP,{dictionary:i,keyPath:r,section:n}),t[45]=i,t[46]=r,t[47]=n,t[48]=e):e=t[48],l=e;break bb0}if(e===`file`){let e;t[49]!==i||t[50]!==r||t[51]!==a||t[52]!==n?(e=(0,k.jsx)(sP,{dictionary:i,renderSection:a,keyPath:r,section:n}),t[49]=i,t[50]=r,t[51]=a,t[52]=n,t[53]=e):e=t[53],l=e;break bb0}if(e===`array`){let e;t[54]!==i||t[55]!==r||t[56]!==a||t[57]!==n?(e=(0,k.jsx)(nP,{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===`object`){let e;t[59]!==i||t[60]!==r||t[61]!==a||t[62]!==n?(e=(0,k.jsx)(rP,{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===`number`){let e;t[64]!==i||t[65]!==r||t[66]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:(0,k.jsx)(YN,{dictionary:i,keyPath:r,type:`number`,"aria-label":`Edit field`,children:n})}),t[64]=i,t[65]=r,t[66]=n,t[67]=e):e=t[67],l=e;break bb0}if(e===`text`){let e;t[68]!==i||t[69]!==r||t[70]!==a||t[71]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:typeof a==`function`?a(n):(0,k.jsx)(JN,{variant:`default`,"aria-label":`Edit field`,keyPath:r,dictionary:i,children:n})}),t[68]=i,t[69]=r,t[70]=a,t[71]=n,t[72]=e):e=t[72],l=e;break bb0}if(e===`boolean`){let e;t[73]!==i||t[74]!==r||t[75]!==n?(e=(0,k.jsx)(`div`,{className:`w-full p-2`,children:(0,k.jsx)(ZN,{dictionary:i,keyPath:r,value:n})}),t[73]=i,t[74]=r,t[75]=n,t[76]=e):e=t[76],l=e;break bb0}c=(0,k.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}),uP=(0,O.memo)(function(e){return(0,k.jsx)(Xx,{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,k.jsx)(lP,{...e})})});function dP(e){return(0,k.jsx)(SafeHtmlRenderer,{rawContent:e})}var fP={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`]},pP=ru(`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`,destructive:`text-destructive`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``},size:{sm:`text-sm`,md:`text-base`,lg:`text-lg`,xl:`text-xl`,custom:``},underlined:{default:``,true:`underline`,false:`no-underline`}},compoundVariants:[{variant:`button`,color:`text-inverse`,class:`*:text-text`},{variant:`button-outlined`,color:`text-inverse`,class:`text-text-opposite *:text-text-opposite`},{variant:[`button`,`button-outlined`],size:`sm`,class:`min-h-7 px-3 max-md:py-1`},{variant:[`button`,`button-outlined`],size:`md`,class:`min-h-8 px-6 max-md:py-2`},{variant:[`button`,`button-outlined`],size:`lg`,class:`min-h-10 px-8 max-md:py-3`},{variant:[`button`,`button-outlined`],size:`xl`,class:`min-h-11 px-10 max-md:py-4`},{variant:[`button`,`button-outlined`],color:`primary`,class:`ring-primary/20`},{variant:[`button`,`button-outlined`],color:`secondary`,class:`ring-secondary/20`},{variant:[`button`,`button-outlined`],color:`destructive`,class:`ring-destructive/20`},{variant:[`button`,`button-outlined`],color:`neutral`,class:`ring-neutral/20`},{variant:[`button`,`button-outlined`],color:`light`,class:`ring-white/20`},{variant:[`button`,`button-outlined`],color:`dark`,class:`ring-neutral-800/20`},{variant:[`button`,`button-outlined`],color:`text`,class:`ring-text/20`},{variant:[`button`,`button-outlined`],color:`text-inverse`,class:`ring-text-opposite/20`},{variant:[`button`,`button-outlined`],color:`error`,class:`ring-error/20`},{variant:[`button`,`button-outlined`],color:`success`,class:`ring-success/20`}],defaultVariants:{variant:`default`,roundedSize:`md`,underlined:`default`,size:`md`}}),mP=({href:e,isExternalLink:t})=>{let n=typeof e==`string`&&e.trim()!==``;return t===!0||t===void 0&&n&&/^https?:\/\//.test(e)},hP=e=>typeof e==`string`||typeof e==`number`?!0:Array.isArray(e)?e.every(hP):(0,O.isValidElement)(e)?hP(e.props.children):!1,gP=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??mP(e),g=f??p?.startsWith(`#`)??!1,_=hP(i),v=t===`button`||t===`button-outlined`,y=h?`noopener noreferrer nofollow`:void 0,b=h?`_blank`:`_self`,x=l&&p&&!h&&!g?tt(p,l):p;return(0,k.jsxs)(`a`,{href:x===``?void 0:x,"aria-label":a,rel:y,target:b,"aria-current":s?`page`:void 0,suppressHydrationWarning:!0,className:W(pP({variant:t,color:n,roundedSize:r,underlined:c,size:u,className:o})),...m,children:[v&&_?(0,k.jsx)(`span`,{children:i}):i,h&&_&&(0,k.jsx)(Tu,{className:`ml-2 inline-block size-4`}),g&&(0,k.jsx)(Au,{className:`ml-2 inline-block size-4`})]})},_P=e=>e&&{primary:`text-primary`,secondary:`text-secondary`,destructive:`text-destructive`,neutral:`text-neutral`,light:`text-white`,dark:`text-neutral-800`,text:`text-text`,"text-inverse":`text-text-opposite`,error:`text-error`,success:`text-success`,custom:``}[e]||``,vP=ru(`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`}}),yP=({href:e,lang:t,children:n,onClick:r,color:i,position:a,locale:o,className:s,...c})=>{let l=Ae(fP).linkLabel;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(gP,{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,k.jsx)(`span`,{itemProp:`name`,children:n})}),(0,k.jsx)(`meta`,{itemProp:`position`,content:a.toString()})]})},bP=e=>{let{children:t,onClick:n,color:r,position:i,className:a,...o}=e,{linkLabel:s}=yt(fP);return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(tS,{onClick:n,variant:`link`,label:`${s} ${t}`,color:r,itemProp:`item`,...o,children:(0,k.jsx)(`span`,{itemProp:`name`,children:t})}),(0,k.jsx)(`meta`,{itemProp:`position`,content:i.toString()})]})},xP=({children:e,position:t,className:n,...r})=>(0,k.jsxs)(`span`,{itemProp:`item`,className:W(`inline-flex items-center`,`font-medium text-neutral-700`,`transition-colors duration-200`,n),children:[(0,k.jsx)(`span`,{itemProp:`name`,...r,children:e}),(0,k.jsx)(`meta`,{itemProp:`position`,content:t.toString()})]}),SP=({links:e,className:t,color:n=`text`,locale:r,elementType:i=`page`,separator:a=(0,k.jsx)(yu,{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,k.jsx)(`nav`,{"aria-label":o,children:(0,k.jsx)(`ol`,{className:W(vP({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=_P(n);if(p)return(0,k.jsxs)(O.Fragment,{children:[(0,k.jsx)(`li`,{className:`flex items-center`,"aria-hidden":`true`,children:(0,k.jsx)(`span`,{className:`text-neutral-500`,children:`…`})}),!o&&(0,k.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,k.jsx)(`span`,{className:W(h),children:a})})]},`truncated-${m}`);let g=(0,k.jsx)(xP,{position:t+1,"aria-current":d,className:W(`transition-colors duration-200`,u&&`text-neutral-900`),children:m},m);c?g=(0,k.jsx)(yP,{href:e.href,color:n,position:t+1,locale:r,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m):l&&(g=(0,k.jsx)(bP,{onClick:e.onClick,color:n,position:t+1,"aria-current":d,className:W(u&&`cursor-default text-neutral-900`),children:m},m));let _=(0,O.createElement)(`li`,{...s&&{itemProp:`itemListElement`,itemScope:!0,itemType:`https://schema.org/ListItem`},key:m,className:`flex items-center`},g);return o?_:(0,k.jsxs)(O.Fragment,{children:[_,(0,k.jsx)(`li`,{"aria-hidden":`true`,className:`flex items-center`,children:(0,k.jsx)(`span`,{className:W(h),children:a})})]},m)})})})},CP=({keyPath:e,dictionaryKey:t,onClickKeyPath:n,locale:r,color:i,showDictionaryKey:a=!0})=>(0,k.jsx)(SP,{links:[...a?[{text:ht(t),onClick:n?()=>n([]):void 0}]:[],...e.map((t,r)=>({onClick:n?()=>n?.(e.slice(0,r+1)):void 0,text:t.key?.toString()??``}))],locale:r,elementType:`location`,color:i}),wP={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`]},TP=({children:e,className:t,identifier:n,...r})=>(0,k.jsx)(`div`,{className:W(`group/dropdown relative flex`,t),"aria-label":`DropDown ${n}`,id:`dropdown-container-${n}`,...r,children:e});TP.Trigger=({children:e,identifier:t,className:n,label:r,...i})=>(0,k.jsx)(tS,{className:W([`w-full cursor-pointer`,`group-focus-within/dropdown:bg-current/20 group-focus-within/dropdown:ring-4`,n]),label:r??`Open panel ${t}`,"aria-haspopup":`true`,"aria-controls":`dropdown-panel-${t}`,id:`dropdown-trigger-${t}`,onClick:e=>{e.currentTarget.focus()},variant:`none`,...i,children:e}),TP.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,k.jsx)(`div`,{className:W(`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,k.jsx)(nS,{isHidden:t,className:W(`overflow-x-visible`,t===!1&&`invisible`,t===!0&&`visible`,n&&`group-hover/dropdown:visible group-hover/dropdown:grid-rows-[1fr]`,r&&`group-focus-within/dropdown:visible group-focus-within/dropdown:grid-rows-[1fr]`,c),...l,children:e})});function EP(e){return Array.isArray?Array.isArray(e):IP(e)===`[object Array]`}function DP(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 OP(e){return e==null?``:DP(e)}function kP(e){return typeof e==`string`}function AP(e){return typeof e==`number`}function jP(e){return e===!0||e===!1||NP(e)&&IP(e)==`[object Boolean]`}function MP(e){return typeof e==`object`}function NP(e){return MP(e)&&e!==null}function PP(e){return e!=null}function FP(e){return!e.trim().length}function IP(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var LP=`Incorrect 'index' type`,RP=e=>`Invalid value for key ${e}`,zP=e=>`Pattern length exceeds max of ${e}.`,BP=e=>`Missing ${e} property in key`,VP=e=>`Property 'weight' in key '${e}' must be a positive integer`,HP=Object.prototype.hasOwnProperty,UP=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=WP(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 WP(e){let t=null,n=null,r=null,i=1,a=null;if(kP(e)||EP(e))r=e,t=GP(e),n=KP(e);else{if(!HP.call(e,`name`))throw Error(BP(`name`));let o=e.name;if(r=o,HP.call(e,`weight`)&&(i=e.weight,i<=0))throw Error(VP(o));t=GP(o),n=KP(o),a=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:a}}function GP(e){return EP(e)?e:e.split(`.`)}function KP(e){return EP(e)?e.join(`.`):e}function qP(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(PP(e))if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!PP(s))return;if(a===t.length-1&&(kP(s)||AP(s)||jP(s)||typeof s==`bigint`))n.push(o===void 0?OP(s):{v:OP(s),i:o});else if(EP(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,kP(t)?t.split(`.`):t,0),r?n:n[0]}var JP={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},YP={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},XP={location:0,threshold:.6,distance:100},ZP={useExtendedSearch:!1,useTokenSearch:!1,getFn:qP,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Y=Object.freeze({...YP,...JP,...XP,...ZP}),QP=/[^ ]+/g;function $P(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=t.match(QP).length;if(n.has(i))return n.get(i);let a=1/i**(.5*e),o=parseFloat(Math.round(a*r)/r);return n.set(i,o),o},clear(){n.clear()}}}var eF=class{constructor({getFn:e=Y.getFn,fieldNormWeight:t=Y.fieldNormWeight}={}){this.norm=$P(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(){this.isCreated||!this.docs.length||(this.isCreated=!0,kP(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){let t=this.size();kP(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)--this.records[t].i}removeAll(e){for(let t=e.length-1;t>=0;--t)this.records.splice(e[t],1);for(let e=0,t=this.records.length;e<t;e+=1)this.records[e].i=e}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!PP(e)||FP(e))return;let n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){let n={i:t,$:{}};this.keys.forEach((t,r)=>{let i=t.getFn?t.getFn(e):this.getFn(e,t.path);if(PP(i)){if(EP(i)){let e=[];for(let t=0,n=i.length;t<n;t+=1){let n=i[t];if(PP(n)){if(kP(n)){if(!FP(n)){let r={v:n,i:t,n:this.norm.get(n)};e.push(r)}}else if(PP(n.v)){let t=kP(n.v)?n.v:OP(n.v);if(!FP(t)){let r={v:t,i:n.i,n:this.norm.get(t)};e.push(r)}}}}n.$[r]=e}else if(kP(i)&&!FP(i)){let e={v:i,n:this.norm.get(i)};n.$[r]=e}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function tF(e,t,{getFn:n=Y.getFn,fieldNormWeight:r=Y.fieldNormWeight}={}){let i=new eF({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(WP)),i.setSources(t),i.create(),i}function nF(e,{getFn:t=Y.getFn,fieldNormWeight:n=Y.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new eF({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function rF(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 iF=32;function aF(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>iF)throw Error(zP(iF));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=u+d,S=1<<u-1;for(let t=0;t<u;t+=1){let r=0,i=x;for(;r<i;)h(t,f+i)<=p?r=i:x=i,i=Math.floor((x-r)/2+r);x=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(g&&(_[i]=+!!o),c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&S&&(b=h(t,i),b<=p)){if(p=b,m=i,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}let C={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=rF(_,s);e.length?c&&(C.indices=e):C.isMatch=!1}return C}function oF(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 sF(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 cF={ł:`l`,Ł:`L`,đ:`d`,Đ:`D`,ø:`o`,Ø:`O`,ħ:`h`,Ħ:`H`,ŧ:`t`,Ŧ:`T`,ı:`i`,ß:`ss`},lF=RegExp(`[`+Object.keys(cF).join(``)+`]`,`g`),uF=String.prototype.normalize?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(lF,e=>cF[e]):e=>e,dF=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?uF(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:oF(e),startIndex:t})},d=this.pattern.length;if(d>iF){let e=0,t=d%iF,n=d-t;for(;e<n;)u(this.pattern.substr(e,iF),e),e+=iF;if(t){let e=d-iF;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?uF(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}=aF(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=sF(u)),p}},fF=class{constructor(e){this.pattern=e}static isMultiMatch(e){return pF(e,this.multiRegex)}static isSingleMatch(e){return pF(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}};function pF(e,t){let n=e.match(t);return n?n[1]:null}var mF=class extends fF{constructor(e){super(e)}static get type(){return`exact`}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){let t=e===this.pattern;return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},hF=class extends fF{constructor(e){super(e)}static get type(){return`inverse-exact`}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){let t=e.indexOf(this.pattern)===-1;return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},gF=class extends fF{constructor(e){super(e)}static get type(){return`prefix-exact`}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){let t=e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,this.pattern.length-1]}}},_F=class extends fF{constructor(e){super(e)}static get type(){return`inverse-prefix-exact`}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){let t=!e.startsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},vF=class extends fF{constructor(e){super(e)}static get type(){return`suffix-exact`}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){let t=e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[e.length-this.pattern.length,e.length-1]}}},yF=class extends fF{constructor(e){super(e)}static get type(){return`inverse-suffix-exact`}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){let t=!e.endsWith(this.pattern);return{isMatch:t,score:+!t,indices:[0,e.length-1]}}},bF=class extends fF{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}={}){super(e),this._bitapSearch=new dF(e,{location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l})}static get type(){return`fuzzy`}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}},xF=class extends fF{constructor(e){super(e)}static get type(){return`include`}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n,r=[],i=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+i,r.push([n,t-1]);let a=!!r.length;return{isMatch:a,score:+!a,indices:r}}},SF=[mF,xF,gF,_F,yF,vF,hF,bF],CF=SF.length,wF=`\0`,TF=`|`;function EF(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 DF(e,t={}){return e.replace(/\\\|/g,wF).split(TF).map(e=>{let n=EF(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<CF;){let e=SF[o],n=e.isMultiMatch(i);n&&(r.push(new e(n,t)),a=!0)}if(!a)for(o=-1;++o<CF;){let e=SF[o],n=e.isSingleMatch(i);if(n){r.push(new e(n,t));break}}}return r})}var OF=new Set([bF.type,xF.type]),kF=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?uF(e):e,this.pattern=e,this.query=DF(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?uF(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;let e=r.constructor.type;e.startsWith(`inverse`)&&(c=!0),n&&(OF.has(e)?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=sF(o)),e}}return{isMatch:!1,score:1}}},AF=[];function jF(...e){AF.push(...e)}function MF(e,t){for(let n=0,r=AF.length;n<r;n+=1){let r=AF[n];if(r.condition(e,t))return new r(e,t)}return new dF(e,t)}var NF={AND:`$and`,OR:`$or`},PF={PATH:`$path`,PATTERN:`$val`},FF=e=>!!(e[NF.AND]||e[NF.OR]),IF=e=>!!e[PF.PATH],LF=e=>!EP(e)&&MP(e)&&!FF(e),RF=e=>({[NF.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function zF(e,t,{auto:n=!0}={}){let r=e=>{if(kP(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=MF(e,t)),r}let i=Object.keys(e),a=IF(e);if(!a&&i.length>1&&!FF(e))return r(RF(e));if(LF(e)){let r=a?e[PF.PATH]:i[0],o=a?e[PF.PATTERN]:e[r];if(!kP(o))throw Error(RP(r));let s={keyId:KP(r),pattern:o};return n&&(s.searcher=MF(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];EP(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return FF(e)||(e=RF(e)),r(e)}function BF(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 VF(e,{ignoreFieldNorm:t=Y.ignoreFieldNorm}){e.forEach(e=>{e.score=BF(e.matches,{ignoreFieldNorm:t})})}var HF=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 UF(e,t){let n=e.matches;t.matches=[],PP(n)&&n.forEach(e=>{if(!PP(e.indices)||!e.indices.length)return;let{indices:n,value:r}=e,i={indices:n,value:r};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)})}function WF(e,t){t.score=e.score}function GF(e,t,{includeMatches:n=Y.includeMatches,includeScore:r=Y.includeScore}={}){let i=[];return n&&i.push(UF),r&&i.push(WF),e.map(e=>{let{idx:n}=e,r={item:t[n],refIndex:n};return i.length&&i.forEach(t=>{t(e,r)}),r})}var KF=/\b\w+\b/g;function qF({isCaseSensitive:e=!1,ignoreDiacritics:t=!1}={}){return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=uF(n)),n.match(KF)||[]}}}function JF(e,t,n){let r=new Map,i=new Map,a=0;function o(e,t,o,s){let c=n.tokenize(e);if(!c.length)return;a++;let l=new Map;for(let e of c)l.set(e,(l.get(e)||0)+1);for(let[e,n]of l){let a={docIdx:t,keyIdx:o,subIdx:s,tf:n},c=r.get(e);c||(c=[],r.set(e,c)),c.push(a),i.set(e,(i.get(e)||0)+1)}}for(let n of e){let{i:e,v:r,$:i}=n;if(r!==void 0){o(r,e,-1,-1);continue}if(i)for(let n=0;n<t;n++){let t=i[n];if(t)if(Array.isArray(t))for(let r of t)o(r.v,e,n,r.i??-1);else o(t.v,e,n,-1)}}return{terms:r,fieldCount:a,df:i}}function YF(e,t,n,r){let{i,v:a,$:o}=t;function s(t,n,a){let o=r.tokenize(t);if(!o.length)return;e.fieldCount++;let s=new Map;for(let e of o)s.set(e,(s.get(e)||0)+1);for(let[t,r]of s){let o={docIdx:i,keyIdx:n,subIdx:a,tf:r},s=e.terms.get(t);s||(s=[],e.terms.set(t,s)),s.push(o),e.df.set(t,(e.df.get(t)||0)+1)}}if(a!==void 0){s(a,-1,-1);return}if(o)for(let e=0;e<n;e++){let t=o[e];if(t)if(Array.isArray(t))for(let n of t)s(n.v,e,n.i??-1);else s(t.v,e,-1)}}function XF(e,t){for(let[n,r]of e.terms){let i=r.filter(e=>e.docIdx!==t),a=r.length-i.length;a>0&&(e.fieldCount-=a,e.df.set(n,(e.df.get(n)||0)-a),i.length===0?(e.terms.delete(n),e.df.delete(n)):e.terms.set(n,i))}}var ZF=class{constructor(e,t,n){this.options={...Y,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new UP(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=MF(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 eF))throw Error(LP);if(this._myIndex=t||tF(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=qF({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=JF(this._myIndex.records,this._myIndex.keys.length,e)}}add(e){if(PP(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){let e=this._myIndex.records[this._myIndex.records.length-1],t=qF({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});YF(this._invertedIndex,e,this._myIndex.keys.length,t)}}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){if(this._invertedIndex)for(let e of n)XF(this._invertedIndex,e);for(let e=n.length-1;e>=0;--e)this._docs.splice(n[e],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&XF(this._invertedIndex,e);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}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(kP(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return AP(n)&&n>-1&&(e=e.slice(0,n)),e}let c=AP(n)&&n>0&&kP(e),l;if(c){let t=new HF(n);kP(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),l=t.extractSorted(o)}else l=kP(e)?kP(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),VF(l,{ignoreFieldNorm:s}),a&&l.sort(o),AP(n)&&n>-1&&(l=l.slice(0,n));return GF(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i,n:o})=>{if(!PP(e))return;let{isMatch:s,score:c,indices:l}=r.searchIn(e);if(s){let r={item:e,idx:i,matches:[{score:c,value:e,norm:o,indices:l}]};t?(r.score=BF(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):a.push(r)}}),a}_searchLogical(e){let t=zF(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===NF.AND)return[]}return o},r=this._myIndex.records,i=new Map,a=[];return r.forEach(({$:e,i:r})=>{if(PP(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),{keys:i,records:a}=this._myIndex,o=t?null:[];return a.forEach(({$:e,i:a})=>{if(!PP(e))return;let s=[],c=!1,l=!1;if(i.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(s.push(...i),i[0].hasInverse&&(l=!0)):c=!0}),!(l&&c)&&s.length){let r={idx:a,item:e,matches:s};t?(r.score=BF(r.matches,{ignoreFieldNorm:n}),t.shouldInsert(r.score)&&t.insert(r)):o.push(r)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!PP(t))return[];let r=[];if(EP(t))t.forEach(({v:t,i,n:a})=>{if(!PP(t))return;let{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(t);o&&r.push({score:s,key:e,value:t,idx:i,norm:a,indices:c,hasInverse:l})});else{let{v:i,n:a}=t,{isMatch:o,score:s,indices:c,hasInverse:l}=n.searchIn(i);o&&r.push({score:s,key:e,value:i,norm:a,indices:c,hasInverse:l})}return r}},QF=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=qF({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});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 dF(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)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0;for(let a=0;a<this.termSearchers.length;a++){let o=this.termSearchers[a].searchIn(e),s=this.idfWeights[a];r+=s,o.isMatch&&(i++,n+=s*(1-o.score),o.indices&&t.push(...o.indices))}if(i===0)return{isMatch:!1,score:1};let a=r>0?1-n/r:0,o={isMatch:!0,score:Math.max(.001,a)};return this.options.includeMatches&&t.length&&(o.indices=sF(t)),o}};ZF.version=`7.3.0`,ZF.createIndex=tF,ZF.parseIndex=nF,ZF.config=Y,ZF.match=function(e,t,n){return MF(e,{...Y,...n}).searchIn(t)},ZF.parseQuery=zF,jF(kF),jF(QF),ZF.use=function(...e){e.forEach(e=>jF(e))};var $F=`locale-switcher-content`,eI=({panelProps:e,isMultilingual:t=!0})=>{let{switchTo:n,searchInput:r,localeSwitcherLabel:i,languageListLabel:a,seeAllLocalesSwitch:o}=yt(wP),s=(0,O.useRef)(null),{locale:c}=bt(),{availableLocales:l,selectedLocales:u,setSelectedLocales:d}=rw(),f=(0,O.useMemo)(()=>l.map(e=>({locale:e,englishName:lt(e,`en`),currentLocaleName:lt(e,c),ownLocaleName:lt(e)})),[l,c]),[p,m]=(0,O.useState)(``),[h,g]=tw(`locale-content-selector-see-all-locales`,!1),_=(0,O.useMemo)(()=>new ZF(f,{keys:[{name:`ownLocaleName`,weight:.4},{name:`englishName`,weight:.2},{name:`currentLocaleName`,weight:.2},{name:`locale`,weight:.2}],threshold:.02}),[f]),v=(0,O.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,k.jsx)(`div`,{className:`rounded-xl border border-text text-text transition-colors`,children:(0,k.jsxs)(TP,{identifier:$F,children:[(0,k.jsx)(TP.Trigger,{identifier:$F,label:i.value,className:`p-0!`,roundedSize:`3xl`,color:`text`,variant:`hoverable`,children:(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between text-text`,children:[(0,k.jsx)(`div`,{className:`px-2 py-1`,children:(0,k.jsx)(Ou,{size:16})}),(0,k.jsx)(ju,{className:`self-center`,size:16})]})}),(0,k.jsx)(TP.Panel,{identifier:$F,isOverable:!0,isFocusable:!0,align:`end`,...e,children:(0,k.jsxs)(Xx,{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,k.jsx)(`div`,{className:`m-auto p-2`,children:(0,k.jsx)(gS,{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,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(`div`,{className:`p-3`,children:(0,k.jsx)(MC,{type:`search`,"aria-label":r.ariaLabel.value,placeholder:r.placeholder.value,onChange:e=>m(e.target.value),ref:s})}),(0,k.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,k.jsx)(`li`,{className:`px-1.5 py-1`,children:(0,k.jsx)(tS,{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,k.jsxs)(`div`,{className:`flex flex-row items-center justify-between gap-3 px-2 py-1`,children:[t&&(0,k.jsx)(`div`,{className:`w-4`,children:u.includes(e)&&(0,k.jsx)(gu,{className:`size-full`})}),(0,k.jsxs)(`div`,{className:`flex flex-1 flex-row items-center justify-between gap-3 px-2 py-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-col text-nowrap`,children:[(0,k.jsx)(`span`,{dir:ct(e),lang:e,children:i}),(0,k.jsx)(`span`,{className:`text-neutral text-xs`,children:r})]}),(0,k.jsx)(`span`,{className:`text-neutral text-sm`,children:e.toUpperCase()})]})]})})},e))})]})]})})]})})},tI=e=>{let t=KS(e),n=YS(e);return t&&(n===`reactNode`||n===`file`)?!0:t&&typeof t.nodeType==`string`?tI(t[t.nodeType]):typeof t==`string`||typeof t==`number`||typeof t==`boolean`||t===void 0},nI=e=>{let t=(0,B.c)(3),{children:n,onToggle:r,...i}=e,[a,o]=(0,O.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,k.jsx)(rS,{...i,onToggle:s,children:a?n:null})},rI=e=>{let t=(0,B.c)(16),{section:n,keyPath:r,dictionary:i}=e,{selectedLocales:a}=rw(),o=US(n,r,mC()),{addEditedContent:s}=bC(),{setFocusedContentKeyPath:c,focusedContent:l}=gC(),{addNewElement:u,goToField:d}=yt(ew),f=YS(o),p;t[0]===l?.keyPath?p=t[1]:(p=e=>(l?.keyPath?.length??0)>0&&dt(e,l?.keyPath??[]),t[0]=l?.keyPath,t[1]=p);let m=p,h=tI(o);if(!o)return(0,k.jsx)(k.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,k.jsx)(tS,{label:d.label.value,variant:`hoverable`,color:`text`,className:`w-full`,onClick:e,IconRight:yu,children:ht(r[r.length-1].key)})}if(typeof o==`object`){if(f===`reactNode`)return(0,k.jsx)(k.Fragment,{children:`React Node`});if(f===`translation`){let e;return t[5]!==i||t[6]!==r||t[7]!==n?(e=e=>(0,k.jsx)(rI,{keyPath:[...r,{type:M,key:e}],section:n,dictionary:i},e),t[5]=i,t[6]=r,t[7]=n,t[8]=e):e=t[8],(0,k.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:a.map(e)})}if(f===`enumeration`||f===`plural`||f===`condition`)return(0,k.jsx)(`div`,{className:`flex flex-col justify-between gap-2`,children:Object.keys(o[f]).map(e=>(0,k.jsx)(rI,{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:te,key:t}];return tI(e)?(0,k.jsxs)(tS,{label:`${d.label.value} ${t}`,variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(a),IconRight:yu,isActive:m(a),children:[`Item `,t]},JSON.stringify(a)):(0,k.jsx)(nI,{label:`${d.label.value} ${t}`,header:`Item ${t}`,isActive:m(a),onClick:()=>c(a),children:(0,k.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,k.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,k.jsx)(rI,{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,k.jsxs)(`div`,{className:`flex flex-col justify-between gap-2`,children:[o.map(e),(0,k.jsx)(tS,{label:u.label.value,variant:`hoverable`,color:`neutral`,textAlign:`left`,onClick:()=>{let e=[...r,{type:te,key:o.length}],t=o,n=GS(t[t.length-1])??``;s(i.localId,n,e,!1),c(e)},Icon:Pu,children:u.text})]})}return typeof o.nodeType==`string`?(0,k.jsx)(rI,{keyPath:[...r,{type:o.nodeType}],section:n,dictionary:i}):(0,k.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:ee,key:e}];return tI(US(n,t))?(0,k.jsx)(tS,{label:`${d.label.value} ${e}`,isActive:m(t),variant:`hoverable`,color:`text`,className:`w-full`,onClick:()=>c(t),IconRight:yu,children:ht(e)},e):(0,k.jsx)(nI,{label:`${d.label.value} ${e}`,isActive:m(t),onClick:()=>c(t),header:ht(e),children:(0,k.jsx)(`div`,{className:`mt-2 flex w-full max-w-full`,children:(0,k.jsx)(`div`,{className:`flex-1 pl-10`,children:(0,k.jsx)(rI,{keyPath:t,section:n,dictionary:i})})})},e)})})}return(0,k.jsxs)(k.Fragment,{children:[`Error loading section --`,f,`--`,JSON.stringify(o),`--`,JSON.stringify(r)]})},iI=e=>{let t=(0,B.c)(16),{dictionary:n,isDarkMode:r}=e,{content:i,key:a,localId:o}=n,{editedContent:s}=xC(),{focusedContent:c,setFocusedContentKeyPath:l}=gC(),[,u]=(0,O.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=mC(),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?(_=US(m,g,h),t[5]=h,t[6]=m,t[7]=g,t[8]=_):_=t[8];let v=_,y=(0,O.useDeferredValue)(p),b=(0,O.useDeferredValue)(v),x=b!==v,S;t[9]===m?S=t[10]:(S=tI(m),t[9]=m,t[10]=S);let C=S,w=tI(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,O.useEffect)(T,E),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`div`,{className:`mb-6 flex items-center justify-between gap-2`,children:[(0,k.jsx)(CP,{dictionaryKey:a,keyPath:p??[],onClickKeyPath:f}),(0,k.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,k.jsx)(eI,{})})]}),(0,k.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,k.jsx)(Xx,{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,k.jsx)(rI,{keyPath:[],section:m,dictionary:n})}),(w||(y??[]).length>0)&&(0,k.jsx)(`div`,{className:x?`pointer-events-none flex-1 opacity-50 transition-opacity`:`flex-1 transition-opacity`,children:(0,k.jsx)(uP,{keyPath:y??[],section:b,dictionary:n,isDarkMode:r})})]})]})},aI=ru(`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`,destructive:`border-destructive bg-destructive text-destructive hover:bg-destructive-500`,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`}}),oI=({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,k.jsxs)(p,{className:W(aI({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,k.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,k.jsxs)(`svg`,{className:`size-3`,viewBox:`0 0 20 20`,fill:`currentColor`,"aria-label":`Remove badge`,children:[(0,k.jsx)(`title`,{children:`Remove badge`}),(0,k.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`})]})})]})},sI=`Dialog`,[cI,lI]=hc(sI),[uI,dI]=cI(sI),fI=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=O.useRef(null),c=O.useRef(null),[l,u]=$c({prop:r,defaultProp:i??!1,onChange:a,caller:sI});return(0,k.jsx)(uI,{scope:t,triggerRef:s,contentRef:c,contentId:nO(),titleId:nO(),descriptionId:nO(),open:l,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};fI.displayName=sI;var pI=`DialogTrigger`,mI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(pI,n),a=pc(t,i.triggerRef);return(0,k.jsx)(Tc.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":PI(i.open),...r,ref:a,onClick:uc(e.onClick,i.onOpenToggle)})});mI.displayName=pI;var hI=`DialogPortal`,[gI,_I]=cI(hI,{forceMount:void 0}),vI=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=dI(hI,t);return(0,k.jsx)(gI,{scope:t,forceMount:n,children:O.Children.map(r,e=>(0,k.jsx)(Jc,{present:n||a.open,children:(0,k.jsx)(Kc,{asChild:!0,container:i,children:e})}))})};vI.displayName=hI;var yI=`DialogOverlay`,bI=O.forwardRef((e,t)=>{let n=_I(yI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=dI(yI,e.__scopeDialog);return a.modal?(0,k.jsx)(Jc,{present:r||a.open,children:(0,k.jsx)(SI,{...i,ref:t})}):null});bI.displayName=yI;var xI=_c(`DialogOverlay.RemoveScroll`),SI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(yI,n);return(0,k.jsx)(aM,{as:xI,allowPinchZoom:!0,shards:[i.contentRef],children:(0,k.jsx)(Tc.div,{"data-state":PI(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),CI=`DialogContent`,wI=O.forwardRef((e,t)=>{let n=_I(CI,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=dI(CI,e.__scopeDialog);return(0,k.jsx)(Jc,{present:r||a.open,children:a.modal?(0,k.jsx)(TI,{...i,ref:t}):(0,k.jsx)(EI,{...i,ref:t})})});wI.displayName=CI;var TI=O.forwardRef((e,t)=>{let n=dI(CI,e.__scopeDialog),r=O.useRef(null),i=pc(t,n.contentRef,r);return O.useEffect(()=>{let e=r.current;if(e)return XA(e)},[]),(0,k.jsx)(DI,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uc(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:uc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:uc(e.onFocusOutside,e=>e.preventDefault())})}),EI=O.forwardRef((e,t)=>{let n=dI(CI,e.__scopeDialog),r=O.useRef(!1),i=O.useRef(!1);return(0,k.jsx)(DI,{...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()}})}),DI=O.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=dI(CI,n),c=O.useRef(null),l=pc(t,c);return ID(),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(HD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,k.jsx)(Fc,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":PI(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(RI,{titleId:s.titleId}),(0,k.jsx)(BI,{contentRef:c,descriptionId:s.descriptionId})]})]})}),OI=`DialogTitle`,kI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(OI,n);return(0,k.jsx)(Tc.h2,{id:i.titleId,...r,ref:t})});kI.displayName=OI;var AI=`DialogDescription`,jI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(AI,n);return(0,k.jsx)(Tc.p,{id:i.descriptionId,...r,ref:t})});jI.displayName=AI;var MI=`DialogClose`,NI=O.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=dI(MI,n);return(0,k.jsx)(Tc.button,{type:`button`,...r,ref:t,onClick:uc(e.onClick,()=>i.onOpenChange(!1))})});NI.displayName=MI;function PI(e){return e?`open`:`closed`}var FI=`DialogTitleWarning`,[II,LI]=mc(FI,{contentName:CI,titleName:OI,docsSlug:`dialog`}),RI=({titleId:e})=>{let t=LI(FI),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
100
100
|
|
|
101
101
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
102
102
|
|
|
@@ -182,5 +182,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
182
182
|
--nojs-bg: black !important;
|
|
183
183
|
--nojs-fg: white !important;
|
|
184
184
|
}
|
|
185
|
-
}`,BW=18,VW=40,HW=`${VW}px`,UW=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),WW=e=>{let t=(0,B.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,O.useState)(!1),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.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-BW,f=c;document.querySelectorAll(UW).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>=VW)};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,O.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,O.useEffect)(_,v);let y;return t[18]!==o||t[19]!==f?(y={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:HW},t[18]=o,t[19]=f,t[20]=y):y=t[20],y},GW=e=>{let t=(0,O.useRef)(void 0);return(0,O.useEffect)(()=>{t.current=e}),t.current},KW=(0,O.createContext)({}),qW=({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=zW,render:f,children:p,...m})=>{let[h,g]=(0,O.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),_=e??h,v=GW(_),y=e=>{t?.(e),g(e)},b=r===void 0?null:typeof r==`string`?new RegExp(r):r,x=(0,O.useRef)(null),S=(0,O.useRef)(null),C=(0,O.useRef)({value:_,onChange:y,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),w=(0,O.useRef)({prev:[x.current?.selectionStart??null,x.current?.selectionEnd??null,x.current?.selectionDirection??`none`]});(0,O.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;`;RW(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),RW(e.sheet,`[data-input-otp]:autofill { ${t} }`),RW(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),RW(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; } }`),RW(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,O.useState)(!1),[D,A]=(0,O.useState)(!1),[j,M]=(0,O.useState)(null),[N,P]=(0,O.useState)(null),[F,I]=(0,O.useState)(null);(0,O.useEffect)(()=>{LW(()=>{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])})},[_,D]),(0,O.useEffect)(()=>{v!==void 0&&_!==v&&v.length<n&&_.length===n&&o?.(_)},[n,o,v,_]);let L=(0,O.useRef)(null);(0,O.useEffect)(()=>{let e=D&&F!==null?F:null;e!==L.current&&(L.current=e,s?.(e))},[D,F,s]);let ee=WW({containerRef:S,inputRef:x,pushPasswordManagerStrategy:c,isFocused:D}),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)},re=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)}},R={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)`},z=(0,k.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:R,maxLength:n,value:_,ref:x,onPaste:e=>{re(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)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=D&&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:D,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)}},ae=f===void 0?(0,k.jsx)(KW.Provider,{value:ie,children:p}):f(ie);return(0,k.jsxs)(k.Fragment,{children:[d!==null&&(0,k.jsx)(`noscript`,{children:(0,k.jsx)(`style`,{children:d})}),(0,k.jsxs)(`div`,{ref:S,className:W(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[ae,(0,k.jsx)(`div`,{className:`absolute inset-0`,children:z})]})]})},JW=({className:e,render:t,...n})=>(0,k.jsx)(qW,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:W(`disabled:cursor-not-allowed`,e),render:t,...n}),YW=({className:e,...t})=>(0,k.jsx)(`div`,{className:W(`z-10 flex items-center gap-3`,e),...t}),XW=e=>{let t=(0,B.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,O.useContext)(KW),{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,k.jsx)(tS,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:W(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:h,label:null,...o,children:(0,k.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},ZW=e=>(0,k.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full text-text/50`,...e,children:(0,k.jsx)(ku,{})}),QW=e=>(0,k.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}),$W=e=>e?.getAttribute(`aria-selected`)===`true`,eG=({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}=CW(),f=(0,O.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=sS(f,{selector:$W,isHoverable:!0});return(0,O.useEffect)(()=>{m()},[]),(0,k.jsx)(OW,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,k.jsx)(JW,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(YW,{children:[(0,k.jsx)(XW,{index:0,ref:e=>{f.current[0]=e}}),(0,k.jsx)(XW,{index:1,ref:e=>{f.current[1]=e}}),(0,k.jsx)(XW,{index:2,ref:e=>{f.current[2]=e}})]}),(0,k.jsx)(ZW,{}),(0,k.jsxs)(YW,{children:[(0,k.jsx)(XW,{index:3,ref:e=>{f.current[3]=e}}),(0,k.jsx)(XW,{index:4,ref:e=>{f.current[4]=e}}),(0,k.jsx)(XW,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,k.jsx)(QW,{style:p})]})})})},tG=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}=VR();return(0,k.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,k.jsx)(eG,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},nG=({className:e,...t})=>(0,k.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,k.jsx)(Lu,{className:`absolute left-2 size-4`}),(0,k.jsx)(MC,{...t,type:`search`,className:W(`pl-8`,e)})]}),rG=e=>(0,k.jsx)(AW,{id:e.name,"data-testid":e.name,Element:nG,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),iG=e=>(0,k.jsx)(AW,{Element:NC,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}),aG=e=>(0,k.jsx)(AW,{Element:IC,id:e.name,"data-testid":e.name,...e}),oG=ru([`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`,destructive:`border-destructive/30 text-destructive ring-destructive/20 checked:border-destructive checked:bg-destructive`,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:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),sG=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,k.jsx)(`input`,{type:`checkbox`,className:W(oG({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),cG=e=>{let{label:t,name:n,id:r}=e;return t?(0,k.jsxs)(`label`,{htmlFor:r??n,className:W(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,k.jsx)(sG,{id:r??n,...e}),t]}):(0,k.jsx)(sG,{id:r??n,...e})},lG=({inputLabel:e,value:t,onChange:n,...r})=>(0,k.jsx)(cG,{...r,label:e,checked:!!t,onChange:n}),uG=({autoComplete:e,...t})=>(0,k.jsx)(AW,{Element:lG,id:t.name,"data-testid":t.name,autoComplete:e,...t}),dG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=CW();return(0,k.jsx)(OW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(iR,{onValueChange:t.onChange,values:t.value,...l,children:c})})},fG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=VR();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(dG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},pG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=CW();return(0,k.jsx)(OW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},mG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=VR();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(pG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},hG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=CW();return(0,k.jsx)(OW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(gS,{...t,...l,children:c})})},gG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=VR();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(hG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},_G=Symbol.for(`react.lazy`),vG=O.use;function yG(e){return typeof e==`object`&&!!e&&`then`in e}function bG(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===_G&&`_payload`in e&&yG(e._payload)}function xG(e){let t=CG(e),n=O.forwardRef((e,n)=>{let{children:r,...i}=e;bG(r)&&typeof vG==`function`&&(r=vG(r._payload));let a=O.Children.toArray(r),o=a.find(TG);if(o){let e=o.props.children,r=a.map(t=>t===o?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t);return(0,k.jsx)(t,{...i,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return(0,k.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var SG=xG(`Slot`);function CG(e){let t=O.forwardRef((e,t)=>{let{children:n,...r}=e;if(bG(n)&&typeof vG==`function`&&(n=vG(n._payload)),O.isValidElement(n)){let e=DG(n),i=EG(r,n.props);return n.type!==O.Fragment&&(i.ref=t?fc(t,e):e),O.cloneElement(n,i)}return O.Children.count(n)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wG=Symbol(`radix.slottable`);function TG(e){return O.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===wG}function EG(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 DG(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 OG=e=>{let t=(0,B.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=CW(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,k.jsx)(SG,{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},kG=e=>{let t=(0,B.c)(3),{formDescriptionId:n}=CW(),r;return t[0]!==n||t[1]!==e?(r=(0,k.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},AG=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=CW(),a=r?String(r?.message??``):t;return a?(0,k.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=_W;$.Description=kG,$.Control=OG,$.Field=SW,$.Item=yW,$.Label=DW,$.Message=AG,$.Element=AW,$.Input=NW,$.InputPassword=IW,$.Checkbox=uG,$.TextArea=iG,$.AutoSizedTextArea=aG,$.Button=tS,$.Select=mG,$.MultiSelect=fG,$.EditableFieldInput=jW,$.EditableFieldTextArea=MW,$.SwitchSelector=gG,$.OTP=tG,$.SearchInput=rG;var jG=Z(`ZodISODateTime`,(e,t)=>{XV.init(e,t),iK.init(e,t)});function MG(e){return gU(jG,e)}var NG=Z(`ZodISODate`,(e,t)=>{ZV.init(e,t),iK.init(e,t)});function PG(e){return _U(NG,e)}var FG=Z(`ZodISOTime`,(e,t)=>{QV.init(e,t),iK.init(e,t)});function IG(e){return vU(FG,e)}var LG=Z(`ZodISODuration`,(e,t)=>{$V.init(e,t),iK.init(e,t)});function RG(e){return yU(LG,e)}var zG=Z(`ZodError`,(e,t)=>{OB.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>jB(e,t)},flatten:{value:t=>AB(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Jz,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Jz,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),BG=MB(zG),VG=PB(zG),HG=IB(zG),UG=RB(zG),WG=BB(zG),GG=VB(zG),KG=HB(zG),qG=UB(zG),JG=WB(zG),YG=GB(zG),XG=KB(zG),ZG=qB(zG),QG=new WeakMap;function $G(e,t,n){let r=Object.getPrototypeOf(e),i=QG.get(r);if(i||(i=new Set,QG.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 eK=Z(`ZodType`,(e,t)=>(IV.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:qU(e,`input`),output:qU(e,`output`)}}),e.toJSONSchema=KU(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>BG(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>HG(e,t,n),e.parseAsync=async(t,n)=>VG(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>UG(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>WG(e,t,n),e.decode=(t,n)=>GG(e,t,n),e.encodeAsync=async(t,n)=>KG(e,t,n),e.decodeAsync=async(t,n)=>qG(e,t,n),e.safeEncode=(t,n)=>JG(e,t,n),e.safeDecode=(t,n)=>YG(e,t,n),e.safeEncodeAsync=async(t,n)=>XG(e,t,n),e.safeDecodeAsync=async(t,n)=>ZG(e,t,n),$G(e,`ZodType`,{check(...e){let t=this.def;return this.clone(tB(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 dB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(aq(e,t))},superRefine(e,t){return this.check(oq(e,t))},overwrite(e){return this.check(jU(e))},optional(){return VK(this)},exactOptional(){return UK(this)},nullable(){return GK(this)},nullish(){return VK(GK(this))},nonoptional(e){return ZK(this,e)},array(){return kK(this)},or(e){return NK([this,e])},and(e){return FK(this,e)},transform(e){return tq(this,zK(e))},default(e){return qK(this,e)},prefault(e){return YK(this,e)},catch(e){return $K(this,e)},pipe(e){return tq(this,e)},readonly(){return rq(this)},describe(e){let t=this.clone();return KH.add(t,{description:e}),t},meta(...e){if(e.length===0)return KH.get(this);let t=this.clone();return KH.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 KH.get(e)?.description},configurable:!0}),e)),tK=Z(`_ZodString`,(e,t)=>{LV.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YU(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,$G(e,`_ZodString`,{regex(...e){return this.check(TU(...e))},includes(...e){return this.check(OU(...e))},startsWith(...e){return this.check(kU(...e))},endsWith(...e){return this.check(AU(...e))},min(...e){return this.check(CU(...e))},max(...e){return this.check(SU(...e))},length(...e){return this.check(wU(...e))},nonempty(...e){return this.check(CU(1,...e))},lowercase(e){return this.check(EU(e))},uppercase(e){return this.check(DU(e))},trim(){return this.check(NU())},normalize(...e){return this.check(MU(...e))},toLowerCase(){return this.check(PU())},toUpperCase(){return this.check(FU())},slugify(){return this.check(IU())}})}),nK=Z(`ZodString`,(e,t)=>{LV.init(e,t),tK.init(e,t),e.email=t=>e.check(JH(aK,t)),e.url=t=>e.check(eU(cK,t)),e.jwt=t=>e.check(hU(CK,t)),e.emoji=t=>e.check(tU(lK,t)),e.guid=t=>e.check(YH(oK,t)),e.uuid=t=>e.check(XH(sK,t)),e.uuidv4=t=>e.check(ZH(sK,t)),e.uuidv6=t=>e.check(QH(sK,t)),e.uuidv7=t=>e.check($H(sK,t)),e.nanoid=t=>e.check(nU(uK,t)),e.guid=t=>e.check(YH(oK,t)),e.cuid=t=>e.check(rU(dK,t)),e.cuid2=t=>e.check(iU(fK,t)),e.ulid=t=>e.check(aU(pK,t)),e.base64=t=>e.check(fU(bK,t)),e.base64url=t=>e.check(pU(xK,t)),e.xid=t=>e.check(oU(mK,t)),e.ksuid=t=>e.check(sU(hK,t)),e.ipv4=t=>e.check(cU(gK,t)),e.ipv6=t=>e.check(lU(_K,t)),e.cidrv4=t=>e.check(uU(vK,t)),e.cidrv6=t=>e.check(dU(yK,t)),e.e164=t=>e.check(mU(SK,t)),e.datetime=t=>e.check(MG(t)),e.date=t=>e.check(PG(t)),e.time=t=>e.check(IG(t)),e.duration=t=>e.check(RG(t))});function rK(e){return qH(nK,e)}var iK=Z(`ZodStringFormat`,(e,t)=>{RV.init(e,t),tK.init(e,t)}),aK=Z(`ZodEmail`,(e,t)=>{VV.init(e,t),iK.init(e,t)}),oK=Z(`ZodGUID`,(e,t)=>{zV.init(e,t),iK.init(e,t)}),sK=Z(`ZodUUID`,(e,t)=>{BV.init(e,t),iK.init(e,t)}),cK=Z(`ZodURL`,(e,t)=>{HV.init(e,t),iK.init(e,t)}),lK=Z(`ZodEmoji`,(e,t)=>{UV.init(e,t),iK.init(e,t)}),uK=Z(`ZodNanoID`,(e,t)=>{WV.init(e,t),iK.init(e,t)}),dK=Z(`ZodCUID`,(e,t)=>{GV.init(e,t),iK.init(e,t)}),fK=Z(`ZodCUID2`,(e,t)=>{KV.init(e,t),iK.init(e,t)}),pK=Z(`ZodULID`,(e,t)=>{qV.init(e,t),iK.init(e,t)}),mK=Z(`ZodXID`,(e,t)=>{JV.init(e,t),iK.init(e,t)}),hK=Z(`ZodKSUID`,(e,t)=>{YV.init(e,t),iK.init(e,t)}),gK=Z(`ZodIPv4`,(e,t)=>{eH.init(e,t),iK.init(e,t)}),_K=Z(`ZodIPv6`,(e,t)=>{tH.init(e,t),iK.init(e,t)}),vK=Z(`ZodCIDRv4`,(e,t)=>{nH.init(e,t),iK.init(e,t)}),yK=Z(`ZodCIDRv6`,(e,t)=>{rH.init(e,t),iK.init(e,t)}),bK=Z(`ZodBase64`,(e,t)=>{aH.init(e,t),iK.init(e,t)}),xK=Z(`ZodBase64URL`,(e,t)=>{sH.init(e,t),iK.init(e,t)}),SK=Z(`ZodE164`,(e,t)=>{cH.init(e,t),iK.init(e,t)}),CK=Z(`ZodJWT`,(e,t)=>{uH.init(e,t),iK.init(e,t)}),wK=Z(`ZodUnknown`,(e,t)=>{dH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function TK(){return bU(wK)}var EK=Z(`ZodNever`,(e,t)=>{fH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XU(e,t,n,r)});function DK(e){return xU(EK,e)}var OK=Z(`ZodArray`,(e,t)=>{mH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eW(e,t,n,r),e.element=t.element,$G(e,`ZodArray`,{min(e,t){return this.check(CU(e,t))},nonempty(e){return this.check(CU(1,e))},max(e,t){return this.check(SU(e,t))},length(e,t){return this.check(wU(e,t))},unwrap(){return this.element}})});function kK(e,t){return LU(OK,e,t)}var AK=Z(`ZodObject`,(e,t)=>{yH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tW(e,t,n,r),$z(e,`shape`,()=>t.shape),$G(e,`ZodObject`,{keyof(){return LK(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:TK()})},loose(){return this.clone({...this._zod.def,catchall:TK()})},strict(){return this.clone({...this._zod.def,catchall:DK()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return hB(this,e)},safeExtend(e){return gB(this,e)},merge(e){return _B(this,e)},pick(e){return pB(this,e)},omit(e){return mB(this,e)},partial(...e){return vB(BK,this,e[0])},required(...e){return yB(XK,this,e[0])}})});function jK(e,t){return new AK({type:`object`,shape:e??{},...Q(t)})}var MK=Z(`ZodUnion`,(e,t)=>{xH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nW(e,t,n,r),e.options=t.options});function NK(e,t){return new MK({type:`union`,options:e,...Q(t)})}var PK=Z(`ZodIntersection`,(e,t)=>{SH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rW(e,t,n,r)});function FK(e,t){return new PK({type:`intersection`,left:e,right:t})}var IK=Z(`ZodEnum`,(e,t)=>{TH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZU(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 IK({...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 IK({...t,checks:[],...Q(r),entries:i})}});function LK(e,t){return new IK({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var RK=Z(`ZodTransform`,(e,t)=>{EH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$U(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Wz(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(EB(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(EB(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 zK(e){return new RK({type:`transform`,transform:e})}var BK=Z(`ZodOptional`,(e,t)=>{OH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function VK(e){return new BK({type:`optional`,innerType:e})}var HK=Z(`ZodExactOptional`,(e,t)=>{kH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function UK(e){return new HK({type:`optional`,innerType:e})}var WK=Z(`ZodNullable`,(e,t)=>{AH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function GK(e){return new WK({type:`nullable`,innerType:e})}var KK=Z(`ZodDefault`,(e,t)=>{jH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qK(e,t){return new KK({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():cB(t)}})}var JK=Z(`ZodPrefault`,(e,t)=>{NH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function YK(e,t){return new JK({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():cB(t)}})}var XK=Z(`ZodNonOptional`,(e,t)=>{PH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ZK(e,t){return new XK({type:`nonoptional`,innerType:e,...Q(t)})}var QK=Z(`ZodCatch`,(e,t)=>{IH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function $K(e,t){return new QK({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var eq=Z(`ZodPipe`,(e,t)=>{LH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lW(e,t,n,r),e.in=t.in,e.out=t.out});function tq(e,t){return new eq({type:`pipe`,in:e,out:t})}var nq=Z(`ZodReadonly`,(e,t)=>{zH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rq(e){return new nq({type:`readonly`,innerType:e})}var iq=Z(`ZodCustom`,(e,t)=>{VH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QU(e,t,n,r)});function aq(e,t={}){return RU(iq,e,t)}function oq(e,t){return zU(e,t)}var sq={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`]},cq=e=>{let t=(0,B.c)(3),[n,r]=(0,O.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,O.useEffect)(i,a),n},lq=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()})}},uq=[],dq=()=>{let e=(0,B.c)(2),t=(0,O.useSyncExternalStore)(lq.subscribe,lq.getSnapshot,fq),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:lq.addBlockage,removeBlockage:lq.removeBlockage,isElementScrollBlocked:lq.isElementScrollBlocked},e[0]=t,e[1]=n),n};function fq(){return uq}var pq=e=>{let t=(0,B.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}=dq(),d=cq(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,O.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},mq=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,hq=`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`,gq=({className:e,...t})=>(0,k.jsx)(`h1`,{className:W(`font-bold text-2xl`,e),...t}),_q=({className:e,...t})=>(0,k.jsx)(`h2`,{className:W(`mb-2 font-bold text-2xl`,mq,e),...t}),vq=({className:e,...t})=>(0,k.jsx)(`h3`,{className:W(`mb-2 font-bold text-xl`,mq,e),...t}),yq=({className:e,...t})=>(0,k.jsx)(`h4`,{className:W(`font-bold text-lg`,mq,e),...t}),bq=({className:e,...t})=>(0,k.jsx)(`h5`,{className:W(`font-bold text-base`,mq,e),...t}),xq=({className:e,...t})=>(0,k.jsx)(`h6`,{className:W(`ml-3 font-bold text-base`,mq,e),...t}),Sq=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Cq=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},wq=(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},Tq=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Sq(t):void 0;return(0,k.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(wq(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Cq(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:W(r&&hq,n),...i,children:t})},Eq=({isClickable:e,...t})=>(0,k.jsx)(gq,{...t}),Dq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:_q,isClickable:e,...t}),Oq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:vq,isClickable:e,...t}),kq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:yq,isClickable:e,...t}),Aq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:bq,isClickable:e,...t}),jq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:xq,isClickable:e,...t}),Mq=ru(`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`}}),Nq={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`},Pq=Ux.create(Xx),Fq=e=>{let t=(0,B.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=cq(i),b=r&&_,x;t[0]===b?x=t[1]:(x={key:`modal`,disableScroll:b},t[0]=b,t[1]=x),pq(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,O.useEffect)(S,C),!y){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{}),t[6]=e):e=t[6],e}let w=!!s,T=Nq[v||`none`],E;return t[7]===a?E=t[8]:(E=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=E),(0,wc.createPortal)((0,k.jsx)(Ux.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,k.jsxs)(Pq,{onClick:Iq,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:Mq({size:h,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,k.jsxs)(`div`,{className:W(`relative flex-none px-4 pt-4`,m&&w?`flex items-start`:m?`flex justify-end`:w?`items-center`:`hidden`),children:[w&&(0,k.jsx)(Oq,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,k.jsx)(tS,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Bu,size:`icon-md`})]}),(0,k.jsx)(`div`,{className:W(`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,k.jsx)(`div`,{className:W(`flex h-full w-full flex-1 flex-col`,T),children:n})})]})}),y)};function Iq(e){return e.stopPropagation()}var Lq=e=>{let t=(0,B.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,O.useState)(!1),{setLocaleDictionary:u}=pC(),{mutate:d,isPending:f}=iD(),{mutate:p,isPending:m}=lD(),{mutate:h,isPending:g}=rD(),_=m||g,{editedContent:v,restoreEditedContent:y}=xC(),{deleteButton:b,resetButton:x,saveButton:S,publishButton:C,downloadButton:w,confirmation:T}=yt(sq),{isAuthenticated:E}=XE(),D=v?.[n.localId],A;t[0]!==n||t[1]!==D?(A=D&&JSON.stringify(D)!==JSON.stringify(n),t[0]=n,t[1]=D,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,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Fq,{isOpen:c,title:T.title.value,size:`md`,onClose:te,padding:`md`,children:(0,k.jsxs)(`form`,{className:`size-full`,children:[(0,k.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:T.message}),(0,k.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,k.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,k.jsx)($.Button,{label:T.confirmButton.label.value,disabled:!j||_,Icon:Iu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:P,children:T.confirmButton.text})]})]})}),(0,k.jsxs)(`form`,{className:W(`flex justify-end gap-2`,i),...s,children:[r.includes(`remote`)&&M&&a&&E&&(0,k.jsx)($.Button,{label:b.label.value,Icon:Ru,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ee,children:b.text}),j&&(0,k.jsx)($.Button,{label:x.label.value,disabled:!j,Icon:Fu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>y(n.localId),children:x.text}),r.includes(`local`)&&(0,k.jsx)($.Button,{label:w.label.value,disabled:!j||_,Icon:wu,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,k.jsx)($.Button,{label:C.label.value,disabled:_,Icon:hu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:C.text}),r.includes(`remote`)&&E&&M&&j&&(0,k.jsx)($.Button,{label:S.label.value,disabled:!j||_,Icon:Iu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:S.text})]})]})},Rq={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`]},zq=(e,t=2e3,n,r)=>{let[i,a]=(0,O.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))}}}},Bq=e=>{let t=(0,B.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}=zq(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,k.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?Su:Cu;S=(0,k.jsxs)(`span`,{className:W(`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,k.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,k.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},Vq=ru(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,destructive:`border-destructive bg-destructive text-destructive`,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`}}),Hq=ru(`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`,destructive:`bg-destructive/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`}}),Uq=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,O.useRef)([]),c=(0,O.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=sS(s,{isHoverable:i,orientation:a});return(0,O.useEffect)(()=>{u()},[t]),(0,k.jsxs)(`div`,{className:W(Vq({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,O.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,k.jsx)(`div`,{className:W(Hq({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},Wq={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`]},Gq={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`]},Kq=e=>{let t=(0,B.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:_}=yt(Gq),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=jK({title:rK({error:y}).refine(qq,{error:i.value}).optional(),key:rK({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:rK({error:x}).optional(),projectIds:kK(rK({error:S})).default([e]),tags:kK(rK({error:C})).default([]),location:LK([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:LK([`static`,`dynamic`,`fetch`]).optional(),filePath:rK({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 qq(e){return e.length===0||e.length>=4}var Jq=e=>{let t=(0,B.c)(62),{dictionary:n,mode:r}=e,{session:i}=YE(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=nD(),{data:l}=aD(),u=s?.data??[],d=l?.data??[],f=Kq(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}=vW(f,m),{editedContent:_,setEditedDictionary:v}=xC(),{titleInput:y,keyInput:b,descriptionInput:x,projectInput:S,tagsSelect:C,locationSelect:w,importModeSelect:T,filePathInput:E,auditButton:D}=yt(Wq),{mutate:A,isPending:j}=oD(),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,O.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,O.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 re=LR(ne),R=re===`local`||re===`hybrid`,z;t[25]!==n||t[26]!==h||t[27]!==v||t[28]!==M?(z=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]=z):z=t[29];let ie;t[30]!==n||t[31]!==h||t[32]!==v||t[33]!==M?(ie=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]=ie):ie=t[34];let ae;t[35]!==n||t[36]!==h||t[37]!==v||t[38]!==M?(ae=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]=ae):ae=t[39];let oe;t[40]!==n||t[41]!==h||t[42]!==w||t[43]!==r||t[44]!==v||t[45]!==M?(oe=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,k.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,k.jsx)($.Label,{className:`ml-1`,children:w.label}),(0,k.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,k.jsx)(cG,{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,k.jsx)(cG,{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,k.jsx)($.Description,{children:w.testDescription}),(0,k.jsx)($.Message,{})]})},t[40]=n,t[41]=h,t[42]=w,t[43]=r,t[44]=v,t[45]=M,t[46]=oe):oe=t[46];let se;t[47]!==n||t[48]!==h||t[49]!==v||t[50]!==M?(se=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]=se):se=t[51];let ce;t[52]!==n||t[53]!==h||t[54]!==v||t[55]!==M?(ce=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]=ce):ce=t[56];let le;return t[57]!==n||t[58]!==h||t[59]!==v||t[60]!==M?(le=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]=le):le=t[61],(0,k.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,k.jsx)($.EditableFieldInput,{name:`key`,label:b.label,placeholder:b.label.value,description:b.description,disabled:g,isRequired:!0,onSave:z}),(0,k.jsx)($.EditableFieldInput,{name:`title`,label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:g,onSave:ie})]}),(0,k.jsx)($.EditableFieldTextArea,{name:`description`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ae}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,k.jsx)($.Field,{control:h.control,name:`location`,render:oe}),(0,k.jsx)(Gy,{mode:`wait`,children:R&&(0,k.jsx)(Ux.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,k.jsx)($.Input,{name:`filePath`,label:E.label.value,placeholder:E.placeholder.value,description:E.description.value,disabled:g||!R,onChange:e=>{let t=e.target.value;v({...n,...M??{},filePath:t})}})},`filePath-input`)})]}),(0,k.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,k.jsxs)($.Select,{name:`importMode`,label:T.label.value,description:T.description.value,onValueChange:se,children:[(0,k.jsx)(J.Trigger,{children:(0,k.jsx)(J.Value,{placeholder:T.label.value})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:`static`,children:T.static.value}),(0,k.jsx)(J.Item,{value:`dynamic`,children:T.dynamic.value}),(0,k.jsx)(J.Item,{value:`live`,children:T.live.value})]})]})}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,k.jsxs)($.MultiSelect,{name:`projectIds`,label:S.label.value,description:S.description,onValueChange:ce,children:[(0,k.jsx)(iR.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,k.jsx)(iR.Input,{placeholder:S.placeholder.value})}),(0,k.jsx)(iR.Content,{children:(0,k.jsx)(Qx,{isLoading:c,children:(0,k.jsx)(iR.List,{children:u?.map(Yq)})})})]}),(0,k.jsxs)($.MultiSelect,{name:`tags`,label:C.label.value,description:C.description,onValueChange:le,children:[(0,k.jsx)(iR.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,k.jsx)(iR.Input,{placeholder:C.placeholder.value})}),(0,k.jsx)(iR.Content,{children:(0,k.jsx)(Qx,{isLoading:c,children:(0,k.jsx)(iR.List,{children:d?.map(Xq)})})})]})]}),(0,k.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,k.jsx)($.Button,{type:`button`,size:`icon-md`,label:D.label.value,Icon:zu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||j,isLoading:j})})]})};function Yq(e){return(0,k.jsx)(iR.Item,{value:String(e.id),children:e.name},String(e.id))}function Xq(e){return(0,k.jsx)(iR.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var Zq={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`]},Qq=e=>{let t=(0,B.c)(6),{content:n,...r}=e,[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(!1),{label:c}=yt(Zq),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,O.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,k.jsx)(tS,{Icon:i?Su:Cu,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})},$q=(0,O.lazy)(()=>Le(()=>import(`./dist-DwV4KkIc.js`).then(e=>({default:e.Editor})),[])),eJ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,O.useRef)(null),c=(0,O.useRef)(null),[l,u]=(0,O.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(`
|
|
186
|
-
`).length>1:!1);return(0,k.jsxs)(`div`,{className:W(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,k.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,k.jsx)(`div`,{className:W(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,k.jsx)(Qq,{content:e})})}),(0,k.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(Qx,{}),children:(0,k.jsx)($q,{...l,defaultLanguage:`typescript`,language:t,loading:(0,k.jsx)(Qx,{}),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`})})})]})},tJ=e=>{let t=(0,B.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=xC(),o=nJ,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,k.jsx)(eJ,{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 nJ(e){try{return JSON.parse(e),!0}catch{return!1}}var rJ={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`]},iJ={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`]},aJ=e=>{let t=(0,B.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}=yt(iJ),b;t[0]===n?b=t[1]:(b=YS(n),t[0]=n,t[1]=b);let[x,S]=(0,O.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,k.jsxs)(J,{value:x,onValueChange:w,children:[(0,k.jsx)(J.Trigger,{children:(0,k.jsx)(J.Value,{placeholder:f})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:M,children:i}),(0,k.jsx)(J.Item,{value:ie,children:a}),(0,k.jsx)(J.Item,{value:ae,children:o}),(0,k.jsx)(J.Item,{value:oe,children:s}),(0,k.jsx)(J.Item,{value:ee,children:c}),(0,k.jsx)(J.Item,{value:te,children:l}),(0,k.jsx)(J.Item,{value:N,children:u}),(0,k.jsx)(J.Item,{value:P,children:d}),(0,k.jsx)(J.Item,{value:se,children:m}),(0,k.jsx)(J.Item,{value:I,children:_}),(0,k.jsx)(J.Item,{value:R,children:g}),(0,k.jsx)(J.Item,{value:ne,children:p}),(0,k.jsx)(J.Item,{value:F,children:h}),(0,k.jsx)(J.Item,{value:re,disabled:!0,children:v}),(0,k.jsx)(J.Item,{value:L,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},oJ=e=>{let t=(0,B.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=yC()?.internationalization?.locales??[],s=YS(n),c=KS(n),l=e=>{a(WS(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,k.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,k.jsx)(aJ,{section:n,onValueChange:e=>a(WS(e,o))}),(0,k.jsx)(oJ,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,k.jsx)(aJ,{section:n,onValueChange:e=>a(WS(e,o))}),(0,k.jsx)(oJ,{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(WS(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(aJ,{section:n,onValueChange:s}),(0,k.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,k.jsx)(lJ,{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(WS(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,k.jsx)(aJ,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},sJ=e=>{let t=(0,B.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=gC(),{renameEditedContent:c,addEditedContent:l}=bC(),{titleInput:u,deleteButton:d}=yt(rJ),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,k.jsx)(Xx,{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":dt(i,o?.keyPath??[]),onClick:e,children:(0,k.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,k.jsxs)(`div`,{className:`w-full`,children:[(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,k.jsx)(KC,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,k.jsx)(tS,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Ru,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,k.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,ht(n),` )`]})]}),(0,k.jsx)(oJ,{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},cJ=e=>{let t=(0,B.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=yt(rJ),{setFocusedContentKeyPath:o}=gC(),{addEditedContent:s}=bC();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.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:ee,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,k.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,k.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,k.jsx)(`li`,{className:`flex w-full`,children:(0,k.jsx)(sJ,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:ee,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,k.jsx)(tS,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Pu,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},lJ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,k.jsx)(sJ,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,k.jsx)(cJ,{section:e,keyPath:t,dictionaryLocalId:n}),uJ=e=>{let t=(0,B.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=xC(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,k.jsx)(sJ,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},dJ=e=>{let t=(0,B.c)(24),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=yC(),{returnToDictionaryList:d}=yt(Rq),{focusedContent:f,setFocusedContent:p}=gC(),{setLocaleDictionary:m}=pC(),[h,g]=(0,O.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,O.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,k.jsx)(iw,{availableLocales:u?.internationalization?.locales??[],children:(0,k.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,k.jsx)(tS,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:mu,label:d.label.value,children:d.text}),(0,k.jsxs)(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,k.jsx)(`div`,{className:`sticky top-0 z-10 flex shrink-0 gap-3 rounded-xl bg-background/20 p-3 pb-4`,children:(0,k.jsx)(Uq,{selectedChoice:h,tabs:[...a.includes(`remote`)?[(0,k.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,k.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,k.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,k.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,k.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:(0,k.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-stretch gap-6`,children:[a.includes(`remote`)&&h===`details`&&(0,k.jsx)(Jq,{dictionary:n,mode:a}),h===`structure`&&(0,k.jsx)(uJ,{dictionary:n}),h===`content`&&(0,k.jsx)(iI,{dictionary:n,isDarkMode:i}),h===`json`&&(0,k.jsx)(tJ,{dictionary:n,isDarkMode:i})]})})]}),(0,k.jsx)(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:(0,k.jsxs)(Xx,{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,k.jsx)(Bq,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,k.jsx)(Lq,{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},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}},pJ=()=>{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)},mJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},hJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},gJ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},_J=(e=`md`)=>{let t=fJ(e),n=pJ(),r=gJ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:mJ(),isMac:hJ()}},vJ=e=>{let t=(0,B.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=_J(n),t[0]=n,t[1]=r);let[i,a]=(0,O.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(_J(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,O.useEffect)(o,s),i},yJ=e=>{let t=(0,B.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,O.useRef)(``),p=(0,O.useRef)(null),[m,h]=(0,O.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,O.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},bJ=({children:e,className:t,identifier:n,...r})=>(0,k.jsx)(`div`,{className:W(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),xJ=({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,k.jsx)(Xx,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:W(`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});bJ.Detail=xJ;var SJ=e=>(0,k.jsx)(bJ,{...e}),CJ=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,O.useRef)(null),[i,a]=(0,O.useState)(e),[o,s]=(0,O.useState)(t),[c,l]=(0,O.useState)(void 0);return(0,O.useEffect)(()=>{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,k.jsx)(xJ,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},wJ=SJ;wJ.Detail=CJ;var TJ=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()})}},EJ=()=>{let e=(0,B.c)(2),t=(0,O.useSyncExternalStore)(TJ.subscribe,TJ.getSnapshot,DJ),n;return e[0]===t?n=e[1]:(n={open:TJ.open,close:TJ.close,set:TJ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function DJ(){return{}}var OJ={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`]},kJ=e=>e.split(` + `).map(e=>e.trim()),AJ=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,jJ=(e,t)=>{let n=t.map(AJ),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(AJ(e)));if(!i)return!1;let a=AJ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},MJ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,NJ=(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},PJ=e=>{let t=(0,B.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=kJ(NJ(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,O.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(MJ(i))):a.add(i.toUpperCase()),g(a),!l&&r&&jJ(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,O.useEffect)(_,v),!c)return null;let y;t[10]===h?y=t[11]:(y=e=>{let t=e.toUpperCase(),n=AJ(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=MJ(e);return(0,k.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,k.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,k.jsx)(`span`,{className:W(`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,k.jsx)(`kbd`,{className:W(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 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},FJ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,k.jsx)(`div`,{className:W(`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,k.jsx)(`div`,{style:{minWidth:`${n}px`},className:W(r===`right`&&`ml-auto`),children:e})}),IJ=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},LJ=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=yt(OJ),{isMobile:d}=vJ(`md`),f=(0,O.useRef)(null),p=(0,O.useRef)(null),m=cq(l),{open:h,close:g,isOpen:_}=EJ(),v=_(t),y=v;pq({disableScroll:y,key:t?`right_drawer_${t}`:`right_drawer`}),(0,O.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=y&&a,r=e.target&&!f.current.contains(e.target),i=IJ(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,O.useRef)(c);return(0,O.useEffect)(()=>{b.current=c},[c]),(0,O.useEffect)(()=>{s!==void 0&&s!==v&&(s?h(t):(g(t),b.current?.()))},[s,v,t,h,g]),m?(0,wc.createPortal)((0,k.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,k.jsx)(FJ,{isHidden:!y,align:`right`,children:(0,k.jsxs)(Xx,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,k.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,k.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,k.jsx)(`div`,{children:o&&(0,k.jsx)(tS,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:vu,children:o?.text})}),(0,k.jsx)(`div`,{children:(0,k.jsxs)(wJ,{identifier:`close-drawer`,children:[(0,k.jsx)(tS,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Bu,size:`icon-md`}),(0,k.jsx)(wJ.Detail,{identifier:`close-drawer`,children:(0,k.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,k.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,k.jsx)(PJ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,k.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,k.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,k.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,k.jsx)(k.Fragment,{})},RJ=ru(`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-red-500 bg-red-500/10 text-red-500 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`}}),zJ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,k.jsx)(`div`,{className:RJ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),BJ=`dictionaryList`,VJ=e=>`dictionary_edition_${e}`,HJ=e=>{let t=(0,B.c)(20),n;t[0]===e?n=t[1]:(n=VJ(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=EJ(),{getEditedContentValue:s}=bC(),{focusedContent:c,setFocusedContent:l}=gC(),u,d;t[2]!==c||t[3]!==r||t[4]!==a?(u=()=>{c&&(c.keyPath?.length??0)>0&&a(r)},d=[c,a,r],t[2]=c,t[3]=r,t[4]=a,t[5]=u,t[6]=d):(u=t[5],d=t[6]),(0,O.useEffect)(u,d);let f;t[7]!==i||t[8]!==r?(f=i(r),t[7]=i,t[8]=r,t[9]=f):f=t[9];let p;t[10]!==o||t[11]!==c||t[12]!==r||t[13]!==l?(p=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[10]=o,t[11]=c,t[12]=r,t[13]=l,t[14]=p):p=t[14];let m;return t[15]!==c||t[16]!==s||t[17]!==f||t[18]!==p?(m={isOpen:f,focusedContent:c,getEditedContentValue:s,close:p},t[15]=c,t[16]=s,t[17]=f,t[18]=p,t[19]=m):m=t[19],m},UJ=e=>{let t=(0,B.c)(77),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=yt(Jx),l;t[0]===n?l=t[1]:(l=VJ(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=HJ(n),{setFocusedContent:p}=gC(),{open:m}=EJ(),h;t[2]===m?h=t[3]:(h=()=>m(BJ),t[2]=m,t[3]=h);let g=h,{data:_}=cD(),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,O.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,k.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let w,T,E,D,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,k.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[31]=c,t[32]=e),A=e;break bb0}w=LJ,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?(D=()=>{f(),p(null)},t[36]=f,t[37]=p,t[38]=D):D=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,k.jsx)(tS,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Nu,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,k.jsx)(wJ.Detail,{identifier:`open-dictionary-editor`,children:(0,k.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,k.jsxs)(wJ,{identifier:`open-dictionary-editor`,children:[n,r]}),t[44]=n,t[45]=r,t[46]=o):o=t[46],P=(0,k.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,k.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-dashed pb-3`,M=(0,k.jsx)(zJ,{color:`text`,roundedSize:`full`,size:`xs`,children:T.key}),N=T.filePath&&(0,k.jsx)(zJ,{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]=D,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],D=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,k.jsx)(zJ,{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,k.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,k.jsxs)(k.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,k.jsx)(Lq,{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 re;t[61]!==T||t[62]!==b||t[63]!==d||t[64]!==y||t[65]!==r||t[66]!==o||t[67]!==C?(re=d&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Fq,{isOpen:b,onClose:()=>x(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,k.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,k.jsx)(dJ,{dictionary:T,onClickDictionaryList:C,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{x(!1),y()},onSave:()=>{x(!1)}})})}),(0,k.jsx)($C,{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]=re):re=t[68];let R;return t[69]!==w||t[70]!==E||t[71]!==D||t[72]!==ee||t[73]!==ne||t[74]!==re||t[75]!==F?(R=(0,k.jsx)(w,{identifier:F,backButton:E,onClose:D,header:ee,footer:ne,children:re}),t[69]=w,t[70]=E,t[71]=D,t[72]=ee,t[73]=ne,t[74]=re,t[75]=F,t[76]=R):R=t[76],R},WJ=e=>{let t=(0,B.c)(4),{isDarkMode:n}=e,{focusedContent:r}=gC(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,k.jsx)(UJ,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},GJ={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`]},KJ=()=>{let{drawerTitle:e,buttonLabel:t}=yt(GJ),{set:n}=EJ(),{localeDictionaries:r}=fC(),{editedContent:i}=xC(),{setFocusedContent:a}=gC(),{setSearch:o,search:s}=yJ(),c=(0,O.useMemo)(()=>new ZF(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,O.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({[BJ]:!1,[VJ(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,k.jsxs)(LJ,{title:e.label.value,identifier:BJ,children:[(0,k.jsx)(`div`,{className:`p-3 pb-4`,children:(0,k.jsx)(nG,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,k.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,k.jsx)(`li`,{className:`w-full`,children:(0,k.jsx)(tS,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:yu,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Mu:void 0,children:(0,k.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,k.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,k.jsx)(zJ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,k.jsx)(zJ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,k.jsx)(zJ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,k.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},qJ={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`]},JJ=()=>{let e=(0,B.c)(8),{message:t}=yt(qJ),[n]=uC(CS.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=W(`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,k.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},YJ=e=>{let t=(0,B.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,k.jsx)(JJ,{})}),i=(0,k.jsx)(WJ,{}),a=(0,k.jsx)(KJ,{}),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,k.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},XJ=()=>{let e=(0,B.c)(2),[t,n]=(0,O.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(ZJ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,O.useEffect)(r,i),t};function ZJ(e){return e.json()}var QJ=e=>{let t=(0,B.c)(11),{children:n,iframeRef:r}=e,i=XJ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(Qx,{}),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,k.jsx)(_C,{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},$J={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`]},eY=()=>{let e=(0,B.c)(9),{editedContent:t,setEditedContentState:n}=xC(),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,O.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,O.useEffect)(s,c),i},tY={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`]},nY=()=>{let e=(0,B.c)(11),{title:t,description:n,documentationLink:r}=yt(tY),i;e[0]===t?i=e[1]:(i=(0,k.jsx)(Oq,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,k.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,k.jsx)(gP,{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,k.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},rY=e=>{let t=(0,B.c)(23),{iframeRef:n,applicationPath:r}=e,i=yt($J),{editor:a}=yC()??{},{enabled:o}=SC(),s=CC();eY(),TC();let[c,l]=(0,O.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=dC(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,O.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(Xx,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,k.jsx)(nY,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,k.jsx)(Qx,{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=W(`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,k.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,k.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,k.jsx)(tS,{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,k.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},iY=()=>{let e=(0,B.c)(2),t=(0,O.useRef)(null),n=zn(),r;return e[0]===n.pathname?r=e[1]:(r=(0,k.jsx)(QJ,{iframeRef:t,children:(0,k.jsx)(_t,{disableEditor:!0,children:(0,k.jsx)(YJ,{children:(0,k.jsx)(rY,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,Fo.createRoot)(document.getElementById(`root`)).render((0,k.jsx)(O.StrictMode,{children:(0,k.jsx)(()=>{let e=(0,B.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,k.jsx)(qx,{children:(0,k.jsx)(Kx,{children:(0,k.jsx)(iY,{})})}),e[0]=t):t=e[0],t},{})}));export{x as C,u as E,D as S,c as T,pu as _,Eq as a,yt as b,kq as c,gP as d,J as f,Xx as g,tS as h,Fq as i,Aq as l,nS as m,Qq as n,Dq as o,tw as p,Uq as r,Oq as s,wJ as t,jq as u,ru as v,p as w,Le as x,W as y};
|
|
185
|
+
}`,BW=18,VW=40,HW=`${VW}px`,UW=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`),WW=e=>{let t=(0,B.c)(21),{containerRef:n,inputRef:r,pushPasswordManagerStrategy:i,isFocused:a}=e,[o,s]=(0,O.useState)(!1),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.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-BW,f=c;document.querySelectorAll(UW).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>=VW)};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,O.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,O.useEffect)(_,v);let y;return t[18]!==o||t[19]!==f?(y={hasPWMBadge:o,willPushPWMBadge:f,PWM_BADGE_SPACE_WIDTH:HW},t[18]=o,t[19]=f,t[20]=y):y=t[20],y},GW=e=>{let t=(0,O.useRef)(void 0);return(0,O.useEffect)(()=>{t.current=e}),t.current},KW=(0,O.createContext)({}),qW=({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=zW,render:f,children:p,...m})=>{let[h,g]=(0,O.useState)(typeof m.defaultValue==`string`?m.defaultValue:``),_=e??h,v=GW(_),y=e=>{t?.(e),g(e)},b=r===void 0?null:typeof r==`string`?new RegExp(r):r,x=(0,O.useRef)(null),S=(0,O.useRef)(null),C=(0,O.useRef)({value:_,onChange:y,isIOS:typeof window<`u`&&window?.CSS?.supports?.(`-webkit-touch-callout`,`none`)}),w=(0,O.useRef)({prev:[x.current?.selectionStart??null,x.current?.selectionEnd??null,x.current?.selectionDirection??`none`]});(0,O.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;`;RW(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),RW(e.sheet,`[data-input-otp]:autofill { ${t} }`),RW(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),RW(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; } }`),RW(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,O.useState)(!1),[D,A]=(0,O.useState)(!1),[j,M]=(0,O.useState)(null),[N,P]=(0,O.useState)(null),[F,I]=(0,O.useState)(null);(0,O.useEffect)(()=>{LW(()=>{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])})},[_,D]),(0,O.useEffect)(()=>{v!==void 0&&_!==v&&v.length<n&&_.length===n&&o?.(_)},[n,o,v,_]);let L=(0,O.useRef)(null);(0,O.useEffect)(()=>{let e=D&&F!==null?F:null;e!==L.current&&(L.current=e,s?.(e))},[D,F,s]);let ee=WW({containerRef:S,inputRef:x,pushPasswordManagerStrategy:c,isFocused:D}),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)},re=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)}},R={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)`},z=(0,k.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:R,maxLength:n,value:_,ref:x,onPaste:e=>{re(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)}}),ie={slots:Array.from({length:n}).map((e,t)=>{let n=D&&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:D,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)}},ae=f===void 0?(0,k.jsx)(KW.Provider,{value:ie,children:p}):f(ie);return(0,k.jsxs)(k.Fragment,{children:[d!==null&&(0,k.jsx)(`noscript`,{children:(0,k.jsx)(`style`,{children:d})}),(0,k.jsxs)(`div`,{ref:S,className:W(`relative`,m.disabled?`cursor-default`:`cursor-text`,u),children:[ae,(0,k.jsx)(`div`,{className:`absolute inset-0`,children:z})]})]})},JW=({className:e,render:t,...n})=>(0,k.jsx)(qW,{containerClassName:`relative flex items-center gap-2 has-disabled:opacity-50`,className:W(`disabled:cursor-not-allowed`,e),render:t,...n}),YW=({className:e,...t})=>(0,k.jsx)(`div`,{className:W(`z-10 flex items-center gap-3`,e),...t}),XW=e=>{let t=(0,B.c)(10),{index:n,className:r,onClick:i,onKeyDown:a,...o}=e,s=(0,O.useContext)(KW),{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,k.jsx)(tS,{isSelected:l,variant:`input`,color:`custom`,tabIndex:-1,className:W(`relative z-10 px-2!`,l&&`ring-4!`,r),onClick:p,onKeyDown:h,label:null,...o,children:(0,k.jsx)(`span`,{className:`relative z-10 flex h-6 w-4 items-center justify-center`,children:c})})},ZW=e=>(0,k.jsx)(`div`,{"aria-hidden":!0,className:`z-0 table h-0.5 w-3 rounded-full text-text/50`,...e,children:(0,k.jsx)(ku,{})}),QW=e=>(0,k.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}),$W=e=>e?.getAttribute(`aria-selected`)===`true`,eG=({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}=CW(),f=(0,O.useRef)([]),{choiceIndicatorPosition:p,calculatePosition:m}=sS(f,{selector:$W,isHoverable:!0});return(0,O.useEffect)(()=>{m()},[]),(0,k.jsx)(OW,{htmlFor:t,label:n,description:r,isRequired:i,info:a,showErrorMessage:o,"aria-invalid":!!d,children:(0,k.jsx)(JW,{onChange:e.onChange,defaultValue:e.value,maxLength:l,pattern:`^[0-9]+$`,onActiveSlotChange:m,...u,children:s??(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(YW,{children:[(0,k.jsx)(XW,{index:0,ref:e=>{f.current[0]=e}}),(0,k.jsx)(XW,{index:1,ref:e=>{f.current[1]=e}}),(0,k.jsx)(XW,{index:2,ref:e=>{f.current[2]=e}})]}),(0,k.jsx)(ZW,{}),(0,k.jsxs)(YW,{children:[(0,k.jsx)(XW,{index:3,ref:e=>{f.current[3]=e}}),(0,k.jsx)(XW,{index:4,ref:e=>{f.current[4]=e}}),(0,k.jsx)(XW,{index:5,ref:e=>{f.current[5]=e}})]}),p&&(0,k.jsx)(QW,{style:p})]})})})},tG=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}=VR();return(0,k.jsx)($.Field,{control:p,name:t,render:e=>{let{field:c}=e;return(0,k.jsx)(eG,{field:c,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,slots:d,maxLength:f,...u,children:s})}})},nG=({className:e,...t})=>(0,k.jsxs)(`div`,{className:`relative flex w-full items-center gap-1`,children:[(0,k.jsx)(Lu,{className:`absolute left-2 size-4`}),(0,k.jsx)(MC,{...t,type:`search`,className:W(`pl-8`,e)})]}),rG=e=>(0,k.jsx)(AW,{id:e.name,"data-testid":e.name,Element:nG,"aria-labelledby":e.label?`${e.name}-label`:void 0,"aria-label":e.label?void 0:e.name,...e}),iG=e=>(0,k.jsx)(AW,{Element:NC,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}),aG=e=>(0,k.jsx)(AW,{Element:IC,id:e.name,"data-testid":e.name,...e}),oG=ru([`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`,destructive:`border-destructive/30 text-destructive ring-destructive/20 checked:border-destructive checked:bg-destructive`,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:`primary`,validationStyleEnabled:`disabled`,size:`md`}}),sG=({validationStyleEnabled:e=!1,label:t,size:n,color:r,name:i,variant:a,className:o,labelClassName:s,...c})=>(0,k.jsx)(`input`,{type:`checkbox`,className:W(oG({variant:a,size:n,color:r,validationStyleEnabled:e?`enabled`:`disabled`}),o),...c}),cG=e=>{let{label:t,name:n,id:r}=e;return t?(0,k.jsxs)(`label`,{htmlFor:r??n,className:W(`flex w-full cursor-pointer items-center gap-x-4 font-medium text-sm`,e.size===`xs`&&`text-xs`,e.labelClassName),children:[(0,k.jsx)(sG,{id:r??n,...e}),t]}):(0,k.jsx)(sG,{id:r??n,...e})},lG=({inputLabel:e,value:t,onChange:n,...r})=>(0,k.jsx)(cG,{...r,label:e,checked:!!t,onChange:n}),uG=({autoComplete:e,...t})=>(0,k.jsx)(AW,{Element:lG,id:t.name,"data-testid":t.name,autoComplete:e,...t}),dG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=CW();return(0,k.jsx)(OW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(iR,{onValueChange:t.onChange,values:t.value,...l,children:c})})},fG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=VR();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(dG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},pG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=CW();return(0,k.jsx)(OW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(J,{onValueChange:t.onChange,defaultValue:t.value,...l,children:c})})},mG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=VR();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(pG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},hG=e=>{let{field:t,name:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,children:c,...l}=e,{error:u}=CW();return(0,k.jsx)(OW,{htmlFor:n,label:r,description:i,isRequired:a,info:o,showErrorMessage:s,"aria-invalid":!!u,children:(0,k.jsx)(gS,{...t,...l,children:c})})},gG=e=>{let{name:t,description:n,label:r,isRequired:i,info:a,showErrorMessage:o,children:s,...c}=e,{control:l}=VR();return(0,k.jsx)($.Field,{control:l,name:t,render:e=>{let{field:l}=e;return(0,k.jsx)(hG,{field:l,name:t,label:r,description:n,isRequired:i,info:a,showErrorMessage:o,...c,children:s})}})},_G=Symbol.for(`react.lazy`),vG=O.use;function yG(e){return typeof e==`object`&&!!e&&`then`in e}function bG(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===_G&&`_payload`in e&&yG(e._payload)}function xG(e){let t=CG(e),n=O.forwardRef((e,n)=>{let{children:r,...i}=e;bG(r)&&typeof vG==`function`&&(r=vG(r._payload));let a=O.Children.toArray(r),o=a.find(TG);if(o){let e=o.props.children,r=a.map(t=>t===o?O.Children.count(e)>1?O.Children.only(null):O.isValidElement(e)?e.props.children:null:t);return(0,k.jsx)(t,{...i,ref:n,children:O.isValidElement(e)?O.cloneElement(e,void 0,r):null})}return(0,k.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var SG=xG(`Slot`);function CG(e){let t=O.forwardRef((e,t)=>{let{children:n,...r}=e;if(bG(n)&&typeof vG==`function`&&(n=vG(n._payload)),O.isValidElement(n)){let e=DG(n),i=EG(r,n.props);return n.type!==O.Fragment&&(i.ref=t?fc(t,e):e),O.cloneElement(n,i)}return O.Children.count(n)>1?O.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var wG=Symbol(`radix.slottable`);function TG(e){return O.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===wG}function EG(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 DG(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 OG=e=>{let t=(0,B.c)(5),{error:n,formItemId:r,formDescriptionId:i,formMessageId:a}=CW(),o=n?`${i} ${a}`:`${i}`,s=!!n,c;return t[0]!==r||t[1]!==e||t[2]!==o||t[3]!==s?(c=(0,k.jsx)(SG,{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},kG=e=>{let t=(0,B.c)(3),{formDescriptionId:n}=CW(),r;return t[0]!==n||t[1]!==e?(r=(0,k.jsx)(`p`,{className:`text-neutral text-sm`,id:n,...e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],r},AG=e=>{let{children:t,...n}=e,{error:r,formMessageId:i}=CW(),a=r?String(r?.message??``):t;return a?(0,k.jsx)(`p`,{className:`font-medium text-error text-xs`,role:`alert`,id:i,...n,children:a}):null},$=_W;$.Description=kG,$.Control=OG,$.Field=SW,$.Item=yW,$.Label=DW,$.Message=AG,$.Element=AW,$.Input=NW,$.InputPassword=IW,$.Checkbox=uG,$.TextArea=iG,$.AutoSizedTextArea=aG,$.Button=tS,$.Select=mG,$.MultiSelect=fG,$.EditableFieldInput=jW,$.EditableFieldTextArea=MW,$.SwitchSelector=gG,$.OTP=tG,$.SearchInput=rG;var jG=Z(`ZodISODateTime`,(e,t)=>{XV.init(e,t),iK.init(e,t)});function MG(e){return gU(jG,e)}var NG=Z(`ZodISODate`,(e,t)=>{ZV.init(e,t),iK.init(e,t)});function PG(e){return _U(NG,e)}var FG=Z(`ZodISOTime`,(e,t)=>{QV.init(e,t),iK.init(e,t)});function IG(e){return vU(FG,e)}var LG=Z(`ZodISODuration`,(e,t)=>{$V.init(e,t),iK.init(e,t)});function RG(e){return yU(LG,e)}var zG=Z(`ZodError`,(e,t)=>{OB.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>jB(e,t)},flatten:{value:t=>AB(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Jz,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Jz,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),BG=MB(zG),VG=PB(zG),HG=IB(zG),UG=RB(zG),WG=BB(zG),GG=VB(zG),KG=HB(zG),qG=UB(zG),JG=WB(zG),YG=GB(zG),XG=KB(zG),ZG=qB(zG),QG=new WeakMap;function $G(e,t,n){let r=Object.getPrototypeOf(e),i=QG.get(r);if(i||(i=new Set,QG.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 eK=Z(`ZodType`,(e,t)=>(IV.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:qU(e,`input`),output:qU(e,`output`)}}),e.toJSONSchema=KU(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.parse=(t,n)=>BG(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>HG(e,t,n),e.parseAsync=async(t,n)=>VG(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>UG(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>WG(e,t,n),e.decode=(t,n)=>GG(e,t,n),e.encodeAsync=async(t,n)=>KG(e,t,n),e.decodeAsync=async(t,n)=>qG(e,t,n),e.safeEncode=(t,n)=>JG(e,t,n),e.safeDecode=(t,n)=>YG(e,t,n),e.safeEncodeAsync=async(t,n)=>XG(e,t,n),e.safeDecodeAsync=async(t,n)=>ZG(e,t,n),$G(e,`ZodType`,{check(...e){let t=this.def;return this.clone(tB(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 dB(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(aq(e,t))},superRefine(e,t){return this.check(oq(e,t))},overwrite(e){return this.check(jU(e))},optional(){return VK(this)},exactOptional(){return UK(this)},nullable(){return GK(this)},nullish(){return VK(GK(this))},nonoptional(e){return ZK(this,e)},array(){return kK(this)},or(e){return NK([this,e])},and(e){return FK(this,e)},transform(e){return tq(this,zK(e))},default(e){return qK(this,e)},prefault(e){return YK(this,e)},catch(e){return $K(this,e)},pipe(e){return tq(this,e)},readonly(){return rq(this)},describe(e){let t=this.clone();return KH.add(t,{description:e}),t},meta(...e){if(e.length===0)return KH.get(this);let t=this.clone();return KH.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 KH.get(e)?.description},configurable:!0}),e)),tK=Z(`_ZodString`,(e,t)=>{LV.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YU(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,$G(e,`_ZodString`,{regex(...e){return this.check(TU(...e))},includes(...e){return this.check(OU(...e))},startsWith(...e){return this.check(kU(...e))},endsWith(...e){return this.check(AU(...e))},min(...e){return this.check(CU(...e))},max(...e){return this.check(SU(...e))},length(...e){return this.check(wU(...e))},nonempty(...e){return this.check(CU(1,...e))},lowercase(e){return this.check(EU(e))},uppercase(e){return this.check(DU(e))},trim(){return this.check(NU())},normalize(...e){return this.check(MU(...e))},toLowerCase(){return this.check(PU())},toUpperCase(){return this.check(FU())},slugify(){return this.check(IU())}})}),nK=Z(`ZodString`,(e,t)=>{LV.init(e,t),tK.init(e,t),e.email=t=>e.check(JH(aK,t)),e.url=t=>e.check(eU(cK,t)),e.jwt=t=>e.check(hU(CK,t)),e.emoji=t=>e.check(tU(lK,t)),e.guid=t=>e.check(YH(oK,t)),e.uuid=t=>e.check(XH(sK,t)),e.uuidv4=t=>e.check(ZH(sK,t)),e.uuidv6=t=>e.check(QH(sK,t)),e.uuidv7=t=>e.check($H(sK,t)),e.nanoid=t=>e.check(nU(uK,t)),e.guid=t=>e.check(YH(oK,t)),e.cuid=t=>e.check(rU(dK,t)),e.cuid2=t=>e.check(iU(fK,t)),e.ulid=t=>e.check(aU(pK,t)),e.base64=t=>e.check(fU(bK,t)),e.base64url=t=>e.check(pU(xK,t)),e.xid=t=>e.check(oU(mK,t)),e.ksuid=t=>e.check(sU(hK,t)),e.ipv4=t=>e.check(cU(gK,t)),e.ipv6=t=>e.check(lU(_K,t)),e.cidrv4=t=>e.check(uU(vK,t)),e.cidrv6=t=>e.check(dU(yK,t)),e.e164=t=>e.check(mU(SK,t)),e.datetime=t=>e.check(MG(t)),e.date=t=>e.check(PG(t)),e.time=t=>e.check(IG(t)),e.duration=t=>e.check(RG(t))});function rK(e){return qH(nK,e)}var iK=Z(`ZodStringFormat`,(e,t)=>{RV.init(e,t),tK.init(e,t)}),aK=Z(`ZodEmail`,(e,t)=>{VV.init(e,t),iK.init(e,t)}),oK=Z(`ZodGUID`,(e,t)=>{zV.init(e,t),iK.init(e,t)}),sK=Z(`ZodUUID`,(e,t)=>{BV.init(e,t),iK.init(e,t)}),cK=Z(`ZodURL`,(e,t)=>{HV.init(e,t),iK.init(e,t)}),lK=Z(`ZodEmoji`,(e,t)=>{UV.init(e,t),iK.init(e,t)}),uK=Z(`ZodNanoID`,(e,t)=>{WV.init(e,t),iK.init(e,t)}),dK=Z(`ZodCUID`,(e,t)=>{GV.init(e,t),iK.init(e,t)}),fK=Z(`ZodCUID2`,(e,t)=>{KV.init(e,t),iK.init(e,t)}),pK=Z(`ZodULID`,(e,t)=>{qV.init(e,t),iK.init(e,t)}),mK=Z(`ZodXID`,(e,t)=>{JV.init(e,t),iK.init(e,t)}),hK=Z(`ZodKSUID`,(e,t)=>{YV.init(e,t),iK.init(e,t)}),gK=Z(`ZodIPv4`,(e,t)=>{eH.init(e,t),iK.init(e,t)}),_K=Z(`ZodIPv6`,(e,t)=>{tH.init(e,t),iK.init(e,t)}),vK=Z(`ZodCIDRv4`,(e,t)=>{nH.init(e,t),iK.init(e,t)}),yK=Z(`ZodCIDRv6`,(e,t)=>{rH.init(e,t),iK.init(e,t)}),bK=Z(`ZodBase64`,(e,t)=>{aH.init(e,t),iK.init(e,t)}),xK=Z(`ZodBase64URL`,(e,t)=>{sH.init(e,t),iK.init(e,t)}),SK=Z(`ZodE164`,(e,t)=>{cH.init(e,t),iK.init(e,t)}),CK=Z(`ZodJWT`,(e,t)=>{uH.init(e,t),iK.init(e,t)}),wK=Z(`ZodUnknown`,(e,t)=>{dH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function TK(){return bU(wK)}var EK=Z(`ZodNever`,(e,t)=>{fH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XU(e,t,n,r)});function DK(e){return xU(EK,e)}var OK=Z(`ZodArray`,(e,t)=>{mH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eW(e,t,n,r),e.element=t.element,$G(e,`ZodArray`,{min(e,t){return this.check(CU(e,t))},nonempty(e){return this.check(CU(1,e))},max(e,t){return this.check(SU(e,t))},length(e,t){return this.check(wU(e,t))},unwrap(){return this.element}})});function kK(e,t){return LU(OK,e,t)}var AK=Z(`ZodObject`,(e,t)=>{yH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tW(e,t,n,r),$z(e,`shape`,()=>t.shape),$G(e,`ZodObject`,{keyof(){return LK(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:TK()})},loose(){return this.clone({...this._zod.def,catchall:TK()})},strict(){return this.clone({...this._zod.def,catchall:DK()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return hB(this,e)},safeExtend(e){return gB(this,e)},merge(e){return _B(this,e)},pick(e){return pB(this,e)},omit(e){return mB(this,e)},partial(...e){return vB(BK,this,e[0])},required(...e){return yB(XK,this,e[0])}})});function jK(e,t){return new AK({type:`object`,shape:e??{},...Q(t)})}var MK=Z(`ZodUnion`,(e,t)=>{xH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nW(e,t,n,r),e.options=t.options});function NK(e,t){return new MK({type:`union`,options:e,...Q(t)})}var PK=Z(`ZodIntersection`,(e,t)=>{SH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rW(e,t,n,r)});function FK(e,t){return new PK({type:`intersection`,left:e,right:t})}var IK=Z(`ZodEnum`,(e,t)=>{TH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZU(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 IK({...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 IK({...t,checks:[],...Q(r),entries:i})}});function LK(e,t){return new IK({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...Q(t)})}var RK=Z(`ZodTransform`,(e,t)=>{EH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$U(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Wz(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(EB(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(EB(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 zK(e){return new RK({type:`transform`,transform:e})}var BK=Z(`ZodOptional`,(e,t)=>{OH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function VK(e){return new BK({type:`optional`,innerType:e})}var HK=Z(`ZodExactOptional`,(e,t)=>{kH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function UK(e){return new HK({type:`optional`,innerType:e})}var WK=Z(`ZodNullable`,(e,t)=>{AH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function GK(e){return new WK({type:`nullable`,innerType:e})}var KK=Z(`ZodDefault`,(e,t)=>{jH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function qK(e,t){return new KK({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():cB(t)}})}var JK=Z(`ZodPrefault`,(e,t)=>{NH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function YK(e,t){return new JK({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():cB(t)}})}var XK=Z(`ZodNonOptional`,(e,t)=>{PH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ZK(e,t){return new XK({type:`nonoptional`,innerType:e,...Q(t)})}var QK=Z(`ZodCatch`,(e,t)=>{IH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function $K(e,t){return new QK({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var eq=Z(`ZodPipe`,(e,t)=>{LH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lW(e,t,n,r),e.in=t.in,e.out=t.out});function tq(e,t){return new eq({type:`pipe`,in:e,out:t})}var nq=Z(`ZodReadonly`,(e,t)=>{zH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uW(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function rq(e){return new nq({type:`readonly`,innerType:e})}var iq=Z(`ZodCustom`,(e,t)=>{VH.init(e,t),eK.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QU(e,t,n,r)});function aq(e,t={}){return RU(iq,e,t)}function oq(e,t){return zU(e,t)}var sq={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`]},cq=e=>{let t=(0,B.c)(3),[n,r]=(0,O.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,O.useEffect)(i,a),n},lq=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()})}},uq=[],dq=()=>{let e=(0,B.c)(2),t=(0,O.useSyncExternalStore)(lq.subscribe,lq.getSnapshot,fq),n;return e[0]===t?n=e[1]:(n={scrollBlockers:t,addBlockage:lq.addBlockage,removeBlockage:lq.removeBlockage,isElementScrollBlocked:lq.isElementScrollBlocked},e[0]=t,e[1]=n),n};function fq(){return uq}var pq=e=>{let t=(0,B.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}=dq(),d=cq(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,O.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},mq=`relative scroll-mb-8 scroll-mt-[30vh] scroll-p-8`,hq=`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`,gq=({className:e,...t})=>(0,k.jsx)(`h1`,{className:W(`font-bold text-2xl`,e),...t}),_q=({className:e,...t})=>(0,k.jsx)(`h2`,{className:W(`mb-2 font-bold text-2xl`,mq,e),...t}),vq=({className:e,...t})=>(0,k.jsx)(`h3`,{className:W(`mb-2 font-bold text-xl`,mq,e),...t}),yq=({className:e,...t})=>(0,k.jsx)(`h4`,{className:W(`font-bold text-lg`,mq,e),...t}),bq=({className:e,...t})=>(0,k.jsx)(`h5`,{className:W(`font-bold text-base`,mq,e),...t}),xq=({className:e,...t})=>(0,k.jsx)(`h6`,{className:W(`ml-3 font-bold text-base`,mq,e),...t}),Sq=e=>String(e).normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/\s+/g,`-`).toLowerCase(),Cq=e=>{let t=(document.getElementById(e)?.getBoundingClientRect()?.top??0)+window.scrollY-150;window.scrollTo({top:t,behavior:`smooth`})},wq=(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},Tq=({H:e,children:t,className:n,isClickable:r,...i})=>{let a=typeof t==`string`?Sq(t):void 0;return(0,k.jsx)(e,{id:a,onClick:r?e=>{let{id:t}=e.currentTarget;if(wq(e.currentTarget,e)&&typeof t==`string`){let e=`${window.location.href.split(`#`)[0]}#${t}`;navigator.clipboard.writeText(e),Cq(t)}}:void 0,"aria-label":r?`Click to scroll to section ${a} and copy the link to the clipboard`:void 0,className:W(r&&hq,n),...i,children:t})},Eq=({isClickable:e,...t})=>(0,k.jsx)(gq,{...t}),Dq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:_q,isClickable:e,...t}),Oq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:vq,isClickable:e,...t}),kq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:yq,isClickable:e,...t}),Aq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:bq,isClickable:e,...t}),jq=({isClickable:e=!1,...t})=>(0,k.jsx)(Tq,{H:xq,isClickable:e,...t}),Mq=ru(`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`}}),Nq={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`},Pq=Ux.create(Xx),Fq=e=>{let t=(0,B.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=cq(i),b=r&&_,x;t[0]===b?x=t[1]:(x={key:`modal`,disableScroll:b},t[0]=b,t[1]=x),pq(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,O.useEffect)(S,C),!y){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{}),t[6]=e):e=t[6],e}let w=!!s,T=Nq[v||`none`],E;return t[7]===a?E=t[8]:(E=e=>{e.stopPropagation(),a?.()},t[7]=a,t[8]=E),(0,wc.createPortal)((0,k.jsx)(Ux.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,k.jsxs)(Pq,{onClick:Iq,initial:{scale:r?.5:1},animate:{scale:r?1:.5},transition:{duration:.3},className:Mq({size:h,className:l}),role:`dialog`,"aria-modal":!0,roundedSize:`4xl`,padding:`none`,...p,children:[(0,k.jsxs)(`div`,{className:W(`relative flex-none px-4 pt-4`,m&&w?`flex items-start`:m?`flex justify-end`:w?`items-center`:`hidden`),children:[w&&(0,k.jsx)(Oq,{className:`mb-2 ml-1 flex items-center justify-center font-bold text-lg`,children:s}),m&&(0,k.jsx)(tS,{variant:`hoverable`,color:`text`,label:`Close modal`,className:`ml-auto`,onClick:e=>{e.stopPropagation(),a?.()},Icon:Bu,size:`icon-md`})]}),(0,k.jsx)(`div`,{className:W(`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,k.jsx)(`div`,{className:W(`flex h-full w-full flex-1 flex-col`,T),children:n})})]})}),y)};function Iq(e){return e.stopPropagation()}var Lq=e=>{let t=(0,B.c)(23),{dictionary:n,mode:r,className:i,onDelete:a,onSave:o,...s}=e,[c,l]=(0,O.useState)(!1),{setLocaleDictionary:u}=pC(),{mutate:d,isPending:f}=iD(),{mutate:p,isPending:m}=lD(),{mutate:h,isPending:g}=rD(),_=m||g,{editedContent:v,restoreEditedContent:y}=xC(),{deleteButton:b,resetButton:x,saveButton:S,publishButton:C,downloadButton:w,confirmation:T}=yt(sq),{isAuthenticated:E}=XE(),D=v?.[n.localId],A;t[0]!==n||t[1]!==D?(A=D&&JSON.stringify(D)!==JSON.stringify(n),t[0]=n,t[1]=D,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,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Fq,{isOpen:c,title:T.title.value,size:`md`,onClose:te,padding:`md`,children:(0,k.jsxs)(`form`,{className:`size-full`,children:[(0,k.jsx)(`p`,{className:`py-4 text-neutral text-sm`,children:T.message}),(0,k.jsxs)(`div`,{className:`mt-12 flex justify-end gap-2 max-md:flex-col`,children:[(0,k.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,k.jsx)($.Button,{label:T.confirmButton.label.value,disabled:!j||_,Icon:Iu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:P,children:T.confirmButton.text})]})]})}),(0,k.jsxs)(`form`,{className:W(`flex justify-end gap-2`,i),...s,children:[r.includes(`remote`)&&M&&a&&E&&(0,k.jsx)($.Button,{label:b.label.value,Icon:Ru,color:`error`,variant:`outline`,className:`max-md:w-full`,isLoading:f,onClick:ee,children:b.text}),j&&(0,k.jsx)($.Button,{label:x.label.value,disabled:!j,Icon:Fu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:()=>y(n.localId),children:x.text}),r.includes(`local`)&&(0,k.jsx)($.Button,{label:w.label.value,disabled:!j||_,Icon:wu,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,k.jsx)($.Button,{label:C.label.value,disabled:_,Icon:hu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:C.text}),r.includes(`remote`)&&E&&M&&j&&(0,k.jsx)($.Button,{label:S.label.value,disabled:!j||_,Icon:Iu,color:`text`,className:`max-md:w-full`,isLoading:g,onClick:I,children:S.text})]})]})},Rq={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`]},zq=(e,t=2e3,n,r)=>{let[i,a]=(0,O.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))}}}},Bq=e=>{let t=(0,B.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}=zq(n,g,c,l);if(u){let e;return t[0]!==r||t[1]!==i?(e=(0,k.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?Su:Cu;S=(0,k.jsxs)(`span`,{className:W(`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,k.jsx)(`span`,{className:`min-w-0 break-all`,children:r}),n&&(0,k.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},Vq=ru(`relative z-0 flex size-full flex-row items-center gap-2`,{variants:{color:{primary:`border-primary text-primary`,secondary:`border-secondary text-secondary`,destructive:`border-destructive bg-destructive text-destructive`,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`}}),Hq=ru(`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`,destructive:`bg-destructive/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`}}),Uq=({tabs:e,selectedChoice:t,onTabClick:n,color:r=`primary`,hoverable:i=!1,orientation:a=`horizontal`,className:o})=>{let s=(0,O.useRef)([]),c=(0,O.useRef)(null),{choiceIndicatorPosition:l,calculatePosition:u}=sS(s,{isHoverable:i,orientation:a});return(0,O.useEffect)(()=>{u()},[t]),(0,k.jsxs)(`div`,{className:W(Vq({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,O.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,k.jsx)(`div`,{className:W(Hq({color:r,orientation:a})),style:l,ref:c},`${t}${JSON.stringify(e.map(e=>e.key))}`)]})},Wq={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`]},Gq={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`]},Kq=e=>{let t=(0,B.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:_}=yt(Gq),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=jK({title:rK({error:y}).refine(qq,{error:i.value}).optional(),key:rK({error:b}).min(4,{error:c.value}).regex(/^[a-zA-Z0-9-_]+$/,{error:s.value}).default(``),description:rK({error:x}).optional(),projectIds:kK(rK({error:S})).default([e]),tags:kK(rK({error:C})).default([]),location:LK([`local`,`remote`,`hybrid`,`plugin`],{error:w}).optional(),importMode:LK([`static`,`dynamic`,`fetch`]).optional(),filePath:rK({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 qq(e){return e.length===0||e.length>=4}var Jq=e=>{let t=(0,B.c)(62),{dictionary:n,mode:r}=e,{session:i}=YE(),a;t[0]===i?a=t[1]:(a=i??{},t[0]=i,t[1]=a);let{project:o}=a,{data:s,isLoading:c}=nD(),{data:l}=aD(),u=s?.data??[],d=l?.data??[],f=Kq(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}=vW(f,m),{editedContent:_,setEditedDictionary:v}=xC(),{titleInput:y,keyInput:b,descriptionInput:x,projectInput:S,tagsSelect:C,locationSelect:w,importModeSelect:T,filePathInput:E,auditButton:D}=yt(Wq),{mutate:A,isPending:j}=oD(),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,O.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,O.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 re=LR(ne),R=re===`local`||re===`hybrid`,z;t[25]!==n||t[26]!==h||t[27]!==v||t[28]!==M?(z=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]=z):z=t[29];let ie;t[30]!==n||t[31]!==h||t[32]!==v||t[33]!==M?(ie=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]=ie):ie=t[34];let ae;t[35]!==n||t[36]!==h||t[37]!==v||t[38]!==M?(ae=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]=ae):ae=t[39];let oe;t[40]!==n||t[41]!==h||t[42]!==w||t[43]!==r||t[44]!==v||t[45]!==M?(oe=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,k.jsxs)($.Item,{className:`flex flex-col gap-2 px-1`,children:[(0,k.jsx)($.Label,{className:`ml-1`,children:w.label}),(0,k.jsxs)(`div`,{className:`ml-2 flex items-center gap-4 py-2`,children:[(0,k.jsx)(cG,{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,k.jsx)(cG,{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,k.jsx)($.Description,{children:w.testDescription}),(0,k.jsx)($.Message,{})]})},t[40]=n,t[41]=h,t[42]=w,t[43]=r,t[44]=v,t[45]=M,t[46]=oe):oe=t[46];let se;t[47]!==n||t[48]!==h||t[49]!==v||t[50]!==M?(se=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]=se):se=t[51];let ce;t[52]!==n||t[53]!==h||t[54]!==v||t[55]!==M?(ce=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]=ce):ce=t[56];let le;return t[57]!==n||t[58]!==h||t[59]!==v||t[60]!==M?(le=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]=le):le=t[61],(0,k.jsxs)($,{className:`flex w-full flex-col gap-8`,...h,schema:f,children:[(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,k.jsx)($.EditableFieldInput,{name:`key`,label:b.label,placeholder:b.label.value,description:b.description,disabled:g,isRequired:!0,onSave:z}),(0,k.jsx)($.EditableFieldInput,{name:`title`,label:y.label,placeholder:y.placeholder.value,description:y.description,disabled:g,onSave:ie})]}),(0,k.jsx)($.EditableFieldTextArea,{name:`description`,label:x.label,placeholder:x.placeholder.value,description:x.description,disabled:g,onSave:ae}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 px-1 max-md:grid-cols-1`,children:[(0,k.jsx)($.Field,{control:h.control,name:`location`,render:oe}),(0,k.jsx)(Gy,{mode:`wait`,children:R&&(0,k.jsx)(Ux.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:`auto`},exit:{opacity:0,height:0},transition:{duration:.3},className:`overflow-hidden`,children:(0,k.jsx)($.Input,{name:`filePath`,label:E.label.value,placeholder:E.placeholder.value,description:E.description.value,disabled:g||!R,onChange:e=>{let t=e.target.value;v({...n,...M??{},filePath:t})}})},`filePath-input`)})]}),(0,k.jsx)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:(0,k.jsxs)($.Select,{name:`importMode`,label:T.label.value,description:T.description.value,onValueChange:se,children:[(0,k.jsx)(J.Trigger,{children:(0,k.jsx)(J.Value,{placeholder:T.label.value})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:`static`,children:T.static.value}),(0,k.jsx)(J.Item,{value:`dynamic`,children:T.dynamic.value}),(0,k.jsx)(J.Item,{value:`live`,children:T.live.value})]})]})}),(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-8 max-md:grid-cols-1`,children:[(0,k.jsxs)($.MultiSelect,{name:`projectIds`,label:S.label.value,description:S.description,onValueChange:ce,children:[(0,k.jsx)(iR.Trigger,{getBadgeValue:e=>u?.find(t=>String(t.id)===e)?.name??e,children:(0,k.jsx)(iR.Input,{placeholder:S.placeholder.value})}),(0,k.jsx)(iR.Content,{children:(0,k.jsx)(Qx,{isLoading:c,children:(0,k.jsx)(iR.List,{children:u?.map(Yq)})})})]}),(0,k.jsxs)($.MultiSelect,{name:`tags`,label:C.label.value,description:C.description,onValueChange:le,children:[(0,k.jsx)(iR.Trigger,{getBadgeValue:e=>d?.find(t=>String(t.key)===e)?.name??e,children:(0,k.jsx)(iR.Input,{placeholder:C.placeholder.value})}),(0,k.jsx)(iR.Content,{children:(0,k.jsx)(Qx,{isLoading:c,children:(0,k.jsx)(iR.List,{children:d?.map(Xq)})})})]})]}),(0,k.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-2 max-md:flex-col`,children:(0,k.jsx)($.Button,{type:`button`,size:`icon-md`,label:D.label.value,Icon:zu,variant:`outline`,color:`text`,className:`max-md:w-full`,onClick:te,disabled:g||j,isLoading:j})})]})};function Yq(e){return(0,k.jsx)(iR.Item,{value:String(e.id),children:e.name},String(e.id))}function Xq(e){return(0,k.jsx)(iR.Item,{value:String(e.key),children:e.name??e.key},String(e.key))}var Zq={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`]},Qq=e=>{let t=(0,B.c)(6),{content:n,...r}=e,[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(!1),{label:c}=yt(Zq),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,O.useEffect)(d,f);let p=()=>i?`Content copied to clipboard`:o?`Failed to copy content`:r.label??c.value;return(0,k.jsx)(tS,{Icon:i?Su:Cu,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})},$q=(0,O.lazy)(()=>Le(()=>import(`./dist-Du3avZ3_.js`).then(e=>({default:e.Editor})),[])),eJ=({children:e,language:t,isDarkMode:n,showLineNumbers:r,showCopyButton:i=!0,isReadOnly:a=!1,onChange:o})=>{let s=(0,O.useRef)(null),c=(0,O.useRef)(null),[l,u]=(0,O.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(`
|
|
186
|
+
`).length>1:!1);return(0,k.jsxs)(`div`,{className:W(`relative h-full w-full text-sm`,r&&`ml-0`),children:[i&&(0,k.jsx)(`div`,{className:`sticky top-5 z-10`,children:(0,k.jsx)(`div`,{className:W(`absolute right-2 bottom-0 flex h-7 items-center`),children:(0,k.jsx)(Qq,{content:e})})}),(0,k.jsx)(`div`,{className:`z-0 grid size-full grid-cols-[0px] overflow-auto`,ref:s,children:(0,k.jsx)(O.Suspense,{fallback:(0,k.jsx)(Qx,{}),children:(0,k.jsx)($q,{...l,defaultLanguage:`typescript`,language:t,loading:(0,k.jsx)(Qx,{}),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`})})})]})},tJ=e=>{let t=(0,B.c)(7),{dictionary:n,isDarkMode:r}=e,{setEditedContent:i,editedContent:a}=xC(),o=nJ,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,k.jsx)(eJ,{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 nJ(e){try{return JSON.parse(e),!0}catch{return!1}}var rJ={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`]},iJ={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`]},aJ=e=>{let t=(0,B.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}=yt(iJ),b;t[0]===n?b=t[1]:(b=YS(n),t[0]=n,t[1]=b);let[x,S]=(0,O.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,k.jsxs)(J,{value:x,onValueChange:w,children:[(0,k.jsx)(J.Trigger,{children:(0,k.jsx)(J.Value,{placeholder:f})}),(0,k.jsxs)(J.Content,{children:[(0,k.jsx)(J.Item,{value:M,children:i}),(0,k.jsx)(J.Item,{value:ie,children:a}),(0,k.jsx)(J.Item,{value:ae,children:o}),(0,k.jsx)(J.Item,{value:oe,children:s}),(0,k.jsx)(J.Item,{value:ee,children:c}),(0,k.jsx)(J.Item,{value:te,children:l}),(0,k.jsx)(J.Item,{value:N,children:u}),(0,k.jsx)(J.Item,{value:P,children:d}),(0,k.jsx)(J.Item,{value:se,children:m}),(0,k.jsx)(J.Item,{value:I,children:_}),(0,k.jsx)(J.Item,{value:R,children:g}),(0,k.jsx)(J.Item,{value:ne,children:p}),(0,k.jsx)(J.Item,{value:F,children:h}),(0,k.jsx)(J.Item,{value:re,disabled:!0,children:v}),(0,k.jsx)(J.Item,{value:L,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},oJ=e=>{let t=(0,B.c)(15),{section:n,dictionaryLocalId:r,keyPath:i,onNodeTypeChange:a}=e,o=yC()?.internationalization?.locales??[],s=YS(n),c=KS(n),l=e=>{a(WS(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,k.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,k.jsx)(aJ,{section:n,onValueChange:e=>a(WS(e,o))}),(0,k.jsx)(oJ,{section:c,keyPath:t,dictionaryLocalId:r,onNodeTypeChange:l})]})}if(s===`array`){let e=[...i,{type:s,key:0}];return(0,k.jsxs)(`div`,{className:`flex w-full flex-col gap-1`,children:[(0,k.jsx)(aJ,{section:n,onValueChange:e=>a(WS(e,o))}),(0,k.jsx)(oJ,{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(WS(e,o)),t[6]=o,t[7]=a,t[8]=s):s=t[8],e=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(aJ,{section:n,onValueChange:s}),(0,k.jsx)(`div`,{className:`mt-6 ml-10`,children:(0,k.jsx)(lJ,{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(WS(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,k.jsx)(aJ,{section:n,onValueChange:u}),t[12]=n,t[13]=u,t[14]=d):d=t[14],d},sJ=e=>{let t=(0,B.c)(23),{sectionKey:n,section:r,keyPath:i,dictionaryLocalId:a}=e,{focusedContent:o,setFocusedContentKeyPath:s}=gC(),{renameEditedContent:c,addEditedContent:l}=bC(),{titleInput:u,deleteButton:d}=yt(rJ),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,k.jsx)(Xx,{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":dt(i,o?.keyPath??[]),onClick:e,children:(0,k.jsxs)(`div`,{className:`flex w-full flex-col items-start justify-between gap-3`,children:[typeof n==`string`&&(0,k.jsxs)(`div`,{className:`w-full`,children:[(0,k.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-10`,children:[(0,k.jsx)(KC,{name:`key`,"aria-label":`Key`,placeholder:u.placeholder.value,defaultValue:n,onSave:e=>p(e),variant:`invisible`}),(0,k.jsx)(tS,{label:d.label.value,variant:`hoverable`,size:`icon-sm`,color:`text`,className:`translate-x-2`,Icon:Ru,onClick:()=>{l(a,void 0,i),s(i.slice(0,-1))}})]}),(0,k.jsxs)(`span`,{className:`ml-3 text-neutral text-sm`,children:[`( `,ht(n),` )`]})]}),(0,k.jsx)(oJ,{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},cJ=e=>{let t=(0,B.c)(14),{section:n,keyPath:r,dictionaryLocalId:i}=e,{addNodeButton:a}=yt(rJ),{setFocusedContentKeyPath:o}=gC(),{addEditedContent:s}=bC();if(!n||typeof n!=`object`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.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:ee,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,k.jsxs)(`div`,{className:`flex flex-col gap-2 overflow-y-auto`,children:[(0,k.jsx)(`ul`,{className:`mr-auto flex flex-col gap-4`,children:Object.keys(n).map(e=>(0,k.jsx)(`li`,{className:`flex w-full`,children:(0,k.jsx)(sJ,{sectionKey:e,section:n?.[e],keyPath:[...r,{type:ee,key:e}],dictionaryLocalId:i})},`${JSON.stringify(r)}-object-${e}`))}),(0,k.jsx)(tS,{label:a.label.value,variant:`hoverable`,size:`md`,color:`text`,Icon:Pu,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},lJ=({section:e,keyPath:t,dictionaryLocalId:n})=>!e||typeof e!=`object`||typeof e.nodeType==`string`?(0,k.jsx)(sJ,{sectionKey:`content`,section:e,keyPath:t,dictionaryLocalId:n}):(0,k.jsx)(cJ,{section:e,keyPath:t,dictionaryLocalId:n}),uJ=e=>{let t=(0,B.c)(3),{dictionary:n}=e,{content:r,localId:i}=n,{editedContent:a}=xC(),o=a?.[i]?.content===void 0?r:a?.[i]?.content,s;return t[0]!==i||t[1]!==o?(s=(0,k.jsx)(sJ,{section:o,keyPath:[],dictionaryLocalId:i}),t[0]=i,t[1]=o,t[2]=s):s=t[2],s},dJ=e=>{let t=(0,B.c)(24),{dictionary:n,onClickDictionaryList:r,isDarkMode:i,mode:a,onDelete:o,onSave:s,showReturnButton:c}=e,l=c===void 0?!0:c,u=yC(),{returnToDictionaryList:d}=yt(Rq),{focusedContent:f,setFocusedContent:p}=gC(),{setLocaleDictionary:m}=pC(),[h,g]=(0,O.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,O.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,k.jsx)(iw,{availableLocales:u?.internationalization?.locales??[],children:(0,k.jsxs)(`div`,{className:`relative flex h-full min-h-0 w-full flex-1 flex-col md:overflow-hidden`,children:[l&&(0,k.jsx)(tS,{onClick:r,variant:`hoverable`,className:`z-10 mr-auto mb-6 ml-5 shrink-0`,color:`text`,Icon:mu,label:d.label.value,children:d.text}),(0,k.jsxs)(`div`,{className:`mb-22 flex min-h-0 flex-1 flex-col overflow-hidden`,children:[(0,k.jsx)(`div`,{className:`sticky top-0 z-10 flex shrink-0 gap-3 rounded-xl bg-background/20 p-3 pb-4`,children:(0,k.jsx)(Uq,{selectedChoice:h,tabs:[...a.includes(`remote`)?[(0,k.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,k.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,k.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,k.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,k.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:(0,k.jsxs)(`div`,{className:`flex w-full min-w-0 flex-col items-stretch gap-6`,children:[a.includes(`remote`)&&h===`details`&&(0,k.jsx)(Jq,{dictionary:n,mode:a}),h===`structure`&&(0,k.jsx)(uJ,{dictionary:n}),h===`content`&&(0,k.jsx)(iI,{dictionary:n,isDarkMode:i}),h===`json`&&(0,k.jsx)(tJ,{dictionary:n,isDarkMode:i})]})})]}),(0,k.jsx)(`div`,{className:`absolute bottom-3 z-20 w-full p-2`,children:(0,k.jsxs)(Xx,{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,k.jsx)(Bq,{text:n.id,className:`text-nowrap text-neutral text-sm`,size:9,children:n.id}),(0,k.jsx)(Lq,{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},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}},pJ=()=>{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)},mJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/iP(?:hone|ad|od)/.test(e)},hJ=()=>{if(typeof window>`u`)return;let e=window.navigator?.userAgent;if(e!==void 0)return/Macintosh|MacIntel|Mac OS X/.test(e)},gJ=e=>{if(!(typeof window>`u`))return(window?.innerWidth??0)<=e},_J=(e=`md`)=>{let t=fJ(e),n=pJ(),r=gJ(t);return{isMobileScreen:r,isMobileUserAgent:n,isMobile:r??n,isIOS:mJ(),isMac:hJ()}},vJ=e=>{let t=(0,B.c)(5),n=e===void 0?`md`:e,r;t[0]===n?r=t[1]:(r=_J(n),t[0]=n,t[1]=r);let[i,a]=(0,O.useState)(r),o,s;return t[2]===n?(o=t[3],s=t[4]):(o=()=>{let e=()=>{a(_J(n))};return window.addEventListener(`resize`,e,{passive:!0}),()=>window.removeEventListener(`resize`,e)},s=[n],t[2]=n,t[3]=o,t[4]=s),(0,O.useEffect)(o,s),i},yJ=e=>{let t=(0,B.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,O.useRef)(``),p=(0,O.useRef)(null),[m,h]=(0,O.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,O.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},bJ=({children:e,className:t,identifier:n,...r})=>(0,k.jsx)(`div`,{className:W(`group/popover relative flex cursor-pointer`,t),id:`unrollable-panel-button-${n}`,"aria-haspopup":!0,...r,children:e}),xJ=({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,k.jsx)(Xx,{transparency:`xs`,role:`group`,"aria-hidden":t,"aria-labelledby":`unrollable-panel-button-${o}`,id:`unrollable-panel-${o}`,className:W(`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});bJ.Detail=xJ;var SJ=e=>(0,k.jsx)(bJ,{...e}),CJ=({xAlign:e=`start`,yAlign:t=`bellow`,...n})=>{let r=(0,O.useRef)(null),[i,a]=(0,O.useState)(e),[o,s]=(0,O.useState)(t),[c,l]=(0,O.useState)(void 0);return(0,O.useEffect)(()=>{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,k.jsx)(xJ,{...n,xAlign:i,yAlign:o,ref:r,style:{...n.style,maxWidth:c?`${c}px`:void 0}})},wJ=SJ;wJ.Detail=CJ;var TJ=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()})}},EJ=()=>{let e=(0,B.c)(2),t=(0,O.useSyncExternalStore)(TJ.subscribe,TJ.getSnapshot,DJ),n;return e[0]===t?n=e[1]:(n={open:TJ.open,close:TJ.close,set:TJ.set,isOpen:e=>!!t[e]},e[0]=t,e[1]=n),n};function DJ(){return{}}var OJ={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`]},kJ=e=>e.split(` + `).map(e=>e.trim()),AJ=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,jJ=(e,t)=>{let n=t.map(AJ),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(AJ(e)));if(!i)return!1;let a=AJ(i);return a.startsWith(`Arrow`)?e.key===a:e.key.toLowerCase()===a.toLowerCase()},MJ=e=>({ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`})[e]||e,NJ=(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},PJ=e=>{let t=(0,B.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=kJ(NJ(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,O.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(MJ(i))):a.add(i.toUpperCase()),g(a),!l&&r&&jJ(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,O.useEffect)(_,v),!c)return null;let y;t[10]===h?y=t[11]:(y=e=>{let t=e.toUpperCase(),n=AJ(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=MJ(e);return(0,k.jsxs)(`span`,{className:`inline-flex items-center`,children:[t>0&&(0,k.jsx)(`span`,{className:`text-neutral/50`,children:`+`}),(0,k.jsx)(`span`,{className:W(`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,k.jsx)(`kbd`,{className:W(`inline-flex items-center justify-center gap-0.5 p-0.5`,`rounded-lg [corner-shape:squircle] supports-[corner-shape:squircle]:rounded-xl`,`font-medium font-sans`,`border-1 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},FJ=({children:e,isHidden:t,minWidth:n=0,align:r=`left`,className:i,...a})=>(0,k.jsx)(`div`,{className:W(`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,k.jsx)(`div`,{style:{minWidth:`${n}px`},className:W(r===`right`&&`ml-auto`),children:e})}),IJ=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},LJ=({title:e,identifier:t,children:n,header:r,footer:i,closeOnOutsideClick:a=!0,backButton:o,isOpen:s,onClose:c,container:l})=>{let u=yt(OJ),{isMobile:d}=vJ(`md`),f=(0,O.useRef)(null),p=(0,O.useRef)(null),m=cq(l),{open:h,close:g,isOpen:_}=EJ(),v=_(t),y=v;pq({disableScroll:y,key:t?`right_drawer_${t}`:`right_drawer`}),(0,O.useEffect)(()=>{let e=e=>{try{if(!f.current)return;let n=y&&a,r=e.target&&!f.current.contains(e.target),i=IJ(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,O.useRef)(c);return(0,O.useEffect)(()=>{b.current=c},[c]),(0,O.useEffect)(()=>{s!==void 0&&s!==v&&(s?h(t):(g(t),b.current?.()))},[s,v,t,h,g]),m?(0,wc.createPortal)((0,k.jsx)(`div`,{className:`fixed top-0 right-0 z-50 flex h-full justify-end`,children:(0,k.jsx)(FJ,{isHidden:!y,align:`right`,children:(0,k.jsxs)(Xx,{className:`relative flex h-screen w-screen flex-col text-text md:w-[400px]`,ref:f,roundedSize:`none`,children:[(0,k.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-3 px-6 pt-6`,children:[(0,k.jsxs)(`div`,{className:`flex justify-between gap-3`,children:[(0,k.jsx)(`div`,{children:o&&(0,k.jsx)(tS,{variant:`hoverable`,color:`text`,label:o.text??u.goBack.value,onClick:o.onBack,Icon:vu,children:o?.text})}),(0,k.jsx)(`div`,{children:(0,k.jsxs)(wJ,{identifier:`close-drawer`,children:[(0,k.jsx)(tS,{variant:`hoverable`,color:`text`,label:`Close`,className:`ml-auto`,onClick:()=>{g(t),c?.()},Icon:Bu,size:`icon-md`}),(0,k.jsx)(wJ.Detail,{identifier:`close-drawer`,children:(0,k.jsxs)(`div`,{className:`flex items-center gap-2 p-2`,children:[(0,k.jsx)(`span`,{className:`whitespace-nowrap text-neutral text-xs`,children:u.closeDrawer}),(0,k.jsx)(PJ,{shortcut:`Escape`,size:`sm`,onTriggered:()=>{g(t),c?.()}})]})})]})})]}),e&&(0,k.jsx)(`h2`,{className:`flex items-center justify-center font-bold text-lg`,children:e}),r]}),(0,k.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-y-auto p-2`,children:(0,k.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,k.jsx)(`div`,{className:`shrink-0`,children:i})]})})}),m):(0,k.jsx)(k.Fragment,{})},RJ=ru(`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-red-500 bg-red-500/10 text-red-500 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`}}),zJ=({children:e,color:t,roundedSize:n,size:r,border:i,background:a,className:o,...s})=>(0,k.jsx)(`div`,{className:RJ({color:t,roundedSize:n,size:r,border:i,background:a,className:o}),...s,children:e}),BJ=`dictionaryList`,VJ=e=>`dictionary_edition_${e}`,HJ=e=>{let t=(0,B.c)(20),n;t[0]===e?n=t[1]:(n=VJ(e),t[0]=e,t[1]=n);let r=n,{isOpen:i,open:a,close:o}=EJ(),{getEditedContentValue:s}=bC(),{focusedContent:c,setFocusedContent:l}=gC(),u,d;t[2]!==c||t[3]!==r||t[4]!==a?(u=()=>{c&&(c.keyPath?.length??0)>0&&a(r)},d=[c,a,r],t[2]=c,t[3]=r,t[4]=a,t[5]=u,t[6]=d):(u=t[5],d=t[6]),(0,O.useEffect)(u,d);let f;t[7]!==i||t[8]!==r?(f=i(r),t[7]=i,t[8]=r,t[9]=f):f=t[9];let p;t[10]!==o||t[11]!==c||t[12]!==r||t[13]!==l?(p=()=>{o(r),c?.dictionaryKey&&l({...c,keyPath:[]})},t[10]=o,t[11]=c,t[12]=r,t[13]=l,t[14]=p):p=t[14];let m;return t[15]!==c||t[16]!==s||t[17]!==f||t[18]!==p?(m={isOpen:f,focusedContent:c,getEditedContentValue:s,close:p},t[15]=c,t[16]=s,t[17]=f,t[18]=p,t[19]=m):m=t[19],m},UJ=e=>{let t=(0,B.c)(77),{dictionaryKey:n,isDarkMode:r}=e,{backButtonText:i,openDictionaryEditor:a,modalTitle:o,noDictionaryFocused:s,focusedDictionaryNotFound:c}=yt(Jx),l;t[0]===n?l=t[1]:(l=VJ(n),t[0]=n,t[1]=l);let u=l,{focusedContent:d,close:f}=HJ(n),{setFocusedContent:p}=gC(),{open:m}=EJ(),h;t[2]===m?h=t[3]:(h=()=>m(BJ),t[2]=m,t[3]=h);let g=h,{data:_}=cD(),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,O.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,k.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:s}),t[10]=s,t[11]=e),e}let w,T,E,D,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,k.jsx)(`span`,{className:`mx-auto my-10 text-neutral text-sm`,children:c}),t[31]=c,t[32]=e),A=e;break bb0}w=LJ,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?(D=()=>{f(),p(null)},t[36]=f,t[37]=p,t[38]=D):D=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,k.jsx)(tS,{variant:`hoverable`,color:`text`,size:`icon-md`,IconRight:Nu,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,k.jsx)(wJ.Detail,{identifier:`open-dictionary-editor`,children:(0,k.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,k.jsxs)(wJ,{identifier:`open-dictionary-editor`,children:[n,r]}),t[44]=n,t[45]=r,t[46]=o):o=t[46],P=(0,k.jsxs)(`header`,{className:`mb-5 flex w-full px-3`,children:[(0,k.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,k.jsx)(zJ,{color:`text`,roundedSize:`full`,size:`xs`,children:T.key}),N=T.filePath&&(0,k.jsx)(zJ,{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]=D,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],D=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,k.jsx)(zJ,{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,k.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,k.jsxs)(k.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,k.jsx)(Lq,{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 re;t[61]!==T||t[62]!==b||t[63]!==d||t[64]!==y||t[65]!==r||t[66]!==o||t[67]!==C?(re=d&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(Fq,{isOpen:b,onClose:()=>x(!1),hasCloseButton:!0,title:o,size:`xl`,transparency:`lg`,className:`h-full`,children:(0,k.jsx)(`div`,{className:`flex h-full min-h-0 w-full flex-1 flex-col px-3 pt-5`,children:(0,k.jsx)(dJ,{dictionary:T,onClickDictionaryList:C,isDarkMode:r,mode:[`local`,`remote`],onDelete:()=>{x(!1),y()},onSave:()=>{x(!1)}})})}),(0,k.jsx)($C,{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]=re):re=t[68];let R;return t[69]!==w||t[70]!==E||t[71]!==D||t[72]!==ee||t[73]!==ne||t[74]!==re||t[75]!==F?(R=(0,k.jsx)(w,{identifier:F,backButton:E,onClose:D,header:ee,footer:ne,children:re}),t[69]=w,t[70]=E,t[71]=D,t[72]=ee,t[73]=ne,t[74]=re,t[75]=F,t[76]=R):R=t[76],R},WJ=e=>{let t=(0,B.c)(4),{isDarkMode:n}=e,{focusedContent:r}=gC(),i=r?.dictionaryKey;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(k.Fragment,{}),t[0]=e):e=t[0],e}let a;return t[1]!==i||t[2]!==n?(a=(0,k.jsx)(UJ,{dictionaryKey:i,isDarkMode:n}),t[1]=i,t[2]=n,t[3]=a):a=t[3],a},GJ={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`]},KJ=()=>{let{drawerTitle:e,buttonLabel:t}=yt(GJ),{set:n}=EJ(),{localeDictionaries:r}=fC(),{editedContent:i}=xC(),{setFocusedContent:a}=gC(),{setSearch:o,search:s}=yJ(),c=(0,O.useMemo)(()=>new ZF(Object.values(r),{keys:[`key`,`title`,`filePath`,`description`,`tags`],threshold:.3,includeScore:!0}),[r]),l=(0,O.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({[BJ]:!1,[VJ(e.key)]:!0})},d=e=>Object.keys(i??{}).includes(e);return(0,k.jsxs)(LJ,{title:e.label.value,identifier:BJ,children:[(0,k.jsx)(`div`,{className:`p-3 pb-4`,children:(0,k.jsx)(nG,{placeholder:`Search dictionaries`,onChange:e=>o(e.target.value),type:`search`})}),(0,k.jsx)(`ul`,{className:`flex flex-col gap-1`,children:l.map(e=>(0,k.jsx)(`li`,{className:`w-full`,children:(0,k.jsx)(tS,{label:t.label({dictionaryLocalId:e.localId}).value,onClick:()=>u(e),variant:`hoverable`,color:`text`,IconRight:yu,size:`md`,isFullWidth:!0,Icon:d(e.localId)?Mu:void 0,children:(0,k.jsx)(`div`,{className:`flex items-center gap-2 py-1`,children:(0,k.jsxs)(`div`,{className:`flex max-w-full flex-col gap-1`,children:[(0,k.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 py-1.5`,children:[(0,k.jsx)(zJ,{color:`text`,roundedSize:`full`,size:`xs`,children:e.key}),e.filePath&&(0,k.jsx)(zJ,{color:`blue`,roundedSize:`full`,size:`xs`,children:e.filePath.split(`/`).pop()}),e.id&&(0,k.jsx)(zJ,{color:`purple`,roundedSize:`full`,size:`xs`,children:`remote`})]}),(0,k.jsx)(`span`,{children:(e.title??``).length>0?e.title:e.key})]})})})},e.localId))})]})},qJ={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`]},JJ=()=>{let e=(0,B.c)(8),{message:t}=yt(qJ),[n]=uC(CS.INTLAYER_HOVERED_CONTENT_CHANGED,null),r=n?.dictionaryKey?`opacity-100`:`opacity-0`,i;e[0]===r?i=e[1]:(i=W(`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,k.jsx)(`div`,{className:i,children:a}),e[5]=i,e[6]=a,e[7]=o):o=e[7],o},YJ=e=>{let t=(0,B.c)(5),{children:n}=e,r,i,a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,k.jsx)(`div`,{className:`absolute right-2 bottom-2`,children:(0,k.jsx)(JJ,{})}),i=(0,k.jsx)(WJ,{}),a=(0,k.jsx)(KJ,{}),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,k.jsxs)(`div`,{className:`relative size-full bg-card p-3`,children:[n,r,i,a]}),t[3]=n,t[4]=o),o},XJ=()=>{let e=(0,B.c)(2),[t,n]=(0,O.useState)(),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>{fetch(`/api/config`).then(ZJ).then(e=>n(e.data))},i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,O.useEffect)(r,i),t};function ZJ(e){return e.json()}var QJ=e=>{let t=(0,B.c)(11),{children:n,iframeRef:r}=e,i=XJ(),a=i?.editor.applicationURL;if(!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(Qx,{}),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,k.jsx)(_C,{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},$J={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`]},eY=()=>{let e=(0,B.c)(9),{editedContent:t,setEditedContentState:n}=xC(),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,O.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,O.useEffect)(s,c),i},tY={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`]},nY=()=>{let e=(0,B.c)(11),{title:t,description:n,documentationLink:r}=yt(tY),i;e[0]===t?i=e[1]:(i=(0,k.jsx)(Oq,{className:`mb-8`,children:t}),e[0]=t,e[1]=i);let a;e[2]===n?a=e[3]:(a=(0,k.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,k.jsx)(gP,{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,k.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},rY=e=>{let t=(0,B.c)(23),{iframeRef:n,applicationPath:r}=e,i=yt($J),{editor:a}=yC()??{},{enabled:o}=SC(),s=CC();eY(),TC();let[c,l]=(0,O.useState)(!0),u;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={receive:!0,emit:!1},t[0]=u):u=t[0];let[d]=dC(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,O.useEffect)(f,p),!a?.applicationURL){let e;return t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsx)(Xx,{className:`max-w-xl`,padding:`xl`,roundedSize:`2xl`,children:(0,k.jsx)(nY,{})}),t[4]=e):e=t[4],e}let m;t[5]===c?m=t[6]:(m=(0,k.jsx)(Qx,{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=W(`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,k.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,k.jsx)(`div`,{className:`fixed right-4 bottom-4`,children:(0,k.jsx)(tS,{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,k.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},iY=()=>{let e=(0,B.c)(2),t=(0,O.useRef)(null),n=zn(),r;return e[0]===n.pathname?r=e[1]:(r=(0,k.jsx)(QJ,{iframeRef:t,children:(0,k.jsx)(_t,{disableEditor:!0,children:(0,k.jsx)(YJ,{children:(0,k.jsx)(rY,{iframeRef:t,applicationPath:n.pathname})})})}),e[0]=n.pathname,e[1]=r),r};(0,Fo.createRoot)(document.getElementById(`root`)).render((0,k.jsx)(O.StrictMode,{children:(0,k.jsx)(()=>{let e=(0,B.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,k.jsx)(qx,{children:(0,k.jsx)(Kx,{children:(0,k.jsx)(iY,{})})}),e[0]=t):t=e[0],t},{})}));export{x as C,u as E,D as S,c as T,pu as _,Eq as a,yt as b,kq as c,gP as d,J as f,Xx as g,tS as h,Fq as i,Aq as l,nS as m,Qq as n,Dq as o,tw as p,Uq as r,Oq as s,wJ as t,jq as u,ru as v,p as w,Le as x,W as y};
|